@ctlyst.id/voila-ui 1.28.0 → 1.28.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),hn=require("react-dom"),Rt=require("@ctlyst.id/voila-ui-core");function pp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const $e=pp(l),jy=pp(hn);var Ly=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ec={exports:{}},$o={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),hn=require("react-dom"),Rt=require("@ctlyst.id/voila-ui-core");function vp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const $e=vp(l),Ly=vp(hn);var Fy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ec={exports:{}},$o={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Rd;function Fy(){if(Rd)return $o;Rd=1;var e=l,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(s,c,u){var d,f={},m=null,h=null;u!==void 0&&(m=""+u),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(h=c.ref);for(d in c)r.call(c,d)&&!i.hasOwnProperty(d)&&(f[d]=c[d]);if(s&&s.defaultProps)for(d in c=s.defaultProps,c)f[d]===void 0&&(f[d]=c[d]);return{$$typeof:t,type:s,key:m,ref:h,props:f,_owner:o.current}}return $o.Fragment=n,$o.jsx=a,$o.jsxs=a,$o}var To={};/**
9
+ */var Rd;function Vy(){if(Rd)return $o;Rd=1;var e=l,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(s,c,u){var d,f={},m=null,h=null;u!==void 0&&(m=""+u),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(h=c.ref);for(d in c)r.call(c,d)&&!i.hasOwnProperty(d)&&(f[d]=c[d]);if(s&&s.defaultProps)for(d in c=s.defaultProps,c)f[d]===void 0&&(f[d]=c[d]);return{$$typeof:t,type:s,key:m,ref:h,props:f,_owner:o.current}}return $o.Fragment=n,$o.jsx=a,$o.jsxs=a,$o}var To={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Od;function Vy(){return Od||(Od=1,process.env.NODE_ENV!=="production"&&function(){var e=l,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),b=Symbol.iterator,y="@@iterator";function T(x){if(x===null||typeof x!="object")return null;var V=b&&x[b]||x[y];return typeof V=="function"?V:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(x){{for(var V=arguments.length,Q=new Array(V>1?V-1:0),fe=1;fe<V;fe++)Q[fe-1]=arguments[fe];w("error",x,Q)}}function w(x,V,Q){{var fe=S.ReactDebugCurrentFrame,_e=fe.getStackAddendum();_e!==""&&(V+="%s",Q=Q.concat([_e]));var Ie=Q.map(function(Ee){return String(Ee)});Ie.unshift("Warning: "+V),Function.prototype.apply.call(console[x],console,Ie)}}var C=!1,I=!1,D=!1,P=!1,F=!1,k;k=Symbol.for("react.module.reference");function H(x){return!!(typeof x=="string"||typeof x=="function"||x===r||x===i||F||x===o||x===u||x===d||P||x===h||C||I||D||typeof x=="object"&&x!==null&&(x.$$typeof===m||x.$$typeof===f||x.$$typeof===a||x.$$typeof===s||x.$$typeof===c||x.$$typeof===k||x.getModuleId!==void 0))}function R(x,V,Q){var fe=x.displayName;if(fe)return fe;var _e=V.displayName||V.name||"";return _e!==""?Q+"("+_e+")":Q}function E(x){return x.displayName||"Context"}function p(x){if(x==null)return null;if(typeof x.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof x=="function")return x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof x=="object")switch(x.$$typeof){case s:var V=x;return E(V)+".Consumer";case a:var Q=x;return E(Q._context)+".Provider";case c:return R(x,x.render,"ForwardRef");case f:var fe=x.displayName||null;return fe!==null?fe:p(x.type)||"Memo";case m:{var _e=x,Ie=_e._payload,Ee=_e._init;try{return p(Ee(Ie))}catch{return null}}}return null}var $=Object.assign,A=0,M,z,U,re,B,L,oe;function G(){}G.__reactDisabledLog=!0;function K(){{if(A===0){M=console.log,z=console.info,U=console.warn,re=console.error,B=console.group,L=console.groupCollapsed,oe=console.groupEnd;var x={configurable:!0,enumerable:!0,value:G,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}A++}}function Z(){{if(A--,A===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},x,{value:M}),info:$({},x,{value:z}),warn:$({},x,{value:U}),error:$({},x,{value:re}),group:$({},x,{value:B}),groupCollapsed:$({},x,{value:L}),groupEnd:$({},x,{value:oe})})}A<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=S.ReactCurrentDispatcher,W;function Y(x,V,Q){{if(W===void 0)try{throw Error()}catch(_e){var fe=_e.stack.trim().match(/\n( *(at )?)/);W=fe&&fe[1]||""}return`
17
+ */var Od;function By(){return Od||(Od=1,process.env.NODE_ENV!=="production"&&function(){var e=l,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),b=Symbol.iterator,y="@@iterator";function T(x){if(x===null||typeof x!="object")return null;var V=b&&x[b]||x[y];return typeof V=="function"?V:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(x){{for(var V=arguments.length,Q=new Array(V>1?V-1:0),fe=1;fe<V;fe++)Q[fe-1]=arguments[fe];w("error",x,Q)}}function w(x,V,Q){{var fe=S.ReactDebugCurrentFrame,_e=fe.getStackAddendum();_e!==""&&(V+="%s",Q=Q.concat([_e]));var Ie=Q.map(function(Ee){return String(Ee)});Ie.unshift("Warning: "+V),Function.prototype.apply.call(console[x],console,Ie)}}var C=!1,I=!1,D=!1,P=!1,F=!1,k;k=Symbol.for("react.module.reference");function H(x){return!!(typeof x=="string"||typeof x=="function"||x===r||x===i||F||x===o||x===u||x===d||P||x===h||C||I||D||typeof x=="object"&&x!==null&&(x.$$typeof===m||x.$$typeof===f||x.$$typeof===a||x.$$typeof===s||x.$$typeof===c||x.$$typeof===k||x.getModuleId!==void 0))}function R(x,V,Q){var fe=x.displayName;if(fe)return fe;var _e=V.displayName||V.name||"";return _e!==""?Q+"("+_e+")":Q}function E(x){return x.displayName||"Context"}function p(x){if(x==null)return null;if(typeof x.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof x=="function")return x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof x=="object")switch(x.$$typeof){case s:var V=x;return E(V)+".Consumer";case a:var Q=x;return E(Q._context)+".Provider";case c:return R(x,x.render,"ForwardRef");case f:var fe=x.displayName||null;return fe!==null?fe:p(x.type)||"Memo";case m:{var _e=x,Ie=_e._payload,Ee=_e._init;try{return p(Ee(Ie))}catch{return null}}}return null}var $=Object.assign,A=0,M,z,U,re,B,L,oe;function G(){}G.__reactDisabledLog=!0;function K(){{if(A===0){M=console.log,z=console.info,U=console.warn,re=console.error,B=console.group,L=console.groupCollapsed,oe=console.groupEnd;var x={configurable:!0,enumerable:!0,value:G,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}A++}}function Z(){{if(A--,A===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},x,{value:M}),info:$({},x,{value:z}),warn:$({},x,{value:U}),error:$({},x,{value:re}),group:$({},x,{value:B}),groupCollapsed:$({},x,{value:L}),groupEnd:$({},x,{value:oe})})}A<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=S.ReactCurrentDispatcher,W;function Y(x,V,Q){{if(W===void 0)try{throw Error()}catch(_e){var fe=_e.stack.trim().match(/\n( *(at )?)/);W=fe&&fe[1]||""}return`
18
18
  `+W+x}}var te=!1,J;{var ie=typeof WeakMap=="function"?WeakMap:Map;J=new ie}function ee(x,V){if(!x||te)return"";{var Q=J.get(x);if(Q!==void 0)return Q}var fe;te=!0;var _e=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ie;Ie=ce.current,ce.current=null,K();try{if(V){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(qe){fe=qe}Reflect.construct(x,[],Ee)}else{try{Ee.call()}catch(qe){fe=qe}x.call(Ee.prototype)}}else{try{throw Error()}catch(qe){fe=qe}x()}}catch(qe){if(qe&&fe&&typeof qe.stack=="string"){for(var be=qe.stack.split(`
19
19
  `),nt=fe.stack.split(`
20
20
  `),Le=be.length-1,Be=nt.length-1;Le>=1&&Be>=0&&be[Le]!==nt[Be];)Be--;for(;Le>=1&&Be>=0;Le--,Be--)if(be[Le]!==nt[Be]){if(Le!==1||Be!==1)do if(Le--,Be--,Be<0||be[Le]!==nt[Be]){var Ge=`
@@ -24,7 +24,7 @@ Check the render method of \``+x+"`."}return""}}function tr(x){{if(x!==void 0){v
24
24
 
25
25
  Check your code at `+V+":"+Q+"."}return""}}var un={};function $n(x){{var V=Dn();if(!V){var Q=typeof x=="string"?x:x.displayName||x.name;Q&&(V=`
26
26
 
27
- Check the top-level render call using <`+Q+">.")}return V}}function Ht(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var Q=$n(V);if(un[Q])return;un[Q]=!0;var fe="";x&&x._owner&&x._owner!==At.current&&(fe=" It was passed a child from "+p(x._owner.type)+"."),Ot(x),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Ot(null)}}function en(x,V){{if(typeof x!="object")return;if(xt(x))for(var Q=0;Q<x.length;Q++){var fe=x[Q];Lt(fe)&&Ht(fe,V)}else if(Lt(x))x._store&&(x._store.validated=!0);else if(x){var _e=T(x);if(typeof _e=="function"&&_e!==x.entries)for(var Ie=_e.call(x),Ee;!(Ee=Ie.next()).done;)Lt(Ee.value)&&Ht(Ee.value,V)}}}function Nn(x){{var V=x.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))Q=V.propTypes;else return;if(Q){var fe=p(V);ot(Q,x.props,"prop",fe,x)}else if(V.PropTypes!==void 0&&!yn){yn=!0;var _e=p(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_e||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Kt(x){{for(var V=Object.keys(x.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){Ot(x),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Ot(null);break}}x.ref!==null&&(Ot(x),v("Invalid attribute `ref` supplied to `React.Fragment`."),Ot(null))}}function Tn(x,V,Q,fe,_e,Ie){{var Ee=H(x);if(!Ee){var be="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(be+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var nt=tr(_e);nt?be+=nt:be+=Dn();var Le;x===null?Le="null":xt(x)?Le="array":x!==void 0&&x.$$typeof===t?(Le="<"+(p(x.type)||"Unknown")+" />",be=" Did you accidentally export a JSX literal instead of a component?"):Le=typeof x,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Le,be)}var Be=kt(x,V,Q,_e,Ie);if(Be==null)return Be;if(Ee){var Ge=V.children;if(Ge!==void 0)if(fe)if(xt(Ge)){for(var qt=0;qt<Ge.length;qt++)en(Ge[qt],x);Object.freeze&&Object.freeze(Ge)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else en(Ge,x)}return x===r?Kt(Be):Nn(Be),Be}}function kn(x,V,Q){return Tn(x,V,Q,!0)}function nr(x,V,Q){return Tn(x,V,Q,!1)}var Wt=nr,rr=kn;To.Fragment=r,To.jsx=Wt,To.jsxs=rr}()),To}process.env.NODE_ENV==="production"?Ec.exports=Fy():Ec.exports=Vy();var j=Ec.exports;function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ae.apply(this,arguments)}function mn(e,t=[]){let n=[];function r(i,a){const s=l.createContext(a),c=n.length;n=[...n,a];function u(f){const{scope:m,children:h,...b}=f,y=(m==null?void 0:m[e][c])||s,T=l.useMemo(()=>b,Object.values(b));return l.createElement(y.Provider,{value:T},h)}function d(f,m){const h=(m==null?void 0:m[e][c])||s,b=l.useContext(h);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const o=()=>{const i=n.map(a=>l.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return l.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,By(o,...t)]}function By(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:u})=>{const f=c(i)[`__scope${u}`];return{...s,...f}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Hy(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function mp(...e){return t=>e.forEach(n=>Hy(n,t))}function st(...e){return l.useCallback(mp(...e),e)}const uo=l.forwardRef((e,t)=>{const{children:n,...r}=e,o=l.Children.toArray(n),i=o.find(Wy);if(i){const a=i.props.children,s=o.map(c=>c===i?l.Children.count(a)>1?l.Children.only(null):l.isValidElement(a)?a.props.children:null:c);return l.createElement(xc,ae({},r,{ref:t}),l.isValidElement(a)?l.cloneElement(a,void 0,s):null)}return l.createElement(xc,ae({},r,{ref:t}),n)});uo.displayName="Slot";const xc=l.forwardRef((e,t)=>{const{children:n,...r}=e;return l.isValidElement(n)?l.cloneElement(n,{...zy(r,n.props),ref:t?mp(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});xc.displayName="SlotClone";const gp=({children:e})=>l.createElement(l.Fragment,null,e);function Wy(e){return l.isValidElement(e)&&e.type===gp}function zy(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ja(e){const t=e+"CollectionProvider",[n,r]=mn(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:b,children:y}=h,T=l.useRef(null),S=l.useRef(new Map).current;return l.createElement(o,{scope:b,itemMap:S,collectionRef:T},y)},s=e+"CollectionSlot",c=l.forwardRef((h,b)=>{const{scope:y,children:T}=h,S=i(s,y),v=st(b,S.collectionRef);return l.createElement(uo,{ref:v},T)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",f=l.forwardRef((h,b)=>{const{scope:y,children:T,...S}=h,v=l.useRef(null),w=st(b,v),C=i(u,y);return l.useEffect(()=>(C.itemMap.set(v,{ref:v,...S}),()=>void C.itemMap.delete(v))),l.createElement(uo,{[d]:"",ref:w},T)});function m(h){const b=i(e+"CollectionConsumer",h);return l.useCallback(()=>{const T=b.collectionRef.current;if(!T)return[];const S=Array.from(T.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((C,I)=>S.indexOf(C.ref.current)-S.indexOf(I.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}function Ae(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function cn(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Sn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Uy({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=cn(n),c=l.useCallback(u=>{if(i){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else o(u)},[i,e,o,s]);return[a,c]}function Uy({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,o=l.useRef(r),i=cn(t);return l.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Yy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ke=Yy.reduce((e,t)=>{const n=l.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?uo:t;return l.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),l.createElement(s,ae({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function yp(e,t){e&&hn.flushSync(()=>e.dispatchEvent(t))}const Gt=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{};function Ky(e,t){return l.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const yr=e=>{const{present:t,children:n}=e,r=qy(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),i=st(r.ref,o.ref);return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:i}):null};yr.displayName="Presence";function qy(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),i=l.useRef("none"),a=e?"mounted":"unmounted",[s,c]=Ky(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Bi(r.current);i.current=s==="mounted"?u:"none"},[s]),Gt(()=>{const u=r.current,d=o.current;if(d!==e){const m=i.current,h=Bi(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Gt(()=>{if(t){const u=f=>{const h=Bi(r.current).includes(f.animationName);f.target===t&&h&&hn.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(i.current=Bi(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Bi(e){return(e==null?void 0:e.animationName)||"none"}const Xy=$e["useId".toString()]||(()=>{});let Gy=0;function Xn(e){const[t,n]=$e.useState(Xy());return Gt(()=>{e||n(r=>r??String(Gy++))},[e]),e||(t?`radix-${t}`:"")}const bp="Collapsible",[Zy,wp]=mn(bp),[Qy,fu]=Zy(bp),Jy=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,u]=Sn({prop:r,defaultProp:o,onChange:a});return l.createElement(Qy,{scope:n,disabled:i,contentId:Xn(),open:c,onOpenToggle:l.useCallback(()=>u(d=>!d),[u])},l.createElement(Ke.div,ae({"data-state":hu(c),"data-disabled":i?"":void 0},s,{ref:t})))}),eb="CollapsibleTrigger",tb=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=fu(eb,n);return l.createElement(Ke.button,ae({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":hu(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ae(e.onClick,o.onOpenToggle)}))}),Ep="CollapsibleContent",nb=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=fu(Ep,e.__scopeCollapsible);return l.createElement(yr,{present:n||o.open},({present:i})=>l.createElement(rb,ae({},r,{ref:t,present:i})))}),rb=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=fu(Ep,n),[s,c]=l.useState(r),u=l.useRef(null),d=st(t,u),f=l.useRef(0),m=f.current,h=l.useRef(0),b=h.current,y=a.open||s,T=l.useRef(y),S=l.useRef();return l.useEffect(()=>{const v=requestAnimationFrame(()=>T.current=!1);return()=>cancelAnimationFrame(v)},[]),Gt(()=>{const v=u.current;if(v){S.current=S.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const w=v.getBoundingClientRect();f.current=w.height,h.current=w.width,T.current||(v.style.transitionDuration=S.current.transitionDuration,v.style.animationName=S.current.animationName),c(r)}},[a.open,r]),l.createElement(Ke.div,ae({"data-state":hu(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!y},i,{ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style}}),y&&o)});function hu(e){return e?"open":"closed"}const ob=Jy,ib=tb,ab=nb,sb=l.createContext(void 0);function es(e){const t=l.useContext(sb);return e||t||"ltr"}const br="Accordion",cb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[pu,ub,lb]=Ja(br),[ts,wP]=mn(br,[lb,wp]),vu=wp(),xp=l.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return l.createElement(pu.Provider,{scope:e.__scopeAccordion},n==="multiple"?l.createElement(pb,ae({},i,{ref:t})):l.createElement(hb,ae({},o,{ref:t})))});xp.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof t=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[_p,db]=ts(br),[Sp,fb]=ts(br,{collapsible:!1}),hb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...a}=e,[s,c]=Sn({prop:n,defaultProp:r,onChange:o});return l.createElement(_p,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:l.useCallback(()=>i&&c(""),[i,c])},l.createElement(Sp,{scope:e.__scopeAccordion,collapsible:i},l.createElement(Cp,ae({},a,{ref:t}))))}),pb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a=[],s]=Sn({prop:n,defaultProp:r,onChange:o}),c=l.useCallback(d=>s((f=[])=>[...f,d]),[s]),u=l.useCallback(d=>s((f=[])=>f.filter(m=>m!==d)),[s]);return l.createElement(_p,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u},l.createElement(Sp,{scope:e.__scopeAccordion,collapsible:!0},l.createElement(Cp,ae({},i,{ref:t}))))}),[vb,ns]=ts(br),Cp=l.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...a}=e,s=l.useRef(null),c=st(s,t),u=ub(n),f=es(o)==="ltr",m=Ae(e.onKeyDown,h=>{var b;if(!cb.includes(h.key))return;const y=h.target,T=u().filter(k=>{var H;return!((H=k.ref.current)!==null&&H!==void 0&&H.disabled)}),S=T.findIndex(k=>k.ref.current===y),v=T.length;if(S===-1)return;h.preventDefault();let w=S;const C=0,I=v-1,D=()=>{w=S+1,w>I&&(w=C)},P=()=>{w=S-1,w<C&&(w=I)};switch(h.key){case"Home":w=C;break;case"End":w=I;break;case"ArrowRight":i==="horizontal"&&(f?D():P());break;case"ArrowDown":i==="vertical"&&D();break;case"ArrowLeft":i==="horizontal"&&(f?P():D());break;case"ArrowUp":i==="vertical"&&P();break}const F=w%v;(b=T[F].ref.current)===null||b===void 0||b.focus()});return l.createElement(vb,{scope:n,disabled:r,direction:o,orientation:i},l.createElement(pu.Slot,{scope:n},l.createElement(Ke.div,ae({},a,{"data-orientation":i,ref:c,onKeyDown:r?void 0:m}))))}),_c="AccordionItem",[mb,mu]=ts(_c),gb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=ns(_c,n),a=db(_c,n),s=vu(n),c=Xn(),u=r&&a.value.includes(r)||!1,d=i.disabled||e.disabled;return l.createElement(mb,{scope:n,open:u,disabled:d,triggerId:c},l.createElement(ob,ae({"data-orientation":i.orientation,"data-state":$p(u)},s,o,{ref:t,disabled:d,open:u,onOpenChange:f=>{f?a.onItemOpen(r):a.onItemClose(r)}})))}),yb="AccordionHeader",bb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ns(br,n),i=mu(yb,n);return l.createElement(Ke.h3,ae({"data-orientation":o.orientation,"data-state":$p(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),Pd="AccordionTrigger",wb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ns(br,n),i=mu(Pd,n),a=fb(Pd,n),s=vu(n);return l.createElement(pu.ItemSlot,{scope:n},l.createElement(ib,ae({"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId},s,r,{ref:t})))}),Eb="AccordionContent",xb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ns(br,n),i=mu(Eb,n),a=vu(n);return l.createElement(ab,ae({role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation},a,r,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function $p(e){return e?"open":"closed"}const _b=xp,Sb=gb,Cb=bb,$b=wb,Tb=xb;function Tp(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Tp(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Pe(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Tp(e))&&(r&&(r+=" "),r+=t);return r}const Ib=l.forwardRef(({children:e,className:t,...n},r)=>j.jsx(_b,{className:Pe("accordion-root",t),...n,ref:r,children:e})),Hs=(e,t)=>{const n=Object.values(e).map(r=>r[t]);return n.every(r=>typeof r=="string")?n.join(" ").trim():n.reduce((r,o)=>Object.assign(r,o),{})},Rb=(e,t)=>{const r=Object.keys(e).map(i=>e[i].properties).reduce((i,a)=>new Set([...Array.from(i),...Array.from(a)]),new Set),o={};return Object.keys(t).forEach(i=>{r.has(i)||(o[i]=t[i])}),o},rs=(e,t,n)=>{const o=[...Object.keys(e).map(u=>e[u](t)),...n??[]],i=Hs(o,"className"),a=Hs(o,"otherProps"),s=Hs(o,"style");return{otherProps:Rb(e,a),className:i,style:s}},{backgroundAtoms:Ob,borderAtoms:Pb,commonAtoms:Ad,flexAtoms:Dd,positionAtoms:Ab,radiiAtoms:Db,shadowAtoms:Nb,sizesAtoms:kb,spaceAtoms:Mb,typographyAtoms:jb}=Rt.atoms,et=l.forwardRef(({as:e,children:t,id:n,className:r,isDisabled:o,isColumn:i,...a},s)=>{const c=e||"div",u=Ad({display:i?"flex":a.display}),d=Dd({flexWrap:i?"wrap":a.flexWrap}),{className:f,otherProps:m,style:h}=rs({commonAtoms:Ad,flexAtoms:Dd,positionAtoms:Ab,spaceAtoms:Mb,sizesAtoms:kb,borderAtoms:Pb,typographyAtoms:jb,radiiAtoms:Db,backgroundAtoms:Ob,shadowAtoms:Nb},a,[u,d]);return j.jsx(c,{ref:s,className:Pe(f,r),disabled:o,style:h,...m,children:t})});et.displayName="Box";et.defaultProps={id:"base",as:"div",className:void 0,isDisabled:void 0,"data-test-id":void 0,isColumn:!1};const gu=({children:e,withShadow:t,bgColor:n,...r})=>j.jsx(et,{boxShadow:t?"$raised":"$none",bgColor:"$white",...r,children:e});gu.displayName="Card";gu.defaultProps={withShadow:!1};var Lb="ifvo3u0";const{sizesAtoms:Nd,spaceAtoms:kd,commonAtoms:Md,flexAtoms:Fb}=Rt.atoms,yu=({children:e,isFluid:t,className:n,display:r,...o})=>{const a=Nd({width:"$full",maxW:t?"$full":"$lg"}),s=kd({mx:"$auto",my:"$0"}),c=Md({display:r}),{className:u,style:d}=rs({flexAtoms:Fb,sizesAtoms:Nd,spaceAtoms:kd,commonAtoms:Md},o,[a,s,c]);return j.jsx("div",{className:Pe("vds-container",!t&&Lb,u,n),style:d,...o,children:e})};yu.displayName="Container";yu.defaultProps={display:"block",children:null,isFluid:!1,className:void 0};const{commonAtoms:jd,spaceAtoms:Vb,sizesAtoms:Bb,radiiAtoms:Hb,flexAtoms:Wb,backgroundAtoms:zb}=Rt.atoms,Yt=l.forwardRef(({as:e,children:t,id:n,className:r,...o},i)=>{const a=e||"div",s=jd({display:"flex"}),{className:c,otherProps:u,style:d}=rs({flexAtoms:Wb,commonAtoms:jd,spaceAtoms:Vb,sizesAtoms:Bb,radiiAtoms:Hb,backgroundAtoms:zb},o,[s]);return j.jsx(a,{"data-test-id":o["data-test-id"],ref:i,className:Pe(c,r),style:d,...u,children:t})});Yt.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};Yt.displayName="Flex";const{gridAtoms:Ub,commonAtoms:Yb,spaceAtoms:Kb,sizesAtoms:qb,radiiAtoms:Xb}=Rt.atoms,bu=l.forwardRef(({as:e,children:t,id:n,className:r,...o},i)=>{const a=e||"div",s=Rt.atoms.commonAtoms({display:"grid"}),{className:c,otherProps:u,style:d}=rs({gridAtoms:Ub,commonAtoms:Yb,spaceAtoms:Kb,sizesAtoms:qb,radiiAtoms:Xb},o,[s]);return j.jsx(a,{"data-test-id":o["data-test-id"],ref:i,className:Pe(c,r),style:d,...u,children:t})});bu.displayName="Grid";bu.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};const Gb={horizontal:"row",vertical:"column",horizontalReverse:"row-reverse",verticalReverse:"column-reverse"},Zb=e=>e?Gb[e]:void 0,Ld={1:"wrap",0:"nowrap"},Qb=e=>e?typeof e=="boolean"?Ld[1]:Ld[0]:void 0,Pr=l.forwardRef(({as:e="div",alignItems:t,children:n,justifyContent:r,direction:o,gap:i,wrap:a=!0,content:s,...c},u)=>{const d=Zb(o),f=Qb(a);return j.jsx(Yt,{ref:u,"data-test-id":c["data-test-id"],alignItems:t,display:"flex",as:e,direction:d,wrap:f,gap:i,justifyContent:r,...c,children:n})});Pr.defaultProps={as:"div",alignItems:void 0,direction:"vertical",justifyContent:void 0,gap:"4",wrap:!0,"data-test-id":void 0};Pr.displayName="Stack";function Jb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Vd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fd(Object(n),!0).forEach(function(r){Jb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var e0=(e,t,n)=>{for(var r of Object.keys(e)){var o;if(e[r]!==((o=t[r])!==null&&o!==void 0?o:n[r]))return!1}return!0},wt=e=>t=>{var n=e.defaultClassName,r=Vd(Vd({},e.defaultVariants),t);for(var o in r){var i,a=(i=r[o])!==null&&i!==void 0?i:e.defaultVariants[o];if(a!=null){var s=a;typeof s=="boolean"&&(s=s===!0?"true":"false");var c=e.variantClassNames[o][s];c&&(n+=" "+c)}}for(var[u,d]of e.compoundVariants)e0(u,r,e.defaultVariants)&&(n+=" "+d);return n},t0=wt({defaultClassName:"",variantClassNames:{textStyle:{heading1:"_1ccbe2w0",heading2:"_1ccbe2w1",heading3:"_1ccbe2w2",heading4:"_1ccbe2w3",heading5:"_1ccbe2w4",heading6:"_1ccbe2w5",subheading1:"_1ccbe2w6",subheading2:"_1ccbe2w7",subtitle1:"_1ccbe2w8",subtitle2:"_1ccbe2w9",body1:"_1ccbe2wa",body2:"_1ccbe2wb",caption:"_1ccbe2wc",footer:"_1ccbe2wd"},isStrikethrough:{true:"_1ccbe2we"}},defaultVariants:{},compoundVariants:[]});const sn=l.forwardRef(({as:e="p",children:t,textStyle:n,isStrikethrough:r,className:o,...i},a)=>j.jsx(et,{as:e,ref:a,className:Pe(t0({textStyle:n,isStrikethrough:r}),o),...i,children:t}));sn.displayName="Text";sn.defaultProps={as:"p"};var n0="_13vyt6x7",r0="_13vyt6x5",o0="_13vyt6x6",i0="_13vyt6x2",a0="_13vyt6x3",s0="_13vyt6x4";const c0=l.forwardRef(({children:e,className:t,...n},r)=>j.jsx(Tb,{className:Pe(r0,t),...n,ref:r,children:j.jsx(et,{className:o0,children:e})})),u0=l.forwardRef(({children:e,className:t,...n},r)=>j.jsx(Sb,{className:Pe(i0,t),...n,ref:r,children:e}));var Sc={exports:{}},Io={};/**
27
+ Check the top-level render call using <`+Q+">.")}return V}}function Ht(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var Q=$n(V);if(un[Q])return;un[Q]=!0;var fe="";x&&x._owner&&x._owner!==At.current&&(fe=" It was passed a child from "+p(x._owner.type)+"."),Ot(x),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Ot(null)}}function en(x,V){{if(typeof x!="object")return;if(xt(x))for(var Q=0;Q<x.length;Q++){var fe=x[Q];Lt(fe)&&Ht(fe,V)}else if(Lt(x))x._store&&(x._store.validated=!0);else if(x){var _e=T(x);if(typeof _e=="function"&&_e!==x.entries)for(var Ie=_e.call(x),Ee;!(Ee=Ie.next()).done;)Lt(Ee.value)&&Ht(Ee.value,V)}}}function Nn(x){{var V=x.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))Q=V.propTypes;else return;if(Q){var fe=p(V);ot(Q,x.props,"prop",fe,x)}else if(V.PropTypes!==void 0&&!yn){yn=!0;var _e=p(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_e||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Kt(x){{for(var V=Object.keys(x.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){Ot(x),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Ot(null);break}}x.ref!==null&&(Ot(x),v("Invalid attribute `ref` supplied to `React.Fragment`."),Ot(null))}}function Tn(x,V,Q,fe,_e,Ie){{var Ee=H(x);if(!Ee){var be="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(be+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var nt=tr(_e);nt?be+=nt:be+=Dn();var Le;x===null?Le="null":xt(x)?Le="array":x!==void 0&&x.$$typeof===t?(Le="<"+(p(x.type)||"Unknown")+" />",be=" Did you accidentally export a JSX literal instead of a component?"):Le=typeof x,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Le,be)}var Be=kt(x,V,Q,_e,Ie);if(Be==null)return Be;if(Ee){var Ge=V.children;if(Ge!==void 0)if(fe)if(xt(Ge)){for(var qt=0;qt<Ge.length;qt++)en(Ge[qt],x);Object.freeze&&Object.freeze(Ge)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else en(Ge,x)}return x===r?Kt(Be):Nn(Be),Be}}function kn(x,V,Q){return Tn(x,V,Q,!0)}function nr(x,V,Q){return Tn(x,V,Q,!1)}var Wt=nr,rr=kn;To.Fragment=r,To.jsx=Wt,To.jsxs=rr}()),To}process.env.NODE_ENV==="production"?Ec.exports=Vy():Ec.exports=By();var j=Ec.exports;function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ae.apply(this,arguments)}function mn(e,t=[]){let n=[];function r(i,a){const s=l.createContext(a),c=n.length;n=[...n,a];function u(f){const{scope:m,children:h,...b}=f,y=(m==null?void 0:m[e][c])||s,T=l.useMemo(()=>b,Object.values(b));return l.createElement(y.Provider,{value:T},h)}function d(f,m){const h=(m==null?void 0:m[e][c])||s,b=l.useContext(h);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}const o=()=>{const i=n.map(a=>l.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return l.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,Hy(o,...t)]}function Hy(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:u})=>{const f=c(i)[`__scope${u}`];return{...s,...f}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Wy(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function gp(...e){return t=>e.forEach(n=>Wy(n,t))}function st(...e){return l.useCallback(gp(...e),e)}const uo=l.forwardRef((e,t)=>{const{children:n,...r}=e,o=l.Children.toArray(n),i=o.find(zy);if(i){const a=i.props.children,s=o.map(c=>c===i?l.Children.count(a)>1?l.Children.only(null):l.isValidElement(a)?a.props.children:null:c);return l.createElement(xc,ae({},r,{ref:t}),l.isValidElement(a)?l.cloneElement(a,void 0,s):null)}return l.createElement(xc,ae({},r,{ref:t}),n)});uo.displayName="Slot";const xc=l.forwardRef((e,t)=>{const{children:n,...r}=e;return l.isValidElement(n)?l.cloneElement(n,{...Uy(r,n.props),ref:t?gp(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});xc.displayName="SlotClone";const yp=({children:e})=>l.createElement(l.Fragment,null,e);function zy(e){return l.isValidElement(e)&&e.type===yp}function Uy(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ja(e){const t=e+"CollectionProvider",[n,r]=mn(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:b,children:y}=h,T=l.useRef(null),S=l.useRef(new Map).current;return l.createElement(o,{scope:b,itemMap:S,collectionRef:T},y)},s=e+"CollectionSlot",c=l.forwardRef((h,b)=>{const{scope:y,children:T}=h,S=i(s,y),v=st(b,S.collectionRef);return l.createElement(uo,{ref:v},T)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",f=l.forwardRef((h,b)=>{const{scope:y,children:T,...S}=h,v=l.useRef(null),w=st(b,v),C=i(u,y);return l.useEffect(()=>(C.itemMap.set(v,{ref:v,...S}),()=>void C.itemMap.delete(v))),l.createElement(uo,{[d]:"",ref:w},T)});function m(h){const b=i(e+"CollectionConsumer",h);return l.useCallback(()=>{const T=b.collectionRef.current;if(!T)return[];const S=Array.from(T.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((C,I)=>S.indexOf(C.ref.current)-S.indexOf(I.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:c,ItemSlot:f},m,r]}function Ae(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function cn(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Sn({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Yy({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=cn(n),c=l.useCallback(u=>{if(i){const f=typeof u=="function"?u(e):u;f!==e&&s(f)}else o(u)},[i,e,o,s]);return[a,c]}function Yy({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,o=l.useRef(r),i=cn(t);return l.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Ky=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ke=Ky.reduce((e,t)=>{const n=l.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?uo:t;return l.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),l.createElement(s,ae({},a,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function bp(e,t){e&&hn.flushSync(()=>e.dispatchEvent(t))}const Gt=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{};function qy(e,t){return l.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const yr=e=>{const{present:t,children:n}=e,r=Xy(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),i=st(r.ref,o.ref);return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:i}):null};yr.displayName="Presence";function Xy(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),i=l.useRef("none"),a=e?"mounted":"unmounted",[s,c]=qy(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Bi(r.current);i.current=s==="mounted"?u:"none"},[s]),Gt(()=>{const u=r.current,d=o.current;if(d!==e){const m=i.current,h=Bi(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Gt(()=>{if(t){const u=f=>{const h=Bi(r.current).includes(f.animationName);f.target===t&&h&&hn.flushSync(()=>c("ANIMATION_END"))},d=f=>{f.target===t&&(i.current=Bi(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Bi(e){return(e==null?void 0:e.animationName)||"none"}const Gy=$e["useId".toString()]||(()=>{});let Zy=0;function Xn(e){const[t,n]=$e.useState(Gy());return Gt(()=>{e||n(r=>r??String(Zy++))},[e]),e||(t?`radix-${t}`:"")}const wp="Collapsible",[Qy,Ep]=mn(wp),[Jy,fu]=Qy(wp),eb=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,u]=Sn({prop:r,defaultProp:o,onChange:a});return l.createElement(Jy,{scope:n,disabled:i,contentId:Xn(),open:c,onOpenToggle:l.useCallback(()=>u(d=>!d),[u])},l.createElement(Ke.div,ae({"data-state":hu(c),"data-disabled":i?"":void 0},s,{ref:t})))}),tb="CollapsibleTrigger",nb=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=fu(tb,n);return l.createElement(Ke.button,ae({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":hu(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ae(e.onClick,o.onOpenToggle)}))}),xp="CollapsibleContent",rb=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=fu(xp,e.__scopeCollapsible);return l.createElement(yr,{present:n||o.open},({present:i})=>l.createElement(ob,ae({},r,{ref:t,present:i})))}),ob=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=fu(xp,n),[s,c]=l.useState(r),u=l.useRef(null),d=st(t,u),f=l.useRef(0),m=f.current,h=l.useRef(0),b=h.current,y=a.open||s,T=l.useRef(y),S=l.useRef();return l.useEffect(()=>{const v=requestAnimationFrame(()=>T.current=!1);return()=>cancelAnimationFrame(v)},[]),Gt(()=>{const v=u.current;if(v){S.current=S.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const w=v.getBoundingClientRect();f.current=w.height,h.current=w.width,T.current||(v.style.transitionDuration=S.current.transitionDuration,v.style.animationName=S.current.animationName),c(r)}},[a.open,r]),l.createElement(Ke.div,ae({"data-state":hu(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!y},i,{ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style}}),y&&o)});function hu(e){return e?"open":"closed"}const ib=eb,ab=nb,sb=rb,cb=l.createContext(void 0);function es(e){const t=l.useContext(cb);return e||t||"ltr"}const br="Accordion",ub=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[pu,lb,db]=Ja(br),[ts,wP]=mn(br,[db,Ep]),vu=Ep(),_p=l.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return l.createElement(pu.Provider,{scope:e.__scopeAccordion},n==="multiple"?l.createElement(vb,ae({},i,{ref:t})):l.createElement(pb,ae({},o,{ref:t})))});_p.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof t=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[Sp,fb]=ts(br),[Cp,hb]=ts(br,{collapsible:!1}),pb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...a}=e,[s,c]=Sn({prop:n,defaultProp:r,onChange:o});return l.createElement(Sp,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:l.useCallback(()=>i&&c(""),[i,c])},l.createElement(Cp,{scope:e.__scopeAccordion,collapsible:i},l.createElement($p,ae({},a,{ref:t}))))}),vb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a=[],s]=Sn({prop:n,defaultProp:r,onChange:o}),c=l.useCallback(d=>s((f=[])=>[...f,d]),[s]),u=l.useCallback(d=>s((f=[])=>f.filter(m=>m!==d)),[s]);return l.createElement(Sp,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u},l.createElement(Cp,{scope:e.__scopeAccordion,collapsible:!0},l.createElement($p,ae({},i,{ref:t}))))}),[mb,ns]=ts(br),$p=l.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...a}=e,s=l.useRef(null),c=st(s,t),u=lb(n),f=es(o)==="ltr",m=Ae(e.onKeyDown,h=>{var b;if(!ub.includes(h.key))return;const y=h.target,T=u().filter(k=>{var H;return!((H=k.ref.current)!==null&&H!==void 0&&H.disabled)}),S=T.findIndex(k=>k.ref.current===y),v=T.length;if(S===-1)return;h.preventDefault();let w=S;const C=0,I=v-1,D=()=>{w=S+1,w>I&&(w=C)},P=()=>{w=S-1,w<C&&(w=I)};switch(h.key){case"Home":w=C;break;case"End":w=I;break;case"ArrowRight":i==="horizontal"&&(f?D():P());break;case"ArrowDown":i==="vertical"&&D();break;case"ArrowLeft":i==="horizontal"&&(f?P():D());break;case"ArrowUp":i==="vertical"&&P();break}const F=w%v;(b=T[F].ref.current)===null||b===void 0||b.focus()});return l.createElement(mb,{scope:n,disabled:r,direction:o,orientation:i},l.createElement(pu.Slot,{scope:n},l.createElement(Ke.div,ae({},a,{"data-orientation":i,ref:c,onKeyDown:r?void 0:m}))))}),_c="AccordionItem",[gb,mu]=ts(_c),yb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=ns(_c,n),a=fb(_c,n),s=vu(n),c=Xn(),u=r&&a.value.includes(r)||!1,d=i.disabled||e.disabled;return l.createElement(gb,{scope:n,open:u,disabled:d,triggerId:c},l.createElement(ib,ae({"data-orientation":i.orientation,"data-state":Tp(u)},s,o,{ref:t,disabled:d,open:u,onOpenChange:f=>{f?a.onItemOpen(r):a.onItemClose(r)}})))}),bb="AccordionHeader",wb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ns(br,n),i=mu(bb,n);return l.createElement(Ke.h3,ae({"data-orientation":o.orientation,"data-state":Tp(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),Pd="AccordionTrigger",Eb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ns(br,n),i=mu(Pd,n),a=hb(Pd,n),s=vu(n);return l.createElement(pu.ItemSlot,{scope:n},l.createElement(ab,ae({"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId},s,r,{ref:t})))}),xb="AccordionContent",_b=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ns(br,n),i=mu(xb,n),a=vu(n);return l.createElement(sb,ae({role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation},a,r,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function Tp(e){return e?"open":"closed"}const Sb=_p,Cb=yb,$b=wb,Tb=Eb,Ib=_b;function Ip(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ip(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Pe(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Ip(e))&&(r&&(r+=" "),r+=t);return r}const Rb=l.forwardRef(({children:e,className:t,...n},r)=>j.jsx(Sb,{className:Pe("accordion-root",t),...n,ref:r,children:e})),Hs=(e,t)=>{const n=Object.values(e).map(r=>r[t]);return n.every(r=>typeof r=="string")?n.join(" ").trim():n.reduce((r,o)=>Object.assign(r,o),{})},Ob=(e,t)=>{const r=Object.keys(e).map(i=>e[i].properties).reduce((i,a)=>new Set([...Array.from(i),...Array.from(a)]),new Set),o={};return Object.keys(t).forEach(i=>{r.has(i)||(o[i]=t[i])}),o},rs=(e,t,n)=>{const o=[...Object.keys(e).map(u=>e[u](t)),...n??[]],i=Hs(o,"className"),a=Hs(o,"otherProps"),s=Hs(o,"style");return{otherProps:Ob(e,a),className:i,style:s}},{backgroundAtoms:Pb,borderAtoms:Ab,commonAtoms:Ad,flexAtoms:Dd,positionAtoms:Db,radiiAtoms:Nb,shadowAtoms:kb,sizesAtoms:Mb,spaceAtoms:jb,typographyAtoms:Lb}=Rt.atoms,et=l.forwardRef(({as:e,children:t,className:n,isDisabled:r,isColumn:o,...i},a)=>{const s=e||"div",c=Ad({display:o?"flex":i.display}),u=Dd({flexWrap:o?"wrap":i.flexWrap}),{className:d,otherProps:f,style:m}=rs({commonAtoms:Ad,flexAtoms:Dd,positionAtoms:Db,spaceAtoms:jb,sizesAtoms:Mb,borderAtoms:Ab,typographyAtoms:Lb,radiiAtoms:Nb,backgroundAtoms:Pb,shadowAtoms:kb},i,[c,u]);return j.jsx(s,{ref:a,className:Pe(d,n),disabled:r,style:m,...f,children:t})});et.displayName="Box";et.defaultProps={id:"base",as:"div",className:void 0,isDisabled:void 0,"data-test-id":void 0,isColumn:!1};const gu=({children:e,withShadow:t,bgColor:n,...r})=>j.jsx(et,{boxShadow:t?"$raised":"$none",bgColor:"$white",...r,children:e});gu.displayName="Card";gu.defaultProps={withShadow:!1};var Fb="ifvo3u0";const{sizesAtoms:Nd,spaceAtoms:kd,commonAtoms:Md,flexAtoms:Vb}=Rt.atoms,yu=({children:e,isFluid:t,className:n,display:r,...o})=>{const a=Nd({width:"$full",maxW:t?"$full":"$lg"}),s=kd({mx:"$auto",my:"$0"}),c=Md({display:r}),{className:u,style:d}=rs({flexAtoms:Vb,sizesAtoms:Nd,spaceAtoms:kd,commonAtoms:Md},o,[a,s,c]);return j.jsx("div",{className:Pe("vds-container",!t&&Fb,u,n),style:d,...o,children:e})};yu.displayName="Container";yu.defaultProps={display:"block",children:null,isFluid:!1,className:void 0};const{commonAtoms:jd,spaceAtoms:Bb,sizesAtoms:Hb,radiiAtoms:Wb,flexAtoms:zb,backgroundAtoms:Ub}=Rt.atoms,Yt=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=jd({display:"flex"}),{className:s,otherProps:c,style:u}=rs({flexAtoms:zb,commonAtoms:jd,spaceAtoms:Bb,sizesAtoms:Hb,radiiAtoms:Wb,backgroundAtoms:Ub},r,[a]);return j.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Pe(s,n),style:u,...c,children:t})});Yt.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};Yt.displayName="Flex";const{gridAtoms:Yb,commonAtoms:Kb,spaceAtoms:qb,sizesAtoms:Xb,radiiAtoms:Gb}=Rt.atoms,bu=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Rt.atoms.commonAtoms({display:"grid"}),{className:s,otherProps:c,style:u}=rs({gridAtoms:Yb,commonAtoms:Kb,spaceAtoms:qb,sizesAtoms:Xb,radiiAtoms:Gb},r,[a]);return j.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Pe(s,n),style:u,...c,children:t})});bu.displayName="Grid";bu.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};const Zb={horizontal:"row",vertical:"column",horizontalReverse:"row-reverse",verticalReverse:"column-reverse"},Qb=e=>e?Zb[e]:void 0,Ld={1:"wrap",0:"nowrap"},Jb=e=>e?typeof e=="boolean"?Ld[1]:Ld[0]:void 0,Pr=l.forwardRef(({as:e="div",alignItems:t,children:n,justifyContent:r,direction:o,gap:i,wrap:a=!0,content:s,...c},u)=>{const d=Qb(o),f=Jb(a);return j.jsx(Yt,{ref:u,"data-test-id":c["data-test-id"],alignItems:t,display:"flex",as:e,direction:d,wrap:f,gap:i,justifyContent:r,...c,children:n})});Pr.defaultProps={as:"div",alignItems:void 0,direction:"vertical",justifyContent:void 0,gap:"4",wrap:!0,"data-test-id":void 0};Pr.displayName="Stack";function e0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Vd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fd(Object(n),!0).forEach(function(r){e0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var t0=(e,t,n)=>{for(var r of Object.keys(e)){var o;if(e[r]!==((o=t[r])!==null&&o!==void 0?o:n[r]))return!1}return!0},wt=e=>t=>{var n=e.defaultClassName,r=Vd(Vd({},e.defaultVariants),t);for(var o in r){var i,a=(i=r[o])!==null&&i!==void 0?i:e.defaultVariants[o];if(a!=null){var s=a;typeof s=="boolean"&&(s=s===!0?"true":"false");var c=e.variantClassNames[o][s];c&&(n+=" "+c)}}for(var[u,d]of e.compoundVariants)t0(u,r,e.defaultVariants)&&(n+=" "+d);return n},n0=wt({defaultClassName:"",variantClassNames:{textStyle:{heading1:"_1ccbe2w0",heading2:"_1ccbe2w1",heading3:"_1ccbe2w2",heading4:"_1ccbe2w3",heading5:"_1ccbe2w4",heading6:"_1ccbe2w5",subheading1:"_1ccbe2w6",subheading2:"_1ccbe2w7",subtitle1:"_1ccbe2w8",subtitle2:"_1ccbe2w9",body1:"_1ccbe2wa",body2:"_1ccbe2wb",caption:"_1ccbe2wc",footer:"_1ccbe2wd"},isStrikethrough:{true:"_1ccbe2we"}},defaultVariants:{},compoundVariants:[]});const sn=l.forwardRef(({as:e="p",children:t,textStyle:n,isStrikethrough:r,className:o,...i},a)=>j.jsx(et,{as:e,ref:a,className:Pe(n0({textStyle:n,isStrikethrough:r}),o),...i,children:t}));sn.displayName="Text";sn.defaultProps={as:"p"};var r0="_13vyt6x7",o0="_13vyt6x5",i0="_13vyt6x6",a0="_13vyt6x2",s0="_13vyt6x3",c0="_13vyt6x4";const u0=l.forwardRef(({children:e,className:t,...n},r)=>j.jsx(Ib,{className:Pe(o0,t),...n,ref:r,children:j.jsx(et,{className:i0,children:e})})),l0=l.forwardRef(({children:e,className:t,...n},r)=>j.jsx(Cb,{className:Pe(a0,t),...n,ref:r,children:e}));var Sc={exports:{}},Io={};/**
28
28
  * @license React
29
29
  * react-jsx-runtime.production.min.js
30
30
  *
@@ -32,7 +32,7 @@ Check the top-level render call using <`+Q+">.")}return V}}function Ht(x,V){{if(
32
32
  *
33
33
  * This source code is licensed under the MIT license found in the
34
34
  * LICENSE file in the root directory of this source tree.
35
- */var Bd;function l0(){if(Bd)return Io;Bd=1;var e=l,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(s,c,u){var d,f={},m=null,h=null;u!==void 0&&(m=""+u),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(h=c.ref);for(d in c)r.call(c,d)&&!i.hasOwnProperty(d)&&(f[d]=c[d]);if(s&&s.defaultProps)for(d in c=s.defaultProps,c)f[d]===void 0&&(f[d]=c[d]);return{$$typeof:t,type:s,key:m,ref:h,props:f,_owner:o.current}}return Io.Fragment=n,Io.jsx=a,Io.jsxs=a,Io}var Hi={};/**
35
+ */var Bd;function d0(){if(Bd)return Io;Bd=1;var e=l,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(s,c,u){var d,f={},m=null,h=null;u!==void 0&&(m=""+u),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(h=c.ref);for(d in c)r.call(c,d)&&!i.hasOwnProperty(d)&&(f[d]=c[d]);if(s&&s.defaultProps)for(d in c=s.defaultProps,c)f[d]===void 0&&(f[d]=c[d]);return{$$typeof:t,type:s,key:m,ref:h,props:f,_owner:o.current}}return Io.Fragment=n,Io.jsx=a,Io.jsxs=a,Io}var Hi={};/**
36
36
  * @license React
37
37
  * react-jsx-runtime.development.js
38
38
  *
@@ -40,7 +40,7 @@ Check the top-level render call using <`+Q+">.")}return V}}function Ht(x,V){{if(
40
40
  *
41
41
  * This source code is licensed under the MIT license found in the
42
42
  * LICENSE file in the root directory of this source tree.
43
- */var Hd;function d0(){return Hd||(Hd=1,process.env.NODE_ENV!=="production"&&function(){var e=l,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),b=Symbol.iterator,y="@@iterator";function T(x){if(x===null||typeof x!="object")return null;var V=b&&x[b]||x[y];return typeof V=="function"?V:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(x){{for(var V=arguments.length,Q=new Array(V>1?V-1:0),fe=1;fe<V;fe++)Q[fe-1]=arguments[fe];w("error",x,Q)}}function w(x,V,Q){{var fe=S.ReactDebugCurrentFrame,_e=fe.getStackAddendum();_e!==""&&(V+="%s",Q=Q.concat([_e]));var Ie=Q.map(function(Ee){return String(Ee)});Ie.unshift("Warning: "+V),Function.prototype.apply.call(console[x],console,Ie)}}var C=!1,I=!1,D=!1,P=!1,F=!1,k;k=Symbol.for("react.module.reference");function H(x){return!!(typeof x=="string"||typeof x=="function"||x===r||x===i||F||x===o||x===u||x===d||P||x===h||C||I||D||typeof x=="object"&&x!==null&&(x.$$typeof===m||x.$$typeof===f||x.$$typeof===a||x.$$typeof===s||x.$$typeof===c||x.$$typeof===k||x.getModuleId!==void 0))}function R(x,V,Q){var fe=x.displayName;if(fe)return fe;var _e=V.displayName||V.name||"";return _e!==""?Q+"("+_e+")":Q}function E(x){return x.displayName||"Context"}function p(x){if(x==null)return null;if(typeof x.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof x=="function")return x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof x=="object")switch(x.$$typeof){case s:var V=x;return E(V)+".Consumer";case a:var Q=x;return E(Q._context)+".Provider";case c:return R(x,x.render,"ForwardRef");case f:var fe=x.displayName||null;return fe!==null?fe:p(x.type)||"Memo";case m:{var _e=x,Ie=_e._payload,Ee=_e._init;try{return p(Ee(Ie))}catch{return null}}}return null}var $=Object.assign,A=0,M,z,U,re,B,L,oe;function G(){}G.__reactDisabledLog=!0;function K(){{if(A===0){M=console.log,z=console.info,U=console.warn,re=console.error,B=console.group,L=console.groupCollapsed,oe=console.groupEnd;var x={configurable:!0,enumerable:!0,value:G,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}A++}}function Z(){{if(A--,A===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},x,{value:M}),info:$({},x,{value:z}),warn:$({},x,{value:U}),error:$({},x,{value:re}),group:$({},x,{value:B}),groupCollapsed:$({},x,{value:L}),groupEnd:$({},x,{value:oe})})}A<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=S.ReactCurrentDispatcher,W;function Y(x,V,Q){{if(W===void 0)try{throw Error()}catch(_e){var fe=_e.stack.trim().match(/\n( *(at )?)/);W=fe&&fe[1]||""}return`
43
+ */var Hd;function f0(){return Hd||(Hd=1,process.env.NODE_ENV!=="production"&&function(){var e=l,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),b=Symbol.iterator,y="@@iterator";function T(x){if(x===null||typeof x!="object")return null;var V=b&&x[b]||x[y];return typeof V=="function"?V:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(x){{for(var V=arguments.length,Q=new Array(V>1?V-1:0),fe=1;fe<V;fe++)Q[fe-1]=arguments[fe];w("error",x,Q)}}function w(x,V,Q){{var fe=S.ReactDebugCurrentFrame,_e=fe.getStackAddendum();_e!==""&&(V+="%s",Q=Q.concat([_e]));var Ie=Q.map(function(Ee){return String(Ee)});Ie.unshift("Warning: "+V),Function.prototype.apply.call(console[x],console,Ie)}}var C=!1,I=!1,D=!1,P=!1,F=!1,k;k=Symbol.for("react.module.reference");function H(x){return!!(typeof x=="string"||typeof x=="function"||x===r||x===i||F||x===o||x===u||x===d||P||x===h||C||I||D||typeof x=="object"&&x!==null&&(x.$$typeof===m||x.$$typeof===f||x.$$typeof===a||x.$$typeof===s||x.$$typeof===c||x.$$typeof===k||x.getModuleId!==void 0))}function R(x,V,Q){var fe=x.displayName;if(fe)return fe;var _e=V.displayName||V.name||"";return _e!==""?Q+"("+_e+")":Q}function E(x){return x.displayName||"Context"}function p(x){if(x==null)return null;if(typeof x.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof x=="function")return x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof x=="object")switch(x.$$typeof){case s:var V=x;return E(V)+".Consumer";case a:var Q=x;return E(Q._context)+".Provider";case c:return R(x,x.render,"ForwardRef");case f:var fe=x.displayName||null;return fe!==null?fe:p(x.type)||"Memo";case m:{var _e=x,Ie=_e._payload,Ee=_e._init;try{return p(Ee(Ie))}catch{return null}}}return null}var $=Object.assign,A=0,M,z,U,re,B,L,oe;function G(){}G.__reactDisabledLog=!0;function K(){{if(A===0){M=console.log,z=console.info,U=console.warn,re=console.error,B=console.group,L=console.groupCollapsed,oe=console.groupEnd;var x={configurable:!0,enumerable:!0,value:G,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}A++}}function Z(){{if(A--,A===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},x,{value:M}),info:$({},x,{value:z}),warn:$({},x,{value:U}),error:$({},x,{value:re}),group:$({},x,{value:B}),groupCollapsed:$({},x,{value:L}),groupEnd:$({},x,{value:oe})})}A<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=S.ReactCurrentDispatcher,W;function Y(x,V,Q){{if(W===void 0)try{throw Error()}catch(_e){var fe=_e.stack.trim().match(/\n( *(at )?)/);W=fe&&fe[1]||""}return`
44
44
  `+W+x}}var te=!1,J;{var ie=typeof WeakMap=="function"?WeakMap:Map;J=new ie}function ee(x,V){if(!x||te)return"";{var Q=J.get(x);if(Q!==void 0)return Q}var fe;te=!0;var _e=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ie;Ie=ce.current,ce.current=null,K();try{if(V){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(qe){fe=qe}Reflect.construct(x,[],Ee)}else{try{Ee.call()}catch(qe){fe=qe}x.call(Ee.prototype)}}else{try{throw Error()}catch(qe){fe=qe}x()}}catch(qe){if(qe&&fe&&typeof qe.stack=="string"){for(var be=qe.stack.split(`
45
45
  `),nt=fe.stack.split(`
46
46
  `),Le=be.length-1,Be=nt.length-1;Le>=1&&Be>=0&&be[Le]!==nt[Be];)Be--;for(;Le>=1&&Be>=0;Le--,Be--)if(be[Le]!==nt[Be]){if(Le!==1||Be!==1)do if(Le--,Be--,Be<0||be[Le]!==nt[Be]){var Ge=`
@@ -50,8 +50,8 @@ Check the render method of \``+x+"`."}return""}}function tr(x){{if(x!==void 0){v
50
50
 
51
51
  Check your code at `+V+":"+Q+"."}return""}}var un={};function $n(x){{var V=Dn();if(!V){var Q=typeof x=="string"?x:x.displayName||x.name;Q&&(V=`
52
52
 
53
- Check the top-level render call using <`+Q+">.")}return V}}function Ht(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var Q=$n(V);if(un[Q])return;un[Q]=!0;var fe="";x&&x._owner&&x._owner!==At.current&&(fe=" It was passed a child from "+p(x._owner.type)+"."),Ot(x),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Ot(null)}}function en(x,V){{if(typeof x!="object")return;if(xt(x))for(var Q=0;Q<x.length;Q++){var fe=x[Q];Lt(fe)&&Ht(fe,V)}else if(Lt(x))x._store&&(x._store.validated=!0);else if(x){var _e=T(x);if(typeof _e=="function"&&_e!==x.entries)for(var Ie=_e.call(x),Ee;!(Ee=Ie.next()).done;)Lt(Ee.value)&&Ht(Ee.value,V)}}}function Nn(x){{var V=x.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))Q=V.propTypes;else return;if(Q){var fe=p(V);ot(Q,x.props,"prop",fe,x)}else if(V.PropTypes!==void 0&&!yn){yn=!0;var _e=p(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_e||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Kt(x){{for(var V=Object.keys(x.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){Ot(x),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Ot(null);break}}x.ref!==null&&(Ot(x),v("Invalid attribute `ref` supplied to `React.Fragment`."),Ot(null))}}function Tn(x,V,Q,fe,_e,Ie){{var Ee=H(x);if(!Ee){var be="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(be+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var nt=tr(_e);nt?be+=nt:be+=Dn();var Le;x===null?Le="null":xt(x)?Le="array":x!==void 0&&x.$$typeof===t?(Le="<"+(p(x.type)||"Unknown")+" />",be=" Did you accidentally export a JSX literal instead of a component?"):Le=typeof x,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Le,be)}var Be=kt(x,V,Q,_e,Ie);if(Be==null)return Be;if(Ee){var Ge=V.children;if(Ge!==void 0)if(fe)if(xt(Ge)){for(var qt=0;qt<Ge.length;qt++)en(Ge[qt],x);Object.freeze&&Object.freeze(Ge)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else en(Ge,x)}return x===r?Kt(Be):Nn(Be),Be}}function kn(x,V,Q){return Tn(x,V,Q,!0)}function nr(x,V,Q){return Tn(x,V,Q,!1)}var Wt=nr,rr=kn;Hi.Fragment=r,Hi.jsx=Wt,Hi.jsxs=rr}()),Hi}process.env.NODE_ENV==="production"?Sc.exports=l0():Sc.exports=d0();var _t=Sc.exports;const f0=e=>{const t="currentColor";return{...e,color:(()=>e.color?Rt.theme.colors[e.color]?Rt.theme.colors[e.color]:e.color:"inherit")(),fill:(e==null?void 0:e.fill)||t,width:(e==null?void 0:e.size)||24,height:(e==null?void 0:e.size)||24}},gn=f0,h0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"m19.02 6.96-8.62 8.9-5.28-5.27L3 12.71l7.43 7.43 10.74-11.1-2.15-2.08Z",fill:t})})},wu=h0,p0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"m21.59 9.03-2.12-2.12-6.94 6.94-6.94-6.94-2.12 2.12 9.06 9.06 9.06-9.06Z",fill:t})})},si=p0,v0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"m16 21.56 2.12-2.12-6.94-6.94 6.94-6.94L16 3.44 6.94 12.5 16 21.56Z",fill:t})})},m0=v0,g0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"m3.47 15.97 2.12 2.12 6.94-6.94 6.94 6.94 2.12-2.12-9.06-9.06-9.06 9.06Z",fill:t})})},Eu=g0,y0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"m21.06 19.44-6.98-6.98 6.9-6.9-2.12-2.12-6.9 6.9-6.82-6.82-2.12 2.12 6.82 6.82-6.9 6.9 2.12 2.12 6.9-6.9 6.98 6.98 2.12-2.12Z",fill:t})})},os=y0,b0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"M9 5.5v-3H6v3H2v3h4v3h3v-3h13v-3H9ZM18 13.5h-3v3H2v3h13v3h3v-3h4v-3h-4v-3Z",fill:t})})},w0=b0,E0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"M21 11H3v3h18v-3Z",fill:t})})},x0=E0,_0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"m22 21.67-4.86-4.86a8.474 8.474 0 0 0 1.86-5.3c0-4.69-3.81-8.5-8.5-8.5-4.69 0-8.5 3.81-8.5 8.5 0 4.69 3.81 8.5 8.5 8.5 2.01 0 3.85-.7 5.3-1.86l4.86 4.86 1.33-1.33.01-.01ZM10.5 18C6.92 18 4 15.08 4 11.5S6.92 5 10.5 5 17 7.92 17 11.5 14.08 18 10.5 18Z",fill:t})})},S0=_0,C0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm3.29 14.71-3.31-3.31-3.27 3.27-1.41-1.41 3.27-3.27-3.23-3.23 1.41-1.41 3.23 3.23 3.27-3.27 1.41 1.41-3.27 3.27 3.31 3.31-1.41 1.41Z",fill:t})})},$0=C0,T0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm0 16c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1Zm1.37-4.24c-.22.08-.37.27-.37.47v.77h-2v-.77c0-1.06.66-1.98 1.68-2.35.78-.29 1.48-1.15 1.28-2.25-.14-.79-.81-1.46-1.6-1.6a2.003 2.003 0 0 0-2.37 1.97h-2c0-1.18.52-2.3 1.43-3.06.91-.76 2.1-1.08 3.29-.87 1.61.28 2.94 1.61 3.22 3.22.34 1.93-.74 3.81-2.57 4.48l.01-.01Z",fill:t})})},I0=T0,R0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm1 15h-2v-6h2v6Zm-1-7.88c-.62 0-1.12-.5-1.12-1.12 0-.62.5-1.12 1.12-1.12.62 0 1.12.5 1.12 1.12 0 .62-.5 1.12-1.12 1.12Z",fill:t})})},O0=R0,P0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm-1.33 14.41-4.04-4.04 1.41-1.41 2.63 2.63 5.29-5.29 1.41 1.41-6.71 6.71.01-.01Z",fill:t})})},A0=P0,D0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"m12 3.5-10 18h20l-10-18Zm0 15c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1Zm-1-3v-5h2v5h-2Z",fill:t})})},N0=D0,k0=l.forwardRef(({children:e,className:t,...n},r)=>j.jsx(Cb,{className:"accordion-header",children:j.jsxs($b,{className:Pe(a0,t),...n,ref:r,children:[j.jsx(et,{className:s0,children:e}),j.jsx(si,{className:n0,size:24,color:Rt.theme.colors.black})]})}));var M0={success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)",warning:"var(--_1qe00b211)",error:"var(--_1qe00b214)",neutral:"var(--_1qe00b2e)"},j0=wt({defaultClassName:"_7q2fqh0",variantClassNames:{colorScheme:{success:"_7q2fqh1",info:"_7q2fqh2",warning:"_7q2fqh3",error:"_7q2fqh4",neutral:"_7q2fqh5"}},defaultVariants:{colorScheme:"neutral"},compoundVariants:[]});const Ip=l.forwardRef(({className:e,title:t,children:n,withClose:r,colorScheme:o,onClose:i,...a},s)=>{const c="div",d=(()=>{switch(o){case"error":return $0;case"warning":return N0;case"success":return A0;default:return O0}})();return j.jsxs(c,{ref:s,className:Pe(j0({colorScheme:o}),e),"data-test-id":a["data-test-id"],...a,children:[j.jsxs(Yt,{gap:"$16",children:[j.jsx(et,{display:"flex",minW:Rt.theme.space[24],children:j.jsx(d,{size:24,color:M0[o||"neutral"]})}),j.jsx(et,{pt:"$2",children:j.jsxs(Pr,{gap:"$8",children:[t&&j.jsx(sn,{textStyle:"body2",as:"span",fontWeight:"$bold",children:t}),j.jsx(et,{children:n})]})})]}),r&&j.jsx(Yt,{pl:"$16",pt:"$4",children:j.jsx(os,{"data-test-id":"VqcF6V40rj6neoaCMaHvB",onClick:i,cursor:"pointer",color:Rt.theme.colors.black,size:16})})]})});Ip.defaultProps={"data-test-id":void 0,title:void 0,withClose:void 0,onClose:void 0};var L0=wt({defaultClassName:"_1er7sj40",variantClassNames:{colorScheme:{primary:"_1er7sj41",disabled:"_1er7sj42",yellow:"_1er7sj43",red:"_1er7sj44",blue:"_1er7sj45",neutral:"_1er7sj46"},size:{medium:"_15r4f4d1oz _15r4f4d1il _15r4f4d15j _15r4f4d1bx",small:"_15r4f4d1op _15r4f4d1ib _15r4f4d154 _15r4f4d1bi"},isRounded:{true:"_1er7sj49",false:"_1er7sj4a"},variant:{primary:"_1er7sj4b",secondary:"_1er7sj4c"}},defaultVariants:{colorScheme:"primary",size:"medium",variant:"primary",isRounded:!1},compoundVariants:[[{colorScheme:"primary",variant:"secondary"},"_1er7sj4d"],[{colorScheme:"disabled",variant:"secondary"},"_1er7sj4e"],[{colorScheme:"yellow",variant:"secondary"},"_1er7sj4f"],[{colorScheme:"red",variant:"secondary"},"_1er7sj4g"],[{colorScheme:"blue",variant:"secondary"},"_1er7sj4h"]]});const xu=l.forwardRef(({as:e,children:t,colorScheme:n,size:r,variant:o,isRounded:i,className:a,style:s,...c},u)=>{const d=e||"span";return j.jsx(d,{ref:u,"data-test-id":c["data-test-id"],className:Pe(L0({colorScheme:n,variant:o,size:r,isRounded:i}),a),style:s,...c,children:t})});xu.defaultProps={as:"span",colorScheme:"primary",size:"medium",children:void 0,"data-test-id":void 0};xu.displayName="Badge";function Wd(e,[t,n]){return Math.min(n,Math.max(t,e))}function F0(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Cc="dismissableLayer.update",V0="dismissableLayer.pointerDownOutside",B0="dismissableLayer.focusOutside";let zd;const Rp=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),is=l.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...u}=e,d=l.useContext(Rp),[f,m]=l.useState(null),h=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=l.useState({}),y=st(t,F=>m(F)),T=Array.from(d.layers),[S]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=T.indexOf(S),w=f?T.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,I=w>=v,D=W0(F=>{const k=F.target,H=[...d.branches].some(R=>R.contains(k));!I||H||(i==null||i(F),s==null||s(F),F.defaultPrevented||c==null||c())},h),P=z0(F=>{const k=F.target;[...d.branches].some(R=>R.contains(k))||(a==null||a(F),s==null||s(F),F.defaultPrevented||c==null||c())},h);return F0(F=>{w===d.layers.size-1&&(o==null||o(F),!F.defaultPrevented&&c&&(F.preventDefault(),c()))},h),l.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(zd=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Ud(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=zd)}},[f,h,r,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Ud())},[f,d]),l.useEffect(()=>{const F=()=>b({});return document.addEventListener(Cc,F),()=>document.removeEventListener(Cc,F)},[]),l.createElement(Ke.div,ae({},u,{ref:y,style:{pointerEvents:C?I?"auto":"none":void 0,...e.style},onFocusCapture:Ae(e.onFocusCapture,P.onFocusCapture),onBlurCapture:Ae(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Ae(e.onPointerDownCapture,D.onPointerDownCapture)}))}),H0=l.forwardRef((e,t)=>{const n=l.useContext(Rp),r=l.useRef(null),o=st(t,r);return l.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.createElement(Ke.div,ae({},e,{ref:o}))});function W0(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Op(V0,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function z0(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e),r=l.useRef(!1);return l.useEffect(()=>{const o=i=>{i.target&&!r.current&&Op(B0,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ud(){const e=new CustomEvent(Cc);document.dispatchEvent(e)}function Op(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?yp(o,i):o.dispatchEvent(i)}const U0=is,Y0=H0;let Ws=0;function Pp(){l.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:Yd()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Yd()),Ws++,()=>{Ws===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Ws--}},[])}function Yd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const zs="focusScope.autoFocusOnMount",Us="focusScope.autoFocusOnUnmount",Kd={bubbles:!1,cancelable:!0},Ap=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=l.useState(null),u=cn(o),d=cn(i),f=l.useRef(null),m=st(t,y=>c(y)),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let y=function(w){if(h.paused||!s)return;const C=w.target;s.contains(C)?f.current=C:ar(f.current,{select:!0})},T=function(w){if(h.paused||!s)return;const C=w.relatedTarget;C!==null&&(s.contains(C)||ar(f.current,{select:!0}))},S=function(w){const C=document.activeElement;for(const I of w)I.removedNodes.length>0&&(s!=null&&s.contains(C)||ar(s))};document.addEventListener("focusin",y),document.addEventListener("focusout",T);const v=new MutationObserver(S);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",T),v.disconnect()}}},[r,s,h.paused]),l.useEffect(()=>{if(s){Xd.add(h);const y=document.activeElement;if(!s.contains(y)){const S=new CustomEvent(zs,Kd);s.addEventListener(zs,u),s.dispatchEvent(S),S.defaultPrevented||(K0(Q0(Dp(s)),{select:!0}),document.activeElement===y&&ar(s))}return()=>{s.removeEventListener(zs,u),setTimeout(()=>{const S=new CustomEvent(Us,Kd);s.addEventListener(Us,d),s.dispatchEvent(S),S.defaultPrevented||ar(y??document.body,{select:!0}),s.removeEventListener(Us,d),Xd.remove(h)},0)}}},[s,u,d,h]);const b=l.useCallback(y=>{if(!n&&!r||h.paused)return;const T=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,S=document.activeElement;if(T&&S){const v=y.currentTarget,[w,C]=q0(v);w&&C?!y.shiftKey&&S===C?(y.preventDefault(),n&&ar(w,{select:!0})):y.shiftKey&&S===w&&(y.preventDefault(),n&&ar(C,{select:!0})):S===v&&y.preventDefault()}},[n,r,h.paused]);return l.createElement(Ke.div,ae({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function K0(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ar(r,{select:t}),document.activeElement!==n)return}function q0(e){const t=Dp(e),n=qd(t,e),r=qd(t.reverse(),e);return[n,r]}function Dp(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function qd(e,t){for(const n of e)if(!X0(n,{upTo:t}))return n}function X0(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function G0(e){return e instanceof HTMLInputElement&&"select"in e}function ar(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&G0(e)&&t&&e.select()}}const Xd=Z0();function Z0(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Gd(e,t),e.unshift(t)},remove(t){var n;e=Gd(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Gd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Q0(e){return e.filter(t=>t.tagName!=="A")}const J0=["top","right","bottom","left"],vr=Math.min,fn=Math.max,Ta=Math.round,Wi=Math.floor,mr=e=>({x:e,y:e}),ew={left:"right",right:"left",bottom:"top",top:"bottom"},tw={start:"end",end:"start"};function $c(e,t,n){return fn(e,vr(t,n))}function Gn(e,t){return typeof e=="function"?e(t):e}function Zn(e){return e.split("-")[0]}function mo(e){return e.split("-")[1]}function _u(e){return e==="x"?"y":"x"}function Su(e){return e==="y"?"height":"width"}function go(e){return["top","bottom"].includes(Zn(e))?"y":"x"}function Cu(e){return _u(go(e))}function nw(e,t,n){n===void 0&&(n=!1);const r=mo(e),o=Cu(e),i=Su(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ia(a)),[a,Ia(a)]}function rw(e){const t=Ia(e);return[Tc(e),t,Tc(t)]}function Tc(e){return e.replace(/start|end/g,t=>tw[t])}function ow(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function iw(e,t,n,r){const o=mo(e);let i=ow(Zn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Tc)))),i}function Ia(e){return e.replace(/left|right|bottom|top/g,t=>ew[t])}function aw(e){return{top:0,right:0,bottom:0,left:0,...e}}function Np(e){return typeof e!="number"?aw(e):{top:e,right:e,bottom:e,left:e}}function Ra(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Zd(e,t,n){let{reference:r,floating:o}=e;const i=go(t),a=Cu(t),s=Su(a),c=Zn(t),u=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=r[s]/2-o[s]/2;let h;switch(c){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(mo(t)){case"start":h[a]-=m*(n&&u?-1:1);break;case"end":h[a]+=m*(n&&u?-1:1);break}return h}const sw=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Zd(u,r,c),m=r,h={},b=0;for(let y=0;y<s.length;y++){const{name:T,fn:S}=s[y],{x:v,y:w,data:C,reset:I}=await S({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});if(d=v??d,f=w??f,h={...h,[T]:{...h[T],...C}},I&&b<=50){b++,typeof I=="object"&&(I.placement&&(m=I.placement),I.rects&&(u=I.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:d,y:f}=Zd(u,m,c)),y=-1;continue}}return{x:d,y:f,placement:m,strategy:o,middlewareData:h}};async function ci(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:h=0}=Gn(t,e),b=Np(h),T=s[m?f==="floating"?"reference":"floating":f],S=Ra(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(T)))==null||n?T:T.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:c})),v=f==="floating"?{...a.floating,x:r,y:o}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),C=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},I=Ra(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:w,strategy:c}):v);return{top:(S.top-I.top+b.top)/C.y,bottom:(I.bottom-S.bottom+b.bottom)/C.y,left:(S.left-I.left+b.left)/C.x,right:(I.right-S.right+b.right)/C.x}}const Qd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s}=t,{element:c,padding:u=0}=Gn(e,t)||{};if(c==null)return{};const d=Np(u),f={x:n,y:r},m=Cu(o),h=Su(m),b=await a.getDimensions(c),y=m==="y",T=y?"top":"left",S=y?"bottom":"right",v=y?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[m]-f[m]-i.floating[h],C=f[m]-i.reference[m],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let D=I?I[v]:0;(!D||!await(a.isElement==null?void 0:a.isElement(I)))&&(D=s.floating[v]||i.floating[h]);const P=w/2-C/2,F=D/2-b[h]/2-1,k=vr(d[T],F),H=vr(d[S],F),R=k,E=D-b[h]-H,p=D/2-b[h]/2+P,$=$c(R,p,E),M=mo(o)!=null&&p!=$&&i.reference[h]/2-(p<R?k:H)-b[h]/2<0?p<R?R-p:E-p:0;return{[m]:f[m]-M,data:{[m]:$,centerOffset:p-$+M}}}}),cw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:b=!0,...y}=Gn(e,t),T=Zn(r),S=Zn(a)===a,v=await(s.isRTL==null?void 0:s.isRTL(c.floating)),w=f||(S||!b?[Ia(a)]:rw(a));!f&&h!=="none"&&w.push(...iw(a,b,h,v));const C=[a,...w],I=await ci(t,y),D=[];let P=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&D.push(I[T]),d){const R=nw(r,i,v);D.push(I[R[0]],I[R[1]])}if(P=[...P,{placement:r,overflows:D}],!D.every(R=>R<=0)){var F,k;const R=(((F=o.flip)==null?void 0:F.index)||0)+1,E=C[R];if(E)return{data:{index:R,overflows:P},reset:{placement:E}};let p=(k=P.filter($=>$.overflows[0]<=0).sort(($,A)=>$.overflows[1]-A.overflows[1])[0])==null?void 0:k.placement;if(!p)switch(m){case"bestFit":{var H;const $=(H=P.map(A=>[A.placement,A.overflows.filter(M=>M>0).reduce((M,z)=>M+z,0)]).sort((A,M)=>A[1]-M[1])[0])==null?void 0:H[0];$&&(p=$);break}case"initialPlacement":p=a;break}if(r!==p)return{reset:{placement:p}}}return{}}}};function Jd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ef(e){return J0.some(t=>e[t]>=0)}const uw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Gn(e,t);switch(r){case"referenceHidden":{const i=await ci(t,{...o,elementContext:"reference"}),a=Jd(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ef(a)}}}case"escaped":{const i=await ci(t,{...o,altBoundary:!0}),a=Jd(i,n.floating);return{data:{escapedOffsets:a,escaped:ef(a)}}}default:return{}}}}};async function lw(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Zn(n),s=mo(n),c=go(n)==="y",u=["left","top"].includes(a)?-1:1,d=i&&c?-1:1,f=Gn(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof b=="number"&&(h=s==="end"?b*-1:b),c?{x:h*d,y:m*u}:{x:m*u,y:h*d}}const dw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await lw(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},fw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:T=>{let{x:S,y:v}=T;return{x:S,y:v}}},...c}=Gn(e,t),u={x:n,y:r},d=await ci(t,c),f=go(Zn(o)),m=_u(f);let h=u[m],b=u[f];if(i){const T=m==="y"?"top":"left",S=m==="y"?"bottom":"right",v=h+d[T],w=h-d[S];h=$c(v,h,w)}if(a){const T=f==="y"?"top":"left",S=f==="y"?"bottom":"right",v=b+d[T],w=b-d[S];b=$c(v,b,w)}const y=s.fn({...t,[m]:h,[f]:b});return{...y,data:{x:y.x-n,y:y.y-r}}}}},hw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=Gn(e,t),d={x:n,y:r},f=go(o),m=_u(f);let h=d[m],b=d[f];const y=Gn(s,t),T=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const w=m==="y"?"height":"width",C=i.reference[m]-i.floating[w]+T.mainAxis,I=i.reference[m]+i.reference[w]-T.mainAxis;h<C?h=C:h>I&&(h=I)}if(u){var S,v;const w=m==="y"?"width":"height",C=["top","left"].includes(Zn(o)),I=i.reference[f]-i.floating[w]+(C&&((S=a.offset)==null?void 0:S[f])||0)+(C?0:T.crossAxis),D=i.reference[f]+i.reference[w]+(C?0:((v=a.offset)==null?void 0:v[f])||0)-(C?T.crossAxis:0);b<I?b=I:b>D&&(b=D)}return{[m]:h,[f]:b}}}},pw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Gn(e,t),c=await ci(t,s),u=Zn(n),d=mo(n),f=go(n)==="y",{width:m,height:h}=r.floating;let b,y;u==="top"||u==="bottom"?(b=u,y=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,b=d==="end"?"top":"bottom");const T=h-c[b],S=m-c[y],v=!t.middlewareData.shift;let w=T,C=S;if(f){const D=m-c.left-c.right;C=d||v?vr(S,D):D}else{const D=h-c.top-c.bottom;w=d||v?vr(T,D):D}if(v&&!d){const D=fn(c.left,0),P=fn(c.right,0),F=fn(c.top,0),k=fn(c.bottom,0);f?C=m-2*(D!==0||P!==0?D+P:fn(c.left,c.right)):w=h-2*(F!==0||k!==0?F+k:fn(c.top,c.bottom))}await a({...t,availableWidth:C,availableHeight:w});const I=await o.getDimensions(i.floating);return m!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function gr(e){return kp(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jn(e){var t;return(t=(kp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kp(e){return e instanceof Node||e instanceof vn(e).Node}function Qn(e){return e instanceof Element||e instanceof vn(e).Element}function Vn(e){return e instanceof HTMLElement||e instanceof vn(e).HTMLElement}function tf(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}function $i(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function vw(e){return["table","td","th"].includes(gr(e))}function $u(e){const t=Tu(),n=Cn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function mw(e){let t=lo(e);for(;Vn(t)&&!as(t);){if($u(t))return t;t=lo(t)}return null}function Tu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function as(e){return["html","body","#document"].includes(gr(e))}function Cn(e){return vn(e).getComputedStyle(e)}function ss(e){return Qn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function lo(e){if(gr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||tf(e)&&e.host||Jn(e);return tf(t)?t.host:t}function Mp(e){const t=lo(e);return as(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vn(t)&&$i(t)?t:Mp(t)}function Oa(e,t){var n;t===void 0&&(t=[]);const r=Mp(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=vn(r);return o?t.concat(i,i.visualViewport||[],$i(r)?r:[]):t.concat(r,Oa(r))}function jp(e){const t=Cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Vn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Ta(n)!==i||Ta(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Iu(e){return Qn(e)?e:e.contextElement}function ro(e){const t=Iu(e);if(!Vn(t))return mr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=jp(t);let a=(i?Ta(n.width):n.width)/r,s=(i?Ta(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const gw=mr(0);function Lp(e){const t=vn(e);return!Tu()||!t.visualViewport?gw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vn(e)?!1:t}function kr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Iu(e);let a=mr(1);t&&(r?Qn(r)&&(a=ro(r)):a=ro(e));const s=yw(i,n,r)?Lp(i):mr(0);let c=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(i){const m=vn(i),h=r&&Qn(r)?vn(r):r;let b=m.frameElement;for(;b&&r&&h!==m;){const y=ro(b),T=b.getBoundingClientRect(),S=Cn(b),v=T.left+(b.clientLeft+parseFloat(S.paddingLeft))*y.x,w=T.top+(b.clientTop+parseFloat(S.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=v,u+=w,b=vn(b).frameElement}}return Ra({width:d,height:f,x:c,y:u})}function bw(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Vn(n),i=Jn(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=mr(1);const c=mr(0);if((o||!o&&r!=="fixed")&&((gr(n)!=="body"||$i(i))&&(a=ss(n)),Vn(n))){const u=kr(n);s=ro(n),c.x=u.x+n.clientLeft,c.y=u.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function ww(e){return Array.from(e.getClientRects())}function Fp(e){return kr(Jn(e)).left+ss(e).scrollLeft}function Ew(e){const t=Jn(e),n=ss(e),r=e.ownerDocument.body,o=fn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=fn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Fp(e);const s=-n.scrollTop;return Cn(r).direction==="rtl"&&(a+=fn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function xw(e,t){const n=vn(e),r=Jn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const u=Tu();(!u||u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function _w(e,t){const n=kr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Vn(e)?ro(e):mr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,u=r*i.y;return{width:a,height:s,x:c,y:u}}function nf(e,t,n){let r;if(t==="viewport")r=xw(e,n);else if(t==="document")r=Ew(Jn(e));else if(Qn(t))r=_w(t,n);else{const o=Lp(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ra(r)}function Vp(e,t){const n=lo(e);return n===t||!Qn(n)||as(n)?!1:Cn(n).position==="fixed"||Vp(n,t)}function Sw(e,t){const n=t.get(e);if(n)return n;let r=Oa(e).filter(s=>Qn(s)&&gr(s)!=="body"),o=null;const i=Cn(e).position==="fixed";let a=i?lo(e):e;for(;Qn(a)&&!as(a);){const s=Cn(a),c=$u(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||$i(a)&&!c&&Vp(e,a))?r=r.filter(d=>d!==a):o=s,a=lo(a)}return t.set(e,r),r}function Cw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Sw(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((u,d)=>{const f=nf(t,d,o);return u.top=fn(f.top,u.top),u.right=vr(f.right,u.right),u.bottom=vr(f.bottom,u.bottom),u.left=fn(f.left,u.left),u},nf(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function $w(e){return jp(e)}function Tw(e,t,n){const r=Vn(t),o=Jn(t),i=n==="fixed",a=kr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=mr(0);if(r||!r&&!i)if((gr(t)!=="body"||$i(o))&&(s=ss(t)),r){const u=kr(t,!0,i,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=Fp(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function rf(e,t){return!Vn(e)||Cn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Bp(e,t){const n=vn(e);if(!Vn(e))return n;let r=rf(e,t);for(;r&&vw(r)&&Cn(r).position==="static";)r=rf(r,t);return r&&(gr(r)==="html"||gr(r)==="body"&&Cn(r).position==="static"&&!$u(r))?n:r||mw(e)||n}const Iw=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Bp,i=this.getDimensions;return{reference:Tw(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Rw(e){return Cn(e).direction==="rtl"}const Ow={convertOffsetParentRelativeRectToViewportRelativeRect:bw,getDocumentElement:Jn,getClippingRect:Cw,getOffsetParent:Bp,getElementRects:Iw,getClientRects:ww,getDimensions:$w,getScale:ro,isElement:Qn,isRTL:Rw};function Pw(e,t){let n=null,r;const o=Jn(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:u,top:d,width:f,height:m}=e.getBoundingClientRect();if(s||t(),!f||!m)return;const h=Wi(d),b=Wi(o.clientWidth-(u+f)),y=Wi(o.clientHeight-(d+m)),T=Wi(u),v={rootMargin:-h+"px "+-b+"px "+-y+"px "+-T+"px",threshold:fn(0,vr(1,c))||1};let w=!0;function C(I){const D=I[0].intersectionRatio;if(D!==c){if(!w)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(C,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,v)}n.observe(e)}return a(!0),i}function Aw(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Iu(e),d=o||i?[...u?Oa(u):[],...Oa(t)]:[];d.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),i&&S.addEventListener("resize",n)});const f=u&&s?Pw(u,n):null;let m=-1,h=null;a&&(h=new ResizeObserver(S=>{let[v]=S;v&&v.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let b,y=c?kr(e):null;c&&T();function T(){const S=kr(e);y&&(S.x!==y.x||S.y!==y.y||S.width!==y.width||S.height!==y.height)&&n(),y=S,b=requestAnimationFrame(T)}return n(),()=>{d.forEach(S=>{o&&S.removeEventListener("scroll",n),i&&S.removeEventListener("resize",n)}),f&&f(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(b)}}const Dw=(e,t,n)=>{const r=new Map,o={platform:Ow,...n},i={...o.platform,_c:r};return sw(e,t,{...o,platform:i})},Nw=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Qd({element:r.current,padding:o}).fn(n):{}:r?Qd({element:r,padding:o}).fn(n):{}}}};var fa=typeof document<"u"?l.useLayoutEffect:l.useEffect;function Pa(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Pa(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Pa(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Hp(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function of(e,t){const n=Hp(e);return Math.round(t*n)/n}function af(e){const t=$e.useRef(e);return fa(()=>{t.current=e}),t}function kw(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[d,f]=$e.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=$e.useState(r);Pa(m,r)||h(r);const[b,y]=$e.useState(null),[T,S]=$e.useState(null),v=$e.useCallback(M=>{M!=D.current&&(D.current=M,y(M))},[y]),w=$e.useCallback(M=>{M!==P.current&&(P.current=M,S(M))},[S]),C=i||b,I=a||T,D=$e.useRef(null),P=$e.useRef(null),F=$e.useRef(d),k=af(c),H=af(o),R=$e.useCallback(()=>{if(!D.current||!P.current)return;const M={placement:t,strategy:n,middleware:m};H.current&&(M.platform=H.current),Dw(D.current,P.current,M).then(z=>{const U={...z,isPositioned:!0};E.current&&!Pa(F.current,U)&&(F.current=U,jy.flushSync(()=>{f(U)}))})},[m,t,n,H]);fa(()=>{u===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,f(M=>({...M,isPositioned:!1})))},[u]);const E=$e.useRef(!1);fa(()=>(E.current=!0,()=>{E.current=!1}),[]),fa(()=>{if(C&&(D.current=C),I&&(P.current=I),C&&I){if(k.current)return k.current(C,I,R);R()}},[C,I,R,k]);const p=$e.useMemo(()=>({reference:D,floating:P,setReference:v,setFloating:w}),[v,w]),$=$e.useMemo(()=>({reference:C,floating:I}),[C,I]),A=$e.useMemo(()=>{const M={position:n,left:0,top:0};if(!$.floating)return M;const z=of($.floating,d.x),U=of($.floating,d.y);return s?{...M,transform:"translate("+z+"px, "+U+"px)",...Hp($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:U}},[n,s,$.floating,d.x,d.y]);return $e.useMemo(()=>({...d,update:R,refs:p,elements:$,floatingStyles:A}),[d,R,p,$,A])}const Mw=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return l.createElement(Ke.svg,ae({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:l.createElement("polygon",{points:"0,0 30,0 15,10"}))}),jw=Mw;function cs(e){const[t,n]=l.useState(void 0);return Gt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Wp="Popper",[zp,us]=mn(Wp),[Lw,Up]=zp(Wp),Fw=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return l.createElement(Lw,{scope:t,anchor:r,onAnchorChange:o},n)},Vw="PopperAnchor",Bw=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Up(Vw,n),a=l.useRef(null),s=st(t,a);return l.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:l.createElement(Ke.div,ae({},o,{ref:s}))}),Yp="PopperContent",[Hw,Ww]=zp(Yp),zw=l.forwardRef((e,t)=>{var n,r,o,i,a,s,c,u;const{__scopePopper:d,side:f="bottom",sideOffset:m=0,align:h="center",alignOffset:b=0,arrowPadding:y=0,collisionBoundary:T=[],collisionPadding:S=0,sticky:v="partial",hideWhenDetached:w=!1,avoidCollisions:C=!0,onPlaced:I,...D}=e,P=Up(Yp,d),[F,k]=l.useState(null),H=st(t,Te=>k(Te)),[R,E]=l.useState(null),p=cs(R),$=(n=p==null?void 0:p.width)!==null&&n!==void 0?n:0,A=(r=p==null?void 0:p.height)!==null&&r!==void 0?r:0,M=f+(h!=="center"?"-"+h:""),z=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},U=Array.isArray(T)?T:[T],re=U.length>0,B={padding:z,boundary:U.filter(qw),altBoundary:re},{refs:L,floatingStyles:oe,placement:G,isPositioned:K,middlewareData:Z}=kw({strategy:"fixed",placement:M,whileElementsMounted:Aw,elements:{reference:P.anchor},middleware:[dw({mainAxis:m+A,alignmentAxis:b}),C&&fw({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?hw():void 0,...B}),C&&cw({...B}),pw({...B,apply:({elements:Te,rects:Oe,availableWidth:Ne,availableHeight:Re})=>{const{width:We,height:De}=Oe.reference,ot=Te.floating.style;ot.setProperty("--radix-popper-available-width",`${Ne}px`),ot.setProperty("--radix-popper-available-height",`${Re}px`),ot.setProperty("--radix-popper-anchor-width",`${We}px`),ot.setProperty("--radix-popper-anchor-height",`${De}px`)}}),R&&Nw({element:R,padding:y}),Xw({arrowWidth:$,arrowHeight:A}),w&&uw({strategy:"referenceHidden"})]}),[ce,W]=Kp(G),Y=cn(I);Gt(()=>{K&&(Y==null||Y())},[K,Y]);const te=(o=Z.arrow)===null||o===void 0?void 0:o.x,J=(i=Z.arrow)===null||i===void 0?void 0:i.y,ie=((a=Z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[ee,we]=l.useState();return Gt(()=>{F&&we(window.getComputedStyle(F).zIndex)},[F]),l.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:K?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(s=Z.transformOrigin)===null||s===void 0?void 0:s.x,(c=Z.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},l.createElement(Hw,{scope:d,placedSide:ce,onArrowChange:E,arrowX:te,arrowY:J,shouldHideArrow:ie},l.createElement(Ke.div,ae({"data-side":ce,"data-align":W},D,{ref:H,style:{...D.style,animation:K?void 0:"none",opacity:(u=Z.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),Uw="PopperArrow",Yw={top:"bottom",right:"left",bottom:"top",left:"right"},Kw=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Ww(Uw,r),a=Yw[i.placedSide];return l.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},l.createElement(jw,ae({},o,{ref:n,style:{...o.style,display:"block"}})))});function qw(e){return e!==null}const Xw=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:c,middlewareData:u}=t,f=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=f?0:e.arrowWidth,h=f?0:e.arrowHeight,[b,y]=Kp(s),T={start:"0%",center:"50%",end:"100%"}[y],S=((r=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+m/2,v=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let w="",C="";return b==="bottom"?(w=f?T:`${S}px`,C=`${-h}px`):b==="top"?(w=f?T:`${S}px`,C=`${c.floating.height+h}px`):b==="right"?(w=`${-h}px`,C=f?T:`${v}px`):b==="left"&&(w=`${c.floating.width+h}px`,C=f?T:`${v}px`),{data:{x:w,y:C}}}});function Kp(e){const[t,n="center"]=e.split("-");return[t,n]}const qp=Fw,Xp=Bw,Gp=zw,Gw=Kw,Zp=l.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?hn.createPortal(l.createElement(Ke.div,ae({},o,{ref:t})),r):null}),Zw=Zp;function ls(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const ds=l.forwardRef((e,t)=>l.createElement(Ke.span,ae({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),Qw=ds;var Jw=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Wr=new WeakMap,zi=new WeakMap,Ui={},Ys=0,Qp=function(e){return e&&(e.host||Qp(e.parentNode))},e1=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Qp(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},t1=function(e,t,n,r){var o=e1(t,Array.isArray(e)?e:[e]);Ui[n]||(Ui[n]=new WeakMap);var i=Ui[n],a=[],s=new Set,c=new Set(o),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};o.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(m){if(s.has(m))d(m);else{var h=m.getAttribute(r),b=h!==null&&h!=="false",y=(Wr.get(m)||0)+1,T=(i.get(m)||0)+1;Wr.set(m,y),i.set(m,T),a.push(m),y===1&&b&&zi.set(m,!0),T===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return d(t),s.clear(),Ys++,function(){a.forEach(function(f){var m=Wr.get(f)-1,h=i.get(f)-1;Wr.set(f,m),i.set(f,h),m||(zi.has(f)||f.removeAttribute(r),zi.delete(f)),h||f.removeAttribute(n)}),Ys--,Ys||(Wr=new WeakMap,Wr=new WeakMap,zi=new WeakMap,Ui={})}},Jp=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Jw(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),t1(r,o,n,"aria-hidden")):function(){return null}},xn=function(){return xn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},xn.apply(this,arguments)};function ev(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function n1(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var ha="right-scroll-bar-position",pa="width-before-scroll-bar",r1="with-scroll-bars-hidden",o1="--removed-body-scroll-bar-size";function i1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function a1(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function s1(e,t){return a1(t||null,function(n){return e.forEach(function(r){return i1(r,n)})})}function c1(e){return e}function u1(e,t){t===void 0&&(t=c1);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var d=a;a=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return o}function l1(e){e===void 0&&(e={});var t=u1(null);return t.options=xn({async:!0,ssr:!1},e),t}var tv=function(e){var t=e.sideCar,n=ev(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return $e.createElement(r,xn({},n))};tv.isSideCarExport=!0;function d1(e,t){return e.useMedium(t),tv}var nv=l1(),Ks=function(){},fs=$e.forwardRef(function(e,t){var n=$e.useRef(null),r=$e.useState({onScrollCapture:Ks,onWheelCapture:Ks,onTouchMoveCapture:Ks}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,h=e.noIsolation,b=e.inert,y=e.allowPinchZoom,T=e.as,S=T===void 0?"div":T,v=ev(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=m,C=s1([n,t]),I=xn(xn({},v),o);return $e.createElement($e.Fragment,null,d&&$e.createElement(w,{sideCar:nv,removeScrollBar:u,shards:f,noIsolation:h,inert:b,setCallbacks:i,allowPinchZoom:!!y,lockRef:n}),a?$e.cloneElement($e.Children.only(s),xn(xn({},I),{ref:C})):$e.createElement(S,xn({},I,{className:c,ref:C}),s))});fs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fs.classNames={fullWidth:pa,zeroRight:ha};var sf,f1=function(){if(sf)return sf;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function h1(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=f1();return t&&e.setAttribute("nonce",t),e}function p1(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function v1(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var m1=function(){var e=0,t=null;return{add:function(n){e==0&&(t=h1())&&(p1(t,n),v1(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},g1=function(){var e=m1();return function(t,n){$e.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rv=function(){var e=g1(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},y1={left:0,top:0,right:0,gap:0},qs=function(e){return parseInt(e||"",10)||0},b1=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[qs(n),qs(r),qs(o)]},w1=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return y1;var t=b1(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},E1=rv(),x1=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
54
- .`.concat(r1,` {
53
+ Check the top-level render call using <`+Q+">.")}return V}}function Ht(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var Q=$n(V);if(un[Q])return;un[Q]=!0;var fe="";x&&x._owner&&x._owner!==At.current&&(fe=" It was passed a child from "+p(x._owner.type)+"."),Ot(x),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Ot(null)}}function en(x,V){{if(typeof x!="object")return;if(xt(x))for(var Q=0;Q<x.length;Q++){var fe=x[Q];Lt(fe)&&Ht(fe,V)}else if(Lt(x))x._store&&(x._store.validated=!0);else if(x){var _e=T(x);if(typeof _e=="function"&&_e!==x.entries)for(var Ie=_e.call(x),Ee;!(Ee=Ie.next()).done;)Lt(Ee.value)&&Ht(Ee.value,V)}}}function Nn(x){{var V=x.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))Q=V.propTypes;else return;if(Q){var fe=p(V);ot(Q,x.props,"prop",fe,x)}else if(V.PropTypes!==void 0&&!yn){yn=!0;var _e=p(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_e||"Unknown")}typeof V.getDefaultProps=="function"&&!V.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Kt(x){{for(var V=Object.keys(x.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){Ot(x),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Ot(null);break}}x.ref!==null&&(Ot(x),v("Invalid attribute `ref` supplied to `React.Fragment`."),Ot(null))}}function Tn(x,V,Q,fe,_e,Ie){{var Ee=H(x);if(!Ee){var be="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(be+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var nt=tr(_e);nt?be+=nt:be+=Dn();var Le;x===null?Le="null":xt(x)?Le="array":x!==void 0&&x.$$typeof===t?(Le="<"+(p(x.type)||"Unknown")+" />",be=" Did you accidentally export a JSX literal instead of a component?"):Le=typeof x,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Le,be)}var Be=kt(x,V,Q,_e,Ie);if(Be==null)return Be;if(Ee){var Ge=V.children;if(Ge!==void 0)if(fe)if(xt(Ge)){for(var qt=0;qt<Ge.length;qt++)en(Ge[qt],x);Object.freeze&&Object.freeze(Ge)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else en(Ge,x)}return x===r?Kt(Be):Nn(Be),Be}}function kn(x,V,Q){return Tn(x,V,Q,!0)}function nr(x,V,Q){return Tn(x,V,Q,!1)}var Wt=nr,rr=kn;Hi.Fragment=r,Hi.jsx=Wt,Hi.jsxs=rr}()),Hi}process.env.NODE_ENV==="production"?Sc.exports=d0():Sc.exports=f0();var _t=Sc.exports;const h0=e=>{const t="currentColor";return{...e,color:(()=>e.color?Rt.theme.colors[e.color]?Rt.theme.colors[e.color]:e.color:"inherit")(),fill:(e==null?void 0:e.fill)||t,width:(e==null?void 0:e.size)||24,height:(e==null?void 0:e.size)||24}},gn=h0,p0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"m19.02 6.96-8.62 8.9-5.28-5.27L3 12.71l7.43 7.43 10.74-11.1-2.15-2.08Z",fill:t})})},wu=p0,v0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"m21.59 9.03-2.12-2.12-6.94 6.94-6.94-6.94-2.12 2.12 9.06 9.06 9.06-9.06Z",fill:t})})},si=v0,m0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"m16 21.56 2.12-2.12-6.94-6.94 6.94-6.94L16 3.44 6.94 12.5 16 21.56Z",fill:t})})},g0=m0,y0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"m3.47 15.97 2.12 2.12 6.94-6.94 6.94 6.94 2.12-2.12-9.06-9.06-9.06 9.06Z",fill:t})})},Eu=y0,b0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"m21.06 19.44-6.98-6.98 6.9-6.9-2.12-2.12-6.9 6.9-6.82-6.82-2.12 2.12 6.82 6.82-6.9 6.9 2.12 2.12 6.9-6.9 6.98 6.98 2.12-2.12Z",fill:t})})},os=b0,w0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"M9 5.5v-3H6v3H2v3h4v3h3v-3h13v-3H9ZM18 13.5h-3v3H2v3h13v3h3v-3h4v-3h-4v-3Z",fill:t})})},E0=w0,x0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"M21 11H3v3h18v-3Z",fill:t})})},_0=x0,S0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"m22 21.67-4.86-4.86a8.474 8.474 0 0 0 1.86-5.3c0-4.69-3.81-8.5-8.5-8.5-4.69 0-8.5 3.81-8.5 8.5 0 4.69 3.81 8.5 8.5 8.5 2.01 0 3.85-.7 5.3-1.86l4.86 4.86 1.33-1.33.01-.01ZM10.5 18C6.92 18 4 15.08 4 11.5S6.92 5 10.5 5 17 7.92 17 11.5 14.08 18 10.5 18Z",fill:t})})},C0=S0,$0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm3.29 14.71-3.31-3.31-3.27 3.27-1.41-1.41 3.27-3.27-3.23-3.23 1.41-1.41 3.23 3.23 3.27-3.27 1.41 1.41-3.27 3.27 3.31 3.31-1.41 1.41Z",fill:t})})},T0=$0,I0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm0 16c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1Zm1.37-4.24c-.22.08-.37.27-.37.47v.77h-2v-.77c0-1.06.66-1.98 1.68-2.35.78-.29 1.48-1.15 1.28-2.25-.14-.79-.81-1.46-1.6-1.6a2.003 2.003 0 0 0-2.37 1.97h-2c0-1.18.52-2.3 1.43-3.06.91-.76 2.1-1.08 3.29-.87 1.61.28 2.94 1.61 3.22 3.22.34 1.93-.74 3.81-2.57 4.48l.01-.01Z",fill:t})})},R0=I0,O0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm1 15h-2v-6h2v6Zm-1-7.88c-.62 0-1.12-.5-1.12-1.12 0-.62.5-1.12 1.12-1.12.62 0 1.12.5 1.12 1.12 0 .62-.5 1.12-1.12 1.12Z",fill:t})})},P0=O0,A0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"M12 2.5c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10Zm-1.33 14.41-4.04-4.04 1.41-1.41 2.63 2.63 5.29-5.29 1.41 1.41-6.71 6.71.01-.01Z",fill:t})})},D0=A0,N0=e=>{const{color:t,...n}=gn(e);return _t.jsx("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:_t.jsx("path",{d:"m12 3.5-10 18h20l-10-18Zm0 15c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1Zm-1-3v-5h2v5h-2Z",fill:t})})},k0=N0,M0=l.forwardRef(({children:e,className:t,...n},r)=>j.jsx($b,{className:"accordion-header",children:j.jsxs(Tb,{className:Pe(s0,t),...n,ref:r,children:[j.jsx(et,{className:c0,children:e}),j.jsx(si,{className:r0,size:24,color:Rt.theme.colors.black})]})}));var j0={success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)",warning:"var(--_1qe00b211)",error:"var(--_1qe00b214)",neutral:"var(--_1qe00b2e)"},L0=wt({defaultClassName:"_7q2fqh0",variantClassNames:{colorScheme:{success:"_7q2fqh1",info:"_7q2fqh2",warning:"_7q2fqh3",error:"_7q2fqh4",neutral:"_7q2fqh5"}},defaultVariants:{colorScheme:"neutral"},compoundVariants:[]});const Rp=l.forwardRef(({className:e,title:t,children:n,withClose:r,colorScheme:o,onClose:i,...a},s)=>{const c="div",d=(()=>{switch(o){case"error":return T0;case"warning":return k0;case"success":return D0;default:return P0}})();return j.jsxs(c,{ref:s,className:Pe(L0({colorScheme:o}),e),"data-test-id":a["data-test-id"],...a,children:[j.jsxs(Yt,{gap:"$16",children:[j.jsx(et,{display:"flex",minW:Rt.theme.space[24],children:j.jsx(d,{size:24,color:j0[o||"neutral"]})}),j.jsx(et,{pt:"$2",children:j.jsxs(Pr,{gap:"$8",children:[t&&j.jsx(sn,{textStyle:"body2",as:"span",fontWeight:"$bold",children:t}),j.jsx(et,{children:n})]})})]}),r&&j.jsx(Yt,{pl:"$16",pt:"$4",children:j.jsx(os,{"data-test-id":"VqcF6V40rj6neoaCMaHvB",onClick:i,cursor:"pointer",color:Rt.theme.colors.black,size:16})})]})});Rp.defaultProps={"data-test-id":void 0,title:void 0,withClose:void 0,onClose:void 0};var F0=wt({defaultClassName:"_1er7sj40",variantClassNames:{colorScheme:{primary:"_1er7sj41",disabled:"_1er7sj42",yellow:"_1er7sj43",red:"_1er7sj44",blue:"_1er7sj45",neutral:"_1er7sj46"},size:{medium:"_15r4f4d1oz _15r4f4d1il _15r4f4d15j _15r4f4d1bx",small:"_15r4f4d1op _15r4f4d1ib _15r4f4d154 _15r4f4d1bi"},isRounded:{true:"_1er7sj49",false:"_1er7sj4a"},variant:{primary:"_1er7sj4b",secondary:"_1er7sj4c"}},defaultVariants:{colorScheme:"primary",size:"medium",variant:"primary",isRounded:!1},compoundVariants:[[{colorScheme:"primary",variant:"secondary"},"_1er7sj4d"],[{colorScheme:"disabled",variant:"secondary"},"_1er7sj4e"],[{colorScheme:"yellow",variant:"secondary"},"_1er7sj4f"],[{colorScheme:"red",variant:"secondary"},"_1er7sj4g"],[{colorScheme:"blue",variant:"secondary"},"_1er7sj4h"]]});const xu=l.forwardRef(({as:e,children:t,colorScheme:n,size:r,variant:o,isRounded:i,className:a,style:s,...c},u)=>{const d=e||"span";return j.jsx(d,{ref:u,"data-test-id":c["data-test-id"],className:Pe(F0({colorScheme:n,variant:o,size:r,isRounded:i}),a),style:s,...c,children:t})});xu.defaultProps={as:"span",colorScheme:"primary",size:"medium",children:void 0,"data-test-id":void 0};xu.displayName="Badge";function Wd(e,[t,n]){return Math.min(n,Math.max(t,e))}function V0(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Cc="dismissableLayer.update",B0="dismissableLayer.pointerDownOutside",H0="dismissableLayer.focusOutside";let zd;const Op=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),is=l.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...u}=e,d=l.useContext(Op),[f,m]=l.useState(null),h=(n=f==null?void 0:f.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=l.useState({}),y=st(t,F=>m(F)),T=Array.from(d.layers),[S]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=T.indexOf(S),w=f?T.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,I=w>=v,D=z0(F=>{const k=F.target,H=[...d.branches].some(R=>R.contains(k));!I||H||(i==null||i(F),s==null||s(F),F.defaultPrevented||c==null||c())},h),P=U0(F=>{const k=F.target;[...d.branches].some(R=>R.contains(k))||(a==null||a(F),s==null||s(F),F.defaultPrevented||c==null||c())},h);return V0(F=>{w===d.layers.size-1&&(o==null||o(F),!F.defaultPrevented&&c&&(F.preventDefault(),c()))},h),l.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(zd=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Ud(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=zd)}},[f,h,r,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Ud())},[f,d]),l.useEffect(()=>{const F=()=>b({});return document.addEventListener(Cc,F),()=>document.removeEventListener(Cc,F)},[]),l.createElement(Ke.div,ae({},u,{ref:y,style:{pointerEvents:C?I?"auto":"none":void 0,...e.style},onFocusCapture:Ae(e.onFocusCapture,P.onFocusCapture),onBlurCapture:Ae(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Ae(e.onPointerDownCapture,D.onPointerDownCapture)}))}),W0=l.forwardRef((e,t)=>{const n=l.useContext(Op),r=l.useRef(null),o=st(t,r);return l.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.createElement(Ke.div,ae({},e,{ref:o}))});function z0(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Pp(B0,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function U0(e,t=globalThis==null?void 0:globalThis.document){const n=cn(e),r=l.useRef(!1);return l.useEffect(()=>{const o=i=>{i.target&&!r.current&&Pp(H0,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ud(){const e=new CustomEvent(Cc);document.dispatchEvent(e)}function Pp(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?bp(o,i):o.dispatchEvent(i)}const Y0=is,K0=W0;let Ws=0;function Ap(){l.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:Yd()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Yd()),Ws++,()=>{Ws===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Ws--}},[])}function Yd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const zs="focusScope.autoFocusOnMount",Us="focusScope.autoFocusOnUnmount",Kd={bubbles:!1,cancelable:!0},Dp=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=l.useState(null),u=cn(o),d=cn(i),f=l.useRef(null),m=st(t,y=>c(y)),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let y=function(w){if(h.paused||!s)return;const C=w.target;s.contains(C)?f.current=C:ar(f.current,{select:!0})},T=function(w){if(h.paused||!s)return;const C=w.relatedTarget;C!==null&&(s.contains(C)||ar(f.current,{select:!0}))},S=function(w){const C=document.activeElement;for(const I of w)I.removedNodes.length>0&&(s!=null&&s.contains(C)||ar(s))};document.addEventListener("focusin",y),document.addEventListener("focusout",T);const v=new MutationObserver(S);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",T),v.disconnect()}}},[r,s,h.paused]),l.useEffect(()=>{if(s){Xd.add(h);const y=document.activeElement;if(!s.contains(y)){const S=new CustomEvent(zs,Kd);s.addEventListener(zs,u),s.dispatchEvent(S),S.defaultPrevented||(q0(J0(Np(s)),{select:!0}),document.activeElement===y&&ar(s))}return()=>{s.removeEventListener(zs,u),setTimeout(()=>{const S=new CustomEvent(Us,Kd);s.addEventListener(Us,d),s.dispatchEvent(S),S.defaultPrevented||ar(y??document.body,{select:!0}),s.removeEventListener(Us,d),Xd.remove(h)},0)}}},[s,u,d,h]);const b=l.useCallback(y=>{if(!n&&!r||h.paused)return;const T=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,S=document.activeElement;if(T&&S){const v=y.currentTarget,[w,C]=X0(v);w&&C?!y.shiftKey&&S===C?(y.preventDefault(),n&&ar(w,{select:!0})):y.shiftKey&&S===w&&(y.preventDefault(),n&&ar(C,{select:!0})):S===v&&y.preventDefault()}},[n,r,h.paused]);return l.createElement(Ke.div,ae({tabIndex:-1},a,{ref:m,onKeyDown:b}))});function q0(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ar(r,{select:t}),document.activeElement!==n)return}function X0(e){const t=Np(e),n=qd(t,e),r=qd(t.reverse(),e);return[n,r]}function Np(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function qd(e,t){for(const n of e)if(!G0(n,{upTo:t}))return n}function G0(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Z0(e){return e instanceof HTMLInputElement&&"select"in e}function ar(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Z0(e)&&t&&e.select()}}const Xd=Q0();function Q0(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Gd(e,t),e.unshift(t)},remove(t){var n;e=Gd(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Gd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function J0(e){return e.filter(t=>t.tagName!=="A")}const ew=["top","right","bottom","left"],vr=Math.min,fn=Math.max,Ta=Math.round,Wi=Math.floor,mr=e=>({x:e,y:e}),tw={left:"right",right:"left",bottom:"top",top:"bottom"},nw={start:"end",end:"start"};function $c(e,t,n){return fn(e,vr(t,n))}function Gn(e,t){return typeof e=="function"?e(t):e}function Zn(e){return e.split("-")[0]}function mo(e){return e.split("-")[1]}function _u(e){return e==="x"?"y":"x"}function Su(e){return e==="y"?"height":"width"}function go(e){return["top","bottom"].includes(Zn(e))?"y":"x"}function Cu(e){return _u(go(e))}function rw(e,t,n){n===void 0&&(n=!1);const r=mo(e),o=Cu(e),i=Su(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ia(a)),[a,Ia(a)]}function ow(e){const t=Ia(e);return[Tc(e),t,Tc(t)]}function Tc(e){return e.replace(/start|end/g,t=>nw[t])}function iw(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function aw(e,t,n,r){const o=mo(e);let i=iw(Zn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Tc)))),i}function Ia(e){return e.replace(/left|right|bottom|top/g,t=>tw[t])}function sw(e){return{top:0,right:0,bottom:0,left:0,...e}}function kp(e){return typeof e!="number"?sw(e):{top:e,right:e,bottom:e,left:e}}function Ra(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Zd(e,t,n){let{reference:r,floating:o}=e;const i=go(t),a=Cu(t),s=Su(a),c=Zn(t),u=i==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,m=r[s]/2-o[s]/2;let h;switch(c){case"top":h={x:d,y:r.y-o.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(mo(t)){case"start":h[a]-=m*(n&&u?-1:1);break;case"end":h[a]+=m*(n&&u?-1:1);break}return h}const cw=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Zd(u,r,c),m=r,h={},b=0;for(let y=0;y<s.length;y++){const{name:T,fn:S}=s[y],{x:v,y:w,data:C,reset:I}=await S({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});if(d=v??d,f=w??f,h={...h,[T]:{...h[T],...C}},I&&b<=50){b++,typeof I=="object"&&(I.placement&&(m=I.placement),I.rects&&(u=I.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:d,y:f}=Zd(u,m,c)),y=-1;continue}}return{x:d,y:f,placement:m,strategy:o,middlewareData:h}};async function ci(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:h=0}=Gn(t,e),b=kp(h),T=s[m?f==="floating"?"reference":"floating":f],S=Ra(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(T)))==null||n?T:T.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:c})),v=f==="floating"?{...a.floating,x:r,y:o}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),C=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},I=Ra(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:w,strategy:c}):v);return{top:(S.top-I.top+b.top)/C.y,bottom:(I.bottom-S.bottom+b.bottom)/C.y,left:(S.left-I.left+b.left)/C.x,right:(I.right-S.right+b.right)/C.x}}const Qd=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s}=t,{element:c,padding:u=0}=Gn(e,t)||{};if(c==null)return{};const d=kp(u),f={x:n,y:r},m=Cu(o),h=Su(m),b=await a.getDimensions(c),y=m==="y",T=y?"top":"left",S=y?"bottom":"right",v=y?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[m]-f[m]-i.floating[h],C=f[m]-i.reference[m],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let D=I?I[v]:0;(!D||!await(a.isElement==null?void 0:a.isElement(I)))&&(D=s.floating[v]||i.floating[h]);const P=w/2-C/2,F=D/2-b[h]/2-1,k=vr(d[T],F),H=vr(d[S],F),R=k,E=D-b[h]-H,p=D/2-b[h]/2+P,$=$c(R,p,E),M=mo(o)!=null&&p!=$&&i.reference[h]/2-(p<R?k:H)-b[h]/2<0?p<R?R-p:E-p:0;return{[m]:f[m]-M,data:{[m]:$,centerOffset:p-$+M}}}}),uw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:b=!0,...y}=Gn(e,t),T=Zn(r),S=Zn(a)===a,v=await(s.isRTL==null?void 0:s.isRTL(c.floating)),w=f||(S||!b?[Ia(a)]:ow(a));!f&&h!=="none"&&w.push(...aw(a,b,h,v));const C=[a,...w],I=await ci(t,y),D=[];let P=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&D.push(I[T]),d){const R=rw(r,i,v);D.push(I[R[0]],I[R[1]])}if(P=[...P,{placement:r,overflows:D}],!D.every(R=>R<=0)){var F,k;const R=(((F=o.flip)==null?void 0:F.index)||0)+1,E=C[R];if(E)return{data:{index:R,overflows:P},reset:{placement:E}};let p=(k=P.filter($=>$.overflows[0]<=0).sort(($,A)=>$.overflows[1]-A.overflows[1])[0])==null?void 0:k.placement;if(!p)switch(m){case"bestFit":{var H;const $=(H=P.map(A=>[A.placement,A.overflows.filter(M=>M>0).reduce((M,z)=>M+z,0)]).sort((A,M)=>A[1]-M[1])[0])==null?void 0:H[0];$&&(p=$);break}case"initialPlacement":p=a;break}if(r!==p)return{reset:{placement:p}}}return{}}}};function Jd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ef(e){return ew.some(t=>e[t]>=0)}const lw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Gn(e,t);switch(r){case"referenceHidden":{const i=await ci(t,{...o,elementContext:"reference"}),a=Jd(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ef(a)}}}case"escaped":{const i=await ci(t,{...o,altBoundary:!0}),a=Jd(i,n.floating);return{data:{escapedOffsets:a,escaped:ef(a)}}}default:return{}}}}};async function dw(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Zn(n),s=mo(n),c=go(n)==="y",u=["left","top"].includes(a)?-1:1,d=i&&c?-1:1,f=Gn(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:b}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof b=="number"&&(h=s==="end"?b*-1:b),c?{x:h*d,y:m*u}:{x:m*u,y:h*d}}const fw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await dw(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},hw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:T=>{let{x:S,y:v}=T;return{x:S,y:v}}},...c}=Gn(e,t),u={x:n,y:r},d=await ci(t,c),f=go(Zn(o)),m=_u(f);let h=u[m],b=u[f];if(i){const T=m==="y"?"top":"left",S=m==="y"?"bottom":"right",v=h+d[T],w=h-d[S];h=$c(v,h,w)}if(a){const T=f==="y"?"top":"left",S=f==="y"?"bottom":"right",v=b+d[T],w=b-d[S];b=$c(v,b,w)}const y=s.fn({...t,[m]:h,[f]:b});return{...y,data:{x:y.x-n,y:y.y-r}}}}},pw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=Gn(e,t),d={x:n,y:r},f=go(o),m=_u(f);let h=d[m],b=d[f];const y=Gn(s,t),T=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const w=m==="y"?"height":"width",C=i.reference[m]-i.floating[w]+T.mainAxis,I=i.reference[m]+i.reference[w]-T.mainAxis;h<C?h=C:h>I&&(h=I)}if(u){var S,v;const w=m==="y"?"width":"height",C=["top","left"].includes(Zn(o)),I=i.reference[f]-i.floating[w]+(C&&((S=a.offset)==null?void 0:S[f])||0)+(C?0:T.crossAxis),D=i.reference[f]+i.reference[w]+(C?0:((v=a.offset)==null?void 0:v[f])||0)-(C?T.crossAxis:0);b<I?b=I:b>D&&(b=D)}return{[m]:h,[f]:b}}}},vw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Gn(e,t),c=await ci(t,s),u=Zn(n),d=mo(n),f=go(n)==="y",{width:m,height:h}=r.floating;let b,y;u==="top"||u==="bottom"?(b=u,y=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,b=d==="end"?"top":"bottom");const T=h-c[b],S=m-c[y],v=!t.middlewareData.shift;let w=T,C=S;if(f){const D=m-c.left-c.right;C=d||v?vr(S,D):D}else{const D=h-c.top-c.bottom;w=d||v?vr(T,D):D}if(v&&!d){const D=fn(c.left,0),P=fn(c.right,0),F=fn(c.top,0),k=fn(c.bottom,0);f?C=m-2*(D!==0||P!==0?D+P:fn(c.left,c.right)):w=h-2*(F!==0||k!==0?F+k:fn(c.top,c.bottom))}await a({...t,availableWidth:C,availableHeight:w});const I=await o.getDimensions(i.floating);return m!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function gr(e){return Mp(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jn(e){var t;return(t=(Mp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mp(e){return e instanceof Node||e instanceof vn(e).Node}function Qn(e){return e instanceof Element||e instanceof vn(e).Element}function Vn(e){return e instanceof HTMLElement||e instanceof vn(e).HTMLElement}function tf(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}function $i(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function mw(e){return["table","td","th"].includes(gr(e))}function $u(e){const t=Tu(),n=Cn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function gw(e){let t=lo(e);for(;Vn(t)&&!as(t);){if($u(t))return t;t=lo(t)}return null}function Tu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function as(e){return["html","body","#document"].includes(gr(e))}function Cn(e){return vn(e).getComputedStyle(e)}function ss(e){return Qn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function lo(e){if(gr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||tf(e)&&e.host||Jn(e);return tf(t)?t.host:t}function jp(e){const t=lo(e);return as(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vn(t)&&$i(t)?t:jp(t)}function Oa(e,t){var n;t===void 0&&(t=[]);const r=jp(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=vn(r);return o?t.concat(i,i.visualViewport||[],$i(r)?r:[]):t.concat(r,Oa(r))}function Lp(e){const t=Cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Vn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Ta(n)!==i||Ta(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Iu(e){return Qn(e)?e:e.contextElement}function ro(e){const t=Iu(e);if(!Vn(t))return mr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Lp(t);let a=(i?Ta(n.width):n.width)/r,s=(i?Ta(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const yw=mr(0);function Fp(e){const t=vn(e);return!Tu()||!t.visualViewport?yw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vn(e)?!1:t}function kr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Iu(e);let a=mr(1);t&&(r?Qn(r)&&(a=ro(r)):a=ro(e));const s=bw(i,n,r)?Fp(i):mr(0);let c=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(i){const m=vn(i),h=r&&Qn(r)?vn(r):r;let b=m.frameElement;for(;b&&r&&h!==m;){const y=ro(b),T=b.getBoundingClientRect(),S=Cn(b),v=T.left+(b.clientLeft+parseFloat(S.paddingLeft))*y.x,w=T.top+(b.clientTop+parseFloat(S.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=v,u+=w,b=vn(b).frameElement}}return Ra({width:d,height:f,x:c,y:u})}function ww(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Vn(n),i=Jn(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0},s=mr(1);const c=mr(0);if((o||!o&&r!=="fixed")&&((gr(n)!=="body"||$i(i))&&(a=ss(n)),Vn(n))){const u=kr(n);s=ro(n),c.x=u.x+n.clientLeft,c.y=u.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function Ew(e){return Array.from(e.getClientRects())}function Vp(e){return kr(Jn(e)).left+ss(e).scrollLeft}function xw(e){const t=Jn(e),n=ss(e),r=e.ownerDocument.body,o=fn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=fn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Vp(e);const s=-n.scrollTop;return Cn(r).direction==="rtl"&&(a+=fn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function _w(e,t){const n=vn(e),r=Jn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const u=Tu();(!u||u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function Sw(e,t){const n=kr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Vn(e)?ro(e):mr(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,u=r*i.y;return{width:a,height:s,x:c,y:u}}function nf(e,t,n){let r;if(t==="viewport")r=_w(e,n);else if(t==="document")r=xw(Jn(e));else if(Qn(t))r=Sw(t,n);else{const o=Fp(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ra(r)}function Bp(e,t){const n=lo(e);return n===t||!Qn(n)||as(n)?!1:Cn(n).position==="fixed"||Bp(n,t)}function Cw(e,t){const n=t.get(e);if(n)return n;let r=Oa(e).filter(s=>Qn(s)&&gr(s)!=="body"),o=null;const i=Cn(e).position==="fixed";let a=i?lo(e):e;for(;Qn(a)&&!as(a);){const s=Cn(a),c=$u(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||$i(a)&&!c&&Bp(e,a))?r=r.filter(d=>d!==a):o=s,a=lo(a)}return t.set(e,r),r}function $w(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Cw(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((u,d)=>{const f=nf(t,d,o);return u.top=fn(f.top,u.top),u.right=vr(f.right,u.right),u.bottom=vr(f.bottom,u.bottom),u.left=fn(f.left,u.left),u},nf(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Tw(e){return Lp(e)}function Iw(e,t,n){const r=Vn(t),o=Jn(t),i=n==="fixed",a=kr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=mr(0);if(r||!r&&!i)if((gr(t)!=="body"||$i(o))&&(s=ss(t)),r){const u=kr(t,!0,i,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=Vp(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function rf(e,t){return!Vn(e)||Cn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Hp(e,t){const n=vn(e);if(!Vn(e))return n;let r=rf(e,t);for(;r&&mw(r)&&Cn(r).position==="static";)r=rf(r,t);return r&&(gr(r)==="html"||gr(r)==="body"&&Cn(r).position==="static"&&!$u(r))?n:r||gw(e)||n}const Rw=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Hp,i=this.getDimensions;return{reference:Iw(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Ow(e){return Cn(e).direction==="rtl"}const Pw={convertOffsetParentRelativeRectToViewportRelativeRect:ww,getDocumentElement:Jn,getClippingRect:$w,getOffsetParent:Hp,getElementRects:Rw,getClientRects:Ew,getDimensions:Tw,getScale:ro,isElement:Qn,isRTL:Ow};function Aw(e,t){let n=null,r;const o=Jn(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:u,top:d,width:f,height:m}=e.getBoundingClientRect();if(s||t(),!f||!m)return;const h=Wi(d),b=Wi(o.clientWidth-(u+f)),y=Wi(o.clientHeight-(d+m)),T=Wi(u),v={rootMargin:-h+"px "+-b+"px "+-y+"px "+-T+"px",threshold:fn(0,vr(1,c))||1};let w=!0;function C(I){const D=I[0].intersectionRatio;if(D!==c){if(!w)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(C,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,v)}n.observe(e)}return a(!0),i}function Dw(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Iu(e),d=o||i?[...u?Oa(u):[],...Oa(t)]:[];d.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),i&&S.addEventListener("resize",n)});const f=u&&s?Aw(u,n):null;let m=-1,h=null;a&&(h=new ResizeObserver(S=>{let[v]=S;v&&v.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let b,y=c?kr(e):null;c&&T();function T(){const S=kr(e);y&&(S.x!==y.x||S.y!==y.y||S.width!==y.width||S.height!==y.height)&&n(),y=S,b=requestAnimationFrame(T)}return n(),()=>{d.forEach(S=>{o&&S.removeEventListener("scroll",n),i&&S.removeEventListener("resize",n)}),f&&f(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(b)}}const Nw=(e,t,n)=>{const r=new Map,o={platform:Pw,...n},i={...o.platform,_c:r};return cw(e,t,{...o,platform:i})},kw=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Qd({element:r.current,padding:o}).fn(n):{}:r?Qd({element:r,padding:o}).fn(n):{}}}};var fa=typeof document<"u"?l.useLayoutEffect:l.useEffect;function Pa(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Pa(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Pa(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Wp(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function of(e,t){const n=Wp(e);return Math.round(t*n)/n}function af(e){const t=$e.useRef(e);return fa(()=>{t.current=e}),t}function Mw(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[d,f]=$e.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=$e.useState(r);Pa(m,r)||h(r);const[b,y]=$e.useState(null),[T,S]=$e.useState(null),v=$e.useCallback(M=>{M!=D.current&&(D.current=M,y(M))},[y]),w=$e.useCallback(M=>{M!==P.current&&(P.current=M,S(M))},[S]),C=i||b,I=a||T,D=$e.useRef(null),P=$e.useRef(null),F=$e.useRef(d),k=af(c),H=af(o),R=$e.useCallback(()=>{if(!D.current||!P.current)return;const M={placement:t,strategy:n,middleware:m};H.current&&(M.platform=H.current),Nw(D.current,P.current,M).then(z=>{const U={...z,isPositioned:!0};E.current&&!Pa(F.current,U)&&(F.current=U,Ly.flushSync(()=>{f(U)}))})},[m,t,n,H]);fa(()=>{u===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,f(M=>({...M,isPositioned:!1})))},[u]);const E=$e.useRef(!1);fa(()=>(E.current=!0,()=>{E.current=!1}),[]),fa(()=>{if(C&&(D.current=C),I&&(P.current=I),C&&I){if(k.current)return k.current(C,I,R);R()}},[C,I,R,k]);const p=$e.useMemo(()=>({reference:D,floating:P,setReference:v,setFloating:w}),[v,w]),$=$e.useMemo(()=>({reference:C,floating:I}),[C,I]),A=$e.useMemo(()=>{const M={position:n,left:0,top:0};if(!$.floating)return M;const z=of($.floating,d.x),U=of($.floating,d.y);return s?{...M,transform:"translate("+z+"px, "+U+"px)",...Wp($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:U}},[n,s,$.floating,d.x,d.y]);return $e.useMemo(()=>({...d,update:R,refs:p,elements:$,floatingStyles:A}),[d,R,p,$,A])}const jw=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return l.createElement(Ke.svg,ae({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:l.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Lw=jw;function cs(e){const[t,n]=l.useState(void 0);return Gt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const zp="Popper",[Up,us]=mn(zp),[Fw,Yp]=Up(zp),Vw=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return l.createElement(Fw,{scope:t,anchor:r,onAnchorChange:o},n)},Bw="PopperAnchor",Hw=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Yp(Bw,n),a=l.useRef(null),s=st(t,a);return l.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:l.createElement(Ke.div,ae({},o,{ref:s}))}),Kp="PopperContent",[Ww,zw]=Up(Kp),Uw=l.forwardRef((e,t)=>{var n,r,o,i,a,s,c,u;const{__scopePopper:d,side:f="bottom",sideOffset:m=0,align:h="center",alignOffset:b=0,arrowPadding:y=0,collisionBoundary:T=[],collisionPadding:S=0,sticky:v="partial",hideWhenDetached:w=!1,avoidCollisions:C=!0,onPlaced:I,...D}=e,P=Yp(Kp,d),[F,k]=l.useState(null),H=st(t,Te=>k(Te)),[R,E]=l.useState(null),p=cs(R),$=(n=p==null?void 0:p.width)!==null&&n!==void 0?n:0,A=(r=p==null?void 0:p.height)!==null&&r!==void 0?r:0,M=f+(h!=="center"?"-"+h:""),z=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},U=Array.isArray(T)?T:[T],re=U.length>0,B={padding:z,boundary:U.filter(Xw),altBoundary:re},{refs:L,floatingStyles:oe,placement:G,isPositioned:K,middlewareData:Z}=Mw({strategy:"fixed",placement:M,whileElementsMounted:Dw,elements:{reference:P.anchor},middleware:[fw({mainAxis:m+A,alignmentAxis:b}),C&&hw({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?pw():void 0,...B}),C&&uw({...B}),vw({...B,apply:({elements:Te,rects:Oe,availableWidth:Ne,availableHeight:Re})=>{const{width:We,height:De}=Oe.reference,ot=Te.floating.style;ot.setProperty("--radix-popper-available-width",`${Ne}px`),ot.setProperty("--radix-popper-available-height",`${Re}px`),ot.setProperty("--radix-popper-anchor-width",`${We}px`),ot.setProperty("--radix-popper-anchor-height",`${De}px`)}}),R&&kw({element:R,padding:y}),Gw({arrowWidth:$,arrowHeight:A}),w&&lw({strategy:"referenceHidden"})]}),[ce,W]=qp(G),Y=cn(I);Gt(()=>{K&&(Y==null||Y())},[K,Y]);const te=(o=Z.arrow)===null||o===void 0?void 0:o.x,J=(i=Z.arrow)===null||i===void 0?void 0:i.y,ie=((a=Z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[ee,we]=l.useState();return Gt(()=>{F&&we(window.getComputedStyle(F).zIndex)},[F]),l.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:K?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(s=Z.transformOrigin)===null||s===void 0?void 0:s.x,(c=Z.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},l.createElement(Ww,{scope:d,placedSide:ce,onArrowChange:E,arrowX:te,arrowY:J,shouldHideArrow:ie},l.createElement(Ke.div,ae({"data-side":ce,"data-align":W},D,{ref:H,style:{...D.style,animation:K?void 0:"none",opacity:(u=Z.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),Yw="PopperArrow",Kw={top:"bottom",right:"left",bottom:"top",left:"right"},qw=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=zw(Yw,r),a=Kw[i.placedSide];return l.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},l.createElement(Lw,ae({},o,{ref:n,style:{...o.style,display:"block"}})))});function Xw(e){return e!==null}const Gw=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:c,middlewareData:u}=t,f=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=f?0:e.arrowWidth,h=f?0:e.arrowHeight,[b,y]=qp(s),T={start:"0%",center:"50%",end:"100%"}[y],S=((r=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+m/2,v=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let w="",C="";return b==="bottom"?(w=f?T:`${S}px`,C=`${-h}px`):b==="top"?(w=f?T:`${S}px`,C=`${c.floating.height+h}px`):b==="right"?(w=`${-h}px`,C=f?T:`${v}px`):b==="left"&&(w=`${c.floating.width+h}px`,C=f?T:`${v}px`),{data:{x:w,y:C}}}});function qp(e){const[t,n="center"]=e.split("-");return[t,n]}const Xp=Vw,Gp=Hw,Zp=Uw,Zw=qw,Qp=l.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?hn.createPortal(l.createElement(Ke.div,ae({},o,{ref:t})),r):null}),Qw=Qp;function ls(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const ds=l.forwardRef((e,t)=>l.createElement(Ke.span,ae({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),Jw=ds;var e1=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Wr=new WeakMap,zi=new WeakMap,Ui={},Ys=0,Jp=function(e){return e&&(e.host||Jp(e.parentNode))},t1=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Jp(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},n1=function(e,t,n,r){var o=t1(t,Array.isArray(e)?e:[e]);Ui[n]||(Ui[n]=new WeakMap);var i=Ui[n],a=[],s=new Set,c=new Set(o),u=function(f){!f||s.has(f)||(s.add(f),u(f.parentNode))};o.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(m){if(s.has(m))d(m);else{var h=m.getAttribute(r),b=h!==null&&h!=="false",y=(Wr.get(m)||0)+1,T=(i.get(m)||0)+1;Wr.set(m,y),i.set(m,T),a.push(m),y===1&&b&&zi.set(m,!0),T===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return d(t),s.clear(),Ys++,function(){a.forEach(function(f){var m=Wr.get(f)-1,h=i.get(f)-1;Wr.set(f,m),i.set(f,h),m||(zi.has(f)||f.removeAttribute(r),zi.delete(f)),h||f.removeAttribute(n)}),Ys--,Ys||(Wr=new WeakMap,Wr=new WeakMap,zi=new WeakMap,Ui={})}},ev=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||e1(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),n1(r,o,n,"aria-hidden")):function(){return null}},xn=function(){return xn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},xn.apply(this,arguments)};function tv(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function r1(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var ha="right-scroll-bar-position",pa="width-before-scroll-bar",o1="with-scroll-bars-hidden",i1="--removed-body-scroll-bar-size";function a1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function s1(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function c1(e,t){return s1(t||null,function(n){return e.forEach(function(r){return a1(r,n)})})}function u1(e){return e}function l1(e,t){t===void 0&&(t=u1);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var d=a;a=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return o}function d1(e){e===void 0&&(e={});var t=l1(null);return t.options=xn({async:!0,ssr:!1},e),t}var nv=function(e){var t=e.sideCar,n=tv(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return $e.createElement(r,xn({},n))};nv.isSideCarExport=!0;function f1(e,t){return e.useMedium(t),nv}var rv=d1(),Ks=function(){},fs=$e.forwardRef(function(e,t){var n=$e.useRef(null),r=$e.useState({onScrollCapture:Ks,onWheelCapture:Ks,onTouchMoveCapture:Ks}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,h=e.noIsolation,b=e.inert,y=e.allowPinchZoom,T=e.as,S=T===void 0?"div":T,v=tv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=m,C=c1([n,t]),I=xn(xn({},v),o);return $e.createElement($e.Fragment,null,d&&$e.createElement(w,{sideCar:rv,removeScrollBar:u,shards:f,noIsolation:h,inert:b,setCallbacks:i,allowPinchZoom:!!y,lockRef:n}),a?$e.cloneElement($e.Children.only(s),xn(xn({},I),{ref:C})):$e.createElement(S,xn({},I,{className:c,ref:C}),s))});fs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fs.classNames={fullWidth:pa,zeroRight:ha};var sf,h1=function(){if(sf)return sf;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function p1(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=h1();return t&&e.setAttribute("nonce",t),e}function v1(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function m1(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var g1=function(){var e=0,t=null;return{add:function(n){e==0&&(t=p1())&&(v1(t,n),m1(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},y1=function(){var e=g1();return function(t,n){$e.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ov=function(){var e=y1(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},b1={left:0,top:0,right:0,gap:0},qs=function(e){return parseInt(e||"",10)||0},w1=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[qs(n),qs(r),qs(o)]},E1=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return b1;var t=w1(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},x1=ov(),_1=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
54
+ .`.concat(o1,` {
55
55
  overflow: hidden `).concat(r,`;
56
56
  padding-right: `).concat(s,"px ").concat(r,`;
57
57
  }
@@ -85,31 +85,31 @@ Check the top-level render call using <`+Q+">.")}return V}}function Ht(x,V){{if(
85
85
  }
86
86
 
87
87
  body {
88
- `).concat(o1,": ").concat(s,`px;
88
+ `).concat(i1,": ").concat(s,`px;
89
89
  }
90
- `)},_1=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=$e.useMemo(function(){return w1(o)},[o]);return $e.createElement(E1,{styles:x1(i,!t,o,n?"":"!important")})},Ic=!1;if(typeof window<"u")try{var Yi=Object.defineProperty({},"passive",{get:function(){return Ic=!0,!0}});window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch{Ic=!1}var zr=Ic?{passive:!1}:!1,S1=function(e){return e.tagName==="TEXTAREA"},ov=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!S1(e)&&n[t]==="visible")},C1=function(e){return ov(e,"overflowY")},$1=function(e){return ov(e,"overflowX")},cf=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=iv(e,n);if(r){var o=av(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},T1=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},I1=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},iv=function(e,t){return e==="v"?C1(t):$1(t)},av=function(e,t){return e==="v"?T1(t):I1(t)},R1=function(e,t){return e==="h"&&t==="rtl"?-1:1},O1=function(e,t,n,r,o){var i=R1(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,c=t.contains(s),u=!1,d=a>0,f=0,m=0;do{var h=av(e,s),b=h[0],y=h[1],T=h[2],S=y-T-i*b;(b||S)&&iv(e,s)&&(f+=S,m+=b),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(d&&(o&&f===0||!o&&a>f)||!d&&(o&&m===0||!o&&-a>m))&&(u=!0),u},Ki=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},uf=function(e){return[e.deltaX,e.deltaY]},lf=function(e){return e&&"current"in e?e.current:e},P1=function(e,t){return e[0]===t[0]&&e[1]===t[1]},A1=function(e){return`
90
+ `)},S1=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=$e.useMemo(function(){return E1(o)},[o]);return $e.createElement(x1,{styles:_1(i,!t,o,n?"":"!important")})},Ic=!1;if(typeof window<"u")try{var Yi=Object.defineProperty({},"passive",{get:function(){return Ic=!0,!0}});window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch{Ic=!1}var zr=Ic?{passive:!1}:!1,C1=function(e){return e.tagName==="TEXTAREA"},iv=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!C1(e)&&n[t]==="visible")},$1=function(e){return iv(e,"overflowY")},T1=function(e){return iv(e,"overflowX")},cf=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=av(e,n);if(r){var o=sv(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},I1=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},R1=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},av=function(e,t){return e==="v"?$1(t):T1(t)},sv=function(e,t){return e==="v"?I1(t):R1(t)},O1=function(e,t){return e==="h"&&t==="rtl"?-1:1},P1=function(e,t,n,r,o){var i=O1(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,c=t.contains(s),u=!1,d=a>0,f=0,m=0;do{var h=sv(e,s),b=h[0],y=h[1],T=h[2],S=y-T-i*b;(b||S)&&av(e,s)&&(f+=S,m+=b),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(d&&(o&&f===0||!o&&a>f)||!d&&(o&&m===0||!o&&-a>m))&&(u=!0),u},Ki=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},uf=function(e){return[e.deltaX,e.deltaY]},lf=function(e){return e&&"current"in e?e.current:e},A1=function(e,t){return e[0]===t[0]&&e[1]===t[1]},D1=function(e){return`
91
91
  .block-interactivity-`.concat(e,` {pointer-events: none;}
92
92
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
93
- `)},D1=0,Ur=[];function N1(e){var t=$e.useRef([]),n=$e.useRef([0,0]),r=$e.useRef(),o=$e.useState(D1++)[0],i=$e.useState(function(){return rv()})[0],a=$e.useRef(e);$e.useEffect(function(){a.current=e},[e]),$e.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=n1([e.lockRef.current],(e.shards||[]).map(lf),!0).filter(Boolean);return y.forEach(function(T){return T.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=$e.useCallback(function(y,T){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var S=Ki(y),v=n.current,w="deltaX"in y?y.deltaX:v[0]-S[0],C="deltaY"in y?y.deltaY:v[1]-S[1],I,D=y.target,P=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in y&&P==="h"&&D.type==="range")return!1;var F=cf(P,D);if(!F)return!0;if(F?I=P:(I=P==="v"?"h":"v",F=cf(P,D)),!F)return!1;if(!r.current&&"changedTouches"in y&&(w||C)&&(r.current=I),!I)return!0;var k=r.current||I;return O1(k,T,y,k==="h"?w:C,!0)},[]),c=$e.useCallback(function(y){var T=y;if(!(!Ur.length||Ur[Ur.length-1]!==i)){var S="deltaY"in T?uf(T):Ki(T),v=t.current.filter(function(I){return I.name===T.type&&I.target===T.target&&P1(I.delta,S)})[0];if(v&&v.should){T.cancelable&&T.preventDefault();return}if(!v){var w=(a.current.shards||[]).map(lf).filter(Boolean).filter(function(I){return I.contains(T.target)}),C=w.length>0?s(T,w[0]):!a.current.noIsolation;C&&T.cancelable&&T.preventDefault()}}},[]),u=$e.useCallback(function(y,T,S,v){var w={name:y,delta:T,target:S,should:v};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),d=$e.useCallback(function(y){n.current=Ki(y),r.current=void 0},[]),f=$e.useCallback(function(y){u(y.type,uf(y),y.target,s(y,e.lockRef.current))},[]),m=$e.useCallback(function(y){u(y.type,Ki(y),y.target,s(y,e.lockRef.current))},[]);$e.useEffect(function(){return Ur.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,zr),document.addEventListener("touchmove",c,zr),document.addEventListener("touchstart",d,zr),function(){Ur=Ur.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,zr),document.removeEventListener("touchmove",c,zr),document.removeEventListener("touchstart",d,zr)}},[]);var h=e.removeScrollBar,b=e.inert;return $e.createElement($e.Fragment,null,b?$e.createElement(i,{styles:A1(o)}):null,h?$e.createElement(_1,{gapMode:"margin"}):null)}const k1=d1(nv,N1);var sv=$e.forwardRef(function(e,t){return $e.createElement(fs,xn({},e,{ref:t,sideCar:k1}))});sv.classNames=fs.classNames;const cv=sv,M1=[" ","Enter","ArrowUp","ArrowDown"],j1=[" ","Enter"],hs="Select",[ps,vs,L1]=Ja(hs),[yo,EP]=mn(hs,[L1,us]),Ru=us(),[F1,Vr]=yo(hs),[V1,B1]=yo(hs),H1=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:m,required:h}=e,b=Ru(t),[y,T]=l.useState(null),[S,v]=l.useState(null),[w,C]=l.useState(!1),I=es(u),[D=!1,P]=Sn({prop:r,defaultProp:o,onChange:i}),[F,k]=Sn({prop:a,defaultProp:s,onChange:c}),H=l.useRef(null),R=y?!!y.closest("form"):!0,[E,p]=l.useState(new Set),$=Array.from(E).map(A=>A.props.value).join(";");return l.createElement(qp,b,l.createElement(F1,{required:h,scope:t,trigger:y,onTriggerChange:T,valueNode:S,onValueNodeChange:v,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:Xn(),value:F,onValueChange:k,open:D,onOpenChange:P,dir:I,triggerPointerDownPosRef:H,disabled:m},l.createElement(ps.Provider,{scope:t},l.createElement(V1,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(A=>{p(M=>new Set(M).add(A))},[]),onNativeOptionRemove:l.useCallback(A=>{p(M=>{const z=new Set(M);return z.delete(A),z})},[])},n)),R?l.createElement(dv,{key:$,"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:f,value:F,onChange:A=>k(A.target.value),disabled:m},F===void 0?l.createElement("option",{value:""}):null,Array.from(E)):null))},W1="SelectTrigger",z1=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Ru(n),a=Vr(W1,n),s=a.disabled||r,c=st(t,a.onTriggerChange),u=vs(n),[d,f,m]=fv(b=>{const y=u().filter(v=>!v.disabled),T=y.find(v=>v.value===a.value),S=hv(y,b,T);S!==void 0&&a.onValueChange(S.value)}),h=()=>{s||(a.onOpenChange(!0),m())};return l.createElement(Xp,ae({asChild:!0},i),l.createElement(Ke.button,ae({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":a.value===void 0?"":void 0},o,{ref:c,onClick:Ae(o.onClick,b=>{b.currentTarget.focus()}),onPointerDown:Ae(o.onPointerDown,b=>{const y=b.target;y.hasPointerCapture(b.pointerId)&&y.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(h(),a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)},b.preventDefault())}),onKeyDown:Ae(o.onKeyDown,b=>{const y=d.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&f(b.key),!(y&&b.key===" ")&&M1.includes(b.key)&&(h(),b.preventDefault())})})))}),U1="SelectValue",Y1=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,c=Vr(U1,n),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,f=st(t,c.onValueNodeChange);return Gt(()=>{u(d)},[u,d]),l.createElement(Ke.span,ae({},s,{ref:f,style:{pointerEvents:"none"}}),c.value===void 0&&a!==void 0?a:i)}),K1=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.createElement(Ke.span,ae({"aria-hidden":!0},o,{ref:t}),r||"▼")}),fo="SelectContent",q1=l.forwardRef((e,t)=>{const n=Vr(fo,e.__scopeSelect),[r,o]=l.useState();if(Gt(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?hn.createPortal(l.createElement(uv,{scope:e.__scopeSelect},l.createElement(ps.Slot,{scope:e.__scopeSelect},l.createElement("div",null,e.children))),i):null}return l.createElement(X1,ae({},e,{ref:t}))}),Yn=10,[uv,Br]=yo(fo),X1=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:b,hideWhenDetached:y,avoidCollisions:T,...S}=e,v=Vr(fo,n),[w,C]=l.useState(null),[I,D]=l.useState(null),P=st(t,W=>C(W)),[F,k]=l.useState(null),[H,R]=l.useState(null),E=vs(n),[p,$]=l.useState(!1),A=l.useRef(!1);l.useEffect(()=>{if(w)return Jp(w)},[w]),Pp();const M=l.useCallback(W=>{const[Y,...te]=E().map(ee=>ee.ref.current),[J]=te.slice(-1),ie=document.activeElement;for(const ee of W)if(ee===ie||(ee==null||ee.scrollIntoView({block:"nearest"}),ee===Y&&I&&(I.scrollTop=0),ee===J&&I&&(I.scrollTop=I.scrollHeight),ee==null||ee.focus(),document.activeElement!==ie))return},[E,I]),z=l.useCallback(()=>M([F,w]),[M,F,w]);l.useEffect(()=>{p&&z()},[p,z]);const{onOpenChange:U,triggerPointerDownPosRef:re}=v;l.useEffect(()=>{if(w){let W={x:0,y:0};const Y=J=>{var ie,ee,we,Te;W={x:Math.abs(Math.round(J.pageX)-((ie=(ee=re.current)===null||ee===void 0?void 0:ee.x)!==null&&ie!==void 0?ie:0)),y:Math.abs(Math.round(J.pageY)-((we=(Te=re.current)===null||Te===void 0?void 0:Te.y)!==null&&we!==void 0?we:0))}},te=J=>{W.x<=10&&W.y<=10?J.preventDefault():w.contains(J.target)||U(!1),document.removeEventListener("pointermove",Y),re.current=null};return re.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",te,{capture:!0})}}},[w,U,re]),l.useEffect(()=>{const W=()=>U(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[U]);const[B,L]=fv(W=>{const Y=E().filter(ie=>!ie.disabled),te=Y.find(ie=>ie.ref.current===document.activeElement),J=hv(Y,W,te);J&&setTimeout(()=>J.ref.current.focus())}),oe=l.useCallback((W,Y,te)=>{const J=!A.current&&!te;(v.value!==void 0&&v.value===Y||J)&&(k(W),J&&(A.current=!0))},[v.value]),G=l.useCallback(()=>w==null?void 0:w.focus(),[w]),K=l.useCallback((W,Y,te)=>{const J=!A.current&&!te;(v.value!==void 0&&v.value===Y||J)&&R(W)},[v.value]),Z=r==="popper"?df:G1,ce=Z===df?{side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:b,hideWhenDetached:y,avoidCollisions:T}:{};return l.createElement(uv,{scope:n,content:w,viewport:I,onViewportChange:D,itemRefCallback:oe,selectedItem:F,onItemLeave:G,itemTextRefCallback:K,focusSelectedItem:z,selectedItemText:H,position:r,isPositioned:p,searchRef:B},l.createElement(cv,{as:uo,allowPinchZoom:!0},l.createElement(Ap,{asChild:!0,trapped:v.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:Ae(o,W=>{var Y;(Y=v.trigger)===null||Y===void 0||Y.focus({preventScroll:!0}),W.preventDefault()})},l.createElement(is,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>v.onOpenChange(!1)},l.createElement(Z,ae({role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:W=>W.preventDefault()},S,ce,{onPlaced:()=>$(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Ae(S.onKeyDown,W=>{const Y=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!Y&&W.key.length===1&&L(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let J=E().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(W.key)&&(J=J.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const ie=W.target,ee=J.indexOf(ie);J=J.slice(ee+1)}setTimeout(()=>M(J)),W.preventDefault()}})}))))))}),G1=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Vr(fo,n),a=Br(fo,n),[s,c]=l.useState(null),[u,d]=l.useState(null),f=st(t,P=>d(P)),m=vs(n),h=l.useRef(!1),b=l.useRef(!0),{viewport:y,selectedItem:T,selectedItemText:S,focusSelectedItem:v}=a,w=l.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&y&&T&&S){const P=i.trigger.getBoundingClientRect(),F=u.getBoundingClientRect(),k=i.valueNode.getBoundingClientRect(),H=S.getBoundingClientRect();if(i.dir!=="rtl"){const ie=H.left-F.left,ee=k.left-ie,we=P.left-ee,Te=P.width+we,Oe=Math.max(Te,F.width),Ne=window.innerWidth-Yn,Re=Wd(ee,[Yn,Ne-Oe]);s.style.minWidth=Te+"px",s.style.left=Re+"px"}else{const ie=F.right-H.right,ee=window.innerWidth-k.right-ie,we=window.innerWidth-P.right-ee,Te=P.width+we,Oe=Math.max(Te,F.width),Ne=window.innerWidth-Yn,Re=Wd(ee,[Yn,Ne-Oe]);s.style.minWidth=Te+"px",s.style.right=Re+"px"}const R=m(),E=window.innerHeight-Yn*2,p=y.scrollHeight,$=window.getComputedStyle(u),A=parseInt($.borderTopWidth,10),M=parseInt($.paddingTop,10),z=parseInt($.borderBottomWidth,10),U=parseInt($.paddingBottom,10),re=A+M+p+U+z,B=Math.min(T.offsetHeight*5,re),L=window.getComputedStyle(y),oe=parseInt(L.paddingTop,10),G=parseInt(L.paddingBottom,10),K=P.top+P.height/2-Yn,Z=E-K,ce=T.offsetHeight/2,W=T.offsetTop+ce,Y=A+M+W,te=re-Y;if(Y<=K){const ie=T===R[R.length-1].ref.current;s.style.bottom="0px";const ee=u.clientHeight-y.offsetTop-y.offsetHeight,we=Math.max(Z,ce+(ie?G:0)+ee+z),Te=Y+we;s.style.height=Te+"px"}else{const ie=T===R[0].ref.current;s.style.top="0px";const we=Math.max(K,A+y.offsetTop+(ie?oe:0)+ce)+te;s.style.height=we+"px",y.scrollTop=Y-K+y.offsetTop}s.style.margin=`${Yn}px 0`,s.style.minHeight=B+"px",s.style.maxHeight=E+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[m,i.trigger,i.valueNode,s,u,y,T,S,i.dir,r]);Gt(()=>w(),[w]);const[C,I]=l.useState();Gt(()=>{u&&I(window.getComputedStyle(u).zIndex)},[u]);const D=l.useCallback(P=>{P&&b.current===!0&&(w(),v==null||v(),b.current=!1)},[w,v]);return l.createElement(Z1,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:D},l.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C}},l.createElement(Ke.div,ae({},o,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),df=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Yn,...i}=e,a=Ru(n);return l.createElement(Gp,ae({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[Z1,Ou]=yo(fo,{}),ff="SelectViewport",Q1=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Br(ff,n),i=Ou(ff,n),a=st(t,o.onViewportChange),s=l.useRef(0);return l.createElement(l.Fragment,null,l.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),l.createElement(ps.Slot,{scope:n},l.createElement(Ke.div,ae({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Ae(r.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=i;if(f!=null&&f.current&&d){const m=Math.abs(s.current-u.scrollTop);if(m>0){const h=window.innerHeight-Yn*2,b=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),T=Math.max(b,y);if(T<h){const S=T+m,v=Math.min(h,S),w=S-v;d.style.height=v+"px",d.style.bottom==="0px"&&(u.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),J1="SelectGroup";yo(J1);const Rc="SelectItem",[eE,tE]=yo(Rc),nE=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Vr(Rc,n),c=Br(Rc,n),u=s.value===r,[d,f]=l.useState(i??""),[m,h]=l.useState(!1),b=st(t,S=>{var v;return(v=c.itemRefCallback)===null||v===void 0?void 0:v.call(c,S,r,o)}),y=Xn(),T=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};return l.createElement(eE,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:l.useCallback(S=>{f(v=>{var w;return v||((w=S==null?void 0:S.textContent)!==null&&w!==void 0?w:"").trim()})},[])},l.createElement(ps.ItemSlot,{scope:n,value:r,disabled:o,textValue:d},l.createElement(Ke.div,ae({role:"option","aria-labelledby":y,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:b,onFocus:Ae(a.onFocus,()=>h(!0)),onBlur:Ae(a.onBlur,()=>h(!1)),onPointerUp:Ae(a.onPointerUp,T),onPointerMove:Ae(a.onPointerMove,S=>{if(o){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}else S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ae(a.onPointerLeave,S=>{if(S.currentTarget===document.activeElement){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}}),onKeyDown:Ae(a.onKeyDown,S=>{var v;((v=c.searchRef)===null||v===void 0?void 0:v.current)!==""&&S.key===" "||(j1.includes(S.key)&&T(),S.key===" "&&S.preventDefault())})}))))}),qi="SelectItemText",rE=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Vr(qi,n),s=Br(qi,n),c=tE(qi,n),u=B1(qi,n),[d,f]=l.useState(null),m=st(t,S=>f(S),c.onItemTextChange,S=>{var v;return(v=s.itemTextRefCallback)===null||v===void 0?void 0:v.call(s,S,c.value,c.disabled)}),h=d==null?void 0:d.textContent,b=l.useMemo(()=>l.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},h),[c.disabled,c.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:T}=u;return Gt(()=>(y(b),()=>T(b)),[y,T,b]),l.createElement(l.Fragment,null,l.createElement(Ke.span,ae({id:c.textId},i,{ref:m})),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?hn.createPortal(i.children,a.valueNode):null)}),hf="SelectScrollUpButton",oE=l.forwardRef((e,t)=>{const n=Br(hf,e.__scopeSelect),r=Ou(hf,e.__scopeSelect),[o,i]=l.useState(!1),a=st(t,r.onScrollButtonChange);return Gt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=s.scrollTop>0;i(u)};const s=n.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?l.createElement(lv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}})):null}),pf="SelectScrollDownButton",iE=l.forwardRef((e,t)=>{const n=Br(pf,e.__scopeSelect),r=Ou(pf,e.__scopeSelect),[o,i]=l.useState(!1),a=st(t,r.onScrollButtonChange);return Gt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=s.scrollHeight-s.clientHeight,d=Math.ceil(s.scrollTop)<u;i(d)};const s=n.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?l.createElement(lv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}})):null}),lv=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Br("SelectScrollButton",n),a=l.useRef(null),s=vs(n),c=l.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),Gt(()=>{var u;const d=s().find(f=>f.ref.current===document.activeElement);d==null||(u=d.ref.current)===null||u===void 0||u.scrollIntoView({block:"nearest"})},[s]),l.createElement(Ke.div,ae({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ae(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ae(o.onPointerMove,()=>{var u;(u=i.onItemLeave)===null||u===void 0||u.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ae(o.onPointerLeave,()=>{c()})}))}),dv=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=l.useRef(null),i=st(t,o),a=ls(n);return l.useEffect(()=>{const s=o.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&d){const f=new Event("change",{bubbles:!0});d.call(s,n),s.dispatchEvent(f)}},[a,n]),l.createElement(ds,{asChild:!0},l.createElement("select",ae({},r,{ref:i,defaultValue:n})))});dv.displayName="BubbleSelect";function fv(e){const t=cn(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(a=>{const s=n.current+a;t(s),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),i=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function hv(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=aE(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function aE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const sE=H1,cE=z1,uE=Y1,lE=K1,dE=q1,fE=Q1,hE=nE,pE=rE,vE=oE,mE=iE;var gE=wt({defaultClassName:"_1639370",variantClassNames:{place:{left:"_1639371",right:"_1639372"},state:{default:"_1639373",error:"_1639374",valid:"_1639375",disabled:"_1639376"}},defaultVariants:{state:"default"},compoundVariants:[]});var yE=wt({defaultClassName:"qormpv0",variantClassNames:{isDisabled:{true:"qormpv1"}},defaultVariants:{isDisabled:!1},compoundVariants:[]});var bE=wt({defaultClassName:"_1kg30951",variantClassNames:{state:{default:"_1kg30952",error:"_1kg30953",valid:"_1kg30954",disabled:"_1kg30955"}},defaultVariants:{state:"default"},compoundVariants:[]}),wE="_1kg30950";var EE="ldkv8w2",xE="ldkv8w1",_E="ldkv8w0",SE="ldkv8w3";var CE="yihd6a0",$E=wt({defaultClassName:"yihd6a6",variantClassNames:{state:{default:"yihd6a7 yihd6a1",error:"yihd6a8 yihd6a2",valid:"yihd6a9 yihd6a3",disabled:"yihd6aa yihd6a4"},isTextarea:{true:"yihd6ab"}},defaultVariants:{state:"default",isTextarea:!1},compoundVariants:[[{isTextarea:!0},"yihd6a5"]]}),TE="_18kp58y0";const Oc=({formState:e,place:t,children:n})=>j.jsx("div",{className:Pe(gE({state:e,place:t})),children:j.jsx(sn,{textStyle:"body2",children:n})});Oc.displayName="Addon";const Pu=({isError:e,isDisabled:t,isValid:n})=>t?"disabled":e?"error":n?"valid":"default",bo=({children:e,helperTextLeft:t,helperTextRight:n,addonRight:r,addonLeft:o,elementLeft:i,elementRight:a,errorMessage:s,isError:c,isDisabled:u,isValid:d,className:f,inputAreaClassName:m,onClick:h})=>{const b=!!t,y=!!n,T=!b&&y,S=b||y,v=!!o,w=!!r,C=!!i,I=!!a,D=!!s,P=Pu({isError:c,isDisabled:u,isValid:d}),F=l.useCallback(()=>P==="disabled"?"$blackTypoMedium":P==="error"?"$redAccent1":P==="valid"?"$greenAccent1":"$blackTypoMedium",[P]),k=()=>c&&D?j.jsx(sn,{textStyle:"caption",color:F(),children:s}):b&&typeof t=="string"?j.jsx(sn,{textStyle:"caption",children:t}):b?t:null;return j.jsxs("div",{"data-test-id":"CT_Field_Container",className:Pe(wE),onClick:h,children:[j.jsx("div",{className:Pe(bE({state:P}),f),children:j.jsxs(Yt,{justifyContent:"space-between",alignItems:"stretch",wrap:"nowrap",children:[v&&j.jsx(Oc,{formState:P,place:"left",children:o}),C&&i,j.jsx("div",{className:Pe(CE,m),children:e}),I&&a,w&&j.jsx(Oc,{formState:P,place:"right",children:r})]})}),(S||D)&&j.jsxs(Yt,{justifyContent:T?"flex-end":"space-between",alignItems:"center",mt:"$6",children:[k(),y&&typeof n=="string"?j.jsx(sn,{textStyle:"caption",children:n}):n]})]})};bo.displayName="Field";bo.defaultProps={helperTextLeft:void 0,helperTextRight:void 0,addonRight:void 0,addonLeft:void 0,elementRight:void 0,elementLeft:void 0,errorMessage:void 0,isError:void 0,isDisabled:void 0,isValid:void 0,className:void 0,inputAreaClassName:void 0,onClick:void 0};function an(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Pc(e,t){return Pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Pc(e,t)}function Au(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Pc(e,t)}var Ac={exports:{}},Xi={exports:{}},ft={};/** @license React v16.13.1
93
+ `)},N1=0,Ur=[];function k1(e){var t=$e.useRef([]),n=$e.useRef([0,0]),r=$e.useRef(),o=$e.useState(N1++)[0],i=$e.useState(function(){return ov()})[0],a=$e.useRef(e);$e.useEffect(function(){a.current=e},[e]),$e.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=r1([e.lockRef.current],(e.shards||[]).map(lf),!0).filter(Boolean);return y.forEach(function(T){return T.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=$e.useCallback(function(y,T){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var S=Ki(y),v=n.current,w="deltaX"in y?y.deltaX:v[0]-S[0],C="deltaY"in y?y.deltaY:v[1]-S[1],I,D=y.target,P=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in y&&P==="h"&&D.type==="range")return!1;var F=cf(P,D);if(!F)return!0;if(F?I=P:(I=P==="v"?"h":"v",F=cf(P,D)),!F)return!1;if(!r.current&&"changedTouches"in y&&(w||C)&&(r.current=I),!I)return!0;var k=r.current||I;return P1(k,T,y,k==="h"?w:C,!0)},[]),c=$e.useCallback(function(y){var T=y;if(!(!Ur.length||Ur[Ur.length-1]!==i)){var S="deltaY"in T?uf(T):Ki(T),v=t.current.filter(function(I){return I.name===T.type&&I.target===T.target&&A1(I.delta,S)})[0];if(v&&v.should){T.cancelable&&T.preventDefault();return}if(!v){var w=(a.current.shards||[]).map(lf).filter(Boolean).filter(function(I){return I.contains(T.target)}),C=w.length>0?s(T,w[0]):!a.current.noIsolation;C&&T.cancelable&&T.preventDefault()}}},[]),u=$e.useCallback(function(y,T,S,v){var w={name:y,delta:T,target:S,should:v};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),d=$e.useCallback(function(y){n.current=Ki(y),r.current=void 0},[]),f=$e.useCallback(function(y){u(y.type,uf(y),y.target,s(y,e.lockRef.current))},[]),m=$e.useCallback(function(y){u(y.type,Ki(y),y.target,s(y,e.lockRef.current))},[]);$e.useEffect(function(){return Ur.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,zr),document.addEventListener("touchmove",c,zr),document.addEventListener("touchstart",d,zr),function(){Ur=Ur.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,zr),document.removeEventListener("touchmove",c,zr),document.removeEventListener("touchstart",d,zr)}},[]);var h=e.removeScrollBar,b=e.inert;return $e.createElement($e.Fragment,null,b?$e.createElement(i,{styles:D1(o)}):null,h?$e.createElement(S1,{gapMode:"margin"}):null)}const M1=f1(rv,k1);var cv=$e.forwardRef(function(e,t){return $e.createElement(fs,xn({},e,{ref:t,sideCar:M1}))});cv.classNames=fs.classNames;const uv=cv,j1=[" ","Enter","ArrowUp","ArrowDown"],L1=[" ","Enter"],hs="Select",[ps,vs,F1]=Ja(hs),[yo,EP]=mn(hs,[F1,us]),Ru=us(),[V1,Vr]=yo(hs),[B1,H1]=yo(hs),W1=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:m,required:h}=e,b=Ru(t),[y,T]=l.useState(null),[S,v]=l.useState(null),[w,C]=l.useState(!1),I=es(u),[D=!1,P]=Sn({prop:r,defaultProp:o,onChange:i}),[F,k]=Sn({prop:a,defaultProp:s,onChange:c}),H=l.useRef(null),R=y?!!y.closest("form"):!0,[E,p]=l.useState(new Set),$=Array.from(E).map(A=>A.props.value).join(";");return l.createElement(Xp,b,l.createElement(V1,{required:h,scope:t,trigger:y,onTriggerChange:T,valueNode:S,onValueNodeChange:v,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:Xn(),value:F,onValueChange:k,open:D,onOpenChange:P,dir:I,triggerPointerDownPosRef:H,disabled:m},l.createElement(ps.Provider,{scope:t},l.createElement(B1,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(A=>{p(M=>new Set(M).add(A))},[]),onNativeOptionRemove:l.useCallback(A=>{p(M=>{const z=new Set(M);return z.delete(A),z})},[])},n)),R?l.createElement(fv,{key:$,"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:f,value:F,onChange:A=>k(A.target.value),disabled:m},F===void 0?l.createElement("option",{value:""}):null,Array.from(E)):null))},z1="SelectTrigger",U1=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Ru(n),a=Vr(z1,n),s=a.disabled||r,c=st(t,a.onTriggerChange),u=vs(n),[d,f,m]=hv(b=>{const y=u().filter(v=>!v.disabled),T=y.find(v=>v.value===a.value),S=pv(y,b,T);S!==void 0&&a.onValueChange(S.value)}),h=()=>{s||(a.onOpenChange(!0),m())};return l.createElement(Gp,ae({asChild:!0},i),l.createElement(Ke.button,ae({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":a.value===void 0?"":void 0},o,{ref:c,onClick:Ae(o.onClick,b=>{b.currentTarget.focus()}),onPointerDown:Ae(o.onPointerDown,b=>{const y=b.target;y.hasPointerCapture(b.pointerId)&&y.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(h(),a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)},b.preventDefault())}),onKeyDown:Ae(o.onKeyDown,b=>{const y=d.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&f(b.key),!(y&&b.key===" ")&&j1.includes(b.key)&&(h(),b.preventDefault())})})))}),Y1="SelectValue",K1=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,c=Vr(Y1,n),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,f=st(t,c.onValueNodeChange);return Gt(()=>{u(d)},[u,d]),l.createElement(Ke.span,ae({},s,{ref:f,style:{pointerEvents:"none"}}),c.value===void 0&&a!==void 0?a:i)}),q1=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return l.createElement(Ke.span,ae({"aria-hidden":!0},o,{ref:t}),r||"▼")}),fo="SelectContent",X1=l.forwardRef((e,t)=>{const n=Vr(fo,e.__scopeSelect),[r,o]=l.useState();if(Gt(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?hn.createPortal(l.createElement(lv,{scope:e.__scopeSelect},l.createElement(ps.Slot,{scope:e.__scopeSelect},l.createElement("div",null,e.children))),i):null}return l.createElement(G1,ae({},e,{ref:t}))}),Yn=10,[lv,Br]=yo(fo),G1=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:b,hideWhenDetached:y,avoidCollisions:T,...S}=e,v=Vr(fo,n),[w,C]=l.useState(null),[I,D]=l.useState(null),P=st(t,W=>C(W)),[F,k]=l.useState(null),[H,R]=l.useState(null),E=vs(n),[p,$]=l.useState(!1),A=l.useRef(!1);l.useEffect(()=>{if(w)return ev(w)},[w]),Ap();const M=l.useCallback(W=>{const[Y,...te]=E().map(ee=>ee.ref.current),[J]=te.slice(-1),ie=document.activeElement;for(const ee of W)if(ee===ie||(ee==null||ee.scrollIntoView({block:"nearest"}),ee===Y&&I&&(I.scrollTop=0),ee===J&&I&&(I.scrollTop=I.scrollHeight),ee==null||ee.focus(),document.activeElement!==ie))return},[E,I]),z=l.useCallback(()=>M([F,w]),[M,F,w]);l.useEffect(()=>{p&&z()},[p,z]);const{onOpenChange:U,triggerPointerDownPosRef:re}=v;l.useEffect(()=>{if(w){let W={x:0,y:0};const Y=J=>{var ie,ee,we,Te;W={x:Math.abs(Math.round(J.pageX)-((ie=(ee=re.current)===null||ee===void 0?void 0:ee.x)!==null&&ie!==void 0?ie:0)),y:Math.abs(Math.round(J.pageY)-((we=(Te=re.current)===null||Te===void 0?void 0:Te.y)!==null&&we!==void 0?we:0))}},te=J=>{W.x<=10&&W.y<=10?J.preventDefault():w.contains(J.target)||U(!1),document.removeEventListener("pointermove",Y),re.current=null};return re.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",te,{capture:!0})}}},[w,U,re]),l.useEffect(()=>{const W=()=>U(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[U]);const[B,L]=hv(W=>{const Y=E().filter(ie=>!ie.disabled),te=Y.find(ie=>ie.ref.current===document.activeElement),J=pv(Y,W,te);J&&setTimeout(()=>J.ref.current.focus())}),oe=l.useCallback((W,Y,te)=>{const J=!A.current&&!te;(v.value!==void 0&&v.value===Y||J)&&(k(W),J&&(A.current=!0))},[v.value]),G=l.useCallback(()=>w==null?void 0:w.focus(),[w]),K=l.useCallback((W,Y,te)=>{const J=!A.current&&!te;(v.value!==void 0&&v.value===Y||J)&&R(W)},[v.value]),Z=r==="popper"?df:Z1,ce=Z===df?{side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:b,hideWhenDetached:y,avoidCollisions:T}:{};return l.createElement(lv,{scope:n,content:w,viewport:I,onViewportChange:D,itemRefCallback:oe,selectedItem:F,onItemLeave:G,itemTextRefCallback:K,focusSelectedItem:z,selectedItemText:H,position:r,isPositioned:p,searchRef:B},l.createElement(uv,{as:uo,allowPinchZoom:!0},l.createElement(Dp,{asChild:!0,trapped:v.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:Ae(o,W=>{var Y;(Y=v.trigger)===null||Y===void 0||Y.focus({preventScroll:!0}),W.preventDefault()})},l.createElement(is,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>v.onOpenChange(!1)},l.createElement(Z,ae({role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:W=>W.preventDefault()},S,ce,{onPlaced:()=>$(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Ae(S.onKeyDown,W=>{const Y=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!Y&&W.key.length===1&&L(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let J=E().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(W.key)&&(J=J.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const ie=W.target,ee=J.indexOf(ie);J=J.slice(ee+1)}setTimeout(()=>M(J)),W.preventDefault()}})}))))))}),Z1=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Vr(fo,n),a=Br(fo,n),[s,c]=l.useState(null),[u,d]=l.useState(null),f=st(t,P=>d(P)),m=vs(n),h=l.useRef(!1),b=l.useRef(!0),{viewport:y,selectedItem:T,selectedItemText:S,focusSelectedItem:v}=a,w=l.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&y&&T&&S){const P=i.trigger.getBoundingClientRect(),F=u.getBoundingClientRect(),k=i.valueNode.getBoundingClientRect(),H=S.getBoundingClientRect();if(i.dir!=="rtl"){const ie=H.left-F.left,ee=k.left-ie,we=P.left-ee,Te=P.width+we,Oe=Math.max(Te,F.width),Ne=window.innerWidth-Yn,Re=Wd(ee,[Yn,Ne-Oe]);s.style.minWidth=Te+"px",s.style.left=Re+"px"}else{const ie=F.right-H.right,ee=window.innerWidth-k.right-ie,we=window.innerWidth-P.right-ee,Te=P.width+we,Oe=Math.max(Te,F.width),Ne=window.innerWidth-Yn,Re=Wd(ee,[Yn,Ne-Oe]);s.style.minWidth=Te+"px",s.style.right=Re+"px"}const R=m(),E=window.innerHeight-Yn*2,p=y.scrollHeight,$=window.getComputedStyle(u),A=parseInt($.borderTopWidth,10),M=parseInt($.paddingTop,10),z=parseInt($.borderBottomWidth,10),U=parseInt($.paddingBottom,10),re=A+M+p+U+z,B=Math.min(T.offsetHeight*5,re),L=window.getComputedStyle(y),oe=parseInt(L.paddingTop,10),G=parseInt(L.paddingBottom,10),K=P.top+P.height/2-Yn,Z=E-K,ce=T.offsetHeight/2,W=T.offsetTop+ce,Y=A+M+W,te=re-Y;if(Y<=K){const ie=T===R[R.length-1].ref.current;s.style.bottom="0px";const ee=u.clientHeight-y.offsetTop-y.offsetHeight,we=Math.max(Z,ce+(ie?G:0)+ee+z),Te=Y+we;s.style.height=Te+"px"}else{const ie=T===R[0].ref.current;s.style.top="0px";const we=Math.max(K,A+y.offsetTop+(ie?oe:0)+ce)+te;s.style.height=we+"px",y.scrollTop=Y-K+y.offsetTop}s.style.margin=`${Yn}px 0`,s.style.minHeight=B+"px",s.style.maxHeight=E+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[m,i.trigger,i.valueNode,s,u,y,T,S,i.dir,r]);Gt(()=>w(),[w]);const[C,I]=l.useState();Gt(()=>{u&&I(window.getComputedStyle(u).zIndex)},[u]);const D=l.useCallback(P=>{P&&b.current===!0&&(w(),v==null||v(),b.current=!1)},[w,v]);return l.createElement(Q1,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:D},l.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C}},l.createElement(Ke.div,ae({},o,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),df=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Yn,...i}=e,a=Ru(n);return l.createElement(Zp,ae({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[Q1,Ou]=yo(fo,{}),ff="SelectViewport",J1=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Br(ff,n),i=Ou(ff,n),a=st(t,o.onViewportChange),s=l.useRef(0);return l.createElement(l.Fragment,null,l.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),l.createElement(ps.Slot,{scope:n},l.createElement(Ke.div,ae({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Ae(r.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=i;if(f!=null&&f.current&&d){const m=Math.abs(s.current-u.scrollTop);if(m>0){const h=window.innerHeight-Yn*2,b=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),T=Math.max(b,y);if(T<h){const S=T+m,v=Math.min(h,S),w=S-v;d.style.height=v+"px",d.style.bottom==="0px"&&(u.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),eE="SelectGroup";yo(eE);const Rc="SelectItem",[tE,nE]=yo(Rc),rE=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Vr(Rc,n),c=Br(Rc,n),u=s.value===r,[d,f]=l.useState(i??""),[m,h]=l.useState(!1),b=st(t,S=>{var v;return(v=c.itemRefCallback)===null||v===void 0?void 0:v.call(c,S,r,o)}),y=Xn(),T=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};return l.createElement(tE,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:l.useCallback(S=>{f(v=>{var w;return v||((w=S==null?void 0:S.textContent)!==null&&w!==void 0?w:"").trim()})},[])},l.createElement(ps.ItemSlot,{scope:n,value:r,disabled:o,textValue:d},l.createElement(Ke.div,ae({role:"option","aria-labelledby":y,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:b,onFocus:Ae(a.onFocus,()=>h(!0)),onBlur:Ae(a.onBlur,()=>h(!1)),onPointerUp:Ae(a.onPointerUp,T),onPointerMove:Ae(a.onPointerMove,S=>{if(o){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}else S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ae(a.onPointerLeave,S=>{if(S.currentTarget===document.activeElement){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}}),onKeyDown:Ae(a.onKeyDown,S=>{var v;((v=c.searchRef)===null||v===void 0?void 0:v.current)!==""&&S.key===" "||(L1.includes(S.key)&&T(),S.key===" "&&S.preventDefault())})}))))}),qi="SelectItemText",oE=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Vr(qi,n),s=Br(qi,n),c=nE(qi,n),u=H1(qi,n),[d,f]=l.useState(null),m=st(t,S=>f(S),c.onItemTextChange,S=>{var v;return(v=s.itemTextRefCallback)===null||v===void 0?void 0:v.call(s,S,c.value,c.disabled)}),h=d==null?void 0:d.textContent,b=l.useMemo(()=>l.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},h),[c.disabled,c.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:T}=u;return Gt(()=>(y(b),()=>T(b)),[y,T,b]),l.createElement(l.Fragment,null,l.createElement(Ke.span,ae({id:c.textId},i,{ref:m})),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?hn.createPortal(i.children,a.valueNode):null)}),hf="SelectScrollUpButton",iE=l.forwardRef((e,t)=>{const n=Br(hf,e.__scopeSelect),r=Ou(hf,e.__scopeSelect),[o,i]=l.useState(!1),a=st(t,r.onScrollButtonChange);return Gt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=s.scrollTop>0;i(u)};const s=n.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?l.createElement(dv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}})):null}),pf="SelectScrollDownButton",aE=l.forwardRef((e,t)=>{const n=Br(pf,e.__scopeSelect),r=Ou(pf,e.__scopeSelect),[o,i]=l.useState(!1),a=st(t,r.onScrollButtonChange);return Gt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=s.scrollHeight-s.clientHeight,d=Math.ceil(s.scrollTop)<u;i(d)};const s=n.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?l.createElement(dv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}})):null}),dv=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Br("SelectScrollButton",n),a=l.useRef(null),s=vs(n),c=l.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),Gt(()=>{var u;const d=s().find(f=>f.ref.current===document.activeElement);d==null||(u=d.ref.current)===null||u===void 0||u.scrollIntoView({block:"nearest"})},[s]),l.createElement(Ke.div,ae({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ae(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ae(o.onPointerMove,()=>{var u;(u=i.onItemLeave)===null||u===void 0||u.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ae(o.onPointerLeave,()=>{c()})}))}),fv=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=l.useRef(null),i=st(t,o),a=ls(n);return l.useEffect(()=>{const s=o.current,c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&d){const f=new Event("change",{bubbles:!0});d.call(s,n),s.dispatchEvent(f)}},[a,n]),l.createElement(ds,{asChild:!0},l.createElement("select",ae({},r,{ref:i,defaultValue:n})))});fv.displayName="BubbleSelect";function hv(e){const t=cn(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(a=>{const s=n.current+a;t(s),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),i=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function pv(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=sE(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function sE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const cE=W1,uE=U1,lE=K1,dE=q1,fE=X1,hE=J1,pE=rE,vE=oE,mE=iE,gE=aE;var yE=wt({defaultClassName:"_1639370",variantClassNames:{place:{left:"_1639371",right:"_1639372"},state:{default:"_1639373",error:"_1639374",valid:"_1639375",disabled:"_1639376"}},defaultVariants:{state:"default"},compoundVariants:[]});var bE=wt({defaultClassName:"qormpv0",variantClassNames:{isDisabled:{true:"qormpv1"}},defaultVariants:{isDisabled:!1},compoundVariants:[]});var wE=wt({defaultClassName:"_1kg30951",variantClassNames:{state:{default:"_1kg30952",error:"_1kg30953",valid:"_1kg30954",disabled:"_1kg30955"}},defaultVariants:{state:"default"},compoundVariants:[]}),EE="_1kg30950";var xE="ldkv8w2",_E="ldkv8w1",SE="ldkv8w0",CE="ldkv8w3";var $E="yihd6a0",TE=wt({defaultClassName:"yihd6a6",variantClassNames:{state:{default:"yihd6a7 yihd6a1",error:"yihd6a8 yihd6a2",valid:"yihd6a9 yihd6a3",disabled:"yihd6aa yihd6a4"},isTextarea:{true:"yihd6ab"}},defaultVariants:{state:"default",isTextarea:!1},compoundVariants:[[{isTextarea:!0},"yihd6a5"]]}),vf="_18kp58y0";const Oc=({formState:e,place:t,children:n})=>j.jsx("div",{className:Pe(yE({state:e,place:t})),children:j.jsx(sn,{textStyle:"body2",children:n})});Oc.displayName="Addon";const Pu=({isError:e,isDisabled:t,isValid:n})=>t?"disabled":e?"error":n?"valid":"default",bo=({children:e,helperTextLeft:t,helperTextRight:n,addonRight:r,addonLeft:o,elementLeft:i,elementRight:a,errorMessage:s,isError:c,isDisabled:u,isValid:d,className:f,inputAreaClassName:m,onClick:h})=>{const b=!!t,y=!!n,T=!b&&y,S=b||y,v=!!o,w=!!r,C=!!i,I=!!a,D=!!s,P=Pu({isError:c,isDisabled:u,isValid:d}),F=l.useCallback(()=>P==="disabled"?"$blackTypoMedium":P==="error"?"$redAccent1":P==="valid"?"$greenAccent1":"$blackTypoMedium",[P]),k=()=>c&&D?j.jsx(sn,{textStyle:"caption",color:F(),children:s}):b&&typeof t=="string"?j.jsx(sn,{textStyle:"caption",children:t}):b?t:null;return j.jsxs("div",{"data-test-id":"CT_Field_Container",className:Pe(EE),onClick:h,children:[j.jsx("div",{className:Pe(wE({state:P}),f),children:j.jsxs(Yt,{justifyContent:"space-between",alignItems:"stretch",wrap:"nowrap",children:[v&&j.jsx(Oc,{formState:P,place:"left",children:o}),C&&i,j.jsx("div",{className:Pe($E,m),children:e}),I&&a,w&&j.jsx(Oc,{formState:P,place:"right",children:r})]})}),(S||D)&&j.jsxs(Yt,{justifyContent:T?"flex-end":"space-between",alignItems:"center",mt:"$6",children:[k(),y&&typeof n=="string"?j.jsx(sn,{textStyle:"caption",children:n}):n]})]})};bo.displayName="Field";bo.defaultProps={helperTextLeft:void 0,helperTextRight:void 0,addonRight:void 0,addonLeft:void 0,elementRight:void 0,elementLeft:void 0,errorMessage:void 0,isError:void 0,isDisabled:void 0,isValid:void 0,className:void 0,inputAreaClassName:void 0,onClick:void 0};function an(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Pc(e,t){return Pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Pc(e,t)}function Au(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Pc(e,t)}var Ac={exports:{}},Xi={exports:{}},ft={};/** @license React v16.13.1
94
94
  * react-is.production.min.js
95
95
  *
96
96
  * Copyright (c) Facebook, Inc. and its affiliates.
97
97
  *
98
98
  * This source code is licensed under the MIT license found in the
99
99
  * LICENSE file in the root directory of this source tree.
100
- */var vf;function IE(){if(vf)return ft;vf=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function w(I){if(typeof I=="object"&&I!==null){var D=I.$$typeof;switch(D){case t:switch(I=I.type,I){case c:case u:case r:case i:case o:case f:return I;default:switch(I=I&&I.$$typeof,I){case s:case d:case b:case h:case a:return I;default:return D}}case n:return D}}}function C(I){return w(I)===u}return ft.AsyncMode=c,ft.ConcurrentMode=u,ft.ContextConsumer=s,ft.ContextProvider=a,ft.Element=t,ft.ForwardRef=d,ft.Fragment=r,ft.Lazy=b,ft.Memo=h,ft.Portal=n,ft.Profiler=i,ft.StrictMode=o,ft.Suspense=f,ft.isAsyncMode=function(I){return C(I)||w(I)===c},ft.isConcurrentMode=C,ft.isContextConsumer=function(I){return w(I)===s},ft.isContextProvider=function(I){return w(I)===a},ft.isElement=function(I){return typeof I=="object"&&I!==null&&I.$$typeof===t},ft.isForwardRef=function(I){return w(I)===d},ft.isFragment=function(I){return w(I)===r},ft.isLazy=function(I){return w(I)===b},ft.isMemo=function(I){return w(I)===h},ft.isPortal=function(I){return w(I)===n},ft.isProfiler=function(I){return w(I)===i},ft.isStrictMode=function(I){return w(I)===o},ft.isSuspense=function(I){return w(I)===f},ft.isValidElementType=function(I){return typeof I=="string"||typeof I=="function"||I===r||I===u||I===i||I===o||I===f||I===m||typeof I=="object"&&I!==null&&(I.$$typeof===b||I.$$typeof===h||I.$$typeof===a||I.$$typeof===s||I.$$typeof===d||I.$$typeof===T||I.$$typeof===S||I.$$typeof===v||I.$$typeof===y)},ft.typeOf=w,ft}var ht={};/** @license React v16.13.1
100
+ */var mf;function IE(){if(mf)return ft;mf=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function w(I){if(typeof I=="object"&&I!==null){var D=I.$$typeof;switch(D){case t:switch(I=I.type,I){case c:case u:case r:case i:case o:case f:return I;default:switch(I=I&&I.$$typeof,I){case s:case d:case b:case h:case a:return I;default:return D}}case n:return D}}}function C(I){return w(I)===u}return ft.AsyncMode=c,ft.ConcurrentMode=u,ft.ContextConsumer=s,ft.ContextProvider=a,ft.Element=t,ft.ForwardRef=d,ft.Fragment=r,ft.Lazy=b,ft.Memo=h,ft.Portal=n,ft.Profiler=i,ft.StrictMode=o,ft.Suspense=f,ft.isAsyncMode=function(I){return C(I)||w(I)===c},ft.isConcurrentMode=C,ft.isContextConsumer=function(I){return w(I)===s},ft.isContextProvider=function(I){return w(I)===a},ft.isElement=function(I){return typeof I=="object"&&I!==null&&I.$$typeof===t},ft.isForwardRef=function(I){return w(I)===d},ft.isFragment=function(I){return w(I)===r},ft.isLazy=function(I){return w(I)===b},ft.isMemo=function(I){return w(I)===h},ft.isPortal=function(I){return w(I)===n},ft.isProfiler=function(I){return w(I)===i},ft.isStrictMode=function(I){return w(I)===o},ft.isSuspense=function(I){return w(I)===f},ft.isValidElementType=function(I){return typeof I=="string"||typeof I=="function"||I===r||I===u||I===i||I===o||I===f||I===m||typeof I=="object"&&I!==null&&(I.$$typeof===b||I.$$typeof===h||I.$$typeof===a||I.$$typeof===s||I.$$typeof===d||I.$$typeof===T||I.$$typeof===S||I.$$typeof===v||I.$$typeof===y)},ft.typeOf=w,ft}var ht={};/** @license React v16.13.1
101
101
  * react-is.development.js
102
102
  *
103
103
  * Copyright (c) Facebook, Inc. and its affiliates.
104
104
  *
105
105
  * This source code is licensed under the MIT license found in the
106
106
  * LICENSE file in the root directory of this source tree.
107
- */var mf;function RE(){return mf||(mf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function w(ee){return typeof ee=="string"||typeof ee=="function"||ee===r||ee===u||ee===i||ee===o||ee===f||ee===m||typeof ee=="object"&&ee!==null&&(ee.$$typeof===b||ee.$$typeof===h||ee.$$typeof===a||ee.$$typeof===s||ee.$$typeof===d||ee.$$typeof===T||ee.$$typeof===S||ee.$$typeof===v||ee.$$typeof===y)}function C(ee){if(typeof ee=="object"&&ee!==null){var we=ee.$$typeof;switch(we){case t:var Te=ee.type;switch(Te){case c:case u:case r:case i:case o:case f:return Te;default:var Oe=Te&&Te.$$typeof;switch(Oe){case s:case d:case b:case h:case a:return Oe;default:return we}}case n:return we}}}var I=c,D=u,P=s,F=a,k=t,H=d,R=r,E=b,p=h,$=n,A=i,M=o,z=f,U=!1;function re(ee){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),B(ee)||C(ee)===c}function B(ee){return C(ee)===u}function L(ee){return C(ee)===s}function oe(ee){return C(ee)===a}function G(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===t}function K(ee){return C(ee)===d}function Z(ee){return C(ee)===r}function ce(ee){return C(ee)===b}function W(ee){return C(ee)===h}function Y(ee){return C(ee)===n}function te(ee){return C(ee)===i}function J(ee){return C(ee)===o}function ie(ee){return C(ee)===f}ht.AsyncMode=I,ht.ConcurrentMode=D,ht.ContextConsumer=P,ht.ContextProvider=F,ht.Element=k,ht.ForwardRef=H,ht.Fragment=R,ht.Lazy=E,ht.Memo=p,ht.Portal=$,ht.Profiler=A,ht.StrictMode=M,ht.Suspense=z,ht.isAsyncMode=re,ht.isConcurrentMode=B,ht.isContextConsumer=L,ht.isContextProvider=oe,ht.isElement=G,ht.isForwardRef=K,ht.isFragment=Z,ht.isLazy=ce,ht.isMemo=W,ht.isPortal=Y,ht.isProfiler=te,ht.isStrictMode=J,ht.isSuspense=ie,ht.isValidElementType=w,ht.typeOf=C}()),ht}var gf;function pv(){return gf||(gf=1,process.env.NODE_ENV==="production"?Xi.exports=IE():Xi.exports=RE()),Xi.exports}/*
107
+ */var gf;function RE(){return gf||(gf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function w(ee){return typeof ee=="string"||typeof ee=="function"||ee===r||ee===u||ee===i||ee===o||ee===f||ee===m||typeof ee=="object"&&ee!==null&&(ee.$$typeof===b||ee.$$typeof===h||ee.$$typeof===a||ee.$$typeof===s||ee.$$typeof===d||ee.$$typeof===T||ee.$$typeof===S||ee.$$typeof===v||ee.$$typeof===y)}function C(ee){if(typeof ee=="object"&&ee!==null){var we=ee.$$typeof;switch(we){case t:var Te=ee.type;switch(Te){case c:case u:case r:case i:case o:case f:return Te;default:var Oe=Te&&Te.$$typeof;switch(Oe){case s:case d:case b:case h:case a:return Oe;default:return we}}case n:return we}}}var I=c,D=u,P=s,F=a,k=t,H=d,R=r,E=b,p=h,$=n,A=i,M=o,z=f,U=!1;function re(ee){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),B(ee)||C(ee)===c}function B(ee){return C(ee)===u}function L(ee){return C(ee)===s}function oe(ee){return C(ee)===a}function G(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===t}function K(ee){return C(ee)===d}function Z(ee){return C(ee)===r}function ce(ee){return C(ee)===b}function W(ee){return C(ee)===h}function Y(ee){return C(ee)===n}function te(ee){return C(ee)===i}function J(ee){return C(ee)===o}function ie(ee){return C(ee)===f}ht.AsyncMode=I,ht.ConcurrentMode=D,ht.ContextConsumer=P,ht.ContextProvider=F,ht.Element=k,ht.ForwardRef=H,ht.Fragment=R,ht.Lazy=E,ht.Memo=p,ht.Portal=$,ht.Profiler=A,ht.StrictMode=M,ht.Suspense=z,ht.isAsyncMode=re,ht.isConcurrentMode=B,ht.isContextConsumer=L,ht.isContextProvider=oe,ht.isElement=G,ht.isForwardRef=K,ht.isFragment=Z,ht.isLazy=ce,ht.isMemo=W,ht.isPortal=Y,ht.isProfiler=te,ht.isStrictMode=J,ht.isSuspense=ie,ht.isValidElementType=w,ht.typeOf=C}()),ht}var yf;function vv(){return yf||(yf=1,process.env.NODE_ENV==="production"?Xi.exports=IE():Xi.exports=RE()),Xi.exports}/*
108
108
  object-assign
109
109
  (c) Sindre Sorhus
110
110
  @license MIT
111
- */var Xs,yf;function OE(){if(yf)return Xs;yf=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Xs=o()?Object.assign:function(i,a){for(var s,c=r(i),u,d=1;d<arguments.length;d++){s=Object(arguments[d]);for(var f in s)t.call(s,f)&&(c[f]=s[f]);if(e){u=e(s);for(var m=0;m<u.length;m++)n.call(s,u[m])&&(c[u[m]]=s[u[m]])}}return c},Xs}var Gs,bf;function Du(){if(bf)return Gs;bf=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gs=e,Gs}var Zs,wf;function vv(){return wf||(wf=1,Zs=Function.call.bind(Object.prototype.hasOwnProperty)),Zs}var Qs,Ef;function PE(){if(Ef)return Qs;Ef=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Du(),n={},r=vv();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,c,u){if(process.env.NODE_ENV!=="production"){for(var d in i)if(r(i,d)){var f;try{if(typeof i[d]!="function"){var m=Error((c||"React class")+": "+s+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}f=i[d](a,d,c,s,null,t)}catch(b){f=b}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=u?u():"";e("Failed "+s+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Qs=o,Qs}var Js,xf;function AE(){if(xf)return Js;xf=1;var e=pv(),t=OE(),n=Du(),r=vv(),o=PE(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return Js=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(B){var L=B&&(u&&B[u]||B[d]);if(typeof L=="function")return L}var m="<<anonymous>>",h={array:S("array"),bigint:S("bigint"),bool:S("boolean"),func:S("function"),number:S("number"),object:S("object"),string:S("string"),symbol:S("symbol"),any:v(),arrayOf:w,element:C(),elementType:I(),instanceOf:D,node:H(),objectOf:F,oneOf:P,oneOfType:k,shape:E,exact:p};function b(B,L){return B===L?B!==0||1/B===1/L:B!==B&&L!==L}function y(B,L){this.message=B,this.data=L&&typeof L=="object"?L:{},this.stack=""}y.prototype=Error.prototype;function T(B){if(process.env.NODE_ENV!=="production")var L={},oe=0;function G(Z,ce,W,Y,te,J,ie){if(Y=Y||m,J=J||W,ie!==n){if(c){var ee=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ee.name="Invariant Violation",ee}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var we=Y+":"+W;!L[we]&&oe<3&&(i("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+Y+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[we]=!0,oe++)}}return ce[W]==null?Z?ce[W]===null?new y("The "+te+" `"+J+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new y("The "+te+" `"+J+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:B(ce,W,Y,te,J)}var K=G.bind(null,!1);return K.isRequired=G.bind(null,!0),K}function S(B){function L(oe,G,K,Z,ce,W){var Y=oe[G],te=M(Y);if(te!==B){var J=z(Y);return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+J+"` supplied to `"+K+"`, expected ")+("`"+B+"`."),{expectedType:B})}return null}return T(L)}function v(){return T(a)}function w(B){function L(oe,G,K,Z,ce){if(typeof B!="function")return new y("Property `"+ce+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var W=oe[G];if(!Array.isArray(W)){var Y=M(W);return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+Y+"` supplied to `"+K+"`, expected an array."))}for(var te=0;te<W.length;te++){var J=B(W,te,K,Z,ce+"["+te+"]",n);if(J instanceof Error)return J}return null}return T(L)}function C(){function B(L,oe,G,K,Z){var ce=L[oe];if(!s(ce)){var W=M(ce);return new y("Invalid "+K+" `"+Z+"` of type "+("`"+W+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return T(B)}function I(){function B(L,oe,G,K,Z){var ce=L[oe];if(!e.isValidElementType(ce)){var W=M(ce);return new y("Invalid "+K+" `"+Z+"` of type "+("`"+W+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return T(B)}function D(B){function L(oe,G,K,Z,ce){if(!(oe[G]instanceof B)){var W=B.name||m,Y=re(oe[G]);return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+Y+"` supplied to `"+K+"`, expected ")+("instance of `"+W+"`."))}return null}return T(L)}function P(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function L(oe,G,K,Z,ce){for(var W=oe[G],Y=0;Y<B.length;Y++)if(b(W,B[Y]))return null;var te=JSON.stringify(B,function(ie,ee){var we=z(ee);return we==="symbol"?String(ee):ee});return new y("Invalid "+Z+" `"+ce+"` of value `"+String(W)+"` "+("supplied to `"+K+"`, expected one of "+te+"."))}return T(L)}function F(B){function L(oe,G,K,Z,ce){if(typeof B!="function")return new y("Property `"+ce+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var W=oe[G],Y=M(W);if(Y!=="object")return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+Y+"` supplied to `"+K+"`, expected an object."));for(var te in W)if(r(W,te)){var J=B(W,te,K,Z,ce+"."+te,n);if(J instanceof Error)return J}return null}return T(L)}function k(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var L=0;L<B.length;L++){var oe=B[L];if(typeof oe!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(oe)+" at index "+L+"."),a}function G(K,Z,ce,W,Y){for(var te=[],J=0;J<B.length;J++){var ie=B[J],ee=ie(K,Z,ce,W,Y,n);if(ee==null)return null;ee.data&&r(ee.data,"expectedType")&&te.push(ee.data.expectedType)}var we=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new y("Invalid "+W+" `"+Y+"` supplied to "+("`"+ce+"`"+we+"."))}return T(G)}function H(){function B(L,oe,G,K,Z){return $(L[oe])?null:new y("Invalid "+K+" `"+Z+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return T(B)}function R(B,L,oe,G,K){return new y((B||"React class")+": "+L+" type `"+oe+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function E(B){function L(oe,G,K,Z,ce){var W=oe[G],Y=M(W);if(Y!=="object")return new y("Invalid "+Z+" `"+ce+"` of type `"+Y+"` "+("supplied to `"+K+"`, expected `object`."));for(var te in B){var J=B[te];if(typeof J!="function")return R(K,Z,ce,te,z(J));var ie=J(W,te,K,Z,ce+"."+te,n);if(ie)return ie}return null}return T(L)}function p(B){function L(oe,G,K,Z,ce){var W=oe[G],Y=M(W);if(Y!=="object")return new y("Invalid "+Z+" `"+ce+"` of type `"+Y+"` "+("supplied to `"+K+"`, expected `object`."));var te=t({},oe[G],B);for(var J in te){var ie=B[J];if(r(B,J)&&typeof ie!="function")return R(K,Z,ce,J,z(ie));if(!ie)return new y("Invalid "+Z+" `"+ce+"` key `"+J+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(oe[G],null," ")+`
112
- Valid keys: `+JSON.stringify(Object.keys(B),null," "));var ee=ie(W,J,K,Z,ce+"."+J,n);if(ee)return ee}return null}return T(L)}function $(B){switch(typeof B){case"number":case"string":case"undefined":return!0;case"boolean":return!B;case"object":if(Array.isArray(B))return B.every($);if(B===null||s(B))return!0;var L=f(B);if(L){var oe=L.call(B),G;if(L!==B.entries){for(;!(G=oe.next()).done;)if(!$(G.value))return!1}else for(;!(G=oe.next()).done;){var K=G.value;if(K&&!$(K[1]))return!1}}else return!1;return!0;default:return!1}}function A(B,L){return B==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function M(B){var L=typeof B;return Array.isArray(B)?"array":B instanceof RegExp?"object":A(L,B)?"symbol":L}function z(B){if(typeof B>"u"||B===null)return""+B;var L=M(B);if(L==="object"){if(B instanceof Date)return"date";if(B instanceof RegExp)return"regexp"}return L}function U(B){var L=z(B);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function re(B){return!B.constructor||!B.constructor.name?m:B.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Js}var ec,_f;function DE(){if(_f)return ec;_f=1;var e=Du();function t(){}function n(){}return n.resetWarningCache=t,ec=function(){function r(a,s,c,u,d,f){if(f!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},ec}if(process.env.NODE_ENV!=="production"){var NE=pv(),kE=!0;Ac.exports=AE()(NE.isElement,kE)}else Ac.exports=DE()();var ME=Ac.exports;const X=vp(ME);function jE(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function LE(e,t){e.classList?e.classList.add(t):jE(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Sf(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function FE(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Sf(e.className,t):e.setAttribute("class",Sf(e.className&&e.className.baseVal||"",t))}const Cf={disabled:!1};var VE=process.env.NODE_ENV!=="production"?X.oneOfType([X.number,X.shape({enter:X.number,exit:X.number,appear:X.number}).isRequired]):null,BE=process.env.NODE_ENV!=="production"?X.oneOfType([X.string,X.shape({enter:X.string,exit:X.string,active:X.string}),X.shape({enter:X.string,enterDone:X.string,enterActive:X.string,exit:X.string,exitDone:X.string,exitActive:X.string})]):null;const mv=l.createContext(null);var gv=function(t){return t.scrollTop},jo="unmounted",Cr="exited",$r="entering",Jr="entered",Dc="exiting",er=function(e){Au(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,c;return i.appearStatus=null,r.in?s?(c=Cr,i.appearStatus=$r):c=Jr:r.unmountOnExit||r.mountOnEnter?c=jo:c=Cr,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===jo?{status:Cr}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==$r&&a!==Jr&&(i=$r):(a===$r||a===Jr)&&(i=Dc)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===$r){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:hn.findDOMNode(this);a&&gv(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Cr&&this.setState({status:jo})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,c=this.props.nodeRef?[s]:[hn.findDOMNode(this),s],u=c[0],d=c[1],f=this.getTimeouts(),m=s?f.appear:f.enter;if(!o&&!a||Cf.disabled){this.safeSetState({status:Jr},function(){i.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:$r},function(){i.props.onEntering(u,d),i.onTransitionEnd(m,function(){i.safeSetState({status:Jr},function(){i.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:hn.findDOMNode(this);if(!i||Cf.disabled){this.safeSetState({status:Cr},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Dc},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:Cr},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:hn.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===jo)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=an(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return l.createElement(mv.Provider,{value:null},typeof a=="function"?a(o,s):l.cloneElement(l.Children.only(a),s))},t}(l.Component);er.contextType=mv;er.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:X.shape({current:typeof Element>"u"?X.any:function(e,t,n,r,o,i){var a=e[t];return X.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,r,o,i)}}),children:X.oneOfType([X.func.isRequired,X.element.isRequired]).isRequired,in:X.bool,mountOnEnter:X.bool,unmountOnExit:X.bool,appear:X.bool,enter:X.bool,exit:X.bool,timeout:function(t){var n=VE;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.apply(void 0,[t].concat(o))},addEndListener:X.func,onEnter:X.func,onEntering:X.func,onEntered:X.func,onExit:X.func,onExiting:X.func,onExited:X.func}:{};function Yr(){}er.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Yr,onEntering:Yr,onEntered:Yr,onExit:Yr,onExiting:Yr,onExited:Yr};er.UNMOUNTED=jo;er.EXITED=Cr;er.ENTERING=$r;er.ENTERED=Jr;er.EXITING=Dc;const yv=er;var HE=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return LE(t,r)})},tc=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return FE(t,r)})},Nu=function(e){Au(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,c){var u=r.resolveArguments(s,c),d=u[0],f=u[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,c)},r.onEntering=function(s,c){var u=r.resolveArguments(s,c),d=u[0],f=u[1],m=f?"appear":"enter";r.addClass(d,m,"active"),r.props.onEntering&&r.props.onEntering(s,c)},r.onEntered=function(s,c){var u=r.resolveArguments(s,c),d=u[0],f=u[1],m=f?"appear":"enter";r.removeClasses(d,m),r.addClass(d,m,"done"),r.props.onEntered&&r.props.onEntered(s,c)},r.onExit=function(s){var c=r.resolveArguments(s),u=c[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var c=r.resolveArguments(s),u=c[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var c=r.resolveArguments(s),u=c[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,c){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,c]},r.getClassNames=function(s){var c=r.props.classNames,u=typeof c=="string",d=u&&c?c+"-":"",f=u?""+d+s:c[s],m=u?f+"-active":c[s+"Active"],h=u?f+"-done":c[s+"Done"];return{baseClassName:f,activeClassName:m,doneClassName:h}},r}var n=t.prototype;return n.addClass=function(o,i,a){var s=this.getClassNames(i)[a+"ClassName"],c=this.getClassNames("enter"),u=c.doneClassName;i==="appear"&&a==="done"&&u&&(s+=" "+u),a==="active"&&o&&gv(o),s&&(this.appliedClasses[i][a]=s,HE(o,s))},n.removeClasses=function(o,i){var a=this.appliedClasses[i],s=a.base,c=a.active,u=a.done;this.appliedClasses[i]={},s&&tc(o,s),c&&tc(o,c),u&&tc(o,u)},n.render=function(){var o=this.props;o.classNames;var i=an(o,["classNames"]);return l.createElement(yv,ae({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(l.Component);Nu.defaultProps={classNames:""};Nu.propTypes=process.env.NODE_ENV!=="production"?ae({},yv.propTypes,{classNames:BE,onEnter:X.func,onEntering:X.func,onEntered:X.func,onExit:X.func,onExiting:X.func,onExited:X.func}):{};const WE=Nu;function $f(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Gi=wt({defaultClassName:"fic97c0",variantClassNames:{animate:{in:"fic97c1",out:"fic97c2"}},defaultVariants:{},compoundVariants:[]});const zE=l.forwardRef(({isOpen:e,onClose:t},n)=>{const r=l.useRef(null),o=n||r;return j.jsx(WE,{in:e,nodeRef:o,timeout:400,unmountOnExit:!0,classNames:{enter:Pe(Gi({animate:"in"})),enterDone:Pe(Gi({animate:"in"})),exit:Pe(Gi({animate:"out"})),exitDone:Pe(Gi({animate:"out"}))},children:j.jsx("div",{ref:o,"data-test-id":"vds-BS-overlay",onClick:t})})}),bv=e=>{l.useEffect(e,[e])},ms=({children:e,...t})=>{const[n,r]=l.useState(!1);return bv(()=>{r(!0)}),n?j.jsx(Zw,{...t,children:e}):null};var UE="_185nehu0",YE=wt({defaultClassName:"_185nehu1 _15kd2weg j1jih7z j1jih7ak j1jih7a0",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const KE=l.forwardRef(({children:e,className:t,...n},r)=>j.jsx(hE,{...n,ref:r,className:Pe(UE),children:j.jsx(pE,{children:e})})),ku=l.forwardRef(({options:e,position:t,placeholder:n,...r},o)=>j.jsx(bo,{children:j.jsxs(sE,{...r,children:[j.jsxs(cE,{ref:o,className:Pe(YE()),"data-test-id":r["data-test-id"],children:[j.jsx(uE,{placeholder:n}),j.jsx(lE,{className:"SelectIcon",children:j.jsx(si,{})})]}),j.jsx(ms,{children:j.jsxs(dE,{position:t,style:{overflow:"hidden",backgroundColor:"white",borderRadius:" 6px",width:"100%",boxShadow:" 0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)"},children:[j.jsx(vE,{"data-test-id":"CT_ScrollUp_Icon",style:{textAlign:"center",marginTop:5},children:j.jsx(Eu,{height:15,width:15})}),j.jsx(fE,{className:"SelectViewport",children:e.map(({label:i,value:a})=>j.jsx(KE,{value:a,children:i},a))}),j.jsx(mE,{"data-test-id":"CT_ScrollDown_Icon",style:{textAlign:"center"},children:j.jsx(si,{height:15,width:15})})]})})]})}));ku.displayName="BaseSelect";ku.defaultProps={position:"popper",placeholder:"","data-test-id":void 0};/**
111
+ */var Xs,bf;function OE(){if(bf)return Xs;bf=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Xs=o()?Object.assign:function(i,a){for(var s,c=r(i),u,d=1;d<arguments.length;d++){s=Object(arguments[d]);for(var f in s)t.call(s,f)&&(c[f]=s[f]);if(e){u=e(s);for(var m=0;m<u.length;m++)n.call(s,u[m])&&(c[u[m]]=s[u[m]])}}return c},Xs}var Gs,wf;function Du(){if(wf)return Gs;wf=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gs=e,Gs}var Zs,Ef;function mv(){return Ef||(Ef=1,Zs=Function.call.bind(Object.prototype.hasOwnProperty)),Zs}var Qs,xf;function PE(){if(xf)return Qs;xf=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Du(),n={},r=mv();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,c,u){if(process.env.NODE_ENV!=="production"){for(var d in i)if(r(i,d)){var f;try{if(typeof i[d]!="function"){var m=Error((c||"React class")+": "+s+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}f=i[d](a,d,c,s,null,t)}catch(b){f=b}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=u?u():"";e("Failed "+s+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Qs=o,Qs}var Js,_f;function AE(){if(_f)return Js;_f=1;var e=vv(),t=OE(),n=Du(),r=mv(),o=PE(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return Js=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(B){var L=B&&(u&&B[u]||B[d]);if(typeof L=="function")return L}var m="<<anonymous>>",h={array:S("array"),bigint:S("bigint"),bool:S("boolean"),func:S("function"),number:S("number"),object:S("object"),string:S("string"),symbol:S("symbol"),any:v(),arrayOf:w,element:C(),elementType:I(),instanceOf:D,node:H(),objectOf:F,oneOf:P,oneOfType:k,shape:E,exact:p};function b(B,L){return B===L?B!==0||1/B===1/L:B!==B&&L!==L}function y(B,L){this.message=B,this.data=L&&typeof L=="object"?L:{},this.stack=""}y.prototype=Error.prototype;function T(B){if(process.env.NODE_ENV!=="production")var L={},oe=0;function G(Z,ce,W,Y,te,J,ie){if(Y=Y||m,J=J||W,ie!==n){if(c){var ee=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ee.name="Invariant Violation",ee}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var we=Y+":"+W;!L[we]&&oe<3&&(i("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+Y+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[we]=!0,oe++)}}return ce[W]==null?Z?ce[W]===null?new y("The "+te+" `"+J+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new y("The "+te+" `"+J+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:B(ce,W,Y,te,J)}var K=G.bind(null,!1);return K.isRequired=G.bind(null,!0),K}function S(B){function L(oe,G,K,Z,ce,W){var Y=oe[G],te=M(Y);if(te!==B){var J=z(Y);return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+J+"` supplied to `"+K+"`, expected ")+("`"+B+"`."),{expectedType:B})}return null}return T(L)}function v(){return T(a)}function w(B){function L(oe,G,K,Z,ce){if(typeof B!="function")return new y("Property `"+ce+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var W=oe[G];if(!Array.isArray(W)){var Y=M(W);return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+Y+"` supplied to `"+K+"`, expected an array."))}for(var te=0;te<W.length;te++){var J=B(W,te,K,Z,ce+"["+te+"]",n);if(J instanceof Error)return J}return null}return T(L)}function C(){function B(L,oe,G,K,Z){var ce=L[oe];if(!s(ce)){var W=M(ce);return new y("Invalid "+K+" `"+Z+"` of type "+("`"+W+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return T(B)}function I(){function B(L,oe,G,K,Z){var ce=L[oe];if(!e.isValidElementType(ce)){var W=M(ce);return new y("Invalid "+K+" `"+Z+"` of type "+("`"+W+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return T(B)}function D(B){function L(oe,G,K,Z,ce){if(!(oe[G]instanceof B)){var W=B.name||m,Y=re(oe[G]);return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+Y+"` supplied to `"+K+"`, expected ")+("instance of `"+W+"`."))}return null}return T(L)}function P(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function L(oe,G,K,Z,ce){for(var W=oe[G],Y=0;Y<B.length;Y++)if(b(W,B[Y]))return null;var te=JSON.stringify(B,function(ie,ee){var we=z(ee);return we==="symbol"?String(ee):ee});return new y("Invalid "+Z+" `"+ce+"` of value `"+String(W)+"` "+("supplied to `"+K+"`, expected one of "+te+"."))}return T(L)}function F(B){function L(oe,G,K,Z,ce){if(typeof B!="function")return new y("Property `"+ce+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var W=oe[G],Y=M(W);if(Y!=="object")return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+Y+"` supplied to `"+K+"`, expected an object."));for(var te in W)if(r(W,te)){var J=B(W,te,K,Z,ce+"."+te,n);if(J instanceof Error)return J}return null}return T(L)}function k(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var L=0;L<B.length;L++){var oe=B[L];if(typeof oe!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(oe)+" at index "+L+"."),a}function G(K,Z,ce,W,Y){for(var te=[],J=0;J<B.length;J++){var ie=B[J],ee=ie(K,Z,ce,W,Y,n);if(ee==null)return null;ee.data&&r(ee.data,"expectedType")&&te.push(ee.data.expectedType)}var we=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new y("Invalid "+W+" `"+Y+"` supplied to "+("`"+ce+"`"+we+"."))}return T(G)}function H(){function B(L,oe,G,K,Z){return $(L[oe])?null:new y("Invalid "+K+" `"+Z+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return T(B)}function R(B,L,oe,G,K){return new y((B||"React class")+": "+L+" type `"+oe+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function E(B){function L(oe,G,K,Z,ce){var W=oe[G],Y=M(W);if(Y!=="object")return new y("Invalid "+Z+" `"+ce+"` of type `"+Y+"` "+("supplied to `"+K+"`, expected `object`."));for(var te in B){var J=B[te];if(typeof J!="function")return R(K,Z,ce,te,z(J));var ie=J(W,te,K,Z,ce+"."+te,n);if(ie)return ie}return null}return T(L)}function p(B){function L(oe,G,K,Z,ce){var W=oe[G],Y=M(W);if(Y!=="object")return new y("Invalid "+Z+" `"+ce+"` of type `"+Y+"` "+("supplied to `"+K+"`, expected `object`."));var te=t({},oe[G],B);for(var J in te){var ie=B[J];if(r(B,J)&&typeof ie!="function")return R(K,Z,ce,J,z(ie));if(!ie)return new y("Invalid "+Z+" `"+ce+"` key `"+J+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(oe[G],null," ")+`
112
+ Valid keys: `+JSON.stringify(Object.keys(B),null," "));var ee=ie(W,J,K,Z,ce+"."+J,n);if(ee)return ee}return null}return T(L)}function $(B){switch(typeof B){case"number":case"string":case"undefined":return!0;case"boolean":return!B;case"object":if(Array.isArray(B))return B.every($);if(B===null||s(B))return!0;var L=f(B);if(L){var oe=L.call(B),G;if(L!==B.entries){for(;!(G=oe.next()).done;)if(!$(G.value))return!1}else for(;!(G=oe.next()).done;){var K=G.value;if(K&&!$(K[1]))return!1}}else return!1;return!0;default:return!1}}function A(B,L){return B==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function M(B){var L=typeof B;return Array.isArray(B)?"array":B instanceof RegExp?"object":A(L,B)?"symbol":L}function z(B){if(typeof B>"u"||B===null)return""+B;var L=M(B);if(L==="object"){if(B instanceof Date)return"date";if(B instanceof RegExp)return"regexp"}return L}function U(B){var L=z(B);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function re(B){return!B.constructor||!B.constructor.name?m:B.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Js}var ec,Sf;function DE(){if(Sf)return ec;Sf=1;var e=Du();function t(){}function n(){}return n.resetWarningCache=t,ec=function(){function r(a,s,c,u,d,f){if(f!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},ec}if(process.env.NODE_ENV!=="production"){var NE=vv(),kE=!0;Ac.exports=AE()(NE.isElement,kE)}else Ac.exports=DE()();var ME=Ac.exports;const X=mp(ME);function jE(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function LE(e,t){e.classList?e.classList.add(t):jE(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Cf(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function FE(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Cf(e.className,t):e.setAttribute("class",Cf(e.className&&e.className.baseVal||"",t))}const $f={disabled:!1};var VE=process.env.NODE_ENV!=="production"?X.oneOfType([X.number,X.shape({enter:X.number,exit:X.number,appear:X.number}).isRequired]):null,BE=process.env.NODE_ENV!=="production"?X.oneOfType([X.string,X.shape({enter:X.string,exit:X.string,active:X.string}),X.shape({enter:X.string,enterDone:X.string,enterActive:X.string,exit:X.string,exitDone:X.string,exitActive:X.string})]):null;const gv=l.createContext(null);var yv=function(t){return t.scrollTop},jo="unmounted",Cr="exited",$r="entering",Jr="entered",Dc="exiting",er=function(e){Au(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,c;return i.appearStatus=null,r.in?s?(c=Cr,i.appearStatus=$r):c=Jr:r.unmountOnExit||r.mountOnEnter?c=jo:c=Cr,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===jo?{status:Cr}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==$r&&a!==Jr&&(i=$r):(a===$r||a===Jr)&&(i=Dc)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===$r){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:hn.findDOMNode(this);a&&yv(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Cr&&this.setState({status:jo})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,c=this.props.nodeRef?[s]:[hn.findDOMNode(this),s],u=c[0],d=c[1],f=this.getTimeouts(),m=s?f.appear:f.enter;if(!o&&!a||$f.disabled){this.safeSetState({status:Jr},function(){i.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:$r},function(){i.props.onEntering(u,d),i.onTransitionEnd(m,function(){i.safeSetState({status:Jr},function(){i.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:hn.findDOMNode(this);if(!i||$f.disabled){this.safeSetState({status:Cr},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Dc},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:Cr},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:hn.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===jo)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=an(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return l.createElement(gv.Provider,{value:null},typeof a=="function"?a(o,s):l.cloneElement(l.Children.only(a),s))},t}(l.Component);er.contextType=gv;er.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:X.shape({current:typeof Element>"u"?X.any:function(e,t,n,r,o,i){var a=e[t];return X.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,r,o,i)}}),children:X.oneOfType([X.func.isRequired,X.element.isRequired]).isRequired,in:X.bool,mountOnEnter:X.bool,unmountOnExit:X.bool,appear:X.bool,enter:X.bool,exit:X.bool,timeout:function(t){var n=VE;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.apply(void 0,[t].concat(o))},addEndListener:X.func,onEnter:X.func,onEntering:X.func,onEntered:X.func,onExit:X.func,onExiting:X.func,onExited:X.func}:{};function Yr(){}er.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Yr,onEntering:Yr,onEntered:Yr,onExit:Yr,onExiting:Yr,onExited:Yr};er.UNMOUNTED=jo;er.EXITED=Cr;er.ENTERING=$r;er.ENTERED=Jr;er.EXITING=Dc;const bv=er;var HE=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return LE(t,r)})},tc=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return FE(t,r)})},Nu=function(e){Au(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,c){var u=r.resolveArguments(s,c),d=u[0],f=u[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,c)},r.onEntering=function(s,c){var u=r.resolveArguments(s,c),d=u[0],f=u[1],m=f?"appear":"enter";r.addClass(d,m,"active"),r.props.onEntering&&r.props.onEntering(s,c)},r.onEntered=function(s,c){var u=r.resolveArguments(s,c),d=u[0],f=u[1],m=f?"appear":"enter";r.removeClasses(d,m),r.addClass(d,m,"done"),r.props.onEntered&&r.props.onEntered(s,c)},r.onExit=function(s){var c=r.resolveArguments(s),u=c[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var c=r.resolveArguments(s),u=c[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var c=r.resolveArguments(s),u=c[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,c){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,c]},r.getClassNames=function(s){var c=r.props.classNames,u=typeof c=="string",d=u&&c?c+"-":"",f=u?""+d+s:c[s],m=u?f+"-active":c[s+"Active"],h=u?f+"-done":c[s+"Done"];return{baseClassName:f,activeClassName:m,doneClassName:h}},r}var n=t.prototype;return n.addClass=function(o,i,a){var s=this.getClassNames(i)[a+"ClassName"],c=this.getClassNames("enter"),u=c.doneClassName;i==="appear"&&a==="done"&&u&&(s+=" "+u),a==="active"&&o&&yv(o),s&&(this.appliedClasses[i][a]=s,HE(o,s))},n.removeClasses=function(o,i){var a=this.appliedClasses[i],s=a.base,c=a.active,u=a.done;this.appliedClasses[i]={},s&&tc(o,s),c&&tc(o,c),u&&tc(o,u)},n.render=function(){var o=this.props;o.classNames;var i=an(o,["classNames"]);return l.createElement(bv,ae({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(l.Component);Nu.defaultProps={classNames:""};Nu.propTypes=process.env.NODE_ENV!=="production"?ae({},bv.propTypes,{classNames:BE,onEnter:X.func,onEntering:X.func,onEntered:X.func,onExit:X.func,onExiting:X.func,onExited:X.func}):{};const WE=Nu;function Tf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Gi=wt({defaultClassName:"fic97c0",variantClassNames:{animate:{in:"fic97c1",out:"fic97c2"}},defaultVariants:{},compoundVariants:[]});const zE=l.forwardRef(({isOpen:e,onClose:t},n)=>{const r=l.useRef(null),o=n||r;return j.jsx(WE,{in:e,nodeRef:o,timeout:400,unmountOnExit:!0,classNames:{enter:Pe(Gi({animate:"in"})),enterDone:Pe(Gi({animate:"in"})),exit:Pe(Gi({animate:"out"})),exitDone:Pe(Gi({animate:"out"}))},children:j.jsx("div",{ref:o,"data-test-id":"vds-BS-overlay",onClick:t})})}),wv=e=>{l.useEffect(e,[e])},ms=({children:e,...t})=>{const[n,r]=l.useState(!1);return wv(()=>{r(!0)}),n?j.jsx(Qw,{...t,children:e}):null};var UE="_185nehu0",YE=wt({defaultClassName:"_185nehu1 _15kd2weg j1jih7z j1jih7ak j1jih7a0",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const KE=l.forwardRef(({children:e,className:t,...n},r)=>j.jsx(pE,{...n,ref:r,className:Pe(UE),children:j.jsx(vE,{children:e})})),ku=l.forwardRef(({options:e,position:t,placeholder:n,...r},o)=>j.jsx(bo,{children:j.jsxs(cE,{...r,children:[j.jsxs(uE,{ref:o,className:Pe(YE()),"data-test-id":r["data-test-id"],children:[j.jsx(lE,{placeholder:n}),j.jsx(dE,{className:"SelectIcon",children:j.jsx(si,{})})]}),j.jsx(ms,{children:j.jsxs(fE,{position:t,style:{overflow:"hidden",backgroundColor:"white",borderRadius:" 6px",width:"100%",boxShadow:" 0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)"},children:[j.jsx(mE,{"data-test-id":"CT_ScrollUp_Icon",style:{textAlign:"center",marginTop:5},children:j.jsx(Eu,{height:15,width:15})}),j.jsx(hE,{className:"SelectViewport",children:e.map(({label:i,value:a})=>j.jsx(KE,{value:a,children:i},a))}),j.jsx(gE,{"data-test-id":"CT_ScrollDown_Icon",style:{textAlign:"center"},children:j.jsx(si,{height:15,width:15})})]})})]})}));ku.displayName="BaseSelect";ku.defaultProps={position:"popper",placeholder:"","data-test-id":void 0};/**
113
113
  * @reach/utils v0.18.0
114
114
  *
115
115
  * Copyright (c) 2018-2022, React Training LLC
@@ -118,7 +118,7 @@ Valid keys: `+JSON.stringify(Object.keys(B),null," "));var ee=ie(W,J,K,Z,ce+"."
118
118
  * LICENSE.md file in the root directory of this source tree.
119
119
  *
120
120
  * @license MIT
121
- */function qE(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function XE(){let[,e]=l.useState(Object.create(null));return l.useCallback(()=>{e(Object.create(null))},[])}var GE=qE()?l.useLayoutEffect:l.useEffect,ZE=({children:e,type:t="reach-portal",containerRef:n})=>{let r=$e.useRef(null),o=$e.useRef(null),i=XE();return $e.useEffect(()=>{n!=null&&(typeof n!="object"||!("current"in n)?console.warn("@reach/portal: Invalid value passed to the `containerRef` of a `Portal`. The portal will be appended to the document body, but if you want to attach it to another DOM node you must pass a valid React ref object to `containerRef`."):n.current==null&&console.warn("@reach/portal: A ref was passed to the `containerRef` prop of a `Portal`, but no DOM node was attached to it. Be sure to pass the ref to a DOM component.\n\nIf you are forwarding the ref from another component, be sure to use the React.forwardRef API. See https://reactjs.org/docs/forwarding-refs.html."))},[n]),GE(()=>{if(!r.current)return;let a=r.current.ownerDocument,s=(n==null?void 0:n.current)||a.body;return o.current=a==null?void 0:a.createElement(t),s.appendChild(o.current),i(),()=>{o.current&&s&&s.removeChild(o.current)}},[t,i,n]),o.current?hn.createPortal(e,o.current):$e.createElement("span",{ref:r})},wv=({unstable_skipInitialRender:e,...t})=>{let[n,r]=$e.useState(!1);return $e.useEffect(()=>{e&&r(!0)},[e]),e&&!n?null:$e.createElement(ZE,{...t})};wv.displayName="Portal";/*! *****************************************************************************
121
+ */function qE(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function XE(){let[,e]=l.useState(Object.create(null));return l.useCallback(()=>{e(Object.create(null))},[])}var GE=qE()?l.useLayoutEffect:l.useEffect,ZE=({children:e,type:t="reach-portal",containerRef:n})=>{let r=$e.useRef(null),o=$e.useRef(null),i=XE();return $e.useEffect(()=>{n!=null&&(typeof n!="object"||!("current"in n)?console.warn("@reach/portal: Invalid value passed to the `containerRef` of a `Portal`. The portal will be appended to the document body, but if you want to attach it to another DOM node you must pass a valid React ref object to `containerRef`."):n.current==null&&console.warn("@reach/portal: A ref was passed to the `containerRef` prop of a `Portal`, but no DOM node was attached to it. Be sure to pass the ref to a DOM component.\n\nIf you are forwarding the ref from another component, be sure to use the React.forwardRef API. See https://reactjs.org/docs/forwarding-refs.html."))},[n]),GE(()=>{if(!r.current)return;let a=r.current.ownerDocument,s=(n==null?void 0:n.current)||a.body;return o.current=a==null?void 0:a.createElement(t),s.appendChild(o.current),i(),()=>{o.current&&s&&s.removeChild(o.current)}},[t,i,n]),o.current?hn.createPortal(e,o.current):$e.createElement("span",{ref:r})},Ev=({unstable_skipInitialRender:e,...t})=>{let[n,r]=$e.useState(!1);return $e.useEffect(()=>{e&&r(!0)},[e]),e&&!n?null:$e.createElement(ZE,{...t})};Ev.displayName="Portal";/*! *****************************************************************************
122
122
  Copyright (c) Microsoft Corporation.
123
123
 
124
124
  Permission to use, copy, modify, and/or distribute this software for any
@@ -131,19 +131,19 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
131
131
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
132
132
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
133
133
  PERFORMANCE OF THIS SOFTWARE.
134
- ***************************************************************************** */var ye=function(){return ye=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ye.apply(this,arguments)};function Mu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ze(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function it(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function St(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var bt;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(bt||(bt={}));var ho;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(ho||(ho={}));var Nc=bt.Start,ju=bt.Stop,Ti=bt.Raise,gs=bt.Send,Ev=bt.Cancel,QE=bt.NullEvent,Lu=bt.Assign;bt.After;bt.DoneState;var xv=bt.Log,JE=bt.Init,kc=bt.Invoke;bt.ErrorExecution;var Tf=bt.ErrorPlatform,ex=bt.ErrorCustom,_v=bt.Update,tx=bt.Choose,nx=bt.Pure,Sv=".",If={},Mc="xstate.guard",rx="",jt=process.env.NODE_ENV==="production",Zi;function Fu(e,t,n){n===void 0&&(n=Sv);var r=Uo(e,n),o=Uo(t,n);return at(o)?at(r)?o===r:!1:at(r)?r in o:Object.keys(r).every(function(i){return i in o?Fu(r[i],o[i]):!1})}function Cv(e){try{return at(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function jc(e,t){try{return wo(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function ox(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function Uo(e,t){if(ox(e))return e.value;if(wo(e))return Aa(e);if(typeof e!="string")return e;var n=jc(e,t);return Aa(n)}function Aa(e){if(e.length===1)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function Lo(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function Rf(e,t,n){var r,o,i={};try{for(var a=Ze(Object.keys(e)),s=a.next();!s.done;s=a.next()){var c=s.value,u=e[c];n(u)&&(i[c]=t(u,c,e))}}catch(d){r={error:d}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}var ix=function(e){return function(t){var n,r,o=t;try{for(var i=Ze(e),a=i.next();!a.done;a=i.next()){var s=a.value;o=o[s]}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function ax(e,t){return function(n){var r,o,i=n;try{for(var a=Ze(e),s=a.next();!s.done;s=a.next()){var c=s.value;i=i[t][c]}}catch(u){r={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}}function va(e){if(!e)return[[]];if(at(e))return[[e]];var t=Tt(Object.keys(e).map(function(n){var r=e[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:va(e[n]).map(function(o){return[n].concat(o)})}));return t}function Tt(e){var t;return(t=[]).concat.apply(t,St([],it(e),!1))}function $v(e){return wo(e)?e:[e]}function In(e){return e===void 0?[]:$v(e)}function Da(e,t,n){var r,o;if(lt(e))return e(t,n.data);var i={};try{for(var a=Ze(Object.keys(e)),s=a.next();!s.done;s=a.next()){var c=s.value,u=e[c];lt(u)?i[c]=u(t,n.data):i[c]=u}}catch(d){r={error:d}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function sx(e){return/^(done|error)\./.test(e)}function Of(e){return!!(e instanceof Promise||e!==null&&(lt(e)||typeof e=="object")&&lt(e.then))}function cx(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function ux(e,t){var n,r,o=it([[],[]],2),i=o[0],a=o[1];try{for(var s=Ze(e),c=s.next();!c.done;c=s.next()){var u=c.value;t(u)?i.push(u):a.push(u)}}catch(d){n={error:d}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[i,a]}function Tv(e,t){return Lo(e.states,function(n,r){if(n){var o=(at(t)?void 0:t[r])||(n?n.current:void 0);if(o)return{current:o,states:Tv(n,o)}}})}function lx(e,t){return{current:t,states:Tv(e,t)}}function Pf(e,t,n,r){jt||Ut(!!e,"Attempting to update undefined context");var o=e&&n.reduce(function(i,a){var s,c,u=a.assignment,d={state:r,action:a,_event:t},f={};if(lt(u))f=u(i,t.data,d);else try{for(var m=Ze(Object.keys(u)),h=m.next();!h.done;h=m.next()){var b=h.value,y=u[b];f[b]=lt(y)?y(i,t.data,d):y}}catch(T){s={error:T}}finally{try{h&&!h.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}return Object.assign({},i,f)},e);return o}var Ut=function(){};jt||(Ut=function(e,t){var n=e instanceof Error?e:void 0;if(!(!n&&e)&&console!==void 0){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});function wo(e){return Array.isArray(e)}function lt(e){return typeof e=="function"}function at(e){return typeof e=="string"}function Iv(e,t){if(e)return at(e)?{type:Mc,name:e,predicate:t?t[e]:void 0}:lt(e)?{type:Mc,name:e.name,predicate:e}:e}function dx(e){try{return"subscribe"in e&&lt(e.subscribe)}catch{return!1}}var sr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();Zi={},Zi[sr]=function(){return this},Zi[Symbol.observable]=function(){return this};function Mr(e){return!!e&&"__xstatenode"in e}function fx(e){return!!e&&typeof e.send=="function"}function ys(e,t){return at(e)||typeof e=="number"?ye({type:e},t):e}function zt(e,t){if(!at(e)&&"$$type"in e&&e.$$type==="scxml")return e;var n=ys(e);return ye({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function Kr(e,t){var n=$v(t).map(function(r){return typeof r>"u"||typeof r=="string"||Mr(r)?{target:r,event:e}:ye(ye({},r),{event:e})});return n}function hx(e){if(!(e===void 0||e===rx))return In(e)}function px(e,t,n){if(!jt){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}function Rv(e,t,n,r,o){var i=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===Mc)return((i==null?void 0:i[t.name])||t.predicate)(n,r.data,a);var s=i==null?void 0:i[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,r.data,a)}function Ov(e){return typeof e=="string"?{type:e}:e}function ma(e,t,n){var r=function(){},o=typeof e=="object",i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function Qi(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Lc(e){return(e.type===Ti||e.type===gs&&e.to===ho.Internal)&&typeof e.delay!="number"}var oo=zt({type:JE});function Fc(e,t){return t&&t[e]||void 0}function ui(e,t){var n;if(at(e)||typeof e=="number"){var r=Fc(e,t);lt(r)?n={type:e,exec:r}:r?n=r:n={type:e,exec:void 0}}else if(lt(e))n={type:e.name||e.toString(),exec:e};else{var r=Fc(e.type,t);if(lt(r))n=ye(ye({},e),{exec:r});else if(r){var o=r.type||e.type;n=ye(ye(ye({},r),e),{type:o})}else n=e}return n}var cr=function(e,t){if(!e)return[];var n=wo(e)?e:[e];return n.map(function(r){return ui(r,t)})};function Vu(e){var t=ui(e);return ye(ye({id:at(e)?e:t.id},t),{type:t.type})}function vx(e,t){return{type:Ti,event:typeof e=="function"?e:ys(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function mx(e,t,n,r){var o={_event:n},i=zt(lt(e.event)?e.event(t,n.data,o):e.event),a;if(at(e.delay)){var s=r&&r[e.delay];a=lt(s)?s(t,n.data,o):s}else a=lt(e.delay)?e.delay(t,n.data,o):e.delay;return ye(ye({},e),{type:Ti,_event:i,delay:a})}function gx(e,t){return{to:t?t.to:void 0,type:gs,event:lt(e)?e:ys(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:lt(e)?e.name:Cv(e)}}function yx(e,t,n,r){var o={_event:n},i=zt(lt(e.event)?e.event(t,n.data,o):e.event),a;if(at(e.delay)){var s=r&&r[e.delay];a=lt(s)?s(t,n.data,o):s}else a=lt(e.delay)?e.delay(t,n.data,o):e.delay;var c=lt(e.to)?e.to(t,n.data,o):e.to;return ye(ye({},e),{to:c,_event:i,event:i.data,delay:a})}var bx=function(e,t,n){return ye(ye({},e),{value:at(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},wx=function(e){return{type:Ev,sendId:e}};function Ex(e){var t=Vu(e);return{type:bt.Start,activity:t,exec:void 0}}function xx(e){var t=lt(e)?e:Vu(e);return{type:bt.Stop,activity:t,exec:void 0}}function _x(e,t,n){var r=lt(e.activity)?e.activity(t,n.data):e.activity,o=typeof r=="string"?{id:r}:r,i={type:bt.Stop,activity:o};return i}var Sx=function(e){return{type:Lu,assignment:e}};function Cx(e,t){var n=t?"#".concat(t):"";return"".concat(bt.After,"(").concat(e,")").concat(n)}function Ji(e,t){var n="".concat(bt.DoneState,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function ga(e,t){var n="".concat(bt.DoneInvoke,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function Fo(e,t){var n="".concat(bt.ErrorPlatform,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}var $x=function(e){var t,n,r=[];try{for(var o=Ze(e),i=o.next();!i.done;i=o.next())for(var a=i.value,s=0;s<a.actions.length;){if(a.actions[s].type===Lu){r.push(a.actions[s]),a.actions.splice(s,1);continue}s++}}catch(c){t={error:c}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r};function Na(e,t,n,r,o,i,a){a===void 0&&(a=!1);var s=a?[]:$x(o),c=s.length?Pf(n,r,s,t):n,u=a?[n]:void 0,d=[];function f(b,y){var T;switch(y.type){case Ti:{var S=mx(y,c,r,e.options.delays);return i&&typeof S.delay=="number"&&i(S,c,r),S}case gs:var v=yx(y,c,r,e.options.delays);if(!jt){var w=y.delay;Ut(!at(w)||typeof v.delay=="number","No delay reference for delay expression '".concat(w,"' was found on machine '").concat(e.id,"'"))}return i&&v.to!==ho.Internal&&(b==="entry"?d.push(v):i(v,c,r)),v;case xv:{var C=bx(y,c,r);return i==null||i(C,c,r),C}case tx:{var I=y,D=(T=I.conds.find(function(z){var U=Iv(z.cond,e.options.guards);return!U||Rv(e,U,c,r,i?void 0:t)}))===null||T===void 0?void 0:T.actions;if(!D)return[];var P=it(Na(e,t,c,r,[{type:b,actions:cr(In(D),e.options.actions)}],i,a),2),F=P[0],k=P[1];return c=k,u==null||u.push(c),F}case nx:{var D=y.get(c,r.data);if(!D)return[];var H=it(Na(e,t,c,r,[{type:b,actions:cr(In(D),e.options.actions)}],i,a),2),R=H[0],E=H[1];return c=E,u==null||u.push(c),R}case ju:{var C=_x(y,c,r);return i==null||i(C,n,r),C}case Lu:{c=Pf(c,r,[y],i?void 0:t),u==null||u.push(c);break}default:var p=ui(y,e.options.actions),$=p.exec;if(i)i(p,c,r);else if($&&u){var A=u.length-1,M=ye(ye({},p),{exec:function(z){for(var U=[],re=1;re<arguments.length;re++)U[re-1]=arguments[re];$.apply(void 0,St([u[A]],it(U),!1))}});p=M}return p}}function m(b){var y,T,S=[];try{for(var v=Ze(b.actions),w=v.next();!w.done;w=v.next()){var C=w.value,I=f(b.type,C);I&&(S=S.concat(I))}}catch(D){y={error:D}}finally{try{w&&!w.done&&(T=v.return)&&T.call(v)}finally{if(y)throw y.error}}return d.forEach(function(D){i(D,c,r)}),d.length=0,S}var h=Tt(o.map(m));return[h,c]}var Af=[],eo=function(e,t){Af.push(e);var n=t(e);return Af.pop(),n};function Pv(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[sr]=function(){return this},t}function Tx(e,t,n,r){var o,i=Ov(e.src),a=(o=t==null?void 0:t.options.services)===null||o===void 0?void 0:o[i.type],s=e.data?Da(e.data,n,r):void 0,c=a?Av(a,e.id,s):Pv(e.id);return c.meta=e,c}function Av(e,t,n){var r=Pv(t);if(r.deferred=!0,Mr(e)){var o=r.state=eo(void 0,function(){return(n?e.withContext(n):e).initialState});r.getSnapshot=function(){return o}}return r}function Ix(e){try{return typeof e.send=="function"}catch{return!1}}function Rx(e){return Ix(e)&&"id"in e}function Ox(e){var t;return ye((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[sr]=function(){return this},t),e)}var ka=function(e){return e.type==="atomic"||e.type==="final"};function Dv(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function li(e){return Dv(e).filter(function(t){return t.type!=="history"})}function Nv(e){var t=[e];return ka(e)?t:t.concat(Tt(li(e).map(Nv)))}function Vo(e,t){var n,r,o,i,a,s,c,u,d=new Set(e),f=Vc(d),m=new Set(t);try{for(var h=Ze(m),b=h.next();!b.done;b=h.next())for(var y=b.value,T=y.parent;T&&!m.has(T);)m.add(T),T=T.parent}catch(k){n={error:k}}finally{try{b&&!b.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var S=Vc(m);try{for(var v=Ze(m),w=v.next();!w.done;w=v.next()){var y=w.value;if(y.type==="compound"&&(!S.get(y)||!S.get(y).length))f.get(y)?f.get(y).forEach(function(H){return m.add(H)}):y.initialStateNodes.forEach(function(H){return m.add(H)});else if(y.type==="parallel")try{for(var C=(a=void 0,Ze(li(y))),I=C.next();!I.done;I=C.next()){var D=I.value;m.has(D)||(m.add(D),f.get(D)?f.get(D).forEach(function(H){return m.add(H)}):D.initialStateNodes.forEach(function(H){return m.add(H)}))}}catch(H){a={error:H}}finally{try{I&&!I.done&&(s=C.return)&&s.call(C)}finally{if(a)throw a.error}}}}catch(k){o={error:k}}finally{try{w&&!w.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}try{for(var P=Ze(m),F=P.next();!F.done;F=P.next())for(var y=F.value,T=y.parent;T&&!m.has(T);)m.add(T),T=T.parent}catch(k){c={error:k}}finally{try{F&&!F.done&&(u=P.return)&&u.call(P)}finally{if(c)throw c.error}}return m}function kv(e,t){var n=t.get(e);if(!n)return{};if(e.type==="compound"){var r=n[0];if(r){if(ka(r))return r.key}else return{}}var o={};return n.forEach(function(i){o[i.key]=kv(i,t)}),o}function Vc(e){var t,n,r=new Map;try{for(var o=Ze(e),i=o.next();!i.done;i=o.next()){var a=i.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function Px(e,t){var n=Vo([e],t);return kv(e,Vc(n))}function Bo(e,t){return Array.isArray(e)?e.some(function(n){return n===t}):e instanceof Set?e.has(t):!1}function Ax(e){return St([],it(new Set(Tt(St([],it(e.map(function(t){return t.ownEvents})),!1)))),!1)}function ya(e,t){return t.type==="compound"?li(t).some(function(n){return n.type==="final"&&Bo(e,n)}):t.type==="parallel"?li(t).every(function(n){return ya(e,n)}):!1}function Dx(e){return e===void 0&&(e=[]),e.reduce(function(t,n){return n.meta!==void 0&&(t[n.id]=n.meta),t},{})}function Df(e){return new Set(Tt(e.map(function(t){return t.tags})))}function Mv(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(at(e)||at(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(function(o){return Mv(e[o],t[o])})}function Nx(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function kx(e,t){var n=e.exec,r=ye(ye({},e),{exec:n!==void 0?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return r}var wn=function(){function e(t){var n=this,r;this.actions=[],this.activities=If,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||If,this.meta=Dx(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(r=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&r!==void 0?r:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return Ax(n.configuration)}})}return e.from=function(t,n){if(t instanceof e)return t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t;var r=oo;return new e({value:t,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=oo;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(t,n){var r=this;if(t===void 0&&(t=this.value),n===void 0&&(n="."),at(t))return[t];var o=Object.keys(t);return o.concat.apply(o,St([],it(o.map(function(i){return r.toStrings(t[i],n).map(function(a){return i+n+a})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var n=t.tags;t.machine;var r=Mu(t,["configuration","transitions","tags","machine"]);return ye(ye({},r),{tags:Array.from(n)})},e.prototype.matches=function(t){return Fu(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var n;jt&&Ut(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,t);return!!(r!=null&&r.transitions.length)&&r.transitions.some(function(o){return o.target!==void 0||o.actions.length})},e}(),Mx={deferEvents:!1},Nf=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=ye(ye({},Mx),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},e}(),nc=new Map,jx=0,Ro={bookId:function(){return"x:".concat(jx++)},register:function(e,t){return nc.set(e,t),e},get:function(e){return nc.get(e)},free:function(e){nc.delete(e)}};function Bu(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;jt||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues")}function Lx(){var e=Bu();if(e&&"__xstate__"in e)return e.__xstate__}function Fx(e){if(Bu()){var t=Lx();t&&t.register(e)}}function Vx(e,t){t===void 0&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,a=function(){if(!i){for(i=!0;o.length>0;){var u=o.shift();n=e.transition(n,u,c),r.forEach(function(d){return d.next(n)})}i=!1}},s=Ox({id:t.id,send:function(u){o.push(u),a()},getSnapshot:function(){return n},subscribe:function(u,d,f){var m=ma(u,d,f);return r.add(m),m.next(n),{unsubscribe:function(){r.delete(m)}}}}),c={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(c):n,s}var Bx={sync:!1,autoForward:!1},Vt;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Vt||(Vt={}));var Hx=function(){function e(t,n){n===void 0&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Vt.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(d,f){if(wo(d))return r.batch(d),r.state;var m=zt(ys(d,f));if(r.status===Vt.Stopped)return jt||Ut(!1,'Event "'.concat(m.name,'" was sent to stopped service "').concat(r.machine.id,`". This service has already reached its final state, and will not transition.
134
+ ***************************************************************************** */var ye=function(){return ye=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ye.apply(this,arguments)};function Mu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ze(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function it(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function St(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var bt;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(bt||(bt={}));var ho;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(ho||(ho={}));var Nc=bt.Start,ju=bt.Stop,Ti=bt.Raise,gs=bt.Send,xv=bt.Cancel,QE=bt.NullEvent,Lu=bt.Assign;bt.After;bt.DoneState;var _v=bt.Log,JE=bt.Init,kc=bt.Invoke;bt.ErrorExecution;var If=bt.ErrorPlatform,ex=bt.ErrorCustom,Sv=bt.Update,tx=bt.Choose,nx=bt.Pure,Cv=".",Rf={},Mc="xstate.guard",rx="",jt=process.env.NODE_ENV==="production",Zi;function Fu(e,t,n){n===void 0&&(n=Cv);var r=Uo(e,n),o=Uo(t,n);return at(o)?at(r)?o===r:!1:at(r)?r in o:Object.keys(r).every(function(i){return i in o?Fu(r[i],o[i]):!1})}function $v(e){try{return at(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function jc(e,t){try{return wo(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function ox(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function Uo(e,t){if(ox(e))return e.value;if(wo(e))return Aa(e);if(typeof e!="string")return e;var n=jc(e,t);return Aa(n)}function Aa(e){if(e.length===1)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function Lo(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function Of(e,t,n){var r,o,i={};try{for(var a=Ze(Object.keys(e)),s=a.next();!s.done;s=a.next()){var c=s.value,u=e[c];n(u)&&(i[c]=t(u,c,e))}}catch(d){r={error:d}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}var ix=function(e){return function(t){var n,r,o=t;try{for(var i=Ze(e),a=i.next();!a.done;a=i.next()){var s=a.value;o=o[s]}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function ax(e,t){return function(n){var r,o,i=n;try{for(var a=Ze(e),s=a.next();!s.done;s=a.next()){var c=s.value;i=i[t][c]}}catch(u){r={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}}function va(e){if(!e)return[[]];if(at(e))return[[e]];var t=Tt(Object.keys(e).map(function(n){var r=e[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:va(e[n]).map(function(o){return[n].concat(o)})}));return t}function Tt(e){var t;return(t=[]).concat.apply(t,St([],it(e),!1))}function Tv(e){return wo(e)?e:[e]}function In(e){return e===void 0?[]:Tv(e)}function Da(e,t,n){var r,o;if(lt(e))return e(t,n.data);var i={};try{for(var a=Ze(Object.keys(e)),s=a.next();!s.done;s=a.next()){var c=s.value,u=e[c];lt(u)?i[c]=u(t,n.data):i[c]=u}}catch(d){r={error:d}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}function sx(e){return/^(done|error)\./.test(e)}function Pf(e){return!!(e instanceof Promise||e!==null&&(lt(e)||typeof e=="object")&&lt(e.then))}function cx(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function ux(e,t){var n,r,o=it([[],[]],2),i=o[0],a=o[1];try{for(var s=Ze(e),c=s.next();!c.done;c=s.next()){var u=c.value;t(u)?i.push(u):a.push(u)}}catch(d){n={error:d}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[i,a]}function Iv(e,t){return Lo(e.states,function(n,r){if(n){var o=(at(t)?void 0:t[r])||(n?n.current:void 0);if(o)return{current:o,states:Iv(n,o)}}})}function lx(e,t){return{current:t,states:Iv(e,t)}}function Af(e,t,n,r){jt||Ut(!!e,"Attempting to update undefined context");var o=e&&n.reduce(function(i,a){var s,c,u=a.assignment,d={state:r,action:a,_event:t},f={};if(lt(u))f=u(i,t.data,d);else try{for(var m=Ze(Object.keys(u)),h=m.next();!h.done;h=m.next()){var b=h.value,y=u[b];f[b]=lt(y)?y(i,t.data,d):y}}catch(T){s={error:T}}finally{try{h&&!h.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}return Object.assign({},i,f)},e);return o}var Ut=function(){};jt||(Ut=function(e,t){var n=e instanceof Error?e:void 0;if(!(!n&&e)&&console!==void 0){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});function wo(e){return Array.isArray(e)}function lt(e){return typeof e=="function"}function at(e){return typeof e=="string"}function Rv(e,t){if(e)return at(e)?{type:Mc,name:e,predicate:t?t[e]:void 0}:lt(e)?{type:Mc,name:e.name,predicate:e}:e}function dx(e){try{return"subscribe"in e&&lt(e.subscribe)}catch{return!1}}var sr=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();Zi={},Zi[sr]=function(){return this},Zi[Symbol.observable]=function(){return this};function Mr(e){return!!e&&"__xstatenode"in e}function fx(e){return!!e&&typeof e.send=="function"}function ys(e,t){return at(e)||typeof e=="number"?ye({type:e},t):e}function zt(e,t){if(!at(e)&&"$$type"in e&&e.$$type==="scxml")return e;var n=ys(e);return ye({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function Kr(e,t){var n=Tv(t).map(function(r){return typeof r>"u"||typeof r=="string"||Mr(r)?{target:r,event:e}:ye(ye({},r),{event:e})});return n}function hx(e){if(!(e===void 0||e===rx))return In(e)}function px(e,t,n){if(!jt){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}function Ov(e,t,n,r,o){var i=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===Mc)return((i==null?void 0:i[t.name])||t.predicate)(n,r.data,a);var s=i==null?void 0:i[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,r.data,a)}function Pv(e){return typeof e=="string"?{type:e}:e}function ma(e,t,n){var r=function(){},o=typeof e=="object",i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function Qi(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Lc(e){return(e.type===Ti||e.type===gs&&e.to===ho.Internal)&&typeof e.delay!="number"}var oo=zt({type:JE});function Fc(e,t){return t&&t[e]||void 0}function ui(e,t){var n;if(at(e)||typeof e=="number"){var r=Fc(e,t);lt(r)?n={type:e,exec:r}:r?n=r:n={type:e,exec:void 0}}else if(lt(e))n={type:e.name||e.toString(),exec:e};else{var r=Fc(e.type,t);if(lt(r))n=ye(ye({},e),{exec:r});else if(r){var o=r.type||e.type;n=ye(ye(ye({},r),e),{type:o})}else n=e}return n}var cr=function(e,t){if(!e)return[];var n=wo(e)?e:[e];return n.map(function(r){return ui(r,t)})};function Vu(e){var t=ui(e);return ye(ye({id:at(e)?e:t.id},t),{type:t.type})}function vx(e,t){return{type:Ti,event:typeof e=="function"?e:ys(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function mx(e,t,n,r){var o={_event:n},i=zt(lt(e.event)?e.event(t,n.data,o):e.event),a;if(at(e.delay)){var s=r&&r[e.delay];a=lt(s)?s(t,n.data,o):s}else a=lt(e.delay)?e.delay(t,n.data,o):e.delay;return ye(ye({},e),{type:Ti,_event:i,delay:a})}function gx(e,t){return{to:t?t.to:void 0,type:gs,event:lt(e)?e:ys(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:lt(e)?e.name:$v(e)}}function yx(e,t,n,r){var o={_event:n},i=zt(lt(e.event)?e.event(t,n.data,o):e.event),a;if(at(e.delay)){var s=r&&r[e.delay];a=lt(s)?s(t,n.data,o):s}else a=lt(e.delay)?e.delay(t,n.data,o):e.delay;var c=lt(e.to)?e.to(t,n.data,o):e.to;return ye(ye({},e),{to:c,_event:i,event:i.data,delay:a})}var bx=function(e,t,n){return ye(ye({},e),{value:at(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},wx=function(e){return{type:xv,sendId:e}};function Ex(e){var t=Vu(e);return{type:bt.Start,activity:t,exec:void 0}}function xx(e){var t=lt(e)?e:Vu(e);return{type:bt.Stop,activity:t,exec:void 0}}function _x(e,t,n){var r=lt(e.activity)?e.activity(t,n.data):e.activity,o=typeof r=="string"?{id:r}:r,i={type:bt.Stop,activity:o};return i}var Sx=function(e){return{type:Lu,assignment:e}};function Cx(e,t){var n=t?"#".concat(t):"";return"".concat(bt.After,"(").concat(e,")").concat(n)}function Ji(e,t){var n="".concat(bt.DoneState,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function ga(e,t){var n="".concat(bt.DoneInvoke,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function Fo(e,t){var n="".concat(bt.ErrorPlatform,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}var $x=function(e){var t,n,r=[];try{for(var o=Ze(e),i=o.next();!i.done;i=o.next())for(var a=i.value,s=0;s<a.actions.length;){if(a.actions[s].type===Lu){r.push(a.actions[s]),a.actions.splice(s,1);continue}s++}}catch(c){t={error:c}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r};function Na(e,t,n,r,o,i,a){a===void 0&&(a=!1);var s=a?[]:$x(o),c=s.length?Af(n,r,s,t):n,u=a?[n]:void 0,d=[];function f(b,y){var T;switch(y.type){case Ti:{var S=mx(y,c,r,e.options.delays);return i&&typeof S.delay=="number"&&i(S,c,r),S}case gs:var v=yx(y,c,r,e.options.delays);if(!jt){var w=y.delay;Ut(!at(w)||typeof v.delay=="number","No delay reference for delay expression '".concat(w,"' was found on machine '").concat(e.id,"'"))}return i&&v.to!==ho.Internal&&(b==="entry"?d.push(v):i(v,c,r)),v;case _v:{var C=bx(y,c,r);return i==null||i(C,c,r),C}case tx:{var I=y,D=(T=I.conds.find(function(z){var U=Rv(z.cond,e.options.guards);return!U||Ov(e,U,c,r,i?void 0:t)}))===null||T===void 0?void 0:T.actions;if(!D)return[];var P=it(Na(e,t,c,r,[{type:b,actions:cr(In(D),e.options.actions)}],i,a),2),F=P[0],k=P[1];return c=k,u==null||u.push(c),F}case nx:{var D=y.get(c,r.data);if(!D)return[];var H=it(Na(e,t,c,r,[{type:b,actions:cr(In(D),e.options.actions)}],i,a),2),R=H[0],E=H[1];return c=E,u==null||u.push(c),R}case ju:{var C=_x(y,c,r);return i==null||i(C,n,r),C}case Lu:{c=Af(c,r,[y],i?void 0:t),u==null||u.push(c);break}default:var p=ui(y,e.options.actions),$=p.exec;if(i)i(p,c,r);else if($&&u){var A=u.length-1,M=ye(ye({},p),{exec:function(z){for(var U=[],re=1;re<arguments.length;re++)U[re-1]=arguments[re];$.apply(void 0,St([u[A]],it(U),!1))}});p=M}return p}}function m(b){var y,T,S=[];try{for(var v=Ze(b.actions),w=v.next();!w.done;w=v.next()){var C=w.value,I=f(b.type,C);I&&(S=S.concat(I))}}catch(D){y={error:D}}finally{try{w&&!w.done&&(T=v.return)&&T.call(v)}finally{if(y)throw y.error}}return d.forEach(function(D){i(D,c,r)}),d.length=0,S}var h=Tt(o.map(m));return[h,c]}var Df=[],eo=function(e,t){Df.push(e);var n=t(e);return Df.pop(),n};function Av(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[sr]=function(){return this},t}function Tx(e,t,n,r){var o,i=Pv(e.src),a=(o=t==null?void 0:t.options.services)===null||o===void 0?void 0:o[i.type],s=e.data?Da(e.data,n,r):void 0,c=a?Dv(a,e.id,s):Av(e.id);return c.meta=e,c}function Dv(e,t,n){var r=Av(t);if(r.deferred=!0,Mr(e)){var o=r.state=eo(void 0,function(){return(n?e.withContext(n):e).initialState});r.getSnapshot=function(){return o}}return r}function Ix(e){try{return typeof e.send=="function"}catch{return!1}}function Rx(e){return Ix(e)&&"id"in e}function Ox(e){var t;return ye((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[sr]=function(){return this},t),e)}var ka=function(e){return e.type==="atomic"||e.type==="final"};function Nv(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function li(e){return Nv(e).filter(function(t){return t.type!=="history"})}function kv(e){var t=[e];return ka(e)?t:t.concat(Tt(li(e).map(kv)))}function Vo(e,t){var n,r,o,i,a,s,c,u,d=new Set(e),f=Vc(d),m=new Set(t);try{for(var h=Ze(m),b=h.next();!b.done;b=h.next())for(var y=b.value,T=y.parent;T&&!m.has(T);)m.add(T),T=T.parent}catch(k){n={error:k}}finally{try{b&&!b.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var S=Vc(m);try{for(var v=Ze(m),w=v.next();!w.done;w=v.next()){var y=w.value;if(y.type==="compound"&&(!S.get(y)||!S.get(y).length))f.get(y)?f.get(y).forEach(function(H){return m.add(H)}):y.initialStateNodes.forEach(function(H){return m.add(H)});else if(y.type==="parallel")try{for(var C=(a=void 0,Ze(li(y))),I=C.next();!I.done;I=C.next()){var D=I.value;m.has(D)||(m.add(D),f.get(D)?f.get(D).forEach(function(H){return m.add(H)}):D.initialStateNodes.forEach(function(H){return m.add(H)}))}}catch(H){a={error:H}}finally{try{I&&!I.done&&(s=C.return)&&s.call(C)}finally{if(a)throw a.error}}}}catch(k){o={error:k}}finally{try{w&&!w.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}try{for(var P=Ze(m),F=P.next();!F.done;F=P.next())for(var y=F.value,T=y.parent;T&&!m.has(T);)m.add(T),T=T.parent}catch(k){c={error:k}}finally{try{F&&!F.done&&(u=P.return)&&u.call(P)}finally{if(c)throw c.error}}return m}function Mv(e,t){var n=t.get(e);if(!n)return{};if(e.type==="compound"){var r=n[0];if(r){if(ka(r))return r.key}else return{}}var o={};return n.forEach(function(i){o[i.key]=Mv(i,t)}),o}function Vc(e){var t,n,r=new Map;try{for(var o=Ze(e),i=o.next();!i.done;i=o.next()){var a=i.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function Px(e,t){var n=Vo([e],t);return Mv(e,Vc(n))}function Bo(e,t){return Array.isArray(e)?e.some(function(n){return n===t}):e instanceof Set?e.has(t):!1}function Ax(e){return St([],it(new Set(Tt(St([],it(e.map(function(t){return t.ownEvents})),!1)))),!1)}function ya(e,t){return t.type==="compound"?li(t).some(function(n){return n.type==="final"&&Bo(e,n)}):t.type==="parallel"?li(t).every(function(n){return ya(e,n)}):!1}function Dx(e){return e===void 0&&(e=[]),e.reduce(function(t,n){return n.meta!==void 0&&(t[n.id]=n.meta),t},{})}function Nf(e){return new Set(Tt(e.map(function(t){return t.tags})))}function jv(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(at(e)||at(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(function(o){return jv(e[o],t[o])})}function Nx(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function kx(e,t){var n=e.exec,r=ye(ye({},e),{exec:n!==void 0?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return r}var wn=function(){function e(t){var n=this,r;this.actions=[],this.activities=Rf,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||Rf,this.meta=Dx(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(r=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&r!==void 0?r:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return Ax(n.configuration)}})}return e.from=function(t,n){if(t instanceof e)return t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t;var r=oo;return new e({value:t,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=oo;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(t,n){var r=this;if(t===void 0&&(t=this.value),n===void 0&&(n="."),at(t))return[t];var o=Object.keys(t);return o.concat.apply(o,St([],it(o.map(function(i){return r.toStrings(t[i],n).map(function(a){return i+n+a})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var n=t.tags;t.machine;var r=Mu(t,["configuration","transitions","tags","machine"]);return ye(ye({},r),{tags:Array.from(n)})},e.prototype.matches=function(t){return Fu(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var n;jt&&Ut(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,t);return!!(r!=null&&r.transitions.length)&&r.transitions.some(function(o){return o.target!==void 0||o.actions.length})},e}(),Mx={deferEvents:!1},kf=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=ye(ye({},Mx),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},e}(),nc=new Map,jx=0,Ro={bookId:function(){return"x:".concat(jx++)},register:function(e,t){return nc.set(e,t),e},get:function(e){return nc.get(e)},free:function(e){nc.delete(e)}};function Bu(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;jt||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues")}function Lx(){var e=Bu();if(e&&"__xstate__"in e)return e.__xstate__}function Fx(e){if(Bu()){var t=Lx();t&&t.register(e)}}function Vx(e,t){t===void 0&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,a=function(){if(!i){for(i=!0;o.length>0;){var u=o.shift();n=e.transition(n,u,c),r.forEach(function(d){return d.next(n)})}i=!1}},s=Ox({id:t.id,send:function(u){o.push(u),a()},getSnapshot:function(){return n},subscribe:function(u,d,f){var m=ma(u,d,f);return r.add(m),m.next(n),{unsubscribe:function(){r.delete(m)}}}}),c={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(c):n,s}var Bx={sync:!1,autoForward:!1},Vt;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Vt||(Vt={}));var Hx=function(){function e(t,n){n===void 0&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Vt.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(d,f){if(wo(d))return r.batch(d),r.state;var m=zt(ys(d,f));if(r.status===Vt.Stopped)return jt||Ut(!1,'Event "'.concat(m.name,'" was sent to stopped service "').concat(r.machine.id,`". This service has already reached its final state, and will not transition.
135
135
  Event: `).concat(JSON.stringify(m.data))),r.state;if(r.status!==Vt.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(m.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
136
- Event: `).concat(JSON.stringify(m.data)));return r.scheduler.schedule(function(){r.forward(m);var h=r._nextState(m);r.update(h,m)}),r._state},this.sendTo=function(d,f,m){var h=r.parent&&(f===ho.Parent||r.parent.id===f),b=h?r.parent:at(f)?f===ho.Internal?r:r.children.get(f)||Ro.get(f):fx(f)?f:void 0;if(!b){if(!h)throw new Error("Unable to send event to child '".concat(f,"' from service '").concat(r.id,"'."));jt||Ut(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(d.type));return}if("machine"in b){if(r.status!==Vt.Stopped||r.parent!==b||r.state.done){var y=ye(ye({},d),{name:d.name===ex?"".concat(Fo(r.id)):d.name,origin:r.sessionId});!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([b,y]):b.send(y)}}else!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([b,d.data]):b.send(d.data)},this._exec=function(d,f,m,h){h===void 0&&(h=r.machine.options.actions);var b=d.exec||Fc(d.type,h),y=lt(b)?b:b?b.exec:d.exec;if(y)try{return y(f,m.data,r.machine.config.predictableActionArguments?{action:d,_event:m}:{action:d,state:r.state,_event:m})}catch($){throw r.parent&&r.parent.send({type:"xstate.error",data:$}),$}switch(d.type){case Ti:{var T=d;r.defer(T);break}case gs:var S=d;if(typeof S.delay=="number"){r.defer(S);return}else S.to?r.sendTo(S._event,S.to,m===oo):r.send(S._event);break;case Ev:r.cancel(d.sendId);break;case Nc:{if(r.status!==Vt.Running)return;var v=d.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[v.id||v.type])break;if(v.type===bt.Invoke){var w=Ov(v.src),C=r.machine.options.services?r.machine.options.services[w.type]:void 0,I=v.id,D=v.data;jt||Ut(!("forward"in v),"`forward` property is deprecated (found in invocation of '".concat(v.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var P="autoForward"in v?v.autoForward:!!v.forward;if(!C){jt||Ut(!1,"No service found for invocation '".concat(v.src,"' in machine '").concat(r.machine.id,"'."));return}var F=D?Da(D,f,m):void 0;if(typeof C=="string")return;var k=lt(C)?C(f,m.data,{data:F,src:w,meta:v.meta}):C;if(!k)return;var H=void 0;Mr(k)&&(k=F?k.withContext(F):k,H={autoForward:P}),r.spawn(k,I,H)}else r.spawnActivity(v);break}case ju:{r.stopChild(d.activity.id);break}case xv:var R=d,E=R.label,p=R.value;E?r.logger(E,p):r.logger(p);break;default:jt||Ut(!1,"No implementation found for action type '".concat(d.type,"'"));break}};var o=ye(ye({},e.defaultOptions),n),i=o.clock,a=o.logger,s=o.parent,c=o.id,u=c!==void 0?c:t.id;this.id=u,this.logger=a,this.clock=i,this.parent=s,this.options=o,this.scheduler=new Nf({deferEvents:this.options.deferEvents}),this.sessionId=Ro.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:eo(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return jt||Ut(this.status!==Vt.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,n){var r,o;try{for(var i=Ze(t.actions),a=i.next();!a.done;a=i.next()){var s=a.value;this.exec(s,t,n)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},e.prototype.update=function(t,n){var r,o,i,a,s,c,u,d,f=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||n===oo)&&this.options.execute)this.execute(this.state);else for(var m=void 0;m=this._outgoingQueue.shift();)m[0].send(m[1]);if(this.children.forEach(function(k){f.state.children[k.id]=k}),this.devTools&&this.devTools.send(n.data,t),t.event)try{for(var h=Ze(this.eventListeners),b=h.next();!b.done;b=h.next()){var y=b.value;y(t.event)}}catch(k){r={error:k}}finally{try{b&&!b.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}try{for(var T=Ze(this.listeners),S=T.next();!S.done;S=T.next()){var y=S.value;y(t,t.event)}}catch(k){i={error:k}}finally{try{S&&!S.done&&(a=T.return)&&a.call(T)}finally{if(i)throw i.error}}try{for(var v=Ze(this.contextListeners),w=v.next();!w.done;w=v.next()){var C=w.value;C(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(k){s={error:k}}finally{try{w&&!w.done&&(c=v.return)&&c.call(v)}finally{if(s)throw s.error}}if(this.state.done){var I=t.configuration.find(function(k){return k.type==="final"&&k.parent===f.machine}),D=I&&I.doneData?Da(I.doneData,t.context,n):void 0;this._doneEvent=ga(this.id,D);try{for(var P=Ze(this.doneListeners),F=P.next();!F.done;F=P.next()){var y=F.value;y(this._doneEvent)}}catch(k){u={error:k}}finally{try{F&&!F.done&&(d=P.return)&&d.call(P)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),Ro.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===Vt.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,n,r){var o=this,i=ma(t,n,r);this.listeners.add(i.next),this.status!==Vt.NotStarted&&i.next(this.state);var a=function(){o.doneListeners.delete(a),o.stopListeners.delete(a),i.complete()};return this.status===Vt.Stopped?i.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){o.listeners.delete(i.next),o.doneListeners.delete(a),o.stopListeners.delete(a)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===Vt.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var n=this;if(this.status===Vt.Running)return this;this.machine._init(),Ro.register(this.sessionId,this),this.initialized=!0,this.status=Vt.Running;var r=t===void 0?this.initialState:eo(this,function(){return Nx(t)?n.machine.resolveState(t):n.machine.resolveState(wn.from(t,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,oo)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){lt(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,n,r,o,i,a,s,c,u,d;try{for(var f=Ze(this.listeners),m=f.next();!m.done;m=f.next()){var h=m.value;this.listeners.delete(h)}}catch(P){t={error:P}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}try{for(var b=Ze(this.stopListeners),y=b.next();!y.done;y=b.next()){var h=y.value;h(),this.stopListeners.delete(h)}}catch(P){r={error:P}}finally{try{y&&!y.done&&(o=b.return)&&o.call(b)}finally{if(r)throw r.error}}try{for(var T=Ze(this.contextListeners),S=T.next();!S.done;S=T.next()){var h=S.value;this.contextListeners.delete(h)}}catch(P){i={error:P}}finally{try{S&&!S.done&&(a=T.return)&&a.call(T)}finally{if(i)throw i.error}}try{for(var v=Ze(this.doneListeners),w=v.next();!w.done;w=v.next()){var h=w.value;this.doneListeners.delete(h)}}catch(P){s={error:P}}finally{try{w&&!w.done&&(c=v.return)&&c.call(v)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Vt.Stopped,this._initialState=void 0;try{for(var C=Ze(Object.keys(this.delayedEventsMap)),I=C.next();!I.done;I=C.next()){var D=I.value;this.clock.clearTimeout(this.delayedEventsMap[D])}}catch(P){u={error:P}}finally{try{I&&!I.done&&(d=C.return)&&d.call(C)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new Nf({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r=zt({type:"xstate.stop"}),o=eo(t,function(){var i=Tt(St([],it(t.state.configuration),!1).sort(function(d,f){return f.order-d.order}).map(function(d){return cr(d.onExit,t.machine.options.actions)})),a=it(Na(t.machine,t.state,t.state.context,r,[{type:"exit",actions:i}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),s=a[0],c=a[1],u=new wn({value:t.state.value,context:c,_event:r,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:s.filter(function(d){return!Lc(d)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return u.changed=!0,u});t.update(o,r),t._stopChildren(),Ro.free(t.sessionId)}),this},e.prototype.batch=function(t){var n=this;if(this.status===Vt.NotStarted&&this.options.deferEvents)jt||Ut(!1,"".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,`" and are deferred. Make sure .start() is called for this service.
137
- Event: `).concat(JSON.stringify(event)));else if(this.status!==Vt.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(t.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var o,i,a=n.state,s=!1,c=[],u=function(h){var b=zt(h);n.forward(b),a=eo(n,function(){return n.machine.transition(a,b,void 0,r||void 0)}),c.push.apply(c,St([],it(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(y){return kx(y,a)})),!1)),s=s||!!a.changed};try{for(var d=Ze(t),f=d.next();!f.done;f=d.next()){var m=f.value;u(m)}}catch(h){o={error:h}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}a.changed=s,a.actions=c,n.update(a,zt(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var o=zt(t);if(o.name.indexOf(Tf)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Tf)===0}))throw o.data.data;var i=eo(this,function(){return r.machine.transition(r.state,o,void 0,n||void 0)});return i},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var n,r;try{for(var o=Ze(this.forwardTo),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.children.get(a);if(!s)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));s.send(t)}}catch(c){n={error:c}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.defer=function(t){var n=this,r=this.clock.setTimeout(function(){"to"in t&&t.to?n.sendTo(t._event,t.to,!0):n.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=r)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(t,n.context,n._event,r)},e.prototype.removeChild=function(t){var n;this.children.delete(t),this.forwardTo.delete(t),(n=this.state)===null||n===void 0||delete n.children[t]},e.prototype.stopChild=function(t){var n=this.children.get(t);n&&(this.removeChild(t),lt(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,r){if(this.status!==Vt.Running)return Av(t,n);if(Of(t))return this.spawnPromise(Promise.resolve(t),n);if(lt(t))return this.spawnCallback(t,n);if(Rx(t))return this.spawnActor(t,n);if(dx(t))return this.spawnObservable(t,n);if(Mr(t))return this.spawnMachine(t,ye(ye({},r),{id:n}));if(cx(t))return this.spawnBehavior(t,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,n){var r=this;n===void 0&&(n={});var o=new e(t,ye(ye({},this.options),{parent:this,id:n.id||t.id})),i=ye(ye({},Bx),n);i.sync&&o.onTransition(function(s){r.send(_v,{state:s,id:o.id})});var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone(function(s){r.removeChild(o.id),r.send(zt(s,{origin:o.id}))}).start(),a},e.prototype.spawnBehavior=function(t,n){var r=Vx(t,{id:n,parent:this});return this.children.set(n,r),r},e.prototype.spawnPromise=function(t,n){var r,o=this,i=!1,a;t.then(function(c){i||(a=c,o.removeChild(n),o.send(zt(ga(n,c),{origin:n})))},function(c){if(!i){o.removeChild(n);var u=Fo(n,c);try{o.send(zt(u,{origin:n}))}catch(d){px(c,d,n),o.devTools&&o.devTools.send(u,o.state),o.machine.strict&&o.stop()}}});var s=(r={id:n,send:function(){},subscribe:function(c,u,d){var f=ma(c,u,d),m=!1;return t.then(function(h){m||(f.next(h),!m&&f.complete())},function(h){m||f.error(h)}),{unsubscribe:function(){return m=!0}}},stop:function(){i=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return a}},r[sr]=function(){return this},r);return this.children.set(n,s),s},e.prototype.spawnCallback=function(t,n){var r,o=this,i=!1,a=new Set,s=new Set,c,u=function(m){c=m,s.forEach(function(h){return h(m)}),!i&&o.send(zt(m,{origin:n}))},d;try{d=t(u,function(m){a.add(m)})}catch(m){this.send(Fo(n,m))}if(Of(d))return this.spawnPromise(d,n);var f=(r={id:n,send:function(m){return a.forEach(function(h){return h(m)})},subscribe:function(m){var h=ma(m);return s.add(h.next),{unsubscribe:function(){s.delete(h.next)}}},stop:function(){i=!0,lt(d)&&d()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},r[sr]=function(){return this},r);return this.children.set(n,f),f},e.prototype.spawnObservable=function(t,n){var r,o=this,i,a=t.subscribe(function(c){i=c,o.send(zt(c,{origin:n}))},function(c){o.removeChild(n),o.send(zt(Fo(n,c),{origin:n}))},function(){o.removeChild(n),o.send(zt(ga(n),{origin:n}))}),s=(r={id:n,send:function(){},subscribe:function(c,u,d){return t.subscribe(c,u,d)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return i},toJSON:function(){return{id:n}}},r[sr]=function(){return this},r);return this.children.set(n,s),s},e.prototype.spawnActor=function(t,n){return this.children.set(n,t),t},e.prototype.spawnActivity=function(t){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(!n){jt||Ut(!1,"No implementation found for activity '".concat(t.type,"'"));return}var r=n(this.state.context,t);this.spawnEffect(t.id,r)},e.prototype.spawnEffect=function(t,n){var r;this.children.set(t,(r={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},r[sr]=function(){return this},r))},e.prototype.attachDev=function(){var t=Bu();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(ye(ye({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:ye({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}Fx(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[sr]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Vt.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,n){return setTimeout(t,n)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=jv,e}();function jv(e,t){var n=new Hx(e,t);return n}function Wx(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function ea(e){return ye(ye({type:kc},e),{toJSON:function(){e.onDone,e.onError;var t=Mu(e,["onDone","onError"]);return ye(ye({},t),{type:kc,src:Wx(e.src)})}})}var to="",Bc="#",Oo="*",qr={},Xr=function(e){return e[0]===Bc},zx=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Ux=function(e,t,n){var r=n.slice(0,-1).some(function(i){return!("cond"in i)&&!("in"in i)&&(at(i.target)||Mr(i.target))}),o=t===to?"the transient event":"event '".concat(t,"'");Ut(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},Yx=function(){function e(t,n,r,o){r===void 0&&(r="context"in t?t.context:void 0);var i=this,a;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(zx(),n),this.parent=o==null?void 0:o.parent,this.key=this.config.key||(o==null?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:Sv),this.id=this.config.id||St([this.machine.key],it(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,jt||Ut(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Lo(this.config.states,function(u,d){var f,m=new e(u,{},void 0,{parent:i,key:d});return Object.assign(i.idMap,ye((f={},f[m.id]=m,f),m.idMap)),m}):qr;var s=0;function c(u){var d,f;u.order=s++;try{for(var m=Ze(Dv(u)),h=m.next();!h.done;h=m.next()){var b=h.value;c(b)}}catch(y){d={error:y}}finally{try{h&&!h.done&&(f=m.return)&&f.call(m)}finally{if(d)throw d.error}}}c(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(u){var d=u.event;return d===to}):to in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=In(this.config.entry||this.config.onEntry).map(function(u){return ui(u)}),this.onExit=In(this.config.exit||this.config.onExit).map(function(u){return ui(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=In(this.config.invoke).map(function(u,d){var f,m;if(Mr(u)){var h=Qi(i.id,d);return i.machine.options.services=ye((f={},f[h]=u,f),i.machine.options.services),ea({src:h,id:h})}else if(at(u.src)){var h=u.id||Qi(i.id,d);return ea(ye(ye({},u),{id:h,src:u.src}))}else if(Mr(u.src)||lt(u.src)){var h=u.id||Qi(i.id,d);return i.machine.options.services=ye((m={},m[h]=u.src,m),i.machine.options.services),ea(ye(ye({id:h},u),{src:h}))}else{var b=u.src;return ea(ye(ye({id:Qi(i.id,d)},u),{src:b}))}}),this.activities=In(this.config.activities).concat(this.invoke).map(function(u){return Vu(u)}),this.transition=this.transition.bind(this),this.tags=In(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||Nv(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,a=r.guards,s=r.services,c=r.delays;return new e(this.config,{actions:ye(ye({},o),t.actions),activities:ye(ye({},i),t.activities),guards:ye(ye({},a),t.guards),services:ye(ye({},s),t.services),delays:ye(ye({},c),t.delays)},n??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return lt(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Lo(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var n=t===to,r=this.transitions.filter(function(o){var i=o.eventType===t;return n?i:i||o.eventType===Oo});return this.__cache.candidates[t]=r,r},e.prototype.getDelayedTransitions=function(){var t=this,n=this.config.after;if(!n)return[];var r=function(i,a){var s=lt(i)?"".concat(t.id,":delay[").concat(a,"]"):i,c=Cx(s,t.id);return t.onEntry.push(gx(c,{delay:i})),t.onExit.push(wx(c)),c},o=wo(n)?n.map(function(i,a){var s=r(i.delay,a);return ye(ye({},i),{event:s})}):Tt(Object.keys(n).map(function(i,a){var s=n[i],c=at(s)?{target:s}:s,u=isNaN(+i)?i:+i,d=r(u,a);return In(c).map(function(f){return ye(ye({},f),{event:d,delay:u})})}));return o.map(function(i){var a=i.delay;return ye(ye({},t.formatTransition(i)),{delay:a})})},e.prototype.getStateNodes=function(t){var n,r=this;if(!t)return[];var o=t instanceof wn?t.value:Uo(t,this.delimiter);if(at(o)){var i=this.getStateNode(o).initial;return i!==void 0?this.getStateNodes((n={},n[o]=i,n)):[this,this.states[o]]}var a=Object.keys(o),s=[this];return s.push.apply(s,St([],it(Tt(a.map(function(c){return r.getStateNode(c).getStateNodes(o[c])}))),!1)),s},e.prototype.handles=function(t){var n=Cv(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof wn?t:wn.create(t),r=Array.from(Vo([],this.getStateNodes(n.value)));return new wn(ye(ye({},n),{value:this.resolve(n.value),configuration:r,done:ya(r,this),tags:Df(r),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,n,r){var o=this.getStateNode(t),i=o.next(n,r);return!i||!i.transitions.length?this.next(n,r):i},e.prototype.transitionCompoundNode=function(t,n,r){var o=Object.keys(t),i=this.getStateNode(o[0]),a=i._transition(t[o[0]],n,r);return!a||!a.transitions.length?this.next(n,r):a},e.prototype.transitionParallelNode=function(t,n,r){var o,i,a={};try{for(var s=Ze(Object.keys(t)),c=s.next();!c.done;c=s.next()){var u=c.value,d=t[u];if(d){var f=this.getStateNode(u),m=f._transition(d,n,r);m&&(a[u]=m)}}}catch(S){o={error:S}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}var h=Object.keys(a).map(function(S){return a[S]}),b=Tt(h.map(function(S){return S.transitions})),y=h.some(function(S){return S.transitions.length>0});if(!y)return this.next(n,r);var T=Tt(Object.keys(a).map(function(S){return a[S].configuration}));return{transitions:b,exitSet:Tt(h.map(function(S){return S.exitSet})),configuration:T,source:n,actions:Tt(Object.keys(a).map(function(S){return a[S].actions}))}},e.prototype._transition=function(t,n,r){return at(t)?this.transitionLeafNode(t,n,r):Object.keys(t).length===1?this.transitionCompoundNode(t,n,r):this.transitionParallelNode(t,n,r)},e.prototype.getTransitionData=function(t,n){return this._transition(t.value,t,zt(n))},e.prototype.next=function(t,n){var r,o,i=this,a=n.name,s=[],c=[],u;try{for(var d=Ze(this.getCandidates(a)),f=d.next();!f.done;f=d.next()){var m=f.value,h=m.cond,b=m.in,y=t.context,T=b?at(b)&&Xr(b)?t.matches(Uo(this.getStateNodeById(b).path,this.delimiter)):Fu(Uo(b,this.delimiter),ix(this.path.slice(0,-2))(t.value)):!0,S=!1;try{S=!h||Rv(this.machine,h,y,n,t)}catch(C){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
138
- `).concat(C.message))}if(S&&T){m.target!==void 0&&(c=m.target),s.push.apply(s,St([],it(m.actions),!1)),u=m;break}}}catch(C){r={error:C}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}if(u){if(!c.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var v=Tt(c.map(function(C){return i.getRelativeStateNodes(C,t.historyValue)})),w=!!u.internal;return{transitions:[u],exitSet:w?[]:Tt(c.map(function(C){return i.getPotentiallyReenteringNodes(C)})),configuration:v,source:t,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var n=[],r=this,o=t;r&&r!==o;)n.push(r),r=r.parent;return r!==o?[]:(n.push(o),n)},e.prototype.getActions=function(t,n,r,o,i,a,s){var c,u,d,f,m=this,h=a?Vo([],this.getStateNodes(a.value)):[],b=new Set;try{for(var y=Ze(Array.from(t).sort(function(R,E){return R.order-E.order})),T=y.next();!T.done;T=y.next()){var S=T.value;(!Bo(h,S)||Bo(r.exitSet,S)||S.parent&&b.has(S.parent))&&b.add(S)}}catch(R){c={error:R}}finally{try{T&&!T.done&&(u=y.return)&&u.call(y)}finally{if(c)throw c.error}}try{for(var v=Ze(h),w=v.next();!w.done;w=v.next()){var S=w.value;(!Bo(t,S)||Bo(r.exitSet,S.parent))&&r.exitSet.push(S)}}catch(R){d={error:R}}finally{try{w&&!w.done&&(f=v.return)&&f.call(v)}finally{if(d)throw d.error}}r.exitSet.sort(function(R,E){return E.order-R.order});var C=Array.from(b).sort(function(R,E){return R.order-E.order}),I=new Set(r.exitSet),D=Tt(C.map(function(R){var E=[];if(R.type!=="final")return E;var p=R.parent;if(!p.parent)return E;E.push(Ji(R.id,R.doneData),Ji(p.id,R.doneData?Da(R.doneData,o,i):void 0));var $=p.parent;return $.type==="parallel"&&li($).every(function(A){return ya(r.configuration,A)})&&E.push(Ji($.id)),E})),P=C.map(function(R){var E=R.onEntry,p=R.activities.map(function($){return Ex($)});return{type:"entry",actions:cr(s?St(St([],it(E),!1),it(p),!1):St(St([],it(p),!1),it(E),!1),m.machine.options.actions)}}).concat({type:"state_done",actions:D.map(function(R){return vx(R)})}),F=Array.from(I).map(function(R){return{type:"exit",actions:cr(St(St([],it(R.onExit),!1),it(R.activities.map(function(E){return xx(E)})),!1),m.machine.options.actions)}}),k=F.concat({type:"transition",actions:cr(r.actions,this.machine.options.actions)}).concat(P);if(n){var H=cr(Tt(St([],it(t),!1).sort(function(R,E){return E.order-R.order}).map(function(R){return R.onExit})),this.machine.options.actions).filter(function(R){return!Lc(R)});return k.concat({type:"stop",actions:H})}return k},e.prototype.transition=function(t,n,r,o){t===void 0&&(t=this.initialState);var i=zt(n),a;if(t instanceof wn)a=r===void 0?t:this.resolveState(wn.from(t,r));else{var s=at(t)?this.resolve(Aa(this.getResolvedPath(t))):this.resolve(t),c=r??this.machine.context;a=this.resolveState(wn.from(s,c))}if(!jt&&i.name===Oo)throw new Error("An event cannot have the wildcard type ('".concat(Oo,"')"));if(this.strict&&!this.events.includes(i.name)&&!sx(i.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(i.name,"'"));var u=this._transition(a.value,a,i)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},d=Vo([],this.getStateNodes(a.value)),f=u.configuration.length?Vo(d,u.configuration):d;return u.configuration=St([],it(f),!1),this.resolveTransition(u,a,a.context,o,i)},e.prototype.resolveRaisedTransition=function(t,n,r,o){var i,a=t.actions;return t=this.transition(t,n,void 0,o),t._event=r,t.event=r.data,(i=t.actions).unshift.apply(i,St([],it(a),!1)),t},e.prototype.resolveTransition=function(t,n,r,o,i){var a,s,c,u,d=this;i===void 0&&(i=oo);var f=t.configuration,m=!n||t.transitions.length>0,h=m?t.configuration:n?n.configuration:[],b=ya(h,this),y=m?Px(this.machine,f):void 0,T=n?n.historyValue?n.historyValue:t.source?this.machine.historyValue(n.value):void 0:void 0,S=this.getActions(new Set(h),b,t,r,i,n,o),v=n?ye({},n.activities):{};try{for(var w=Ze(S),C=w.next();!C.done;C=w.next()){var I=C.value;try{for(var D=(c=void 0,Ze(I.actions)),P=D.next();!P.done;P=D.next()){var F=P.value;F.type===Nc?v[F.activity.id||F.activity.type]=F:F.type===ju&&(v[F.activity.id||F.activity.type]=!1)}}catch(K){c={error:K}}finally{try{P&&!P.done&&(u=D.return)&&u.call(D)}finally{if(c)throw c.error}}}}catch(K){a={error:K}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}var k=it(Na(this,n,r,i,S,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),H=k[0],R=k[1],E=it(ux(H,Lc),2),p=E[0],$=E[1],A=H.filter(function(K){var Z;return K.type===Nc&&((Z=K.activity)===null||Z===void 0?void 0:Z.type)===kc}),M=A.reduce(function(K,Z){return K[Z.activity.id]=Tx(Z.activity,d.machine,R,i),K},n?ye({},n.children):{}),z=new wn({value:y||n.value,context:R,_event:i,_sessionid:n?n._sessionid:null,historyValue:y?T?lx(T,y):void 0:n?n.historyValue:void 0,history:!y||t.source?n:void 0,actions:y?$:[],activities:y?v:n?n.activities:{},events:[],configuration:h,transitions:t.transitions,children:M,done:b,tags:Df(h),machine:this}),U=r!==R;z.changed=i.name===_v||U;var re=z.history;re&&delete re.history;var B=!b&&(this._transient||f.some(function(K){return K._transient}));if(!m&&(!B||i.name===to))return z;var L=z;if(!b)for(B&&(L=this.resolveRaisedTransition(L,{type:QE},i,o));p.length;){var oe=p.shift();L=this.resolveRaisedTransition(L,oe._event,i,o)}var G=L.changed||(re?!!L.actions.length||U||typeof re.value!=typeof L.value||!Mv(L.value,re.value):void 0);return L.changed=G,L.history=re,L},e.prototype.getStateNode=function(t){if(Xr(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[t];if(!n)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return n},e.prototype.getStateNodeById=function(t){var n=Xr(t)?t.slice(Bc.length):t;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&Xr(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var n=jc(t,this.delimiter).slice(),r=this;n.length;){var o=n.shift();if(!o.length)break;r=r.getStateNode(o)}return r},e.prototype.resolve=function(t){var n,r=this;if(!t)return this.initialStateValue||qr;switch(this.type){case"parallel":return Lo(this.initialStateValue,function(i,a){return i?r.getStateNode(a).resolve(t[a]||i):qr});case"compound":if(at(t)){var o=this.getStateNode(t);return o.type==="parallel"||o.type==="compound"?(n={},n[t]=o.initialStateValue,n):t}return Object.keys(t).length?Lo(t,function(i,a){return i?r.getStateNode(a).resolve(i):qr}):this.initialStateValue||{};default:return t||qr}},e.prototype.getResolvedPath=function(t){if(Xr(t)){var n=this.machine.idMap[t.slice(Bc.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return jc(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Rf(this.states,function(r){return r.initialStateValue||qr},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=ka(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,n){this._init();var r=this.getStateNodes(t);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var n=this.config;at(n.target)?t=Xr(n.target)?Aa(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:t=n.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,n,r){return r===void 0&&(r=!0),r?t.type==="history"?t.resolveHistory(n):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(ka(this))return[this];if(this.type==="compound"&&!this.initial)return jt||Ut(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var n=va(this.initialStateValue);return Tt(n.map(function(r){return t.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var n=it(t),r=n[0],o=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var i=this.getStateNode(r);if(i.type==="history")return i.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(o)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:Rf(this.states,function(n,r){if(!t)return n.historyValue();var o=at(t)?void 0:t[r];return n.historyValue(o||n.initialStateValue)},function(n){return!n.history})}},e.prototype.resolveHistory=function(t){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!t){var o=this.target;return o?Tt(va(o).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var i=ax(r.path,"states")(t).current;return at(i)?[r.getStateNode(i)]:Tt(va(i).map(function(a){return n.history==="deep"?r.getFromRelativePath(a):[r.states[a[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,n=Tt(Object.keys(this.states).map(function(r){return t.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,n,r,o;if(this.__cache.events)return this.__cache.events;var i=this.states,a=new Set(this.ownEvents);if(i)try{for(var s=Ze(Object.keys(i)),c=s.next();!c.done;c=s.next()){var u=c.value,d=i[u];if(d.states)try{for(var f=(r=void 0,Ze(d.events)),m=f.next();!m.done;m=f.next()){var h=m.value;a.add("".concat(h))}}catch(b){r={error:b}}finally{try{m&&!m.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}}}catch(b){t={error:b}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var n=this;if(t!==void 0)return t.map(function(r){if(!at(r))return r;var o=r[0]===n.delimiter;if(o&&!n.parent)return n.getStateNodeByPath(r.slice(1));var i=o?n.key+r:r;if(n.parent)try{var a=n.parent.getStateNodeByPath(i);return a}catch(s){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
139
- `).concat(s.message))}else return n.getStateNodeByPath(i)})},e.prototype.formatTransition=function(t){var n=this,r=hx(t.target),o="internal"in t?t.internal:r?r.some(function(c){return at(c)&&c[0]===n.delimiter}):!0,i=this.machine.options.guards,a=this.resolveTarget(r),s=ye(ye({},t),{actions:cr(In(t.actions)),cond:Iv(t.cond,i),target:a,source:this,internal:o,eventType:t.event,toJSON:function(){return ye(ye({},s),{target:s.target?s.target.map(function(c){return"#".concat(c.id)}):void 0,source:"#".concat(n.id)})}});return s},e.prototype.formatTransitions=function(){var t,n,r=this,o;if(!this.config.on)o=[];else if(Array.isArray(this.config.on))o=this.config.on;else{var i=this.config.on,a=Oo,s=i[a],c=s===void 0?[]:s,u=Mu(i,[typeof a=="symbol"?a:a+""]);o=Tt(Object.keys(u).map(function(v){!jt&&v===to&&Ut(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var w=Kr(v,u[v]);return jt||Ux(r,v,w),w}).concat(Kr(Oo,c)))}var d=this.config.always?Kr("",this.config.always):[],f=this.config.onDone?Kr(String(Ji(this.id)),this.config.onDone):[];jt||Ut(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var m=Tt(this.invoke.map(function(v){var w=[];return v.onDone&&w.push.apply(w,St([],it(Kr(String(ga(v.id)),v.onDone)),!1)),v.onError&&w.push.apply(w,St([],it(Kr(String(Fo(v.id)),v.onError)),!1)),w})),h=this.after,b=Tt(St(St(St(St([],it(f),!1),it(m),!1),it(o),!1),it(d),!1).map(function(v){return In(v).map(function(w){return r.formatTransition(w)})}));try{for(var y=Ze(h),T=y.next();!T.done;T=y.next()){var S=T.value;b.push(S)}}catch(v){t={error:v}}finally{try{T&&!T.done&&(n=y.return)&&n.call(y)}finally{if(t)throw t.error}}return b},e}();function Kx(e,t,n){return n===void 0&&(n=e.context),new Yx(e,t,n)}var qx=Sx,Hc;(function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"})(Hc||(Hc={}));var Yo=l.useLayoutEffect;function kf(e){var t=$e.useRef();return t.current||(t.current={v:e()}),t.current.v}var Xx=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},Gx=globalThis&&globalThis.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Zx(e,t){var n,r,o=Xx([[],[]],2),i=o[0],a=o[1];try{for(var s=Gx(e),c=s.next();!c.done;c=s.next()){var u=c.value;t(u)?i.push(u):a.push(u)}}catch(d){n={error:d}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[i,a]}var Po=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},Mf=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};function jf(e,t){var n=e.exec,r=n(t.context,t._event.data,{action:e,state:t,_event:t._event});r()}function Qx(e){var t=l.useRef([]),n=l.useRef([]);Yo(function(){var r=e.subscribe(function(o){var i,a;if(o.actions.length){var s=o.actions.filter(function(f){return typeof f.exec=="function"&&"__effect"in f.exec}),c=Po(Zx(s,function(f){return f.exec.__effect===Hc.Effect}),2),u=c[0],d=c[1];(i=t.current).push.apply(i,Mf([],Po(u.map(function(f){return[f,o]})),!1)),(a=n.current).push.apply(a,Mf([],Po(d.map(function(f){return[f,o]})),!1))}});return function(){r.unsubscribe()}},[]),Yo(function(){for(;n.current.length;){var r=Po(n.current.shift(),2),o=r[0],i=r[1];jf(o,i)}}),l.useEffect(function(){for(;t.current.length;){var r=Po(t.current.shift(),2),o=r[0],i=r[1];jf(o,i)}})}var Ko=globalThis&&globalThis.__assign||function(){return Ko=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ko.apply(this,arguments)},Jx=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},e_=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};function t_(e,t,n){if(typeof e=="object")return e;var r=function(){};return{next:e,error:t||r,complete:n||r}}function n_(e,t,n){t===void 0&&(t={});var r=kf(function(){return typeof e=="function"?e():e});if(process.env.NODE_ENV!=="production"&&typeof e!="function"){var o=e_(l.useState(r),1),i=o[0];e!==i&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var a=t.context,s=t.guards,c=t.actions,u=t.activities,d=t.services,f=t.delays,m=t.state,h=Jx(t,["context","guards","actions","activities","services","delays","state"]),b=kf(function(){var y={context:a,guards:s,actions:c,activities:u,services:d,delays:f},T=r.withConfig(y,function(){return Ko(Ko({},r.context),a)});return jv(T,Ko({deferEvents:!0},h))});return Yo(function(){var y;return n&&(y=b.subscribe(t_(n))),function(){y==null||y.unsubscribe()}},[n]),Yo(function(){return b.start(m?wn.create(m):void 0),function(){b.stop()}},[]),Yo(function(){Object.assign(b.machine.options.actions,c),Object.assign(b.machine.options.guards,s),Object.assign(b.machine.options.activities,u),Object.assign(b.machine.options.services,d),Object.assign(b.machine.options.delays,f)},[c,s,u,d,f]),Qx(b),b}var r_=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};globalThis&&globalThis.__spreadArray;function o_(e,t){t===void 0&&(t={});var n=l.useCallback(function(s){var c=s.changed===void 0&&Object.keys(s.children).length;(s.changed||c)&&a(s)},[]),r=n_(e,t,n),o=r_(l.useState(function(){var s=r.machine.initialState;return t.state?wn.create(t.state):s}),2),i=o[0],a=o[1];return[i,r.send,r]}var i_=Object.defineProperty,a_=(e,t)=>{for(var n in t)i_(e,n,{get:t[n],enumerable:!0})},An={};a_(An,{assign:()=>u_,colors:()=>pr,createStringInterpolator:()=>qu,skipAnimation:()=>zv,to:()=>Wv,willAdvance:()=>Xu});var Hu=Ri(),He=e=>Ii(e,Hu),Wu=Ri();He.write=e=>Ii(e,Wu);var bs=Ri();He.onStart=e=>Ii(e,bs);var zu=Ri();He.onFrame=e=>Ii(e,zu);var Uu=Ri();He.onFinish=e=>Ii(e,Uu);var io=[];He.setTimeout=(e,t)=>{const n=He.now()+t,r=()=>{const i=io.findIndex(a=>a.cancel==r);~i&&io.splice(i,1),dr-=~i?1:0},o={time:n,handler:e,cancel:r};return io.splice(Lv(n),0,o),dr+=1,Fv(),o};var Lv=e=>~(~io.findIndex(t=>t.time>e)||~io.length);He.cancel=e=>{bs.delete(e),zu.delete(e),Uu.delete(e),Hu.delete(e),Wu.delete(e)};He.sync=e=>{Wc=!0,He.batchedUpdates(e),Wc=!1};He.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...o){t=o,He.onStart(n)}return r.handler=e,r.cancel=()=>{bs.delete(n),t=null},r};var Yu=typeof window<"u"?window.requestAnimationFrame:()=>{};He.use=e=>Yu=e;He.now=typeof performance<"u"?()=>performance.now():Date.now;He.batchedUpdates=e=>e();He.catch=console.error;He.frameLoop="always";He.advance=()=>{He.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Bv()};var lr=-1,dr=0,Wc=!1;function Ii(e,t){Wc?(t.delete(e),e(0)):(t.add(e),Fv())}function Fv(){lr<0&&(lr=0,He.frameLoop!=="demand"&&Yu(Vv))}function s_(){lr=-1}function Vv(){~lr&&(Yu(Vv),He.batchedUpdates(Bv))}function Bv(){const e=lr;lr=He.now();const t=Lv(lr);if(t&&(Hv(io.splice(0,t),n=>n.handler()),dr-=t),!dr){s_();return}bs.flush(),Hu.flush(e?Math.min(64,lr-e):16.667),zu.flush(),Wu.flush(),Uu.flush()}function Ri(){let e=new Set,t=e;return{add(n){dr+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return dr-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,dr-=t.size,Hv(t,r=>r(n)&&e.add(r)),dr+=e.size,t=e)}}}function Hv(e,t){e.forEach(n=>{try{t(n)}catch(r){He.catch(r)}})}function zc(){}var c_=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ve={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Kn(e,t){if(ve.arr(e)){if(!ve.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Qe=(e,t)=>e.forEach(t);function Bn(e,t,n){if(ve.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var pn=e=>ve.und(e)?[]:ve.arr(e)?e:[e];function qo(e,t){if(e.size){const n=Array.from(e);e.clear(),Qe(n,t)}}var Ho=(e,...t)=>qo(e,n=>n(...t)),Ku=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),qu,Wv,pr=null,zv=!1,Xu=zc,u_=e=>{e.to&&(Wv=e.to),e.now&&(He.now=e.now),e.colors!==void 0&&(pr=e.colors),e.skipAnimation!=null&&(zv=e.skipAnimation),e.createStringInterpolator&&(qu=e.createStringInterpolator),e.requestAnimationFrame&&He.use(e.requestAnimationFrame),e.batchedUpdates&&(He.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Xu=e.willAdvance),e.frameLoop&&(He.frameLoop=e.frameLoop)},Xo=new Set,_n=[],rc=[],Ma=0,ws={get idle(){return!Xo.size&&!_n.length},start(e){Ma>e.priority?(Xo.add(e),He.onStart(l_)):(Uv(e),He(Uc))},advance:Uc,sort(e){if(Ma)He.onFrame(()=>ws.sort(e));else{const t=_n.indexOf(e);~t&&(_n.splice(t,1),Yv(e))}},clear(){_n=[],Xo.clear()}};function l_(){Xo.forEach(Uv),Xo.clear(),He(Uc)}function Uv(e){_n.includes(e)||Yv(e)}function Yv(e){_n.splice(d_(_n,t=>t.priority>e.priority),0,e)}function Uc(e){const t=rc;for(let n=0;n<_n.length;n++){const r=_n[n];Ma=r.priority,r.idle||(Xu(r),r.advance(e),r.idle||t.push(r))}return Ma=0,rc=_n,rc.length=0,_n=t,_n.length>0}function d_(e,t){const n=e.findIndex(t);return n<0?e.length:n}var f_=(e,t,n)=>Math.min(Math.max(n,e),t),h_={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},On="[-+]?\\d*\\.?\\d+",ja=On+"%";function Es(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var p_=new RegExp("rgb"+Es(On,On,On)),v_=new RegExp("rgba"+Es(On,On,On,On)),m_=new RegExp("hsl"+Es(On,ja,ja)),g_=new RegExp("hsla"+Es(On,ja,ja,On)),y_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,b_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,w_=/^#([0-9a-fA-F]{6})$/,E_=/^#([0-9a-fA-F]{8})$/;function x_(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=w_.exec(e))?parseInt(t[1]+"ff",16)>>>0:pr&&pr[e]!==void 0?pr[e]:(t=p_.exec(e))?(Gr(t[1])<<24|Gr(t[2])<<16|Gr(t[3])<<8|255)>>>0:(t=v_.exec(e))?(Gr(t[1])<<24|Gr(t[2])<<16|Gr(t[3])<<8|Vf(t[4]))>>>0:(t=y_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=E_.exec(e))?parseInt(t[1],16)>>>0:(t=b_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=m_.exec(e))?(Lf(Ff(t[1]),ta(t[2]),ta(t[3]))|255)>>>0:(t=g_.exec(e))?(Lf(Ff(t[1]),ta(t[2]),ta(t[3]))|Vf(t[4]))>>>0:null}function oc(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Lf(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=oc(o,r,e+1/3),a=oc(o,r,e),s=oc(o,r,e-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(s*255)<<8}function Gr(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Ff(e){return(parseFloat(e)%360+360)%360/360}function Vf(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function ta(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Bf(e){let t=x_(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,o=(t&65280)>>>8,i=(t&255)/255;return`rgba(${n}, ${r}, ${o}, ${i})`}var di=(e,t,n)=>{if(ve.fun(e))return e;if(ve.arr(e))return di({range:e,output:t,extrapolate:n});if(ve.str(e.output[0]))return qu(e);const r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{const d=S_(u,i);return __(u,i[d],i[d+1],o[d],o[d+1],c,a,s,r.map)}};function __(e,t,n,r,o,i,a,s,c){let u=c?c(e):e;if(u<t){if(a==="identity")return u;a==="clamp"&&(u=t)}if(u>n){if(s==="identity")return u;s==="clamp"&&(u=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=i(u),r===-1/0?u=-u:o===1/0?u=u+r:u=u*(o-r)+r,u)}function S_(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var C_=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,o=t==="end"?Math.floor(r):Math.ceil(r);return f_(0,1,o/e)},La=1.70158,na=La*1.525,Hf=La+1,Wf=2*Math.PI/3,zf=2*Math.PI/4.5,ra=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,$_={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Hf*e*e*e-La*e*e,easeOutBack:e=>1+Hf*Math.pow(e-1,3)+La*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((na+1)*2*e-na)/2:(Math.pow(2*e-2,2)*((na+1)*(e*2-2)+na)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Wf),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Wf)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*zf))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*zf)/2+1,easeInBounce:e=>1-ra(1-e),easeOutBounce:ra,easeInOutBounce:e=>e<.5?(1-ra(1-2*e))/2:(1+ra(2*e-1))/2,steps:C_},fi=Symbol.for("FluidValue.get"),po=Symbol.for("FluidValue.observers"),En=e=>!!(e&&e[fi]),on=e=>e&&e[fi]?e[fi]():e,Uf=e=>e[po]||null;function T_(e,t){e.eventObserved?e.eventObserved(t):e(t)}function hi(e,t){const n=e[po];n&&n.forEach(r=>{T_(r,t)})}var Kv=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");I_(this,e)}},I_=(e,t)=>qv(e,fi,t);function Eo(e,t){if(e[fi]){let n=e[po];n||qv(e,po,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function pi(e,t){const n=e[po];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[po]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var qv=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ba=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,R_=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Yf=new RegExp(`(${ba.source})(%|[a-z]+)`,"i"),O_=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,xs=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Xv=e=>{const[t,n]=P_(e);if(!t||Ku())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(n);return o||e}else{if(n&&xs.test(n))return Xv(n);if(n)return n}return e},P_=e=>{const t=xs.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ic,A_=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Gv=e=>{ic||(ic=pr?new RegExp(`(${Object.keys(pr).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>on(i).replace(xs,Xv).replace(R_,Bf).replace(ic,Bf)),n=t.map(i=>i.match(ba).map(Number)),o=n[0].map((i,a)=>n.map(s=>{if(!(a in s))throw Error('The arity of each "output" value must be equal');return s[a]})).map(i=>di({...e,output:i}));return i=>{var c;const a=!Yf.test(t[0])&&((c=t.find(u=>Yf.test(u)))==null?void 0:c.replace(ba,""));let s=0;return t[0].replace(ba,()=>`${o[s++](i)}${a||""}`).replace(O_,A_)}},Gu="react-spring: ",Zv=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Gu}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},D_=Zv(console.warn);function N_(){D_(`${Gu}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var k_=Zv(console.warn);function M_(){k_(`${Gu}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function _s(e){return ve.str(e)&&(e[0]=="#"||/\d/.test(e)||!Ku()&&xs.test(e)||e in(pr||{}))}var Zu=Ku()?l.useEffect:l.useLayoutEffect,j_=()=>{const e=l.useRef(!1);return Zu(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Qv(){const e=l.useState()[1],t=j_();return()=>{t.current&&e(Math.random())}}function L_(e,t){const[n]=l.useState(()=>({inputs:t,result:e()})),r=l.useRef(),o=r.current;let i=o;return i?t&&i.inputs&&F_(t,i.inputs)||(i={inputs:t,result:e()}):i=n,l.useEffect(()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)},[i]),i.result}function F_(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Jv=e=>l.useEffect(e,V_),V_=[];function Kf(e){const t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var vi=Symbol.for("Animated:node"),B_=e=>!!e&&e[vi]===e,Fn=e=>e&&e[vi],Qu=(e,t)=>c_(e,vi,t),Ss=e=>e&&e[vi]&&e[vi].getPayload(),em=class{constructor(){Qu(this,this)}getPayload(){return this.payload||[]}},Oi=class extends em{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,ve.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Oi(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return ve.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,ve.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},mi=class extends Oi{constructor(e){super(0),this._string=null,this._toString=di({output:[e,e]})}static create(e){return new mi(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(ve.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=di({output:[this.getValue(),e]})),this._value=0,super.reset()}},Fa={dependencies:null},Cs=class extends em{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Bn(this.source,(n,r)=>{B_(n)?t[r]=n.getValue(e):En(n)?t[r]=on(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Qe(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return Bn(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Fa.dependencies&&En(e)&&Fa.dependencies.add(e);const t=Ss(e);t&&Qe(t,n=>this.add(n))}},tm=class extends Cs{constructor(e){super(e)}static create(e){return new tm(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(H_)),!0)}};function H_(e){return(_s(e)?mi:Oi).create(e)}function Yc(e){const t=Fn(e);return t?t.constructor:ve.arr(e)?tm:_s(e)?mi:Oi}var qf=(e,t)=>{const n=!ve.fun(e)||e.prototype&&e.prototype.isReactComponent;return l.forwardRef((r,o)=>{const i=l.useRef(null),a=n&&l.useCallback(b=>{i.current=U_(o,b)},[o]),[s,c]=z_(r,t),u=Qv(),d=()=>{const b=i.current;if(n&&!b)return;(b?t.applyAnimatedValues(b,s.getValue(!0)):!1)===!1&&u()},f=new W_(d,c),m=l.useRef();Zu(()=>(m.current=f,Qe(c,b=>Eo(b,f)),()=>{m.current&&(Qe(m.current.deps,b=>pi(b,m.current)),He.cancel(m.current.update))})),l.useEffect(d,[]),Jv(()=>()=>{const b=m.current;Qe(b.deps,y=>pi(y,b))});const h=t.getComponentProps(s.getValue());return $e.createElement(e,{...h,ref:a})})},W_=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&He.write(this.update)}};function z_(e,t){const n=new Set;return Fa.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Cs(e),Fa.dependencies=null,[e,n]}function U_(e,t){return e&&(ve.fun(e)?e(t):e.current=t),t}var Xf=Symbol.for("AnimatedComponent"),Y_=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=o=>new Cs(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=a=>{const s=Gf(a)||"Anonymous";return ve.str(a)?a=i[a]||(i[a]=qf(a,o)):a=a[Xf]||(a[Xf]=qf(a,o)),a.displayName=`Animated(${s})`,a};return Bn(e,(a,s)=>{ve.arr(e)&&(s=Gf(a)),i[s]=i(a)}),{animated:i}},Gf=e=>ve.str(e)?e:e&&ve.str(e.displayName)?e.displayName:ve.fun(e)&&e.name||null;function Ir(e,...t){return ve.fun(e)?e(...t):e}var Go=(e,t)=>e===!0||!!(t&&e&&(ve.fun(e)?e(t):pn(e).includes(t))),nm=(e,t)=>ve.obj(e)?t&&e[t]:e,rm=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,K_=e=>e,Ju=(e,t=K_)=>{let n=q_;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const i=t(e[o],o);ve.und(i)||(r[o]=i)}return r},q_=["config","onProps","onStart","onChange","onPause","onResume","onRest"],X_={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function G_(e){const t={};let n=0;if(Bn(e,(r,o)=>{X_[o]||(t[o]=r,n++)}),n)return t}function om(e){const t=G_(e);if(t){const n={to:t};return Bn(e,(r,o)=>o in t||(n[o]=r)),n}return{...e}}function gi(e){return e=on(e),ve.arr(e)?e.map(gi):_s(e)?An.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Z_(e){for(const t in e)return!0;return!1}function Kc(e){return ve.fun(e)||ve.arr(e)&&ve.obj(e[0])}function Q_(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function J_(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var im={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},qc={...im.default,mass:1,damping:1,easing:$_.linear,clamp:!1},eS=class{constructor(){this.velocity=0,Object.assign(this,qc)}};function tS(e,t,n){n&&(n={...n},Zf(n,t),t={...n,...t}),Zf(e,t),Object.assign(e,t);for(const a in qc)e[a]==null&&(e[a]=qc[a]);let{frequency:r,damping:o}=e;const{mass:i}=e;return ve.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r),e}function Zf(e,t){if(!ve.und(t.decay))e.duration=void 0;else{const n=!ve.und(t.tension)||!ve.und(t.friction);(n||!ve.und(t.frequency)||!ve.und(t.damping)||!ve.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var Qf=[],nS=class{constructor(){this.changed=!1,this.values=Qf,this.toValues=null,this.fromValues=Qf,this.config=new eS,this.immediate=!1}};function am(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise((a,s)=>{let c,u,d=Go(n.cancel??(r==null?void 0:r.cancel),t);if(d)h();else{ve.und(n.pause)||(o.paused=Go(n.pause,t));let b=r==null?void 0:r.pause;b!==!0&&(b=o.paused||Go(b,t)),c=Ir(n.delay||0,t),b?(o.resumeQueue.add(m),i.pause()):(i.resume(),m())}function f(){o.resumeQueue.add(m),o.timeouts.delete(u),u.cancel(),c=u.time-He.now()}function m(){c>0&&!An.skipAnimation?(o.delayed=!0,u=He.setTimeout(h,c),o.pauseQueue.add(f),o.timeouts.add(u)):h()}function h(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(f),o.timeouts.delete(u),e<=(o.cancelId||0)&&(d=!0);try{i.start({...n,callId:e,cancel:d},a)}catch(b){s(b)}}})}var el=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?ao(e.get()):t.every(n=>n.noop)?sm(e.get()):Rn(e.get(),t.every(n=>n.finished)),sm=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Rn=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),ao=e=>({value:e,cancelled:!0,finished:!1});function cm(e,t,n,r){const{callId:o,parentId:i,onRest:a}=t,{asyncTo:s,promise:c}=n;return!i&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const u=Ju(t,(T,S)=>S==="onRest"?void 0:T);let d,f;const m=new Promise((T,S)=>(d=T,f=S)),h=T=>{const S=o<=(n.cancelId||0)&&ao(r)||o!==n.asyncId&&Rn(r,!1);if(S)throw T.result=S,f(T),T},b=(T,S)=>{const v=new Jf,w=new eh;return(async()=>{if(An.skipAnimation)throw yi(n),w.result=Rn(r,!1),f(w),w;h(v);const C=ve.obj(T)?{...T}:{...S,to:T};C.parentId=o,Bn(u,(D,P)=>{ve.und(C[P])&&(C[P]=D)});const I=await r.start(C);return h(v),n.paused&&await new Promise(D=>{n.resumeQueue.add(D)}),I})()};let y;if(An.skipAnimation)return yi(n),Rn(r,!1);try{let T;ve.arr(e)?T=(async S=>{for(const v of S)await b(v)})(e):T=Promise.resolve(e(b,r.stop.bind(r))),await Promise.all([T.then(d),m]),y=Rn(r.get(),!0,!1)}catch(T){if(T instanceof Jf)y=T.result;else if(T instanceof eh)y=T.result;else throw T}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?s:void 0,n.promise=i?c:void 0)}return ve.fun(a)&&He.batchedUpdates(()=>{a(y,r,r.item)}),y})()}function yi(e,t){qo(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Jf=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},eh=class extends Error{constructor(){super("SkipAnimationSignal")}},Xc=e=>e instanceof tl,rS=1,tl=class extends Kv{constructor(){super(...arguments),this.id=rS++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Fn(this);return e&&e.getValue()}to(...e){return An.to(this,e)}interpolate(...e){return N_(),An.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){hi(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||ws.sort(this),hi(this,{type:"priority",parent:this,priority:e})}},jr=Symbol.for("SpringPhase"),um=1,Gc=2,Zc=4,ac=e=>(e[jr]&um)>0,ir=e=>(e[jr]&Gc)>0,Ao=e=>(e[jr]&Zc)>0,th=(e,t)=>t?e[jr]|=Gc|um:e[jr]&=~Gc,nh=(e,t)=>t?e[jr]|=Zc:e[jr]&=~Zc,oS=class extends tl{constructor(e,t){if(super(),this.animation=new nS,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!ve.und(e)||!ve.und(t)){const n=ve.obj(e)?{...e}:{...t,from:e};ve.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ir(this)||this._state.asyncTo)||Ao(this)}get goal(){return on(this.animation.to)}get velocity(){const e=Fn(this);return e instanceof Oi?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ac(this)}get isAnimating(){return ir(this)}get isPaused(){return Ao(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,a=Ss(r.to);!a&&En(r.to)&&(o=pn(on(r.to))),r.values.forEach((u,d)=>{if(u.done)return;const f=u.constructor==mi?1:a?a[d].lastPosition:o[d];let m=r.immediate,h=f;if(!m){if(h=u.lastPosition,i.tension<=0){u.done=!0;return}let b=u.elapsedTime+=e;const y=r.fromValues[d],T=u.v0!=null?u.v0:u.v0=ve.arr(i.velocity)?i.velocity[d]:i.velocity;let S;const v=i.precision||(y==f?.005:Math.min(1,Math.abs(f-y)*.001));if(ve.und(i.duration))if(i.decay){const w=i.decay===!0?.998:i.decay,C=Math.exp(-(1-w)*b);h=y+T/(1-w)*(1-C),m=Math.abs(u.lastPosition-h)<=v,S=T*C}else{S=u.lastVelocity==null?T:u.lastVelocity;const w=i.restVelocity||v/10,C=i.clamp?0:i.bounce,I=!ve.und(C),D=y==f?u.v0>0:y<f;let P,F=!1;const k=1,H=Math.ceil(e/k);for(let R=0;R<H&&(P=Math.abs(S)>w,!(!P&&(m=Math.abs(f-h)<=v,m)));++R){I&&(F=h==f||h>f==D,F&&(S=-S*C,h=f));const E=-i.tension*1e-6*(h-f),p=-i.friction*.001*S,$=(E+p)/i.mass;S=S+$*k,h=h+S*k}}else{let w=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,u.durationProgress>0&&(u.elapsedTime=i.duration*u.durationProgress,b=u.elapsedTime+=e)),w=(i.progress||0)+b/this._memoizedDuration,w=w>1?1:w<0?0:w,u.durationProgress=w),h=y+i.easing(w)*(f-y),S=(h-u.lastPosition)/e,m=w==1}u.lastVelocity=S,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),m=!0)}a&&!a[d].done&&(m=!1),m?u.done=!0:t=!1,u.setValue(h,i.round)&&(n=!0)});const s=Fn(this),c=s.getValue();if(t){const u=on(r.to);(c!==u||n)&&!i.decay?(s.setValue(u),this._onChange(u)):n&&i.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return He.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ir(this)){const{to:e,config:t}=this.animation;He.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return ve.und(e)?(n=this.queue||[],this.queue=[]):n=[ve.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>el(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),yi(this._state,e&&this._lastCallId),He.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=ve.obj(n)?n[t]:n,(n==null||Kc(n))&&(n=void 0),r=ve.obj(r)?r[t]:r,r==null&&(r=void 0);const o={to:n,from:r};return ac(this)||(e.reverse&&([n,r]=[r,n]),r=on(r),ve.und(r)?Fn(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Ju(e,(a,s)=>/^on/.test(s)?nm(a,n):a)),oh(this,e,"onProps"),No(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return am(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Ao(this)||(nh(this,!0),Ho(i.pauseQueue),No(this,"onPause",Rn(this,Do(this,this.animation.to)),this))},resume:()=>{Ao(this)&&(nh(this,!1),ir(this)&&this._resume(),Ho(i.resumeQueue),No(this,"onResume",Rn(this,Do(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(a=>{if(e.loop&&a.finished&&!(t&&a.noop)){const s=lm(e);if(s)return this._update(s,!0)}return a})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(ao(this));const r=!ve.und(e.to),o=!ve.und(e.from);if(r||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(ao(this));const{key:i,defaultProps:a,animation:s}=this,{to:c,from:u}=s;let{to:d=c,from:f=u}=e;o&&!r&&(!t.default||ve.und(d))&&(d=f),t.reverse&&([d,f]=[f,d]);const m=!Kn(f,u);m&&(s.from=f),f=on(f);const h=!Kn(d,c);h&&this._focus(d);const b=Kc(t.to),{config:y}=s,{decay:T,velocity:S}=y;(r||o)&&(y.velocity=0),t.config&&!b&&tS(y,Ir(t.config,i),t.config!==a.config?Ir(a.config,i):void 0);let v=Fn(this);if(!v||ve.und(d))return n(Rn(this,!0));const w=ve.und(t.reset)?o&&!t.default:!ve.und(f)&&Go(t.reset,i),C=w?f:this.get(),I=gi(d),D=ve.num(I)||ve.arr(I)||_s(I),P=!b&&(!D||Go(a.immediate||t.immediate,i));if(h){const R=Yc(d);if(R!==v.constructor)if(P)v=this._set(I);else throw Error(`Cannot animate between ${v.constructor.name} and ${R.name}, as the "to" prop suggests`)}const F=v.constructor;let k=En(d),H=!1;if(!k){const R=w||!ac(this)&&m;(h||R)&&(H=Kn(gi(C),I),k=!H),(!Kn(s.immediate,P)&&!P||!Kn(y.decay,T)||!Kn(y.velocity,S))&&(k=!0)}if(H&&ir(this)&&(s.changed&&!w?k=!0:k||this._stop(c)),!b&&((k||En(c))&&(s.values=v.getPayload(),s.toValues=En(d)?null:F==mi?[1]:pn(I)),s.immediate!=P&&(s.immediate=P,!P&&!w&&this._set(c)),k)){const{onRest:R}=s;Qe(aS,p=>oh(this,t,p));const E=Rn(this,Do(this,c));Ho(this._pendingCalls,E),this._pendingCalls.add(n),s.changed&&He.batchedUpdates(()=>{var p;s.changed=!w,R==null||R(E,this),w?Ir(a.onRest,E):(p=s.onStart)==null||p.call(s,E,this)})}w&&this._set(C),b?n(cm(t.to,t,this._state,this)):k?this._start():ir(this)&&!h?this._pendingCalls.add(n):n(sm(C))}_focus(e){const t=this.animation;e!==t.to&&(Uf(this)&&this._detach(),t.to=e,Uf(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;En(t)&&(Eo(t,this),Xc(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;En(e)&&pi(e,this)}_set(e,t=!0){const n=on(e);if(!ve.und(n)){const r=Fn(this);if(!r||!Kn(n,r.getValue())){const o=Yc(n);!r||r.constructor!=o?Qu(this,o.create(n)):r.setValue(n),r&&He.batchedUpdates(()=>{this._onChange(n,t)})}}return Fn(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,No(this,"onStart",Rn(this,Do(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ir(this.animation.onChange,e,this)),Ir(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Fn(this).reset(on(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ir(this)||(th(this,!0),Ao(this)||this._resume())}_resume(){An.skipAnimation?this.finish():ws.start(this)}_stop(e,t){if(ir(this)){th(this,!1);const n=this.animation;Qe(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),hi(this,{type:"idle",parent:this});const r=t?ao(this.get()):Rn(this.get(),Do(this,e??n.to));Ho(this._pendingCalls,r),n.changed&&(n.changed=!1,No(this,"onRest",r,this))}}};function Do(e,t){const n=gi(t),r=gi(e.get());return Kn(r,n)}function lm(e,t=e.loop,n=e.to){const r=Ir(t);if(r){const o=r!==!0&&om(r),i=(o||e).reverse,a=!o||o.reset;return bi({...e,loop:t,default:!1,pause:void 0,to:!i||Kc(n)?n:void 0,from:a?e.from:void 0,reset:a,...o})}}function bi(e){const{to:t,from:n}=e=om(e),r=new Set;return ve.obj(t)&&rh(t,r),ve.obj(n)&&rh(n,r),e.keys=r.size?Array.from(r):null,e}function iS(e){const t=bi(e);return ve.und(t.default)&&(t.default=Ju(t)),t}function rh(e,t){Bn(e,(n,r)=>n!=null&&t.add(r))}var aS=["onStart","onRest","onChange","onPause","onResume"];function oh(e,t,n){e.animation[n]=t[n]!==rm(t,n)?nm(t[n],e.key):void 0}function No(e,t,...n){var r,o,i,a;(o=(r=e.animation)[t])==null||o.call(r,...n),(a=(i=e.defaultProps)[t])==null||a.call(i,...n)}var sS=["onStart","onChange","onRest"],cS=1,uS=class{constructor(t,n){this.id=cS++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),n&&(this._flush=n),t&&this.start({default:!0,...t})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((n,r)=>t[r]=n.get()),t}set(t){for(const n in t){const r=t[n];ve.und(r)||this.springs[n].set(r)}}update(t){return t&&this.queue.push(bi(t)),this}start(t){let{queue:n}=this;return t?n=pn(t).map(bi):this.queue=[],this._flush?this._flush(this,n):(vm(this,n),Qc(this,n))}stop(t,n){if(t!==!!t&&(n=t),n){const r=this.springs;Qe(pn(n),o=>r[o].stop(!!t))}else yi(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(ve.und(t))this.start({pause:!0});else{const n=this.springs;Qe(pn(t),r=>n[r].pause())}return this}resume(t){if(ve.und(t))this.start({pause:!1});else{const n=this.springs;Qe(pn(t),r=>n[r].resume())}return this}each(t){Bn(this.springs,t)}_onFrame(){const{onStart:t,onChange:n,onRest:r}=this._events,o=this._active.size>0,i=this._changed.size>0;(o&&!this._started||i&&!this._started)&&(this._started=!0,qo(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));const a=!o&&this._started,s=i||a&&r.size?this.get():null;i&&n.size&&qo(n,([c,u])=>{u.value=s,c(u,this,this._item)}),a&&(this._started=!1,qo(r,([c,u])=>{u.value=s,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;He.onFrame(this._onFrame)}};function Qc(e,t){return Promise.all(t.map(n=>dm(e,n))).then(n=>el(e,n))}async function dm(e,t,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:c}=t,u=ve.obj(t.default)&&t.default;a&&(t.loop=!1),o===!1&&(t.to=null),i===!1&&(t.from=null);const d=ve.arr(o)||ve.fun(o)?o:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Qe(sS,y=>{const T=t[y];if(ve.fun(T)){const S=e._events[y];t[y]=({finished:v,cancelled:w})=>{const C=S.get(T);C?(v||(C.finished=!1),w&&(C.cancelled=!0)):S.set(T,{value:null,finished:v||!1,cancelled:w||!1})},u&&(u[y]=t[y])}});const f=e._state;t.pause===!f.paused?(f.paused=t.pause,Ho(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);const m=(r||Object.keys(e.springs)).map(y=>e.springs[y].start(t)),h=t.cancel===!0||rm(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(am(++e._lastAsyncId,{props:t,state:f,actions:{pause:zc,resume:zc,start(y,T){h?(yi(f,e._lastAsyncId),T(ao(e))):(y.onRest=s,T(cm(d,y,f,e)))}}})),f.paused&&await new Promise(y=>{f.resumeQueue.add(y)});const b=el(e,await Promise.all(m));if(a&&b.finished&&!(n&&b.noop)){const y=lm(t,a,o);if(y)return vm(e,[y]),dm(e,y,!0)}return c&&He.batchedUpdates(()=>c(b,e,e.item)),b}function ih(e,t){const n={...e.springs};return t&&Qe(pn(t),r=>{ve.und(r.keys)&&(r=bi(r)),ve.obj(r.to)||(r={...r,to:void 0}),pm(n,r,o=>hm(o))}),fm(e,n),n}function fm(e,t){Bn(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Eo(n,e))})}function hm(e,t){const n=new oS;return n.key=e,t&&Eo(n,t),n}function pm(e,t,n){t.keys&&Qe(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function vm(e,t){Qe(t,n=>{pm(e.springs,n,r=>hm(r,e))})}var $s=({children:e,...t})=>{const n=l.useContext(Va),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=L_(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=Va;return $e.createElement(i,{value:t},e)},Va=lS($s,{});$s.Provider=Va.Provider;$s.Consumer=Va.Consumer;function lS(e,t){return Object.assign(e,$e.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var dS=()=>{const e=[],t=function(r){M_();const o=[];return Qe(e,(i,a)=>{if(ve.und(r))o.push(i.start());else{const s=n(r,i,a);s&&o.push(i.start(s))}}),o};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const o=e.indexOf(r);~o&&e.splice(o,1)},t.pause=function(){return Qe(e,r=>r.pause(...arguments)),this},t.resume=function(){return Qe(e,r=>r.resume(...arguments)),this},t.set=function(r){Qe(e,(o,i)=>{const a=ve.fun(r)?r(i,o):r;a&&o.set(a)})},t.start=function(r){const o=[];return Qe(e,(i,a)=>{if(ve.und(r))o.push(i.start());else{const s=this._getProps(r,i,a);s&&o.push(i.start(s))}}),o},t.stop=function(){return Qe(e,r=>r.stop(...arguments)),this},t.update=function(r){return Qe(e,(o,i)=>o.update(this._getProps(r,o,i))),this};const n=function(r,o,i){return ve.fun(r)?r(i,o):r};return t._getProps=n,t};function fS(e,t,n){const r=ve.fun(t)&&t;r&&!n&&(n=[]);const o=l.useMemo(()=>r||arguments.length==3?dS():void 0,[]),i=l.useRef(0),a=Qv(),s=l.useMemo(()=>({ctrls:[],queue:[],flush(S,v){const w=ih(S,v);return i.current>0&&!s.queue.length&&!Object.keys(w).some(I=>!S.springs[I])?Qc(S,v):new Promise(I=>{fm(S,w),s.queue.push(()=>{I(Qc(S,v))}),a()})}}),[]),c=l.useRef([...s.ctrls]),u=[],d=Kf(e)||0;l.useMemo(()=>{Qe(c.current.slice(e,d),S=>{Q_(S,o),S.stop(!0)}),c.current.length=e,f(d,e)},[e]),l.useMemo(()=>{f(0,Math.min(d,e))},n);function f(S,v){for(let w=S;w<v;w++){const C=c.current[w]||(c.current[w]=new uS(null,s.flush)),I=r?r(w,C):t[w];I&&(u[w]=iS(I))}}const m=c.current.map((S,v)=>ih(S,u[v])),h=l.useContext($s),b=Kf(h),y=h!==b&&Z_(h);Zu(()=>{i.current++,s.ctrls=c.current;const{queue:S}=s;S.length&&(s.queue=[],Qe(S,v=>v())),Qe(c.current,(v,w)=>{o==null||o.add(v),y&&v.start({default:h});const C=u[w];C&&(J_(v,C.ref),v.ref?v.queue.push(C):v.start(C))})}),Jv(()=>()=>{Qe(s.ctrls,S=>S.stop(!0))});const T=m.map(S=>({...S}));return o?[T,o]:T}function hS(e,t){const n=ve.fun(e),[[r],o]=fS(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,o]:r}var mm=class extends tl{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=di(...t);const n=this._get(),r=Yc(n);Qu(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Kn(t,n)||(Fn(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&ah(this._active)&&sc(this)}_get(){const e=ve.arr(this.source)?this.source.map(on):pn(on(this.source));return this.calc(...e)}_start(){this.idle&&!ah(this._active)&&(this.idle=!1,Qe(Ss(this),e=>{e.done=!1}),An.skipAnimation?(He.batchedUpdates(()=>this.advance()),sc(this)):ws.start(this))}_attach(){let e=1;Qe(pn(this.source),t=>{En(t)&&Eo(t,this),Xc(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Qe(pn(this.source),e=>{En(e)&&pi(e,this)}),this._active.clear(),sc(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=pn(this.source).reduce((t,n)=>Math.max(t,(Xc(n)?n.priority:0)+1),0))}};function pS(e){return e.idle!==!1}function ah(e){return!e.size||Array.from(e).every(pS)}function sc(e){e.idle||(e.idle=!0,Qe(Ss(e),t=>{t.done=!0}),hi(e,{type:"idle",parent:e}))}var Zr=(e,...t)=>new mm(e,t);An.assign({createStringInterpolator:Gv,to:(e,t)=>new mm(e,t)});var gm=/^--/;function vS(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!gm.test(e)&&!(Zo.hasOwnProperty(e)&&Zo[e])?t+"px":(""+t).trim()}var sh={};function mS(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:o,scrollTop:i,scrollLeft:a,viewBox:s,...c}=t,u=Object.values(c),d=Object.keys(c).map(f=>n||e.hasAttribute(f)?f:sh[f]||(sh[f]=f.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));o!==void 0&&(e.textContent=o);for(const f in r)if(r.hasOwnProperty(f)){const m=vS(f,r[f]);gm.test(f)?e.style.setProperty(f,m):e.style[f]=m}d.forEach((f,m)=>{e.setAttribute(f,u[m])}),i!==void 0&&(e.scrollTop=i),a!==void 0&&(e.scrollLeft=a),s!==void 0&&e.setAttribute("viewBox",s)}var Zo={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},gS=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),yS=["Webkit","Ms","Moz","O"];Zo=Object.keys(Zo).reduce((e,t)=>(yS.forEach(n=>e[gS(n,t)]=e[t]),e),Zo);var bS=/^(matrix|translate|scale|rotate|skew)/,wS=/^(translate)/,ES=/^(rotate|skew)/,cc=(e,t)=>ve.num(e)&&e!==0?e+t:e,wa=(e,t)=>ve.arr(e)?e.every(n=>wa(n,t)):ve.num(e)?e===t:parseFloat(e)===t,xS=class extends Cs{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push(a=>[`translate3d(${a.map(s=>cc(s,"px")).join(",")})`,wa(a,0)])),Bn(r,(a,s)=>{if(s==="transform")o.push([a||""]),i.push(c=>[c,c===""]);else if(bS.test(s)){if(delete r[s],ve.und(a))return;const c=wS.test(s)?"px":ES.test(s)?"deg":"";o.push(pn(a)),i.push(s==="rotate3d"?([u,d,f,m])=>[`rotate3d(${u},${d},${f},${cc(m,c)})`,wa(m,0)]:u=>[`${s}(${u.map(d=>cc(d,c)).join(",")})`,wa(u,s.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new _S(o,i)),super(r)}},_S=class extends Kv{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Qe(this.inputs,(n,r)=>{const o=on(n[0]),[i,a]=this.transforms[r](ve.arr(o)?o:n.map(on));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){e==1&&Qe(this.inputs,t=>Qe(t,n=>En(n)&&Eo(n,this)))}observerRemoved(e){e==0&&Qe(this.inputs,t=>Qe(t,n=>En(n)&&pi(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),hi(this,e)}},SS=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];An.assign({batchedUpdates:hn.unstable_batchedUpdates,createStringInterpolator:Gv,colors:h_});var CS=Y_(SS,{applyAnimatedValues:mS,createAnimatedStyle:e=>new xS(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),$S=CS.animated;function Jc(e,t){return e.map(function(n,r){return n+t[r]})}function nl(e,t){return e.map(function(n,r){return n-t[r]})}function eu(e){return Math.hypot.apply(Math,e)}function TS(e,t,n){var r=eu(t),o=r===0?0:1/r,i=n===0?0:1/n,a=i*r,s=t.map(function(d){return i*d}),c=t.map(function(d){return o*d}),u=eu(e);return{velocities:s,velocity:a,distance:u,direction:c}}function tu(e){return Math.sign?Math.sign(e):+(e>0)-+(e<0)||+e}function IS(e,t,n){return Math.max(t,Math.min(e,n))}function RS(e,t){return Math.pow(e,t*5)}function ch(e,t,n){return t===0||Math.abs(t)===1/0?RS(e,n):e*t*n/(t+n*e)}function Qo(e,t,n,r){return r===void 0&&(r=.15),r===0?IS(e,t,n):e<t?-ch(t-e,n-t,r)+t:e>n?+ch(e-n,n-t,r)+n:e}function uh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function OS(e,t,n){return t&&uh(e.prototype,t),n&&uh(e,n),e}function tn(){return tn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tn.apply(this,arguments)}function ym(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function PS(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Un(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AS(e,t){if(e){if(typeof e=="string")return lh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lh(e,t)}}function lh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ts(e,t){var n;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=AS(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
140
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=e[Symbol.iterator](),n.next.bind(n)}function bm(){}function wm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?bm:t.length===1?t[0]:function(){for(var r,o=Ts(t),i;!(i=o()).done;){var a=i.value;r=a.apply(this,arguments)||r}return r}}function ur(e,t){if(e===void 0){if(t===void 0)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function dh(e){if(typeof e=="function"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}else return e}function rl(e,t){e===void 0&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],s=i[1];switch(typeof s){case"function":n[a]=s.call(n,e[a],a,e);break;case"object":n[a]=rl(e[a],s);break;case"boolean":s&&(n[a]=e[a]);break}}return n}function DS(){try{return"constructor"in GestureEvent}catch{return!1}}function Em(){return typeof window<"u"&&"ontouchstart"in window}function NS(){return typeof window<"u"&&"onpointerdown"in window}function xm(e){return"pointerId"in e?null:e.type==="touchend"?e.changedTouches:e.targetTouches}function _m(e){return Array.from(xm(e)).map(function(t){return t.identifier})}function fh(e){var t="buttons"in e?e.buttons:0,n=e.shiftKey,r=e.altKey,o=e.metaKey,i=e.ctrlKey;return{buttons:t,shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}}var kS=function(t){return t};function hh(e,t){t===void 0&&(t=kS);var n=xm(e),r=n?n[0]:e,o=r.clientX,i=r.clientY;return t([o,i])}var MS=180,jS=.15,LS=.5,FS=50,VS=250,BS={threshold:function(t){return t===void 0&&(t=0),ur(t)},rubberband:function(t){switch(t===void 0&&(t=0),t){case!0:return ur(jS);case!1:return ur(0);default:return ur(t)}},enabled:function(t){return t===void 0&&(t=!0),t},triggerAllEvents:function(t){return t===void 0&&(t=!1),t},initial:function(t){return t===void 0&&(t=0),typeof t=="function"?t:ur(t)},transform:!0},Sm=tn({},BS,{axis:!0,lockDirection:function(t){return t===void 0&&(t=!1),t},bounds:function(t){if(t===void 0&&(t={}),typeof t=="function")return function(f){return Sm.bounds(t(f))};var n=t,r=n.left,o=r===void 0?-1/0:r,i=n.right,a=i===void 0?1/0:i,s=n.top,c=s===void 0?-1/0:s,u=n.bottom,d=u===void 0?1/0:u;return[[o,a],[c,d]]}}),HS=typeof window<"u"&&window.document&&window.document.createElement,WS={enabled:function(t){return t===void 0&&(t=!0),t},domTarget:!0,window:function(e){function t(n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return e===void 0&&(e=HS?window:void 0),e}),eventOptions:function(t){var n=t===void 0?{}:t,r=n.passive,o=r===void 0?!0:r,i=n.capture,a=i===void 0?!1:i;return{passive:o,capture:a}},transform:!0},zS=tn({},Sm,{useTouch:function(t){t===void 0&&(t=!1);var n=Em(),r=NS();return!!(t&&n||n&&!r)},experimental_preventWindowScrollY:function(t){return t===void 0&&(t=!1),t},threshold:function(t,n,r){var o=r.filterTaps,i=o===void 0?!1:o,a=r.lockDirection,s=a===void 0?!1:a,c=r.axis,u=c===void 0?void 0:c,d=ur(t,i?3:s||u?1:0);return this.filterTaps=i,d},swipeVelocity:function(t){return t===void 0&&(t=LS),ur(t)},swipeDistance:function(t){return t===void 0&&(t=FS),ur(t)},swipeDuration:function(t){return t===void 0&&(t=VS),t},delay:function(t){switch(t===void 0&&(t=0),t){case!0:return MS;case!1:return 0;default:return t}}});function US(e){return e===void 0&&(e={}),rl(e,WS)}function YS(e){return e===void 0&&(e={}),rl(e,zS)}function KS(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=PS(e,["domTarget","eventOptions","window","enabled"]),a=US({domTarget:t,eventOptions:n,window:r,enabled:o});return a.drag=YS(i),a}function ko(e){return tn({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_threshold:[0,0],_lastEventType:void 0,_dragStarted:!1,_dragPreventScroll:!1,_dragIsTap:!0,_dragDelayed:!1,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:bm,canceled:!1,memo:void 0,args:void 0},e)}function Cm(){var e={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1,locked:!1},t=ko({_pointerId:void 0,axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,tap:!1,swipe:[0,0]}),n=ko({_pointerIds:[],da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=ko({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=ko({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=ko({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:e,drag:t,pinch:n,wheel:r,move:o,scroll:i}}var Tr=new Map,qS=function(t){return t},XS=function(){function e(n,r){var o=this;r===void 0&&(r=[]),this.controller=n,this.args=r,this.debounced=!0,this.setTimeout=function(i,a){var s;a===void 0&&(a=140),clearTimeout(o.controller.timeouts[o.stateKey]);for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d<c;d++)u[d-2]=arguments[d];o.controller.timeouts[o.stateKey]=(s=window).setTimeout.apply(s,[i,a].concat(u))},this.clearTimeout=function(){clearTimeout(o.controller.timeouts[o.stateKey])},this.fireGestureHandler=function(i){if(i===void 0&&(i=!1),o.state._blocked)return o.debounced||(o.state._active=!1,o.clean()),null;if(!i&&!o.state.intentional&&!o.config.triggerAllEvents)return null;if(o.state.intentional){var a=o.state.active,s=o.state._active;o.state.active=s,o.state.first=s&&!a,o.state.last=a&&!s,o.controller.state.shared[o.ingKey]=s}var c=o.controller.pointerIds.size||o.controller.touchIds.size,u=o.controller.state.shared.buttons>0||c>0,d=tn({},o.controller.state.shared,o.state,o.mapStateValues(o.state),{locked:!!document.pointerLockElement,touches:c,down:u}),f=o.handler(d);return o.state.memo=f!==void 0?f:o.state.memo,d},this.controller=n,this.args=r}var t=e.prototype;return t.updateSharedState=function(r){Object.assign(this.controller.state.shared,r)},t.updateGestureState=function(r){Object.assign(this.state,r)},t.checkIntentionality=function(r,o){return{_intentional:r,_blocked:!1}},t.getMovement=function(r){var o=this.config.rubberband,i=this.state,a=i._bounds,s=i._initial,c=i._active,u=i._intentional,d=i.lastOffset,f=i.movement,m=i._threshold,h=this.getInternalMovement(r,this.state),b=u[0]===!1?ph(h[0],m[0]):u[0],y=u[1]===!1?ph(h[1],m[1]):u[1],T=this.checkIntentionality([b,y],h);if(T._blocked)return tn({},T,{_movement:h,delta:[0,0]});var S=T._intentional,v=h,w=[S[0]!==!1?h[0]-S[0]:0,S[1]!==!1?h[1]-S[1]:0],C=Jc(w,d),I=c?o:[0,0];return w=vh(a,Jc(w,s),I),tn({},T,{intentional:S[0]!==!1||S[1]!==!1,_initial:s,_movement:v,movement:w,values:r,offset:vh(a,C,I),delta:nl(w,f)})},t.clean=function(){this.clearTimeout()},OS(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}},{key:"transform",get:function(){return this.config.transform||this.controller.config.transform||qS}}]),e}();function ph(e,t){return Math.abs(e)>=t?tu(e)*t:!1}function vh(e,t,n){var r=t[0],o=t[1],i=n[0],a=n[1],s=e[0],c=s[0],u=s[1],d=e[1],f=d[0],m=d[1];return[Qo(r,c,u,i),Qo(o,f,m,a)]}function uc(e,t,n){var r=e.state,o=t.timeStamp,i=t.type,a=r.values,s=n?0:o-r.startTime;return{_lastEventType:i,event:t,timeStamp:o,elapsedTime:s,previous:a}}function GS(e,t,n,r){var o=e.state,i=e.config,a=e.stateKey,s=e.args,c=e.transform,u=o.offset,d=n.timeStamp,f=i.initial,m=i.bounds,h=i.threshold,b=nl(c(h),c([0,0])).map(Math.abs),y=tn({},Cm()[a],{_active:!0,args:s,values:t,initial:r??t,_threshold:b,offset:u,lastOffset:u,startTime:d});return tn({},y,{_initial:dh(f,y),_bounds:dh(m,y)})}var ZS=function(t){var n=this;this.classes=t,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=Em(),this.supportsGestureEvents=DS(),this.bind=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];for(var a={},s=Ts(n.classes),c;!(c=s()).done;){var u=c.value;new u(n,o).addBindings(a)}var d=function(h){Ln(a,h,function(b){return n.nativeRefs[h](tn({},n.state.shared,{event:b,args:o}))})};for(var f in n.nativeRefs)d(f);return n.config.domTarget?rC(n,a):oC(n,a)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=Tm(n.config),o=n.config.eventOptions;r&&Pi(r,$m(n.domListeners),o),Object.values(n.timeouts).forEach(clearTimeout),eC(n)},this.classes=t,this.state=Cm(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function QS(e,t){"pointerId"in t?e.pointerIds.add(t.pointerId):e.touchIds=new Set(_m(t))}function JS(e,t){"pointerId"in t?e.pointerIds.delete(t.pointerId):_m(t).forEach(function(n){return e.touchIds.delete(n)})}function eC(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(n){for(var i in o){var a=o[i];Pi(n,a,r)}e.windowListeners={}}}function tC(e,t,n){var r=e.config,o=e.windowListeners;n===void 0&&(n=r.eventOptions),r.window&&(Pi(r.window,o[t],n),delete o[t])}function nC(e,t,n,r){var o=e.config,i=e.windowListeners;n===void 0&&(n=[]),r===void 0&&(r=o.eventOptions),o.window&&(Pi(o.window,i[t],r),Im(o.window,i[t]=n,r))}function rC(e,t){var n=e.config,r=e.domListeners,o=Tm(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;Pi(o,$m(r),i);for(var a=0,s=Object.entries(t);a<s.length;a++){var c=s[a],u=c[0],d=c[1],f=u.slice(2).toLowerCase();r.push([f,wm.apply(void 0,d)])}Im(o,r,i)}function oC(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,a=Object.entries(t);i<a.length;i++){var s=a[i],c=s[0],u=s[1],d=Array.isArray(u)?u:[u],f=c+o;r[f]=wm.apply(void 0,d)}return r}function $m(e){return e===void 0&&(e=[]),e.splice(0,e.length)}function Tm(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function Ln(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function Im(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={});for(var r=Ts(t),o;!(o=r()).done;){var i=o.value,a=i[0],s=i[1];e.addEventListener(a,s,n)}}function Pi(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={});for(var r=Ts(t),o;!(o=r()).done;){var i=o.value,a=i[0],s=i[1];e.removeEventListener(a,s,n)}}function iC(e,t,n){n===void 0&&(n={});var r=sC(e),o=l.useMemo(function(){return new ZS(r)},[]);return o.config=t,o.handlers=e,o.nativeRefs=n,l.useEffect(o.effect,[]),o.config.domTarget?aC:o.bind}function aC(){process.env.NODE_ENV==="development"&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}function sC(e){var t=new Set;return e.drag&&t.add(Tr.get("drag")),e.wheel&&t.add(Tr.get("wheel")),e.scroll&&t.add(Tr.get("scroll")),e.move&&t.add(Tr.get("move")),e.pinch&&t.add(Tr.get("pinch")),e.hover&&t.add(Tr.get("hover")),t}var cC=function(e){ym(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.getInternalMovement=function(o,i){return nl(o,i.initial)},n.checkIntentionality=function(o,i){if(o[0]===!1&&o[1]===!1)return{_intentional:o,axis:this.state.axis};var a=i.map(Math.abs),s=a[0],c=a[1],u=this.state.axis||(s>c?"x":s<c?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:o,_blocked:!1,axis:u}:u?this.config.axis&&u!==this.config.axis?{_intentional:o,_blocked:!0,axis:u}:(o[u==="x"?1:0]=!1,{_intentional:o,_blocked:!1,axis:u}):{_intentional:[!1,!1],_blocked:!1,axis:u}},n.getKinematics=function(o,i){var a=this.getMovement(o);if(!a._blocked){var s=i.timeStamp-this.state.timeStamp;Object.assign(a,TS(a.movement,a.delta,s))}return a},n.mapStateValues=function(o){return{xy:o.values,vxvy:o.velocities}},t}(XS),uC=3;function mh(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}var lC=function(e){ym(t,e);function t(){var r;return r=e.apply(this,arguments)||this,r.ingKey="dragging",r.stateKey="drag",r.setPointerCapture=function(o){if(!(r.config.useTouch||document.pointerLockElement)){var i=o.target,a=o.pointerId;i&&"setPointerCapture"in i&&i.setPointerCapture(a),r.updateGestureState({_dragTarget:i,_dragPointerId:a})}},r.releasePointerCapture=function(){if(!(r.config.useTouch||document.pointerLockElement)){var o=r.state,i=o._dragTarget,a=o._dragPointerId;if(a&&i&&"releasePointerCapture"in i&&(!("hasPointerCapture"in i)||i.hasPointerCapture(a)))try{i.releasePointerCapture(a)}catch{}}},r.preventScroll=function(o){r.state._dragPreventScroll&&o.cancelable&&o.preventDefault()},r.getEventId=function(o){return r.config.useTouch?o.changedTouches[0].identifier:o.pointerId},r.isValidEvent=function(o){return r.state._pointerId===r.getEventId(o)},r.shouldPreventWindowScrollY=r.config.experimental_preventWindowScrollY&&r.controller.supportsTouchEvents,r.setUpWindowScrollDetection=function(o){mh(o),nC(r.controller,r.stateKey,[["touchmove",r.preventScroll],["touchend",r.clean.bind(Un(r))],["touchcancel",r.clean.bind(Un(r))]],{passive:!1}),r.setTimeout(r.startDrag.bind(Un(r)),250,o)},r.setUpDelayedDragTrigger=function(o){r.state._dragDelayed=!0,mh(o),r.setTimeout(r.startDrag.bind(Un(r)),r.config.delay,o)},r.setStartState=function(o){var i=hh(o,r.transform);r.updateSharedState(fh(o)),r.updateGestureState(tn({},GS(Un(r),i,o),uc(Un(r),o,!0),{_pointerId:r.getEventId(o)})),r.updateGestureState(r.getMovement(i))},r.onDragStart=function(o){QS(r.controller,o),!(!r.enabled||r.state._active)&&(r.setStartState(o),r.setPointerCapture(o),r.shouldPreventWindowScrollY?r.setUpWindowScrollDetection(o):r.config.delay>0?r.setUpDelayedDragTrigger(o):r.startDrag(o,!0))},r.onDragChange=function(o){if(!(r.state.canceled||!r.state._active||!r.isValidEvent(o)||r.state._lastEventType===o.type&&o.timeStamp===r.state.timeStamp)){var i;if(document.pointerLockElement){var a=o.movementX,s=o.movementY;i=Jc(r.transform([a,s]),r.state.values)}else i=hh(o,r.transform);var c=r.getKinematics(i,o);if(!r.state._dragStarted){if(r.state._dragDelayed){r.startDrag(o);return}if(r.shouldPreventWindowScrollY)if(!r.state._dragPreventScroll&&c.axis)if(c.axis==="x")r.startDrag(o);else{r.state._active=!1;return}else return;else return}var u=fh(o);r.updateSharedState(u);var d=uc(Un(r),o),f=eu(c._movement),m=r.state._dragIsTap;m&&f>=uC&&(m=!1),r.updateGestureState(tn({},d,c,{_dragIsTap:m})),r.fireGestureHandler()}},r.onDragEnd=function(o){if(JS(r.controller,o),!!r.isValidEvent(o)&&(r.clean(),!!r.state._active)){r.state._active=!1;var i=r.state._dragIsTap,a=r.state.velocities,s=a[0],c=a[1],u=r.state.movement,d=u[0],f=u[1],m=r.state._intentional,h=m[0],b=m[1],y=r.config.swipeVelocity,T=y[0],S=y[1],v=r.config.swipeDistance,w=v[0],C=v[1],I=r.config.swipeDuration,D=tn({},uc(Un(r),o),r.getMovement(r.state.values)),P=[0,0];D.elapsedTime<I&&(h!==!1&&Math.abs(s)>T&&Math.abs(d)>w&&(P[0]=tu(s)),b!==!1&&Math.abs(c)>S&&Math.abs(f)>C&&(P[1]=tu(c))),r.updateSharedState({buttons:0}),r.updateGestureState(tn({},D,{tap:i,swipe:P})),r.fireGestureHandler(r.config.filterTaps&&i===!0)}},r.clean=function(){e.prototype.clean.call(Un(r)),r.state._dragStarted=!1,r.releasePointerCapture(),tC(r.controller,r.stateKey)},r.onCancel=function(){r.state.canceled||(r.updateGestureState({canceled:!0,_active:!1}),r.updateSharedState({buttons:0}),setTimeout(function(){return r.fireGestureHandler()},0))},r.onClick=function(o){r.state._dragIsTap||o.stopPropagation()},r}var n=t.prototype;return n.startDrag=function(o,i){i===void 0&&(i=!1),!(!this.state._active||this.state._dragStarted)&&(i||this.setStartState(o),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearTimeout(),this.fireGestureHandler())},n.addBindings=function(o){if(this.config.useTouch?(Ln(o,"onTouchStart",this.onDragStart),Ln(o,"onTouchMove",this.onDragChange),Ln(o,"onTouchEnd",this.onDragEnd),Ln(o,"onTouchCancel",this.onDragEnd)):(Ln(o,"onPointerDown",this.onDragStart),Ln(o,"onPointerMove",this.onDragChange),Ln(o,"onPointerUp",this.onDragEnd),Ln(o,"onPointerCancel",this.onDragEnd)),this.config.filterTaps){var i=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Ln(o,i,this.onClick)}},t}(cC);function dC(e,t){var n,r=[],o,i=!1;function a(){for(var s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];return i&&n===this&&t(c,r)||(o=e.apply(this,c),i=!0,n=this,r=c),o}return a}function Ea(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,o;if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ea(e[r],t[r]))return!1;return!0}var i;if(typeof Map=="function"&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!Ea(r.value[1],t.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(typeof Element<"u"&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!(o[r]==="_owner"&&e.$$typeof)&&!Ea(e[o[r]],t[o[r]]))return!1;return!0}return e!==e&&t!==t}function fC(e,t){try{return Ea(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}function hC(e,t){t===void 0&&(t={}),Tr.set("drag",lC);var n=l.useRef();return n.current||(n.current=dC(KS,fC)),iC({drag:e},n.current(t))}var pC="aglyib0";const xo=l.forwardRef(({as:e,children:t,className:n,style:r,isDisabled:o,...i},a)=>{const s=e||"button";return j.jsx(s,{ref:a,as:e,"data-test-id":i["data-test-id"],className:Pe(pC,n),disabled:o,style:r,...i,children:j.jsx(os,{size:16,color:o?Rt.theme.colors.grey1:Rt.theme.colors.black})})});xo.displayName="Button";xo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0};const Rm=l.forwardRef(({header:e,onBack:t,onClose:n,showBack:r,showClose:o,title:i,bind:a,hasHandleBar:s},c)=>e!==!1?j.jsx(et,{"data-rsbs-header":!0,"data-rsbs-header-handle-bar":s,ref:c,...s?a==null?void 0:a():{},children:e||j.jsxs(Yt,{alignItems:"center",justifyContent:"space-between",py:"$16",gap:"$16",children:[j.jsxs(Yt,{alignItems:"center",gap:"$16",children:[r&&j.jsx(m0,{cursor:"pointer",onClick:t,size:18,color:Rt.theme.colors.grey1,"data-test-id":"vds-BS-back-btn"}),i&&j.jsx(sn,{fontWeight:"$bold",textStyle:"subtitle1",m:"$0",children:i})]}),o&&j.jsx(xo,{onClick:n,"data-test-id":"vds-BS-close-btn"})]})},"header"):j.jsx(et,{"data-rsbs-header":!0,ref:c,...a==null?void 0:a()},"header"));Rm.defaultProps={title:void 0,header:void 0,showBack:void 0,showClose:!0,hasHandleBar:!0,bind:void 0,onBack:void 0,onClose:void 0};function vC({targetRef:e,enabled:t}){const n=l.useRef({activate:()=>{throw new TypeError("Tried to activate aria hider too early")},deactivate:()=>{}});return l.useDebugValue(t?"Enabled":"Disabled"),l.useEffect(()=>{if(!t){n.current.deactivate(),n.current={activate:()=>{},deactivate:()=>{}};return}const r=e.current;let o=!1,i=[],a=[];n.current={activate:()=>{if(o)return;o=!0;const{parentNode:s}=r;document.querySelectorAll("body > *").forEach(c=>{if(c===s)return;const u=c.getAttribute("aria-hidden");u!==null&&u!=="false"||(i.push(u),a.push(c),c.setAttribute("aria-hidden","true"))})},deactivate:()=>{o&&(o=!1,a.forEach((s,c)=>{const u=i[c];u===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",u)}),i=[],a=[])}}},[e,t]),n}/*!
136
+ Event: `).concat(JSON.stringify(m.data)));return r.scheduler.schedule(function(){r.forward(m);var h=r._nextState(m);r.update(h,m)}),r._state},this.sendTo=function(d,f,m){var h=r.parent&&(f===ho.Parent||r.parent.id===f),b=h?r.parent:at(f)?f===ho.Internal?r:r.children.get(f)||Ro.get(f):fx(f)?f:void 0;if(!b){if(!h)throw new Error("Unable to send event to child '".concat(f,"' from service '").concat(r.id,"'."));jt||Ut(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(d.type));return}if("machine"in b){if(r.status!==Vt.Stopped||r.parent!==b||r.state.done){var y=ye(ye({},d),{name:d.name===ex?"".concat(Fo(r.id)):d.name,origin:r.sessionId});!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([b,y]):b.send(y)}}else!m&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([b,d.data]):b.send(d.data)},this._exec=function(d,f,m,h){h===void 0&&(h=r.machine.options.actions);var b=d.exec||Fc(d.type,h),y=lt(b)?b:b?b.exec:d.exec;if(y)try{return y(f,m.data,r.machine.config.predictableActionArguments?{action:d,_event:m}:{action:d,state:r.state,_event:m})}catch($){throw r.parent&&r.parent.send({type:"xstate.error",data:$}),$}switch(d.type){case Ti:{var T=d;r.defer(T);break}case gs:var S=d;if(typeof S.delay=="number"){r.defer(S);return}else S.to?r.sendTo(S._event,S.to,m===oo):r.send(S._event);break;case xv:r.cancel(d.sendId);break;case Nc:{if(r.status!==Vt.Running)return;var v=d.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[v.id||v.type])break;if(v.type===bt.Invoke){var w=Pv(v.src),C=r.machine.options.services?r.machine.options.services[w.type]:void 0,I=v.id,D=v.data;jt||Ut(!("forward"in v),"`forward` property is deprecated (found in invocation of '".concat(v.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var P="autoForward"in v?v.autoForward:!!v.forward;if(!C){jt||Ut(!1,"No service found for invocation '".concat(v.src,"' in machine '").concat(r.machine.id,"'."));return}var F=D?Da(D,f,m):void 0;if(typeof C=="string")return;var k=lt(C)?C(f,m.data,{data:F,src:w,meta:v.meta}):C;if(!k)return;var H=void 0;Mr(k)&&(k=F?k.withContext(F):k,H={autoForward:P}),r.spawn(k,I,H)}else r.spawnActivity(v);break}case ju:{r.stopChild(d.activity.id);break}case _v:var R=d,E=R.label,p=R.value;E?r.logger(E,p):r.logger(p);break;default:jt||Ut(!1,"No implementation found for action type '".concat(d.type,"'"));break}};var o=ye(ye({},e.defaultOptions),n),i=o.clock,a=o.logger,s=o.parent,c=o.id,u=c!==void 0?c:t.id;this.id=u,this.logger=a,this.clock=i,this.parent=s,this.options=o,this.scheduler=new kf({deferEvents:this.options.deferEvents}),this.sessionId=Ro.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:eo(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return jt||Ut(this.status!==Vt.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,n){var r,o;try{for(var i=Ze(t.actions),a=i.next();!a.done;a=i.next()){var s=a.value;this.exec(s,t,n)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},e.prototype.update=function(t,n){var r,o,i,a,s,c,u,d,f=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||n===oo)&&this.options.execute)this.execute(this.state);else for(var m=void 0;m=this._outgoingQueue.shift();)m[0].send(m[1]);if(this.children.forEach(function(k){f.state.children[k.id]=k}),this.devTools&&this.devTools.send(n.data,t),t.event)try{for(var h=Ze(this.eventListeners),b=h.next();!b.done;b=h.next()){var y=b.value;y(t.event)}}catch(k){r={error:k}}finally{try{b&&!b.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}try{for(var T=Ze(this.listeners),S=T.next();!S.done;S=T.next()){var y=S.value;y(t,t.event)}}catch(k){i={error:k}}finally{try{S&&!S.done&&(a=T.return)&&a.call(T)}finally{if(i)throw i.error}}try{for(var v=Ze(this.contextListeners),w=v.next();!w.done;w=v.next()){var C=w.value;C(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(k){s={error:k}}finally{try{w&&!w.done&&(c=v.return)&&c.call(v)}finally{if(s)throw s.error}}if(this.state.done){var I=t.configuration.find(function(k){return k.type==="final"&&k.parent===f.machine}),D=I&&I.doneData?Da(I.doneData,t.context,n):void 0;this._doneEvent=ga(this.id,D);try{for(var P=Ze(this.doneListeners),F=P.next();!F.done;F=P.next()){var y=F.value;y(this._doneEvent)}}catch(k){u={error:k}}finally{try{F&&!F.done&&(d=P.return)&&d.call(P)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),Ro.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===Vt.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,n,r){var o=this,i=ma(t,n,r);this.listeners.add(i.next),this.status!==Vt.NotStarted&&i.next(this.state);var a=function(){o.doneListeners.delete(a),o.stopListeners.delete(a),i.complete()};return this.status===Vt.Stopped?i.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){o.listeners.delete(i.next),o.doneListeners.delete(a),o.stopListeners.delete(a)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===Vt.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var n=this;if(this.status===Vt.Running)return this;this.machine._init(),Ro.register(this.sessionId,this),this.initialized=!0,this.status=Vt.Running;var r=t===void 0?this.initialState:eo(this,function(){return Nx(t)?n.machine.resolveState(t):n.machine.resolveState(wn.from(t,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,oo)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){lt(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,n,r,o,i,a,s,c,u,d;try{for(var f=Ze(this.listeners),m=f.next();!m.done;m=f.next()){var h=m.value;this.listeners.delete(h)}}catch(P){t={error:P}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}try{for(var b=Ze(this.stopListeners),y=b.next();!y.done;y=b.next()){var h=y.value;h(),this.stopListeners.delete(h)}}catch(P){r={error:P}}finally{try{y&&!y.done&&(o=b.return)&&o.call(b)}finally{if(r)throw r.error}}try{for(var T=Ze(this.contextListeners),S=T.next();!S.done;S=T.next()){var h=S.value;this.contextListeners.delete(h)}}catch(P){i={error:P}}finally{try{S&&!S.done&&(a=T.return)&&a.call(T)}finally{if(i)throw i.error}}try{for(var v=Ze(this.doneListeners),w=v.next();!w.done;w=v.next()){var h=w.value;this.doneListeners.delete(h)}}catch(P){s={error:P}}finally{try{w&&!w.done&&(c=v.return)&&c.call(v)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Vt.Stopped,this._initialState=void 0;try{for(var C=Ze(Object.keys(this.delayedEventsMap)),I=C.next();!I.done;I=C.next()){var D=I.value;this.clock.clearTimeout(this.delayedEventsMap[D])}}catch(P){u={error:P}}finally{try{I&&!I.done&&(d=C.return)&&d.call(C)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new kf({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r=zt({type:"xstate.stop"}),o=eo(t,function(){var i=Tt(St([],it(t.state.configuration),!1).sort(function(d,f){return f.order-d.order}).map(function(d){return cr(d.onExit,t.machine.options.actions)})),a=it(Na(t.machine,t.state,t.state.context,r,[{type:"exit",actions:i}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),s=a[0],c=a[1],u=new wn({value:t.state.value,context:c,_event:r,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:s.filter(function(d){return!Lc(d)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return u.changed=!0,u});t.update(o,r),t._stopChildren(),Ro.free(t.sessionId)}),this},e.prototype.batch=function(t){var n=this;if(this.status===Vt.NotStarted&&this.options.deferEvents)jt||Ut(!1,"".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,`" and are deferred. Make sure .start() is called for this service.
137
+ Event: `).concat(JSON.stringify(event)));else if(this.status!==Vt.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(t.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var o,i,a=n.state,s=!1,c=[],u=function(h){var b=zt(h);n.forward(b),a=eo(n,function(){return n.machine.transition(a,b,void 0,r||void 0)}),c.push.apply(c,St([],it(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(y){return kx(y,a)})),!1)),s=s||!!a.changed};try{for(var d=Ze(t),f=d.next();!f.done;f=d.next()){var m=f.value;u(m)}}catch(h){o={error:h}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}a.changed=s,a.actions=c,n.update(a,zt(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var o=zt(t);if(o.name.indexOf(If)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(If)===0}))throw o.data.data;var i=eo(this,function(){return r.machine.transition(r.state,o,void 0,n||void 0)});return i},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var n,r;try{for(var o=Ze(this.forwardTo),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.children.get(a);if(!s)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));s.send(t)}}catch(c){n={error:c}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.defer=function(t){var n=this,r=this.clock.setTimeout(function(){"to"in t&&t.to?n.sendTo(t._event,t.to,!0):n.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=r)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(t,n.context,n._event,r)},e.prototype.removeChild=function(t){var n;this.children.delete(t),this.forwardTo.delete(t),(n=this.state)===null||n===void 0||delete n.children[t]},e.prototype.stopChild=function(t){var n=this.children.get(t);n&&(this.removeChild(t),lt(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,r){if(this.status!==Vt.Running)return Dv(t,n);if(Pf(t))return this.spawnPromise(Promise.resolve(t),n);if(lt(t))return this.spawnCallback(t,n);if(Rx(t))return this.spawnActor(t,n);if(dx(t))return this.spawnObservable(t,n);if(Mr(t))return this.spawnMachine(t,ye(ye({},r),{id:n}));if(cx(t))return this.spawnBehavior(t,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,n){var r=this;n===void 0&&(n={});var o=new e(t,ye(ye({},this.options),{parent:this,id:n.id||t.id})),i=ye(ye({},Bx),n);i.sync&&o.onTransition(function(s){r.send(Sv,{state:s,id:o.id})});var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone(function(s){r.removeChild(o.id),r.send(zt(s,{origin:o.id}))}).start(),a},e.prototype.spawnBehavior=function(t,n){var r=Vx(t,{id:n,parent:this});return this.children.set(n,r),r},e.prototype.spawnPromise=function(t,n){var r,o=this,i=!1,a;t.then(function(c){i||(a=c,o.removeChild(n),o.send(zt(ga(n,c),{origin:n})))},function(c){if(!i){o.removeChild(n);var u=Fo(n,c);try{o.send(zt(u,{origin:n}))}catch(d){px(c,d,n),o.devTools&&o.devTools.send(u,o.state),o.machine.strict&&o.stop()}}});var s=(r={id:n,send:function(){},subscribe:function(c,u,d){var f=ma(c,u,d),m=!1;return t.then(function(h){m||(f.next(h),!m&&f.complete())},function(h){m||f.error(h)}),{unsubscribe:function(){return m=!0}}},stop:function(){i=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return a}},r[sr]=function(){return this},r);return this.children.set(n,s),s},e.prototype.spawnCallback=function(t,n){var r,o=this,i=!1,a=new Set,s=new Set,c,u=function(m){c=m,s.forEach(function(h){return h(m)}),!i&&o.send(zt(m,{origin:n}))},d;try{d=t(u,function(m){a.add(m)})}catch(m){this.send(Fo(n,m))}if(Pf(d))return this.spawnPromise(d,n);var f=(r={id:n,send:function(m){return a.forEach(function(h){return h(m)})},subscribe:function(m){var h=ma(m);return s.add(h.next),{unsubscribe:function(){s.delete(h.next)}}},stop:function(){i=!0,lt(d)&&d()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},r[sr]=function(){return this},r);return this.children.set(n,f),f},e.prototype.spawnObservable=function(t,n){var r,o=this,i,a=t.subscribe(function(c){i=c,o.send(zt(c,{origin:n}))},function(c){o.removeChild(n),o.send(zt(Fo(n,c),{origin:n}))},function(){o.removeChild(n),o.send(zt(ga(n),{origin:n}))}),s=(r={id:n,send:function(){},subscribe:function(c,u,d){return t.subscribe(c,u,d)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return i},toJSON:function(){return{id:n}}},r[sr]=function(){return this},r);return this.children.set(n,s),s},e.prototype.spawnActor=function(t,n){return this.children.set(n,t),t},e.prototype.spawnActivity=function(t){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(!n){jt||Ut(!1,"No implementation found for activity '".concat(t.type,"'"));return}var r=n(this.state.context,t);this.spawnEffect(t.id,r)},e.prototype.spawnEffect=function(t,n){var r;this.children.set(t,(r={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},r[sr]=function(){return this},r))},e.prototype.attachDev=function(){var t=Bu();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(ye(ye({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:ye({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}Fx(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[sr]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Vt.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,n){return setTimeout(t,n)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=Lv,e}();function Lv(e,t){var n=new Hx(e,t);return n}function Wx(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function ea(e){return ye(ye({type:kc},e),{toJSON:function(){e.onDone,e.onError;var t=Mu(e,["onDone","onError"]);return ye(ye({},t),{type:kc,src:Wx(e.src)})}})}var to="",Bc="#",Oo="*",qr={},Xr=function(e){return e[0]===Bc},zx=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Ux=function(e,t,n){var r=n.slice(0,-1).some(function(i){return!("cond"in i)&&!("in"in i)&&(at(i.target)||Mr(i.target))}),o=t===to?"the transient event":"event '".concat(t,"'");Ut(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},Yx=function(){function e(t,n,r,o){r===void 0&&(r="context"in t?t.context:void 0);var i=this,a;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(zx(),n),this.parent=o==null?void 0:o.parent,this.key=this.config.key||(o==null?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:Cv),this.id=this.config.id||St([this.machine.key],it(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,jt||Ut(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Lo(this.config.states,function(u,d){var f,m=new e(u,{},void 0,{parent:i,key:d});return Object.assign(i.idMap,ye((f={},f[m.id]=m,f),m.idMap)),m}):qr;var s=0;function c(u){var d,f;u.order=s++;try{for(var m=Ze(Nv(u)),h=m.next();!h.done;h=m.next()){var b=h.value;c(b)}}catch(y){d={error:y}}finally{try{h&&!h.done&&(f=m.return)&&f.call(m)}finally{if(d)throw d.error}}}c(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(u){var d=u.event;return d===to}):to in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=In(this.config.entry||this.config.onEntry).map(function(u){return ui(u)}),this.onExit=In(this.config.exit||this.config.onExit).map(function(u){return ui(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=In(this.config.invoke).map(function(u,d){var f,m;if(Mr(u)){var h=Qi(i.id,d);return i.machine.options.services=ye((f={},f[h]=u,f),i.machine.options.services),ea({src:h,id:h})}else if(at(u.src)){var h=u.id||Qi(i.id,d);return ea(ye(ye({},u),{id:h,src:u.src}))}else if(Mr(u.src)||lt(u.src)){var h=u.id||Qi(i.id,d);return i.machine.options.services=ye((m={},m[h]=u.src,m),i.machine.options.services),ea(ye(ye({id:h},u),{src:h}))}else{var b=u.src;return ea(ye(ye({id:Qi(i.id,d)},u),{src:b}))}}),this.activities=In(this.config.activities).concat(this.invoke).map(function(u){return Vu(u)}),this.transition=this.transition.bind(this),this.tags=In(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||kv(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,a=r.guards,s=r.services,c=r.delays;return new e(this.config,{actions:ye(ye({},o),t.actions),activities:ye(ye({},i),t.activities),guards:ye(ye({},a),t.guards),services:ye(ye({},s),t.services),delays:ye(ye({},c),t.delays)},n??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return lt(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Lo(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var n=t===to,r=this.transitions.filter(function(o){var i=o.eventType===t;return n?i:i||o.eventType===Oo});return this.__cache.candidates[t]=r,r},e.prototype.getDelayedTransitions=function(){var t=this,n=this.config.after;if(!n)return[];var r=function(i,a){var s=lt(i)?"".concat(t.id,":delay[").concat(a,"]"):i,c=Cx(s,t.id);return t.onEntry.push(gx(c,{delay:i})),t.onExit.push(wx(c)),c},o=wo(n)?n.map(function(i,a){var s=r(i.delay,a);return ye(ye({},i),{event:s})}):Tt(Object.keys(n).map(function(i,a){var s=n[i],c=at(s)?{target:s}:s,u=isNaN(+i)?i:+i,d=r(u,a);return In(c).map(function(f){return ye(ye({},f),{event:d,delay:u})})}));return o.map(function(i){var a=i.delay;return ye(ye({},t.formatTransition(i)),{delay:a})})},e.prototype.getStateNodes=function(t){var n,r=this;if(!t)return[];var o=t instanceof wn?t.value:Uo(t,this.delimiter);if(at(o)){var i=this.getStateNode(o).initial;return i!==void 0?this.getStateNodes((n={},n[o]=i,n)):[this,this.states[o]]}var a=Object.keys(o),s=[this];return s.push.apply(s,St([],it(Tt(a.map(function(c){return r.getStateNode(c).getStateNodes(o[c])}))),!1)),s},e.prototype.handles=function(t){var n=$v(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof wn?t:wn.create(t),r=Array.from(Vo([],this.getStateNodes(n.value)));return new wn(ye(ye({},n),{value:this.resolve(n.value),configuration:r,done:ya(r,this),tags:Nf(r),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,n,r){var o=this.getStateNode(t),i=o.next(n,r);return!i||!i.transitions.length?this.next(n,r):i},e.prototype.transitionCompoundNode=function(t,n,r){var o=Object.keys(t),i=this.getStateNode(o[0]),a=i._transition(t[o[0]],n,r);return!a||!a.transitions.length?this.next(n,r):a},e.prototype.transitionParallelNode=function(t,n,r){var o,i,a={};try{for(var s=Ze(Object.keys(t)),c=s.next();!c.done;c=s.next()){var u=c.value,d=t[u];if(d){var f=this.getStateNode(u),m=f._transition(d,n,r);m&&(a[u]=m)}}}catch(S){o={error:S}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}var h=Object.keys(a).map(function(S){return a[S]}),b=Tt(h.map(function(S){return S.transitions})),y=h.some(function(S){return S.transitions.length>0});if(!y)return this.next(n,r);var T=Tt(Object.keys(a).map(function(S){return a[S].configuration}));return{transitions:b,exitSet:Tt(h.map(function(S){return S.exitSet})),configuration:T,source:n,actions:Tt(Object.keys(a).map(function(S){return a[S].actions}))}},e.prototype._transition=function(t,n,r){return at(t)?this.transitionLeafNode(t,n,r):Object.keys(t).length===1?this.transitionCompoundNode(t,n,r):this.transitionParallelNode(t,n,r)},e.prototype.getTransitionData=function(t,n){return this._transition(t.value,t,zt(n))},e.prototype.next=function(t,n){var r,o,i=this,a=n.name,s=[],c=[],u;try{for(var d=Ze(this.getCandidates(a)),f=d.next();!f.done;f=d.next()){var m=f.value,h=m.cond,b=m.in,y=t.context,T=b?at(b)&&Xr(b)?t.matches(Uo(this.getStateNodeById(b).path,this.delimiter)):Fu(Uo(b,this.delimiter),ix(this.path.slice(0,-2))(t.value)):!0,S=!1;try{S=!h||Ov(this.machine,h,y,n,t)}catch(C){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
138
+ `).concat(C.message))}if(S&&T){m.target!==void 0&&(c=m.target),s.push.apply(s,St([],it(m.actions),!1)),u=m;break}}}catch(C){r={error:C}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}if(u){if(!c.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var v=Tt(c.map(function(C){return i.getRelativeStateNodes(C,t.historyValue)})),w=!!u.internal;return{transitions:[u],exitSet:w?[]:Tt(c.map(function(C){return i.getPotentiallyReenteringNodes(C)})),configuration:v,source:t,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var n=[],r=this,o=t;r&&r!==o;)n.push(r),r=r.parent;return r!==o?[]:(n.push(o),n)},e.prototype.getActions=function(t,n,r,o,i,a,s){var c,u,d,f,m=this,h=a?Vo([],this.getStateNodes(a.value)):[],b=new Set;try{for(var y=Ze(Array.from(t).sort(function(R,E){return R.order-E.order})),T=y.next();!T.done;T=y.next()){var S=T.value;(!Bo(h,S)||Bo(r.exitSet,S)||S.parent&&b.has(S.parent))&&b.add(S)}}catch(R){c={error:R}}finally{try{T&&!T.done&&(u=y.return)&&u.call(y)}finally{if(c)throw c.error}}try{for(var v=Ze(h),w=v.next();!w.done;w=v.next()){var S=w.value;(!Bo(t,S)||Bo(r.exitSet,S.parent))&&r.exitSet.push(S)}}catch(R){d={error:R}}finally{try{w&&!w.done&&(f=v.return)&&f.call(v)}finally{if(d)throw d.error}}r.exitSet.sort(function(R,E){return E.order-R.order});var C=Array.from(b).sort(function(R,E){return R.order-E.order}),I=new Set(r.exitSet),D=Tt(C.map(function(R){var E=[];if(R.type!=="final")return E;var p=R.parent;if(!p.parent)return E;E.push(Ji(R.id,R.doneData),Ji(p.id,R.doneData?Da(R.doneData,o,i):void 0));var $=p.parent;return $.type==="parallel"&&li($).every(function(A){return ya(r.configuration,A)})&&E.push(Ji($.id)),E})),P=C.map(function(R){var E=R.onEntry,p=R.activities.map(function($){return Ex($)});return{type:"entry",actions:cr(s?St(St([],it(E),!1),it(p),!1):St(St([],it(p),!1),it(E),!1),m.machine.options.actions)}}).concat({type:"state_done",actions:D.map(function(R){return vx(R)})}),F=Array.from(I).map(function(R){return{type:"exit",actions:cr(St(St([],it(R.onExit),!1),it(R.activities.map(function(E){return xx(E)})),!1),m.machine.options.actions)}}),k=F.concat({type:"transition",actions:cr(r.actions,this.machine.options.actions)}).concat(P);if(n){var H=cr(Tt(St([],it(t),!1).sort(function(R,E){return E.order-R.order}).map(function(R){return R.onExit})),this.machine.options.actions).filter(function(R){return!Lc(R)});return k.concat({type:"stop",actions:H})}return k},e.prototype.transition=function(t,n,r,o){t===void 0&&(t=this.initialState);var i=zt(n),a;if(t instanceof wn)a=r===void 0?t:this.resolveState(wn.from(t,r));else{var s=at(t)?this.resolve(Aa(this.getResolvedPath(t))):this.resolve(t),c=r??this.machine.context;a=this.resolveState(wn.from(s,c))}if(!jt&&i.name===Oo)throw new Error("An event cannot have the wildcard type ('".concat(Oo,"')"));if(this.strict&&!this.events.includes(i.name)&&!sx(i.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(i.name,"'"));var u=this._transition(a.value,a,i)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},d=Vo([],this.getStateNodes(a.value)),f=u.configuration.length?Vo(d,u.configuration):d;return u.configuration=St([],it(f),!1),this.resolveTransition(u,a,a.context,o,i)},e.prototype.resolveRaisedTransition=function(t,n,r,o){var i,a=t.actions;return t=this.transition(t,n,void 0,o),t._event=r,t.event=r.data,(i=t.actions).unshift.apply(i,St([],it(a),!1)),t},e.prototype.resolveTransition=function(t,n,r,o,i){var a,s,c,u,d=this;i===void 0&&(i=oo);var f=t.configuration,m=!n||t.transitions.length>0,h=m?t.configuration:n?n.configuration:[],b=ya(h,this),y=m?Px(this.machine,f):void 0,T=n?n.historyValue?n.historyValue:t.source?this.machine.historyValue(n.value):void 0:void 0,S=this.getActions(new Set(h),b,t,r,i,n,o),v=n?ye({},n.activities):{};try{for(var w=Ze(S),C=w.next();!C.done;C=w.next()){var I=C.value;try{for(var D=(c=void 0,Ze(I.actions)),P=D.next();!P.done;P=D.next()){var F=P.value;F.type===Nc?v[F.activity.id||F.activity.type]=F:F.type===ju&&(v[F.activity.id||F.activity.type]=!1)}}catch(K){c={error:K}}finally{try{P&&!P.done&&(u=D.return)&&u.call(D)}finally{if(c)throw c.error}}}}catch(K){a={error:K}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}var k=it(Na(this,n,r,i,S,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),H=k[0],R=k[1],E=it(ux(H,Lc),2),p=E[0],$=E[1],A=H.filter(function(K){var Z;return K.type===Nc&&((Z=K.activity)===null||Z===void 0?void 0:Z.type)===kc}),M=A.reduce(function(K,Z){return K[Z.activity.id]=Tx(Z.activity,d.machine,R,i),K},n?ye({},n.children):{}),z=new wn({value:y||n.value,context:R,_event:i,_sessionid:n?n._sessionid:null,historyValue:y?T?lx(T,y):void 0:n?n.historyValue:void 0,history:!y||t.source?n:void 0,actions:y?$:[],activities:y?v:n?n.activities:{},events:[],configuration:h,transitions:t.transitions,children:M,done:b,tags:Nf(h),machine:this}),U=r!==R;z.changed=i.name===Sv||U;var re=z.history;re&&delete re.history;var B=!b&&(this._transient||f.some(function(K){return K._transient}));if(!m&&(!B||i.name===to))return z;var L=z;if(!b)for(B&&(L=this.resolveRaisedTransition(L,{type:QE},i,o));p.length;){var oe=p.shift();L=this.resolveRaisedTransition(L,oe._event,i,o)}var G=L.changed||(re?!!L.actions.length||U||typeof re.value!=typeof L.value||!jv(L.value,re.value):void 0);return L.changed=G,L.history=re,L},e.prototype.getStateNode=function(t){if(Xr(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[t];if(!n)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return n},e.prototype.getStateNodeById=function(t){var n=Xr(t)?t.slice(Bc.length):t;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&Xr(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var n=jc(t,this.delimiter).slice(),r=this;n.length;){var o=n.shift();if(!o.length)break;r=r.getStateNode(o)}return r},e.prototype.resolve=function(t){var n,r=this;if(!t)return this.initialStateValue||qr;switch(this.type){case"parallel":return Lo(this.initialStateValue,function(i,a){return i?r.getStateNode(a).resolve(t[a]||i):qr});case"compound":if(at(t)){var o=this.getStateNode(t);return o.type==="parallel"||o.type==="compound"?(n={},n[t]=o.initialStateValue,n):t}return Object.keys(t).length?Lo(t,function(i,a){return i?r.getStateNode(a).resolve(i):qr}):this.initialStateValue||{};default:return t||qr}},e.prototype.getResolvedPath=function(t){if(Xr(t)){var n=this.machine.idMap[t.slice(Bc.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return jc(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Of(this.states,function(r){return r.initialStateValue||qr},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=ka(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,n){this._init();var r=this.getStateNodes(t);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var n=this.config;at(n.target)?t=Xr(n.target)?Aa(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:t=n.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,n,r){return r===void 0&&(r=!0),r?t.type==="history"?t.resolveHistory(n):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(ka(this))return[this];if(this.type==="compound"&&!this.initial)return jt||Ut(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var n=va(this.initialStateValue);return Tt(n.map(function(r){return t.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var n=it(t),r=n[0],o=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var i=this.getStateNode(r);if(i.type==="history")return i.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(o)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:Of(this.states,function(n,r){if(!t)return n.historyValue();var o=at(t)?void 0:t[r];return n.historyValue(o||n.initialStateValue)},function(n){return!n.history})}},e.prototype.resolveHistory=function(t){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!t){var o=this.target;return o?Tt(va(o).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var i=ax(r.path,"states")(t).current;return at(i)?[r.getStateNode(i)]:Tt(va(i).map(function(a){return n.history==="deep"?r.getFromRelativePath(a):[r.states[a[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,n=Tt(Object.keys(this.states).map(function(r){return t.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,n,r,o;if(this.__cache.events)return this.__cache.events;var i=this.states,a=new Set(this.ownEvents);if(i)try{for(var s=Ze(Object.keys(i)),c=s.next();!c.done;c=s.next()){var u=c.value,d=i[u];if(d.states)try{for(var f=(r=void 0,Ze(d.events)),m=f.next();!m.done;m=f.next()){var h=m.value;a.add("".concat(h))}}catch(b){r={error:b}}finally{try{m&&!m.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}}}catch(b){t={error:b}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var n=this;if(t!==void 0)return t.map(function(r){if(!at(r))return r;var o=r[0]===n.delimiter;if(o&&!n.parent)return n.getStateNodeByPath(r.slice(1));var i=o?n.key+r:r;if(n.parent)try{var a=n.parent.getStateNodeByPath(i);return a}catch(s){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
139
+ `).concat(s.message))}else return n.getStateNodeByPath(i)})},e.prototype.formatTransition=function(t){var n=this,r=hx(t.target),o="internal"in t?t.internal:r?r.some(function(c){return at(c)&&c[0]===n.delimiter}):!0,i=this.machine.options.guards,a=this.resolveTarget(r),s=ye(ye({},t),{actions:cr(In(t.actions)),cond:Rv(t.cond,i),target:a,source:this,internal:o,eventType:t.event,toJSON:function(){return ye(ye({},s),{target:s.target?s.target.map(function(c){return"#".concat(c.id)}):void 0,source:"#".concat(n.id)})}});return s},e.prototype.formatTransitions=function(){var t,n,r=this,o;if(!this.config.on)o=[];else if(Array.isArray(this.config.on))o=this.config.on;else{var i=this.config.on,a=Oo,s=i[a],c=s===void 0?[]:s,u=Mu(i,[typeof a=="symbol"?a:a+""]);o=Tt(Object.keys(u).map(function(v){!jt&&v===to&&Ut(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var w=Kr(v,u[v]);return jt||Ux(r,v,w),w}).concat(Kr(Oo,c)))}var d=this.config.always?Kr("",this.config.always):[],f=this.config.onDone?Kr(String(Ji(this.id)),this.config.onDone):[];jt||Ut(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var m=Tt(this.invoke.map(function(v){var w=[];return v.onDone&&w.push.apply(w,St([],it(Kr(String(ga(v.id)),v.onDone)),!1)),v.onError&&w.push.apply(w,St([],it(Kr(String(Fo(v.id)),v.onError)),!1)),w})),h=this.after,b=Tt(St(St(St(St([],it(f),!1),it(m),!1),it(o),!1),it(d),!1).map(function(v){return In(v).map(function(w){return r.formatTransition(w)})}));try{for(var y=Ze(h),T=y.next();!T.done;T=y.next()){var S=T.value;b.push(S)}}catch(v){t={error:v}}finally{try{T&&!T.done&&(n=y.return)&&n.call(y)}finally{if(t)throw t.error}}return b},e}();function Kx(e,t,n){return n===void 0&&(n=e.context),new Yx(e,t,n)}var qx=Sx,Hc;(function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"})(Hc||(Hc={}));var Yo=l.useLayoutEffect;function Mf(e){var t=$e.useRef();return t.current||(t.current={v:e()}),t.current.v}var Xx=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},Gx=globalThis&&globalThis.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Zx(e,t){var n,r,o=Xx([[],[]],2),i=o[0],a=o[1];try{for(var s=Gx(e),c=s.next();!c.done;c=s.next()){var u=c.value;t(u)?i.push(u):a.push(u)}}catch(d){n={error:d}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[i,a]}var Po=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i},jf=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};function Lf(e,t){var n=e.exec,r=n(t.context,t._event.data,{action:e,state:t,_event:t._event});r()}function Qx(e){var t=l.useRef([]),n=l.useRef([]);Yo(function(){var r=e.subscribe(function(o){var i,a;if(o.actions.length){var s=o.actions.filter(function(f){return typeof f.exec=="function"&&"__effect"in f.exec}),c=Po(Zx(s,function(f){return f.exec.__effect===Hc.Effect}),2),u=c[0],d=c[1];(i=t.current).push.apply(i,jf([],Po(u.map(function(f){return[f,o]})),!1)),(a=n.current).push.apply(a,jf([],Po(d.map(function(f){return[f,o]})),!1))}});return function(){r.unsubscribe()}},[]),Yo(function(){for(;n.current.length;){var r=Po(n.current.shift(),2),o=r[0],i=r[1];Lf(o,i)}}),l.useEffect(function(){for(;t.current.length;){var r=Po(t.current.shift(),2),o=r[0],i=r[1];Lf(o,i)}})}var Ko=globalThis&&globalThis.__assign||function(){return Ko=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ko.apply(this,arguments)},Jx=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},e_=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};function t_(e,t,n){if(typeof e=="object")return e;var r=function(){};return{next:e,error:t||r,complete:n||r}}function n_(e,t,n){t===void 0&&(t={});var r=Mf(function(){return typeof e=="function"?e():e});if(process.env.NODE_ENV!=="production"&&typeof e!="function"){var o=e_(l.useState(r),1),i=o[0];e!==i&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var a=t.context,s=t.guards,c=t.actions,u=t.activities,d=t.services,f=t.delays,m=t.state,h=Jx(t,["context","guards","actions","activities","services","delays","state"]),b=Mf(function(){var y={context:a,guards:s,actions:c,activities:u,services:d,delays:f},T=r.withConfig(y,function(){return Ko(Ko({},r.context),a)});return Lv(T,Ko({deferEvents:!0},h))});return Yo(function(){var y;return n&&(y=b.subscribe(t_(n))),function(){y==null||y.unsubscribe()}},[n]),Yo(function(){return b.start(m?wn.create(m):void 0),function(){b.stop()}},[]),Yo(function(){Object.assign(b.machine.options.actions,c),Object.assign(b.machine.options.guards,s),Object.assign(b.machine.options.activities,u),Object.assign(b.machine.options.services,d),Object.assign(b.machine.options.delays,f)},[c,s,u,d,f]),Qx(b),b}var r_=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i};globalThis&&globalThis.__spreadArray;function o_(e,t){t===void 0&&(t={});var n=l.useCallback(function(s){var c=s.changed===void 0&&Object.keys(s.children).length;(s.changed||c)&&a(s)},[]),r=n_(e,t,n),o=r_(l.useState(function(){var s=r.machine.initialState;return t.state?wn.create(t.state):s}),2),i=o[0],a=o[1];return[i,r.send,r]}var i_=Object.defineProperty,a_=(e,t)=>{for(var n in t)i_(e,n,{get:t[n],enumerable:!0})},An={};a_(An,{assign:()=>u_,colors:()=>pr,createStringInterpolator:()=>qu,skipAnimation:()=>Uv,to:()=>zv,willAdvance:()=>Xu});var Hu=Ri(),He=e=>Ii(e,Hu),Wu=Ri();He.write=e=>Ii(e,Wu);var bs=Ri();He.onStart=e=>Ii(e,bs);var zu=Ri();He.onFrame=e=>Ii(e,zu);var Uu=Ri();He.onFinish=e=>Ii(e,Uu);var io=[];He.setTimeout=(e,t)=>{const n=He.now()+t,r=()=>{const i=io.findIndex(a=>a.cancel==r);~i&&io.splice(i,1),dr-=~i?1:0},o={time:n,handler:e,cancel:r};return io.splice(Fv(n),0,o),dr+=1,Vv(),o};var Fv=e=>~(~io.findIndex(t=>t.time>e)||~io.length);He.cancel=e=>{bs.delete(e),zu.delete(e),Uu.delete(e),Hu.delete(e),Wu.delete(e)};He.sync=e=>{Wc=!0,He.batchedUpdates(e),Wc=!1};He.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...o){t=o,He.onStart(n)}return r.handler=e,r.cancel=()=>{bs.delete(n),t=null},r};var Yu=typeof window<"u"?window.requestAnimationFrame:()=>{};He.use=e=>Yu=e;He.now=typeof performance<"u"?()=>performance.now():Date.now;He.batchedUpdates=e=>e();He.catch=console.error;He.frameLoop="always";He.advance=()=>{He.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Hv()};var lr=-1,dr=0,Wc=!1;function Ii(e,t){Wc?(t.delete(e),e(0)):(t.add(e),Vv())}function Vv(){lr<0&&(lr=0,He.frameLoop!=="demand"&&Yu(Bv))}function s_(){lr=-1}function Bv(){~lr&&(Yu(Bv),He.batchedUpdates(Hv))}function Hv(){const e=lr;lr=He.now();const t=Fv(lr);if(t&&(Wv(io.splice(0,t),n=>n.handler()),dr-=t),!dr){s_();return}bs.flush(),Hu.flush(e?Math.min(64,lr-e):16.667),zu.flush(),Wu.flush(),Uu.flush()}function Ri(){let e=new Set,t=e;return{add(n){dr+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return dr-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,dr-=t.size,Wv(t,r=>r(n)&&e.add(r)),dr+=e.size,t=e)}}}function Wv(e,t){e.forEach(n=>{try{t(n)}catch(r){He.catch(r)}})}function zc(){}var c_=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ve={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Kn(e,t){if(ve.arr(e)){if(!ve.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Qe=(e,t)=>e.forEach(t);function Bn(e,t,n){if(ve.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var pn=e=>ve.und(e)?[]:ve.arr(e)?e:[e];function qo(e,t){if(e.size){const n=Array.from(e);e.clear(),Qe(n,t)}}var Ho=(e,...t)=>qo(e,n=>n(...t)),Ku=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),qu,zv,pr=null,Uv=!1,Xu=zc,u_=e=>{e.to&&(zv=e.to),e.now&&(He.now=e.now),e.colors!==void 0&&(pr=e.colors),e.skipAnimation!=null&&(Uv=e.skipAnimation),e.createStringInterpolator&&(qu=e.createStringInterpolator),e.requestAnimationFrame&&He.use(e.requestAnimationFrame),e.batchedUpdates&&(He.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Xu=e.willAdvance),e.frameLoop&&(He.frameLoop=e.frameLoop)},Xo=new Set,_n=[],rc=[],Ma=0,ws={get idle(){return!Xo.size&&!_n.length},start(e){Ma>e.priority?(Xo.add(e),He.onStart(l_)):(Yv(e),He(Uc))},advance:Uc,sort(e){if(Ma)He.onFrame(()=>ws.sort(e));else{const t=_n.indexOf(e);~t&&(_n.splice(t,1),Kv(e))}},clear(){_n=[],Xo.clear()}};function l_(){Xo.forEach(Yv),Xo.clear(),He(Uc)}function Yv(e){_n.includes(e)||Kv(e)}function Kv(e){_n.splice(d_(_n,t=>t.priority>e.priority),0,e)}function Uc(e){const t=rc;for(let n=0;n<_n.length;n++){const r=_n[n];Ma=r.priority,r.idle||(Xu(r),r.advance(e),r.idle||t.push(r))}return Ma=0,rc=_n,rc.length=0,_n=t,_n.length>0}function d_(e,t){const n=e.findIndex(t);return n<0?e.length:n}var f_=(e,t,n)=>Math.min(Math.max(n,e),t),h_={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},On="[-+]?\\d*\\.?\\d+",ja=On+"%";function Es(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var p_=new RegExp("rgb"+Es(On,On,On)),v_=new RegExp("rgba"+Es(On,On,On,On)),m_=new RegExp("hsl"+Es(On,ja,ja)),g_=new RegExp("hsla"+Es(On,ja,ja,On)),y_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,b_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,w_=/^#([0-9a-fA-F]{6})$/,E_=/^#([0-9a-fA-F]{8})$/;function x_(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=w_.exec(e))?parseInt(t[1]+"ff",16)>>>0:pr&&pr[e]!==void 0?pr[e]:(t=p_.exec(e))?(Gr(t[1])<<24|Gr(t[2])<<16|Gr(t[3])<<8|255)>>>0:(t=v_.exec(e))?(Gr(t[1])<<24|Gr(t[2])<<16|Gr(t[3])<<8|Bf(t[4]))>>>0:(t=y_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=E_.exec(e))?parseInt(t[1],16)>>>0:(t=b_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=m_.exec(e))?(Ff(Vf(t[1]),ta(t[2]),ta(t[3]))|255)>>>0:(t=g_.exec(e))?(Ff(Vf(t[1]),ta(t[2]),ta(t[3]))|Bf(t[4]))>>>0:null}function oc(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ff(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=oc(o,r,e+1/3),a=oc(o,r,e),s=oc(o,r,e-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(s*255)<<8}function Gr(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Vf(e){return(parseFloat(e)%360+360)%360/360}function Bf(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function ta(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Hf(e){let t=x_(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,o=(t&65280)>>>8,i=(t&255)/255;return`rgba(${n}, ${r}, ${o}, ${i})`}var di=(e,t,n)=>{if(ve.fun(e))return e;if(ve.arr(e))return di({range:e,output:t,extrapolate:n});if(ve.str(e.output[0]))return qu(e);const r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{const d=S_(u,i);return __(u,i[d],i[d+1],o[d],o[d+1],c,a,s,r.map)}};function __(e,t,n,r,o,i,a,s,c){let u=c?c(e):e;if(u<t){if(a==="identity")return u;a==="clamp"&&(u=t)}if(u>n){if(s==="identity")return u;s==="clamp"&&(u=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=i(u),r===-1/0?u=-u:o===1/0?u=u+r:u=u*(o-r)+r,u)}function S_(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var C_=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,o=t==="end"?Math.floor(r):Math.ceil(r);return f_(0,1,o/e)},La=1.70158,na=La*1.525,Wf=La+1,zf=2*Math.PI/3,Uf=2*Math.PI/4.5,ra=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,$_={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Wf*e*e*e-La*e*e,easeOutBack:e=>1+Wf*Math.pow(e-1,3)+La*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((na+1)*2*e-na)/2:(Math.pow(2*e-2,2)*((na+1)*(e*2-2)+na)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*zf),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*zf)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Uf))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Uf)/2+1,easeInBounce:e=>1-ra(1-e),easeOutBounce:ra,easeInOutBounce:e=>e<.5?(1-ra(1-2*e))/2:(1+ra(2*e-1))/2,steps:C_},fi=Symbol.for("FluidValue.get"),po=Symbol.for("FluidValue.observers"),En=e=>!!(e&&e[fi]),on=e=>e&&e[fi]?e[fi]():e,Yf=e=>e[po]||null;function T_(e,t){e.eventObserved?e.eventObserved(t):e(t)}function hi(e,t){const n=e[po];n&&n.forEach(r=>{T_(r,t)})}var qv=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");I_(this,e)}},I_=(e,t)=>Xv(e,fi,t);function Eo(e,t){if(e[fi]){let n=e[po];n||Xv(e,po,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function pi(e,t){const n=e[po];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[po]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Xv=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ba=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,R_=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Kf=new RegExp(`(${ba.source})(%|[a-z]+)`,"i"),O_=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,xs=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Gv=e=>{const[t,n]=P_(e);if(!t||Ku())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(n);return o||e}else{if(n&&xs.test(n))return Gv(n);if(n)return n}return e},P_=e=>{const t=xs.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ic,A_=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Zv=e=>{ic||(ic=pr?new RegExp(`(${Object.keys(pr).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>on(i).replace(xs,Gv).replace(R_,Hf).replace(ic,Hf)),n=t.map(i=>i.match(ba).map(Number)),o=n[0].map((i,a)=>n.map(s=>{if(!(a in s))throw Error('The arity of each "output" value must be equal');return s[a]})).map(i=>di({...e,output:i}));return i=>{var c;const a=!Kf.test(t[0])&&((c=t.find(u=>Kf.test(u)))==null?void 0:c.replace(ba,""));let s=0;return t[0].replace(ba,()=>`${o[s++](i)}${a||""}`).replace(O_,A_)}},Gu="react-spring: ",Qv=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Gu}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},D_=Qv(console.warn);function N_(){D_(`${Gu}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var k_=Qv(console.warn);function M_(){k_(`${Gu}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function _s(e){return ve.str(e)&&(e[0]=="#"||/\d/.test(e)||!Ku()&&xs.test(e)||e in(pr||{}))}var Zu=Ku()?l.useEffect:l.useLayoutEffect,j_=()=>{const e=l.useRef(!1);return Zu(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Jv(){const e=l.useState()[1],t=j_();return()=>{t.current&&e(Math.random())}}function L_(e,t){const[n]=l.useState(()=>({inputs:t,result:e()})),r=l.useRef(),o=r.current;let i=o;return i?t&&i.inputs&&F_(t,i.inputs)||(i={inputs:t,result:e()}):i=n,l.useEffect(()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)},[i]),i.result}function F_(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var em=e=>l.useEffect(e,V_),V_=[];function qf(e){const t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var vi=Symbol.for("Animated:node"),B_=e=>!!e&&e[vi]===e,Fn=e=>e&&e[vi],Qu=(e,t)=>c_(e,vi,t),Ss=e=>e&&e[vi]&&e[vi].getPayload(),tm=class{constructor(){Qu(this,this)}getPayload(){return this.payload||[]}},Oi=class extends tm{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,ve.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Oi(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return ve.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,ve.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},mi=class extends Oi{constructor(e){super(0),this._string=null,this._toString=di({output:[e,e]})}static create(e){return new mi(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(ve.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=di({output:[this.getValue(),e]})),this._value=0,super.reset()}},Fa={dependencies:null},Cs=class extends tm{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Bn(this.source,(n,r)=>{B_(n)?t[r]=n.getValue(e):En(n)?t[r]=on(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Qe(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return Bn(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Fa.dependencies&&En(e)&&Fa.dependencies.add(e);const t=Ss(e);t&&Qe(t,n=>this.add(n))}},nm=class extends Cs{constructor(e){super(e)}static create(e){return new nm(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(H_)),!0)}};function H_(e){return(_s(e)?mi:Oi).create(e)}function Yc(e){const t=Fn(e);return t?t.constructor:ve.arr(e)?nm:_s(e)?mi:Oi}var Xf=(e,t)=>{const n=!ve.fun(e)||e.prototype&&e.prototype.isReactComponent;return l.forwardRef((r,o)=>{const i=l.useRef(null),a=n&&l.useCallback(b=>{i.current=U_(o,b)},[o]),[s,c]=z_(r,t),u=Jv(),d=()=>{const b=i.current;if(n&&!b)return;(b?t.applyAnimatedValues(b,s.getValue(!0)):!1)===!1&&u()},f=new W_(d,c),m=l.useRef();Zu(()=>(m.current=f,Qe(c,b=>Eo(b,f)),()=>{m.current&&(Qe(m.current.deps,b=>pi(b,m.current)),He.cancel(m.current.update))})),l.useEffect(d,[]),em(()=>()=>{const b=m.current;Qe(b.deps,y=>pi(y,b))});const h=t.getComponentProps(s.getValue());return $e.createElement(e,{...h,ref:a})})},W_=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&He.write(this.update)}};function z_(e,t){const n=new Set;return Fa.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Cs(e),Fa.dependencies=null,[e,n]}function U_(e,t){return e&&(ve.fun(e)?e(t):e.current=t),t}var Gf=Symbol.for("AnimatedComponent"),Y_=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=o=>new Cs(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=a=>{const s=Zf(a)||"Anonymous";return ve.str(a)?a=i[a]||(i[a]=Xf(a,o)):a=a[Gf]||(a[Gf]=Xf(a,o)),a.displayName=`Animated(${s})`,a};return Bn(e,(a,s)=>{ve.arr(e)&&(s=Zf(a)),i[s]=i(a)}),{animated:i}},Zf=e=>ve.str(e)?e:e&&ve.str(e.displayName)?e.displayName:ve.fun(e)&&e.name||null;function Ir(e,...t){return ve.fun(e)?e(...t):e}var Go=(e,t)=>e===!0||!!(t&&e&&(ve.fun(e)?e(t):pn(e).includes(t))),rm=(e,t)=>ve.obj(e)?t&&e[t]:e,om=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,K_=e=>e,Ju=(e,t=K_)=>{let n=q_;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const i=t(e[o],o);ve.und(i)||(r[o]=i)}return r},q_=["config","onProps","onStart","onChange","onPause","onResume","onRest"],X_={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function G_(e){const t={};let n=0;if(Bn(e,(r,o)=>{X_[o]||(t[o]=r,n++)}),n)return t}function im(e){const t=G_(e);if(t){const n={to:t};return Bn(e,(r,o)=>o in t||(n[o]=r)),n}return{...e}}function gi(e){return e=on(e),ve.arr(e)?e.map(gi):_s(e)?An.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Z_(e){for(const t in e)return!0;return!1}function Kc(e){return ve.fun(e)||ve.arr(e)&&ve.obj(e[0])}function Q_(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function J_(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var am={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},qc={...am.default,mass:1,damping:1,easing:$_.linear,clamp:!1},eS=class{constructor(){this.velocity=0,Object.assign(this,qc)}};function tS(e,t,n){n&&(n={...n},Qf(n,t),t={...n,...t}),Qf(e,t),Object.assign(e,t);for(const a in qc)e[a]==null&&(e[a]=qc[a]);let{frequency:r,damping:o}=e;const{mass:i}=e;return ve.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r),e}function Qf(e,t){if(!ve.und(t.decay))e.duration=void 0;else{const n=!ve.und(t.tension)||!ve.und(t.friction);(n||!ve.und(t.frequency)||!ve.und(t.damping)||!ve.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var Jf=[],nS=class{constructor(){this.changed=!1,this.values=Jf,this.toValues=null,this.fromValues=Jf,this.config=new eS,this.immediate=!1}};function sm(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise((a,s)=>{let c,u,d=Go(n.cancel??(r==null?void 0:r.cancel),t);if(d)h();else{ve.und(n.pause)||(o.paused=Go(n.pause,t));let b=r==null?void 0:r.pause;b!==!0&&(b=o.paused||Go(b,t)),c=Ir(n.delay||0,t),b?(o.resumeQueue.add(m),i.pause()):(i.resume(),m())}function f(){o.resumeQueue.add(m),o.timeouts.delete(u),u.cancel(),c=u.time-He.now()}function m(){c>0&&!An.skipAnimation?(o.delayed=!0,u=He.setTimeout(h,c),o.pauseQueue.add(f),o.timeouts.add(u)):h()}function h(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(f),o.timeouts.delete(u),e<=(o.cancelId||0)&&(d=!0);try{i.start({...n,callId:e,cancel:d},a)}catch(b){s(b)}}})}var el=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?ao(e.get()):t.every(n=>n.noop)?cm(e.get()):Rn(e.get(),t.every(n=>n.finished)),cm=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Rn=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),ao=e=>({value:e,cancelled:!0,finished:!1});function um(e,t,n,r){const{callId:o,parentId:i,onRest:a}=t,{asyncTo:s,promise:c}=n;return!i&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const u=Ju(t,(T,S)=>S==="onRest"?void 0:T);let d,f;const m=new Promise((T,S)=>(d=T,f=S)),h=T=>{const S=o<=(n.cancelId||0)&&ao(r)||o!==n.asyncId&&Rn(r,!1);if(S)throw T.result=S,f(T),T},b=(T,S)=>{const v=new eh,w=new th;return(async()=>{if(An.skipAnimation)throw yi(n),w.result=Rn(r,!1),f(w),w;h(v);const C=ve.obj(T)?{...T}:{...S,to:T};C.parentId=o,Bn(u,(D,P)=>{ve.und(C[P])&&(C[P]=D)});const I=await r.start(C);return h(v),n.paused&&await new Promise(D=>{n.resumeQueue.add(D)}),I})()};let y;if(An.skipAnimation)return yi(n),Rn(r,!1);try{let T;ve.arr(e)?T=(async S=>{for(const v of S)await b(v)})(e):T=Promise.resolve(e(b,r.stop.bind(r))),await Promise.all([T.then(d),m]),y=Rn(r.get(),!0,!1)}catch(T){if(T instanceof eh)y=T.result;else if(T instanceof th)y=T.result;else throw T}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?s:void 0,n.promise=i?c:void 0)}return ve.fun(a)&&He.batchedUpdates(()=>{a(y,r,r.item)}),y})()}function yi(e,t){qo(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var eh=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},th=class extends Error{constructor(){super("SkipAnimationSignal")}},Xc=e=>e instanceof tl,rS=1,tl=class extends qv{constructor(){super(...arguments),this.id=rS++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Fn(this);return e&&e.getValue()}to(...e){return An.to(this,e)}interpolate(...e){return N_(),An.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){hi(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||ws.sort(this),hi(this,{type:"priority",parent:this,priority:e})}},jr=Symbol.for("SpringPhase"),lm=1,Gc=2,Zc=4,ac=e=>(e[jr]&lm)>0,ir=e=>(e[jr]&Gc)>0,Ao=e=>(e[jr]&Zc)>0,nh=(e,t)=>t?e[jr]|=Gc|lm:e[jr]&=~Gc,rh=(e,t)=>t?e[jr]|=Zc:e[jr]&=~Zc,oS=class extends tl{constructor(e,t){if(super(),this.animation=new nS,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!ve.und(e)||!ve.und(t)){const n=ve.obj(e)?{...e}:{...t,from:e};ve.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ir(this)||this._state.asyncTo)||Ao(this)}get goal(){return on(this.animation.to)}get velocity(){const e=Fn(this);return e instanceof Oi?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ac(this)}get isAnimating(){return ir(this)}get isPaused(){return Ao(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,a=Ss(r.to);!a&&En(r.to)&&(o=pn(on(r.to))),r.values.forEach((u,d)=>{if(u.done)return;const f=u.constructor==mi?1:a?a[d].lastPosition:o[d];let m=r.immediate,h=f;if(!m){if(h=u.lastPosition,i.tension<=0){u.done=!0;return}let b=u.elapsedTime+=e;const y=r.fromValues[d],T=u.v0!=null?u.v0:u.v0=ve.arr(i.velocity)?i.velocity[d]:i.velocity;let S;const v=i.precision||(y==f?.005:Math.min(1,Math.abs(f-y)*.001));if(ve.und(i.duration))if(i.decay){const w=i.decay===!0?.998:i.decay,C=Math.exp(-(1-w)*b);h=y+T/(1-w)*(1-C),m=Math.abs(u.lastPosition-h)<=v,S=T*C}else{S=u.lastVelocity==null?T:u.lastVelocity;const w=i.restVelocity||v/10,C=i.clamp?0:i.bounce,I=!ve.und(C),D=y==f?u.v0>0:y<f;let P,F=!1;const k=1,H=Math.ceil(e/k);for(let R=0;R<H&&(P=Math.abs(S)>w,!(!P&&(m=Math.abs(f-h)<=v,m)));++R){I&&(F=h==f||h>f==D,F&&(S=-S*C,h=f));const E=-i.tension*1e-6*(h-f),p=-i.friction*.001*S,$=(E+p)/i.mass;S=S+$*k,h=h+S*k}}else{let w=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,u.durationProgress>0&&(u.elapsedTime=i.duration*u.durationProgress,b=u.elapsedTime+=e)),w=(i.progress||0)+b/this._memoizedDuration,w=w>1?1:w<0?0:w,u.durationProgress=w),h=y+i.easing(w)*(f-y),S=(h-u.lastPosition)/e,m=w==1}u.lastVelocity=S,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),m=!0)}a&&!a[d].done&&(m=!1),m?u.done=!0:t=!1,u.setValue(h,i.round)&&(n=!0)});const s=Fn(this),c=s.getValue();if(t){const u=on(r.to);(c!==u||n)&&!i.decay?(s.setValue(u),this._onChange(u)):n&&i.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return He.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ir(this)){const{to:e,config:t}=this.animation;He.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return ve.und(e)?(n=this.queue||[],this.queue=[]):n=[ve.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>el(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),yi(this._state,e&&this._lastCallId),He.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=ve.obj(n)?n[t]:n,(n==null||Kc(n))&&(n=void 0),r=ve.obj(r)?r[t]:r,r==null&&(r=void 0);const o={to:n,from:r};return ac(this)||(e.reverse&&([n,r]=[r,n]),r=on(r),ve.und(r)?Fn(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Ju(e,(a,s)=>/^on/.test(s)?rm(a,n):a)),ih(this,e,"onProps"),No(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return sm(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Ao(this)||(rh(this,!0),Ho(i.pauseQueue),No(this,"onPause",Rn(this,Do(this,this.animation.to)),this))},resume:()=>{Ao(this)&&(rh(this,!1),ir(this)&&this._resume(),Ho(i.resumeQueue),No(this,"onResume",Rn(this,Do(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(a=>{if(e.loop&&a.finished&&!(t&&a.noop)){const s=dm(e);if(s)return this._update(s,!0)}return a})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(ao(this));const r=!ve.und(e.to),o=!ve.und(e.from);if(r||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(ao(this));const{key:i,defaultProps:a,animation:s}=this,{to:c,from:u}=s;let{to:d=c,from:f=u}=e;o&&!r&&(!t.default||ve.und(d))&&(d=f),t.reverse&&([d,f]=[f,d]);const m=!Kn(f,u);m&&(s.from=f),f=on(f);const h=!Kn(d,c);h&&this._focus(d);const b=Kc(t.to),{config:y}=s,{decay:T,velocity:S}=y;(r||o)&&(y.velocity=0),t.config&&!b&&tS(y,Ir(t.config,i),t.config!==a.config?Ir(a.config,i):void 0);let v=Fn(this);if(!v||ve.und(d))return n(Rn(this,!0));const w=ve.und(t.reset)?o&&!t.default:!ve.und(f)&&Go(t.reset,i),C=w?f:this.get(),I=gi(d),D=ve.num(I)||ve.arr(I)||_s(I),P=!b&&(!D||Go(a.immediate||t.immediate,i));if(h){const R=Yc(d);if(R!==v.constructor)if(P)v=this._set(I);else throw Error(`Cannot animate between ${v.constructor.name} and ${R.name}, as the "to" prop suggests`)}const F=v.constructor;let k=En(d),H=!1;if(!k){const R=w||!ac(this)&&m;(h||R)&&(H=Kn(gi(C),I),k=!H),(!Kn(s.immediate,P)&&!P||!Kn(y.decay,T)||!Kn(y.velocity,S))&&(k=!0)}if(H&&ir(this)&&(s.changed&&!w?k=!0:k||this._stop(c)),!b&&((k||En(c))&&(s.values=v.getPayload(),s.toValues=En(d)?null:F==mi?[1]:pn(I)),s.immediate!=P&&(s.immediate=P,!P&&!w&&this._set(c)),k)){const{onRest:R}=s;Qe(aS,p=>ih(this,t,p));const E=Rn(this,Do(this,c));Ho(this._pendingCalls,E),this._pendingCalls.add(n),s.changed&&He.batchedUpdates(()=>{var p;s.changed=!w,R==null||R(E,this),w?Ir(a.onRest,E):(p=s.onStart)==null||p.call(s,E,this)})}w&&this._set(C),b?n(um(t.to,t,this._state,this)):k?this._start():ir(this)&&!h?this._pendingCalls.add(n):n(cm(C))}_focus(e){const t=this.animation;e!==t.to&&(Yf(this)&&this._detach(),t.to=e,Yf(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;En(t)&&(Eo(t,this),Xc(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;En(e)&&pi(e,this)}_set(e,t=!0){const n=on(e);if(!ve.und(n)){const r=Fn(this);if(!r||!Kn(n,r.getValue())){const o=Yc(n);!r||r.constructor!=o?Qu(this,o.create(n)):r.setValue(n),r&&He.batchedUpdates(()=>{this._onChange(n,t)})}}return Fn(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,No(this,"onStart",Rn(this,Do(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ir(this.animation.onChange,e,this)),Ir(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Fn(this).reset(on(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ir(this)||(nh(this,!0),Ao(this)||this._resume())}_resume(){An.skipAnimation?this.finish():ws.start(this)}_stop(e,t){if(ir(this)){nh(this,!1);const n=this.animation;Qe(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),hi(this,{type:"idle",parent:this});const r=t?ao(this.get()):Rn(this.get(),Do(this,e??n.to));Ho(this._pendingCalls,r),n.changed&&(n.changed=!1,No(this,"onRest",r,this))}}};function Do(e,t){const n=gi(t),r=gi(e.get());return Kn(r,n)}function dm(e,t=e.loop,n=e.to){const r=Ir(t);if(r){const o=r!==!0&&im(r),i=(o||e).reverse,a=!o||o.reset;return bi({...e,loop:t,default:!1,pause:void 0,to:!i||Kc(n)?n:void 0,from:a?e.from:void 0,reset:a,...o})}}function bi(e){const{to:t,from:n}=e=im(e),r=new Set;return ve.obj(t)&&oh(t,r),ve.obj(n)&&oh(n,r),e.keys=r.size?Array.from(r):null,e}function iS(e){const t=bi(e);return ve.und(t.default)&&(t.default=Ju(t)),t}function oh(e,t){Bn(e,(n,r)=>n!=null&&t.add(r))}var aS=["onStart","onRest","onChange","onPause","onResume"];function ih(e,t,n){e.animation[n]=t[n]!==om(t,n)?rm(t[n],e.key):void 0}function No(e,t,...n){var r,o,i,a;(o=(r=e.animation)[t])==null||o.call(r,...n),(a=(i=e.defaultProps)[t])==null||a.call(i,...n)}var sS=["onStart","onChange","onRest"],cS=1,uS=class{constructor(t,n){this.id=cS++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),n&&(this._flush=n),t&&this.start({default:!0,...t})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((n,r)=>t[r]=n.get()),t}set(t){for(const n in t){const r=t[n];ve.und(r)||this.springs[n].set(r)}}update(t){return t&&this.queue.push(bi(t)),this}start(t){let{queue:n}=this;return t?n=pn(t).map(bi):this.queue=[],this._flush?this._flush(this,n):(mm(this,n),Qc(this,n))}stop(t,n){if(t!==!!t&&(n=t),n){const r=this.springs;Qe(pn(n),o=>r[o].stop(!!t))}else yi(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(ve.und(t))this.start({pause:!0});else{const n=this.springs;Qe(pn(t),r=>n[r].pause())}return this}resume(t){if(ve.und(t))this.start({pause:!1});else{const n=this.springs;Qe(pn(t),r=>n[r].resume())}return this}each(t){Bn(this.springs,t)}_onFrame(){const{onStart:t,onChange:n,onRest:r}=this._events,o=this._active.size>0,i=this._changed.size>0;(o&&!this._started||i&&!this._started)&&(this._started=!0,qo(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));const a=!o&&this._started,s=i||a&&r.size?this.get():null;i&&n.size&&qo(n,([c,u])=>{u.value=s,c(u,this,this._item)}),a&&(this._started=!1,qo(r,([c,u])=>{u.value=s,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;He.onFrame(this._onFrame)}};function Qc(e,t){return Promise.all(t.map(n=>fm(e,n))).then(n=>el(e,n))}async function fm(e,t,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:c}=t,u=ve.obj(t.default)&&t.default;a&&(t.loop=!1),o===!1&&(t.to=null),i===!1&&(t.from=null);const d=ve.arr(o)||ve.fun(o)?o:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Qe(sS,y=>{const T=t[y];if(ve.fun(T)){const S=e._events[y];t[y]=({finished:v,cancelled:w})=>{const C=S.get(T);C?(v||(C.finished=!1),w&&(C.cancelled=!0)):S.set(T,{value:null,finished:v||!1,cancelled:w||!1})},u&&(u[y]=t[y])}});const f=e._state;t.pause===!f.paused?(f.paused=t.pause,Ho(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);const m=(r||Object.keys(e.springs)).map(y=>e.springs[y].start(t)),h=t.cancel===!0||om(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(sm(++e._lastAsyncId,{props:t,state:f,actions:{pause:zc,resume:zc,start(y,T){h?(yi(f,e._lastAsyncId),T(ao(e))):(y.onRest=s,T(um(d,y,f,e)))}}})),f.paused&&await new Promise(y=>{f.resumeQueue.add(y)});const b=el(e,await Promise.all(m));if(a&&b.finished&&!(n&&b.noop)){const y=dm(t,a,o);if(y)return mm(e,[y]),fm(e,y,!0)}return c&&He.batchedUpdates(()=>c(b,e,e.item)),b}function ah(e,t){const n={...e.springs};return t&&Qe(pn(t),r=>{ve.und(r.keys)&&(r=bi(r)),ve.obj(r.to)||(r={...r,to:void 0}),vm(n,r,o=>pm(o))}),hm(e,n),n}function hm(e,t){Bn(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Eo(n,e))})}function pm(e,t){const n=new oS;return n.key=e,t&&Eo(n,t),n}function vm(e,t,n){t.keys&&Qe(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function mm(e,t){Qe(t,n=>{vm(e.springs,n,r=>pm(r,e))})}var $s=({children:e,...t})=>{const n=l.useContext(Va),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=L_(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=Va;return $e.createElement(i,{value:t},e)},Va=lS($s,{});$s.Provider=Va.Provider;$s.Consumer=Va.Consumer;function lS(e,t){return Object.assign(e,$e.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var dS=()=>{const e=[],t=function(r){M_();const o=[];return Qe(e,(i,a)=>{if(ve.und(r))o.push(i.start());else{const s=n(r,i,a);s&&o.push(i.start(s))}}),o};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const o=e.indexOf(r);~o&&e.splice(o,1)},t.pause=function(){return Qe(e,r=>r.pause(...arguments)),this},t.resume=function(){return Qe(e,r=>r.resume(...arguments)),this},t.set=function(r){Qe(e,(o,i)=>{const a=ve.fun(r)?r(i,o):r;a&&o.set(a)})},t.start=function(r){const o=[];return Qe(e,(i,a)=>{if(ve.und(r))o.push(i.start());else{const s=this._getProps(r,i,a);s&&o.push(i.start(s))}}),o},t.stop=function(){return Qe(e,r=>r.stop(...arguments)),this},t.update=function(r){return Qe(e,(o,i)=>o.update(this._getProps(r,o,i))),this};const n=function(r,o,i){return ve.fun(r)?r(i,o):r};return t._getProps=n,t};function fS(e,t,n){const r=ve.fun(t)&&t;r&&!n&&(n=[]);const o=l.useMemo(()=>r||arguments.length==3?dS():void 0,[]),i=l.useRef(0),a=Jv(),s=l.useMemo(()=>({ctrls:[],queue:[],flush(S,v){const w=ah(S,v);return i.current>0&&!s.queue.length&&!Object.keys(w).some(I=>!S.springs[I])?Qc(S,v):new Promise(I=>{hm(S,w),s.queue.push(()=>{I(Qc(S,v))}),a()})}}),[]),c=l.useRef([...s.ctrls]),u=[],d=qf(e)||0;l.useMemo(()=>{Qe(c.current.slice(e,d),S=>{Q_(S,o),S.stop(!0)}),c.current.length=e,f(d,e)},[e]),l.useMemo(()=>{f(0,Math.min(d,e))},n);function f(S,v){for(let w=S;w<v;w++){const C=c.current[w]||(c.current[w]=new uS(null,s.flush)),I=r?r(w,C):t[w];I&&(u[w]=iS(I))}}const m=c.current.map((S,v)=>ah(S,u[v])),h=l.useContext($s),b=qf(h),y=h!==b&&Z_(h);Zu(()=>{i.current++,s.ctrls=c.current;const{queue:S}=s;S.length&&(s.queue=[],Qe(S,v=>v())),Qe(c.current,(v,w)=>{o==null||o.add(v),y&&v.start({default:h});const C=u[w];C&&(J_(v,C.ref),v.ref?v.queue.push(C):v.start(C))})}),em(()=>()=>{Qe(s.ctrls,S=>S.stop(!0))});const T=m.map(S=>({...S}));return o?[T,o]:T}function hS(e,t){const n=ve.fun(e),[[r],o]=fS(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,o]:r}var gm=class extends tl{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=di(...t);const n=this._get(),r=Yc(n);Qu(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Kn(t,n)||(Fn(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&sh(this._active)&&sc(this)}_get(){const e=ve.arr(this.source)?this.source.map(on):pn(on(this.source));return this.calc(...e)}_start(){this.idle&&!sh(this._active)&&(this.idle=!1,Qe(Ss(this),e=>{e.done=!1}),An.skipAnimation?(He.batchedUpdates(()=>this.advance()),sc(this)):ws.start(this))}_attach(){let e=1;Qe(pn(this.source),t=>{En(t)&&Eo(t,this),Xc(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Qe(pn(this.source),e=>{En(e)&&pi(e,this)}),this._active.clear(),sc(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=pn(this.source).reduce((t,n)=>Math.max(t,(Xc(n)?n.priority:0)+1),0))}};function pS(e){return e.idle!==!1}function sh(e){return!e.size||Array.from(e).every(pS)}function sc(e){e.idle||(e.idle=!0,Qe(Ss(e),t=>{t.done=!0}),hi(e,{type:"idle",parent:e}))}var Zr=(e,...t)=>new gm(e,t);An.assign({createStringInterpolator:Zv,to:(e,t)=>new gm(e,t)});var ym=/^--/;function vS(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!ym.test(e)&&!(Zo.hasOwnProperty(e)&&Zo[e])?t+"px":(""+t).trim()}var ch={};function mS(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:o,scrollTop:i,scrollLeft:a,viewBox:s,...c}=t,u=Object.values(c),d=Object.keys(c).map(f=>n||e.hasAttribute(f)?f:ch[f]||(ch[f]=f.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));o!==void 0&&(e.textContent=o);for(const f in r)if(r.hasOwnProperty(f)){const m=vS(f,r[f]);ym.test(f)?e.style.setProperty(f,m):e.style[f]=m}d.forEach((f,m)=>{e.setAttribute(f,u[m])}),i!==void 0&&(e.scrollTop=i),a!==void 0&&(e.scrollLeft=a),s!==void 0&&e.setAttribute("viewBox",s)}var Zo={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},gS=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),yS=["Webkit","Ms","Moz","O"];Zo=Object.keys(Zo).reduce((e,t)=>(yS.forEach(n=>e[gS(n,t)]=e[t]),e),Zo);var bS=/^(matrix|translate|scale|rotate|skew)/,wS=/^(translate)/,ES=/^(rotate|skew)/,cc=(e,t)=>ve.num(e)&&e!==0?e+t:e,wa=(e,t)=>ve.arr(e)?e.every(n=>wa(n,t)):ve.num(e)?e===t:parseFloat(e)===t,xS=class extends Cs{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push(a=>[`translate3d(${a.map(s=>cc(s,"px")).join(",")})`,wa(a,0)])),Bn(r,(a,s)=>{if(s==="transform")o.push([a||""]),i.push(c=>[c,c===""]);else if(bS.test(s)){if(delete r[s],ve.und(a))return;const c=wS.test(s)?"px":ES.test(s)?"deg":"";o.push(pn(a)),i.push(s==="rotate3d"?([u,d,f,m])=>[`rotate3d(${u},${d},${f},${cc(m,c)})`,wa(m,0)]:u=>[`${s}(${u.map(d=>cc(d,c)).join(",")})`,wa(u,s.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new _S(o,i)),super(r)}},_S=class extends qv{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Qe(this.inputs,(n,r)=>{const o=on(n[0]),[i,a]=this.transforms[r](ve.arr(o)?o:n.map(on));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){e==1&&Qe(this.inputs,t=>Qe(t,n=>En(n)&&Eo(n,this)))}observerRemoved(e){e==0&&Qe(this.inputs,t=>Qe(t,n=>En(n)&&pi(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),hi(this,e)}},SS=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];An.assign({batchedUpdates:hn.unstable_batchedUpdates,createStringInterpolator:Zv,colors:h_});var CS=Y_(SS,{applyAnimatedValues:mS,createAnimatedStyle:e=>new xS(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),$S=CS.animated;function Jc(e,t){return e.map(function(n,r){return n+t[r]})}function nl(e,t){return e.map(function(n,r){return n-t[r]})}function eu(e){return Math.hypot.apply(Math,e)}function TS(e,t,n){var r=eu(t),o=r===0?0:1/r,i=n===0?0:1/n,a=i*r,s=t.map(function(d){return i*d}),c=t.map(function(d){return o*d}),u=eu(e);return{velocities:s,velocity:a,distance:u,direction:c}}function tu(e){return Math.sign?Math.sign(e):+(e>0)-+(e<0)||+e}function IS(e,t,n){return Math.max(t,Math.min(e,n))}function RS(e,t){return Math.pow(e,t*5)}function uh(e,t,n){return t===0||Math.abs(t)===1/0?RS(e,n):e*t*n/(t+n*e)}function Qo(e,t,n,r){return r===void 0&&(r=.15),r===0?IS(e,t,n):e<t?-uh(t-e,n-t,r)+t:e>n?+uh(e-n,n-t,r)+n:e}function lh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function OS(e,t,n){return t&&lh(e.prototype,t),n&&lh(e,n),e}function tn(){return tn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tn.apply(this,arguments)}function bm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function PS(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Un(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AS(e,t){if(e){if(typeof e=="string")return dh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dh(e,t)}}function dh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ts(e,t){var n;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=AS(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
140
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=e[Symbol.iterator](),n.next.bind(n)}function wm(){}function Em(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?wm:t.length===1?t[0]:function(){for(var r,o=Ts(t),i;!(i=o()).done;){var a=i.value;r=a.apply(this,arguments)||r}return r}}function ur(e,t){if(e===void 0){if(t===void 0)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function fh(e){if(typeof e=="function"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}else return e}function rl(e,t){e===void 0&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],a=i[0],s=i[1];switch(typeof s){case"function":n[a]=s.call(n,e[a],a,e);break;case"object":n[a]=rl(e[a],s);break;case"boolean":s&&(n[a]=e[a]);break}}return n}function DS(){try{return"constructor"in GestureEvent}catch{return!1}}function xm(){return typeof window<"u"&&"ontouchstart"in window}function NS(){return typeof window<"u"&&"onpointerdown"in window}function _m(e){return"pointerId"in e?null:e.type==="touchend"?e.changedTouches:e.targetTouches}function Sm(e){return Array.from(_m(e)).map(function(t){return t.identifier})}function hh(e){var t="buttons"in e?e.buttons:0,n=e.shiftKey,r=e.altKey,o=e.metaKey,i=e.ctrlKey;return{buttons:t,shiftKey:n,altKey:r,metaKey:o,ctrlKey:i}}var kS=function(t){return t};function ph(e,t){t===void 0&&(t=kS);var n=_m(e),r=n?n[0]:e,o=r.clientX,i=r.clientY;return t([o,i])}var MS=180,jS=.15,LS=.5,FS=50,VS=250,BS={threshold:function(t){return t===void 0&&(t=0),ur(t)},rubberband:function(t){switch(t===void 0&&(t=0),t){case!0:return ur(jS);case!1:return ur(0);default:return ur(t)}},enabled:function(t){return t===void 0&&(t=!0),t},triggerAllEvents:function(t){return t===void 0&&(t=!1),t},initial:function(t){return t===void 0&&(t=0),typeof t=="function"?t:ur(t)},transform:!0},Cm=tn({},BS,{axis:!0,lockDirection:function(t){return t===void 0&&(t=!1),t},bounds:function(t){if(t===void 0&&(t={}),typeof t=="function")return function(f){return Cm.bounds(t(f))};var n=t,r=n.left,o=r===void 0?-1/0:r,i=n.right,a=i===void 0?1/0:i,s=n.top,c=s===void 0?-1/0:s,u=n.bottom,d=u===void 0?1/0:u;return[[o,a],[c,d]]}}),HS=typeof window<"u"&&window.document&&window.document.createElement,WS={enabled:function(t){return t===void 0&&(t=!0),t},domTarget:!0,window:function(e){function t(n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return e===void 0&&(e=HS?window:void 0),e}),eventOptions:function(t){var n=t===void 0?{}:t,r=n.passive,o=r===void 0?!0:r,i=n.capture,a=i===void 0?!1:i;return{passive:o,capture:a}},transform:!0},zS=tn({},Cm,{useTouch:function(t){t===void 0&&(t=!1);var n=xm(),r=NS();return!!(t&&n||n&&!r)},experimental_preventWindowScrollY:function(t){return t===void 0&&(t=!1),t},threshold:function(t,n,r){var o=r.filterTaps,i=o===void 0?!1:o,a=r.lockDirection,s=a===void 0?!1:a,c=r.axis,u=c===void 0?void 0:c,d=ur(t,i?3:s||u?1:0);return this.filterTaps=i,d},swipeVelocity:function(t){return t===void 0&&(t=LS),ur(t)},swipeDistance:function(t){return t===void 0&&(t=FS),ur(t)},swipeDuration:function(t){return t===void 0&&(t=VS),t},delay:function(t){switch(t===void 0&&(t=0),t){case!0:return MS;case!1:return 0;default:return t}}});function US(e){return e===void 0&&(e={}),rl(e,WS)}function YS(e){return e===void 0&&(e={}),rl(e,zS)}function KS(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=PS(e,["domTarget","eventOptions","window","enabled"]),a=US({domTarget:t,eventOptions:n,window:r,enabled:o});return a.drag=YS(i),a}function ko(e){return tn({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_threshold:[0,0],_lastEventType:void 0,_dragStarted:!1,_dragPreventScroll:!1,_dragIsTap:!0,_dragDelayed:!1,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:wm,canceled:!1,memo:void 0,args:void 0},e)}function $m(){var e={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1,locked:!1},t=ko({_pointerId:void 0,axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,tap:!1,swipe:[0,0]}),n=ko({_pointerIds:[],da:[0,0],vdva:[0,0],origin:void 0,turns:0}),r=ko({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),o=ko({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=ko({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:e,drag:t,pinch:n,wheel:r,move:o,scroll:i}}var Tr=new Map,qS=function(t){return t},XS=function(){function e(n,r){var o=this;r===void 0&&(r=[]),this.controller=n,this.args=r,this.debounced=!0,this.setTimeout=function(i,a){var s;a===void 0&&(a=140),clearTimeout(o.controller.timeouts[o.stateKey]);for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d<c;d++)u[d-2]=arguments[d];o.controller.timeouts[o.stateKey]=(s=window).setTimeout.apply(s,[i,a].concat(u))},this.clearTimeout=function(){clearTimeout(o.controller.timeouts[o.stateKey])},this.fireGestureHandler=function(i){if(i===void 0&&(i=!1),o.state._blocked)return o.debounced||(o.state._active=!1,o.clean()),null;if(!i&&!o.state.intentional&&!o.config.triggerAllEvents)return null;if(o.state.intentional){var a=o.state.active,s=o.state._active;o.state.active=s,o.state.first=s&&!a,o.state.last=a&&!s,o.controller.state.shared[o.ingKey]=s}var c=o.controller.pointerIds.size||o.controller.touchIds.size,u=o.controller.state.shared.buttons>0||c>0,d=tn({},o.controller.state.shared,o.state,o.mapStateValues(o.state),{locked:!!document.pointerLockElement,touches:c,down:u}),f=o.handler(d);return o.state.memo=f!==void 0?f:o.state.memo,d},this.controller=n,this.args=r}var t=e.prototype;return t.updateSharedState=function(r){Object.assign(this.controller.state.shared,r)},t.updateGestureState=function(r){Object.assign(this.state,r)},t.checkIntentionality=function(r,o){return{_intentional:r,_blocked:!1}},t.getMovement=function(r){var o=this.config.rubberband,i=this.state,a=i._bounds,s=i._initial,c=i._active,u=i._intentional,d=i.lastOffset,f=i.movement,m=i._threshold,h=this.getInternalMovement(r,this.state),b=u[0]===!1?vh(h[0],m[0]):u[0],y=u[1]===!1?vh(h[1],m[1]):u[1],T=this.checkIntentionality([b,y],h);if(T._blocked)return tn({},T,{_movement:h,delta:[0,0]});var S=T._intentional,v=h,w=[S[0]!==!1?h[0]-S[0]:0,S[1]!==!1?h[1]-S[1]:0],C=Jc(w,d),I=c?o:[0,0];return w=mh(a,Jc(w,s),I),tn({},T,{intentional:S[0]!==!1||S[1]!==!1,_initial:s,_movement:v,movement:w,values:r,offset:mh(a,C,I),delta:nl(w,f)})},t.clean=function(){this.clearTimeout()},OS(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}},{key:"transform",get:function(){return this.config.transform||this.controller.config.transform||qS}}]),e}();function vh(e,t){return Math.abs(e)>=t?tu(e)*t:!1}function mh(e,t,n){var r=t[0],o=t[1],i=n[0],a=n[1],s=e[0],c=s[0],u=s[1],d=e[1],f=d[0],m=d[1];return[Qo(r,c,u,i),Qo(o,f,m,a)]}function uc(e,t,n){var r=e.state,o=t.timeStamp,i=t.type,a=r.values,s=n?0:o-r.startTime;return{_lastEventType:i,event:t,timeStamp:o,elapsedTime:s,previous:a}}function GS(e,t,n,r){var o=e.state,i=e.config,a=e.stateKey,s=e.args,c=e.transform,u=o.offset,d=n.timeStamp,f=i.initial,m=i.bounds,h=i.threshold,b=nl(c(h),c([0,0])).map(Math.abs),y=tn({},$m()[a],{_active:!0,args:s,values:t,initial:r??t,_threshold:b,offset:u,lastOffset:u,startTime:d});return tn({},y,{_initial:fh(f,y),_bounds:fh(m,y)})}var ZS=function(t){var n=this;this.classes=t,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=xm(),this.supportsGestureEvents=DS(),this.bind=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];for(var a={},s=Ts(n.classes),c;!(c=s()).done;){var u=c.value;new u(n,o).addBindings(a)}var d=function(h){Ln(a,h,function(b){return n.nativeRefs[h](tn({},n.state.shared,{event:b,args:o}))})};for(var f in n.nativeRefs)d(f);return n.config.domTarget?rC(n,a):oC(n,a)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=Im(n.config),o=n.config.eventOptions;r&&Pi(r,Tm(n.domListeners),o),Object.values(n.timeouts).forEach(clearTimeout),eC(n)},this.classes=t,this.state=$m(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function QS(e,t){"pointerId"in t?e.pointerIds.add(t.pointerId):e.touchIds=new Set(Sm(t))}function JS(e,t){"pointerId"in t?e.pointerIds.delete(t.pointerId):Sm(t).forEach(function(n){return e.touchIds.delete(n)})}function eC(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(n){for(var i in o){var a=o[i];Pi(n,a,r)}e.windowListeners={}}}function tC(e,t,n){var r=e.config,o=e.windowListeners;n===void 0&&(n=r.eventOptions),r.window&&(Pi(r.window,o[t],n),delete o[t])}function nC(e,t,n,r){var o=e.config,i=e.windowListeners;n===void 0&&(n=[]),r===void 0&&(r=o.eventOptions),o.window&&(Pi(o.window,i[t],r),Rm(o.window,i[t]=n,r))}function rC(e,t){var n=e.config,r=e.domListeners,o=Im(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;Pi(o,Tm(r),i);for(var a=0,s=Object.entries(t);a<s.length;a++){var c=s[a],u=c[0],d=c[1],f=u.slice(2).toLowerCase();r.push([f,Em.apply(void 0,d)])}Rm(o,r,i)}function oC(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,a=Object.entries(t);i<a.length;i++){var s=a[i],c=s[0],u=s[1],d=Array.isArray(u)?u:[u],f=c+o;r[f]=Em.apply(void 0,d)}return r}function Tm(e){return e===void 0&&(e=[]),e.splice(0,e.length)}function Im(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function Ln(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function Rm(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={});for(var r=Ts(t),o;!(o=r()).done;){var i=o.value,a=i[0],s=i[1];e.addEventListener(a,s,n)}}function Pi(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={});for(var r=Ts(t),o;!(o=r()).done;){var i=o.value,a=i[0],s=i[1];e.removeEventListener(a,s,n)}}function iC(e,t,n){n===void 0&&(n={});var r=sC(e),o=l.useMemo(function(){return new ZS(r)},[]);return o.config=t,o.handlers=e,o.nativeRefs=n,l.useEffect(o.effect,[]),o.config.domTarget?aC:o.bind}function aC(){process.env.NODE_ENV==="development"&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}function sC(e){var t=new Set;return e.drag&&t.add(Tr.get("drag")),e.wheel&&t.add(Tr.get("wheel")),e.scroll&&t.add(Tr.get("scroll")),e.move&&t.add(Tr.get("move")),e.pinch&&t.add(Tr.get("pinch")),e.hover&&t.add(Tr.get("hover")),t}var cC=function(e){bm(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.getInternalMovement=function(o,i){return nl(o,i.initial)},n.checkIntentionality=function(o,i){if(o[0]===!1&&o[1]===!1)return{_intentional:o,axis:this.state.axis};var a=i.map(Math.abs),s=a[0],c=a[1],u=this.state.axis||(s>c?"x":s<c?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:o,_blocked:!1,axis:u}:u?this.config.axis&&u!==this.config.axis?{_intentional:o,_blocked:!0,axis:u}:(o[u==="x"?1:0]=!1,{_intentional:o,_blocked:!1,axis:u}):{_intentional:[!1,!1],_blocked:!1,axis:u}},n.getKinematics=function(o,i){var a=this.getMovement(o);if(!a._blocked){var s=i.timeStamp-this.state.timeStamp;Object.assign(a,TS(a.movement,a.delta,s))}return a},n.mapStateValues=function(o){return{xy:o.values,vxvy:o.velocities}},t}(XS),uC=3;function gh(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}var lC=function(e){bm(t,e);function t(){var r;return r=e.apply(this,arguments)||this,r.ingKey="dragging",r.stateKey="drag",r.setPointerCapture=function(o){if(!(r.config.useTouch||document.pointerLockElement)){var i=o.target,a=o.pointerId;i&&"setPointerCapture"in i&&i.setPointerCapture(a),r.updateGestureState({_dragTarget:i,_dragPointerId:a})}},r.releasePointerCapture=function(){if(!(r.config.useTouch||document.pointerLockElement)){var o=r.state,i=o._dragTarget,a=o._dragPointerId;if(a&&i&&"releasePointerCapture"in i&&(!("hasPointerCapture"in i)||i.hasPointerCapture(a)))try{i.releasePointerCapture(a)}catch{}}},r.preventScroll=function(o){r.state._dragPreventScroll&&o.cancelable&&o.preventDefault()},r.getEventId=function(o){return r.config.useTouch?o.changedTouches[0].identifier:o.pointerId},r.isValidEvent=function(o){return r.state._pointerId===r.getEventId(o)},r.shouldPreventWindowScrollY=r.config.experimental_preventWindowScrollY&&r.controller.supportsTouchEvents,r.setUpWindowScrollDetection=function(o){gh(o),nC(r.controller,r.stateKey,[["touchmove",r.preventScroll],["touchend",r.clean.bind(Un(r))],["touchcancel",r.clean.bind(Un(r))]],{passive:!1}),r.setTimeout(r.startDrag.bind(Un(r)),250,o)},r.setUpDelayedDragTrigger=function(o){r.state._dragDelayed=!0,gh(o),r.setTimeout(r.startDrag.bind(Un(r)),r.config.delay,o)},r.setStartState=function(o){var i=ph(o,r.transform);r.updateSharedState(hh(o)),r.updateGestureState(tn({},GS(Un(r),i,o),uc(Un(r),o,!0),{_pointerId:r.getEventId(o)})),r.updateGestureState(r.getMovement(i))},r.onDragStart=function(o){QS(r.controller,o),!(!r.enabled||r.state._active)&&(r.setStartState(o),r.setPointerCapture(o),r.shouldPreventWindowScrollY?r.setUpWindowScrollDetection(o):r.config.delay>0?r.setUpDelayedDragTrigger(o):r.startDrag(o,!0))},r.onDragChange=function(o){if(!(r.state.canceled||!r.state._active||!r.isValidEvent(o)||r.state._lastEventType===o.type&&o.timeStamp===r.state.timeStamp)){var i;if(document.pointerLockElement){var a=o.movementX,s=o.movementY;i=Jc(r.transform([a,s]),r.state.values)}else i=ph(o,r.transform);var c=r.getKinematics(i,o);if(!r.state._dragStarted){if(r.state._dragDelayed){r.startDrag(o);return}if(r.shouldPreventWindowScrollY)if(!r.state._dragPreventScroll&&c.axis)if(c.axis==="x")r.startDrag(o);else{r.state._active=!1;return}else return;else return}var u=hh(o);r.updateSharedState(u);var d=uc(Un(r),o),f=eu(c._movement),m=r.state._dragIsTap;m&&f>=uC&&(m=!1),r.updateGestureState(tn({},d,c,{_dragIsTap:m})),r.fireGestureHandler()}},r.onDragEnd=function(o){if(JS(r.controller,o),!!r.isValidEvent(o)&&(r.clean(),!!r.state._active)){r.state._active=!1;var i=r.state._dragIsTap,a=r.state.velocities,s=a[0],c=a[1],u=r.state.movement,d=u[0],f=u[1],m=r.state._intentional,h=m[0],b=m[1],y=r.config.swipeVelocity,T=y[0],S=y[1],v=r.config.swipeDistance,w=v[0],C=v[1],I=r.config.swipeDuration,D=tn({},uc(Un(r),o),r.getMovement(r.state.values)),P=[0,0];D.elapsedTime<I&&(h!==!1&&Math.abs(s)>T&&Math.abs(d)>w&&(P[0]=tu(s)),b!==!1&&Math.abs(c)>S&&Math.abs(f)>C&&(P[1]=tu(c))),r.updateSharedState({buttons:0}),r.updateGestureState(tn({},D,{tap:i,swipe:P})),r.fireGestureHandler(r.config.filterTaps&&i===!0)}},r.clean=function(){e.prototype.clean.call(Un(r)),r.state._dragStarted=!1,r.releasePointerCapture(),tC(r.controller,r.stateKey)},r.onCancel=function(){r.state.canceled||(r.updateGestureState({canceled:!0,_active:!1}),r.updateSharedState({buttons:0}),setTimeout(function(){return r.fireGestureHandler()},0))},r.onClick=function(o){r.state._dragIsTap||o.stopPropagation()},r}var n=t.prototype;return n.startDrag=function(o,i){i===void 0&&(i=!1),!(!this.state._active||this.state._dragStarted)&&(i||this.setStartState(o),this.updateGestureState({_dragStarted:!0,_dragPreventScroll:!0,cancel:this.onCancel}),this.clearTimeout(),this.fireGestureHandler())},n.addBindings=function(o){if(this.config.useTouch?(Ln(o,"onTouchStart",this.onDragStart),Ln(o,"onTouchMove",this.onDragChange),Ln(o,"onTouchEnd",this.onDragEnd),Ln(o,"onTouchCancel",this.onDragEnd)):(Ln(o,"onPointerDown",this.onDragStart),Ln(o,"onPointerMove",this.onDragChange),Ln(o,"onPointerUp",this.onDragEnd),Ln(o,"onPointerCancel",this.onDragEnd)),this.config.filterTaps){var i=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Ln(o,i,this.onClick)}},t}(cC);function dC(e,t){var n,r=[],o,i=!1;function a(){for(var s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];return i&&n===this&&t(c,r)||(o=e.apply(this,c),i=!0,n=this,r=c),o}return a}function Ea(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,o;if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ea(e[r],t[r]))return!1;return!0}var i;if(typeof Map=="function"&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!Ea(r.value[1],t.get(r.value[0])))return!1;return!0}if(typeof Set=="function"&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(typeof Element<"u"&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!(o[r]==="_owner"&&e.$$typeof)&&!Ea(e[o[r]],t[o[r]]))return!1;return!0}return e!==e&&t!==t}function fC(e,t){try{return Ea(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}function hC(e,t){t===void 0&&(t={}),Tr.set("drag",lC);var n=l.useRef();return n.current||(n.current=dC(KS,fC)),iC({drag:e},n.current(t))}var pC="aglyib0";const xo=l.forwardRef(({as:e,children:t,className:n,style:r,isDisabled:o,...i},a)=>{const s=e||"button";return j.jsx(s,{ref:a,as:e,"data-test-id":i["data-test-id"],className:Pe(pC,n),disabled:o,style:r,...i,children:j.jsx(os,{size:16,color:o?Rt.theme.colors.grey1:Rt.theme.colors.black})})});xo.displayName="Button";xo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0};const Om=l.forwardRef(({header:e,onBack:t,onClose:n,showBack:r,showClose:o,title:i,bind:a,hasHandleBar:s},c)=>e!==!1?j.jsx(et,{"data-rsbs-header":!0,"data-rsbs-header-handle-bar":s,ref:c,...s?a==null?void 0:a():{},children:e||j.jsxs(Yt,{alignItems:"center",justifyContent:"space-between",py:"$8",gap:"$16",children:[j.jsxs(Yt,{alignItems:"center",gap:"$16",children:[r&&j.jsx(g0,{cursor:"pointer",onClick:t,size:18,color:Rt.theme.colors.grey1,"data-test-id":"vds-BS-back-btn"}),i&&j.jsx(sn,{fontWeight:"$bold",textStyle:"subtitle2",m:"$0",children:i})]}),o&&j.jsx(xo,{onClick:n,"data-test-id":"vds-BS-close-btn"})]})},"header"):j.jsx(et,{"data-rsbs-header":!0,ref:c,...a==null?void 0:a()},"header"));Om.defaultProps={title:void 0,header:void 0,showBack:void 0,showClose:!0,hasHandleBar:!0,bind:void 0,onBack:void 0,onClose:void 0};function vC({targetRef:e,enabled:t}){const n=l.useRef({activate:()=>{throw new TypeError("Tried to activate aria hider too early")},deactivate:()=>{}});return l.useDebugValue(t?"Enabled":"Disabled"),l.useEffect(()=>{if(!t){n.current.deactivate(),n.current={activate:()=>{},deactivate:()=>{}};return}const r=e.current;let o=!1,i=[],a=[];n.current={activate:()=>{if(o)return;o=!0;const{parentNode:s}=r;document.querySelectorAll("body > *").forEach(c=>{if(c===s)return;const u=c.getAttribute("aria-hidden");u!==null&&u!=="false"||(i.push(u),a.push(c),c.setAttribute("aria-hidden","true"))})},deactivate:()=>{o&&(o=!1,a.forEach((s,c)=>{const u=i[c];u===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",u)}),i=[],a=[])}}},[e,t]),n}/*!
141
141
  * tabbable 6.2.0
142
142
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
143
- */var Om=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ba=Om.join(","),Pm=typeof Element>"u",Lr=Pm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ha=!Pm&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Wa=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},mC=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Am=function(t,n,r){if(Wa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ba));return n&&Lr.call(t,Ba)&&o.unshift(t),o=o.filter(r),o},Dm=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Wa(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),c=s.length?s:a.children,u=e(c,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else{var d=Lr.call(a,Ba);d&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!Wa(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&m){var h=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:a,candidates:h})}else i.unshift.apply(i,a.children)}}return o},Nm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Rr=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||mC(t))&&!Nm(t)?0:t.tabIndex},gC=function(t,n){var r=Rr(t);return r<0&&n&&!Nm(t)?0:r},yC=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},km=function(t){return t.tagName==="INPUT"},bC=function(t){return km(t)&&t.type==="hidden"},wC=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},EC=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},xC=function(t){if(!t.name)return!0;var n=t.form||Ha(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=EC(o,t.form);return!i||i===t},_C=function(t){return km(t)&&t.type==="radio"},SC=function(t){return _C(t)&&!xC(t)},CC=function(t){var n,r=t&&Ha(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,c;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var u,d,f;r=Ha(o),o=(u=r)===null||u===void 0?void 0:u.host,i=!!((d=o)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},gh=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},$C=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Lr.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Lr.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,u=Ha(t);if(c&&!c.shadowRoot&&o(c)===!0)return gh(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=s}if(CC(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return gh(t);return!1},TC=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Lr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},za=function(t,n){return!(n.disabled||Wa(n)||bC(n)||$C(n,t)||wC(n)||TC(n))},nu=function(t,n){return!(SC(n)||Rr(n)<0||!za(t,n))},IC=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},RC=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=gC(s,a),u=a?e(o.candidates):s;c===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:u})}),r.sort(yC).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},OC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Dm([t],n.includeContainer,{filter:nu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:IC}):r=Am(t,n.includeContainer,nu.bind(null,n)),RC(r)},PC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Dm([t],n.includeContainer,{filter:za.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Am(t,n.includeContainer,za.bind(null,n)),r},Qr=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Lr.call(t,Ba)===!1?!1:nu(n,t)},AC=Om.concat("iframe").join(","),lc=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Lr.call(t,AC)===!1?!1:za(n,t)};/*!
143
+ */var Pm=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ba=Pm.join(","),Am=typeof Element>"u",Lr=Am?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ha=!Am&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Wa=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},mC=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Dm=function(t,n,r){if(Wa(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ba));return n&&Lr.call(t,Ba)&&o.unshift(t),o=o.filter(r),o},Nm=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Wa(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),c=s.length?s:a.children,u=e(c,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else{var d=Lr.call(a,Ba);d&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!Wa(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&m){var h=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:a,candidates:h})}else i.unshift.apply(i,a.children)}}return o},km=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Rr=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||mC(t))&&!km(t)?0:t.tabIndex},gC=function(t,n){var r=Rr(t);return r<0&&n&&!km(t)?0:r},yC=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Mm=function(t){return t.tagName==="INPUT"},bC=function(t){return Mm(t)&&t.type==="hidden"},wC=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},EC=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},xC=function(t){if(!t.name)return!0;var n=t.form||Ha(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=EC(o,t.form);return!i||i===t},_C=function(t){return Mm(t)&&t.type==="radio"},SC=function(t){return _C(t)&&!xC(t)},CC=function(t){var n,r=t&&Ha(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,c;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var u,d,f;r=Ha(o),o=(u=r)===null||u===void 0?void 0:u.host,i=!!((d=o)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},yh=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},$C=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Lr.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Lr.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,u=Ha(t);if(c&&!c.shadowRoot&&o(c)===!0)return yh(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=s}if(CC(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return yh(t);return!1},TC=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Lr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},za=function(t,n){return!(n.disabled||Wa(n)||bC(n)||$C(n,t)||wC(n)||TC(n))},nu=function(t,n){return!(SC(n)||Rr(n)<0||!za(t,n))},IC=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},RC=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=gC(s,a),u=a?e(o.candidates):s;c===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:u})}),r.sort(yC).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},OC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Nm([t],n.includeContainer,{filter:nu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:IC}):r=Dm(t,n.includeContainer,nu.bind(null,n)),RC(r)},PC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Nm([t],n.includeContainer,{filter:za.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Dm(t,n.includeContainer,za.bind(null,n)),r},Qr=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Lr.call(t,Ba)===!1?!1:nu(n,t)},AC=Pm.concat("iframe").join(","),lc=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Lr.call(t,AC)===!1?!1:za(n,t)};/*!
144
144
  * focus-trap 7.5.2
145
145
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
146
- */function yh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function bh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yh(Object(n),!0).forEach(function(r){DC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DC(e,t,n){return t=kC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NC(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kC(e){var t=NC(e,"string");return typeof t=="symbol"?t:String(t)}var wh={activateTrap:function(t,n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var o=t.indexOf(n);o===-1||t.splice(o,1),t.push(n)},deactivateTrap:function(t,n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}},MC=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},jC=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},Jo=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},LC=function(t){return Jo(t)&&!t.shiftKey},FC=function(t){return Jo(t)&&t.shiftKey},Eh=function(t){return setTimeout(t,0)},xh=function(t,n){var r=-1;return t.every(function(o,i){return n(o)?(r=i,!1):!0}),r},Mo=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return typeof t=="function"?t.apply(void 0,r):t},oa=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},VC=[],BC=function(t,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||VC,i=bh({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:LC,isKeyBackward:FC},n),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(R,E,p){return R&&R[E]!==void 0?R[E]:i[p||E]},u=function(R,E){var p=typeof(E==null?void 0:E.composedPath)=="function"?E.composedPath():void 0;return a.containerGroups.findIndex(function($){var A=$.container,M=$.tabbableNodes;return A.contains(R)||(p==null?void 0:p.includes(A))||M.find(function(z){return z===R})})},d=function(R){var E=i[R];if(typeof E=="function"){for(var p=arguments.length,$=new Array(p>1?p-1:0),A=1;A<p;A++)$[A-1]=arguments[A];E=E.apply(void 0,$)}if(E===!0&&(E=void 0),!E){if(E===void 0||E===!1)return E;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var M=E;if(typeof E=="string"&&(M=r.querySelector(E),!M))throw new Error("`".concat(R,"` as selector refers to no known node"));return M},f=function(){var R=d("initialFocus");if(R===!1)return!1;if(R===void 0||!lc(R,i.tabbableOptions))if(u(r.activeElement)>=0)R=r.activeElement;else{var E=a.tabbableGroups[0],p=E&&E.firstTabbableNode;R=p||d("fallbackFocus")}if(!R)throw new Error("Your focus-trap needs to have at least one focusable element");return R},m=function(){if(a.containerGroups=a.containers.map(function(R){var E=OC(R,i.tabbableOptions),p=PC(R,i.tabbableOptions),$=E.length>0?E[0]:void 0,A=E.length>0?E[E.length-1]:void 0,M=p.find(function(re){return Qr(re)}),z=p.slice().reverse().find(function(re){return Qr(re)}),U=!!E.find(function(re){return Rr(re)>0});return{container:R,tabbableNodes:E,focusableNodes:p,posTabIndexesFound:U,firstTabbableNode:$,lastTabbableNode:A,firstDomTabbableNode:M,lastDomTabbableNode:z,nextTabbableNode:function(B){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,oe=E.indexOf(B);return oe<0?L?p.slice(p.indexOf(B)+1).find(function(G){return Qr(G)}):p.slice(0,p.indexOf(B)).reverse().find(function(G){return Qr(G)}):E[oe+(L?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(R){return R.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!d("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(R){return R.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function H(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){H(f());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,MC(R)&&R.select()}},b=function(R){var E=d("setReturnFocus",R);return E||(E===!1?!1:R)},y=function(R){var E=R.target,p=R.event,$=R.isBackward,A=$===void 0?!1:$;E=E||oa(p),m();var M=null;if(a.tabbableGroups.length>0){var z=u(E,p),U=z>=0?a.containerGroups[z]:void 0;if(z<0)A?M=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:M=a.tabbableGroups[0].firstTabbableNode;else if(A){var re=xh(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return E===ce});if(re<0&&(U.container===E||lc(E,i.tabbableOptions)&&!Qr(E,i.tabbableOptions)&&!U.nextTabbableNode(E,!1))&&(re=z),re>=0){var B=re===0?a.tabbableGroups.length-1:re-1,L=a.tabbableGroups[B];M=Rr(E)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(p)||(M=U.nextTabbableNode(E,!1))}else{var oe=xh(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return E===ce});if(oe<0&&(U.container===E||lc(E,i.tabbableOptions)&&!Qr(E,i.tabbableOptions)&&!U.nextTabbableNode(E))&&(oe=z),oe>=0){var G=oe===a.tabbableGroups.length-1?0:oe+1,K=a.tabbableGroups[G];M=Rr(E)>=0?K.firstTabbableNode:K.firstDomTabbableNode}else Jo(p)||(M=U.nextTabbableNode(E))}}else M=d("fallbackFocus");return M},T=function(R){var E=oa(R);if(!(u(E,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},S=function(R){var E=oa(R),p=u(E,R)>=0;if(p||E instanceof Document)p&&(a.mostRecentlyFocusedNode=E);else{R.stopImmediatePropagation();var $,A=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var M=u(a.mostRecentlyFocusedNode),z=a.containerGroups[M].tabbableNodes;if(z.length>0){var U=z.findIndex(function(re){return re===a.mostRecentlyFocusedNode});U>=0&&(i.isKeyForward(a.recentNavEvent)?U+1<z.length&&($=z[U+1],A=!1):U-1>=0&&($=z[U-1],A=!1))}}else a.containerGroups.some(function(re){return re.tabbableNodes.some(function(B){return Rr(B)>0})})||(A=!1);else A=!1;A&&($=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),h($||a.mostRecentlyFocusedNode||f())}a.recentNavEvent=void 0},v=function(R){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var p=y({event:R,isBackward:E});p&&(Jo(R)&&R.preventDefault(),h(p))},w=function(R){if(jC(R)&&Mo(i.escapeDeactivates,R)!==!1){R.preventDefault(),s.deactivate();return}(i.isKeyForward(R)||i.isKeyBackward(R))&&v(R,i.isKeyBackward(R))},C=function(R){var E=oa(R);u(E,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return wh.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?Eh(function(){h(f())}):h(f()),r.addEventListener("focusin",S,!0),r.addEventListener("mousedown",T,{capture:!0,passive:!1}),r.addEventListener("touchstart",T,{capture:!0,passive:!1}),r.addEventListener("click",C,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},D=function(){if(a.active)return r.removeEventListener("focusin",S,!0),r.removeEventListener("mousedown",T,!0),r.removeEventListener("touchstart",T,!0),r.removeEventListener("click",C,!0),r.removeEventListener("keydown",w,!0),s},P=function(R){var E=R.some(function(p){var $=Array.from(p.removedNodes);return $.some(function(A){return A===a.mostRecentlyFocusedNode})});E&&h(f())},F=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(P):void 0,k=function(){F&&(F.disconnect(),a.active&&!a.paused&&a.containers.map(function(R){F.observe(R,{subtree:!0,childList:!0})}))};return s={get active(){return a.active},get paused(){return a.paused},activate:function(R){if(a.active)return this;var E=c(R,"onActivate"),p=c(R,"onPostActivate"),$=c(R,"checkCanFocusTrap");$||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,E==null||E();var A=function(){$&&m(),I(),k(),p==null||p()};return $?($(a.containers.concat()).then(A,A),this):(A(),this)},deactivate:function(R){if(!a.active)return this;var E=bh({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},R);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,D(),a.active=!1,a.paused=!1,k(),wh.deactivateTrap(o,s);var p=c(E,"onDeactivate"),$=c(E,"onPostDeactivate"),A=c(E,"checkCanReturnFocus"),M=c(E,"returnFocus","returnFocusOnDeactivate");p==null||p();var z=function(){Eh(function(){M&&h(b(a.nodeFocusedBeforeActivation)),$==null||$()})};return M&&A?(A(b(a.nodeFocusedBeforeActivation)).then(z,z),this):(z(),this)},pause:function(R){if(a.paused||!a.active)return this;var E=c(R,"onPause"),p=c(R,"onPostPause");return a.paused=!0,E==null||E(),D(),k(),p==null||p(),this},unpause:function(R){if(!a.paused||!a.active)return this;var E=c(R,"onUnpause"),p=c(R,"onPostUnpause");return a.paused=!1,E==null||E(),m(),I(),k(),p==null||p(),this},updateContainerElements:function(R){var E=[].concat(R).filter(Boolean);return a.containers=E.map(function(p){return typeof p=="string"?r.querySelector(p):p}),a.active&&m(),k(),this}},s.updateContainerElements(t),s};function HC({targetRef:e,fallbackRef:t,initialFocusRef:n,enabled:r}){const o=l.useRef({activate:()=>{throw new TypeError("Tried to activate focus trap too early")},deactivate:()=>{}});return l.useDebugValue(r?"Enabled":"Disabled"),l.useEffect(()=>{if(!r){o.current.deactivate(),o.current={activate:()=>{},deactivate:()=>{}};return}const i=t.current,a=BC(e.current,{onActivate:process.env.NODE_ENV!=="production"?()=>{console.log("focus activate")}:void 0,initialFocus:n?()=>(n==null?void 0:n.current)||i:void 0,fallbackFocus:i,escapeDeactivates:!1,clickOutsideDeactivates:!1});let s=!1;o.current={activate:async()=>{s||(s=!0,await a.activate(),await new Promise(c=>setTimeout(()=>c(1),0)))},deactivate:()=>{s&&(s=!1,a.deactivate())}}},[r,t,n,e]),o}const wi=typeof window<"u"?l.useLayoutEffect:l.useEffect;function WC(){const[e,t]=l.useState(!1),[n,r]=l.useState({}),o=l.useCallback(i=>(console.count(`registerReady:${i}`),r(a=>({...a,[i]:!1})),()=>{console.count(`setReady:${i}`),r(a=>({...a,[i]:!0}))}),[]);return l.useEffect(()=>{const i=Object.values(n);if(i.length===0){console.log("nope nothing registered yet");return}const a=i.every(Boolean);console.log("check if we are rready",n,a),a&&(console.warn("ready!"),t(!0))},[n]),{ready:e,registerReady:o}}function zC(){const e=l.useMemo(()=>typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,[]),t=l.useRef(e==null?void 0:e.matches);return l.useDebugValue(t.current?"reduce":"no-preference"),l.useEffect(()=>{const n=r=>{t.current=r.matches};return e==null||e.addListener(n),()=>e==null?void 0:e.removeListener(n)},[e]),t}function UC(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var ol=!1;if(typeof window<"u"){var _h={get passive(){ol=!0}};window.addEventListener("testPassive",null,_h),window.removeEventListener("testPassive",null,_h)}var Mm=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),fr=[],Ua=!1,jm=-1,ei=void 0,ti=void 0,Lm=function(t){return fr.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(t))})},Ya=function(t){var n=t||window.event;return Lm(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},YC=function(t){if(ti===void 0){var n=!!t&&t.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(ti=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}ei===void 0&&(ei=document.body.style.overflow,document.body.style.overflow="hidden")},KC=function(){ti!==void 0&&(document.body.style.paddingRight=ti,ti=void 0),ei!==void 0&&(document.body.style.overflow=ei,ei=void 0)},qC=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},XC=function(t,n){var r=t.targetTouches[0].clientY-jm;return Lm(t.target)?!1:n&&n.scrollTop===0&&r>0||qC(n)&&r<0?Ya(t):(t.stopPropagation(),!0)},GC=function(t,n){if(!t){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!fr.some(function(o){return o.targetElement===t})){var r={targetElement:t,options:n||{}};fr=[].concat(UC(fr),[r]),Mm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(jm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&XC(o,t)},Ua||(document.addEventListener("touchmove",Ya,ol?{passive:!1}:void 0),Ua=!0)):YC(n)}},ZC=function(t){if(!t){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}fr=fr.filter(function(n){return n.targetElement!==t}),Mm?(t.ontouchstart=null,t.ontouchmove=null,Ua&&fr.length===0&&(document.removeEventListener("touchmove",Ya,ol?{passive:!1}:void 0),Ua=!1)):fr.length||KC()};function QC({targetRef:e,enabled:t,reserveScrollBarGap:n}){const r=l.useRef({activate:()=>{throw new TypeError("Tried to activate scroll lock too early")},deactivate:()=>{}});return l.useDebugValue(t?"Enabled":"Disabled"),l.useEffect(()=>{if(!t){r.current.deactivate(),r.current={activate:()=>{},deactivate:()=>{}};return}const o=e.current;let i=!1;r.current={activate:()=>{i||(i=!0,GC(o,{allowTouchMove:a=>a.closest("[data-body-scroll-lock-ignore]"),reserveScrollBarGap:n}))},deactivate:()=>{i&&(i=!1,ZC(o))}}},[t,e,n]),r}var Ar=[],JC=function(){return Ar.some(function(e){return e.activeTargets.length>0})},e$=function(){return Ar.some(function(e){return e.skippedTargets.length>0})},Sh="ResizeObserver loop completed with undelivered notifications.",t$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Sh}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Sh),window.dispatchEvent(e)},Ei;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ei||(Ei={}));var Dr=function(e){return Object.freeze(e)},n$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Dr(this)}return e}(),Fm=function(){function e(t,n,r,o){return this.x=t,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Dr(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,o=t.top,i=t.right,a=t.bottom,s=t.left,c=t.width,u=t.height;return{x:n,y:r,top:o,right:i,bottom:a,left:s,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),il=function(e){return e instanceof SVGElement&&"getBBox"in e},Vm=function(e){if(il(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},Ch=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},r$=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ni=typeof window<"u"?window:{},ia=new WeakMap,$h=/auto|scroll/,o$=/^tb|vertical/,i$=/msie|trident/i.test(ni.navigator&&ni.navigator.userAgent),jn=function(e){return parseFloat(e||"0")},so=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new n$((n?t:e)||0,(n?e:t)||0)},Th=Dr({devicePixelContentBoxSize:so(),borderBoxSize:so(),contentBoxSize:so(),contentRect:new Fm(0,0,0,0)}),Bm=function(e,t){if(t===void 0&&(t=!1),ia.has(e)&&!t)return ia.get(e);if(Vm(e))return ia.set(e,Th),Th;var n=getComputedStyle(e),r=il(e)&&e.ownerSVGElement&&e.getBBox(),o=!i$&&n.boxSizing==="border-box",i=o$.test(n.writingMode||""),a=!r&&$h.test(n.overflowY||""),s=!r&&$h.test(n.overflowX||""),c=r?0:jn(n.paddingTop),u=r?0:jn(n.paddingRight),d=r?0:jn(n.paddingBottom),f=r?0:jn(n.paddingLeft),m=r?0:jn(n.borderTopWidth),h=r?0:jn(n.borderRightWidth),b=r?0:jn(n.borderBottomWidth),y=r?0:jn(n.borderLeftWidth),T=f+u,S=c+d,v=y+h,w=m+b,C=s?e.offsetHeight-w-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?T+v:0,P=o?S+w:0,F=r?r.width:jn(n.width)-D-I,k=r?r.height:jn(n.height)-P-C,H=F+T+I+v,R=k+S+C+w,E=Dr({devicePixelContentBoxSize:so(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:so(H,R,i),contentBoxSize:so(F,k,i),contentRect:new Fm(f,c,F,k)});return ia.set(e,E),E},Hm=function(e,t,n){var r=Bm(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Ei.DEVICE_PIXEL_CONTENT_BOX:return a;case Ei.BORDER_BOX:return o;default:return i}},a$=function(){function e(t){var n=Bm(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Dr([n.borderBoxSize]),this.contentBoxSize=Dr([n.contentBoxSize]),this.devicePixelContentBoxSize=Dr([n.devicePixelContentBoxSize])}return e}(),Wm=function(e){if(Vm(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},s$=function(){var e=1/0,t=[];Ar.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new a$(u.target),f=Wm(u.target);s.push(d),u.lastReportedSize=Hm(u.target,u.observedBox),f<e&&(e=f)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var o=r[n];o()}return e},Ih=function(e){Ar.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(o){o.isActive()&&(Wm(o.target)>e?n.activeTargets.push(o):n.skippedTargets.push(o))})})},c$=function(){var e=0;for(Ih(e);JC();)e=s$(),Ih(e);return e$()&&t$(),e>0},dc,zm=[],u$=function(){return zm.splice(0).forEach(function(e){return e()})},l$=function(e){if(!dc){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return u$()}).observe(n,r),dc=function(){n.textContent="".concat(t?t--:t++)}}zm.push(e),dc()},d$=function(e){l$(function(){requestAnimationFrame(e)})},xa=0,f$=function(){return!!xa},h$=250,p$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Rh=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Oh=function(e){return e===void 0&&(e=0),Date.now()+e},fc=!1,v$=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=h$),!fc){fc=!0;var r=Oh(t);d$(function(){var o=!1;try{o=c$()}finally{if(fc=!1,t=r-Oh(),!f$())return;o?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,p$)};document.body?n():ni.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Rh.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Rh.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ru=new v$,Ph=function(e){!xa&&e>0&&ru.start(),xa+=e,!xa&&ru.stop()},m$=function(e){return!il(e)&&!r$(e)&&getComputedStyle(e).display==="inline"},g$=function(){function e(t,n){this.target=t,this.observedBox=n||Ei.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Hm(this.target,this.observedBox,!0);return m$(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),y$=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),aa=new WeakMap,Ah=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},sa=function(){function e(){}return e.connect=function(t,n){var r=new y$(t,n);aa.set(t,r)},e.observe=function(t,n,r){var o=aa.get(t),i=o.observationTargets.length===0;Ah(o.observationTargets,n)<0&&(i&&Ar.push(o),o.observationTargets.push(new g$(n,r&&r.box)),Ph(1),ru.schedule())},e.unobserve=function(t,n){var r=aa.get(t),o=Ah(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Ar.splice(Ar.indexOf(r),1),r.observationTargets.splice(o,1),Ph(-1))},e.disconnect=function(t){var n=this,r=aa.get(t);r.observationTargets.slice().forEach(function(o){return n.unobserve(t,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),b$=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");sa.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ch(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ch(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.unobserve(this,t)},e.prototype.disconnect=function(){sa.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Wo(e,t,n){return e=+e,t=+t,n=+n,t=t===t?t:0,n=n===n?n:0,e===e&&(e=e<=n?e:n,e=e>=t?e:t),e}function Ka(e){const t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}function w$(e,t){const r=[].concat(e).map(Ka).reduce((s,c)=>(s.add(Wo(c,0,t)),s),new Set),o=Array.from(r),i=Math.min(...o);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");const a=Math.max(...o);if(Number.isNaN(a))throw new TypeError("maxSnap is NaN");return{snapPoints:o,minSnap:i,maxSnap:a}}const E$=process.env.NODE_ENV==="development"&&typeof window<"u"?window.location.search==="?debug":!1,x$={box:"border-box"};function hc(e,{label:t,enabled:n,resizeSourceRef:r}){const[o,i]=l.useState(0);l.useDebugValue(`${t}: ${o}`);const a=l.useCallback(s=>{i(s[0].borderBoxSize[0].blockSize),r.current="element"},[r]);return wi(()=>{if(!e.current||!n)return;const s=new b$(a);return s.observe(e.current,x$),()=>s.disconnect()},[e,a,n]),n?o:0}function _$(e,t,n){const r=l.useMemo(()=>t("maxHeight"),[t]),o=window.innerHeight*.85,[i,a]=l.useState(()=>Ka(e)||typeof window<"u"?o:0),s=i>0,c=l.useRef(0);return l.useDebugValue(e?"controlled":"auto"),l.useEffect(()=>{s&&r()},[s,r]),wi(()=>{if(e){a(Ka(e)),n.current="maxheightprop";return}const u=()=>{c.current||(c.current=requestAnimationFrame(()=>{a(o),n.current="window",c.current=0}))};return window.addEventListener("resize",u),a(o),n.current="window",r(),()=>{window.removeEventListener("resize",u),cancelAnimationFrame(c.current)}},[e,r,n,o]),i}function S$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:o,headerRef:i,registerReady:a,resizeSourceRef:s,conditions:c}){const u=l.useMemo(()=>a("contentHeight"),[a]),d=_$(t,a,s),f=hc(i,{label:"headerHeight",enabled:o,resizeSourceRef:s}),m=hc(e,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),h=hc(r,{label:"footerHeight",enabled:n,resizeSourceRef:s}),b=c!=null&&c.hasPaddingY?16:0,y=c!=null&&c.hasHeader?0:20,T=c!=null&&c.hasCustomHeader?16:0,S=Math.min(d-f-h,m+b)+(f+y+T)+h;l.useDebugValue(`minHeight: ${S}`);const v=m>0;return l.useEffect(()=>{v&&u()},[v,u]),{maxHeight:d,minHeight:S,headerHeight:f,footerHeight:h}}function C$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,getSnapPoints:o,headerEnabled:i,headerRef:a,heightRef:s,lastSnapRef:c,ready:u,registerReady:d,resizeSourceRef:f,conditions:m}){const{maxHeight:h,minHeight:b,headerHeight:y,footerHeight:T}=S$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:d,resizeSourceRef:f,conditions:m}),{snapPoints:S,minSnap:v,maxSnap:w}=w$(u?o({height:s.current,footerHeight:T,headerHeight:y,minHeight:b,maxHeight:h}):[0],h);function C(I){let D;typeof I=="function"?D=I({footerHeight:T,headerHeight:y,height:s.current,minHeight:b,maxHeight:h,snapPoints:S,lastSnap:c.current}):D=I;const P=Ka(D);return S.reduce((F,k)=>Math.abs(k-P)<Math.abs(F-P)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${w}`),{minSnap:v,maxSnap:w,findSnap:C,maxHeight:h}}function $$(){return hS(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function T$({spring:e}){const t=Zr([e.y,e.maxHeight],(s,c)=>`${Math.round(Wo(c-s,0,16))}px`),n=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>`${Wo(s,c,u)}px`),r=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>s<c?`${c-s}px`:s>u?`${u-s}px`:"0px"),o=Zr([e.y,e.maxSnap],(s,c)=>s>=c?Math.ceil(s-c):0),i=Zr([e.y,e.minSnap],(s,c)=>{if(!c)return 0;const u=Math.max(c/2-45,0),d=Math.min(c/2+45,c),f=0,h=(1-f)/(d-u),b=(s-u)*(h+f);return Wo(b,0,1)}),a=Zr([e.y,e.minSnap],(s,c)=>c?Wo(s/c,0,1):0);return{"--rsbs-content-opacity":i,"--rsbs-backdrop-opacity":a,"--rsbs-antigap-scale-y":o,"--rsbs-overlay-translate-y":r,"--rsbs-overlay-rounded":t,"--rsbs-overlay-h":n}}function Xt(e=1e3){return new Promise(t=>setTimeout(t,e))}const I$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},Dh={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Nh={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},R$=({initialState:e})=>e==="OPEN",O$=({initialState:e})=>e==="CLOSED",P$=Kx({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:{...Dh,...Nh}}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:{...Dh,...Nh}}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{...I$},onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[qx({y:(e,{payload:{y:t}})=>t,velocity:(e,{payload:{velocity:t}})=>t,snapSource:(e,{payload:{source:t="custom"}})=>t})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapCancel:(e,t)=>{console.log("onSnapCancel",{context:e,event:t})},onResizeCancel:(e,t)=>{console.log("onResizeCancel",{context:e,event:t})},onCloseCancel:(e,t)=>{console.log("onCloseCancel",{context:e,event:t})},onOpenEnd:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapEnd:(e,t)=>{console.log("onSnapEnd",{context:e,event:t})},onRezizeEnd:(e,t)=>{console.log("onRezizeEnd",{context:e,event:t})}},services:{onSnapStart:async()=>{await Xt()},onOpenStart:async()=>{await Xt()},onCloseStart:async()=>{await Xt()},onResizeStart:async()=>{await Xt()},onSnapEnd:async()=>{await Xt()},onOpenEnd:async()=>{await Xt()},onCloseEnd:async()=>{await Xt()},onResizeEnd:async()=>{await Xt()},renderVisuallyHidden:async(e,t)=>{console.group("renderVisuallyHidden"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},activate:async(e,t)=>{console.group("activate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},deactivate:async(e,t)=>{console.group("deactivate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openSmoothly:async(e,t)=>{console.group("openSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openImmediately:async(e,t)=>{console.group("openImmediately"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},snapSmoothly:async(e,t)=>{console.group("snapSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},resizeSmoothly:async(e,t)=>{console.group("resizeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},closeSmoothly:async(e,t)=>{console.group("closeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()}},guards:{initiallyClosed:O$,initiallyOpen:R$}}),{tension:A$,friction:ca}=im.default,D$=["closed","opening","open","closing","dragging","snapping","resizing"];function N$({snapPoints:e,lastSnap:t}){return t??Math.min(...e)}function k$({minHeight:e}){return e}const M$=l.forwardRef(function({children:t,sibling:n,className:r,footer:o,header:i,isOpen:a,initialState:s,lastSnapRef:c,initialFocusRef:u,onClose:d,maxHeight:f,defaultSnap:m=N$,snapPoints:h=k$,blocking:b=!0,scrollLocking:y=!0,style:T,onSpringStart:S,onSpringCancel:v,onSpringEnd:w,reserveScrollBarGap:C=b,expandOnContentDrag:I=!1,title:D,showClose:P,showBack:F,onBack:k,onCloseWhenClickOutside:H=!0,hasHandleBar:R=!0,"data-test-id":E,padding:p,...$},A){const{ready:M,registerReady:z}=WC(),U=l.useRef(!1),re=l.useRef(S),B=l.useRef(v),L=l.useRef(w);l.useEffect(()=>{re.current=S,B.current=v,L.current=w},[v,S,w]);const[oe,G]=$$(),K=l.useRef(null),Z=l.useRef(null),ce=l.useRef(null),W=l.useRef(null),Y=l.useRef(null),te=l.useRef(null),J=l.useRef(0),ie=l.useRef(),ee=l.useRef(!1),we=zC(),{x:Te="default",y:Oe="default"}=p??{},Ne=Te==="default",Re=Oe==="default",We=QC({targetRef:Z,enabled:M&&y,reserveScrollBarGap:C}),De=vC({targetRef:K,enabled:M&&b}),ot=HC({targetRef:K,fallbackRef:te,initialFocusRef:u||void 0,enabled:M&&b&&u!==!1}),{minSnap:ze,maxSnap:xt,maxHeight:Xe,findSnap:Pt}=C$({contentRef:ce,controlledMaxHeight:f,footerEnabled:!!o,footerRef:Y,getSnapPoints:h,headerEnabled:i!==!1,headerRef:W,heightRef:J,lastSnapRef:c,ready:M,registerReady:z,resizeSourceRef:ie,conditions:{hasPaddingY:Re,hasHeader:i!==!1,hasCustomHeader:!!i}}),xe=l.useRef(Xe),ct=l.useRef(ze),je=l.useRef(xt),Zt=l.useRef(Pt),Ct=l.useRef(0);wi(()=>{xe.current=Xe,je.current=xt,ct.current=ze,Zt.current=Pt,Ct.current=Pt(m)},[Pt,m,Xe,xt,ze]);const tt=l.useCallback(({onRest:he,config:{velocity:Ue=1,...kt}={},...At})=>new Promise(Jt=>G({...At,config:{velocity:Ue,...kt,mass:1,tension:A$,friction:Math.max(ca,ca+(ca-ca*Ue))},onRest:(...Ot)=>{Jt(...Ot),he==null||he(...Ot)}})),[G]),[Fe,mt]=o_(P$,{devTools:E$,actions:{onOpenCancel:l.useCallback(()=>{var he;return(he=B.current)==null?void 0:he.call(B,{type:"OPEN"})},[]),onSnapCancel:l.useCallback(he=>{var Ue;return(Ue=B.current)==null?void 0:Ue.call(B,{type:"SNAP",source:he.snapSource})},[]),onCloseCancel:l.useCallback(()=>{var he;return(he=B.current)==null?void 0:he.call(B,{type:"CLOSE"})},[]),onResizeCancel:l.useCallback(()=>{var he;return(he=B.current)==null?void 0:he.call(B,{type:"RESIZE",source:ie.current})},[]),onOpenEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onSnapEnd:l.useCallback(he=>{var Ue;return(Ue=L.current)==null?void 0:Ue.call(L,{type:"SNAP",source:he.snapSource})},[]),onResizeEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:ie.current})},[])},context:{initialState:s},services:{onSnapStart:l.useCallback(async(he,Ue)=>{var kt;return(kt=re.current)==null?void 0:kt.call(re,{type:"SNAP",source:Ue.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var he;return(he=re.current)==null?void 0:he.call(re,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var he;return(he=re.current)==null?void 0:he.call(re,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var he;return(he=re.current)==null?void 0:he.call(re,{type:"RESIZE",source:ie.current})},[]),onSnapEnd:l.useCallback(async he=>{var Ue;return(Ue=L.current)==null?void 0:Ue.call(L,{type:"SNAP",source:he.snapSource})},[]),onOpenEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onCloseEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"CLOSE"})},[]),onResizeEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:ie.current})},[]),renderVisuallyHidden:l.useCallback(async()=>{await tt({y:Ct.current,ready:0,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[tt]),activate:l.useCallback(async()=>{U.current=!0,await Promise.all([We.current.activate(),ot.current.activate(),De.current.activate()])},[De,ot,We]),deactivate:l.useCallback(async()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate(),U.current=!1},[De,ot,We]),openImmediately:l.useCallback(async()=>{J.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[tt]),openSmoothly:l.useCallback(async()=>{await tt({y:0,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0}),J.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:we.current})},[tt,we]),snapSmoothly:l.useCallback(async he=>{const Ue=Zt.current(he.y);J.current=Ue,c.current=Ue,await tt({y:Ue,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:we.current,config:{velocity:he.velocity}})},[tt,c,we]),resizeSmoothly:l.useCallback(async()=>{const he=Zt.current(J.current);J.current=he,c.current=he,await tt({y:he,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:ie.current==="element"?we.current:!0})},[tt,c,we]),closeSmoothly:l.useCallback(async()=>{tt({minSnap:J.current,immediate:!0}),J.current=0,await tt({y:0,maxHeight:xe.current,maxSnap:je.current,immediate:we.current}),await tt({ready:0,immediate:!0})},[tt,we])}});l.useEffect(()=>{M&&mt(a?"OPEN":"CLOSE")},[a,mt,M]),wi(()=>{(Xe||xt||ze)&&mt("RESIZE")},[Xe,xt,ze,mt]),l.useEffect(()=>()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate()},[De,ot,We]),l.useImperativeHandle(A,()=>({snapTo:(he,{velocity:Ue=1,source:kt="custom"}={})=>{mt("SNAP",{payload:{y:Zt.current(he),velocity:Ue,source:kt}})},get height(){return J.current}}),[mt]),l.useEffect(()=>{const he=Z.current,Ue=At=>{ee.current&&At.preventDefault()},kt=At=>{he&&he.scrollTop<0&&(requestAnimationFrame(()=>{he.style.overflow="hidden",he.scrollTop=0,he.style.removeProperty("overflow")}),At.preventDefault())};return I&&(he==null||he.addEventListener("scroll",Ue),he==null||he.addEventListener("touchmove",Ue),he==null||he.addEventListener("touchstart",kt)),()=>{he==null||he.removeEventListener("scroll",Ue),he==null||he.removeEventListener("touchmove",Ue),he==null||he.removeEventListener("touchstart",kt)}},[I,Z]);const rn=hC(({args:[{closeOnTap:he=!1,isContentDragging:Ue=!1}={}]=[],cancel:kt,direction:[,At],down:Jt,first:Ot,last:yn,memo:Lt=oe.y.get(),movement:[,Dn],tap:tr,velocity:un})=>{const $n=Dn*-1;if(!U.current)return console.log("handleDrag cancelled dragging because canDragRef is false"),kt(),Lt;if(d&&he&&tr)return kt(),setTimeout(()=>d(),0),Lt;if(tr)return Lt;const Ht=Lt+$n,en=$n*un,Nn=Math.max(ct.current,Math.min(je.current,Ht+en*2));if(!Jt&&d&&At>0&&Ht+en<ct.current/2)return kt(),d(),Lt;let Kt=Jt?!d&&ct.current===je.current?Ht<ct.current?Qo(Ht,ct.current,je.current*2,.55):Qo(Ht,ct.current/2,je.current,.55):Qo(Ht,d?0:ct.current,je.current,.55):Nn;return I&&Ue?(Kt>=je.current&&(Kt=je.current),Lt===je.current&&Z.current&&Z.current.scrollTop>0&&(Kt=je.current),ee.current=Kt<je.current):ee.current=!1,Ot&&mt("DRAG"),yn?(mt("SNAP",{payload:{y:Kt,velocity:un>.05?un:1,source:"dragging"}}),Lt):(G({y:Kt,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:!0,config:{velocity:un}}),Lt)},{filterTaps:!0});if(Number.isNaN(je.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(ct.current))throw new TypeError("minSnapRef is NaN!!");const Qt=T$({spring:oe});return j.jsxs($S.div,{...$,"data-rsbs-root":!0,"data-rsbs-state":D$.find(Fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!i,"data-rsbs-has-footer":!!o,className:r,ref:K,style:{...Qt,...T,opacity:oe.ready},"data-test-id":E,children:[n,b&&j.jsx(et,{"data-rsbs-backdrop":!0,...rn({closeOnTap:H})},"backdrop"),j.jsxs(et,{"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Ne,"data-rsbs-overlay-has-padding-y":Re,"data-test-id":"CT-BottomSheet-Overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:te,onKeyDown:he=>{he.key==="Escape"&&(he.stopPropagation(),d&&d())},children:[j.jsx(Rm,{ref:W,title:D,header:i,showBack:F,showClose:P,bind:rn,hasHandleBar:R,onBack:k,onClose:d}),j.jsx(et,{"data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Ne,"data-rsbs-scroll-has-padding-y":Re,ref:Z,...I?rn({isContentDragging:!0}):{},children:j.jsx(et,{"data-rsbs-content":!0,ref:ce,children:t})},"scroll"),o&&j.jsx(et,{ref:Y,"data-rsbs-footer":!0,...rn(),children:o},"footer")]},"overlay")]})}),j$=l.forwardRef(function({onSpringStart:t,onSpringEnd:n,skipInitialTransition:r,...o},i){const[a,s]=l.useState(!1),c=l.useRef(),u=l.useRef(null),d=l.useRef(r&&o.isOpen?"OPEN":"CLOSED");wi(()=>o.isOpen?(cancelAnimationFrame(c.current),s(!0),()=>{d.current="CLOSED"}):()=>{d.current="CLOSED"},[o.isOpen]);const f=l.useCallback(async function(b){await(t==null?void 0:t(b)),b.type==="OPEN"&&cancelAnimationFrame(c.current)},[t]),m=l.useCallback(async function(b){await(n==null?void 0:n(b)),b.type==="CLOSE"&&(c.current=requestAnimationFrame(()=>s(!1)))},[n]);return a?j.jsx(wv,{"data-rsbs-portal":!0,children:j.jsx(M$,{...o,lastSnapRef:u,ref:i,initialState:d.current,onSpringStart:f,onSpringEnd:m})}):null}),_o=({size:e,color:t="inherit",thickness:n=3,...r})=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",xmlSpace:"preserve",width:e,height:e,...r,children:j.jsx("path",{fill:t,stroke:t,strokeWidth:n,d:"M73 50c0-12.7-10.3-23-23-23S27 37.3 27 50m3.9 0c0-10.5 8.5-19.1 19.1-19.1S69.1 39.5 69.1 50",children:j.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})})});_o.displayName="Spinner";_o.defaultProps={size:24,thickness:3};const L$=({value:e,delay:t=500})=>{const[n,r]=l.useState(e);return l.useEffect(()=>{const o=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(o)}},[e,t]),n},F$=L$;process.env.NODE_ENV;var V$=wt({defaultClassName:"_920fuu5",variantClassNames:{colorScheme:{primary:"_920fuu6",neutral:"_920fuu7",danger:"_920fuu8",warning:"_920fuu9",info:"_920fuua"},variant:{solid:"_920fuub",outline:"_920fuuc",ghost:"_920fuud"},size:{small:"_920fuue",medium:"_920fuuf",large:"_920fuug"},unstyled:{true:"_920fuuh"},isFluid:{true:"_920fuui"}},defaultVariants:{size:"medium",variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_920fuuj"],[{colorScheme:"neutral",variant:"outline"},"_920fuuk"],[{colorScheme:"danger",variant:"outline"},"_920fuul"],[{colorScheme:"warning",variant:"outline"},"_920fuum"],[{colorScheme:"info",variant:"outline"},"_920fuun"],[{size:"small",variant:"outline"},"_920fuuo"],[{size:"large",variant:"outline"},"_920fuup"]]}),B$={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},H$={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},kh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var W$="p9dczu0";const al=({ref:e,colorScheme:t="primary"})=>{const[n,r]=l.useState([]),o=F$({value:n,delay:1e3});return l.useEffect(()=>{if(e.current){const i=e.current,a=s=>{const c=i.getBoundingClientRect(),u=s.clientX-c.left,d=s.clientY-c.top,f=i.clientHeight,m=i.clientWidth,h=Math.max(m,f);r([...n,{top:d-h/2,left:u-h/2,height:Math.max(m,f),width:Math.max(m,f),backgroundColor:t==="primary"?Rt.theme.colors.primary:B$[t]}])};return i.addEventListener("click",a),()=>{i.removeEventListener("click",a)}}return()=>!1},[e,n]),l.useEffect(()=>{o.length&&r([])},[o.length]),n==null?void 0:n.map((i,a)=>j.jsx("span",{className:W$,style:{...i}},a))},vo=l.forwardRef(({as:e,children:t,className:n,colorScheme:r,size:o,isLoading:i,variant:a,style:s,isDisabled:c,isFluid:u,unstyled:d,noRipple:f,...m},h)=>{const b=l.useRef(null),y=al({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(h,()=>b.current);const T=e||"button";return j.jsx(T,{ref:b,as:e,"data-test-id":m["data-test-id"],className:Pe(V$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:d}),a==="ghost"?H$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?j.jsx(_o,{color:a==="outline"||a==="ghost"?kh[r||"primary"]:kh.white}):j.jsxs(j.Fragment,{children:[!f&&y,t]})})});vo.displayName="Button";vo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const Um="Checkbox",[z$,_P]=mn(Um),[U$,Y$]=z$(Um),K$=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...d}=e,[f,m]=l.useState(null),h=st(t,w=>m(w)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=Sn({prop:o,defaultProp:i,onChange:u}),v=l.useRef(T);return l.useEffect(()=>{const w=f==null?void 0:f.form;if(w){const C=()=>S(v.current);return w.addEventListener("reset",C),()=>w.removeEventListener("reset",C)}},[f,S]),l.createElement(U$,{scope:n,state:T,disabled:s},l.createElement(Ke.button,ae({type:"button",role:"checkbox","aria-checked":Nr(T)?"mixed":T,"aria-required":a,"data-state":Ym(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:h,onKeyDown:Ae(e.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ae(e.onClick,w=>{S(C=>Nr(C)?!0:!C),y&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})})),y&&l.createElement(G$,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),q$="CheckboxIndicator",X$=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Y$(q$,n);return l.createElement(yr,{present:r||Nr(i.state)||i.state===!0},l.createElement(Ke.span,ae({"data-state":Ym(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),G$=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});c.indeterminate=Nr(n),f.call(c,Nr(n)?!1:n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:Nr(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Nr(e){return e==="indeterminate"}function Ym(e){return Nr(e)?"indeterminate":e?"checked":"unchecked"}const Z$=K$,Q$=X$;var J$="glci2q0",Mh="glci2q3",eT="glci2q4",jh={disabled:"glci2q1",enabled:"glci2q2"},tT=wt({defaultClassName:"glci2q5",variantClassNames:{checked:{true:"glci2q6",false:"glci2q7",indeterminate:"glci2q8"},disabled:{true:"glci2q9"}},defaultVariants:{checked:!1,disabled:!1},compoundVariants:[[{checked:!1,disabled:!0},"glci2qa"]]});const Km=l.forwardRef(({children:e,"data-test-id":t,checked:n=!1,onCheckedChange:r,disabled:o,value:i,...a},s)=>{const c=`vds-checkbox-${l.useId()}`,[u,d]=l.useState(n);return l.useEffect(()=>{d(n)},[n]),j.jsxs("div",{className:J$,children:[j.jsx(Z$,{id:c,disabled:o,"data-test-id":t,ref:s,value:u?"on":"off",checked:u,className:tT({checked:u,disabled:o}),onCheckedChange:f=>{typeof f=="boolean"&&(r?r(f):d(f))},...a,children:j.jsxs(Q$,{className:eT,children:[u==="indeterminate"&&j.jsx(x0,{color:"white",className:Mh}),u===!0&&j.jsx(wu,{color:"white",className:Mh})]})}),e&&j.jsx("label",{htmlFor:c,className:o?jh.disabled:jh.enabled,children:e})]})});Km.defaultProps={"data-test-id":"base"};const nT=e=>l.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var rT=wt({defaultClassName:"_5046e70",variantClassNames:{variant:{filled:"_5046e71",outline:"_5046e72"},isActive:{true:"_5046e73"},isFluid:{true:"_5046e74"}},defaultVariants:{variant:"filled",isActive:!1},compoundVariants:[[{isActive:!0,variant:"outline"},"_5046e75"]]}),oT="_5046e76";const sl=l.forwardRef(({as:e,children:t,variant:n,isActive:r,isFilter:o,prefixIcon:i,withCloseButton:a,className:s,disabled:c,style:u,...d},f)=>{const m=e||"button";return j.jsxs(m,{ref:f,as:e,"data-test-id":d["data-test-id"],className:Pe(rT({variant:n,isActive:r}),s),disabled:c,style:u,...d,children:[i&&i,o&&!i&&j.jsx(w0,{style:{marginRight:8},size:16,color:"inherit"}),t,a&&j.jsx(xo,{"data-test-id":"chips-close-button",className:oT,isDisabled:c})]})});sl.defaultProps={as:"button",children:void 0,isActive:!1,isFilter:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0};sl.displayName="Chips";const qm="Dialog",[Xm,SP]=mn(qm),[iT,wr]=Xm(qm),aT=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=l.useRef(null),c=l.useRef(null),[u=!1,d]=Sn({prop:r,defaultProp:o,onChange:i});return l.createElement(iT,{scope:t,triggerRef:s,contentRef:c,contentId:Xn(),titleId:Xn(),descriptionId:Xn(),open:u,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(f=>!f),[d]),modal:a},n)},sT="DialogTrigger",cT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(sT,n),i=st(t,o.triggerRef);return l.createElement(Ke.button,ae({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":cl(o.open)},r,{ref:i,onClick:Ae(e.onClick,o.onOpenToggle)}))}),uT="DialogPortal",[CP,Gm]=Xm(uT,{forceMount:void 0}),ou="DialogOverlay",lT=l.forwardRef((e,t)=>{const n=Gm(ou,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(ou,e.__scopeDialog);return i.modal?l.createElement(yr,{present:r||i.open},l.createElement(dT,ae({},o,{ref:t}))):null}),dT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(ou,n);return l.createElement(cv,{as:uo,allowPinchZoom:!0,shards:[o.contentRef]},l.createElement(Ke.div,ae({"data-state":cl(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),xi="DialogContent",fT=l.forwardRef((e,t)=>{const n=Gm(xi,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(xi,e.__scopeDialog);return l.createElement(yr,{present:r||i.open},i.modal?l.createElement(hT,ae({},o,{ref:t})):l.createElement(pT,ae({},o,{ref:t})))}),hT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(null),o=st(t,n.contentRef,r);return l.useEffect(()=>{const i=r.current;if(i)return Jp(i)},[]),l.createElement(Zm,ae({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ae(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ae(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ae(e.onFocusOutside,i=>i.preventDefault())}))}),pT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return l.createElement(Zm,ae({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),Zm=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=wr(xi,n),c=l.useRef(null),u=st(t,c);return Pp(),l.createElement(l.Fragment,null,l.createElement(Ap,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},l.createElement(is,ae({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":cl(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),vT="DialogClose",mT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(vT,n);return l.createElement(Ke.button,ae({type:"button"},r,{ref:t,onClick:Ae(e.onClick,()=>o.onOpenChange(!1))}))});function cl(e){return e?"open":"closed"}const gT=aT,yT=cT,bT=lT,wT=fT,ET=mT;var xT="_1jc0z8o4",_T="_1jc0z8o0",ST=wt({defaultClassName:"_1jc0z8o7",variantClassNames:{size:{full:"_1jc0z8o8",small:"_1jc0z8o9",medium:"_1jc0z8oa",large:"_1jc0z8ob"},noPadding:{true:"_1jc0z8oc"},colorScheme:{primary:"_1jc0z8od",neutral:"_1jc0z8oe",danger:"_1jc0z8of",warning:"_1jc0z8og",info:"_1jc0z8oh",white:"_1jc0z8oi"}},defaultVariants:{size:"medium",noPadding:!1,colorScheme:"white"},compoundVariants:[]}),CT="_1jc0z8o1",$T=wt({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),TT=wt({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const IT=l.forwardRef(({children:e,className:t,...n},r)=>j.jsx(wT,{className:t,ref:r,...n,children:e})),RT=l.forwardRef(({children:e,className:t,...n},r)=>j.jsx(bT,{className:t,ref:r,...n,children:e})),OT=({children:e,className:t,...n})=>j.jsx(ms,{className:t,...n,children:e}),PT=({children:e,...t})=>j.jsx(gT,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>j.jsx(yT,{className:t,...n,ref:r,children:e}));const Ai=l.forwardRef(({children:e,"data-test-id":t,isOpen:n,onClose:r,size:o,destroyOnClose:i,noPadding:a,colorScheme:s,closeOnOverlayClick:c,closeIcon:u,classNameBody:d,isCloseWhenEscape:f,...m},h)=>!n&&i?null:j.jsx(PT,{open:n,onOpenChange:r,children:j.jsxs(OT,{children:[j.jsx(RT,{className:Pe(TT())}),j.jsxs(IT,{onInteractOutside:b=>!c&&b.preventDefault(),className:Pe(ST({colorScheme:s,size:o,noPadding:a}),d),...m,onEscapeKeyDown:b=>f?r==null?void 0:r():b.preventDefault(),ref:h,children:[r&&!u&&j.jsx(ET,{asChild:!0,"aria-label":"Close",children:j.jsx(xo,{className:xT,"data-test-id":"close-modal"})}),r&&u&&u,e]})]})}));Ai.displayName="Modal";Ai.defaultProps={children:void 0,"data-test-id":void 0,size:"medium",onClose:void 0,destroyOnClose:!1,noPadding:!1,colorScheme:"white",closeOnOverlayClick:!0,closeIcon:void 0,classNameBody:void 0,isCloseWhenEscape:!0};const Is=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return j.jsx(i,{"data-test-id":n,as:e,ref:o,className:_T,...r,children:t})});Is.displayName="modalBody";Is.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Rs=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return j.jsx(i,{"data-test-id":n,as:e,className:CT,ref:o,...r,children:t})});Rs.displayName="modalFooter";Rs.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Di=l.forwardRef(({as:e,bold:t,children:n,"data-test-id":r,...o},i)=>{const a=e||"div";return j.jsx(a,{"data-test-id":r,as:e,ref:i,className:$T({bold:t}),...o,children:j.jsx(sn,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Di.displayName="modalHeader";Di.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};const ul=({isOpen:e,onConfirm:t,onCancel:n,message:r,title:o,confirmTestId:i,isLoading:a,confirmText:s="Confirm",cancelText:c="Cancel",closeOnOverlayClick:u,size:d,classNameBody:f})=>j.jsxs(Ai,{classNameBody:f,size:d,isOpen:e,closeOnOverlayClick:u,onClose:n,closeIcon:j.jsx(et,{display:"none"}),children:[j.jsx(Di,{children:o}),j.jsx(Is,{children:j.jsx(sn,{mt:"$8",mb:"$24",textStyle:"body2",children:r})}),j.jsx(Rs,{children:j.jsxs(Yt,{gap:"$16",justifyContent:"space-between",children:[j.jsx(vo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),j.jsx(vo,{"data-test-id":i,onClick:t,isLoading:a,isFluid:!0,children:s})]})})]});ul.defaultProps={message:void 0,cancelText:void 0,confirmText:void 0,confirmTestId:void 0,isLoading:void 0,closeOnOverlayClick:!0,size:"small",classNameBody:void 0};const ll=l.createContext({}),AT=({children:e})=>{const[t,n]=l.useState(!1),[r,o]=l.useState(void 0),i=()=>{n(!1),o(void 0)},a=()=>{i(),r!=null&&r.actionCallback(!0)},s=()=>{i(),r!=null&&r.actionCallback(!1)},c=l.useMemo(()=>({openDialog:({title:d,message:f,confirmText:m,cancelText:h,actionCallback:b,confirmTestId:y,size:T,isLoading:S,closeOnOverlayClick:v,classNameBody:w})=>{n(!0),o({title:d,message:f,confirmText:m,cancelText:h,confirmTestId:y,size:T,isLoading:S,actionCallback:b,closeOnOverlayClick:v,classNameBody:w})}}),[n,o]);return j.jsxs(ll.Provider,{value:c,children:[j.jsx(ul,{title:(r==null?void 0:r.title)??"",message:(r==null?void 0:r.message)??"",confirmText:r==null?void 0:r.confirmText,cancelText:r==null?void 0:r.cancelText,isOpen:t,confirmTestId:r==null?void 0:r.confirmTestId,isLoading:r==null?void 0:r.isLoading,onConfirm:a,onCancel:s,size:r==null?void 0:r.size,closeOnOverlayClick:r==null?void 0:r.closeOnOverlayClick}),e]})},DT=()=>{const{openDialog:e}=l.useContext(ll);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}},dl=({children:e,isDisabled:t,className:n})=>j.jsx("div",{className:Pe(yE({isDisabled:t}),n),children:e});dl.displayName="ActionIcon";dl.defaultProps={isDisabled:!1,className:void 0};const Ni=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o},i)=>j.jsxs("label",{ref:i,className:$E({state:Pu({isError:e,isDisabled:t}),isTextarea:r}),children:[o,n&&"*"]}));Ni.displayName="Label";Ni.defaultProps={isTextarea:!1};const fl=l.forwardRef(({value:e,type:t,label:n,onClear:r,onBlur:o,isLoading:i,icon:a,isClearable:s=!0,required:c,containerStyles:u,...d},f)=>{const{addonLeft:m,addonRight:h,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:w,elementLeft:C,elementRight:I,className:D,...P}=d,F=!!a,k=l.useRef(null);l.useImperativeHandle(f,()=>k.current);const[H,R]=l.useState(!1),[E,p]=l.useState(!1),$=M=>{if(H){const z=k.current;z&&z.focus(),E&&(R(!1),p(!1))}else o==null||o(M)},A=()=>{const M=k.current;M&&M.focus(),E&&(R(!1),p(!1))};return l.useEffect(()=>{E&&R(!0)},[E]),j.jsxs(bo,{addonLeft:m,addonRight:h,elementLeft:C,elementRight:I,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:w,className:u,inputAreaClassName:_E,children:[j.jsx("input",{ref:k,type:t,className:Pe(xE,D),value:e,disabled:v,"data-test-id":d["data-test-id"],required:c,onBlur:$,...P}),j.jsx(Ni,{isError:T,isDisabled:v,required:c,children:n}),j.jsx("div",{className:Pe(SE),"data-test-id":"icon-input-area",onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onTouchStart:()=>p(!0),onClick:A,"aria-hidden":"true",children:j.jsxs(dl,{isDisabled:v,className:Pe(s&&!i&&!F&&EE),children:[F&&!i&&a,s&&!i&&!F&&j.jsx(os,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),i&&j.jsx(_o,{color:Rt.theme.colors.green1})]})})]})});fl.displayName="Input";fl.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0};const hl=l.forwardRef(({value:e,label:t,rows:n=4,required:r,containerStyles:o,...i},a)=>{const{helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,...h}=i,b=l.useRef(null);l.useImperativeHandle(a,()=>b.current);const y=()=>{var T;(T=b.current)==null||T.focus()};return j.jsxs(bo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,className:o,onClick:y,children:[j.jsx("textarea",{ref:b,className:Pe(TE),value:e,rows:n,disabled:f,"data-test-id":i["data-test-id"],required:r,...h}),j.jsx(Ni,{isTextarea:!0,isError:u,isDisabled:f,required:r,children:t})]})});hl.displayName="Textarea";hl.defaultProps={containerStyles:void 0,"data-test-id":void 0};var NT=wt({defaultClassName:"_1n7m27n0",variantClassNames:{colorScheme:{primary:"_1n7m27n1",neutral:"_1n7m27n2",danger:"_1n7m27n3",warning:"_1n7m27n4",info:"_1n7m27n5"},variant:{solid:"_1n7m27n6",outline:"_1n7m27n7"},unstyled:{true:"_1n7m27n8"}},defaultVariants:{variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_1n7m27n9"],[{colorScheme:"neutral",variant:"outline"},"_1n7m27na"],[{colorScheme:"danger",variant:"outline"},"_1n7m27nb"],[{colorScheme:"warning",variant:"outline"},"_1n7m27nc"],[{colorScheme:"info",variant:"outline"},"_1n7m27nd"]]}),Lh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const pl=l.forwardRef(({as:e,className:t,style:n,colorScheme:r,icon:o,unstyled:i,variant:a,isDisabled:s,isLoading:c,...u},d)=>{const f=l.useRef(null),m=al({ref:f,colorScheme:r,variant:a});l.useImperativeHandle(d,()=>f.current);const h=e||"button";return j.jsx(h,{ref:f,as:e,"data-test-id":u["data-test-id"],className:Pe(NT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?j.jsx(_o,{color:a==="outline"?Lh[r||"primary"]:Lh.white}):j.jsxs(j.Fragment,{children:[m,o]})})});pl.displayName="Button";pl.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var kT=wt({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const MT=({width:e=140,height:t=140,viewBox:n="0 0 140 140",...r})=>j.jsx("svg",{"data-test-id":"illustration-fallback-image",width:e,height:t,viewBox:n,fill:"none",...r,children:j.jsx("path",{d:"M85.604 0H0V140H130V43.7197L85.604 0ZM119.088 129.24H10.9305V93.2855L23.0998 101.606L48.3128 71.9816L70.6656 103.991L83.7094 86.5608L106.062 92.0123L87.2618 70.7801L71.7769 89.1789L50.5353 52.3812L22.8812 79.3877L10.9305 68.1798V10.7596H80.9767V48.0594H118.96L119.07 48.167V129.24H119.088Z",fill:"#EEEEEE"})}),vl=l.forwardRef(({as:e,src:t,fit:n,width:r,height:o,loading:i,isLoading:a,fallback:s,onLoad:c,onError:u,className:d,"data-test-id":f,...m},h)=>{const b=e||"img",y=l.useMemo(()=>`${parseInt(`${r??0}`,10)}px`,[r]),T=l.useMemo(()=>`${parseInt(`${o??0}`,10)}px`,[o]),[S,v]=l.useState(!1),[w,C]=l.useState(n),I=P=>{C("fill"),v(!0),u==null||u(P)},D=P=>{v(!1),c==null||c(P)};return a&&!S?j.jsx(et,{bgColor:"$grey2",width:y,height:T}):S?s||j.jsx(MT,{width:y,height:T}):j.jsx(b,{"data-test-id":f,as:"img",width:y,height:T,src:t,loading:i,onLoad:D,onError:I,ref:h,className:Pe(kT({fit:w})),...m})});vl.displayName="Image";vl.defaultProps={as:"img","data-test-id":void 0,fallback:void 0,width:void 0,height:void 0,loading:void 0,isLoading:void 0,onLoad:void 0,onError:void 0,fit:void 0};var jT=wt({defaultClassName:"_5y0pl50",variantClassNames:{textStyle:{heading1:"_5y0pl51",heading2:"_5y0pl52",heading3:"_5y0pl53",heading4:"_5y0pl54",heading5:"_5y0pl55",heading6:"_5y0pl56",subtitle1:"_5y0pl57",subtitle2:"_5y0pl58",body1:"_5y0pl59",body2:"_5y0pl5a",caption:"_5y0pl5b",footer:"_5y0pl5c"},isDisabled:{true:"_5y0pl5d"},variant:{default:"_5y0pl5e",underline:"_5y0pl5f"},isBold:{true:"_5y0pl5g"}},defaultVariants:{variant:"default",isDisabled:!1,isBold:!1,textStyle:"body1"},compoundVariants:[]});const Qm=({children:e,className:t,variant:n,textStyle:r="body2",isDisabled:o,isBold:i,...a})=>j.jsx("a",{className:Pe(t,jT({isDisabled:o,variant:n,textStyle:r,isBold:i})),"data-disabled":o,...a,children:e});var LT="_1cq2k9i0";const ml=l.forwardRef(({children:e,as:t,className:n,...r},o)=>{const i=t||"ul";return j.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Pe(LT,n),...r,children:e})});ml.displayName="List";ml.defaultProps={"data-test-id":void 0,as:"ul"};var FT=wt({defaultClassName:"xw6nfa0",variantClassNames:{hasLink:{false:"xw6nfa1"}},defaultVariants:{hasLink:!1},compoundVariants:[]}),Fh="xw6nfa2",VT="xw6nfa3";const gl=l.forwardRef(({children:e,leftIcon:t,rightIcon:n,href:r,target:o,as:i,className:a,...s},c)=>{const u=i||"li",d=!!r;return j.jsx(u,{"data-test-id":s["data-test-id"],className:Pe(FT({hasLink:d}),a),...s,ref:c,children:r?j.jsxs("a",{href:r,target:o,className:VT,children:[t,j.jsx("div",{className:Fh,children:e}),n]}):j.jsxs(j.Fragment,{children:[t,j.jsx("div",{className:Fh,children:e}),n]})})});gl.displayName="ListItem";gl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li"};var Jm={},eg={exports:{}};(function(e,t){(function(r,o){e.exports=o()})(Ly,()=>(()=>{var n=[,(a,s,c)=>{c.r(s),c.d(s,{default:()=>d});var u=(()=>{var f=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(m={}){var h=m,b,y;h.ready=new Promise((_,g)=>{b=_,y=g});function T(){function _(ue){const se=N;O=g=0,N=new Map,se.forEach(de=>{try{de(ue)}catch(le){console.error(le)}}),this.Qa(),q&&q.nb()}let g=0,O=0,N=new Map,q=null,ne=null;this.requestAnimationFrame=function(ue){g||(g=requestAnimationFrame(_.bind(this)));const se=++O;return N.set(se,ue),se},this.cancelAnimationFrame=function(ue){N.delete(ue),g&&N.size==0&&(cancelAnimationFrame(g),g=0)},this.lb=function(ue){ne&&(document.body.remove(ne),ne=null),ue||(ne=document.createElement("div"),ne.style.backgroundColor="black",ne.style.position="fixed",ne.style.right=0,ne.style.top=0,ne.style.color="white",ne.style.padding="4px",ne.innerHTML="RIVE FPS",ue=function(se){ne.innerHTML="RIVE FPS "+se.toFixed(1)},document.body.appendChild(ne)),q=new function(){let se=0,de=0;this.nb=function(){var le=performance.now();de?(++se,le-=de,1e3<le&&(ue(1e3*se/le),se=de=0)):(de=le,se=0)}}},this.ib=function(){ne&&(document.body.remove(ne),ne=null),q=null},this.Qa=function(){}}function S(_){console.assert(!0);const g=new Map;let O=-1/0;this.push=function(N){return N=N+((1<<_)-1)>>_,g.has(N)&&clearTimeout(g.get(N)),g.set(N,setTimeout(function(){g.delete(N),g.length==0?O=-1/0:N==O&&(O=Math.max(...g.keys()),console.assert(O<N))},1e3)),O=Math.max(N,O),O<<_}}const v=new function(){function _(){if(!g){let Et=function(Dt,Ve,Ye){if(Ve=ge.createShader(Ve),ge.shaderSource(Ve,Ye),ge.compileShader(Ve),Ye=ge.getShaderInfoLog(Ve),0<Ye.length)throw Ye;ge.attachShader(Dt,Ve)};var Ce=document.createElement("canvas"),Me={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ge=Ce.getContext("webgl2",Me);if(ge)O=2;else if(ge=Ce.getContext("webgl",Me))O=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;if(N=Math.min(ge.getParameter(ge.MAX_RENDERBUFFER_SIZE),ge.getParameter(ge.MAX_TEXTURE_SIZE)),Ce=ge.createProgram(),Et(Ce,ge.VERTEX_SHADER,`attribute vec2 vertex;
146
+ */function bh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function wh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bh(Object(n),!0).forEach(function(r){DC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DC(e,t,n){return t=kC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NC(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kC(e){var t=NC(e,"string");return typeof t=="symbol"?t:String(t)}var Eh={activateTrap:function(t,n){if(t.length>0){var r=t[t.length-1];r!==n&&r.pause()}var o=t.indexOf(n);o===-1||t.splice(o,1),t.push(n)},deactivateTrap:function(t,n){var r=t.indexOf(n);r!==-1&&t.splice(r,1),t.length>0&&t[t.length-1].unpause()}},MC=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},jC=function(t){return(t==null?void 0:t.key)==="Escape"||(t==null?void 0:t.key)==="Esc"||(t==null?void 0:t.keyCode)===27},Jo=function(t){return(t==null?void 0:t.key)==="Tab"||(t==null?void 0:t.keyCode)===9},LC=function(t){return Jo(t)&&!t.shiftKey},FC=function(t){return Jo(t)&&t.shiftKey},xh=function(t){return setTimeout(t,0)},_h=function(t,n){var r=-1;return t.every(function(o,i){return n(o)?(r=i,!1):!0}),r},Mo=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return typeof t=="function"?t.apply(void 0,r):t},oa=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},VC=[],BC=function(t,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||VC,i=wh({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:LC,isKeyBackward:FC},n),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(R,E,p){return R&&R[E]!==void 0?R[E]:i[p||E]},u=function(R,E){var p=typeof(E==null?void 0:E.composedPath)=="function"?E.composedPath():void 0;return a.containerGroups.findIndex(function($){var A=$.container,M=$.tabbableNodes;return A.contains(R)||(p==null?void 0:p.includes(A))||M.find(function(z){return z===R})})},d=function(R){var E=i[R];if(typeof E=="function"){for(var p=arguments.length,$=new Array(p>1?p-1:0),A=1;A<p;A++)$[A-1]=arguments[A];E=E.apply(void 0,$)}if(E===!0&&(E=void 0),!E){if(E===void 0||E===!1)return E;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var M=E;if(typeof E=="string"&&(M=r.querySelector(E),!M))throw new Error("`".concat(R,"` as selector refers to no known node"));return M},f=function(){var R=d("initialFocus");if(R===!1)return!1;if(R===void 0||!lc(R,i.tabbableOptions))if(u(r.activeElement)>=0)R=r.activeElement;else{var E=a.tabbableGroups[0],p=E&&E.firstTabbableNode;R=p||d("fallbackFocus")}if(!R)throw new Error("Your focus-trap needs to have at least one focusable element");return R},m=function(){if(a.containerGroups=a.containers.map(function(R){var E=OC(R,i.tabbableOptions),p=PC(R,i.tabbableOptions),$=E.length>0?E[0]:void 0,A=E.length>0?E[E.length-1]:void 0,M=p.find(function(re){return Qr(re)}),z=p.slice().reverse().find(function(re){return Qr(re)}),U=!!E.find(function(re){return Rr(re)>0});return{container:R,tabbableNodes:E,focusableNodes:p,posTabIndexesFound:U,firstTabbableNode:$,lastTabbableNode:A,firstDomTabbableNode:M,lastDomTabbableNode:z,nextTabbableNode:function(B){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,oe=E.indexOf(B);return oe<0?L?p.slice(p.indexOf(B)+1).find(function(G){return Qr(G)}):p.slice(0,p.indexOf(B)).reverse().find(function(G){return Qr(G)}):E[oe+(L?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(R){return R.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!d("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(R){return R.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function H(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){H(f());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,MC(R)&&R.select()}},b=function(R){var E=d("setReturnFocus",R);return E||(E===!1?!1:R)},y=function(R){var E=R.target,p=R.event,$=R.isBackward,A=$===void 0?!1:$;E=E||oa(p),m();var M=null;if(a.tabbableGroups.length>0){var z=u(E,p),U=z>=0?a.containerGroups[z]:void 0;if(z<0)A?M=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:M=a.tabbableGroups[0].firstTabbableNode;else if(A){var re=_h(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return E===ce});if(re<0&&(U.container===E||lc(E,i.tabbableOptions)&&!Qr(E,i.tabbableOptions)&&!U.nextTabbableNode(E,!1))&&(re=z),re>=0){var B=re===0?a.tabbableGroups.length-1:re-1,L=a.tabbableGroups[B];M=Rr(E)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(p)||(M=U.nextTabbableNode(E,!1))}else{var oe=_h(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return E===ce});if(oe<0&&(U.container===E||lc(E,i.tabbableOptions)&&!Qr(E,i.tabbableOptions)&&!U.nextTabbableNode(E))&&(oe=z),oe>=0){var G=oe===a.tabbableGroups.length-1?0:oe+1,K=a.tabbableGroups[G];M=Rr(E)>=0?K.firstTabbableNode:K.firstDomTabbableNode}else Jo(p)||(M=U.nextTabbableNode(E))}}else M=d("fallbackFocus");return M},T=function(R){var E=oa(R);if(!(u(E,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},S=function(R){var E=oa(R),p=u(E,R)>=0;if(p||E instanceof Document)p&&(a.mostRecentlyFocusedNode=E);else{R.stopImmediatePropagation();var $,A=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var M=u(a.mostRecentlyFocusedNode),z=a.containerGroups[M].tabbableNodes;if(z.length>0){var U=z.findIndex(function(re){return re===a.mostRecentlyFocusedNode});U>=0&&(i.isKeyForward(a.recentNavEvent)?U+1<z.length&&($=z[U+1],A=!1):U-1>=0&&($=z[U-1],A=!1))}}else a.containerGroups.some(function(re){return re.tabbableNodes.some(function(B){return Rr(B)>0})})||(A=!1);else A=!1;A&&($=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),h($||a.mostRecentlyFocusedNode||f())}a.recentNavEvent=void 0},v=function(R){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var p=y({event:R,isBackward:E});p&&(Jo(R)&&R.preventDefault(),h(p))},w=function(R){if(jC(R)&&Mo(i.escapeDeactivates,R)!==!1){R.preventDefault(),s.deactivate();return}(i.isKeyForward(R)||i.isKeyBackward(R))&&v(R,i.isKeyBackward(R))},C=function(R){var E=oa(R);u(E,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return Eh.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?xh(function(){h(f())}):h(f()),r.addEventListener("focusin",S,!0),r.addEventListener("mousedown",T,{capture:!0,passive:!1}),r.addEventListener("touchstart",T,{capture:!0,passive:!1}),r.addEventListener("click",C,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},D=function(){if(a.active)return r.removeEventListener("focusin",S,!0),r.removeEventListener("mousedown",T,!0),r.removeEventListener("touchstart",T,!0),r.removeEventListener("click",C,!0),r.removeEventListener("keydown",w,!0),s},P=function(R){var E=R.some(function(p){var $=Array.from(p.removedNodes);return $.some(function(A){return A===a.mostRecentlyFocusedNode})});E&&h(f())},F=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(P):void 0,k=function(){F&&(F.disconnect(),a.active&&!a.paused&&a.containers.map(function(R){F.observe(R,{subtree:!0,childList:!0})}))};return s={get active(){return a.active},get paused(){return a.paused},activate:function(R){if(a.active)return this;var E=c(R,"onActivate"),p=c(R,"onPostActivate"),$=c(R,"checkCanFocusTrap");$||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,E==null||E();var A=function(){$&&m(),I(),k(),p==null||p()};return $?($(a.containers.concat()).then(A,A),this):(A(),this)},deactivate:function(R){if(!a.active)return this;var E=wh({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},R);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,D(),a.active=!1,a.paused=!1,k(),Eh.deactivateTrap(o,s);var p=c(E,"onDeactivate"),$=c(E,"onPostDeactivate"),A=c(E,"checkCanReturnFocus"),M=c(E,"returnFocus","returnFocusOnDeactivate");p==null||p();var z=function(){xh(function(){M&&h(b(a.nodeFocusedBeforeActivation)),$==null||$()})};return M&&A?(A(b(a.nodeFocusedBeforeActivation)).then(z,z),this):(z(),this)},pause:function(R){if(a.paused||!a.active)return this;var E=c(R,"onPause"),p=c(R,"onPostPause");return a.paused=!0,E==null||E(),D(),k(),p==null||p(),this},unpause:function(R){if(!a.paused||!a.active)return this;var E=c(R,"onUnpause"),p=c(R,"onPostUnpause");return a.paused=!1,E==null||E(),m(),I(),k(),p==null||p(),this},updateContainerElements:function(R){var E=[].concat(R).filter(Boolean);return a.containers=E.map(function(p){return typeof p=="string"?r.querySelector(p):p}),a.active&&m(),k(),this}},s.updateContainerElements(t),s};function HC({targetRef:e,fallbackRef:t,initialFocusRef:n,enabled:r}){const o=l.useRef({activate:()=>{throw new TypeError("Tried to activate focus trap too early")},deactivate:()=>{}});return l.useDebugValue(r?"Enabled":"Disabled"),l.useEffect(()=>{if(!r){o.current.deactivate(),o.current={activate:()=>{},deactivate:()=>{}};return}const i=t.current,a=BC(e.current,{onActivate:process.env.NODE_ENV!=="production"?()=>{console.log("focus activate")}:void 0,initialFocus:n?()=>(n==null?void 0:n.current)||i:void 0,fallbackFocus:i,escapeDeactivates:!1,clickOutsideDeactivates:!1});let s=!1;o.current={activate:async()=>{s||(s=!0,await a.activate(),await new Promise(c=>setTimeout(()=>c(1),0)))},deactivate:()=>{s&&(s=!1,a.deactivate())}}},[r,t,n,e]),o}const wi=typeof window<"u"?l.useLayoutEffect:l.useEffect;function WC(){const[e,t]=l.useState(!1),[n,r]=l.useState({}),o=l.useCallback(i=>(console.count(`registerReady:${i}`),r(a=>({...a,[i]:!1})),()=>{console.count(`setReady:${i}`),r(a=>({...a,[i]:!0}))}),[]);return l.useEffect(()=>{const i=Object.values(n);if(i.length===0){console.log("nope nothing registered yet");return}const a=i.every(Boolean);console.log("check if we are rready",n,a),a&&(console.warn("ready!"),t(!0))},[n]),{ready:e,registerReady:o}}function zC(){const e=l.useMemo(()=>typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,[]),t=l.useRef(e==null?void 0:e.matches);return l.useDebugValue(t.current?"reduce":"no-preference"),l.useEffect(()=>{const n=r=>{t.current=r.matches};return e==null||e.addListener(n),()=>e==null?void 0:e.removeListener(n)},[e]),t}function UC(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var ol=!1;if(typeof window<"u"){var Sh={get passive(){ol=!0}};window.addEventListener("testPassive",null,Sh),window.removeEventListener("testPassive",null,Sh)}var jm=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),fr=[],Ua=!1,Lm=-1,ei=void 0,ti=void 0,Fm=function(t){return fr.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(t))})},Ya=function(t){var n=t||window.event;return Fm(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},YC=function(t){if(ti===void 0){var n=!!t&&t.reserveScrollBarGap===!0,r=window.innerWidth-document.documentElement.clientWidth;n&&r>0&&(ti=document.body.style.paddingRight,document.body.style.paddingRight=r+"px")}ei===void 0&&(ei=document.body.style.overflow,document.body.style.overflow="hidden")},KC=function(){ti!==void 0&&(document.body.style.paddingRight=ti,ti=void 0),ei!==void 0&&(document.body.style.overflow=ei,ei=void 0)},qC=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},XC=function(t,n){var r=t.targetTouches[0].clientY-Lm;return Fm(t.target)?!1:n&&n.scrollTop===0&&r>0||qC(n)&&r<0?Ya(t):(t.stopPropagation(),!0)},GC=function(t,n){if(!t){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!fr.some(function(o){return o.targetElement===t})){var r={targetElement:t,options:n||{}};fr=[].concat(UC(fr),[r]),jm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(Lm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&XC(o,t)},Ua||(document.addEventListener("touchmove",Ya,ol?{passive:!1}:void 0),Ua=!0)):YC(n)}},ZC=function(t){if(!t){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}fr=fr.filter(function(n){return n.targetElement!==t}),jm?(t.ontouchstart=null,t.ontouchmove=null,Ua&&fr.length===0&&(document.removeEventListener("touchmove",Ya,ol?{passive:!1}:void 0),Ua=!1)):fr.length||KC()};function QC({targetRef:e,enabled:t,reserveScrollBarGap:n}){const r=l.useRef({activate:()=>{throw new TypeError("Tried to activate scroll lock too early")},deactivate:()=>{}});return l.useDebugValue(t?"Enabled":"Disabled"),l.useEffect(()=>{if(!t){r.current.deactivate(),r.current={activate:()=>{},deactivate:()=>{}};return}const o=e.current;let i=!1;r.current={activate:()=>{i||(i=!0,GC(o,{allowTouchMove:a=>a.closest("[data-body-scroll-lock-ignore]"),reserveScrollBarGap:n}))},deactivate:()=>{i&&(i=!1,ZC(o))}}},[t,e,n]),r}var Ar=[],JC=function(){return Ar.some(function(e){return e.activeTargets.length>0})},e$=function(){return Ar.some(function(e){return e.skippedTargets.length>0})},Ch="ResizeObserver loop completed with undelivered notifications.",t$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Ch}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Ch),window.dispatchEvent(e)},Ei;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ei||(Ei={}));var Dr=function(e){return Object.freeze(e)},n$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Dr(this)}return e}(),Vm=function(){function e(t,n,r,o){return this.x=t,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Dr(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,o=t.top,i=t.right,a=t.bottom,s=t.left,c=t.width,u=t.height;return{x:n,y:r,top:o,right:i,bottom:a,left:s,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),il=function(e){return e instanceof SVGElement&&"getBBox"in e},Bm=function(e){if(il(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||e.getClientRects().length)},$h=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},r$=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ni=typeof window<"u"?window:{},ia=new WeakMap,Th=/auto|scroll/,o$=/^tb|vertical/,i$=/msie|trident/i.test(ni.navigator&&ni.navigator.userAgent),jn=function(e){return parseFloat(e||"0")},so=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new n$((n?t:e)||0,(n?e:t)||0)},Ih=Dr({devicePixelContentBoxSize:so(),borderBoxSize:so(),contentBoxSize:so(),contentRect:new Vm(0,0,0,0)}),Hm=function(e,t){if(t===void 0&&(t=!1),ia.has(e)&&!t)return ia.get(e);if(Bm(e))return ia.set(e,Ih),Ih;var n=getComputedStyle(e),r=il(e)&&e.ownerSVGElement&&e.getBBox(),o=!i$&&n.boxSizing==="border-box",i=o$.test(n.writingMode||""),a=!r&&Th.test(n.overflowY||""),s=!r&&Th.test(n.overflowX||""),c=r?0:jn(n.paddingTop),u=r?0:jn(n.paddingRight),d=r?0:jn(n.paddingBottom),f=r?0:jn(n.paddingLeft),m=r?0:jn(n.borderTopWidth),h=r?0:jn(n.borderRightWidth),b=r?0:jn(n.borderBottomWidth),y=r?0:jn(n.borderLeftWidth),T=f+u,S=c+d,v=y+h,w=m+b,C=s?e.offsetHeight-w-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?T+v:0,P=o?S+w:0,F=r?r.width:jn(n.width)-D-I,k=r?r.height:jn(n.height)-P-C,H=F+T+I+v,R=k+S+C+w,E=Dr({devicePixelContentBoxSize:so(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:so(H,R,i),contentBoxSize:so(F,k,i),contentRect:new Vm(f,c,F,k)});return ia.set(e,E),E},Wm=function(e,t,n){var r=Hm(e,n),o=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case Ei.DEVICE_PIXEL_CONTENT_BOX:return a;case Ei.BORDER_BOX:return o;default:return i}},a$=function(){function e(t){var n=Hm(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Dr([n.borderBoxSize]),this.contentBoxSize=Dr([n.contentBoxSize]),this.devicePixelContentBoxSize=Dr([n.devicePixelContentBoxSize])}return e}(),zm=function(e){if(Bm(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},s$=function(){var e=1/0,t=[];Ar.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new a$(u.target),f=zm(u.target);s.push(d),u.lastReportedSize=Wm(u.target,u.observedBox),f<e&&(e=f)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var o=r[n];o()}return e},Rh=function(e){Ar.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(o){o.isActive()&&(zm(o.target)>e?n.activeTargets.push(o):n.skippedTargets.push(o))})})},c$=function(){var e=0;for(Rh(e);JC();)e=s$(),Rh(e);return e$()&&t$(),e>0},dc,Um=[],u$=function(){return Um.splice(0).forEach(function(e){return e()})},l$=function(e){if(!dc){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return u$()}).observe(n,r),dc=function(){n.textContent="".concat(t?t--:t++)}}Um.push(e),dc()},d$=function(e){l$(function(){requestAnimationFrame(e)})},xa=0,f$=function(){return!!xa},h$=250,p$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Oh=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ph=function(e){return e===void 0&&(e=0),Date.now()+e},fc=!1,v$=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=h$),!fc){fc=!0;var r=Ph(t);d$(function(){var o=!1;try{o=c$()}finally{if(fc=!1,t=r-Ph(),!f$())return;o?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,p$)};document.body?n():ni.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Oh.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Oh.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ru=new v$,Ah=function(e){!xa&&e>0&&ru.start(),xa+=e,!xa&&ru.stop()},m$=function(e){return!il(e)&&!r$(e)&&getComputedStyle(e).display==="inline"},g$=function(){function e(t,n){this.target=t,this.observedBox=n||Ei.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Wm(this.target,this.observedBox,!0);return m$(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),y$=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),aa=new WeakMap,Dh=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},sa=function(){function e(){}return e.connect=function(t,n){var r=new y$(t,n);aa.set(t,r)},e.observe=function(t,n,r){var o=aa.get(t),i=o.observationTargets.length===0;Dh(o.observationTargets,n)<0&&(i&&Ar.push(o),o.observationTargets.push(new g$(n,r&&r.box)),Ah(1),ru.schedule())},e.unobserve=function(t,n){var r=aa.get(t),o=Dh(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Ar.splice(Ar.indexOf(r),1),r.observationTargets.splice(o,1),Ah(-1))},e.disconnect=function(t){var n=this,r=aa.get(t);r.observationTargets.slice().forEach(function(o){return n.unobserve(t,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),b$=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");sa.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!$h(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!$h(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");sa.unobserve(this,t)},e.prototype.disconnect=function(){sa.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function Wo(e,t,n){return e=+e,t=+t,n=+n,t=t===t?t:0,n=n===n?n:0,e===e&&(e=e<=n?e:n,e=e>=t?e:t),e}function Ka(e){const t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}function w$(e,t){const r=[].concat(e).map(Ka).reduce((s,c)=>(s.add(Wo(c,0,t)),s),new Set),o=Array.from(r),i=Math.min(...o);if(Number.isNaN(i))throw new TypeError("minSnap is NaN");const a=Math.max(...o);if(Number.isNaN(a))throw new TypeError("maxSnap is NaN");return{snapPoints:o,minSnap:i,maxSnap:a}}const E$=process.env.NODE_ENV==="development"&&typeof window<"u"?window.location.search==="?debug":!1,x$={box:"border-box"};function hc(e,{label:t,enabled:n,resizeSourceRef:r}){const[o,i]=l.useState(0);l.useDebugValue(`${t}: ${o}`);const a=l.useCallback(s=>{i(s[0].borderBoxSize[0].blockSize),r.current="element"},[r]);return wi(()=>{if(!e.current||!n)return;const s=new b$(a);return s.observe(e.current,x$),()=>s.disconnect()},[e,a,n]),n?o:0}function _$(e,t,n){const r=l.useMemo(()=>t("maxHeight"),[t]),o=window.innerHeight*.85,[i,a]=l.useState(()=>Ka(e)||typeof window<"u"?o:0),s=i>0,c=l.useRef(0);return l.useDebugValue(e?"controlled":"auto"),l.useEffect(()=>{s&&r()},[s,r]),wi(()=>{if(e){a(Ka(e)),n.current="maxheightprop";return}const u=()=>{c.current||(c.current=requestAnimationFrame(()=>{a(o),n.current="window",c.current=0}))};return window.addEventListener("resize",u),a(o),n.current="window",r(),()=>{window.removeEventListener("resize",u),cancelAnimationFrame(c.current)}},[e,r,n,o]),i}function S$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:o,headerRef:i,registerReady:a,resizeSourceRef:s,conditions:c}){const u=l.useMemo(()=>a("contentHeight"),[a]),d=_$(t,a,s),f=hc(i,{label:"headerHeight",enabled:o,resizeSourceRef:s}),m=hc(e,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),h=hc(r,{label:"footerHeight",enabled:n,resizeSourceRef:s}),b=c!=null&&c.hasPaddingY?16:0,y=c!=null&&c.hasHeader?0:20,T=c!=null&&c.hasCustomHeader?16:0,S=Math.min(d-f-h,m+b)+(f+y+T)+h;l.useDebugValue(`minHeight: ${S}`);const v=m>0;return l.useEffect(()=>{v&&u()},[v,u]),{maxHeight:d,minHeight:S,headerHeight:f,footerHeight:h}}function C$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,getSnapPoints:o,headerEnabled:i,headerRef:a,heightRef:s,lastSnapRef:c,ready:u,registerReady:d,resizeSourceRef:f,conditions:m}){const{maxHeight:h,minHeight:b,headerHeight:y,footerHeight:T}=S$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:d,resizeSourceRef:f,conditions:m}),{snapPoints:S,minSnap:v,maxSnap:w}=w$(u?o({height:s.current,footerHeight:T,headerHeight:y,minHeight:b,maxHeight:h}):[0],h);function C(I){let D;typeof I=="function"?D=I({footerHeight:T,headerHeight:y,height:s.current,minHeight:b,maxHeight:h,snapPoints:S,lastSnap:c.current}):D=I;const P=Ka(D);return S.reduce((F,k)=>Math.abs(k-P)<Math.abs(F-P)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${w}`),{minSnap:v,maxSnap:w,findSnap:C,maxHeight:h}}function $$(){return hS(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function T$({spring:e}){const t=Zr([e.y,e.maxHeight],(s,c)=>`${Math.round(Wo(c-s,0,16))}px`),n=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>`${Wo(s,c,u)}px`),r=Zr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>s<c?`${c-s}px`:s>u?`${u-s}px`:"0px"),o=Zr([e.y,e.maxSnap],(s,c)=>s>=c?Math.ceil(s-c):0),i=Zr([e.y,e.minSnap],(s,c)=>{if(!c)return 0;const u=Math.max(c/2-45,0),d=Math.min(c/2+45,c),f=0,h=(1-f)/(d-u),b=(s-u)*(h+f);return Wo(b,0,1)}),a=Zr([e.y,e.minSnap],(s,c)=>c?Wo(s/c,0,1):0);return{"--rsbs-content-opacity":i,"--rsbs-backdrop-opacity":a,"--rsbs-antigap-scale-y":o,"--rsbs-overlay-translate-y":r,"--rsbs-overlay-rounded":t,"--rsbs-overlay-h":n}}function Xt(e=1e3){return new Promise(t=>setTimeout(t,e))}const I$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},Nh={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},kh={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},R$=({initialState:e})=>e==="OPEN",O$=({initialState:e})=>e==="CLOSED",P$=Kx({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:{...Nh,...kh}}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:{...Nh,...kh}}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{...I$},onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[qx({y:(e,{payload:{y:t}})=>t,velocity:(e,{payload:{velocity:t}})=>t,snapSource:(e,{payload:{source:t="custom"}})=>t})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapCancel:(e,t)=>{console.log("onSnapCancel",{context:e,event:t})},onResizeCancel:(e,t)=>{console.log("onResizeCancel",{context:e,event:t})},onCloseCancel:(e,t)=>{console.log("onCloseCancel",{context:e,event:t})},onOpenEnd:(e,t)=>{console.log("onOpenCancel",{context:e,event:t})},onSnapEnd:(e,t)=>{console.log("onSnapEnd",{context:e,event:t})},onRezizeEnd:(e,t)=>{console.log("onRezizeEnd",{context:e,event:t})}},services:{onSnapStart:async()=>{await Xt()},onOpenStart:async()=>{await Xt()},onCloseStart:async()=>{await Xt()},onResizeStart:async()=>{await Xt()},onSnapEnd:async()=>{await Xt()},onOpenEnd:async()=>{await Xt()},onCloseEnd:async()=>{await Xt()},onResizeEnd:async()=>{await Xt()},renderVisuallyHidden:async(e,t)=>{console.group("renderVisuallyHidden"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},activate:async(e,t)=>{console.group("activate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},deactivate:async(e,t)=>{console.group("deactivate"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openSmoothly:async(e,t)=>{console.group("openSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},openImmediately:async(e,t)=>{console.group("openImmediately"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},snapSmoothly:async(e,t)=>{console.group("snapSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},resizeSmoothly:async(e,t)=>{console.group("resizeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()},closeSmoothly:async(e,t)=>{console.group("closeSmoothly"),console.log({context:e,event:t}),await Xt(),console.groupEnd()}},guards:{initiallyClosed:O$,initiallyOpen:R$}}),{tension:A$,friction:ca}=am.default,D$=["closed","opening","open","closing","dragging","snapping","resizing"];function N$({snapPoints:e,lastSnap:t}){return t??Math.min(...e)}function k$({minHeight:e}){return e}const M$=l.forwardRef(function({children:t,sibling:n,className:r,footer:o,header:i,isOpen:a,initialState:s,lastSnapRef:c,initialFocusRef:u,onClose:d,maxHeight:f,defaultSnap:m=N$,snapPoints:h=k$,blocking:b=!0,scrollLocking:y=!0,style:T,onSpringStart:S,onSpringCancel:v,onSpringEnd:w,reserveScrollBarGap:C=b,expandOnContentDrag:I=!1,title:D,showClose:P,showBack:F,onBack:k,onCloseWhenClickOutside:H=!0,hasHandleBar:R=!0,"data-test-id":E,padding:p,...$},A){const{ready:M,registerReady:z}=WC(),U=l.useRef(!1),re=l.useRef(S),B=l.useRef(v),L=l.useRef(w);l.useEffect(()=>{re.current=S,B.current=v,L.current=w},[v,S,w]);const[oe,G]=$$(),K=l.useRef(null),Z=l.useRef(null),ce=l.useRef(null),W=l.useRef(null),Y=l.useRef(null),te=l.useRef(null),J=l.useRef(0),ie=l.useRef(),ee=l.useRef(!1),we=zC(),{x:Te="default",y:Oe="default"}=p??{},Ne=Te==="default",Re=Oe==="default",We=QC({targetRef:Z,enabled:M&&y,reserveScrollBarGap:C}),De=vC({targetRef:K,enabled:M&&b}),ot=HC({targetRef:K,fallbackRef:te,initialFocusRef:u||void 0,enabled:M&&b&&u!==!1}),{minSnap:ze,maxSnap:xt,maxHeight:Xe,findSnap:Pt}=C$({contentRef:ce,controlledMaxHeight:f,footerEnabled:!!o,footerRef:Y,getSnapPoints:h,headerEnabled:i!==!1,headerRef:W,heightRef:J,lastSnapRef:c,ready:M,registerReady:z,resizeSourceRef:ie,conditions:{hasPaddingY:Re,hasHeader:i!==!1,hasCustomHeader:!!i}}),xe=l.useRef(Xe),ct=l.useRef(ze),je=l.useRef(xt),Zt=l.useRef(Pt),Ct=l.useRef(0);wi(()=>{xe.current=Xe,je.current=xt,ct.current=ze,Zt.current=Pt,Ct.current=Pt(m)},[Pt,m,Xe,xt,ze]);const tt=l.useCallback(({onRest:he,config:{velocity:Ue=1,...kt}={},...At})=>new Promise(Jt=>G({...At,config:{velocity:Ue,...kt,mass:1,tension:A$,friction:Math.max(ca,ca+(ca-ca*Ue))},onRest:(...Ot)=>{Jt(...Ot),he==null||he(...Ot)}})),[G]),[Fe,mt]=o_(P$,{devTools:E$,actions:{onOpenCancel:l.useCallback(()=>{var he;return(he=B.current)==null?void 0:he.call(B,{type:"OPEN"})},[]),onSnapCancel:l.useCallback(he=>{var Ue;return(Ue=B.current)==null?void 0:Ue.call(B,{type:"SNAP",source:he.snapSource})},[]),onCloseCancel:l.useCallback(()=>{var he;return(he=B.current)==null?void 0:he.call(B,{type:"CLOSE"})},[]),onResizeCancel:l.useCallback(()=>{var he;return(he=B.current)==null?void 0:he.call(B,{type:"RESIZE",source:ie.current})},[]),onOpenEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onSnapEnd:l.useCallback(he=>{var Ue;return(Ue=L.current)==null?void 0:Ue.call(L,{type:"SNAP",source:he.snapSource})},[]),onResizeEnd:l.useCallback(()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:ie.current})},[])},context:{initialState:s},services:{onSnapStart:l.useCallback(async(he,Ue)=>{var kt;return(kt=re.current)==null?void 0:kt.call(re,{type:"SNAP",source:Ue.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var he;return(he=re.current)==null?void 0:he.call(re,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var he;return(he=re.current)==null?void 0:he.call(re,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var he;return(he=re.current)==null?void 0:he.call(re,{type:"RESIZE",source:ie.current})},[]),onSnapEnd:l.useCallback(async he=>{var Ue;return(Ue=L.current)==null?void 0:Ue.call(L,{type:"SNAP",source:he.snapSource})},[]),onOpenEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"OPEN"})},[]),onCloseEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"CLOSE"})},[]),onResizeEnd:l.useCallback(async()=>{var he;return(he=L.current)==null?void 0:he.call(L,{type:"RESIZE",source:ie.current})},[]),renderVisuallyHidden:l.useCallback(async()=>{await tt({y:Ct.current,ready:0,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[tt]),activate:l.useCallback(async()=>{U.current=!0,await Promise.all([We.current.activate(),ot.current.activate(),De.current.activate()])},[De,ot,We]),deactivate:l.useCallback(async()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate(),U.current=!1},[De,ot,We]),openImmediately:l.useCallback(async()=>{J.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0})},[tt]),openSmoothly:l.useCallback(async()=>{await tt({y:0,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:!0}),J.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:we.current})},[tt,we]),snapSmoothly:l.useCallback(async he=>{const Ue=Zt.current(he.y);J.current=Ue,c.current=Ue,await tt({y:Ue,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:we.current,config:{velocity:he.velocity}})},[tt,c,we]),resizeSmoothly:l.useCallback(async()=>{const he=Zt.current(J.current);J.current=he,c.current=he,await tt({y:he,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:ie.current==="element"?we.current:!0})},[tt,c,we]),closeSmoothly:l.useCallback(async()=>{tt({minSnap:J.current,immediate:!0}),J.current=0,await tt({y:0,maxHeight:xe.current,maxSnap:je.current,immediate:we.current}),await tt({ready:0,immediate:!0})},[tt,we])}});l.useEffect(()=>{M&&mt(a?"OPEN":"CLOSE")},[a,mt,M]),wi(()=>{(Xe||xt||ze)&&mt("RESIZE")},[Xe,xt,ze,mt]),l.useEffect(()=>()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate()},[De,ot,We]),l.useImperativeHandle(A,()=>({snapTo:(he,{velocity:Ue=1,source:kt="custom"}={})=>{mt("SNAP",{payload:{y:Zt.current(he),velocity:Ue,source:kt}})},get height(){return J.current}}),[mt]),l.useEffect(()=>{const he=Z.current,Ue=At=>{ee.current&&At.preventDefault()},kt=At=>{he&&he.scrollTop<0&&(requestAnimationFrame(()=>{he.style.overflow="hidden",he.scrollTop=0,he.style.removeProperty("overflow")}),At.preventDefault())};return I&&(he==null||he.addEventListener("scroll",Ue),he==null||he.addEventListener("touchmove",Ue),he==null||he.addEventListener("touchstart",kt)),()=>{he==null||he.removeEventListener("scroll",Ue),he==null||he.removeEventListener("touchmove",Ue),he==null||he.removeEventListener("touchstart",kt)}},[I,Z]);const rn=hC(({args:[{closeOnTap:he=!1,isContentDragging:Ue=!1}={}]=[],cancel:kt,direction:[,At],down:Jt,first:Ot,last:yn,memo:Lt=oe.y.get(),movement:[,Dn],tap:tr,velocity:un})=>{const $n=Dn*-1;if(!U.current)return console.log("handleDrag cancelled dragging because canDragRef is false"),kt(),Lt;if(d&&he&&tr)return kt(),setTimeout(()=>d(),0),Lt;if(tr)return Lt;const Ht=Lt+$n,en=$n*un,Nn=Math.max(ct.current,Math.min(je.current,Ht+en*2));if(!Jt&&d&&At>0&&Ht+en<ct.current/2)return kt(),d(),Lt;let Kt=Jt?!d&&ct.current===je.current?Ht<ct.current?Qo(Ht,ct.current,je.current*2,.55):Qo(Ht,ct.current/2,je.current,.55):Qo(Ht,d?0:ct.current,je.current,.55):Nn;return I&&Ue?(Kt>=je.current&&(Kt=je.current),Lt===je.current&&Z.current&&Z.current.scrollTop>0&&(Kt=je.current),ee.current=Kt<je.current):ee.current=!1,Ot&&mt("DRAG"),yn?(mt("SNAP",{payload:{y:Kt,velocity:un>.05?un:1,source:"dragging"}}),Lt):(G({y:Kt,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:!0,config:{velocity:un}}),Lt)},{filterTaps:!0});if(Number.isNaN(je.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(ct.current))throw new TypeError("minSnapRef is NaN!!");const Qt=T$({spring:oe});return j.jsxs($S.div,{...$,"data-rsbs-root":!0,"data-rsbs-state":D$.find(Fe.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!d,"data-rsbs-has-header":!!i,"data-rsbs-has-footer":!!o,className:r,ref:K,style:{...Qt,...T,opacity:oe.ready},"data-test-id":E,children:[n,b&&j.jsx(et,{"data-rsbs-backdrop":!0,...rn({closeOnTap:H})},"backdrop"),j.jsxs(et,{"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Ne,"data-rsbs-overlay-has-padding-y":Re,"data-test-id":"CT-BottomSheet-Overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:te,onKeyDown:he=>{he.key==="Escape"&&(he.stopPropagation(),d&&d())},children:[j.jsx(Om,{ref:W,title:D,header:i,showBack:F,showClose:P,bind:rn,hasHandleBar:R,onBack:k,onClose:d}),j.jsx(et,{"data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Ne,"data-rsbs-scroll-has-padding-y":Re,ref:Z,...I?rn({isContentDragging:!0}):{},children:j.jsx(et,{"data-rsbs-content":!0,ref:ce,children:t})},"scroll"),o&&j.jsx(et,{ref:Y,"data-rsbs-footer":!0,...rn(),children:o},"footer")]},"overlay")]})}),j$=l.forwardRef(function({onSpringStart:t,onSpringEnd:n,skipInitialTransition:r,...o},i){const[a,s]=l.useState(!1),c=l.useRef(),u=l.useRef(null),d=l.useRef(r&&o.isOpen?"OPEN":"CLOSED");wi(()=>o.isOpen?(cancelAnimationFrame(c.current),s(!0),()=>{d.current="CLOSED"}):()=>{d.current="CLOSED"},[o.isOpen]);const f=l.useCallback(async function(b){await(t==null?void 0:t(b)),b.type==="OPEN"&&cancelAnimationFrame(c.current)},[t]),m=l.useCallback(async function(b){await(n==null?void 0:n(b)),b.type==="CLOSE"&&(c.current=requestAnimationFrame(()=>s(!1)))},[n]);return a?j.jsx(Ev,{"data-rsbs-portal":!0,children:j.jsx(M$,{...o,lastSnapRef:u,ref:i,initialState:d.current,onSpringStart:f,onSpringEnd:m})}):null}),_o=({size:e,color:t="inherit",thickness:n=3,...r})=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",xmlSpace:"preserve",width:e,height:e,...r,children:j.jsx("path",{fill:t,stroke:t,strokeWidth:n,d:"M73 50c0-12.7-10.3-23-23-23S27 37.3 27 50m3.9 0c0-10.5 8.5-19.1 19.1-19.1S69.1 39.5 69.1 50",children:j.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})})});_o.displayName="Spinner";_o.defaultProps={size:24,thickness:3};const L$=({value:e,delay:t=500})=>{const[n,r]=l.useState(e);return l.useEffect(()=>{const o=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(o)}},[e,t]),n},F$=L$;process.env.NODE_ENV;var V$=wt({defaultClassName:"_920fuu5",variantClassNames:{colorScheme:{primary:"_920fuu6",neutral:"_920fuu7",danger:"_920fuu8",warning:"_920fuu9",info:"_920fuua"},variant:{solid:"_920fuub",outline:"_920fuuc",ghost:"_920fuud"},size:{small:"_920fuue",medium:"_920fuuf",large:"_920fuug"},unstyled:{true:"_920fuuh"},isFluid:{true:"_920fuui"}},defaultVariants:{size:"medium",variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_920fuuj"],[{colorScheme:"neutral",variant:"outline"},"_920fuuk"],[{colorScheme:"danger",variant:"outline"},"_920fuul"],[{colorScheme:"warning",variant:"outline"},"_920fuum"],[{colorScheme:"info",variant:"outline"},"_920fuun"],[{size:"small",variant:"outline"},"_920fuuo"],[{size:"large",variant:"outline"},"_920fuup"]]}),B$={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},H$={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},Mh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var W$="p9dczu0";const al=({ref:e,colorScheme:t="primary"})=>{const[n,r]=l.useState([]),o=F$({value:n,delay:1e3});return l.useEffect(()=>{if(e.current){const i=e.current,a=s=>{const c=i.getBoundingClientRect(),u=s.clientX-c.left,d=s.clientY-c.top,f=i.clientHeight,m=i.clientWidth,h=Math.max(m,f);r([...n,{top:d-h/2,left:u-h/2,height:Math.max(m,f),width:Math.max(m,f),backgroundColor:t==="primary"?Rt.theme.colors.primary:B$[t]}])};return i.addEventListener("click",a),()=>{i.removeEventListener("click",a)}}return()=>!1},[e,n]),l.useEffect(()=>{o.length&&r([])},[o.length]),n==null?void 0:n.map((i,a)=>j.jsx("span",{className:W$,style:{...i}},a))},vo=l.forwardRef(({as:e,children:t,className:n,colorScheme:r,size:o,isLoading:i,variant:a,style:s,isDisabled:c,isFluid:u,unstyled:d,noRipple:f,...m},h)=>{const b=l.useRef(null),y=al({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(h,()=>b.current);const T=e||"button";return j.jsx(T,{ref:b,as:e,"data-test-id":m["data-test-id"],className:Pe(V$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:d}),a==="ghost"?H$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?j.jsx(_o,{color:a==="outline"||a==="ghost"?Mh[r||"primary"]:Mh.white}):j.jsxs(j.Fragment,{children:[!f&&y,t]})})});vo.displayName="Button";vo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const Ym="Checkbox",[z$,_P]=mn(Ym),[U$,Y$]=z$(Ym),K$=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...d}=e,[f,m]=l.useState(null),h=st(t,w=>m(w)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=Sn({prop:o,defaultProp:i,onChange:u}),v=l.useRef(T);return l.useEffect(()=>{const w=f==null?void 0:f.form;if(w){const C=()=>S(v.current);return w.addEventListener("reset",C),()=>w.removeEventListener("reset",C)}},[f,S]),l.createElement(U$,{scope:n,state:T,disabled:s},l.createElement(Ke.button,ae({type:"button",role:"checkbox","aria-checked":Nr(T)?"mixed":T,"aria-required":a,"data-state":Km(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:h,onKeyDown:Ae(e.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ae(e.onClick,w=>{S(C=>Nr(C)?!0:!C),y&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})})),y&&l.createElement(G$,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),q$="CheckboxIndicator",X$=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Y$(q$,n);return l.createElement(yr,{present:r||Nr(i.state)||i.state===!0},l.createElement(Ke.span,ae({"data-state":Km(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),G$=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});c.indeterminate=Nr(n),f.call(c,Nr(n)?!1:n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:Nr(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Nr(e){return e==="indeterminate"}function Km(e){return Nr(e)?"indeterminate":e?"checked":"unchecked"}const Z$=K$,Q$=X$;var J$="glci2q0",jh="glci2q3",eT="glci2q4",Lh={disabled:"glci2q1",enabled:"glci2q2"},tT=wt({defaultClassName:"glci2q5",variantClassNames:{checked:{true:"glci2q6",false:"glci2q7",indeterminate:"glci2q8"},disabled:{true:"glci2q9"}},defaultVariants:{checked:!1,disabled:!1},compoundVariants:[[{checked:!1,disabled:!0},"glci2qa"]]});const qm=l.forwardRef(({children:e,"data-test-id":t,checked:n=!1,onCheckedChange:r,disabled:o,value:i,...a},s)=>{const c=`vds-checkbox-${l.useId()}`,[u,d]=l.useState(n);return l.useEffect(()=>{d(n)},[n]),j.jsxs("div",{className:J$,children:[j.jsx(Z$,{id:c,disabled:o,"data-test-id":t,ref:s,value:u?"on":"off",checked:u,className:tT({checked:u,disabled:o}),onCheckedChange:f=>{typeof f=="boolean"&&(r?r(f):d(f))},...a,children:j.jsxs(Q$,{className:eT,children:[u==="indeterminate"&&j.jsx(_0,{color:"white",className:jh}),u===!0&&j.jsx(wu,{color:"white",className:jh})]})}),e&&j.jsx("label",{htmlFor:c,className:o?Lh.disabled:Lh.enabled,children:e})]})});qm.defaultProps={"data-test-id":"base"};const nT=e=>l.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var rT=wt({defaultClassName:"_5046e70",variantClassNames:{variant:{filled:"_5046e71",outline:"_5046e72"},isActive:{true:"_5046e73"},isFluid:{true:"_5046e74"}},defaultVariants:{variant:"filled",isActive:!1},compoundVariants:[[{isActive:!0,variant:"outline"},"_5046e75"]]}),oT="_5046e76";const sl=l.forwardRef(({as:e,children:t,variant:n,isActive:r,isFilter:o,prefixIcon:i,withCloseButton:a,className:s,disabled:c,style:u,...d},f)=>{const m=e||"button";return j.jsxs(m,{ref:f,as:e,"data-test-id":d["data-test-id"],className:Pe(rT({variant:n,isActive:r}),s),disabled:c,style:u,...d,children:[i&&i,o&&!i&&j.jsx(E0,{style:{marginRight:8},size:16,color:"inherit"}),t,a&&j.jsx(xo,{"data-test-id":"chips-close-button",className:oT,isDisabled:c})]})});sl.defaultProps={as:"button",children:void 0,isActive:!1,isFilter:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0};sl.displayName="Chips";const Xm="Dialog",[Gm,SP]=mn(Xm),[iT,wr]=Gm(Xm),aT=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=l.useRef(null),c=l.useRef(null),[u=!1,d]=Sn({prop:r,defaultProp:o,onChange:i});return l.createElement(iT,{scope:t,triggerRef:s,contentRef:c,contentId:Xn(),titleId:Xn(),descriptionId:Xn(),open:u,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(f=>!f),[d]),modal:a},n)},sT="DialogTrigger",cT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(sT,n),i=st(t,o.triggerRef);return l.createElement(Ke.button,ae({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":cl(o.open)},r,{ref:i,onClick:Ae(e.onClick,o.onOpenToggle)}))}),uT="DialogPortal",[CP,Zm]=Gm(uT,{forceMount:void 0}),ou="DialogOverlay",lT=l.forwardRef((e,t)=>{const n=Zm(ou,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(ou,e.__scopeDialog);return i.modal?l.createElement(yr,{present:r||i.open},l.createElement(dT,ae({},o,{ref:t}))):null}),dT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(ou,n);return l.createElement(uv,{as:uo,allowPinchZoom:!0,shards:[o.contentRef]},l.createElement(Ke.div,ae({"data-state":cl(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),xi="DialogContent",fT=l.forwardRef((e,t)=>{const n=Zm(xi,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(xi,e.__scopeDialog);return l.createElement(yr,{present:r||i.open},i.modal?l.createElement(hT,ae({},o,{ref:t})):l.createElement(pT,ae({},o,{ref:t})))}),hT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(null),o=st(t,n.contentRef,r);return l.useEffect(()=>{const i=r.current;if(i)return ev(i)},[]),l.createElement(Qm,ae({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ae(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ae(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ae(e.onFocusOutside,i=>i.preventDefault())}))}),pT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return l.createElement(Qm,ae({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;r.current||(s=n.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=n.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),Qm=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=wr(xi,n),c=l.useRef(null),u=st(t,c);return Ap(),l.createElement(l.Fragment,null,l.createElement(Dp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},l.createElement(is,ae({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":cl(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),vT="DialogClose",mT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(vT,n);return l.createElement(Ke.button,ae({type:"button"},r,{ref:t,onClick:Ae(e.onClick,()=>o.onOpenChange(!1))}))});function cl(e){return e?"open":"closed"}const gT=aT,yT=cT,bT=lT,wT=fT,ET=mT;var xT="_1jc0z8o4",_T="_1jc0z8o0",ST=wt({defaultClassName:"_1jc0z8o7",variantClassNames:{size:{full:"_1jc0z8o8",small:"_1jc0z8o9",medium:"_1jc0z8oa",large:"_1jc0z8ob"},noPadding:{true:"_1jc0z8oc"},colorScheme:{primary:"_1jc0z8od",neutral:"_1jc0z8oe",danger:"_1jc0z8of",warning:"_1jc0z8og",info:"_1jc0z8oh",white:"_1jc0z8oi"}},defaultVariants:{size:"medium",noPadding:!1,colorScheme:"white"},compoundVariants:[]}),CT="_1jc0z8o1",$T=wt({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),TT=wt({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const IT=l.forwardRef(({children:e,className:t,...n},r)=>j.jsx(wT,{className:t,ref:r,...n,children:e})),RT=l.forwardRef(({children:e,className:t,...n},r)=>j.jsx(bT,{className:t,ref:r,...n,children:e})),OT=({children:e,className:t,...n})=>j.jsx(ms,{className:t,...n,children:e}),PT=({children:e,...t})=>j.jsx(gT,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>j.jsx(yT,{className:t,...n,ref:r,children:e}));const Ai=l.forwardRef(({children:e,"data-test-id":t,isOpen:n,onClose:r,size:o,destroyOnClose:i,noPadding:a,colorScheme:s,closeOnOverlayClick:c,closeIcon:u,classNameBody:d,isCloseWhenEscape:f,...m},h)=>!n&&i?null:j.jsx(PT,{open:n,onOpenChange:r,children:j.jsxs(OT,{children:[j.jsx(RT,{className:Pe(TT())}),j.jsxs(IT,{onInteractOutside:b=>!c&&b.preventDefault(),className:Pe(ST({colorScheme:s,size:o,noPadding:a}),d),...m,onEscapeKeyDown:b=>f?r==null?void 0:r():b.preventDefault(),ref:h,children:[r&&!u&&j.jsx(ET,{asChild:!0,"aria-label":"Close",children:j.jsx(xo,{className:xT,"data-test-id":"close-modal"})}),r&&u&&u,e]})]})}));Ai.displayName="Modal";Ai.defaultProps={children:void 0,"data-test-id":void 0,size:"medium",onClose:void 0,destroyOnClose:!1,noPadding:!1,colorScheme:"white",closeOnOverlayClick:!0,closeIcon:void 0,classNameBody:void 0,isCloseWhenEscape:!0};const Is=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return j.jsx(i,{"data-test-id":n,as:e,ref:o,className:_T,...r,children:t})});Is.displayName="modalBody";Is.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Rs=l.forwardRef(({as:e,children:t,"data-test-id":n,...r},o)=>{const i=e||"div";return j.jsx(i,{"data-test-id":n,as:e,className:CT,ref:o,...r,children:t})});Rs.displayName="modalFooter";Rs.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Di=l.forwardRef(({as:e,bold:t,children:n,"data-test-id":r,...o},i)=>{const a=e||"div";return j.jsx(a,{"data-test-id":r,as:e,ref:i,className:$T({bold:t}),...o,children:j.jsx(sn,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Di.displayName="modalHeader";Di.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};const ul=({isOpen:e,onConfirm:t,onCancel:n,message:r,title:o,confirmTestId:i,isLoading:a,confirmText:s="Confirm",cancelText:c="Cancel",closeOnOverlayClick:u,size:d,classNameBody:f})=>j.jsxs(Ai,{classNameBody:f,size:d,isOpen:e,closeOnOverlayClick:u,onClose:n,closeIcon:j.jsx(et,{display:"none"}),children:[j.jsx(Di,{children:o}),j.jsx(Is,{children:j.jsx(sn,{mt:"$8",mb:"$24",textStyle:"body2",children:r})}),j.jsx(Rs,{children:j.jsxs(Yt,{gap:"$16",justifyContent:"space-between",children:[j.jsx(vo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),j.jsx(vo,{"data-test-id":i,onClick:t,isLoading:a,isFluid:!0,children:s})]})})]});ul.defaultProps={message:void 0,cancelText:void 0,confirmText:void 0,confirmTestId:void 0,isLoading:void 0,closeOnOverlayClick:!0,size:"small",classNameBody:void 0};const ll=l.createContext({}),AT=({children:e})=>{const[t,n]=l.useState(!1),[r,o]=l.useState(void 0),i=()=>{n(!1),o(void 0)},a=()=>{i(),r!=null&&r.actionCallback(!0)},s=()=>{i(),r!=null&&r.actionCallback(!1)},c=l.useMemo(()=>({openDialog:({title:d,message:f,confirmText:m,cancelText:h,actionCallback:b,confirmTestId:y,size:T,isLoading:S,closeOnOverlayClick:v,classNameBody:w})=>{n(!0),o({title:d,message:f,confirmText:m,cancelText:h,confirmTestId:y,size:T,isLoading:S,actionCallback:b,closeOnOverlayClick:v,classNameBody:w})}}),[n,o]);return j.jsxs(ll.Provider,{value:c,children:[j.jsx(ul,{title:(r==null?void 0:r.title)??"",message:(r==null?void 0:r.message)??"",confirmText:r==null?void 0:r.confirmText,cancelText:r==null?void 0:r.cancelText,isOpen:t,confirmTestId:r==null?void 0:r.confirmTestId,isLoading:r==null?void 0:r.isLoading,onConfirm:a,onCancel:s,size:r==null?void 0:r.size,closeOnOverlayClick:r==null?void 0:r.closeOnOverlayClick}),e]})},DT=()=>{const{openDialog:e}=l.useContext(ll);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}},dl=({children:e,isDisabled:t,className:n})=>j.jsx("div",{className:Pe(bE({isDisabled:t}),n),children:e});dl.displayName="ActionIcon";dl.defaultProps={isDisabled:!1,className:void 0};const Ni=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o},i)=>j.jsxs("label",{ref:i,className:TE({state:Pu({isError:e,isDisabled:t}),isTextarea:r}),children:[o,n&&"*"]}));Ni.displayName="Label";Ni.defaultProps={isTextarea:!1};const fl=l.forwardRef(({value:e,type:t,label:n,onClear:r,onBlur:o,isLoading:i,icon:a,isClearable:s=!0,required:c,containerStyles:u,...d},f)=>{const{addonLeft:m,addonRight:h,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:w,elementLeft:C,elementRight:I,className:D,...P}=d,F=!!a,k=l.useRef(null);l.useImperativeHandle(f,()=>k.current);const[H,R]=l.useState(!1),[E,p]=l.useState(!1),$=M=>{if(H){const z=k.current;z&&z.focus(),E&&(R(!1),p(!1))}else o==null||o(M)},A=()=>{const M=k.current;M&&M.focus(),E&&(R(!1),p(!1))};return l.useEffect(()=>{E&&R(!0)},[E]),j.jsxs(bo,{addonLeft:m,addonRight:h,elementLeft:C,elementRight:I,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:w,className:u,inputAreaClassName:SE,children:[j.jsx("input",{ref:k,type:t,className:Pe(_E,D),value:e,disabled:v,"data-test-id":d["data-test-id"],required:c,onBlur:$,...P}),j.jsx(Ni,{isError:T,isDisabled:v,required:c,children:n}),j.jsx("div",{className:Pe(CE),"data-test-id":"icon-input-area",onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onTouchStart:()=>p(!0),onClick:A,"aria-hidden":"true",children:j.jsxs(dl,{isDisabled:v,className:Pe(s&&!i&&!F&&xE),children:[F&&!i&&a,s&&!i&&!F&&j.jsx(os,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),i&&j.jsx(_o,{color:Rt.theme.colors.green1})]})})]})});fl.displayName="Input";fl.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0};const hl=l.forwardRef(({value:e,label:t,rows:n=4,required:r,containerStyles:o,...i},a)=>{const{helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,...h}=i,b=l.useRef(null);l.useImperativeHandle(a,()=>b.current);const y=()=>{var T;(T=b.current)==null||T.focus()};return j.jsxs(bo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,className:Pe(vf,o),onClick:y,children:[j.jsx("textarea",{ref:b,className:Pe(vf),value:e,rows:n,disabled:f,"data-test-id":i["data-test-id"],required:r,...h}),j.jsx(Ni,{isTextarea:!0,isError:u,isDisabled:f,required:r,children:t})]})});hl.displayName="Textarea";hl.defaultProps={containerStyles:void 0,"data-test-id":void 0};var NT=wt({defaultClassName:"_1n7m27n0",variantClassNames:{colorScheme:{primary:"_1n7m27n1",neutral:"_1n7m27n2",danger:"_1n7m27n3",warning:"_1n7m27n4",info:"_1n7m27n5"},variant:{solid:"_1n7m27n6",outline:"_1n7m27n7"},unstyled:{true:"_1n7m27n8"}},defaultVariants:{variant:"solid",colorScheme:"primary"},compoundVariants:[[{colorScheme:"primary",variant:"outline"},"_1n7m27n9"],[{colorScheme:"neutral",variant:"outline"},"_1n7m27na"],[{colorScheme:"danger",variant:"outline"},"_1n7m27nb"],[{colorScheme:"warning",variant:"outline"},"_1n7m27nc"],[{colorScheme:"info",variant:"outline"},"_1n7m27nd"]]}),Fh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const pl=l.forwardRef(({as:e,className:t,style:n,colorScheme:r,icon:o,unstyled:i,variant:a,isDisabled:s,isLoading:c,...u},d)=>{const f=l.useRef(null),m=al({ref:f,colorScheme:r,variant:a});l.useImperativeHandle(d,()=>f.current);const h=e||"button";return j.jsx(h,{ref:f,as:e,"data-test-id":u["data-test-id"],className:Pe(NT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?j.jsx(_o,{color:a==="outline"?Fh[r||"primary"]:Fh.white}):j.jsxs(j.Fragment,{children:[m,o]})})});pl.displayName="Button";pl.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var kT=wt({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const MT=({width:e=140,height:t=140,viewBox:n="0 0 140 140",...r})=>j.jsx("svg",{"data-test-id":"illustration-fallback-image",width:e,height:t,viewBox:n,fill:"none",...r,children:j.jsx("path",{d:"M85.604 0H0V140H130V43.7197L85.604 0ZM119.088 129.24H10.9305V93.2855L23.0998 101.606L48.3128 71.9816L70.6656 103.991L83.7094 86.5608L106.062 92.0123L87.2618 70.7801L71.7769 89.1789L50.5353 52.3812L22.8812 79.3877L10.9305 68.1798V10.7596H80.9767V48.0594H118.96L119.07 48.167V129.24H119.088Z",fill:"#EEEEEE"})}),vl=l.forwardRef(({as:e,src:t,fit:n,width:r,height:o,loading:i,isLoading:a,fallback:s,onLoad:c,onError:u,className:d,"data-test-id":f,...m},h)=>{const b=e||"img",y=l.useMemo(()=>`${parseInt(`${r??0}`,10)}px`,[r]),T=l.useMemo(()=>`${parseInt(`${o??0}`,10)}px`,[o]),[S,v]=l.useState(!1),[w,C]=l.useState(n),I=P=>{C("fill"),v(!0),u==null||u(P)},D=P=>{v(!1),c==null||c(P)};return a&&!S?j.jsx(et,{bgColor:"$grey2",width:y,height:T}):S?s||j.jsx(MT,{width:y,height:T}):j.jsx(b,{"data-test-id":f,as:"img",width:y,height:T,src:t,loading:i,onLoad:D,onError:I,ref:h,className:Pe(kT({fit:w})),...m})});vl.displayName="Image";vl.defaultProps={as:"img","data-test-id":void 0,fallback:void 0,width:void 0,height:void 0,loading:void 0,isLoading:void 0,onLoad:void 0,onError:void 0,fit:void 0};var jT=wt({defaultClassName:"_5y0pl50",variantClassNames:{textStyle:{heading1:"_5y0pl51",heading2:"_5y0pl52",heading3:"_5y0pl53",heading4:"_5y0pl54",heading5:"_5y0pl55",heading6:"_5y0pl56",subtitle1:"_5y0pl57",subtitle2:"_5y0pl58",body1:"_5y0pl59",body2:"_5y0pl5a",caption:"_5y0pl5b",footer:"_5y0pl5c"},isDisabled:{true:"_5y0pl5d"},variant:{default:"_5y0pl5e",underline:"_5y0pl5f"},isBold:{true:"_5y0pl5g"}},defaultVariants:{variant:"default",isDisabled:!1,isBold:!1,textStyle:"body1"},compoundVariants:[]});const Jm=({children:e,className:t,variant:n,textStyle:r="body2",isDisabled:o,isBold:i,...a})=>j.jsx("a",{className:Pe(t,jT({isDisabled:o,variant:n,textStyle:r,isBold:i})),"data-disabled":o,...a,children:e});var LT="_1cq2k9i0";const ml=l.forwardRef(({children:e,as:t,className:n,...r},o)=>{const i=t||"ul";return j.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Pe(LT,n),...r,children:e})});ml.displayName="List";ml.defaultProps={"data-test-id":void 0,as:"ul"};var FT=wt({defaultClassName:"xw6nfa0",variantClassNames:{hasLink:{false:"xw6nfa1"}},defaultVariants:{hasLink:!1},compoundVariants:[]}),Vh="xw6nfa2",VT="xw6nfa3";const gl=l.forwardRef(({children:e,leftIcon:t,rightIcon:n,href:r,target:o,as:i,className:a,...s},c)=>{const u=i||"li",d=!!r;return j.jsx(u,{"data-test-id":s["data-test-id"],className:Pe(FT({hasLink:d}),a),...s,ref:c,children:r?j.jsxs("a",{href:r,target:o,className:VT,children:[t,j.jsx("div",{className:Vh,children:e}),n]}):j.jsxs(j.Fragment,{children:[t,j.jsx("div",{className:Vh,children:e}),n]})})});gl.displayName="ListItem";gl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li"};var eg={},tg={exports:{}};(function(e,t){(function(r,o){e.exports=o()})(Fy,()=>(()=>{var n=[,(a,s,c)=>{c.r(s),c.d(s,{default:()=>d});var u=(()=>{var f=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(m={}){var h=m,b,y;h.ready=new Promise((_,g)=>{b=_,y=g});function T(){function _(ue){const se=N;O=g=0,N=new Map,se.forEach(de=>{try{de(ue)}catch(le){console.error(le)}}),this.Qa(),q&&q.nb()}let g=0,O=0,N=new Map,q=null,ne=null;this.requestAnimationFrame=function(ue){g||(g=requestAnimationFrame(_.bind(this)));const se=++O;return N.set(se,ue),se},this.cancelAnimationFrame=function(ue){N.delete(ue),g&&N.size==0&&(cancelAnimationFrame(g),g=0)},this.lb=function(ue){ne&&(document.body.remove(ne),ne=null),ue||(ne=document.createElement("div"),ne.style.backgroundColor="black",ne.style.position="fixed",ne.style.right=0,ne.style.top=0,ne.style.color="white",ne.style.padding="4px",ne.innerHTML="RIVE FPS",ue=function(se){ne.innerHTML="RIVE FPS "+se.toFixed(1)},document.body.appendChild(ne)),q=new function(){let se=0,de=0;this.nb=function(){var le=performance.now();de?(++se,le-=de,1e3<le&&(ue(1e3*se/le),se=de=0)):(de=le,se=0)}}},this.ib=function(){ne&&(document.body.remove(ne),ne=null),q=null},this.Qa=function(){}}function S(_){console.assert(!0);const g=new Map;let O=-1/0;this.push=function(N){return N=N+((1<<_)-1)>>_,g.has(N)&&clearTimeout(g.get(N)),g.set(N,setTimeout(function(){g.delete(N),g.length==0?O=-1/0:N==O&&(O=Math.max(...g.keys()),console.assert(O<N))},1e3)),O=Math.max(N,O),O<<_}}const v=new function(){function _(){if(!g){let Et=function(Dt,Ve,Ye){if(Ve=ge.createShader(Ve),ge.shaderSource(Ve,Ye),ge.compileShader(Ve),Ye=ge.getShaderInfoLog(Ve),0<Ye.length)throw Ye;ge.attachShader(Dt,Ve)};var Ce=document.createElement("canvas"),Me={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ge=Ce.getContext("webgl2",Me);if(ge)O=2;else if(ge=Ce.getContext("webgl",Me))O=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;if(N=Math.min(ge.getParameter(ge.MAX_RENDERBUFFER_SIZE),ge.getParameter(ge.MAX_TEXTURE_SIZE)),Ce=ge.createProgram(),Et(Ce,ge.VERTEX_SHADER,`attribute vec2 vertex;
147
147
  attribute vec2 uv;
148
148
  uniform vec4 mat;
149
149
  uniform vec2 translate;
@@ -156,19 +156,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
156
156
  varying vec2 st;
157
157
  void main() {
158
158
  gl_FragColor = texture2D(image, st);
159
- }`),ge.bindAttribLocation(Ce,0,"vertex"),ge.bindAttribLocation(Ce,1,"uv"),ge.linkProgram(Ce),Me=ge.getProgramInfoLog(Ce),0<Me.trim().length)throw Me;q=ge.getUniformLocation(Ce,"mat"),ne=ge.getUniformLocation(Ce,"translate"),ge.useProgram(Ce),ge.bindBuffer(ge.ARRAY_BUFFER,ge.createBuffer()),ge.enableVertexAttribArray(0),ge.enableVertexAttribArray(1),ge.bindBuffer(ge.ELEMENT_ARRAY_BUFFER,ge.createBuffer()),ge.uniform1i(ge.getUniformLocation(Ce,"image"),0),ge.pixelStorei(ge.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),g=ge}return!0}let g=null,O=0,N=0,q=null,ne=null,ue=0,se=0;this.wb=function(){return _(),N},this.gb=function(Ce){if(!_())return null;const Me=g.createTexture();return g.bindTexture(g.TEXTURE_2D,Me),g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,Ce),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.LINEAR),O==2?(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR_MIPMAP_LINEAR),g.generateMipmap(g.TEXTURE_2D)):g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR),Me};const de=new S(8),le=new S(8),me=new S(10),Se=new S(10);this.kb=function(Ce,Me,ge,Et,Dt){if(_()){var Ve=de.push(Ce),Ye=le.push(Me);(g.canvas.width!=Ve||g.canvas.height!=Ye)&&(g.canvas.width=Ve,g.canvas.height=Ye),g.viewport(0,Ye-Me,Ce,Me),g.disable(g.SCISSOR_TEST),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),g.enable(g.SCISSOR_TEST),ge.sort((Je,or)=>or.Ua-Je.Ua),Ve=me.push(Et),ue!=Ve&&(g.bufferData(g.ARRAY_BUFFER,8*Ve,g.DYNAMIC_DRAW),ue=Ve),Ve=0;for(var Nt of ge)g.bufferSubData(g.ARRAY_BUFFER,Ve,Nt.Da),Ve+=4*Nt.Da.length;console.assert(Ve==4*Et);for(var ln of ge)g.bufferSubData(g.ARRAY_BUFFER,Ve,ln.Xa),Ve+=4*ln.Xa.length;console.assert(Ve==8*Et),Ve=Se.push(Dt),se!=Ve&&(g.bufferData(g.ELEMENT_ARRAY_BUFFER,2*Ve,g.DYNAMIC_DRAW),se=Ve),Nt=0;for(var zn of ge)g.bufferSubData(g.ELEMENT_ARRAY_BUFFER,Nt,zn.indices),Nt+=2*zn.indices.length;console.assert(Nt==2*Dt),zn=0,ln=!0,Ve=Nt=0;for(const Je of ge){Je.image.za!=zn&&(g.bindTexture(g.TEXTURE_2D,Je.image.cb||null),zn=Je.image.za),Je.zb?(g.scissor(Je.Ia,Ye-Je.Ja-Je.Pa,Je.Gb,Je.Pa),ln=!0):ln&&(g.scissor(0,Ye-Me,Ce,Me),ln=!1),ge=2/Ce;const or=-2/Me;g.uniform4f(q,Je.oa[0]*ge*Je.va,Je.oa[1]*or*Je.wa,Je.oa[2]*ge*Je.va,Je.oa[3]*or*Je.wa),g.uniform2f(ne,Je.oa[4]*ge*Je.va+ge*(Je.Ia-Je.xb*Je.va)-1,Je.oa[5]*or*Je.wa+or*(Je.Ja-Je.yb*Je.wa)+1),g.vertexAttribPointer(0,2,g.FLOAT,!1,0,Ve),g.vertexAttribPointer(1,2,g.FLOAT,!1,0,Ve+4*Et),g.drawElements(g.TRIANGLES,Je.indices.length,g.UNSIGNED_SHORT,Nt),Ve+=4*Je.Da.length,Nt+=2*Je.indices.length}console.assert(Ve==4*Et),console.assert(Nt==2*Dt)}},this.canvas=function(){return _()&&g.canvas}};h.onRuntimeInitialized=function(){function _(pe){switch(pe){case le.srcOver:return"source-over";case le.screen:return"screen";case le.overlay:return"overlay";case le.darken:return"darken";case le.lighten:return"lighten";case le.colorDodge:return"color-dodge";case le.colorBurn:return"color-burn";case le.hardLight:return"hard-light";case le.softLight:return"soft-light";case le.difference:return"difference";case le.exclusion:return"exclusion";case le.multiply:return"multiply";case le.hue:return"hue";case le.saturation:return"saturation";case le.color:return"color";case le.luminosity:return"luminosity"}}function g(pe){return"rgba("+((16711680&pe)>>>16)+","+((65280&pe)>>>8)+","+((255&pe)>>>0)+","+((4278190080&pe)>>>24)/255+")"}function O(){0<Nt.length&&(v.kb(Ye.drawWidth(),Ye.drawHeight(),Nt,ln,zn),Nt=[],zn=ln=0,Ye.reset(512,512));for(const pe of Ve){for(const ke of pe.da)ke();pe.da=[]}Ve.clear()}var N=h.RenderPaintStyle;const q=h.RenderPath,ne=h.RenderPaint,ue=h.Renderer,se=h.StrokeCap,de=h.StrokeJoin,le=h.BlendMode,me=N.fill,Se=N.stroke,Ce=h.FillRule.evenOdd;let Me=1;var ge=h.RenderImage.extend("CanvasRenderImage",{__construct:function(){this.__parent.__construct.call(this),this.za=Me,Me=Me+1&2147483647||1},decode:function(pe){let ke=Bs;ke.total++;var pt=this,ut=new Image;ut.src=URL.createObjectURL(new Blob([pe],{type:"image/png"})),ut.onload=function(){if(pt.ab=ut,pt.cb=v.gb(ut),pt.size(ut.width,ut.height),ke.loaded++,ke.loaded===ke.total){const vt=ke.ready;vt&&(vt(),ke.ready=null)}}}}),Et=q.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.ia=new Path2D},rewind:function(){this.ia=new Path2D},addPath:function(pe,ke,pt,ut,vt,$t,rt){var dt=this.ia,bn=dt.addPath;pe=pe.ia;const Ft=new DOMMatrix;Ft.a=ke,Ft.b=pt,Ft.c=ut,Ft.d=vt,Ft.e=$t,Ft.f=rt,bn.call(dt,pe,Ft)},fillRule:function(pe){this.Ga=pe},moveTo:function(pe,ke){this.ia.moveTo(pe,ke)},lineTo:function(pe,ke){this.ia.lineTo(pe,ke)},cubicTo:function(pe,ke,pt,ut,vt,$t){this.ia.bezierCurveTo(pe,ke,pt,ut,vt,$t)},close:function(){this.ia.closePath()}}),Dt=ne.extend("CanvasRenderPaint",{color:function(pe){this.Ha=g(pe)},thickness:function(pe){this.eb=pe},join:function(pe){switch(pe){case de.miter:this.ya="miter";break;case de.round:this.ya="round";break;case de.bevel:this.ya="bevel"}},cap:function(pe){switch(pe){case se.butt:this.xa="butt";break;case se.round:this.xa="round";break;case se.square:this.xa="square"}},style:function(pe){this.bb=pe},blendMode:function(pe){this.$a=_(pe)},clearGradient:function(){this.qa=null},linearGradient:function(pe,ke,pt,ut){this.qa={Va:pe,Wa:ke,La:pt,Ma:ut,Ca:[]}},radialGradient:function(pe,ke,pt,ut){this.qa={Va:pe,Wa:ke,La:pt,Ma:ut,Ca:[],ub:!0}},addStop:function(pe,ke){this.qa.Ca.push({color:pe,stop:ke})},completeGradient:function(){},draw:function(pe,ke,pt){let ut=this.bb;var vt=this.Ha,$t=this.qa;if(pe.globalCompositeOperation=this.$a,$t!=null){vt=$t.Va;var rt=$t.Wa;const bn=$t.La;var dt=$t.Ma;const Ft=$t.Ca;$t.ub?($t=bn-vt,dt-=rt,vt=pe.createRadialGradient(vt,rt,0,vt,rt,Math.sqrt($t*$t+dt*dt))):vt=pe.createLinearGradient(vt,rt,bn,dt);for(let Mn=0,Bt=Ft.length;Mn<Bt;Mn++)rt=Ft[Mn],vt.addColorStop(rt.stop,g(rt.color));this.Ha=vt,this.qa=null}switch(ut){case Se:pe.strokeStyle=vt,pe.lineWidth=this.eb,pe.lineCap=this.xa,pe.lineJoin=this.ya,pe.stroke(ke);break;case me:pe.fillStyle=vt,pe.fill(ke,pt)}}});const Ve=new Set;let Ye=null,Nt=[],ln=0,zn=0;var Je=h.CanvasRenderer=ue.extend("Renderer",{__construct:function(pe){this.__parent.__construct.call(this),this.ha=[1,0,0,1,0,0],this.ba=pe.getContext("2d"),this.Fa=pe,this.da=[]},save:function(){this.ha.push(...this.ha.slice(this.ha.length-6)),this.da.push(this.ba.save.bind(this.ba))},restore:function(){const pe=this.ha.length-6;if(6>pe)throw"restore() called without matching save().";this.ha.splice(pe),this.da.push(this.ba.restore.bind(this.ba))},transform:function(pe,ke,pt,ut,vt,$t){const rt=this.ha,dt=rt.length-6;rt.splice(dt,6,rt[dt]*pe+rt[dt+2]*ke,rt[dt+1]*pe+rt[dt+3]*ke,rt[dt]*pt+rt[dt+2]*ut,rt[dt+1]*pt+rt[dt+3]*ut,rt[dt]*vt+rt[dt+2]*$t+rt[dt+4],rt[dt+1]*vt+rt[dt+3]*$t+rt[dt+5]),this.da.push(this.ba.transform.bind(this.ba,pe,ke,pt,ut,vt,$t))},rotate:function(pe){const ke=Math.sin(pe);pe=Math.cos(pe),this.transform(pe,ke,-ke,pe,0,0)},_drawPath:function(pe,ke){this.da.push(ke.draw.bind(ke,this.ba,pe.ia,pe.Ga===Ce?"evenodd":"nonzero"))},drawImage:function(pe,...ke){var pt=this.ba;this.da.push(function(){pt.drawImage(pe,...ke)})},_drawRiveImage:function(pe,ke,pt){var ut=pe.ab;if(ut){var vt=this.ba,$t=_(ke);this.da.push(function(){vt.globalCompositeOperation=$t,vt.globalAlpha=pt,vt.drawImage(ut,0,0),vt.globalAlpha=1})}},_getMatrix:function(pe){const ke=this.ha,pt=ke.length-6;for(let ut=0;6>ut;++ut)pe[ut]=ke[pt+ut]},_drawImageMesh:function(pe,ke,pt,ut,vt,$t,rt,dt,bn,Ft){var Mn=this.ba.canvas.width,Bt=this.ba.canvas.height;const Cd=bn-rt,$d=Ft-dt;rt=Math.max(rt,0),dt=Math.max(dt,0),bn=Math.min(bn,Mn),Ft=Math.min(Ft,Bt);const So=bn-rt,Co=Ft-dt;if(console.assert(So<=Math.min(Cd,Mn)),console.assert(Co<=Math.min($d,Bt)),!(0>=So||0>=Co)){bn=So<Cd||Co<$d,Mn=Ft=1;var xr=Math.ceil(So*Ft),_r=Math.ceil(Co*Mn);Bt=v.wb(),xr>Bt&&(Ft*=Bt/xr,xr=Bt),_r>Bt&&(Mn*=Bt/_r,_r=Bt),Ye||(Ye=new h.DynamicRectanizer(Bt),Ye.reset(512,512)),Bt=Ye.addRect(xr,_r),0>Bt&&(O(),Ve.add(this),Bt=Ye.addRect(xr,_r),console.assert(0<=Bt));var Td=Bt&65535,Id=Bt>>16;Nt.push({oa:this.ha.slice(this.ha.length-6),image:pe,Ia:Td,Ja:Id,xb:rt,yb:dt,Gb:xr,Pa:_r,va:Ft,wa:Mn,Da:new Float32Array(ut),Xa:new Float32Array(vt),indices:new Uint16Array($t),zb:bn,Ua:pe.za<<1|(bn?1:0)}),ln+=ut.length,zn+=$t.length;var Hr=this.ba,My=_(ke);this.da.push(function(){Hr.save(),Hr.resetTransform(),Hr.globalCompositeOperation=My,Hr.globalAlpha=pt,Hr.drawImage(v.canvas(),Td,Id,xr,_r,rt,dt,So,Co),Hr.restore()})}},_clipPath:function(pe){this.da.push(this.ba.clip.bind(this.ba,pe.ia,pe.Ga===Ce?"evenodd":"nonzero"))},clear:function(){Ve.add(this),this.da.push(this.ba.clearRect.bind(this.ba,0,0,this.Fa.width,this.Fa.height))},flush:function(){},translate:function(pe,ke){this.transform(1,0,0,1,pe,ke)}});h.makeRenderer=function(pe){return new Je(pe)},h.renderFactory={makeRenderPaint:function(){return new Dt},makeRenderPath:function(){return new Et},makeRenderImage:function(){return new ge}};let or=h.load,Bs=null;h.load=function(pe){return new Promise(function(ke){let pt=null;Bs={total:0,loaded:0,ready:function(){ke(pt)}},pt=or(pe),Bs.total==0&&ke(pt)})},N=new T,h.requestAnimationFrame=N.requestAnimationFrame.bind(N),h.cancelAnimationFrame=N.cancelAnimationFrame.bind(N),h.enableFPSCounter=N.lb.bind(N),h.disableFPSCounter=N.ib,N.Qa=O,h.cleanup=function(){Ye&&Ye.delete()}};var w=Object.assign({},h),C="./this.program",I=typeof window=="object",D=typeof importScripts=="function",P="",F,k;(I||D)&&(D?P=self.location.href:typeof document<"u"&&document.currentScript&&(P=document.currentScript.src),f&&(P=f),P.indexOf("blob:")!==0?P=P.substr(0,P.replace(/[?#].*/,"").lastIndexOf("/")+1):P="",D&&(k=_=>{var g=new XMLHttpRequest;return g.open("GET",_,!1),g.responseType="arraybuffer",g.send(null),new Uint8Array(g.response)}),F=(_,g,O)=>{var N=new XMLHttpRequest;N.open("GET",_,!0),N.responseType="arraybuffer",N.onload=()=>{N.status==200||N.status==0&&N.response?g(N.response):O()},N.onerror=O,N.send(null)});var H=h.print||console.log.bind(console),R=h.printErr||console.error.bind(console);Object.assign(h,w),w=null,h.thisProgram&&(C=h.thisProgram);var E;h.wasmBinary&&(E=h.wasmBinary),h.noExitRuntime,typeof WebAssembly!="object"&&ie("no native wasm support detected");var p,$=!1,A,M,z,U,re,B,L,oe;function G(){var _=p.buffer;h.HEAP8=A=new Int8Array(_),h.HEAP16=z=new Int16Array(_),h.HEAP32=re=new Int32Array(_),h.HEAPU8=M=new Uint8Array(_),h.HEAPU16=U=new Uint16Array(_),h.HEAPU32=B=new Uint32Array(_),h.HEAPF32=L=new Float32Array(_),h.HEAPF64=oe=new Float64Array(_)}var K,Z=[],ce=[],W=[];function Y(){var _=h.preRun.shift();Z.unshift(_)}var te=0,J=null;function ie(_){throw h.onAbort&&h.onAbort(_),_="Aborted("+_+")",R(_),$=!0,_=new WebAssembly.RuntimeError(_+". Build with -sASSERTIONS for more info."),y(_),_}function ee(_){return _.startsWith("data:application/octet-stream;base64,")}var we;if(we="canvas_advanced.wasm",!ee(we)){var Te=we;we=h.locateFile?h.locateFile(Te,P):P+Te}function Oe(_){if(_==we&&E)return new Uint8Array(E);if(k)return k(_);throw"both async and sync fetching of the wasm failed"}function Ne(_){if(!E&&(I||D)){if(typeof fetch=="function"&&!_.startsWith("file://"))return fetch(_,{credentials:"same-origin"}).then(g=>{if(!g.ok)throw"failed to load wasm binary file at '"+_+"'";return g.arrayBuffer()}).catch(()=>Oe(_));if(F)return new Promise((g,O)=>{F(_,N=>g(new Uint8Array(N)),O)})}return Promise.resolve().then(()=>Oe(_))}function Re(_,g,O){return Ne(_).then(N=>WebAssembly.instantiate(N,g)).then(N=>N).then(O,N=>{R("failed to asynchronously prepare wasm: "+N),ie(N)})}function We(_,g){var O=we;return E||typeof WebAssembly.instantiateStreaming!="function"||ee(O)||O.startsWith("file://")||typeof fetch!="function"?Re(O,_,g):fetch(O,{credentials:"same-origin"}).then(N=>WebAssembly.instantiateStreaming(N,_).then(g,function(q){return R("wasm streaming compile failed: "+q),R("falling back to ArrayBuffer instantiation"),Re(O,_,g)}))}var De=_=>{for(;0<_.length;)_.shift()(h)};function ot(_){if(_===void 0)return"_unknown";_=_.replace(/[^a-zA-Z0-9_]/g,"$");var g=_.charCodeAt(0);return 48<=g&&57>=g?`_${_}`:_}function ze(_,g){return _=ot(_),{[_]:function(){return g.apply(this,arguments)}}[_]}function xt(){this.ja=[void 0],this.Oa=[]}var Xe=new xt,Pt=void 0;function xe(_){throw new Pt(_)}var ct=_=>(_||xe("Cannot use deleted val. handle = "+_),Xe.get(_).value),je=_=>{switch(_){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Xe.Ya({Ta:1,value:_})}};function Zt(_){var g=Error,O=ze(_,function(N){this.name=_,this.message=N,N=Error(N).stack,N!==void 0&&(this.stack=this.toString()+`
160
- `+N.replace(/^Error(:[^\n]*)?\n/,""))});return O.prototype=Object.create(g.prototype),O.prototype.constructor=O,O.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},O}var Ct=void 0,tt=void 0;function Fe(_){for(var g="";M[_];)g+=tt[M[_++]];return g}var mt=[];function nn(){for(;mt.length;){var _=mt.pop();_.W.na=!1,_.delete()}}var rn=void 0,Qt={};function he(_,g){for(g===void 0&&xe("ptr should not be undefined");_.$;)g=_.ra(g),_=_.$;return g}var Ue={};function kt(_){_=_d(_);var g=Fe(_);return Wn(_),g}function At(_,g){var O=Ue[_];return O===void 0&&xe(g+" has unknown type "+kt(_)),O}function Jt(){}var Ot=!1;function yn(_){--_.count.value,_.count.value===0&&(_.ca?_.fa.ka(_.ca):_.Z.X.ka(_.Y))}function Lt(_,g,O){return g===O?_:O.$===void 0?null:(_=Lt(_,g,O.$),_===null?null:O.jb(_))}var Dn={};function tr(_,g){return g=he(_,g),Qt[g]}var un=void 0;function $n(_){throw new un(_)}function Ht(_,g){return g.Z&&g.Y||$n("makeClassHandle requires ptr and ptrType"),!!g.fa!=!!g.ca&&$n("Both smartPtrType and smartPtr must be specified"),g.count={value:1},en(Object.create(_,{W:{value:g}}))}function en(_){return typeof FinalizationRegistry>"u"?(en=g=>g,_):(Ot=new FinalizationRegistry(g=>{yn(g.W)}),en=g=>{var O=g.W;return O.ca&&Ot.register(g,{W:O},g),g},Jt=g=>{Ot.unregister(g)},en(_))}var Nn={};function Kt(_){for(;_.length;){var g=_.pop();_.pop()(g)}}function Tn(_){return this.fromWireType(re[_>>2])}var kn={},nr={};function Wt(_,g,O){function N(se){se=O(se),se.length!==_.length&&$n("Mismatched type converter count");for(var de=0;de<_.length;++de)V(_[de],se[de])}_.forEach(function(se){nr[se]=g});var q=Array(g.length),ne=[],ue=0;g.forEach((se,de)=>{Ue.hasOwnProperty(se)?q[de]=Ue[se]:(ne.push(se),kn.hasOwnProperty(se)||(kn[se]=[]),kn[se].push(()=>{q[de]=Ue[se],++ue,ue===ne.length&&N(q)}))}),ne.length===0&&N(q)}function rr(_){switch(_){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${_}`)}}function x(_,g,O={}){var N=g.name;if(_||xe(`type "${N}" must have a positive integer typeid pointer`),Ue.hasOwnProperty(_)){if(O.tb)return;xe(`Cannot register type '${N}' twice`)}Ue[_]=g,delete nr[_],kn.hasOwnProperty(_)&&(g=kn[_],delete kn[_],g.forEach(q=>q()))}function V(_,g,O={}){if(!("argPackAdvance"in g))throw new TypeError("registerType registeredInstance requires argPackAdvance");x(_,g,O)}function Q(_){xe(_.W.Z.X.name+" instance already deleted")}function fe(){}function _e(_,g,O){if(_[g].aa===void 0){var N=_[g];_[g]=function(){return _[g].aa.hasOwnProperty(arguments.length)||xe(`Function '${O}' called with an invalid number of arguments (${arguments.length}) - expects one of (${_[g].aa})!`),_[g].aa[arguments.length].apply(this,arguments)},_[g].aa=[],_[g].aa[N.ma]=N}}function Ie(_,g,O){h.hasOwnProperty(_)?((O===void 0||h[_].aa!==void 0&&h[_].aa[O]!==void 0)&&xe(`Cannot register public name '${_}' twice`),_e(h,_,_),h.hasOwnProperty(O)&&xe(`Cannot register multiple overloads of a function with the same number of arguments (${O})!`),h[_].aa[O]=g):(h[_]=g,O!==void 0&&(h[_].Hb=O))}function Ee(_,g,O,N,q,ne,ue,se){this.name=_,this.constructor=g,this.ga=O,this.ka=N,this.$=q,this.ob=ne,this.ra=ue,this.jb=se,this.Ra=[]}function be(_,g,O){for(;g!==O;)g.ra||xe(`Expected null or instance of ${O.name}, got an instance of ${g.name}`),_=g.ra(_),g=g.$;return _}function nt(_,g){return g===null?(this.Aa&&xe(`null is not a valid ${this.name}`),0):(g.W||xe(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||xe(`Cannot pass deleted object as a pointer of type ${this.name}`),be(g.W.Y,g.W.Z.X,this.X))}function Le(_,g){if(g===null){if(this.Aa&&xe(`null is not a valid ${this.name}`),this.ua){var O=this.Ba();return _!==null&&_.push(this.ka,O),O}return 0}if(g.W||xe(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||xe(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.ta&&g.W.Z.ta&&xe(`Cannot convert argument of type ${g.W.fa?g.W.fa.name:g.W.Z.name} to parameter type ${this.name}`),O=be(g.W.Y,g.W.Z.X,this.X),this.ua)switch(g.W.ca===void 0&&xe("Passing raw pointer to smart pointer is illegal"),this.Fb){case 0:g.W.fa===this?O=g.W.ca:xe(`Cannot convert argument of type ${g.W.fa?g.W.fa.name:g.W.Z.name} to parameter type ${this.name}`);break;case 1:O=g.W.ca;break;case 2:if(g.W.fa===this)O=g.W.ca;else{var N=g.clone();O=this.Bb(O,je(function(){N.delete()})),_!==null&&_.push(this.ka,O)}break;default:xe("Unsupporting sharing policy")}return O}function Be(_,g){return g===null?(this.Aa&&xe(`null is not a valid ${this.name}`),0):(g.W||xe(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||xe(`Cannot pass deleted object as a pointer of type ${this.name}`),g.W.Z.ta&&xe(`Cannot convert argument of type ${g.W.Z.name} to parameter type ${this.name}`),be(g.W.Y,g.W.Z.X,this.X))}function Ge(_,g,O,N){this.name=_,this.X=g,this.Aa=O,this.ta=N,this.ua=!1,this.ka=this.Bb=this.Ba=this.Sa=this.Fb=this.Ab=void 0,g.$!==void 0?this.toWireType=Le:(this.toWireType=N?nt:Be,this.ea=null)}function qt(_,g,O){h.hasOwnProperty(_)||$n("Replacing nonexistant public symbol"),h[_].aa!==void 0&&O!==void 0?h[_].aa[O]=g:(h[_]=g,h[_].ma=O)}var Er=(_,g)=>{var O=[];return function(){if(O.length=0,Object.assign(O,arguments),_.includes("j")){var N=h["dynCall_"+_];N=O&&O.length?N.apply(null,[g].concat(O)):N.call(null,g)}else N=K.get(g).apply(null,O);return N}};function qe(_,g){_=Fe(_);var O=_.includes("j")?Er(_,g):K.get(g);return typeof O!="function"&&xe(`unknown function pointer with signature ${_}: ${g}`),O}var vd=void 0;function Hn(_,g){function O(ne){q[ne]||Ue[ne]||(nr[ne]?nr[ne].forEach(O):(N.push(ne),q[ne]=!0))}var N=[],q={};throw g.forEach(O),new vd(`${_}: `+N.map(kt).join([", "]))}function ki(_,g,O,N,q){var ne=g.length;2>ne&&xe("argTypes array size mismatch! Must at least get return value and 'this' types!");var ue=g[1]!==null&&O!==null,se=!1;for(O=1;O<g.length;++O)if(g[O]!==null&&g[O].ea===void 0){se=!0;break}var de=g[0].name!=="void",le=ne-2,me=Array(le),Se=[],Ce=[];return function(){if(arguments.length!==le&&xe(`function ${_} called with ${arguments.length} arguments, expected ${le} args!`),Ce.length=0,Se.length=ue?2:1,Se[0]=q,ue){var Me=g[1].toWireType(Ce,this);Se[1]=Me}for(var ge=0;ge<le;++ge)me[ge]=g[ge+2].toWireType(Ce,arguments[ge]),Se.push(me[ge]);if(ge=N.apply(null,Se),se)Kt(Ce);else for(var Et=ue?1:2;Et<g.length;Et++){var Dt=Et===1?Me:me[Et-2];g[Et].ea!==null&&g[Et].ea(Dt)}return Me=de?g[0].fromWireType(ge):void 0,Me}}function Mi(_,g){for(var O=[],N=0;N<_;N++)O.push(B[g+4*N>>2]);return O}function md(_,g,O){return _ instanceof Object||xe(`${O} with invalid "this": ${_}`),_ instanceof g.X.constructor||xe(`${O} incompatible with "this" of type ${_.constructor.name}`),_.W.Y||xe(`cannot call emscripten binding method ${O} on deleted object`),be(_.W.Y,_.W.Z.X,g.X)}function Ms(_){_>=Xe.Ea&&--Xe.get(_).Ta===0&&Xe.Za(_)}function xy(_,g,O){switch(g){case 0:return function(N){return this.fromWireType((O?A:M)[N])};case 1:return function(N){return this.fromWireType((O?z:U)[N>>1])};case 2:return function(N){return this.fromWireType((O?re:B)[N>>2])};default:throw new TypeError("Unknown integer type: "+_)}}function js(_){if(_===null)return"null";var g=typeof _;return g==="object"||g==="array"||g==="function"?_.toString():""+_}function _y(_,g){switch(g){case 2:return function(O){return this.fromWireType(L[O>>2])};case 3:return function(O){return this.fromWireType(oe[O>>3])};default:throw new TypeError("Unknown float type: "+_)}}function Sy(_,g,O){switch(g){case 0:return O?function(N){return A[N]}:function(N){return M[N]};case 1:return O?function(N){return z[N>>1]}:function(N){return U[N>>1]};case 2:return O?function(N){return re[N>>2]}:function(N){return B[N>>2]};default:throw new TypeError("Unknown integer type: "+_)}}var gd=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,yd=(_,g,O)=>{var N=g+O;for(O=g;_[O]&&!(O>=N);)++O;if(16<O-g&&_.buffer&&gd)return gd.decode(_.subarray(g,O));for(N="";g<O;){var q=_[g++];if(q&128){var ne=_[g++]&63;if((q&224)==192)N+=String.fromCharCode((q&31)<<6|ne);else{var ue=_[g++]&63;q=(q&240)==224?(q&15)<<12|ne<<6|ue:(q&7)<<18|ne<<12|ue<<6|_[g++]&63,65536>q?N+=String.fromCharCode(q):(q-=65536,N+=String.fromCharCode(55296|q>>10,56320|q&1023))}}else N+=String.fromCharCode(q)}return N},bd=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Cy=(_,g)=>{for(var O=_>>1,N=O+g/2;!(O>=N)&&U[O];)++O;if(O<<=1,32<O-_&&bd)return bd.decode(M.subarray(_,O));for(O="",N=0;!(N>=g/2);++N){var q=z[_+2*N>>1];if(q==0)break;O+=String.fromCharCode(q)}return O},$y=(_,g,O)=>{if(O===void 0&&(O=2147483647),2>O)return 0;O-=2;var N=g;O=O<2*_.length?O/2:_.length;for(var q=0;q<O;++q)z[g>>1]=_.charCodeAt(q),g+=2;return z[g>>1]=0,g-N},Ty=_=>2*_.length,Iy=(_,g)=>{for(var O=0,N="";!(O>=g/4);){var q=re[_+4*O>>2];if(q==0)break;++O,65536<=q?(q-=65536,N+=String.fromCharCode(55296|q>>10,56320|q&1023)):N+=String.fromCharCode(q)}return N},Ry=(_,g,O)=>{if(O===void 0&&(O=2147483647),4>O)return 0;var N=g;O=N+O-4;for(var q=0;q<_.length;++q){var ne=_.charCodeAt(q);if(55296<=ne&&57343>=ne){var ue=_.charCodeAt(++q);ne=65536+((ne&1023)<<10)|ue&1023}if(re[g>>2]=ne,g+=4,g+4>O)break}return re[g>>2]=0,g-N},Oy=_=>{for(var g=0,O=0;O<_.length;++O){var N=_.charCodeAt(O);55296<=N&&57343>=N&&++O,g+=4}return g},Py={};function ji(_){var g=Py[_];return g===void 0?Fe(_):g}var Li=[];function Ay(_){var g=Li.length;return Li.push(_),g}function Dy(_,g){for(var O=Array(_),N=0;N<_;++N)O[N]=At(B[g+4*N>>2],"parameter "+N);return O}var wd=[],Ls={},Ed=()=>{if(!Fs){var _={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:C||"./this.program"},g;for(g in Ls)Ls[g]===void 0?delete _[g]:_[g]=Ls[g];var O=[];for(g in _)O.push(`${g}=${_[g]}`);Fs=O}return Fs},Fs,Ny=[null,[],[]];Object.assign(xt.prototype,{get(_){return this.ja[_]},has(_){return this.ja[_]!==void 0},Ya(_){var g=this.Oa.pop()||this.ja.length;return this.ja[g]=_,g},Za(_){this.ja[_]=void 0,this.Oa.push(_)}}),Pt=h.BindingError=class extends Error{constructor(_){super(_),this.name="BindingError"}},Xe.ja.push({value:void 0},{value:null},{value:!0},{value:!1}),Xe.Ea=Xe.ja.length,h.count_emval_handles=function(){for(var _=0,g=Xe.Ea;g<Xe.ja.length;++g)Xe.ja[g]!==void 0&&++_;return _},Ct=h.PureVirtualError=Zt("PureVirtualError");for(var xd=Array(256),Fi=0;256>Fi;++Fi)xd[Fi]=String.fromCharCode(Fi);tt=xd,h.getInheritedInstanceCount=function(){return Object.keys(Qt).length},h.getLiveInheritedInstances=function(){var _=[],g;for(g in Qt)Qt.hasOwnProperty(g)&&_.push(Qt[g]);return _},h.flushPendingDeletes=nn,h.setDelayFunction=function(_){rn=_,mt.length&&rn&&rn(nn)},un=h.InternalError=class extends Error{constructor(_){super(_),this.name="InternalError"}},fe.prototype.isAliasOf=function(_){if(!(this instanceof fe&&_ instanceof fe))return!1;var g=this.W.Z.X,O=this.W.Y,N=_.W.Z.X;for(_=_.W.Y;g.$;)O=g.ra(O),g=g.$;for(;N.$;)_=N.ra(_),N=N.$;return g===N&&O===_},fe.prototype.clone=function(){if(this.W.Y||Q(this),this.W.pa)return this.W.count.value+=1,this;var _=en,g=Object,O=g.create,N=Object.getPrototypeOf(this),q=this.W;return _=_(O.call(g,N,{W:{value:{count:q.count,na:q.na,pa:q.pa,Y:q.Y,Z:q.Z,ca:q.ca,fa:q.fa}}})),_.W.count.value+=1,_.W.na=!1,_},fe.prototype.delete=function(){this.W.Y||Q(this),this.W.na&&!this.W.pa&&xe("Object already scheduled for deletion"),Jt(this),yn(this.W),this.W.pa||(this.W.ca=void 0,this.W.Y=void 0)},fe.prototype.isDeleted=function(){return!this.W.Y},fe.prototype.deleteLater=function(){return this.W.Y||Q(this),this.W.na&&!this.W.pa&&xe("Object already scheduled for deletion"),mt.push(this),mt.length===1&&rn&&rn(nn),this.W.na=!0,this},Ge.prototype.pb=function(_){return this.Sa&&(_=this.Sa(_)),_},Ge.prototype.Ka=function(_){this.ka&&this.ka(_)},Ge.prototype.argPackAdvance=8,Ge.prototype.readValueFromPointer=Tn,Ge.prototype.deleteObject=function(_){_!==null&&_.delete()},Ge.prototype.fromWireType=function(_){function g(){return this.ua?Ht(this.X.ga,{Z:this.Ab,Y:O,fa:this,ca:_}):Ht(this.X.ga,{Z:this,Y:_})}var O=this.pb(_);if(!O)return this.Ka(_),null;var N=tr(this.X,O);if(N!==void 0)return N.W.count.value===0?(N.W.Y=O,N.W.ca=_,N.clone()):(N=N.clone(),this.Ka(_),N);if(N=this.X.ob(O),N=Dn[N],!N)return g.call(this);N=this.ta?N.fb:N.pointerType;var q=Lt(O,this.X,N.X);return q===null?g.call(this):this.ua?Ht(N.X.ga,{Z:N,Y:q,fa:this,ca:_}):Ht(N.X.ga,{Z:N,Y:q})},vd=h.UnboundTypeError=Zt("UnboundTypeError");var ky={I:function(_,g,O){_=Fe(_),g=At(g,"wrapper"),O=ct(O);var N=[].slice,q=g.X,ne=q.ga,ue=q.$.ga,se=q.$.constructor;_=ze(_,function(){q.$.Ra.forEach((function(le){if(this[le]===ue[le])throw new Ct(`Pure virtual function ${le} must be implemented in JavaScript`)}).bind(this)),Object.defineProperty(this,"__parent",{value:ne}),this.__construct.apply(this,N.call(arguments))}),ne.__construct=function(){this===ne&&xe("Pass correct 'this' to __construct");var le=se.implement.apply(void 0,[this].concat(N.call(arguments)));Jt(le);var me=le.W;le.notifyOnDestruction(),me.pa=!0,Object.defineProperties(this,{W:{value:me}}),en(this),le=me.Y,le=he(q,le),Qt.hasOwnProperty(le)?xe(`Tried to register registered instance: ${le}`):Qt[le]=this},ne.__destruct=function(){this===ne&&xe("Pass correct 'this' to __destruct"),Jt(this);var le=this.W.Y;le=he(q,le),Qt.hasOwnProperty(le)?delete Qt[le]:xe(`Tried to unregister unregistered instance: ${le}`)},_.prototype=Object.create(ne);for(var de in O)_.prototype[de]=O[de];return je(_)},L:function(_){var g=Nn[_];delete Nn[_];var O=g.Ba,N=g.ka,q=g.Na,ne=q.map(ue=>ue.sb).concat(q.map(ue=>ue.Db));Wt([_],ne,ue=>{var se={};return q.forEach((de,le)=>{var me=ue[le],Se=de.qb,Ce=de.rb,Me=ue[le+q.length],ge=de.Cb,Et=de.Eb;se[de.mb]={read:Dt=>me.fromWireType(Se(Ce,Dt)),write:(Dt,Ve)=>{var Ye=[];ge(Et,Dt,Me.toWireType(Ye,Ve)),Kt(Ye)}}}),[{name:g.name,fromWireType:function(de){var le={},me;for(me in se)le[me]=se[me].read(de);return N(de),le},toWireType:function(de,le){for(var me in se)if(!(me in le))throw new TypeError(`Missing field: "${me}"`);var Se=O();for(me in se)se[me].write(Se,le[me]);return de!==null&&de.push(N,Se),Se},argPackAdvance:8,readValueFromPointer:Tn,ea:N}]})},z:function(){},G:function(_,g,O,N,q){var ne=rr(O);g=Fe(g),V(_,{name:g,fromWireType:function(ue){return!!ue},toWireType:function(ue,se){return se?N:q},argPackAdvance:8,readValueFromPointer:function(ue){if(O===1)var se=A;else if(O===2)se=z;else if(O===4)se=re;else throw new TypeError("Unknown boolean type size: "+g);return this.fromWireType(se[ue>>ne])},ea:null})},e:function(_,g,O,N,q,ne,ue,se,de,le,me,Se,Ce){me=Fe(me),ne=qe(q,ne),se&&(se=qe(ue,se)),le&&(le=qe(de,le)),Ce=qe(Se,Ce);var Me=ot(me);Ie(Me,function(){Hn(`Cannot construct ${me} due to unbound types`,[N])}),Wt([_,g,O],N?[N]:[],function(ge){if(ge=ge[0],N)var Et=ge.X,Dt=Et.ga;else Dt=fe.prototype;ge=ze(Me,function(){if(Object.getPrototypeOf(this)!==Ve)throw new Pt("Use 'new' to construct "+me);if(Ye.la===void 0)throw new Pt(me+" has no accessible constructor");var ln=Ye.la[arguments.length];if(ln===void 0)throw new Pt(`Tried to invoke ctor of ${me} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(Ye.la).toString()}) parameters instead!`);return ln.apply(this,arguments)});var Ve=Object.create(Dt,{constructor:{value:ge}});ge.prototype=Ve;var Ye=new Ee(me,ge,Ve,Ce,Et,ne,se,le);Ye.$&&(Ye.$.sa===void 0&&(Ye.$.sa=[]),Ye.$.sa.push(Ye)),Et=new Ge(me,Ye,!0,!1),Dt=new Ge(me+"*",Ye,!1,!1);var Nt=new Ge(me+" const*",Ye,!1,!0);return Dn[_]={pointerType:Dt,fb:Nt},qt(Me,ge),[Et,Dt,Nt]})},k:function(_,g,O,N,q,ne,ue){var se=Mi(O,N);g=Fe(g),ne=qe(q,ne),Wt([],[_],function(de){function le(){Hn(`Cannot call ${me} due to unbound types`,se)}de=de[0];var me=`${de.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]);var Se=de.X.constructor;return Se[g]===void 0?(le.ma=O-1,Se[g]=le):(_e(Se,g,me),Se[g].aa[O-1]=le),Wt([],se,function(Ce){if(Ce=ki(me,[Ce[0],null].concat(Ce.slice(1)),null,ne,ue),Se[g].aa===void 0?(Ce.ma=O-1,Se[g]=Ce):Se[g].aa[O-1]=Ce,de.X.sa)for(const Me of de.X.sa)Me.constructor.hasOwnProperty(g)||(Me.constructor[g]=Ce);return[]}),[]})},s:function(_,g,O,N,q,ne,ue,se){g=Fe(g),ne=qe(q,ne),Wt([],[_],function(de){de=de[0];var le=`${de.name}.${g}`,me={get(){Hn(`Cannot access ${le} due to unbound types`,[O])},enumerable:!0,configurable:!0};return me.set=se?()=>{Hn(`Cannot access ${le} due to unbound types`,[O])}:()=>{xe(`${le} is a read-only property`)},Object.defineProperty(de.X.constructor,g,me),Wt([],[O],function(Se){Se=Se[0];var Ce={get(){return Se.fromWireType(ne(N))},enumerable:!0};return se&&(se=qe(ue,se),Ce.set=Me=>{var ge=[];se(N,Se.toWireType(ge,Me)),Kt(ge)}),Object.defineProperty(de.X.constructor,g,Ce),[]}),[]})},o:function(_,g,O,N,q,ne){var ue=Mi(g,O);q=qe(N,q),Wt([],[_],function(se){se=se[0];var de=`constructor ${se.name}`;if(se.X.la===void 0&&(se.X.la=[]),se.X.la[g-1]!==void 0)throw new Pt(`Cannot register multiple constructors with identical number of parameters (${g-1}) for class '${se.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return se.X.la[g-1]=()=>{Hn(`Cannot construct ${se.name} due to unbound types`,ue)},Wt([],ue,function(le){return le.splice(1,0,null),se.X.la[g-1]=ki(de,le,null,q,ne),[]}),[]})},a:function(_,g,O,N,q,ne,ue,se){var de=Mi(O,N);g=Fe(g),ne=qe(q,ne),Wt([],[_],function(le){function me(){Hn(`Cannot call ${Se} due to unbound types`,de)}le=le[0];var Se=`${le.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]),se&&le.X.Ra.push(g);var Ce=le.X.ga,Me=Ce[g];return Me===void 0||Me.aa===void 0&&Me.className!==le.name&&Me.ma===O-2?(me.ma=O-2,me.className=le.name,Ce[g]=me):(_e(Ce,g,Se),Ce[g].aa[O-2]=me),Wt([],de,function(ge){return ge=ki(Se,ge,le,ne,ue),Ce[g].aa===void 0?(ge.ma=O-2,Ce[g]=ge):Ce[g].aa[O-2]=ge,[]}),[]})},d:function(_,g,O,N,q,ne,ue,se,de,le){g=Fe(g),q=qe(N,q),Wt([],[_],function(me){me=me[0];var Se=`${me.name}.${g}`,Ce={get(){Hn(`Cannot access ${Se} due to unbound types`,[O,ue])},enumerable:!0,configurable:!0};return Ce.set=de?()=>{Hn(`Cannot access ${Se} due to unbound types`,[O,ue])}:()=>{xe(Se+" is a read-only property")},Object.defineProperty(me.X.ga,g,Ce),Wt([],de?[O,ue]:[O],function(Me){var ge=Me[0],Et={get(){var Ve=md(this,me,Se+" getter");return ge.fromWireType(q(ne,Ve))},enumerable:!0};if(de){de=qe(se,de);var Dt=Me[1];Et.set=function(Ve){var Ye=md(this,me,Se+" setter"),Nt=[];de(le,Ye,Dt.toWireType(Nt,Ve)),Kt(Nt)}}return Object.defineProperty(me.X.ga,g,Et),[]}),[]})},F:function(_,g){g=Fe(g),V(_,{name:g,fromWireType:function(O){var N=ct(O);return Ms(O),N},toWireType:function(O,N){return je(N)},argPackAdvance:8,readValueFromPointer:Tn,ea:null})},l:function(_,g,O,N){function q(){}O=rr(O),g=Fe(g),q.values={},V(_,{name:g,constructor:q,fromWireType:function(ne){return this.constructor.values[ne]},toWireType:function(ne,ue){return ue.value},argPackAdvance:8,readValueFromPointer:xy(g,O,N),ea:null}),Ie(g,q)},c:function(_,g,O){var N=At(_,"enum");g=Fe(g),_=N.constructor,N=Object.create(N.constructor.prototype,{value:{value:O},constructor:{value:ze(`${N.name}_${g}`,function(){})}}),_.values[O]=N,_[g]=N},u:function(_,g,O){O=rr(O),g=Fe(g),V(_,{name:g,fromWireType:function(N){return N},toWireType:function(N,q){return q},argPackAdvance:8,readValueFromPointer:_y(g,O),ea:null})},q:function(_,g,O,N,q,ne){var ue=Mi(g,O);_=Fe(_),q=qe(N,q),Ie(_,function(){Hn(`Cannot call ${_} due to unbound types`,ue)},g-1),Wt([],ue,function(se){return qt(_,ki(_,[se[0],null].concat(se.slice(1)),null,q,ne),g-1),[]})},j:function(_,g,O,N,q){g=Fe(g),q===-1&&(q=4294967295),q=rr(O);var ne=se=>se;if(N===0){var ue=32-8*O;ne=se=>se<<ue>>>ue}O=g.includes("unsigned")?function(se,de){return de>>>0}:function(se,de){return de},V(_,{name:g,fromWireType:ne,toWireType:O,argPackAdvance:8,readValueFromPointer:Sy(g,q,N!==0),ea:null})},g:function(_,g,O){function N(ne){ne>>=2;var ue=B;return new q(ue.buffer,ue[ne+1],ue[ne])}var q=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][g];O=Fe(O),V(_,{name:O,fromWireType:N,argPackAdvance:8,readValueFromPointer:N},{tb:!0})},v:function(_,g){g=Fe(g);var O=g==="std::string";V(_,{name:g,fromWireType:function(N){var q=B[N>>2],ne=N+4;if(O)for(var ue=ne,se=0;se<=q;++se){var de=ne+se;if(se==q||M[de]==0){if(ue=ue?yd(M,ue,de-ue):"",le===void 0)var le=ue;else le+=String.fromCharCode(0),le+=ue;ue=de+1}}else{for(le=Array(q),se=0;se<q;++se)le[se]=String.fromCharCode(M[ne+se]);le=le.join("")}return Wn(N),le},toWireType:function(N,q){q instanceof ArrayBuffer&&(q=new Uint8Array(q));var ne,ue=typeof q=="string";ue||q instanceof Uint8Array||q instanceof Uint8ClampedArray||q instanceof Int8Array||xe("Cannot pass non-string to std::string");var se;if(O&&ue)for(ne=se=0;ne<q.length;++ne){var de=q.charCodeAt(ne);127>=de?se++:2047>=de?se+=2:55296<=de&&57343>=de?(se+=4,++ne):se+=3}else se=q.length;if(ne=se,se=Vs(4+ne+1),de=se+4,B[se>>2]=ne,O&&ue){if(ue=de,de=ne+1,ne=M,0<de){de=ue+de-1;for(var le=0;le<q.length;++le){var me=q.charCodeAt(le);if(55296<=me&&57343>=me){var Se=q.charCodeAt(++le);me=65536+((me&1023)<<10)|Se&1023}if(127>=me){if(ue>=de)break;ne[ue++]=me}else{if(2047>=me){if(ue+1>=de)break;ne[ue++]=192|me>>6}else{if(65535>=me){if(ue+2>=de)break;ne[ue++]=224|me>>12}else{if(ue+3>=de)break;ne[ue++]=240|me>>18,ne[ue++]=128|me>>12&63}ne[ue++]=128|me>>6&63}ne[ue++]=128|me&63}}ne[ue]=0}}else if(ue)for(ue=0;ue<ne;++ue)le=q.charCodeAt(ue),255<le&&(Wn(de),xe("String has UTF-16 code units that do not fit in 8 bits")),M[de+ue]=le;else for(ue=0;ue<ne;++ue)M[de+ue]=q[ue];return N!==null&&N.push(Wn,se),se},argPackAdvance:8,readValueFromPointer:Tn,ea:function(N){Wn(N)}})},t:function(_,g,O){if(O=Fe(O),g===2)var N=Cy,q=$y,ne=Ty,ue=()=>U,se=1;else g===4&&(N=Iy,q=Ry,ne=Oy,ue=()=>B,se=2);V(_,{name:O,fromWireType:function(de){for(var le=B[de>>2],me=ue(),Se,Ce=de+4,Me=0;Me<=le;++Me){var ge=de+4+Me*g;(Me==le||me[ge>>se]==0)&&(Ce=N(Ce,ge-Ce),Se===void 0?Se=Ce:(Se+=String.fromCharCode(0),Se+=Ce),Ce=ge+g)}return Wn(de),Se},toWireType:function(de,le){typeof le!="string"&&xe(`Cannot pass non-string to C++ string type ${O}`);var me=ne(le),Se=Vs(4+me+g);return B[Se>>2]=me>>se,q(le,Se+4,me+g),de!==null&&de.push(Wn,Se),Se},argPackAdvance:8,readValueFromPointer:Tn,ea:function(de){Wn(de)}})},N:function(_,g,O,N,q,ne){Nn[_]={name:Fe(g),Ba:qe(O,N),ka:qe(q,ne),Na:[]}},M:function(_,g,O,N,q,ne,ue,se,de,le){Nn[_].Na.push({mb:Fe(g),sb:O,qb:qe(N,q),rb:ne,Db:ue,Cb:qe(se,de),Eb:le})},H:function(_,g){g=Fe(g),V(_,{vb:!0,name:g,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},r:function(_,g,O){_=ct(_),g=At(g,"emval::as");var N=[],q=je(N);return B[O>>2]=q,g.toWireType(N,_)},w:function(_,g,O,N,q){_=Li[_],g=ct(g),O=ji(O);var ne=[];return B[N>>2]=je(ne),_(g,O,ne,q)},i:function(_,g,O,N){_=Li[_],g=ct(g),O=ji(O),_(g,O,null,N)},f:Ms,h:function(_,g){var O=Dy(_,g),N=O[0];g=N.name+"_$"+O.slice(1).map(function(ue){return ue.name}).join("_")+"$";var q=wd[g];if(q!==void 0)return q;var ne=Array(_-1);return q=Ay((ue,se,de,le)=>{for(var me=0,Se=0;Se<_-1;++Se)ne[Se]=O[Se+1].readValueFromPointer(le+me),me+=O[Se+1].argPackAdvance;for(ue=ue[se].apply(ue,ne),Se=0;Se<_-1;++Se)O[Se+1].hb&&O[Se+1].hb(ne[Se]);if(!N.vb)return N.toWireType(de,ue)}),wd[g]=q},p:function(_){return _=ji(_),je(h[_])},K:function(_,g){return _=ct(_),g=ct(g),je(_[g])},m:function(_){4<_&&(Xe.get(_).Ta+=1)},J:function(_){return je(ji(_))},n:function(_){var g=ct(_);Kt(g),Ms(_)},x:function(_,g){return _=At(_,"_emval_take_value"),_=_.readValueFromPointer(g),je(_)},b:()=>{ie("")},A:_=>{var g=M.length;if(_>>>=0,2147483648<_)return!1;for(var O=1;4>=O;O*=2){var N=g*(1+.2/O);N=Math.min(N,_+100663296);var q=Math;N=Math.max(_,N);e:{q=q.min.call(q,2147483648,N+(65536-N%65536)%65536)-p.buffer.byteLength+65535>>>16;try{p.grow(q),G();var ne=1;break e}catch{}ne=void 0}if(ne)return!0}return!1},B:(_,g)=>{var O=0;return Ed().forEach(function(N,q){var ne=g+O;for(q=B[_+4*q>>2]=ne,ne=0;ne<N.length;++ne)A[q++>>0]=N.charCodeAt(ne);A[q>>0]=0,O+=N.length+1}),0},C:(_,g)=>{var O=Ed();B[_>>2]=O.length;var N=0;return O.forEach(function(q){N+=q.length+1}),B[g>>2]=N,0},D:()=>52,y:function(){return 70},E:(_,g,O,N)=>{for(var q=0,ne=0;ne<O;ne++){var ue=B[g>>2],se=B[g+4>>2];g+=8;for(var de=0;de<se;de++){var le=M[ue+de],me=Ny[_];le===0||le===10?((_===1?H:R)(yd(me,0)),me.length=0):me.push(le)}q+=se}return B[N>>2]=q,0}};(function(){function _(O){if(O=O.exports,h.asm=O,p=h.asm.O,G(),K=h.asm.U,ce.unshift(h.asm.P),te--,h.monitorRunDependencies&&h.monitorRunDependencies(te),te==0&&J){var N=J;J=null,N()}return O}var g={a:ky};if(te++,h.monitorRunDependencies&&h.monitorRunDependencies(te),h.instantiateWasm)try{return h.instantiateWasm(g,_)}catch(O){R("Module.instantiateWasm callback failed with error: "+O),y(O)}return We(g,function(O){_(O.instance)}).catch(y),{}})();function Wn(){return(Wn=h.asm.Q).apply(null,arguments)}function Vs(){return(Vs=h.asm.R).apply(null,arguments)}function _d(){return(_d=h.asm.S).apply(null,arguments)}h.__embind_initialize_bindings=function(){return(h.__embind_initialize_bindings=h.asm.T).apply(null,arguments)},h.dynCall_jiji=function(){return(h.dynCall_jiji=h.asm.V).apply(null,arguments)};var Vi;J=function _(){Vi||Sd(),Vi||(J=_)};function Sd(){function _(){if(!Vi&&(Vi=!0,h.calledRun=!0,!$)){if(De(ce),b(h),h.onRuntimeInitialized&&h.onRuntimeInitialized(),h.postRun)for(typeof h.postRun=="function"&&(h.postRun=[h.postRun]);h.postRun.length;){var g=h.postRun.shift();W.unshift(g)}De(W)}}if(!(0<te)){if(h.preRun)for(typeof h.preRun=="function"&&(h.preRun=[h.preRun]);h.preRun.length;)Y();De(Z),0<te||(h.setStatus?(h.setStatus("Running..."),setTimeout(function(){setTimeout(function(){h.setStatus("")},1),_()},1)):_())}}if(h.preInit)for(typeof h.preInit=="function"&&(h.preInit=[h.preInit]);0<h.preInit.length;)h.preInit.pop()();return Sd(),m.ready}})();const d=u},a=>{a.exports=JSON.parse(`{"name":"@rive-app/canvas","version":"1.2.4","description":"Rive's canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}`)},(a,s,c)=>{c.r(s),c.d(s,{registerTouchInteractions:()=>u.registerTouchInteractions});var u=c(4)},(a,s,c)=>{c.r(s),c.d(s,{registerTouchInteractions:()=>f});var u=void 0,d=function(m){var h,b;return["touchstart","touchmove"].indexOf(m.type)>-1&&(!((h=m.touches)===null||h===void 0)&&h.length)?(m.preventDefault(),{clientX:m.touches[0].clientX,clientY:m.touches[0].clientY}):m.type==="touchend"&&(!((b=m.changedTouches)===null||b===void 0)&&b.length)?{clientX:m.changedTouches[0].clientX,clientY:m.changedTouches[0].clientY}:{clientX:m.clientX,clientY:m.clientY}},f=function(m){var h=m.canvas,b=m.artboard,y=m.stateMachines,T=y===void 0?[]:y,S=m.renderer,v=m.rive,w=m.fit,C=m.alignment;if(!h||!T.length||!S||!v||!b||typeof window>"u")return null;var I=function(P){var F=P.currentTarget.getBoundingClientRect(),k=d(P),H=k.clientX,R=k.clientY;if(!(!H&&!R)){var E=H-F.left,p=R-F.top,$=v.computeAlignment(w,C,{minX:0,minY:0,maxX:F.width,maxY:F.height},b.bounds),A=new v.Mat2D;$.invert(A);var M=new v.Vec2D(E,p),z=v.mapXY(A,M),U=z.x(),re=z.y();switch(z.delete(),A.delete(),M.delete(),$.delete(),P.type){case"touchmove":case"mouseover":case"mouseout":case"mousemove":{for(var B=0,L=T;B<L.length;B++){var oe=L[B];oe.pointerMove(U,re)}break}case"touchstart":case"mousedown":{for(var G=0,K=T;G<K.length;G++){var oe=K[G];oe.pointerDown(U,re)}break}case"touchend":case"mouseup":{for(var Z=0,ce=T;Z<ce.length;Z++){var oe=ce[Z];oe.pointerUp(U,re)}break}}}},D=I.bind(u);return h.addEventListener("mouseover",D),h.addEventListener("mouseout",D),h.addEventListener("mousemove",D),h.addEventListener("mousedown",D),h.addEventListener("mouseup",D),h.addEventListener("touchmove",D),h.addEventListener("touchstart",D),h.addEventListener("touchend",D),function(){h.removeEventListener("mouseover",D),h.removeEventListener("mouseout",D),h.removeEventListener("mousemove",D),h.removeEventListener("mousedown",D),h.removeEventListener("mouseup",D),h.removeEventListener("touchmove",D),h.removeEventListener("touchstart",D),h.removeEventListener("touchend",D)}}}],r={};function o(a){var s=r[a];if(s!==void 0)return s.exports;var c=r[a]={exports:{}};return n[a](c,c.exports,o),c.exports}o.d=(a,s)=>{for(var c in s)o.o(s,c)&&!o.o(a,c)&&Object.defineProperty(a,c,{enumerable:!0,get:s[c]})},o.o=(a,s)=>Object.prototype.hasOwnProperty.call(a,s),o.r=a=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var i={};return(()=>{o.r(i),o.d(i,{Alignment:()=>m,EventType:()=>C,Fit:()=>f,Layout:()=>h,LoopType:()=>I,Rive:()=>F,RuntimeLoader:()=>b,StateMachineInput:()=>S,StateMachineInputType:()=>T,Testing:()=>R});var a=o(1),s=o(2),c=o(3),u=function(E,p,$,A){function M(z){return z instanceof $?z:new $(function(U){U(z)})}return new($||($=Promise))(function(z,U){function re(oe){try{L(A.next(oe))}catch(G){U(G)}}function B(oe){try{L(A.throw(oe))}catch(G){U(G)}}function L(oe){oe.done?z(oe.value):M(oe.value).then(re,B)}L((A=A.apply(E,p||[])).next())})},d=function(E,p){var $={label:0,sent:function(){if(z[0]&1)throw z[1];return z[1]},trys:[],ops:[]},A,M,z,U;return U={next:re(0),throw:re(1),return:re(2)},typeof Symbol=="function"&&(U[Symbol.iterator]=function(){return this}),U;function re(L){return function(oe){return B([L,oe])}}function B(L){if(A)throw new TypeError("Generator is already executing.");for(;U&&(U=0,L[0]&&($=0)),$;)try{if(A=1,M&&(z=L[0]&2?M.return:L[0]?M.throw||((z=M.return)&&z.call(M),0):M.next)&&!(z=z.call(M,L[1])).done)return z;switch(M=0,z&&(L=[L[0]&2,z.value]),L[0]){case 0:case 1:z=L;break;case 4:return $.label++,{value:L[1],done:!1};case 5:$.label++,M=L[1],L=[0];continue;case 7:L=$.ops.pop(),$.trys.pop();continue;default:if(z=$.trys,!(z=z.length>0&&z[z.length-1])&&(L[0]===6||L[0]===2)){$=0;continue}if(L[0]===3&&(!z||L[1]>z[0]&&L[1]<z[3])){$.label=L[1];break}if(L[0]===6&&$.label<z[1]){$.label=z[1],z=L;break}if(z&&$.label<z[2]){$.label=z[2],$.ops.push(L);break}z[2]&&$.ops.pop(),$.trys.pop();continue}L=p.call(E,$)}catch(oe){L=[6,oe],M=0}finally{A=z=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}},f;(function(E){E.Cover="cover",E.Contain="contain",E.Fill="fill",E.FitWidth="fitWidth",E.FitHeight="fitHeight",E.None="none",E.ScaleDown="scaleDown"})(f||(f={}));var m;(function(E){E.Center="center",E.TopLeft="topLeft",E.TopCenter="topCenter",E.TopRight="topRight",E.CenterLeft="centerLeft",E.CenterRight="centerRight",E.BottomLeft="bottomLeft",E.BottomCenter="bottomCenter",E.BottomRight="bottomRight"})(m||(m={}));var h=function(){function E(p){var $,A,M,z,U,re;this.fit=($=p==null?void 0:p.fit)!==null&&$!==void 0?$:f.Contain,this.alignment=(A=p==null?void 0:p.alignment)!==null&&A!==void 0?A:m.Center,this.minX=(M=p==null?void 0:p.minX)!==null&&M!==void 0?M:0,this.minY=(z=p==null?void 0:p.minY)!==null&&z!==void 0?z:0,this.maxX=(U=p==null?void 0:p.maxX)!==null&&U!==void 0?U:0,this.maxY=(re=p==null?void 0:p.maxY)!==null&&re!==void 0?re:0}return E.new=function(p){var $=p.fit,A=p.alignment,M=p.minX,z=p.minY,U=p.maxX,re=p.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new E({fit:$,alignment:A,minX:M,minY:z,maxX:U,maxY:re})},E.prototype.copyWith=function(p){var $=p.fit,A=p.alignment,M=p.minX,z=p.minY,U=p.maxX,re=p.maxY;return new E({fit:$??this.fit,alignment:A??this.alignment,minX:M??this.minX,minY:z??this.minY,maxX:U??this.maxX,maxY:re??this.maxY})},E.prototype.runtimeFit=function(p){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var $;return this.fit===f.Cover?$=p.Fit.cover:this.fit===f.Contain?$=p.Fit.contain:this.fit===f.Fill?$=p.Fit.fill:this.fit===f.FitWidth?$=p.Fit.fitWidth:this.fit===f.FitHeight?$=p.Fit.fitHeight:this.fit===f.ScaleDown?$=p.Fit.scaleDown:$=p.Fit.none,this.cachedRuntimeFit=$,$},E.prototype.runtimeAlignment=function(p){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var $;return this.alignment===m.TopLeft?$=p.Alignment.topLeft:this.alignment===m.TopCenter?$=p.Alignment.topCenter:this.alignment===m.TopRight?$=p.Alignment.topRight:this.alignment===m.CenterLeft?$=p.Alignment.centerLeft:this.alignment===m.CenterRight?$=p.Alignment.centerRight:this.alignment===m.BottomLeft?$=p.Alignment.bottomLeft:this.alignment===m.BottomCenter?$=p.Alignment.bottomCenter:this.alignment===m.BottomRight?$=p.Alignment.bottomRight:$=p.Alignment.center,this.cachedRuntimeAlignment=$,$},E}(),b=function(){function E(){}return E.loadRuntime=function(){a.default({locateFile:function(){return E.wasmURL}}).then(function(p){var $;for(E.runtime=p;E.callBackQueue.length>0;)($=E.callBackQueue.shift())===null||$===void 0||$(E.runtime)})},E.getInstance=function(p){E.isLoading||(E.isLoading=!0,E.loadRuntime()),E.runtime?p(E.runtime):E.callBackQueue.push(p)},E.awaitInstance=function(){return new Promise(function(p){return E.getInstance(function($){return p($)})})},E.setWasmUrl=function(p){E.wasmURL=p},E.isLoading=!1,E.callBackQueue=[],E.wasmURL="https://unpkg.com/".concat(s.name,"@").concat(s.version,"/rive.wasm"),E}(),y=function(){function E(p,$,A,M){this.animation=p,this.artboard=$,this.playing=M,this.loopCount=0,this.scrubTo=null,this.instance=new A.LinearAnimationInstance(p,$)}return Object.defineProperty(E.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"time",{get:function(){return this.instance.time},set:function(p){this.instance.time=p},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),E.prototype.advance=function(p){this.scrubTo===null?this.instance.advance(p):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},E.prototype.apply=function(p){this.instance.apply(p)},Object.defineProperty(E.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),E.prototype.cleanup=function(){this.instance.delete()},E}(),T;(function(E){E[E.Number=56]="Number",E[E.Trigger=58]="Trigger",E[E.Boolean=59]="Boolean"})(T||(T={}));var S=function(){function E(p,$){this.type=p,this.runtimeInput=$}return Object.defineProperty(E.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(p){this.runtimeInput.value=p},enumerable:!1,configurable:!0}),E.prototype.fire=function(){this.type===T.Trigger&&this.runtimeInput.fire()},E}(),v=function(){function E(p,$,A,M){this.stateMachine=p,this.playing=A,this.artboard=M,this.inputs=[],this.instance=new $.StateMachineInstance(p,M),this.initInputs($)}return Object.defineProperty(E.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"statesChanged",{get:function(){for(var p=[],$=0;$<this.instance.stateChangedCount();$++)p.push(this.instance.stateChangedNameByIndex($));return p},enumerable:!1,configurable:!0}),E.prototype.advance=function(p){this.instance.advance(p)},E.prototype.initInputs=function(p){for(var $=0;$<this.instance.inputCount();$++){var A=this.instance.input($);this.inputs.push(this.mapRuntimeInput(A,p))}},E.prototype.mapRuntimeInput=function(p,$){if(p.type===$.SMIInput.bool)return new S(T.Boolean,p.asBool());if(p.type===$.SMIInput.number)return new S(T.Number,p.asNumber());if(p.type===$.SMIInput.trigger)return new S(T.Trigger,p.asTrigger())},E.prototype.cleanup=function(){this.instance.delete()},E}(),w=function(){function E(p,$,A,M,z){M===void 0&&(M=[]),z===void 0&&(z=[]),this.runtime=p,this.artboard=$,this.eventManager=A,this.animations=M,this.stateMachines=z}return E.prototype.add=function(p,$,A){if(A===void 0&&(A=!0),p=H(p),p.length===0)this.animations.forEach(function(Z){return Z.playing=$}),this.stateMachines.forEach(function(Z){return Z.playing=$});else for(var M=this.animations.map(function(Z){return Z.name}),z=this.stateMachines.map(function(Z){return Z.name}),U=0;U<p.length;U++){var re=M.indexOf(p[U]),B=z.indexOf(p[U]);if(re>=0||B>=0)re>=0?this.animations[re].playing=$:this.stateMachines[B].playing=$;else{var L=this.artboard.animationByName(p[U]);if(L){var oe=new y(L,this.artboard,this.runtime,$);oe.advance(0),oe.apply(1),this.animations.push(oe)}else{var G=this.artboard.stateMachineByName(p[U]);if(G){var K=new v(G,this.runtime,$,this.artboard);this.stateMachines.push(K)}}}}return A&&($?this.eventManager.fire({type:C.Play,data:this.playing}):this.eventManager.fire({type:C.Pause,data:this.paused})),$?this.playing:this.paused},E.prototype.play=function(p){return this.add(p,!0)},E.prototype.pause=function(p){return this.add(p,!1)},E.prototype.scrub=function(p,$){var A=this.animations.filter(function(M){return p.includes(M.name)});return A.forEach(function(M){return M.scrubTo=$}),A.map(function(M){return M.name})},Object.defineProperty(E.prototype,"playing",{get:function(){return this.animations.filter(function(p){return p.playing}).map(function(p){return p.name}).concat(this.stateMachines.filter(function(p){return p.playing}).map(function(p){return p.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"paused",{get:function(){return this.animations.filter(function(p){return!p.playing}).map(function(p){return p.name}).concat(this.stateMachines.filter(function(p){return!p.playing}).map(function(p){return p.name}))},enumerable:!1,configurable:!0}),E.prototype.stop=function(p){var $=this;p=H(p);var A=[];if(p.length===0)A=this.animations.map(function(U){return U.name}).concat(this.stateMachines.map(function(U){return U.name})),this.animations.forEach(function(U){return U.cleanup()}),this.stateMachines.forEach(function(U){return U.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var M=this.animations.filter(function(U){return p.includes(U.name)});M.forEach(function(U){U.cleanup(),$.animations.splice($.animations.indexOf(U),1)});var z=this.stateMachines.filter(function(U){return p.includes(U.name)});z.forEach(function(U){U.cleanup(),$.stateMachines.splice($.stateMachines.indexOf(U),1)}),A=M.map(function(U){return U.name}).concat(z.map(function(U){return U.name}))}return this.eventManager.fire({type:C.Stop,data:A}),A},Object.defineProperty(E.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(p,$){return p||$.playing},!1)||this.stateMachines.reduce(function(p,$){return p||$.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),E.prototype.atLeastOne=function(p,$){$===void 0&&($=!0);var A;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([A=this.artboard.animationByIndex(0).name],p,$):this.artboard.stateMachineCount()>0&&this.add([A=this.artboard.stateMachineByIndex(0).name],p,$)),A},E.prototype.handleLooping=function(){for(var p=0,$=this.animations.filter(function(M){return M.playing});p<$.length;p++){var A=$[p];A.loopValue===0&&A.loopCount?(A.loopCount=0,this.stop(A.name)):A.loopValue===1&&A.loopCount?(this.eventManager.fire({type:C.Loop,data:{animation:A.name,type:I.Loop}}),A.loopCount=0):A.loopValue===2&&A.loopCount>1&&(this.eventManager.fire({type:C.Loop,data:{animation:A.name,type:I.PingPong}}),A.loopCount=0)}},E.prototype.handleStateChanges=function(){for(var p=[],$=0,A=this.stateMachines.filter(function(z){return z.playing});$<A.length;$++){var M=A[$];p.push.apply(p,M.statesChanged)}p.length>0&&this.eventManager.fire({type:C.StateChange,data:p})},E.prototype.handleAdvancing=function(p){this.eventManager.fire({type:C.Advance,data:p})},E}(),C;(function(E){E.Load="load",E.LoadError="loaderror",E.Play="play",E.Pause="pause",E.Stop="stop",E.Loop="loop",E.Draw="draw",E.Advance="advance",E.StateChange="statechange"})(C||(C={}));var I;(function(E){E.OneShot="oneshot",E.Loop="loop",E.PingPong="pingpong"})(I||(I={}));var D=function(){function E(p){p===void 0&&(p=[]),this.listeners=p}return E.prototype.getListeners=function(p){return this.listeners.filter(function($){return $.type===p})},E.prototype.add=function(p){this.listeners.includes(p)||this.listeners.push(p)},E.prototype.remove=function(p){for(var $=0;$<this.listeners.length;$++){var A=this.listeners[$];if(A.type===p.type&&A.callback===p.callback){this.listeners.splice($,1);break}}},E.prototype.removeAll=function(p){var $=this;p?this.listeners.filter(function(A){return A.type===p}).forEach(function(A){return $.remove(A)}):this.listeners.splice(0,this.listeners.length)},E.prototype.fire=function(p){var $=this.getListeners(p.type);$.forEach(function(A){return A.callback(p)})},E}(),P=function(){function E(p){this.eventManager=p,this.queue=[]}return E.prototype.add=function(p){this.queue.push(p)},E.prototype.process=function(){for(;this.queue.length>0;){var p=this.queue.shift();p!=null&&p.action&&p.action(),p!=null&&p.event&&this.eventManager.fire(p.event)}},E}(),F=function(){function E(p){var $;this.loaded=!1,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this.shouldDisableRiveListeners=!1,this.durations=[],this.frameTimes=[],this.frameCount=0,this.renderSecondTimer=0,this.canvas=p.canvas,this.src=p.src,this.buffer=p.buffer,this.layout=($=p.layout)!==null&&$!==void 0?$:new h,this.shouldDisableRiveListeners=!!p.shouldDisableRiveListeners,this.eventManager=new D,p.onLoad&&this.on(C.Load,p.onLoad),p.onLoadError&&this.on(C.LoadError,p.onLoadError),p.onPlay&&this.on(C.Play,p.onPlay),p.onPause&&this.on(C.Pause,p.onPause),p.onStop&&this.on(C.Stop,p.onStop),p.onLoop&&this.on(C.Loop,p.onLoop),p.onStateChange&&this.on(C.StateChange,p.onStateChange),p.onAdvance&&this.on(C.Advance,p.onAdvance),p.onload&&!p.onLoad&&this.on(C.Load,p.onload),p.onloaderror&&!p.onLoadError&&this.on(C.LoadError,p.onloaderror),p.onplay&&!p.onPlay&&this.on(C.Play,p.onplay),p.onpause&&!p.onPause&&this.on(C.Pause,p.onpause),p.onstop&&!p.onStop&&this.on(C.Stop,p.onstop),p.onloop&&!p.onLoop&&this.on(C.Loop,p.onloop),p.onstatechange&&!p.onStateChange&&this.on(C.StateChange,p.onstatechange),this.taskQueue=new P(this.eventManager),this.init({src:this.src,buffer:this.buffer,autoplay:p.autoplay,animations:p.animations,stateMachines:p.stateMachines,artboard:p.artboard,useOffscreenRenderer:p.useOffscreenRenderer})}return E.new=function(p){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new E(p)},E.prototype.init=function(p){var $=this,A=p.src,M=p.buffer,z=p.animations,U=p.stateMachines,re=p.artboard,B=p.autoplay,L=B===void 0?!1:B,oe=p.useOffscreenRenderer,G=oe===void 0?!1:oe;if(this.src=A,this.buffer=M,!this.src&&!this.buffer)throw new Error(E.missingErrorMessage);var K=H(z),Z=H(U);this.loaded=!1,this.readyForPlaying=!1,b.awaitInstance().then(function(ce){$.runtime=ce,$.renderer=$.runtime.makeRenderer($.canvas,G),$.canvas.width||$.canvas.height||$.resizeDrawingSurfaceToCanvas(),$.initData(re,K,Z,L).then(function(){return $.setupRiveListeners()}).catch(function(W){console.error(W)})}).catch(function(ce){console.error(ce)})},E.prototype.setupRiveListeners=function(){var p=this;if(!this.shouldDisableRiveListeners){var $=(this.animator.stateMachines||[]).filter(function(A){return A.playing&&p.runtime.hasListeners(A.instance)}).map(function(A){return A.instance});this.eventCleanup=(0,c.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:$,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime)})}},E.prototype.initData=function(p,$,A,M){var z;return u(this,void 0,void 0,function(){var U,re,B;return d(this,function(L){switch(L.label){case 0:return this.src?(U=this,[4,k(this.src)]):[3,2];case 1:U.buffer=L.sent(),L.label=2;case 2:return re=this,[4,this.runtime.load(new Uint8Array(this.buffer))];case 3:return re.file=L.sent(),this.file?(this.initArtboard(p,$,A,M),this.loaded=!0,this.eventManager.fire({type:C.Load,data:(z=this.src)!==null&&z!==void 0?z:"buffer"}),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,Promise.resolve()]):(B="Problem loading file; may be corrupt!",console.warn(B),this.eventManager.fire({type:C.LoadError,data:B}),[2,Promise.reject(B)])}})})},E.prototype.initArtboard=function(p,$,A,M){var z=p?this.file.artboardByName(p):this.file.defaultArtboard();if(!z){var U="Invalid artboard name or no default artboard";console.warn(U),this.eventManager.fire({type:C.LoadError,data:U});return}if(this.artboard=z,this.artboard.animationCount()<1){var U="Artboard has no animations";throw this.eventManager.fire({type:C.LoadError,data:U}),U}this.animator=new w(this.runtime,this.artboard,this.eventManager);var re;$.length>0||A.length>0?(re=$.concat(A),this.animator.add(re,M,!1)):re=[this.animator.atLeastOne(M,!1)],this.taskQueue.add({event:{type:M?C.Play:C.Pause,data:re}})},E.prototype.drawFrame=function(){this.startRendering()},E.prototype.draw=function(p,$){var A=performance.now();this.frameRequestId=null,this.lastRenderTime||(this.lastRenderTime=p),this.renderSecondTimer+=p-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,$==null||$());var M=(p-this.lastRenderTime)/1e3;this.lastRenderTime=p;for(var z=this.animator.animations.filter(function(W){return W.playing||W.needsScrub}).sort(function(W){return W.needsScrub?-1:1}),U=0,re=z;U<re.length;U++){var B=re[U];B.advance(M),B.instance.didLoop&&(B.loopCount+=1),B.apply(1)}for(var L=this.animator.stateMachines.filter(function(W){return W.playing}),oe=0,G=L;oe<G.length;oe++){var K=G[oe];K.advance(M)}this.artboard.advance(M);var Z=this.renderer;Z.clear(),Z.save(),this.alignRenderer(),this.artboard.draw(Z),Z.restore(),Z.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(M),this.frameCount++;var ce=performance.now();for(this.frameTimes.push(ce),this.durations.push(ce-A);this.frameTimes[0]<=ce-1e3;)this.frameTimes.shift(),this.durations.shift();this.animator.isPlaying?this.startRendering():this.animator.isPaused?this.lastRenderTime=0:this.animator.isStopped&&(this.lastRenderTime=0)},E.prototype.alignRenderer=function(){var p=this,$=p.renderer,A=p.runtime,M=p._layout,z=p.artboard;$.align(M.runtimeFit(A),M.runtimeAlignment(A),{minX:M.minX,minY:M.minY,maxX:M.maxX,maxY:M.maxY},z.bounds)},Object.defineProperty(E.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"frameTime",{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(p,$){return p+$},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),E.prototype.cleanup=function(){var p,$;this.stopRendering(),this.cleanupInstances(),(p=this.renderer)===null||p===void 0||p.delete(),this.renderer=null,($=this.file)===null||$===void 0||$.delete(),this.file=null},E.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},E.prototype.play=function(p,$){var A=this;if(p=H(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return A.play(p,$)}});return}this.animator.play(p),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},E.prototype.pause=function(p){var $=this;if(p=H(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.pause(p)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(p)},E.prototype.scrub=function(p,$){var A=this;if(p=H(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return A.scrub(p,$)}});return}this.animator.scrub(p,$||0),this.drawFrame()},E.prototype.stop=function(p){var $=this;if(p=H(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.stop(p)}});return}this.animator.stop(p),this.eventCleanup&&this.eventCleanup()},E.prototype.reset=function(p){var $,A=p==null?void 0:p.artboard,M=H(p==null?void 0:p.animations),z=H(p==null?void 0:p.stateMachines),U=($=p==null?void 0:p.autoplay)!==null&&$!==void 0?$:!1;this.cleanupInstances(),this.initArtboard(A,M,z,U),this.taskQueue.process()},E.prototype.load=function(p){this.stop(),this.init(p)},Object.defineProperty(E.prototype,"layout",{get:function(){return this._layout},set:function(p){this._layout=p,(!p.maxX||!p.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),E.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},E.prototype.resizeDrawingSurfaceToCanvas=function(){if(this.canvas instanceof HTMLCanvasElement&&window){var p=this.canvas.getBoundingClientRect(),$=p.width,A=p.height,M=window.devicePixelRatio||1;this.canvas.width=M*$,this.canvas.height=M*A,this.startRendering(),this.resizeToCanvas()}},Object.defineProperty(E.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"animationNames",{get:function(){if(!this.loaded)return[];for(var p=[],$=0;$<this.artboard.animationCount();$++)p.push(this.artboard.animationByIndex($).name);return p},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"stateMachineNames",{get:function(){if(!this.loaded)return[];for(var p=[],$=0;$<this.artboard.stateMachineCount();$++)p.push(this.artboard.stateMachineByIndex($).name);return p},enumerable:!1,configurable:!0}),E.prototype.stateMachineInputs=function(p){if(this.loaded){var $=this.animator.stateMachines.find(function(A){return A.name===p});return $==null?void 0:$.inputs}},Object.defineProperty(E.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(p){return p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(p){return p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(p){return!p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(p){return!p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),E.prototype.on=function(p,$){this.eventManager.add({type:p,callback:$})},E.prototype.off=function(p,$){this.eventManager.remove({type:p,callback:$})},E.prototype.unsubscribe=function(p,$){console.warn("This function is deprecated: please use `off()` instead."),this.off(p,$)},E.prototype.removeAllRiveEventListeners=function(p){this.eventManager.removeAll(p)},E.prototype.unsubscribeAll=function(p){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(p)},E.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},E.prototype.startRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this.draw.bind(this)):this.frameRequestId=requestAnimationFrame(this.draw.bind(this)))},E.prototype.enableFPSCounter=function(p){this.runtime.enableFPSCounter(p)},E.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(E.prototype,"contents",{get:function(){if(this.loaded){for(var p={artboards:[]},$=0;$<this.file.artboardCount();$++){for(var A=this.file.artboardByIndex($),M={name:A.name,animations:[],stateMachines:[]},z=0;z<A.animationCount();z++){var U=A.animationByIndex(z);M.animations.push(U.name)}for(var re=0;re<A.stateMachineCount();re++){for(var B=A.stateMachineByIndex(re),L=B.name,oe=new this.runtime.StateMachineInstance(B,A),G=[],K=0;K<oe.inputCount();K++){var Z=oe.input(K);G.push({name:Z.name,type:Z.type})}M.stateMachines.push({name:L,inputs:G})}p.artboards.push(M)}return p}},enumerable:!1,configurable:!0}),E.missingErrorMessage="Rive source file or data buffer required",E}(),k=function(E){return u(void 0,void 0,void 0,function(){var p,$,A;return d(this,function(M){switch(M.label){case 0:return p=new Request(E),[4,fetch(p)];case 1:return $=M.sent(),[4,$.arrayBuffer()];case 2:return A=M.sent(),[2,A]}})})},H=function(E){return typeof E=="string"?[E]:E instanceof Array?E:[]},R={EventManager:D,TaskQueueManager:P}})(),i})())})(eg);var BT=eg.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=l,n=BT;function r(v){return v&&typeof v=="object"&&"default"in v?v:{default:v}}var o=r(t),i=function(){return i=Object.assign||function(v){for(var w,C=1,I=arguments.length;C<I;C++)for(var D in w=arguments[C])Object.prototype.hasOwnProperty.call(w,D)&&(v[D]=w[D]);return v},i.apply(this,arguments)};function a(v,w){var C={};for(var I in v)Object.prototype.hasOwnProperty.call(v,I)&&w.indexOf(I)<0&&(C[I]=v[I]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function"){var D=0;for(I=Object.getOwnPropertySymbols(v);D<I.length;D++)w.indexOf(I[D])<0&&Object.prototype.propertyIsEnumerable.call(v,I[D])&&(C[I[D]]=v[I[D]])}return C}function s(){var v=typeof window<"u"&&typeof window.devicePixelRatio=="number"?window.devicePixelRatio:1;return Math.min(Math.max(1,v),3)}typeof SuppressedError=="function"&&SuppressedError;var c=function(){function v(){}return v.prototype.observe=function(){},v.prototype.unobserve=function(){},v.prototype.disconnect=function(){},v}(),u=globalThis.ResizeObserver||c,d=globalThis.ResizeObserver!==void 0,f=!d;function m(v,w){w===void 0&&(w=!0);var C=t.useState({width:0,height:0}),I=C[0],D=C[1];t.useEffect(function(){if(typeof window<"u"&&w){var R=function(){D({width:window.innerWidth,height:window.innerHeight})};return f&&(R(),window.addEventListener("resize",R)),function(){return window.removeEventListener("resize",R)}}},[]);var P,F,k,H=t.useRef(new u((P=function(R){d&&D({width:R[R.length-1].contentRect.width,height:R[R.length-1].contentRect.height})},F=0,k=0,function(){for(var R=this,E=[],p=0;p<arguments.length;p++)E[p]=arguments[p];clearTimeout(k),k=window.setTimeout(function(){return P.apply(R,E)},F)})));return t.useEffect(function(){var R=H.current;if(w){var E=v.current;return v.current&&d&&R.observe(v.current),function(){R.disconnect(),E&&d&&R.unobserve(E)}}R.disconnect()},[v,H]),I}var h={useDevicePixelRatio:!0,fitCanvasToArtboardHeight:!1,useOffscreenRenderer:!0,shouldResizeCanvasToContainer:!0};function b(v){return Object.assign({},h,v)}function y(v){var w=v.riveLoaded,C=w!==void 0&&w,I=v.canvasRef,D=v.containerRef,P=v.options,F=P===void 0?{}:P,k=v.onCanvasHasResized,H=v.artboardBounds,R=b(F),E=t.useState({height:0,width:0}),p=E[0],$=p.height,A=p.width,M=E[1],z=t.useState({height:0,width:0}),U=z[0],re=U.height,B=U.width,L=z[1],oe=t.useState(!0),G=oe[0],K=oe[1],Z=R.fitCanvasToArtboardHeight,ce=R.shouldResizeCanvasToContainer,W=R.useDevicePixelRatio,Y=m(D,ce),te=function(){var Te=s(),Oe=t.useState(Te),Ne=Oe[0],Re=Oe[1];return t.useEffect(function(){if(typeof window<"u"&&"matchMedia"in window){var We=function(){var ot=s();Re(ot)},De=window.matchMedia("screen and (resolution: ".concat(Ne,"dppx)"));return De.hasOwnProperty("addEventListener")?De.addEventListener("change",We):De.addListener(We),function(){De.hasOwnProperty("removeEventListener")?De.removeEventListener("change",We):De.removeListener(We)}}},[Ne]),Ne}(),J=H??{},ie=J.maxX,ee=J.maxY,we=t.useCallback(function(){var Te,Oe,Ne,Re,We=(Oe=(Te=D.current)===null||Te===void 0?void 0:Te.clientWidth)!==null&&Oe!==void 0?Oe:0,De=(Re=(Ne=D.current)===null||Ne===void 0?void 0:Ne.clientHeight)!==null&&Re!==void 0?Re:0;return Z&&H?{width:We,height:We*(H.maxY/H.maxX)}:{width:We,height:De}},[D,Z,ie,ee]);t.useEffect(function(){if(ce&&D.current&&C){var Te=we(),Oe=Te.width,Ne=Te.height,Re=!1;if(I.current){var We=Oe!==A||Ne!==$;if(R.fitCanvasToArtboardHeight&&We&&(D.current.style.height=Ne+"px",Re=!0),R.useDevicePixelRatio){if(We||Oe*te!==B||Ne*te!==re){var De=te*Oe,ot=te*Ne;I.current.width=De,I.current.height=ot,I.current.style.width=Oe+"px",I.current.style.height=Ne+"px",L({width:De,height:ot}),Re=!0}}else We&&(I.current.width=Oe,I.current.height=Ne,L({width:Oe,height:Ne}),Re=!0);M({width:Oe,height:Ne})}k&&(G||Re)&&k&&k(),G&&K(!1)}},[I,D,Y,te,we,G,K,re,B,$,A,k,ce,Z,W,C])}function T(v){var w=v.setContainerRef,C=v.setCanvasRef,I=v.className,D=I===void 0?"":I,P=v.style,F=v.children,k=a(v,["setContainerRef","setCanvasRef","className","style","children"]),H=i({width:"100%",height:"100%"},P);return o.default.createElement("div",i({ref:w,className:D},!D&&{style:H}),o.default.createElement("canvas",i({ref:C,style:{verticalAlign:"top",width:0,height:0}},k),F))}function S(v,w){w===void 0&&(w={});var C=t.useRef(null),I=t.useRef(null),D=t.useState(null),P=D[0],F=D[1],k=!!v,H=b(w),R=t.useCallback(function(){P&&(P.startRendering(),P.resizeToCanvas())},[P]);y({riveLoaded:!!P,canvasRef:C,containerRef:I,options:H,onCanvasHasResized:R,artboardBounds:P==null?void 0:P.bounds});var E=t.useCallback(function(M){if(M&&v&&k){var z=H.useOffscreenRenderer,U=new n.Rive(i(i({useOffscreenRenderer:z},v),{canvas:M}));U.on(n.EventType.Load,function(){C.current?F(U):U.cleanup()})}else M===null&&C.current&&(C.current.height=0,C.current.width=0);C.current=M},[k]),p=t.useCallback(function(M){I.current=M},[]);t.useEffect(function(){var M=new IntersectionObserver(function(z){z[0].isIntersecting?P&&P.startRendering():P&&P.stopRendering()});return C.current&&M.observe(C.current),function(){M.disconnect()}},[P]),t.useEffect(function(){return function(){P&&(P.cleanup(),F(null))}},[P]);var $=v==null?void 0:v.animations;t.useEffect(function(){P&&$&&(P.isPlaying?(P.stop(P.animationNames),P.play($)):P.isPaused&&(P.stop(P.animationNames),P.pause($)))},[$,P]);var A=t.useCallback(function(M){return o.default.createElement(T,i({setContainerRef:p,setCanvasRef:E},M))},[E,p]);return{canvas:C.current,container:I.current,setCanvasRef:E,setContainerRef:p,rive:P,RiveComponent:A}}e.default=function(v){var w=v.src,C=v.artboard,I=v.animations,D=v.stateMachines,P=v.layout,F=v.useOffscreenRenderer,k=F===void 0||F,H=v.shouldDisableRiveListeners,R=H!==void 0&&H,E=v.shouldResizeCanvasToContainer,p=E===void 0||E,$=v.children,A=a(v,["src","artboard","animations","stateMachines","layout","useOffscreenRenderer","shouldDisableRiveListeners","shouldResizeCanvasToContainer","children"]),M=S({src:w,artboard:C,animations:I,layout:P,stateMachines:D,autoplay:!0,shouldDisableRiveListeners:R},{useOffscreenRenderer:k,shouldResizeCanvasToContainer:p}).RiveComponent;return o.default.createElement(M,i({},A),$)},e.useResizeCanvas=y,e.useRive=S,e.useStateMachineInput=function(v,w,C,I){var D=t.useState(null),P=D[0],F=D[1];return t.useEffect(function(){function k(){if(v&&w&&C||F(null),v&&w&&C){var H=v.stateMachineInputs(w);if(H){var R=H.find(function(E){return E.name===C});I!==void 0&&R&&(R.value=I),F(R||null)}}else F(null)}k(),v&&v.on(n.EventType.Play,function(){k()})},[v]),P},Object.keys(n).forEach(function(v){v==="default"||e.hasOwnProperty(v)||Object.defineProperty(e,v,{enumerable:!0,get:function(){return n[v]}})})})(Jm);const HT=vp(Jm),yl=({src:e="https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:t,height:n,style:r,...o})=>j.jsx(et,{width:t,height:n,style:r,children:j.jsx(HT,{src:e,...o})});yl.defaultProps={src:"https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:"300px",height:"300px",style:{}};const tg=({isLoading:e,className:t,width:n,height:r,onClose:o,src:i,noScroll:a="noscroll",...s})=>(l.useEffect(()=>(e?document.body.classList.add(a):document.body.classList.remove(a),()=>{document.body.classList.remove(a)}),[e,a]),e?j.jsx(et,{className:t,"data-test-id":s["data-testid-backdrop"],onClick:o,position:"fixed",left:"$0",top:"$0",width:"$full",height:"$full",cursor:"progress",style:{backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:9999},children:j.jsx(et,{"data-test-id":s["data-testid-loader"],position:"absolute",left:"50%",top:"50%",width:n,height:r,children:j.jsx(yl,{src:i,width:n,height:r,style:{transform:"translate(-50%, -50%)"}})})}):null);tg.defaultProps={onClose:()=>{},className:"",src:void 0,noScroll:"noscroll","data-testid-backdrop":"full-loader-backdrop","data-testid-loader":"full-loader-loader"};var WT=wt({defaultClassName:"_1a8lrjn1 j1jih79l j1jih7ak",variantClassNames:{color:{primary:"_1a8lrjn2",white:"_1a8lrjn3"},size:{small:"_1a8lrjn4",medium:"_1a8lrjn5",large:"_1a8lrjn6"}},defaultVariants:{color:"primary",size:"medium"},compoundVariants:[]});const zT=({color:e,size:t,...n})=>j.jsx(et,{...n,className:Pe(WT({color:e,size:t}))});function UT(e){return class extends l.Component{constructor(){super(...arguments),this.getValue=()=>{const{children:n,selectedValue:r}=this.props;return r&&r.length?r:n?l.Children.map(n,o=>{const i=l.Children.toArray(o.children||o.props.children);return i&&i[0]&&i[0].props.value}):[]},this.onChange=(n,r,o)=>{const i=this.getValue().concat();i[n]=r,o&&o(i,n)},this.onValueChange=(n,r)=>{this.onChange(n,r,this.props.onValueChange)},this.onScrollChange=(n,r)=>{this.onChange(n,r,this.props.onScrollChange)}}render(){return j.jsx(e,{...this.props,getValue:this.getValue,onValueChange:this.onValueChange,onScrollChange:this.props.onScrollChange&&this.onScrollChange})}}}var YT="_1ypj0tt5",KT="_1ypj0tt4",qT="_1ypj0tt3",Vh="_1ypj0tt1",XT="_1ypj0tt0",GT="_1ypj0tt2";const ZT=({className:e,children:t,getValue:n,onScrollChange:r,onValueChange:o})=>{const i=n==null?void 0:n(),a=l.Children.map(t,(s,c)=>l.cloneElement(s,{selectedValue:i==null?void 0:i[c],onValueChange:(...u)=>o==null?void 0:o(c,...u),onScrollChange:(...u)=>r==null?void 0:r(c,...u)}));return j.jsx(et,{className:Pe(YT,e),children:a})},ng=UT(ZT),QT=e=>null;function JT(e){var t;const n=(r,o,i)=>{const a=Math.round(r/o);return Math.min(a,i-1)};return t=class extends l.Component{constructor(){super(...arguments),this.selectByIndex=(r,o,i)=>{r<0||r>=l.Children.count(this.props.children)||!o||i(r*o)},this.doScrollingComplete=(r,o,i)=>{const a=l.Children.toArray(this.props.children),s=n(r,o,a.length),c=a[s];c?i(c.props.value):console.warn&&console.warn("child not found",a,s)},this.select=(r,o,i)=>{const a=l.Children.toArray(this.props.children);for(let s=0,c=a.length;s<c;s+=1)if(a[s].props.value===r){this.selectByIndex(s,o,i);return}this.selectByIndex(0,o,i)}}render(){return j.jsx(e,{...this.props,doScrollingComplete:this.doScrollingComplete,computeChildIndex:n,select:this.select})}},t.Item=QT,t}const eI=e=>{const{children:t,selectedValue:n,defaultSelectedValue:r,select:o,doScrollingComplete:i,onValueChange:a,computeChildIndex:s,disabled:c,className:u}=e,d=l.useRef(null),f=l.useRef(null),m=l.useRef(null),h=l.useRef(0),b=l.useRef(0),y=l.useMemo(()=>{if(n||r)return n||r;const k=l.Children.toArray(t);return k&&k[0]&&k[0].props.value},[t,r,n]),[T,S]=l.useState(y),v=(()=>{let k=-1,H=0,R=0,E=!1,p=!1;const $=(L,oe)=>{L.transform=oe},A=(L,oe)=>{L.transition=oe},M=(L,oe,G=.3)=>{var K,Z;k!==oe&&(k=oe,A((K=f.current)==null?void 0:K.style,`cubic-bezier(0,0,0.2,1.15) ${G}s`),$((Z=f.current)==null?void 0:Z.style,`translate3d(0,${-oe}px,0)`),setTimeout(()=>{P(),f.current&&A(f.current.style,"")},+G*1e3))},z=((L=30,oe=100)=>{let G=0,K=0,Z=0;const ce={record:W=>{const Y=+new Date;Z=(W-K)/(Y-G),Y-G>=L&&(Z=Y-G<=oe?Z:0,K=W,G=Y)},getVelocity:W=>(W!==K&&ce.record(W),Z)};return ce})(),U=()=>{p=!1;let L=k;const oe=(t.length-1)*h.current;let G=.3;const K=z.getVelocity(L)*4;K&&(L=K*40+L,G=Math.abs(K)*.1),L%h.current!==0&&(L=Math.round(L/h.current)*h.current),L<0?L=0:L>oe&&(L=oe),M(0,L,G<.3?.3:G),D()},re=L=>{E||(p=!0,R=L,H=k)},B=L=>{var oe;E||!p||(k=H-L+R,z.record(k),D(),$((oe=f.current)==null?void 0:oe.style,`translate3d(0,${-k}px,0)`))};return{touchstart:L=>re(L.touches[0].pageY),mousedown:L=>re(L.pageY),touchmove:L=>{L.preventDefault(),B(L.touches[0].pageY)},mousemove:L=>{L.preventDefault(),B(L.pageY)},touchend:()=>U(),touchcancel:()=>U(),mouseup:()=>U(),getValue:()=>k,scrollTo:M,setDisabled:(L=!1)=>{E=L}}})(),w=l.useCallback(k=>{v.scrollTo(0,k)},[v]),C=l.useCallback(k=>{v.scrollTo(0,k,0)},[v]),I=k=>{k!==T&&("selectedValue"in e||S(k),a&&a(k))},D=()=>{const k=v.getValue();if(k>=0){const H=l.Children.toArray(t),R=s(k,h.current,H.length);if(b.current!==R){b.current=R;const E=H[R];E&&e.onScrollChange?e.onScrollChange(E.props.value):!H&&console.warn&&console.warn("child not found",t,R)}}},P=()=>{const k=v.getValue();k>=0&&i(k,h.current,I)},F=()=>{const k=`${Vh} ${GT}`,H=E=>{const{className:p="",style:$,value:A}=E.props,M=T===A;return j.jsx("div",{style:{...$},"data-selected":M?"true":void 0,className:`${M?k:Vh} ${p}`,children:E.props.children},A)};return l.Children?l.Children.map(t,H):[].concat(t).map(H)};return l.useEffect(()=>{var E,p,$;const k=((E=d.current)==null?void 0:E.getBoundingClientRect().height)??0,H=((p=m.current)==null?void 0:p.getBoundingClientRect().height)??0;h.current=(($=m.current)==null?void 0:$.getBoundingClientRect().height)??0;let R=Math.floor(k/H);return R%2===0&&(R-=1),R-=1,R/=2,f.current.style.padding=`${H*R}px 0`,m.current.style.top=`${H*R}px`,v.setDisabled(c),o(T,h.current,w),Object.keys(v).forEach(A=>{var M;if(A.indexOf("touch")===0||A.indexOf("mouse")===0){const z=A.indexOf("move")>=0?{passive:!1}:{passive:!0};(M=d.current)==null||M.addEventListener(A,v[A],z)}}),()=>{Object.keys(v).forEach(A=>{var M;(A.indexOf("touch")===0||A.indexOf("mouse")===0)&&((M=d.current)==null||M.removeEventListener(A,v[A]))})}},[c,v,w,o,T]),l.useEffect(()=>{"selectedValue"in e&&T!==n&&S(n),v.setDisabled(c)},[n,T,e,v,c]),l.useEffect(()=>{o(T,h.current,C)},[C,o,T]),j.jsxs("div",{className:Pe(XT,u),ref:d,children:[j.jsx("div",{className:Pe(qT,u),ref:m}),j.jsx("div",{className:KT,ref:f,children:F()})]})},iu=JT(eI);var Mt=(e=>(e.DATE="date",e.MONTH="month",e.YEAR="year",e.DATE_TIME="datetime",e.TIME="time",e))(Mt||{});const qa=24*60*60*1e3,tI={am:"AM",pm:"PM"},rg=e=>new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),pc=e=>e<10?`0${e}`:`${e}`,Sr=e=>new Date(+e),nI=(e,t)=>{e.setDate(Math.min(e.getDate(),rg(new Date(e.getFullYear(),t)))),e.setMonth(t)},Bh=(e,t,n)=>{if(n){const r=e.getHours();let o=t;o=r>=12?t+12:t,o=o>=24?0:o,e.setHours(o)}else e.setHours(t)},Hh=(e,t)=>{t===0?e.setTime(+e-qa/2):e.setTime(+e+qa/2)},Wh=(e,t)=>(t&&(e===0&&(e=12),e>12&&(e-=12)),e),rI=e=>["January","February","March","April","May","June","July","August","September","October","November","December"][e],oI=e=>{const{date:t,defaultDate:n=new Date(2e3,0,1),locale:r=tI,mode:o="date",disabled:i=!1,className:a,minuteStep:s=1,use12Hours:c=!1,minDate:u,maxDate:d,formatDay:f,formatMonth:m}=e,[h,b]=l.useState(t||n),y=l.useRef(new Date(-1)),T=l.useRef(new Date);l.useEffect(()=>{"date"in e&&b(t||n)},[t,n,e]);const S=()=>$(h||y.current),v=()=>E().getFullYear(),w=()=>p().getFullYear(),C=()=>E().getMonth(),I=()=>p().getMonth(),D=()=>E().getDate(),P=()=>p().getDate(),F=()=>E().getHours(),k=()=>p().getHours(),H=()=>E().getMinutes(),R=()=>p().getMinutes(),E=()=>u||y.current,p=()=>d||T.current,$=G=>{const K=E(),Z=p();if(o===Mt.DATE_TIME){if(G<K)return Sr(K);if(G>Z)return Sr(Z)}else if(o===Mt.DATE||o===Mt.YEAR||o===Mt.MONTH){if(+G+qa<=K)return Sr(K);if(G>=+Z+qa)return Sr(Z)}else if(o===Mt.TIME){const ce=Z.getHours(),W=Z.getMinutes(),Y=K.getHours(),te=K.getMinutes(),J=G.getHours(),ie=G.getMinutes();if(J<Y||J===Y&&ie<te)return Sr(K);if(J>ce||J===ce&&ie>W)return Sr(Z)}return G},A=(G,K)=>{const Z=parseInt(G[K],10),ce=Sr(S());if(o===Mt.DATE_TIME||o===Mt.DATE||o===Mt.YEAR||o===Mt.MONTH)switch(K){case 0:ce.setDate(Z);break;case 1:nI(ce,Z);break;case 2:ce.setFullYear(Z);break;case 3:Bh(ce,Z);break;case 4:ce.setMinutes(Z);break;case 5:Hh(ce,Z);break}else if(o===Mt.TIME)switch(K){case 0:Bh(ce,Z);break;case 1:ce.setMinutes(Z);break;case 2:Hh(ce,Z);break}return $(ce)},M=(G,K)=>{const Z=A(G,K);"date"in e||b(Z),e.onDateChange&&e.onDateChange(Z),e.onValueChange&&e.onValueChange(G,K)},z=(G,K)=>{if(e.onScrollChange){const Z=A(G,K);e.onScrollChange(Z,G,K)}},U=()=>{const G=S(),K=G.getFullYear(),Z=G.getMonth(),ce=v(),W=w(),Y=C(),te=I(),J=D(),ie=P(),ee=[];for(let ze=ce;ze<=W;ze+=1)ee.push({value:`${ze}`,label:`${ze}`});const we={key:"year",props:{children:ee}};if(o===Mt.YEAR)return[we];const Te=[];let Oe=0,Ne=11;ce===K&&(Oe=Y),W===K&&(Ne=te);for(let ze=Oe;ze<=Ne;ze+=1){const xt=m?m(ze,G):rI(ze);Te.push({value:`${ze}`,label:xt})}const Re={key:"month",props:{children:Te}};if(o===Mt.MONTH)return[Re,we];const We=[];let De=1,ot=rg(G);ce===K&&Y===Z&&(De=J),W===K&&te===Z&&(ot=ie);for(let ze=De;ze<=ot;ze+=1){const xt=f?f(ze,G):`${ze}`;We.push({value:`${ze}`,label:xt})}return[{key:"day",props:{children:We}},Re,we]},re=G=>{let{minHour:K=0,maxHour:Z=23,minMinute:ce=0,maxMinute:W=59}=e;const Y=H(),te=R(),J=F(),ie=k(),ee=G.getHours();if(o===Mt.DATE_TIME){const Re=G.getFullYear(),We=G.getMonth(),De=G.getDate(),ot=v(),ze=w(),xt=C(),Xe=I(),Pt=D(),xe=P();ot===Re&&xt===We&&Pt===De&&(K=J,J===ee&&(ce=Y)),ze===Re&&Xe===We&&xe===De&&(Z=ie,ie===ee&&(W=te))}else K=J,J===ee&&(ce=Y),Z=ie,ie===ee&&(W=te);const we=[];K===0&&Z===0||K!==0&&Z!==0?K=Wh(K):K===0&&c&&(K=1,we.push({value:"0",label:"12"})),Z=Wh(Z);for(let Re=K;Re<=Z;Re+=1)we.push({value:`${Re}`,label:pc(Re)});const Te=[],Oe=G.getMinutes();for(let Re=ce;Re<=W;Re+=s)Te.push({value:`${Re}`,label:pc(Re)}),Oe>Re&&Oe<Re+s&&Te.push({value:`${Oe}`,label:pc(Oe)});return{cols:[{key:"hours",props:{children:we}},{key:"minutes",props:{children:Te}}].concat(c?[{key:"ampm",props:{children:[{value:"0",label:r.am},{value:"1",label:r.pm}]}}]:[]),selMinute:Oe}},B=()=>{const G=S();let K=[],Z=[];if(o===Mt.YEAR)return{cols:U(),value:[`${G.getFullYear()}`]};if(o===Mt.MONTH)return{cols:U(),value:[`${G.getMonth()}`,`${G.getFullYear()}`]};if((o===Mt.DATE_TIME||o===Mt.DATE)&&(K=U(),Z=[`${G.getDate()}`,`${G.getMonth()}`,`${G.getFullYear()}`]),o===Mt.DATE_TIME||o===Mt.TIME){const ce=re(G);K=K.concat(ce.cols);const W=G.getHours();let Y=[`${W}`,`${ce.selMinute}`],te=W;c&&(te=W>12?W-12:W,Y=[`${te}`,`${ce.selMinute}`,`${W>=12?1:0}`]),Z=Z.concat(Y)}return{value:Z,cols:K}},{value:L,cols:oe}=B();return j.jsx(ng,{className:a,selectedValue:L,onValueChange:M,onScrollChange:z,children:oe.map(G=>j.jsx(iu,{disabled:i,className:`picker-item-${G.key}`,children:G.props.children.map(K=>j.jsx(iu.Item,{value:K.value,children:K.label},K.value))},G.key))})};var au={exports:{}},gt={};/** @license React v17.0.2
159
+ }`),ge.bindAttribLocation(Ce,0,"vertex"),ge.bindAttribLocation(Ce,1,"uv"),ge.linkProgram(Ce),Me=ge.getProgramInfoLog(Ce),0<Me.trim().length)throw Me;q=ge.getUniformLocation(Ce,"mat"),ne=ge.getUniformLocation(Ce,"translate"),ge.useProgram(Ce),ge.bindBuffer(ge.ARRAY_BUFFER,ge.createBuffer()),ge.enableVertexAttribArray(0),ge.enableVertexAttribArray(1),ge.bindBuffer(ge.ELEMENT_ARRAY_BUFFER,ge.createBuffer()),ge.uniform1i(ge.getUniformLocation(Ce,"image"),0),ge.pixelStorei(ge.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),g=ge}return!0}let g=null,O=0,N=0,q=null,ne=null,ue=0,se=0;this.wb=function(){return _(),N},this.gb=function(Ce){if(!_())return null;const Me=g.createTexture();return g.bindTexture(g.TEXTURE_2D,Me),g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,Ce),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,g.LINEAR),O==2?(g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR_MIPMAP_LINEAR),g.generateMipmap(g.TEXTURE_2D)):g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,g.LINEAR),Me};const de=new S(8),le=new S(8),me=new S(10),Se=new S(10);this.kb=function(Ce,Me,ge,Et,Dt){if(_()){var Ve=de.push(Ce),Ye=le.push(Me);(g.canvas.width!=Ve||g.canvas.height!=Ye)&&(g.canvas.width=Ve,g.canvas.height=Ye),g.viewport(0,Ye-Me,Ce,Me),g.disable(g.SCISSOR_TEST),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),g.enable(g.SCISSOR_TEST),ge.sort((Je,or)=>or.Ua-Je.Ua),Ve=me.push(Et),ue!=Ve&&(g.bufferData(g.ARRAY_BUFFER,8*Ve,g.DYNAMIC_DRAW),ue=Ve),Ve=0;for(var Nt of ge)g.bufferSubData(g.ARRAY_BUFFER,Ve,Nt.Da),Ve+=4*Nt.Da.length;console.assert(Ve==4*Et);for(var ln of ge)g.bufferSubData(g.ARRAY_BUFFER,Ve,ln.Xa),Ve+=4*ln.Xa.length;console.assert(Ve==8*Et),Ve=Se.push(Dt),se!=Ve&&(g.bufferData(g.ELEMENT_ARRAY_BUFFER,2*Ve,g.DYNAMIC_DRAW),se=Ve),Nt=0;for(var zn of ge)g.bufferSubData(g.ELEMENT_ARRAY_BUFFER,Nt,zn.indices),Nt+=2*zn.indices.length;console.assert(Nt==2*Dt),zn=0,ln=!0,Ve=Nt=0;for(const Je of ge){Je.image.za!=zn&&(g.bindTexture(g.TEXTURE_2D,Je.image.cb||null),zn=Je.image.za),Je.zb?(g.scissor(Je.Ia,Ye-Je.Ja-Je.Pa,Je.Gb,Je.Pa),ln=!0):ln&&(g.scissor(0,Ye-Me,Ce,Me),ln=!1),ge=2/Ce;const or=-2/Me;g.uniform4f(q,Je.oa[0]*ge*Je.va,Je.oa[1]*or*Je.wa,Je.oa[2]*ge*Je.va,Je.oa[3]*or*Je.wa),g.uniform2f(ne,Je.oa[4]*ge*Je.va+ge*(Je.Ia-Je.xb*Je.va)-1,Je.oa[5]*or*Je.wa+or*(Je.Ja-Je.yb*Je.wa)+1),g.vertexAttribPointer(0,2,g.FLOAT,!1,0,Ve),g.vertexAttribPointer(1,2,g.FLOAT,!1,0,Ve+4*Et),g.drawElements(g.TRIANGLES,Je.indices.length,g.UNSIGNED_SHORT,Nt),Ve+=4*Je.Da.length,Nt+=2*Je.indices.length}console.assert(Ve==4*Et),console.assert(Nt==2*Dt)}},this.canvas=function(){return _()&&g.canvas}};h.onRuntimeInitialized=function(){function _(pe){switch(pe){case le.srcOver:return"source-over";case le.screen:return"screen";case le.overlay:return"overlay";case le.darken:return"darken";case le.lighten:return"lighten";case le.colorDodge:return"color-dodge";case le.colorBurn:return"color-burn";case le.hardLight:return"hard-light";case le.softLight:return"soft-light";case le.difference:return"difference";case le.exclusion:return"exclusion";case le.multiply:return"multiply";case le.hue:return"hue";case le.saturation:return"saturation";case le.color:return"color";case le.luminosity:return"luminosity"}}function g(pe){return"rgba("+((16711680&pe)>>>16)+","+((65280&pe)>>>8)+","+((255&pe)>>>0)+","+((4278190080&pe)>>>24)/255+")"}function O(){0<Nt.length&&(v.kb(Ye.drawWidth(),Ye.drawHeight(),Nt,ln,zn),Nt=[],zn=ln=0,Ye.reset(512,512));for(const pe of Ve){for(const ke of pe.da)ke();pe.da=[]}Ve.clear()}var N=h.RenderPaintStyle;const q=h.RenderPath,ne=h.RenderPaint,ue=h.Renderer,se=h.StrokeCap,de=h.StrokeJoin,le=h.BlendMode,me=N.fill,Se=N.stroke,Ce=h.FillRule.evenOdd;let Me=1;var ge=h.RenderImage.extend("CanvasRenderImage",{__construct:function(){this.__parent.__construct.call(this),this.za=Me,Me=Me+1&2147483647||1},decode:function(pe){let ke=Bs;ke.total++;var pt=this,ut=new Image;ut.src=URL.createObjectURL(new Blob([pe],{type:"image/png"})),ut.onload=function(){if(pt.ab=ut,pt.cb=v.gb(ut),pt.size(ut.width,ut.height),ke.loaded++,ke.loaded===ke.total){const vt=ke.ready;vt&&(vt(),ke.ready=null)}}}}),Et=q.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.ia=new Path2D},rewind:function(){this.ia=new Path2D},addPath:function(pe,ke,pt,ut,vt,$t,rt){var dt=this.ia,bn=dt.addPath;pe=pe.ia;const Ft=new DOMMatrix;Ft.a=ke,Ft.b=pt,Ft.c=ut,Ft.d=vt,Ft.e=$t,Ft.f=rt,bn.call(dt,pe,Ft)},fillRule:function(pe){this.Ga=pe},moveTo:function(pe,ke){this.ia.moveTo(pe,ke)},lineTo:function(pe,ke){this.ia.lineTo(pe,ke)},cubicTo:function(pe,ke,pt,ut,vt,$t){this.ia.bezierCurveTo(pe,ke,pt,ut,vt,$t)},close:function(){this.ia.closePath()}}),Dt=ne.extend("CanvasRenderPaint",{color:function(pe){this.Ha=g(pe)},thickness:function(pe){this.eb=pe},join:function(pe){switch(pe){case de.miter:this.ya="miter";break;case de.round:this.ya="round";break;case de.bevel:this.ya="bevel"}},cap:function(pe){switch(pe){case se.butt:this.xa="butt";break;case se.round:this.xa="round";break;case se.square:this.xa="square"}},style:function(pe){this.bb=pe},blendMode:function(pe){this.$a=_(pe)},clearGradient:function(){this.qa=null},linearGradient:function(pe,ke,pt,ut){this.qa={Va:pe,Wa:ke,La:pt,Ma:ut,Ca:[]}},radialGradient:function(pe,ke,pt,ut){this.qa={Va:pe,Wa:ke,La:pt,Ma:ut,Ca:[],ub:!0}},addStop:function(pe,ke){this.qa.Ca.push({color:pe,stop:ke})},completeGradient:function(){},draw:function(pe,ke,pt){let ut=this.bb;var vt=this.Ha,$t=this.qa;if(pe.globalCompositeOperation=this.$a,$t!=null){vt=$t.Va;var rt=$t.Wa;const bn=$t.La;var dt=$t.Ma;const Ft=$t.Ca;$t.ub?($t=bn-vt,dt-=rt,vt=pe.createRadialGradient(vt,rt,0,vt,rt,Math.sqrt($t*$t+dt*dt))):vt=pe.createLinearGradient(vt,rt,bn,dt);for(let Mn=0,Bt=Ft.length;Mn<Bt;Mn++)rt=Ft[Mn],vt.addColorStop(rt.stop,g(rt.color));this.Ha=vt,this.qa=null}switch(ut){case Se:pe.strokeStyle=vt,pe.lineWidth=this.eb,pe.lineCap=this.xa,pe.lineJoin=this.ya,pe.stroke(ke);break;case me:pe.fillStyle=vt,pe.fill(ke,pt)}}});const Ve=new Set;let Ye=null,Nt=[],ln=0,zn=0;var Je=h.CanvasRenderer=ue.extend("Renderer",{__construct:function(pe){this.__parent.__construct.call(this),this.ha=[1,0,0,1,0,0],this.ba=pe.getContext("2d"),this.Fa=pe,this.da=[]},save:function(){this.ha.push(...this.ha.slice(this.ha.length-6)),this.da.push(this.ba.save.bind(this.ba))},restore:function(){const pe=this.ha.length-6;if(6>pe)throw"restore() called without matching save().";this.ha.splice(pe),this.da.push(this.ba.restore.bind(this.ba))},transform:function(pe,ke,pt,ut,vt,$t){const rt=this.ha,dt=rt.length-6;rt.splice(dt,6,rt[dt]*pe+rt[dt+2]*ke,rt[dt+1]*pe+rt[dt+3]*ke,rt[dt]*pt+rt[dt+2]*ut,rt[dt+1]*pt+rt[dt+3]*ut,rt[dt]*vt+rt[dt+2]*$t+rt[dt+4],rt[dt+1]*vt+rt[dt+3]*$t+rt[dt+5]),this.da.push(this.ba.transform.bind(this.ba,pe,ke,pt,ut,vt,$t))},rotate:function(pe){const ke=Math.sin(pe);pe=Math.cos(pe),this.transform(pe,ke,-ke,pe,0,0)},_drawPath:function(pe,ke){this.da.push(ke.draw.bind(ke,this.ba,pe.ia,pe.Ga===Ce?"evenodd":"nonzero"))},drawImage:function(pe,...ke){var pt=this.ba;this.da.push(function(){pt.drawImage(pe,...ke)})},_drawRiveImage:function(pe,ke,pt){var ut=pe.ab;if(ut){var vt=this.ba,$t=_(ke);this.da.push(function(){vt.globalCompositeOperation=$t,vt.globalAlpha=pt,vt.drawImage(ut,0,0),vt.globalAlpha=1})}},_getMatrix:function(pe){const ke=this.ha,pt=ke.length-6;for(let ut=0;6>ut;++ut)pe[ut]=ke[pt+ut]},_drawImageMesh:function(pe,ke,pt,ut,vt,$t,rt,dt,bn,Ft){var Mn=this.ba.canvas.width,Bt=this.ba.canvas.height;const Cd=bn-rt,$d=Ft-dt;rt=Math.max(rt,0),dt=Math.max(dt,0),bn=Math.min(bn,Mn),Ft=Math.min(Ft,Bt);const So=bn-rt,Co=Ft-dt;if(console.assert(So<=Math.min(Cd,Mn)),console.assert(Co<=Math.min($d,Bt)),!(0>=So||0>=Co)){bn=So<Cd||Co<$d,Mn=Ft=1;var xr=Math.ceil(So*Ft),_r=Math.ceil(Co*Mn);Bt=v.wb(),xr>Bt&&(Ft*=Bt/xr,xr=Bt),_r>Bt&&(Mn*=Bt/_r,_r=Bt),Ye||(Ye=new h.DynamicRectanizer(Bt),Ye.reset(512,512)),Bt=Ye.addRect(xr,_r),0>Bt&&(O(),Ve.add(this),Bt=Ye.addRect(xr,_r),console.assert(0<=Bt));var Td=Bt&65535,Id=Bt>>16;Nt.push({oa:this.ha.slice(this.ha.length-6),image:pe,Ia:Td,Ja:Id,xb:rt,yb:dt,Gb:xr,Pa:_r,va:Ft,wa:Mn,Da:new Float32Array(ut),Xa:new Float32Array(vt),indices:new Uint16Array($t),zb:bn,Ua:pe.za<<1|(bn?1:0)}),ln+=ut.length,zn+=$t.length;var Hr=this.ba,jy=_(ke);this.da.push(function(){Hr.save(),Hr.resetTransform(),Hr.globalCompositeOperation=jy,Hr.globalAlpha=pt,Hr.drawImage(v.canvas(),Td,Id,xr,_r,rt,dt,So,Co),Hr.restore()})}},_clipPath:function(pe){this.da.push(this.ba.clip.bind(this.ba,pe.ia,pe.Ga===Ce?"evenodd":"nonzero"))},clear:function(){Ve.add(this),this.da.push(this.ba.clearRect.bind(this.ba,0,0,this.Fa.width,this.Fa.height))},flush:function(){},translate:function(pe,ke){this.transform(1,0,0,1,pe,ke)}});h.makeRenderer=function(pe){return new Je(pe)},h.renderFactory={makeRenderPaint:function(){return new Dt},makeRenderPath:function(){return new Et},makeRenderImage:function(){return new ge}};let or=h.load,Bs=null;h.load=function(pe){return new Promise(function(ke){let pt=null;Bs={total:0,loaded:0,ready:function(){ke(pt)}},pt=or(pe),Bs.total==0&&ke(pt)})},N=new T,h.requestAnimationFrame=N.requestAnimationFrame.bind(N),h.cancelAnimationFrame=N.cancelAnimationFrame.bind(N),h.enableFPSCounter=N.lb.bind(N),h.disableFPSCounter=N.ib,N.Qa=O,h.cleanup=function(){Ye&&Ye.delete()}};var w=Object.assign({},h),C="./this.program",I=typeof window=="object",D=typeof importScripts=="function",P="",F,k;(I||D)&&(D?P=self.location.href:typeof document<"u"&&document.currentScript&&(P=document.currentScript.src),f&&(P=f),P.indexOf("blob:")!==0?P=P.substr(0,P.replace(/[?#].*/,"").lastIndexOf("/")+1):P="",D&&(k=_=>{var g=new XMLHttpRequest;return g.open("GET",_,!1),g.responseType="arraybuffer",g.send(null),new Uint8Array(g.response)}),F=(_,g,O)=>{var N=new XMLHttpRequest;N.open("GET",_,!0),N.responseType="arraybuffer",N.onload=()=>{N.status==200||N.status==0&&N.response?g(N.response):O()},N.onerror=O,N.send(null)});var H=h.print||console.log.bind(console),R=h.printErr||console.error.bind(console);Object.assign(h,w),w=null,h.thisProgram&&(C=h.thisProgram);var E;h.wasmBinary&&(E=h.wasmBinary),h.noExitRuntime,typeof WebAssembly!="object"&&ie("no native wasm support detected");var p,$=!1,A,M,z,U,re,B,L,oe;function G(){var _=p.buffer;h.HEAP8=A=new Int8Array(_),h.HEAP16=z=new Int16Array(_),h.HEAP32=re=new Int32Array(_),h.HEAPU8=M=new Uint8Array(_),h.HEAPU16=U=new Uint16Array(_),h.HEAPU32=B=new Uint32Array(_),h.HEAPF32=L=new Float32Array(_),h.HEAPF64=oe=new Float64Array(_)}var K,Z=[],ce=[],W=[];function Y(){var _=h.preRun.shift();Z.unshift(_)}var te=0,J=null;function ie(_){throw h.onAbort&&h.onAbort(_),_="Aborted("+_+")",R(_),$=!0,_=new WebAssembly.RuntimeError(_+". Build with -sASSERTIONS for more info."),y(_),_}function ee(_){return _.startsWith("data:application/octet-stream;base64,")}var we;if(we="canvas_advanced.wasm",!ee(we)){var Te=we;we=h.locateFile?h.locateFile(Te,P):P+Te}function Oe(_){if(_==we&&E)return new Uint8Array(E);if(k)return k(_);throw"both async and sync fetching of the wasm failed"}function Ne(_){if(!E&&(I||D)){if(typeof fetch=="function"&&!_.startsWith("file://"))return fetch(_,{credentials:"same-origin"}).then(g=>{if(!g.ok)throw"failed to load wasm binary file at '"+_+"'";return g.arrayBuffer()}).catch(()=>Oe(_));if(F)return new Promise((g,O)=>{F(_,N=>g(new Uint8Array(N)),O)})}return Promise.resolve().then(()=>Oe(_))}function Re(_,g,O){return Ne(_).then(N=>WebAssembly.instantiate(N,g)).then(N=>N).then(O,N=>{R("failed to asynchronously prepare wasm: "+N),ie(N)})}function We(_,g){var O=we;return E||typeof WebAssembly.instantiateStreaming!="function"||ee(O)||O.startsWith("file://")||typeof fetch!="function"?Re(O,_,g):fetch(O,{credentials:"same-origin"}).then(N=>WebAssembly.instantiateStreaming(N,_).then(g,function(q){return R("wasm streaming compile failed: "+q),R("falling back to ArrayBuffer instantiation"),Re(O,_,g)}))}var De=_=>{for(;0<_.length;)_.shift()(h)};function ot(_){if(_===void 0)return"_unknown";_=_.replace(/[^a-zA-Z0-9_]/g,"$");var g=_.charCodeAt(0);return 48<=g&&57>=g?`_${_}`:_}function ze(_,g){return _=ot(_),{[_]:function(){return g.apply(this,arguments)}}[_]}function xt(){this.ja=[void 0],this.Oa=[]}var Xe=new xt,Pt=void 0;function xe(_){throw new Pt(_)}var ct=_=>(_||xe("Cannot use deleted val. handle = "+_),Xe.get(_).value),je=_=>{switch(_){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Xe.Ya({Ta:1,value:_})}};function Zt(_){var g=Error,O=ze(_,function(N){this.name=_,this.message=N,N=Error(N).stack,N!==void 0&&(this.stack=this.toString()+`
160
+ `+N.replace(/^Error(:[^\n]*)?\n/,""))});return O.prototype=Object.create(g.prototype),O.prototype.constructor=O,O.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},O}var Ct=void 0,tt=void 0;function Fe(_){for(var g="";M[_];)g+=tt[M[_++]];return g}var mt=[];function nn(){for(;mt.length;){var _=mt.pop();_.W.na=!1,_.delete()}}var rn=void 0,Qt={};function he(_,g){for(g===void 0&&xe("ptr should not be undefined");_.$;)g=_.ra(g),_=_.$;return g}var Ue={};function kt(_){_=_d(_);var g=Fe(_);return Wn(_),g}function At(_,g){var O=Ue[_];return O===void 0&&xe(g+" has unknown type "+kt(_)),O}function Jt(){}var Ot=!1;function yn(_){--_.count.value,_.count.value===0&&(_.ca?_.fa.ka(_.ca):_.Z.X.ka(_.Y))}function Lt(_,g,O){return g===O?_:O.$===void 0?null:(_=Lt(_,g,O.$),_===null?null:O.jb(_))}var Dn={};function tr(_,g){return g=he(_,g),Qt[g]}var un=void 0;function $n(_){throw new un(_)}function Ht(_,g){return g.Z&&g.Y||$n("makeClassHandle requires ptr and ptrType"),!!g.fa!=!!g.ca&&$n("Both smartPtrType and smartPtr must be specified"),g.count={value:1},en(Object.create(_,{W:{value:g}}))}function en(_){return typeof FinalizationRegistry>"u"?(en=g=>g,_):(Ot=new FinalizationRegistry(g=>{yn(g.W)}),en=g=>{var O=g.W;return O.ca&&Ot.register(g,{W:O},g),g},Jt=g=>{Ot.unregister(g)},en(_))}var Nn={};function Kt(_){for(;_.length;){var g=_.pop();_.pop()(g)}}function Tn(_){return this.fromWireType(re[_>>2])}var kn={},nr={};function Wt(_,g,O){function N(se){se=O(se),se.length!==_.length&&$n("Mismatched type converter count");for(var de=0;de<_.length;++de)V(_[de],se[de])}_.forEach(function(se){nr[se]=g});var q=Array(g.length),ne=[],ue=0;g.forEach((se,de)=>{Ue.hasOwnProperty(se)?q[de]=Ue[se]:(ne.push(se),kn.hasOwnProperty(se)||(kn[se]=[]),kn[se].push(()=>{q[de]=Ue[se],++ue,ue===ne.length&&N(q)}))}),ne.length===0&&N(q)}function rr(_){switch(_){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${_}`)}}function x(_,g,O={}){var N=g.name;if(_||xe(`type "${N}" must have a positive integer typeid pointer`),Ue.hasOwnProperty(_)){if(O.tb)return;xe(`Cannot register type '${N}' twice`)}Ue[_]=g,delete nr[_],kn.hasOwnProperty(_)&&(g=kn[_],delete kn[_],g.forEach(q=>q()))}function V(_,g,O={}){if(!("argPackAdvance"in g))throw new TypeError("registerType registeredInstance requires argPackAdvance");x(_,g,O)}function Q(_){xe(_.W.Z.X.name+" instance already deleted")}function fe(){}function _e(_,g,O){if(_[g].aa===void 0){var N=_[g];_[g]=function(){return _[g].aa.hasOwnProperty(arguments.length)||xe(`Function '${O}' called with an invalid number of arguments (${arguments.length}) - expects one of (${_[g].aa})!`),_[g].aa[arguments.length].apply(this,arguments)},_[g].aa=[],_[g].aa[N.ma]=N}}function Ie(_,g,O){h.hasOwnProperty(_)?((O===void 0||h[_].aa!==void 0&&h[_].aa[O]!==void 0)&&xe(`Cannot register public name '${_}' twice`),_e(h,_,_),h.hasOwnProperty(O)&&xe(`Cannot register multiple overloads of a function with the same number of arguments (${O})!`),h[_].aa[O]=g):(h[_]=g,O!==void 0&&(h[_].Hb=O))}function Ee(_,g,O,N,q,ne,ue,se){this.name=_,this.constructor=g,this.ga=O,this.ka=N,this.$=q,this.ob=ne,this.ra=ue,this.jb=se,this.Ra=[]}function be(_,g,O){for(;g!==O;)g.ra||xe(`Expected null or instance of ${O.name}, got an instance of ${g.name}`),_=g.ra(_),g=g.$;return _}function nt(_,g){return g===null?(this.Aa&&xe(`null is not a valid ${this.name}`),0):(g.W||xe(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||xe(`Cannot pass deleted object as a pointer of type ${this.name}`),be(g.W.Y,g.W.Z.X,this.X))}function Le(_,g){if(g===null){if(this.Aa&&xe(`null is not a valid ${this.name}`),this.ua){var O=this.Ba();return _!==null&&_.push(this.ka,O),O}return 0}if(g.W||xe(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||xe(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.ta&&g.W.Z.ta&&xe(`Cannot convert argument of type ${g.W.fa?g.W.fa.name:g.W.Z.name} to parameter type ${this.name}`),O=be(g.W.Y,g.W.Z.X,this.X),this.ua)switch(g.W.ca===void 0&&xe("Passing raw pointer to smart pointer is illegal"),this.Fb){case 0:g.W.fa===this?O=g.W.ca:xe(`Cannot convert argument of type ${g.W.fa?g.W.fa.name:g.W.Z.name} to parameter type ${this.name}`);break;case 1:O=g.W.ca;break;case 2:if(g.W.fa===this)O=g.W.ca;else{var N=g.clone();O=this.Bb(O,je(function(){N.delete()})),_!==null&&_.push(this.ka,O)}break;default:xe("Unsupporting sharing policy")}return O}function Be(_,g){return g===null?(this.Aa&&xe(`null is not a valid ${this.name}`),0):(g.W||xe(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||xe(`Cannot pass deleted object as a pointer of type ${this.name}`),g.W.Z.ta&&xe(`Cannot convert argument of type ${g.W.Z.name} to parameter type ${this.name}`),be(g.W.Y,g.W.Z.X,this.X))}function Ge(_,g,O,N){this.name=_,this.X=g,this.Aa=O,this.ta=N,this.ua=!1,this.ka=this.Bb=this.Ba=this.Sa=this.Fb=this.Ab=void 0,g.$!==void 0?this.toWireType=Le:(this.toWireType=N?nt:Be,this.ea=null)}function qt(_,g,O){h.hasOwnProperty(_)||$n("Replacing nonexistant public symbol"),h[_].aa!==void 0&&O!==void 0?h[_].aa[O]=g:(h[_]=g,h[_].ma=O)}var Er=(_,g)=>{var O=[];return function(){if(O.length=0,Object.assign(O,arguments),_.includes("j")){var N=h["dynCall_"+_];N=O&&O.length?N.apply(null,[g].concat(O)):N.call(null,g)}else N=K.get(g).apply(null,O);return N}};function qe(_,g){_=Fe(_);var O=_.includes("j")?Er(_,g):K.get(g);return typeof O!="function"&&xe(`unknown function pointer with signature ${_}: ${g}`),O}var vd=void 0;function Hn(_,g){function O(ne){q[ne]||Ue[ne]||(nr[ne]?nr[ne].forEach(O):(N.push(ne),q[ne]=!0))}var N=[],q={};throw g.forEach(O),new vd(`${_}: `+N.map(kt).join([", "]))}function ki(_,g,O,N,q){var ne=g.length;2>ne&&xe("argTypes array size mismatch! Must at least get return value and 'this' types!");var ue=g[1]!==null&&O!==null,se=!1;for(O=1;O<g.length;++O)if(g[O]!==null&&g[O].ea===void 0){se=!0;break}var de=g[0].name!=="void",le=ne-2,me=Array(le),Se=[],Ce=[];return function(){if(arguments.length!==le&&xe(`function ${_} called with ${arguments.length} arguments, expected ${le} args!`),Ce.length=0,Se.length=ue?2:1,Se[0]=q,ue){var Me=g[1].toWireType(Ce,this);Se[1]=Me}for(var ge=0;ge<le;++ge)me[ge]=g[ge+2].toWireType(Ce,arguments[ge]),Se.push(me[ge]);if(ge=N.apply(null,Se),se)Kt(Ce);else for(var Et=ue?1:2;Et<g.length;Et++){var Dt=Et===1?Me:me[Et-2];g[Et].ea!==null&&g[Et].ea(Dt)}return Me=de?g[0].fromWireType(ge):void 0,Me}}function Mi(_,g){for(var O=[],N=0;N<_;N++)O.push(B[g+4*N>>2]);return O}function md(_,g,O){return _ instanceof Object||xe(`${O} with invalid "this": ${_}`),_ instanceof g.X.constructor||xe(`${O} incompatible with "this" of type ${_.constructor.name}`),_.W.Y||xe(`cannot call emscripten binding method ${O} on deleted object`),be(_.W.Y,_.W.Z.X,g.X)}function Ms(_){_>=Xe.Ea&&--Xe.get(_).Ta===0&&Xe.Za(_)}function _y(_,g,O){switch(g){case 0:return function(N){return this.fromWireType((O?A:M)[N])};case 1:return function(N){return this.fromWireType((O?z:U)[N>>1])};case 2:return function(N){return this.fromWireType((O?re:B)[N>>2])};default:throw new TypeError("Unknown integer type: "+_)}}function js(_){if(_===null)return"null";var g=typeof _;return g==="object"||g==="array"||g==="function"?_.toString():""+_}function Sy(_,g){switch(g){case 2:return function(O){return this.fromWireType(L[O>>2])};case 3:return function(O){return this.fromWireType(oe[O>>3])};default:throw new TypeError("Unknown float type: "+_)}}function Cy(_,g,O){switch(g){case 0:return O?function(N){return A[N]}:function(N){return M[N]};case 1:return O?function(N){return z[N>>1]}:function(N){return U[N>>1]};case 2:return O?function(N){return re[N>>2]}:function(N){return B[N>>2]};default:throw new TypeError("Unknown integer type: "+_)}}var gd=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,yd=(_,g,O)=>{var N=g+O;for(O=g;_[O]&&!(O>=N);)++O;if(16<O-g&&_.buffer&&gd)return gd.decode(_.subarray(g,O));for(N="";g<O;){var q=_[g++];if(q&128){var ne=_[g++]&63;if((q&224)==192)N+=String.fromCharCode((q&31)<<6|ne);else{var ue=_[g++]&63;q=(q&240)==224?(q&15)<<12|ne<<6|ue:(q&7)<<18|ne<<12|ue<<6|_[g++]&63,65536>q?N+=String.fromCharCode(q):(q-=65536,N+=String.fromCharCode(55296|q>>10,56320|q&1023))}}else N+=String.fromCharCode(q)}return N},bd=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,$y=(_,g)=>{for(var O=_>>1,N=O+g/2;!(O>=N)&&U[O];)++O;if(O<<=1,32<O-_&&bd)return bd.decode(M.subarray(_,O));for(O="",N=0;!(N>=g/2);++N){var q=z[_+2*N>>1];if(q==0)break;O+=String.fromCharCode(q)}return O},Ty=(_,g,O)=>{if(O===void 0&&(O=2147483647),2>O)return 0;O-=2;var N=g;O=O<2*_.length?O/2:_.length;for(var q=0;q<O;++q)z[g>>1]=_.charCodeAt(q),g+=2;return z[g>>1]=0,g-N},Iy=_=>2*_.length,Ry=(_,g)=>{for(var O=0,N="";!(O>=g/4);){var q=re[_+4*O>>2];if(q==0)break;++O,65536<=q?(q-=65536,N+=String.fromCharCode(55296|q>>10,56320|q&1023)):N+=String.fromCharCode(q)}return N},Oy=(_,g,O)=>{if(O===void 0&&(O=2147483647),4>O)return 0;var N=g;O=N+O-4;for(var q=0;q<_.length;++q){var ne=_.charCodeAt(q);if(55296<=ne&&57343>=ne){var ue=_.charCodeAt(++q);ne=65536+((ne&1023)<<10)|ue&1023}if(re[g>>2]=ne,g+=4,g+4>O)break}return re[g>>2]=0,g-N},Py=_=>{for(var g=0,O=0;O<_.length;++O){var N=_.charCodeAt(O);55296<=N&&57343>=N&&++O,g+=4}return g},Ay={};function ji(_){var g=Ay[_];return g===void 0?Fe(_):g}var Li=[];function Dy(_){var g=Li.length;return Li.push(_),g}function Ny(_,g){for(var O=Array(_),N=0;N<_;++N)O[N]=At(B[g+4*N>>2],"parameter "+N);return O}var wd=[],Ls={},Ed=()=>{if(!Fs){var _={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:C||"./this.program"},g;for(g in Ls)Ls[g]===void 0?delete _[g]:_[g]=Ls[g];var O=[];for(g in _)O.push(`${g}=${_[g]}`);Fs=O}return Fs},Fs,ky=[null,[],[]];Object.assign(xt.prototype,{get(_){return this.ja[_]},has(_){return this.ja[_]!==void 0},Ya(_){var g=this.Oa.pop()||this.ja.length;return this.ja[g]=_,g},Za(_){this.ja[_]=void 0,this.Oa.push(_)}}),Pt=h.BindingError=class extends Error{constructor(_){super(_),this.name="BindingError"}},Xe.ja.push({value:void 0},{value:null},{value:!0},{value:!1}),Xe.Ea=Xe.ja.length,h.count_emval_handles=function(){for(var _=0,g=Xe.Ea;g<Xe.ja.length;++g)Xe.ja[g]!==void 0&&++_;return _},Ct=h.PureVirtualError=Zt("PureVirtualError");for(var xd=Array(256),Fi=0;256>Fi;++Fi)xd[Fi]=String.fromCharCode(Fi);tt=xd,h.getInheritedInstanceCount=function(){return Object.keys(Qt).length},h.getLiveInheritedInstances=function(){var _=[],g;for(g in Qt)Qt.hasOwnProperty(g)&&_.push(Qt[g]);return _},h.flushPendingDeletes=nn,h.setDelayFunction=function(_){rn=_,mt.length&&rn&&rn(nn)},un=h.InternalError=class extends Error{constructor(_){super(_),this.name="InternalError"}},fe.prototype.isAliasOf=function(_){if(!(this instanceof fe&&_ instanceof fe))return!1;var g=this.W.Z.X,O=this.W.Y,N=_.W.Z.X;for(_=_.W.Y;g.$;)O=g.ra(O),g=g.$;for(;N.$;)_=N.ra(_),N=N.$;return g===N&&O===_},fe.prototype.clone=function(){if(this.W.Y||Q(this),this.W.pa)return this.W.count.value+=1,this;var _=en,g=Object,O=g.create,N=Object.getPrototypeOf(this),q=this.W;return _=_(O.call(g,N,{W:{value:{count:q.count,na:q.na,pa:q.pa,Y:q.Y,Z:q.Z,ca:q.ca,fa:q.fa}}})),_.W.count.value+=1,_.W.na=!1,_},fe.prototype.delete=function(){this.W.Y||Q(this),this.W.na&&!this.W.pa&&xe("Object already scheduled for deletion"),Jt(this),yn(this.W),this.W.pa||(this.W.ca=void 0,this.W.Y=void 0)},fe.prototype.isDeleted=function(){return!this.W.Y},fe.prototype.deleteLater=function(){return this.W.Y||Q(this),this.W.na&&!this.W.pa&&xe("Object already scheduled for deletion"),mt.push(this),mt.length===1&&rn&&rn(nn),this.W.na=!0,this},Ge.prototype.pb=function(_){return this.Sa&&(_=this.Sa(_)),_},Ge.prototype.Ka=function(_){this.ka&&this.ka(_)},Ge.prototype.argPackAdvance=8,Ge.prototype.readValueFromPointer=Tn,Ge.prototype.deleteObject=function(_){_!==null&&_.delete()},Ge.prototype.fromWireType=function(_){function g(){return this.ua?Ht(this.X.ga,{Z:this.Ab,Y:O,fa:this,ca:_}):Ht(this.X.ga,{Z:this,Y:_})}var O=this.pb(_);if(!O)return this.Ka(_),null;var N=tr(this.X,O);if(N!==void 0)return N.W.count.value===0?(N.W.Y=O,N.W.ca=_,N.clone()):(N=N.clone(),this.Ka(_),N);if(N=this.X.ob(O),N=Dn[N],!N)return g.call(this);N=this.ta?N.fb:N.pointerType;var q=Lt(O,this.X,N.X);return q===null?g.call(this):this.ua?Ht(N.X.ga,{Z:N,Y:q,fa:this,ca:_}):Ht(N.X.ga,{Z:N,Y:q})},vd=h.UnboundTypeError=Zt("UnboundTypeError");var My={I:function(_,g,O){_=Fe(_),g=At(g,"wrapper"),O=ct(O);var N=[].slice,q=g.X,ne=q.ga,ue=q.$.ga,se=q.$.constructor;_=ze(_,function(){q.$.Ra.forEach((function(le){if(this[le]===ue[le])throw new Ct(`Pure virtual function ${le} must be implemented in JavaScript`)}).bind(this)),Object.defineProperty(this,"__parent",{value:ne}),this.__construct.apply(this,N.call(arguments))}),ne.__construct=function(){this===ne&&xe("Pass correct 'this' to __construct");var le=se.implement.apply(void 0,[this].concat(N.call(arguments)));Jt(le);var me=le.W;le.notifyOnDestruction(),me.pa=!0,Object.defineProperties(this,{W:{value:me}}),en(this),le=me.Y,le=he(q,le),Qt.hasOwnProperty(le)?xe(`Tried to register registered instance: ${le}`):Qt[le]=this},ne.__destruct=function(){this===ne&&xe("Pass correct 'this' to __destruct"),Jt(this);var le=this.W.Y;le=he(q,le),Qt.hasOwnProperty(le)?delete Qt[le]:xe(`Tried to unregister unregistered instance: ${le}`)},_.prototype=Object.create(ne);for(var de in O)_.prototype[de]=O[de];return je(_)},L:function(_){var g=Nn[_];delete Nn[_];var O=g.Ba,N=g.ka,q=g.Na,ne=q.map(ue=>ue.sb).concat(q.map(ue=>ue.Db));Wt([_],ne,ue=>{var se={};return q.forEach((de,le)=>{var me=ue[le],Se=de.qb,Ce=de.rb,Me=ue[le+q.length],ge=de.Cb,Et=de.Eb;se[de.mb]={read:Dt=>me.fromWireType(Se(Ce,Dt)),write:(Dt,Ve)=>{var Ye=[];ge(Et,Dt,Me.toWireType(Ye,Ve)),Kt(Ye)}}}),[{name:g.name,fromWireType:function(de){var le={},me;for(me in se)le[me]=se[me].read(de);return N(de),le},toWireType:function(de,le){for(var me in se)if(!(me in le))throw new TypeError(`Missing field: "${me}"`);var Se=O();for(me in se)se[me].write(Se,le[me]);return de!==null&&de.push(N,Se),Se},argPackAdvance:8,readValueFromPointer:Tn,ea:N}]})},z:function(){},G:function(_,g,O,N,q){var ne=rr(O);g=Fe(g),V(_,{name:g,fromWireType:function(ue){return!!ue},toWireType:function(ue,se){return se?N:q},argPackAdvance:8,readValueFromPointer:function(ue){if(O===1)var se=A;else if(O===2)se=z;else if(O===4)se=re;else throw new TypeError("Unknown boolean type size: "+g);return this.fromWireType(se[ue>>ne])},ea:null})},e:function(_,g,O,N,q,ne,ue,se,de,le,me,Se,Ce){me=Fe(me),ne=qe(q,ne),se&&(se=qe(ue,se)),le&&(le=qe(de,le)),Ce=qe(Se,Ce);var Me=ot(me);Ie(Me,function(){Hn(`Cannot construct ${me} due to unbound types`,[N])}),Wt([_,g,O],N?[N]:[],function(ge){if(ge=ge[0],N)var Et=ge.X,Dt=Et.ga;else Dt=fe.prototype;ge=ze(Me,function(){if(Object.getPrototypeOf(this)!==Ve)throw new Pt("Use 'new' to construct "+me);if(Ye.la===void 0)throw new Pt(me+" has no accessible constructor");var ln=Ye.la[arguments.length];if(ln===void 0)throw new Pt(`Tried to invoke ctor of ${me} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(Ye.la).toString()}) parameters instead!`);return ln.apply(this,arguments)});var Ve=Object.create(Dt,{constructor:{value:ge}});ge.prototype=Ve;var Ye=new Ee(me,ge,Ve,Ce,Et,ne,se,le);Ye.$&&(Ye.$.sa===void 0&&(Ye.$.sa=[]),Ye.$.sa.push(Ye)),Et=new Ge(me,Ye,!0,!1),Dt=new Ge(me+"*",Ye,!1,!1);var Nt=new Ge(me+" const*",Ye,!1,!0);return Dn[_]={pointerType:Dt,fb:Nt},qt(Me,ge),[Et,Dt,Nt]})},k:function(_,g,O,N,q,ne,ue){var se=Mi(O,N);g=Fe(g),ne=qe(q,ne),Wt([],[_],function(de){function le(){Hn(`Cannot call ${me} due to unbound types`,se)}de=de[0];var me=`${de.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]);var Se=de.X.constructor;return Se[g]===void 0?(le.ma=O-1,Se[g]=le):(_e(Se,g,me),Se[g].aa[O-1]=le),Wt([],se,function(Ce){if(Ce=ki(me,[Ce[0],null].concat(Ce.slice(1)),null,ne,ue),Se[g].aa===void 0?(Ce.ma=O-1,Se[g]=Ce):Se[g].aa[O-1]=Ce,de.X.sa)for(const Me of de.X.sa)Me.constructor.hasOwnProperty(g)||(Me.constructor[g]=Ce);return[]}),[]})},s:function(_,g,O,N,q,ne,ue,se){g=Fe(g),ne=qe(q,ne),Wt([],[_],function(de){de=de[0];var le=`${de.name}.${g}`,me={get(){Hn(`Cannot access ${le} due to unbound types`,[O])},enumerable:!0,configurable:!0};return me.set=se?()=>{Hn(`Cannot access ${le} due to unbound types`,[O])}:()=>{xe(`${le} is a read-only property`)},Object.defineProperty(de.X.constructor,g,me),Wt([],[O],function(Se){Se=Se[0];var Ce={get(){return Se.fromWireType(ne(N))},enumerable:!0};return se&&(se=qe(ue,se),Ce.set=Me=>{var ge=[];se(N,Se.toWireType(ge,Me)),Kt(ge)}),Object.defineProperty(de.X.constructor,g,Ce),[]}),[]})},o:function(_,g,O,N,q,ne){var ue=Mi(g,O);q=qe(N,q),Wt([],[_],function(se){se=se[0];var de=`constructor ${se.name}`;if(se.X.la===void 0&&(se.X.la=[]),se.X.la[g-1]!==void 0)throw new Pt(`Cannot register multiple constructors with identical number of parameters (${g-1}) for class '${se.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return se.X.la[g-1]=()=>{Hn(`Cannot construct ${se.name} due to unbound types`,ue)},Wt([],ue,function(le){return le.splice(1,0,null),se.X.la[g-1]=ki(de,le,null,q,ne),[]}),[]})},a:function(_,g,O,N,q,ne,ue,se){var de=Mi(O,N);g=Fe(g),ne=qe(q,ne),Wt([],[_],function(le){function me(){Hn(`Cannot call ${Se} due to unbound types`,de)}le=le[0];var Se=`${le.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]),se&&le.X.Ra.push(g);var Ce=le.X.ga,Me=Ce[g];return Me===void 0||Me.aa===void 0&&Me.className!==le.name&&Me.ma===O-2?(me.ma=O-2,me.className=le.name,Ce[g]=me):(_e(Ce,g,Se),Ce[g].aa[O-2]=me),Wt([],de,function(ge){return ge=ki(Se,ge,le,ne,ue),Ce[g].aa===void 0?(ge.ma=O-2,Ce[g]=ge):Ce[g].aa[O-2]=ge,[]}),[]})},d:function(_,g,O,N,q,ne,ue,se,de,le){g=Fe(g),q=qe(N,q),Wt([],[_],function(me){me=me[0];var Se=`${me.name}.${g}`,Ce={get(){Hn(`Cannot access ${Se} due to unbound types`,[O,ue])},enumerable:!0,configurable:!0};return Ce.set=de?()=>{Hn(`Cannot access ${Se} due to unbound types`,[O,ue])}:()=>{xe(Se+" is a read-only property")},Object.defineProperty(me.X.ga,g,Ce),Wt([],de?[O,ue]:[O],function(Me){var ge=Me[0],Et={get(){var Ve=md(this,me,Se+" getter");return ge.fromWireType(q(ne,Ve))},enumerable:!0};if(de){de=qe(se,de);var Dt=Me[1];Et.set=function(Ve){var Ye=md(this,me,Se+" setter"),Nt=[];de(le,Ye,Dt.toWireType(Nt,Ve)),Kt(Nt)}}return Object.defineProperty(me.X.ga,g,Et),[]}),[]})},F:function(_,g){g=Fe(g),V(_,{name:g,fromWireType:function(O){var N=ct(O);return Ms(O),N},toWireType:function(O,N){return je(N)},argPackAdvance:8,readValueFromPointer:Tn,ea:null})},l:function(_,g,O,N){function q(){}O=rr(O),g=Fe(g),q.values={},V(_,{name:g,constructor:q,fromWireType:function(ne){return this.constructor.values[ne]},toWireType:function(ne,ue){return ue.value},argPackAdvance:8,readValueFromPointer:_y(g,O,N),ea:null}),Ie(g,q)},c:function(_,g,O){var N=At(_,"enum");g=Fe(g),_=N.constructor,N=Object.create(N.constructor.prototype,{value:{value:O},constructor:{value:ze(`${N.name}_${g}`,function(){})}}),_.values[O]=N,_[g]=N},u:function(_,g,O){O=rr(O),g=Fe(g),V(_,{name:g,fromWireType:function(N){return N},toWireType:function(N,q){return q},argPackAdvance:8,readValueFromPointer:Sy(g,O),ea:null})},q:function(_,g,O,N,q,ne){var ue=Mi(g,O);_=Fe(_),q=qe(N,q),Ie(_,function(){Hn(`Cannot call ${_} due to unbound types`,ue)},g-1),Wt([],ue,function(se){return qt(_,ki(_,[se[0],null].concat(se.slice(1)),null,q,ne),g-1),[]})},j:function(_,g,O,N,q){g=Fe(g),q===-1&&(q=4294967295),q=rr(O);var ne=se=>se;if(N===0){var ue=32-8*O;ne=se=>se<<ue>>>ue}O=g.includes("unsigned")?function(se,de){return de>>>0}:function(se,de){return de},V(_,{name:g,fromWireType:ne,toWireType:O,argPackAdvance:8,readValueFromPointer:Cy(g,q,N!==0),ea:null})},g:function(_,g,O){function N(ne){ne>>=2;var ue=B;return new q(ue.buffer,ue[ne+1],ue[ne])}var q=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][g];O=Fe(O),V(_,{name:O,fromWireType:N,argPackAdvance:8,readValueFromPointer:N},{tb:!0})},v:function(_,g){g=Fe(g);var O=g==="std::string";V(_,{name:g,fromWireType:function(N){var q=B[N>>2],ne=N+4;if(O)for(var ue=ne,se=0;se<=q;++se){var de=ne+se;if(se==q||M[de]==0){if(ue=ue?yd(M,ue,de-ue):"",le===void 0)var le=ue;else le+=String.fromCharCode(0),le+=ue;ue=de+1}}else{for(le=Array(q),se=0;se<q;++se)le[se]=String.fromCharCode(M[ne+se]);le=le.join("")}return Wn(N),le},toWireType:function(N,q){q instanceof ArrayBuffer&&(q=new Uint8Array(q));var ne,ue=typeof q=="string";ue||q instanceof Uint8Array||q instanceof Uint8ClampedArray||q instanceof Int8Array||xe("Cannot pass non-string to std::string");var se;if(O&&ue)for(ne=se=0;ne<q.length;++ne){var de=q.charCodeAt(ne);127>=de?se++:2047>=de?se+=2:55296<=de&&57343>=de?(se+=4,++ne):se+=3}else se=q.length;if(ne=se,se=Vs(4+ne+1),de=se+4,B[se>>2]=ne,O&&ue){if(ue=de,de=ne+1,ne=M,0<de){de=ue+de-1;for(var le=0;le<q.length;++le){var me=q.charCodeAt(le);if(55296<=me&&57343>=me){var Se=q.charCodeAt(++le);me=65536+((me&1023)<<10)|Se&1023}if(127>=me){if(ue>=de)break;ne[ue++]=me}else{if(2047>=me){if(ue+1>=de)break;ne[ue++]=192|me>>6}else{if(65535>=me){if(ue+2>=de)break;ne[ue++]=224|me>>12}else{if(ue+3>=de)break;ne[ue++]=240|me>>18,ne[ue++]=128|me>>12&63}ne[ue++]=128|me>>6&63}ne[ue++]=128|me&63}}ne[ue]=0}}else if(ue)for(ue=0;ue<ne;++ue)le=q.charCodeAt(ue),255<le&&(Wn(de),xe("String has UTF-16 code units that do not fit in 8 bits")),M[de+ue]=le;else for(ue=0;ue<ne;++ue)M[de+ue]=q[ue];return N!==null&&N.push(Wn,se),se},argPackAdvance:8,readValueFromPointer:Tn,ea:function(N){Wn(N)}})},t:function(_,g,O){if(O=Fe(O),g===2)var N=$y,q=Ty,ne=Iy,ue=()=>U,se=1;else g===4&&(N=Ry,q=Oy,ne=Py,ue=()=>B,se=2);V(_,{name:O,fromWireType:function(de){for(var le=B[de>>2],me=ue(),Se,Ce=de+4,Me=0;Me<=le;++Me){var ge=de+4+Me*g;(Me==le||me[ge>>se]==0)&&(Ce=N(Ce,ge-Ce),Se===void 0?Se=Ce:(Se+=String.fromCharCode(0),Se+=Ce),Ce=ge+g)}return Wn(de),Se},toWireType:function(de,le){typeof le!="string"&&xe(`Cannot pass non-string to C++ string type ${O}`);var me=ne(le),Se=Vs(4+me+g);return B[Se>>2]=me>>se,q(le,Se+4,me+g),de!==null&&de.push(Wn,Se),Se},argPackAdvance:8,readValueFromPointer:Tn,ea:function(de){Wn(de)}})},N:function(_,g,O,N,q,ne){Nn[_]={name:Fe(g),Ba:qe(O,N),ka:qe(q,ne),Na:[]}},M:function(_,g,O,N,q,ne,ue,se,de,le){Nn[_].Na.push({mb:Fe(g),sb:O,qb:qe(N,q),rb:ne,Db:ue,Cb:qe(se,de),Eb:le})},H:function(_,g){g=Fe(g),V(_,{vb:!0,name:g,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},r:function(_,g,O){_=ct(_),g=At(g,"emval::as");var N=[],q=je(N);return B[O>>2]=q,g.toWireType(N,_)},w:function(_,g,O,N,q){_=Li[_],g=ct(g),O=ji(O);var ne=[];return B[N>>2]=je(ne),_(g,O,ne,q)},i:function(_,g,O,N){_=Li[_],g=ct(g),O=ji(O),_(g,O,null,N)},f:Ms,h:function(_,g){var O=Ny(_,g),N=O[0];g=N.name+"_$"+O.slice(1).map(function(ue){return ue.name}).join("_")+"$";var q=wd[g];if(q!==void 0)return q;var ne=Array(_-1);return q=Dy((ue,se,de,le)=>{for(var me=0,Se=0;Se<_-1;++Se)ne[Se]=O[Se+1].readValueFromPointer(le+me),me+=O[Se+1].argPackAdvance;for(ue=ue[se].apply(ue,ne),Se=0;Se<_-1;++Se)O[Se+1].hb&&O[Se+1].hb(ne[Se]);if(!N.vb)return N.toWireType(de,ue)}),wd[g]=q},p:function(_){return _=ji(_),je(h[_])},K:function(_,g){return _=ct(_),g=ct(g),je(_[g])},m:function(_){4<_&&(Xe.get(_).Ta+=1)},J:function(_){return je(ji(_))},n:function(_){var g=ct(_);Kt(g),Ms(_)},x:function(_,g){return _=At(_,"_emval_take_value"),_=_.readValueFromPointer(g),je(_)},b:()=>{ie("")},A:_=>{var g=M.length;if(_>>>=0,2147483648<_)return!1;for(var O=1;4>=O;O*=2){var N=g*(1+.2/O);N=Math.min(N,_+100663296);var q=Math;N=Math.max(_,N);e:{q=q.min.call(q,2147483648,N+(65536-N%65536)%65536)-p.buffer.byteLength+65535>>>16;try{p.grow(q),G();var ne=1;break e}catch{}ne=void 0}if(ne)return!0}return!1},B:(_,g)=>{var O=0;return Ed().forEach(function(N,q){var ne=g+O;for(q=B[_+4*q>>2]=ne,ne=0;ne<N.length;++ne)A[q++>>0]=N.charCodeAt(ne);A[q>>0]=0,O+=N.length+1}),0},C:(_,g)=>{var O=Ed();B[_>>2]=O.length;var N=0;return O.forEach(function(q){N+=q.length+1}),B[g>>2]=N,0},D:()=>52,y:function(){return 70},E:(_,g,O,N)=>{for(var q=0,ne=0;ne<O;ne++){var ue=B[g>>2],se=B[g+4>>2];g+=8;for(var de=0;de<se;de++){var le=M[ue+de],me=ky[_];le===0||le===10?((_===1?H:R)(yd(me,0)),me.length=0):me.push(le)}q+=se}return B[N>>2]=q,0}};(function(){function _(O){if(O=O.exports,h.asm=O,p=h.asm.O,G(),K=h.asm.U,ce.unshift(h.asm.P),te--,h.monitorRunDependencies&&h.monitorRunDependencies(te),te==0&&J){var N=J;J=null,N()}return O}var g={a:My};if(te++,h.monitorRunDependencies&&h.monitorRunDependencies(te),h.instantiateWasm)try{return h.instantiateWasm(g,_)}catch(O){R("Module.instantiateWasm callback failed with error: "+O),y(O)}return We(g,function(O){_(O.instance)}).catch(y),{}})();function Wn(){return(Wn=h.asm.Q).apply(null,arguments)}function Vs(){return(Vs=h.asm.R).apply(null,arguments)}function _d(){return(_d=h.asm.S).apply(null,arguments)}h.__embind_initialize_bindings=function(){return(h.__embind_initialize_bindings=h.asm.T).apply(null,arguments)},h.dynCall_jiji=function(){return(h.dynCall_jiji=h.asm.V).apply(null,arguments)};var Vi;J=function _(){Vi||Sd(),Vi||(J=_)};function Sd(){function _(){if(!Vi&&(Vi=!0,h.calledRun=!0,!$)){if(De(ce),b(h),h.onRuntimeInitialized&&h.onRuntimeInitialized(),h.postRun)for(typeof h.postRun=="function"&&(h.postRun=[h.postRun]);h.postRun.length;){var g=h.postRun.shift();W.unshift(g)}De(W)}}if(!(0<te)){if(h.preRun)for(typeof h.preRun=="function"&&(h.preRun=[h.preRun]);h.preRun.length;)Y();De(Z),0<te||(h.setStatus?(h.setStatus("Running..."),setTimeout(function(){setTimeout(function(){h.setStatus("")},1),_()},1)):_())}}if(h.preInit)for(typeof h.preInit=="function"&&(h.preInit=[h.preInit]);0<h.preInit.length;)h.preInit.pop()();return Sd(),m.ready}})();const d=u},a=>{a.exports=JSON.parse(`{"name":"@rive-app/canvas","version":"1.2.4","description":"Rive's canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <luigi@rive.app> (https://rive.app)","Maxwell Talbot <max@rive.app> (https://rive.app)","Arthur Vivian <arthur@rive.app> (https://rive.app)","Umberto Sonnino <umberto@rive.app> (https://rive.app)","Matthew Sullivan <matt.j.sullivan@gmail.com> (mailto:matt.j.sullivan@gmail.com)"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive.d.ts","rive_advanced.mjs.d.ts"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}`)},(a,s,c)=>{c.r(s),c.d(s,{registerTouchInteractions:()=>u.registerTouchInteractions});var u=c(4)},(a,s,c)=>{c.r(s),c.d(s,{registerTouchInteractions:()=>f});var u=void 0,d=function(m){var h,b;return["touchstart","touchmove"].indexOf(m.type)>-1&&(!((h=m.touches)===null||h===void 0)&&h.length)?(m.preventDefault(),{clientX:m.touches[0].clientX,clientY:m.touches[0].clientY}):m.type==="touchend"&&(!((b=m.changedTouches)===null||b===void 0)&&b.length)?{clientX:m.changedTouches[0].clientX,clientY:m.changedTouches[0].clientY}:{clientX:m.clientX,clientY:m.clientY}},f=function(m){var h=m.canvas,b=m.artboard,y=m.stateMachines,T=y===void 0?[]:y,S=m.renderer,v=m.rive,w=m.fit,C=m.alignment;if(!h||!T.length||!S||!v||!b||typeof window>"u")return null;var I=function(P){var F=P.currentTarget.getBoundingClientRect(),k=d(P),H=k.clientX,R=k.clientY;if(!(!H&&!R)){var E=H-F.left,p=R-F.top,$=v.computeAlignment(w,C,{minX:0,minY:0,maxX:F.width,maxY:F.height},b.bounds),A=new v.Mat2D;$.invert(A);var M=new v.Vec2D(E,p),z=v.mapXY(A,M),U=z.x(),re=z.y();switch(z.delete(),A.delete(),M.delete(),$.delete(),P.type){case"touchmove":case"mouseover":case"mouseout":case"mousemove":{for(var B=0,L=T;B<L.length;B++){var oe=L[B];oe.pointerMove(U,re)}break}case"touchstart":case"mousedown":{for(var G=0,K=T;G<K.length;G++){var oe=K[G];oe.pointerDown(U,re)}break}case"touchend":case"mouseup":{for(var Z=0,ce=T;Z<ce.length;Z++){var oe=ce[Z];oe.pointerUp(U,re)}break}}}},D=I.bind(u);return h.addEventListener("mouseover",D),h.addEventListener("mouseout",D),h.addEventListener("mousemove",D),h.addEventListener("mousedown",D),h.addEventListener("mouseup",D),h.addEventListener("touchmove",D),h.addEventListener("touchstart",D),h.addEventListener("touchend",D),function(){h.removeEventListener("mouseover",D),h.removeEventListener("mouseout",D),h.removeEventListener("mousemove",D),h.removeEventListener("mousedown",D),h.removeEventListener("mouseup",D),h.removeEventListener("touchmove",D),h.removeEventListener("touchstart",D),h.removeEventListener("touchend",D)}}}],r={};function o(a){var s=r[a];if(s!==void 0)return s.exports;var c=r[a]={exports:{}};return n[a](c,c.exports,o),c.exports}o.d=(a,s)=>{for(var c in s)o.o(s,c)&&!o.o(a,c)&&Object.defineProperty(a,c,{enumerable:!0,get:s[c]})},o.o=(a,s)=>Object.prototype.hasOwnProperty.call(a,s),o.r=a=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var i={};return(()=>{o.r(i),o.d(i,{Alignment:()=>m,EventType:()=>C,Fit:()=>f,Layout:()=>h,LoopType:()=>I,Rive:()=>F,RuntimeLoader:()=>b,StateMachineInput:()=>S,StateMachineInputType:()=>T,Testing:()=>R});var a=o(1),s=o(2),c=o(3),u=function(E,p,$,A){function M(z){return z instanceof $?z:new $(function(U){U(z)})}return new($||($=Promise))(function(z,U){function re(oe){try{L(A.next(oe))}catch(G){U(G)}}function B(oe){try{L(A.throw(oe))}catch(G){U(G)}}function L(oe){oe.done?z(oe.value):M(oe.value).then(re,B)}L((A=A.apply(E,p||[])).next())})},d=function(E,p){var $={label:0,sent:function(){if(z[0]&1)throw z[1];return z[1]},trys:[],ops:[]},A,M,z,U;return U={next:re(0),throw:re(1),return:re(2)},typeof Symbol=="function"&&(U[Symbol.iterator]=function(){return this}),U;function re(L){return function(oe){return B([L,oe])}}function B(L){if(A)throw new TypeError("Generator is already executing.");for(;U&&(U=0,L[0]&&($=0)),$;)try{if(A=1,M&&(z=L[0]&2?M.return:L[0]?M.throw||((z=M.return)&&z.call(M),0):M.next)&&!(z=z.call(M,L[1])).done)return z;switch(M=0,z&&(L=[L[0]&2,z.value]),L[0]){case 0:case 1:z=L;break;case 4:return $.label++,{value:L[1],done:!1};case 5:$.label++,M=L[1],L=[0];continue;case 7:L=$.ops.pop(),$.trys.pop();continue;default:if(z=$.trys,!(z=z.length>0&&z[z.length-1])&&(L[0]===6||L[0]===2)){$=0;continue}if(L[0]===3&&(!z||L[1]>z[0]&&L[1]<z[3])){$.label=L[1];break}if(L[0]===6&&$.label<z[1]){$.label=z[1],z=L;break}if(z&&$.label<z[2]){$.label=z[2],$.ops.push(L);break}z[2]&&$.ops.pop(),$.trys.pop();continue}L=p.call(E,$)}catch(oe){L=[6,oe],M=0}finally{A=z=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}},f;(function(E){E.Cover="cover",E.Contain="contain",E.Fill="fill",E.FitWidth="fitWidth",E.FitHeight="fitHeight",E.None="none",E.ScaleDown="scaleDown"})(f||(f={}));var m;(function(E){E.Center="center",E.TopLeft="topLeft",E.TopCenter="topCenter",E.TopRight="topRight",E.CenterLeft="centerLeft",E.CenterRight="centerRight",E.BottomLeft="bottomLeft",E.BottomCenter="bottomCenter",E.BottomRight="bottomRight"})(m||(m={}));var h=function(){function E(p){var $,A,M,z,U,re;this.fit=($=p==null?void 0:p.fit)!==null&&$!==void 0?$:f.Contain,this.alignment=(A=p==null?void 0:p.alignment)!==null&&A!==void 0?A:m.Center,this.minX=(M=p==null?void 0:p.minX)!==null&&M!==void 0?M:0,this.minY=(z=p==null?void 0:p.minY)!==null&&z!==void 0?z:0,this.maxX=(U=p==null?void 0:p.maxX)!==null&&U!==void 0?U:0,this.maxY=(re=p==null?void 0:p.maxY)!==null&&re!==void 0?re:0}return E.new=function(p){var $=p.fit,A=p.alignment,M=p.minX,z=p.minY,U=p.maxX,re=p.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new E({fit:$,alignment:A,minX:M,minY:z,maxX:U,maxY:re})},E.prototype.copyWith=function(p){var $=p.fit,A=p.alignment,M=p.minX,z=p.minY,U=p.maxX,re=p.maxY;return new E({fit:$??this.fit,alignment:A??this.alignment,minX:M??this.minX,minY:z??this.minY,maxX:U??this.maxX,maxY:re??this.maxY})},E.prototype.runtimeFit=function(p){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var $;return this.fit===f.Cover?$=p.Fit.cover:this.fit===f.Contain?$=p.Fit.contain:this.fit===f.Fill?$=p.Fit.fill:this.fit===f.FitWidth?$=p.Fit.fitWidth:this.fit===f.FitHeight?$=p.Fit.fitHeight:this.fit===f.ScaleDown?$=p.Fit.scaleDown:$=p.Fit.none,this.cachedRuntimeFit=$,$},E.prototype.runtimeAlignment=function(p){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var $;return this.alignment===m.TopLeft?$=p.Alignment.topLeft:this.alignment===m.TopCenter?$=p.Alignment.topCenter:this.alignment===m.TopRight?$=p.Alignment.topRight:this.alignment===m.CenterLeft?$=p.Alignment.centerLeft:this.alignment===m.CenterRight?$=p.Alignment.centerRight:this.alignment===m.BottomLeft?$=p.Alignment.bottomLeft:this.alignment===m.BottomCenter?$=p.Alignment.bottomCenter:this.alignment===m.BottomRight?$=p.Alignment.bottomRight:$=p.Alignment.center,this.cachedRuntimeAlignment=$,$},E}(),b=function(){function E(){}return E.loadRuntime=function(){a.default({locateFile:function(){return E.wasmURL}}).then(function(p){var $;for(E.runtime=p;E.callBackQueue.length>0;)($=E.callBackQueue.shift())===null||$===void 0||$(E.runtime)})},E.getInstance=function(p){E.isLoading||(E.isLoading=!0,E.loadRuntime()),E.runtime?p(E.runtime):E.callBackQueue.push(p)},E.awaitInstance=function(){return new Promise(function(p){return E.getInstance(function($){return p($)})})},E.setWasmUrl=function(p){E.wasmURL=p},E.isLoading=!1,E.callBackQueue=[],E.wasmURL="https://unpkg.com/".concat(s.name,"@").concat(s.version,"/rive.wasm"),E}(),y=function(){function E(p,$,A,M){this.animation=p,this.artboard=$,this.playing=M,this.loopCount=0,this.scrubTo=null,this.instance=new A.LinearAnimationInstance(p,$)}return Object.defineProperty(E.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"time",{get:function(){return this.instance.time},set:function(p){this.instance.time=p},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),E.prototype.advance=function(p){this.scrubTo===null?this.instance.advance(p):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},E.prototype.apply=function(p){this.instance.apply(p)},Object.defineProperty(E.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),E.prototype.cleanup=function(){this.instance.delete()},E}(),T;(function(E){E[E.Number=56]="Number",E[E.Trigger=58]="Trigger",E[E.Boolean=59]="Boolean"})(T||(T={}));var S=function(){function E(p,$){this.type=p,this.runtimeInput=$}return Object.defineProperty(E.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(p){this.runtimeInput.value=p},enumerable:!1,configurable:!0}),E.prototype.fire=function(){this.type===T.Trigger&&this.runtimeInput.fire()},E}(),v=function(){function E(p,$,A,M){this.stateMachine=p,this.playing=A,this.artboard=M,this.inputs=[],this.instance=new $.StateMachineInstance(p,M),this.initInputs($)}return Object.defineProperty(E.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"statesChanged",{get:function(){for(var p=[],$=0;$<this.instance.stateChangedCount();$++)p.push(this.instance.stateChangedNameByIndex($));return p},enumerable:!1,configurable:!0}),E.prototype.advance=function(p){this.instance.advance(p)},E.prototype.initInputs=function(p){for(var $=0;$<this.instance.inputCount();$++){var A=this.instance.input($);this.inputs.push(this.mapRuntimeInput(A,p))}},E.prototype.mapRuntimeInput=function(p,$){if(p.type===$.SMIInput.bool)return new S(T.Boolean,p.asBool());if(p.type===$.SMIInput.number)return new S(T.Number,p.asNumber());if(p.type===$.SMIInput.trigger)return new S(T.Trigger,p.asTrigger())},E.prototype.cleanup=function(){this.instance.delete()},E}(),w=function(){function E(p,$,A,M,z){M===void 0&&(M=[]),z===void 0&&(z=[]),this.runtime=p,this.artboard=$,this.eventManager=A,this.animations=M,this.stateMachines=z}return E.prototype.add=function(p,$,A){if(A===void 0&&(A=!0),p=H(p),p.length===0)this.animations.forEach(function(Z){return Z.playing=$}),this.stateMachines.forEach(function(Z){return Z.playing=$});else for(var M=this.animations.map(function(Z){return Z.name}),z=this.stateMachines.map(function(Z){return Z.name}),U=0;U<p.length;U++){var re=M.indexOf(p[U]),B=z.indexOf(p[U]);if(re>=0||B>=0)re>=0?this.animations[re].playing=$:this.stateMachines[B].playing=$;else{var L=this.artboard.animationByName(p[U]);if(L){var oe=new y(L,this.artboard,this.runtime,$);oe.advance(0),oe.apply(1),this.animations.push(oe)}else{var G=this.artboard.stateMachineByName(p[U]);if(G){var K=new v(G,this.runtime,$,this.artboard);this.stateMachines.push(K)}}}}return A&&($?this.eventManager.fire({type:C.Play,data:this.playing}):this.eventManager.fire({type:C.Pause,data:this.paused})),$?this.playing:this.paused},E.prototype.play=function(p){return this.add(p,!0)},E.prototype.pause=function(p){return this.add(p,!1)},E.prototype.scrub=function(p,$){var A=this.animations.filter(function(M){return p.includes(M.name)});return A.forEach(function(M){return M.scrubTo=$}),A.map(function(M){return M.name})},Object.defineProperty(E.prototype,"playing",{get:function(){return this.animations.filter(function(p){return p.playing}).map(function(p){return p.name}).concat(this.stateMachines.filter(function(p){return p.playing}).map(function(p){return p.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"paused",{get:function(){return this.animations.filter(function(p){return!p.playing}).map(function(p){return p.name}).concat(this.stateMachines.filter(function(p){return!p.playing}).map(function(p){return p.name}))},enumerable:!1,configurable:!0}),E.prototype.stop=function(p){var $=this;p=H(p);var A=[];if(p.length===0)A=this.animations.map(function(U){return U.name}).concat(this.stateMachines.map(function(U){return U.name})),this.animations.forEach(function(U){return U.cleanup()}),this.stateMachines.forEach(function(U){return U.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var M=this.animations.filter(function(U){return p.includes(U.name)});M.forEach(function(U){U.cleanup(),$.animations.splice($.animations.indexOf(U),1)});var z=this.stateMachines.filter(function(U){return p.includes(U.name)});z.forEach(function(U){U.cleanup(),$.stateMachines.splice($.stateMachines.indexOf(U),1)}),A=M.map(function(U){return U.name}).concat(z.map(function(U){return U.name}))}return this.eventManager.fire({type:C.Stop,data:A}),A},Object.defineProperty(E.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(p,$){return p||$.playing},!1)||this.stateMachines.reduce(function(p,$){return p||$.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),E.prototype.atLeastOne=function(p,$){$===void 0&&($=!0);var A;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([A=this.artboard.animationByIndex(0).name],p,$):this.artboard.stateMachineCount()>0&&this.add([A=this.artboard.stateMachineByIndex(0).name],p,$)),A},E.prototype.handleLooping=function(){for(var p=0,$=this.animations.filter(function(M){return M.playing});p<$.length;p++){var A=$[p];A.loopValue===0&&A.loopCount?(A.loopCount=0,this.stop(A.name)):A.loopValue===1&&A.loopCount?(this.eventManager.fire({type:C.Loop,data:{animation:A.name,type:I.Loop}}),A.loopCount=0):A.loopValue===2&&A.loopCount>1&&(this.eventManager.fire({type:C.Loop,data:{animation:A.name,type:I.PingPong}}),A.loopCount=0)}},E.prototype.handleStateChanges=function(){for(var p=[],$=0,A=this.stateMachines.filter(function(z){return z.playing});$<A.length;$++){var M=A[$];p.push.apply(p,M.statesChanged)}p.length>0&&this.eventManager.fire({type:C.StateChange,data:p})},E.prototype.handleAdvancing=function(p){this.eventManager.fire({type:C.Advance,data:p})},E}(),C;(function(E){E.Load="load",E.LoadError="loaderror",E.Play="play",E.Pause="pause",E.Stop="stop",E.Loop="loop",E.Draw="draw",E.Advance="advance",E.StateChange="statechange"})(C||(C={}));var I;(function(E){E.OneShot="oneshot",E.Loop="loop",E.PingPong="pingpong"})(I||(I={}));var D=function(){function E(p){p===void 0&&(p=[]),this.listeners=p}return E.prototype.getListeners=function(p){return this.listeners.filter(function($){return $.type===p})},E.prototype.add=function(p){this.listeners.includes(p)||this.listeners.push(p)},E.prototype.remove=function(p){for(var $=0;$<this.listeners.length;$++){var A=this.listeners[$];if(A.type===p.type&&A.callback===p.callback){this.listeners.splice($,1);break}}},E.prototype.removeAll=function(p){var $=this;p?this.listeners.filter(function(A){return A.type===p}).forEach(function(A){return $.remove(A)}):this.listeners.splice(0,this.listeners.length)},E.prototype.fire=function(p){var $=this.getListeners(p.type);$.forEach(function(A){return A.callback(p)})},E}(),P=function(){function E(p){this.eventManager=p,this.queue=[]}return E.prototype.add=function(p){this.queue.push(p)},E.prototype.process=function(){for(;this.queue.length>0;){var p=this.queue.shift();p!=null&&p.action&&p.action(),p!=null&&p.event&&this.eventManager.fire(p.event)}},E}(),F=function(){function E(p){var $;this.loaded=!1,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this.shouldDisableRiveListeners=!1,this.durations=[],this.frameTimes=[],this.frameCount=0,this.renderSecondTimer=0,this.canvas=p.canvas,this.src=p.src,this.buffer=p.buffer,this.layout=($=p.layout)!==null&&$!==void 0?$:new h,this.shouldDisableRiveListeners=!!p.shouldDisableRiveListeners,this.eventManager=new D,p.onLoad&&this.on(C.Load,p.onLoad),p.onLoadError&&this.on(C.LoadError,p.onLoadError),p.onPlay&&this.on(C.Play,p.onPlay),p.onPause&&this.on(C.Pause,p.onPause),p.onStop&&this.on(C.Stop,p.onStop),p.onLoop&&this.on(C.Loop,p.onLoop),p.onStateChange&&this.on(C.StateChange,p.onStateChange),p.onAdvance&&this.on(C.Advance,p.onAdvance),p.onload&&!p.onLoad&&this.on(C.Load,p.onload),p.onloaderror&&!p.onLoadError&&this.on(C.LoadError,p.onloaderror),p.onplay&&!p.onPlay&&this.on(C.Play,p.onplay),p.onpause&&!p.onPause&&this.on(C.Pause,p.onpause),p.onstop&&!p.onStop&&this.on(C.Stop,p.onstop),p.onloop&&!p.onLoop&&this.on(C.Loop,p.onloop),p.onstatechange&&!p.onStateChange&&this.on(C.StateChange,p.onstatechange),this.taskQueue=new P(this.eventManager),this.init({src:this.src,buffer:this.buffer,autoplay:p.autoplay,animations:p.animations,stateMachines:p.stateMachines,artboard:p.artboard,useOffscreenRenderer:p.useOffscreenRenderer})}return E.new=function(p){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new E(p)},E.prototype.init=function(p){var $=this,A=p.src,M=p.buffer,z=p.animations,U=p.stateMachines,re=p.artboard,B=p.autoplay,L=B===void 0?!1:B,oe=p.useOffscreenRenderer,G=oe===void 0?!1:oe;if(this.src=A,this.buffer=M,!this.src&&!this.buffer)throw new Error(E.missingErrorMessage);var K=H(z),Z=H(U);this.loaded=!1,this.readyForPlaying=!1,b.awaitInstance().then(function(ce){$.runtime=ce,$.renderer=$.runtime.makeRenderer($.canvas,G),$.canvas.width||$.canvas.height||$.resizeDrawingSurfaceToCanvas(),$.initData(re,K,Z,L).then(function(){return $.setupRiveListeners()}).catch(function(W){console.error(W)})}).catch(function(ce){console.error(ce)})},E.prototype.setupRiveListeners=function(){var p=this;if(!this.shouldDisableRiveListeners){var $=(this.animator.stateMachines||[]).filter(function(A){return A.playing&&p.runtime.hasListeners(A.instance)}).map(function(A){return A.instance});this.eventCleanup=(0,c.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:$,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime)})}},E.prototype.initData=function(p,$,A,M){var z;return u(this,void 0,void 0,function(){var U,re,B;return d(this,function(L){switch(L.label){case 0:return this.src?(U=this,[4,k(this.src)]):[3,2];case 1:U.buffer=L.sent(),L.label=2;case 2:return re=this,[4,this.runtime.load(new Uint8Array(this.buffer))];case 3:return re.file=L.sent(),this.file?(this.initArtboard(p,$,A,M),this.loaded=!0,this.eventManager.fire({type:C.Load,data:(z=this.src)!==null&&z!==void 0?z:"buffer"}),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,Promise.resolve()]):(B="Problem loading file; may be corrupt!",console.warn(B),this.eventManager.fire({type:C.LoadError,data:B}),[2,Promise.reject(B)])}})})},E.prototype.initArtboard=function(p,$,A,M){var z=p?this.file.artboardByName(p):this.file.defaultArtboard();if(!z){var U="Invalid artboard name or no default artboard";console.warn(U),this.eventManager.fire({type:C.LoadError,data:U});return}if(this.artboard=z,this.artboard.animationCount()<1){var U="Artboard has no animations";throw this.eventManager.fire({type:C.LoadError,data:U}),U}this.animator=new w(this.runtime,this.artboard,this.eventManager);var re;$.length>0||A.length>0?(re=$.concat(A),this.animator.add(re,M,!1)):re=[this.animator.atLeastOne(M,!1)],this.taskQueue.add({event:{type:M?C.Play:C.Pause,data:re}})},E.prototype.drawFrame=function(){this.startRendering()},E.prototype.draw=function(p,$){var A=performance.now();this.frameRequestId=null,this.lastRenderTime||(this.lastRenderTime=p),this.renderSecondTimer+=p-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,$==null||$());var M=(p-this.lastRenderTime)/1e3;this.lastRenderTime=p;for(var z=this.animator.animations.filter(function(W){return W.playing||W.needsScrub}).sort(function(W){return W.needsScrub?-1:1}),U=0,re=z;U<re.length;U++){var B=re[U];B.advance(M),B.instance.didLoop&&(B.loopCount+=1),B.apply(1)}for(var L=this.animator.stateMachines.filter(function(W){return W.playing}),oe=0,G=L;oe<G.length;oe++){var K=G[oe];K.advance(M)}this.artboard.advance(M);var Z=this.renderer;Z.clear(),Z.save(),this.alignRenderer(),this.artboard.draw(Z),Z.restore(),Z.flush(),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(M),this.frameCount++;var ce=performance.now();for(this.frameTimes.push(ce),this.durations.push(ce-A);this.frameTimes[0]<=ce-1e3;)this.frameTimes.shift(),this.durations.shift();this.animator.isPlaying?this.startRendering():this.animator.isPaused?this.lastRenderTime=0:this.animator.isStopped&&(this.lastRenderTime=0)},E.prototype.alignRenderer=function(){var p=this,$=p.renderer,A=p.runtime,M=p._layout,z=p.artboard;$.align(M.runtimeFit(A),M.runtimeAlignment(A),{minX:M.minX,minY:M.minY,maxX:M.maxX,maxY:M.maxY},z.bounds)},Object.defineProperty(E.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"frameTime",{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(p,$){return p+$},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),E.prototype.cleanup=function(){var p,$;this.stopRendering(),this.cleanupInstances(),(p=this.renderer)===null||p===void 0||p.delete(),this.renderer=null,($=this.file)===null||$===void 0||$.delete(),this.file=null},E.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},E.prototype.play=function(p,$){var A=this;if(p=H(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return A.play(p,$)}});return}this.animator.play(p),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},E.prototype.pause=function(p){var $=this;if(p=H(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.pause(p)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(p)},E.prototype.scrub=function(p,$){var A=this;if(p=H(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return A.scrub(p,$)}});return}this.animator.scrub(p,$||0),this.drawFrame()},E.prototype.stop=function(p){var $=this;if(p=H(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.stop(p)}});return}this.animator.stop(p),this.eventCleanup&&this.eventCleanup()},E.prototype.reset=function(p){var $,A=p==null?void 0:p.artboard,M=H(p==null?void 0:p.animations),z=H(p==null?void 0:p.stateMachines),U=($=p==null?void 0:p.autoplay)!==null&&$!==void 0?$:!1;this.cleanupInstances(),this.initArtboard(A,M,z,U),this.taskQueue.process()},E.prototype.load=function(p){this.stop(),this.init(p)},Object.defineProperty(E.prototype,"layout",{get:function(){return this._layout},set:function(p){this._layout=p,(!p.maxX||!p.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),E.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},E.prototype.resizeDrawingSurfaceToCanvas=function(){if(this.canvas instanceof HTMLCanvasElement&&window){var p=this.canvas.getBoundingClientRect(),$=p.width,A=p.height,M=window.devicePixelRatio||1;this.canvas.width=M*$,this.canvas.height=M*A,this.startRendering(),this.resizeToCanvas()}},Object.defineProperty(E.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"animationNames",{get:function(){if(!this.loaded)return[];for(var p=[],$=0;$<this.artboard.animationCount();$++)p.push(this.artboard.animationByIndex($).name);return p},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"stateMachineNames",{get:function(){if(!this.loaded)return[];for(var p=[],$=0;$<this.artboard.stateMachineCount();$++)p.push(this.artboard.stateMachineByIndex($).name);return p},enumerable:!1,configurable:!0}),E.prototype.stateMachineInputs=function(p){if(this.loaded){var $=this.animator.stateMachines.find(function(A){return A.name===p});return $==null?void 0:$.inputs}},Object.defineProperty(E.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(p){return p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(p){return p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(p){return!p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(p){return!p.playing}).map(function(p){return p.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),E.prototype.on=function(p,$){this.eventManager.add({type:p,callback:$})},E.prototype.off=function(p,$){this.eventManager.remove({type:p,callback:$})},E.prototype.unsubscribe=function(p,$){console.warn("This function is deprecated: please use `off()` instead."),this.off(p,$)},E.prototype.removeAllRiveEventListeners=function(p){this.eventManager.removeAll(p)},E.prototype.unsubscribeAll=function(p){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(p)},E.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},E.prototype.startRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this.draw.bind(this)):this.frameRequestId=requestAnimationFrame(this.draw.bind(this)))},E.prototype.enableFPSCounter=function(p){this.runtime.enableFPSCounter(p)},E.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(E.prototype,"contents",{get:function(){if(this.loaded){for(var p={artboards:[]},$=0;$<this.file.artboardCount();$++){for(var A=this.file.artboardByIndex($),M={name:A.name,animations:[],stateMachines:[]},z=0;z<A.animationCount();z++){var U=A.animationByIndex(z);M.animations.push(U.name)}for(var re=0;re<A.stateMachineCount();re++){for(var B=A.stateMachineByIndex(re),L=B.name,oe=new this.runtime.StateMachineInstance(B,A),G=[],K=0;K<oe.inputCount();K++){var Z=oe.input(K);G.push({name:Z.name,type:Z.type})}M.stateMachines.push({name:L,inputs:G})}p.artboards.push(M)}return p}},enumerable:!1,configurable:!0}),E.missingErrorMessage="Rive source file or data buffer required",E}(),k=function(E){return u(void 0,void 0,void 0,function(){var p,$,A;return d(this,function(M){switch(M.label){case 0:return p=new Request(E),[4,fetch(p)];case 1:return $=M.sent(),[4,$.arrayBuffer()];case 2:return A=M.sent(),[2,A]}})})},H=function(E){return typeof E=="string"?[E]:E instanceof Array?E:[]},R={EventManager:D,TaskQueueManager:P}})(),i})())})(tg);var BT=tg.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=l,n=BT;function r(v){return v&&typeof v=="object"&&"default"in v?v:{default:v}}var o=r(t),i=function(){return i=Object.assign||function(v){for(var w,C=1,I=arguments.length;C<I;C++)for(var D in w=arguments[C])Object.prototype.hasOwnProperty.call(w,D)&&(v[D]=w[D]);return v},i.apply(this,arguments)};function a(v,w){var C={};for(var I in v)Object.prototype.hasOwnProperty.call(v,I)&&w.indexOf(I)<0&&(C[I]=v[I]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function"){var D=0;for(I=Object.getOwnPropertySymbols(v);D<I.length;D++)w.indexOf(I[D])<0&&Object.prototype.propertyIsEnumerable.call(v,I[D])&&(C[I[D]]=v[I[D]])}return C}function s(){var v=typeof window<"u"&&typeof window.devicePixelRatio=="number"?window.devicePixelRatio:1;return Math.min(Math.max(1,v),3)}typeof SuppressedError=="function"&&SuppressedError;var c=function(){function v(){}return v.prototype.observe=function(){},v.prototype.unobserve=function(){},v.prototype.disconnect=function(){},v}(),u=globalThis.ResizeObserver||c,d=globalThis.ResizeObserver!==void 0,f=!d;function m(v,w){w===void 0&&(w=!0);var C=t.useState({width:0,height:0}),I=C[0],D=C[1];t.useEffect(function(){if(typeof window<"u"&&w){var R=function(){D({width:window.innerWidth,height:window.innerHeight})};return f&&(R(),window.addEventListener("resize",R)),function(){return window.removeEventListener("resize",R)}}},[]);var P,F,k,H=t.useRef(new u((P=function(R){d&&D({width:R[R.length-1].contentRect.width,height:R[R.length-1].contentRect.height})},F=0,k=0,function(){for(var R=this,E=[],p=0;p<arguments.length;p++)E[p]=arguments[p];clearTimeout(k),k=window.setTimeout(function(){return P.apply(R,E)},F)})));return t.useEffect(function(){var R=H.current;if(w){var E=v.current;return v.current&&d&&R.observe(v.current),function(){R.disconnect(),E&&d&&R.unobserve(E)}}R.disconnect()},[v,H]),I}var h={useDevicePixelRatio:!0,fitCanvasToArtboardHeight:!1,useOffscreenRenderer:!0,shouldResizeCanvasToContainer:!0};function b(v){return Object.assign({},h,v)}function y(v){var w=v.riveLoaded,C=w!==void 0&&w,I=v.canvasRef,D=v.containerRef,P=v.options,F=P===void 0?{}:P,k=v.onCanvasHasResized,H=v.artboardBounds,R=b(F),E=t.useState({height:0,width:0}),p=E[0],$=p.height,A=p.width,M=E[1],z=t.useState({height:0,width:0}),U=z[0],re=U.height,B=U.width,L=z[1],oe=t.useState(!0),G=oe[0],K=oe[1],Z=R.fitCanvasToArtboardHeight,ce=R.shouldResizeCanvasToContainer,W=R.useDevicePixelRatio,Y=m(D,ce),te=function(){var Te=s(),Oe=t.useState(Te),Ne=Oe[0],Re=Oe[1];return t.useEffect(function(){if(typeof window<"u"&&"matchMedia"in window){var We=function(){var ot=s();Re(ot)},De=window.matchMedia("screen and (resolution: ".concat(Ne,"dppx)"));return De.hasOwnProperty("addEventListener")?De.addEventListener("change",We):De.addListener(We),function(){De.hasOwnProperty("removeEventListener")?De.removeEventListener("change",We):De.removeListener(We)}}},[Ne]),Ne}(),J=H??{},ie=J.maxX,ee=J.maxY,we=t.useCallback(function(){var Te,Oe,Ne,Re,We=(Oe=(Te=D.current)===null||Te===void 0?void 0:Te.clientWidth)!==null&&Oe!==void 0?Oe:0,De=(Re=(Ne=D.current)===null||Ne===void 0?void 0:Ne.clientHeight)!==null&&Re!==void 0?Re:0;return Z&&H?{width:We,height:We*(H.maxY/H.maxX)}:{width:We,height:De}},[D,Z,ie,ee]);t.useEffect(function(){if(ce&&D.current&&C){var Te=we(),Oe=Te.width,Ne=Te.height,Re=!1;if(I.current){var We=Oe!==A||Ne!==$;if(R.fitCanvasToArtboardHeight&&We&&(D.current.style.height=Ne+"px",Re=!0),R.useDevicePixelRatio){if(We||Oe*te!==B||Ne*te!==re){var De=te*Oe,ot=te*Ne;I.current.width=De,I.current.height=ot,I.current.style.width=Oe+"px",I.current.style.height=Ne+"px",L({width:De,height:ot}),Re=!0}}else We&&(I.current.width=Oe,I.current.height=Ne,L({width:Oe,height:Ne}),Re=!0);M({width:Oe,height:Ne})}k&&(G||Re)&&k&&k(),G&&K(!1)}},[I,D,Y,te,we,G,K,re,B,$,A,k,ce,Z,W,C])}function T(v){var w=v.setContainerRef,C=v.setCanvasRef,I=v.className,D=I===void 0?"":I,P=v.style,F=v.children,k=a(v,["setContainerRef","setCanvasRef","className","style","children"]),H=i({width:"100%",height:"100%"},P);return o.default.createElement("div",i({ref:w,className:D},!D&&{style:H}),o.default.createElement("canvas",i({ref:C,style:{verticalAlign:"top",width:0,height:0}},k),F))}function S(v,w){w===void 0&&(w={});var C=t.useRef(null),I=t.useRef(null),D=t.useState(null),P=D[0],F=D[1],k=!!v,H=b(w),R=t.useCallback(function(){P&&(P.startRendering(),P.resizeToCanvas())},[P]);y({riveLoaded:!!P,canvasRef:C,containerRef:I,options:H,onCanvasHasResized:R,artboardBounds:P==null?void 0:P.bounds});var E=t.useCallback(function(M){if(M&&v&&k){var z=H.useOffscreenRenderer,U=new n.Rive(i(i({useOffscreenRenderer:z},v),{canvas:M}));U.on(n.EventType.Load,function(){C.current?F(U):U.cleanup()})}else M===null&&C.current&&(C.current.height=0,C.current.width=0);C.current=M},[k]),p=t.useCallback(function(M){I.current=M},[]);t.useEffect(function(){var M=new IntersectionObserver(function(z){z[0].isIntersecting?P&&P.startRendering():P&&P.stopRendering()});return C.current&&M.observe(C.current),function(){M.disconnect()}},[P]),t.useEffect(function(){return function(){P&&(P.cleanup(),F(null))}},[P]);var $=v==null?void 0:v.animations;t.useEffect(function(){P&&$&&(P.isPlaying?(P.stop(P.animationNames),P.play($)):P.isPaused&&(P.stop(P.animationNames),P.pause($)))},[$,P]);var A=t.useCallback(function(M){return o.default.createElement(T,i({setContainerRef:p,setCanvasRef:E},M))},[E,p]);return{canvas:C.current,container:I.current,setCanvasRef:E,setContainerRef:p,rive:P,RiveComponent:A}}e.default=function(v){var w=v.src,C=v.artboard,I=v.animations,D=v.stateMachines,P=v.layout,F=v.useOffscreenRenderer,k=F===void 0||F,H=v.shouldDisableRiveListeners,R=H!==void 0&&H,E=v.shouldResizeCanvasToContainer,p=E===void 0||E,$=v.children,A=a(v,["src","artboard","animations","stateMachines","layout","useOffscreenRenderer","shouldDisableRiveListeners","shouldResizeCanvasToContainer","children"]),M=S({src:w,artboard:C,animations:I,layout:P,stateMachines:D,autoplay:!0,shouldDisableRiveListeners:R},{useOffscreenRenderer:k,shouldResizeCanvasToContainer:p}).RiveComponent;return o.default.createElement(M,i({},A),$)},e.useResizeCanvas=y,e.useRive=S,e.useStateMachineInput=function(v,w,C,I){var D=t.useState(null),P=D[0],F=D[1];return t.useEffect(function(){function k(){if(v&&w&&C||F(null),v&&w&&C){var H=v.stateMachineInputs(w);if(H){var R=H.find(function(E){return E.name===C});I!==void 0&&R&&(R.value=I),F(R||null)}}else F(null)}k(),v&&v.on(n.EventType.Play,function(){k()})},[v]),P},Object.keys(n).forEach(function(v){v==="default"||e.hasOwnProperty(v)||Object.defineProperty(e,v,{enumerable:!0,get:function(){return n[v]}})})})(eg);const HT=mp(eg),yl=({src:e="https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:t,height:n,style:r,...o})=>j.jsx(et,{width:t,height:n,style:r,children:j.jsx(HT,{src:e,...o})});yl.defaultProps={src:"https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:"300px",height:"300px",style:{}};const ng=({isLoading:e,className:t,width:n,height:r,onClose:o,src:i,noScroll:a="noscroll",...s})=>(l.useEffect(()=>(e?document.body.classList.add(a):document.body.classList.remove(a),()=>{document.body.classList.remove(a)}),[e,a]),e?j.jsx(et,{className:t,"data-test-id":s["data-testid-backdrop"],onClick:o,position:"fixed",left:"$0",top:"$0",width:"$full",height:"$full",cursor:"progress",style:{backgroundColor:"rgba(0, 0, 0, 0.4)",zIndex:9999},children:j.jsx(et,{"data-test-id":s["data-testid-loader"],position:"absolute",left:"50%",top:"50%",width:n,height:r,children:j.jsx(yl,{src:i,width:n,height:r,style:{transform:"translate(-50%, -50%)"}})})}):null);ng.defaultProps={onClose:()=>{},className:"",src:void 0,noScroll:"noscroll","data-testid-backdrop":"full-loader-backdrop","data-testid-loader":"full-loader-loader"};var WT=wt({defaultClassName:"_1a8lrjn1 j1jih79l j1jih7ak",variantClassNames:{color:{primary:"_1a8lrjn2",white:"_1a8lrjn3"},size:{small:"_1a8lrjn4",medium:"_1a8lrjn5",large:"_1a8lrjn6"}},defaultVariants:{color:"primary",size:"medium"},compoundVariants:[]});const zT=({color:e,size:t,...n})=>j.jsx(et,{...n,className:Pe(WT({color:e,size:t}))});function UT(e){return class extends l.Component{constructor(){super(...arguments),this.getValue=()=>{const{children:n,selectedValue:r}=this.props;return r&&r.length?r:n?l.Children.map(n,o=>{const i=l.Children.toArray(o.children||o.props.children);return i&&i[0]&&i[0].props.value}):[]},this.onChange=(n,r,o)=>{const i=this.getValue().concat();i[n]=r,o&&o(i,n)},this.onValueChange=(n,r)=>{this.onChange(n,r,this.props.onValueChange)},this.onScrollChange=(n,r)=>{this.onChange(n,r,this.props.onScrollChange)}}render(){return j.jsx(e,{...this.props,getValue:this.getValue,onValueChange:this.onValueChange,onScrollChange:this.props.onScrollChange&&this.onScrollChange})}}}var YT="_1ypj0tt5",KT="_1ypj0tt4",qT="_1ypj0tt3",Bh="_1ypj0tt1",XT="_1ypj0tt0",GT="_1ypj0tt2";const ZT=({className:e,children:t,getValue:n,onScrollChange:r,onValueChange:o})=>{const i=n==null?void 0:n(),a=l.Children.map(t,(s,c)=>l.cloneElement(s,{selectedValue:i==null?void 0:i[c],onValueChange:(...u)=>o==null?void 0:o(c,...u),onScrollChange:(...u)=>r==null?void 0:r(c,...u)}));return j.jsx(et,{className:Pe(YT,e),children:a})},rg=UT(ZT),QT=e=>null;function JT(e){var t;const n=(r,o,i)=>{const a=Math.round(r/o);return Math.min(a,i-1)};return t=class extends l.Component{constructor(){super(...arguments),this.selectByIndex=(r,o,i)=>{r<0||r>=l.Children.count(this.props.children)||!o||i(r*o)},this.doScrollingComplete=(r,o,i)=>{const a=l.Children.toArray(this.props.children),s=n(r,o,a.length),c=a[s];c?i(c.props.value):console.warn&&console.warn("child not found",a,s)},this.select=(r,o,i)=>{const a=l.Children.toArray(this.props.children);for(let s=0,c=a.length;s<c;s+=1)if(a[s].props.value===r){this.selectByIndex(s,o,i);return}this.selectByIndex(0,o,i)}}render(){return j.jsx(e,{...this.props,doScrollingComplete:this.doScrollingComplete,computeChildIndex:n,select:this.select})}},t.Item=QT,t}const eI=e=>{const{children:t,selectedValue:n,defaultSelectedValue:r,select:o,doScrollingComplete:i,onValueChange:a,computeChildIndex:s,disabled:c,className:u}=e,d=l.useRef(null),f=l.useRef(null),m=l.useRef(null),h=l.useRef(0),b=l.useRef(0),y=l.useMemo(()=>{if(n||r)return n||r;const k=l.Children.toArray(t);return k&&k[0]&&k[0].props.value},[t,r,n]),[T,S]=l.useState(y),v=(()=>{let k=-1,H=0,R=0,E=!1,p=!1;const $=(L,oe)=>{L.transform=oe},A=(L,oe)=>{L.transition=oe},M=(L,oe,G=.3)=>{var K,Z;k!==oe&&(k=oe,A((K=f.current)==null?void 0:K.style,`cubic-bezier(0,0,0.2,1.15) ${G}s`),$((Z=f.current)==null?void 0:Z.style,`translate3d(0,${-oe}px,0)`),setTimeout(()=>{P(),f.current&&A(f.current.style,"")},+G*1e3))},z=((L=30,oe=100)=>{let G=0,K=0,Z=0;const ce={record:W=>{const Y=+new Date;Z=(W-K)/(Y-G),Y-G>=L&&(Z=Y-G<=oe?Z:0,K=W,G=Y)},getVelocity:W=>(W!==K&&ce.record(W),Z)};return ce})(),U=()=>{p=!1;let L=k;const oe=(t.length-1)*h.current;let G=.3;const K=z.getVelocity(L)*4;K&&(L=K*40+L,G=Math.abs(K)*.1),L%h.current!==0&&(L=Math.round(L/h.current)*h.current),L<0?L=0:L>oe&&(L=oe),M(0,L,G<.3?.3:G),D()},re=L=>{E||(p=!0,R=L,H=k)},B=L=>{var oe;E||!p||(k=H-L+R,z.record(k),D(),$((oe=f.current)==null?void 0:oe.style,`translate3d(0,${-k}px,0)`))};return{touchstart:L=>re(L.touches[0].pageY),mousedown:L=>re(L.pageY),touchmove:L=>{L.preventDefault(),B(L.touches[0].pageY)},mousemove:L=>{L.preventDefault(),B(L.pageY)},touchend:()=>U(),touchcancel:()=>U(),mouseup:()=>U(),getValue:()=>k,scrollTo:M,setDisabled:(L=!1)=>{E=L}}})(),w=l.useCallback(k=>{v.scrollTo(0,k)},[v]),C=l.useCallback(k=>{v.scrollTo(0,k,0)},[v]),I=k=>{k!==T&&("selectedValue"in e||S(k),a&&a(k))},D=()=>{const k=v.getValue();if(k>=0){const H=l.Children.toArray(t),R=s(k,h.current,H.length);if(b.current!==R){b.current=R;const E=H[R];E&&e.onScrollChange?e.onScrollChange(E.props.value):!H&&console.warn&&console.warn("child not found",t,R)}}},P=()=>{const k=v.getValue();k>=0&&i(k,h.current,I)},F=()=>{const k=`${Bh} ${GT}`,H=E=>{const{className:p="",style:$,value:A}=E.props,M=T===A;return j.jsx("div",{style:{...$},"data-selected":M?"true":void 0,className:`${M?k:Bh} ${p}`,children:E.props.children},A)};return l.Children?l.Children.map(t,H):[].concat(t).map(H)};return l.useEffect(()=>{var E,p,$;const k=((E=d.current)==null?void 0:E.getBoundingClientRect().height)??0,H=((p=m.current)==null?void 0:p.getBoundingClientRect().height)??0;h.current=(($=m.current)==null?void 0:$.getBoundingClientRect().height)??0;let R=Math.floor(k/H);return R%2===0&&(R-=1),R-=1,R/=2,f.current.style.padding=`${H*R}px 0`,m.current.style.top=`${H*R}px`,v.setDisabled(c),o(T,h.current,w),Object.keys(v).forEach(A=>{var M;if(A.indexOf("touch")===0||A.indexOf("mouse")===0){const z=A.indexOf("move")>=0?{passive:!1}:{passive:!0};(M=d.current)==null||M.addEventListener(A,v[A],z)}}),()=>{Object.keys(v).forEach(A=>{var M;(A.indexOf("touch")===0||A.indexOf("mouse")===0)&&((M=d.current)==null||M.removeEventListener(A,v[A]))})}},[c,v,w,o,T]),l.useEffect(()=>{"selectedValue"in e&&T!==n&&S(n),v.setDisabled(c)},[n,T,e,v,c]),l.useEffect(()=>{o(T,h.current,C)},[C,o,T]),j.jsxs("div",{className:Pe(XT,u),ref:d,children:[j.jsx("div",{className:Pe(qT,u),ref:m}),j.jsx("div",{className:KT,ref:f,children:F()})]})},iu=JT(eI);var Mt=(e=>(e.DATE="date",e.MONTH="month",e.YEAR="year",e.DATE_TIME="datetime",e.TIME="time",e))(Mt||{});const qa=24*60*60*1e3,tI={am:"AM",pm:"PM"},og=e=>new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),pc=e=>e<10?`0${e}`:`${e}`,Sr=e=>new Date(+e),nI=(e,t)=>{e.setDate(Math.min(e.getDate(),og(new Date(e.getFullYear(),t)))),e.setMonth(t)},Hh=(e,t,n)=>{if(n){const r=e.getHours();let o=t;o=r>=12?t+12:t,o=o>=24?0:o,e.setHours(o)}else e.setHours(t)},Wh=(e,t)=>{t===0?e.setTime(+e-qa/2):e.setTime(+e+qa/2)},zh=(e,t)=>(t&&(e===0&&(e=12),e>12&&(e-=12)),e),rI=e=>["January","February","March","April","May","June","July","August","September","October","November","December"][e],oI=e=>{const{date:t,defaultDate:n=new Date(2e3,0,1),locale:r=tI,mode:o="date",disabled:i=!1,className:a,minuteStep:s=1,use12Hours:c=!1,minDate:u,maxDate:d,formatDay:f,formatMonth:m}=e,[h,b]=l.useState(t||n),y=l.useRef(new Date(-1)),T=l.useRef(new Date);l.useEffect(()=>{"date"in e&&b(t||n)},[t,n,e]);const S=()=>$(h||y.current),v=()=>E().getFullYear(),w=()=>p().getFullYear(),C=()=>E().getMonth(),I=()=>p().getMonth(),D=()=>E().getDate(),P=()=>p().getDate(),F=()=>E().getHours(),k=()=>p().getHours(),H=()=>E().getMinutes(),R=()=>p().getMinutes(),E=()=>u||y.current,p=()=>d||T.current,$=G=>{const K=E(),Z=p();if(o===Mt.DATE_TIME){if(G<K)return Sr(K);if(G>Z)return Sr(Z)}else if(o===Mt.DATE||o===Mt.YEAR||o===Mt.MONTH){if(+G+qa<=K)return Sr(K);if(G>=+Z+qa)return Sr(Z)}else if(o===Mt.TIME){const ce=Z.getHours(),W=Z.getMinutes(),Y=K.getHours(),te=K.getMinutes(),J=G.getHours(),ie=G.getMinutes();if(J<Y||J===Y&&ie<te)return Sr(K);if(J>ce||J===ce&&ie>W)return Sr(Z)}return G},A=(G,K)=>{const Z=parseInt(G[K],10),ce=Sr(S());if(o===Mt.DATE_TIME||o===Mt.DATE||o===Mt.YEAR||o===Mt.MONTH)switch(K){case 0:ce.setDate(Z);break;case 1:nI(ce,Z);break;case 2:ce.setFullYear(Z);break;case 3:Hh(ce,Z);break;case 4:ce.setMinutes(Z);break;case 5:Wh(ce,Z);break}else if(o===Mt.TIME)switch(K){case 0:Hh(ce,Z);break;case 1:ce.setMinutes(Z);break;case 2:Wh(ce,Z);break}return $(ce)},M=(G,K)=>{const Z=A(G,K);"date"in e||b(Z),e.onDateChange&&e.onDateChange(Z),e.onValueChange&&e.onValueChange(G,K)},z=(G,K)=>{if(e.onScrollChange){const Z=A(G,K);e.onScrollChange(Z,G,K)}},U=()=>{const G=S(),K=G.getFullYear(),Z=G.getMonth(),ce=v(),W=w(),Y=C(),te=I(),J=D(),ie=P(),ee=[];for(let ze=ce;ze<=W;ze+=1)ee.push({value:`${ze}`,label:`${ze}`});const we={key:"year",props:{children:ee}};if(o===Mt.YEAR)return[we];const Te=[];let Oe=0,Ne=11;ce===K&&(Oe=Y),W===K&&(Ne=te);for(let ze=Oe;ze<=Ne;ze+=1){const xt=m?m(ze,G):rI(ze);Te.push({value:`${ze}`,label:xt})}const Re={key:"month",props:{children:Te}};if(o===Mt.MONTH)return[Re,we];const We=[];let De=1,ot=og(G);ce===K&&Y===Z&&(De=J),W===K&&te===Z&&(ot=ie);for(let ze=De;ze<=ot;ze+=1){const xt=f?f(ze,G):`${ze}`;We.push({value:`${ze}`,label:xt})}return[{key:"day",props:{children:We}},Re,we]},re=G=>{let{minHour:K=0,maxHour:Z=23,minMinute:ce=0,maxMinute:W=59}=e;const Y=H(),te=R(),J=F(),ie=k(),ee=G.getHours();if(o===Mt.DATE_TIME){const Re=G.getFullYear(),We=G.getMonth(),De=G.getDate(),ot=v(),ze=w(),xt=C(),Xe=I(),Pt=D(),xe=P();ot===Re&&xt===We&&Pt===De&&(K=J,J===ee&&(ce=Y)),ze===Re&&Xe===We&&xe===De&&(Z=ie,ie===ee&&(W=te))}else K=J,J===ee&&(ce=Y),Z=ie,ie===ee&&(W=te);const we=[];K===0&&Z===0||K!==0&&Z!==0?K=zh(K):K===0&&c&&(K=1,we.push({value:"0",label:"12"})),Z=zh(Z);for(let Re=K;Re<=Z;Re+=1)we.push({value:`${Re}`,label:pc(Re)});const Te=[],Oe=G.getMinutes();for(let Re=ce;Re<=W;Re+=s)Te.push({value:`${Re}`,label:pc(Re)}),Oe>Re&&Oe<Re+s&&Te.push({value:`${Oe}`,label:pc(Oe)});return{cols:[{key:"hours",props:{children:we}},{key:"minutes",props:{children:Te}}].concat(c?[{key:"ampm",props:{children:[{value:"0",label:r.am},{value:"1",label:r.pm}]}}]:[]),selMinute:Oe}},B=()=>{const G=S();let K=[],Z=[];if(o===Mt.YEAR)return{cols:U(),value:[`${G.getFullYear()}`]};if(o===Mt.MONTH)return{cols:U(),value:[`${G.getMonth()}`,`${G.getFullYear()}`]};if((o===Mt.DATE_TIME||o===Mt.DATE)&&(K=U(),Z=[`${G.getDate()}`,`${G.getMonth()}`,`${G.getFullYear()}`]),o===Mt.DATE_TIME||o===Mt.TIME){const ce=re(G);K=K.concat(ce.cols);const W=G.getHours();let Y=[`${W}`,`${ce.selMinute}`],te=W;c&&(te=W>12?W-12:W,Y=[`${te}`,`${ce.selMinute}`,`${W>=12?1:0}`]),Z=Z.concat(Y)}return{value:Z,cols:K}},{value:L,cols:oe}=B();return j.jsx(rg,{className:a,selectedValue:L,onValueChange:M,onScrollChange:z,children:oe.map(G=>j.jsx(iu,{disabled:i,className:`picker-item-${G.key}`,children:G.props.children.map(K=>j.jsx(iu.Item,{value:K.value,children:K.label},K.value))},G.key))})};var au={exports:{}},gt={};/** @license React v17.0.2
161
161
  * react-is.production.min.js
162
162
  *
163
163
  * Copyright (c) Facebook, Inc. and its affiliates.
164
164
  *
165
165
  * This source code is licensed under the MIT license found in the
166
166
  * LICENSE file in the root directory of this source tree.
167
- */var zh;function iI(){if(zh)return gt;zh=1;var e=60103,t=60106,n=60107,r=60108,o=60114,i=60109,a=60110,s=60112,c=60113,u=60120,d=60115,f=60116,m=60121,h=60122,b=60117,y=60129,T=60131;if(typeof Symbol=="function"&&Symbol.for){var S=Symbol.for;e=S("react.element"),t=S("react.portal"),n=S("react.fragment"),r=S("react.strict_mode"),o=S("react.profiler"),i=S("react.provider"),a=S("react.context"),s=S("react.forward_ref"),c=S("react.suspense"),u=S("react.suspense_list"),d=S("react.memo"),f=S("react.lazy"),m=S("react.block"),h=S("react.server.block"),b=S("react.fundamental"),y=S("react.debug_trace_mode"),T=S("react.legacy_hidden")}function v(p){if(typeof p=="object"&&p!==null){var $=p.$$typeof;switch($){case e:switch(p=p.type,p){case n:case o:case r:case c:case u:return p;default:switch(p=p&&p.$$typeof,p){case a:case s:case f:case d:case i:return p;default:return $}}case t:return $}}}var w=i,C=e,I=s,D=n,P=f,F=d,k=t,H=o,R=r,E=c;return gt.ContextConsumer=a,gt.ContextProvider=w,gt.Element=C,gt.ForwardRef=I,gt.Fragment=D,gt.Lazy=P,gt.Memo=F,gt.Portal=k,gt.Profiler=H,gt.StrictMode=R,gt.Suspense=E,gt.isAsyncMode=function(){return!1},gt.isConcurrentMode=function(){return!1},gt.isContextConsumer=function(p){return v(p)===a},gt.isContextProvider=function(p){return v(p)===i},gt.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},gt.isForwardRef=function(p){return v(p)===s},gt.isFragment=function(p){return v(p)===n},gt.isLazy=function(p){return v(p)===f},gt.isMemo=function(p){return v(p)===d},gt.isPortal=function(p){return v(p)===t},gt.isProfiler=function(p){return v(p)===o},gt.isStrictMode=function(p){return v(p)===r},gt.isSuspense=function(p){return v(p)===c},gt.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===o||p===y||p===r||p===c||p===u||p===T||typeof p=="object"&&p!==null&&(p.$$typeof===f||p.$$typeof===d||p.$$typeof===i||p.$$typeof===a||p.$$typeof===s||p.$$typeof===b||p.$$typeof===m||p[0]===h)},gt.typeOf=v,gt}var yt={};/** @license React v17.0.2
167
+ */var Uh;function iI(){if(Uh)return gt;Uh=1;var e=60103,t=60106,n=60107,r=60108,o=60114,i=60109,a=60110,s=60112,c=60113,u=60120,d=60115,f=60116,m=60121,h=60122,b=60117,y=60129,T=60131;if(typeof Symbol=="function"&&Symbol.for){var S=Symbol.for;e=S("react.element"),t=S("react.portal"),n=S("react.fragment"),r=S("react.strict_mode"),o=S("react.profiler"),i=S("react.provider"),a=S("react.context"),s=S("react.forward_ref"),c=S("react.suspense"),u=S("react.suspense_list"),d=S("react.memo"),f=S("react.lazy"),m=S("react.block"),h=S("react.server.block"),b=S("react.fundamental"),y=S("react.debug_trace_mode"),T=S("react.legacy_hidden")}function v(p){if(typeof p=="object"&&p!==null){var $=p.$$typeof;switch($){case e:switch(p=p.type,p){case n:case o:case r:case c:case u:return p;default:switch(p=p&&p.$$typeof,p){case a:case s:case f:case d:case i:return p;default:return $}}case t:return $}}}var w=i,C=e,I=s,D=n,P=f,F=d,k=t,H=o,R=r,E=c;return gt.ContextConsumer=a,gt.ContextProvider=w,gt.Element=C,gt.ForwardRef=I,gt.Fragment=D,gt.Lazy=P,gt.Memo=F,gt.Portal=k,gt.Profiler=H,gt.StrictMode=R,gt.Suspense=E,gt.isAsyncMode=function(){return!1},gt.isConcurrentMode=function(){return!1},gt.isContextConsumer=function(p){return v(p)===a},gt.isContextProvider=function(p){return v(p)===i},gt.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},gt.isForwardRef=function(p){return v(p)===s},gt.isFragment=function(p){return v(p)===n},gt.isLazy=function(p){return v(p)===f},gt.isMemo=function(p){return v(p)===d},gt.isPortal=function(p){return v(p)===t},gt.isProfiler=function(p){return v(p)===o},gt.isStrictMode=function(p){return v(p)===r},gt.isSuspense=function(p){return v(p)===c},gt.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===o||p===y||p===r||p===c||p===u||p===T||typeof p=="object"&&p!==null&&(p.$$typeof===f||p.$$typeof===d||p.$$typeof===i||p.$$typeof===a||p.$$typeof===s||p.$$typeof===b||p.$$typeof===m||p[0]===h)},gt.typeOf=v,gt}var yt={};/** @license React v17.0.2
168
168
  * react-is.development.js
169
169
  *
170
170
  * Copyright (c) Facebook, Inc. and its affiliates.
171
171
  *
172
172
  * This source code is licensed under the MIT license found in the
173
173
  * LICENSE file in the root directory of this source tree.
174
- */var Uh;function aI(){return Uh||(Uh=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,o=60114,i=60109,a=60110,s=60112,c=60113,u=60120,d=60115,f=60116,m=60121,h=60122,b=60117,y=60129,T=60131;if(typeof Symbol=="function"&&Symbol.for){var S=Symbol.for;e=S("react.element"),t=S("react.portal"),n=S("react.fragment"),r=S("react.strict_mode"),o=S("react.profiler"),i=S("react.provider"),a=S("react.context"),s=S("react.forward_ref"),c=S("react.suspense"),u=S("react.suspense_list"),d=S("react.memo"),f=S("react.lazy"),m=S("react.block"),h=S("react.server.block"),b=S("react.fundamental"),S("react.scope"),S("react.opaque.id"),y=S("react.debug_trace_mode"),S("react.offscreen"),T=S("react.legacy_hidden")}var v=!1;function w(ie){return!!(typeof ie=="string"||typeof ie=="function"||ie===n||ie===o||ie===y||ie===r||ie===c||ie===u||ie===T||v||typeof ie=="object"&&ie!==null&&(ie.$$typeof===f||ie.$$typeof===d||ie.$$typeof===i||ie.$$typeof===a||ie.$$typeof===s||ie.$$typeof===b||ie.$$typeof===m||ie[0]===h))}function C(ie){if(typeof ie=="object"&&ie!==null){var ee=ie.$$typeof;switch(ee){case e:var we=ie.type;switch(we){case n:case o:case r:case c:case u:return we;default:var Te=we&&we.$$typeof;switch(Te){case a:case s:case f:case d:case i:return Te;default:return ee}}case t:return ee}}}var I=a,D=i,P=e,F=s,k=n,H=f,R=d,E=t,p=o,$=r,A=c,M=!1,z=!1;function U(ie){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function re(ie){return z||(z=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(ie){return C(ie)===a}function L(ie){return C(ie)===i}function oe(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===e}function G(ie){return C(ie)===s}function K(ie){return C(ie)===n}function Z(ie){return C(ie)===f}function ce(ie){return C(ie)===d}function W(ie){return C(ie)===t}function Y(ie){return C(ie)===o}function te(ie){return C(ie)===r}function J(ie){return C(ie)===c}yt.ContextConsumer=I,yt.ContextProvider=D,yt.Element=P,yt.ForwardRef=F,yt.Fragment=k,yt.Lazy=H,yt.Memo=R,yt.Portal=E,yt.Profiler=p,yt.StrictMode=$,yt.Suspense=A,yt.isAsyncMode=U,yt.isConcurrentMode=re,yt.isContextConsumer=B,yt.isContextProvider=L,yt.isElement=oe,yt.isForwardRef=G,yt.isFragment=K,yt.isLazy=Z,yt.isMemo=ce,yt.isPortal=W,yt.isProfiler=Y,yt.isStrictMode=te,yt.isSuspense=J,yt.isValidElementType=w,yt.typeOf=C}()),yt}process.env.NODE_ENV==="production"?au.exports=iI():au.exports=aI();var Yh=au.exports;let Kh=e=>typeof e=="object"&&e!=null&&e.nodeType===1,qh=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",vc=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return qh(n.overflowY,t)||qh(n.overflowX,t)||(r=>{let o=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)})(e)}return!1},ua=(e,t,n,r,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0,sI=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var cI=(e,t)=>{var n,r,o,i,a,s;if(typeof document>"u")return[];let{scrollMode:c,block:u,inline:d,boundary:f,skipOverflowHiddenElements:m}=t,h=typeof f=="function"?f:$=>$!==f;if(!Kh(e))throw new TypeError("Invalid target");let b=document.scrollingElement||document.documentElement,y=[],T=e;for(;Kh(T)&&h(T);){if(T=sI(T),T===b){y.push(T);break}T!=null&&T===document.body&&vc(T)&&!vc(document.documentElement)||T!=null&&vc(T,m)&&y.push(T)}let S=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,v=(i=(o=window.visualViewport)==null?void 0:o.height)!=null?i:innerHeight,w=(a=window.scrollX)!=null?a:pageXOffset,C=(s=window.scrollY)!=null?s:pageYOffset,{height:I,width:D,top:P,right:F,bottom:k,left:H}=e.getBoundingClientRect(),R=u==="start"||u==="nearest"?P:u==="end"?k:P+I/2,E=d==="center"?H+D/2:d==="end"?F:H,p=[];for(let $=0;$<y.length;$++){let A=y[$],{height:M,width:z,top:U,right:re,bottom:B,left:L}=A.getBoundingClientRect();if(c==="if-needed"&&P>=0&&H>=0&&k<=v&&F<=S&&P>=U&&k<=B&&H>=L&&F<=re)return p;let oe=getComputedStyle(A),G=parseInt(oe.borderLeftWidth,10),K=parseInt(oe.borderTopWidth,10),Z=parseInt(oe.borderRightWidth,10),ce=parseInt(oe.borderBottomWidth,10),W=0,Y=0,te="offsetWidth"in A?A.offsetWidth-A.clientWidth-G-Z:0,J="offsetHeight"in A?A.offsetHeight-A.clientHeight-K-ce:0,ie="offsetWidth"in A?A.offsetWidth===0?0:z/A.offsetWidth:0,ee="offsetHeight"in A?A.offsetHeight===0?0:M/A.offsetHeight:0;if(b===A)W=u==="start"?R:u==="end"?R-v:u==="nearest"?ua(C,C+v,v,K,ce,C+R,C+R+I,I):R-v/2,Y=d==="start"?E:d==="center"?E-S/2:d==="end"?E-S:ua(w,w+S,S,G,Z,w+E,w+E+D,D),W=Math.max(0,W+C),Y=Math.max(0,Y+w);else{W=u==="start"?R-U-K:u==="end"?R-B+ce+J:u==="nearest"?ua(U,B,M,K,ce+J,R,R+I,I):R-(U+M/2)+J/2,Y=d==="start"?E-L-G:d==="center"?E-(L+z/2)+te/2:d==="end"?E-re+Z+te:ua(L,re,z,G,Z+te,E,E+D,D);let{scrollLeft:we,scrollTop:Te}=A;W=Math.max(0,Math.min(Te+W/ee,A.scrollHeight-M/ee+J)),Y=Math.max(0,Math.min(we+Y/ie,A.scrollWidth-z/ie+te)),R+=Te-W,E+=we-Y}p.push({el:A,top:W,left:Y})}return p},uI=0;function Xh(e){return typeof e=="function"?e:dn}function dn(){}function og(e,t){if(e){var n=cI(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach(function(r){var o=r.el,i=r.top,a=r.left;o.scrollTop=i,o.scrollLeft=a})}}function Gh(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function bl(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];r(),n=setTimeout(function(){n=null,e.apply(void 0,a)},t)}return o.cancel=r,o}function It(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return s&&s.apply(void 0,[r].concat(i)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function hr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(o){typeof o=="function"?o(r):o&&(o.current=r)})}}function ig(){return String(uI++)}function ag(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function Zh(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function sg(e){return typeof e.type=="string"}function cg(e){return e.props}function lI(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var dI=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function la(e){e===void 0&&(e={});var t={};return dI.forEach(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function _i(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=Xa(t,r)?t[r]:e[r],n},{})}function Xa(e,t){return e[t]!==void 0}function Si(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function fI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Or(e,t,n,r,o){if(o===void 0&&(o=!0),n===0)return-1;var i=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:i+1);var a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);var s=Fr(e,a,n,r,o);return s===-1?t>=n?-1:t:s}function Fr(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a<n;a++)if(!r(a).hasAttribute("disabled"))return a}else for(var s=t-1;s>=0;s--)if(!r(s).hasAttribute("disabled"))return s;return o?e>0?Fr(1,0,n,r,!1):Fr(-1,n-1,n,r,!1):-1}function Ga(e,t,n,r){return r===void 0&&(r=!0),t.some(function(o){return o&&(Gh(o,e,n)||r&&Gh(o,n.document.activeElement,n))})}var wl=dn;process.env.NODE_ENV!=="production"&&(wl=function(t,n,r){var o="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(t).forEach(function(i){n[i]!==void 0&&r[i]===void 0?console.error('downshift: A component has changed the controlled prop "'+i+'" to be uncontrolled. '+o):n[i]===void 0&&r[i]!==void 0&&console.error('downshift: A component has changed the uncontrolled prop "'+i+'" to be controlled. '+o)})});var hI=bl(function(e){ug(e).textContent=""},500);function El(e,t){var n=ug(t);e&&(n.textContent=e,hI(t))}function ug(e){e===void 0&&(e=document);var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var lg=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,dg=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,fg=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,_a=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,Sa=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,hg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,pg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,vg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,mg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,gg=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,yg=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,bg=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,wg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,su=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,Eg=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,xg=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,_g=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,pI=Object.freeze({__proto__:null,unknown:lg,mouseUp:dg,itemMouseEnter:fg,keyDownArrowUp:_a,keyDownArrowDown:Sa,keyDownEscape:hg,keyDownEnter:pg,keyDownHome:vg,keyDownEnd:mg,clickItem:gg,blurInput:yg,changeInput:bg,keyDownSpaceButton:wg,clickButton:su,blurButton:Eg,controlledPropUpdatedSelectedItem:xg,touchEnd:_g}),vI=["refKey","ref"],mI=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],gI=["onKeyDown","onBlur","onChange","onInput","onChangeText"],yI=["refKey","ref"],bI=["onMouseMove","onMouseDown","onClick","onPress","index","item"],wI=function(){var e=function(t){Au(n,t);function n(o){var i;i=t.call(this,o)||this,i.id=i.props.id||"downshift-"+ig(),i.menuId=i.props.menuId||i.id+"-menu",i.labelId=i.props.labelId||i.id+"-label",i.inputId=i.props.inputId||i.id+"-input",i.getItemId=i.props.getItemId||function(v){return i.id+"-item-"+v},i.input=null,i.items=[],i.itemCount=null,i.previousResultCount=0,i.timeoutIds=[],i.internalSetTimeout=function(v,w){var C=setTimeout(function(){i.timeoutIds=i.timeoutIds.filter(function(I){return I!==C}),v()},w);i.timeoutIds.push(C)},i.setItemCount=function(v){i.itemCount=v},i.unsetItemCount=function(){i.itemCount=null},i.setHighlightedIndex=function(v,w){v===void 0&&(v=i.props.defaultHighlightedIndex),w===void 0&&(w={}),w=la(w),i.internalSetState(ae({highlightedIndex:v},w))},i.clearSelection=function(v){i.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:i.props.defaultHighlightedIndex,isOpen:i.props.defaultIsOpen},v)},i.selectItem=function(v,w,C){w=la(w),i.internalSetState(ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,selectedItem:v,inputValue:i.props.itemToString(v)},w),C)},i.selectItemAtIndex=function(v,w,C){var I=i.items[v];I!=null&&i.selectItem(I,w,C)},i.selectHighlightedItem=function(v,w){return i.selectItemAtIndex(i.getState().highlightedIndex,v,w)},i.internalSetState=function(v,w){var C,I,D={},P=typeof v=="function";return!P&&v.hasOwnProperty("inputValue")&&i.props.onInputValueChange(v.inputValue,ae({},i.getStateAndHelpers(),v)),i.setState(function(F){F=i.getState(F);var k=P?v(F):v;k=i.props.stateReducer(F,k),C=k.hasOwnProperty("selectedItem");var H={};return C&&k.selectedItem!==F.selectedItem&&(I=k.selectedItem),k.type=k.type||lg,Object.keys(k).forEach(function(R){F[R]!==k[R]&&(D[R]=k[R]),R!=="type"&&(k[R],Xa(i.props,R)||(H[R]=k[R]))}),P&&k.hasOwnProperty("inputValue")&&i.props.onInputValueChange(k.inputValue,ae({},i.getStateAndHelpers(),k)),H},function(){Xh(w)();var F=Object.keys(D).length>1;F&&i.props.onStateChange(D,i.getStateAndHelpers()),C&&i.props.onSelect(v.selectedItem,i.getStateAndHelpers()),I!==void 0&&i.props.onChange(I,i.getStateAndHelpers()),i.props.onUserAction(D,i.getStateAndHelpers())})},i.rootRef=function(v){return i._rootNode=v},i.getRootProps=function(v,w){var C,I=v===void 0?{}:v,D=I.refKey,P=D===void 0?"ref":D,F=I.ref,k=an(I,vI),H=w===void 0?{}:w,R=H.suppressRefError,E=R===void 0?!1:R;i.getRootProps.called=!0,i.getRootProps.refKey=P,i.getRootProps.suppressRefError=E;var p=i.getState(),$=p.isOpen;return ae((C={},C[P]=hr(F,i.rootRef),C.role="combobox",C["aria-expanded"]=$,C["aria-haspopup"]="listbox",C["aria-owns"]=$?i.menuId:null,C["aria-labelledby"]=i.labelId,C),k)},i.keyDownHandlers={ArrowDown:function(w){var C=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?5:1;this.moveHighlightedIndex(I,{type:Sa})}else this.internalSetState({isOpen:!0,type:Sa},function(){var D=C.getItemCount();if(D>0){var P=C.getState(),F=P.highlightedIndex,k=Or(1,F,D,function(H){return C.getItemNodeFromIndex(H)});C.setHighlightedIndex(k,{type:Sa})}})},ArrowUp:function(w){var C=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?-5:-1;this.moveHighlightedIndex(I,{type:_a})}else this.internalSetState({isOpen:!0,type:_a},function(){var D=C.getItemCount();if(D>0){var P=C.getState(),F=P.highlightedIndex,k=Or(-1,F,D,function(H){return C.getItemNodeFromIndex(H)});C.setHighlightedIndex(k,{type:_a})}})},Enter:function(w){if(w.which!==229){var C=this.getState(),I=C.isOpen,D=C.highlightedIndex;if(I&&D!=null){w.preventDefault();var P=this.items[D],F=this.getItemNodeFromIndex(D);if(P==null||F&&F.hasAttribute("disabled"))return;this.selectHighlightedItem({type:pg})}}},Escape:function(w){w.preventDefault(),this.reset(ae({type:hg},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},i.buttonKeyDownHandlers=ae({},i.keyDownHandlers,{" ":function(w){w.preventDefault(),this.toggleMenu({type:wg})}}),i.inputKeyDownHandlers=ae({},i.keyDownHandlers,{Home:function(w){var C=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var P=this.getItemCount();if(!(P<=0||!D)){var F=Fr(1,0,P,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:vg})}}},End:function(w){var C=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var P=this.getItemCount();if(!(P<=0||!D)){var F=Fr(-1,P-1,P,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:mg})}}}}),i.getToggleButtonProps=function(v){var w=v===void 0?{}:v,C=w.onClick;w.onPress;var I=w.onKeyDown,D=w.onKeyUp,P=w.onBlur,F=an(w,mI),k=i.getState(),H=k.isOpen,R={onClick:It(C,i.buttonHandleClick),onKeyDown:It(I,i.buttonHandleKeyDown),onKeyUp:It(D,i.buttonHandleKeyUp),onBlur:It(P,i.buttonHandleBlur)},E=F.disabled?{}:R;return ae({type:"button",role:"button","aria-label":H?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},E,F)},i.buttonHandleKeyUp=function(v){v.preventDefault()},i.buttonHandleKeyDown=function(v){var w=Si(v);i.buttonKeyDownHandlers[w]&&i.buttonKeyDownHandlers[w].call($f(i),v)},i.buttonHandleClick=function(v){v.preventDefault(),i.props.environment.document.activeElement===i.props.environment.document.body&&v.target.focus(),process.env.NODE_ENV==="test"?i.toggleMenu({type:su}):i.internalSetTimeout(function(){return i.toggleMenu({type:su})})},i.buttonHandleBlur=function(v){var w=v.target;i.internalSetTimeout(function(){!i.isMouseDown&&(i.props.environment.document.activeElement==null||i.props.environment.document.activeElement.id!==i.inputId)&&i.props.environment.document.activeElement!==w&&i.reset({type:Eg})})},i.getLabelProps=function(v){return ae({htmlFor:i.inputId,id:i.labelId},v)},i.getInputProps=function(v){var w=v===void 0?{}:v,C=w.onKeyDown,I=w.onBlur,D=w.onChange,P=w.onInput;w.onChangeText;var F=an(w,gI),k,H={};k="onChange";var R=i.getState(),E=R.inputValue,p=R.isOpen,$=R.highlightedIndex;if(!F.disabled){var A;H=(A={},A[k]=It(D,P,i.inputHandleChange),A.onKeyDown=It(C,i.inputHandleKeyDown),A.onBlur=It(I,i.inputHandleBlur),A)}return ae({"aria-autocomplete":"list","aria-activedescendant":p&&typeof $=="number"&&$>=0?i.getItemId($):null,"aria-controls":p?i.menuId:null,"aria-labelledby":F&&F["aria-label"]?void 0:i.labelId,autoComplete:"off",value:E,id:i.inputId},H,F)},i.inputHandleKeyDown=function(v){var w=Si(v);w&&i.inputKeyDownHandlers[w]&&i.inputKeyDownHandlers[w].call($f(i),v)},i.inputHandleChange=function(v){i.internalSetState({type:bg,isOpen:!0,inputValue:v.target.value,highlightedIndex:i.props.defaultHighlightedIndex})},i.inputHandleBlur=function(){i.internalSetTimeout(function(){var v=i.props.environment.document&&!!i.props.environment.document.activeElement&&!!i.props.environment.document.activeElement.dataset&&i.props.environment.document.activeElement.dataset.toggle&&i._rootNode&&i._rootNode.contains(i.props.environment.document.activeElement);!i.isMouseDown&&!v&&i.reset({type:yg})})},i.menuRef=function(v){i._menuNode=v},i.getMenuProps=function(v,w){var C,I=v===void 0?{}:v,D=I.refKey,P=D===void 0?"ref":D,F=I.ref,k=an(I,yI),H=w===void 0?{}:w,R=H.suppressRefError,E=R===void 0?!1:R;return i.getMenuProps.called=!0,i.getMenuProps.refKey=P,i.getMenuProps.suppressRefError=E,ae((C={},C[P]=hr(F,i.menuRef),C.role="listbox",C["aria-labelledby"]=k&&k["aria-label"]?null:i.labelId,C.id=i.menuId,C),k)},i.getItemProps=function(v){var w,C=v===void 0?{}:v,I=C.onMouseMove,D=C.onMouseDown,P=C.onClick;C.onPress;var F=C.index,k=C.item,H=k===void 0?process.env.NODE_ENV==="production"?void 0:lI("getItemProps","item"):k,R=an(C,bI);F===void 0?(i.items.push(H),F=i.items.indexOf(H)):i.items[F]=H;var E="onClick",p=P,$=(w={onMouseMove:It(I,function(){F!==i.getState().highlightedIndex&&(i.setHighlightedIndex(F,{type:fg}),i.avoidScrolling=!0,i.internalSetTimeout(function(){return i.avoidScrolling=!1},250))}),onMouseDown:It(D,function(M){M.preventDefault()})},w[E]=It(p,function(){i.selectItemAtIndex(F,{type:gg})}),w),A=R.disabled?{onMouseDown:$.onMouseDown}:$;return ae({id:i.getItemId(F),role:"option","aria-selected":i.getState().highlightedIndex===F},A,R)},i.clearItems=function(){i.items=[]},i.reset=function(v,w){v===void 0&&(v={}),v=la(v),i.internalSetState(function(C){var I=C.selectedItem;return ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,inputValue:i.props.itemToString(I)},v)},w)},i.toggleMenu=function(v,w){v===void 0&&(v={}),v=la(v),i.internalSetState(function(C){var I=C.isOpen;return ae({isOpen:!I},I&&{highlightedIndex:i.props.defaultHighlightedIndex},v)},function(){var C=i.getState(),I=C.isOpen,D=C.highlightedIndex;I&&i.getItemCount()>0&&typeof D=="number"&&i.setHighlightedIndex(D,v),Xh(w)()})},i.openMenu=function(v){i.internalSetState({isOpen:!0},v)},i.closeMenu=function(v){i.internalSetState({isOpen:!1},v)},i.updateStatus=bl(function(){var v=i.getState(),w=i.items[v.highlightedIndex],C=i.getItemCount(),I=i.props.getA11yStatusMessage(ae({itemToString:i.props.itemToString,previousResultCount:i.previousResultCount,resultCount:C,highlightedItem:w},v));i.previousResultCount=C,El(I,i.props.environment.document)},200);var a=i.props,s=a.defaultHighlightedIndex,c=a.initialHighlightedIndex,u=c===void 0?s:c,d=a.defaultIsOpen,f=a.initialIsOpen,m=f===void 0?d:f,h=a.initialInputValue,b=h===void 0?"":h,y=a.initialSelectedItem,T=y===void 0?null:y,S=i.getState({highlightedIndex:u,isOpen:m,inputValue:b,selectedItem:T});return S.selectedItem!=null&&i.props.initialInputValue===void 0&&(S.inputValue=i.props.itemToString(S.selectedItem)),i.state=S,i}var r=n.prototype;return r.internalClearTimeouts=function(){this.timeoutIds.forEach(function(i){clearTimeout(i)}),this.timeoutIds=[]},r.getState=function(i){return i===void 0&&(i=this.state),_i(i,this.props)},r.getItemCount=function(){var i=this.items.length;return this.itemCount!=null?i=this.itemCount:this.props.itemCount!==void 0&&(i=this.props.itemCount),i},r.getItemNodeFromIndex=function(i){return this.props.environment.document.getElementById(this.getItemId(i))},r.scrollHighlightedItemIntoView=function(){{var i=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(i,this._menuNode)}},r.moveHighlightedIndex=function(i,a){var s=this,c=this.getItemCount(),u=this.getState(),d=u.highlightedIndex;if(c>0){var f=Or(i,d,c,function(m){return s.getItemNodeFromIndex(m)});this.setHighlightedIndex(f,a)}},r.getStateAndHelpers=function(){var i=this.getState(),a=i.highlightedIndex,s=i.inputValue,c=i.selectedItem,u=i.isOpen,d=this.props.itemToString,f=this.id,m=this.getRootProps,h=this.getToggleButtonProps,b=this.getLabelProps,y=this.getMenuProps,T=this.getInputProps,S=this.getItemProps,v=this.openMenu,w=this.closeMenu,C=this.toggleMenu,I=this.selectItem,D=this.selectItemAtIndex,P=this.selectHighlightedItem,F=this.setHighlightedIndex,k=this.clearSelection,H=this.clearItems,R=this.reset,E=this.setItemCount,p=this.unsetItemCount,$=this.internalSetState;return{getRootProps:m,getToggleButtonProps:h,getLabelProps:b,getMenuProps:y,getInputProps:T,getItemProps:S,reset:R,openMenu:v,closeMenu:w,toggleMenu:C,selectItem:I,selectItemAtIndex:D,selectHighlightedItem:P,setHighlightedIndex:F,clearSelection:k,clearItems:H,setItemCount:E,unsetItemCount:p,setState:$,itemToString:d,id:f,highlightedIndex:a,inputValue:s,isOpen:u,selectedItem:c}},r.componentDidMount=function(){var i=this;process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Qh(this._menuNode,this.getMenuProps);{var a=function(){i.isMouseDown=!0},s=function(h){i.isMouseDown=!1;var b=Ga(h.target,[i._rootNode,i._menuNode],i.props.environment);!b&&i.getState().isOpen&&i.reset({type:dg},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},c=function(){i.isTouchMove=!1},u=function(){i.isTouchMove=!0},d=function(h){var b=Ga(h.target,[i._rootNode,i._menuNode],i.props.environment,!1);!i.isTouchMove&&!b&&i.getState().isOpen&&i.reset({type:_g},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},f=this.props.environment;f.addEventListener("mousedown",a),f.addEventListener("mouseup",s),f.addEventListener("touchstart",c),f.addEventListener("touchmove",u),f.addEventListener("touchend",d),this.cleanup=function(){i.internalClearTimeouts(),i.updateStatus.cancel(),f.removeEventListener("mousedown",a),f.removeEventListener("mouseup",s),f.removeEventListener("touchstart",c),f.removeEventListener("touchmove",u),f.removeEventListener("touchend",d)}}},r.shouldScroll=function(i,a){var s=this.props.highlightedIndex===void 0?this.getState():this.props,c=s.highlightedIndex,u=a.highlightedIndex===void 0?i:a,d=u.highlightedIndex,f=c&&this.getState().isOpen&&!i.isOpen,m=c!==d;return f||m},r.componentDidUpdate=function(i,a){process.env.NODE_ENV!=="production"&&(wl(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Qh(this._menuNode,this.getMenuProps)),Xa(this.props,"selectedItem")&&this.props.selectedItemChanged(i.selectedItem,this.props.selectedItem)&&this.internalSetState({type:xg,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(a,i)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},r.componentWillUnmount=function(){this.cleanup()},r.render=function(){var i=Zh(this.props.children,dn);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var a=Zh(i(this.getStateAndHelpers()));if(!a)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&EI(a,this.getRootProps),a;if(sg(a))return l.cloneElement(a,this.getRootProps(cg(a)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")},n}(l.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:ag,itemToString:function(n){return n==null?"":(process.env.NODE_ENV!=="production"&&fI(n)&&!n.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",n),String(n))},onStateChange:dn,onInputValueChange:dn,onUserAction:dn,onChange:dn,onSelect:dn,onOuterClick:dn,selectedItemChanged:function(n,r){return n!==r},environment:typeof window>"u"?{}:window,stateReducer:function(n,r){return r},suppressRefError:!1,scrollIntoView:og},e.stateChangeTypes=pI,e}();process.env.NODE_ENV!=="production"&&(wI.propTypes={children:X.func,defaultHighlightedIndex:X.number,defaultIsOpen:X.bool,initialHighlightedIndex:X.number,initialSelectedItem:X.any,initialInputValue:X.string,initialIsOpen:X.bool,getA11yStatusMessage:X.func,itemToString:X.func,onChange:X.func,onSelect:X.func,onStateChange:X.func,onInputValueChange:X.func,onUserAction:X.func,onOuterClick:X.func,selectedItemChanged:X.func,stateReducer:X.func,itemCount:X.number,id:X.string,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})}),suppressRefError:X.bool,scrollIntoView:X.func,selectedItem:X.any,isOpen:X.bool,inputValue:X.string,highlightedIndex:X.number,labelId:X.string,inputId:X.string,menuId:X.string,getItemId:X.func});function Qh(e,t){var n=t.refKey;e||console.error('downshift: The ref prop "'+n+'" from getMenuProps was not applied correctly on your menu element.')}function EI(e,t){var n=t.refKey,r=n!=="ref",o=!sg(e);o&&!r&&!Yh.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!o&&r&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+n+'"'),!Yh.isForwardRef(e)&&!cg(e)[n]&&console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')}var xI=["isInitialMount","highlightedIndex","items","environment"],Sg={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function _I(e,t,n){var r=e.props,o=e.type,i={};Object.keys(t).forEach(function(a){SI(a,e,t,n),n[a]!==t[a]&&(i[a]=n[a])}),r.onStateChange&&Object.keys(i).length&&r.onStateChange(ae({type:o},i))}function SI(e,t,n,r){var o=t.props,i=t.type,a="on"+xl(e)+"Change";o[a]&&r[e]!==void 0&&r[e]!==n[e]&&o[a](ae({type:i},r))}function CI(e,t){return t.changes}function $I(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var TI=bl(function(e,t){El(e(),t)},200),II=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?l.useLayoutEffect:l.useEffect;function RI(e){var t=e.id,n=t===void 0?"downshift-"+ig():t,r=e.labelId,o=e.menuId,i=e.getItemId,a=e.toggleButtonId,s=e.inputId,c=l.useRef({labelId:r||n+"-label",menuId:o||n+"-menu",getItemId:i||function(u){return n+"-item-"+u},toggleButtonId:a||n+"-toggle-button",inputId:s||n+"-input"});return c.current}function Cg(e,t,n,r){var o,i;if(e===void 0){if(t===void 0)throw new Error(r);o=n[t],i=t}else i=t===void 0?n.indexOf(e):t,o=e;return[o,i]}function OI(e){return e?String(e):""}function xl(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function _l(e){var t=l.useRef(e);return t.current=e,t}function $g(e,t,n){var r=l.useRef(),o=l.useRef(),i=l.useCallback(function(m,h){o.current=h,m=_i(m,h.props);var b=e(m,h),y=h.props.stateReducer(m,ae({},h,{changes:b}));return y},[e]),a=l.useReducer(i,t),s=a[0],c=a[1],u=_l(n),d=l.useCallback(function(m){return c(ae({props:u.current},m))},[u]),f=o.current;return l.useEffect(function(){f&&r.current&&r.current!==s&&_I(f,_i(r.current,f.props),s),r.current=s},[s,n,f]),[s,d]}function PI(e,t,n){var r=$g(e,t,n),o=r[0],i=r[1];return[_i(o,n),i]}var ri={itemToString:OI,stateReducer:CI,getA11ySelectionMessage:$I,scrollIntoView:og,environment:typeof window>"u"?{}:window};function Pn(e,t,n){n===void 0&&(n=Sg);var r=e["default"+xl(t)];return r!==void 0?r:n[t]}function zo(e,t,n){n===void 0&&(n=Sg);var r=e[t];if(r!==void 0)return r;var o=e["initial"+xl(t)];return o!==void 0?o:Pn(e,t,n)}function AI(e){var t=zo(e,"selectedItem"),n=zo(e,"isOpen"),r=zo(e,"highlightedIndex"),o=zo(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function oi(e,t,n){var r=e.items,o=e.initialHighlightedIndex,i=e.defaultHighlightedIndex,a=t.selectedItem,s=t.highlightedIndex;return r.length===0?-1:o!==void 0&&s===o?o:i!==void 0?i:a?r.indexOf(a):n===0?-1:n<0?r.length-1:0}function DI(e,t,n,r){var o=l.useRef({isMouseDown:!1,isTouchMove:!1});return l.useEffect(function(){if((n==null?void 0:n.addEventListener)!=null){var i=function(){o.current.isMouseDown=!0},a=function(f){o.current.isMouseDown=!1,e&&!Ga(f.target,t.map(function(m){return m.current}),n)&&r()},s=function(){o.current.isTouchMove=!1},c=function(){o.current.isTouchMove=!0},u=function(f){e&&!o.current.isTouchMove&&!Ga(f.target,t.map(function(m){return m.current}),n,!1)&&r()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",a),n.addEventListener("touchstart",s),n.addEventListener("touchmove",c),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",c),n.removeEventListener("touchend",u)}}},[e,n]),o}var Sl=function(){return dn};process.env.NODE_ENV!=="production"&&(Sl=function(){for(var t=l.useRef(!0),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=l.useRef(r.reduce(function(s,c){return s[c]={},s},{}));l.useEffect(function(){Object.keys(i.current).forEach(function(s){var c=i.current[s];if(t.current&&!Object.keys(c).length){console.error("downshift: You forgot to call the "+s+" getter function on your component / element.");return}var u=c.suppressRefError,d=c.refKey,f=c.elementRef;(!f||!f.current)&&!u&&console.error('downshift: The ref prop "'+d+'" from '+s+" was not applied correctly on your element.")}),t.current=!1});var a=l.useCallback(function(s,c,u,d){i.current[s]={suppressRefError:c,refKey:u,elementRef:d}},[]);return a});function Jh(e,t,n){var r=n.isInitialMount,o=n.highlightedIndex,i=n.items,a=n.environment,s=an(n,xI);l.useEffect(function(){r||TI(function(){return e(ae({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length},s))},a.document)},t)}function NI(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,o=e.getItemNodeFromIndex,i=e.menuElement,a=e.scrollIntoView,s=l.useRef(!0);return II(function(){t<0||!n||!Object.keys(r.current).length||(s.current===!1?s.current=!0:a(o(t),i))},[t]),s}var Cl=dn;process.env.NODE_ENV!=="production"&&(Cl=function(t){var n=t.isInitialMount,r=t.props,o=t.state,i=l.useRef(r);l.useEffect(function(){n||(wl(o,i.current,r),i.current=r)},[o,r,n])});function ep(e,t,n){var r;n===void 0&&(n=!0);var o=((r=e.items)==null?void 0:r.length)&&t>=0;return ae({isOpen:!1,highlightedIndex:-1},o&&ae({selectedItem:e.items[t],isOpen:Pn(e,"isOpen"),highlightedIndex:Pn(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function kI(e,t,n){var r=t.type,o=t.props,i;switch(r){case n.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:i={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:oi(o,e,0)};break;case n.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case n.FunctionCloseMenu:i={isOpen:!1};break;case n.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:i={inputValue:t.inputValue};break;case n.FunctionReset:i={highlightedIndex:Pn(o,"highlightedIndex"),isOpen:Pn(o,"isOpen"),selectedItem:Pn(o,"selectedItem"),inputValue:Pn(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,i)}X.array.isRequired,X.func,X.func,X.func,X.number,X.number,X.number,X.bool,X.bool,X.bool,X.any,X.any,X.any,X.string,X.string,X.string,X.func,X.string,X.func,X.func,X.func,X.func,X.func,X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})});function MI(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}xn(xn({},ri),{getA11yStatusMessage:MI});process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;var $l=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,Tl=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,Il=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,Rl=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,Ol=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,Pl=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,Al=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,Dl=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,Nl=process.env.NODE_ENV!=="production"?"__input_change__":8,Za=process.env.NODE_ENV!=="production"?"__input_blur__":9,kl=process.env.NODE_ENV!=="production"?"__input_focus__":10,Tg=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,Ig=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,Ml=process.env.NODE_ENV!=="production"?"__item_click__":13,Rg=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,Og=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,Pg=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,Ag=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,Dg=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,jl=process.env.NODE_ENV!=="production"?"__function_select_item__":19,Ng=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,kg=process.env.NODE_ENV!=="production"?"__function_reset__":21,Ll=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,Mg=Object.freeze({__proto__:null,InputKeyDownArrowDown:$l,InputKeyDownArrowUp:Tl,InputKeyDownEscape:Il,InputKeyDownHome:Rl,InputKeyDownEnd:Ol,InputKeyDownPageUp:Pl,InputKeyDownPageDown:Al,InputKeyDownEnter:Dl,InputChange:Nl,InputBlur:Za,InputFocus:kl,MenuMouseLeave:Tg,ItemMouseMove:Ig,ItemClick:Ml,ToggleButtonClick:Rg,FunctionToggleMenu:Og,FunctionOpenMenu:Pg,FunctionCloseMenu:Ag,FunctionSetHighlightedIndex:Dg,FunctionSelectItem:jl,FunctionSetInputValue:Ng,FunctionReset:kg,ControlledPropUpdatedSelectedItem:Ll});function jI(e){var t=AI(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),ae({},t,{inputValue:r})}var LI={items:X.array.isRequired,itemToString:X.func,selectedItemChanged:X.func,getA11yStatusMessage:X.func,getA11ySelectionMessage:X.func,highlightedIndex:X.number,defaultHighlightedIndex:X.number,initialHighlightedIndex:X.number,isOpen:X.bool,defaultIsOpen:X.bool,initialIsOpen:X.bool,selectedItem:X.any,initialSelectedItem:X.any,defaultSelectedItem:X.any,inputValue:X.string,defaultInputValue:X.string,initialInputValue:X.string,id:X.string,labelId:X.string,menuId:X.string,getItemId:X.func,inputId:X.string,toggleButtonId:X.string,stateReducer:X.func,onSelectedItemChange:X.func,onHighlightedIndexChange:X.func,onStateChange:X.func,onIsOpenChange:X.func,onInputValueChange:X.func,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})})};function FI(e,t,n){var r=l.useRef(),o=$g(e,t,n),i=o[0],a=o[1];return l.useEffect(function(){Xa(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&a({type:Ll,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)},[i.selectedItem,n.selectedItem]),[_i(i,n),a]}var jg=dn;process.env.NODE_ENV!=="production"&&(jg=function(t,n){X.checkPropTypes(LI,t,"prop",n.name)});var VI=ae({},ri,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:ag});function BI(e,t){var n,r=t.type,o=t.props,i=t.altKey,a;switch(r){case Ml:a={isOpen:Pn(o,"isOpen"),highlightedIndex:Pn(o,"highlightedIndex"),selectedItem:o.items[t.index],inputValue:o.itemToString(o.items[t.index])};break;case $l:e.isOpen?a={highlightedIndex:Or(1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:i&&e.selectedItem==null?-1:oi(o,e,1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case Tl:e.isOpen?i?a=ep(o,e.highlightedIndex):a={highlightedIndex:Or(-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:oi(o,e,-1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case Dl:a=ep(o,e.highlightedIndex);break;case Il:a=ae({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Pl:a={highlightedIndex:Or(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Al:a={highlightedIndex:Or(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Rl:a={highlightedIndex:Fr(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case Ol:a={highlightedIndex:Fr(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)};break;case Za:a=ae({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=o.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:o.items[e.highlightedIndex],inputValue:o.itemToString(o.items[e.highlightedIndex])});break;case Nl:a={isOpen:!0,highlightedIndex:Pn(o,"highlightedIndex"),inputValue:t.inputValue};break;case kl:a={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case jl:a={selectedItem:t.selectedItem,inputValue:o.itemToString(t.selectedItem)};break;case Ll:a={inputValue:t.inputValue};break;default:return kI(e,t,Mg)}return ae({},e,a)}var HI=["onMouseLeave","refKey","ref"],WI=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],zI=["onClick","onPress","refKey","ref"],UI=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];no.stateChangeTypes=Mg;function no(e){e===void 0&&(e={}),jg(e,no);var t=ae({},VI,e),n=t.initialIsOpen,r=t.defaultIsOpen,o=t.items,i=t.scrollIntoView,a=t.environment,s=t.getA11yStatusMessage,c=t.getA11ySelectionMessage,u=t.itemToString,d=jI(t),f=FI(BI,d,t),m=f[0],h=f[1],b=m.isOpen,y=m.highlightedIndex,T=m.selectedItem,S=m.inputValue,v=l.useRef(null),w=l.useRef({}),C=l.useRef(null),I=l.useRef(null),D=l.useRef(!0),P=RI(t),F=l.useRef(),k=_l({state:m,props:t}),H=l.useCallback(function(W){return w.current[P.getItemId(W)]},[P]);Jh(s,[b,y,S,o],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m)),Jh(c,[T],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m));var R=NI({menuElement:v.current,highlightedIndex:y,isOpen:b,itemRefs:w,scrollIntoView:i,getItemNodeFromIndex:H});Cl({isInitialMount:D.current,props:t,state:m}),l.useEffect(function(){var W=n||r||b;W&&C.current&&C.current.focus()},[]),l.useEffect(function(){D.current||(F.current=o.length)});var E=DI(b,[C,v,I],a,function(){h({type:Za,selectItem:!1})}),p=Sl("getInputProps","getMenuProps");l.useEffect(function(){return D.current=!1,function(){D.current=!0}},[]),l.useEffect(function(){var W;if(!b)w.current={};else if(((W=a.document)==null?void 0:W.activeElement)!==C.current){var Y;C==null||(Y=C.current)==null||Y.focus()}},[b,a]);var $=l.useMemo(function(){return{ArrowDown:function(Y){Y.preventDefault(),h({type:$l,altKey:Y.altKey,getItemNodeFromIndex:H})},ArrowUp:function(Y){Y.preventDefault(),h({type:Tl,altKey:Y.altKey,getItemNodeFromIndex:H})},Home:function(Y){k.current.state.isOpen&&(Y.preventDefault(),h({type:Rl,getItemNodeFromIndex:H}))},End:function(Y){k.current.state.isOpen&&(Y.preventDefault(),h({type:Ol,getItemNodeFromIndex:H}))},Escape:function(Y){var te=k.current.state;(te.isOpen||te.inputValue||te.selectedItem||te.highlightedIndex>-1)&&(Y.preventDefault(),h({type:Il}))},Enter:function(Y){var te=k.current.state;!te.isOpen||Y.which===229||(Y.preventDefault(),h({type:Dl,getItemNodeFromIndex:H}))},PageUp:function(Y){k.current.state.isOpen&&(Y.preventDefault(),h({type:Pl,getItemNodeFromIndex:H}))},PageDown:function(Y){k.current.state.isOpen&&(Y.preventDefault(),h({type:Al,getItemNodeFromIndex:H}))}}},[h,k,H]),A=l.useCallback(function(W){return ae({id:P.labelId,htmlFor:P.inputId},W)},[P]),M=l.useCallback(function(W,Y){var te,J=W===void 0?{}:W,ie=J.onMouseLeave,ee=J.refKey,we=ee===void 0?"ref":ee,Te=J.ref,Oe=an(J,HI),Ne=Y===void 0?{}:Y,Re=Ne.suppressRefError,We=Re===void 0?!1:Re;return p("getMenuProps",We,we,v),ae((te={},te[we]=hr(Te,function(De){v.current=De}),te.id=P.menuId,te.role="listbox",te["aria-labelledby"]=Oe&&Oe["aria-label"]?void 0:""+P.labelId,te.onMouseLeave=It(ie,function(){h({type:Tg})}),te),Oe)},[h,p,P]),z=l.useCallback(function(W){var Y,te,J=W===void 0?{}:W,ie=J.item,ee=J.index,we=J.refKey,Te=we===void 0?"ref":we,Oe=J.ref,Ne=J.onMouseMove,Re=J.onMouseDown,We=J.onClick;J.onPress;var De=J.disabled,ot=an(J,WI),ze=k.current,xt=ze.props,Xe=ze.state,Pt=Cg(ie,ee,xt.items,"Pass either item or index to getItemProps!"),xe=Pt[1],ct="onClick",je=We,Zt=function(){xe!==Xe.highlightedIndex&&(R.current=!1,h({type:Ig,index:xe,disabled:De}))},Ct=function(){h({type:Ml,index:xe})},tt=function(mt){return mt.preventDefault()};return ae((Y={},Y[Te]=hr(Oe,function(Fe){Fe&&(w.current[P.getItemId(xe)]=Fe)}),Y.disabled=De,Y.role="option",Y["aria-selected"]=""+(xe===Xe.highlightedIndex),Y.id=P.getItemId(xe),Y),!De&&(te={},te[ct]=It(je,Ct),te),{onMouseMove:It(Ne,Zt),onMouseDown:It(Re,tt)},ot)},[h,k,R,P]),U=l.useCallback(function(W){var Y,te=W===void 0?{}:W,J=te.onClick;te.onPress;var ie=te.refKey,ee=ie===void 0?"ref":ie,we=te.ref,Te=an(te,zI),Oe=k.current.state,Ne=function(){h({type:Rg})};return ae((Y={},Y[ee]=hr(we,function(Re){I.current=Re}),Y["aria-controls"]=P.menuId,Y["aria-expanded"]=Oe.isOpen,Y.id=P.toggleButtonId,Y.tabIndex=-1,Y),!Te.disabled&&ae({},{onClick:It(J,Ne)}),Te)},[h,k,P]),re=l.useCallback(function(W,Y){var te,J=W===void 0?{}:W,ie=J.onKeyDown,ee=J.onChange,we=J.onInput,Te=J.onFocus,Oe=J.onBlur;J.onChangeText;var Ne=J.refKey,Re=Ne===void 0?"ref":Ne,We=J.ref,De=an(J,UI),ot=Y===void 0?{}:Y,ze=ot.suppressRefError,xt=ze===void 0?!1:ze;p("getInputProps",xt,Re,C);var Xe=k.current.state,Pt=function(mt){var nn=Si(mt);nn&&$[nn]&&$[nn](mt)},xe=function(mt){h({type:Nl,inputValue:mt.target.value})},ct=function(mt){if(Xe.isOpen&&!E.current.isMouseDown){var nn=mt.relatedTarget===null&&a.document.activeElement!==a.document.body;h({type:Za,selectItem:!nn})}},je=function(){Xe.isOpen||h({type:kl})},Zt="onChange",Ct={};if(!De.disabled){var tt;Ct=(tt={},tt[Zt]=It(ee,we,xe),tt.onKeyDown=It(ie,Pt),tt.onBlur=It(Oe,ct),tt.onFocus=It(Te,je),tt)}return ae((te={},te[Re]=hr(We,function(Fe){C.current=Fe}),te["aria-activedescendant"]=Xe.isOpen&&Xe.highlightedIndex>-1?P.getItemId(Xe.highlightedIndex):"",te["aria-autocomplete"]="list",te["aria-controls"]=P.menuId,te["aria-expanded"]=Xe.isOpen,te["aria-labelledby"]=De&&De["aria-label"]?void 0:""+P.labelId,te.autoComplete="off",te.id=P.inputId,te.role="combobox",te.value=Xe.inputValue,te),Ct,De)},[p,k,P,$,h,E,a]),B=l.useCallback(function(){h({type:Og})},[h]),L=l.useCallback(function(){h({type:Ag})},[h]),oe=l.useCallback(function(){h({type:Pg})},[h]),G=l.useCallback(function(W){h({type:Dg,highlightedIndex:W})},[h]),K=l.useCallback(function(W){h({type:jl,selectedItem:W})},[h]),Z=l.useCallback(function(W){h({type:Ng,inputValue:W})},[h]),ce=l.useCallback(function(){h({type:kg})},[h]);return{getItemProps:z,getLabelProps:A,getMenuProps:M,getInputProps:re,getToggleButtonProps:U,toggleMenu:B,openMenu:oe,closeMenu:L,setHighlightedIndex:G,setInputValue:Z,selectItem:K,reset:ce,highlightedIndex:y,isOpen:b,selectedItem:T,inputValue:S}}var Lg={activeIndex:-1,selectedItems:[]};function tp(e,t){return zo(e,t,Lg)}function np(e,t){return Pn(e,t,Lg)}function YI(e){var t=tp(e,"activeIndex"),n=tp(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function rp(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function KI(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}var qI={selectedItems:X.array,initialSelectedItems:X.array,defaultSelectedItems:X.array,itemToString:X.func,getA11yRemovalMessage:X.func,stateReducer:X.func,activeIndex:X.number,initialActiveIndex:X.number,defaultActiveIndex:X.number,onActiveIndexChange:X.func,onSelectedItemsChange:X.func,keyNavigationNext:X.string,keyNavigationPrevious:X.string,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})})},XI={itemToString:ri.itemToString,stateReducer:ri.stateReducer,environment:ri.environment,getA11yRemovalMessage:KI,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},Fg=dn;process.env.NODE_ENV!=="production"&&(Fg=function(t,n){X.checkPropTypes(qI,t,"prop",n.name)});var Fl=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,Vl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,Bl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,Hl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,Wl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,zl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,Ul=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,Yl=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,Kl=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,ql=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,Xl=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,Gl=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,Zl=process.env.NODE_ENV!=="production"?"__function_reset__":12,GI=Object.freeze({__proto__:null,SelectedItemClick:Fl,SelectedItemKeyDownDelete:Vl,SelectedItemKeyDownBackspace:Bl,SelectedItemKeyDownNavigationNext:Hl,SelectedItemKeyDownNavigationPrevious:Wl,DropdownKeyDownNavigationPrevious:zl,DropdownKeyDownBackspace:Ul,DropdownClick:Yl,FunctionAddSelectedItem:Kl,FunctionRemoveSelectedItem:ql,FunctionSetSelectedItems:Xl,FunctionSetActiveIndex:Gl,FunctionReset:Zl});function ZI(e,t){var n=t.type,r=t.index,o=t.props,i=t.selectedItem,a=e.activeIndex,s=e.selectedItems,c;switch(n){case Fl:c={activeIndex:r};break;case Wl:c={activeIndex:a-1<0?0:a-1};break;case Hl:c={activeIndex:a+1>=s.length?-1:a+1};break;case Bl:case Vl:{if(a<0)break;var u=a;s.length===1?u=-1:a===s.length-1&&(u=s.length-2),c=ae({selectedItems:[].concat(s.slice(0,a),s.slice(a+1))},{activeIndex:u});break}case zl:c={activeIndex:s.length-1};break;case Ul:c={selectedItems:s.slice(0,s.length-1)};break;case Kl:c={selectedItems:[].concat(s,[i])};break;case Yl:c={activeIndex:-1};break;case ql:{var d=a,f=s.indexOf(i);if(f<0)break;s.length===1?d=-1:f===s.length-1&&(d=s.length-2),c={selectedItems:[].concat(s.slice(0,f),s.slice(f+1)),activeIndex:d};break}case Xl:{var m=t.selectedItems;c={selectedItems:m};break}case Gl:{var h=t.activeIndex;c={activeIndex:h};break}case Zl:c={activeIndex:np(o,"activeIndex"),selectedItems:np(o,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,c)}var QI=["refKey","ref","onClick","onKeyDown","selectedItem","index"],JI=["refKey","ref","onKeyDown","onClick","preventKeyAction"];Ql.stateChangeTypes=GI;function Ql(e){e===void 0&&(e={}),Fg(e,Ql);var t=ae({},XI,e),n=t.getA11yRemovalMessage,r=t.itemToString,o=t.environment,i=t.keyNavigationNext,a=t.keyNavigationPrevious,s=PI(ZI,YI(t),t),c=s[0],u=s[1],d=c.activeIndex,f=c.selectedItems,m=l.useRef(!0),h=l.useRef(null),b=l.useRef(f),y=l.useRef();y.current=[];var T=_l({state:c,props:t});l.useEffect(function(){if(!m.current){if(f.length<b.current.length){var R=b.current.find(function(E){return f.indexOf(E)<0});El(n({itemToString:r,resultCount:f.length,removedSelectedItem:R,activeIndex:d,activeSelectedItem:f[d]}),o.document)}b.current=f}},[f.length]),l.useEffect(function(){m.current||(d===-1&&h.current?h.current.focus():y.current[d]&&y.current[d].focus())},[d]),Cl({isInitialMount:m.current,props:t,state:c});var S=Sl("getDropdownProps");l.useEffect(function(){return m.current=!1,function(){m.current=!0}},[]);var v=l.useMemo(function(){var R;return R={},R[a]=function(){u({type:Wl})},R[i]=function(){u({type:Hl})},R.Delete=function(){u({type:Vl})},R.Backspace=function(){u({type:Bl})},R},[u,i,a]),w=l.useMemo(function(){var R;return R={},R[a]=function(E){rp(E)&&u({type:zl})},R.Backspace=function(p){rp(p)&&u({type:Ul})},R},[u,a]),C=l.useCallback(function(R){var E,p=R===void 0?{}:R,$=p.refKey,A=$===void 0?"ref":$,M=p.ref,z=p.onClick,U=p.onKeyDown,re=p.selectedItem,B=p.index,L=an(p,QI),oe=T.current.state,G=Cg(re,B,oe.selectedItems,"Pass either item or index to getSelectedItemProps!"),K=G[1],Z=K>-1&&K===oe.activeIndex,ce=function(){u({type:Fl,index:K})},W=function(te){var J=Si(te);J&&v[J]&&v[J](te)};return ae((E={},E[A]=hr(M,function(Y){Y&&y.current.push(Y)}),E.tabIndex=Z?0:-1,E.onClick=It(z,ce),E.onKeyDown=It(U,W),E),L)},[u,T,v]),I=l.useCallback(function(R,E){var p,$=R===void 0?{}:R,A=$.refKey,M=A===void 0?"ref":A,z=$.ref,U=$.onKeyDown,re=$.onClick,B=$.preventKeyAction,L=B===void 0?!1:B,oe=an($,JI),G=E===void 0?{}:E,K=G.suppressRefError,Z=K===void 0?!1:K;S("getDropdownProps",Z,M,h);var ce=function(te){var J=Si(te);J&&w[J]&&w[J](te)},W=function(){u({type:Yl})};return ae((p={},p[M]=hr(z,function(Y){Y&&(h.current=Y)}),p),!L&&{onKeyDown:It(U,ce),onClick:It(re,W)},oe)},[u,w,S]),D=l.useCallback(function(R){u({type:Kl,selectedItem:R})},[u]),P=l.useCallback(function(R){u({type:ql,selectedItem:R})},[u]),F=l.useCallback(function(R){u({type:Xl,selectedItems:R})},[u]),k=l.useCallback(function(R){u({type:Gl,activeIndex:R})},[u]),H=l.useCallback(function(){u({type:Zl})},[u]);return{getSelectedItemProps:C,getDropdownProps:I,addSelectedItem:D,removeSelectedItem:P,setSelectedItems:F,setActiveIndex:k,reset:H,selectedItems:f,activeIndex:d}}var eR="jbnkvn0",op=wt({defaultClassName:"jbnkvn7",variantClassNames:{highlighted:{true:"jbnkvn8"},selected:{true:"jbnkvn9"},multiSelected:{true:"jbnkvna"},isDisabled:{true:"jbnkvnb"}},defaultVariants:{},compoundVariants:[]}),ip="jbnkvn6",tR="jbnkvn1",nR=wt({defaultClassName:"jbnkvn2",variantClassNames:{isMobile:{true:"jbnkvn3",false:"jbnkvn4"}},defaultVariants:{isMobile:!0},compoundVariants:[]}),rR="jbnkvn5",ap="jbnkvnc";const Vg=l.createContext(void 0),oR=({children:e,contextValue:t})=>j.jsx(Vg.Provider,{value:t,children:e}),Jl=()=>{const e=l.useContext(Vg);if(e===void 0)throw new Error("useSelectProvider must be used within a SelectProvider");return e},Bg=({children:e,renderer:t})=>{const{getMenuProps:n}=Jl();return t?t({children:e,defaultClassName:ip,innerProps:n()}):j.jsx("div",{className:ip,...n(),children:e})};Bg.defaultProps={renderer:void 0};const Hg=({renderer:e,item:t,itemIndex:n})=>{const{isMulti:r,selectedItem:o,multipleSelectedItems:i,highlightedIndex:a,getItemProps:s,onClickItem:c}=Jl(),u=a===n,d=o===t&&!r,f=r&&i.includes(t)||!1,m=s({item:t,index:n,disabled:t.isDisabled,onClick:c});return e?e({defaultClassName:op({highlighted:a===n,selected:o===t&&!r,multiSelected:i.includes(t),isDisabled:t.isDisabled}),innerProps:m,isMulti:r,item:t,itemIndex:n,isHighlighted:u,isSelected:d,isChecked:f}):j.jsxs("div",{className:op({highlighted:u,selected:d,multiSelected:f,isDisabled:t.isDisabled}),...m,children:[j.jsx("span",{children:t.label}),r&&i.includes(t)&&j.jsx(wu,{size:16,color:Rt.theme.colors.greenAccent1,"data-test-id":""})]},t.value)};Hg.defaultProps={renderer:void 0};const Wg=({renderer:e,...t})=>{const{formState:n,isOpen:r,getToggleButtonProps:o,isDisabled:i}=Jl();if(e)return e({innerProps:o(),defaultClassName:ap,isOpen:r});const a=n==="disabled"?Rt.theme.colors.black:Rt.theme.colors.grey1;return j.jsx("div",{className:ap,...o({disabled:i}),"data-disabled":i,children:r?j.jsx(Eu,{color:a,...t}):j.jsx(si,{color:a,...t})})};Wg.defaultProps={renderer:void 0,"data-test-id":"CT_Component_IconChev"};const co=l.forwardRef(({options:e,value:t,label:n,onChange:r,isLoading:o,components:i,required:a,containerStyles:s,isMulti:c,isReadOnly:u,isMobile:d,onClickItem:f,...m},h)=>{const{addonLeft:b,addonRight:y,helperTextLeft:T,helperTextRight:S,isError:v,errorMessage:w,isDisabled:C,isValid:I}=m,[D,P]=l.useState(e),F=Pu({isError:v,isDisabled:C,isValid:I}),k=l.useRef(null),{removeSelectedItem:H,selectedItems:R,addSelectedItem:E,getDropdownProps:p}=Ql({initialSelectedItems:c&&t?t:[],onSelectedItemsChange(W){c&&r(W.selectedItems)}}),$=l.useMemo(()=>R.length,[R]),A=l.useCallback(W=>{let Y=W;(c&&!d||u)&&(Y="");const te=new RegExp(Y.toLowerCase());return e.filter(J=>te.test(J.label.toLowerCase()))},[e]),{isOpen:M,getToggleButtonProps:z,getLabelProps:U,getMenuProps:re,getInputProps:B,highlightedIndex:L,getItemProps:oe,selectedItem:G,openMenu:K,closeMenu:Z}=no({items:D,initialSelectedItem:c?void 0:t,onInputValueChange:({inputValue:W})=>{P(A(W||""))},itemToString(W){return W?W.label:""},onSelectedItemChange(W){var Y;c||(r(W.selectedItem),u&&((Y=k.current)==null||Y.blur()),Z())},stateReducer:(W,Y)=>{const{changes:te,type:J}=Y,ie=D.find((ee,we)=>we===W.highlightedIndex);switch(J){case no.stateChangeTypes.InputKeyDownEnter:case no.stateChangeTypes.ItemClick:if(c){let ee=$;return R.includes(ie)?(ee-=1,H(ie)):(ee+=1,E(ie)),{...te,isOpen:!0,highlightedIndex:W.highlightedIndex,inputValue:!d&&ee>0?`${ee} items selected`:""}}return{...te,isOpen:!1,highlightedIndex:W.highlightedIndex,inputValue:te.inputValue};case no.stateChangeTypes.InputBlur:{let ee=te.inputValue;return c&&!d&&($>0?ee=`${$} items selected`:ee=""),{...te,inputValue:ee}}default:return te}}});l.useImperativeHandle(h,()=>k.current);const ce={isOpen:M,formState:F,selectedItem:G,multipleSelectedItems:R,isMulti:c,isDisabled:C,totalSelected:$,highlightedIndex:L,getMenuProps:re,getItemProps:oe,getToggleButtonProps:z,onClickItem:f};return j.jsx(oR,{contextValue:ce,children:j.jsxs(et,{position:"relative",w:"$full",children:[j.jsxs(bo,{addonLeft:b,addonRight:y,helperTextLeft:T,helperTextRight:S,isError:v,errorMessage:w,isDisabled:C,isValid:I,inputAreaClassName:eR,children:[j.jsxs("div",{className:tR,children:[j.jsx("input",{"data-test-id":m["data-test-id"],...B(p({preventKeyAction:M,ref:k,placeholder:n,readOnly:u,disabled:C,className:nR({isMobile:d}),onClick:()=>{M||K()}}))}),d&&c&&j.jsx("div",{className:rR,children:$>0?`${$} items selected`:""}),d&&j.jsx(Ni,{isSelect:!0,isError:v,isDisabled:C,required:a,...U(),children:n})]}),j.jsx(Wg,{renderer:i==null?void 0:i.Toggle})]}),M&&j.jsx(Bg,{renderer:i==null?void 0:i.List,children:D.map((W,Y)=>j.jsx(Hg,{renderer:i==null?void 0:i.ListItem,itemIndex:Y,item:W}))})]})})});co.displayName="Select";co.defaultProps={required:!1,isLoading:!1,isMulti:void 0,isReadOnly:!1,isMobile:!1,containerStyles:void 0,components:void 0,onClickItem:void 0,"data-test-id":void 0};const zg=e=>{const t=`0${e}`;return t.substring(t.length-2,t.length)},iR=Array.from({length:31},(e,t)=>({label:zg(t+1),value:String(t+1),isDisabled:!1})),Qa=["January","February","March","April","May","June","July","August","September","October","November","December"],aR=Qa.map(e=>({label:e,value:e,isDisabled:!1})),sR=e=>{const t=e?new Date(e).getFullYear():new Date().getFullYear();return Array.from({length:101},(n,r)=>({label:String(t-r),value:String(t-r),isDisabled:!1}))},mc=(e,t)=>{if(t){const n=new Date(t);if(e==="date")return{label:zg(n.getDate()),value:n.getDate().toString()};if(e==="month")return{label:Qa[n.getMonth()],value:Qa[n.getMonth()]};if(e==="year"){const r=n.getFullYear().toString();return{label:r,value:r}}}},ii=e=>Qa.findIndex(t=>t===e),sp=(e,t)=>new Date(e,ii(t)+1,0).getDate(),cR=({date:e,month:t,year:n,maxDate:r})=>{const o=r?new Date(r):new Date;return o.setHours(0,0,0,0),e&&t&&n&&e<=sp(n,t)&&o>new Date(n,ii(t),e,0,0,0,0)?!0:e&&t&&!n?ii(t)===1?e<=29:e<=sp(0,t):!e&&t&&n?n===o.getFullYear()?ii(t)<=o.getMonth():!0:e&&!t&&n?o.getMonth()===0&&n===o.getFullYear()?e<o.getDate():!0:!1},Ug=({title:e,maxDate:t,isMobile:n,defaultDate:r,onSaveDate:o,onClose:i,isOpen:a,buttonText:s,errorMessage:c,...u})=>{const[d,f]=l.useState(),[m,h]=l.useState(),[b,y]=l.useState(),T=l.useRef(null),S=()=>{f(void 0),h(void 0),y(void 0)},v=l.useMemo(()=>{if(a){if(d)return d;if(r)return mc("date",r)}},[r,d,a]),w=l.useMemo(()=>{if(a){if(m)return m;if(r)return mc("month",r)}},[r,m,a]),C=l.useMemo(()=>{if(a){if(b)return b;if(r)return mc("year",r)}},[r,b,a]),I=l.useMemo(()=>v||w||C?cR({date:v?Number(v==null?void 0:v.value):0,month:w?w.value:"",year:C?Number(C.value):0,maxDate:t}):!1,[v,w,C,t]),D=v&&w&&!C&&!I,P=v&&!w&&C&&!I,F=!v&&w&&C&&!I,k=v&&w&&C&&!I,H=()=>j.jsx(et,{as:"button",ref:T,"data-test-id":"",position:"absolute",width:"$1",height:"$1",bottom:"$0",right:"$0",backgroundColor:"$white",border:"$none",children:j.jsx(et,{display:"none"})}),R=()=>{T.current&&T.current.focus()};return j.jsx(Ai,{...u,isOpen:a,onClose:()=>{i==null||i(),S()},children:j.jsxs(Pr,{gap:"$24",children:[j.jsxs(Pr,{gap:"$8",children:[j.jsx(et,{height:"$40",children:j.jsx(Di,{children:e})}),j.jsxs(Pr,{children:[j.jsxs(Yt,{gap:"$12",px:"$2",mb:"$4",mt:"$8",children:[j.jsx(co,{isReadOnly:!0,name:"date",label:"Date",value:v,isMobile:n,options:iR,onClickItem:R,onChange:f,isError:D||P||k,"data-test-id":"CT_Component_SelectPicker_dateField"}),j.jsx(co,{isReadOnly:!0,name:"month",label:"Month",value:w,isMobile:n,options:aR,onClickItem:R,onChange:h,isError:F||D||k,"data-test-id":"CT_Component_SelectPicker_monthField"}),j.jsx(co,{isReadOnly:!0,name:"year",label:"Year",value:C,isMobile:n,options:sR(t),onClickItem:R,onChange:y,isError:F||P||k,"data-test-id":"CT_Component_SelectPicker_yearField"})]}),(k||F||P||D)&&j.jsx(sn,{px:"$2",color:"$redAccent1",fontSize:"$caption",lineHeight:"$16",fontWeight:"$medium",children:c})]})]}),H(),j.jsx(vo,{onClick:()=>{o(new Date(Number(C==null?void 0:C.value),ii(w==null?void 0:w.value),Number(v==null?void 0:v.value))),S()},isDisabled:!C||!w||!v||!I,"data-test-id":"CT_Component_SelectPicker_buttonSave",type:"button",children:s})]})})};Ug.defaultProps={title:"Date of birth",isMobile:!1,defaultDate:void 0,maxDate:void 0,buttonText:"Confirm",errorMessage:"Invalid date of birth"};const gc="rovingFocusGroup.onEntryFocus",uR={bubbles:!1,cancelable:!0},ed="RovingFocusGroup",[cu,Yg,lR]=Ja(ed),[dR,Kg]=mn(ed,[lR]),[fR,hR]=dR(ed),pR=l.forwardRef((e,t)=>l.createElement(cu.Provider,{scope:e.__scopeRovingFocusGroup},l.createElement(cu.Slot,{scope:e.__scopeRovingFocusGroup},l.createElement(vR,ae({},e,{ref:t}))))),vR=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,...d}=e,f=l.useRef(null),m=st(t,f),h=es(i),[b=null,y]=Sn({prop:a,defaultProp:s,onChange:c}),[T,S]=l.useState(!1),v=cn(u),w=Yg(n),C=l.useRef(!1),[I,D]=l.useState(0);return l.useEffect(()=>{const P=f.current;if(P)return P.addEventListener(gc,v),()=>P.removeEventListener(gc,v)},[v]),l.createElement(fR,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:b,onItemFocus:l.useCallback(P=>y(P),[y]),onItemShiftTab:l.useCallback(()=>S(!0),[]),onFocusableItemAdd:l.useCallback(()=>D(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>D(P=>P-1),[])},l.createElement(Ke.div,ae({tabIndex:T||I===0?-1:0,"data-orientation":r},d,{ref:m,style:{outline:"none",...e.style},onMouseDown:Ae(e.onMouseDown,()=>{C.current=!0}),onFocus:Ae(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!T){const k=new CustomEvent(gc,uR);if(P.currentTarget.dispatchEvent(k),!k.defaultPrevented){const H=w().filter(A=>A.focusable),R=H.find(A=>A.active),E=H.find(A=>A.id===b),$=[R,E,...H].filter(Boolean).map(A=>A.ref.current);qg($)}}C.current=!1}),onBlur:Ae(e.onBlur,()=>S(!1))})))}),mR="RovingFocusGroupItem",gR=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Xn(),c=i||s,u=hR(mR,n),d=u.currentTabStopId===c,f=Yg(n),{onFocusableItemAdd:m,onFocusableItemRemove:h}=u;return l.useEffect(()=>{if(r)return m(),()=>h()},[r,m,h]),l.createElement(cu.ItemSlot,{scope:n,id:c,focusable:r,active:o},l.createElement(Ke.span,ae({tabIndex:d?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:Ae(e.onMouseDown,b=>{r?u.onItemFocus(c):b.preventDefault()}),onFocus:Ae(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Ae(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=wR(b,u.orientation,u.dir);if(y!==void 0){b.preventDefault();let S=f().filter(v=>v.focusable).map(v=>v.ref.current);if(y==="last")S.reverse();else if(y==="prev"||y==="next"){y==="prev"&&S.reverse();const v=S.indexOf(b.currentTarget);S=u.loop?ER(S,v+1):S.slice(v+1)}setTimeout(()=>qg(S))}})})))}),yR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function bR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function wR(e,t,n){const r=bR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return yR[r]}function qg(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function ER(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const xR=pR,_R=gR,Xg="Radio",[SR,Gg]=mn(Xg),[CR,$R]=SR(Xg),TR=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:c,...u}=e,[d,f]=l.useState(null),m=st(t,y=>f(y)),h=l.useRef(!1),b=d?!!d.closest("form"):!0;return l.createElement(CR,{scope:n,checked:o,disabled:a},l.createElement(Ke.button,ae({type:"button",role:"radio","aria-checked":o,"data-state":Zg(o),"data-disabled":a?"":void 0,disabled:a,value:s},u,{ref:m,onClick:Ae(e.onClick,y=>{o||c==null||c(),b&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})),b&&l.createElement(OR,{control:d,bubbles:!h.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))}),IR="RadioIndicator",RR=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=$R(IR,n);return l.createElement(yr,{present:r||i.checked},l.createElement(Ke.span,ae({"data-state":Zg(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))}),OR=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Zg(e){return e?"checked":"unchecked"}const PR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Qg="RadioGroup",[AR,TP]=mn(Qg,[Kg,Gg]),Jg=Kg(),ey=Gg(),[DR,NR]=AR(Qg),kR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...m}=e,h=Jg(n),b=es(u),[y,T]=Sn({prop:i,defaultProp:o,onChange:f});return l.createElement(DR,{scope:n,name:r,required:a,disabled:s,value:y,onValueChange:T},l.createElement(xR,ae({asChild:!0},h,{orientation:c,dir:b,loop:d}),l.createElement(Ke.div,ae({role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":s?"":void 0,dir:b},m,{ref:t}))))}),MR="RadioGroupItem",jR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=NR(MR,n),a=i.disabled||r,s=Jg(n),c=ey(n),u=l.useRef(null),d=st(t,u),f=i.value===o.value,m=l.useRef(!1);return l.useEffect(()=>{const h=y=>{PR.includes(y.key)&&(m.current=!0)},b=()=>m.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",b)}},[]),l.createElement(_R,ae({asChild:!0},s,{focusable:!a,active:f}),l.createElement(TR,ae({disabled:a,required:i.required,checked:f},c,o,{name:i.name,ref:d,onCheck:()=>i.onValueChange(o.value),onKeyDown:Ae(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Ae(o.onFocus,()=>{var h;m.current&&((h=u.current)===null||h===void 0||h.click())})})))}),LR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=ey(n);return l.createElement(RR,ae({},o,r,{ref:t}))}),FR=kR,VR=jR,BR=LR;var HR=wt({defaultClassName:"d6umgr4",variantClassNames:{disabled:{true:"d6umgr5"}},defaultVariants:{},compoundVariants:[]}),WR="d6umgr1",zR=wt({defaultClassName:"d6umgr2",variantClassNames:{disabled:{true:"d6umgr3"}},defaultVariants:{},compoundVariants:[]}),UR="d6umgr0";const ty=({children:e,className:t,disabled:n,...r})=>{const o=l.useId();return j.jsxs(Yt,{alignItems:"center",children:[j.jsx(VR,{...r,disabled:n,className:Pe(t,UR),id:o,children:j.jsx(BR,{className:Pe("radio-indicator",zR({disabled:n}))})}),e&&j.jsx("label",{className:Pe("radio-label",HR({disabled:n})),htmlFor:o,children:e})]})};ty.defaultProps={children:void 0};const YR=({className:e,children:t,...n})=>j.jsx(FR,{...n,className:Pe(e,WR),children:t});var KR="_846x3h0",qR="_846x3h1",XR=wt({defaultClassName:"_846x3h2",variantClassNames:{size:{small:"_846x3h3",medium:"_846x3h4",large:"_846x3h5"},isHasIcon:{true:"_846x3h6"},isDisabled:{true:"_846x3h7"}},defaultVariants:{size:"small"},compoundVariants:[]});const td=l.forwardRef(({value:e,onClear:t,size:n,isDisabled:r,icon:o,...i},a)=>{const[s,c]=l.useState(!1),u=()=>c(!0),d=()=>c(!1),f=l.useMemo(()=>!!(o||e&&s),[s,e,o]);return j.jsxs(et,{position:"relative",children:[j.jsx(et,{className:Pe(KR),children:j.jsx(S0,{size:24})}),j.jsx("input",{className:Pe(XR({size:n,isHasIcon:f,isDisabled:r})),ref:a,value:e,"data-test-id":i["data-test-id"],onFocus:u,onBlur:d,disabled:r,...i}),f&&j.jsx(et,{className:Pe(qR),children:o&&(!s||s&&!e)?o:j.jsx(os,{"data-test-id":"icon-close-search",onMouseDown:t,cursor:"pointer",size:24})})]})});td.displayName="Search";td.defaultProps={icon:void 0,isDisabled:void 0,onClear:void 0,"data-test-id":void 0};const ny="Switch",[GR,IP]=mn(ny),[ZR,QR]=GR(ny),JR=l.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...d}=e,[f,m]=l.useState(null),h=st(t,v=>m(v)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=Sn({prop:o,defaultProp:i,onChange:u});return l.createElement(ZR,{scope:n,checked:T,disabled:s},l.createElement(Ke.button,ae({type:"button",role:"switch","aria-checked":T,"aria-required":a,"data-state":ry(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:h,onClick:Ae(e.onClick,v=>{S(w=>!w),y&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})})),y&&l.createElement(nO,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),eO="SwitchThumb",tO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=QR(eO,n);return l.createElement(Ke.span,ae({"data-state":ry(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),nO=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ry(e){return e?"checked":"unchecked"}const rO=JR,oO=tO;var iO="b7c0j12",aO="b7c0j10",sO="b7c0j11";const oy=l.forwardRef((e,t)=>j.jsx(rO,{ref:t,className:aO,...e,children:j.jsx(oO,{className:sO,children:j.jsx(wu,{className:iO,size:16})})}));oy.displayName="Switch";const iy=({accessor:e,sortColumn:t,sortable:n,"data-test-id":r})=>{const o=t.by===e,i=t.order==="DESC",a=t.order==="ASC";return n?j.jsxs(Yt,{flexDirection:"column","data-test-id":r,children:[j.jsx(Eu,{size:10,color:o&&i?"white":"grey"}),j.jsx(si,{size:10,color:o&&a?"white":"grey"})]}):null};iy.defaultProps={sortable:!1,"data-test-id":""};var cO="_94c6vs1",uO="_94c6vs3",cp="_94c6vs2",lO="_94c6vs0";const ay=({data:e,columns:t})=>{const[n,r]=l.useState([]),[o,i]=l.useState([]),[a,s]=l.useState({by:"",order:""}),c=f=>{const{accessor:m}=f,h=f.sortable,b=a.by===m;return h?b&&a.order==="ASC"?s({by:m,order:"DESC"}):b&&a.order==="DESC"?s({by:"",order:""}):s({by:m,order:"ASC"}):null},u=f=>typeof f=="object"?"":f,d=l.useCallback((f,m)=>{const h=[...f];return m.order==="ASC"?h.sort((y,T)=>String(T[m.by]).localeCompare(String(y[m.by]))):m.order==="DESC"?h.sort((y,T)=>String(y[m.by]).localeCompare(String(T[m.by]))):[...f]},[]);return l.useEffect(()=>{const f=t.map(b=>({...b,sortable:b.sortable??!1}));r(f);const h=d(e,{by:a.by,order:a.order}).map(b=>f.map(y=>({accessor:y.accessor,sortable:y.sortable??!1,value:u(b[y.accessor]),...y.cellRenderer&&{CellRenderer:y.cellRenderer({origin:b,value:b[y.accessor]})}})));i(h)},[t,e,d,a.by,a.order]),{headers:n,rows:o,handleHeaderClick:c,sortColumn:a}},sy=l.forwardRef(({columns:e,as:t,"data-test-id":n,data:r,onSort:o,...i},a)=>{const s=t||"table",{rows:c,headers:u,handleHeaderClick:d,sortColumn:f}=ay({data:r,columns:e});return l.useEffect(()=>{o&&o(f)},[o,f]),j.jsxs(s,{ref:a,as:t,className:lO,"data-test-id":n,...i,children:[j.jsx("thead",{children:j.jsx("tr",{className:uO,children:u.map(m=>j.jsx("th",{"data-test-id":"xmAUFfaxnRueeT_zBiyhc",className:cp,onClick:()=>d(m),children:j.jsxs(Yt,{alignItems:"center",gap:"$8",justifyContent:"center",px:"$16",children:[j.jsx(et,{fontWeight:"$bold",color:"$whiteTypoHigh",fontSize:"$body2",lineHeight:"$20",children:m.label}),j.jsx(iy,{accessor:m.accessor,sortable:m.sortable,sortColumn:f,"data-test-id":`table-sort-${m.label}`})]})},m.accessor))})}),j.jsx("tbody",{children:c.map((m,h)=>j.jsx("tr",{className:cO,children:m.map((b,y)=>j.jsx(et,{as:"td","data-test-id":`table-${n}-row${h}-col${y}`,className:cp,w:"33%",children:b.CellRenderer??b.value}))}))})]})});sy.defaultProps={as:"table","data-test-id":"base",onSort:void 0};var dO=wt({defaultClassName:"_5wiwut0",variantClassNames:{isActive:{true:"_5wiwut1"}},defaultVariants:{isActive:!1},compoundVariants:[]});var fO=wt({defaultClassName:"_1p5zdvr0",variantClassNames:{withShadow:{true:"_1p5zdvr1"},align:{left:"_1p5zdvr2",center:"_1p5zdvr3",right:"_1p5zdvr4"}},defaultVariants:{withShadow:!1,align:"left"},compoundVariants:[]});const nd=l.createContext({index:0,setIndex:()=>null}),rd=l.forwardRef(({as:e,children:t,withShadow:n,index:r,defaultIndex:o,align:i,onChange:a,...s},c)=>{const[u,d]=l.useState(o??0),f=l.useMemo(()=>l.Children.map(t,(b,y)=>l.cloneElement(b,{"data-index":y})),[t]);l.useEffect(()=>d(r??0),[r]);const m=l.useMemo(()=>({index:u,setIndex:y=>{d(y),a==null||a(y)}}),[u,a]),h=e||"ul";return j.jsx(h,{"data-test-id":s["data-test-id"],as:e,ref:c,className:Pe(fO({withShadow:n,align:i})),...s,children:j.jsx(nd.Provider,{value:m,children:f})})});rd.displayName="Tabs";rd.defaultProps={as:"ul",defaultIndex:0,index:0,align:"left",withShadow:!1,children:void 0,onChange:()=>null,"data-test-id":void 0};const od=l.forwardRef(({as:e,children:t,...n},r)=>{const{index:o,setIndex:i}=l.useContext(nd),a=l.useCallback(u=>{i==null||i(u)},[i]),s=n["data-index"]===o,c=e||"li";return j.jsx(c,{"data-test-id":n["data-test-id"],as:e,ref:r,onClick:()=>a(n["data-index"]||0),className:Pe(dO({isActive:s})),...n,children:j.jsx(sn,{as:"span",textStyle:"body2",children:t})})});od.displayName="TabItem";od.defaultProps={as:"li","data-index":void 0,"data-test-id":void 0};const cy="ToastProvider",[id,hO,pO]=Ja("Toast"),[uy,RP]=mn("Toast",[pO]),[vO,Os]=uy(cy),ly=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,c]=l.useState(null),[u,d]=l.useState(0),f=l.useRef(!1),m=l.useRef(!1);return l.createElement(id.Provider,{scope:t},l.createElement(vO,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:s,onViewportChange:c,onToastAdd:l.useCallback(()=>d(h=>h+1),[]),onToastRemove:l.useCallback(()=>d(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:m},a))};ly.propTypes={label(e){if(e.label&&typeof e.label=="string"&&!e.label.trim()){const t=`Invalid prop \`label\` supplied to \`${cy}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const mO="ToastViewport",gO=["F8"],uu="toast.viewportPause",lu="toast.viewportResume",yO=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=gO,label:o="Notifications ({hotkey})",...i}=e,a=Os(mO,n),s=hO(n),c=l.useRef(null),u=l.useRef(null),d=l.useRef(null),f=l.useRef(null),m=st(t,f,a.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;l.useEffect(()=>{const T=S=>{var v;r.every(C=>S[C]||S.code===C)&&((v=f.current)===null||v===void 0||v.focus())};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[r]),l.useEffect(()=>{const T=c.current,S=f.current;if(b&&T&&S){const v=()=>{if(!a.isClosePausedRef.current){const D=new CustomEvent(uu);S.dispatchEvent(D),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const D=new CustomEvent(lu);S.dispatchEvent(D),a.isClosePausedRef.current=!1}},C=D=>{!T.contains(D.relatedTarget)&&w()},I=()=>{T.contains(document.activeElement)||w()};return T.addEventListener("focusin",v),T.addEventListener("focusout",C),T.addEventListener("pointermove",v),T.addEventListener("pointerleave",I),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{T.removeEventListener("focusin",v),T.removeEventListener("focusout",C),T.removeEventListener("pointermove",v),T.removeEventListener("pointerleave",I),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[b,a.isClosePausedRef]);const y=l.useCallback(({tabbingDirection:T})=>{const v=s().map(w=>{const C=w.ref.current,I=[C,...DO(C)];return T==="forwards"?I:I.reverse()});return(T==="forwards"?v.reverse():v).flat()},[s]);return l.useEffect(()=>{const T=f.current;if(T){const S=v=>{const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const F=document.activeElement,k=v.shiftKey;if(v.target===T&&k){var I;(I=u.current)===null||I===void 0||I.focus();return}const E=y({tabbingDirection:k?"backwards":"forwards"}),p=E.findIndex($=>$===F);if(yc(E.slice(p+1)))v.preventDefault();else{var D,P;k?(D=u.current)===null||D===void 0||D.focus():(P=d.current)===null||P===void 0||P.focus()}}};return T.addEventListener("keydown",S),()=>T.removeEventListener("keydown",S)}},[s,y]),l.createElement(Y0,{ref:c,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:b?void 0:"none"}},b&&l.createElement(up,{ref:u,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"forwards"});yc(T)}}),l.createElement(id.Slot,{scope:n},l.createElement(Ke.ol,ae({tabIndex:-1},i,{ref:m}))),b&&l.createElement(up,{ref:d,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"backwards"});yc(T)}}))}),bO="ToastFocusProxy",up=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Os(bO,n);return l.createElement(ds,ae({"aria-hidden":!0,tabIndex:0},o,{ref:t,style:{position:"fixed"},onFocus:a=>{var s;const c=a.relatedTarget;!((s=i.viewport)!==null&&s!==void 0&&s.contains(c))&&r()}}))}),Ps="Toast",wO="toast.swipeStart",EO="toast.swipeMove",xO="toast.swipeCancel",_O="toast.swipeEnd",SO=l.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,c]=Sn({prop:r,defaultProp:o,onChange:i});return l.createElement(yr,{present:n||s},l.createElement(dy,ae({open:s},a,{ref:t,onClose:()=>c(!1),onPause:cn(e.onPause),onResume:cn(e.onResume),onSwipeStart:Ae(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ae(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:Ae(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ae(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})))}),[CO,$O]=uy(Ps,{onClose(){}}),dy=l.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:m,onSwipeEnd:h,...b}=e,y=Os(Ps,n),[T,S]=l.useState(null),v=st(t,$=>S($)),w=l.useRef(null),C=l.useRef(null),I=o||y.duration,D=l.useRef(0),P=l.useRef(I),F=l.useRef(0),{onToastAdd:k,onToastRemove:H}=y,R=cn(()=>{var $;(T==null?void 0:T.contains(document.activeElement))&&(($=y.viewport)===null||$===void 0||$.focus()),a()}),E=l.useCallback($=>{!$||$===1/0||(window.clearTimeout(F.current),D.current=new Date().getTime(),F.current=window.setTimeout(R,$))},[R]);l.useEffect(()=>{const $=y.viewport;if($){const A=()=>{E(P.current),u==null||u()},M=()=>{const z=new Date().getTime()-D.current;P.current=P.current-z,window.clearTimeout(F.current),c==null||c()};return $.addEventListener(uu,M),$.addEventListener(lu,A),()=>{$.removeEventListener(uu,M),$.removeEventListener(lu,A)}}},[y.viewport,I,c,u,E]),l.useEffect(()=>{i&&!y.isClosePausedRef.current&&E(I)},[i,I,y.isClosePausedRef,E]),l.useEffect(()=>(k(),()=>H()),[k,H]);const p=l.useMemo(()=>T?hy(T):null,[T]);return y.viewport?l.createElement(l.Fragment,null,p&&l.createElement(TO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},p),l.createElement(CO,{scope:n,onClose:R},hn.createPortal(l.createElement(id.ItemSlot,{scope:n},l.createElement(U0,{asChild:!0,onEscapeKeyDown:Ae(s,()=>{y.isFocusedToastEscapeKeyDownRef.current||R(),y.isFocusedToastEscapeKeyDownRef.current=!1})},l.createElement(Ke.li,ae({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},b,{ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ae(e.onKeyDown,$=>{$.key==="Escape"&&(s==null||s($.nativeEvent),$.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:Ae(e.onPointerDown,$=>{$.button===0&&(w.current={x:$.clientX,y:$.clientY})}),onPointerMove:Ae(e.onPointerMove,$=>{if(!w.current)return;const A=$.clientX-w.current.x,M=$.clientY-w.current.y,z=!!C.current,U=["left","right"].includes(y.swipeDirection),re=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,B=U?re(0,A):0,L=U?0:re(0,M),oe=$.pointerType==="touch"?10:2,G={x:B,y:L},K={originalEvent:$,delta:G};z?(C.current=G,da(EO,f,K,{discrete:!1})):lp(G,y.swipeDirection,oe)?(C.current=G,da(wO,d,K,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(A)>oe||Math.abs(M)>oe)&&(w.current=null)}),onPointerUp:Ae(e.onPointerUp,$=>{const A=C.current,M=$.target;if(M.hasPointerCapture($.pointerId)&&M.releasePointerCapture($.pointerId),C.current=null,w.current=null,A){const z=$.currentTarget,U={originalEvent:$,delta:A};lp(A,y.swipeDirection,y.swipeThreshold)?da(_O,h,U,{discrete:!0}):da(xO,m,U,{discrete:!0}),z.addEventListener("click",re=>re.preventDefault(),{once:!0})}})})))),y.viewport))):null});dy.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){const t=`Invalid prop \`type\` supplied to \`${Ps}\`. Expected \`foreground | background\`.`;return new Error(t)}return null}};const TO=e=>{const{__scopeToast:t,children:n,...r}=e,o=Os(Ps,t),[i,a]=l.useState(!1),[s,c]=l.useState(!1);return PO(()=>a(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:l.createElement(Zp,{asChild:!0},l.createElement(ds,r,i&&l.createElement(l.Fragment,null,o.label," ",n)))},IO="ToastAction",ad=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?l.createElement(fy,{altText:n,asChild:!0},l.createElement(OO,ae({},r,{ref:t}))):null});ad.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${IO}\``)}};const RO="ToastClose",OO=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=$O(RO,n);return l.createElement(fy,{asChild:!0},l.createElement(Ke.button,ae({type:"button"},r,{ref:t,onClick:Ae(e.onClick,o.onClose)})))}),fy=l.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return l.createElement(Ke.div,ae({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0},o,{ref:t}))});function hy(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),AO(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...hy(r))}}),t}function da(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?yp(o,i):o.dispatchEvent(i)}const lp=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function PO(e=()=>{}){const t=cn(e);Gt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function AO(e){return e.nodeType===e.ELEMENT_NODE}function DO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}const NO=ly,py=yO,vy=SO,kO=ad;var MO="_10z4js29",jO=wt({defaultClassName:"_10z4js25",variantClassNames:{color:{neutral:"_10z4js26",negative:"_10z4js27"}},defaultVariants:{color:"neutral"},compoundVariants:[]}),LO="_10z4js28",FO="_10z4js2a";const my=NO,sd=l.forwardRef(({className:e,...t},n)=>j.jsx(py,{ref:n,className:Pe(FO,e),...t}));sd.displayName=py.displayName;const As=l.forwardRef(({className:e,color:t="neutral",...n},r)=>j.jsx(vy,{ref:r,className:Pe(jO({color:t}),e),...n}));As.displayName=vy.displayName;As.defaultProps={viewPort:void 0,actionClassName:void 0};const cd=l.forwardRef(({className:e,...t},n)=>j.jsx(ad,{ref:n,className:Pe(e),...t}));cd.displayName=kO.displayName;const VO=1,BO=1e6,qn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let bc=0;function HO(){return bc=(bc+1)%Number.MAX_VALUE,bc.toString()}const wc=new Map,dp=e=>{if(wc.has(e))return;const t=setTimeout(()=>{wc.delete(e),ai({type:qn.REMOVE_TOAST,toastId:e})},BO);wc.set(e,t)};function gy(e,t){switch(t.type){case qn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,VO)};case qn.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case qn.DISMISS_TOAST:{const{toastId:n}=t;return n?dp(n):e.toasts.forEach(r=>{dp(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case qn.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)};default:return e}}const Ca=[];let $a={toasts:[]};function ai(e){$a=gy($a,e),Ca.forEach(t=>{t($a)})}function yy({...e}){const t=HO(),n=o=>ai({type:qn.UPDATE_TOAST,toast:{...o,id:t}}),r=()=>ai({type:qn.DISMISS_TOAST,toastId:t});return ai({type:qn.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function by(){const[e,t]=l.useState($a);return l.useEffect(()=>(Ca.push(t),()=>{const n=Ca.indexOf(t);n>-1&&Ca.splice(n,1)}),[e]),{...e,toast:yy,dismiss:n=>ai({type:qn.DISMISS_TOAST,toastId:n})}}const ud=l.forwardRef((e,t)=>{const{toasts:n,dismiss:r}=by();return j.jsx(my,{children:n.map(({id:o,description:i,action:a,actionText:s,actionClick:c,duration:u=3e3,type:d="foreground",color:f="neutral",viewPort:m,actionClassName:h,isDismissable:b=!0,...y})=>j.jsxs("div",{children:[j.jsxs(As,{ref:t,color:f,duration:u,type:d,"data-test-id":`toast-${y["data-test-id"]??""}`,...y,children:[j.jsx(et,{"data-test-id":`toast-${y["data-test-id"]??""}`,flexGrow:1,pl:"$16",py:"$16",pr:c?"$0":"$16",maxW:"$full",minW:"$0",cursor:b?"pointer":"auto",onClick:()=>{b&&r(o)},children:j.jsx(sn,{textStyle:"body2",fontWeight:"$reguler",textOverflow:"ellipsis",overflow:"hidden",className:LO,children:i})}),!a&&c&&s?j.jsx(cd,{altText:s,asChild:!0,children:j.jsx(Qm,{"data-test-id":`action-toast-${y["data-test-id"]??""}`,onClick:c,className:Pe(MO,h),children:s})}):a]},o),j.jsx(sd,{...m})]},o))})});ud.displayName="Toaster";const[Ds,OP]=mn("Tooltip",[us]),Ns=us(),WO="TooltipProvider",zO=700,du="tooltip.open",[UO,ld]=Ds(WO),YO=e=>{const{__scopeTooltip:t,delayDuration:n=zO,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=l.useState(!0),c=l.useRef(!1),u=l.useRef(0);return l.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.createElement(UO,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:l.useCallback(d=>{c.current=d},[]),disableHoverableContent:o},i)},dd="Tooltip",[KO,ks]=Ds(dd),qO=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,c=ld(dd,e.__scopeTooltip),u=Ns(t),[d,f]=l.useState(null),m=Xn(),h=l.useRef(0),b=a??c.disableHoverableContent,y=s??c.delayDuration,T=l.useRef(!1),[S=!1,v]=Sn({prop:r,defaultProp:o,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(du))):c.onClose(),i==null||i(P)}}),w=l.useMemo(()=>S?T.current?"delayed-open":"instant-open":"closed",[S]),C=l.useCallback(()=>{window.clearTimeout(h.current),T.current=!1,v(!0)},[v]),I=l.useCallback(()=>{window.clearTimeout(h.current),v(!1)},[v]),D=l.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{T.current=!0,v(!0)},y)},[y,v]);return l.useEffect(()=>()=>window.clearTimeout(h.current),[]),l.createElement(qp,u,l.createElement(KO,{scope:t,contentId:m,open:S,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?D():C()},[c.isOpenDelayed,D,C]),onTriggerLeave:l.useCallback(()=>{b?I():window.clearTimeout(h.current)},[I,b]),onOpen:C,onClose:I,disableHoverableContent:b},n))},fp="TooltipTrigger",XO=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ks(fp,n),i=ld(fp,n),a=Ns(n),s=l.useRef(null),c=st(t,s,o.onTriggerChange),u=l.useRef(!1),d=l.useRef(!1),f=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.createElement(Xp,ae({asChild:!0},a),l.createElement(Ke.button,ae({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:c,onPointerMove:Ae(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ae(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Ae(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ae(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Ae(e.onBlur,o.onClose),onClick:Ae(e.onClick,o.onClose)})))}),GO="TooltipPortal",[PP,ZO]=Ds(GO,{forceMount:void 0}),Ci="TooltipContent",QO=l.forwardRef((e,t)=>{const n=ZO(Ci,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=ks(Ci,e.__scopeTooltip);return l.createElement(yr,{present:r||a.open},a.disableHoverableContent?l.createElement(wy,ae({side:o},i,{ref:t})):l.createElement(JO,ae({side:o},i,{ref:t})))}),JO=l.forwardRef((e,t)=>{const n=ks(Ci,e.__scopeTooltip),r=ld(Ci,e.__scopeTooltip),o=l.useRef(null),i=st(t,o),[a,s]=l.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,m=l.useCallback(()=>{s(null),f(!1)},[f]),h=l.useCallback((b,y)=>{const T=b.currentTarget,S={x:b.clientX,y:b.clientY},v=oP(S,T.getBoundingClientRect()),w=iP(S,v),C=aP(y.getBoundingClientRect()),I=cP([...w,...C]);s(I),f(!0)},[f]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(c&&d){const b=T=>h(T,d),y=T=>h(T,c);return c.addEventListener("pointerleave",b),d.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",y)}}},[c,d,h,m]),l.useEffect(()=>{if(a){const b=y=>{const T=y.target,S={x:y.clientX,y:y.clientY},v=(c==null?void 0:c.contains(T))||(d==null?void 0:d.contains(T)),w=!sP(S,a);v?m():w&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,a,u,m]),l.createElement(wy,ae({},e,{ref:i}))}),[eP,tP]=Ds(dd,{isInside:!1}),wy=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,c=ks(Ci,n),u=Ns(n),{onClose:d}=c;return l.useEffect(()=>(document.addEventListener(du,d),()=>document.removeEventListener(du,d)),[d]),l.useEffect(()=>{if(c.trigger){const f=m=>{const h=m.target;h!=null&&h.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.createElement(is,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d},l.createElement(Gp,ae({"data-state":c.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),l.createElement(gp,null,r),l.createElement(eP,{scope:n,isInside:!0},l.createElement(Qw,{id:c.contentId,role:"tooltip"},o||r))))}),nP="TooltipArrow",rP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ns(n);return tP(nP,n).isInside?null:l.createElement(Gw,ae({},o,r,{ref:t}))});function oP(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function iP(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function aP(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function sP(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,c=t[i].y,u=t[a].x,d=t[a].y;c>r!=d>r&&n<(u-s)*(r-c)/(d-c)+s&&(o=!o)}return o}function cP(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),uP(t)}function uP(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const lP=YO,dP=qO,fP=XO,hP=QO,pP=rP;function hp(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function vP(e,t){var n=e;for(var r of t){if(!(r in n))throw new Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}function Ey(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=e.constructor();for(var o in e){var i=e[o],a=[...n,o];typeof i=="string"||typeof i=="number"||i==null?r[o]=t(i,a):typeof i=="object"&&!Array.isArray(i)?r[o]=Ey(i,t,a):console.warn('Skipping invalid key "'.concat(a.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"'))}return r}function mP(e,t){var n={};if(typeof t=="object"){var r=e;Ey(t,(a,s)=>{var c=vP(r,s);n[hp(c)]=String(a)})}else{var o=e;for(var i in o)n[hp(i)]=o[i]}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(s=>"".concat(s,":").concat(this[s])).join(";")},writable:!1}),n}var gP="var(--_4goys34)",yP="_4goys35",bP="_4goys36";const fd=l.forwardRef(({align:e,alignOffset:t,children:n,color:r,bgColor:o,content:i,defaultOpen:a,delayDuration:s=700,disableHoverableContent:c,onOpenChange:u,open:d,position:f,positionOffset:m,withIcon:h,...b},y)=>{const T=Rt.atoms.commonAtoms({color:r,bgColor:o}).className,S=Rt.atoms.borderAtoms({borderColor:o}).className,w=o.replace("$","");return j.jsxs(dP,{defaultOpen:a,delayDuration:s,disableHoverableContent:c,onOpenChange:u,open:d,children:[j.jsx(fP,{asChild:!0,ref:y,children:n}),j.jsx(ms,{children:j.jsxs(hP,{align:e,alignOffset:t,side:f,sideOffset:m,...b,className:Pe(bP,T,S),children:[j.jsxs(Yt,{gap:"$6",children:[h&&j.jsx(Yt,{width:"$24",children:j.jsx(I0,{size:24})}),i]}),j.jsx(pP,{className:yP,style:mP({[gP]:Rt.theme.colors[w]})})]})})]})});fd.displayName="Tooltip";fd.defaultProps={align:void 0,alignOffset:void 0,defaultOpen:void 0,delayDuration:300,disableHoverableContent:!1,onOpenChange:void 0,open:void 0,position:void 0,positionOffset:void 0,withIcon:void 0,bgColor:"$blackTypoHigh",color:"$white"};const hd=({children:e})=>j.jsxs(lP,{children:[e,j.jsx(ud,{})]});hd.displayName="RadixProvider";const pd=({children:e,withScrollStyles:t})=>j.jsx("div",{id:"voila-ui",style:{fontFamily:Rt.theme.fonts.poppins},className:Pe(t??Rt.scrollbarStyle),children:j.jsx(hd,{children:e})});pd.displayName="Provider";pd.defaultProps={withScrollStyles:!1};exports.Accordion=Ib;exports.AccordionContent=c0;exports.AccordionItem=u0;exports.AccordionTrigger=k0;exports.Alert=Ip;exports.Badge=xu;exports.BaseSelect=ku;exports.BottomSheet=j$;exports.Box=et;exports.Button=vo;exports.Card=gu;exports.Checkbox=Km;exports.Chips=sl;exports.CloseButton=xo;exports.ConfirmDialogContext=ll;exports.ConfirmDialogProvider=AT;exports.Container=yu;exports.DatePicker=oI;exports.Dialog=ul;exports.Flex=Yt;exports.FullLoader=tg;exports.Grid=bu;exports.IconButton=pl;exports.Image=vl;exports.Input=fl;exports.Link=Qm;exports.List=ml;exports.ListItem=gl;exports.Loader=zT;exports.LoaderAnimated=yl;exports.Modal=Ai;exports.ModalBody=Is;exports.ModalFooter=Rs;exports.ModalHeader=Di;exports.MultiPicker=ng;exports.Overlay=zE;exports.Picker=iu;exports.Portal=ms;exports.Provider=pd;exports.Radio=ty;exports.RadioGroup=YR;exports.RadixProvider=hd;exports.Search=td;exports.Select=co;exports.SelectPicker=Ug;exports.Spinner=_o;exports.Stack=Pr;exports.Switch=oy;exports.TabItem=od;exports.Table=sy;exports.Tabs=rd;exports.TabsContext=nd;exports.Text=sn;exports.Textarea=hl;exports.Toast=As;exports.ToastAction=cd;exports.ToastProvider=my;exports.ToastViewport=sd;exports.Toaster=ud;exports.Tooltip=fd;exports.reducer=gy;exports.toast=yy;exports.useDialog=DT;exports.useIndeterminate=nT;exports.useOnMount=bv;exports.useRipple=al;exports.useTableRenderer=ay;exports.useToast=by;
174
+ */var Yh;function aI(){return Yh||(Yh=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,o=60114,i=60109,a=60110,s=60112,c=60113,u=60120,d=60115,f=60116,m=60121,h=60122,b=60117,y=60129,T=60131;if(typeof Symbol=="function"&&Symbol.for){var S=Symbol.for;e=S("react.element"),t=S("react.portal"),n=S("react.fragment"),r=S("react.strict_mode"),o=S("react.profiler"),i=S("react.provider"),a=S("react.context"),s=S("react.forward_ref"),c=S("react.suspense"),u=S("react.suspense_list"),d=S("react.memo"),f=S("react.lazy"),m=S("react.block"),h=S("react.server.block"),b=S("react.fundamental"),S("react.scope"),S("react.opaque.id"),y=S("react.debug_trace_mode"),S("react.offscreen"),T=S("react.legacy_hidden")}var v=!1;function w(ie){return!!(typeof ie=="string"||typeof ie=="function"||ie===n||ie===o||ie===y||ie===r||ie===c||ie===u||ie===T||v||typeof ie=="object"&&ie!==null&&(ie.$$typeof===f||ie.$$typeof===d||ie.$$typeof===i||ie.$$typeof===a||ie.$$typeof===s||ie.$$typeof===b||ie.$$typeof===m||ie[0]===h))}function C(ie){if(typeof ie=="object"&&ie!==null){var ee=ie.$$typeof;switch(ee){case e:var we=ie.type;switch(we){case n:case o:case r:case c:case u:return we;default:var Te=we&&we.$$typeof;switch(Te){case a:case s:case f:case d:case i:return Te;default:return ee}}case t:return ee}}}var I=a,D=i,P=e,F=s,k=n,H=f,R=d,E=t,p=o,$=r,A=c,M=!1,z=!1;function U(ie){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function re(ie){return z||(z=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(ie){return C(ie)===a}function L(ie){return C(ie)===i}function oe(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===e}function G(ie){return C(ie)===s}function K(ie){return C(ie)===n}function Z(ie){return C(ie)===f}function ce(ie){return C(ie)===d}function W(ie){return C(ie)===t}function Y(ie){return C(ie)===o}function te(ie){return C(ie)===r}function J(ie){return C(ie)===c}yt.ContextConsumer=I,yt.ContextProvider=D,yt.Element=P,yt.ForwardRef=F,yt.Fragment=k,yt.Lazy=H,yt.Memo=R,yt.Portal=E,yt.Profiler=p,yt.StrictMode=$,yt.Suspense=A,yt.isAsyncMode=U,yt.isConcurrentMode=re,yt.isContextConsumer=B,yt.isContextProvider=L,yt.isElement=oe,yt.isForwardRef=G,yt.isFragment=K,yt.isLazy=Z,yt.isMemo=ce,yt.isPortal=W,yt.isProfiler=Y,yt.isStrictMode=te,yt.isSuspense=J,yt.isValidElementType=w,yt.typeOf=C}()),yt}process.env.NODE_ENV==="production"?au.exports=iI():au.exports=aI();var Kh=au.exports;let qh=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Xh=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",vc=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return Xh(n.overflowY,t)||Xh(n.overflowX,t)||(r=>{let o=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)})(e)}return!1},ua=(e,t,n,r,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0,sI=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var cI=(e,t)=>{var n,r,o,i,a,s;if(typeof document>"u")return[];let{scrollMode:c,block:u,inline:d,boundary:f,skipOverflowHiddenElements:m}=t,h=typeof f=="function"?f:$=>$!==f;if(!qh(e))throw new TypeError("Invalid target");let b=document.scrollingElement||document.documentElement,y=[],T=e;for(;qh(T)&&h(T);){if(T=sI(T),T===b){y.push(T);break}T!=null&&T===document.body&&vc(T)&&!vc(document.documentElement)||T!=null&&vc(T,m)&&y.push(T)}let S=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,v=(i=(o=window.visualViewport)==null?void 0:o.height)!=null?i:innerHeight,w=(a=window.scrollX)!=null?a:pageXOffset,C=(s=window.scrollY)!=null?s:pageYOffset,{height:I,width:D,top:P,right:F,bottom:k,left:H}=e.getBoundingClientRect(),R=u==="start"||u==="nearest"?P:u==="end"?k:P+I/2,E=d==="center"?H+D/2:d==="end"?F:H,p=[];for(let $=0;$<y.length;$++){let A=y[$],{height:M,width:z,top:U,right:re,bottom:B,left:L}=A.getBoundingClientRect();if(c==="if-needed"&&P>=0&&H>=0&&k<=v&&F<=S&&P>=U&&k<=B&&H>=L&&F<=re)return p;let oe=getComputedStyle(A),G=parseInt(oe.borderLeftWidth,10),K=parseInt(oe.borderTopWidth,10),Z=parseInt(oe.borderRightWidth,10),ce=parseInt(oe.borderBottomWidth,10),W=0,Y=0,te="offsetWidth"in A?A.offsetWidth-A.clientWidth-G-Z:0,J="offsetHeight"in A?A.offsetHeight-A.clientHeight-K-ce:0,ie="offsetWidth"in A?A.offsetWidth===0?0:z/A.offsetWidth:0,ee="offsetHeight"in A?A.offsetHeight===0?0:M/A.offsetHeight:0;if(b===A)W=u==="start"?R:u==="end"?R-v:u==="nearest"?ua(C,C+v,v,K,ce,C+R,C+R+I,I):R-v/2,Y=d==="start"?E:d==="center"?E-S/2:d==="end"?E-S:ua(w,w+S,S,G,Z,w+E,w+E+D,D),W=Math.max(0,W+C),Y=Math.max(0,Y+w);else{W=u==="start"?R-U-K:u==="end"?R-B+ce+J:u==="nearest"?ua(U,B,M,K,ce+J,R,R+I,I):R-(U+M/2)+J/2,Y=d==="start"?E-L-G:d==="center"?E-(L+z/2)+te/2:d==="end"?E-re+Z+te:ua(L,re,z,G,Z+te,E,E+D,D);let{scrollLeft:we,scrollTop:Te}=A;W=Math.max(0,Math.min(Te+W/ee,A.scrollHeight-M/ee+J)),Y=Math.max(0,Math.min(we+Y/ie,A.scrollWidth-z/ie+te)),R+=Te-W,E+=we-Y}p.push({el:A,top:W,left:Y})}return p},uI=0;function Gh(e){return typeof e=="function"?e:dn}function dn(){}function ig(e,t){if(e){var n=cI(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach(function(r){var o=r.el,i=r.top,a=r.left;o.scrollTop=i,o.scrollLeft=a})}}function Zh(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function bl(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];r(),n=setTimeout(function(){n=null,e.apply(void 0,a)},t)}return o.cancel=r,o}function It(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return s&&s.apply(void 0,[r].concat(i)),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault})}}function hr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(o){typeof o=="function"?o(r):o&&(o.current=r)})}}function ag(){return String(uI++)}function sg(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function Qh(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function cg(e){return typeof e.type=="string"}function ug(e){return e.props}function lI(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var dI=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function la(e){e===void 0&&(e={});var t={};return dI.forEach(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function _i(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=Xa(t,r)?t[r]:e[r],n},{})}function Xa(e,t){return e[t]!==void 0}function Si(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function fI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Or(e,t,n,r,o){if(o===void 0&&(o=!0),n===0)return-1;var i=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:i+1);var a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);var s=Fr(e,a,n,r,o);return s===-1?t>=n?-1:t:s}function Fr(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a<n;a++)if(!r(a).hasAttribute("disabled"))return a}else for(var s=t-1;s>=0;s--)if(!r(s).hasAttribute("disabled"))return s;return o?e>0?Fr(1,0,n,r,!1):Fr(-1,n-1,n,r,!1):-1}function Ga(e,t,n,r){return r===void 0&&(r=!0),t.some(function(o){return o&&(Zh(o,e,n)||r&&Zh(o,n.document.activeElement,n))})}var wl=dn;process.env.NODE_ENV!=="production"&&(wl=function(t,n,r){var o="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(t).forEach(function(i){n[i]!==void 0&&r[i]===void 0?console.error('downshift: A component has changed the controlled prop "'+i+'" to be uncontrolled. '+o):n[i]===void 0&&r[i]!==void 0&&console.error('downshift: A component has changed the uncontrolled prop "'+i+'" to be controlled. '+o)})});var hI=bl(function(e){lg(e).textContent=""},500);function El(e,t){var n=lg(t);e&&(n.textContent=e,hI(t))}function lg(e){e===void 0&&(e=document);var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var dg=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,fg=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,hg=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,_a=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,Sa=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,pg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,vg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,mg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,gg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,yg=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,bg=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,wg=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,Eg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,su=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,xg=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,_g=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,Sg=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,pI=Object.freeze({__proto__:null,unknown:dg,mouseUp:fg,itemMouseEnter:hg,keyDownArrowUp:_a,keyDownArrowDown:Sa,keyDownEscape:pg,keyDownEnter:vg,keyDownHome:mg,keyDownEnd:gg,clickItem:yg,blurInput:bg,changeInput:wg,keyDownSpaceButton:Eg,clickButton:su,blurButton:xg,controlledPropUpdatedSelectedItem:_g,touchEnd:Sg}),vI=["refKey","ref"],mI=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],gI=["onKeyDown","onBlur","onChange","onInput","onChangeText"],yI=["refKey","ref"],bI=["onMouseMove","onMouseDown","onClick","onPress","index","item"],wI=function(){var e=function(t){Au(n,t);function n(o){var i;i=t.call(this,o)||this,i.id=i.props.id||"downshift-"+ag(),i.menuId=i.props.menuId||i.id+"-menu",i.labelId=i.props.labelId||i.id+"-label",i.inputId=i.props.inputId||i.id+"-input",i.getItemId=i.props.getItemId||function(v){return i.id+"-item-"+v},i.input=null,i.items=[],i.itemCount=null,i.previousResultCount=0,i.timeoutIds=[],i.internalSetTimeout=function(v,w){var C=setTimeout(function(){i.timeoutIds=i.timeoutIds.filter(function(I){return I!==C}),v()},w);i.timeoutIds.push(C)},i.setItemCount=function(v){i.itemCount=v},i.unsetItemCount=function(){i.itemCount=null},i.setHighlightedIndex=function(v,w){v===void 0&&(v=i.props.defaultHighlightedIndex),w===void 0&&(w={}),w=la(w),i.internalSetState(ae({highlightedIndex:v},w))},i.clearSelection=function(v){i.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:i.props.defaultHighlightedIndex,isOpen:i.props.defaultIsOpen},v)},i.selectItem=function(v,w,C){w=la(w),i.internalSetState(ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,selectedItem:v,inputValue:i.props.itemToString(v)},w),C)},i.selectItemAtIndex=function(v,w,C){var I=i.items[v];I!=null&&i.selectItem(I,w,C)},i.selectHighlightedItem=function(v,w){return i.selectItemAtIndex(i.getState().highlightedIndex,v,w)},i.internalSetState=function(v,w){var C,I,D={},P=typeof v=="function";return!P&&v.hasOwnProperty("inputValue")&&i.props.onInputValueChange(v.inputValue,ae({},i.getStateAndHelpers(),v)),i.setState(function(F){F=i.getState(F);var k=P?v(F):v;k=i.props.stateReducer(F,k),C=k.hasOwnProperty("selectedItem");var H={};return C&&k.selectedItem!==F.selectedItem&&(I=k.selectedItem),k.type=k.type||dg,Object.keys(k).forEach(function(R){F[R]!==k[R]&&(D[R]=k[R]),R!=="type"&&(k[R],Xa(i.props,R)||(H[R]=k[R]))}),P&&k.hasOwnProperty("inputValue")&&i.props.onInputValueChange(k.inputValue,ae({},i.getStateAndHelpers(),k)),H},function(){Gh(w)();var F=Object.keys(D).length>1;F&&i.props.onStateChange(D,i.getStateAndHelpers()),C&&i.props.onSelect(v.selectedItem,i.getStateAndHelpers()),I!==void 0&&i.props.onChange(I,i.getStateAndHelpers()),i.props.onUserAction(D,i.getStateAndHelpers())})},i.rootRef=function(v){return i._rootNode=v},i.getRootProps=function(v,w){var C,I=v===void 0?{}:v,D=I.refKey,P=D===void 0?"ref":D,F=I.ref,k=an(I,vI),H=w===void 0?{}:w,R=H.suppressRefError,E=R===void 0?!1:R;i.getRootProps.called=!0,i.getRootProps.refKey=P,i.getRootProps.suppressRefError=E;var p=i.getState(),$=p.isOpen;return ae((C={},C[P]=hr(F,i.rootRef),C.role="combobox",C["aria-expanded"]=$,C["aria-haspopup"]="listbox",C["aria-owns"]=$?i.menuId:null,C["aria-labelledby"]=i.labelId,C),k)},i.keyDownHandlers={ArrowDown:function(w){var C=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?5:1;this.moveHighlightedIndex(I,{type:Sa})}else this.internalSetState({isOpen:!0,type:Sa},function(){var D=C.getItemCount();if(D>0){var P=C.getState(),F=P.highlightedIndex,k=Or(1,F,D,function(H){return C.getItemNodeFromIndex(H)});C.setHighlightedIndex(k,{type:Sa})}})},ArrowUp:function(w){var C=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?-5:-1;this.moveHighlightedIndex(I,{type:_a})}else this.internalSetState({isOpen:!0,type:_a},function(){var D=C.getItemCount();if(D>0){var P=C.getState(),F=P.highlightedIndex,k=Or(-1,F,D,function(H){return C.getItemNodeFromIndex(H)});C.setHighlightedIndex(k,{type:_a})}})},Enter:function(w){if(w.which!==229){var C=this.getState(),I=C.isOpen,D=C.highlightedIndex;if(I&&D!=null){w.preventDefault();var P=this.items[D],F=this.getItemNodeFromIndex(D);if(P==null||F&&F.hasAttribute("disabled"))return;this.selectHighlightedItem({type:vg})}}},Escape:function(w){w.preventDefault(),this.reset(ae({type:pg},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},i.buttonKeyDownHandlers=ae({},i.keyDownHandlers,{" ":function(w){w.preventDefault(),this.toggleMenu({type:Eg})}}),i.inputKeyDownHandlers=ae({},i.keyDownHandlers,{Home:function(w){var C=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var P=this.getItemCount();if(!(P<=0||!D)){var F=Fr(1,0,P,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:mg})}}},End:function(w){var C=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var P=this.getItemCount();if(!(P<=0||!D)){var F=Fr(-1,P-1,P,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:gg})}}}}),i.getToggleButtonProps=function(v){var w=v===void 0?{}:v,C=w.onClick;w.onPress;var I=w.onKeyDown,D=w.onKeyUp,P=w.onBlur,F=an(w,mI),k=i.getState(),H=k.isOpen,R={onClick:It(C,i.buttonHandleClick),onKeyDown:It(I,i.buttonHandleKeyDown),onKeyUp:It(D,i.buttonHandleKeyUp),onBlur:It(P,i.buttonHandleBlur)},E=F.disabled?{}:R;return ae({type:"button",role:"button","aria-label":H?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},E,F)},i.buttonHandleKeyUp=function(v){v.preventDefault()},i.buttonHandleKeyDown=function(v){var w=Si(v);i.buttonKeyDownHandlers[w]&&i.buttonKeyDownHandlers[w].call(Tf(i),v)},i.buttonHandleClick=function(v){v.preventDefault(),i.props.environment.document.activeElement===i.props.environment.document.body&&v.target.focus(),process.env.NODE_ENV==="test"?i.toggleMenu({type:su}):i.internalSetTimeout(function(){return i.toggleMenu({type:su})})},i.buttonHandleBlur=function(v){var w=v.target;i.internalSetTimeout(function(){!i.isMouseDown&&(i.props.environment.document.activeElement==null||i.props.environment.document.activeElement.id!==i.inputId)&&i.props.environment.document.activeElement!==w&&i.reset({type:xg})})},i.getLabelProps=function(v){return ae({htmlFor:i.inputId,id:i.labelId},v)},i.getInputProps=function(v){var w=v===void 0?{}:v,C=w.onKeyDown,I=w.onBlur,D=w.onChange,P=w.onInput;w.onChangeText;var F=an(w,gI),k,H={};k="onChange";var R=i.getState(),E=R.inputValue,p=R.isOpen,$=R.highlightedIndex;if(!F.disabled){var A;H=(A={},A[k]=It(D,P,i.inputHandleChange),A.onKeyDown=It(C,i.inputHandleKeyDown),A.onBlur=It(I,i.inputHandleBlur),A)}return ae({"aria-autocomplete":"list","aria-activedescendant":p&&typeof $=="number"&&$>=0?i.getItemId($):null,"aria-controls":p?i.menuId:null,"aria-labelledby":F&&F["aria-label"]?void 0:i.labelId,autoComplete:"off",value:E,id:i.inputId},H,F)},i.inputHandleKeyDown=function(v){var w=Si(v);w&&i.inputKeyDownHandlers[w]&&i.inputKeyDownHandlers[w].call(Tf(i),v)},i.inputHandleChange=function(v){i.internalSetState({type:wg,isOpen:!0,inputValue:v.target.value,highlightedIndex:i.props.defaultHighlightedIndex})},i.inputHandleBlur=function(){i.internalSetTimeout(function(){var v=i.props.environment.document&&!!i.props.environment.document.activeElement&&!!i.props.environment.document.activeElement.dataset&&i.props.environment.document.activeElement.dataset.toggle&&i._rootNode&&i._rootNode.contains(i.props.environment.document.activeElement);!i.isMouseDown&&!v&&i.reset({type:bg})})},i.menuRef=function(v){i._menuNode=v},i.getMenuProps=function(v,w){var C,I=v===void 0?{}:v,D=I.refKey,P=D===void 0?"ref":D,F=I.ref,k=an(I,yI),H=w===void 0?{}:w,R=H.suppressRefError,E=R===void 0?!1:R;return i.getMenuProps.called=!0,i.getMenuProps.refKey=P,i.getMenuProps.suppressRefError=E,ae((C={},C[P]=hr(F,i.menuRef),C.role="listbox",C["aria-labelledby"]=k&&k["aria-label"]?null:i.labelId,C.id=i.menuId,C),k)},i.getItemProps=function(v){var w,C=v===void 0?{}:v,I=C.onMouseMove,D=C.onMouseDown,P=C.onClick;C.onPress;var F=C.index,k=C.item,H=k===void 0?process.env.NODE_ENV==="production"?void 0:lI("getItemProps","item"):k,R=an(C,bI);F===void 0?(i.items.push(H),F=i.items.indexOf(H)):i.items[F]=H;var E="onClick",p=P,$=(w={onMouseMove:It(I,function(){F!==i.getState().highlightedIndex&&(i.setHighlightedIndex(F,{type:hg}),i.avoidScrolling=!0,i.internalSetTimeout(function(){return i.avoidScrolling=!1},250))}),onMouseDown:It(D,function(M){M.preventDefault()})},w[E]=It(p,function(){i.selectItemAtIndex(F,{type:yg})}),w),A=R.disabled?{onMouseDown:$.onMouseDown}:$;return ae({id:i.getItemId(F),role:"option","aria-selected":i.getState().highlightedIndex===F},A,R)},i.clearItems=function(){i.items=[]},i.reset=function(v,w){v===void 0&&(v={}),v=la(v),i.internalSetState(function(C){var I=C.selectedItem;return ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,inputValue:i.props.itemToString(I)},v)},w)},i.toggleMenu=function(v,w){v===void 0&&(v={}),v=la(v),i.internalSetState(function(C){var I=C.isOpen;return ae({isOpen:!I},I&&{highlightedIndex:i.props.defaultHighlightedIndex},v)},function(){var C=i.getState(),I=C.isOpen,D=C.highlightedIndex;I&&i.getItemCount()>0&&typeof D=="number"&&i.setHighlightedIndex(D,v),Gh(w)()})},i.openMenu=function(v){i.internalSetState({isOpen:!0},v)},i.closeMenu=function(v){i.internalSetState({isOpen:!1},v)},i.updateStatus=bl(function(){var v=i.getState(),w=i.items[v.highlightedIndex],C=i.getItemCount(),I=i.props.getA11yStatusMessage(ae({itemToString:i.props.itemToString,previousResultCount:i.previousResultCount,resultCount:C,highlightedItem:w},v));i.previousResultCount=C,El(I,i.props.environment.document)},200);var a=i.props,s=a.defaultHighlightedIndex,c=a.initialHighlightedIndex,u=c===void 0?s:c,d=a.defaultIsOpen,f=a.initialIsOpen,m=f===void 0?d:f,h=a.initialInputValue,b=h===void 0?"":h,y=a.initialSelectedItem,T=y===void 0?null:y,S=i.getState({highlightedIndex:u,isOpen:m,inputValue:b,selectedItem:T});return S.selectedItem!=null&&i.props.initialInputValue===void 0&&(S.inputValue=i.props.itemToString(S.selectedItem)),i.state=S,i}var r=n.prototype;return r.internalClearTimeouts=function(){this.timeoutIds.forEach(function(i){clearTimeout(i)}),this.timeoutIds=[]},r.getState=function(i){return i===void 0&&(i=this.state),_i(i,this.props)},r.getItemCount=function(){var i=this.items.length;return this.itemCount!=null?i=this.itemCount:this.props.itemCount!==void 0&&(i=this.props.itemCount),i},r.getItemNodeFromIndex=function(i){return this.props.environment.document.getElementById(this.getItemId(i))},r.scrollHighlightedItemIntoView=function(){{var i=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(i,this._menuNode)}},r.moveHighlightedIndex=function(i,a){var s=this,c=this.getItemCount(),u=this.getState(),d=u.highlightedIndex;if(c>0){var f=Or(i,d,c,function(m){return s.getItemNodeFromIndex(m)});this.setHighlightedIndex(f,a)}},r.getStateAndHelpers=function(){var i=this.getState(),a=i.highlightedIndex,s=i.inputValue,c=i.selectedItem,u=i.isOpen,d=this.props.itemToString,f=this.id,m=this.getRootProps,h=this.getToggleButtonProps,b=this.getLabelProps,y=this.getMenuProps,T=this.getInputProps,S=this.getItemProps,v=this.openMenu,w=this.closeMenu,C=this.toggleMenu,I=this.selectItem,D=this.selectItemAtIndex,P=this.selectHighlightedItem,F=this.setHighlightedIndex,k=this.clearSelection,H=this.clearItems,R=this.reset,E=this.setItemCount,p=this.unsetItemCount,$=this.internalSetState;return{getRootProps:m,getToggleButtonProps:h,getLabelProps:b,getMenuProps:y,getInputProps:T,getItemProps:S,reset:R,openMenu:v,closeMenu:w,toggleMenu:C,selectItem:I,selectItemAtIndex:D,selectHighlightedItem:P,setHighlightedIndex:F,clearSelection:k,clearItems:H,setItemCount:E,unsetItemCount:p,setState:$,itemToString:d,id:f,highlightedIndex:a,inputValue:s,isOpen:u,selectedItem:c}},r.componentDidMount=function(){var i=this;process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Jh(this._menuNode,this.getMenuProps);{var a=function(){i.isMouseDown=!0},s=function(h){i.isMouseDown=!1;var b=Ga(h.target,[i._rootNode,i._menuNode],i.props.environment);!b&&i.getState().isOpen&&i.reset({type:fg},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},c=function(){i.isTouchMove=!1},u=function(){i.isTouchMove=!0},d=function(h){var b=Ga(h.target,[i._rootNode,i._menuNode],i.props.environment,!1);!i.isTouchMove&&!b&&i.getState().isOpen&&i.reset({type:Sg},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},f=this.props.environment;f.addEventListener("mousedown",a),f.addEventListener("mouseup",s),f.addEventListener("touchstart",c),f.addEventListener("touchmove",u),f.addEventListener("touchend",d),this.cleanup=function(){i.internalClearTimeouts(),i.updateStatus.cancel(),f.removeEventListener("mousedown",a),f.removeEventListener("mouseup",s),f.removeEventListener("touchstart",c),f.removeEventListener("touchmove",u),f.removeEventListener("touchend",d)}}},r.shouldScroll=function(i,a){var s=this.props.highlightedIndex===void 0?this.getState():this.props,c=s.highlightedIndex,u=a.highlightedIndex===void 0?i:a,d=u.highlightedIndex,f=c&&this.getState().isOpen&&!i.isOpen,m=c!==d;return f||m},r.componentDidUpdate=function(i,a){process.env.NODE_ENV!=="production"&&(wl(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Jh(this._menuNode,this.getMenuProps)),Xa(this.props,"selectedItem")&&this.props.selectedItemChanged(i.selectedItem,this.props.selectedItem)&&this.internalSetState({type:_g,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(a,i)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},r.componentWillUnmount=function(){this.cleanup()},r.render=function(){var i=Qh(this.props.children,dn);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var a=Qh(i(this.getStateAndHelpers()));if(!a)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&EI(a,this.getRootProps),a;if(cg(a))return l.cloneElement(a,this.getRootProps(ug(a)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")},n}(l.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:sg,itemToString:function(n){return n==null?"":(process.env.NODE_ENV!=="production"&&fI(n)&&!n.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",n),String(n))},onStateChange:dn,onInputValueChange:dn,onUserAction:dn,onChange:dn,onSelect:dn,onOuterClick:dn,selectedItemChanged:function(n,r){return n!==r},environment:typeof window>"u"?{}:window,stateReducer:function(n,r){return r},suppressRefError:!1,scrollIntoView:ig},e.stateChangeTypes=pI,e}();process.env.NODE_ENV!=="production"&&(wI.propTypes={children:X.func,defaultHighlightedIndex:X.number,defaultIsOpen:X.bool,initialHighlightedIndex:X.number,initialSelectedItem:X.any,initialInputValue:X.string,initialIsOpen:X.bool,getA11yStatusMessage:X.func,itemToString:X.func,onChange:X.func,onSelect:X.func,onStateChange:X.func,onInputValueChange:X.func,onUserAction:X.func,onOuterClick:X.func,selectedItemChanged:X.func,stateReducer:X.func,itemCount:X.number,id:X.string,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})}),suppressRefError:X.bool,scrollIntoView:X.func,selectedItem:X.any,isOpen:X.bool,inputValue:X.string,highlightedIndex:X.number,labelId:X.string,inputId:X.string,menuId:X.string,getItemId:X.func});function Jh(e,t){var n=t.refKey;e||console.error('downshift: The ref prop "'+n+'" from getMenuProps was not applied correctly on your menu element.')}function EI(e,t){var n=t.refKey,r=n!=="ref",o=!cg(e);o&&!r&&!Kh.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!o&&r&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+n+'"'),!Kh.isForwardRef(e)&&!ug(e)[n]&&console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')}var xI=["isInitialMount","highlightedIndex","items","environment"],Cg={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function _I(e,t,n){var r=e.props,o=e.type,i={};Object.keys(t).forEach(function(a){SI(a,e,t,n),n[a]!==t[a]&&(i[a]=n[a])}),r.onStateChange&&Object.keys(i).length&&r.onStateChange(ae({type:o},i))}function SI(e,t,n,r){var o=t.props,i=t.type,a="on"+xl(e)+"Change";o[a]&&r[e]!==void 0&&r[e]!==n[e]&&o[a](ae({type:i},r))}function CI(e,t){return t.changes}function $I(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var TI=bl(function(e,t){El(e(),t)},200),II=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?l.useLayoutEffect:l.useEffect;function RI(e){var t=e.id,n=t===void 0?"downshift-"+ag():t,r=e.labelId,o=e.menuId,i=e.getItemId,a=e.toggleButtonId,s=e.inputId,c=l.useRef({labelId:r||n+"-label",menuId:o||n+"-menu",getItemId:i||function(u){return n+"-item-"+u},toggleButtonId:a||n+"-toggle-button",inputId:s||n+"-input"});return c.current}function $g(e,t,n,r){var o,i;if(e===void 0){if(t===void 0)throw new Error(r);o=n[t],i=t}else i=t===void 0?n.indexOf(e):t,o=e;return[o,i]}function OI(e){return e?String(e):""}function xl(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function _l(e){var t=l.useRef(e);return t.current=e,t}function Tg(e,t,n){var r=l.useRef(),o=l.useRef(),i=l.useCallback(function(m,h){o.current=h,m=_i(m,h.props);var b=e(m,h),y=h.props.stateReducer(m,ae({},h,{changes:b}));return y},[e]),a=l.useReducer(i,t),s=a[0],c=a[1],u=_l(n),d=l.useCallback(function(m){return c(ae({props:u.current},m))},[u]),f=o.current;return l.useEffect(function(){f&&r.current&&r.current!==s&&_I(f,_i(r.current,f.props),s),r.current=s},[s,n,f]),[s,d]}function PI(e,t,n){var r=Tg(e,t,n),o=r[0],i=r[1];return[_i(o,n),i]}var ri={itemToString:OI,stateReducer:CI,getA11ySelectionMessage:$I,scrollIntoView:ig,environment:typeof window>"u"?{}:window};function Pn(e,t,n){n===void 0&&(n=Cg);var r=e["default"+xl(t)];return r!==void 0?r:n[t]}function zo(e,t,n){n===void 0&&(n=Cg);var r=e[t];if(r!==void 0)return r;var o=e["initial"+xl(t)];return o!==void 0?o:Pn(e,t,n)}function AI(e){var t=zo(e,"selectedItem"),n=zo(e,"isOpen"),r=zo(e,"highlightedIndex"),o=zo(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function oi(e,t,n){var r=e.items,o=e.initialHighlightedIndex,i=e.defaultHighlightedIndex,a=t.selectedItem,s=t.highlightedIndex;return r.length===0?-1:o!==void 0&&s===o?o:i!==void 0?i:a?r.indexOf(a):n===0?-1:n<0?r.length-1:0}function DI(e,t,n,r){var o=l.useRef({isMouseDown:!1,isTouchMove:!1});return l.useEffect(function(){if((n==null?void 0:n.addEventListener)!=null){var i=function(){o.current.isMouseDown=!0},a=function(f){o.current.isMouseDown=!1,e&&!Ga(f.target,t.map(function(m){return m.current}),n)&&r()},s=function(){o.current.isTouchMove=!1},c=function(){o.current.isTouchMove=!0},u=function(f){e&&!o.current.isTouchMove&&!Ga(f.target,t.map(function(m){return m.current}),n,!1)&&r()};return n.addEventListener("mousedown",i),n.addEventListener("mouseup",a),n.addEventListener("touchstart",s),n.addEventListener("touchmove",c),n.addEventListener("touchend",u),function(){n.removeEventListener("mousedown",i),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",s),n.removeEventListener("touchmove",c),n.removeEventListener("touchend",u)}}},[e,n]),o}var Sl=function(){return dn};process.env.NODE_ENV!=="production"&&(Sl=function(){for(var t=l.useRef(!0),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=l.useRef(r.reduce(function(s,c){return s[c]={},s},{}));l.useEffect(function(){Object.keys(i.current).forEach(function(s){var c=i.current[s];if(t.current&&!Object.keys(c).length){console.error("downshift: You forgot to call the "+s+" getter function on your component / element.");return}var u=c.suppressRefError,d=c.refKey,f=c.elementRef;(!f||!f.current)&&!u&&console.error('downshift: The ref prop "'+d+'" from '+s+" was not applied correctly on your element.")}),t.current=!1});var a=l.useCallback(function(s,c,u,d){i.current[s]={suppressRefError:c,refKey:u,elementRef:d}},[]);return a});function ep(e,t,n){var r=n.isInitialMount,o=n.highlightedIndex,i=n.items,a=n.environment,s=an(n,xI);l.useEffect(function(){r||TI(function(){return e(ae({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length},s))},a.document)},t)}function NI(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,o=e.getItemNodeFromIndex,i=e.menuElement,a=e.scrollIntoView,s=l.useRef(!0);return II(function(){t<0||!n||!Object.keys(r.current).length||(s.current===!1?s.current=!0:a(o(t),i))},[t]),s}var Cl=dn;process.env.NODE_ENV!=="production"&&(Cl=function(t){var n=t.isInitialMount,r=t.props,o=t.state,i=l.useRef(r);l.useEffect(function(){n||(wl(o,i.current,r),i.current=r)},[o,r,n])});function tp(e,t,n){var r;n===void 0&&(n=!0);var o=((r=e.items)==null?void 0:r.length)&&t>=0;return ae({isOpen:!1,highlightedIndex:-1},o&&ae({selectedItem:e.items[t],isOpen:Pn(e,"isOpen"),highlightedIndex:Pn(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function kI(e,t,n){var r=t.type,o=t.props,i;switch(r){case n.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:i={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:oi(o,e,0)};break;case n.FunctionOpenMenu:i={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case n.FunctionCloseMenu:i={isOpen:!1};break;case n.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:i={inputValue:t.inputValue};break;case n.FunctionReset:i={highlightedIndex:Pn(o,"highlightedIndex"),isOpen:Pn(o,"isOpen"),selectedItem:Pn(o,"selectedItem"),inputValue:Pn(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,i)}X.array.isRequired,X.func,X.func,X.func,X.number,X.number,X.number,X.bool,X.bool,X.bool,X.any,X.any,X.any,X.string,X.string,X.string,X.func,X.string,X.func,X.func,X.func,X.func,X.func,X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})});function MI(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}xn(xn({},ri),{getA11yStatusMessage:MI});process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;var $l=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,Tl=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,Il=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,Rl=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,Ol=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,Pl=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,Al=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,Dl=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,Nl=process.env.NODE_ENV!=="production"?"__input_change__":8,Za=process.env.NODE_ENV!=="production"?"__input_blur__":9,kl=process.env.NODE_ENV!=="production"?"__input_focus__":10,Ig=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,Rg=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,Ml=process.env.NODE_ENV!=="production"?"__item_click__":13,Og=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,Pg=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,Ag=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,Dg=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,Ng=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,jl=process.env.NODE_ENV!=="production"?"__function_select_item__":19,kg=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,Mg=process.env.NODE_ENV!=="production"?"__function_reset__":21,Ll=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,jg=Object.freeze({__proto__:null,InputKeyDownArrowDown:$l,InputKeyDownArrowUp:Tl,InputKeyDownEscape:Il,InputKeyDownHome:Rl,InputKeyDownEnd:Ol,InputKeyDownPageUp:Pl,InputKeyDownPageDown:Al,InputKeyDownEnter:Dl,InputChange:Nl,InputBlur:Za,InputFocus:kl,MenuMouseLeave:Ig,ItemMouseMove:Rg,ItemClick:Ml,ToggleButtonClick:Og,FunctionToggleMenu:Pg,FunctionOpenMenu:Ag,FunctionCloseMenu:Dg,FunctionSetHighlightedIndex:Ng,FunctionSelectItem:jl,FunctionSetInputValue:kg,FunctionReset:Mg,ControlledPropUpdatedSelectedItem:Ll});function jI(e){var t=AI(e),n=t.selectedItem,r=t.inputValue;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),ae({},t,{inputValue:r})}var LI={items:X.array.isRequired,itemToString:X.func,selectedItemChanged:X.func,getA11yStatusMessage:X.func,getA11ySelectionMessage:X.func,highlightedIndex:X.number,defaultHighlightedIndex:X.number,initialHighlightedIndex:X.number,isOpen:X.bool,defaultIsOpen:X.bool,initialIsOpen:X.bool,selectedItem:X.any,initialSelectedItem:X.any,defaultSelectedItem:X.any,inputValue:X.string,defaultInputValue:X.string,initialInputValue:X.string,id:X.string,labelId:X.string,menuId:X.string,getItemId:X.func,inputId:X.string,toggleButtonId:X.string,stateReducer:X.func,onSelectedItemChange:X.func,onHighlightedIndexChange:X.func,onStateChange:X.func,onIsOpenChange:X.func,onInputValueChange:X.func,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})})};function FI(e,t,n){var r=l.useRef(),o=Tg(e,t,n),i=o[0],a=o[1];return l.useEffect(function(){Xa(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&a({type:Ll,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)},[i.selectedItem,n.selectedItem]),[_i(i,n),a]}var Lg=dn;process.env.NODE_ENV!=="production"&&(Lg=function(t,n){X.checkPropTypes(LI,t,"prop",n.name)});var VI=ae({},ri,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:sg});function BI(e,t){var n,r=t.type,o=t.props,i=t.altKey,a;switch(r){case Ml:a={isOpen:Pn(o,"isOpen"),highlightedIndex:Pn(o,"highlightedIndex"),selectedItem:o.items[t.index],inputValue:o.itemToString(o.items[t.index])};break;case $l:e.isOpen?a={highlightedIndex:Or(1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:i&&e.selectedItem==null?-1:oi(o,e,1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case Tl:e.isOpen?i?a=tp(o,e.highlightedIndex):a={highlightedIndex:Or(-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:oi(o,e,-1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case Dl:a=tp(o,e.highlightedIndex);break;case Il:a=ae({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Pl:a={highlightedIndex:Or(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Al:a={highlightedIndex:Or(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Rl:a={highlightedIndex:Fr(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case Ol:a={highlightedIndex:Fr(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)};break;case Za:a=ae({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((n=o.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:o.items[e.highlightedIndex],inputValue:o.itemToString(o.items[e.highlightedIndex])});break;case Nl:a={isOpen:!0,highlightedIndex:Pn(o,"highlightedIndex"),inputValue:t.inputValue};break;case kl:a={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case jl:a={selectedItem:t.selectedItem,inputValue:o.itemToString(t.selectedItem)};break;case Ll:a={inputValue:t.inputValue};break;default:return kI(e,t,jg)}return ae({},e,a)}var HI=["onMouseLeave","refKey","ref"],WI=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],zI=["onClick","onPress","refKey","ref"],UI=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];no.stateChangeTypes=jg;function no(e){e===void 0&&(e={}),Lg(e,no);var t=ae({},VI,e),n=t.initialIsOpen,r=t.defaultIsOpen,o=t.items,i=t.scrollIntoView,a=t.environment,s=t.getA11yStatusMessage,c=t.getA11ySelectionMessage,u=t.itemToString,d=jI(t),f=FI(BI,d,t),m=f[0],h=f[1],b=m.isOpen,y=m.highlightedIndex,T=m.selectedItem,S=m.inputValue,v=l.useRef(null),w=l.useRef({}),C=l.useRef(null),I=l.useRef(null),D=l.useRef(!0),P=RI(t),F=l.useRef(),k=_l({state:m,props:t}),H=l.useCallback(function(W){return w.current[P.getItemId(W)]},[P]);ep(s,[b,y,S,o],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m)),ep(c,[T],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m));var R=NI({menuElement:v.current,highlightedIndex:y,isOpen:b,itemRefs:w,scrollIntoView:i,getItemNodeFromIndex:H});Cl({isInitialMount:D.current,props:t,state:m}),l.useEffect(function(){var W=n||r||b;W&&C.current&&C.current.focus()},[]),l.useEffect(function(){D.current||(F.current=o.length)});var E=DI(b,[C,v,I],a,function(){h({type:Za,selectItem:!1})}),p=Sl("getInputProps","getMenuProps");l.useEffect(function(){return D.current=!1,function(){D.current=!0}},[]),l.useEffect(function(){var W;if(!b)w.current={};else if(((W=a.document)==null?void 0:W.activeElement)!==C.current){var Y;C==null||(Y=C.current)==null||Y.focus()}},[b,a]);var $=l.useMemo(function(){return{ArrowDown:function(Y){Y.preventDefault(),h({type:$l,altKey:Y.altKey,getItemNodeFromIndex:H})},ArrowUp:function(Y){Y.preventDefault(),h({type:Tl,altKey:Y.altKey,getItemNodeFromIndex:H})},Home:function(Y){k.current.state.isOpen&&(Y.preventDefault(),h({type:Rl,getItemNodeFromIndex:H}))},End:function(Y){k.current.state.isOpen&&(Y.preventDefault(),h({type:Ol,getItemNodeFromIndex:H}))},Escape:function(Y){var te=k.current.state;(te.isOpen||te.inputValue||te.selectedItem||te.highlightedIndex>-1)&&(Y.preventDefault(),h({type:Il}))},Enter:function(Y){var te=k.current.state;!te.isOpen||Y.which===229||(Y.preventDefault(),h({type:Dl,getItemNodeFromIndex:H}))},PageUp:function(Y){k.current.state.isOpen&&(Y.preventDefault(),h({type:Pl,getItemNodeFromIndex:H}))},PageDown:function(Y){k.current.state.isOpen&&(Y.preventDefault(),h({type:Al,getItemNodeFromIndex:H}))}}},[h,k,H]),A=l.useCallback(function(W){return ae({id:P.labelId,htmlFor:P.inputId},W)},[P]),M=l.useCallback(function(W,Y){var te,J=W===void 0?{}:W,ie=J.onMouseLeave,ee=J.refKey,we=ee===void 0?"ref":ee,Te=J.ref,Oe=an(J,HI),Ne=Y===void 0?{}:Y,Re=Ne.suppressRefError,We=Re===void 0?!1:Re;return p("getMenuProps",We,we,v),ae((te={},te[we]=hr(Te,function(De){v.current=De}),te.id=P.menuId,te.role="listbox",te["aria-labelledby"]=Oe&&Oe["aria-label"]?void 0:""+P.labelId,te.onMouseLeave=It(ie,function(){h({type:Ig})}),te),Oe)},[h,p,P]),z=l.useCallback(function(W){var Y,te,J=W===void 0?{}:W,ie=J.item,ee=J.index,we=J.refKey,Te=we===void 0?"ref":we,Oe=J.ref,Ne=J.onMouseMove,Re=J.onMouseDown,We=J.onClick;J.onPress;var De=J.disabled,ot=an(J,WI),ze=k.current,xt=ze.props,Xe=ze.state,Pt=$g(ie,ee,xt.items,"Pass either item or index to getItemProps!"),xe=Pt[1],ct="onClick",je=We,Zt=function(){xe!==Xe.highlightedIndex&&(R.current=!1,h({type:Rg,index:xe,disabled:De}))},Ct=function(){h({type:Ml,index:xe})},tt=function(mt){return mt.preventDefault()};return ae((Y={},Y[Te]=hr(Oe,function(Fe){Fe&&(w.current[P.getItemId(xe)]=Fe)}),Y.disabled=De,Y.role="option",Y["aria-selected"]=""+(xe===Xe.highlightedIndex),Y.id=P.getItemId(xe),Y),!De&&(te={},te[ct]=It(je,Ct),te),{onMouseMove:It(Ne,Zt),onMouseDown:It(Re,tt)},ot)},[h,k,R,P]),U=l.useCallback(function(W){var Y,te=W===void 0?{}:W,J=te.onClick;te.onPress;var ie=te.refKey,ee=ie===void 0?"ref":ie,we=te.ref,Te=an(te,zI),Oe=k.current.state,Ne=function(){h({type:Og})};return ae((Y={},Y[ee]=hr(we,function(Re){I.current=Re}),Y["aria-controls"]=P.menuId,Y["aria-expanded"]=Oe.isOpen,Y.id=P.toggleButtonId,Y.tabIndex=-1,Y),!Te.disabled&&ae({},{onClick:It(J,Ne)}),Te)},[h,k,P]),re=l.useCallback(function(W,Y){var te,J=W===void 0?{}:W,ie=J.onKeyDown,ee=J.onChange,we=J.onInput,Te=J.onFocus,Oe=J.onBlur;J.onChangeText;var Ne=J.refKey,Re=Ne===void 0?"ref":Ne,We=J.ref,De=an(J,UI),ot=Y===void 0?{}:Y,ze=ot.suppressRefError,xt=ze===void 0?!1:ze;p("getInputProps",xt,Re,C);var Xe=k.current.state,Pt=function(mt){var nn=Si(mt);nn&&$[nn]&&$[nn](mt)},xe=function(mt){h({type:Nl,inputValue:mt.target.value})},ct=function(mt){if(Xe.isOpen&&!E.current.isMouseDown){var nn=mt.relatedTarget===null&&a.document.activeElement!==a.document.body;h({type:Za,selectItem:!nn})}},je=function(){Xe.isOpen||h({type:kl})},Zt="onChange",Ct={};if(!De.disabled){var tt;Ct=(tt={},tt[Zt]=It(ee,we,xe),tt.onKeyDown=It(ie,Pt),tt.onBlur=It(Oe,ct),tt.onFocus=It(Te,je),tt)}return ae((te={},te[Re]=hr(We,function(Fe){C.current=Fe}),te["aria-activedescendant"]=Xe.isOpen&&Xe.highlightedIndex>-1?P.getItemId(Xe.highlightedIndex):"",te["aria-autocomplete"]="list",te["aria-controls"]=P.menuId,te["aria-expanded"]=Xe.isOpen,te["aria-labelledby"]=De&&De["aria-label"]?void 0:""+P.labelId,te.autoComplete="off",te.id=P.inputId,te.role="combobox",te.value=Xe.inputValue,te),Ct,De)},[p,k,P,$,h,E,a]),B=l.useCallback(function(){h({type:Pg})},[h]),L=l.useCallback(function(){h({type:Dg})},[h]),oe=l.useCallback(function(){h({type:Ag})},[h]),G=l.useCallback(function(W){h({type:Ng,highlightedIndex:W})},[h]),K=l.useCallback(function(W){h({type:jl,selectedItem:W})},[h]),Z=l.useCallback(function(W){h({type:kg,inputValue:W})},[h]),ce=l.useCallback(function(){h({type:Mg})},[h]);return{getItemProps:z,getLabelProps:A,getMenuProps:M,getInputProps:re,getToggleButtonProps:U,toggleMenu:B,openMenu:oe,closeMenu:L,setHighlightedIndex:G,setInputValue:Z,selectItem:K,reset:ce,highlightedIndex:y,isOpen:b,selectedItem:T,inputValue:S}}var Fg={activeIndex:-1,selectedItems:[]};function np(e,t){return zo(e,t,Fg)}function rp(e,t){return Pn(e,t,Fg)}function YI(e){var t=np(e,"activeIndex"),n=np(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function op(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function KI(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}var qI={selectedItems:X.array,initialSelectedItems:X.array,defaultSelectedItems:X.array,itemToString:X.func,getA11yRemovalMessage:X.func,stateReducer:X.func,activeIndex:X.number,initialActiveIndex:X.number,defaultActiveIndex:X.number,onActiveIndexChange:X.func,onSelectedItemsChange:X.func,keyNavigationNext:X.string,keyNavigationPrevious:X.string,environment:X.shape({addEventListener:X.func,removeEventListener:X.func,document:X.shape({getElementById:X.func,activeElement:X.any,body:X.any})})},XI={itemToString:ri.itemToString,stateReducer:ri.stateReducer,environment:ri.environment,getA11yRemovalMessage:KI,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},Vg=dn;process.env.NODE_ENV!=="production"&&(Vg=function(t,n){X.checkPropTypes(qI,t,"prop",n.name)});var Fl=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,Vl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,Bl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,Hl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,Wl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,zl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,Ul=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,Yl=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,Kl=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,ql=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,Xl=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,Gl=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,Zl=process.env.NODE_ENV!=="production"?"__function_reset__":12,GI=Object.freeze({__proto__:null,SelectedItemClick:Fl,SelectedItemKeyDownDelete:Vl,SelectedItemKeyDownBackspace:Bl,SelectedItemKeyDownNavigationNext:Hl,SelectedItemKeyDownNavigationPrevious:Wl,DropdownKeyDownNavigationPrevious:zl,DropdownKeyDownBackspace:Ul,DropdownClick:Yl,FunctionAddSelectedItem:Kl,FunctionRemoveSelectedItem:ql,FunctionSetSelectedItems:Xl,FunctionSetActiveIndex:Gl,FunctionReset:Zl});function ZI(e,t){var n=t.type,r=t.index,o=t.props,i=t.selectedItem,a=e.activeIndex,s=e.selectedItems,c;switch(n){case Fl:c={activeIndex:r};break;case Wl:c={activeIndex:a-1<0?0:a-1};break;case Hl:c={activeIndex:a+1>=s.length?-1:a+1};break;case Bl:case Vl:{if(a<0)break;var u=a;s.length===1?u=-1:a===s.length-1&&(u=s.length-2),c=ae({selectedItems:[].concat(s.slice(0,a),s.slice(a+1))},{activeIndex:u});break}case zl:c={activeIndex:s.length-1};break;case Ul:c={selectedItems:s.slice(0,s.length-1)};break;case Kl:c={selectedItems:[].concat(s,[i])};break;case Yl:c={activeIndex:-1};break;case ql:{var d=a,f=s.indexOf(i);if(f<0)break;s.length===1?d=-1:f===s.length-1&&(d=s.length-2),c={selectedItems:[].concat(s.slice(0,f),s.slice(f+1)),activeIndex:d};break}case Xl:{var m=t.selectedItems;c={selectedItems:m};break}case Gl:{var h=t.activeIndex;c={activeIndex:h};break}case Zl:c={activeIndex:rp(o,"activeIndex"),selectedItems:rp(o,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,c)}var QI=["refKey","ref","onClick","onKeyDown","selectedItem","index"],JI=["refKey","ref","onKeyDown","onClick","preventKeyAction"];Ql.stateChangeTypes=GI;function Ql(e){e===void 0&&(e={}),Vg(e,Ql);var t=ae({},XI,e),n=t.getA11yRemovalMessage,r=t.itemToString,o=t.environment,i=t.keyNavigationNext,a=t.keyNavigationPrevious,s=PI(ZI,YI(t),t),c=s[0],u=s[1],d=c.activeIndex,f=c.selectedItems,m=l.useRef(!0),h=l.useRef(null),b=l.useRef(f),y=l.useRef();y.current=[];var T=_l({state:c,props:t});l.useEffect(function(){if(!m.current){if(f.length<b.current.length){var R=b.current.find(function(E){return f.indexOf(E)<0});El(n({itemToString:r,resultCount:f.length,removedSelectedItem:R,activeIndex:d,activeSelectedItem:f[d]}),o.document)}b.current=f}},[f.length]),l.useEffect(function(){m.current||(d===-1&&h.current?h.current.focus():y.current[d]&&y.current[d].focus())},[d]),Cl({isInitialMount:m.current,props:t,state:c});var S=Sl("getDropdownProps");l.useEffect(function(){return m.current=!1,function(){m.current=!0}},[]);var v=l.useMemo(function(){var R;return R={},R[a]=function(){u({type:Wl})},R[i]=function(){u({type:Hl})},R.Delete=function(){u({type:Vl})},R.Backspace=function(){u({type:Bl})},R},[u,i,a]),w=l.useMemo(function(){var R;return R={},R[a]=function(E){op(E)&&u({type:zl})},R.Backspace=function(p){op(p)&&u({type:Ul})},R},[u,a]),C=l.useCallback(function(R){var E,p=R===void 0?{}:R,$=p.refKey,A=$===void 0?"ref":$,M=p.ref,z=p.onClick,U=p.onKeyDown,re=p.selectedItem,B=p.index,L=an(p,QI),oe=T.current.state,G=$g(re,B,oe.selectedItems,"Pass either item or index to getSelectedItemProps!"),K=G[1],Z=K>-1&&K===oe.activeIndex,ce=function(){u({type:Fl,index:K})},W=function(te){var J=Si(te);J&&v[J]&&v[J](te)};return ae((E={},E[A]=hr(M,function(Y){Y&&y.current.push(Y)}),E.tabIndex=Z?0:-1,E.onClick=It(z,ce),E.onKeyDown=It(U,W),E),L)},[u,T,v]),I=l.useCallback(function(R,E){var p,$=R===void 0?{}:R,A=$.refKey,M=A===void 0?"ref":A,z=$.ref,U=$.onKeyDown,re=$.onClick,B=$.preventKeyAction,L=B===void 0?!1:B,oe=an($,JI),G=E===void 0?{}:E,K=G.suppressRefError,Z=K===void 0?!1:K;S("getDropdownProps",Z,M,h);var ce=function(te){var J=Si(te);J&&w[J]&&w[J](te)},W=function(){u({type:Yl})};return ae((p={},p[M]=hr(z,function(Y){Y&&(h.current=Y)}),p),!L&&{onKeyDown:It(U,ce),onClick:It(re,W)},oe)},[u,w,S]),D=l.useCallback(function(R){u({type:Kl,selectedItem:R})},[u]),P=l.useCallback(function(R){u({type:ql,selectedItem:R})},[u]),F=l.useCallback(function(R){u({type:Xl,selectedItems:R})},[u]),k=l.useCallback(function(R){u({type:Gl,activeIndex:R})},[u]),H=l.useCallback(function(){u({type:Zl})},[u]);return{getSelectedItemProps:C,getDropdownProps:I,addSelectedItem:D,removeSelectedItem:P,setSelectedItems:F,setActiveIndex:k,reset:H,selectedItems:f,activeIndex:d}}var eR="jbnkvn0",ip=wt({defaultClassName:"jbnkvn7",variantClassNames:{highlighted:{true:"jbnkvn8"},selected:{true:"jbnkvn9"},multiSelected:{true:"jbnkvna"},isDisabled:{true:"jbnkvnb"}},defaultVariants:{},compoundVariants:[]}),ap="jbnkvn6",tR="jbnkvn1",nR=wt({defaultClassName:"jbnkvn2",variantClassNames:{isMobile:{true:"jbnkvn3",false:"jbnkvn4"}},defaultVariants:{isMobile:!0},compoundVariants:[]}),rR="jbnkvn5",sp="jbnkvnc";const Bg=l.createContext(void 0),oR=({children:e,contextValue:t})=>j.jsx(Bg.Provider,{value:t,children:e}),Jl=()=>{const e=l.useContext(Bg);if(e===void 0)throw new Error("useSelectProvider must be used within a SelectProvider");return e},Hg=({children:e,renderer:t})=>{const{getMenuProps:n}=Jl();return t?t({children:e,defaultClassName:ap,innerProps:n()}):j.jsx("div",{className:ap,...n(),children:e})};Hg.defaultProps={renderer:void 0};const Wg=({renderer:e,item:t,itemIndex:n})=>{const{isMulti:r,selectedItem:o,multipleSelectedItems:i,highlightedIndex:a,getItemProps:s,onClickItem:c}=Jl(),u=a===n,d=o===t&&!r,f=r&&i.includes(t)||!1,m=s({item:t,index:n,disabled:t.isDisabled,onClick:c});return e?e({defaultClassName:ip({highlighted:a===n,selected:o===t&&!r,multiSelected:i.includes(t),isDisabled:t.isDisabled}),innerProps:m,isMulti:r,item:t,itemIndex:n,isHighlighted:u,isSelected:d,isChecked:f}):j.jsxs("div",{className:ip({highlighted:u,selected:d,multiSelected:f,isDisabled:t.isDisabled}),...m,children:[j.jsx("span",{children:t.label}),r&&i.includes(t)&&j.jsx(wu,{size:16,color:Rt.theme.colors.greenAccent1,"data-test-id":""})]},t.value)};Wg.defaultProps={renderer:void 0};const zg=({renderer:e,...t})=>{const{formState:n,isOpen:r,getToggleButtonProps:o,isDisabled:i}=Jl();if(e)return e({innerProps:o(),defaultClassName:sp,isOpen:r});const a=n==="disabled"?Rt.theme.colors.black:Rt.theme.colors.grey1;return j.jsx("div",{className:sp,...o({disabled:i}),"data-disabled":i,children:r?j.jsx(Eu,{color:a,...t}):j.jsx(si,{color:a,...t})})};zg.defaultProps={renderer:void 0,"data-test-id":"CT_Component_IconChev"};const co=l.forwardRef(({options:e,value:t,label:n,onChange:r,isLoading:o,components:i,required:a,containerStyles:s,isMulti:c,isReadOnly:u,isMobile:d,onClickItem:f,...m},h)=>{const{addonLeft:b,addonRight:y,helperTextLeft:T,helperTextRight:S,isError:v,errorMessage:w,isDisabled:C,isValid:I}=m,[D,P]=l.useState(e),F=Pu({isError:v,isDisabled:C,isValid:I}),k=l.useRef(null),{removeSelectedItem:H,selectedItems:R,addSelectedItem:E,getDropdownProps:p}=Ql({initialSelectedItems:c&&t?t:[],onSelectedItemsChange(W){c&&r(W.selectedItems)}}),$=l.useMemo(()=>R.length,[R]),A=l.useCallback(W=>{let Y=W;(c&&!d||u)&&(Y="");const te=new RegExp(Y.toLowerCase());return e.filter(J=>te.test(J.label.toLowerCase()))},[e]),{isOpen:M,getToggleButtonProps:z,getLabelProps:U,getMenuProps:re,getInputProps:B,highlightedIndex:L,getItemProps:oe,selectedItem:G,openMenu:K,closeMenu:Z}=no({items:D,initialSelectedItem:c?void 0:t,onInputValueChange:({inputValue:W})=>{P(A(W||""))},itemToString(W){return W?W.label:""},onSelectedItemChange(W){var Y;c||(r(W.selectedItem),u&&((Y=k.current)==null||Y.blur()),Z())},stateReducer:(W,Y)=>{const{changes:te,type:J}=Y,ie=D.find((ee,we)=>we===W.highlightedIndex);switch(J){case no.stateChangeTypes.InputKeyDownEnter:case no.stateChangeTypes.ItemClick:if(c){let ee=$;return R.includes(ie)?(ee-=1,H(ie)):(ee+=1,E(ie)),{...te,isOpen:!0,highlightedIndex:W.highlightedIndex,inputValue:!d&&ee>0?`${ee} items selected`:""}}return{...te,isOpen:!1,highlightedIndex:W.highlightedIndex,inputValue:te.inputValue};case no.stateChangeTypes.InputBlur:{let ee=te.inputValue;return c&&!d&&($>0?ee=`${$} items selected`:ee=""),{...te,inputValue:ee}}default:return te}}});l.useImperativeHandle(h,()=>k.current);const ce={isOpen:M,formState:F,selectedItem:G,multipleSelectedItems:R,isMulti:c,isDisabled:C,totalSelected:$,highlightedIndex:L,getMenuProps:re,getItemProps:oe,getToggleButtonProps:z,onClickItem:f};return j.jsx(oR,{contextValue:ce,children:j.jsxs(et,{position:"relative",w:"$full",children:[j.jsxs(bo,{addonLeft:b,addonRight:y,helperTextLeft:T,helperTextRight:S,isError:v,errorMessage:w,isDisabled:C,isValid:I,inputAreaClassName:eR,children:[j.jsxs("div",{className:tR,children:[j.jsx("input",{"data-test-id":m["data-test-id"],...B(p({preventKeyAction:M,ref:k,placeholder:n,readOnly:u,disabled:C,className:nR({isMobile:d}),onClick:()=>{M||K()}}))}),d&&c&&j.jsx("div",{className:rR,children:$>0?`${$} items selected`:""}),d&&j.jsx(Ni,{isSelect:!0,isError:v,isDisabled:C,required:a,...U(),children:n})]}),j.jsx(zg,{renderer:i==null?void 0:i.Toggle})]}),M&&j.jsx(Hg,{renderer:i==null?void 0:i.List,children:D.map((W,Y)=>j.jsx(Wg,{renderer:i==null?void 0:i.ListItem,itemIndex:Y,item:W}))})]})})});co.displayName="Select";co.defaultProps={required:!1,isLoading:!1,isMulti:void 0,isReadOnly:!1,isMobile:!1,containerStyles:void 0,components:void 0,onClickItem:void 0,"data-test-id":void 0};const Ug=e=>{const t=`0${e}`;return t.substring(t.length-2,t.length)},iR=Array.from({length:31},(e,t)=>({label:Ug(t+1),value:String(t+1),isDisabled:!1})),Qa=["January","February","March","April","May","June","July","August","September","October","November","December"],aR=Qa.map(e=>({label:e,value:e,isDisabled:!1})),sR=e=>{const t=e?new Date(e).getFullYear():new Date().getFullYear();return Array.from({length:101},(n,r)=>({label:String(t-r),value:String(t-r),isDisabled:!1}))},mc=(e,t)=>{if(t){const n=new Date(t);if(e==="date")return{label:Ug(n.getDate()),value:n.getDate().toString()};if(e==="month")return{label:Qa[n.getMonth()],value:Qa[n.getMonth()]};if(e==="year"){const r=n.getFullYear().toString();return{label:r,value:r}}}},ii=e=>Qa.findIndex(t=>t===e),cp=(e,t)=>new Date(e,ii(t)+1,0).getDate(),cR=({date:e,month:t,year:n,maxDate:r})=>{const o=r?new Date(r):new Date;return o.setHours(0,0,0,0),e&&t&&n&&e<=cp(n,t)&&o>new Date(n,ii(t),e,0,0,0,0)?!0:e&&t&&!n?ii(t)===1?e<=29:e<=cp(0,t):!e&&t&&n?n===o.getFullYear()?ii(t)<=o.getMonth():!0:e&&!t&&n?o.getMonth()===0&&n===o.getFullYear()?e<o.getDate():!0:!1},Yg=({title:e,maxDate:t,isMobile:n,defaultDate:r,onSaveDate:o,onClose:i,isOpen:a,buttonText:s,errorMessage:c,...u})=>{const[d,f]=l.useState(),[m,h]=l.useState(),[b,y]=l.useState(),T=l.useRef(null),S=()=>{f(void 0),h(void 0),y(void 0)},v=l.useMemo(()=>{if(a){if(d)return d;if(r)return mc("date",r)}},[r,d,a]),w=l.useMemo(()=>{if(a){if(m)return m;if(r)return mc("month",r)}},[r,m,a]),C=l.useMemo(()=>{if(a){if(b)return b;if(r)return mc("year",r)}},[r,b,a]),I=l.useMemo(()=>v||w||C?cR({date:v?Number(v==null?void 0:v.value):0,month:w?w.value:"",year:C?Number(C.value):0,maxDate:t}):!1,[v,w,C,t]),D=v&&w&&!C&&!I,P=v&&!w&&C&&!I,F=!v&&w&&C&&!I,k=v&&w&&C&&!I,H=()=>j.jsx(et,{as:"button",ref:T,"data-test-id":"",position:"absolute",width:"$1",height:"$1",bottom:"$0",right:"$0",backgroundColor:"$white",border:"$none",children:j.jsx(et,{display:"none"})}),R=()=>{T.current&&T.current.focus()};return j.jsx(Ai,{...u,isOpen:a,onClose:()=>{i==null||i(),S()},children:j.jsxs(Pr,{gap:"$24",children:[j.jsxs(Pr,{gap:"$8",children:[j.jsx(et,{height:"$40",children:j.jsx(Di,{children:e})}),j.jsxs(Pr,{children:[j.jsxs(Yt,{gap:"$12",px:"$2",mb:"$4",mt:"$8",children:[j.jsx(co,{isReadOnly:!0,name:"date",label:"Date",value:v,isMobile:n,options:iR,onClickItem:R,onChange:f,isError:D||P||k,"data-test-id":"CT_Component_SelectPicker_dateField"}),j.jsx(co,{isReadOnly:!0,name:"month",label:"Month",value:w,isMobile:n,options:aR,onClickItem:R,onChange:h,isError:F||D||k,"data-test-id":"CT_Component_SelectPicker_monthField"}),j.jsx(co,{isReadOnly:!0,name:"year",label:"Year",value:C,isMobile:n,options:sR(t),onClickItem:R,onChange:y,isError:F||P||k,"data-test-id":"CT_Component_SelectPicker_yearField"})]}),(k||F||P||D)&&j.jsx(sn,{px:"$2",color:"$redAccent1",fontSize:"$caption",lineHeight:"$16",fontWeight:"$medium",children:c})]})]}),H(),j.jsx(vo,{onClick:()=>{o(new Date(Number(C==null?void 0:C.value),ii(w==null?void 0:w.value),Number(v==null?void 0:v.value))),S()},isDisabled:!C||!w||!v||!I,"data-test-id":"CT_Component_SelectPicker_buttonSave",type:"button",children:s})]})})};Yg.defaultProps={title:"Date of birth",isMobile:!1,defaultDate:void 0,maxDate:void 0,buttonText:"Confirm",errorMessage:"Invalid date of birth"};const gc="rovingFocusGroup.onEntryFocus",uR={bubbles:!1,cancelable:!0},ed="RovingFocusGroup",[cu,Kg,lR]=Ja(ed),[dR,qg]=mn(ed,[lR]),[fR,hR]=dR(ed),pR=l.forwardRef((e,t)=>l.createElement(cu.Provider,{scope:e.__scopeRovingFocusGroup},l.createElement(cu.Slot,{scope:e.__scopeRovingFocusGroup},l.createElement(vR,ae({},e,{ref:t}))))),vR=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,...d}=e,f=l.useRef(null),m=st(t,f),h=es(i),[b=null,y]=Sn({prop:a,defaultProp:s,onChange:c}),[T,S]=l.useState(!1),v=cn(u),w=Kg(n),C=l.useRef(!1),[I,D]=l.useState(0);return l.useEffect(()=>{const P=f.current;if(P)return P.addEventListener(gc,v),()=>P.removeEventListener(gc,v)},[v]),l.createElement(fR,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:b,onItemFocus:l.useCallback(P=>y(P),[y]),onItemShiftTab:l.useCallback(()=>S(!0),[]),onFocusableItemAdd:l.useCallback(()=>D(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>D(P=>P-1),[])},l.createElement(Ke.div,ae({tabIndex:T||I===0?-1:0,"data-orientation":r},d,{ref:m,style:{outline:"none",...e.style},onMouseDown:Ae(e.onMouseDown,()=>{C.current=!0}),onFocus:Ae(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!T){const k=new CustomEvent(gc,uR);if(P.currentTarget.dispatchEvent(k),!k.defaultPrevented){const H=w().filter(A=>A.focusable),R=H.find(A=>A.active),E=H.find(A=>A.id===b),$=[R,E,...H].filter(Boolean).map(A=>A.ref.current);Xg($)}}C.current=!1}),onBlur:Ae(e.onBlur,()=>S(!1))})))}),mR="RovingFocusGroupItem",gR=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Xn(),c=i||s,u=hR(mR,n),d=u.currentTabStopId===c,f=Kg(n),{onFocusableItemAdd:m,onFocusableItemRemove:h}=u;return l.useEffect(()=>{if(r)return m(),()=>h()},[r,m,h]),l.createElement(cu.ItemSlot,{scope:n,id:c,focusable:r,active:o},l.createElement(Ke.span,ae({tabIndex:d?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:Ae(e.onMouseDown,b=>{r?u.onItemFocus(c):b.preventDefault()}),onFocus:Ae(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Ae(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=wR(b,u.orientation,u.dir);if(y!==void 0){b.preventDefault();let S=f().filter(v=>v.focusable).map(v=>v.ref.current);if(y==="last")S.reverse();else if(y==="prev"||y==="next"){y==="prev"&&S.reverse();const v=S.indexOf(b.currentTarget);S=u.loop?ER(S,v+1):S.slice(v+1)}setTimeout(()=>Xg(S))}})})))}),yR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function bR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function wR(e,t,n){const r=bR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return yR[r]}function Xg(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function ER(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const xR=pR,_R=gR,Gg="Radio",[SR,Zg]=mn(Gg),[CR,$R]=SR(Gg),TR=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:c,...u}=e,[d,f]=l.useState(null),m=st(t,y=>f(y)),h=l.useRef(!1),b=d?!!d.closest("form"):!0;return l.createElement(CR,{scope:n,checked:o,disabled:a},l.createElement(Ke.button,ae({type:"button",role:"radio","aria-checked":o,"data-state":Qg(o),"data-disabled":a?"":void 0,disabled:a,value:s},u,{ref:m,onClick:Ae(e.onClick,y=>{o||c==null||c(),b&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})),b&&l.createElement(OR,{control:d,bubbles:!h.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))}),IR="RadioIndicator",RR=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=$R(IR,n);return l.createElement(yr,{present:r||i.checked},l.createElement(Ke.span,ae({"data-state":Qg(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))}),OR=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Qg(e){return e?"checked":"unchecked"}const PR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Jg="RadioGroup",[AR,TP]=mn(Jg,[qg,Zg]),ey=qg(),ty=Zg(),[DR,NR]=AR(Jg),kR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:c,dir:u,loop:d=!0,onValueChange:f,...m}=e,h=ey(n),b=es(u),[y,T]=Sn({prop:i,defaultProp:o,onChange:f});return l.createElement(DR,{scope:n,name:r,required:a,disabled:s,value:y,onValueChange:T},l.createElement(xR,ae({asChild:!0},h,{orientation:c,dir:b,loop:d}),l.createElement(Ke.div,ae({role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":s?"":void 0,dir:b},m,{ref:t}))))}),MR="RadioGroupItem",jR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=NR(MR,n),a=i.disabled||r,s=ey(n),c=ty(n),u=l.useRef(null),d=st(t,u),f=i.value===o.value,m=l.useRef(!1);return l.useEffect(()=>{const h=y=>{PR.includes(y.key)&&(m.current=!0)},b=()=>m.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",b)}},[]),l.createElement(_R,ae({asChild:!0},s,{focusable:!a,active:f}),l.createElement(TR,ae({disabled:a,required:i.required,checked:f},c,o,{name:i.name,ref:d,onCheck:()=>i.onValueChange(o.value),onKeyDown:Ae(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Ae(o.onFocus,()=>{var h;m.current&&((h=u.current)===null||h===void 0||h.click())})})))}),LR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=ty(n);return l.createElement(RR,ae({},o,r,{ref:t}))}),FR=kR,VR=jR,BR=LR;var HR=wt({defaultClassName:"d6umgr4",variantClassNames:{disabled:{true:"d6umgr5"}},defaultVariants:{},compoundVariants:[]}),WR="d6umgr1",zR=wt({defaultClassName:"d6umgr2",variantClassNames:{disabled:{true:"d6umgr3"}},defaultVariants:{},compoundVariants:[]}),UR="d6umgr0";const ny=({children:e,className:t,disabled:n,...r})=>{const o=l.useId();return j.jsxs(Yt,{alignItems:"center",children:[j.jsx(VR,{...r,disabled:n,className:Pe(t,UR),id:o,children:j.jsx(BR,{className:Pe("radio-indicator",zR({disabled:n}))})}),e&&j.jsx("label",{className:Pe("radio-label",HR({disabled:n})),htmlFor:o,children:e})]})};ny.defaultProps={children:void 0};const YR=({className:e,children:t,...n})=>j.jsx(FR,{...n,className:Pe(e,WR),children:t});var KR="_846x3h0",qR="_846x3h1",XR=wt({defaultClassName:"_846x3h2",variantClassNames:{size:{small:"_846x3h3",medium:"_846x3h4",large:"_846x3h5"},isHasIcon:{true:"_846x3h6"},isDisabled:{true:"_846x3h7"}},defaultVariants:{size:"small"},compoundVariants:[]});const td=l.forwardRef(({value:e,onClear:t,size:n,isDisabled:r,icon:o,...i},a)=>{const[s,c]=l.useState(!1),u=()=>c(!0),d=()=>c(!1),f=l.useMemo(()=>!!(o||e&&s),[s,e,o]);return j.jsxs(et,{position:"relative",children:[j.jsx(et,{className:Pe(KR),children:j.jsx(C0,{size:24})}),j.jsx("input",{className:Pe(XR({size:n,isHasIcon:f,isDisabled:r})),ref:a,value:e,"data-test-id":i["data-test-id"],onFocus:u,onBlur:d,disabled:r,...i}),f&&j.jsx(et,{className:Pe(qR),children:o&&(!s||s&&!e)?o:j.jsx(os,{"data-test-id":"icon-close-search",onMouseDown:t,cursor:"pointer",size:24})})]})});td.displayName="Search";td.defaultProps={icon:void 0,isDisabled:void 0,onClear:void 0,"data-test-id":void 0};const ry="Switch",[GR,IP]=mn(ry),[ZR,QR]=GR(ry),JR=l.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...d}=e,[f,m]=l.useState(null),h=st(t,v=>m(v)),b=l.useRef(!1),y=f?!!f.closest("form"):!0,[T=!1,S]=Sn({prop:o,defaultProp:i,onChange:u});return l.createElement(ZR,{scope:n,checked:T,disabled:s},l.createElement(Ke.button,ae({type:"button",role:"switch","aria-checked":T,"aria-required":a,"data-state":oy(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:h,onClick:Ae(e.onClick,v=>{S(w=>!w),y&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})})),y&&l.createElement(nO,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),eO="SwitchThumb",tO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=QR(eO,n);return l.createElement(Ke.span,ae({"data-state":oy(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),nO=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=ls(n),s=cs(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&f){const m=new Event("click",{bubbles:r});f.call(c,n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function oy(e){return e?"checked":"unchecked"}const rO=JR,oO=tO;var iO="b7c0j12",aO="b7c0j10",sO="b7c0j11";const iy=l.forwardRef((e,t)=>j.jsx(rO,{ref:t,className:aO,...e,children:j.jsx(oO,{className:sO,children:j.jsx(wu,{className:iO,size:16})})}));iy.displayName="Switch";const ay=({accessor:e,sortColumn:t,sortable:n,"data-test-id":r})=>{const o=t.by===e,i=t.order==="DESC",a=t.order==="ASC";return n?j.jsxs(Yt,{flexDirection:"column","data-test-id":r,children:[j.jsx(Eu,{size:10,color:o&&i?"white":"grey"}),j.jsx(si,{size:10,color:o&&a?"white":"grey"})]}):null};ay.defaultProps={sortable:!1,"data-test-id":""};var cO="_94c6vs1",uO="_94c6vs3",up="_94c6vs2",lO="_94c6vs0";const sy=({data:e,columns:t})=>{const[n,r]=l.useState([]),[o,i]=l.useState([]),[a,s]=l.useState({by:"",order:""}),c=f=>{const{accessor:m}=f,h=f.sortable,b=a.by===m;return h?b&&a.order==="ASC"?s({by:m,order:"DESC"}):b&&a.order==="DESC"?s({by:"",order:""}):s({by:m,order:"ASC"}):null},u=f=>typeof f=="object"?"":f,d=l.useCallback((f,m)=>{const h=[...f];return m.order==="ASC"?h.sort((y,T)=>String(T[m.by]).localeCompare(String(y[m.by]))):m.order==="DESC"?h.sort((y,T)=>String(y[m.by]).localeCompare(String(T[m.by]))):[...f]},[]);return l.useEffect(()=>{const f=t.map(b=>({...b,sortable:b.sortable??!1}));r(f);const h=d(e,{by:a.by,order:a.order}).map(b=>f.map(y=>({accessor:y.accessor,sortable:y.sortable??!1,value:u(b[y.accessor]),...y.cellRenderer&&{CellRenderer:y.cellRenderer({origin:b,value:b[y.accessor]})}})));i(h)},[t,e,d,a.by,a.order]),{headers:n,rows:o,handleHeaderClick:c,sortColumn:a}},cy=l.forwardRef(({columns:e,as:t,"data-test-id":n,data:r,onSort:o,...i},a)=>{const s=t||"table",{rows:c,headers:u,handleHeaderClick:d,sortColumn:f}=sy({data:r,columns:e});return l.useEffect(()=>{o&&o(f)},[o,f]),j.jsxs(s,{ref:a,as:t,className:lO,"data-test-id":n,...i,children:[j.jsx("thead",{children:j.jsx("tr",{className:uO,children:u.map(m=>j.jsx("th",{"data-test-id":"xmAUFfaxnRueeT_zBiyhc",className:up,onClick:()=>d(m),children:j.jsxs(Yt,{alignItems:"center",gap:"$8",justifyContent:"center",px:"$16",children:[j.jsx(et,{fontWeight:"$bold",color:"$whiteTypoHigh",fontSize:"$body2",lineHeight:"$20",children:m.label}),j.jsx(ay,{accessor:m.accessor,sortable:m.sortable,sortColumn:f,"data-test-id":`table-sort-${m.label}`})]})},m.accessor))})}),j.jsx("tbody",{children:c.map((m,h)=>j.jsx("tr",{className:cO,children:m.map((b,y)=>j.jsx(et,{as:"td","data-test-id":`table-${n}-row${h}-col${y}`,className:up,w:"33%",children:b.CellRenderer??b.value}))}))})]})});cy.defaultProps={as:"table","data-test-id":"base",onSort:void 0};var dO=wt({defaultClassName:"_5wiwut0",variantClassNames:{isActive:{true:"_5wiwut1"}},defaultVariants:{isActive:!1},compoundVariants:[]});var fO=wt({defaultClassName:"_1p5zdvr0",variantClassNames:{withShadow:{true:"_1p5zdvr1"},align:{left:"_1p5zdvr2",center:"_1p5zdvr3",right:"_1p5zdvr4"}},defaultVariants:{withShadow:!1,align:"left"},compoundVariants:[]});const nd=l.createContext({index:0,setIndex:()=>null}),rd=l.forwardRef(({as:e,children:t,withShadow:n,index:r,defaultIndex:o,align:i,onChange:a,...s},c)=>{const[u,d]=l.useState(o??0),f=l.useMemo(()=>l.Children.map(t,(b,y)=>l.cloneElement(b,{"data-index":y})),[t]);l.useEffect(()=>d(r??0),[r]);const m=l.useMemo(()=>({index:u,setIndex:y=>{d(y),a==null||a(y)}}),[u,a]),h=e||"ul";return j.jsx(h,{"data-test-id":s["data-test-id"],as:e,ref:c,className:Pe(fO({withShadow:n,align:i})),...s,children:j.jsx(nd.Provider,{value:m,children:f})})});rd.displayName="Tabs";rd.defaultProps={as:"ul",defaultIndex:0,index:0,align:"left",withShadow:!1,children:void 0,onChange:()=>null,"data-test-id":void 0};const od=l.forwardRef(({as:e,children:t,...n},r)=>{const{index:o,setIndex:i}=l.useContext(nd),a=l.useCallback(u=>{i==null||i(u)},[i]),s=n["data-index"]===o,c=e||"li";return j.jsx(c,{"data-test-id":n["data-test-id"],as:e,ref:r,onClick:()=>a(n["data-index"]||0),className:Pe(dO({isActive:s})),...n,children:j.jsx(sn,{as:"span",textStyle:"body2",children:t})})});od.displayName="TabItem";od.defaultProps={as:"li","data-index":void 0,"data-test-id":void 0};const uy="ToastProvider",[id,hO,pO]=Ja("Toast"),[ly,RP]=mn("Toast",[pO]),[vO,Os]=ly(uy),dy=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[s,c]=l.useState(null),[u,d]=l.useState(0),f=l.useRef(!1),m=l.useRef(!1);return l.createElement(id.Provider,{scope:t},l.createElement(vO,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:s,onViewportChange:c,onToastAdd:l.useCallback(()=>d(h=>h+1),[]),onToastRemove:l.useCallback(()=>d(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:m},a))};dy.propTypes={label(e){if(e.label&&typeof e.label=="string"&&!e.label.trim()){const t=`Invalid prop \`label\` supplied to \`${uy}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const mO="ToastViewport",gO=["F8"],uu="toast.viewportPause",lu="toast.viewportResume",yO=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=gO,label:o="Notifications ({hotkey})",...i}=e,a=Os(mO,n),s=hO(n),c=l.useRef(null),u=l.useRef(null),d=l.useRef(null),f=l.useRef(null),m=st(t,f,a.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;l.useEffect(()=>{const T=S=>{var v;r.every(C=>S[C]||S.code===C)&&((v=f.current)===null||v===void 0||v.focus())};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[r]),l.useEffect(()=>{const T=c.current,S=f.current;if(b&&T&&S){const v=()=>{if(!a.isClosePausedRef.current){const D=new CustomEvent(uu);S.dispatchEvent(D),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const D=new CustomEvent(lu);S.dispatchEvent(D),a.isClosePausedRef.current=!1}},C=D=>{!T.contains(D.relatedTarget)&&w()},I=()=>{T.contains(document.activeElement)||w()};return T.addEventListener("focusin",v),T.addEventListener("focusout",C),T.addEventListener("pointermove",v),T.addEventListener("pointerleave",I),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{T.removeEventListener("focusin",v),T.removeEventListener("focusout",C),T.removeEventListener("pointermove",v),T.removeEventListener("pointerleave",I),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[b,a.isClosePausedRef]);const y=l.useCallback(({tabbingDirection:T})=>{const v=s().map(w=>{const C=w.ref.current,I=[C,...DO(C)];return T==="forwards"?I:I.reverse()});return(T==="forwards"?v.reverse():v).flat()},[s]);return l.useEffect(()=>{const T=f.current;if(T){const S=v=>{const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const F=document.activeElement,k=v.shiftKey;if(v.target===T&&k){var I;(I=u.current)===null||I===void 0||I.focus();return}const E=y({tabbingDirection:k?"backwards":"forwards"}),p=E.findIndex($=>$===F);if(yc(E.slice(p+1)))v.preventDefault();else{var D,P;k?(D=u.current)===null||D===void 0||D.focus():(P=d.current)===null||P===void 0||P.focus()}}};return T.addEventListener("keydown",S),()=>T.removeEventListener("keydown",S)}},[s,y]),l.createElement(K0,{ref:c,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:b?void 0:"none"}},b&&l.createElement(lp,{ref:u,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"forwards"});yc(T)}}),l.createElement(id.Slot,{scope:n},l.createElement(Ke.ol,ae({tabIndex:-1},i,{ref:m}))),b&&l.createElement(lp,{ref:d,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"backwards"});yc(T)}}))}),bO="ToastFocusProxy",lp=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Os(bO,n);return l.createElement(ds,ae({"aria-hidden":!0,tabIndex:0},o,{ref:t,style:{position:"fixed"},onFocus:a=>{var s;const c=a.relatedTarget;!((s=i.viewport)!==null&&s!==void 0&&s.contains(c))&&r()}}))}),Ps="Toast",wO="toast.swipeStart",EO="toast.swipeMove",xO="toast.swipeCancel",_O="toast.swipeEnd",SO=l.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,c]=Sn({prop:r,defaultProp:o,onChange:i});return l.createElement(yr,{present:n||s},l.createElement(fy,ae({open:s},a,{ref:t,onClose:()=>c(!1),onPause:cn(e.onPause),onResume:cn(e.onResume),onSwipeStart:Ae(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ae(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:Ae(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Ae(e.onSwipeEnd,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})))}),[CO,$O]=ly(Ps,{onClose(){}}),fy=l.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:s,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:m,onSwipeEnd:h,...b}=e,y=Os(Ps,n),[T,S]=l.useState(null),v=st(t,$=>S($)),w=l.useRef(null),C=l.useRef(null),I=o||y.duration,D=l.useRef(0),P=l.useRef(I),F=l.useRef(0),{onToastAdd:k,onToastRemove:H}=y,R=cn(()=>{var $;(T==null?void 0:T.contains(document.activeElement))&&(($=y.viewport)===null||$===void 0||$.focus()),a()}),E=l.useCallback($=>{!$||$===1/0||(window.clearTimeout(F.current),D.current=new Date().getTime(),F.current=window.setTimeout(R,$))},[R]);l.useEffect(()=>{const $=y.viewport;if($){const A=()=>{E(P.current),u==null||u()},M=()=>{const z=new Date().getTime()-D.current;P.current=P.current-z,window.clearTimeout(F.current),c==null||c()};return $.addEventListener(uu,M),$.addEventListener(lu,A),()=>{$.removeEventListener(uu,M),$.removeEventListener(lu,A)}}},[y.viewport,I,c,u,E]),l.useEffect(()=>{i&&!y.isClosePausedRef.current&&E(I)},[i,I,y.isClosePausedRef,E]),l.useEffect(()=>(k(),()=>H()),[k,H]);const p=l.useMemo(()=>T?py(T):null,[T]);return y.viewport?l.createElement(l.Fragment,null,p&&l.createElement(TO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},p),l.createElement(CO,{scope:n,onClose:R},hn.createPortal(l.createElement(id.ItemSlot,{scope:n},l.createElement(Y0,{asChild:!0,onEscapeKeyDown:Ae(s,()=>{y.isFocusedToastEscapeKeyDownRef.current||R(),y.isFocusedToastEscapeKeyDownRef.current=!1})},l.createElement(Ke.li,ae({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},b,{ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Ae(e.onKeyDown,$=>{$.key==="Escape"&&(s==null||s($.nativeEvent),$.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:Ae(e.onPointerDown,$=>{$.button===0&&(w.current={x:$.clientX,y:$.clientY})}),onPointerMove:Ae(e.onPointerMove,$=>{if(!w.current)return;const A=$.clientX-w.current.x,M=$.clientY-w.current.y,z=!!C.current,U=["left","right"].includes(y.swipeDirection),re=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,B=U?re(0,A):0,L=U?0:re(0,M),oe=$.pointerType==="touch"?10:2,G={x:B,y:L},K={originalEvent:$,delta:G};z?(C.current=G,da(EO,f,K,{discrete:!1})):dp(G,y.swipeDirection,oe)?(C.current=G,da(wO,d,K,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(A)>oe||Math.abs(M)>oe)&&(w.current=null)}),onPointerUp:Ae(e.onPointerUp,$=>{const A=C.current,M=$.target;if(M.hasPointerCapture($.pointerId)&&M.releasePointerCapture($.pointerId),C.current=null,w.current=null,A){const z=$.currentTarget,U={originalEvent:$,delta:A};dp(A,y.swipeDirection,y.swipeThreshold)?da(_O,h,U,{discrete:!0}):da(xO,m,U,{discrete:!0}),z.addEventListener("click",re=>re.preventDefault(),{once:!0})}})})))),y.viewport))):null});fy.propTypes={type(e){if(e.type&&!["foreground","background"].includes(e.type)){const t=`Invalid prop \`type\` supplied to \`${Ps}\`. Expected \`foreground | background\`.`;return new Error(t)}return null}};const TO=e=>{const{__scopeToast:t,children:n,...r}=e,o=Os(Ps,t),[i,a]=l.useState(!1),[s,c]=l.useState(!1);return PO(()=>a(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:l.createElement(Qp,{asChild:!0},l.createElement(ds,r,i&&l.createElement(l.Fragment,null,o.label," ",n)))},IO="ToastAction",ad=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?l.createElement(hy,{altText:n,asChild:!0},l.createElement(OO,ae({},r,{ref:t}))):null});ad.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${IO}\``)}};const RO="ToastClose",OO=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=$O(RO,n);return l.createElement(hy,{asChild:!0},l.createElement(Ke.button,ae({type:"button"},r,{ref:t,onClick:Ae(e.onClick,o.onClose)})))}),hy=l.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return l.createElement(Ke.div,ae({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0},o,{ref:t}))});function py(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),AO(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...py(r))}}),t}function da(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?bp(o,i):o.dispatchEvent(i)}const dp=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function PO(e=()=>{}){const t=cn(e);Gt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function AO(e){return e.nodeType===e.ELEMENT_NODE}function DO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}const NO=dy,vy=yO,my=SO,kO=ad;var MO="_10z4js29",jO=wt({defaultClassName:"_10z4js25",variantClassNames:{color:{neutral:"_10z4js26",negative:"_10z4js27"}},defaultVariants:{color:"neutral"},compoundVariants:[]}),LO="_10z4js28",FO="_10z4js2a";const gy=NO,sd=l.forwardRef(({className:e,...t},n)=>j.jsx(vy,{ref:n,className:Pe(FO,e),...t}));sd.displayName=vy.displayName;const As=l.forwardRef(({className:e,color:t="neutral",...n},r)=>j.jsx(my,{ref:r,className:Pe(jO({color:t}),e),...n}));As.displayName=my.displayName;As.defaultProps={viewPort:void 0,actionClassName:void 0};const cd=l.forwardRef(({className:e,...t},n)=>j.jsx(ad,{ref:n,className:Pe(e),...t}));cd.displayName=kO.displayName;const VO=1,BO=1e6,qn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let bc=0;function HO(){return bc=(bc+1)%Number.MAX_VALUE,bc.toString()}const wc=new Map,fp=e=>{if(wc.has(e))return;const t=setTimeout(()=>{wc.delete(e),ai({type:qn.REMOVE_TOAST,toastId:e})},BO);wc.set(e,t)};function yy(e,t){switch(t.type){case qn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,VO)};case qn.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case qn.DISMISS_TOAST:{const{toastId:n}=t;return n?fp(n):e.toasts.forEach(r=>{fp(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case qn.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)};default:return e}}const Ca=[];let $a={toasts:[]};function ai(e){$a=yy($a,e),Ca.forEach(t=>{t($a)})}function by({...e}){const t=HO(),n=o=>ai({type:qn.UPDATE_TOAST,toast:{...o,id:t}}),r=()=>ai({type:qn.DISMISS_TOAST,toastId:t});return ai({type:qn.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function wy(){const[e,t]=l.useState($a);return l.useEffect(()=>(Ca.push(t),()=>{const n=Ca.indexOf(t);n>-1&&Ca.splice(n,1)}),[e]),{...e,toast:by,dismiss:n=>ai({type:qn.DISMISS_TOAST,toastId:n})}}const ud=l.forwardRef((e,t)=>{const{toasts:n,dismiss:r}=wy();return j.jsx(gy,{children:n.map(({id:o,description:i,action:a,actionText:s,actionClick:c,duration:u=3e3,type:d="foreground",color:f="neutral",viewPort:m,actionClassName:h,isDismissable:b=!0,...y})=>j.jsxs("div",{children:[j.jsxs(As,{ref:t,color:f,duration:u,type:d,"data-test-id":`toast-${y["data-test-id"]??""}`,...y,children:[j.jsx(et,{"data-test-id":`toast-${y["data-test-id"]??""}`,flexGrow:1,pl:"$16",py:"$16",pr:c?"$0":"$16",maxW:"$full",minW:"$0",cursor:b?"pointer":"auto",onClick:()=>{b&&r(o)},children:j.jsx(sn,{textStyle:"body2",fontWeight:"$reguler",textOverflow:"ellipsis",overflow:"hidden",className:LO,children:i})}),!a&&c&&s?j.jsx(cd,{altText:s,asChild:!0,children:j.jsx(Jm,{"data-test-id":`action-toast-${y["data-test-id"]??""}`,onClick:c,className:Pe(MO,h),children:s})}):a]},o),j.jsx(sd,{...m})]},o))})});ud.displayName="Toaster";const[Ds,OP]=mn("Tooltip",[us]),Ns=us(),WO="TooltipProvider",zO=700,du="tooltip.open",[UO,ld]=Ds(WO),YO=e=>{const{__scopeTooltip:t,delayDuration:n=zO,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=l.useState(!0),c=l.useRef(!1),u=l.useRef(0);return l.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.createElement(UO,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:l.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:l.useCallback(d=>{c.current=d},[]),disableHoverableContent:o},i)},dd="Tooltip",[KO,ks]=Ds(dd),qO=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,c=ld(dd,e.__scopeTooltip),u=Ns(t),[d,f]=l.useState(null),m=Xn(),h=l.useRef(0),b=a??c.disableHoverableContent,y=s??c.delayDuration,T=l.useRef(!1),[S=!1,v]=Sn({prop:r,defaultProp:o,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(du))):c.onClose(),i==null||i(P)}}),w=l.useMemo(()=>S?T.current?"delayed-open":"instant-open":"closed",[S]),C=l.useCallback(()=>{window.clearTimeout(h.current),T.current=!1,v(!0)},[v]),I=l.useCallback(()=>{window.clearTimeout(h.current),v(!1)},[v]),D=l.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{T.current=!0,v(!0)},y)},[y,v]);return l.useEffect(()=>()=>window.clearTimeout(h.current),[]),l.createElement(Xp,u,l.createElement(KO,{scope:t,contentId:m,open:S,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?D():C()},[c.isOpenDelayed,D,C]),onTriggerLeave:l.useCallback(()=>{b?I():window.clearTimeout(h.current)},[I,b]),onOpen:C,onClose:I,disableHoverableContent:b},n))},hp="TooltipTrigger",XO=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ks(hp,n),i=ld(hp,n),a=Ns(n),s=l.useRef(null),c=st(t,s,o.onTriggerChange),u=l.useRef(!1),d=l.useRef(!1),f=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.createElement(Gp,ae({asChild:!0},a),l.createElement(Ke.button,ae({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:c,onPointerMove:Ae(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ae(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:Ae(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ae(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Ae(e.onBlur,o.onClose),onClick:Ae(e.onClick,o.onClose)})))}),GO="TooltipPortal",[PP,ZO]=Ds(GO,{forceMount:void 0}),Ci="TooltipContent",QO=l.forwardRef((e,t)=>{const n=ZO(Ci,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=ks(Ci,e.__scopeTooltip);return l.createElement(yr,{present:r||a.open},a.disableHoverableContent?l.createElement(Ey,ae({side:o},i,{ref:t})):l.createElement(JO,ae({side:o},i,{ref:t})))}),JO=l.forwardRef((e,t)=>{const n=ks(Ci,e.__scopeTooltip),r=ld(Ci,e.__scopeTooltip),o=l.useRef(null),i=st(t,o),[a,s]=l.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:f}=r,m=l.useCallback(()=>{s(null),f(!1)},[f]),h=l.useCallback((b,y)=>{const T=b.currentTarget,S={x:b.clientX,y:b.clientY},v=oP(S,T.getBoundingClientRect()),w=iP(S,v),C=aP(y.getBoundingClientRect()),I=cP([...w,...C]);s(I),f(!0)},[f]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(c&&d){const b=T=>h(T,d),y=T=>h(T,c);return c.addEventListener("pointerleave",b),d.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",y)}}},[c,d,h,m]),l.useEffect(()=>{if(a){const b=y=>{const T=y.target,S={x:y.clientX,y:y.clientY},v=(c==null?void 0:c.contains(T))||(d==null?void 0:d.contains(T)),w=!sP(S,a);v?m():w&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,a,u,m]),l.createElement(Ey,ae({},e,{ref:i}))}),[eP,tP]=Ds(dd,{isInside:!1}),Ey=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,c=ks(Ci,n),u=Ns(n),{onClose:d}=c;return l.useEffect(()=>(document.addEventListener(du,d),()=>document.removeEventListener(du,d)),[d]),l.useEffect(()=>{if(c.trigger){const f=m=>{const h=m.target;h!=null&&h.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.createElement(is,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d},l.createElement(Zp,ae({"data-state":c.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),l.createElement(yp,null,r),l.createElement(eP,{scope:n,isInside:!0},l.createElement(Jw,{id:c.contentId,role:"tooltip"},o||r))))}),nP="TooltipArrow",rP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ns(n);return tP(nP,n).isInside?null:l.createElement(Zw,ae({},o,r,{ref:t}))});function oP(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function iP(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function aP(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function sP(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,c=t[i].y,u=t[a].x,d=t[a].y;c>r!=d>r&&n<(u-s)*(r-c)/(d-c)+s&&(o=!o)}return o}function cP(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),uP(t)}function uP(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const lP=YO,dP=qO,fP=XO,hP=QO,pP=rP;function pp(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function vP(e,t){var n=e;for(var r of t){if(!(r in n))throw new Error("Path ".concat(t.join(" -> ")," does not exist in object"));n=n[r]}return n}function xy(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=e.constructor();for(var o in e){var i=e[o],a=[...n,o];typeof i=="string"||typeof i=="number"||i==null?r[o]=t(i,a):typeof i=="object"&&!Array.isArray(i)?r[o]=xy(i,t,a):console.warn('Skipping invalid key "'.concat(a.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"'))}return r}function mP(e,t){var n={};if(typeof t=="object"){var r=e;xy(t,(a,s)=>{var c=vP(r,s);n[pp(c)]=String(a)})}else{var o=e;for(var i in o)n[pp(i)]=o[i]}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(s=>"".concat(s,":").concat(this[s])).join(";")},writable:!1}),n}var gP="var(--_4goys34)",yP="_4goys35",bP="_4goys36";const fd=l.forwardRef(({align:e,alignOffset:t,children:n,color:r,bgColor:o,content:i,defaultOpen:a,delayDuration:s=700,disableHoverableContent:c,onOpenChange:u,open:d,position:f,positionOffset:m,withIcon:h,...b},y)=>{const T=Rt.atoms.commonAtoms({color:r,bgColor:o}).className,S=Rt.atoms.borderAtoms({borderColor:o}).className,w=o.replace("$","");return j.jsxs(dP,{defaultOpen:a,delayDuration:s,disableHoverableContent:c,onOpenChange:u,open:d,children:[j.jsx(fP,{asChild:!0,ref:y,children:n}),j.jsx(ms,{children:j.jsxs(hP,{align:e,alignOffset:t,side:f,sideOffset:m,...b,className:Pe(bP,T,S),children:[j.jsxs(Yt,{gap:"$6",children:[h&&j.jsx(Yt,{width:"$24",children:j.jsx(R0,{size:24})}),i]}),j.jsx(pP,{className:yP,style:mP({[gP]:Rt.theme.colors[w]})})]})})]})});fd.displayName="Tooltip";fd.defaultProps={align:void 0,alignOffset:void 0,defaultOpen:void 0,delayDuration:300,disableHoverableContent:!1,onOpenChange:void 0,open:void 0,position:void 0,positionOffset:void 0,withIcon:void 0,bgColor:"$blackTypoHigh",color:"$white"};const hd=({children:e})=>j.jsxs(lP,{children:[e,j.jsx(ud,{})]});hd.displayName="RadixProvider";const pd=({children:e,withScrollStyles:t})=>j.jsx("div",{id:"voila-ui",style:{fontFamily:Rt.theme.fonts.poppins},className:Pe(t??Rt.scrollbarStyle),children:j.jsx(hd,{children:e})});pd.displayName="Provider";pd.defaultProps={withScrollStyles:!1};exports.Accordion=Rb;exports.AccordionContent=u0;exports.AccordionItem=l0;exports.AccordionTrigger=M0;exports.Alert=Rp;exports.Badge=xu;exports.BaseSelect=ku;exports.BottomSheet=j$;exports.Box=et;exports.Button=vo;exports.Card=gu;exports.Checkbox=qm;exports.Chips=sl;exports.CloseButton=xo;exports.ConfirmDialogContext=ll;exports.ConfirmDialogProvider=AT;exports.Container=yu;exports.DatePicker=oI;exports.Dialog=ul;exports.Flex=Yt;exports.FullLoader=ng;exports.Grid=bu;exports.IconButton=pl;exports.Image=vl;exports.Input=fl;exports.Link=Jm;exports.List=ml;exports.ListItem=gl;exports.Loader=zT;exports.LoaderAnimated=yl;exports.Modal=Ai;exports.ModalBody=Is;exports.ModalFooter=Rs;exports.ModalHeader=Di;exports.MultiPicker=rg;exports.Overlay=zE;exports.Picker=iu;exports.Portal=ms;exports.Provider=pd;exports.Radio=ny;exports.RadioGroup=YR;exports.RadixProvider=hd;exports.Search=td;exports.Select=co;exports.SelectPicker=Yg;exports.Spinner=_o;exports.Stack=Pr;exports.Switch=iy;exports.TabItem=od;exports.Table=cy;exports.Tabs=rd;exports.TabsContext=nd;exports.Text=sn;exports.Textarea=hl;exports.Toast=As;exports.ToastAction=cd;exports.ToastProvider=gy;exports.ToastViewport=sd;exports.Toaster=ud;exports.Tooltip=fd;exports.reducer=yy;exports.toast=by;exports.useDialog=DT;exports.useIndeterminate=nT;exports.useOnMount=wv;exports.useRipple=al;exports.useTableRenderer=sy;exports.useToast=wy;