"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6819],{23627:function(e,t,r){r.d(t,{y1:function(){return b}});var n=r(2265);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}r(57437);var s=["shift","alt","meta","mod","ctrl"],o={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function a(e){return(o[e]||e).trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function u(e,t){return void 0===t&&(t=","),e.split(t)}function c(e,t,r){void 0===t&&(t="+");var n=e.toLocaleLowerCase().split(t).map(function(e){return a(e)}),o={alt:n.includes("alt"),ctrl:n.includes("ctrl")||n.includes("control"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},u=n.filter(function(e){return!s.includes(e)});return i({},o,{keys:u,description:r})}"undefined"!=typeof document&&(document.addEventListener("keydown",function(e){void 0!==e.key&&h([a(e.key),a(e.code)])}),document.addEventListener("keyup",function(e){void 0!==e.key&&f([a(e.key),a(e.code)])})),"undefined"!=typeof window&&window.addEventListener("blur",function(){l.clear()});var l=new Set;function d(e){return Array.isArray(e)}function h(e){var t=Array.isArray(e)?e:[e];l.has("meta")&&l.forEach(function(e){return!s.includes(e)&&l.delete(e.toLowerCase())}),t.forEach(function(e){return l.add(e.toLowerCase())})}function f(e){var t=Array.isArray(e)?e:[e];"meta"===e?l.clear():t.forEach(function(e){return l.delete(e.toLowerCase())})}function p(e,t){var r=e.target;void 0===t&&(t=!1);var n=r&&r.tagName;return d(t)?!!(n&&t&&t.some(function(e){return e.toLowerCase()===n.toLowerCase()})):!!(n&&t&&!0===t)}var m=function(e,t,r){void 0===r&&(r=!1);var n,i=t.alt,s=t.meta,o=t.mod,u=t.shift,c=t.ctrl,h=t.keys,f=e.key,p=e.code,m=e.ctrlKey,v=e.metaKey,g=e.shiftKey,y=e.altKey,w=a(p),b=f.toLowerCase();if(!(null!=h&&h.includes(w))&&!(null!=h&&h.includes(b))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(w))return!1;if(!r){if(!y===i&&"alt"!==b||!g===u&&"shift"!==b)return!1;if(o){if(!v&&!m)return!1}else if(!v===s&&"meta"!==b&&"os"!==b||!m===c&&"ctrl"!==b&&"control"!==b)return!1}return!!(h&&1===h.length&&(h.includes(b)||h.includes(w)))||(h?(void 0===n&&(n=","),(d(h)?h:h.split(n)).every(function(e){return l.has(e.trim().toLowerCase())})):!h)},v=(0,n.createContext)(void 0),g=(0,n.createContext)({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),y=function(e){e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},w="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function b(e,t,r,i){var s,o=(0,n.useRef)(null),l=(0,n.useRef)(!1),b=r instanceof Array?i instanceof Array?void 0:i:r,k=d(e)?e.join(null==b?void 0:b.splitKey):e,E=r instanceof Array?r:i instanceof Array?i:void 0,T=(0,n.useCallback)(t,null!=E?E:[]),L=(0,n.useRef)(T);E?L.current=T:L.current=t;var C=(!function e(t,r){return t&&r&&"object"==typeof t&&"object"==typeof r?Object.keys(t).length===Object.keys(r).length&&Object.keys(t).reduce(function(n,i){return n&&e(t[i],r[i])},!0):t===r}((s=(0,n.useRef)(void 0)).current,b)&&(s.current=b),s.current),I=(0,n.useContext)(g).enabledScopes,M=(0,n.useContext)(v);return w(function(){if((null==C?void 0:C.enabled)!==!1&&(e=null==C?void 0:C.scopes,0===I.length&&e?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):!!(!e||I.some(function(t){return e.includes(t)})||I.includes("*")))){var e,t=function(e,t){var r;if(void 0===t&&(t=!1),!p(e,["input","textarea","select"])||p(e,null==C?void 0:C.enableOnFormTags)){if(null!==o.current){var n=o.current.getRootNode();if((n instanceof Document||n instanceof ShadowRoot)&&n.activeElement!==o.current&&!o.current.contains(n.activeElement)){y(e);return}}(null==(r=e.target)||!r.isContentEditable||null!=C&&C.enableOnContentEditable)&&u(k,null==C?void 0:C.splitKey).forEach(function(r){var n,i,s,o=c(r,null==C?void 0:C.combinationKey);if(m(e,o,null==C?void 0:C.ignoreModifiers)||null!=(s=o.keys)&&s.includes("*")){if(null!=C&&null!=C.ignoreEventWhen&&C.ignoreEventWhen(e)||t&&l.current)return;if(("function"==typeof(n=null==C?void 0:C.preventDefault)&&n(e,o)||!0===n)&&e.preventDefault(),"function"==typeof(i=null==C?void 0:C.enabled)?!i(e,o):!0!==i&&void 0!==i){y(e);return}L.current(e,o),t||(l.current=!0)}})}},r=function(e){void 0!==e.key&&(h(a(e.code)),((null==C?void 0:C.keydown)===void 0&&(null==C?void 0:C.keyup)!==!0||null!=C&&C.keydown)&&t(e))},n=function(e){void 0!==e.key&&(f(a(e.code)),l.current=!1,null!=C&&C.keyup&&t(e,!0))},i=o.current||(null==b?void 0:b.document)||document;return i.addEventListener("keyup",n),i.addEventListener("keydown",r),M&&u(k,null==C?void 0:C.splitKey).forEach(function(e){return M.addHotkey(c(e,null==C?void 0:C.combinationKey,null==C?void 0:C.description))}),function(){i.removeEventListener("keyup",n),i.removeEventListener("keydown",r),M&&u(k,null==C?void 0:C.splitKey).forEach(function(e){return M.removeHotkey(c(e,null==C?void 0:C.combinationKey,null==C?void 0:C.description))})}}},[k,C,I]),o}},89596:function(e,t,r){let n,i,s,o,a,u;r.d(t,{Yp:function(){return N}});var c,l,d=r(2265);r(57437);var h=Object.create,f=Object.defineProperty,p=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyNames,v=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty,y=(n=(e,t)=>{var n,i;n=e,i=function(e){var t,r=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,n=new WeakMap,i=(t=function(e,t){return n.set(e,t),t},function(e){var i=n.get(e),s=void 0===i?e.size:i<1073741824?i+1:0;if(!e.has(s))return t(e,s);if(e.size<536870912){for(;e.has(s);)s=Math.floor(1073741824*Math.random());return t(e,s)}if(e.size>r)throw Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;e.has(s);)s=Math.floor(Math.random()*r);return t(e,s)});e.addUniqueNumber=function(e){var t=i(e);return e.add(t),t},e.generateUniqueNumber=i},"object"==typeof e&&"u">typeof t?i(e):"function"==typeof define&&r.amdO?define(["exports"],i):i((n="u">typeof globalThis?globalThis:n||self).fastUniqueNumbers={})},()=>(i||n((i={exports:{}}).exports,i),i.exports));d.Component;var w=(a=null!=(s=y())?h(v(s)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of m(t))g.call(e,i)||i===r||f(e,i,{get:()=>t[i],enumerable:!(n=p(t,i))||n.enumerable});return e})(!o&&s&&s.__esModule?a:f(a,"default",{value:s,enumerable:!0}),s)),b=e=>void 0!==e.method&&"call"===e.method,k=e=>null===e.error&&"number"==typeof e.id;c=e=>{let t=new Map([[0,()=>{}]]),r=new Map([[0,()=>{}]]),n=new Map,i=new Worker(e);return i.addEventListener("message",({data:e})=>{if(b(e)){let{params:{timerId:i,timerType:s}}=e;if("interval"===s){let e=t.get(i);if("number"==typeof e){let t=n.get(e);if(void 0===t||t.timerId!==i||t.timerType!==s)throw Error("The timer is in an undefined state.")}else if("u">typeof e)e();else throw Error("The timer is in an undefined state.")}else if("timeout"===s){let e=r.get(i);if("number"==typeof e){let t=n.get(e);if(void 0===t||t.timerId!==i||t.timerType!==s)throw Error("The timer is in an undefined state.")}else if("u">typeof e)e(),r.delete(i);else throw Error("The timer is in an undefined state.")}}else if(k(e)){let{id:i}=e,s=n.get(i);if(void 0===s)throw Error("The timer is in an undefined state.");let{timerId:o,timerType:a}=s;n.delete(i),"interval"===a?t.delete(o):r.delete(o)}else{let{error:{message:t}}=e;throw Error(t)}}),{clearInterval:e=>{let r=(0,w.generateUniqueNumber)(n);n.set(r,{timerId:e,timerType:"interval"}),t.set(e,r),i.postMessage({id:r,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:e=>{let t=(0,w.generateUniqueNumber)(n);n.set(t,{timerId:e,timerType:"timeout"}),r.set(e,t),i.postMessage({id:t,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:(e,r)=>{let n=(0,w.generateUniqueNumber)(t);return t.set(n,()=>{e(),"function"==typeof t.get(n)&&i.postMessage({id:null,method:"set",params:{delay:r,now:performance.now(),timerId:n,timerType:"interval"}})}),i.postMessage({id:null,method:"set",params:{delay:r,now:performance.now(),timerId:n,timerType:"interval"}}),n},setTimeout:(e,t)=>{let n=(0,w.generateUniqueNumber)(r);return r.set(n,e),i.postMessage({id:null,method:"set",params:{delay:t,now:performance.now(),timerId:n,timerType:"timeout"}}),n}}},l='(()=>{"use strict";const e=new Map,t=new Map,r=(e,t)=>{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);return{expected:r+o,remainingDelay:o}},o=(e,t,r,i)=>{const s=performance.now();s>r?postMessage({id:null,method:"call",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};addEventListener("message",(i=>{let{data:s}=i;try{if("clear"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;if("interval"===i)(t=>{const r=e.get(t);if(void 0===r)throw new Error(\'There is no interval scheduled with the given id "\'.concat(t,\'".\'));clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});else{if("timeout"!==i)throw new Error(\'The given type "\'.concat(i,\'" is not supported\'));(e=>{const r=t.get(e);if(void 0===r)throw new Error(\'There is no timeout scheduled with the given id "\'.concat(e,\'".\'));clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}else{if("set"!==s.method)throw new Error(\'The given method "\'.concat(s.method,\'" is not supported\'));{const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;if("interval"===d)((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);e.set(i,setTimeout(o,a,e,i,n,"interval"))})(i,a,n);else{if("timeout"!==d)throw new Error(\'The given type "\'.concat(d,\'" is not supported\'));((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);t.set(i,setTimeout(o,a,t,i,n,"timeout"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();',u=null,()=>{if(null!==u)return u;let e=new Blob([l],{type:"application/javascript; charset=utf-8"}),t=URL.createObjectURL(e);return u=c(t),setTimeout(()=>URL.revokeObjectURL(t)),u};var E=(typeof window>"u"?"undefined":typeof window)=="object",T={setTimeout:E?setTimeout.bind(window):setTimeout,clearTimeout:E?clearTimeout.bind(window):clearTimeout,setInterval:E?setInterval.bind(window):setInterval,clearInterval:E?clearInterval.bind(window):clearInterval},L={},C=class{name;closed=!1;mc=new MessageChannel;constructor(e){this.name=e,L[e]=L[e]||[],L[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener("storage",this.onStorage)}onStorage(e){if(e.storageArea!==window.localStorage||e.key.substring(0,this.name.length)!==this.name||null===e.newValue)return;let t=JSON.parse(e.newValue);this.mc.port2.postMessage(t)}postMessage(e){if(this.closed)throw Error("InvalidStateError");let t=JSON.stringify(e),r=`${this.name}:${String(Date.now())}${String(Math.random())}`;window.localStorage.setItem(r,t),T.setTimeout(()=>{window.localStorage.removeItem(r)},500),L[this.name].forEach(e=>{e!==this&&e.mc.port2.postMessage(JSON.parse(t))})}close(){if(this.closed)return;this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener("storage",this.onStorage);let e=L[this.name].indexOf(this);L[this.name].splice(e,1)}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,t){return this.mc.port1.addEventListener(e,t)}removeEventListener(e,t){return this.mc.port1.removeEventListener(e,t)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}},I=typeof window>"u"?void 0:"function"==typeof window.BroadcastChannel?window.BroadcastChannel:C;function M(){return Math.random().toString(36).substring(2)}var R=class{options;channel;token=M();isLeader=!1;isDead=!1;isApplying=!1;reApply=!1;intervals=[];listeners=[];deferred;constructor(e,t){this.channel=e,this.options=t,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return this.reApply=!0,!1;this.isApplying=!0;let e=!1,t=t=>{let{token:r,action:n}=t.data;r!==this.token&&(0===n&&r>this.token&&(e=!0),1===n&&(e=!0))};this.channel.addEventListener("message",t);try{return this.sendAction(0),await function(e=0){return new Promise(t=>T.setTimeout(t,e))}(this.options.responseTime),this.channel.removeEventListener("message",t),this.isApplying=!1,e?!!this.reApply&&this.apply():(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let e=!1,t=null;return new Promise(r=>{let n=()=>{if(e)return;e=!0;try{T.clearInterval(t)}catch{}let n=this.intervals.indexOf(t);n>=0&&this.intervals.splice(n,1),this.channel.removeEventListener("message",i),r()};t=T.setInterval(()=>{this.apply().then(()=>{this.isLeader&&n()})},this.options.fallbackInterval),this.intervals.push(t);let i=e=>{let{action:t}=e.data;2===t&&this.apply().then(()=>{this.isLeader&&n()})};this.channel.addEventListener("message",i)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;let e=e=>{let{action:t}=e.data;0===t&&this.sendAction(1)};return this.channel.addEventListener("message",e),this.listeners.push(e),this.sendAction(1)}waitForLeadership(){return this.deferred||(this.deferred=this.awaitLeadership()),this.deferred}close(){if(!this.isDead){this.isDead=!0,this.isLeader=!1,this.sendAction(2);try{this.listeners.forEach(e=>this.channel.removeEventListener("message",e)),this.intervals.forEach(e=>T.clearInterval(e))}catch{}}}},A=class{channel;options;elector;token=M();registry=new Map;allIdle=!1;isLastActive=!1;constructor(e){let{channelName:t}=e;this.options=e,this.channel=new I(t),this.registry.set(this.token,1),e.leaderElection&&(this.elector=new R(this.channel,{fallbackInterval:2e3,responseTime:100}),this.elector.waitForLeadership()),this.channel.addEventListener("message",e=>{let{action:t,token:r,data:n}=e.data;switch(t){case 3:this.registry.set(r,2);break;case 4:this.registry.delete(r);break;case 5:this.idle(r);break;case 6:this.active(r);break;case 7:this.prompt(r);break;case 8:this.start(r);break;case 9:this.reset(r);break;case 10:this.activate(r);break;case 11:this.pause(r);break;case 12:this.resume(r);break;case 13:this.options.onMessage(n)}}),this.send(3)}get isLeader(){if(!this.elector)throw Error('❌ Leader election is not enabled. To Enable it set the "leaderElection" property to true.');return this.elector.isLeader}prompt(e=this.token){this.registry.set(e,0);let t=[...this.registry.values()].every(e=>0===e);e===this.token&&this.send(7),t&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);let t=[...this.registry.values()].every(e=>2===e);e===this.token&&this.send(5),!this.allIdle&&t&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);let t=[...this.registry.values()].some(e=>1===e);e===this.token&&this.send(6),t&&this.options.onActive(),this.isLastActive=e===this.token}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(8):this.options.start(!0),this.isLastActive=e===this.token}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(9):this.options.reset(!0),this.isLastActive=e===this.token}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(10):this.options.activate(!0),this.isLastActive=e===this.token}pause(e=this.token){e===this.token?this.send(11):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(12):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:13,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(4),this.channel.close()}},O=E?document:null,S=["mousemove","keydown","wheel","DOMMouseScroll","mousewheel","mousedown","touchstart","touchmove","MSPointerDown","MSPointerMove","visibilitychange","focus"];function P(e,t){let r=0;return function(...n){let i=new Date().getTime();if(!(i-r<t))return r=i,e(...n)}}var _=()=>Date.now();function N({timeout:e=12e5,promptTimeout:t=0,promptBeforeIdle:r=0,element:n=O,events:i=S,timers:s,immediateEvents:o=[],onPresenceChange:a=()=>{},onPrompt:u=()=>{},onIdle:c=()=>{},onActive:l=()=>{},onAction:h=()=>{},onMessage:f=()=>{},debounce:p=0,throttle:m=0,eventsThrottle:v=200,startOnMount:g=!0,startManually:y=!1,stopOnIdle:w=!1,crossTab:b=!1,name:k="idle-timer",syncTimers:L=0,leaderElection:C=!1,disabled:I=!1}={}){let M=(0,d.useRef)(_()),R=(0,d.useRef)(_()),N=(0,d.useRef)(null),j=(0,d.useRef)(null),D=(0,d.useRef)(0),x=(0,d.useRef)(0),Z=(0,d.useRef)(0),G=(0,d.useRef)(0),K=(0,d.useRef)(!1),U=(0,d.useRef)(!1),q=(0,d.useRef)(!1),B=(0,d.useRef)(!0),V=(0,d.useRef)(!1),F=(0,d.useRef)(null),W=(0,d.useRef)(null),J=(0,d.useRef)(e),$=(0,d.useRef)(0);(0,d.useEffect)(()=>{if(t&&console.warn("⚠️ IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release."),r&&t)throw Error("❌ Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.");if(e>=2147483647)throw Error(`\u274C The value for the timeout property must fit in a 32 bit signed integer, 2147483647.`);if(t>=2147483647)throw Error(`\u274C The value for the promptTimeout property must fit in a 32 bit signed integer, 2147483647.`);if(r>=2147483647)throw Error(`\u274C The value for the promptBeforeIdle property must fit in a 32 bit signed integer, 2147483647.`);if(r>=e)throw Error(`\u274C The value for the promptBeforeIdle property must be less than the timeout property, ${e}.`);if(r?(J.current=e-r,$.current=r):(J.current=e,$.current=t),!B.current){if(y||I)return;K.current&&(en.current(null,eZ),W.current&&W.current.active()),ey()}},[e,t,r,y,I]);let z=(0,d.useRef)(w);(0,d.useEffect)(()=>{z.current=w},[w]);let H=(0,d.useRef)(o),X=(0,d.useRef)(n),Y=(0,d.useRef)([...new Set([...i,...o]).values()]),Q=(0,d.useRef)(I);(0,d.useEffect)(()=>{Q.current=I,!B.current&&(I?ek():y||ey())},[I]);let ee=(0,d.useRef)(a);(0,d.useEffect)(()=>{ee.current=a},[a]);let et=(0,d.useRef)(u);(0,d.useEffect)(()=>{et.current=u},[u]);let er=(0,d.useRef)(c);(0,d.useEffect)(()=>{er.current=c},[c]);let en=(0,d.useRef)(l);(0,d.useEffect)(()=>{en.current=l},[l]);let ei=(0,d.useRef)(h);(0,d.useEffect)(()=>{ei.current=h},[h]);let es=(0,d.useRef)(f);(0,d.useEffect)(()=>{es.current=f},[f]);let eo=(0,d.useMemo)(()=>{let e=(e,t)=>ei.current(e,t);return p>0?function(e,t){let r;function n(...i){r&&clearTimeout(r),r=setTimeout(()=>{e(...i),r=null},t)}return n.cancel=function(){clearTimeout(r)},n}(e,p):m>0?P(e,m):e},[m,p]),ea=(0,d.useRef)();(0,d.useEffect)(()=>{b&&L&&(ea.current=P(()=>{W.current.active()},L))},[b,L]);let eu=()=>{null!==F.current&&(T.clearTimeout(F.current),F.current=null)},ec=(e,t=!0)=>{eu(),F.current=T.setTimeout(ef,e||J.current),t&&(j.current=_())},el=e=>{U.current||K.current||(et.current(e,eZ),ee.current({type:"active",prompted:!0},eZ)),G.current=0,Z.current=_(),U.current=!0,ec($.current,!1)},ed=()=>{eu(),K.current||(er.current(null,eZ),ee.current({type:"idle"},eZ)),K.current=!0,N.current=_(),z.current?eg():U.current&&(Z.current=0,U.current=!1)},eh=e=>{eu(),(K.current||U.current)&&(en.current(e,eZ),ee.current({type:"active",prompted:!1},eZ)),U.current=!1,Z.current=0,K.current=!1,D.current+=_()-N.current,x.current+=_()-N.current,ev(),ec()},ef=e=>{if(!K.current){eo.cancel&&eo.cancel();let t=_()-j.current;if(!(J.current+$.current<t)&&$.current>0&&!U.current){W.current?W.current.prompt():el(e);return}W.current?W.current.idle():ed();return}W.current?W.current.active():eh(e)},ep=e=>{if(g||j.current||(j.current=_(),en.current(null,eZ)),eo(e,eZ),U.current)return;if(eu(),!K.current&&H.current.includes(e.type)){ef(e);return}let t=_()-j.current;if(K.current&&!w||!K.current&&t>=J.current){ef(e);return}q.current=!1,G.current=0,Z.current=0,ec(),b&&L&&ea.current()},em=(0,d.useRef)(ep);(0,d.useEffect)(()=>{let e=V.current;e&&eg(),v>0?em.current=P(ep,v):em.current=ep,e&&ev()},[v,m,p,ei,b,L]);let ev=()=>{E&&X.current&&(V.current||(Y.current.forEach(e=>{X.current.addEventListener(e,em.current,{capture:!0,passive:!0})}),V.current=!0))},eg=(e=!1)=>{E&&X.current&&(V.current||e)&&(Y.current.forEach(e=>{X.current.removeEventListener(e,em.current,{capture:!0})}),V.current=!1)},ey=(0,d.useCallback)(e=>!Q.current&&(eu(),ev(),K.current=!1,U.current=!1,q.current=!1,G.current=0,Z.current=0,W.current&&!e&&W.current.start(),ec(),!0),[F,K,Q,J,W]),ew=(0,d.useCallback)(e=>!Q.current&&(eu(),ev(),R.current=_(),D.current+=_()-N.current,x.current+=_()-N.current,D.current=0,K.current=!1,U.current=!1,q.current=!1,G.current=0,Z.current=0,W.current&&!e&&W.current.reset(),y||ec(),!0),[F,K,J,y,Q,W]),eb=(0,d.useCallback)(e=>!Q.current&&(eu(),ev(),(K.current||U.current)&&eh(),K.current=!1,U.current=!1,q.current=!1,G.current=0,Z.current=0,R.current=_(),W.current&&!e&&W.current.activate(),ec(),!0),[F,K,U,Q,J,W]),ek=(0,d.useCallback)((e=!1)=>!Q.current&&!q.current&&(G.current=eA(),q.current=!0,eg(),eu(),W.current&&!e&&W.current.pause(),!0),[F,Q,W]),eE=(0,d.useCallback)((e=!1)=>!Q.current&&!!q.current&&(q.current=!1,U.current||ev(),K.current||ec(G.current),Z.current&&(Z.current=_()),W.current&&!e&&W.current.resume(),!0),[F,J,Q,G,W]),eT=(0,d.useCallback)((e,t)=>(W.current?(t&&es.current(e,eZ),W.current.message(e)):t&&es.current(e,eZ),!0),[f]),eL=(0,d.useCallback)(()=>K.current,[K]),eC=(0,d.useCallback)(()=>U.current,[U]),eI=(0,d.useCallback)(()=>W.current?W.current.isLeader:null,[W]),eM=(0,d.useCallback)(()=>W.current?W.current.isLastActive:null,[W]),eR=(0,d.useCallback)(()=>W.current?W.current.token:null,[W]),eA=(0,d.useCallback)(()=>{if(q.current)return G.current;let e=Math.floor((G.current?G.current:$.current+J.current)-(j.current?_()-j.current:0));return e<0?0:Math.abs(e)},[J,$,U,G,j]),eO=(0,d.useCallback)(()=>Math.round(_()-R.current),[R]),eS=(0,d.useCallback)(()=>Math.round(_()-M.current),[M]),eP=(0,d.useCallback)(()=>N.current?new Date(N.current):null,[N]),e_=(0,d.useCallback)(()=>j.current?new Date(j.current):null,[j]),eN=(0,d.useCallback)(()=>K.current?Math.round(_()-N.current+D.current):Math.round(D.current),[N,D]),ej=(0,d.useCallback)(()=>K.current?Math.round(_()-N.current+x.current):Math.round(x.current),[N,x]),eD=(0,d.useCallback)(()=>{let e=Math.round(eO()-eN());return e>=0?e:0},[N,D]),ex=(0,d.useCallback)(()=>{let e=Math.round(eS()-ej());return e>=0?e:0},[N,D]);(0,d.useEffect)(()=>{if(p>0&&m>0)throw Error("❌ onAction can either be throttled or debounced, not both.");s&&(T.setTimeout=s.setTimeout,T.clearTimeout=s.clearTimeout,T.setInterval=s.setInterval,T.clearInterval=s.clearInterval);let e=()=>{W.current&&W.current.close(),eo.cancel&&eo.cancel(),eu(),eg(!0)};return E&&window.addEventListener("beforeunload",e),()=>{E&&window.removeEventListener("beforeunload",e),W.current&&W.current.close(),eo.cancel&&eo.cancel(),eu(),eg(!0)}},[]),(0,d.useEffect)(()=>{W.current&&W.current.close(),b?W.current=new A({channelName:k,leaderElection:C,onPrompt:()=>{el()},onIdle:()=>{ed()},onActive:()=>{eh()},onMessage:e=>{es.current(e,eZ)},start:ey,reset:ew,activate:eb,pause:ek,resume:eE}):W.current=null},[b,k,C,et,er,en,es,ey,ew,ek,eE]),(0,d.useEffect)(()=>{B.current||(eu(),eg(!0)),y||I||(g?ey():ev())},[y,g,I,B]),(0,d.useEffect)(()=>{if(!B.current){let e=[...new Set([...i,...o]).values()];eg(),Y.current=e,X.current=n,H.current=o,y||I||(g?ey():ev())}},[n,JSON.stringify(i),JSON.stringify(o),B,I,y,g]),(0,d.useEffect)(()=>{B.current&&(B.current=!1)},[B]);let eZ={message:eT,start:ey,reset:ew,activate:eb,pause:ek,resume:eE,isIdle:eL,isPrompted:eC,isLeader:eI,isLastActiveTab:eM,getTabId:eR,getRemainingTime:eA,getElapsedTime:eO,getTotalElapsedTime:eS,getLastIdleTime:eP,getLastActiveTime:e_,getIdleTime:eN,getTotalIdleTime:ej,getActiveTime:eD,getTotalActiveTime:ex,setOnPresenceChange:e=>{a=e,ee.current=e},setOnPrompt:e=>{u=e,et.current=e},setOnIdle:e=>{c=e,er.current=e},setOnActive:e=>{l=e,en.current=e},setOnAction:e=>{h=e,ei.current=e},setOnMessage:e=>{f=e,es.current=e}};return eZ}(0,d.createContext)(null).Consumer},86111:function(e,t,r){r.d(t,{ck:function(){return R},fC:function(){return M}});var n=r(22988),i=r(2265),s=r(98324),o=r(25171),a=r(53398),u=r(78149),c=r(91715);let l=(0,i.forwardRef)((e,t)=>{let{pressed:r,defaultPressed:s=!1,onPressedChange:a,...l}=e,[d=!1,h]=(0,c.T)({prop:r,onChange:a,defaultProp:s});return(0,i.createElement)(o.WV.button,(0,n.Z)({type:"button","aria-pressed":d,"data-state":d?"on":"off","data-disabled":e.disabled?"":void 0},l,{ref:t,onClick:(0,u.M)(e.onClick,()=>{e.disabled||h(!d)})}))});var d=r(87513);let h="ToggleGroup",[f,p]=(0,s.b)(h,[a.Pc]),m=(0,a.Pc)(),v=i.forwardRef((e,t)=>{let{type:r,...s}=e;if("single"===r)return i.createElement(w,(0,n.Z)({},s,{ref:t}));if("multiple"===r)return i.createElement(b,(0,n.Z)({},s,{ref:t}));throw Error(`Missing prop \`type\` expected on \`${h}\``)}),[g,y]=f(h),w=i.forwardRef((e,t)=>{let{value:r,defaultValue:s,onValueChange:o=()=>{},...a}=e,[u,l]=(0,c.T)({prop:r,defaultProp:s,onChange:o});return i.createElement(g,{scope:e.__scopeToggleGroup,type:"single",value:u?[u]:[],onItemActivate:l,onItemDeactivate:i.useCallback(()=>l(""),[l])},i.createElement(T,(0,n.Z)({},a,{ref:t})))}),b=i.forwardRef((e,t)=>{let{value:r,defaultValue:s,onValueChange:o=()=>{},...a}=e,[u=[],l]=(0,c.T)({prop:r,defaultProp:s,onChange:o}),d=i.useCallback(e=>l((t=[])=>[...t,e]),[l]),h=i.useCallback(e=>l((t=[])=>t.filter(t=>t!==e)),[l]);return i.createElement(g,{scope:e.__scopeToggleGroup,type:"multiple",value:u,onItemActivate:d,onItemDeactivate:h},i.createElement(T,(0,n.Z)({},a,{ref:t})))}),[k,E]=f(h),T=i.forwardRef((e,t)=>{let{__scopeToggleGroup:r,disabled:s=!1,rovingFocus:u=!0,orientation:c,dir:l,loop:h=!0,...f}=e,p=m(r),v=(0,d.gm)(l),g={role:"group",dir:v,...f};return i.createElement(k,{scope:r,rovingFocus:u,disabled:s},u?i.createElement(a.fC,(0,n.Z)({asChild:!0},p,{orientation:c,dir:v,loop:h}),i.createElement(o.WV.div,(0,n.Z)({},g,{ref:t}))):i.createElement(o.WV.div,(0,n.Z)({},g,{ref:t})))}),L="ToggleGroupItem",C=i.forwardRef((e,t)=>{let r=y(L,e.__scopeToggleGroup),s=E(L,e.__scopeToggleGroup),o=m(e.__scopeToggleGroup),u=r.value.includes(e.value),c=s.disabled||e.disabled,l={...e,pressed:u,disabled:c},d=i.useRef(null);return s.rovingFocus?i.createElement(a.ck,(0,n.Z)({asChild:!0},o,{focusable:!c,active:u,ref:d}),i.createElement(I,(0,n.Z)({},l,{ref:t}))):i.createElement(I,(0,n.Z)({},l,{ref:t}))}),I=i.forwardRef((e,t)=>{let{__scopeToggleGroup:r,value:s,...o}=e,a=y(L,r),u={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},c="single"===a.type?u:void 0;return i.createElement(l,(0,n.Z)({},c,o,{ref:t,onPressedChange:e=>{e?a.onItemActivate(s):a.onItemDeactivate(s)}}))}),M=v,R=C}}]);