"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[86999],{3345:function(t,e,n){n.d(e,{e:function(){return c}});var r=n(267515),u=n(652983),o=n(981147);let i=t=>{let e=(0,u.memo)((0,u.forwardRef)((e,n)=>{let i;let{asChild:c,children:l,...f}=e;if(!c)return(0,u.createElement)(t,{...f,ref:n},l);let a=u.Children.only(l);if(!(0,u.isValidElement)(a))return null;let s=(i=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in i&&i.isReactWarning?a.ref:(i=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in i&&i.isReactWarning?a.props.ref:a.props.ref||a.ref;return(0,u.cloneElement)(a,{...(0,r.dG)(f,a.props),ref:n?(0,o.F)(n,s):s})}));return e.displayName=t.displayName||t.name,e},c=(()=>{let t=new Map;return new Proxy(i,{apply:(t,e,n)=>i(n[0]),get:(e,n)=>(t.has(n)||t.set(n,i(n)),t.get(n))})})()},803840:function(t,e,n){n.d(e,{U:function(){return u}});let[r,u]=(0,n(114177).k)({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}})},159662:function(t,e,n){n.d(e,{P:function(){return u}});let[r,u]=(0,n(114177).k)({name:"LocaleContext",hookName:"useLocaleContext",providerName:"",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}})},981147:function(t,e,n){n.d(e,{F:function(){return r}});function r(...t){return e=>{let n=[];for(let r of t)if("function"==typeof r){let t=r(e);"function"==typeof t&&n.push(t)}else r&&(r.current=e);if(n.length)return()=>{for(let t of n)t()}}}},114177:function(t,e,n){n.d(e,{k:function(){return u}});var r=n(652983);function u(t={}){let{name:e,strict:n=!0,hookName:u="useContext",providerName:o="Provider",errorMessage:i,defaultValue:c}=t,l=(0,r.createContext)(c);return l.displayName=e,[l.Provider,function t(){let e=(0,r.useContext)(l);if(!e&&n){let e=Error(i??`${u} returned \`undefined\`. Seems you forgot to wrap component within ${o}`);throw e.name="ContextError",Error.captureStackTrace?.(e,t),e}return e},l]}},985327:function(t,e,n){n.d(e,{x:function(){return r}});let r=()=>(t,e)=>e.reduce((t,e)=>{let[n,r]=t;return void 0!==r[e]&&(n[e]=r[e]),delete r[e],[n,r]},[{},{...t}])},214179:function(t,e,n){n.d(e,{F:function(){return r}});var r=(t,e=[])=>({parts:(...n)=>{if(o(e))return r(t,n);throw Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>r(t,[...e,...n]),rename:t=>r(t,e),keys:()=>e,build:()=>[...new Set(e)].reduce((e,n)=>Object.assign(e,{[n]:{selector:`&[data-scope="${u(t)}"][data-part="${u(n)}"], & [data-scope="${u(t)}"][data-part="${u(n)}"]`,attrs:{"data-scope":u(t),"data-part":u(n)}}}),{})}),u=t=>t.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),o=t=>0===t.length},267515:function(t,e,n){n.d(e,{Bo:function(){return p},C8:function(){return d},Fb:function(){return s},My:function(){return m},dG:function(){return a},tp:function(){return y}});var r,u=n(407708),o=n(414167),i=(...t)=>t.map(t=>t?.trim?.()).filter(Boolean).join(" "),c=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,l=t=>{let e;let n={};for(;e=c.exec(t);)n[e[1]]=e[2];return n},f=(t,e)=>{if((0,u.HD)(t)){if((0,u.HD)(e))return`${t};${e}`;t=l(t)}else(0,u.HD)(e)&&(e=l(e));return Object.assign({},t??{},e??{})};function a(...t){let e={};for(let n of t){for(let t in e){if(t.startsWith("on")&&"function"==typeof e[t]&&"function"==typeof n[t]){e[t]=(0,u.PP)(n[t],e[t]);continue}if("className"===t||"class"===t){e[t]=i(e[t],n[t]);continue}if("style"===t){e[t]=f(e[t],n[t]);continue}e[t]=void 0!==n[t]?n[t]:e[t]}for(let t in n)void 0===e[t]&&(e[t]=n[t])}return e}function s(){return{and:(...t)=>function(e){return t.every(t=>e.guard(t))},or:(...t)=>function(e){return t.some(t=>e.guard(t))},not:t=>function(e){return!e.guard(t)}}}function d(t){return t}var p=((r=p||{}).NotStarted="Not Started",r.Started="Started",r.Stopped="Stopped",r),m="__init__";function y(t){let e=()=>t.getRootNode?.()??document,n=()=>(0,o.Me)(e()),r=()=>(0,o.vY)(e());return{...t,getRootNode:e,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:r,isActiveElement:t=>t===r(),getById:t=>e().getElementById(t)}}},414167:function(t,e,n){n.d(e,{AK:function(){return tA},A_:function(){return tP},DV:function(){return f},Dx:function(){return N},EB:function(){return tc},EV:function(){return tt},Em:function(){return G},FX:function(){return tm},Hx:function(){return b},IO:function(){return tj},J2:function(){return V},Jj:function(){return S},Kt:function(){return tR},Me:function(){return E},NI:function(){return L},NL:function(){return tD},NS:function(){return tr},OP:function(){return X},P$:function(){return ty},PB:function(){return c},Q2:function(){return ta},Qm:function(){return l},Re:function(){return F},Sn:function(){return tK},Ud:function(){return K},VN:function(){return tl},Wn:function(){return tp},Y3:function(){return td},Zq:function(){return m},b1:function(){return O},cB:function(){return t$},g0:function(){return Z},gX:function(){return ts},h_:function(){return tk},iP:function(){return J},lG:function(){return te},lJ:function(){return tN},pI:function(){return z},pW:function(){return H},r3:function(){return w},rT:function(){return W},rs:function(){return tw},t:function(){return g},uM:function(){return function t(e){let n=function(t){if("html"===d(t))return t;let e=t.assignedSlot||t.parentNode||m(t)&&t.host||E(t).documentElement;return m(e)?e.host:e}(e);return["html","body","#document"].includes(d(n))?E(n).body:f(n)&&tv(n)?n:t(n)}},v$:function(){return I},vY:function(){return x},wC:function(){return q},wq:function(){return tg},x$:function(){return tn},zT:function(){return tb}});var r=t=>Math.max(0,Math.min(1,t)),u=(t,e)=>t.map((n,r)=>t[(Math.max(e,0)+r)%t.length]),o=()=>void 0,i=t=>"object"==typeof t&&null!==t,c=t=>t?"":void 0,l=t=>t?"true":void 0,f=t=>i(t)&&1===t.nodeType&&"string"==typeof t.nodeName,a=t=>i(t)&&9===t.nodeType,s=t=>i(t)&&t===t.window,d=t=>f(t)?t.localName||"":"#document",p=t=>i(t)&&void 0!==t.nodeType,m=t=>p(t)&&11===t.nodeType&&"host"in t,y=t=>f(t)&&"input"===t.localName,g=t=>!!t?.matches("a[href]"),h=t=>!!f(t)&&(t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0),v=/(textarea|select)/;function b(t){if(null==t||!f(t))return!1;try{return y(t)&&null!=t.selectionStart||v.test(t.localName)||t.isContentEditable||"true"===t.getAttribute("contenteditable")||""===t.getAttribute("contenteditable")}catch{return!1}}function w(t,e){if(!t||!e||!f(t)||!f(e))return!1;let n=e.getRootNode?.();if(t===e||t.contains(e))return!0;if(n&&m(n)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}function E(t){return a(t)?t:s(t)?t.document:t?.ownerDocument??document}function S(t){return m(t)?S(t.host):a(t)?t.defaultView??window:f(t)?t.ownerDocument?.defaultView??window:window}function x(t){let e=t.activeElement;for(;e?.shadowRoot;){let t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}var A=new WeakMap;function N(t){return A.has(t)||A.set(t,S(t).getComputedStyle(t)),A.get(t)}var k=()=>"undefined"!=typeof document,R=t=>k()&&t.test(function(){let t=navigator.userAgentData;return t?.platform??navigator.platform}()),j=t=>k()&&t.test(function(){let t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(({brand:t,version:e})=>`${t}/${e}`).join(" "):navigator.userAgent}()),O=()=>k()&&!!navigator.maxTouchPoints,T=()=>R(/^iPhone/i),M=()=>R(/^iPad/i)||$()&&navigator.maxTouchPoints>1,C=()=>T()||M(),P=()=>$()||C(),$=()=>R(/^Mac/i),D=()=>j(/Firefox/i);function L(t){let e=t.composedPath?.()??t.nativeEvent?.composedPath?.();return e?.[0]??t.target}var K=t=>w(t.currentTarget,L(t));function q(t){let e=t.currentTarget;if(!e)return!1;let n=P();if(n&&!t.metaKey||!n&&!t.ctrlKey)return!1;let r=e.localName;return"a"===r||"button"===r&&"submit"===e.type||"input"===r&&"submit"===e.type}function F(t){let e=t.currentTarget;if(!e)return!1;let n=e.localName;return!!t.altKey&&("a"===n||"button"===n&&"submit"===e.type||"input"===n&&"submit"===e.type)}function W(t){return J(t).isComposing||229===t.keyCode}function V(t){return 1===t.key.length&&!t.ctrlKey&&!t.metaKey}var H=t=>0===t.button,I=t=>2===t.button||$()&&t.ctrlKey&&0===t.button,z=t=>t.ctrlKey||t.altKey||t.metaKey,B=t=>"touches"in t&&t.touches.length>0,U={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},_={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function Z(t,e={}){let{dir:n="ltr",orientation:r="horizontal"}=e,u=t.key;return u=U[u]??u,"rtl"===n&&"horizontal"===r&&u in _&&(u=_[u]),u}function J(t){return t.nativeEvent??t}var Q=new Set(["PageUp","PageDown"]),Y=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function X(t){return t.ctrlKey||t.metaKey?.1:Q.has(t.key)||t.shiftKey&&Y.has(t.key)?10:1}function G(t,e="client"){let n=B(t)?t.touches[0]||t.changedTouches[0]:t;return{x:n[`${e}X`],y:n[`${e}Y`]}}var tt=(t,e,n,r)=>{let u="function"==typeof t?t():t;return u?.addEventListener(e,n,r),()=>{u?.removeEventListener(e,n,r)}};function te(t,e,n="value"){if(!t)return;let r="input"===t.localName?"HTMLInputElement":"textarea"===t.localName?"HTMLTextAreaElement":"select"===t.localName?"HTMLSelectElement":void 0;if(r){let u=function(t,e){let{type:n="HTMLInputElement",property:r="value"}=e;return Object.getOwnPropertyDescriptor(S(t)[n].prototype,r)??{}}(t,{type:r,property:n});u.set?.call(t,e)}t.setAttribute(n,e)}function tn(t,e){let{value:n,bubbles:r=!0}=e;if(!t)return;let u=S(t);t instanceof u.HTMLInputElement&&(te(t,`${n}`),t.dispatchEvent(new u.Event("input",{bubbles:r})))}function tr(t,e){if(!t)return;let{onFieldsetDisabledChange:n,onFormReset:r}=e,u=[function(t,e){if(!t)return;let n=t.matches("textarea, input, select, button")?t.form:t.closest("form"),r=t=>{t.defaultPrevented||e()};return n?.addEventListener("reset",r,{passive:!0}),()=>n?.removeEventListener("reset",r)}(t,r),function(t,e){let n=t?.closest("fieldset");if(!n)return;e(n.disabled);let r=new(S(n)).MutationObserver(()=>e(n.disabled));return r.observe(n,{attributes:!0,attributeFilter:["disabled"]}),()=>r.disconnect()}(t,n)];return()=>u.forEach(t=>t?.())}var tu=t=>f(t)&&"IFRAME"===t.tagName,to=t=>0>parseInt(t.getAttribute("tabindex")||"0",10),ti="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type";function tc(t){return!(!t||t.closest("[inert]"))&&t.matches(ti)&&h(t)}function tl(t,e){if(!t)return[];let n=Array.from(t.querySelectorAll(ti)),r=n.filter(tf);return(e&&tf(t)&&r.unshift(t),r.forEach((t,e)=>{if(tu(t)&&t.contentDocument){let n=tl(t.contentDocument.body);r.splice(e,1,...n)}}),!r.length&&e)?n:r}function tf(t){return null!=t&&t.tabIndex>0||tc(t)&&!to(t)}function ta(t){let{root:e,getInitialEl:n,filter:r,enabled:u=!0}=t;if(!u)return;let o=null;if((o="function"==typeof n?n():n)||(o=e?.querySelector("[data-autofocus],[autofocus]")),!o){let t=tl(e);o=r?t.filter(r)[0]:t[0]}return o||e||void 0}function ts(t){let e=t.currentTarget;if(!e)return!1;let[n,r]=function(t,e){let n=tl(t,void 0);return[n[0]||null,n[n.length-1]||null]}(e),u=e.ownerDocument||document;return(u.activeElement!==n||!t.shiftKey)&&(u.activeElement!==r||!!t.shiftKey)&&(!!n||!!r)}function td(t){let e=new Set;function n(t){let n=globalThis.requestAnimationFrame(t);e.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(t)),function(){e.forEach(t=>t())}}function tp(t){let e;let n=globalThis.requestAnimationFrame(()=>{e=t()});return()=>{globalThis.cancelAnimationFrame(n),e?.()}}function tm(t,e){let{defer:n}=e,r=[];return r.push((n?tp:t=>t())(()=>{let n="function"==typeof t?t():t;r.push(function(t,e){if(!t)return;let{attributes:n,callback:r}=e,u=new(t.ownerDocument.defaultView||window).MutationObserver(t=>{for(let e of t)"attributes"===e.type&&e.attributeName&&n.includes(e.attributeName)&&r(e)});return u.observe(t,{attributes:!0,attributeFilter:n}),()=>u.disconnect()}(n,e))})),()=>{r.forEach(t=>t?.())}}function ty(t,e){let{defer:n}=e,r=[];return r.push((n?tp:t=>t())(()=>{let n="function"==typeof t?t():t;r.push(function(t,e){let{callback:n}=e;if(!t)return;let r=new(t.ownerDocument.defaultView||window).MutationObserver(n);return r.observe(t,{childList:!0,subtree:!0}),()=>r.disconnect()}(n,e))})),()=>{r.forEach(t=>t?.())}}function tg(t){let e=()=>t.click();D()?function(t,e,n){let r=tp(()=>{t.removeEventListener(e,u,!0),n()}),u=()=>{r(),n()};return t.addEventListener(e,u,{once:!0,capture:!0}),r}(t,"keyup",e):queueMicrotask(e)}var th=/auto|scroll|overlay|hidden|clip/;function tv(t){let{overflow:e,overflowX:n,overflowY:r,display:u}=S(t).getComputedStyle(t);return th.test(e+r+n)&&!["inline","contents"].includes(u)}function tb(t,e){let{rootEl:n,...r}=e||{};t&&n&&tv(n)&&(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&t.scrollIntoView(r)}function tw(t,e){let{left:n,top:u,width:o,height:i}=e.getBoundingClientRect(),c={x:t.x-n,y:t.y-u},l={x:r(c.x/o),y:r(c.y/i)};return{offset:c,percent:l,getPercentValue:function(t={}){let{dir:e="ltr",orientation:n="horizontal",inverted:r}=t,u="object"==typeof r?r.x:r,o="object"==typeof r?r.y:r;return"horizontal"===n?"rtl"===e||u?1-l.x:l.x:o?1-l.y:l.y}}}var tE="default",tS="",tx=new WeakMap;function tA(t={}){let{target:e,doc:n}=t,r=(n??document).documentElement;if(C()){if("disabled"!==tE)return;tE="restoring",setTimeout(()=>{td(()=>{"restoring"===tE&&("none"===r.style.webkitUserSelect&&(r.style.webkitUserSelect=tS||""),tS="",tE="default")})},300)}else if(e&&tx.has(e)){let t=tx.get(e);"none"===e.style.userSelect&&(e.style.userSelect=t??""),""===e.getAttribute("style")&&e.removeAttribute("style"),tx.delete(e)}}function tN(t={}){let{defer:e,target:n,...r}=t,u=[];return u.push((e?tp:t=>t())(()=>{let t="function"==typeof n?n():n;u.push(function(t={}){let{target:e,doc:n}=t,r=n??document,u=r.documentElement;return C()?("default"===tE&&(tS=u.style.webkitUserSelect,u.style.webkitUserSelect="none"),tE="disabled"):e&&(tx.set(e,e.style.userSelect),e.style.userSelect="none"),()=>tA({target:e,doc:r})}({...r,target:t}))})),()=>{u.forEach(t=>t?.())}}function tk(t,e){let{onPointerMove:n,onPointerUp:r}=e,u=[tt(t,"pointermove",t=>{let e=G(t);if(!(Math.sqrt(e.x**2+e.y**2)<("touch"===t.pointerType?10:5))){if("mouse"===t.pointerType&&0===t.button){r();return}n({point:e,event:t})}},!1),tt(t,"pointerup",r,!1),tt(t,"pointercancel",r,!1),tt(t,"contextmenu",r,!1),tN({doc:t})];return()=>{u.forEach(t=>t())}}function tR(t,e){return Array.from(t?.querySelectorAll(e)??[])}function tj(t,e){return t?.querySelector(e)??null}var tO=t=>t.id,tT=t=>t.split("").map(t=>{let e=t.charCodeAt(0);return e>0&&e<128?t:e>=128&&e<=255?`/x${e.toString(16)}`.replace("/","\\"):""}).join("").trim(),tM=t=>tT(t.dataset?.valuetext??t.textContent??""),tC=(t,e)=>t.trim().toLowerCase().startsWith(e.toLowerCase());function tP(t,e){if(!t)return o;let n=Object.keys(e).reduce((e,n)=>(e[n]=t.style.getPropertyValue(n),e),{});return Object.assign(t.style,e),()=>{Object.assign(t.style,n),0===t.style.length&&t.removeAttribute("style")}}var t$=Object.assign(function(t,e){let{state:n,activeId:r,key:o,timeout:i=350,itemToId:c}=e,l=n.keysSoFar+o,f=l.length>1&&Array.from(l).every(t=>t===l[0])?l[0]:l,a=function(t,e,n,r=tO){let o=n?function(t,e,n=tO){let r=function(t,e,n=tO){return t.find(t=>n(t)===e)}(t,e,n);return r?t.indexOf(r):-1}(t,n,r):-1,i=n?u(t,o):t;return 1===e.length&&(i=i.filter(t=>r(t)!==n)),i.find(t=>tC(tM(t),e))}(t.slice(),f,r,c);function s(){clearTimeout(n.timer),n.timer=-1}return!function t(e){n.keysSoFar=e,s(),""!==e&&(n.timer=+setTimeout(()=>{t(""),s()},i))}(l),a},{defaultOptions:{keysSoFar:"",timer:-1},isValidEvent:function(t){return 1===t.key.length&&!t.ctrlKey&&!t.metaKey}}),tD={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},tL=1e3/60;function tK(t,e){let n=[];return t?.forEach(t=>{let r=function(t,e){let n=t();if(f(n)&&n.isConnected)return e(n),()=>void 0;{let n=setInterval(()=>{let r=t();f(r)&&r.isConnected&&(e(r),clearInterval(n))},tL);return()=>clearInterval(n)}}(t,e);n.push(r)}),()=>{n.forEach(t=>t())}}},854452:function(t,e,n){n.d(e,{eO:function(){return s},vs:function(){return m}});var r=n(267515),u=n(407708),o=n(652983),i=n(63730),c=n(438050);n(397458);var l=void 0!==globalThis.document?o.useLayoutEffect:o.useEffect;function f(t){let e=t().value??t().defaultValue,n=t().isEqual??Object.is,[r]=(0,o.useState)(e),[c,f]=(0,o.useState)(r),a=void 0!==t().value,s=(0,o.useRef)(c);s.current=a?t().value:c;let d=(0,o.useRef)(s.current);l(()=>{d.current=s.current},[c,t().value]);let p=e=>{let r=d.current,o=(0,u.mf)(e)?e(r):e;t().debug&&console.log(`[bindable > ${t().debug}] setValue`,{next:o,prev:r}),a||f(o),n(o,r)||t().onChange?.(o,r)};return{initial:r,ref:s,get:function(){return a?t().value:c},set(e){(t().sync?i.flushSync:u.yR)(()=>p(e))},invoke(e,n){t().onChange?.(e,n)},hash:e=>t().hash?.(e)??String(e)}}f.cleanup=t=>{(0,o.useEffect)(()=>t,[])},f.ref=t=>{let e=(0,o.useRef)(t);return{get:()=>e.current,set:t=>{e.current=t}}};var a=(t,e)=>{let n=(0,o.useRef)(!1),r=(0,o.useRef)(!1);(0,o.useEffect)(()=>{if(n.current&&r.current)return e();r.current=!0},[...(t??[]).map(t=>"function"==typeof t?t():t)]),(0,o.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[])};function s(t,e={}){let n=(0,o.useMemo)(()=>{let{id:t,ids:n,getRootNode:u}=e;return(0,r.tp)({id:t,ids:n,getRootNode:u})},[e]),c=(...e)=>{t.debug&&console.log(...e)},s=function(t){let e=d(t);return function(t){return e.current[t]}}(t.props?.({props:u.oA(e),scope:n})??e),m=d(t.context?.({prop:s,bindable:f,scope:n,flush:p,getContext:()=>y,getComputed:()=>j,getRefs:()=>S})),y={get:t=>m.current?.[t].ref.current,set(t,e){m.current?.[t].set(e)},initial:t=>m.current?.[t].initial,hash(t){let e=m.current?.[t].get();return m.current?.[t].hash(e)}},g=(0,o.useRef)(new Map),h=(0,o.useRef)(null),v=(0,o.useRef)(null),b=(0,o.useRef)({type:""}),w=()=>({...b.current,current:()=>b.current,previous:()=>v.current}),E=()=>({...O,matches:(...t)=>t.includes(O.ref.current),hasTag:e=>!!t.states[O.ref.current]?.tags?.includes(e)}),S=function(t){let e=(0,o.useRef)(t);return{get:t=>e.current[t],set(t,n){e.current[t]=n}}}(t.refs?.({prop:s,context:y})??{}),x=()=>({state:E(),context:y,event:w(),prop:s,send:P,action:A,guard:N,track:a,refs:S,computed:j,flush:p,scope:n,choose:R}),A=e=>{let n=(0,u.mf)(e)?e(x()):e;if(n)for(let e of n.map(e=>{let n=t.implementations?.actions?.[e];return n||(0,u.ZK)(`[zag-js] No implementation found for action "${JSON.stringify(e)}"`),n}))e?.(x())},N=e=>(0,u.mf)(e)?e(x()):t.implementations?.guards?.[e](x()),k=e=>{let n=(0,u.mf)(e)?e(x()):e;if(!n)return;let r=n.map(e=>{let n=t.implementations?.effects?.[e];return n||(0,u.ZK)(`[zag-js] No implementation found for effect "${JSON.stringify(e)}"`),n}),o=[];for(let t of r){let e=t?.(x());e&&o.push(e)}return()=>o.forEach(t=>t?.())},R=t=>(0,u.qo)(t).find(t=>{let e=!t.guard;return(0,u.HD)(t.guard)?e=!!N(t.guard):(0,u.mf)(t.guard)&&(e=t.guard(x())),e}),j=e=>((0,u.zx)(t.computed,()=>"[zag-js] No computed object found on machine"),(0,t.computed[e])({context:y,event:w(),prop:s,refs:S,scope:n,computed:j})),O=f(()=>({defaultValue:t.initialState({prop:s}),onChange(e,n){if(n){let t=g.current.get(n);t?.(),g.current.delete(n)}n&&A(t.states[n]?.exit),A(h.current?.actions);let u=k(t.states[e]?.effects);if(u&&g.current.set(e,u),n===r.My){A(t.entry);let e=k(t.effects);e&&g.current.set(r.My,e)}A(t.states[e]?.entry)}})),T=(0,o.useRef)(void 0),M=(0,o.useRef)(r.Bo.NotStarted);l(()=>{queueMicrotask(()=>{let t=M.current===r.Bo.Started;M.current=r.Bo.Started,c(t?"rehydrating...":"initializing...");let e=T.current??O.initial;O.invoke(e,t?O.get():r.My)});let e=g.current,n=O.ref.current;return()=>{c("unmounting..."),T.current=n,M.current=r.Bo.Stopped,e.forEach(t=>t?.()),g.current=new Map,h.current=null,queueMicrotask(()=>{A(t.exit)})}},[]);let C=()=>"ref"in O?O.ref.current:O.get(),P=e=>{queueMicrotask(()=>{if(M.current!==r.Bo.Started)return;v.current=b.current,b.current=e,c("send",e);let n=C(),u=R(t.states[n].on?.[e.type]??t.on?.[e.type]);if(!u)return;h.current=u;let o=u.target??n;c("transition",u);let l=o!==n;l?(0,i.flushSync)(()=>O.set(o)):u.reenter&&!l?O.invoke(n,n):A(u.actions??[])})};return t.watch?.(x()),{state:E(),send:P,context:y,prop:s,scope:n,refs:S,computed:j,event:w(),getStatus:()=>M.current}}function d(t){let e=(0,o.useRef)(t);return e.current=t,e}function p(t){queueMicrotask(()=>{(0,i.flushSync)(()=>t())})}var m=(0,c.F)(t=>t)},438050:function(t,e,n){function r(t){return new Proxy({},{get:(e,n)=>"style"===n?e=>t({style:e}).style:t})}n.d(e,{F:function(){return r},e:function(){return u}});var u=()=>t=>Array.from(new Set(t))},407708:function(t,e,n){function r(t){return t?Array.isArray(t)?t:[t]:[]}n.d(e,{EQ:function(){return T},Ft:function(){return A},HD:function(){return S},HU:function(){return B},IH:function(){return c},Kn:function(){return E},N4:function(){return J},Od:function(){return l},P2:function(){return C},PP:function(){return O},Ps:function(){return u},Pu:function(){return k},Sm:function(){return p},Uq:function(){return I},WR:function(){return te},Xy:function(){return v},Y3:function(){return M},Z$:function(){return o},ZK:function(){return G},ZT:function(){return j},d5:function(){return s},h1:function(){return _},jj:function(){return f},kb:function(){return a},lp:function(){return d},lt:function(){return Q},m2:function(){return N},mf:function(){return x},mp:function(){return m},oA:function(){return function t(e){if(!Y(e)||void 0===e)return e;let n=Reflect.ownKeys(e).filter(t=>"string"==typeof t),r={};for(let u of n){let n=e[u];void 0!==n&&(r[u]=t(n))}return r}},qo:function(){return r},wQ:function(){return H},xQ:function(){return X},xs:function(){return U},yR:function(){return R},yo:function(){return y},zx:function(){return tt}});var u=t=>t[0],o=t=>t[t.length-1],i=(t,e)=>-1!==t.indexOf(e),c=(t,...e)=>t.concat(e),l=(t,...e)=>t.filter(t=>!e.includes(t)),f=t=>Array.from(new Set(t)),a=(t,e)=>i(t,e)?l(t,e):c(t,e);function s(t,e,n={}){let{step:r=1,loop:u=!0}=n,o=e+r,i=t.length,c=i-1;return -1===e?r>0?0:c:o<0?u?c:0:o>=i?u?0:e>i?i:e:o}function d(t,e,n={}){return t[s(t,e,n)]}function p(t,e,n={}){let{step:r=1,loop:u=!0}=n;return s(t,e,{step:-r,loop:u})}function m(t,e,n={}){return t[p(t,e,n)]}var y=(t,e)=>t.reduce((t,n,r)=>(r%e==0?t.push([n]):o(t)?.push(n),t),[]),g=t=>t?.constructor.name==="Array",h=(t,e)=>{if(t.length!==e.length)return!1;for(let n=0;n{if(Object.is(t,e))return!0;if(null==t&&null!=e||null!=t&&null==e)return!1;if("function"==typeof t?.isEqual&&"function"==typeof e?.isEqual)return t.isEqual(e);if("function"==typeof t&&"function"==typeof e)return t.toString()===e.toString();if(g(t)&&g(e))return h(Array.from(t),Array.from(e));if("object"!=typeof t||"object"!=typeof e)return!1;let n=Object.keys(e??Object.create(null)),r=n.length;for(let e=0;eArray.isArray(t),w=t=>null!=t&&"object"==typeof t,E=t=>w(t)&&!b(t),S=t=>"string"==typeof t,x=t=>"function"==typeof t,A=t=>null==t,N=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);Function.prototype.toString.call(Object);var k=(t,...e)=>("function"==typeof t?t(...e):t)??void 0,R=t=>t(),j=()=>{},O=(...t)=>(...e)=>{t.forEach(function(t){t?.(...e)})};function T(t,e,...n){if(t in e){let r=e[t];return x(r)?r(...n):r}let r=Error(`No matching key: ${JSON.stringify(t)} in ${JSON.stringify(Object.keys(e))}`);throw Error.captureStackTrace?.(r,T),r}var M=(t,e)=>{try{return t()}catch(t){return t instanceof Error&&Error.captureStackTrace?.(t,M),e?.()}};function C(t,e=0){let n=0,r=null;return(...u)=>{let o=Date.now(),i=o-n;i>=e?(r&&(clearTimeout(r),r=null),t(...u),n=o):r||(r=setTimeout(()=>{t(...u),n=Date.now(),r=null},e-i))}}var{floor:P,abs:$,round:D,min:L,max:K,pow:q,sign:F}=Math,W=t=>Number.isNaN(t),V=t=>W(t)?0:t,H=(t,e)=>(t%e+e)%e,I=(t,e,n)=>V(t)>=e&&V(t)<=n,z=(t,e,n)=>D((V(t)-e)/n)*n+e,B=(t,e,n)=>L(K(V(t),e),n),U=(t,e,n)=>(V(t)-e)/(n-e),_=(t,e,n,r)=>B(z(t*(n-e)+e,e,r),e,n),Z=(t,e)=>{let n=t,r=e.toString(),u=r.indexOf("."),o=u>=0?r.length-u:0;if(o>0){let t=q(10,o);n=D(n*t)/t}return n},J=(t,e,n,r)=>{e=Number(e),n=Number(n);let u=(t-(W(e)?0:e))%r,o=Z(2*$(u)>=r?t+F(u)*(r-$(u)):t-u,r);return W(e)?!W(n)&&o>n&&(o=e+P(Z((n-e)/r,r))*r):on&&(o=e+P(Z((n-e)/r,r))*r),Z(o,r)},Q=(t,e=0,n=10)=>{let r=Math.pow(n,e);return D(t*r)/r},Y=t=>t&&"object"==typeof t&&t.constructor===Object,X=t=>function(e){return function(t,e){let n={},r={},u=new Set(e);for(let e in t)u.has(e)?r[e]=t[e]:n[e]=t[e];return[r,n]}(e,t)};function G(...t){1===t.length?t[0]:t[1],2!==t.length||t[0]}function tt(t,e){if(null==t)throw Error(e())}function te(t,e,n){let r=[];for(let n of e)null==t[n]&&r.push(n);if(r.length>0)throw Error(`[zag-js${n?` > ${n}`:""}] missing required props: ${r.join(", ")}`)}}}]); //# sourceMappingURL=86999-93862b379874da29.js.map