@ctlyst.id/voila-ui 1.30.0 → 1.31.0
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 +32 -32
- package/dist/index.mjs +1800 -1778
- package/dist/style.css +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/pills/index.d.ts +2 -0
- package/dist/types/components/pills/pills.css.d.ts +13 -0
- package/dist/types/components/pills/pills.d.ts +12 -0
- package/package.json +2 -2
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"),$t=require("@ctlyst.id/voila-ui-core");function mp(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=mp(l),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),hn=require("react-dom"),$t=require("@ctlyst.id/voila-ui-core");function mp(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=mp(l),Hy=mp(hn);var Wy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xc={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 Pd;function
|
|
9
|
+
*/var Pd;function zy(){if(Pd)return $o;Pd=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,17 +14,17 @@
|
|
|
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 Ad;function
|
|
18
|
-
`+z+x}}var ee=!1,Q;{var ie=typeof WeakMap=="function"?WeakMap:Map;Q=new ie}function re(x,V){if(!x||ee)return"";{var J=Q.get(x);if(J!==void 0)return J}var fe;ee=!0;var _e=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var
|
|
17
|
+
*/var Ad;function Uy(){return Ad||(Ad=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,J=new Array(V>1?V-1:0),fe=1;fe<V;fe++)J[fe-1]=arguments[fe];E("error",x,J)}}function E(x,V,J){{var fe=S.ReactDebugCurrentFrame,_e=fe.getStackAddendum();_e!==""&&(V+="%s",J=J.concat([_e]));var Re=J.map(function(Ee){return String(Ee)});Re.unshift("Warning: "+V),Function.prototype.apply.call(console[x],console,Re)}}var C=!1,I=!1,D=!1,A=!1,F=!1,k;k=Symbol.for("react.module.reference");function B(x){return!!(typeof x=="string"||typeof x=="function"||x===r||x===i||F||x===o||x===u||x===d||A||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,J){var fe=x.displayName;if(fe)return fe;var _e=V.displayName||V.name||"";return _e!==""?J+"("+_e+")":J}function w(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 w(V)+".Consumer";case a:var J=x;return w(J._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,Re=_e._payload,Ee=_e._init;try{return p(Ee(Re))}catch{return null}}}return null}var $=Object.assign,P=0,j,W,Y,ne,H,L,oe;function G(){}G.__reactDisabledLog=!0;function K(){{if(P===0){j=console.log,W=console.info,Y=console.warn,ne=console.error,H=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})}P++}}function Z(){{if(P--,P===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},x,{value:j}),info:$({},x,{value:W}),warn:$({},x,{value:Y}),error:$({},x,{value:ne}),group:$({},x,{value:H}),groupCollapsed:$({},x,{value:L}),groupEnd:$({},x,{value:oe})})}P<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=S.ReactCurrentDispatcher,z;function U(x,V,J){{if(z===void 0)try{throw Error()}catch(_e){var fe=_e.stack.trim().match(/\n( *(at )?)/);z=fe&&fe[1]||""}return`
|
|
18
|
+
`+z+x}}var ee=!1,Q;{var ie=typeof WeakMap=="function"?WeakMap:Map;Q=new ie}function re(x,V){if(!x||ee)return"";{var J=Q.get(x);if(J!==void 0)return J}var fe;ee=!0;var _e=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Re;Re=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 we=qe.stack.split(`
|
|
19
19
|
`),nt=fe.stack.split(`
|
|
20
20
|
`),Le=we.length-1,Be=nt.length-1;Le>=1&&Be>=0&&we[Le]!==nt[Be];)Be--;for(;Le>=1&&Be>=0;Le--,Be--)if(we[Le]!==nt[Be]){if(Le!==1||Be!==1)do if(Le--,Be--,Be<0||we[Le]!==nt[Be]){var Ge=`
|
|
21
|
-
`+we[Le].replace(" at new "," at ");return x.displayName&&Ge.includes("<anonymous>")&&(Ge=Ge.replace("<anonymous>",x.displayName)),typeof x=="function"&&Q.set(x,Ge),Ge}while(Le>=1&&Be>=0);break}}}finally{ee=!1,ce.current=
|
|
21
|
+
`+we[Le].replace(" at new "," at ");return x.displayName&&Ge.includes("<anonymous>")&&(Ge=Ge.replace("<anonymous>",x.displayName)),typeof x=="function"&&Q.set(x,Ge),Ge}while(Le>=1&&Be>=0);break}}}finally{ee=!1,ce.current=Re,Z(),Error.prepareStackTrace=_e}var qt=x?x.displayName||x.name:"",Er=qt?U(qt):"";return typeof x=="function"&&Q.set(x,Er),Er}function me(x,V,J){return re(x,!1)}function Te(x){var V=x.prototype;return!!(V&&V.isReactComponent)}function Pe(x,V,J){if(x==null)return"";if(typeof x=="function")return re(x,Te(x));if(typeof x=="string")return U(x);switch(x){case u:return U("Suspense");case d:return U("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case c:return me(x.render);case f:return Pe(x.type,V,J);case m:{var fe=x,_e=fe._payload,Re=fe._init;try{return Pe(Re(_e),V,J)}catch{}}}return""}var Ne=Object.prototype.hasOwnProperty,Oe={},We=S.ReactDebugCurrentFrame;function De(x){if(x){var V=x._owner,J=Pe(x.type,x._source,V?V.type:null);We.setExtraStackFrame(J)}else We.setExtraStackFrame(null)}function ot(x,V,J,fe,_e){{var Re=Function.call.bind(Ne);for(var Ee in x)if(Re(x,Ee)){var we=void 0;try{if(typeof x[Ee]!="function"){var nt=Error((fe||"React class")+": "+J+" type `"+Ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[Ee]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw nt.name="Invariant Violation",nt}we=x[Ee](V,Ee,fe,J,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Le){we=Le}we&&!(we instanceof Error)&&(De(_e),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",fe||"React class",J,Ee,typeof we),De(null)),we instanceof Error&&!(we.message in Oe)&&(Oe[we.message]=!0,De(_e),v("Failed %s type: %s",J,we.message),De(null))}}}var ze=Array.isArray;function xt(x){return ze(x)}function Xe(x){{var V=typeof Symbol=="function"&&Symbol.toStringTag,J=V&&x[Symbol.toStringTag]||x.constructor.name||"Object";return J}}function Pt(x){try{return xe(x),!1}catch{return!0}}function xe(x){return""+x}function ct(x){if(Pt(x))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(x)),xe(x)}var je=S.ReactCurrentOwner,Zt={key:!0,ref:!0,__self:!0,__source:!0},Ct,tt,Fe;Fe={};function gt(x){if(Ne.call(x,"ref")){var V=Object.getOwnPropertyDescriptor(x,"ref").get;if(V&&V.isReactWarning)return!1}return x.ref!==void 0}function nn(x){if(Ne.call(x,"key")){var V=Object.getOwnPropertyDescriptor(x,"key").get;if(V&&V.isReactWarning)return!1}return x.key!==void 0}function rn(x,V){if(typeof x.ref=="string"&&je.current&&V&&je.current.stateNode!==V){var J=p(je.current.type);Fe[J]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',p(je.current.type),x.ref),Fe[J]=!0)}}function Qt(x,V){{var J=function(){Ct||(Ct=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};J.isReactWarning=!0,Object.defineProperty(x,"key",{get:J,configurable:!0})}}function he(x,V){{var J=function(){tt||(tt=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};J.isReactWarning=!0,Object.defineProperty(x,"ref",{get:J,configurable:!0})}}var Ue=function(x,V,J,fe,_e,Re,Ee){var we={$$typeof:t,type:x,key:V,ref:J,props:Ee,_owner:Re};return we._store={},Object.defineProperty(we._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(we,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(we,"_source",{configurable:!1,enumerable:!1,writable:!1,value:_e}),Object.freeze&&(Object.freeze(we.props),Object.freeze(we)),we};function kt(x,V,J,fe,_e){{var Re,Ee={},we=null,nt=null;J!==void 0&&(ct(J),we=""+J),nn(V)&&(ct(V.key),we=""+V.key),gt(V)&&(nt=V.ref,rn(V,_e));for(Re in V)Ne.call(V,Re)&&!Zt.hasOwnProperty(Re)&&(Ee[Re]=V[Re]);if(x&&x.defaultProps){var Le=x.defaultProps;for(Re in Le)Ee[Re]===void 0&&(Ee[Re]=Le[Re])}if(we||nt){var Be=typeof x=="function"?x.displayName||x.name||"Unknown":x;we&&Qt(Ee,Be),nt&&he(Ee,Be)}return Ue(x,we,nt,_e,fe,je.current,Ee)}}var At=S.ReactCurrentOwner,Jt=S.ReactDebugCurrentFrame;function Ot(x){if(x){var V=x._owner,J=Pe(x.type,x._source,V?V.type:null);Jt.setExtraStackFrame(J)}else Jt.setExtraStackFrame(null)}var yn;yn=!1;function Lt(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}function Dn(){{if(At.current){var x=p(At.current.type);if(x)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+x+"`."}return""}}function tr(x){{if(x!==void 0){var V=x.fileName.replace(/^.*[\\\/]/,""),J=x.lineNumber;return`
|
|
24
24
|
|
|
25
25
|
Check your code at `+V+":"+J+"."}return""}}var un={};function $n(x){{var V=Dn();if(!V){var J=typeof x=="string"?x:x.displayName||x.name;J&&(V=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+J+">.")}return V}}function Ht(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var J=$n(V);if(un[J])return;un[J]=!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.',J,fe),Ot(null)}}function en(x,V){{if(typeof x!="object")return;if(xt(x))for(var J=0;J<x.length;J++){var fe=x[J];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 J;if(typeof V=="function")J=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))J=V.propTypes;else return;if(J){var fe=p(V);ot(J,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),J=0;J<V.length;J++){var fe=V[J];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,J,fe,_e,Ie){{var Ee=B(x);if(!Ee){var we="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(we+=" 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?we+=nt:we+=Dn();var Le;x===null?Le="null":xt(x)?Le="array":x!==void 0&&x.$$typeof===t?(Le="<"+(p(x.type)||"Unknown")+" />",we=" 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,we)}var Be=kt(x,V,J,_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,J){return Tn(x,V,J,!0)}function nr(x,V,J){return Tn(x,V,J,!1)}var Wt=nr,rr=kn;To.Fragment=r,To.jsx=Wt,To.jsxs=rr}()),To}process.env.NODE_ENV==="production"?xc.exports=Wy():xc.exports=zy();var M=xc.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,Uy(o,...t)]}function Uy(...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 Yy(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function yp(...e){return t=>e.forEach(n=>Yy(n,t))}function st(...e){return l.useCallback(yp(...e),e)}const uo=l.forwardRef((e,t)=>{const{children:n,...r}=e,o=l.Children.toArray(n),i=o.find(Ky);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(_c,ae({},r,{ref:t}),l.isValidElement(a)?l.cloneElement(a,void 0,s):null)}return l.createElement(_c,ae({},r,{ref:t}),n)});uo.displayName="Slot";const _c=l.forwardRef((e,t)=>{const{children:n,...r}=e;return l.isValidElement(n)?l.cloneElement(n,{...qy(r,n.props),ref:t?yp(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});_c.displayName="SlotClone";const bp=({children:e})=>l.createElement(l.Fragment,null,e);function Ky(e){return l.isValidElement(e)&&e.type===bp}function qy(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),E=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:E},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]=Xy({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 Xy({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 Gy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ke=Gy.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 wp(e,t){e&&hn.flushSync(()=>e.dispatchEvent(t))}const Gt=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{};function Zy(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]=Zy(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 Jy=$e["useId".toString()]||(()=>{});let eb=0;function Xn(e){const[t,n]=$e.useState(Jy());return Gt(()=>{e||n(r=>r??String(eb++))},[e]),e||(t?`radix-${t}`:"")}const Ep="Collapsible",[tb,xp]=mn(Ep),[nb,hu]=tb(Ep),rb=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(nb,{scope:n,disabled:i,contentId:Xn(),open:c,onOpenToggle:l.useCallback(()=>u(d=>!d),[u])},l.createElement(Ke.div,ae({"data-state":pu(c),"data-disabled":i?"":void 0},s,{ref:t})))}),ob="CollapsibleTrigger",ib=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=hu(ob,n);return l.createElement(Ke.button,ae({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":pu(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ae(e.onClick,o.onOpenToggle)}))}),_p="CollapsibleContent",ab=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=hu(_p,e.__scopeCollapsible);return l.createElement(yr,{present:n||o.open},({present:i})=>l.createElement(sb,ae({},r,{ref:t,present:i})))}),sb=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=hu(_p,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 E=v.getBoundingClientRect();f.current=E.height,h.current=E.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":pu(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 pu(e){return e?"open":"closed"}const cb=rb,ub=ib,lb=ab,db=l.createContext(void 0);function es(e){const t=l.useContext(db);return e||t||"ltr"}const br="Accordion",fb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[vu,hb,pb]=Ja(br),[ts,CP]=mn(br,[pb,xp]),mu=xp(),Sp=l.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return l.createElement(vu.Provider,{scope:e.__scopeAccordion},n==="multiple"?l.createElement(yb,ae({},i,{ref:t})):l.createElement(gb,ae({},o,{ref:t})))});Sp.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[Cp,vb]=ts(br),[$p,mb]=ts(br,{collapsible:!1}),gb=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(Cp,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:l.useCallback(()=>i&&c(""),[i,c])},l.createElement($p,{scope:e.__scopeAccordion,collapsible:i},l.createElement(Tp,ae({},a,{ref:t}))))}),yb=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(Cp,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u},l.createElement($p,{scope:e.__scopeAccordion,collapsible:!0},l.createElement(Tp,ae({},i,{ref:t}))))}),[bb,ns]=ts(br),Tp=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=hb(n),f=es(o)==="ltr",m=Ae(e.onKeyDown,h=>{var b;if(!fb.includes(h.key))return;const y=h.target,T=u().filter(k=>{var B;return!((B=k.ref.current)!==null&&B!==void 0&&B.disabled)}),S=T.findIndex(k=>k.ref.current===y),v=T.length;if(S===-1)return;h.preventDefault();let E=S;const C=0,I=v-1,D=()=>{E=S+1,E>I&&(E=C)},A=()=>{E=S-1,E<C&&(E=I)};switch(h.key){case"Home":E=C;break;case"End":E=I;break;case"ArrowRight":i==="horizontal"&&(f?D():A());break;case"ArrowDown":i==="vertical"&&D();break;case"ArrowLeft":i==="horizontal"&&(f?A():D());break;case"ArrowUp":i==="vertical"&&A();break}const F=E%v;(b=T[F].ref.current)===null||b===void 0||b.focus()});return l.createElement(bb,{scope:n,disabled:r,direction:o,orientation:i},l.createElement(vu.Slot,{scope:n},l.createElement(Ke.div,ae({},a,{"data-orientation":i,ref:c,onKeyDown:r?void 0:m}))))}),Sc="AccordionItem",[wb,gu]=ts(Sc),Eb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=ns(Sc,n),a=vb(Sc,n),s=mu(n),c=Xn(),u=r&&a.value.includes(r)||!1,d=i.disabled||e.disabled;return l.createElement(wb,{scope:n,open:u,disabled:d,triggerId:c},l.createElement(cb,ae({"data-orientation":i.orientation,"data-state":Ip(u)},s,o,{ref:t,disabled:d,open:u,onOpenChange:f=>{f?a.onItemOpen(r):a.onItemClose(r)}})))}),xb="AccordionHeader",_b=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ns(br,n),i=gu(xb,n);return l.createElement(Ke.h3,ae({"data-orientation":o.orientation,"data-state":Ip(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),Dd="AccordionTrigger",Sb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ns(br,n),i=gu(Dd,n),a=mb(Dd,n),s=mu(n);return l.createElement(vu.ItemSlot,{scope:n},l.createElement(ub,ae({"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId},s,r,{ref:t})))}),Cb="AccordionContent",$b=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ns(br,n),i=gu(Cb,n),a=mu(n);return l.createElement(lb,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 Ip(e){return e?"open":"closed"}const Tb=Sp,Ib=Eb,Rb=_b,Ob=Sb,Pb=$b;function Rp(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=Rp(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Re(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Rp(e))&&(r&&(r+=" "),r+=t);return r}const Ab=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Tb,{className:Re("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),{})},Db=(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:Db(e,a),className:i,style:s}},{backgroundAtoms:Nb,borderAtoms:kb,commonAtoms:Nd,flexAtoms:kd,positionAtoms:Mb,radiiAtoms:jb,shadowAtoms:Lb,sizesAtoms:Fb,spaceAtoms:Vb,typographyAtoms:Bb}=$t.atoms,et=l.forwardRef(({as:e,children:t,className:n,isDisabled:r,isColumn:o,...i},a)=>{const s=e||"div",c=Nd({display:o?"flex":i.display}),u=kd({flexWrap:o?"wrap":i.flexWrap}),{className:d,otherProps:f,style:m}=rs({commonAtoms:Nd,flexAtoms:kd,positionAtoms:Mb,spaceAtoms:Vb,sizesAtoms:Fb,borderAtoms:kb,typographyAtoms:Bb,radiiAtoms:jb,backgroundAtoms:Nb,shadowAtoms:Lb},i,[c,u]);return M.jsx(s,{ref:a,className:Re(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 yu=({children:e,withShadow:t,bgColor:n,...r})=>M.jsx(et,{boxShadow:t?"$raised":"$none",bgColor:"$white",...r,children:e});yu.displayName="Card";yu.defaultProps={withShadow:!1};var Hb="ifvo3u0";const{sizesAtoms:Md,spaceAtoms:jd,commonAtoms:Ld,flexAtoms:Wb}=$t.atoms,bu=({children:e,isFluid:t,className:n,display:r,...o})=>{const a=Md({width:"$full",maxW:t?"$full":"$lg"}),s=jd({mx:"$auto",my:"$0"}),c=Ld({display:r}),{className:u,style:d}=rs({flexAtoms:Wb,sizesAtoms:Md,spaceAtoms:jd,commonAtoms:Ld},o,[a,s,c]);return M.jsx("div",{className:Re("vds-container",!t&&Hb,u,n),style:d,...o,children:e})};bu.displayName="Container";bu.defaultProps={display:"block",children:null,isFluid:!1,className:void 0};const{commonAtoms:Fd,spaceAtoms:zb,sizesAtoms:Ub,radiiAtoms:Yb,flexAtoms:Kb,backgroundAtoms:qb}=$t.atoms,Yt=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Fd({display:"flex"}),{className:s,otherProps:c,style:u}=rs({flexAtoms:Kb,commonAtoms:Fd,spaceAtoms:zb,sizesAtoms:Ub,radiiAtoms:Yb,backgroundAtoms:qb},r,[a]);return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Re(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:Xb,commonAtoms:Gb,spaceAtoms:Zb,sizesAtoms:Qb,radiiAtoms:Jb}=$t.atoms,wu=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=$t.atoms.commonAtoms({display:"grid"}),{className:s,otherProps:c,style:u}=rs({gridAtoms:Xb,commonAtoms:Gb,spaceAtoms:Zb,sizesAtoms:Qb,radiiAtoms:Jb},r,[a]);return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Re(s,n),style:u,...c,children:t})});wu.displayName="Grid";wu.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};const e0={horizontal:"row",vertical:"column",horizontalReverse:"row-reverse",verticalReverse:"column-reverse"},t0=e=>e?e0[e]:void 0,Vd={1:"wrap",0:"nowrap"},n0=e=>e?typeof e=="boolean"?Vd[1]:Vd[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=t0(o),f=n0(a);return M.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 r0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bd(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 Hd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bd(Object(n),!0).forEach(function(r){r0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var o0=(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},pt=e=>t=>{var n=e.defaultClassName,r=Hd(Hd({},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)o0(u,r,e.defaultVariants)&&(n+=" "+d);return n},i0=pt({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)=>M.jsx(et,{as:e,ref:a,className:Re(i0({textStyle:n,isStrikethrough:r}),o),...i,children:t}));sn.displayName="Text";sn.defaultProps={as:"p"};var a0="_13vyt6x7",s0="_13vyt6x5",c0="_13vyt6x6",u0="_13vyt6x2",l0="_13vyt6x3",d0="_13vyt6x4";const f0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Pb,{className:Re(s0,t),...n,ref:r,children:M.jsx(et,{className:c0,children:e})})),h0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ib,{className:Re(u0,t),...n,ref:r,children:e}));var Cc={exports:{}},Io={};/**
|
|
27
|
+
Check the top-level render call using <`+J+">.")}return V}}function Ht(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var J=$n(V);if(un[J])return;un[J]=!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.',J,fe),Ot(null)}}function en(x,V){{if(typeof x!="object")return;if(xt(x))for(var J=0;J<x.length;J++){var fe=x[J];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 Re=_e.call(x),Ee;!(Ee=Re.next()).done;)Lt(Ee.value)&&Ht(Ee.value,V)}}}function Nn(x){{var V=x.type;if(V==null||typeof V=="string")return;var J;if(typeof V=="function")J=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))J=V.propTypes;else return;if(J){var fe=p(V);ot(J,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),J=0;J<V.length;J++){var fe=V[J];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,J,fe,_e,Re){{var Ee=B(x);if(!Ee){var we="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(we+=" 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?we+=nt:we+=Dn();var Le;x===null?Le="null":xt(x)?Le="array":x!==void 0&&x.$$typeof===t?(Le="<"+(p(x.type)||"Unknown")+" />",we=" 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,we)}var Be=kt(x,V,J,_e,Re);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,J){return Tn(x,V,J,!0)}function nr(x,V,J){return Tn(x,V,J,!1)}var Wt=nr,rr=kn;To.Fragment=r,To.jsx=Wt,To.jsxs=rr}()),To}process.env.NODE_ENV==="production"?xc.exports=zy():xc.exports=Uy();var M=xc.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,Yy(o,...t)]}function Yy(...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 Ky(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function yp(...e){return t=>e.forEach(n=>Ky(n,t))}function st(...e){return l.useCallback(yp(...e),e)}const uo=l.forwardRef((e,t)=>{const{children:n,...r}=e,o=l.Children.toArray(n),i=o.find(qy);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(_c,ae({},r,{ref:t}),l.isValidElement(a)?l.cloneElement(a,void 0,s):null)}return l.createElement(_c,ae({},r,{ref:t}),n)});uo.displayName="Slot";const _c=l.forwardRef((e,t)=>{const{children:n,...r}=e;return l.isValidElement(n)?l.cloneElement(n,{...Xy(r,n.props),ref:t?yp(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});_c.displayName="SlotClone";const bp=({children:e})=>l.createElement(l.Fragment,null,e);function qy(e){return l.isValidElement(e)&&e.type===bp}function Xy(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),E=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:E},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]=Gy({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 Gy({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 Zy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ke=Zy.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 wp(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=Jy(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 Jy(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 eb=$e["useId".toString()]||(()=>{});let tb=0;function Xn(e){const[t,n]=$e.useState(eb());return Gt(()=>{e||n(r=>r??String(tb++))},[e]),e||(t?`radix-${t}`:"")}const Ep="Collapsible",[nb,xp]=mn(Ep),[rb,hu]=nb(Ep),ob=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(rb,{scope:n,disabled:i,contentId:Xn(),open:c,onOpenToggle:l.useCallback(()=>u(d=>!d),[u])},l.createElement(Ke.div,ae({"data-state":pu(c),"data-disabled":i?"":void 0},s,{ref:t})))}),ib="CollapsibleTrigger",ab=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=hu(ib,n);return l.createElement(Ke.button,ae({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":pu(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ae(e.onClick,o.onOpenToggle)}))}),_p="CollapsibleContent",sb=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=hu(_p,e.__scopeCollapsible);return l.createElement(yr,{present:n||o.open},({present:i})=>l.createElement(cb,ae({},r,{ref:t,present:i})))}),cb=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=hu(_p,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 E=v.getBoundingClientRect();f.current=E.height,h.current=E.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":pu(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 pu(e){return e?"open":"closed"}const ub=ob,lb=ab,db=sb,fb=l.createContext(void 0);function es(e){const t=l.useContext(fb);return e||t||"ltr"}const br="Accordion",hb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[vu,pb,vb]=Ja(br),[ts,TP]=mn(br,[vb,xp]),mu=xp(),Sp=l.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return l.createElement(vu.Provider,{scope:e.__scopeAccordion},n==="multiple"?l.createElement(bb,ae({},i,{ref:t})):l.createElement(yb,ae({},o,{ref:t})))});Sp.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[Cp,mb]=ts(br),[$p,gb]=ts(br,{collapsible:!1}),yb=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(Cp,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:l.useCallback(()=>i&&c(""),[i,c])},l.createElement($p,{scope:e.__scopeAccordion,collapsible:i},l.createElement(Tp,ae({},a,{ref:t}))))}),bb=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(Cp,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u},l.createElement($p,{scope:e.__scopeAccordion,collapsible:!0},l.createElement(Tp,ae({},i,{ref:t}))))}),[wb,ns]=ts(br),Tp=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=pb(n),f=es(o)==="ltr",m=Ae(e.onKeyDown,h=>{var b;if(!hb.includes(h.key))return;const y=h.target,T=u().filter(k=>{var B;return!((B=k.ref.current)!==null&&B!==void 0&&B.disabled)}),S=T.findIndex(k=>k.ref.current===y),v=T.length;if(S===-1)return;h.preventDefault();let E=S;const C=0,I=v-1,D=()=>{E=S+1,E>I&&(E=C)},A=()=>{E=S-1,E<C&&(E=I)};switch(h.key){case"Home":E=C;break;case"End":E=I;break;case"ArrowRight":i==="horizontal"&&(f?D():A());break;case"ArrowDown":i==="vertical"&&D();break;case"ArrowLeft":i==="horizontal"&&(f?A():D());break;case"ArrowUp":i==="vertical"&&A();break}const F=E%v;(b=T[F].ref.current)===null||b===void 0||b.focus()});return l.createElement(wb,{scope:n,disabled:r,direction:o,orientation:i},l.createElement(vu.Slot,{scope:n},l.createElement(Ke.div,ae({},a,{"data-orientation":i,ref:c,onKeyDown:r?void 0:m}))))}),Sc="AccordionItem",[Eb,gu]=ts(Sc),xb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=ns(Sc,n),a=mb(Sc,n),s=mu(n),c=Xn(),u=r&&a.value.includes(r)||!1,d=i.disabled||e.disabled;return l.createElement(Eb,{scope:n,open:u,disabled:d,triggerId:c},l.createElement(ub,ae({"data-orientation":i.orientation,"data-state":Ip(u)},s,o,{ref:t,disabled:d,open:u,onOpenChange:f=>{f?a.onItemOpen(r):a.onItemClose(r)}})))}),_b="AccordionHeader",Sb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ns(br,n),i=gu(_b,n);return l.createElement(Ke.h3,ae({"data-orientation":o.orientation,"data-state":Ip(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),Dd="AccordionTrigger",Cb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ns(br,n),i=gu(Dd,n),a=gb(Dd,n),s=mu(n);return l.createElement(vu.ItemSlot,{scope:n},l.createElement(lb,ae({"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId},s,r,{ref:t})))}),$b="AccordionContent",Tb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ns(br,n),i=gu($b,n),a=mu(n);return l.createElement(db,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 Ip(e){return e?"open":"closed"}const Ib=Sp,Rb=xb,Ob=Sb,Pb=Cb,Ab=Tb;function Rp(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=Rp(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ie(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Rp(e))&&(r&&(r+=" "),r+=t);return r}const Db=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ib,{className:Ie("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),{})},Nb=(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:Nb(e,a),className:i,style:s}},{backgroundAtoms:kb,borderAtoms:Mb,commonAtoms:Nd,flexAtoms:kd,positionAtoms:jb,radiiAtoms:Lb,shadowAtoms:Fb,sizesAtoms:Vb,spaceAtoms:Bb,typographyAtoms:Hb}=$t.atoms,et=l.forwardRef(({as:e,children:t,className:n,isDisabled:r,isColumn:o,...i},a)=>{const s=e||"div",c=Nd({display:o?"flex":i.display}),u=kd({flexWrap:o?"wrap":i.flexWrap}),{className:d,otherProps:f,style:m}=rs({commonAtoms:Nd,flexAtoms:kd,positionAtoms:jb,spaceAtoms:Bb,sizesAtoms:Vb,borderAtoms:Mb,typographyAtoms:Hb,radiiAtoms:Lb,backgroundAtoms:kb,shadowAtoms:Fb},i,[c,u]);return M.jsx(s,{ref:a,className:Ie(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 yu=({children:e,withShadow:t,bgColor:n,...r})=>M.jsx(et,{boxShadow:t?"$raised":"$none",bgColor:"$white",...r,children:e});yu.displayName="Card";yu.defaultProps={withShadow:!1};var Wb="ifvo3u0";const{sizesAtoms:Md,spaceAtoms:jd,commonAtoms:Ld,flexAtoms:zb}=$t.atoms,bu=({children:e,isFluid:t,className:n,display:r,...o})=>{const a=Md({width:"$full",maxW:t?"$full":"$lg"}),s=jd({mx:"$auto",my:"$0"}),c=Ld({display:r}),{className:u,style:d}=rs({flexAtoms:zb,sizesAtoms:Md,spaceAtoms:jd,commonAtoms:Ld},o,[a,s,c]);return M.jsx("div",{className:Ie("vds-container",!t&&Wb,u,n),style:d,...o,children:e})};bu.displayName="Container";bu.defaultProps={display:"block",children:null,isFluid:!1,className:void 0};const{commonAtoms:Fd,spaceAtoms:Ub,sizesAtoms:Yb,radiiAtoms:Kb,flexAtoms:qb,backgroundAtoms:Xb}=$t.atoms,Yt=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Fd({display:"flex"}),{className:s,otherProps:c,style:u}=rs({flexAtoms:qb,commonAtoms:Fd,spaceAtoms:Ub,sizesAtoms:Yb,radiiAtoms:Kb,backgroundAtoms:Xb},r,[a]);return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Ie(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:Gb,commonAtoms:Zb,spaceAtoms:Qb,sizesAtoms:Jb,radiiAtoms:e0}=$t.atoms,wu=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=$t.atoms.commonAtoms({display:"grid"}),{className:s,otherProps:c,style:u}=rs({gridAtoms:Gb,commonAtoms:Zb,spaceAtoms:Qb,sizesAtoms:Jb,radiiAtoms:e0},r,[a]);return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Ie(s,n),style:u,...c,children:t})});wu.displayName="Grid";wu.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};const t0={horizontal:"row",vertical:"column",horizontalReverse:"row-reverse",verticalReverse:"column-reverse"},n0=e=>e?t0[e]:void 0,Vd={1:"wrap",0:"nowrap"},r0=e=>e?typeof e=="boolean"?Vd[1]:Vd[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=n0(o),f=r0(a);return M.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 o0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bd(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 Hd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bd(Object(n),!0).forEach(function(r){o0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var i0=(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},dt=e=>t=>{var n=e.defaultClassName,r=Hd(Hd({},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)i0(u,r,e.defaultVariants)&&(n+=" "+d);return n},a0=dt({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)=>M.jsx(et,{as:e,ref:a,className:Ie(a0({textStyle:n,isStrikethrough:r}),o),...i,children:t}));sn.displayName="Text";sn.defaultProps={as:"p"};var s0="_13vyt6x7",c0="_13vyt6x5",u0="_13vyt6x6",l0="_13vyt6x2",d0="_13vyt6x3",f0="_13vyt6x4";const h0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ab,{className:Ie(c0,t),...n,ref:r,children:M.jsx(et,{className:u0,children:e})})),p0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Rb,{className:Ie(l0,t),...n,ref:r,children:e}));var Cc={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 <`+J+">.")}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 Wd;function
|
|
35
|
+
*/var Wd;function v0(){if(Wd)return Io;Wd=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,18 +40,18 @@ Check the top-level render call using <`+J+">.")}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 zd;function
|
|
44
|
-
`+z+x}}var ee=!1,Q;{var ie=typeof WeakMap=="function"?WeakMap:Map;Q=new ie}function re(x,V){if(!x||ee)return"";{var J=Q.get(x);if(J!==void 0)return J}var fe;ee=!0;var _e=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var
|
|
43
|
+
*/var zd;function m0(){return zd||(zd=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,J=new Array(V>1?V-1:0),fe=1;fe<V;fe++)J[fe-1]=arguments[fe];E("error",x,J)}}function E(x,V,J){{var fe=S.ReactDebugCurrentFrame,_e=fe.getStackAddendum();_e!==""&&(V+="%s",J=J.concat([_e]));var Re=J.map(function(Ee){return String(Ee)});Re.unshift("Warning: "+V),Function.prototype.apply.call(console[x],console,Re)}}var C=!1,I=!1,D=!1,A=!1,F=!1,k;k=Symbol.for("react.module.reference");function B(x){return!!(typeof x=="string"||typeof x=="function"||x===r||x===i||F||x===o||x===u||x===d||A||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,J){var fe=x.displayName;if(fe)return fe;var _e=V.displayName||V.name||"";return _e!==""?J+"("+_e+")":J}function w(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 w(V)+".Consumer";case a:var J=x;return w(J._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,Re=_e._payload,Ee=_e._init;try{return p(Ee(Re))}catch{return null}}}return null}var $=Object.assign,P=0,j,W,Y,ne,H,L,oe;function G(){}G.__reactDisabledLog=!0;function K(){{if(P===0){j=console.log,W=console.info,Y=console.warn,ne=console.error,H=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})}P++}}function Z(){{if(P--,P===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},x,{value:j}),info:$({},x,{value:W}),warn:$({},x,{value:Y}),error:$({},x,{value:ne}),group:$({},x,{value:H}),groupCollapsed:$({},x,{value:L}),groupEnd:$({},x,{value:oe})})}P<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=S.ReactCurrentDispatcher,z;function U(x,V,J){{if(z===void 0)try{throw Error()}catch(_e){var fe=_e.stack.trim().match(/\n( *(at )?)/);z=fe&&fe[1]||""}return`
|
|
44
|
+
`+z+x}}var ee=!1,Q;{var ie=typeof WeakMap=="function"?WeakMap:Map;Q=new ie}function re(x,V){if(!x||ee)return"";{var J=Q.get(x);if(J!==void 0)return J}var fe;ee=!0;var _e=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Re;Re=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 we=qe.stack.split(`
|
|
45
45
|
`),nt=fe.stack.split(`
|
|
46
46
|
`),Le=we.length-1,Be=nt.length-1;Le>=1&&Be>=0&&we[Le]!==nt[Be];)Be--;for(;Le>=1&&Be>=0;Le--,Be--)if(we[Le]!==nt[Be]){if(Le!==1||Be!==1)do if(Le--,Be--,Be<0||we[Le]!==nt[Be]){var Ge=`
|
|
47
|
-
`+we[Le].replace(" at new "," at ");return x.displayName&&Ge.includes("<anonymous>")&&(Ge=Ge.replace("<anonymous>",x.displayName)),typeof x=="function"&&Q.set(x,Ge),Ge}while(Le>=1&&Be>=0);break}}}finally{ee=!1,ce.current=
|
|
47
|
+
`+we[Le].replace(" at new "," at ");return x.displayName&&Ge.includes("<anonymous>")&&(Ge=Ge.replace("<anonymous>",x.displayName)),typeof x=="function"&&Q.set(x,Ge),Ge}while(Le>=1&&Be>=0);break}}}finally{ee=!1,ce.current=Re,Z(),Error.prepareStackTrace=_e}var qt=x?x.displayName||x.name:"",Er=qt?U(qt):"";return typeof x=="function"&&Q.set(x,Er),Er}function me(x,V,J){return re(x,!1)}function Te(x){var V=x.prototype;return!!(V&&V.isReactComponent)}function Pe(x,V,J){if(x==null)return"";if(typeof x=="function")return re(x,Te(x));if(typeof x=="string")return U(x);switch(x){case u:return U("Suspense");case d:return U("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case c:return me(x.render);case f:return Pe(x.type,V,J);case m:{var fe=x,_e=fe._payload,Re=fe._init;try{return Pe(Re(_e),V,J)}catch{}}}return""}var Ne=Object.prototype.hasOwnProperty,Oe={},We=S.ReactDebugCurrentFrame;function De(x){if(x){var V=x._owner,J=Pe(x.type,x._source,V?V.type:null);We.setExtraStackFrame(J)}else We.setExtraStackFrame(null)}function ot(x,V,J,fe,_e){{var Re=Function.call.bind(Ne);for(var Ee in x)if(Re(x,Ee)){var we=void 0;try{if(typeof x[Ee]!="function"){var nt=Error((fe||"React class")+": "+J+" type `"+Ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[Ee]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw nt.name="Invariant Violation",nt}we=x[Ee](V,Ee,fe,J,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Le){we=Le}we&&!(we instanceof Error)&&(De(_e),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",fe||"React class",J,Ee,typeof we),De(null)),we instanceof Error&&!(we.message in Oe)&&(Oe[we.message]=!0,De(_e),v("Failed %s type: %s",J,we.message),De(null))}}}var ze=Array.isArray;function xt(x){return ze(x)}function Xe(x){{var V=typeof Symbol=="function"&&Symbol.toStringTag,J=V&&x[Symbol.toStringTag]||x.constructor.name||"Object";return J}}function Pt(x){try{return xe(x),!1}catch{return!0}}function xe(x){return""+x}function ct(x){if(Pt(x))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Xe(x)),xe(x)}var je=S.ReactCurrentOwner,Zt={key:!0,ref:!0,__self:!0,__source:!0},Ct,tt,Fe;Fe={};function gt(x){if(Ne.call(x,"ref")){var V=Object.getOwnPropertyDescriptor(x,"ref").get;if(V&&V.isReactWarning)return!1}return x.ref!==void 0}function nn(x){if(Ne.call(x,"key")){var V=Object.getOwnPropertyDescriptor(x,"key").get;if(V&&V.isReactWarning)return!1}return x.key!==void 0}function rn(x,V){if(typeof x.ref=="string"&&je.current&&V&&je.current.stateNode!==V){var J=p(je.current.type);Fe[J]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',p(je.current.type),x.ref),Fe[J]=!0)}}function Qt(x,V){{var J=function(){Ct||(Ct=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};J.isReactWarning=!0,Object.defineProperty(x,"key",{get:J,configurable:!0})}}function he(x,V){{var J=function(){tt||(tt=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",V))};J.isReactWarning=!0,Object.defineProperty(x,"ref",{get:J,configurable:!0})}}var Ue=function(x,V,J,fe,_e,Re,Ee){var we={$$typeof:t,type:x,key:V,ref:J,props:Ee,_owner:Re};return we._store={},Object.defineProperty(we._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(we,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(we,"_source",{configurable:!1,enumerable:!1,writable:!1,value:_e}),Object.freeze&&(Object.freeze(we.props),Object.freeze(we)),we};function kt(x,V,J,fe,_e){{var Re,Ee={},we=null,nt=null;J!==void 0&&(ct(J),we=""+J),nn(V)&&(ct(V.key),we=""+V.key),gt(V)&&(nt=V.ref,rn(V,_e));for(Re in V)Ne.call(V,Re)&&!Zt.hasOwnProperty(Re)&&(Ee[Re]=V[Re]);if(x&&x.defaultProps){var Le=x.defaultProps;for(Re in Le)Ee[Re]===void 0&&(Ee[Re]=Le[Re])}if(we||nt){var Be=typeof x=="function"?x.displayName||x.name||"Unknown":x;we&&Qt(Ee,Be),nt&&he(Ee,Be)}return Ue(x,we,nt,_e,fe,je.current,Ee)}}var At=S.ReactCurrentOwner,Jt=S.ReactDebugCurrentFrame;function Ot(x){if(x){var V=x._owner,J=Pe(x.type,x._source,V?V.type:null);Jt.setExtraStackFrame(J)}else Jt.setExtraStackFrame(null)}var yn;yn=!1;function Lt(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}function Dn(){{if(At.current){var x=p(At.current.type);if(x)return`
|
|
48
48
|
|
|
49
49
|
Check the render method of \``+x+"`."}return""}}function tr(x){{if(x!==void 0){var V=x.fileName.replace(/^.*[\\\/]/,""),J=x.lineNumber;return`
|
|
50
50
|
|
|
51
51
|
Check your code at `+V+":"+J+"."}return""}}var un={};function $n(x){{var V=Dn();if(!V){var J=typeof x=="string"?x:x.displayName||x.name;J&&(V=`
|
|
52
52
|
|
|
53
|
-
Check the top-level render call using <`+J+">.")}return V}}function Ht(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var J=$n(V);if(un[J])return;un[J]=!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.',J,fe),Ot(null)}}function en(x,V){{if(typeof x!="object")return;if(xt(x))for(var J=0;J<x.length;J++){var fe=x[J];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 J;if(typeof V=="function")J=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))J=V.propTypes;else return;if(J){var fe=p(V);ot(J,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),J=0;J<V.length;J++){var fe=V[J];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,J,fe,_e,Ie){{var Ee=B(x);if(!Ee){var we="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(we+=" 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?we+=nt:we+=Dn();var Le;x===null?Le="null":xt(x)?Le="array":x!==void 0&&x.$$typeof===t?(Le="<"+(p(x.type)||"Unknown")+" />",we=" 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,we)}var Be=kt(x,V,J,_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,J){return Tn(x,V,J,!0)}function nr(x,V,J){return Tn(x,V,J,!1)}var Wt=nr,rr=kn;Hi.Fragment=r,Hi.jsx=Wt,Hi.jsxs=rr}()),Hi}process.env.NODE_ENV==="production"?Cc.exports=p0():Cc.exports=v0();var _t=Cc.exports;const m0=e=>{const t="currentColor";return{...e,color:(()=>e.color?$t.theme.colors[e.color]?$t.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=m0,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:"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})})},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.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=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:"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})})},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:"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})})},xu=E0,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.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=x0,_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:"M9 5.5v-3H6v3H2v3h4v3h3v-3h13v-3H9ZM18 13.5h-3v3H2v3h13v3h3v-3h4v-3h-4v-3Z",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:"M21 11H3v3h18v-3Z",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:"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})})},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-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})})},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-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})})},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 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})})},N0=D0,k0=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})})},M0=k0,j0=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})})},L0=j0,F0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Rb,{className:"accordion-header",children:M.jsxs(Ob,{className:Re(l0,t),...n,ref:r,children:[M.jsx(et,{className:d0,children:e}),M.jsx(si,{className:a0,size:24,color:$t.theme.colors.black})]})}));var V0={success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)",warning:"var(--_1qe00b211)",error:"var(--_1qe00b214)",neutral:"var(--_1qe00b2e)"},B0=pt({defaultClassName:"_7q2fqh0",variantClassNames:{colorScheme:{success:"_7q2fqh1",info:"_7q2fqh2",warning:"_7q2fqh3",error:"_7q2fqh4",neutral:"_7q2fqh5"}},defaultVariants:{colorScheme:"neutral"},compoundVariants:[]});const Op=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 O0;case"warning":return L0;case"success":return M0;default:return N0}})();return M.jsxs(c,{ref:s,className:Re(B0({colorScheme:o}),e),"data-test-id":a["data-test-id"],...a,children:[M.jsxs(Yt,{gap:"$16",children:[M.jsx(et,{display:"flex",minW:$t.theme.space[24],children:M.jsx(d,{size:24,color:V0[o||"neutral"]})}),M.jsx(et,{pt:"$2",children:M.jsxs(Pr,{gap:"$8",children:[t&&M.jsx(sn,{textStyle:"body2",as:"span",fontWeight:"$bold",children:t}),M.jsx(et,{children:n})]})})]}),r&&M.jsx(Yt,{pl:"$16",pt:"$4",children:M.jsx(os,{"data-test-id":"VqcF6V40rj6neoaCMaHvB",onClick:i,cursor:"pointer",color:$t.theme.colors.black,size:16})})]})});Op.defaultProps={"data-test-id":void 0,title:void 0,withClose:void 0,onClose:void 0};var H0=pt({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 _u=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 M.jsx(d,{ref:u,"data-test-id":c["data-test-id"],className:Re(H0({colorScheme:n,variant:o,size:r,isRounded:i}),a),style:s,...c,children:t})});_u.defaultProps={as:"span",colorScheme:"primary",size:"medium",children:void 0,"data-test-id":void 0};_u.displayName="Badge";function Ud(e,[t,n]){return Math.min(n,Math.max(t,e))}function W0(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 $c="dismissableLayer.update",z0="dismissableLayer.pointerDownOutside",U0="dismissableLayer.focusOutside";let Yd;const Pp=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(Pp),[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),E=f?T.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,I=E>=v,D=K0(F=>{const k=F.target,B=[...d.branches].some(R=>R.contains(k));!I||B||(i==null||i(F),s==null||s(F),F.defaultPrevented||c==null||c())},h),A=q0(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 W0(F=>{E===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&&(Yd=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Kd(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Yd)}},[f,h,r,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Kd())},[f,d]),l.useEffect(()=>{const F=()=>b({});return document.addEventListener($c,F),()=>document.removeEventListener($c,F)},[]),l.createElement(Ke.div,ae({},u,{ref:y,style:{pointerEvents:C?I?"auto":"none":void 0,...e.style},onFocusCapture:Ae(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Ae(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Ae(e.onPointerDownCapture,D.onPointerDownCapture)}))}),Y0=l.forwardRef((e,t)=>{const n=l.useContext(Pp),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 K0(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(){Ap(z0,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 q0(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&&Ap(U0,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 Kd(){const e=new CustomEvent($c);document.dispatchEvent(e)}function Ap(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?wp(o,i):o.dispatchEvent(i)}const X0=is,G0=Y0;let Ws=0;function Dp(){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:qd()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:qd()),Ws++,()=>{Ws===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Ws--}},[])}function qd(){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",Xd={bubbles:!1,cancelable:!0},Np=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(E){if(h.paused||!s)return;const C=E.target;s.contains(C)?f.current=C:ar(f.current,{select:!0})},T=function(E){if(h.paused||!s)return;const C=E.relatedTarget;C!==null&&(s.contains(C)||ar(f.current,{select:!0}))},S=function(E){const C=document.activeElement;for(const I of E)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){Zd.add(h);const y=document.activeElement;if(!s.contains(y)){const S=new CustomEvent(zs,Xd);s.addEventListener(zs,u),s.dispatchEvent(S),S.defaultPrevented||(Z0(nw(kp(s)),{select:!0}),document.activeElement===y&&ar(s))}return()=>{s.removeEventListener(zs,u),setTimeout(()=>{const S=new CustomEvent(Us,Xd);s.addEventListener(Us,d),s.dispatchEvent(S),S.defaultPrevented||ar(y??document.body,{select:!0}),s.removeEventListener(Us,d),Zd.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,[E,C]=Q0(v);E&&C?!y.shiftKey&&S===C?(y.preventDefault(),n&&ar(E,{select:!0})):y.shiftKey&&S===E&&(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 Z0(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=kp(e),n=Gd(t,e),r=Gd(t.reverse(),e);return[n,r]}function kp(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 Gd(e,t){for(const n of e)if(!J0(n,{upTo:t}))return n}function J0(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 ew(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&&ew(e)&&t&&e.select()}}const Zd=tw();function tw(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Qd(e,t),e.unshift(t)},remove(t){var n;e=Qd(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Qd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function nw(e){return e.filter(t=>t.tagName!=="A")}const rw=["top","right","bottom","left"],vr=Math.min,fn=Math.max,Ta=Math.round,Wi=Math.floor,mr=e=>({x:e,y:e}),ow={left:"right",right:"left",bottom:"top",top:"bottom"},iw={start:"end",end:"start"};function Tc(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 Su(e){return e==="x"?"y":"x"}function Cu(e){return e==="y"?"height":"width"}function go(e){return["top","bottom"].includes(Zn(e))?"y":"x"}function $u(e){return Su(go(e))}function aw(e,t,n){n===void 0&&(n=!1);const r=mo(e),o=$u(e),i=Cu(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 sw(e){const t=Ia(e);return[Ic(e),t,Ic(t)]}function Ic(e){return e.replace(/start|end/g,t=>iw[t])}function cw(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 uw(e,t,n,r){const o=mo(e);let i=cw(Zn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ic)))),i}function Ia(e){return e.replace(/left|right|bottom|top/g,t=>ow[t])}function lw(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mp(e){return typeof e!="number"?lw(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 Jd(e,t,n){let{reference:r,floating:o}=e;const i=go(t),a=$u(t),s=Cu(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 dw=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}=Jd(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:E,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=E??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}=Jd(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=Mp(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,E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),C=await(i.isElement==null?void 0:i.isElement(E))?await(i.getScale==null?void 0:i.getScale(E))||{x:1,y:1}:{x:1,y:1},I=Ra(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:E,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 ef=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=Mp(u),f={x:n,y:r},m=$u(o),h=Cu(m),b=await a.getDimensions(c),y=m==="y",T=y?"top":"left",S=y?"bottom":"right",v=y?"clientHeight":"clientWidth",E=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 A=E/2-C/2,F=D/2-b[h]/2-1,k=vr(d[T],F),B=vr(d[S],F),R=k,w=D-b[h]-B,p=D/2-b[h]/2+A,$=Tc(R,p,w),j=mo(o)!=null&&p!=$&&i.reference[h]/2-(p<R?k:B)-b[h]/2<0?p<R?R-p:w-p:0;return{[m]:f[m]-j,data:{[m]:$,centerOffset:p-$+j}}}}),fw=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)),E=f||(S||!b?[Ia(a)]:sw(a));!f&&h!=="none"&&E.push(...uw(a,b,h,v));const C=[a,...E],I=await ci(t,y),D=[];let A=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&D.push(I[T]),d){const R=aw(r,i,v);D.push(I[R[0]],I[R[1]])}if(A=[...A,{placement:r,overflows:D}],!D.every(R=>R<=0)){var F,k;const R=(((F=o.flip)==null?void 0:F.index)||0)+1,w=C[R];if(w)return{data:{index:R,overflows:A},reset:{placement:w}};let p=(k=A.filter($=>$.overflows[0]<=0).sort(($,P)=>$.overflows[1]-P.overflows[1])[0])==null?void 0:k.placement;if(!p)switch(m){case"bestFit":{var B;const $=(B=A.map(P=>[P.placement,P.overflows.filter(j=>j>0).reduce((j,W)=>j+W,0)]).sort((P,j)=>P[1]-j[1])[0])==null?void 0:B[0];$&&(p=$);break}case"initialPlacement":p=a;break}if(r!==p)return{reset:{placement:p}}}return{}}}};function tf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nf(e){return rw.some(t=>e[t]>=0)}const hw=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=tf(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:nf(a)}}}case"escaped":{const i=await ci(t,{...o,altBoundary:!0}),a=tf(i,n.floating);return{data:{escapedOffsets:a,escaped:nf(a)}}}default:return{}}}}};async function pw(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 vw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await pw(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},mw=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=Su(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],E=h-d[S];h=Tc(v,h,E)}if(a){const T=f==="y"?"top":"left",S=f==="y"?"bottom":"right",v=b+d[T],E=b-d[S];b=Tc(v,b,E)}const y=s.fn({...t,[m]:h,[f]:b});return{...y,data:{x:y.x-n,y:y.y-r}}}}},gw=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=Su(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 E=m==="y"?"height":"width",C=i.reference[m]-i.floating[E]+T.mainAxis,I=i.reference[m]+i.reference[E]-T.mainAxis;h<C?h=C:h>I&&(h=I)}if(u){var S,v;const E=m==="y"?"width":"height",C=["top","left"].includes(Zn(o)),I=i.reference[f]-i.floating[E]+(C&&((S=a.offset)==null?void 0:S[f])||0)+(C?0:T.crossAxis),D=i.reference[f]+i.reference[E]+(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}}}},yw=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 E=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;E=d||v?vr(T,D):D}if(v&&!d){const D=fn(c.left,0),A=fn(c.right,0),F=fn(c.top,0),k=fn(c.bottom,0);f?C=m-2*(D!==0||A!==0?D+A:fn(c.left,c.right)):E=h-2*(F!==0||k!==0?F+k:fn(c.top,c.bottom))}await a({...t,availableWidth:C,availableHeight:E});const I=await o.getDimensions(i.floating);return m!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function gr(e){return jp(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=(jp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jp(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 rf(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 bw(e){return["table","td","th"].includes(gr(e))}function Tu(e){const t=Iu(),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 ww(e){let t=lo(e);for(;Vn(t)&&!as(t);){if(Tu(t))return t;t=lo(t)}return null}function Iu(){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||rf(e)&&e.host||Jn(e);return rf(t)?t.host:t}function Lp(e){const t=lo(e);return as(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vn(t)&&$i(t)?t:Lp(t)}function Oa(e,t){var n;t===void 0&&(t=[]);const r=Lp(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 Fp(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 Ru(e){return Qn(e)?e:e.contextElement}function ro(e){const t=Ru(e);if(!Vn(t))return mr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Fp(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 Ew=mr(0);function Vp(e){const t=vn(e);return!Iu()||!t.visualViewport?Ew:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xw(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=Ru(e);let a=mr(1);t&&(r?Qn(r)&&(a=ro(r)):a=ro(e));const s=xw(i,n,r)?Vp(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,E=T.top+(b.clientTop+parseFloat(S.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=v,u+=E,b=vn(b).frameElement}}return Ra({width:d,height:f,x:c,y:u})}function _w(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 Sw(e){return Array.from(e.getClientRects())}function Bp(e){return kr(Jn(e)).left+ss(e).scrollLeft}function Cw(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+Bp(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=Iu();(!u||u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function Tw(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 of(e,t,n){let r;if(t==="viewport")r=$w(e,n);else if(t==="document")r=Cw(Jn(e));else if(Qn(t))r=Tw(t,n);else{const o=Vp(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ra(r)}function Hp(e,t){const n=lo(e);return n===t||!Qn(n)||as(n)?!1:Cn(n).position==="fixed"||Hp(n,t)}function Iw(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=Tu(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||$i(a)&&!c&&Hp(e,a))?r=r.filter(d=>d!==a):o=s,a=lo(a)}return t.set(e,r),r}function Rw(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Iw(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((u,d)=>{const f=of(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},of(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ow(e){return Fp(e)}function Pw(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=Bp(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function af(e,t){return!Vn(e)||Cn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Wp(e,t){const n=vn(e);if(!Vn(e))return n;let r=af(e,t);for(;r&&bw(r)&&Cn(r).position==="static";)r=af(r,t);return r&&(gr(r)==="html"||gr(r)==="body"&&Cn(r).position==="static"&&!Tu(r))?n:r||ww(e)||n}const Aw=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Wp,i=this.getDimensions;return{reference:Pw(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Dw(e){return Cn(e).direction==="rtl"}const Nw={convertOffsetParentRelativeRectToViewportRelativeRect:_w,getDocumentElement:Jn,getClippingRect:Rw,getOffsetParent:Wp,getElementRects:Aw,getClientRects:Sw,getDimensions:Ow,getScale:ro,isElement:Qn,isRTL:Dw};function kw(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 E=!0;function C(I){const D=I[0].intersectionRatio;if(D!==c){if(!E)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},100)}E=!1}try{n=new IntersectionObserver(C,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,v)}n.observe(e)}return a(!0),i}function Mw(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=Ru(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?kw(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 jw=(e,t,n)=>{const r=new Map,o={platform:Nw,...n},i={...o.platform,_c:r};return dw(e,t,{...o,platform:i})},Lw=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?ef({element:r.current,padding:o}).fn(n):{}:r?ef({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 zp(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sf(e,t){const n=zp(e);return Math.round(t*n)/n}function cf(e){const t=$e.useRef(e);return fa(()=>{t.current=e}),t}function Fw(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(j=>{j!=D.current&&(D.current=j,y(j))},[y]),E=$e.useCallback(j=>{j!==A.current&&(A.current=j,S(j))},[S]),C=i||b,I=a||T,D=$e.useRef(null),A=$e.useRef(null),F=$e.useRef(d),k=cf(c),B=cf(o),R=$e.useCallback(()=>{if(!D.current||!A.current)return;const j={placement:t,strategy:n,middleware:m};B.current&&(j.platform=B.current),jw(D.current,A.current,j).then(W=>{const Y={...W,isPositioned:!0};w.current&&!Pa(F.current,Y)&&(F.current=Y,By.flushSync(()=>{f(Y)}))})},[m,t,n,B]);fa(()=>{u===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[u]);const w=$e.useRef(!1);fa(()=>(w.current=!0,()=>{w.current=!1}),[]),fa(()=>{if(C&&(D.current=C),I&&(A.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:A,setReference:v,setFloating:E}),[v,E]),$=$e.useMemo(()=>({reference:C,floating:I}),[C,I]),P=$e.useMemo(()=>{const j={position:n,left:0,top:0};if(!$.floating)return j;const W=sf($.floating,d.x),Y=sf($.floating,d.y);return s?{...j,transform:"translate("+W+"px, "+Y+"px)",...zp($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:Y}},[n,s,$.floating,d.x,d.y]);return $e.useMemo(()=>({...d,update:R,refs:p,elements:$,floatingStyles:P}),[d,R,p,$,P])}const Vw=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"}))}),Bw=Vw;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 Up="Popper",[Yp,us]=mn(Up),[Hw,Kp]=Yp(Up),Ww=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return l.createElement(Hw,{scope:t,anchor:r,onAnchorChange:o},n)},zw="PopperAnchor",Uw=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Kp(zw,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}))}),qp="PopperContent",[Yw,Kw]=Yp(qp),qw=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:E=!1,avoidCollisions:C=!0,onPlaced:I,...D}=e,A=Kp(qp,d),[F,k]=l.useState(null),B=st(t,Te=>k(Te)),[R,w]=l.useState(null),p=cs(R),$=(n=p==null?void 0:p.width)!==null&&n!==void 0?n:0,P=(r=p==null?void 0:p.height)!==null&&r!==void 0?r:0,j=f+(h!=="center"?"-"+h:""),W=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},Y=Array.isArray(T)?T:[T],ne=Y.length>0,H={padding:W,boundary:Y.filter(Qw),altBoundary:ne},{refs:L,floatingStyles:oe,placement:G,isPositioned:K,middlewareData:Z}=Fw({strategy:"fixed",placement:j,whileElementsMounted:Mw,elements:{reference:A.anchor},middleware:[vw({mainAxis:m+P,alignmentAxis:b}),C&&mw({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?gw():void 0,...H}),C&&fw({...H}),yw({...H,apply:({elements:Te,rects:Pe,availableWidth:Ne,availableHeight:Oe})=>{const{width:We,height:De}=Pe.reference,ot=Te.floating.style;ot.setProperty("--radix-popper-available-width",`${Ne}px`),ot.setProperty("--radix-popper-available-height",`${Oe}px`),ot.setProperty("--radix-popper-anchor-width",`${We}px`),ot.setProperty("--radix-popper-anchor-height",`${De}px`)}}),R&&Lw({element:R,padding:y}),Jw({arrowWidth:$,arrowHeight:P}),E&&hw({strategy:"referenceHidden"})]}),[ce,z]=Xp(G),U=cn(I);Gt(()=>{K&&(U==null||U())},[K,U]);const ee=(o=Z.arrow)===null||o===void 0?void 0:o.x,Q=(i=Z.arrow)===null||i===void 0?void 0:i.y,ie=((a=Z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[re,me]=l.useState();return Gt(()=>{F&&me(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:re,"--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(Yw,{scope:d,placedSide:ce,onArrowChange:w,arrowX:ee,arrowY:Q,shouldHideArrow:ie},l.createElement(Ke.div,ae({"data-side":ce,"data-align":z},D,{ref:B,style:{...D.style,animation:K?void 0:"none",opacity:(u=Z.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),Xw="PopperArrow",Gw={top:"bottom",right:"left",bottom:"top",left:"right"},Zw=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Kw(Xw,r),a=Gw[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(Bw,ae({},o,{ref:n,style:{...o.style,display:"block"}})))});function Qw(e){return e!==null}const Jw=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]=Xp(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 E="",C="";return b==="bottom"?(E=f?T:`${S}px`,C=`${-h}px`):b==="top"?(E=f?T:`${S}px`,C=`${c.floating.height+h}px`):b==="right"?(E=`${-h}px`,C=f?T:`${v}px`):b==="left"&&(E=`${c.floating.width+h}px`,C=f?T:`${v}px`),{data:{x:E,y:C}}}});function Xp(e){const[t,n="center"]=e.split("-");return[t,n]}const Gp=Ww,Zp=Uw,Qp=qw,e1=Zw,Jp=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}),t1=Jp;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}}))),n1=ds;var r1=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,ev=function(e){return e&&(e.host||ev(e.parentNode))},o1=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ev(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})},i1=function(e,t,n,r){var o=o1(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={})}},tv=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||r1(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),i1(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 nv(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 a1(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",s1="with-scroll-bars-hidden",c1="--removed-body-scroll-bar-size";function u1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function l1(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 d1(e,t){return l1(t||null,function(n){return e.forEach(function(r){return u1(r,n)})})}function f1(e){return e}function h1(e,t){t===void 0&&(t=f1);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 p1(e){e===void 0&&(e={});var t=h1(null);return t.options=xn({async:!0,ssr:!1},e),t}var rv=function(e){var t=e.sideCar,n=nv(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))};rv.isSideCarExport=!0;function v1(e,t){return e.useMedium(t),rv}var ov=p1(),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=nv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),E=m,C=d1([n,t]),I=xn(xn({},v),o);return $e.createElement($e.Fragment,null,d&&$e.createElement(E,{sideCar:ov,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 uf,m1=function(){if(uf)return uf;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function g1(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=m1();return t&&e.setAttribute("nonce",t),e}function y1(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function b1(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var w1=function(){var e=0,t=null;return{add:function(n){e==0&&(t=g1())&&(y1(t,n),b1(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},E1=function(){var e=w1();return function(t,n){$e.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},iv=function(){var e=E1(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},x1={left:0,top:0,right:0,gap:0},qs=function(e){return parseInt(e||"",10)||0},_1=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)]},S1=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return x1;var t=_1(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])}},C1=iv(),$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(
|
|
53
|
+
Check the top-level render call using <`+J+">.")}return V}}function Ht(x,V){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var J=$n(V);if(un[J])return;un[J]=!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.',J,fe),Ot(null)}}function en(x,V){{if(typeof x!="object")return;if(xt(x))for(var J=0;J<x.length;J++){var fe=x[J];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 Re=_e.call(x),Ee;!(Ee=Re.next()).done;)Lt(Ee.value)&&Ht(Ee.value,V)}}}function Nn(x){{var V=x.type;if(V==null||typeof V=="string")return;var J;if(typeof V=="function")J=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===f))J=V.propTypes;else return;if(J){var fe=p(V);ot(J,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),J=0;J<V.length;J++){var fe=V[J];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,J,fe,_e,Re){{var Ee=B(x);if(!Ee){var we="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(we+=" 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?we+=nt:we+=Dn();var Le;x===null?Le="null":xt(x)?Le="array":x!==void 0&&x.$$typeof===t?(Le="<"+(p(x.type)||"Unknown")+" />",we=" 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,we)}var Be=kt(x,V,J,_e,Re);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,J){return Tn(x,V,J,!0)}function nr(x,V,J){return Tn(x,V,J,!1)}var Wt=nr,rr=kn;Hi.Fragment=r,Hi.jsx=Wt,Hi.jsxs=rr}()),Hi}process.env.NODE_ENV==="production"?Cc.exports=v0():Cc.exports=m0();var _t=Cc.exports;const g0=e=>{const t="currentColor";return{...e,color:(()=>e.color?$t.theme.colors[e.color]?$t.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=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:"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})})},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.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=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:"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})})},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:"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})})},xu=x0,_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:"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=_0,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:"M9 5.5v-3H6v3H2v3h4v3h3v-3h13v-3H9ZM18 13.5h-3v3H2v3h13v3h3v-3h4v-3h-4v-3Z",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:"M21 11H3v3h18v-3Z",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:"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})})},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-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})})},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-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})})},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 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})})},k0=N0,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:"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})})},j0=M0,L0=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})})},F0=L0,V0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ob,{className:"accordion-header",children:M.jsxs(Pb,{className:Ie(d0,t),...n,ref:r,children:[M.jsx(et,{className:f0,children:e}),M.jsx(si,{className:s0,size:24,color:$t.theme.colors.black})]})}));var B0={success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)",warning:"var(--_1qe00b211)",error:"var(--_1qe00b214)",neutral:"var(--_1qe00b2e)"},H0=dt({defaultClassName:"_7q2fqh0",variantClassNames:{colorScheme:{success:"_7q2fqh1",info:"_7q2fqh2",warning:"_7q2fqh3",error:"_7q2fqh4",neutral:"_7q2fqh5"}},defaultVariants:{colorScheme:"neutral"},compoundVariants:[]});const Op=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 P0;case"warning":return F0;case"success":return j0;default:return k0}})();return M.jsxs(c,{ref:s,className:Ie(H0({colorScheme:o}),e),"data-test-id":a["data-test-id"],...a,children:[M.jsxs(Yt,{gap:"$16",children:[M.jsx(et,{display:"flex",minW:$t.theme.space[24],children:M.jsx(d,{size:24,color:B0[o||"neutral"]})}),M.jsx(et,{pt:"$2",children:M.jsxs(Pr,{gap:"$8",children:[t&&M.jsx(sn,{textStyle:"body2",as:"span",fontWeight:"$bold",children:t}),M.jsx(et,{children:n})]})})]}),r&&M.jsx(Yt,{pl:"$16",pt:"$4",children:M.jsx(os,{"data-test-id":"VqcF6V40rj6neoaCMaHvB",onClick:i,cursor:"pointer",color:$t.theme.colors.black,size:16})})]})});Op.defaultProps={"data-test-id":void 0,title:void 0,withClose:void 0,onClose:void 0};var W0=dt({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 _u=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 M.jsx(d,{ref:u,"data-test-id":c["data-test-id"],className:Ie(W0({colorScheme:n,variant:o,size:r,isRounded:i}),a),style:s,...c,children:t})});_u.defaultProps={as:"span",colorScheme:"primary",size:"medium",children:void 0,"data-test-id":void 0};_u.displayName="Badge";function Ud(e,[t,n]){return Math.min(n,Math.max(t,e))}function z0(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 $c="dismissableLayer.update",U0="dismissableLayer.pointerDownOutside",Y0="dismissableLayer.focusOutside";let Yd;const Pp=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(Pp),[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),E=f?T.indexOf(f):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,I=E>=v,D=q0(F=>{const k=F.target,B=[...d.branches].some(R=>R.contains(k));!I||B||(i==null||i(F),s==null||s(F),F.defaultPrevented||c==null||c())},h),A=X0(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 z0(F=>{E===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&&(Yd=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Kd(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Yd)}},[f,h,r,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Kd())},[f,d]),l.useEffect(()=>{const F=()=>b({});return document.addEventListener($c,F),()=>document.removeEventListener($c,F)},[]),l.createElement(Ke.div,ae({},u,{ref:y,style:{pointerEvents:C?I?"auto":"none":void 0,...e.style},onFocusCapture:Ae(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Ae(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Ae(e.onPointerDownCapture,D.onPointerDownCapture)}))}),K0=l.forwardRef((e,t)=>{const n=l.useContext(Pp),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 q0(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(){Ap(U0,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 X0(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&&Ap(Y0,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 Kd(){const e=new CustomEvent($c);document.dispatchEvent(e)}function Ap(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?wp(o,i):o.dispatchEvent(i)}const G0=is,Z0=K0;let Ws=0;function Dp(){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:qd()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:qd()),Ws++,()=>{Ws===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Ws--}},[])}function qd(){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",Xd={bubbles:!1,cancelable:!0},Np=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(E){if(h.paused||!s)return;const C=E.target;s.contains(C)?f.current=C:ar(f.current,{select:!0})},T=function(E){if(h.paused||!s)return;const C=E.relatedTarget;C!==null&&(s.contains(C)||ar(f.current,{select:!0}))},S=function(E){const C=document.activeElement;for(const I of E)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){Zd.add(h);const y=document.activeElement;if(!s.contains(y)){const S=new CustomEvent(zs,Xd);s.addEventListener(zs,u),s.dispatchEvent(S),S.defaultPrevented||(Q0(rw(kp(s)),{select:!0}),document.activeElement===y&&ar(s))}return()=>{s.removeEventListener(zs,u),setTimeout(()=>{const S=new CustomEvent(Us,Xd);s.addEventListener(Us,d),s.dispatchEvent(S),S.defaultPrevented||ar(y??document.body,{select:!0}),s.removeEventListener(Us,d),Zd.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,[E,C]=J0(v);E&&C?!y.shiftKey&&S===C?(y.preventDefault(),n&&ar(E,{select:!0})):y.shiftKey&&S===E&&(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 J0(e){const t=kp(e),n=Gd(t,e),r=Gd(t.reverse(),e);return[n,r]}function kp(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 Gd(e,t){for(const n of e)if(!ew(n,{upTo:t}))return n}function ew(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 tw(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&&tw(e)&&t&&e.select()}}const Zd=nw();function nw(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Qd(e,t),e.unshift(t)},remove(t){var n;e=Qd(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Qd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function rw(e){return e.filter(t=>t.tagName!=="A")}const ow=["top","right","bottom","left"],vr=Math.min,fn=Math.max,Ta=Math.round,Wi=Math.floor,mr=e=>({x:e,y:e}),iw={left:"right",right:"left",bottom:"top",top:"bottom"},aw={start:"end",end:"start"};function Tc(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 Su(e){return e==="x"?"y":"x"}function Cu(e){return e==="y"?"height":"width"}function go(e){return["top","bottom"].includes(Zn(e))?"y":"x"}function $u(e){return Su(go(e))}function sw(e,t,n){n===void 0&&(n=!1);const r=mo(e),o=$u(e),i=Cu(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 cw(e){const t=Ia(e);return[Ic(e),t,Ic(t)]}function Ic(e){return e.replace(/start|end/g,t=>aw[t])}function uw(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 lw(e,t,n,r){const o=mo(e);let i=uw(Zn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ic)))),i}function Ia(e){return e.replace(/left|right|bottom|top/g,t=>iw[t])}function dw(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mp(e){return typeof e!="number"?dw(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 Jd(e,t,n){let{reference:r,floating:o}=e;const i=go(t),a=$u(t),s=Cu(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 fw=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}=Jd(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:E,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=E??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}=Jd(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=Mp(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,E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),C=await(i.isElement==null?void 0:i.isElement(E))?await(i.getScale==null?void 0:i.getScale(E))||{x:1,y:1}:{x:1,y:1},I=Ra(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:E,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 ef=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=Mp(u),f={x:n,y:r},m=$u(o),h=Cu(m),b=await a.getDimensions(c),y=m==="y",T=y?"top":"left",S=y?"bottom":"right",v=y?"clientHeight":"clientWidth",E=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 A=E/2-C/2,F=D/2-b[h]/2-1,k=vr(d[T],F),B=vr(d[S],F),R=k,w=D-b[h]-B,p=D/2-b[h]/2+A,$=Tc(R,p,w),j=mo(o)!=null&&p!=$&&i.reference[h]/2-(p<R?k:B)-b[h]/2<0?p<R?R-p:w-p:0;return{[m]:f[m]-j,data:{[m]:$,centerOffset:p-$+j}}}}),hw=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)),E=f||(S||!b?[Ia(a)]:cw(a));!f&&h!=="none"&&E.push(...lw(a,b,h,v));const C=[a,...E],I=await ci(t,y),D=[];let A=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&D.push(I[T]),d){const R=sw(r,i,v);D.push(I[R[0]],I[R[1]])}if(A=[...A,{placement:r,overflows:D}],!D.every(R=>R<=0)){var F,k;const R=(((F=o.flip)==null?void 0:F.index)||0)+1,w=C[R];if(w)return{data:{index:R,overflows:A},reset:{placement:w}};let p=(k=A.filter($=>$.overflows[0]<=0).sort(($,P)=>$.overflows[1]-P.overflows[1])[0])==null?void 0:k.placement;if(!p)switch(m){case"bestFit":{var B;const $=(B=A.map(P=>[P.placement,P.overflows.filter(j=>j>0).reduce((j,W)=>j+W,0)]).sort((P,j)=>P[1]-j[1])[0])==null?void 0:B[0];$&&(p=$);break}case"initialPlacement":p=a;break}if(r!==p)return{reset:{placement:p}}}return{}}}};function tf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nf(e){return ow.some(t=>e[t]>=0)}const pw=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=tf(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:nf(a)}}}case"escaped":{const i=await ci(t,{...o,altBoundary:!0}),a=tf(i,n.floating);return{data:{escapedOffsets:a,escaped:nf(a)}}}default:return{}}}}};async function vw(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 mw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await vw(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},gw=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=Su(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],E=h-d[S];h=Tc(v,h,E)}if(a){const T=f==="y"?"top":"left",S=f==="y"?"bottom":"right",v=b+d[T],E=b-d[S];b=Tc(v,b,E)}const y=s.fn({...t,[m]:h,[f]:b});return{...y,data:{x:y.x-n,y:y.y-r}}}}},yw=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=Su(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 E=m==="y"?"height":"width",C=i.reference[m]-i.floating[E]+T.mainAxis,I=i.reference[m]+i.reference[E]-T.mainAxis;h<C?h=C:h>I&&(h=I)}if(u){var S,v;const E=m==="y"?"width":"height",C=["top","left"].includes(Zn(o)),I=i.reference[f]-i.floating[E]+(C&&((S=a.offset)==null?void 0:S[f])||0)+(C?0:T.crossAxis),D=i.reference[f]+i.reference[E]+(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}}}},bw=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 E=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;E=d||v?vr(T,D):D}if(v&&!d){const D=fn(c.left,0),A=fn(c.right,0),F=fn(c.top,0),k=fn(c.bottom,0);f?C=m-2*(D!==0||A!==0?D+A:fn(c.left,c.right)):E=h-2*(F!==0||k!==0?F+k:fn(c.top,c.bottom))}await a({...t,availableWidth:C,availableHeight:E});const I=await o.getDimensions(i.floating);return m!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function gr(e){return jp(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=(jp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function jp(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 rf(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 ww(e){return["table","td","th"].includes(gr(e))}function Tu(e){const t=Iu(),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 Ew(e){let t=lo(e);for(;Vn(t)&&!as(t);){if(Tu(t))return t;t=lo(t)}return null}function Iu(){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||rf(e)&&e.host||Jn(e);return rf(t)?t.host:t}function Lp(e){const t=lo(e);return as(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vn(t)&&$i(t)?t:Lp(t)}function Oa(e,t){var n;t===void 0&&(t=[]);const r=Lp(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 Fp(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 Ru(e){return Qn(e)?e:e.contextElement}function ro(e){const t=Ru(e);if(!Vn(t))return mr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Fp(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 xw=mr(0);function Vp(e){const t=vn(e);return!Iu()||!t.visualViewport?xw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _w(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=Ru(e);let a=mr(1);t&&(r?Qn(r)&&(a=ro(r)):a=ro(e));const s=_w(i,n,r)?Vp(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,E=T.top+(b.clientTop+parseFloat(S.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=v,u+=E,b=vn(b).frameElement}}return Ra({width:d,height:f,x:c,y:u})}function Sw(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 Cw(e){return Array.from(e.getClientRects())}function Bp(e){return kr(Jn(e)).left+ss(e).scrollLeft}function $w(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+Bp(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 Tw(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=Iu();(!u||u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function Iw(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 of(e,t,n){let r;if(t==="viewport")r=Tw(e,n);else if(t==="document")r=$w(Jn(e));else if(Qn(t))r=Iw(t,n);else{const o=Vp(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ra(r)}function Hp(e,t){const n=lo(e);return n===t||!Qn(n)||as(n)?!1:Cn(n).position==="fixed"||Hp(n,t)}function Rw(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=Tu(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||$i(a)&&!c&&Hp(e,a))?r=r.filter(d=>d!==a):o=s,a=lo(a)}return t.set(e,r),r}function Ow(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Rw(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((u,d)=>{const f=of(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},of(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Pw(e){return Fp(e)}function Aw(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=Bp(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function af(e,t){return!Vn(e)||Cn(e).position==="fixed"?null:t?t(e):e.offsetParent}function Wp(e,t){const n=vn(e);if(!Vn(e))return n;let r=af(e,t);for(;r&&ww(r)&&Cn(r).position==="static";)r=af(r,t);return r&&(gr(r)==="html"||gr(r)==="body"&&Cn(r).position==="static"&&!Tu(r))?n:r||Ew(e)||n}const Dw=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||Wp,i=this.getDimensions;return{reference:Aw(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Nw(e){return Cn(e).direction==="rtl"}const kw={convertOffsetParentRelativeRectToViewportRelativeRect:Sw,getDocumentElement:Jn,getClippingRect:Ow,getOffsetParent:Wp,getElementRects:Dw,getClientRects:Cw,getDimensions:Pw,getScale:ro,isElement:Qn,isRTL:Nw};function Mw(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 E=!0;function C(I){const D=I[0].intersectionRatio;if(D!==c){if(!E)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},100)}E=!1}try{n=new IntersectionObserver(C,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,v)}n.observe(e)}return a(!0),i}function jw(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=Ru(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?Mw(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 Lw=(e,t,n)=>{const r=new Map,o={platform:kw,...n},i={...o.platform,_c:r};return fw(e,t,{...o,platform:i})},Fw=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?ef({element:r.current,padding:o}).fn(n):{}:r?ef({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 zp(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sf(e,t){const n=zp(e);return Math.round(t*n)/n}function cf(e){const t=$e.useRef(e);return fa(()=>{t.current=e}),t}function Vw(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(j=>{j!=D.current&&(D.current=j,y(j))},[y]),E=$e.useCallback(j=>{j!==A.current&&(A.current=j,S(j))},[S]),C=i||b,I=a||T,D=$e.useRef(null),A=$e.useRef(null),F=$e.useRef(d),k=cf(c),B=cf(o),R=$e.useCallback(()=>{if(!D.current||!A.current)return;const j={placement:t,strategy:n,middleware:m};B.current&&(j.platform=B.current),Lw(D.current,A.current,j).then(W=>{const Y={...W,isPositioned:!0};w.current&&!Pa(F.current,Y)&&(F.current=Y,Hy.flushSync(()=>{f(Y)}))})},[m,t,n,B]);fa(()=>{u===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[u]);const w=$e.useRef(!1);fa(()=>(w.current=!0,()=>{w.current=!1}),[]),fa(()=>{if(C&&(D.current=C),I&&(A.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:A,setReference:v,setFloating:E}),[v,E]),$=$e.useMemo(()=>({reference:C,floating:I}),[C,I]),P=$e.useMemo(()=>{const j={position:n,left:0,top:0};if(!$.floating)return j;const W=sf($.floating,d.x),Y=sf($.floating,d.y);return s?{...j,transform:"translate("+W+"px, "+Y+"px)",...zp($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:Y}},[n,s,$.floating,d.x,d.y]);return $e.useMemo(()=>({...d,update:R,refs:p,elements:$,floatingStyles:P}),[d,R,p,$,P])}const Bw=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"}))}),Hw=Bw;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 Up="Popper",[Yp,us]=mn(Up),[Ww,Kp]=Yp(Up),zw=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return l.createElement(Ww,{scope:t,anchor:r,onAnchorChange:o},n)},Uw="PopperAnchor",Yw=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Kp(Uw,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}))}),qp="PopperContent",[Kw,qw]=Yp(qp),Xw=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:E=!1,avoidCollisions:C=!0,onPlaced:I,...D}=e,A=Kp(qp,d),[F,k]=l.useState(null),B=st(t,Te=>k(Te)),[R,w]=l.useState(null),p=cs(R),$=(n=p==null?void 0:p.width)!==null&&n!==void 0?n:0,P=(r=p==null?void 0:p.height)!==null&&r!==void 0?r:0,j=f+(h!=="center"?"-"+h:""),W=typeof S=="number"?S:{top:0,right:0,bottom:0,left:0,...S},Y=Array.isArray(T)?T:[T],ne=Y.length>0,H={padding:W,boundary:Y.filter(Jw),altBoundary:ne},{refs:L,floatingStyles:oe,placement:G,isPositioned:K,middlewareData:Z}=Vw({strategy:"fixed",placement:j,whileElementsMounted:jw,elements:{reference:A.anchor},middleware:[mw({mainAxis:m+P,alignmentAxis:b}),C&&gw({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?yw():void 0,...H}),C&&hw({...H}),bw({...H,apply:({elements:Te,rects:Pe,availableWidth:Ne,availableHeight:Oe})=>{const{width:We,height:De}=Pe.reference,ot=Te.floating.style;ot.setProperty("--radix-popper-available-width",`${Ne}px`),ot.setProperty("--radix-popper-available-height",`${Oe}px`),ot.setProperty("--radix-popper-anchor-width",`${We}px`),ot.setProperty("--radix-popper-anchor-height",`${De}px`)}}),R&&Fw({element:R,padding:y}),e1({arrowWidth:$,arrowHeight:P}),E&&pw({strategy:"referenceHidden"})]}),[ce,z]=Xp(G),U=cn(I);Gt(()=>{K&&(U==null||U())},[K,U]);const ee=(o=Z.arrow)===null||o===void 0?void 0:o.x,Q=(i=Z.arrow)===null||i===void 0?void 0:i.y,ie=((a=Z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[re,me]=l.useState();return Gt(()=>{F&&me(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:re,"--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(Kw,{scope:d,placedSide:ce,onArrowChange:w,arrowX:ee,arrowY:Q,shouldHideArrow:ie},l.createElement(Ke.div,ae({"data-side":ce,"data-align":z},D,{ref:B,style:{...D.style,animation:K?void 0:"none",opacity:(u=Z.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),Gw="PopperArrow",Zw={top:"bottom",right:"left",bottom:"top",left:"right"},Qw=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=qw(Gw,r),a=Zw[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(Hw,ae({},o,{ref:n,style:{...o.style,display:"block"}})))});function Jw(e){return e!==null}const e1=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]=Xp(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 E="",C="";return b==="bottom"?(E=f?T:`${S}px`,C=`${-h}px`):b==="top"?(E=f?T:`${S}px`,C=`${c.floating.height+h}px`):b==="right"?(E=`${-h}px`,C=f?T:`${v}px`):b==="left"&&(E=`${c.floating.width+h}px`,C=f?T:`${v}px`),{data:{x:E,y:C}}}});function Xp(e){const[t,n="center"]=e.split("-");return[t,n]}const Gp=zw,Zp=Yw,Qp=Xw,t1=Qw,Jp=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}),n1=Jp;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}}))),r1=ds;var o1=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,ev=function(e){return e&&(e.host||ev(e.parentNode))},i1=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ev(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})},a1=function(e,t,n,r){var o=i1(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={})}},tv=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||o1(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),a1(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 nv(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 s1(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",c1="with-scroll-bars-hidden",u1="--removed-body-scroll-bar-size";function l1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function d1(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 f1(e,t){return d1(t||null,function(n){return e.forEach(function(r){return l1(r,n)})})}function h1(e){return e}function p1(e,t){t===void 0&&(t=h1);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 v1(e){e===void 0&&(e={});var t=p1(null);return t.options=xn({async:!0,ssr:!1},e),t}var rv=function(e){var t=e.sideCar,n=nv(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))};rv.isSideCarExport=!0;function m1(e,t){return e.useMedium(t),rv}var ov=v1(),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=nv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),E=m,C=f1([n,t]),I=xn(xn({},v),o);return $e.createElement($e.Fragment,null,d&&$e.createElement(E,{sideCar:ov,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 uf,g1=function(){if(uf)return uf;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function y1(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=g1();return t&&e.setAttribute("nonce",t),e}function b1(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function w1(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var E1=function(){var e=0,t=null;return{add:function(n){e==0&&(t=y1())&&(b1(t,n),w1(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},x1=function(){var e=E1();return function(t,n){$e.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},iv=function(){var e=x1(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},_1={left:0,top:0,right:0,gap:0},qs=function(e){return parseInt(e||"",10)||0},S1=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)]},C1=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return _1;var t=S1(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])}},$1=iv(),T1=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(c1,` {
|
|
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 <`+J+">.")}return V}}function Ht(x,V){{if(
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
body {
|
|
88
|
-
`).concat(
|
|
88
|
+
`).concat(u1,": ").concat(s,`px;
|
|
89
89
|
}
|
|
90
|
-
`)},
|
|
90
|
+
`)},I1=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=$e.useMemo(function(){return C1(o)},[o]);return $e.createElement($1,{styles:T1(i,!t,o,n?"":"!important")})},Rc=!1;if(typeof window<"u")try{var Yi=Object.defineProperty({},"passive",{get:function(){return Rc=!0,!0}});window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch{Rc=!1}var zr=Rc?{passive:!1}:!1,R1=function(e){return e.tagName==="TEXTAREA"},av=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!R1(e)&&n[t]==="visible")},O1=function(e){return av(e,"overflowY")},P1=function(e){return av(e,"overflowX")},lf=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=sv(e,n);if(r){var o=cv(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},A1=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},D1=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},sv=function(e,t){return e==="v"?O1(t):P1(t)},cv=function(e,t){return e==="v"?A1(t):D1(t)},N1=function(e,t){return e==="h"&&t==="rtl"?-1:1},k1=function(e,t,n,r,o){var i=N1(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=cv(e,s),b=h[0],y=h[1],T=h[2],S=y-T-i*b;(b||S)&&sv(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]},df=function(e){return[e.deltaX,e.deltaY]},ff=function(e){return e&&"current"in e?e.current:e},M1=function(e,t){return e[0]===t[0]&&e[1]===t[1]},j1=function(e){return`
|
|
91
91
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
92
92
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
93
|
-
`)},j1=0,Ur=[];function L1(e){var t=$e.useRef([]),n=$e.useRef([0,0]),r=$e.useRef(),o=$e.useState(j1++)[0],i=$e.useState(function(){return iv()})[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=a1([e.lockRef.current],(e.shards||[]).map(ff),!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,E="deltaX"in y?y.deltaX:v[0]-S[0],C="deltaY"in y?y.deltaY:v[1]-S[1],I,D=y.target,A=Math.abs(E)>Math.abs(C)?"h":"v";if("touches"in y&&A==="h"&&D.type==="range")return!1;var F=lf(A,D);if(!F)return!0;if(F?I=A:(I=A==="v"?"h":"v",F=lf(A,D)),!F)return!1;if(!r.current&&"changedTouches"in y&&(E||C)&&(r.current=I),!I)return!0;var k=r.current||I;return N1(k,T,y,k==="h"?E:C,!0)},[]),c=$e.useCallback(function(y){var T=y;if(!(!Ur.length||Ur[Ur.length-1]!==i)){var S="deltaY"in T?df(T):Ki(T),v=t.current.filter(function(I){return I.name===T.type&&I.target===T.target&&k1(I.delta,S)})[0];if(v&&v.should){T.cancelable&&T.preventDefault();return}if(!v){var E=(a.current.shards||[]).map(ff).filter(Boolean).filter(function(I){return I.contains(T.target)}),C=E.length>0?s(T,E[0]):!a.current.noIsolation;C&&T.cancelable&&T.preventDefault()}}},[]),u=$e.useCallback(function(y,T,S,v){var E={name:y,delta:T,target:S,should:v};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(C){return C!==E})},1)},[]),d=$e.useCallback(function(y){n.current=Ki(y),r.current=void 0},[]),f=$e.useCallback(function(y){u(y.type,df(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:M1(o)}):null,h?$e.createElement(T1,{gapMode:"margin"}):null)}const F1=v1(ov,L1);var uv=$e.forwardRef(function(e,t){return $e.createElement(fs,xn({},e,{ref:t,sideCar:F1}))});uv.classNames=fs.classNames;const lv=uv,V1=[" ","Enter","ArrowUp","ArrowDown"],B1=[" ","Enter"],hs="Select",[ps,vs,H1]=Ja(hs),[yo,$P]=mn(hs,[H1,us]),Ou=us(),[W1,Vr]=yo(hs),[z1,U1]=yo(hs),Y1=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=Ou(t),[y,T]=l.useState(null),[S,v]=l.useState(null),[E,C]=l.useState(!1),I=es(u),[D=!1,A]=Sn({prop:r,defaultProp:o,onChange:i}),[F,k]=Sn({prop:a,defaultProp:s,onChange:c}),B=l.useRef(null),R=y?!!y.closest("form"):!0,[w,p]=l.useState(new Set),$=Array.from(w).map(P=>P.props.value).join(";");return l.createElement(Gp,b,l.createElement(W1,{required:h,scope:t,trigger:y,onTriggerChange:T,valueNode:S,onValueNodeChange:v,valueNodeHasChildren:E,onValueNodeHasChildrenChange:C,contentId:Xn(),value:F,onValueChange:k,open:D,onOpenChange:A,dir:I,triggerPointerDownPosRef:B,disabled:m},l.createElement(ps.Provider,{scope:t},l.createElement(z1,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(P=>{p(j=>new Set(j).add(P))},[]),onNativeOptionRemove:l.useCallback(P=>{p(j=>{const W=new Set(j);return W.delete(P),W})},[])},n)),R?l.createElement(hv,{key:$,"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:f,value:F,onChange:P=>k(P.target.value),disabled:m},F===void 0?l.createElement("option",{value:""}):null,Array.from(w)):null))},K1="SelectTrigger",q1=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Ou(n),a=Vr(K1,n),s=a.disabled||r,c=st(t,a.onTriggerChange),u=vs(n),[d,f,m]=pv(b=>{const y=u().filter(v=>!v.disabled),T=y.find(v=>v.value===a.value),S=vv(y,b,T);S!==void 0&&a.onValueChange(S.value)}),h=()=>{s||(a.onOpenChange(!0),m())};return l.createElement(Zp,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===" ")&&V1.includes(b.key)&&(h(),b.preventDefault())})})))}),X1="SelectValue",G1=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,c=Vr(X1,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)}),Z1=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(dv,{scope:e.__scopeSelect},l.createElement(ps.Slot,{scope:e.__scopeSelect},l.createElement("div",null,e.children))),i):null}return l.createElement(J1,ae({},e,{ref:t}))}),Yn=10,[dv,Br]=yo(fo),J1=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),[E,C]=l.useState(null),[I,D]=l.useState(null),A=st(t,z=>C(z)),[F,k]=l.useState(null),[B,R]=l.useState(null),w=vs(n),[p,$]=l.useState(!1),P=l.useRef(!1);l.useEffect(()=>{if(E)return tv(E)},[E]),Dp();const j=l.useCallback(z=>{const[U,...ee]=w().map(re=>re.ref.current),[Q]=ee.slice(-1),ie=document.activeElement;for(const re of z)if(re===ie||(re==null||re.scrollIntoView({block:"nearest"}),re===U&&I&&(I.scrollTop=0),re===Q&&I&&(I.scrollTop=I.scrollHeight),re==null||re.focus(),document.activeElement!==ie))return},[w,I]),W=l.useCallback(()=>j([F,E]),[j,F,E]);l.useEffect(()=>{p&&W()},[p,W]);const{onOpenChange:Y,triggerPointerDownPosRef:ne}=v;l.useEffect(()=>{if(E){let z={x:0,y:0};const U=Q=>{var ie,re,me,Te;z={x:Math.abs(Math.round(Q.pageX)-((ie=(re=ne.current)===null||re===void 0?void 0:re.x)!==null&&ie!==void 0?ie:0)),y:Math.abs(Math.round(Q.pageY)-((me=(Te=ne.current)===null||Te===void 0?void 0:Te.y)!==null&&me!==void 0?me:0))}},ee=Q=>{z.x<=10&&z.y<=10?Q.preventDefault():E.contains(Q.target)||Y(!1),document.removeEventListener("pointermove",U),ne.current=null};return ne.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",ee,{capture:!0})}}},[E,Y,ne]),l.useEffect(()=>{const z=()=>Y(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[Y]);const[H,L]=pv(z=>{const U=w().filter(ie=>!ie.disabled),ee=U.find(ie=>ie.ref.current===document.activeElement),Q=vv(U,z,ee);Q&&setTimeout(()=>Q.ref.current.focus())}),oe=l.useCallback((z,U,ee)=>{const Q=!P.current&&!ee;(v.value!==void 0&&v.value===U||Q)&&(k(z),Q&&(P.current=!0))},[v.value]),G=l.useCallback(()=>E==null?void 0:E.focus(),[E]),K=l.useCallback((z,U,ee)=>{const Q=!P.current&&!ee;(v.value!==void 0&&v.value===U||Q)&&R(z)},[v.value]),Z=r==="popper"?hf:eE,ce=Z===hf?{side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:b,hideWhenDetached:y,avoidCollisions:T}:{};return l.createElement(dv,{scope:n,content:E,viewport:I,onViewportChange:D,itemRefCallback:oe,selectedItem:F,onItemLeave:G,itemTextRefCallback:K,focusSelectedItem:W,selectedItemText:B,position:r,isPositioned:p,searchRef:H},l.createElement(lv,{as:uo,allowPinchZoom:!0},l.createElement(Np,{asChild:!0,trapped:v.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Ae(o,z=>{var U;(U=v.trigger)===null||U===void 0||U.focus({preventScroll:!0}),z.preventDefault()})},l.createElement(is,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>v.onOpenChange(!1)},l.createElement(Z,ae({role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:z=>z.preventDefault()},S,ce,{onPlaced:()=>$(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Ae(S.onKeyDown,z=>{const U=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!U&&z.key.length===1&&L(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let Q=w().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(z.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const ie=z.target,re=Q.indexOf(ie);Q=Q.slice(re+1)}setTimeout(()=>j(Q)),z.preventDefault()}})}))))))}),eE=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,A=>d(A)),m=vs(n),h=l.useRef(!1),b=l.useRef(!0),{viewport:y,selectedItem:T,selectedItemText:S,focusSelectedItem:v}=a,E=l.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&y&&T&&S){const A=i.trigger.getBoundingClientRect(),F=u.getBoundingClientRect(),k=i.valueNode.getBoundingClientRect(),B=S.getBoundingClientRect();if(i.dir!=="rtl"){const ie=B.left-F.left,re=k.left-ie,me=A.left-re,Te=A.width+me,Pe=Math.max(Te,F.width),Ne=window.innerWidth-Yn,Oe=Ud(re,[Yn,Ne-Pe]);s.style.minWidth=Te+"px",s.style.left=Oe+"px"}else{const ie=F.right-B.right,re=window.innerWidth-k.right-ie,me=window.innerWidth-A.right-re,Te=A.width+me,Pe=Math.max(Te,F.width),Ne=window.innerWidth-Yn,Oe=Ud(re,[Yn,Ne-Pe]);s.style.minWidth=Te+"px",s.style.right=Oe+"px"}const R=m(),w=window.innerHeight-Yn*2,p=y.scrollHeight,$=window.getComputedStyle(u),P=parseInt($.borderTopWidth,10),j=parseInt($.paddingTop,10),W=parseInt($.borderBottomWidth,10),Y=parseInt($.paddingBottom,10),ne=P+j+p+Y+W,H=Math.min(T.offsetHeight*5,ne),L=window.getComputedStyle(y),oe=parseInt(L.paddingTop,10),G=parseInt(L.paddingBottom,10),K=A.top+A.height/2-Yn,Z=w-K,ce=T.offsetHeight/2,z=T.offsetTop+ce,U=P+j+z,ee=ne-U;if(U<=K){const ie=T===R[R.length-1].ref.current;s.style.bottom="0px";const re=u.clientHeight-y.offsetTop-y.offsetHeight,me=Math.max(Z,ce+(ie?G:0)+re+W),Te=U+me;s.style.height=Te+"px"}else{const ie=T===R[0].ref.current;s.style.top="0px";const me=Math.max(K,P+y.offsetTop+(ie?oe:0)+ce)+ee;s.style.height=me+"px",y.scrollTop=U-K+y.offsetTop}s.style.margin=`${Yn}px 0`,s.style.minHeight=H+"px",s.style.maxHeight=w+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[m,i.trigger,i.valueNode,s,u,y,T,S,i.dir,r]);Gt(()=>E(),[E]);const[C,I]=l.useState();Gt(()=>{u&&I(window.getComputedStyle(u).zIndex)},[u]);const D=l.useCallback(A=>{A&&b.current===!0&&(E(),v==null||v(),b.current=!1)},[E,v]);return l.createElement(tE,{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}}))))}),hf=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Yn,...i}=e,a=Ou(n);return l.createElement(Qp,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)"}}))}),[tE,Pu]=yo(fo,{}),pf="SelectViewport",nE=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Br(pf,n),i=Pu(pf,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),E=S-v;d.style.height=v+"px",d.style.bottom==="0px"&&(u.scrollTop=E>0?E:0,d.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),rE="SelectGroup";yo(rE);const Oc="SelectItem",[oE,iE]=yo(Oc),aE=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Vr(Oc,n),c=Br(Oc,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(oE,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:l.useCallback(S=>{f(v=>{var E;return v||((E=S==null?void 0:S.textContent)!==null&&E!==void 0?E:"").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===" "||(B1.includes(S.key)&&T(),S.key===" "&&S.preventDefault())})}))))}),qi="SelectItemText",sE=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Vr(qi,n),s=Br(qi,n),c=iE(qi,n),u=U1(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)}),vf="SelectScrollUpButton",cE=l.forwardRef((e,t)=>{const n=Br(vf,e.__scopeSelect),r=Pu(vf,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(fv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}})):null}),mf="SelectScrollDownButton",uE=l.forwardRef((e,t)=>{const n=Br(mf,e.__scopeSelect),r=Pu(mf,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(fv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}})):null}),fv=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()})}))}),hv=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})))});hv.displayName="BubbleSelect";function pv(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 vv(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=lE(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 lE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const dE=Y1,fE=q1,hE=G1,pE=Z1,vE=Q1,mE=nE,gE=aE,yE=sE,bE=cE,wE=uE;var EE=pt({defaultClassName:"_1639370",variantClassNames:{place:{left:"_1639371",right:"_1639372"},state:{default:"_1639373",error:"_1639374",valid:"_1639375",disabled:"_1639376"}},defaultVariants:{state:"default"},compoundVariants:[]});var xE=pt({defaultClassName:"qormpv0",variantClassNames:{isDisabled:{true:"qormpv1"}},defaultVariants:{isDisabled:!1},compoundVariants:[]});var _E=pt({defaultClassName:"_1kg30951",variantClassNames:{state:{default:"_1kg30952",error:"_1kg30953",valid:"_1kg30954",disabled:"_1kg30955"}},defaultVariants:{state:"default"},compoundVariants:[]}),SE="_1kg30950";var CE="ldkv8w2",$E="ldkv8w1",TE="ldkv8w0",IE="ldkv8w3";var RE="yihd6a0",OE=pt({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"]]}),PE="_18kp58y0";const Pc=({formState:e,place:t,children:n})=>M.jsx("div",{className:Re(EE({state:e,place:t})),children:M.jsx(sn,{textStyle:"body2",children:n})});Pc.displayName="Addon";const Au=({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,E=!!r,C=!!i,I=!!a,D=!!s,A=Au({isError:c,isDisabled:u,isValid:d}),F=l.useCallback(()=>A==="disabled"?"$blackTypoMedium":A==="error"?"$redAccent1":A==="valid"?"$greenAccent1":"$blackTypoMedium",[A]),k=()=>c&&D?M.jsx(sn,{textStyle:"caption",color:F(),children:s}):b&&typeof t=="string"?M.jsx(sn,{textStyle:"caption",children:t}):b?t:null;return M.jsxs("div",{"data-test-id":"CT_Field_Container",className:Re(SE),onClick:h,children:[M.jsx("div",{className:Re(_E({state:A}),f),children:M.jsxs(Yt,{justifyContent:"space-between",alignItems:"stretch",wrap:"nowrap",children:[v&&M.jsx(Pc,{formState:A,place:"left",children:o}),C&&i,M.jsx("div",{className:Re(RE,m),children:e}),I&&a,E&&M.jsx(Pc,{formState:A,place:"right",children:r})]})}),(S||D)&&M.jsxs(Yt,{justifyContent:T?"flex-end":"space-between",alignItems:"center",mt:"$6",children:[k(),y&&typeof n=="string"?M.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 Ac(e,t){return Ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Ac(e,t)}function Du(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ac(e,t)}var Dc={exports:{}},Xi={exports:{}},ft={};/** @license React v16.13.1
|
|
93
|
+
`)},L1=0,Ur=[];function F1(e){var t=$e.useRef([]),n=$e.useRef([0,0]),r=$e.useRef(),o=$e.useState(L1++)[0],i=$e.useState(function(){return iv()})[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=s1([e.lockRef.current],(e.shards||[]).map(ff),!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,E="deltaX"in y?y.deltaX:v[0]-S[0],C="deltaY"in y?y.deltaY:v[1]-S[1],I,D=y.target,A=Math.abs(E)>Math.abs(C)?"h":"v";if("touches"in y&&A==="h"&&D.type==="range")return!1;var F=lf(A,D);if(!F)return!0;if(F?I=A:(I=A==="v"?"h":"v",F=lf(A,D)),!F)return!1;if(!r.current&&"changedTouches"in y&&(E||C)&&(r.current=I),!I)return!0;var k=r.current||I;return k1(k,T,y,k==="h"?E:C,!0)},[]),c=$e.useCallback(function(y){var T=y;if(!(!Ur.length||Ur[Ur.length-1]!==i)){var S="deltaY"in T?df(T):Ki(T),v=t.current.filter(function(I){return I.name===T.type&&I.target===T.target&&M1(I.delta,S)})[0];if(v&&v.should){T.cancelable&&T.preventDefault();return}if(!v){var E=(a.current.shards||[]).map(ff).filter(Boolean).filter(function(I){return I.contains(T.target)}),C=E.length>0?s(T,E[0]):!a.current.noIsolation;C&&T.cancelable&&T.preventDefault()}}},[]),u=$e.useCallback(function(y,T,S,v){var E={name:y,delta:T,target:S,should:v};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(C){return C!==E})},1)},[]),d=$e.useCallback(function(y){n.current=Ki(y),r.current=void 0},[]),f=$e.useCallback(function(y){u(y.type,df(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:j1(o)}):null,h?$e.createElement(I1,{gapMode:"margin"}):null)}const V1=m1(ov,F1);var uv=$e.forwardRef(function(e,t){return $e.createElement(fs,xn({},e,{ref:t,sideCar:V1}))});uv.classNames=fs.classNames;const lv=uv,B1=[" ","Enter","ArrowUp","ArrowDown"],H1=[" ","Enter"],hs="Select",[ps,vs,W1]=Ja(hs),[yo,IP]=mn(hs,[W1,us]),Ou=us(),[z1,Vr]=yo(hs),[U1,Y1]=yo(hs),K1=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=Ou(t),[y,T]=l.useState(null),[S,v]=l.useState(null),[E,C]=l.useState(!1),I=es(u),[D=!1,A]=Sn({prop:r,defaultProp:o,onChange:i}),[F,k]=Sn({prop:a,defaultProp:s,onChange:c}),B=l.useRef(null),R=y?!!y.closest("form"):!0,[w,p]=l.useState(new Set),$=Array.from(w).map(P=>P.props.value).join(";");return l.createElement(Gp,b,l.createElement(z1,{required:h,scope:t,trigger:y,onTriggerChange:T,valueNode:S,onValueNodeChange:v,valueNodeHasChildren:E,onValueNodeHasChildrenChange:C,contentId:Xn(),value:F,onValueChange:k,open:D,onOpenChange:A,dir:I,triggerPointerDownPosRef:B,disabled:m},l.createElement(ps.Provider,{scope:t},l.createElement(U1,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(P=>{p(j=>new Set(j).add(P))},[]),onNativeOptionRemove:l.useCallback(P=>{p(j=>{const W=new Set(j);return W.delete(P),W})},[])},n)),R?l.createElement(hv,{key:$,"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:f,value:F,onChange:P=>k(P.target.value),disabled:m},F===void 0?l.createElement("option",{value:""}):null,Array.from(w)):null))},q1="SelectTrigger",X1=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Ou(n),a=Vr(q1,n),s=a.disabled||r,c=st(t,a.onTriggerChange),u=vs(n),[d,f,m]=pv(b=>{const y=u().filter(v=>!v.disabled),T=y.find(v=>v.value===a.value),S=vv(y,b,T);S!==void 0&&a.onValueChange(S.value)}),h=()=>{s||(a.onOpenChange(!0),m())};return l.createElement(Zp,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===" ")&&B1.includes(b.key)&&(h(),b.preventDefault())})})))}),G1="SelectValue",Z1=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,c=Vr(G1,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",J1=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(dv,{scope:e.__scopeSelect},l.createElement(ps.Slot,{scope:e.__scopeSelect},l.createElement("div",null,e.children))),i):null}return l.createElement(eE,ae({},e,{ref:t}))}),Yn=10,[dv,Br]=yo(fo),eE=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),[E,C]=l.useState(null),[I,D]=l.useState(null),A=st(t,z=>C(z)),[F,k]=l.useState(null),[B,R]=l.useState(null),w=vs(n),[p,$]=l.useState(!1),P=l.useRef(!1);l.useEffect(()=>{if(E)return tv(E)},[E]),Dp();const j=l.useCallback(z=>{const[U,...ee]=w().map(re=>re.ref.current),[Q]=ee.slice(-1),ie=document.activeElement;for(const re of z)if(re===ie||(re==null||re.scrollIntoView({block:"nearest"}),re===U&&I&&(I.scrollTop=0),re===Q&&I&&(I.scrollTop=I.scrollHeight),re==null||re.focus(),document.activeElement!==ie))return},[w,I]),W=l.useCallback(()=>j([F,E]),[j,F,E]);l.useEffect(()=>{p&&W()},[p,W]);const{onOpenChange:Y,triggerPointerDownPosRef:ne}=v;l.useEffect(()=>{if(E){let z={x:0,y:0};const U=Q=>{var ie,re,me,Te;z={x:Math.abs(Math.round(Q.pageX)-((ie=(re=ne.current)===null||re===void 0?void 0:re.x)!==null&&ie!==void 0?ie:0)),y:Math.abs(Math.round(Q.pageY)-((me=(Te=ne.current)===null||Te===void 0?void 0:Te.y)!==null&&me!==void 0?me:0))}},ee=Q=>{z.x<=10&&z.y<=10?Q.preventDefault():E.contains(Q.target)||Y(!1),document.removeEventListener("pointermove",U),ne.current=null};return ne.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",ee,{capture:!0})}}},[E,Y,ne]),l.useEffect(()=>{const z=()=>Y(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[Y]);const[H,L]=pv(z=>{const U=w().filter(ie=>!ie.disabled),ee=U.find(ie=>ie.ref.current===document.activeElement),Q=vv(U,z,ee);Q&&setTimeout(()=>Q.ref.current.focus())}),oe=l.useCallback((z,U,ee)=>{const Q=!P.current&&!ee;(v.value!==void 0&&v.value===U||Q)&&(k(z),Q&&(P.current=!0))},[v.value]),G=l.useCallback(()=>E==null?void 0:E.focus(),[E]),K=l.useCallback((z,U,ee)=>{const Q=!P.current&&!ee;(v.value!==void 0&&v.value===U||Q)&&R(z)},[v.value]),Z=r==="popper"?hf:tE,ce=Z===hf?{side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:h,sticky:b,hideWhenDetached:y,avoidCollisions:T}:{};return l.createElement(dv,{scope:n,content:E,viewport:I,onViewportChange:D,itemRefCallback:oe,selectedItem:F,onItemLeave:G,itemTextRefCallback:K,focusSelectedItem:W,selectedItemText:B,position:r,isPositioned:p,searchRef:H},l.createElement(lv,{as:uo,allowPinchZoom:!0},l.createElement(Np,{asChild:!0,trapped:v.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Ae(o,z=>{var U;(U=v.trigger)===null||U===void 0||U.focus({preventScroll:!0}),z.preventDefault()})},l.createElement(is,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>v.onOpenChange(!1)},l.createElement(Z,ae({role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:z=>z.preventDefault()},S,ce,{onPlaced:()=>$(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Ae(S.onKeyDown,z=>{const U=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!U&&z.key.length===1&&L(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let Q=w().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(z.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const ie=z.target,re=Q.indexOf(ie);Q=Q.slice(re+1)}setTimeout(()=>j(Q)),z.preventDefault()}})}))))))}),tE=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,A=>d(A)),m=vs(n),h=l.useRef(!1),b=l.useRef(!0),{viewport:y,selectedItem:T,selectedItemText:S,focusSelectedItem:v}=a,E=l.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&y&&T&&S){const A=i.trigger.getBoundingClientRect(),F=u.getBoundingClientRect(),k=i.valueNode.getBoundingClientRect(),B=S.getBoundingClientRect();if(i.dir!=="rtl"){const ie=B.left-F.left,re=k.left-ie,me=A.left-re,Te=A.width+me,Pe=Math.max(Te,F.width),Ne=window.innerWidth-Yn,Oe=Ud(re,[Yn,Ne-Pe]);s.style.minWidth=Te+"px",s.style.left=Oe+"px"}else{const ie=F.right-B.right,re=window.innerWidth-k.right-ie,me=window.innerWidth-A.right-re,Te=A.width+me,Pe=Math.max(Te,F.width),Ne=window.innerWidth-Yn,Oe=Ud(re,[Yn,Ne-Pe]);s.style.minWidth=Te+"px",s.style.right=Oe+"px"}const R=m(),w=window.innerHeight-Yn*2,p=y.scrollHeight,$=window.getComputedStyle(u),P=parseInt($.borderTopWidth,10),j=parseInt($.paddingTop,10),W=parseInt($.borderBottomWidth,10),Y=parseInt($.paddingBottom,10),ne=P+j+p+Y+W,H=Math.min(T.offsetHeight*5,ne),L=window.getComputedStyle(y),oe=parseInt(L.paddingTop,10),G=parseInt(L.paddingBottom,10),K=A.top+A.height/2-Yn,Z=w-K,ce=T.offsetHeight/2,z=T.offsetTop+ce,U=P+j+z,ee=ne-U;if(U<=K){const ie=T===R[R.length-1].ref.current;s.style.bottom="0px";const re=u.clientHeight-y.offsetTop-y.offsetHeight,me=Math.max(Z,ce+(ie?G:0)+re+W),Te=U+me;s.style.height=Te+"px"}else{const ie=T===R[0].ref.current;s.style.top="0px";const me=Math.max(K,P+y.offsetTop+(ie?oe:0)+ce)+ee;s.style.height=me+"px",y.scrollTop=U-K+y.offsetTop}s.style.margin=`${Yn}px 0`,s.style.minHeight=H+"px",s.style.maxHeight=w+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[m,i.trigger,i.valueNode,s,u,y,T,S,i.dir,r]);Gt(()=>E(),[E]);const[C,I]=l.useState();Gt(()=>{u&&I(window.getComputedStyle(u).zIndex)},[u]);const D=l.useCallback(A=>{A&&b.current===!0&&(E(),v==null||v(),b.current=!1)},[E,v]);return l.createElement(nE,{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}}))))}),hf=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Yn,...i}=e,a=Ou(n);return l.createElement(Qp,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)"}}))}),[nE,Pu]=yo(fo,{}),pf="SelectViewport",rE=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Br(pf,n),i=Pu(pf,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),E=S-v;d.style.height=v+"px",d.style.bottom==="0px"&&(u.scrollTop=E>0?E:0,d.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),oE="SelectGroup";yo(oE);const Oc="SelectItem",[iE,aE]=yo(Oc),sE=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Vr(Oc,n),c=Br(Oc,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(iE,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:l.useCallback(S=>{f(v=>{var E;return v||((E=S==null?void 0:S.textContent)!==null&&E!==void 0?E:"").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===" "||(H1.includes(S.key)&&T(),S.key===" "&&S.preventDefault())})}))))}),qi="SelectItemText",cE=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Vr(qi,n),s=Br(qi,n),c=aE(qi,n),u=Y1(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)}),vf="SelectScrollUpButton",uE=l.forwardRef((e,t)=>{const n=Br(vf,e.__scopeSelect),r=Pu(vf,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(fv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}})):null}),mf="SelectScrollDownButton",lE=l.forwardRef((e,t)=>{const n=Br(mf,e.__scopeSelect),r=Pu(mf,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(fv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}})):null}),fv=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()})}))}),hv=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})))});hv.displayName="BubbleSelect";function pv(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 vv(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=dE(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 dE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const fE=K1,hE=X1,pE=Z1,vE=Q1,mE=J1,gE=rE,yE=sE,bE=cE,wE=uE,EE=lE;var xE=dt({defaultClassName:"_1639370",variantClassNames:{place:{left:"_1639371",right:"_1639372"},state:{default:"_1639373",error:"_1639374",valid:"_1639375",disabled:"_1639376"}},defaultVariants:{state:"default"},compoundVariants:[]});var _E=dt({defaultClassName:"qormpv0",variantClassNames:{isDisabled:{true:"qormpv1"}},defaultVariants:{isDisabled:!1},compoundVariants:[]});var SE=dt({defaultClassName:"_1kg30951",variantClassNames:{state:{default:"_1kg30952",error:"_1kg30953",valid:"_1kg30954",disabled:"_1kg30955"}},defaultVariants:{state:"default"},compoundVariants:[]}),CE="_1kg30950";var $E="ldkv8w2",TE="ldkv8w1",IE="ldkv8w0",RE="ldkv8w3";var OE="yihd6a0",PE=dt({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"]]}),AE="_18kp58y0";const Pc=({formState:e,place:t,children:n})=>M.jsx("div",{className:Ie(xE({state:e,place:t})),children:M.jsx(sn,{textStyle:"body2",children:n})});Pc.displayName="Addon";const Au=({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,E=!!r,C=!!i,I=!!a,D=!!s,A=Au({isError:c,isDisabled:u,isValid:d}),F=l.useCallback(()=>A==="disabled"?"$blackTypoMedium":A==="error"?"$redAccent1":A==="valid"?"$greenAccent1":"$blackTypoMedium",[A]),k=()=>c&&D?M.jsx(sn,{textStyle:"caption",color:F(),children:s}):b&&typeof t=="string"?M.jsx(sn,{textStyle:"caption",children:t}):b?t:null;return M.jsxs("div",{"data-test-id":"CT_Field_Container",className:Ie(CE),onClick:h,children:[M.jsx("div",{className:Ie(SE({state:A}),f),children:M.jsxs(Yt,{justifyContent:"space-between",alignItems:"stretch",wrap:"nowrap",children:[v&&M.jsx(Pc,{formState:A,place:"left",children:o}),C&&i,M.jsx("div",{className:Ie(OE,m),children:e}),I&&a,E&&M.jsx(Pc,{formState:A,place:"right",children:r})]})}),(S||D)&&M.jsxs(Yt,{justifyContent:T?"flex-end":"space-between",alignItems:"center",mt:"$6",children:[k(),y&&typeof n=="string"?M.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 Ac(e,t){return Ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Ac(e,t)}function Du(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ac(e,t)}var Dc={exports:{}},Xi={exports:{}},ht={};/** @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 gf;function
|
|
100
|
+
*/var gf;function DE(){if(gf)return ht;gf=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 E(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 E(I)===u}return ht.AsyncMode=c,ht.ConcurrentMode=u,ht.ContextConsumer=s,ht.ContextProvider=a,ht.Element=t,ht.ForwardRef=d,ht.Fragment=r,ht.Lazy=b,ht.Memo=h,ht.Portal=n,ht.Profiler=i,ht.StrictMode=o,ht.Suspense=f,ht.isAsyncMode=function(I){return C(I)||E(I)===c},ht.isConcurrentMode=C,ht.isContextConsumer=function(I){return E(I)===s},ht.isContextProvider=function(I){return E(I)===a},ht.isElement=function(I){return typeof I=="object"&&I!==null&&I.$$typeof===t},ht.isForwardRef=function(I){return E(I)===d},ht.isFragment=function(I){return E(I)===r},ht.isLazy=function(I){return E(I)===b},ht.isMemo=function(I){return E(I)===h},ht.isPortal=function(I){return E(I)===n},ht.isProfiler=function(I){return E(I)===i},ht.isStrictMode=function(I){return E(I)===o},ht.isSuspense=function(I){return E(I)===f},ht.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)},ht.typeOf=E,ht}var pt={};/** @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 yf;function
|
|
107
|
+
*/var yf;function NE(){return yf||(yf=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 E(re){return typeof re=="string"||typeof re=="function"||re===r||re===u||re===i||re===o||re===f||re===m||typeof re=="object"&&re!==null&&(re.$$typeof===b||re.$$typeof===h||re.$$typeof===a||re.$$typeof===s||re.$$typeof===d||re.$$typeof===T||re.$$typeof===S||re.$$typeof===v||re.$$typeof===y)}function C(re){if(typeof re=="object"&&re!==null){var me=re.$$typeof;switch(me){case t:var Te=re.type;switch(Te){case c:case u:case r:case i:case o:case f:return Te;default:var Pe=Te&&Te.$$typeof;switch(Pe){case s:case d:case b:case h:case a:return Pe;default:return me}}case n:return me}}}var I=c,D=u,A=s,F=a,k=t,B=d,R=r,w=b,p=h,$=n,P=i,j=o,W=f,Y=!1;function ne(re){return Y||(Y=!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.")),H(re)||C(re)===c}function H(re){return C(re)===u}function L(re){return C(re)===s}function oe(re){return C(re)===a}function G(re){return typeof re=="object"&&re!==null&&re.$$typeof===t}function K(re){return C(re)===d}function Z(re){return C(re)===r}function ce(re){return C(re)===b}function z(re){return C(re)===h}function U(re){return C(re)===n}function ee(re){return C(re)===i}function Q(re){return C(re)===o}function ie(re){return C(re)===f}pt.AsyncMode=I,pt.ConcurrentMode=D,pt.ContextConsumer=A,pt.ContextProvider=F,pt.Element=k,pt.ForwardRef=B,pt.Fragment=R,pt.Lazy=w,pt.Memo=p,pt.Portal=$,pt.Profiler=P,pt.StrictMode=j,pt.Suspense=W,pt.isAsyncMode=ne,pt.isConcurrentMode=H,pt.isContextConsumer=L,pt.isContextProvider=oe,pt.isElement=G,pt.isForwardRef=K,pt.isFragment=Z,pt.isLazy=ce,pt.isMemo=z,pt.isPortal=U,pt.isProfiler=ee,pt.isStrictMode=Q,pt.isSuspense=ie,pt.isValidElementType=E,pt.typeOf=C}()),pt}var bf;function mv(){return bf||(bf=1,process.env.NODE_ENV==="production"?Xi.exports=DE():Xi.exports=NE()),Xi.exports}/*
|
|
108
108
|
object-assign
|
|
109
109
|
(c) Sindre Sorhus
|
|
110
110
|
@license MIT
|
|
111
|
-
*/var Xs,wf;function
|
|
112
|
-
Valid keys: `+JSON.stringify(Object.keys(H),null," "));var re=ie(z,Q,K,Z,ce+"."+Q,n);if(re)return re}return null}return T(L)}function $(H){switch(typeof H){case"number":case"string":case"undefined":return!0;case"boolean":return!H;case"object":if(Array.isArray(H))return H.every($);if(H===null||s(H))return!0;var L=f(H);if(L){var oe=L.call(H),G;if(L!==H.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 P(H,L){return H==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function j(H){var L=typeof H;return Array.isArray(H)?"array":H instanceof RegExp?"object":P(L,H)?"symbol":L}function W(H){if(typeof H>"u"||H===null)return""+H;var L=j(H);if(L==="object"){if(H instanceof Date)return"date";if(H instanceof RegExp)return"regexp"}return L}function Y(H){var L=W(H);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function ne(H){return!H.constructor||!H.constructor.name?m:H.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Js}var ec,Cf;function jE(){if(Cf)return ec;Cf=1;var e=Nu();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 LE=mv(),FE=!0;Dc.exports=ME()(LE.isElement,FE)}else Dc.exports=jE()();var VE=Dc.exports;const X=gp(VE);function BE(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function HE(e,t){e.classList?e.classList.add(t):BE(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function $f(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function WE(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=$f(e.className,t):e.setAttribute("class",$f(e.className&&e.className.baseVal||"",t))}const Tf={disabled:!1};var zE=process.env.NODE_ENV!=="production"?X.oneOfType([X.number,X.shape({enter:X.number,exit:X.number,appear:X.number}).isRequired]):null,UE=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 yv=l.createContext(null);var bv=function(t){return t.scrollTop},jo="unmounted",Cr="exited",$r="entering",Jr="entered",Nc="exiting",er=function(e){Du(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=Nc)}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&&bv(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||Tf.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||Tf.disabled){this.safeSetState({status:Cr},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Nc},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(yv.Provider,{value:null},typeof a=="function"?a(o,s):l.cloneElement(l.Children.only(a),s))},t}(l.Component);er.contextType=yv;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=zE;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=Nc;const wv=er;var YE=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return HE(t,r)})},tc=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return WE(t,r)})},ku=function(e){Du(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&&bv(o),s&&(this.appliedClasses[i][a]=s,YE(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(wv,ae({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(l.Component);ku.defaultProps={classNames:""};ku.propTypes=process.env.NODE_ENV!=="production"?ae({},wv.propTypes,{classNames:UE,onEnter:X.func,onEntering:X.func,onEntered:X.func,onExit:X.func,onExiting:X.func,onExited:X.func}):{};const KE=ku;function If(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Gi=pt({defaultClassName:"fic97c0",variantClassNames:{animate:{in:"fic97c1",out:"fic97c2"}},defaultVariants:{},compoundVariants:[]});const qE=l.forwardRef(({isOpen:e,onClose:t},n)=>{const r=l.useRef(null),o=n||r;return M.jsx(KE,{in:e,nodeRef:o,timeout:400,unmountOnExit:!0,classNames:{enter:Re(Gi({animate:"in"})),enterDone:Re(Gi({animate:"in"})),exit:Re(Gi({animate:"out"})),exitDone:Re(Gi({animate:"out"}))},children:M.jsx("div",{ref:o,"data-test-id":"vds-BS-overlay",onClick:t})})}),Ev=e=>{l.useEffect(e,[e])},ms=({children:e,...t})=>{const[n,r]=l.useState(!1);return Ev(()=>{r(!0)}),n?M.jsx(t1,{...t,children:e}):null};var XE="_185nehu0",GE=pt({defaultClassName:"_185nehu1 _15kd2weg j1jih7z j1jih7ak j1jih7a0",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const ZE=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(gE,{...n,ref:r,className:Re(XE),children:M.jsx(yE,{children:e})})),Mu=l.forwardRef(({options:e,position:t,placeholder:n,...r},o)=>M.jsx(bo,{children:M.jsxs(dE,{...r,children:[M.jsxs(fE,{ref:o,className:Re(GE()),"data-test-id":r["data-test-id"],children:[M.jsx(hE,{placeholder:n}),M.jsx(pE,{className:"SelectIcon",children:M.jsx(si,{})})]}),M.jsx(ms,{children:M.jsxs(vE,{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:[M.jsx(bE,{"data-test-id":"CT_ScrollUp_Icon",style:{textAlign:"center",marginTop:5},children:M.jsx(xu,{height:15,width:15})}),M.jsx(mE,{className:"SelectViewport",children:e.map(({label:i,value:a})=>M.jsx(ZE,{value:a,children:i},a))}),M.jsx(wE,{"data-test-id":"CT_ScrollDown_Icon",style:{textAlign:"center"},children:M.jsx(si,{height:15,width:15})})]})})]})}));Mu.displayName="BaseSelect";Mu.defaultProps={position:"popper",placeholder:"","data-test-id":void 0};/**
|
|
111
|
+
*/var Xs,wf;function kE(){if(wf)return Xs;wf=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,Ef;function Nu(){if(Ef)return Gs;Ef=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gs=e,Gs}var Zs,xf;function gv(){return xf||(xf=1,Zs=Function.call.bind(Object.prototype.hasOwnProperty)),Zs}var Qs,_f;function ME(){if(_f)return Qs;_f=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Nu(),n={},r=gv();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,Sf;function jE(){if(Sf)return Js;Sf=1;var e=mv(),t=kE(),n=Nu(),r=gv(),o=ME(),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(H){var L=H&&(u&&H[u]||H[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:E,element:C(),elementType:I(),instanceOf:D,node:B(),objectOf:F,oneOf:A,oneOfType:k,shape:w,exact:p};function b(H,L){return H===L?H!==0||1/H===1/L:H!==H&&L!==L}function y(H,L){this.message=H,this.data=L&&typeof L=="object"?L:{},this.stack=""}y.prototype=Error.prototype;function T(H){if(process.env.NODE_ENV!=="production")var L={},oe=0;function G(Z,ce,z,U,ee,Q,ie){if(U=U||m,Q=Q||z,ie!==n){if(c){var re=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 re.name="Invariant Violation",re}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var me=U+":"+z;!L[me]&&oe<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Q+"` prop on `"+U+"`. 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[me]=!0,oe++)}}return ce[z]==null?Z?ce[z]===null?new y("The "+ee+" `"+Q+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new y("The "+ee+" `"+Q+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:H(ce,z,U,ee,Q)}var K=G.bind(null,!1);return K.isRequired=G.bind(null,!0),K}function S(H){function L(oe,G,K,Z,ce,z){var U=oe[G],ee=j(U);if(ee!==H){var Q=W(U);return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+Q+"` supplied to `"+K+"`, expected ")+("`"+H+"`."),{expectedType:H})}return null}return T(L)}function v(){return T(a)}function E(H){function L(oe,G,K,Z,ce){if(typeof H!="function")return new y("Property `"+ce+"` of component `"+K+"` has invalid PropType notation inside arrayOf.");var z=oe[G];if(!Array.isArray(z)){var U=j(z);return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+U+"` supplied to `"+K+"`, expected an array."))}for(var ee=0;ee<z.length;ee++){var Q=H(z,ee,K,Z,ce+"["+ee+"]",n);if(Q instanceof Error)return Q}return null}return T(L)}function C(){function H(L,oe,G,K,Z){var ce=L[oe];if(!s(ce)){var z=j(ce);return new y("Invalid "+K+" `"+Z+"` of type "+("`"+z+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return T(H)}function I(){function H(L,oe,G,K,Z){var ce=L[oe];if(!e.isValidElementType(ce)){var z=j(ce);return new y("Invalid "+K+" `"+Z+"` of type "+("`"+z+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return T(H)}function D(H){function L(oe,G,K,Z,ce){if(!(oe[G]instanceof H)){var z=H.name||m,U=ne(oe[G]);return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+U+"` supplied to `"+K+"`, expected ")+("instance of `"+z+"`."))}return null}return T(L)}function A(H){if(!Array.isArray(H))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 z=oe[G],U=0;U<H.length;U++)if(b(z,H[U]))return null;var ee=JSON.stringify(H,function(ie,re){var me=W(re);return me==="symbol"?String(re):re});return new y("Invalid "+Z+" `"+ce+"` of value `"+String(z)+"` "+("supplied to `"+K+"`, expected one of "+ee+"."))}return T(L)}function F(H){function L(oe,G,K,Z,ce){if(typeof H!="function")return new y("Property `"+ce+"` of component `"+K+"` has invalid PropType notation inside objectOf.");var z=oe[G],U=j(z);if(U!=="object")return new y("Invalid "+Z+" `"+ce+"` of type "+("`"+U+"` supplied to `"+K+"`, expected an object."));for(var ee in z)if(r(z,ee)){var Q=H(z,ee,K,Z,ce+"."+ee,n);if(Q instanceof Error)return Q}return null}return T(L)}function k(H){if(!Array.isArray(H))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var L=0;L<H.length;L++){var oe=H[L];if(typeof oe!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Y(oe)+" at index "+L+"."),a}function G(K,Z,ce,z,U){for(var ee=[],Q=0;Q<H.length;Q++){var ie=H[Q],re=ie(K,Z,ce,z,U,n);if(re==null)return null;re.data&&r(re.data,"expectedType")&&ee.push(re.data.expectedType)}var me=ee.length>0?", expected one of type ["+ee.join(", ")+"]":"";return new y("Invalid "+z+" `"+U+"` supplied to "+("`"+ce+"`"+me+"."))}return T(G)}function B(){function H(L,oe,G,K,Z){return $(L[oe])?null:new y("Invalid "+K+" `"+Z+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return T(H)}function R(H,L,oe,G,K){return new y((H||"React class")+": "+L+" type `"+oe+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+K+"`.")}function w(H){function L(oe,G,K,Z,ce){var z=oe[G],U=j(z);if(U!=="object")return new y("Invalid "+Z+" `"+ce+"` of type `"+U+"` "+("supplied to `"+K+"`, expected `object`."));for(var ee in H){var Q=H[ee];if(typeof Q!="function")return R(K,Z,ce,ee,W(Q));var ie=Q(z,ee,K,Z,ce+"."+ee,n);if(ie)return ie}return null}return T(L)}function p(H){function L(oe,G,K,Z,ce){var z=oe[G],U=j(z);if(U!=="object")return new y("Invalid "+Z+" `"+ce+"` of type `"+U+"` "+("supplied to `"+K+"`, expected `object`."));var ee=t({},oe[G],H);for(var Q in ee){var ie=H[Q];if(r(H,Q)&&typeof ie!="function")return R(K,Z,ce,Q,W(ie));if(!ie)return new y("Invalid "+Z+" `"+ce+"` key `"+Q+"` supplied to `"+K+"`.\nBad object: "+JSON.stringify(oe[G],null," ")+`
|
|
112
|
+
Valid keys: `+JSON.stringify(Object.keys(H),null," "));var re=ie(z,Q,K,Z,ce+"."+Q,n);if(re)return re}return null}return T(L)}function $(H){switch(typeof H){case"number":case"string":case"undefined":return!0;case"boolean":return!H;case"object":if(Array.isArray(H))return H.every($);if(H===null||s(H))return!0;var L=f(H);if(L){var oe=L.call(H),G;if(L!==H.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 P(H,L){return H==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function j(H){var L=typeof H;return Array.isArray(H)?"array":H instanceof RegExp?"object":P(L,H)?"symbol":L}function W(H){if(typeof H>"u"||H===null)return""+H;var L=j(H);if(L==="object"){if(H instanceof Date)return"date";if(H instanceof RegExp)return"regexp"}return L}function Y(H){var L=W(H);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function ne(H){return!H.constructor||!H.constructor.name?m:H.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Js}var ec,Cf;function LE(){if(Cf)return ec;Cf=1;var e=Nu();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 FE=mv(),VE=!0;Dc.exports=jE()(FE.isElement,VE)}else Dc.exports=LE()();var BE=Dc.exports;const X=gp(BE);function HE(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function WE(e,t){e.classList?e.classList.add(t):HE(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function $f(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function zE(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=$f(e.className,t):e.setAttribute("class",$f(e.className&&e.className.baseVal||"",t))}const Tf={disabled:!1};var UE=process.env.NODE_ENV!=="production"?X.oneOfType([X.number,X.shape({enter:X.number,exit:X.number,appear:X.number}).isRequired]):null,YE=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 yv=l.createContext(null);var bv=function(t){return t.scrollTop},jo="unmounted",Cr="exited",$r="entering",Jr="entered",Nc="exiting",er=function(e){Du(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=Nc)}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&&bv(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||Tf.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||Tf.disabled){this.safeSetState({status:Cr},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Nc},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(yv.Provider,{value:null},typeof a=="function"?a(o,s):l.cloneElement(l.Children.only(a),s))},t}(l.Component);er.contextType=yv;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=UE;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=Nc;const wv=er;var KE=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return WE(t,r)})},tc=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return zE(t,r)})},ku=function(e){Du(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&&bv(o),s&&(this.appliedClasses[i][a]=s,KE(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(wv,ae({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(l.Component);ku.defaultProps={classNames:""};ku.propTypes=process.env.NODE_ENV!=="production"?ae({},wv.propTypes,{classNames:YE,onEnter:X.func,onEntering:X.func,onEntered:X.func,onExit:X.func,onExiting:X.func,onExited:X.func}):{};const qE=ku;function If(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Gi=dt({defaultClassName:"fic97c0",variantClassNames:{animate:{in:"fic97c1",out:"fic97c2"}},defaultVariants:{},compoundVariants:[]});const XE=l.forwardRef(({isOpen:e,onClose:t},n)=>{const r=l.useRef(null),o=n||r;return M.jsx(qE,{in:e,nodeRef:o,timeout:400,unmountOnExit:!0,classNames:{enter:Ie(Gi({animate:"in"})),enterDone:Ie(Gi({animate:"in"})),exit:Ie(Gi({animate:"out"})),exitDone:Ie(Gi({animate:"out"}))},children:M.jsx("div",{ref:o,"data-test-id":"vds-BS-overlay",onClick:t})})}),Ev=e=>{l.useEffect(e,[e])},ms=({children:e,...t})=>{const[n,r]=l.useState(!1);return Ev(()=>{r(!0)}),n?M.jsx(n1,{...t,children:e}):null};var GE="_185nehu0",ZE=dt({defaultClassName:"_185nehu1 _15kd2weg j1jih7z j1jih7ak j1jih7a0",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const QE=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(yE,{...n,ref:r,className:Ie(GE),children:M.jsx(bE,{children:e})})),Mu=l.forwardRef(({options:e,position:t,placeholder:n,...r},o)=>M.jsx(bo,{children:M.jsxs(fE,{...r,children:[M.jsxs(hE,{ref:o,className:Ie(ZE()),"data-test-id":r["data-test-id"],children:[M.jsx(pE,{placeholder:n}),M.jsx(vE,{className:"SelectIcon",children:M.jsx(si,{})})]}),M.jsx(ms,{children:M.jsxs(mE,{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:[M.jsx(wE,{"data-test-id":"CT_ScrollUp_Icon",style:{textAlign:"center",marginTop:5},children:M.jsx(xu,{height:15,width:15})}),M.jsx(gE,{className:"SelectViewport",children:e.map(({label:i,value:a})=>M.jsx(QE,{value:a,children:i},a))}),M.jsx(EE,{"data-test-id":"CT_ScrollDown_Icon",style:{textAlign:"center"},children:M.jsx(si,{height:15,width:15})})]})})]})}));Mu.displayName="BaseSelect";Mu.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(H),null," "));var re=ie(z,Q,K,Z,ce+"."
|
|
|
118
118
|
* LICENSE.md file in the root directory of this source tree.
|
|
119
119
|
*
|
|
120
120
|
* @license MIT
|
|
121
|
-
*/function
|
|
121
|
+
*/function JE(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function ex(){let[,e]=l.useState(Object.create(null));return l.useCallback(()=>{e(Object.create(null))},[])}var tx=JE()?l.useLayoutEffect:l.useEffect,nx=({children:e,type:t="reach-portal",containerRef:n})=>{let r=$e.useRef(null),o=$e.useRef(null),i=ex();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]),tx(()=>{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})},xv=({unstable_skipInitialRender:e,...t})=>{let[n,r]=$e.useState(!1);return $e.useEffect(()=>{e&&r(!0)},[e]),e&&!n?null:$e.createElement(nx,{...t})};xv.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 be=function(){return be=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},be.apply(this,arguments)};function ju(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 wt;(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"})(wt||(wt={}));var ho;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(ho||(ho={}));var kc=wt.Start,Lu=wt.Stop,Ti=wt.Raise,gs=wt.Send,_v=wt.Cancel,nx=wt.NullEvent,Fu=wt.Assign;wt.After;wt.DoneState;var Sv=wt.Log,rx=wt.Init,Mc=wt.Invoke;wt.ErrorExecution;var Rf=wt.ErrorPlatform,ox=wt.ErrorCustom,Cv=wt.Update,ix=wt.Choose,ax=wt.Pure,$v=".",Of={},jc="xstate.guard",sx="",jt=process.env.NODE_ENV==="production",Zi;function Vu(e,t,n){n===void 0&&(n=$v);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?Vu(r[i],o[i]):!1})}function Tv(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 Lc(e,t){try{return wo(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function cx(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function Uo(e,t){if(cx(e))return e.value;if(wo(e))return Aa(e);if(typeof e!="string")return e;var n=Lc(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 Pf(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 ux=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 lx(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=It(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 It(e){var t;return(t=[]).concat.apply(t,St([],it(e),!1))}function Iv(e){return wo(e)?e:[e]}function In(e){return e===void 0?[]:Iv(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 dx(e){return/^(done|error)\./.test(e)}function Af(e){return!!(e instanceof Promise||e!==null&&(lt(e)||typeof e=="object")&<(e.then))}function fx(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function hx(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 Rv(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:Rv(n,o)}}})}function px(e,t){return{current:t,states:Rv(e,t)}}function Df(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 Ov(e,t){if(e)return at(e)?{type:jc,name:e,predicate:t?t[e]:void 0}:lt(e)?{type:jc,name:e.name,predicate:e}:e}function vx(e){try{return"subscribe"in e&<(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 mx(e){return!!e&&typeof e.send=="function"}function ys(e,t){return at(e)||typeof e=="number"?be({type:e},t):e}function zt(e,t){if(!at(e)&&"$$type"in e&&e.$$type==="scxml")return e;var n=ys(e);return be({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function Kr(e,t){var n=Iv(t).map(function(r){return typeof r>"u"||typeof r=="string"||Mr(r)?{target:r,event:e}:be(be({},r),{event:e})});return n}function gx(e){if(!(e===void 0||e===sx))return In(e)}function yx(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 Pv(e,t,n,r,o){var i=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===jc)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 Av(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 Fc(e){return(e.type===Ti||e.type===gs&&e.to===ho.Internal)&&typeof e.delay!="number"}var oo=zt({type:rx});function Vc(e,t){return t&&t[e]||void 0}function ui(e,t){var n;if(at(e)||typeof e=="number"){var r=Vc(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=Vc(e.type,t);if(lt(r))n=be(be({},e),{exec:r});else if(r){var o=r.type||e.type;n=be(be(be({},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 Bu(e){var t=ui(e);return be(be({id:at(e)?e:t.id},t),{type:t.type})}function bx(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 wx(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 be(be({},e),{type:Ti,_event:i,delay:a})}function Ex(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:Tv(e)}}function xx(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 be(be({},e),{to:c,_event:i,event:i.data,delay:a})}var _x=function(e,t,n){return be(be({},e),{value:at(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},Sx=function(e){return{type:_v,sendId:e}};function Cx(e){var t=Bu(e);return{type:wt.Start,activity:t,exec:void 0}}function $x(e){var t=lt(e)?e:Bu(e);return{type:wt.Stop,activity:t,exec:void 0}}function Tx(e,t,n){var r=lt(e.activity)?e.activity(t,n.data):e.activity,o=typeof r=="string"?{id:r}:r,i={type:wt.Stop,activity:o};return i}var Ix=function(e){return{type:Fu,assignment:e}};function Rx(e,t){var n=t?"#".concat(t):"";return"".concat(wt.After,"(").concat(e,")").concat(n)}function Ji(e,t){var n="".concat(wt.DoneState,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function ga(e,t){var n="".concat(wt.DoneInvoke,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function Fo(e,t){var n="".concat(wt.ErrorPlatform,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}var Ox=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===Fu){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?[]:Ox(o),c=s.length?Df(n,r,s,t):n,u=a?[n]:void 0,d=[];function f(b,y){var T;switch(y.type){case Ti:{var S=wx(y,c,r,e.options.delays);return i&&typeof S.delay=="number"&&i(S,c,r),S}case gs:var v=xx(y,c,r,e.options.delays);if(!jt){var E=y.delay;Ut(!at(E)||typeof v.delay=="number","No delay reference for delay expression '".concat(E,"' was found on machine '").concat(e.id,"'"))}return i&&v.to!==ho.Internal&&(b==="entry"?d.push(v):i(v,c,r)),v;case Sv:{var C=_x(y,c,r);return i==null||i(C,c,r),C}case ix:{var I=y,D=(T=I.conds.find(function(W){var Y=Ov(W.cond,e.options.guards);return!Y||Pv(e,Y,c,r,i?void 0:t)}))===null||T===void 0?void 0:T.actions;if(!D)return[];var A=it(Na(e,t,c,r,[{type:b,actions:cr(In(D),e.options.actions)}],i,a),2),F=A[0],k=A[1];return c=k,u==null||u.push(c),F}case ax:{var D=y.get(c,r.data);if(!D)return[];var B=it(Na(e,t,c,r,[{type:b,actions:cr(In(D),e.options.actions)}],i,a),2),R=B[0],w=B[1];return c=w,u==null||u.push(c),R}case Lu:{var C=Tx(y,c,r);return i==null||i(C,n,r),C}case Fu:{c=Df(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 P=u.length-1,j=be(be({},p),{exec:function(W){for(var Y=[],ne=1;ne<arguments.length;ne++)Y[ne-1]=arguments[ne];$.apply(void 0,St([u[P]],it(Y),!1))}});p=j}return p}}function m(b){var y,T,S=[];try{for(var v=Ze(b.actions),E=v.next();!E.done;E=v.next()){var C=E.value,I=f(b.type,C);I&&(S=S.concat(I))}}catch(D){y={error:D}}finally{try{E&&!E.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=It(o.map(m));return[h,c]}var Nf=[],eo=function(e,t){Nf.push(e);var n=t(e);return Nf.pop(),n};function Dv(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 Px(e,t,n,r){var o,i=Av(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?Nv(a,e.id,s):Dv(e.id);return c.meta=e,c}function Nv(e,t,n){var r=Dv(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 Ax(e){try{return typeof e.send=="function"}catch{return!1}}function Dx(e){return Ax(e)&&"id"in e}function Nx(e){var t;return be((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 kv(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function li(e){return kv(e).filter(function(t){return t.type!=="history"})}function Mv(e){var t=[e];return ka(e)?t:t.concat(It(li(e).map(Mv)))}function Vo(e,t){var n,r,o,i,a,s,c,u,d=new Set(e),f=Bc(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=Bc(m);try{for(var v=Ze(m),E=v.next();!E.done;E=v.next()){var y=E.value;if(y.type==="compound"&&(!S.get(y)||!S.get(y).length))f.get(y)?f.get(y).forEach(function(B){return m.add(B)}):y.initialStateNodes.forEach(function(B){return m.add(B)});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(B){return m.add(B)}):D.initialStateNodes.forEach(function(B){return m.add(B)}))}}catch(B){a={error:B}}finally{try{I&&!I.done&&(s=C.return)&&s.call(C)}finally{if(a)throw a.error}}}}catch(k){o={error:k}}finally{try{E&&!E.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}try{for(var A=Ze(m),F=A.next();!F.done;F=A.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=A.return)&&u.call(A)}finally{if(c)throw c.error}}return m}function jv(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]=jv(i,t)}),o}function Bc(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 kx(e,t){var n=Vo([e],t);return jv(e,Bc(n))}function Bo(e,t){return Array.isArray(e)?e.some(function(n){return n===t}):e instanceof Set?e.has(t):!1}function Mx(e){return St([],it(new Set(It(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 jx(e){return e===void 0&&(e=[]),e.reduce(function(t,n){return n.meta!==void 0&&(t[n.id]=n.meta),t},{})}function kf(e){return new Set(It(e.map(function(t){return t.tags})))}function Lv(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 Lv(e[o],t[o])})}function Lx(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function Fx(e,t){var n=e.exec,r=be(be({},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=Of,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||Of,this.meta=jx(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 Mx(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=ju(t,["configuration","transitions","tags","machine"]);return be(be({},r),{tags:Array.from(n)})},e.prototype.matches=function(t){return Vu(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}(),Vx={deferEvents:!1},Mf=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=be(be({},Vx),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,Bx=0,Ro={bookId:function(){return"x:".concat(Bx++)},register:function(e,t){return nc.set(e,t),e},get:function(e){return nc.get(e)},free:function(e){nc.delete(e)}};function Hu(){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 Hx(){var e=Hu();if(e&&"__xstate__"in e)return e.__xstate__}function Wx(e){if(Hu()){var t=Hx();t&&t.register(e)}}function zx(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=Nx({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 Ux={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 Yx=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 be=function(){return be=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},be.apply(this,arguments)};function ju(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 wt;(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"})(wt||(wt={}));var ho;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(ho||(ho={}));var kc=wt.Start,Lu=wt.Stop,Ti=wt.Raise,gs=wt.Send,_v=wt.Cancel,rx=wt.NullEvent,Fu=wt.Assign;wt.After;wt.DoneState;var Sv=wt.Log,ox=wt.Init,Mc=wt.Invoke;wt.ErrorExecution;var Rf=wt.ErrorPlatform,ix=wt.ErrorCustom,Cv=wt.Update,ax=wt.Choose,sx=wt.Pure,$v=".",Of={},jc="xstate.guard",cx="",jt=process.env.NODE_ENV==="production",Zi;function Vu(e,t,n){n===void 0&&(n=$v);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?Vu(r[i],o[i]):!1})}function Tv(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 Lc(e,t){try{return wo(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function ux(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function Uo(e,t){if(ux(e))return e.value;if(wo(e))return Aa(e);if(typeof e!="string")return e;var n=Lc(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 Pf(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 lx=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 dx(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=It(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 It(e){var t;return(t=[]).concat.apply(t,St([],it(e),!1))}function Iv(e){return wo(e)?e:[e]}function In(e){return e===void 0?[]:Iv(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 fx(e){return/^(done|error)\./.test(e)}function Af(e){return!!(e instanceof Promise||e!==null&&(lt(e)||typeof e=="object")&<(e.then))}function hx(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function px(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 Rv(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:Rv(n,o)}}})}function vx(e,t){return{current:t,states:Rv(e,t)}}function Df(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 Ov(e,t){if(e)return at(e)?{type:jc,name:e,predicate:t?t[e]:void 0}:lt(e)?{type:jc,name:e.name,predicate:e}:e}function mx(e){try{return"subscribe"in e&<(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 gx(e){return!!e&&typeof e.send=="function"}function ys(e,t){return at(e)||typeof e=="number"?be({type:e},t):e}function zt(e,t){if(!at(e)&&"$$type"in e&&e.$$type==="scxml")return e;var n=ys(e);return be({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function Kr(e,t){var n=Iv(t).map(function(r){return typeof r>"u"||typeof r=="string"||Mr(r)?{target:r,event:e}:be(be({},r),{event:e})});return n}function yx(e){if(!(e===void 0||e===cx))return In(e)}function bx(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 Pv(e,t,n,r,o){var i=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===jc)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 Av(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 Fc(e){return(e.type===Ti||e.type===gs&&e.to===ho.Internal)&&typeof e.delay!="number"}var oo=zt({type:ox});function Vc(e,t){return t&&t[e]||void 0}function ui(e,t){var n;if(at(e)||typeof e=="number"){var r=Vc(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=Vc(e.type,t);if(lt(r))n=be(be({},e),{exec:r});else if(r){var o=r.type||e.type;n=be(be(be({},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 Bu(e){var t=ui(e);return be(be({id:at(e)?e:t.id},t),{type:t.type})}function wx(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 Ex(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 be(be({},e),{type:Ti,_event:i,delay:a})}function xx(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:Tv(e)}}function _x(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 be(be({},e),{to:c,_event:i,event:i.data,delay:a})}var Sx=function(e,t,n){return be(be({},e),{value:at(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},Cx=function(e){return{type:_v,sendId:e}};function $x(e){var t=Bu(e);return{type:wt.Start,activity:t,exec:void 0}}function Tx(e){var t=lt(e)?e:Bu(e);return{type:wt.Stop,activity:t,exec:void 0}}function Ix(e,t,n){var r=lt(e.activity)?e.activity(t,n.data):e.activity,o=typeof r=="string"?{id:r}:r,i={type:wt.Stop,activity:o};return i}var Rx=function(e){return{type:Fu,assignment:e}};function Ox(e,t){var n=t?"#".concat(t):"";return"".concat(wt.After,"(").concat(e,")").concat(n)}function Ji(e,t){var n="".concat(wt.DoneState,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function ga(e,t){var n="".concat(wt.DoneInvoke,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function Fo(e,t){var n="".concat(wt.ErrorPlatform,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}var Px=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===Fu){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?[]:Px(o),c=s.length?Df(n,r,s,t):n,u=a?[n]:void 0,d=[];function f(b,y){var T;switch(y.type){case Ti:{var S=Ex(y,c,r,e.options.delays);return i&&typeof S.delay=="number"&&i(S,c,r),S}case gs:var v=_x(y,c,r,e.options.delays);if(!jt){var E=y.delay;Ut(!at(E)||typeof v.delay=="number","No delay reference for delay expression '".concat(E,"' was found on machine '").concat(e.id,"'"))}return i&&v.to!==ho.Internal&&(b==="entry"?d.push(v):i(v,c,r)),v;case Sv:{var C=Sx(y,c,r);return i==null||i(C,c,r),C}case ax:{var I=y,D=(T=I.conds.find(function(W){var Y=Ov(W.cond,e.options.guards);return!Y||Pv(e,Y,c,r,i?void 0:t)}))===null||T===void 0?void 0:T.actions;if(!D)return[];var A=it(Na(e,t,c,r,[{type:b,actions:cr(In(D),e.options.actions)}],i,a),2),F=A[0],k=A[1];return c=k,u==null||u.push(c),F}case sx:{var D=y.get(c,r.data);if(!D)return[];var B=it(Na(e,t,c,r,[{type:b,actions:cr(In(D),e.options.actions)}],i,a),2),R=B[0],w=B[1];return c=w,u==null||u.push(c),R}case Lu:{var C=Ix(y,c,r);return i==null||i(C,n,r),C}case Fu:{c=Df(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 P=u.length-1,j=be(be({},p),{exec:function(W){for(var Y=[],ne=1;ne<arguments.length;ne++)Y[ne-1]=arguments[ne];$.apply(void 0,St([u[P]],it(Y),!1))}});p=j}return p}}function m(b){var y,T,S=[];try{for(var v=Ze(b.actions),E=v.next();!E.done;E=v.next()){var C=E.value,I=f(b.type,C);I&&(S=S.concat(I))}}catch(D){y={error:D}}finally{try{E&&!E.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=It(o.map(m));return[h,c]}var Nf=[],eo=function(e,t){Nf.push(e);var n=t(e);return Nf.pop(),n};function Dv(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 Ax(e,t,n,r){var o,i=Av(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?Nv(a,e.id,s):Dv(e.id);return c.meta=e,c}function Nv(e,t,n){var r=Dv(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 Dx(e){try{return typeof e.send=="function"}catch{return!1}}function Nx(e){return Dx(e)&&"id"in e}function kx(e){var t;return be((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 kv(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function li(e){return kv(e).filter(function(t){return t.type!=="history"})}function Mv(e){var t=[e];return ka(e)?t:t.concat(It(li(e).map(Mv)))}function Vo(e,t){var n,r,o,i,a,s,c,u,d=new Set(e),f=Bc(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=Bc(m);try{for(var v=Ze(m),E=v.next();!E.done;E=v.next()){var y=E.value;if(y.type==="compound"&&(!S.get(y)||!S.get(y).length))f.get(y)?f.get(y).forEach(function(B){return m.add(B)}):y.initialStateNodes.forEach(function(B){return m.add(B)});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(B){return m.add(B)}):D.initialStateNodes.forEach(function(B){return m.add(B)}))}}catch(B){a={error:B}}finally{try{I&&!I.done&&(s=C.return)&&s.call(C)}finally{if(a)throw a.error}}}}catch(k){o={error:k}}finally{try{E&&!E.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}try{for(var A=Ze(m),F=A.next();!F.done;F=A.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=A.return)&&u.call(A)}finally{if(c)throw c.error}}return m}function jv(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]=jv(i,t)}),o}function Bc(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 Mx(e,t){var n=Vo([e],t);return jv(e,Bc(n))}function Bo(e,t){return Array.isArray(e)?e.some(function(n){return n===t}):e instanceof Set?e.has(t):!1}function jx(e){return St([],it(new Set(It(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 Lx(e){return e===void 0&&(e=[]),e.reduce(function(t,n){return n.meta!==void 0&&(t[n.id]=n.meta),t},{})}function kf(e){return new Set(It(e.map(function(t){return t.tags})))}function Lv(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 Lv(e[o],t[o])})}function Fx(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function Vx(e,t){var n=e.exec,r=be(be({},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=Of,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||Of,this.meta=Lx(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 jx(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=ju(t,["configuration","transitions","tags","machine"]);return be(be({},r),{tags:Array.from(n)})},e.prototype.matches=function(t){return Vu(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}(),Bx={deferEvents:!1},Mf=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=be(be({},Bx),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,Hx=0,Ro={bookId:function(){return"x:".concat(Hx++)},register:function(e,t){return nc.set(e,t),e},get:function(e){return nc.get(e)},free:function(e){nc.delete(e)}};function Hu(){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 Wx(){var e=Hu();if(e&&"__xstate__"in e)return e.__xstate__}function zx(e){if(Hu()){var t=Wx();t&&t.register(e)}}function Ux(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=kx({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 Yx={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 Kx=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):
|
|
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 Fx(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(Rf)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Rf)===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 Nv(t,n);if(Af(t))return this.spawnPromise(Promise.resolve(t),n);if(lt(t))return this.spawnCallback(t,n);if(Dx(t))return this.spawnActor(t,n);if(vx(t))return this.spawnObservable(t,n);if(Mr(t))return this.spawnMachine(t,be(be({},r),{id:n}));if(fx(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,be(be({},this.options),{parent:this,id:n.id||t.id})),i=be(be({},Ux),n);i.sync&&o.onTransition(function(s){r.send(Cv,{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=zx(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){yx(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(Af(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=Hu();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(be(be({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:be({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}Wx(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=Fv,e}();function Fv(e,t){var n=new Yx(e,t);return n}function Kx(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function ea(e){return be(be({type:Mc},e),{toJSON:function(){e.onDone,e.onError;var t=ju(e,["onDone","onError"]);return be(be({},t),{type:Mc,src:Kx(e.src)})}})}var to="",Hc="#",Oo="*",qr={},Xr=function(e){return e[0]===Hc},qx=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Xx=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.")},Gx=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(qx(),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:$v),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,be((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(kv(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=be((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(be(be({},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=be((m={},m[h]=u.src,m),i.machine.options.services),ea(be(be({id:h},u),{src:h}))}else{var b=u.src;return ea(be(be({id:Qi(i.id,d)},u),{src:b}))}}),this.activities=In(this.config.activities).concat(this.invoke).map(function(u){return Bu(u)}),this.transition=this.transition.bind(this),this.tags=In(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||Mv(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:be(be({},o),t.actions),activities:be(be({},i),t.activities),guards:be(be({},a),t.guards),services:be(be({},s),t.services),delays:be(be({},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=Rx(s,t.id);return t.onEntry.push(Ex(c,{delay:i})),t.onExit.push(Sx(c)),c},o=wo(n)?n.map(function(i,a){var s=r(i.delay,a);return be(be({},i),{event:s})}):It(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 be(be({},f),{event:d,delay:u})})}));return o.map(function(i){var a=i.delay;return be(be({},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(It(a.map(function(c){return r.getStateNode(c).getStateNodes(o[c])}))),!1)),s},e.prototype.handles=function(t){var n=Tv(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(be(be({},n),{value:this.resolve(n.value),configuration:r,done:ya(r,this),tags:kf(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=It(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=It(Object.keys(a).map(function(S){return a[S].configuration}));return{transitions:b,exitSet:It(h.map(function(S){return S.exitSet})),configuration:T,source:n,actions:It(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)):Vu(Uo(b,this.delimiter),ux(this.path.slice(0,-2))(t.value)):!0,S=!1;try{S=!h||Pv(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=It(c.map(function(C){return i.getRelativeStateNodes(C,t.historyValue)})),E=!!u.internal;return{transitions:[u],exitSet:E?[]:It(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,w){return R.order-w.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),E=v.next();!E.done;E=v.next()){var S=E.value;(!Bo(t,S)||Bo(r.exitSet,S.parent))&&r.exitSet.push(S)}}catch(R){d={error:R}}finally{try{E&&!E.done&&(f=v.return)&&f.call(v)}finally{if(d)throw d.error}}r.exitSet.sort(function(R,w){return w.order-R.order});var C=Array.from(b).sort(function(R,w){return R.order-w.order}),I=new Set(r.exitSet),D=It(C.map(function(R){var w=[];if(R.type!=="final")return w;var p=R.parent;if(!p.parent)return w;w.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(P){return ya(r.configuration,P)})&&w.push(Ji($.id)),w})),A=C.map(function(R){var w=R.onEntry,p=R.activities.map(function($){return Cx($)});return{type:"entry",actions:cr(s?St(St([],it(w),!1),it(p),!1):St(St([],it(p),!1),it(w),!1),m.machine.options.actions)}}).concat({type:"state_done",actions:D.map(function(R){return bx(R)})}),F=Array.from(I).map(function(R){return{type:"exit",actions:cr(St(St([],it(R.onExit),!1),it(R.activities.map(function(w){return $x(w)})),!1),m.machine.options.actions)}}),k=F.concat({type:"transition",actions:cr(r.actions,this.machine.options.actions)}).concat(A);if(n){var B=cr(It(St([],it(t),!1).sort(function(R,w){return w.order-R.order}).map(function(R){return R.onExit})),this.machine.options.actions).filter(function(R){return!Fc(R)});return k.concat({type:"stop",actions:B})}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)&&!dx(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?kx(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?be({},n.activities):{};try{for(var E=Ze(S),C=E.next();!C.done;C=E.next()){var I=C.value;try{for(var D=(c=void 0,Ze(I.actions)),A=D.next();!A.done;A=D.next()){var F=A.value;F.type===kc?v[F.activity.id||F.activity.type]=F:F.type===Lu&&(v[F.activity.id||F.activity.type]=!1)}}catch(K){c={error:K}}finally{try{A&&!A.done&&(u=D.return)&&u.call(D)}finally{if(c)throw c.error}}}}catch(K){a={error:K}}finally{try{C&&!C.done&&(s=E.return)&&s.call(E)}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),B=k[0],R=k[1],w=it(hx(B,Fc),2),p=w[0],$=w[1],P=B.filter(function(K){var Z;return K.type===kc&&((Z=K.activity)===null||Z===void 0?void 0:Z.type)===Mc}),j=P.reduce(function(K,Z){return K[Z.activity.id]=Px(Z.activity,d.machine,R,i),K},n?be({},n.children):{}),W=new wn({value:y||n.value,context:R,_event:i,_sessionid:n?n._sessionid:null,historyValue:y?T?px(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:j,done:b,tags:kf(h),machine:this}),Y=r!==R;W.changed=i.name===Cv||Y;var ne=W.history;ne&&delete ne.history;var H=!b&&(this._transient||f.some(function(K){return K._transient}));if(!m&&(!H||i.name===to))return W;var L=W;if(!b)for(H&&(L=this.resolveRaisedTransition(L,{type:nx},i,o));p.length;){var oe=p.shift();L=this.resolveRaisedTransition(L,oe._event,i,o)}var G=L.changed||(ne?!!L.actions.length||Y||typeof ne.value!=typeof L.value||!Lv(L.value,ne.value):void 0);return L.changed=G,L.history=ne,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(Hc.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=Lc(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(Hc.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return Lc(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=Pf(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 It(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:Pf(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?It(va(o).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var i=lx(r.path,"states")(t).current;return at(i)?[r.getStateNode(i)]:It(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=It(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=gx(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=be(be({},t),{actions:cr(In(t.actions)),cond:Ov(t.cond,i),target:a,source:this,internal:o,eventType:t.event,toJSON:function(){return be(be({},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=ju(i,[typeof a=="symbol"?a:a+""]);o=It(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 E=Kr(v,u[v]);return jt||Xx(r,v,E),E}).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=It(this.invoke.map(function(v){var E=[];return v.onDone&&E.push.apply(E,St([],it(Kr(String(ga(v.id)),v.onDone)),!1)),v.onError&&E.push.apply(E,St([],it(Kr(String(Fo(v.id)),v.onError)),!1)),E})),h=this.after,b=It(St(St(St(St([],it(f),!1),it(m),!1),it(o),!1),it(d),!1).map(function(v){return In(v).map(function(E){return r.formatTransition(E)})}));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 Zx(e,t,n){return n===void 0&&(n=e.context),new Gx(e,t,n)}var Qx=Ix,Wc;(function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"})(Wc||(Wc={}));var Yo=l.useLayoutEffect;function jf(e){var t=$e.useRef();return t.current||(t.current={v:e()}),t.current.v}var Jx=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},e_=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 t_(e,t){var n,r,o=Jx([[],[]],2),i=o[0],a=o[1];try{for(var s=e_(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},Lf=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 Ff(e,t){var n=e.exec,r=n(t.context,t._event.data,{action:e,state:t,_event:t._event});r()}function n_(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(t_(s,function(f){return f.exec.__effect===Wc.Effect}),2),u=c[0],d=c[1];(i=t.current).push.apply(i,Lf([],Po(u.map(function(f){return[f,o]})),!1)),(a=n.current).push.apply(a,Lf([],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];Ff(o,i)}}),l.useEffect(function(){for(;t.current.length;){var r=Po(t.current.shift(),2),o=r[0],i=r[1];Ff(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)},r_=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},o_=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 i_(e,t,n){if(typeof e=="object")return e;var r=function(){};return{next:e,error:t||r,complete:n||r}}function a_(e,t,n){t===void 0&&(t={});var r=jf(function(){return typeof e=="function"?e():e});if(process.env.NODE_ENV!=="production"&&typeof e!="function"){var o=o_(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=r_(t,["context","guards","actions","activities","services","delays","state"]),b=jf(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 Fv(T,Ko({deferEvents:!0},h))});return Yo(function(){var y;return n&&(y=b.subscribe(i_(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]),n_(b),b}var s_=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 c_(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=a_(e,t,n),o=s_(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 u_=Object.defineProperty,l_=(e,t)=>{for(var n in t)u_(e,n,{get:t[n],enumerable:!0})},An={};l_(An,{assign:()=>h_,colors:()=>pr,createStringInterpolator:()=>Xu,skipAnimation:()=>Yv,to:()=>Uv,willAdvance:()=>Gu});var Wu=Ri(),He=e=>Ii(e,Wu),zu=Ri();He.write=e=>Ii(e,zu);var bs=Ri();He.onStart=e=>Ii(e,bs);var Uu=Ri();He.onFrame=e=>Ii(e,Uu);var Yu=Ri();He.onFinish=e=>Ii(e,Yu);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(Vv(n),0,o),dr+=1,Bv(),o};var Vv=e=>~(~io.findIndex(t=>t.time>e)||~io.length);He.cancel=e=>{bs.delete(e),Uu.delete(e),Yu.delete(e),Wu.delete(e),zu.delete(e)};He.sync=e=>{zc=!0,He.batchedUpdates(e),zc=!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 Ku=typeof window<"u"?window.requestAnimationFrame:()=>{};He.use=e=>Ku=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"):Wv()};var lr=-1,dr=0,zc=!1;function Ii(e,t){zc?(t.delete(e),e(0)):(t.add(e),Bv())}function Bv(){lr<0&&(lr=0,He.frameLoop!=="demand"&&Ku(Hv))}function d_(){lr=-1}function Hv(){~lr&&(Ku(Hv),He.batchedUpdates(Wv))}function Wv(){const e=lr;lr=He.now();const t=Vv(lr);if(t&&(zv(io.splice(0,t),n=>n.handler()),dr-=t),!dr){d_();return}bs.flush(),Wu.flush(e?Math.min(64,lr-e):16.667),Uu.flush(),zu.flush(),Yu.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,zv(t,r=>r(n)&&e.add(r)),dr+=e.size,t=e)}}}function zv(e,t){e.forEach(n=>{try{t(n)}catch(r){He.catch(r)}})}function Uc(){}var f_=(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)),qu=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Xu,Uv,pr=null,Yv=!1,Gu=Uc,h_=e=>{e.to&&(Uv=e.to),e.now&&(He.now=e.now),e.colors!==void 0&&(pr=e.colors),e.skipAnimation!=null&&(Yv=e.skipAnimation),e.createStringInterpolator&&(Xu=e.createStringInterpolator),e.requestAnimationFrame&&He.use(e.requestAnimationFrame),e.batchedUpdates&&(He.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Gu=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(p_)):(Kv(e),He(Yc))},advance:Yc,sort(e){if(Ma)He.onFrame(()=>ws.sort(e));else{const t=_n.indexOf(e);~t&&(_n.splice(t,1),qv(e))}},clear(){_n=[],Xo.clear()}};function p_(){Xo.forEach(Kv),Xo.clear(),He(Yc)}function Kv(e){_n.includes(e)||qv(e)}function qv(e){_n.splice(v_(_n,t=>t.priority>e.priority),0,e)}function Yc(e){const t=rc;for(let n=0;n<_n.length;n++){const r=_n[n];Ma=r.priority,r.idle||(Gu(r),r.advance(e),r.idle||t.push(r))}return Ma=0,rc=_n,rc.length=0,_n=t,_n.length>0}function v_(e,t){const n=e.findIndex(t);return n<0?e.length:n}var m_=(e,t,n)=>Math.min(Math.max(n,e),t),g_={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 y_=new RegExp("rgb"+Es(On,On,On)),b_=new RegExp("rgba"+Es(On,On,On,On)),w_=new RegExp("hsl"+Es(On,ja,ja)),E_=new RegExp("hsla"+Es(On,ja,ja,On)),x_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,__=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,S_=/^#([0-9a-fA-F]{6})$/,C_=/^#([0-9a-fA-F]{8})$/;function $_(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=S_.exec(e))?parseInt(t[1]+"ff",16)>>>0:pr&&pr[e]!==void 0?pr[e]:(t=y_.exec(e))?(Gr(t[1])<<24|Gr(t[2])<<16|Gr(t[3])<<8|255)>>>0:(t=b_.exec(e))?(Gr(t[1])<<24|Gr(t[2])<<16|Gr(t[3])<<8|Hf(t[4]))>>>0:(t=x_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=C_.exec(e))?parseInt(t[1],16)>>>0:(t=__.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=w_.exec(e))?(Vf(Bf(t[1]),ta(t[2]),ta(t[3]))|255)>>>0:(t=E_.exec(e))?(Vf(Bf(t[1]),ta(t[2]),ta(t[3]))|Hf(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 Vf(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 Bf(e){return(parseFloat(e)%360+360)%360/360}function Hf(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 Wf(e){let t=$_(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 Xu(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=I_(u,i);return T_(u,i[d],i[d+1],o[d],o[d+1],c,a,s,r.map)}};function T_(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 I_(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var R_=(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 m_(0,1,o/e)},La=1.70158,na=La*1.525,zf=La+1,Uf=2*Math.PI/3,Yf=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,O_={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=>zf*e*e*e-La*e*e,easeOutBack:e=>1+zf*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)*Uf),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Uf)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Yf))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Yf)/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:R_},fi=Symbol.for("FluidValue.get"),po=Symbol.for("FluidValue.observers"),En=e=>!!(e&&e[fi]),on=e=>e&&e[fi]?e[fi]():e,Kf=e=>e[po]||null;function P_(e,t){e.eventObserved?e.eventObserved(t):e(t)}function hi(e,t){const n=e[po];n&&n.forEach(r=>{P_(r,t)})}var Xv=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");A_(this,e)}},A_=(e,t)=>Gv(e,fi,t);function Eo(e,t){if(e[fi]){let n=e[po];n||Gv(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 Gv=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ba=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,D_=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,qf=new RegExp(`(${ba.source})(%|[a-z]+)`,"i"),N_=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,xs=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Zv=e=>{const[t,n]=k_(e);if(!t||qu())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 Zv(n);if(n)return n}return e},k_=e=>{const t=xs.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ic,M_=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Qv=e=>{ic||(ic=pr?new RegExp(`(${Object.keys(pr).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>on(i).replace(xs,Zv).replace(D_,Wf).replace(ic,Wf)),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=!qf.test(t[0])&&((c=t.find(u=>qf.test(u)))==null?void 0:c.replace(ba,""));let s=0;return t[0].replace(ba,()=>`${o[s++](i)}${a||""}`).replace(N_,M_)}},Zu="react-spring: ",Jv=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Zu}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},j_=Jv(console.warn);function L_(){j_(`${Zu}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var F_=Jv(console.warn);function V_(){F_(`${Zu}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)||!qu()&&xs.test(e)||e in(pr||{}))}var Qu=qu()?l.useEffect:l.useLayoutEffect,B_=()=>{const e=l.useRef(!1);return Qu(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function em(){const e=l.useState()[1],t=B_();return()=>{t.current&&e(Math.random())}}function H_(e,t){const[n]=l.useState(()=>({inputs:t,result:e()})),r=l.useRef(),o=r.current;let i=o;return i?t&&i.inputs&&W_(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 W_(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 tm=e=>l.useEffect(e,z_),z_=[];function Xf(e){const t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var vi=Symbol.for("Animated:node"),U_=e=>!!e&&e[vi]===e,Fn=e=>e&&e[vi],Ju=(e,t)=>f_(e,vi,t),Ss=e=>e&&e[vi]&&e[vi].getPayload(),nm=class{constructor(){Ju(this,this)}getPayload(){return this.payload||[]}},Oi=class extends nm{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 nm{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Bn(this.source,(n,r)=>{U_(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))}},rm=class extends Cs{constructor(e){super(e)}static create(e){return new rm(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(Y_)),!0)}};function Y_(e){return(_s(e)?mi:Oi).create(e)}function Kc(e){const t=Fn(e);return t?t.constructor:ve.arr(e)?rm:_s(e)?mi:Oi}var Gf=(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=X_(o,b)},[o]),[s,c]=q_(r,t),u=em(),d=()=>{const b=i.current;if(n&&!b)return;(b?t.applyAnimatedValues(b,s.getValue(!0)):!1)===!1&&u()},f=new K_(d,c),m=l.useRef();Qu(()=>(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,[]),tm(()=>()=>{const b=m.current;Qe(b.deps,y=>pi(y,b))});const h=t.getComponentProps(s.getValue());return $e.createElement(e,{...h,ref:a})})},K_=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&He.write(this.update)}};function q_(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 X_(e,t){return e&&(ve.fun(e)?e(t):e.current=t),t}var Zf=Symbol.for("AnimatedComponent"),G_=(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=Qf(a)||"Anonymous";return ve.str(a)?a=i[a]||(i[a]=Gf(a,o)):a=a[Zf]||(a[Zf]=Gf(a,o)),a.displayName=`Animated(${s})`,a};return Bn(e,(a,s)=>{ve.arr(e)&&(s=Qf(a)),i[s]=i(a)}),{animated:i}},Qf=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))),om=(e,t)=>ve.obj(e)?t&&e[t]:e,im=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Z_=e=>e,el=(e,t=Z_)=>{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"],J_={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 eS(e){const t={};let n=0;if(Bn(e,(r,o)=>{J_[o]||(t[o]=r,n++)}),n)return t}function am(e){const t=eS(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 tS(e){for(const t in e)return!0;return!1}function qc(e){return ve.fun(e)||ve.arr(e)&&ve.obj(e[0])}function nS(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function rS(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var sm={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}},Xc={...sm.default,mass:1,damping:1,easing:O_.linear,clamp:!1},oS=class{constructor(){this.velocity=0,Object.assign(this,Xc)}};function iS(e,t,n){n&&(n={...n},Jf(n,t),t={...n,...t}),Jf(e,t),Object.assign(e,t);for(const a in Xc)e[a]==null&&(e[a]=Xc[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 Jf(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 eh=[],aS=class{constructor(){this.changed=!1,this.values=eh,this.toValues=null,this.fromValues=eh,this.config=new oS,this.immediate=!1}};function cm(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 tl=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?ao(e.get()):t.every(n=>n.noop)?um(e.get()):Rn(e.get(),t.every(n=>n.finished)),um=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 lm(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=el(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 th,E=new nh;return(async()=>{if(An.skipAnimation)throw yi(n),E.result=Rn(r,!1),f(E),E;h(v);const C=ve.obj(T)?{...T}:{...S,to:T};C.parentId=o,Bn(u,(D,A)=>{ve.und(C[A])&&(C[A]=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 th)y=T.result;else if(T instanceof nh)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 th=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.")}},nh=class extends Error{constructor(){super("SkipAnimationSignal")}},Gc=e=>e instanceof nl,sS=1,nl=class extends Xv{constructor(){super(...arguments),this.id=sS++,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 L_(),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"),dm=1,Zc=2,Qc=4,ac=e=>(e[jr]&dm)>0,ir=e=>(e[jr]&Zc)>0,Ao=e=>(e[jr]&Qc)>0,rh=(e,t)=>t?e[jr]|=Zc|dm:e[jr]&=~Zc,oh=(e,t)=>t?e[jr]|=Qc:e[jr]&=~Qc,cS=class extends nl{constructor(e,t){if(super(),this.animation=new aS,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 E=i.decay===!0?.998:i.decay,C=Math.exp(-(1-E)*b);h=y+T/(1-E)*(1-C),m=Math.abs(u.lastPosition-h)<=v,S=T*C}else{S=u.lastVelocity==null?T:u.lastVelocity;const E=i.restVelocity||v/10,C=i.clamp?0:i.bounce,I=!ve.und(C),D=y==f?u.v0>0:y<f;let A,F=!1;const k=1,B=Math.ceil(e/k);for(let R=0;R<B&&(A=Math.abs(S)>E,!(!A&&(m=Math.abs(f-h)<=v,m)));++R){I&&(F=h==f||h>f==D,F&&(S=-S*C,h=f));const w=-i.tension*1e-6*(h-f),p=-i.friction*.001*S,$=(w+p)/i.mass;S=S+$*k,h=h+S*k}}else{let E=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)),E=(i.progress||0)+b/this._memoizedDuration,E=E>1?1:E<0?0:E,u.durationProgress=E),h=y+i.easing(E)*(f-y),S=(h-u.lastPosition)/e,m=E==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=>tl(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||qc(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,el(e,(a,s)=>/^on/.test(s)?om(a,n):a)),ah(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 cm(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Ao(this)||(oh(this,!0),Ho(i.pauseQueue),No(this,"onPause",Rn(this,Do(this,this.animation.to)),this))},resume:()=>{Ao(this)&&(oh(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=fm(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=qc(t.to),{config:y}=s,{decay:T,velocity:S}=y;(r||o)&&(y.velocity=0),t.config&&!b&&iS(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 E=ve.und(t.reset)?o&&!t.default:!ve.und(f)&&Go(t.reset,i),C=E?f:this.get(),I=gi(d),D=ve.num(I)||ve.arr(I)||_s(I),A=!b&&(!D||Go(a.immediate||t.immediate,i));if(h){const R=Kc(d);if(R!==v.constructor)if(A)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),B=!1;if(!k){const R=E||!ac(this)&&m;(h||R)&&(B=Kn(gi(C),I),k=!B),(!Kn(s.immediate,A)&&!A||!Kn(y.decay,T)||!Kn(y.velocity,S))&&(k=!0)}if(B&&ir(this)&&(s.changed&&!E?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!=A&&(s.immediate=A,!A&&!E&&this._set(c)),k)){const{onRest:R}=s;Qe(lS,p=>ah(this,t,p));const w=Rn(this,Do(this,c));Ho(this._pendingCalls,w),this._pendingCalls.add(n),s.changed&&He.batchedUpdates(()=>{var p;s.changed=!E,R==null||R(w,this),E?Ir(a.onRest,w):(p=s.onStart)==null||p.call(s,w,this)})}E&&this._set(C),b?n(lm(t.to,t,this._state,this)):k?this._start():ir(this)&&!h?this._pendingCalls.add(n):n(um(C))}_focus(e){const t=this.animation;e!==t.to&&(Kf(this)&&this._detach(),t.to=e,Kf(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;En(t)&&(Eo(t,this),Gc(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=Kc(n);!r||r.constructor!=o?Ju(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)||(rh(this,!0),Ao(this)||this._resume())}_resume(){An.skipAnimation?this.finish():ws.start(this)}_stop(e,t){if(ir(this)){rh(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 fm(e,t=e.loop,n=e.to){const r=Ir(t);if(r){const o=r!==!0&&am(r),i=(o||e).reverse,a=!o||o.reset;return bi({...e,loop:t,default:!1,pause:void 0,to:!i||qc(n)?n:void 0,from:a?e.from:void 0,reset:a,...o})}}function bi(e){const{to:t,from:n}=e=am(e),r=new Set;return ve.obj(t)&&ih(t,r),ve.obj(n)&&ih(n,r),e.keys=r.size?Array.from(r):null,e}function uS(e){const t=bi(e);return ve.und(t.default)&&(t.default=el(t)),t}function ih(e,t){Bn(e,(n,r)=>n!=null&&t.add(r))}var lS=["onStart","onRest","onChange","onPause","onResume"];function ah(e,t,n){e.animation[n]=t[n]!==im(t,n)?om(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 dS=["onStart","onChange","onRest"],fS=1,hS=class{constructor(t,n){this.id=fS++,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):(gm(this,n),Jc(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 Jc(e,t){return Promise.all(t.map(n=>hm(e,n))).then(n=>tl(e,n))}async function hm(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(dS,y=>{const T=t[y];if(ve.fun(T)){const S=e._events[y];t[y]=({finished:v,cancelled:E})=>{const C=S.get(T);C?(v||(C.finished=!1),E&&(C.cancelled=!0)):S.set(T,{value:null,finished:v||!1,cancelled:E||!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||im(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(cm(++e._lastAsyncId,{props:t,state:f,actions:{pause:Uc,resume:Uc,start(y,T){h?(yi(f,e._lastAsyncId),T(ao(e))):(y.onRest=s,T(lm(d,y,f,e)))}}})),f.paused&&await new Promise(y=>{f.resumeQueue.add(y)});const b=tl(e,await Promise.all(m));if(a&&b.finished&&!(n&&b.noop)){const y=fm(t,a,o);if(y)return gm(e,[y]),hm(e,y,!0)}return c&&He.batchedUpdates(()=>c(b,e,e.item)),b}function sh(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}),mm(n,r,o=>vm(o))}),pm(e,n),n}function pm(e,t){Bn(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Eo(n,e))})}function vm(e,t){const n=new cS;return n.key=e,t&&Eo(n,t),n}function mm(e,t,n){t.keys&&Qe(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function gm(e,t){Qe(t,n=>{mm(e.springs,n,r=>vm(r,e))})}var $s=({children:e,...t})=>{const n=l.useContext(Va),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=H_(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=Va;return $e.createElement(i,{value:t},e)},Va=pS($s,{});$s.Provider=Va.Provider;$s.Consumer=Va.Consumer;function pS(e,t){return Object.assign(e,$e.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var vS=()=>{const e=[],t=function(r){V_();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 mS(e,t,n){const r=ve.fun(t)&&t;r&&!n&&(n=[]);const o=l.useMemo(()=>r||arguments.length==3?vS():void 0,[]),i=l.useRef(0),a=em(),s=l.useMemo(()=>({ctrls:[],queue:[],flush(S,v){const E=sh(S,v);return i.current>0&&!s.queue.length&&!Object.keys(E).some(I=>!S.springs[I])?Jc(S,v):new Promise(I=>{pm(S,E),s.queue.push(()=>{I(Jc(S,v))}),a()})}}),[]),c=l.useRef([...s.ctrls]),u=[],d=Xf(e)||0;l.useMemo(()=>{Qe(c.current.slice(e,d),S=>{nS(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 E=S;E<v;E++){const C=c.current[E]||(c.current[E]=new hS(null,s.flush)),I=r?r(E,C):t[E];I&&(u[E]=uS(I))}}const m=c.current.map((S,v)=>sh(S,u[v])),h=l.useContext($s),b=Xf(h),y=h!==b&&tS(h);Qu(()=>{i.current++,s.ctrls=c.current;const{queue:S}=s;S.length&&(s.queue=[],Qe(S,v=>v())),Qe(c.current,(v,E)=>{o==null||o.add(v),y&&v.start({default:h});const C=u[E];C&&(rS(v,C.ref),v.ref?v.queue.push(C):v.start(C))})}),tm(()=>()=>{Qe(s.ctrls,S=>S.stop(!0))});const T=m.map(S=>({...S}));return o?[T,o]:T}function gS(e,t){const n=ve.fun(e),[[r],o]=mS(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,o]:r}var ym=class extends nl{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=di(...t);const n=this._get(),r=Kc(n);Ju(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&&ch(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&&!ch(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),Gc(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,(Gc(n)?n.priority:0)+1),0))}};function yS(e){return e.idle!==!1}function ch(e){return!e.size||Array.from(e).every(yS)}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 ym(e,t);An.assign({createStringInterpolator:Qv,to:(e,t)=>new ym(e,t)});var bm=/^--/;function bS(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!bm.test(e)&&!(Zo.hasOwnProperty(e)&&Zo[e])?t+"px":(""+t).trim()}var uh={};function wS(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:uh[f]||(uh[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=bS(f,r[f]);bm.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},ES=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),xS=["Webkit","Ms","Moz","O"];Zo=Object.keys(Zo).reduce((e,t)=>(xS.forEach(n=>e[ES(n,t)]=e[t]),e),Zo);var _S=/^(matrix|translate|scale|rotate|skew)/,SS=/^(translate)/,CS=/^(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,$S=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(_S.test(s)){if(delete r[s],ve.und(a))return;const c=SS.test(s)?"px":CS.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 TS(o,i)),super(r)}},TS=class extends Xv{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)}},IS=["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:Qv,colors:g_});var RS=G_(IS,{applyAnimatedValues:wS,createAnimatedStyle:e=>new $S(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),OS=RS.animated;function eu(e,t){return e.map(function(n,r){return n+t[r]})}function rl(e,t){return e.map(function(n,r){return n-t[r]})}function tu(e){return Math.hypot.apply(Math,e)}function PS(e,t,n){var r=tu(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=tu(e);return{velocities:s,velocity:a,distance:u,direction:c}}function nu(e){return Math.sign?Math.sign(e):+(e>0)-+(e<0)||+e}function AS(e,t,n){return Math.max(t,Math.min(e,n))}function DS(e,t){return Math.pow(e,t*5)}function lh(e,t,n){return t===0||Math.abs(t)===1/0?DS(e,n):e*t*n/(t+n*e)}function Qo(e,t,n,r){return r===void 0&&(r=.15),r===0?AS(e,t,n):e<t?-lh(t-e,n-t,r)+t:e>n?+lh(e-n,n-t,r)+n:e}function dh(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 NS(e,t,n){return t&&dh(e.prototype,t),n&&dh(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 wm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function kS(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 MS(e,t){if(e){if(typeof e=="string")return fh(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 fh(e,t)}}function fh(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=MS(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 Em(){}function xm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?Em: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 hh(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 ol(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]=ol(e[a],s);break;case"boolean":s&&(n[a]=e[a]);break}}return n}function jS(){try{return"constructor"in GestureEvent}catch{return!1}}function _m(){return typeof window<"u"&&"ontouchstart"in window}function LS(){return typeof window<"u"&&"onpointerdown"in window}function Sm(e){return"pointerId"in e?null:e.type==="touchend"?e.changedTouches:e.targetTouches}function Cm(e){return Array.from(Sm(e)).map(function(t){return t.identifier})}function ph(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 FS=function(t){return t};function vh(e,t){t===void 0&&(t=FS);var n=Sm(e),r=n?n[0]:e,o=r.clientX,i=r.clientY;return t([o,i])}var VS=180,BS=.15,HS=.5,WS=50,zS=250,US={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(BS);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},$m=tn({},US,{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 $m.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]]}}),YS=typeof window<"u"&&window.document&&window.document.createElement,KS={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=YS?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},qS=tn({},$m,{useTouch:function(t){t===void 0&&(t=!1);var n=_m(),r=LS();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=HS),ur(t)},swipeDistance:function(t){return t===void 0&&(t=WS),ur(t)},swipeDuration:function(t){return t===void 0&&(t=zS),t},delay:function(t){switch(t===void 0&&(t=0),t){case!0:return VS;case!1:return 0;default:return t}}});function XS(e){return e===void 0&&(e={}),ol(e,KS)}function GS(e){return e===void 0&&(e={}),ol(e,qS)}function ZS(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=kS(e,["domTarget","eventOptions","window","enabled"]),a=XS({domTarget:t,eventOptions:n,window:r,enabled:o});return a.drag=GS(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:Em,canceled:!1,memo:void 0,args:void 0},e)}function Tm(){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},JS=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?mh(h[0],m[0]):u[0],y=u[1]===!1?mh(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,E=[S[0]!==!1?h[0]-S[0]:0,S[1]!==!1?h[1]-S[1]:0],C=eu(E,d),I=c?o:[0,0];return E=gh(a,eu(E,s),I),tn({},T,{intentional:S[0]!==!1||S[1]!==!1,_initial:s,_movement:v,movement:E,values:r,offset:gh(a,C,I),delta:rl(E,f)})},t.clean=function(){this.clearTimeout()},NS(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 mh(e,t){return Math.abs(e)>=t?nu(e)*t:!1}function gh(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 eC(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=rl(c(h),c([0,0])).map(Math.abs),y=tn({},Tm()[a],{_active:!0,args:s,values:t,initial:r??t,_threshold:b,offset:u,lastOffset:u,startTime:d});return tn({},y,{_initial:hh(f,y),_bounds:hh(m,y)})}var tC=function(t){var n=this;this.classes=t,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=_m(),this.supportsGestureEvents=jS(),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?sC(n,a):cC(n,a)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=Rm(n.config),o=n.config.eventOptions;r&&Pi(r,Im(n.domListeners),o),Object.values(n.timeouts).forEach(clearTimeout),oC(n)},this.classes=t,this.state=Tm(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function nC(e,t){"pointerId"in t?e.pointerIds.add(t.pointerId):e.touchIds=new Set(Cm(t))}function rC(e,t){"pointerId"in t?e.pointerIds.delete(t.pointerId):Cm(t).forEach(function(n){return e.touchIds.delete(n)})}function oC(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 iC(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 aC(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),Om(o.window,i[t]=n,r))}function sC(e,t){var n=e.config,r=e.domListeners,o=Rm(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;Pi(o,Im(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,xm.apply(void 0,d)])}Om(o,r,i)}function cC(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]=xm.apply(void 0,d)}return r}function Im(e){return e===void 0&&(e=[]),e.splice(0,e.length)}function Rm(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 Om(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 uC(e,t,n){n===void 0&&(n={});var r=dC(e),o=l.useMemo(function(){return new tC(r)},[]);return o.config=t,o.handlers=e,o.nativeRefs=n,l.useEffect(o.effect,[]),o.config.domTarget?lC:o.bind}function lC(){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 dC(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 fC=function(e){wm(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.getInternalMovement=function(o,i){return rl(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,PS(a.movement,a.delta,s))}return a},n.mapStateValues=function(o){return{xy:o.values,vxvy:o.velocities}},t}(JS),hC=3;function yh(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}var pC=function(e){wm(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){yh(o),aC(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,yh(o),r.setTimeout(r.startDrag.bind(Un(r)),r.config.delay,o)},r.setStartState=function(o){var i=vh(o,r.transform);r.updateSharedState(ph(o)),r.updateGestureState(tn({},eC(Un(r),i,o),uc(Un(r),o,!0),{_pointerId:r.getEventId(o)})),r.updateGestureState(r.getMovement(i))},r.onDragStart=function(o){nC(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=eu(r.transform([a,s]),r.state.values)}else i=vh(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=ph(o);r.updateSharedState(u);var d=uc(Un(r),o),f=tu(c._movement),m=r.state._dragIsTap;m&&f>=hC&&(m=!1),r.updateGestureState(tn({},d,c,{_dragIsTap:m})),r.fireGestureHandler()}},r.onDragEnd=function(o){if(rC(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,E=v[0],C=v[1],I=r.config.swipeDuration,D=tn({},uc(Un(r),o),r.getMovement(r.state.values)),A=[0,0];D.elapsedTime<I&&(h!==!1&&Math.abs(s)>T&&Math.abs(d)>E&&(A[0]=nu(s)),b!==!1&&Math.abs(c)>S&&Math.abs(f)>C&&(A[1]=nu(c))),r.updateSharedState({buttons:0}),r.updateGestureState(tn({},D,{tap:i,swipe:A})),r.fireGestureHandler(r.config.filterTaps&&i===!0)}},r.clean=function(){e.prototype.clean.call(Un(r)),r.state._dragStarted=!1,r.releasePointerCapture(),iC(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}(fC);function vC(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 mC(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 gC(e,t){t===void 0&&(t={}),Tr.set("drag",pC);var n=l.useRef();return n.current||(n.current=vC(ZS,mC)),uC({drag:e},n.current(t))}var yC="aglyib0";const xo=l.forwardRef(({as:e,children:t,className:n,style:r,isDisabled:o,...i},a)=>{const s=e||"button";return M.jsx(s,{ref:a,as:e,"data-test-id":i["data-test-id"],className:Re(yC,n),disabled:o,style:r,...i,children:M.jsx(os,{size:16,color:o?$t.theme.colors.grey1:$t.theme.colors.black})})});xo.displayName="Button";xo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0};const Pm=l.forwardRef(({header:e,onBack:t,onClose:n,showBack:r,showClose:o,title:i,bind:a,hasHandleBar:s},c)=>e!==!1?M.jsx(et,{"data-rsbs-header":!0,"data-rsbs-header-handle-bar":s,ref:c,...s?a==null?void 0:a():{},children:e||M.jsxs(Yt,{alignItems:"center",justifyContent:"space-between",pt:s?"$16":"$8",pb:"$8",gap:"$16",children:[M.jsxs(Yt,{alignItems:"center",gap:"$16",children:[r&&M.jsx(w0,{cursor:"pointer",onClick:t,size:18,color:$t.theme.colors.grey1,"data-test-id":"vds-BS-back-btn"}),i&&M.jsx(sn,{fontWeight:"$bold",textStyle:"subtitle2",m:"$0",children:i})]}),o&&M.jsx(xo,{onClick:n,"data-test-id":"vds-BS-close-btn"})]})},"header"):M.jsx(et,{"data-rsbs-header":!0,ref:c,...a==null?void 0:a()},"header"));Pm.defaultProps={title:void 0,header:void 0,showBack:void 0,showClose:!0,hasHandleBar:!0,bind:void 0,onBack:void 0,onClose:void 0};function bC({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):gx(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=be(be({},d),{name:d.name===ix?"".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||Vc(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 _v:r.cancel(d.sendId);break;case kc:{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===wt.Invoke){var E=Av(v.src),C=r.machine.options.services?r.machine.options.services[E.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 A="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:E,meta:v.meta}):C;if(!k)return;var B=void 0;Mr(k)&&(k=F?k.withContext(F):k,B={autoForward:A}),r.spawn(k,I,B)}else r.spawnActivity(v);break}case Lu:{r.stopChild(d.activity.id);break}case Sv:var R=d,w=R.label,p=R.value;w?r.logger(w,p):r.logger(p);break;default:jt||Ut(!1,"No implementation found for action type '".concat(d.type,"'"));break}};var o=be(be({},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 Mf({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),E=v.next();!E.done;E=v.next()){var C=E.value;C(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(k){s={error:k}}finally{try{E&&!E.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 A=Ze(this.doneListeners),F=A.next();!F.done;F=A.next()){var y=F.value;y(this._doneEvent)}}catch(k){u={error:k}}finally{try{F&&!F.done&&(d=A.return)&&d.call(A)}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 Fx(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(A){t={error:A}}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(A){r={error:A}}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(A){i={error:A}}finally{try{S&&!S.done&&(a=T.return)&&a.call(T)}finally{if(i)throw i.error}}try{for(var v=Ze(this.doneListeners),E=v.next();!E.done;E=v.next()){var h=E.value;this.doneListeners.delete(h)}}catch(A){s={error:A}}finally{try{E&&!E.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(A){u={error:A}}finally{try{I&&!I.done&&(d=C.return)&&d.call(C)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new Mf({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=It(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!Fc(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 Vx(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(Rf)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Rf)===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 Nv(t,n);if(Af(t))return this.spawnPromise(Promise.resolve(t),n);if(lt(t))return this.spawnCallback(t,n);if(Nx(t))return this.spawnActor(t,n);if(mx(t))return this.spawnObservable(t,n);if(Mr(t))return this.spawnMachine(t,be(be({},r),{id:n}));if(hx(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,be(be({},this.options),{parent:this,id:n.id||t.id})),i=be(be({},Yx),n);i.sync&&o.onTransition(function(s){r.send(Cv,{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=Ux(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){bx(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(Af(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=Hu();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(be(be({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:be({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}zx(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=Fv,e}();function Fv(e,t){var n=new Kx(e,t);return n}function qx(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function ea(e){return be(be({type:Mc},e),{toJSON:function(){e.onDone,e.onError;var t=ju(e,["onDone","onError"]);return be(be({},t),{type:Mc,src:qx(e.src)})}})}var to="",Hc="#",Oo="*",qr={},Xr=function(e){return e[0]===Hc},Xx=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Gx=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.")},Zx=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(Xx(),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:$v),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,be((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(kv(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=be((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(be(be({},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=be((m={},m[h]=u.src,m),i.machine.options.services),ea(be(be({id:h},u),{src:h}))}else{var b=u.src;return ea(be(be({id:Qi(i.id,d)},u),{src:b}))}}),this.activities=In(this.config.activities).concat(this.invoke).map(function(u){return Bu(u)}),this.transition=this.transition.bind(this),this.tags=In(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||Mv(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:be(be({},o),t.actions),activities:be(be({},i),t.activities),guards:be(be({},a),t.guards),services:be(be({},s),t.services),delays:be(be({},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=Ox(s,t.id);return t.onEntry.push(xx(c,{delay:i})),t.onExit.push(Cx(c)),c},o=wo(n)?n.map(function(i,a){var s=r(i.delay,a);return be(be({},i),{event:s})}):It(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 be(be({},f),{event:d,delay:u})})}));return o.map(function(i){var a=i.delay;return be(be({},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(It(a.map(function(c){return r.getStateNode(c).getStateNodes(o[c])}))),!1)),s},e.prototype.handles=function(t){var n=Tv(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(be(be({},n),{value:this.resolve(n.value),configuration:r,done:ya(r,this),tags:kf(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=It(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=It(Object.keys(a).map(function(S){return a[S].configuration}));return{transitions:b,exitSet:It(h.map(function(S){return S.exitSet})),configuration:T,source:n,actions:It(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)):Vu(Uo(b,this.delimiter),lx(this.path.slice(0,-2))(t.value)):!0,S=!1;try{S=!h||Pv(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=It(c.map(function(C){return i.getRelativeStateNodes(C,t.historyValue)})),E=!!u.internal;return{transitions:[u],exitSet:E?[]:It(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,w){return R.order-w.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),E=v.next();!E.done;E=v.next()){var S=E.value;(!Bo(t,S)||Bo(r.exitSet,S.parent))&&r.exitSet.push(S)}}catch(R){d={error:R}}finally{try{E&&!E.done&&(f=v.return)&&f.call(v)}finally{if(d)throw d.error}}r.exitSet.sort(function(R,w){return w.order-R.order});var C=Array.from(b).sort(function(R,w){return R.order-w.order}),I=new Set(r.exitSet),D=It(C.map(function(R){var w=[];if(R.type!=="final")return w;var p=R.parent;if(!p.parent)return w;w.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(P){return ya(r.configuration,P)})&&w.push(Ji($.id)),w})),A=C.map(function(R){var w=R.onEntry,p=R.activities.map(function($){return $x($)});return{type:"entry",actions:cr(s?St(St([],it(w),!1),it(p),!1):St(St([],it(p),!1),it(w),!1),m.machine.options.actions)}}).concat({type:"state_done",actions:D.map(function(R){return wx(R)})}),F=Array.from(I).map(function(R){return{type:"exit",actions:cr(St(St([],it(R.onExit),!1),it(R.activities.map(function(w){return Tx(w)})),!1),m.machine.options.actions)}}),k=F.concat({type:"transition",actions:cr(r.actions,this.machine.options.actions)}).concat(A);if(n){var B=cr(It(St([],it(t),!1).sort(function(R,w){return w.order-R.order}).map(function(R){return R.onExit})),this.machine.options.actions).filter(function(R){return!Fc(R)});return k.concat({type:"stop",actions:B})}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)&&!fx(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?Mx(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?be({},n.activities):{};try{for(var E=Ze(S),C=E.next();!C.done;C=E.next()){var I=C.value;try{for(var D=(c=void 0,Ze(I.actions)),A=D.next();!A.done;A=D.next()){var F=A.value;F.type===kc?v[F.activity.id||F.activity.type]=F:F.type===Lu&&(v[F.activity.id||F.activity.type]=!1)}}catch(K){c={error:K}}finally{try{A&&!A.done&&(u=D.return)&&u.call(D)}finally{if(c)throw c.error}}}}catch(K){a={error:K}}finally{try{C&&!C.done&&(s=E.return)&&s.call(E)}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),B=k[0],R=k[1],w=it(px(B,Fc),2),p=w[0],$=w[1],P=B.filter(function(K){var Z;return K.type===kc&&((Z=K.activity)===null||Z===void 0?void 0:Z.type)===Mc}),j=P.reduce(function(K,Z){return K[Z.activity.id]=Ax(Z.activity,d.machine,R,i),K},n?be({},n.children):{}),W=new wn({value:y||n.value,context:R,_event:i,_sessionid:n?n._sessionid:null,historyValue:y?T?vx(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:j,done:b,tags:kf(h),machine:this}),Y=r!==R;W.changed=i.name===Cv||Y;var ne=W.history;ne&&delete ne.history;var H=!b&&(this._transient||f.some(function(K){return K._transient}));if(!m&&(!H||i.name===to))return W;var L=W;if(!b)for(H&&(L=this.resolveRaisedTransition(L,{type:rx},i,o));p.length;){var oe=p.shift();L=this.resolveRaisedTransition(L,oe._event,i,o)}var G=L.changed||(ne?!!L.actions.length||Y||typeof ne.value!=typeof L.value||!Lv(L.value,ne.value):void 0);return L.changed=G,L.history=ne,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(Hc.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=Lc(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(Hc.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return Lc(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=Pf(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 It(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:Pf(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?It(va(o).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var i=dx(r.path,"states")(t).current;return at(i)?[r.getStateNode(i)]:It(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=It(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=yx(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=be(be({},t),{actions:cr(In(t.actions)),cond:Ov(t.cond,i),target:a,source:this,internal:o,eventType:t.event,toJSON:function(){return be(be({},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=ju(i,[typeof a=="symbol"?a:a+""]);o=It(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 E=Kr(v,u[v]);return jt||Gx(r,v,E),E}).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=It(this.invoke.map(function(v){var E=[];return v.onDone&&E.push.apply(E,St([],it(Kr(String(ga(v.id)),v.onDone)),!1)),v.onError&&E.push.apply(E,St([],it(Kr(String(Fo(v.id)),v.onError)),!1)),E})),h=this.after,b=It(St(St(St(St([],it(f),!1),it(m),!1),it(o),!1),it(d),!1).map(function(v){return In(v).map(function(E){return r.formatTransition(E)})}));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 Qx(e,t,n){return n===void 0&&(n=e.context),new Zx(e,t,n)}var Jx=Rx,Wc;(function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"})(Wc||(Wc={}));var Yo=l.useLayoutEffect;function jf(e){var t=$e.useRef();return t.current||(t.current={v:e()}),t.current.v}var 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},t_=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 n_(e,t){var n,r,o=e_([[],[]],2),i=o[0],a=o[1];try{for(var s=t_(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},Lf=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 Ff(e,t){var n=e.exec,r=n(t.context,t._event.data,{action:e,state:t,_event:t._event});r()}function r_(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(n_(s,function(f){return f.exec.__effect===Wc.Effect}),2),u=c[0],d=c[1];(i=t.current).push.apply(i,Lf([],Po(u.map(function(f){return[f,o]})),!1)),(a=n.current).push.apply(a,Lf([],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];Ff(o,i)}}),l.useEffect(function(){for(;t.current.length;){var r=Po(t.current.shift(),2),o=r[0],i=r[1];Ff(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)},o_=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},i_=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 a_(e,t,n){if(typeof e=="object")return e;var r=function(){};return{next:e,error:t||r,complete:n||r}}function s_(e,t,n){t===void 0&&(t={});var r=jf(function(){return typeof e=="function"?e():e});if(process.env.NODE_ENV!=="production"&&typeof e!="function"){var o=i_(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=o_(t,["context","guards","actions","activities","services","delays","state"]),b=jf(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 Fv(T,Ko({deferEvents:!0},h))});return Yo(function(){var y;return n&&(y=b.subscribe(a_(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]),r_(b),b}var c_=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 u_(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=s_(e,t,n),o=c_(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 l_=Object.defineProperty,d_=(e,t)=>{for(var n in t)l_(e,n,{get:t[n],enumerable:!0})},An={};d_(An,{assign:()=>p_,colors:()=>pr,createStringInterpolator:()=>Xu,skipAnimation:()=>Yv,to:()=>Uv,willAdvance:()=>Gu});var Wu=Ri(),He=e=>Ii(e,Wu),zu=Ri();He.write=e=>Ii(e,zu);var bs=Ri();He.onStart=e=>Ii(e,bs);var Uu=Ri();He.onFrame=e=>Ii(e,Uu);var Yu=Ri();He.onFinish=e=>Ii(e,Yu);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(Vv(n),0,o),dr+=1,Bv(),o};var Vv=e=>~(~io.findIndex(t=>t.time>e)||~io.length);He.cancel=e=>{bs.delete(e),Uu.delete(e),Yu.delete(e),Wu.delete(e),zu.delete(e)};He.sync=e=>{zc=!0,He.batchedUpdates(e),zc=!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 Ku=typeof window<"u"?window.requestAnimationFrame:()=>{};He.use=e=>Ku=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"):Wv()};var lr=-1,dr=0,zc=!1;function Ii(e,t){zc?(t.delete(e),e(0)):(t.add(e),Bv())}function Bv(){lr<0&&(lr=0,He.frameLoop!=="demand"&&Ku(Hv))}function f_(){lr=-1}function Hv(){~lr&&(Ku(Hv),He.batchedUpdates(Wv))}function Wv(){const e=lr;lr=He.now();const t=Vv(lr);if(t&&(zv(io.splice(0,t),n=>n.handler()),dr-=t),!dr){f_();return}bs.flush(),Wu.flush(e?Math.min(64,lr-e):16.667),Uu.flush(),zu.flush(),Yu.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,zv(t,r=>r(n)&&e.add(r)),dr+=e.size,t=e)}}}function zv(e,t){e.forEach(n=>{try{t(n)}catch(r){He.catch(r)}})}function Uc(){}var h_=(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)),qu=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Xu,Uv,pr=null,Yv=!1,Gu=Uc,p_=e=>{e.to&&(Uv=e.to),e.now&&(He.now=e.now),e.colors!==void 0&&(pr=e.colors),e.skipAnimation!=null&&(Yv=e.skipAnimation),e.createStringInterpolator&&(Xu=e.createStringInterpolator),e.requestAnimationFrame&&He.use(e.requestAnimationFrame),e.batchedUpdates&&(He.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Gu=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(v_)):(Kv(e),He(Yc))},advance:Yc,sort(e){if(Ma)He.onFrame(()=>ws.sort(e));else{const t=_n.indexOf(e);~t&&(_n.splice(t,1),qv(e))}},clear(){_n=[],Xo.clear()}};function v_(){Xo.forEach(Kv),Xo.clear(),He(Yc)}function Kv(e){_n.includes(e)||qv(e)}function qv(e){_n.splice(m_(_n,t=>t.priority>e.priority),0,e)}function Yc(e){const t=rc;for(let n=0;n<_n.length;n++){const r=_n[n];Ma=r.priority,r.idle||(Gu(r),r.advance(e),r.idle||t.push(r))}return Ma=0,rc=_n,rc.length=0,_n=t,_n.length>0}function m_(e,t){const n=e.findIndex(t);return n<0?e.length:n}var g_=(e,t,n)=>Math.min(Math.max(n,e),t),y_={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 b_=new RegExp("rgb"+Es(On,On,On)),w_=new RegExp("rgba"+Es(On,On,On,On)),E_=new RegExp("hsl"+Es(On,ja,ja)),x_=new RegExp("hsla"+Es(On,ja,ja,On)),__=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,S_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,C_=/^#([0-9a-fA-F]{6})$/,$_=/^#([0-9a-fA-F]{8})$/;function T_(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=C_.exec(e))?parseInt(t[1]+"ff",16)>>>0:pr&&pr[e]!==void 0?pr[e]:(t=b_.exec(e))?(Gr(t[1])<<24|Gr(t[2])<<16|Gr(t[3])<<8|255)>>>0:(t=w_.exec(e))?(Gr(t[1])<<24|Gr(t[2])<<16|Gr(t[3])<<8|Hf(t[4]))>>>0:(t=__.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=$_.exec(e))?parseInt(t[1],16)>>>0:(t=S_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=E_.exec(e))?(Vf(Bf(t[1]),ta(t[2]),ta(t[3]))|255)>>>0:(t=x_.exec(e))?(Vf(Bf(t[1]),ta(t[2]),ta(t[3]))|Hf(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 Vf(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 Bf(e){return(parseFloat(e)%360+360)%360/360}function Hf(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 Wf(e){let t=T_(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 Xu(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=R_(u,i);return I_(u,i[d],i[d+1],o[d],o[d+1],c,a,s,r.map)}};function I_(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 R_(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var O_=(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 g_(0,1,o/e)},La=1.70158,na=La*1.525,zf=La+1,Uf=2*Math.PI/3,Yf=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,P_={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=>zf*e*e*e-La*e*e,easeOutBack:e=>1+zf*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)*Uf),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Uf)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Yf))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Yf)/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:O_},fi=Symbol.for("FluidValue.get"),po=Symbol.for("FluidValue.observers"),En=e=>!!(e&&e[fi]),on=e=>e&&e[fi]?e[fi]():e,Kf=e=>e[po]||null;function A_(e,t){e.eventObserved?e.eventObserved(t):e(t)}function hi(e,t){const n=e[po];n&&n.forEach(r=>{A_(r,t)})}var Xv=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");D_(this,e)}},D_=(e,t)=>Gv(e,fi,t);function Eo(e,t){if(e[fi]){let n=e[po];n||Gv(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 Gv=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ba=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,N_=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,qf=new RegExp(`(${ba.source})(%|[a-z]+)`,"i"),k_=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,xs=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Zv=e=>{const[t,n]=M_(e);if(!t||qu())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 Zv(n);if(n)return n}return e},M_=e=>{const t=xs.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ic,j_=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Qv=e=>{ic||(ic=pr?new RegExp(`(${Object.keys(pr).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>on(i).replace(xs,Zv).replace(N_,Wf).replace(ic,Wf)),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=!qf.test(t[0])&&((c=t.find(u=>qf.test(u)))==null?void 0:c.replace(ba,""));let s=0;return t[0].replace(ba,()=>`${o[s++](i)}${a||""}`).replace(k_,j_)}},Zu="react-spring: ",Jv=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Zu}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},L_=Jv(console.warn);function F_(){L_(`${Zu}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var V_=Jv(console.warn);function B_(){V_(`${Zu}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)||!qu()&&xs.test(e)||e in(pr||{}))}var Qu=qu()?l.useEffect:l.useLayoutEffect,H_=()=>{const e=l.useRef(!1);return Qu(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function em(){const e=l.useState()[1],t=H_();return()=>{t.current&&e(Math.random())}}function W_(e,t){const[n]=l.useState(()=>({inputs:t,result:e()})),r=l.useRef(),o=r.current;let i=o;return i?t&&i.inputs&&z_(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 z_(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 tm=e=>l.useEffect(e,U_),U_=[];function Xf(e){const t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var vi=Symbol.for("Animated:node"),Y_=e=>!!e&&e[vi]===e,Fn=e=>e&&e[vi],Ju=(e,t)=>h_(e,vi,t),Ss=e=>e&&e[vi]&&e[vi].getPayload(),nm=class{constructor(){Ju(this,this)}getPayload(){return this.payload||[]}},Oi=class extends nm{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 nm{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Bn(this.source,(n,r)=>{Y_(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))}},rm=class extends Cs{constructor(e){super(e)}static create(e){return new rm(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(K_)),!0)}};function K_(e){return(_s(e)?mi:Oi).create(e)}function Kc(e){const t=Fn(e);return t?t.constructor:ve.arr(e)?rm:_s(e)?mi:Oi}var Gf=(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=G_(o,b)},[o]),[s,c]=X_(r,t),u=em(),d=()=>{const b=i.current;if(n&&!b)return;(b?t.applyAnimatedValues(b,s.getValue(!0)):!1)===!1&&u()},f=new q_(d,c),m=l.useRef();Qu(()=>(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,[]),tm(()=>()=>{const b=m.current;Qe(b.deps,y=>pi(y,b))});const h=t.getComponentProps(s.getValue());return $e.createElement(e,{...h,ref:a})})},q_=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&He.write(this.update)}};function X_(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 G_(e,t){return e&&(ve.fun(e)?e(t):e.current=t),t}var Zf=Symbol.for("AnimatedComponent"),Z_=(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=Qf(a)||"Anonymous";return ve.str(a)?a=i[a]||(i[a]=Gf(a,o)):a=a[Zf]||(a[Zf]=Gf(a,o)),a.displayName=`Animated(${s})`,a};return Bn(e,(a,s)=>{ve.arr(e)&&(s=Qf(a)),i[s]=i(a)}),{animated:i}},Qf=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))),om=(e,t)=>ve.obj(e)?t&&e[t]:e,im=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Q_=e=>e,el=(e,t=Q_)=>{let n=J_;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},J_=["config","onProps","onStart","onChange","onPause","onResume","onRest"],eS={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 tS(e){const t={};let n=0;if(Bn(e,(r,o)=>{eS[o]||(t[o]=r,n++)}),n)return t}function am(e){const t=tS(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 nS(e){for(const t in e)return!0;return!1}function qc(e){return ve.fun(e)||ve.arr(e)&&ve.obj(e[0])}function rS(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function oS(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var sm={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}},Xc={...sm.default,mass:1,damping:1,easing:P_.linear,clamp:!1},iS=class{constructor(){this.velocity=0,Object.assign(this,Xc)}};function aS(e,t,n){n&&(n={...n},Jf(n,t),t={...n,...t}),Jf(e,t),Object.assign(e,t);for(const a in Xc)e[a]==null&&(e[a]=Xc[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 Jf(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 eh=[],sS=class{constructor(){this.changed=!1,this.values=eh,this.toValues=null,this.fromValues=eh,this.config=new iS,this.immediate=!1}};function cm(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 tl=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?ao(e.get()):t.every(n=>n.noop)?um(e.get()):Rn(e.get(),t.every(n=>n.finished)),um=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 lm(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=el(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 th,E=new nh;return(async()=>{if(An.skipAnimation)throw yi(n),E.result=Rn(r,!1),f(E),E;h(v);const C=ve.obj(T)?{...T}:{...S,to:T};C.parentId=o,Bn(u,(D,A)=>{ve.und(C[A])&&(C[A]=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 th)y=T.result;else if(T instanceof nh)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 th=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.")}},nh=class extends Error{constructor(){super("SkipAnimationSignal")}},Gc=e=>e instanceof nl,cS=1,nl=class extends Xv{constructor(){super(...arguments),this.id=cS++,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 F_(),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"),dm=1,Zc=2,Qc=4,ac=e=>(e[jr]&dm)>0,ir=e=>(e[jr]&Zc)>0,Ao=e=>(e[jr]&Qc)>0,rh=(e,t)=>t?e[jr]|=Zc|dm:e[jr]&=~Zc,oh=(e,t)=>t?e[jr]|=Qc:e[jr]&=~Qc,uS=class extends nl{constructor(e,t){if(super(),this.animation=new sS,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 E=i.decay===!0?.998:i.decay,C=Math.exp(-(1-E)*b);h=y+T/(1-E)*(1-C),m=Math.abs(u.lastPosition-h)<=v,S=T*C}else{S=u.lastVelocity==null?T:u.lastVelocity;const E=i.restVelocity||v/10,C=i.clamp?0:i.bounce,I=!ve.und(C),D=y==f?u.v0>0:y<f;let A,F=!1;const k=1,B=Math.ceil(e/k);for(let R=0;R<B&&(A=Math.abs(S)>E,!(!A&&(m=Math.abs(f-h)<=v,m)));++R){I&&(F=h==f||h>f==D,F&&(S=-S*C,h=f));const w=-i.tension*1e-6*(h-f),p=-i.friction*.001*S,$=(w+p)/i.mass;S=S+$*k,h=h+S*k}}else{let E=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)),E=(i.progress||0)+b/this._memoizedDuration,E=E>1?1:E<0?0:E,u.durationProgress=E),h=y+i.easing(E)*(f-y),S=(h-u.lastPosition)/e,m=E==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=>tl(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||qc(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,el(e,(a,s)=>/^on/.test(s)?om(a,n):a)),ah(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 cm(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Ao(this)||(oh(this,!0),Ho(i.pauseQueue),No(this,"onPause",Rn(this,Do(this,this.animation.to)),this))},resume:()=>{Ao(this)&&(oh(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=fm(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=qc(t.to),{config:y}=s,{decay:T,velocity:S}=y;(r||o)&&(y.velocity=0),t.config&&!b&&aS(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 E=ve.und(t.reset)?o&&!t.default:!ve.und(f)&&Go(t.reset,i),C=E?f:this.get(),I=gi(d),D=ve.num(I)||ve.arr(I)||_s(I),A=!b&&(!D||Go(a.immediate||t.immediate,i));if(h){const R=Kc(d);if(R!==v.constructor)if(A)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),B=!1;if(!k){const R=E||!ac(this)&&m;(h||R)&&(B=Kn(gi(C),I),k=!B),(!Kn(s.immediate,A)&&!A||!Kn(y.decay,T)||!Kn(y.velocity,S))&&(k=!0)}if(B&&ir(this)&&(s.changed&&!E?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!=A&&(s.immediate=A,!A&&!E&&this._set(c)),k)){const{onRest:R}=s;Qe(dS,p=>ah(this,t,p));const w=Rn(this,Do(this,c));Ho(this._pendingCalls,w),this._pendingCalls.add(n),s.changed&&He.batchedUpdates(()=>{var p;s.changed=!E,R==null||R(w,this),E?Ir(a.onRest,w):(p=s.onStart)==null||p.call(s,w,this)})}E&&this._set(C),b?n(lm(t.to,t,this._state,this)):k?this._start():ir(this)&&!h?this._pendingCalls.add(n):n(um(C))}_focus(e){const t=this.animation;e!==t.to&&(Kf(this)&&this._detach(),t.to=e,Kf(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;En(t)&&(Eo(t,this),Gc(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=Kc(n);!r||r.constructor!=o?Ju(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)||(rh(this,!0),Ao(this)||this._resume())}_resume(){An.skipAnimation?this.finish():ws.start(this)}_stop(e,t){if(ir(this)){rh(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 fm(e,t=e.loop,n=e.to){const r=Ir(t);if(r){const o=r!==!0&&am(r),i=(o||e).reverse,a=!o||o.reset;return bi({...e,loop:t,default:!1,pause:void 0,to:!i||qc(n)?n:void 0,from:a?e.from:void 0,reset:a,...o})}}function bi(e){const{to:t,from:n}=e=am(e),r=new Set;return ve.obj(t)&&ih(t,r),ve.obj(n)&&ih(n,r),e.keys=r.size?Array.from(r):null,e}function lS(e){const t=bi(e);return ve.und(t.default)&&(t.default=el(t)),t}function ih(e,t){Bn(e,(n,r)=>n!=null&&t.add(r))}var dS=["onStart","onRest","onChange","onPause","onResume"];function ah(e,t,n){e.animation[n]=t[n]!==im(t,n)?om(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 fS=["onStart","onChange","onRest"],hS=1,pS=class{constructor(t,n){this.id=hS++,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):(gm(this,n),Jc(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 Jc(e,t){return Promise.all(t.map(n=>hm(e,n))).then(n=>tl(e,n))}async function hm(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(fS,y=>{const T=t[y];if(ve.fun(T)){const S=e._events[y];t[y]=({finished:v,cancelled:E})=>{const C=S.get(T);C?(v||(C.finished=!1),E&&(C.cancelled=!0)):S.set(T,{value:null,finished:v||!1,cancelled:E||!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||im(t,"cancel")===!0;(d||h&&f.asyncId)&&m.push(cm(++e._lastAsyncId,{props:t,state:f,actions:{pause:Uc,resume:Uc,start(y,T){h?(yi(f,e._lastAsyncId),T(ao(e))):(y.onRest=s,T(lm(d,y,f,e)))}}})),f.paused&&await new Promise(y=>{f.resumeQueue.add(y)});const b=tl(e,await Promise.all(m));if(a&&b.finished&&!(n&&b.noop)){const y=fm(t,a,o);if(y)return gm(e,[y]),hm(e,y,!0)}return c&&He.batchedUpdates(()=>c(b,e,e.item)),b}function sh(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}),mm(n,r,o=>vm(o))}),pm(e,n),n}function pm(e,t){Bn(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Eo(n,e))})}function vm(e,t){const n=new uS;return n.key=e,t&&Eo(n,t),n}function mm(e,t,n){t.keys&&Qe(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function gm(e,t){Qe(t,n=>{mm(e.springs,n,r=>vm(r,e))})}var $s=({children:e,...t})=>{const n=l.useContext(Va),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=W_(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=Va;return $e.createElement(i,{value:t},e)},Va=vS($s,{});$s.Provider=Va.Provider;$s.Consumer=Va.Consumer;function vS(e,t){return Object.assign(e,$e.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var mS=()=>{const e=[],t=function(r){B_();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 gS(e,t,n){const r=ve.fun(t)&&t;r&&!n&&(n=[]);const o=l.useMemo(()=>r||arguments.length==3?mS():void 0,[]),i=l.useRef(0),a=em(),s=l.useMemo(()=>({ctrls:[],queue:[],flush(S,v){const E=sh(S,v);return i.current>0&&!s.queue.length&&!Object.keys(E).some(I=>!S.springs[I])?Jc(S,v):new Promise(I=>{pm(S,E),s.queue.push(()=>{I(Jc(S,v))}),a()})}}),[]),c=l.useRef([...s.ctrls]),u=[],d=Xf(e)||0;l.useMemo(()=>{Qe(c.current.slice(e,d),S=>{rS(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 E=S;E<v;E++){const C=c.current[E]||(c.current[E]=new pS(null,s.flush)),I=r?r(E,C):t[E];I&&(u[E]=lS(I))}}const m=c.current.map((S,v)=>sh(S,u[v])),h=l.useContext($s),b=Xf(h),y=h!==b&&nS(h);Qu(()=>{i.current++,s.ctrls=c.current;const{queue:S}=s;S.length&&(s.queue=[],Qe(S,v=>v())),Qe(c.current,(v,E)=>{o==null||o.add(v),y&&v.start({default:h});const C=u[E];C&&(oS(v,C.ref),v.ref?v.queue.push(C):v.start(C))})}),tm(()=>()=>{Qe(s.ctrls,S=>S.stop(!0))});const T=m.map(S=>({...S}));return o?[T,o]:T}function yS(e,t){const n=ve.fun(e),[[r],o]=gS(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,o]:r}var ym=class extends nl{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=di(...t);const n=this._get(),r=Kc(n);Ju(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&&ch(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&&!ch(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),Gc(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,(Gc(n)?n.priority:0)+1),0))}};function bS(e){return e.idle!==!1}function ch(e){return!e.size||Array.from(e).every(bS)}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 ym(e,t);An.assign({createStringInterpolator:Qv,to:(e,t)=>new ym(e,t)});var bm=/^--/;function wS(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!bm.test(e)&&!(Zo.hasOwnProperty(e)&&Zo[e])?t+"px":(""+t).trim()}var uh={};function ES(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:uh[f]||(uh[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=wS(f,r[f]);bm.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},xS=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),_S=["Webkit","Ms","Moz","O"];Zo=Object.keys(Zo).reduce((e,t)=>(_S.forEach(n=>e[xS(n,t)]=e[t]),e),Zo);var SS=/^(matrix|translate|scale|rotate|skew)/,CS=/^(translate)/,$S=/^(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,TS=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(SS.test(s)){if(delete r[s],ve.und(a))return;const c=CS.test(s)?"px":$S.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 IS(o,i)),super(r)}},IS=class extends Xv{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)}},RS=["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:Qv,colors:y_});var OS=Z_(RS,{applyAnimatedValues:ES,createAnimatedStyle:e=>new TS(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),PS=OS.animated;function eu(e,t){return e.map(function(n,r){return n+t[r]})}function rl(e,t){return e.map(function(n,r){return n-t[r]})}function tu(e){return Math.hypot.apply(Math,e)}function AS(e,t,n){var r=tu(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=tu(e);return{velocities:s,velocity:a,distance:u,direction:c}}function nu(e){return Math.sign?Math.sign(e):+(e>0)-+(e<0)||+e}function DS(e,t,n){return Math.max(t,Math.min(e,n))}function NS(e,t){return Math.pow(e,t*5)}function lh(e,t,n){return t===0||Math.abs(t)===1/0?NS(e,n):e*t*n/(t+n*e)}function Qo(e,t,n,r){return r===void 0&&(r=.15),r===0?DS(e,t,n):e<t?-lh(t-e,n-t,r)+t:e>n?+lh(e-n,n-t,r)+n:e}function dh(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 kS(e,t,n){return t&&dh(e.prototype,t),n&&dh(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 wm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function MS(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 jS(e,t){if(e){if(typeof e=="string")return fh(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 fh(e,t)}}function fh(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=jS(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 Em(){}function xm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?Em: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 hh(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 ol(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]=ol(e[a],s);break;case"boolean":s&&(n[a]=e[a]);break}}return n}function LS(){try{return"constructor"in GestureEvent}catch{return!1}}function _m(){return typeof window<"u"&&"ontouchstart"in window}function FS(){return typeof window<"u"&&"onpointerdown"in window}function Sm(e){return"pointerId"in e?null:e.type==="touchend"?e.changedTouches:e.targetTouches}function Cm(e){return Array.from(Sm(e)).map(function(t){return t.identifier})}function ph(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 VS=function(t){return t};function vh(e,t){t===void 0&&(t=VS);var n=Sm(e),r=n?n[0]:e,o=r.clientX,i=r.clientY;return t([o,i])}var BS=180,HS=.15,WS=.5,zS=50,US=250,YS={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(HS);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},$m=tn({},YS,{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 $m.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]]}}),KS=typeof window<"u"&&window.document&&window.document.createElement,qS={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=KS?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},XS=tn({},$m,{useTouch:function(t){t===void 0&&(t=!1);var n=_m(),r=FS();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=WS),ur(t)},swipeDistance:function(t){return t===void 0&&(t=zS),ur(t)},swipeDuration:function(t){return t===void 0&&(t=US),t},delay:function(t){switch(t===void 0&&(t=0),t){case!0:return BS;case!1:return 0;default:return t}}});function GS(e){return e===void 0&&(e={}),ol(e,qS)}function ZS(e){return e===void 0&&(e={}),ol(e,XS)}function QS(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=MS(e,["domTarget","eventOptions","window","enabled"]),a=GS({domTarget:t,eventOptions:n,window:r,enabled:o});return a.drag=ZS(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:Em,canceled:!1,memo:void 0,args:void 0},e)}function Tm(){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,JS=function(t){return t},eC=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?mh(h[0],m[0]):u[0],y=u[1]===!1?mh(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,E=[S[0]!==!1?h[0]-S[0]:0,S[1]!==!1?h[1]-S[1]:0],C=eu(E,d),I=c?o:[0,0];return E=gh(a,eu(E,s),I),tn({},T,{intentional:S[0]!==!1||S[1]!==!1,_initial:s,_movement:v,movement:E,values:r,offset:gh(a,C,I),delta:rl(E,f)})},t.clean=function(){this.clearTimeout()},kS(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||JS}}]),e}();function mh(e,t){return Math.abs(e)>=t?nu(e)*t:!1}function gh(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 tC(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=rl(c(h),c([0,0])).map(Math.abs),y=tn({},Tm()[a],{_active:!0,args:s,values:t,initial:r??t,_threshold:b,offset:u,lastOffset:u,startTime:d});return tn({},y,{_initial:hh(f,y),_bounds:hh(m,y)})}var nC=function(t){var n=this;this.classes=t,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=_m(),this.supportsGestureEvents=LS(),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?cC(n,a):uC(n,a)},this.effect=function(){return n.config.domTarget&&n.bind(),n.clean},this.clean=function(){var r=Rm(n.config),o=n.config.eventOptions;r&&Pi(r,Im(n.domListeners),o),Object.values(n.timeouts).forEach(clearTimeout),iC(n)},this.classes=t,this.state=Tm(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function rC(e,t){"pointerId"in t?e.pointerIds.add(t.pointerId):e.touchIds=new Set(Cm(t))}function oC(e,t){"pointerId"in t?e.pointerIds.delete(t.pointerId):Cm(t).forEach(function(n){return e.touchIds.delete(n)})}function iC(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 aC(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 sC(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),Om(o.window,i[t]=n,r))}function cC(e,t){var n=e.config,r=e.domListeners,o=Rm(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;Pi(o,Im(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,xm.apply(void 0,d)])}Om(o,r,i)}function uC(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]=xm.apply(void 0,d)}return r}function Im(e){return e===void 0&&(e=[]),e.splice(0,e.length)}function Rm(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 Om(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 lC(e,t,n){n===void 0&&(n={});var r=fC(e),o=l.useMemo(function(){return new nC(r)},[]);return o.config=t,o.handlers=e,o.nativeRefs=n,l.useEffect(o.effect,[]),o.config.domTarget?dC:o.bind}function dC(){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 fC(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 hC=function(e){wm(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.getInternalMovement=function(o,i){return rl(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,AS(a.movement,a.delta,s))}return a},n.mapStateValues=function(o){return{xy:o.values,vxvy:o.velocities}},t}(eC),pC=3;function yh(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}var vC=function(e){wm(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){yh(o),sC(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,yh(o),r.setTimeout(r.startDrag.bind(Un(r)),r.config.delay,o)},r.setStartState=function(o){var i=vh(o,r.transform);r.updateSharedState(ph(o)),r.updateGestureState(tn({},tC(Un(r),i,o),uc(Un(r),o,!0),{_pointerId:r.getEventId(o)})),r.updateGestureState(r.getMovement(i))},r.onDragStart=function(o){rC(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=eu(r.transform([a,s]),r.state.values)}else i=vh(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=ph(o);r.updateSharedState(u);var d=uc(Un(r),o),f=tu(c._movement),m=r.state._dragIsTap;m&&f>=pC&&(m=!1),r.updateGestureState(tn({},d,c,{_dragIsTap:m})),r.fireGestureHandler()}},r.onDragEnd=function(o){if(oC(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,E=v[0],C=v[1],I=r.config.swipeDuration,D=tn({},uc(Un(r),o),r.getMovement(r.state.values)),A=[0,0];D.elapsedTime<I&&(h!==!1&&Math.abs(s)>T&&Math.abs(d)>E&&(A[0]=nu(s)),b!==!1&&Math.abs(c)>S&&Math.abs(f)>C&&(A[1]=nu(c))),r.updateSharedState({buttons:0}),r.updateGestureState(tn({},D,{tap:i,swipe:A})),r.fireGestureHandler(r.config.filterTaps&&i===!0)}},r.clean=function(){e.prototype.clean.call(Un(r)),r.state._dragStarted=!1,r.releasePointerCapture(),aC(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}(hC);function mC(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 gC(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 yC(e,t){t===void 0&&(t={}),Tr.set("drag",vC);var n=l.useRef();return n.current||(n.current=mC(QS,gC)),lC({drag:e},n.current(t))}var bC="aglyib0";const xo=l.forwardRef(({as:e,children:t,className:n,style:r,isDisabled:o,...i},a)=>{const s=e||"button";return M.jsx(s,{ref:a,as:e,"data-test-id":i["data-test-id"],className:Ie(bC,n),disabled:o,style:r,...i,children:M.jsx(os,{size:16,color:o?$t.theme.colors.grey1:$t.theme.colors.black})})});xo.displayName="Button";xo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0};const Pm=l.forwardRef(({header:e,onBack:t,onClose:n,showBack:r,showClose:o,title:i,bind:a,hasHandleBar:s},c)=>e!==!1?M.jsx(et,{"data-rsbs-header":!0,"data-rsbs-header-handle-bar":s,ref:c,...s?a==null?void 0:a():{},children:e||M.jsxs(Yt,{alignItems:"center",justifyContent:"space-between",pt:s?"$16":"$8",pb:"$8",gap:"$16",children:[M.jsxs(Yt,{alignItems:"center",gap:"$16",children:[r&&M.jsx(E0,{cursor:"pointer",onClick:t,size:18,color:$t.theme.colors.grey1,"data-test-id":"vds-BS-back-btn"}),i&&M.jsx(sn,{fontWeight:"$bold",textStyle:"subtitle2",m:"$0",children:i})]}),o&&M.jsx(xo,{onClick:n,"data-test-id":"vds-BS-close-btn"})]})},"header"):M.jsx(et,{"data-rsbs-header":!0,ref:c,...a==null?void 0:a()},"header"));Pm.defaultProps={title:void 0,header:void 0,showBack:void 0,showClose:!0,hasHandleBar:!0,bind:void 0,onBack:void 0,onClose:void 0};function wC({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 Am=["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=Am.join(","),Dm=typeof Element>"u",Lr=Dm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ha=!Dm&&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},
|
|
143
|
+
*/var Am=["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=Am.join(","),Dm=typeof Element>"u",Lr=Dm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ha=!Dm&&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},EC=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Nm=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},km=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},Mm=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)||EC(t))&&!Mm(t)?0:t.tabIndex},xC=function(t,n){var r=Rr(t);return r<0&&n&&!Mm(t)?0:r},_C=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},jm=function(t){return t.tagName==="INPUT"},SC=function(t){return jm(t)&&t.type==="hidden"},CC=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},$C=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},TC=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=$C(o,t.form);return!i||i===t},IC=function(t){return jm(t)&&t.type==="radio"},RC=function(t){return IC(t)&&!TC(t)},OC=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},bh=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},PC=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 bh(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=s}if(OC(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return bh(t);return!1},AC=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)||SC(n)||PC(n,t)||CC(n)||AC(n))},ru=function(t,n){return!(RC(n)||Rr(n)<0||!za(t,n))},DC=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},NC=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=xC(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(_C).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},kC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=km([t],n.includeContainer,{filter:ru.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:DC}):r=Nm(t,n.includeContainer,ru.bind(null,n)),NC(r)},MC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=km([t],n.includeContainer,{filter:za.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Nm(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:ru(n,t)},jC=Am.concat("iframe").join(","),lc=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Lr.call(t,jC)===!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 wh(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 Eh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wh(Object(n),!0).forEach(function(r){jC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jC(e,t,n){return t=FC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LC(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 FC(e){var t=LC(e,"string");return typeof t=="symbol"?t:String(t)}var xh={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()}},VC=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},BC=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},HC=function(t){return Jo(t)&&!t.shiftKey},WC=function(t){return Jo(t)&&t.shiftKey},_h=function(t){return setTimeout(t,0)},Sh=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},zC=[],UC=function(t,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||zC,i=Eh({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:HC,isKeyBackward:WC},n),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(R,w,p){return R&&R[w]!==void 0?R[w]:i[p||w]},u=function(R,w){var p=typeof(w==null?void 0:w.composedPath)=="function"?w.composedPath():void 0;return a.containerGroups.findIndex(function($){var P=$.container,j=$.tabbableNodes;return P.contains(R)||(p==null?void 0:p.includes(P))||j.find(function(W){return W===R})})},d=function(R){var w=i[R];if(typeof w=="function"){for(var p=arguments.length,$=new Array(p>1?p-1:0),P=1;P<p;P++)$[P-1]=arguments[P];w=w.apply(void 0,$)}if(w===!0&&(w=void 0),!w){if(w===void 0||w===!1)return w;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var j=w;if(typeof w=="string"&&(j=r.querySelector(w),!j))throw new Error("`".concat(R,"` as selector refers to no known node"));return j},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 w=a.tabbableGroups[0],p=w&&w.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 w=NC(R,i.tabbableOptions),p=kC(R,i.tabbableOptions),$=w.length>0?w[0]:void 0,P=w.length>0?w[w.length-1]:void 0,j=p.find(function(ne){return Qr(ne)}),W=p.slice().reverse().find(function(ne){return Qr(ne)}),Y=!!w.find(function(ne){return Rr(ne)>0});return{container:R,tabbableNodes:w,focusableNodes:p,posTabIndexesFound:Y,firstTabbableNode:$,lastTabbableNode:P,firstDomTabbableNode:j,lastDomTabbableNode:W,nextTabbableNode:function(H){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,oe=w.indexOf(H);return oe<0?L?p.slice(p.indexOf(H)+1).find(function(G){return Qr(G)}):p.slice(0,p.indexOf(H)).reverse().find(function(G){return Qr(G)}):w[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 B(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){B(f());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,VC(R)&&R.select()}},b=function(R){var w=d("setReturnFocus",R);return w||(w===!1?!1:R)},y=function(R){var w=R.target,p=R.event,$=R.isBackward,P=$===void 0?!1:$;w=w||oa(p),m();var j=null;if(a.tabbableGroups.length>0){var W=u(w,p),Y=W>=0?a.containerGroups[W]:void 0;if(W<0)P?j=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:j=a.tabbableGroups[0].firstTabbableNode;else if(P){var ne=Sh(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return w===ce});if(ne<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w,!1))&&(ne=W),ne>=0){var H=ne===0?a.tabbableGroups.length-1:ne-1,L=a.tabbableGroups[H];j=Rr(w)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w,!1))}else{var oe=Sh(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return w===ce});if(oe<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w))&&(oe=W),oe>=0){var G=oe===a.tabbableGroups.length-1?0:oe+1,K=a.tabbableGroups[G];j=Rr(w)>=0?K.firstTabbableNode:K.firstDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w))}}else j=d("fallbackFocus");return j},T=function(R){var w=oa(R);if(!(u(w,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},S=function(R){var w=oa(R),p=u(w,R)>=0;if(p||w instanceof Document)p&&(a.mostRecentlyFocusedNode=w);else{R.stopImmediatePropagation();var $,P=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var j=u(a.mostRecentlyFocusedNode),W=a.containerGroups[j].tabbableNodes;if(W.length>0){var Y=W.findIndex(function(ne){return ne===a.mostRecentlyFocusedNode});Y>=0&&(i.isKeyForward(a.recentNavEvent)?Y+1<W.length&&($=W[Y+1],P=!1):Y-1>=0&&($=W[Y-1],P=!1))}}else a.containerGroups.some(function(ne){return ne.tabbableNodes.some(function(H){return Rr(H)>0})})||(P=!1);else P=!1;P&&($=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),h($||a.mostRecentlyFocusedNode||f())}a.recentNavEvent=void 0},v=function(R){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var p=y({event:R,isBackward:w});p&&(Jo(R)&&R.preventDefault(),h(p))},E=function(R){if(BC(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 w=oa(R);u(w,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return xh.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?_h(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",E,{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",E,!0),s},A=function(R){var w=R.some(function(p){var $=Array.from(p.removedNodes);return $.some(function(P){return P===a.mostRecentlyFocusedNode})});w&&h(f())},F=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(A):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 w=c(R,"onActivate"),p=c(R,"onPostActivate"),$=c(R,"checkCanFocusTrap");$||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,w==null||w();var P=function(){$&&m(),I(),k(),p==null||p()};return $?($(a.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(R){if(!a.active)return this;var w=Eh({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(),xh.deactivateTrap(o,s);var p=c(w,"onDeactivate"),$=c(w,"onPostDeactivate"),P=c(w,"checkCanReturnFocus"),j=c(w,"returnFocus","returnFocusOnDeactivate");p==null||p();var W=function(){_h(function(){j&&h(b(a.nodeFocusedBeforeActivation)),$==null||$()})};return j&&P?(P(b(a.nodeFocusedBeforeActivation)).then(W,W),this):(W(),this)},pause:function(R){if(a.paused||!a.active)return this;var w=c(R,"onPause"),p=c(R,"onPostPause");return a.paused=!0,w==null||w(),D(),k(),p==null||p(),this},unpause:function(R){if(!a.paused||!a.active)return this;var w=c(R,"onUnpause"),p=c(R,"onPostUnpause");return a.paused=!1,w==null||w(),m(),I(),k(),p==null||p(),this},updateContainerElements:function(R){var w=[].concat(R).filter(Boolean);return a.containers=w.map(function(p){return typeof p=="string"?r.querySelector(p):p}),a.active&&m(),k(),this}},s.updateContainerElements(t),s};function YC({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=UC(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 KC(){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 qC(){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 XC(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 il=!1;if(typeof window<"u"){var Ch={get passive(){il=!0}};window.addEventListener("testPassive",null,Ch),window.removeEventListener("testPassive",null,Ch)}var Lm=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,Fm=-1,ei=void 0,ti=void 0,Vm=function(t){return fr.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(t))})},Ya=function(t){var n=t||window.event;return Vm(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},GC=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")},ZC=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},JC=function(t,n){var r=t.targetTouches[0].clientY-Fm;return Vm(t.target)?!1:n&&n.scrollTop===0&&r>0||QC(n)&&r<0?Ya(t):(t.stopPropagation(),!0)},e$=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(XC(fr),[r]),Lm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(Fm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&JC(o,t)},Ua||(document.addEventListener("touchmove",Ya,il?{passive:!1}:void 0),Ua=!0)):GC(n)}},t$=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}),Lm?(t.ontouchstart=null,t.ontouchmove=null,Ua&&fr.length===0&&(document.removeEventListener("touchmove",Ya,il?{passive:!1}:void 0),Ua=!1)):fr.length||ZC()};function n$({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,e$(o,{allowTouchMove:a=>a.closest("[data-body-scroll-lock-ignore]"),reserveScrollBarGap:n}))},deactivate:()=>{i&&(i=!1,t$(o))}}},[t,e,n]),r}var Ar=[],r$=function(){return Ar.some(function(e){return e.activeTargets.length>0})},o$=function(){return Ar.some(function(e){return e.skippedTargets.length>0})},$h="ResizeObserver loop completed with undelivered notifications.",i$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:$h}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=$h),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)},a$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Dr(this)}return e}(),Bm=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}(),al=function(e){return e instanceof SVGElement&&"getBBox"in e},Hm=function(e){if(al(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)},Th=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)},s$=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,Ih=/auto|scroll/,c$=/^tb|vertical/,u$=/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 a$((n?t:e)||0,(n?e:t)||0)},Rh=Dr({devicePixelContentBoxSize:so(),borderBoxSize:so(),contentBoxSize:so(),contentRect:new Bm(0,0,0,0)}),Wm=function(e,t){if(t===void 0&&(t=!1),ia.has(e)&&!t)return ia.get(e);if(Hm(e))return ia.set(e,Rh),Rh;var n=getComputedStyle(e),r=al(e)&&e.ownerSVGElement&&e.getBBox(),o=!u$&&n.boxSizing==="border-box",i=c$.test(n.writingMode||""),a=!r&&Ih.test(n.overflowY||""),s=!r&&Ih.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,E=m+b,C=s?e.offsetHeight-E-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?T+v:0,A=o?S+E:0,F=r?r.width:jn(n.width)-D-I,k=r?r.height:jn(n.height)-A-C,B=F+T+I+v,R=k+S+C+E,w=Dr({devicePixelContentBoxSize:so(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:so(B,R,i),contentBoxSize:so(F,k,i),contentRect:new Bm(f,c,F,k)});return ia.set(e,w),w},zm=function(e,t,n){var r=Wm(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}},l$=function(){function e(t){var n=Wm(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}(),Um=function(e){if(Hm(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},d$=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 l$(u.target),f=Um(u.target);s.push(d),u.lastReportedSize=zm(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},Oh=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()&&(Um(o.target)>e?n.activeTargets.push(o):n.skippedTargets.push(o))})})},f$=function(){var e=0;for(Oh(e);r$();)e=d$(),Oh(e);return o$()&&i$(),e>0},dc,Ym=[],h$=function(){return Ym.splice(0).forEach(function(e){return e()})},p$=function(e){if(!dc){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return h$()}).observe(n,r),dc=function(){n.textContent="".concat(t?t--:t++)}}Ym.push(e),dc()},v$=function(e){p$(function(){requestAnimationFrame(e)})},xa=0,m$=function(){return!!xa},g$=250,y$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ph=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ah=function(e){return e===void 0&&(e=0),Date.now()+e},fc=!1,b$=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=g$),!fc){fc=!0;var r=Ah(t);v$(function(){var o=!1;try{o=f$()}finally{if(fc=!1,t=r-Ah(),!m$())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,y$)};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(),Ph.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ph.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ou=new b$,Dh=function(e){!xa&&e>0&&ou.start(),xa+=e,!xa&&ou.stop()},w$=function(e){return!al(e)&&!s$(e)&&getComputedStyle(e).display==="inline"},E$=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=zm(this.target,this.observedBox,!0);return w$(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),x$=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),aa=new WeakMap,Nh=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 x$(t,n);aa.set(t,r)},e.observe=function(t,n,r){var o=aa.get(t),i=o.observationTargets.length===0;Nh(o.observationTargets,n)<0&&(i&&Ar.push(o),o.observationTargets.push(new E$(n,r&&r.box)),Dh(1),ou.schedule())},e.unobserve=function(t,n){var r=aa.get(t),o=Nh(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Ar.splice(Ar.indexOf(r),1),r.observationTargets.splice(o,1),Dh(-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}(),_$=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(!Th(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(!Th(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 S$(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 C$=process.env.NODE_ENV==="development"&&typeof window<"u"?window.location.search==="?debug":!1,$$={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 _$(a);return s.observe(e.current,$$),()=>s.disconnect()},[e,a,n]),n?o:0}function T$(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 I$({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$(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 R$({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}=I$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:d,resizeSourceRef:f,conditions:m}),{snapPoints:S,minSnap:v,maxSnap:E}=S$(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 A=Ka(D);return S.reduce((F,k)=>Math.abs(k-A)<Math.abs(F-A)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${E}`),{minSnap:v,maxSnap:E,findSnap:C,maxHeight:h}}function O$(){return gS(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function P$({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 A$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},kh={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Mh={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},D$=({initialState:e})=>e==="OPEN",N$=({initialState:e})=>e==="CLOSED",k$=Zx({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:{...kh,...Mh}}}},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:{...kh,...Mh}}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{...A$},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:N$,initiallyOpen:D$}}),{tension:M$,friction:ca}=sm.default,j$=["closed","opening","open","closing","dragging","snapping","resizing"];function L$({snapPoints:e,lastSnap:t}){return t??Math.min(...e)}function F$({minHeight:e}){return e}const V$=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=L$,snapPoints:h=F$,blocking:b=!0,scrollLocking:y=!0,style:T,onSpringStart:S,onSpringCancel:v,onSpringEnd:E,reserveScrollBarGap:C=b,expandOnContentDrag:I=!1,title:D,showClose:A,showBack:F,onBack:k,onCloseWhenClickOutside:B=!0,hasHandleBar:R=!0,"data-test-id":w,padding:p,...$},P){const{ready:j,registerReady:W}=KC(),Y=l.useRef(!1),ne=l.useRef(S),H=l.useRef(v),L=l.useRef(E);l.useEffect(()=>{ne.current=S,H.current=v,L.current=E},[v,S,E]);const[oe,G]=O$(),K=l.useRef(null),Z=l.useRef(null),ce=l.useRef(null),z=l.useRef(null),U=l.useRef(null),ee=l.useRef(null),Q=l.useRef(0),ie=l.useRef(),re=l.useRef(!1),me=qC(),{x:Te="default",y:Pe="default"}=p??{},Ne=Te==="default",Oe=Pe==="default",We=n$({targetRef:Z,enabled:j&&y,reserveScrollBarGap:C}),De=bC({targetRef:K,enabled:j&&b}),ot=YC({targetRef:K,fallbackRef:ee,initialFocusRef:u||void 0,enabled:j&&b&&u!==!1}),{minSnap:ze,maxSnap:xt,maxHeight:Xe,findSnap:Pt}=R$({contentRef:ce,controlledMaxHeight:f,footerEnabled:!!o,footerRef:U,getSnapPoints:h,headerEnabled:i!==!1,headerRef:z,heightRef:Q,lastSnapRef:c,ready:j,registerReady:W,resizeSourceRef:ie,conditions:{hasPaddingY:Oe,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:M$,friction:Math.max(ca,ca+(ca-ca*Ue))},onRest:(...Ot)=>{Jt(...Ot),he==null||he(...Ot)}})),[G]),[Fe,gt]=c_(k$,{devTools:C$,actions:{onOpenCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"OPEN"})},[]),onSnapCancel:l.useCallback(he=>{var Ue;return(Ue=H.current)==null?void 0:Ue.call(H,{type:"SNAP",source:he.snapSource})},[]),onCloseCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"CLOSE"})},[]),onResizeCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{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=ne.current)==null?void 0:kt.call(ne,{type:"SNAP",source:Ue.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{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()=>{Y.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(),Y.current=!1},[De,ot,We]),openImmediately:l.useCallback(async()=>{Q.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}),Q.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:me.current})},[tt,me]),snapSmoothly:l.useCallback(async he=>{const Ue=Zt.current(he.y);Q.current=Ue,c.current=Ue,await tt({y:Ue,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:me.current,config:{velocity:he.velocity}})},[tt,c,me]),resizeSmoothly:l.useCallback(async()=>{const he=Zt.current(Q.current);Q.current=he,c.current=he,await tt({y:he,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:ie.current==="element"?me.current:!0})},[tt,c,me]),closeSmoothly:l.useCallback(async()=>{tt({minSnap:Q.current,immediate:!0}),Q.current=0,await tt({y:0,maxHeight:xe.current,maxSnap:je.current,immediate:me.current}),await tt({ready:0,immediate:!0})},[tt,me])}});l.useEffect(()=>{j&>(a?"OPEN":"CLOSE")},[a,gt,j]),wi(()=>{(Xe||xt||ze)&>("RESIZE")},[Xe,xt,ze,gt]),l.useEffect(()=>()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate()},[De,ot,We]),l.useImperativeHandle(P,()=>({snapTo:(he,{velocity:Ue=1,source:kt="custom"}={})=>{gt("SNAP",{payload:{y:Zt.current(he),velocity:Ue,source:kt}})},get height(){return Q.current}}),[gt]),l.useEffect(()=>{const he=Z.current,Ue=At=>{re.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=gC(({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(!Y.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),re.current=Kt<je.current):re.current=!1,Ot&>("DRAG"),yn?(gt("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=P$({spring:oe});return M.jsxs(OS.div,{...$,"data-rsbs-root":!0,"data-rsbs-state":j$.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":w,children:[n,b&&M.jsx(et,{"data-rsbs-backdrop":!0,...rn({closeOnTap:B})},"backdrop"),M.jsxs(et,{"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Ne,"data-rsbs-overlay-has-padding-y":Oe,"data-test-id":"CT-BottomSheet-Overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:ee,onKeyDown:he=>{he.key==="Escape"&&(he.stopPropagation(),d&&d())},children:[M.jsx(Pm,{ref:z,title:D,header:i,showBack:F,showClose:A,bind:rn,hasHandleBar:R,onBack:k,onClose:d}),M.jsx(et,{"data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Ne,"data-rsbs-scroll-has-padding-y":Oe,ref:Z,...I?rn({isContentDragging:!0}):{},children:M.jsx(et,{"data-rsbs-content":!0,ref:ce,children:t})},"scroll"),o&&M.jsx(et,{ref:U,"data-rsbs-footer":!0,...rn(),children:o},"footer")]},"overlay")]})}),B$=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?M.jsx(xv,{"data-rsbs-portal":!0,children:M.jsx(V$,{...o,lastSnapRef:u,ref:i,initialState:d.current,onSpringStart:f,onSpringEnd:m})}):null}),_o=({size:e,color:t="inherit",thickness:n=3,...r})=>M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",xmlSpace:"preserve",width:e,height:e,...r,children:M.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:M.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 H$=({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},W$=H$;process.env.NODE_ENV;var z$=pt({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"]]}),U$={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},Y$={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},jh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var K$="p9dczu0";const sl=({ref:e,colorScheme:t="primary"})=>{const[n,r]=l.useState([]),o=W$({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"?$t.theme.colors.primary:U$[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)=>M.jsx("span",{className:K$,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=sl({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(h,()=>b.current);const T=e||"button";return M.jsx(T,{ref:b,as:e,"data-test-id":m["data-test-id"],className:Re(z$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:d}),a==="ghost"?Y$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?M.jsx(_o,{color:a==="outline"||a==="ghost"?jh[r||"primary"]:jh.white}):M.jsxs(M.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 Km="Checkbox",[q$,IP]=mn(Km),[X$,G$]=q$(Km),Z$=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,E=>m(E)),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 E=f==null?void 0:f.form;if(E){const C=()=>S(v.current);return E.addEventListener("reset",C),()=>E.removeEventListener("reset",C)}},[f,S]),l.createElement(X$,{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":qm(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:h,onKeyDown:Ae(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Ae(e.onClick,E=>{S(C=>Nr(C)?!0:!C),y&&(b.current=E.isPropagationStopped(),b.current||E.stopPropagation())})})),y&&l.createElement(eT,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),Q$="CheckboxIndicator",J$=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=G$(Q$,n);return l.createElement(yr,{present:r||Nr(i.state)||i.state===!0},l.createElement(Ke.span,ae({"data-state":qm(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),eT=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 qm(e){return Nr(e)?"indeterminate":e?"checked":"unchecked"}const tT=Z$,nT=J$;var rT="glci2q0",Lh="glci2q3",oT="glci2q4",Fh={disabled:"glci2q1",enabled:"glci2q2"},iT=pt({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 Xm=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]),M.jsxs("div",{className:rT,children:[M.jsx(tT,{id:c,disabled:o,"data-test-id":t,ref:s,value:u?"on":"off",checked:u,className:iT({checked:u,disabled:o}),onCheckedChange:f=>{typeof f=="boolean"&&(r?r(f):d(f))},...a,children:M.jsxs(nT,{className:oT,children:[u==="indeterminate"&&M.jsx($0,{color:"white",className:Lh}),u===!0&&M.jsx(Eu,{color:"white",className:Lh})]})}),e&&M.jsx("label",{htmlFor:c,className:o?Fh.disabled:Fh.enabled,children:e})]})});Xm.defaultProps={"data-test-id":"base"};const aT=e=>l.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var sT=pt({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"]]}),cT="_5046e76";const cl=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 M.jsxs(m,{ref:f,as:e,"data-test-id":d["data-test-id"],className:Re(sT({variant:n,isActive:r}),s),disabled:c,style:u,...d,children:[i&&i,o&&!i&&M.jsx(S0,{style:{marginRight:8},size:16,color:"inherit"}),t,a&&M.jsx(xo,{"data-test-id":"chips-close-button",className:cT,isDisabled:c})]})});cl.defaultProps={as:"button",children:void 0,isActive:!1,isFilter:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0};cl.displayName="Chips";const Gm="Dialog",[Zm,RP]=mn(Gm),[uT,wr]=Zm(Gm),lT=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(uT,{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)},dT="DialogTrigger",fT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(dT,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":ul(o.open)},r,{ref:i,onClick:Ae(e.onClick,o.onOpenToggle)}))}),hT="DialogPortal",[OP,Qm]=Zm(hT,{forceMount:void 0}),iu="DialogOverlay",pT=l.forwardRef((e,t)=>{const n=Qm(iu,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(iu,e.__scopeDialog);return i.modal?l.createElement(yr,{present:r||i.open},l.createElement(vT,ae({},o,{ref:t}))):null}),vT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(iu,n);return l.createElement(lv,{as:uo,allowPinchZoom:!0,shards:[o.contentRef]},l.createElement(Ke.div,ae({"data-state":ul(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),xi="DialogContent",mT=l.forwardRef((e,t)=>{const n=Qm(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(gT,ae({},o,{ref:t})):l.createElement(yT,ae({},o,{ref:t})))}),gT=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 tv(i)},[]),l.createElement(Jm,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())}))}),yT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return l.createElement(Jm,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()}}))}),Jm=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 Dp(),l.createElement(l.Fragment,null,l.createElement(Np,{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":ul(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),bT="DialogClose",wT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(bT,n);return l.createElement(Ke.button,ae({type:"button"},r,{ref:t,onClick:Ae(e.onClick,()=>o.onOpenChange(!1))}))});function ul(e){return e?"open":"closed"}const ET=lT,xT=fT,_T=pT,ST=mT,CT=wT;var $T="_1jc0z8o4",TT="_1jc0z8o0",IT=pt({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:[]}),RT="_1jc0z8o1",OT=pt({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),PT=pt({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const eg=l.forwardRef(({children:e,className:t,"data-test-id":n,...r},o)=>M.jsx(ST,{"data-test-id":n,className:t,ref:o,...r,children:e}));eg.defaultProps={"data-test-id":void 0};const AT=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(_T,{className:t,ref:r,...n,children:e})),DT=({children:e,className:t,...n})=>M.jsx(ms,{className:t,...n,children:e}),NT=({children:e,...t})=>M.jsx(ET,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(xT,{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:M.jsx(NT,{open:n,onOpenChange:r,children:M.jsxs(DT,{children:[M.jsx(AT,{className:Re(PT())}),M.jsxs(eg,{"data-test-id":t,onInteractOutside:b=>!c&&b.preventDefault(),className:Re(IT({colorScheme:s,size:o,noPadding:a}),d),...m,onEscapeKeyDown:b=>f?r==null?void 0:r():b.preventDefault(),ref:h,children:[r&&!u&&M.jsx(CT,{asChild:!0,"aria-label":"Close",children:M.jsx(xo,{className:$T,"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 M.jsx(i,{"data-test-id":n,as:e,ref:o,className:TT,...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 M.jsx(i,{"data-test-id":n,as:e,className:RT,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 M.jsx(a,{"data-test-id":r,as:e,ref:i,className:OT({bold:t}),...o,children:M.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};var kT="ayjm8u0";const ll=({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,actionDirection:m})=>M.jsxs(Ai,{classNameBody:f,size:d,isOpen:e,closeOnOverlayClick:u,onClose:n,closeIcon:M.jsx(et,{display:"none"}),children:[M.jsx(Di,{children:o}),M.jsx(Is,{children:M.jsx(sn,{mt:"$8",mb:"$24",color:"$blackTypoMedium",textStyle:"body2",className:kT,children:r})}),M.jsx(Rs,{style:{maxHeight:"none"},children:M.jsxs(Yt,{gap:"$16",justifyContent:"space-between",flexWrap:m==="horizontal"?"nowrap":"wrap",children:[M.jsx(vo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),M.jsx(vo,{"data-test-id":i,onClick:t,isLoading:a,isFluid:!0,children:s})]})})]});ll.defaultProps={message:void 0,cancelText:void 0,confirmText:void 0,confirmTestId:void 0,isLoading:void 0,closeOnOverlayClick:!0,size:"small",classNameBody:void 0,actionDirection:"horizontal"};const dl=l.createContext({}),MT=({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:({...d})=>{n(!0),o(d)}}),[n,o]);return M.jsxs(dl.Provider,{value:c,children:[M.jsx(ll,{isOpen:t,title:(r==null?void 0:r.title)??"",onConfirm:a,onCancel:s,...r}),e]})},jT=()=>{const{openDialog:e}=l.useContext(dl);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}};var LT=pt({defaultClassName:"_1nya5n80",variantClassNames:{variant:{medium:"_1nya5n81",thin:"_1nya5n82"}},defaultVariants:{variant:"thin"},compoundVariants:[]});const{sizesAtoms:FT}=$t.atoms,fl=l.forwardRef(({children:e,as:t,variant:n,className:r,style:o,width:i,...a},s)=>{const c=t||"div",{className:u}=FT({width:i??"$full",...a});return M.jsx(c,{ref:s,"data-test-id":a["data-test-id"],className:Re(LT({variant:n}),u,r),style:o,...a,children:e})});fl.defaultProps={variant:"thin",as:"div",children:void 0,"data-test-id":void 0};fl.displayName="Divider";const hl=({children:e,isDisabled:t,className:n})=>M.jsx("div",{className:Re(xE({isDisabled:t}),n),children:e});hl.displayName="ActionIcon";hl.defaultProps={isDisabled:!1,className:void 0};const Ni=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o,className:i},a)=>M.jsxs("label",{ref:a,className:Re(OE({state:Au({isError:e,isDisabled:t}),isTextarea:r}),i),children:[o,n&&"*"]}));Ni.displayName="Label";Ni.defaultProps={isTextarea:!1,className:""};const pl=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:E,elementLeft:C,elementRight:I,className:D,...A}=d,F=!!a,k=l.useRef(null);l.useImperativeHandle(f,()=>k.current);const[B,R]=l.useState(!1),[w,p]=l.useState(!1),$=j=>{if(B){const W=k.current;W&&W.focus(),w&&(R(!1),p(!1))}else o==null||o(j)},P=()=>{const j=k.current;j&&j.focus(),w&&(R(!1),p(!1))};return l.useEffect(()=>{w&&R(!0)},[w]),M.jsxs(bo,{addonLeft:m,addonRight:h,elementLeft:C,elementRight:I,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:E,className:u,inputAreaClassName:TE,children:[M.jsx("input",{ref:k,type:t,className:Re($E,D),value:e,disabled:v,"data-test-id":d["data-test-id"],required:c,onBlur:$,...A}),M.jsx(Ni,{isError:T,isDisabled:v,required:c,children:n}),M.jsx("div",{className:Re(IE),"data-test-id":"icon-input-area",onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onTouchStart:()=>p(!0),onClick:P,"aria-hidden":"true",children:M.jsxs(hl,{isDisabled:v,className:Re(s&&!i&&!F&&CE),children:[F&&!i&&a,s&&!i&&!F&&M.jsx(os,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),i&&M.jsx(_o,{color:$t.theme.colors.green1})]})})]})});pl.displayName="Input";pl.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0};const vl=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 M.jsxs(bo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,className:Re(o),onClick:y,children:[M.jsx("textarea",{ref:b,className:Re(PE),value:e,rows:n,disabled:f,"data-test-id":i["data-test-id"],required:r,...h}),M.jsx(Ni,{isTextarea:!0,isError:u,isDisabled:f,required:r,children:t})]})});vl.displayName="Textarea";vl.defaultProps={containerStyles:void 0,"data-test-id":void 0};var VT=pt({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"]]}),Vh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const ml=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=sl({ref:f,colorScheme:r,variant:a});l.useImperativeHandle(d,()=>f.current);const h=e||"button";return M.jsx(h,{ref:f,as:e,"data-test-id":u["data-test-id"],className:Re(VT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?M.jsx(_o,{color:a==="outline"?Vh[r||"primary"]:Vh.white}):M.jsxs(M.Fragment,{children:[m,o]})})});ml.displayName="Button";ml.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var BT=pt({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const HT=({width:e=140,height:t=140,viewBox:n="0 0 140 140",...r})=>M.jsx("svg",{"data-test-id":"illustration-fallback-image",width:e,height:t,viewBox:n,fill:"none",...r,children:M.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"})}),gl=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),[E,C]=l.useState(n),I=A=>{C("fill"),v(!0),u==null||u(A)},D=A=>{v(!1),c==null||c(A)};return a&&!S?M.jsx(et,{bgColor:"$grey2",width:y,height:T}):S?s||M.jsx(HT,{width:y,height:T}):M.jsx(b,{"data-test-id":f,as:"img",width:y,height:T,src:t,loading:i,onLoad:D,onError:I,ref:h,className:Re(BT({fit:E})),...m})});gl.displayName="Image";gl.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 tg=pt({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"},isStandalone:{true:"_5y0pl5e",false:"_5y0pl5f"},isBold:{true:"_5y0pl5g"}},defaultVariants:{isStandalone:!1,isDisabled:!1,isBold:!1,textStyle:"body1"},compoundVariants:[]});const ng=({children:e,className:t,isStandalone:n,textStyle:r="body2",isDisabled:o,isBold:i,...a})=>M.jsx("a",{className:Re(t,tg({isDisabled:o,textStyle:r,isBold:i,isStandalone:n})),"data-disabled":o,...a,children:e});var WT="_1cq2k9i0";const yl=l.forwardRef(({children:e,as:t,className:n,...r},o)=>{const i=t||"ul";return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Re(WT,n),...r,children:e})});yl.displayName="List";yl.defaultProps={"data-test-id":void 0,as:"ul"};var zT=pt({defaultClassName:"xw6nfa0",variantClassNames:{hasLink:{false:"xw6nfa1"}},defaultVariants:{hasLink:!1},compoundVariants:[]}),Bh="xw6nfa2",UT="xw6nfa3";const bl=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 M.jsx(u,{"data-test-id":s["data-test-id"],className:Re(zT({hasLink:d}),a),...s,ref:c,children:r?M.jsxs("a",{href:r,target:o,className:UT,children:[t,M.jsx("div",{className:Bh,children:e}),n]}):M.jsxs(M.Fragment,{children:[t,M.jsx("div",{className:Bh,children:e}),n]})})});bl.displayName="ListItem";bl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li"};var rg={},og={exports:{}};(function(e,t){(function(r,o){e.exports=o()})(Hy,()=>(()=>{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,te=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){te&&(document.body.remove(te),te=null),ue||(te=document.createElement("div"),te.style.backgroundColor="black",te.style.position="fixed",te.style.right=0,te.style.top=0,te.style.color="white",te.style.padding="4px",te.innerHTML="RIVE FPS",ue=function(se){te.innerHTML="RIVE FPS "+se.toFixed(1)},document.body.appendChild(te)),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(){te&&(document.body.remove(te),te=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=ye.createShader(Ve),ye.shaderSource(Ve,Ye),ye.compileShader(Ve),Ye=ye.getShaderInfoLog(Ve),0<Ye.length)throw Ye;ye.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 ye=Ce.getContext("webgl2",Me);if(ye)O=2;else if(ye=Ce.getContext("webgl",Me))O=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;if(N=Math.min(ye.getParameter(ye.MAX_RENDERBUFFER_SIZE),ye.getParameter(ye.MAX_TEXTURE_SIZE)),Ce=ye.createProgram(),Et(Ce,ye.VERTEX_SHADER,`attribute vec2 vertex;
|
|
146
|
+
*/function wh(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 Eh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wh(Object(n),!0).forEach(function(r){LC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LC(e,t,n){return t=VC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FC(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 VC(e){var t=FC(e,"string");return typeof t=="symbol"?t:String(t)}var xh={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()}},BC=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},HC=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},WC=function(t){return Jo(t)&&!t.shiftKey},zC=function(t){return Jo(t)&&t.shiftKey},_h=function(t){return setTimeout(t,0)},Sh=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},UC=[],YC=function(t,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||UC,i=Eh({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:WC,isKeyBackward:zC},n),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,c=function(R,w,p){return R&&R[w]!==void 0?R[w]:i[p||w]},u=function(R,w){var p=typeof(w==null?void 0:w.composedPath)=="function"?w.composedPath():void 0;return a.containerGroups.findIndex(function($){var P=$.container,j=$.tabbableNodes;return P.contains(R)||(p==null?void 0:p.includes(P))||j.find(function(W){return W===R})})},d=function(R){var w=i[R];if(typeof w=="function"){for(var p=arguments.length,$=new Array(p>1?p-1:0),P=1;P<p;P++)$[P-1]=arguments[P];w=w.apply(void 0,$)}if(w===!0&&(w=void 0),!w){if(w===void 0||w===!1)return w;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var j=w;if(typeof w=="string"&&(j=r.querySelector(w),!j))throw new Error("`".concat(R,"` as selector refers to no known node"));return j},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 w=a.tabbableGroups[0],p=w&&w.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 w=kC(R,i.tabbableOptions),p=MC(R,i.tabbableOptions),$=w.length>0?w[0]:void 0,P=w.length>0?w[w.length-1]:void 0,j=p.find(function(ne){return Qr(ne)}),W=p.slice().reverse().find(function(ne){return Qr(ne)}),Y=!!w.find(function(ne){return Rr(ne)>0});return{container:R,tabbableNodes:w,focusableNodes:p,posTabIndexesFound:Y,firstTabbableNode:$,lastTabbableNode:P,firstDomTabbableNode:j,lastDomTabbableNode:W,nextTabbableNode:function(H){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,oe=w.indexOf(H);return oe<0?L?p.slice(p.indexOf(H)+1).find(function(G){return Qr(G)}):p.slice(0,p.indexOf(H)).reverse().find(function(G){return Qr(G)}):w[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 B(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){B(f());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,BC(R)&&R.select()}},b=function(R){var w=d("setReturnFocus",R);return w||(w===!1?!1:R)},y=function(R){var w=R.target,p=R.event,$=R.isBackward,P=$===void 0?!1:$;w=w||oa(p),m();var j=null;if(a.tabbableGroups.length>0){var W=u(w,p),Y=W>=0?a.containerGroups[W]:void 0;if(W<0)P?j=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:j=a.tabbableGroups[0].firstTabbableNode;else if(P){var ne=Sh(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return w===ce});if(ne<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w,!1))&&(ne=W),ne>=0){var H=ne===0?a.tabbableGroups.length-1:ne-1,L=a.tabbableGroups[H];j=Rr(w)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w,!1))}else{var oe=Sh(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return w===ce});if(oe<0&&(Y.container===w||lc(w,i.tabbableOptions)&&!Qr(w,i.tabbableOptions)&&!Y.nextTabbableNode(w))&&(oe=W),oe>=0){var G=oe===a.tabbableGroups.length-1?0:oe+1,K=a.tabbableGroups[G];j=Rr(w)>=0?K.firstTabbableNode:K.firstDomTabbableNode}else Jo(p)||(j=Y.nextTabbableNode(w))}}else j=d("fallbackFocus");return j},T=function(R){var w=oa(R);if(!(u(w,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},S=function(R){var w=oa(R),p=u(w,R)>=0;if(p||w instanceof Document)p&&(a.mostRecentlyFocusedNode=w);else{R.stopImmediatePropagation();var $,P=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var j=u(a.mostRecentlyFocusedNode),W=a.containerGroups[j].tabbableNodes;if(W.length>0){var Y=W.findIndex(function(ne){return ne===a.mostRecentlyFocusedNode});Y>=0&&(i.isKeyForward(a.recentNavEvent)?Y+1<W.length&&($=W[Y+1],P=!1):Y-1>=0&&($=W[Y-1],P=!1))}}else a.containerGroups.some(function(ne){return ne.tabbableNodes.some(function(H){return Rr(H)>0})})||(P=!1);else P=!1;P&&($=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),h($||a.mostRecentlyFocusedNode||f())}a.recentNavEvent=void 0},v=function(R){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var p=y({event:R,isBackward:w});p&&(Jo(R)&&R.preventDefault(),h(p))},E=function(R){if(HC(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 w=oa(R);u(w,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return xh.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?_h(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",E,{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",E,!0),s},A=function(R){var w=R.some(function(p){var $=Array.from(p.removedNodes);return $.some(function(P){return P===a.mostRecentlyFocusedNode})});w&&h(f())},F=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(A):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 w=c(R,"onActivate"),p=c(R,"onPostActivate"),$=c(R,"checkCanFocusTrap");$||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,w==null||w();var P=function(){$&&m(),I(),k(),p==null||p()};return $?($(a.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(R){if(!a.active)return this;var w=Eh({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(),xh.deactivateTrap(o,s);var p=c(w,"onDeactivate"),$=c(w,"onPostDeactivate"),P=c(w,"checkCanReturnFocus"),j=c(w,"returnFocus","returnFocusOnDeactivate");p==null||p();var W=function(){_h(function(){j&&h(b(a.nodeFocusedBeforeActivation)),$==null||$()})};return j&&P?(P(b(a.nodeFocusedBeforeActivation)).then(W,W),this):(W(),this)},pause:function(R){if(a.paused||!a.active)return this;var w=c(R,"onPause"),p=c(R,"onPostPause");return a.paused=!0,w==null||w(),D(),k(),p==null||p(),this},unpause:function(R){if(!a.paused||!a.active)return this;var w=c(R,"onUnpause"),p=c(R,"onPostUnpause");return a.paused=!1,w==null||w(),m(),I(),k(),p==null||p(),this},updateContainerElements:function(R){var w=[].concat(R).filter(Boolean);return a.containers=w.map(function(p){return typeof p=="string"?r.querySelector(p):p}),a.active&&m(),k(),this}},s.updateContainerElements(t),s};function KC({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=YC(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 qC(){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 XC(){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 GC(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 il=!1;if(typeof window<"u"){var Ch={get passive(){il=!0}};window.addEventListener("testPassive",null,Ch),window.removeEventListener("testPassive",null,Ch)}var Lm=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,Fm=-1,ei=void 0,ti=void 0,Vm=function(t){return fr.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(t))})},Ya=function(t){var n=t||window.event;return Vm(n.target)||n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)},ZC=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")},QC=function(){ti!==void 0&&(document.body.style.paddingRight=ti,ti=void 0),ei!==void 0&&(document.body.style.overflow=ei,ei=void 0)},JC=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},e$=function(t,n){var r=t.targetTouches[0].clientY-Fm;return Vm(t.target)?!1:n&&n.scrollTop===0&&r>0||JC(n)&&r<0?Ya(t):(t.stopPropagation(),!0)},t$=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(GC(fr),[r]),Lm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(Fm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&e$(o,t)},Ua||(document.addEventListener("touchmove",Ya,il?{passive:!1}:void 0),Ua=!0)):ZC(n)}},n$=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}),Lm?(t.ontouchstart=null,t.ontouchmove=null,Ua&&fr.length===0&&(document.removeEventListener("touchmove",Ya,il?{passive:!1}:void 0),Ua=!1)):fr.length||QC()};function r$({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,t$(o,{allowTouchMove:a=>a.closest("[data-body-scroll-lock-ignore]"),reserveScrollBarGap:n}))},deactivate:()=>{i&&(i=!1,n$(o))}}},[t,e,n]),r}var Ar=[],o$=function(){return Ar.some(function(e){return e.activeTargets.length>0})},i$=function(){return Ar.some(function(e){return e.skippedTargets.length>0})},$h="ResizeObserver loop completed with undelivered notifications.",a$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:$h}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=$h),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)},s$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Dr(this)}return e}(),Bm=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}(),al=function(e){return e instanceof SVGElement&&"getBBox"in e},Hm=function(e){if(al(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)},Th=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)},c$=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,Ih=/auto|scroll/,u$=/^tb|vertical/,l$=/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 s$((n?t:e)||0,(n?e:t)||0)},Rh=Dr({devicePixelContentBoxSize:so(),borderBoxSize:so(),contentBoxSize:so(),contentRect:new Bm(0,0,0,0)}),Wm=function(e,t){if(t===void 0&&(t=!1),ia.has(e)&&!t)return ia.get(e);if(Hm(e))return ia.set(e,Rh),Rh;var n=getComputedStyle(e),r=al(e)&&e.ownerSVGElement&&e.getBBox(),o=!l$&&n.boxSizing==="border-box",i=u$.test(n.writingMode||""),a=!r&&Ih.test(n.overflowY||""),s=!r&&Ih.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,E=m+b,C=s?e.offsetHeight-E-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?T+v:0,A=o?S+E:0,F=r?r.width:jn(n.width)-D-I,k=r?r.height:jn(n.height)-A-C,B=F+T+I+v,R=k+S+C+E,w=Dr({devicePixelContentBoxSize:so(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:so(B,R,i),contentBoxSize:so(F,k,i),contentRect:new Bm(f,c,F,k)});return ia.set(e,w),w},zm=function(e,t,n){var r=Wm(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}},d$=function(){function e(t){var n=Wm(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}(),Um=function(e){if(Hm(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},f$=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 d$(u.target),f=Um(u.target);s.push(d),u.lastReportedSize=zm(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},Oh=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()&&(Um(o.target)>e?n.activeTargets.push(o):n.skippedTargets.push(o))})})},h$=function(){var e=0;for(Oh(e);o$();)e=f$(),Oh(e);return i$()&&a$(),e>0},dc,Ym=[],p$=function(){return Ym.splice(0).forEach(function(e){return e()})},v$=function(e){if(!dc){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return p$()}).observe(n,r),dc=function(){n.textContent="".concat(t?t--:t++)}}Ym.push(e),dc()},m$=function(e){v$(function(){requestAnimationFrame(e)})},xa=0,g$=function(){return!!xa},y$=250,b$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ph=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ah=function(e){return e===void 0&&(e=0),Date.now()+e},fc=!1,w$=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=y$),!fc){fc=!0;var r=Ah(t);m$(function(){var o=!1;try{o=h$()}finally{if(fc=!1,t=r-Ah(),!g$())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,b$)};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(),Ph.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Ph.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ou=new w$,Dh=function(e){!xa&&e>0&&ou.start(),xa+=e,!xa&&ou.stop()},E$=function(e){return!al(e)&&!c$(e)&&getComputedStyle(e).display==="inline"},x$=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=zm(this.target,this.observedBox,!0);return E$(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),_$=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),aa=new WeakMap,Nh=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 _$(t,n);aa.set(t,r)},e.observe=function(t,n,r){var o=aa.get(t),i=o.observationTargets.length===0;Nh(o.observationTargets,n)<0&&(i&&Ar.push(o),o.observationTargets.push(new x$(n,r&&r.box)),Dh(1),ou.schedule())},e.unobserve=function(t,n){var r=aa.get(t),o=Nh(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Ar.splice(Ar.indexOf(r),1),r.observationTargets.splice(o,1),Dh(-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}(),S$=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(!Th(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(!Th(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 C$(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 $$=process.env.NODE_ENV==="development"&&typeof window<"u"?window.location.search==="?debug":!1,T$={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 S$(a);return s.observe(e.current,T$),()=>s.disconnect()},[e,a,n]),n?o:0}function I$(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 R$({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=I$(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 O$({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}=R$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:d,resizeSourceRef:f,conditions:m}),{snapPoints:S,minSnap:v,maxSnap:E}=C$(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 A=Ka(D);return S.reduce((F,k)=>Math.abs(k-A)<Math.abs(F-A)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${E}`),{minSnap:v,maxSnap:E,findSnap:C,maxHeight:h}}function P$(){return yS(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function A$({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 D$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},kh={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Mh={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},N$=({initialState:e})=>e==="OPEN",k$=({initialState:e})=>e==="CLOSED",M$=Qx({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:{...kh,...Mh}}}},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:{...kh,...Mh}}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{...D$},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:[Jx({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:k$,initiallyOpen:N$}}),{tension:j$,friction:ca}=sm.default,L$=["closed","opening","open","closing","dragging","snapping","resizing"];function F$({snapPoints:e,lastSnap:t}){return t??Math.min(...e)}function V$({minHeight:e}){return e}const B$=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=F$,snapPoints:h=V$,blocking:b=!0,scrollLocking:y=!0,style:T,onSpringStart:S,onSpringCancel:v,onSpringEnd:E,reserveScrollBarGap:C=b,expandOnContentDrag:I=!1,title:D,showClose:A,showBack:F,onBack:k,onCloseWhenClickOutside:B=!0,hasHandleBar:R=!0,"data-test-id":w,padding:p,...$},P){const{ready:j,registerReady:W}=qC(),Y=l.useRef(!1),ne=l.useRef(S),H=l.useRef(v),L=l.useRef(E);l.useEffect(()=>{ne.current=S,H.current=v,L.current=E},[v,S,E]);const[oe,G]=P$(),K=l.useRef(null),Z=l.useRef(null),ce=l.useRef(null),z=l.useRef(null),U=l.useRef(null),ee=l.useRef(null),Q=l.useRef(0),ie=l.useRef(),re=l.useRef(!1),me=XC(),{x:Te="default",y:Pe="default"}=p??{},Ne=Te==="default",Oe=Pe==="default",We=r$({targetRef:Z,enabled:j&&y,reserveScrollBarGap:C}),De=wC({targetRef:K,enabled:j&&b}),ot=KC({targetRef:K,fallbackRef:ee,initialFocusRef:u||void 0,enabled:j&&b&&u!==!1}),{minSnap:ze,maxSnap:xt,maxHeight:Xe,findSnap:Pt}=O$({contentRef:ce,controlledMaxHeight:f,footerEnabled:!!o,footerRef:U,getSnapPoints:h,headerEnabled:i!==!1,headerRef:z,heightRef:Q,lastSnapRef:c,ready:j,registerReady:W,resizeSourceRef:ie,conditions:{hasPaddingY:Oe,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:j$,friction:Math.max(ca,ca+(ca-ca*Ue))},onRest:(...Ot)=>{Jt(...Ot),he==null||he(...Ot)}})),[G]),[Fe,gt]=u_(M$,{devTools:$$,actions:{onOpenCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"OPEN"})},[]),onSnapCancel:l.useCallback(he=>{var Ue;return(Ue=H.current)==null?void 0:Ue.call(H,{type:"SNAP",source:he.snapSource})},[]),onCloseCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{type:"CLOSE"})},[]),onResizeCancel:l.useCallback(()=>{var he;return(he=H.current)==null?void 0:he.call(H,{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=ne.current)==null?void 0:kt.call(ne,{type:"SNAP",source:Ue.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var he;return(he=ne.current)==null?void 0:he.call(ne,{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()=>{Y.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(),Y.current=!1},[De,ot,We]),openImmediately:l.useCallback(async()=>{Q.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}),Q.current=Ct.current,await tt({y:Ct.current,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:Ct.current,immediate:me.current})},[tt,me]),snapSmoothly:l.useCallback(async he=>{const Ue=Zt.current(he.y);Q.current=Ue,c.current=Ue,await tt({y:Ue,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:me.current,config:{velocity:he.velocity}})},[tt,c,me]),resizeSmoothly:l.useCallback(async()=>{const he=Zt.current(Q.current);Q.current=he,c.current=he,await tt({y:he,ready:1,maxHeight:xe.current,maxSnap:je.current,minSnap:ct.current,immediate:ie.current==="element"?me.current:!0})},[tt,c,me]),closeSmoothly:l.useCallback(async()=>{tt({minSnap:Q.current,immediate:!0}),Q.current=0,await tt({y:0,maxHeight:xe.current,maxSnap:je.current,immediate:me.current}),await tt({ready:0,immediate:!0})},[tt,me])}});l.useEffect(()=>{j&>(a?"OPEN":"CLOSE")},[a,gt,j]),wi(()=>{(Xe||xt||ze)&>("RESIZE")},[Xe,xt,ze,gt]),l.useEffect(()=>()=>{We.current.deactivate(),ot.current.deactivate(),De.current.deactivate()},[De,ot,We]),l.useImperativeHandle(P,()=>({snapTo:(he,{velocity:Ue=1,source:kt="custom"}={})=>{gt("SNAP",{payload:{y:Zt.current(he),velocity:Ue,source:kt}})},get height(){return Q.current}}),[gt]),l.useEffect(()=>{const he=Z.current,Ue=At=>{re.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=yC(({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(!Y.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),re.current=Kt<je.current):re.current=!1,Ot&>("DRAG"),yn?(gt("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=A$({spring:oe});return M.jsxs(PS.div,{...$,"data-rsbs-root":!0,"data-rsbs-state":L$.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":w,children:[n,b&&M.jsx(et,{"data-rsbs-backdrop":!0,...rn({closeOnTap:B})},"backdrop"),M.jsxs(et,{"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Ne,"data-rsbs-overlay-has-padding-y":Oe,"data-test-id":"CT-BottomSheet-Overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:ee,onKeyDown:he=>{he.key==="Escape"&&(he.stopPropagation(),d&&d())},children:[M.jsx(Pm,{ref:z,title:D,header:i,showBack:F,showClose:A,bind:rn,hasHandleBar:R,onBack:k,onClose:d}),M.jsx(et,{"data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Ne,"data-rsbs-scroll-has-padding-y":Oe,ref:Z,...I?rn({isContentDragging:!0}):{},children:M.jsx(et,{"data-rsbs-content":!0,ref:ce,children:t})},"scroll"),o&&M.jsx(et,{ref:U,"data-rsbs-footer":!0,...rn(),children:o},"footer")]},"overlay")]})}),H$=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?M.jsx(xv,{"data-rsbs-portal":!0,children:M.jsx(B$,{...o,lastSnapRef:u,ref:i,initialState:d.current,onSpringStart:f,onSpringEnd:m})}):null}),_o=({size:e,color:t="inherit",thickness:n=3,...r})=>M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",xmlSpace:"preserve",width:e,height:e,...r,children:M.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:M.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 W$=({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},z$=W$;process.env.NODE_ENV;var U$=dt({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"]]}),Y$={primary:"var(--_1qe00b21g)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)"},K$={primary:"_920fuu0",neutral:"_920fuu1",danger:"_920fuu2",warning:"_920fuu3",info:"_920fuu4"},jh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var q$="p9dczu0";const sl=({ref:e,colorScheme:t="primary"})=>{const[n,r]=l.useState([]),o=z$({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"?$t.theme.colors.primary:Y$[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)=>M.jsx("span",{className:q$,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=sl({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(h,()=>b.current);const T=e||"button";return M.jsx(T,{ref:b,as:e,"data-test-id":m["data-test-id"],className:Ie(U$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:d}),a==="ghost"?K$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?M.jsx(_o,{color:a==="outline"||a==="ghost"?jh[r||"primary"]:jh.white}):M.jsxs(M.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 Km="Checkbox",[X$,OP]=mn(Km),[G$,Z$]=X$(Km),Q$=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,E=>m(E)),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 E=f==null?void 0:f.form;if(E){const C=()=>S(v.current);return E.addEventListener("reset",C),()=>E.removeEventListener("reset",C)}},[f,S]),l.createElement(G$,{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":qm(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:h,onKeyDown:Ae(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:Ae(e.onClick,E=>{S(C=>Nr(C)?!0:!C),y&&(b.current=E.isPropagationStopped(),b.current||E.stopPropagation())})})),y&&l.createElement(tT,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),J$="CheckboxIndicator",eT=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=Z$(J$,n);return l.createElement(yr,{present:r||Nr(i.state)||i.state===!0},l.createElement(Ke.span,ae({"data-state":qm(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),tT=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 qm(e){return Nr(e)?"indeterminate":e?"checked":"unchecked"}const nT=Q$,rT=eT;var oT="glci2q0",Lh="glci2q3",iT="glci2q4",Fh={disabled:"glci2q1",enabled:"glci2q2"},aT=dt({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 Xm=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]),M.jsxs("div",{className:oT,children:[M.jsx(nT,{id:c,disabled:o,"data-test-id":t,ref:s,value:u?"on":"off",checked:u,className:aT({checked:u,disabled:o}),onCheckedChange:f=>{typeof f=="boolean"&&(r?r(f):d(f))},...a,children:M.jsxs(rT,{className:iT,children:[u==="indeterminate"&&M.jsx(T0,{color:"white",className:Lh}),u===!0&&M.jsx(Eu,{color:"white",className:Lh})]})}),e&&M.jsx("label",{htmlFor:c,className:o?Fh.disabled:Fh.enabled,children:e})]})});Xm.defaultProps={"data-test-id":"base"};const sT=e=>l.useMemo(()=>{const n=e.every(Boolean);return e.some(Boolean)&&!n?"indeterminate":!!n},[e]);var cT=dt({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"]]}),uT="_5046e76";const cl=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 M.jsxs(m,{ref:f,as:e,"data-test-id":d["data-test-id"],className:Ie(cT({variant:n,isActive:r}),s),disabled:c,style:u,...d,children:[i&&i,o&&!i&&M.jsx(C0,{style:{marginRight:8},size:16,color:"inherit"}),t,a&&M.jsx(xo,{"data-test-id":"chips-close-button",className:uT,isDisabled:c})]})});cl.defaultProps={as:"button",children:void 0,isActive:!1,isFilter:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0};cl.displayName="Chips";const Gm="Dialog",[Zm,PP]=mn(Gm),[lT,wr]=Zm(Gm),dT=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(lT,{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)},fT="DialogTrigger",hT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(fT,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":ul(o.open)},r,{ref:i,onClick:Ae(e.onClick,o.onOpenToggle)}))}),pT="DialogPortal",[AP,Qm]=Zm(pT,{forceMount:void 0}),iu="DialogOverlay",vT=l.forwardRef((e,t)=>{const n=Qm(iu,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=wr(iu,e.__scopeDialog);return i.modal?l.createElement(yr,{present:r||i.open},l.createElement(mT,ae({},o,{ref:t}))):null}),mT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(iu,n);return l.createElement(lv,{as:uo,allowPinchZoom:!0,shards:[o.contentRef]},l.createElement(Ke.div,ae({"data-state":ul(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),xi="DialogContent",gT=l.forwardRef((e,t)=>{const n=Qm(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(yT,ae({},o,{ref:t})):l.createElement(bT,ae({},o,{ref:t})))}),yT=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 tv(i)},[]),l.createElement(Jm,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())}))}),bT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return l.createElement(Jm,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()}}))}),Jm=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 Dp(),l.createElement(l.Fragment,null,l.createElement(Np,{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":ul(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),wT="DialogClose",ET=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(wT,n);return l.createElement(Ke.button,ae({type:"button"},r,{ref:t,onClick:Ae(e.onClick,()=>o.onOpenChange(!1))}))});function ul(e){return e?"open":"closed"}const xT=dT,_T=hT,ST=vT,CT=gT,$T=ET;var TT="_1jc0z8o4",IT="_1jc0z8o0",RT=dt({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:[]}),OT="_1jc0z8o1",PT=dt({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),AT=dt({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const eg=l.forwardRef(({children:e,className:t,"data-test-id":n,...r},o)=>M.jsx(CT,{"data-test-id":n,className:t,ref:o,...r,children:e}));eg.defaultProps={"data-test-id":void 0};const DT=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(ST,{className:t,ref:r,...n,children:e})),NT=({children:e,className:t,...n})=>M.jsx(ms,{className:t,...n,children:e}),kT=({children:e,...t})=>M.jsx(xT,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(_T,{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:M.jsx(kT,{open:n,onOpenChange:r,children:M.jsxs(NT,{children:[M.jsx(DT,{className:Ie(AT())}),M.jsxs(eg,{"data-test-id":t,onInteractOutside:b=>!c&&b.preventDefault(),className:Ie(RT({colorScheme:s,size:o,noPadding:a}),d),...m,onEscapeKeyDown:b=>f?r==null?void 0:r():b.preventDefault(),ref:h,children:[r&&!u&&M.jsx($T,{asChild:!0,"aria-label":"Close",children:M.jsx(xo,{className:TT,"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 M.jsx(i,{"data-test-id":n,as:e,ref:o,className:IT,...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 M.jsx(i,{"data-test-id":n,as:e,className:OT,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 M.jsx(a,{"data-test-id":r,as:e,ref:i,className:PT({bold:t}),...o,children:M.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};var MT="ayjm8u0";const ll=({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,actionDirection:m})=>M.jsxs(Ai,{classNameBody:f,size:d,isOpen:e,closeOnOverlayClick:u,onClose:n,closeIcon:M.jsx(et,{display:"none"}),children:[M.jsx(Di,{children:o}),M.jsx(Is,{children:M.jsx(sn,{mt:"$8",mb:"$24",color:"$blackTypoMedium",textStyle:"body2",className:MT,children:r})}),M.jsx(Rs,{style:{maxHeight:"none"},children:M.jsxs(Yt,{gap:"$16",justifyContent:"space-between",flexWrap:m==="horizontal"?"nowrap":"wrap",children:[M.jsx(vo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),M.jsx(vo,{"data-test-id":i,onClick:t,isLoading:a,isFluid:!0,children:s})]})})]});ll.defaultProps={message:void 0,cancelText:void 0,confirmText:void 0,confirmTestId:void 0,isLoading:void 0,closeOnOverlayClick:!0,size:"small",classNameBody:void 0,actionDirection:"horizontal"};const dl=l.createContext({}),jT=({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:({...d})=>{n(!0),o(d)}}),[n,o]);return M.jsxs(dl.Provider,{value:c,children:[M.jsx(ll,{isOpen:t,title:(r==null?void 0:r.title)??"",onConfirm:a,onCancel:s,...r}),e]})},LT=()=>{const{openDialog:e}=l.useContext(dl);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}};var FT=dt({defaultClassName:"_1nya5n80",variantClassNames:{variant:{medium:"_1nya5n81",thin:"_1nya5n82"}},defaultVariants:{variant:"thin"},compoundVariants:[]});const{sizesAtoms:VT}=$t.atoms,fl=l.forwardRef(({children:e,as:t,variant:n,className:r,style:o,width:i,...a},s)=>{const c=t||"div",{className:u}=VT({width:i??"$full",...a});return M.jsx(c,{ref:s,"data-test-id":a["data-test-id"],className:Ie(FT({variant:n}),u,r),style:o,...a,children:e})});fl.defaultProps={variant:"thin",as:"div",children:void 0,"data-test-id":void 0};fl.displayName="Divider";const hl=({children:e,isDisabled:t,className:n})=>M.jsx("div",{className:Ie(_E({isDisabled:t}),n),children:e});hl.displayName="ActionIcon";hl.defaultProps={isDisabled:!1,className:void 0};const Ni=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o,className:i},a)=>M.jsxs("label",{ref:a,className:Ie(PE({state:Au({isError:e,isDisabled:t}),isTextarea:r}),i),children:[o,n&&"*"]}));Ni.displayName="Label";Ni.defaultProps={isTextarea:!1,className:""};const pl=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:E,elementLeft:C,elementRight:I,className:D,...A}=d,F=!!a,k=l.useRef(null);l.useImperativeHandle(f,()=>k.current);const[B,R]=l.useState(!1),[w,p]=l.useState(!1),$=j=>{if(B){const W=k.current;W&&W.focus(),w&&(R(!1),p(!1))}else o==null||o(j)},P=()=>{const j=k.current;j&&j.focus(),w&&(R(!1),p(!1))};return l.useEffect(()=>{w&&R(!0)},[w]),M.jsxs(bo,{addonLeft:m,addonRight:h,elementLeft:C,elementRight:I,helperTextLeft:b,helperTextRight:y,isError:T,errorMessage:S,isDisabled:v,isValid:E,className:u,inputAreaClassName:IE,children:[M.jsx("input",{ref:k,type:t,className:Ie(TE,D),value:e,disabled:v,"data-test-id":d["data-test-id"],required:c,onBlur:$,...A}),M.jsx(Ni,{isError:T,isDisabled:v,required:c,children:n}),M.jsx("div",{className:Ie(RE),"data-test-id":"icon-input-area",onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onTouchStart:()=>p(!0),onClick:P,"aria-hidden":"true",children:M.jsxs(hl,{isDisabled:v,className:Ie(s&&!i&&!F&&$E),children:[F&&!i&&a,s&&!i&&!F&&M.jsx(os,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),i&&M.jsx(_o,{color:$t.theme.colors.green1})]})})]})});pl.displayName="Input";pl.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0};const vl=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 M.jsxs(bo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:d,isDisabled:f,isValid:m,className:Ie(o),onClick:y,children:[M.jsx("textarea",{ref:b,className:Ie(AE),value:e,rows:n,disabled:f,"data-test-id":i["data-test-id"],required:r,...h}),M.jsx(Ni,{isTextarea:!0,isError:u,isDisabled:f,required:r,children:t})]})});vl.displayName="Textarea";vl.defaultProps={containerStyles:void 0,"data-test-id":void 0};var BT=dt({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"]]}),Vh={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const ml=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=sl({ref:f,colorScheme:r,variant:a});l.useImperativeHandle(d,()=>f.current);const h=e||"button";return M.jsx(h,{ref:f,as:e,"data-test-id":u["data-test-id"],className:Ie(BT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?M.jsx(_o,{color:a==="outline"?Vh[r||"primary"]:Vh.white}):M.jsxs(M.Fragment,{children:[m,o]})})});ml.displayName="Button";ml.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var HT=dt({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const WT=({width:e=140,height:t=140,viewBox:n="0 0 140 140",...r})=>M.jsx("svg",{"data-test-id":"illustration-fallback-image",width:e,height:t,viewBox:n,fill:"none",...r,children:M.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"})}),gl=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),[E,C]=l.useState(n),I=A=>{C("fill"),v(!0),u==null||u(A)},D=A=>{v(!1),c==null||c(A)};return a&&!S?M.jsx(et,{bgColor:"$grey2",width:y,height:T}):S?s||M.jsx(WT,{width:y,height:T}):M.jsx(b,{"data-test-id":f,as:"img",width:y,height:T,src:t,loading:i,onLoad:D,onError:I,ref:h,className:Ie(HT({fit:E})),...m})});gl.displayName="Image";gl.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 tg=dt({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"},isStandalone:{true:"_5y0pl5e",false:"_5y0pl5f"},isBold:{true:"_5y0pl5g"}},defaultVariants:{isStandalone:!1,isDisabled:!1,isBold:!1,textStyle:"body1"},compoundVariants:[]});const ng=({children:e,className:t,isStandalone:n,textStyle:r="body2",isDisabled:o,isBold:i,...a})=>M.jsx("a",{className:Ie(t,tg({isDisabled:o,textStyle:r,isBold:i,isStandalone:n})),"data-disabled":o,...a,children:e});var zT="_1cq2k9i0";const yl=l.forwardRef(({children:e,as:t,className:n,...r},o)=>{const i=t||"ul";return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Ie(zT,n),...r,children:e})});yl.displayName="List";yl.defaultProps={"data-test-id":void 0,as:"ul"};var UT=dt({defaultClassName:"xw6nfa0",variantClassNames:{hasLink:{false:"xw6nfa1"}},defaultVariants:{hasLink:!1},compoundVariants:[]}),Bh="xw6nfa2",YT="xw6nfa3";const bl=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 M.jsx(u,{"data-test-id":s["data-test-id"],className:Ie(UT({hasLink:d}),a),...s,ref:c,children:r?M.jsxs("a",{href:r,target:o,className:YT,children:[t,M.jsx("div",{className:Bh,children:e}),n]}):M.jsxs(M.Fragment,{children:[t,M.jsx("div",{className:Bh,children:e}),n]})})});bl.displayName="ListItem";bl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li"};var rg={},og={exports:{}};(function(e,t){(function(r,o){e.exports=o()})(Wy,()=>(()=>{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,te=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){te&&(document.body.remove(te),te=null),ue||(te=document.createElement("div"),te.style.backgroundColor="black",te.style.position="fixed",te.style.right=0,te.style.top=0,te.style.color="white",te.style.padding="4px",te.innerHTML="RIVE FPS",ue=function(se){te.innerHTML="RIVE FPS "+se.toFixed(1)},document.body.appendChild(te)),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(){te&&(document.body.remove(te),te=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=ye.createShader(Ve),ye.shaderSource(Ve,Ye),ye.compileShader(Ve),Ye=ye.getShaderInfoLog(Ve),0<Ye.length)throw Ye;ye.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 ye=Ce.getContext("webgl2",Me);if(ye)O=2;else if(ye=Ce.getContext("webgl",Me))O=1;else return console.log("No WebGL support. Image mesh will not be drawn."),!1;if(N=Math.min(ye.getParameter(ye.MAX_RENDERBUFFER_SIZE),ye.getParameter(ye.MAX_TEXTURE_SIZE)),Ce=ye.createProgram(),Et(Ce,ye.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
|
-
}`),ye.bindAttribLocation(Ce,0,"vertex"),ye.bindAttribLocation(Ce,1,"uv"),ye.linkProgram(Ce),Me=ye.getProgramInfoLog(Ce),0<Me.trim().length)throw Me;q=ye.getUniformLocation(Ce,"mat"),te=ye.getUniformLocation(Ce,"translate"),ye.useProgram(Ce),ye.bindBuffer(ye.ARRAY_BUFFER,ye.createBuffer()),ye.enableVertexAttribArray(0),ye.enableVertexAttribArray(1),ye.bindBuffer(ye.ELEMENT_ARRAY_BUFFER,ye.createBuffer()),ye.uniform1i(ye.getUniformLocation(Ce,"image"),0),ye.pixelStorei(ye.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),g=ye}return!0}let g=null,O=0,N=0,q=null,te=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),ge=new S(10),Se=new S(10);this.kb=function(Ce,Me,ye,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),ye.sort((Je,or)=>or.Ua-Je.Ua),Ve=ge.push(Et),ue!=Ve&&(g.bufferData(g.ARRAY_BUFFER,8*Ve,g.DYNAMIC_DRAW),ue=Ve),Ve=0;for(var Nt of ye)g.bufferSubData(g.ARRAY_BUFFER,Ve,Nt.Da),Ve+=4*Nt.Da.length;console.assert(Ve==4*Et);for(var ln of ye)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 ye)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 ye){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),ye=2/Ce;const or=-2/Me;g.uniform4f(q,Je.oa[0]*ye*Je.va,Je.oa[1]*or*Je.wa,Je.oa[2]*ye*Je.va,Je.oa[3]*or*Je.wa),g.uniform2f(te,Je.oa[4]*ye*Je.va+ye*(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,te=h.RenderPaint,ue=h.Renderer,se=h.StrokeCap,de=h.StrokeJoin,le=h.BlendMode,ge=N.fill,Se=N.stroke,Ce=h.FillRule.evenOdd;let Me=1;var ye=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 vt=this,ut=new Image;ut.src=URL.createObjectURL(new Blob([pe],{type:"image/png"})),ut.onload=function(){if(vt.ab=ut,vt.cb=v.gb(ut),vt.size(ut.width,ut.height),ke.loaded++,ke.loaded===ke.total){const mt=ke.ready;mt&&(mt(),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,vt,ut,mt,Tt,rt){var dt=this.ia,bn=dt.addPath;pe=pe.ia;const Ft=new DOMMatrix;Ft.a=ke,Ft.b=vt,Ft.c=ut,Ft.d=mt,Ft.e=Tt,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,vt,ut,mt,Tt){this.ia.bezierCurveTo(pe,ke,vt,ut,mt,Tt)},close:function(){this.ia.closePath()}}),Dt=te.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,vt,ut){this.qa={Va:pe,Wa:ke,La:vt,Ma:ut,Ca:[]}},radialGradient:function(pe,ke,vt,ut){this.qa={Va:pe,Wa:ke,La:vt,Ma:ut,Ca:[],ub:!0}},addStop:function(pe,ke){this.qa.Ca.push({color:pe,stop:ke})},completeGradient:function(){},draw:function(pe,ke,vt){let ut=this.bb;var mt=this.Ha,Tt=this.qa;if(pe.globalCompositeOperation=this.$a,Tt!=null){mt=Tt.Va;var rt=Tt.Wa;const bn=Tt.La;var dt=Tt.Ma;const Ft=Tt.Ca;Tt.ub?(Tt=bn-mt,dt-=rt,mt=pe.createRadialGradient(mt,rt,0,mt,rt,Math.sqrt(Tt*Tt+dt*dt))):mt=pe.createLinearGradient(mt,rt,bn,dt);for(let Mn=0,Bt=Ft.length;Mn<Bt;Mn++)rt=Ft[Mn],mt.addColorStop(rt.stop,g(rt.color));this.Ha=mt,this.qa=null}switch(ut){case Se:pe.strokeStyle=mt,pe.lineWidth=this.eb,pe.lineCap=this.xa,pe.lineJoin=this.ya,pe.stroke(ke);break;case ge:pe.fillStyle=mt,pe.fill(ke,vt)}}});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,vt,ut,mt,Tt){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]*vt+rt[dt+2]*ut,rt[dt+1]*vt+rt[dt+3]*ut,rt[dt]*mt+rt[dt+2]*Tt+rt[dt+4],rt[dt+1]*mt+rt[dt+3]*Tt+rt[dt+5]),this.da.push(this.ba.transform.bind(this.ba,pe,ke,vt,ut,mt,Tt))},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 vt=this.ba;this.da.push(function(){vt.drawImage(pe,...ke)})},_drawRiveImage:function(pe,ke,vt){var ut=pe.ab;if(ut){var mt=this.ba,Tt=_(ke);this.da.push(function(){mt.globalCompositeOperation=Tt,mt.globalAlpha=vt,mt.drawImage(ut,0,0),mt.globalAlpha=1})}},_getMatrix:function(pe){const ke=this.ha,vt=ke.length-6;for(let ut=0;6>ut;++ut)pe[ut]=ke[vt+ut]},_drawImageMesh:function(pe,ke,vt,ut,mt,Tt,rt,dt,bn,Ft){var Mn=this.ba.canvas.width,Bt=this.ba.canvas.height;const Td=bn-rt,Id=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(Td,Mn)),console.assert(Co<=Math.min(Id,Bt)),!(0>=So||0>=Co)){bn=So<Td||Co<Id,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 Rd=Bt&65535,Od=Bt>>16;Nt.push({oa:this.ha.slice(this.ha.length-6),image:pe,Ia:Rd,Ja:Od,xb:rt,yb:dt,Gb:xr,Pa:_r,va:Ft,wa:Mn,Da:new Float32Array(ut),Xa:new Float32Array(mt),indices:new Uint16Array(Tt),zb:bn,Ua:pe.za<<1|(bn?1:0)}),ln+=ut.length,zn+=Tt.length;var Hr=this.ba,Vy=_(ke);this.da.push(function(){Hr.save(),Hr.resetTransform(),Hr.globalCompositeOperation=Vy,Hr.globalAlpha=vt,Hr.drawImage(v.canvas(),Rd,Od,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 ye}};let or=h.load,Bs=null;h.load=function(pe){return new Promise(function(ke){let vt=null;Bs={total:0,loaded:0,ready:function(){ke(vt)}},vt=or(pe),Bs.total==0&&ke(vt)})},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 E=Object.assign({},h),C="./this.program",I=typeof window=="object",D=typeof importScripts=="function",A="",F,k;(I||D)&&(D?A=self.location.href:typeof document<"u"&&document.currentScript&&(A=document.currentScript.src),f&&(A=f),A.indexOf("blob:")!==0?A=A.substr(0,A.replace(/[?#].*/,"").lastIndexOf("/")+1):A="",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 B=h.print||console.log.bind(console),R=h.printErr||console.error.bind(console);Object.assign(h,E),E=null,h.thisProgram&&(C=h.thisProgram);var w;h.wasmBinary&&(w=h.wasmBinary),h.noExitRuntime,typeof WebAssembly!="object"&&ie("no native wasm support detected");var p,$=!1,P,j,W,Y,ne,H,L,oe;function G(){var _=p.buffer;h.HEAP8=P=new Int8Array(_),h.HEAP16=W=new Int16Array(_),h.HEAP32=ne=new Int32Array(_),h.HEAPU8=j=new Uint8Array(_),h.HEAPU16=Y=new Uint16Array(_),h.HEAPU32=H=new Uint32Array(_),h.HEAPF32=L=new Float32Array(_),h.HEAPF64=oe=new Float64Array(_)}var K,Z=[],ce=[],z=[];function U(){var _=h.preRun.shift();Z.unshift(_)}var ee=0,Q=null;function ie(_){throw h.onAbort&&h.onAbort(_),_="Aborted("+_+")",R(_),$=!0,_=new WebAssembly.RuntimeError(_+". Build with -sASSERTIONS for more info."),y(_),_}function re(_){return _.startsWith("data:application/octet-stream;base64,")}var me;if(me="canvas_advanced.wasm",!re(me)){var Te=me;me=h.locateFile?h.locateFile(Te,A):A+Te}function Pe(_){if(_==me&&w)return new Uint8Array(w);if(k)return k(_);throw"both async and sync fetching of the wasm failed"}function Ne(_){if(!w&&(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(()=>Pe(_));if(F)return new Promise((g,O)=>{F(_,N=>g(new Uint8Array(N)),O)})}return Promise.resolve().then(()=>Pe(_))}function Oe(_,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=me;return w||typeof WebAssembly.instantiateStreaming!="function"||re(O)||O.startsWith("file://")||typeof fetch!="function"?Oe(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"),Oe(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="";j[_];)g+=tt[j[_++]];return g}var gt=[];function nn(){for(;gt.length;){var _=gt.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(_){_=Cd(_);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(ne[_>>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),te=[],ue=0;g.forEach((se,de)=>{Ue.hasOwnProperty(se)?q[de]=Ue[se]:(te.push(se),kn.hasOwnProperty(se)||(kn[se]=[]),kn[se].push(()=>{q[de]=Ue[se],++ue,ue===te.length&&N(q)}))}),te.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 J(_){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,te,ue,se){this.name=_,this.constructor=g,this.ga=O,this.ka=N,this.$=q,this.ob=te,this.ra=ue,this.jb=se,this.Ra=[]}function we(_,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}`),we(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=we(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}`),we(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 gd=void 0;function Hn(_,g){function O(te){q[te]||Ue[te]||(nr[te]?nr[te].forEach(O):(N.push(te),q[te]=!0))}var N=[],q={};throw g.forEach(O),new gd(`${_}: `+N.map(kt).join([", "]))}function ki(_,g,O,N,q){var te=g.length;2>te&&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=te-2,ge=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 ye=0;ye<le;++ye)ge[ye]=g[ye+2].toWireType(Ce,arguments[ye]),Se.push(ge[ye]);if(ye=N.apply(null,Se),se)Kt(Ce);else for(var Et=ue?1:2;Et<g.length;Et++){var Dt=Et===1?Me:ge[Et-2];g[Et].ea!==null&&g[Et].ea(Dt)}return Me=de?g[0].fromWireType(ye):void 0,Me}}function Mi(_,g){for(var O=[],N=0;N<_;N++)O.push(H[g+4*N>>2]);return O}function yd(_,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`),we(_.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?P:j)[N])};case 1:return function(N){return this.fromWireType((O?W:Y)[N>>1])};case 2:return function(N){return this.fromWireType((O?ne:H)[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 Ty(_,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 Iy(_,g,O){switch(g){case 0:return O?function(N){return P[N]}:function(N){return j[N]};case 1:return O?function(N){return W[N>>1]}:function(N){return Y[N>>1]};case 2:return O?function(N){return ne[N>>2]}:function(N){return H[N>>2]};default:throw new TypeError("Unknown integer type: "+_)}}var bd=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,wd=(_,g,O)=>{var N=g+O;for(O=g;_[O]&&!(O>=N);)++O;if(16<O-g&&_.buffer&&bd)return bd.decode(_.subarray(g,O));for(N="";g<O;){var q=_[g++];if(q&128){var te=_[g++]&63;if((q&224)==192)N+=String.fromCharCode((q&31)<<6|te);else{var ue=_[g++]&63;q=(q&240)==224?(q&15)<<12|te<<6|ue:(q&7)<<18|te<<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},Ed=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Ry=(_,g)=>{for(var O=_>>1,N=O+g/2;!(O>=N)&&Y[O];)++O;if(O<<=1,32<O-_&&Ed)return Ed.decode(j.subarray(_,O));for(O="",N=0;!(N>=g/2);++N){var q=W[_+2*N>>1];if(q==0)break;O+=String.fromCharCode(q)}return O},Oy=(_,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)W[g>>1]=_.charCodeAt(q),g+=2;return W[g>>1]=0,g-N},Py=_=>2*_.length,Ay=(_,g)=>{for(var O=0,N="";!(O>=g/4);){var q=ne[_+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},Dy=(_,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 te=_.charCodeAt(q);if(55296<=te&&57343>=te){var ue=_.charCodeAt(++q);te=65536+((te&1023)<<10)|ue&1023}if(ne[g>>2]=te,g+=4,g+4>O)break}return ne[g>>2]=0,g-N},Ny=_=>{for(var g=0,O=0;O<_.length;++O){var N=_.charCodeAt(O);55296<=N&&57343>=N&&++O,g+=4}return g},ky={};function ji(_){var g=ky[_];return g===void 0?Fe(_):g}var Li=[];function My(_){var g=Li.length;return Li.push(_),g}function jy(_,g){for(var O=Array(_),N=0;N<_;++N)O[N]=At(H[g+4*N>>2],"parameter "+N);return O}var xd=[],Ls={},_d=()=>{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,Ly=[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 Sd=Array(256),Fi=0;256>Fi;++Fi)Sd[Fi]=String.fromCharCode(Fi);tt=Sd,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=_,gt.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||J(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||J(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||J(this),this.W.na&&!this.W.pa&&xe("Object already scheduled for deletion"),gt.push(this),gt.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})},gd=h.UnboundTypeError=Zt("UnboundTypeError");var Fy={I:function(_,g,O){_=Fe(_),g=At(g,"wrapper"),O=ct(O);var N=[].slice,q=g.X,te=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:te}),this.__construct.apply(this,N.call(arguments))}),te.__construct=function(){this===te&&xe("Pass correct 'this' to __construct");var le=se.implement.apply(void 0,[this].concat(N.call(arguments)));Jt(le);var ge=le.W;le.notifyOnDestruction(),ge.pa=!0,Object.defineProperties(this,{W:{value:ge}}),en(this),le=ge.Y,le=he(q,le),Qt.hasOwnProperty(le)?xe(`Tried to register registered instance: ${le}`):Qt[le]=this},te.__destruct=function(){this===te&&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(te);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,te=q.map(ue=>ue.sb).concat(q.map(ue=>ue.Db));Wt([_],te,ue=>{var se={};return q.forEach((de,le)=>{var ge=ue[le],Se=de.qb,Ce=de.rb,Me=ue[le+q.length],ye=de.Cb,Et=de.Eb;se[de.mb]={read:Dt=>ge.fromWireType(Se(Ce,Dt)),write:(Dt,Ve)=>{var Ye=[];ye(Et,Dt,Me.toWireType(Ye,Ve)),Kt(Ye)}}}),[{name:g.name,fromWireType:function(de){var le={},ge;for(ge in se)le[ge]=se[ge].read(de);return N(de),le},toWireType:function(de,le){for(var ge in se)if(!(ge in le))throw new TypeError(`Missing field: "${ge}"`);var Se=O();for(ge in se)se[ge].write(Se,le[ge]);return de!==null&&de.push(N,Se),Se},argPackAdvance:8,readValueFromPointer:Tn,ea:N}]})},z:function(){},G:function(_,g,O,N,q){var te=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=P;else if(O===2)se=W;else if(O===4)se=ne;else throw new TypeError("Unknown boolean type size: "+g);return this.fromWireType(se[ue>>te])},ea:null})},e:function(_,g,O,N,q,te,ue,se,de,le,ge,Se,Ce){ge=Fe(ge),te=qe(q,te),se&&(se=qe(ue,se)),le&&(le=qe(de,le)),Ce=qe(Se,Ce);var Me=ot(ge);Ie(Me,function(){Hn(`Cannot construct ${ge} due to unbound types`,[N])}),Wt([_,g,O],N?[N]:[],function(ye){if(ye=ye[0],N)var Et=ye.X,Dt=Et.ga;else Dt=fe.prototype;ye=ze(Me,function(){if(Object.getPrototypeOf(this)!==Ve)throw new Pt("Use 'new' to construct "+ge);if(Ye.la===void 0)throw new Pt(ge+" has no accessible constructor");var ln=Ye.la[arguments.length];if(ln===void 0)throw new Pt(`Tried to invoke ctor of ${ge} 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:ye}});ye.prototype=Ve;var Ye=new Ee(ge,ye,Ve,Ce,Et,te,se,le);Ye.$&&(Ye.$.sa===void 0&&(Ye.$.sa=[]),Ye.$.sa.push(Ye)),Et=new Ge(ge,Ye,!0,!1),Dt=new Ge(ge+"*",Ye,!1,!1);var Nt=new Ge(ge+" const*",Ye,!1,!0);return Dn[_]={pointerType:Dt,fb:Nt},qt(Me,ye),[Et,Dt,Nt]})},k:function(_,g,O,N,q,te,ue){var se=Mi(O,N);g=Fe(g),te=qe(q,te),Wt([],[_],function(de){function le(){Hn(`Cannot call ${ge} due to unbound types`,se)}de=de[0];var ge=`${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,ge),Se[g].aa[O-1]=le),Wt([],se,function(Ce){if(Ce=ki(ge,[Ce[0],null].concat(Ce.slice(1)),null,te,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,te,ue,se){g=Fe(g),te=qe(q,te),Wt([],[_],function(de){de=de[0];var le=`${de.name}.${g}`,ge={get(){Hn(`Cannot access ${le} due to unbound types`,[O])},enumerable:!0,configurable:!0};return ge.set=se?()=>{Hn(`Cannot access ${le} due to unbound types`,[O])}:()=>{xe(`${le} is a read-only property`)},Object.defineProperty(de.X.constructor,g,ge),Wt([],[O],function(Se){Se=Se[0];var Ce={get(){return Se.fromWireType(te(N))},enumerable:!0};return se&&(se=qe(ue,se),Ce.set=Me=>{var ye=[];se(N,Se.toWireType(ye,Me)),Kt(ye)}),Object.defineProperty(de.X.constructor,g,Ce),[]}),[]})},o:function(_,g,O,N,q,te){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,te),[]}),[]})},a:function(_,g,O,N,q,te,ue,se){var de=Mi(O,N);g=Fe(g),te=qe(q,te),Wt([],[_],function(le){function ge(){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?(ge.ma=O-2,ge.className=le.name,Ce[g]=ge):(_e(Ce,g,Se),Ce[g].aa[O-2]=ge),Wt([],de,function(ye){return ye=ki(Se,ye,le,te,ue),Ce[g].aa===void 0?(ye.ma=O-2,Ce[g]=ye):Ce[g].aa[O-2]=ye,[]}),[]})},d:function(_,g,O,N,q,te,ue,se,de,le){g=Fe(g),q=qe(N,q),Wt([],[_],function(ge){ge=ge[0];var Se=`${ge.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(ge.X.ga,g,Ce),Wt([],de?[O,ue]:[O],function(Me){var ye=Me[0],Et={get(){var Ve=yd(this,ge,Se+" getter");return ye.fromWireType(q(te,Ve))},enumerable:!0};if(de){de=qe(se,de);var Dt=Me[1];Et.set=function(Ve){var Ye=yd(this,ge,Se+" setter"),Nt=[];de(le,Ye,Dt.toWireType(Nt,Ve)),Kt(Nt)}}return Object.defineProperty(ge.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(te){return this.constructor.values[te]},toWireType:function(te,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:Ty(g,O),ea:null})},q:function(_,g,O,N,q,te){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,te),g-1),[]})},j:function(_,g,O,N,q){g=Fe(g),q===-1&&(q=4294967295),q=rr(O);var te=se=>se;if(N===0){var ue=32-8*O;te=se=>se<<ue>>>ue}O=g.includes("unsigned")?function(se,de){return de>>>0}:function(se,de){return de},V(_,{name:g,fromWireType:te,toWireType:O,argPackAdvance:8,readValueFromPointer:Iy(g,q,N!==0),ea:null})},g:function(_,g,O){function N(te){te>>=2;var ue=H;return new q(ue.buffer,ue[te+1],ue[te])}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=H[N>>2],te=N+4;if(O)for(var ue=te,se=0;se<=q;++se){var de=te+se;if(se==q||j[de]==0){if(ue=ue?wd(j,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(j[te+se]);le=le.join("")}return Wn(N),le},toWireType:function(N,q){q instanceof ArrayBuffer&&(q=new Uint8Array(q));var te,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(te=se=0;te<q.length;++te){var de=q.charCodeAt(te);127>=de?se++:2047>=de?se+=2:55296<=de&&57343>=de?(se+=4,++te):se+=3}else se=q.length;if(te=se,se=Vs(4+te+1),de=se+4,H[se>>2]=te,O&&ue){if(ue=de,de=te+1,te=j,0<de){de=ue+de-1;for(var le=0;le<q.length;++le){var ge=q.charCodeAt(le);if(55296<=ge&&57343>=ge){var Se=q.charCodeAt(++le);ge=65536+((ge&1023)<<10)|Se&1023}if(127>=ge){if(ue>=de)break;te[ue++]=ge}else{if(2047>=ge){if(ue+1>=de)break;te[ue++]=192|ge>>6}else{if(65535>=ge){if(ue+2>=de)break;te[ue++]=224|ge>>12}else{if(ue+3>=de)break;te[ue++]=240|ge>>18,te[ue++]=128|ge>>12&63}te[ue++]=128|ge>>6&63}te[ue++]=128|ge&63}}te[ue]=0}}else if(ue)for(ue=0;ue<te;++ue)le=q.charCodeAt(ue),255<le&&(Wn(de),xe("String has UTF-16 code units that do not fit in 8 bits")),j[de+ue]=le;else for(ue=0;ue<te;++ue)j[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=Ry,q=Oy,te=Py,ue=()=>Y,se=1;else g===4&&(N=Ay,q=Dy,te=Ny,ue=()=>H,se=2);V(_,{name:O,fromWireType:function(de){for(var le=H[de>>2],ge=ue(),Se,Ce=de+4,Me=0;Me<=le;++Me){var ye=de+4+Me*g;(Me==le||ge[ye>>se]==0)&&(Ce=N(Ce,ye-Ce),Se===void 0?Se=Ce:(Se+=String.fromCharCode(0),Se+=Ce),Ce=ye+g)}return Wn(de),Se},toWireType:function(de,le){typeof le!="string"&&xe(`Cannot pass non-string to C++ string type ${O}`);var ge=te(le),Se=Vs(4+ge+g);return H[Se>>2]=ge>>se,q(le,Se+4,ge+g),de!==null&&de.push(Wn,Se),Se},argPackAdvance:8,readValueFromPointer:Tn,ea:function(de){Wn(de)}})},N:function(_,g,O,N,q,te){Nn[_]={name:Fe(g),Ba:qe(O,N),ka:qe(q,te),Na:[]}},M:function(_,g,O,N,q,te,ue,se,de,le){Nn[_].Na.push({mb:Fe(g),sb:O,qb:qe(N,q),rb:te,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 H[O>>2]=q,g.toWireType(N,_)},w:function(_,g,O,N,q){_=Li[_],g=ct(g),O=ji(O);var te=[];return H[N>>2]=je(te),_(g,O,te,q)},i:function(_,g,O,N){_=Li[_],g=ct(g),O=ji(O),_(g,O,null,N)},f:Ms,h:function(_,g){var O=jy(_,g),N=O[0];g=N.name+"_$"+O.slice(1).map(function(ue){return ue.name}).join("_")+"$";var q=xd[g];if(q!==void 0)return q;var te=Array(_-1);return q=My((ue,se,de,le)=>{for(var ge=0,Se=0;Se<_-1;++Se)te[Se]=O[Se+1].readValueFromPointer(le+ge),ge+=O[Se+1].argPackAdvance;for(ue=ue[se].apply(ue,te),Se=0;Se<_-1;++Se)O[Se+1].hb&&O[Se+1].hb(te[Se]);if(!N.vb)return N.toWireType(de,ue)}),xd[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=j.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 te=1;break e}catch{}te=void 0}if(te)return!0}return!1},B:(_,g)=>{var O=0;return _d().forEach(function(N,q){var te=g+O;for(q=H[_+4*q>>2]=te,te=0;te<N.length;++te)P[q++>>0]=N.charCodeAt(te);P[q>>0]=0,O+=N.length+1}),0},C:(_,g)=>{var O=_d();H[_>>2]=O.length;var N=0;return O.forEach(function(q){N+=q.length+1}),H[g>>2]=N,0},D:()=>52,y:function(){return 70},E:(_,g,O,N)=>{for(var q=0,te=0;te<O;te++){var ue=H[g>>2],se=H[g+4>>2];g+=8;for(var de=0;de<se;de++){var le=j[ue+de],ge=Ly[_];le===0||le===10?((_===1?B:R)(wd(ge,0)),ge.length=0):ge.push(le)}q+=se}return H[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),ee--,h.monitorRunDependencies&&h.monitorRunDependencies(ee),ee==0&&Q){var N=Q;Q=null,N()}return O}var g={a:Fy};if(ee++,h.monitorRunDependencies&&h.monitorRunDependencies(ee),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 Cd(){return(Cd=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;Q=function _(){Vi||$d(),Vi||(Q=_)};function $d(){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();z.unshift(g)}De(z)}}if(!(0<ee)){if(h.preRun)for(typeof h.preRun=="function"&&(h.preRun=[h.preRun]);h.preRun.length;)U();De(Z),0<ee||(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 $d(),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,E=m.fit,C=m.alignment;if(!h||!T.length||!S||!v||!b||typeof window>"u")return null;var I=function(A){var F=A.currentTarget.getBoundingClientRect(),k=d(A),B=k.clientX,R=k.clientY;if(!(!B&&!R)){var w=B-F.left,p=R-F.top,$=v.computeAlignment(E,C,{minX:0,minY:0,maxX:F.width,maxY:F.height},b.bounds),P=new v.Mat2D;$.invert(P);var j=new v.Vec2D(w,p),W=v.mapXY(P,j),Y=W.x(),ne=W.y();switch(W.delete(),P.delete(),j.delete(),$.delete(),A.type){case"touchmove":case"mouseover":case"mouseout":case"mousemove":{for(var H=0,L=T;H<L.length;H++){var oe=L[H];oe.pointerMove(Y,ne)}break}case"touchstart":case"mousedown":{for(var G=0,K=T;G<K.length;G++){var oe=K[G];oe.pointerDown(Y,ne)}break}case"touchend":case"mouseup":{for(var Z=0,ce=T;Z<ce.length;Z++){var oe=ce[Z];oe.pointerUp(Y,ne)}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(w,p,$,P){function j(W){return W instanceof $?W:new $(function(Y){Y(W)})}return new($||($=Promise))(function(W,Y){function ne(oe){try{L(P.next(oe))}catch(G){Y(G)}}function H(oe){try{L(P.throw(oe))}catch(G){Y(G)}}function L(oe){oe.done?W(oe.value):j(oe.value).then(ne,H)}L((P=P.apply(w,p||[])).next())})},d=function(w,p){var $={label:0,sent:function(){if(W[0]&1)throw W[1];return W[1]},trys:[],ops:[]},P,j,W,Y;return Y={next:ne(0),throw:ne(1),return:ne(2)},typeof Symbol=="function"&&(Y[Symbol.iterator]=function(){return this}),Y;function ne(L){return function(oe){return H([L,oe])}}function H(L){if(P)throw new TypeError("Generator is already executing.");for(;Y&&(Y=0,L[0]&&($=0)),$;)try{if(P=1,j&&(W=L[0]&2?j.return:L[0]?j.throw||((W=j.return)&&W.call(j),0):j.next)&&!(W=W.call(j,L[1])).done)return W;switch(j=0,W&&(L=[L[0]&2,W.value]),L[0]){case 0:case 1:W=L;break;case 4:return $.label++,{value:L[1],done:!1};case 5:$.label++,j=L[1],L=[0];continue;case 7:L=$.ops.pop(),$.trys.pop();continue;default:if(W=$.trys,!(W=W.length>0&&W[W.length-1])&&(L[0]===6||L[0]===2)){$=0;continue}if(L[0]===3&&(!W||L[1]>W[0]&&L[1]<W[3])){$.label=L[1];break}if(L[0]===6&&$.label<W[1]){$.label=W[1],W=L;break}if(W&&$.label<W[2]){$.label=W[2],$.ops.push(L);break}W[2]&&$.ops.pop(),$.trys.pop();continue}L=p.call(w,$)}catch(oe){L=[6,oe],j=0}finally{P=W=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}},f;(function(w){w.Cover="cover",w.Contain="contain",w.Fill="fill",w.FitWidth="fitWidth",w.FitHeight="fitHeight",w.None="none",w.ScaleDown="scaleDown"})(f||(f={}));var m;(function(w){w.Center="center",w.TopLeft="topLeft",w.TopCenter="topCenter",w.TopRight="topRight",w.CenterLeft="centerLeft",w.CenterRight="centerRight",w.BottomLeft="bottomLeft",w.BottomCenter="bottomCenter",w.BottomRight="bottomRight"})(m||(m={}));var h=function(){function w(p){var $,P,j,W,Y,ne;this.fit=($=p==null?void 0:p.fit)!==null&&$!==void 0?$:f.Contain,this.alignment=(P=p==null?void 0:p.alignment)!==null&&P!==void 0?P:m.Center,this.minX=(j=p==null?void 0:p.minX)!==null&&j!==void 0?j:0,this.minY=(W=p==null?void 0:p.minY)!==null&&W!==void 0?W:0,this.maxX=(Y=p==null?void 0:p.maxX)!==null&&Y!==void 0?Y:0,this.maxY=(ne=p==null?void 0:p.maxY)!==null&&ne!==void 0?ne:0}return w.new=function(p){var $=p.fit,P=p.alignment,j=p.minX,W=p.minY,Y=p.maxX,ne=p.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new w({fit:$,alignment:P,minX:j,minY:W,maxX:Y,maxY:ne})},w.prototype.copyWith=function(p){var $=p.fit,P=p.alignment,j=p.minX,W=p.minY,Y=p.maxX,ne=p.maxY;return new w({fit:$??this.fit,alignment:P??this.alignment,minX:j??this.minX,minY:W??this.minY,maxX:Y??this.maxX,maxY:ne??this.maxY})},w.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=$,$},w.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=$,$},w}(),b=function(){function w(){}return w.loadRuntime=function(){a.default({locateFile:function(){return w.wasmURL}}).then(function(p){var $;for(w.runtime=p;w.callBackQueue.length>0;)($=w.callBackQueue.shift())===null||$===void 0||$(w.runtime)})},w.getInstance=function(p){w.isLoading||(w.isLoading=!0,w.loadRuntime()),w.runtime?p(w.runtime):w.callBackQueue.push(p)},w.awaitInstance=function(){return new Promise(function(p){return w.getInstance(function($){return p($)})})},w.setWasmUrl=function(p){w.wasmURL=p},w.isLoading=!1,w.callBackQueue=[],w.wasmURL="https://unpkg.com/".concat(s.name,"@").concat(s.version,"/rive.wasm"),w}(),y=function(){function w(p,$,P,j){this.animation=p,this.artboard=$,this.playing=j,this.loopCount=0,this.scrubTo=null,this.instance=new P.LinearAnimationInstance(p,$)}return Object.defineProperty(w.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"time",{get:function(){return this.instance.time},set:function(p){this.instance.time=p},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),w.prototype.advance=function(p){this.scrubTo===null?this.instance.advance(p):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},w.prototype.apply=function(p){this.instance.apply(p)},Object.defineProperty(w.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),w.prototype.cleanup=function(){this.instance.delete()},w}(),T;(function(w){w[w.Number=56]="Number",w[w.Trigger=58]="Trigger",w[w.Boolean=59]="Boolean"})(T||(T={}));var S=function(){function w(p,$){this.type=p,this.runtimeInput=$}return Object.defineProperty(w.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(p){this.runtimeInput.value=p},enumerable:!1,configurable:!0}),w.prototype.fire=function(){this.type===T.Trigger&&this.runtimeInput.fire()},w}(),v=function(){function w(p,$,P,j){this.stateMachine=p,this.playing=P,this.artboard=j,this.inputs=[],this.instance=new $.StateMachineInstance(p,j),this.initInputs($)}return Object.defineProperty(w.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"statesChanged",{get:function(){for(var p=[],$=0;$<this.instance.stateChangedCount();$++)p.push(this.instance.stateChangedNameByIndex($));return p},enumerable:!1,configurable:!0}),w.prototype.advance=function(p){this.instance.advance(p)},w.prototype.initInputs=function(p){for(var $=0;$<this.instance.inputCount();$++){var P=this.instance.input($);this.inputs.push(this.mapRuntimeInput(P,p))}},w.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())},w.prototype.cleanup=function(){this.instance.delete()},w}(),E=function(){function w(p,$,P,j,W){j===void 0&&(j=[]),W===void 0&&(W=[]),this.runtime=p,this.artboard=$,this.eventManager=P,this.animations=j,this.stateMachines=W}return w.prototype.add=function(p,$,P){if(P===void 0&&(P=!0),p=B(p),p.length===0)this.animations.forEach(function(Z){return Z.playing=$}),this.stateMachines.forEach(function(Z){return Z.playing=$});else for(var j=this.animations.map(function(Z){return Z.name}),W=this.stateMachines.map(function(Z){return Z.name}),Y=0;Y<p.length;Y++){var ne=j.indexOf(p[Y]),H=W.indexOf(p[Y]);if(ne>=0||H>=0)ne>=0?this.animations[ne].playing=$:this.stateMachines[H].playing=$;else{var L=this.artboard.animationByName(p[Y]);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[Y]);if(G){var K=new v(G,this.runtime,$,this.artboard);this.stateMachines.push(K)}}}}return P&&($?this.eventManager.fire({type:C.Play,data:this.playing}):this.eventManager.fire({type:C.Pause,data:this.paused})),$?this.playing:this.paused},w.prototype.play=function(p){return this.add(p,!0)},w.prototype.pause=function(p){return this.add(p,!1)},w.prototype.scrub=function(p,$){var P=this.animations.filter(function(j){return p.includes(j.name)});return P.forEach(function(j){return j.scrubTo=$}),P.map(function(j){return j.name})},Object.defineProperty(w.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(w.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}),w.prototype.stop=function(p){var $=this;p=B(p);var P=[];if(p.length===0)P=this.animations.map(function(Y){return Y.name}).concat(this.stateMachines.map(function(Y){return Y.name})),this.animations.forEach(function(Y){return Y.cleanup()}),this.stateMachines.forEach(function(Y){return Y.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var j=this.animations.filter(function(Y){return p.includes(Y.name)});j.forEach(function(Y){Y.cleanup(),$.animations.splice($.animations.indexOf(Y),1)});var W=this.stateMachines.filter(function(Y){return p.includes(Y.name)});W.forEach(function(Y){Y.cleanup(),$.stateMachines.splice($.stateMachines.indexOf(Y),1)}),P=j.map(function(Y){return Y.name}).concat(W.map(function(Y){return Y.name}))}return this.eventManager.fire({type:C.Stop,data:P}),P},Object.defineProperty(w.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(w.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),w.prototype.atLeastOne=function(p,$){$===void 0&&($=!0);var P;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([P=this.artboard.animationByIndex(0).name],p,$):this.artboard.stateMachineCount()>0&&this.add([P=this.artboard.stateMachineByIndex(0).name],p,$)),P},w.prototype.handleLooping=function(){for(var p=0,$=this.animations.filter(function(j){return j.playing});p<$.length;p++){var P=$[p];P.loopValue===0&&P.loopCount?(P.loopCount=0,this.stop(P.name)):P.loopValue===1&&P.loopCount?(this.eventManager.fire({type:C.Loop,data:{animation:P.name,type:I.Loop}}),P.loopCount=0):P.loopValue===2&&P.loopCount>1&&(this.eventManager.fire({type:C.Loop,data:{animation:P.name,type:I.PingPong}}),P.loopCount=0)}},w.prototype.handleStateChanges=function(){for(var p=[],$=0,P=this.stateMachines.filter(function(W){return W.playing});$<P.length;$++){var j=P[$];p.push.apply(p,j.statesChanged)}p.length>0&&this.eventManager.fire({type:C.StateChange,data:p})},w.prototype.handleAdvancing=function(p){this.eventManager.fire({type:C.Advance,data:p})},w}(),C;(function(w){w.Load="load",w.LoadError="loaderror",w.Play="play",w.Pause="pause",w.Stop="stop",w.Loop="loop",w.Draw="draw",w.Advance="advance",w.StateChange="statechange"})(C||(C={}));var I;(function(w){w.OneShot="oneshot",w.Loop="loop",w.PingPong="pingpong"})(I||(I={}));var D=function(){function w(p){p===void 0&&(p=[]),this.listeners=p}return w.prototype.getListeners=function(p){return this.listeners.filter(function($){return $.type===p})},w.prototype.add=function(p){this.listeners.includes(p)||this.listeners.push(p)},w.prototype.remove=function(p){for(var $=0;$<this.listeners.length;$++){var P=this.listeners[$];if(P.type===p.type&&P.callback===p.callback){this.listeners.splice($,1);break}}},w.prototype.removeAll=function(p){var $=this;p?this.listeners.filter(function(P){return P.type===p}).forEach(function(P){return $.remove(P)}):this.listeners.splice(0,this.listeners.length)},w.prototype.fire=function(p){var $=this.getListeners(p.type);$.forEach(function(P){return P.callback(p)})},w}(),A=function(){function w(p){this.eventManager=p,this.queue=[]}return w.prototype.add=function(p){this.queue.push(p)},w.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)}},w}(),F=function(){function w(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 A(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 w.new=function(p){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new w(p)},w.prototype.init=function(p){var $=this,P=p.src,j=p.buffer,W=p.animations,Y=p.stateMachines,ne=p.artboard,H=p.autoplay,L=H===void 0?!1:H,oe=p.useOffscreenRenderer,G=oe===void 0?!1:oe;if(this.src=P,this.buffer=j,!this.src&&!this.buffer)throw new Error(w.missingErrorMessage);var K=B(W),Z=B(Y);this.loaded=!1,this.readyForPlaying=!1,b.awaitInstance().then(function(ce){$.runtime=ce,$.renderer=$.runtime.makeRenderer($.canvas,G),$.canvas.width||$.canvas.height||$.resizeDrawingSurfaceToCanvas(),$.initData(ne,K,Z,L).then(function(){return $.setupRiveListeners()}).catch(function(z){console.error(z)})}).catch(function(ce){console.error(ce)})},w.prototype.setupRiveListeners=function(){var p=this;if(!this.shouldDisableRiveListeners){var $=(this.animator.stateMachines||[]).filter(function(P){return P.playing&&p.runtime.hasListeners(P.instance)}).map(function(P){return P.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)})}},w.prototype.initData=function(p,$,P,j){var W;return u(this,void 0,void 0,function(){var Y,ne,H;return d(this,function(L){switch(L.label){case 0:return this.src?(Y=this,[4,k(this.src)]):[3,2];case 1:Y.buffer=L.sent(),L.label=2;case 2:return ne=this,[4,this.runtime.load(new Uint8Array(this.buffer))];case 3:return ne.file=L.sent(),this.file?(this.initArtboard(p,$,P,j),this.loaded=!0,this.eventManager.fire({type:C.Load,data:(W=this.src)!==null&&W!==void 0?W:"buffer"}),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,Promise.resolve()]):(H="Problem loading file; may be corrupt!",console.warn(H),this.eventManager.fire({type:C.LoadError,data:H}),[2,Promise.reject(H)])}})})},w.prototype.initArtboard=function(p,$,P,j){var W=p?this.file.artboardByName(p):this.file.defaultArtboard();if(!W){var Y="Invalid artboard name or no default artboard";console.warn(Y),this.eventManager.fire({type:C.LoadError,data:Y});return}if(this.artboard=W,this.artboard.animationCount()<1){var Y="Artboard has no animations";throw this.eventManager.fire({type:C.LoadError,data:Y}),Y}this.animator=new E(this.runtime,this.artboard,this.eventManager);var ne;$.length>0||P.length>0?(ne=$.concat(P),this.animator.add(ne,j,!1)):ne=[this.animator.atLeastOne(j,!1)],this.taskQueue.add({event:{type:j?C.Play:C.Pause,data:ne}})},w.prototype.drawFrame=function(){this.startRendering()},w.prototype.draw=function(p,$){var P=performance.now();this.frameRequestId=null,this.lastRenderTime||(this.lastRenderTime=p),this.renderSecondTimer+=p-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,$==null||$());var j=(p-this.lastRenderTime)/1e3;this.lastRenderTime=p;for(var W=this.animator.animations.filter(function(z){return z.playing||z.needsScrub}).sort(function(z){return z.needsScrub?-1:1}),Y=0,ne=W;Y<ne.length;Y++){var H=ne[Y];H.advance(j),H.instance.didLoop&&(H.loopCount+=1),H.apply(1)}for(var L=this.animator.stateMachines.filter(function(z){return z.playing}),oe=0,G=L;oe<G.length;oe++){var K=G[oe];K.advance(j)}this.artboard.advance(j);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(j),this.frameCount++;var ce=performance.now();for(this.frameTimes.push(ce),this.durations.push(ce-P);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)},w.prototype.alignRenderer=function(){var p=this,$=p.renderer,P=p.runtime,j=p._layout,W=p.artboard;$.align(j.runtimeFit(P),j.runtimeAlignment(P),{minX:j.minX,minY:j.minY,maxX:j.maxX,maxY:j.maxY},W.bounds)},Object.defineProperty(w.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(w.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}),w.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},w.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},w.prototype.play=function(p,$){var P=this;if(p=B(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return P.play(p,$)}});return}this.animator.play(p),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},w.prototype.pause=function(p){var $=this;if(p=B(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.pause(p)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(p)},w.prototype.scrub=function(p,$){var P=this;if(p=B(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return P.scrub(p,$)}});return}this.animator.scrub(p,$||0),this.drawFrame()},w.prototype.stop=function(p){var $=this;if(p=B(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.stop(p)}});return}this.animator.stop(p),this.eventCleanup&&this.eventCleanup()},w.prototype.reset=function(p){var $,P=p==null?void 0:p.artboard,j=B(p==null?void 0:p.animations),W=B(p==null?void 0:p.stateMachines),Y=($=p==null?void 0:p.autoplay)!==null&&$!==void 0?$:!1;this.cleanupInstances(),this.initArtboard(P,j,W,Y),this.taskQueue.process()},w.prototype.load=function(p){this.stop(),this.init(p)},Object.defineProperty(w.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}),w.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},w.prototype.resizeDrawingSurfaceToCanvas=function(){if(this.canvas instanceof HTMLCanvasElement&&window){var p=this.canvas.getBoundingClientRect(),$=p.width,P=p.height,j=window.devicePixelRatio||1;this.canvas.width=j*$,this.canvas.height=j*P,this.startRendering(),this.resizeToCanvas()}},Object.defineProperty(w.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(w.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(w.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}),w.prototype.stateMachineInputs=function(p){if(this.loaded){var $=this.animator.stateMachines.find(function(P){return P.name===p});return $==null?void 0:$.inputs}},Object.defineProperty(w.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(w.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(w.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(w.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(w.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),w.prototype.on=function(p,$){this.eventManager.add({type:p,callback:$})},w.prototype.off=function(p,$){this.eventManager.remove({type:p,callback:$})},w.prototype.unsubscribe=function(p,$){console.warn("This function is deprecated: please use `off()` instead."),this.off(p,$)},w.prototype.removeAllRiveEventListeners=function(p){this.eventManager.removeAll(p)},w.prototype.unsubscribeAll=function(p){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(p)},w.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},w.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)))},w.prototype.enableFPSCounter=function(p){this.runtime.enableFPSCounter(p)},w.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(w.prototype,"contents",{get:function(){if(this.loaded){for(var p={artboards:[]},$=0;$<this.file.artboardCount();$++){for(var P=this.file.artboardByIndex($),j={name:P.name,animations:[],stateMachines:[]},W=0;W<P.animationCount();W++){var Y=P.animationByIndex(W);j.animations.push(Y.name)}for(var ne=0;ne<P.stateMachineCount();ne++){for(var H=P.stateMachineByIndex(ne),L=H.name,oe=new this.runtime.StateMachineInstance(H,P),G=[],K=0;K<oe.inputCount();K++){var Z=oe.input(K);G.push({name:Z.name,type:Z.type})}j.stateMachines.push({name:L,inputs:G})}p.artboards.push(j)}return p}},enumerable:!1,configurable:!0}),w.missingErrorMessage="Rive source file or data buffer required",w}(),k=function(w){return u(void 0,void 0,void 0,function(){var p,$,P;return d(this,function(j){switch(j.label){case 0:return p=new Request(w),[4,fetch(p)];case 1:return $=j.sent(),[4,$.arrayBuffer()];case 2:return P=j.sent(),[2,P]}})})},B=function(w){return typeof w=="string"?[w]:w instanceof Array?w:[]},R={EventManager:D,TaskQueueManager:A}})(),i})())})(og);var YT=og.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=l,n=YT;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 E,C=1,I=arguments.length;C<I;C++)for(var D in E=arguments[C])Object.prototype.hasOwnProperty.call(E,D)&&(v[D]=E[D]);return v},i.apply(this,arguments)};function a(v,E){var C={};for(var I in v)Object.prototype.hasOwnProperty.call(v,I)&&E.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++)E.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,E){E===void 0&&(E=!0);var C=t.useState({width:0,height:0}),I=C[0],D=C[1];t.useEffect(function(){if(typeof window<"u"&&E){var R=function(){D({width:window.innerWidth,height:window.innerHeight})};return f&&(R(),window.addEventListener("resize",R)),function(){return window.removeEventListener("resize",R)}}},[]);var A,F,k,B=t.useRef(new u((A=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,w=[],p=0;p<arguments.length;p++)w[p]=arguments[p];clearTimeout(k),k=window.setTimeout(function(){return A.apply(R,w)},F)})));return t.useEffect(function(){var R=B.current;if(E){var w=v.current;return v.current&&d&&R.observe(v.current),function(){R.disconnect(),w&&d&&R.unobserve(w)}}R.disconnect()},[v,B]),I}var h={useDevicePixelRatio:!0,fitCanvasToArtboardHeight:!1,useOffscreenRenderer:!0,shouldResizeCanvasToContainer:!0};function b(v){return Object.assign({},h,v)}function y(v){var E=v.riveLoaded,C=E!==void 0&&E,I=v.canvasRef,D=v.containerRef,A=v.options,F=A===void 0?{}:A,k=v.onCanvasHasResized,B=v.artboardBounds,R=b(F),w=t.useState({height:0,width:0}),p=w[0],$=p.height,P=p.width,j=w[1],W=t.useState({height:0,width:0}),Y=W[0],ne=Y.height,H=Y.width,L=W[1],oe=t.useState(!0),G=oe[0],K=oe[1],Z=R.fitCanvasToArtboardHeight,ce=R.shouldResizeCanvasToContainer,z=R.useDevicePixelRatio,U=m(D,ce),ee=function(){var Te=s(),Pe=t.useState(Te),Ne=Pe[0],Oe=Pe[1];return t.useEffect(function(){if(typeof window<"u"&&"matchMedia"in window){var We=function(){var ot=s();Oe(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}(),Q=B??{},ie=Q.maxX,re=Q.maxY,me=t.useCallback(function(){var Te,Pe,Ne,Oe,We=(Pe=(Te=D.current)===null||Te===void 0?void 0:Te.clientWidth)!==null&&Pe!==void 0?Pe:0,De=(Oe=(Ne=D.current)===null||Ne===void 0?void 0:Ne.clientHeight)!==null&&Oe!==void 0?Oe:0;return Z&&B?{width:We,height:We*(B.maxY/B.maxX)}:{width:We,height:De}},[D,Z,ie,re]);t.useEffect(function(){if(ce&&D.current&&C){var Te=me(),Pe=Te.width,Ne=Te.height,Oe=!1;if(I.current){var We=Pe!==P||Ne!==$;if(R.fitCanvasToArtboardHeight&&We&&(D.current.style.height=Ne+"px",Oe=!0),R.useDevicePixelRatio){if(We||Pe*ee!==H||Ne*ee!==ne){var De=ee*Pe,ot=ee*Ne;I.current.width=De,I.current.height=ot,I.current.style.width=Pe+"px",I.current.style.height=Ne+"px",L({width:De,height:ot}),Oe=!0}}else We&&(I.current.width=Pe,I.current.height=Ne,L({width:Pe,height:Ne}),Oe=!0);j({width:Pe,height:Ne})}k&&(G||Oe)&&k&&k(),G&&K(!1)}},[I,D,U,ee,me,G,K,ne,H,$,P,k,ce,Z,z,C])}function T(v){var E=v.setContainerRef,C=v.setCanvasRef,I=v.className,D=I===void 0?"":I,A=v.style,F=v.children,k=a(v,["setContainerRef","setCanvasRef","className","style","children"]),B=i({width:"100%",height:"100%"},A);return o.default.createElement("div",i({ref:E,className:D},!D&&{style:B}),o.default.createElement("canvas",i({ref:C,style:{verticalAlign:"top",width:0,height:0}},k),F))}function S(v,E){E===void 0&&(E={});var C=t.useRef(null),I=t.useRef(null),D=t.useState(null),A=D[0],F=D[1],k=!!v,B=b(E),R=t.useCallback(function(){A&&(A.startRendering(),A.resizeToCanvas())},[A]);y({riveLoaded:!!A,canvasRef:C,containerRef:I,options:B,onCanvasHasResized:R,artboardBounds:A==null?void 0:A.bounds});var w=t.useCallback(function(j){if(j&&v&&k){var W=B.useOffscreenRenderer,Y=new n.Rive(i(i({useOffscreenRenderer:W},v),{canvas:j}));Y.on(n.EventType.Load,function(){C.current?F(Y):Y.cleanup()})}else j===null&&C.current&&(C.current.height=0,C.current.width=0);C.current=j},[k]),p=t.useCallback(function(j){I.current=j},[]);t.useEffect(function(){var j=new IntersectionObserver(function(W){W[0].isIntersecting?A&&A.startRendering():A&&A.stopRendering()});return C.current&&j.observe(C.current),function(){j.disconnect()}},[A]),t.useEffect(function(){return function(){A&&(A.cleanup(),F(null))}},[A]);var $=v==null?void 0:v.animations;t.useEffect(function(){A&&$&&(A.isPlaying?(A.stop(A.animationNames),A.play($)):A.isPaused&&(A.stop(A.animationNames),A.pause($)))},[$,A]);var P=t.useCallback(function(j){return o.default.createElement(T,i({setContainerRef:p,setCanvasRef:w},j))},[w,p]);return{canvas:C.current,container:I.current,setCanvasRef:w,setContainerRef:p,rive:A,RiveComponent:P}}e.default=function(v){var E=v.src,C=v.artboard,I=v.animations,D=v.stateMachines,A=v.layout,F=v.useOffscreenRenderer,k=F===void 0||F,B=v.shouldDisableRiveListeners,R=B!==void 0&&B,w=v.shouldResizeCanvasToContainer,p=w===void 0||w,$=v.children,P=a(v,["src","artboard","animations","stateMachines","layout","useOffscreenRenderer","shouldDisableRiveListeners","shouldResizeCanvasToContainer","children"]),j=S({src:E,artboard:C,animations:I,layout:A,stateMachines:D,autoplay:!0,shouldDisableRiveListeners:R},{useOffscreenRenderer:k,shouldResizeCanvasToContainer:p}).RiveComponent;return o.default.createElement(j,i({},P),$)},e.useResizeCanvas=y,e.useRive=S,e.useStateMachineInput=function(v,E,C,I){var D=t.useState(null),A=D[0],F=D[1];return t.useEffect(function(){function k(){if(v&&E&&C||F(null),v&&E&&C){var B=v.stateMachineInputs(E);if(B){var R=B.find(function(w){return w.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]),A},Object.keys(n).forEach(function(v){v==="default"||e.hasOwnProperty(v)||Object.defineProperty(e,v,{enumerable:!0,get:function(){return n[v]}})})})(rg);const KT=gp(rg),wl=({src:e="https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:t,height:n,style:r,...o})=>M.jsx(et,{width:t,height:n,style:r,children:M.jsx(KT,{src:e,...o})});wl.defaultProps={src:"https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:"300px",height:"300px",style:{}};const ig=({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?M.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:M.jsx(et,{"data-test-id":s["data-testid-loader"],position:"absolute",left:"50%",top:"50%",width:n,height:r,children:M.jsx(wl,{src:i,width:n,height:r,style:{transform:"translate(-50%, -50%)"}})})}):null);ig.defaultProps={onClose:()=>{},className:"",src:void 0,noScroll:"noscroll","data-testid-backdrop":"full-loader-backdrop","data-testid-loader":"full-loader-loader"};var qT=pt({defaultClassName:"_1a8lrjn1 j1jih79l j1jih7ak",variantClassNames:{color:{primary:"_1a8lrjn2",white:"_1a8lrjn3"},size:{small:"_1a8lrjn4",medium:"_1a8lrjn5",large:"_1a8lrjn6"}},defaultVariants:{color:"primary",size:"medium"},compoundVariants:[]});const XT=({color:e,size:t,...n})=>M.jsx(et,{...n,className:Re(qT({color:e,size:t}))});function GT(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 M.jsx(e,{...this.props,getValue:this.getValue,onValueChange:this.onValueChange,onScrollChange:this.props.onScrollChange&&this.onScrollChange})}}}var ZT="_1ypj0tt5",QT="_1ypj0tt4",JT="_1ypj0tt3",Hh="_1ypj0tt1",eI="_1ypj0tt0",tI="_1ypj0tt2";const nI=({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 M.jsx(et,{className:Re(ZT,e),children:a})},ag=GT(nI),rI=e=>null;function oI(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 M.jsx(e,{...this.props,doScrollingComplete:this.doScrollingComplete,computeChildIndex:n,select:this.select})}},t.Item=rI,t}const iI=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,B=0,R=0,w=!1,p=!1;const $=(L,oe)=>{L.transform=oe},P=(L,oe)=>{L.transition=oe},j=(L,oe,G=.3)=>{var K,Z;k!==oe&&(k=oe,P((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(()=>{A(),f.current&&P(f.current.style,"")},+G*1e3))},W=((L=30,oe=100)=>{let G=0,K=0,Z=0;const ce={record:z=>{const U=+new Date;Z=(z-K)/(U-G),U-G>=L&&(Z=U-G<=oe?Z:0,K=z,G=U)},getVelocity:z=>(z!==K&&ce.record(z),Z)};return ce})(),Y=()=>{p=!1;let L=k;const oe=(t.length-1)*h.current;let G=.3;const K=W.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),j(0,L,G<.3?.3:G),D()},ne=L=>{w||(p=!0,R=L,B=k)},H=L=>{var oe;w||!p||(k=B-L+R,W.record(k),D(),$((oe=f.current)==null?void 0:oe.style,`translate3d(0,${-k}px,0)`))};return{touchstart:L=>ne(L.touches[0].pageY),mousedown:L=>ne(L.pageY),touchmove:L=>{L.preventDefault(),H(L.touches[0].pageY)},mousemove:L=>{L.preventDefault(),H(L.pageY)},touchend:()=>Y(),touchcancel:()=>Y(),mouseup:()=>Y(),getValue:()=>k,scrollTo:j,setDisabled:(L=!1)=>{w=L}}})(),E=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 B=l.Children.toArray(t),R=s(k,h.current,B.length);if(b.current!==R){b.current=R;const w=B[R];w&&e.onScrollChange?e.onScrollChange(w.props.value):!B&&console.warn&&console.warn("child not found",t,R)}}},A=()=>{const k=v.getValue();k>=0&&i(k,h.current,I)},F=()=>{const k=`${Hh} ${tI}`,B=w=>{const{className:p="",style:$,value:P}=w.props,j=T===P;return M.jsx("div",{style:{...$},"data-selected":j?"true":void 0,className:`${j?k:Hh} ${p}`,children:w.props.children},P)};return l.Children?l.Children.map(t,B):[].concat(t).map(B)};return l.useEffect(()=>{var w,p,$;const k=((w=d.current)==null?void 0:w.getBoundingClientRect().height)??0,B=((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/B);return R%2===0&&(R-=1),R-=1,R/=2,f.current.style.padding=`${B*R}px 0`,m.current.style.top=`${B*R}px`,v.setDisabled(c),o(T,h.current,E),Object.keys(v).forEach(P=>{var j;if(P.indexOf("touch")===0||P.indexOf("mouse")===0){const W=P.indexOf("move")>=0?{passive:!1}:{passive:!0};(j=d.current)==null||j.addEventListener(P,v[P],W)}}),()=>{Object.keys(v).forEach(P=>{var j;(P.indexOf("touch")===0||P.indexOf("mouse")===0)&&((j=d.current)==null||j.removeEventListener(P,v[P]))})}},[c,v,E,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]),M.jsxs("div",{className:Re(eI,u),ref:d,children:[M.jsx("div",{className:Re(JT,u),ref:m}),M.jsx("div",{className:QT,ref:f,children:F()})]})},au=oI(iI);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,aI={am:"AM",pm:"PM"},sg=e=>new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),pc=e=>e<10?`0${e}`:`${e}`,Sr=e=>new Date(+e),sI=(e,t)=>{e.setDate(Math.min(e.getDate(),sg(new Date(e.getFullYear(),t)))),e.setMonth(t)},Wh=(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)},zh=(e,t)=>{t===0?e.setTime(+e-qa/2):e.setTime(+e+qa/2)},Uh=(e,t)=>(t&&(e===0&&(e=12),e>12&&(e-=12)),e),cI=e=>["January","February","March","April","May","June","July","August","September","October","November","December"][e],uI=e=>{const{date:t,defaultDate:n=new Date(2e3,0,1),locale:r=aI,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=()=>w().getFullYear(),E=()=>p().getFullYear(),C=()=>w().getMonth(),I=()=>p().getMonth(),D=()=>w().getDate(),A=()=>p().getDate(),F=()=>w().getHours(),k=()=>p().getHours(),B=()=>w().getMinutes(),R=()=>p().getMinutes(),w=()=>u||y.current,p=()=>d||T.current,$=G=>{const K=w(),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(),z=Z.getMinutes(),U=K.getHours(),ee=K.getMinutes(),Q=G.getHours(),ie=G.getMinutes();if(Q<U||Q===U&&ie<ee)return Sr(K);if(Q>ce||Q===ce&&ie>z)return Sr(Z)}return G},P=(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:sI(ce,Z);break;case 2:ce.setFullYear(Z);break;case 3:Wh(ce,Z);break;case 4:ce.setMinutes(Z);break;case 5:zh(ce,Z);break}else if(o===Mt.TIME)switch(K){case 0:Wh(ce,Z);break;case 1:ce.setMinutes(Z);break;case 2:zh(ce,Z);break}return $(ce)},j=(G,K)=>{const Z=P(G,K);"date"in e||b(Z),e.onDateChange&&e.onDateChange(Z),e.onValueChange&&e.onValueChange(G,K)},W=(G,K)=>{if(e.onScrollChange){const Z=P(G,K);e.onScrollChange(Z,G,K)}},Y=()=>{const G=S(),K=G.getFullYear(),Z=G.getMonth(),ce=v(),z=E(),U=C(),ee=I(),Q=D(),ie=A(),re=[];for(let ze=ce;ze<=z;ze+=1)re.push({value:`${ze}`,label:`${ze}`});const me={key:"year",props:{children:re}};if(o===Mt.YEAR)return[me];const Te=[];let Pe=0,Ne=11;ce===K&&(Pe=U),z===K&&(Ne=ee);for(let ze=Pe;ze<=Ne;ze+=1){const xt=m?m(ze,G):cI(ze);Te.push({value:`${ze}`,label:xt})}const Oe={key:"month",props:{children:Te}};if(o===Mt.MONTH)return[Oe,me];const We=[];let De=1,ot=sg(G);ce===K&&U===Z&&(De=Q),z===K&&ee===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}},Oe,me]},ne=G=>{let{minHour:K=0,maxHour:Z=23,minMinute:ce=0,maxMinute:z=59}=e;const U=B(),ee=R(),Q=F(),ie=k(),re=G.getHours();if(o===Mt.DATE_TIME){const Oe=G.getFullYear(),We=G.getMonth(),De=G.getDate(),ot=v(),ze=E(),xt=C(),Xe=I(),Pt=D(),xe=A();ot===Oe&&xt===We&&Pt===De&&(K=Q,Q===re&&(ce=U)),ze===Oe&&Xe===We&&xe===De&&(Z=ie,ie===re&&(z=ee))}else K=Q,Q===re&&(ce=U),Z=ie,ie===re&&(z=ee);const me=[];K===0&&Z===0||K!==0&&Z!==0?K=Uh(K):K===0&&c&&(K=1,me.push({value:"0",label:"12"})),Z=Uh(Z);for(let Oe=K;Oe<=Z;Oe+=1)me.push({value:`${Oe}`,label:pc(Oe)});const Te=[],Pe=G.getMinutes();for(let Oe=ce;Oe<=z;Oe+=s)Te.push({value:`${Oe}`,label:pc(Oe)}),Pe>Oe&&Pe<Oe+s&&Te.push({value:`${Pe}`,label:pc(Pe)});return{cols:[{key:"hours",props:{children:me}},{key:"minutes",props:{children:Te}}].concat(c?[{key:"ampm",props:{children:[{value:"0",label:r.am},{value:"1",label:r.pm}]}}]:[]),selMinute:Pe}},H=()=>{const G=S();let K=[],Z=[];if(o===Mt.YEAR)return{cols:Y(),value:[`${G.getFullYear()}`]};if(o===Mt.MONTH)return{cols:Y(),value:[`${G.getMonth()}`,`${G.getFullYear()}`]};if((o===Mt.DATE_TIME||o===Mt.DATE)&&(K=Y(),Z=[`${G.getDate()}`,`${G.getMonth()}`,`${G.getFullYear()}`]),o===Mt.DATE_TIME||o===Mt.TIME){const ce=ne(G);K=K.concat(ce.cols);const z=G.getHours();let U=[`${z}`,`${ce.selMinute}`],ee=z;c&&(ee=z>12?z-12:z,U=[`${ee}`,`${ce.selMinute}`,`${z>=12?1:0}`]),Z=Z.concat(U)}return{value:Z,cols:K}},{value:L,cols:oe}=H();return M.jsx(ag,{className:a,selectedValue:L,onValueChange:j,onScrollChange:W,children:oe.map(G=>M.jsx(au,{disabled:i,className:`picker-item-${G.key}`,children:G.props.children.map(K=>M.jsx(au.Item,{value:K.value,children:K.label},K.value))},G.key))})};var su={exports:{}},yt={};/** @license React v17.0.2
|
|
159
|
+
}`),ye.bindAttribLocation(Ce,0,"vertex"),ye.bindAttribLocation(Ce,1,"uv"),ye.linkProgram(Ce),Me=ye.getProgramInfoLog(Ce),0<Me.trim().length)throw Me;q=ye.getUniformLocation(Ce,"mat"),te=ye.getUniformLocation(Ce,"translate"),ye.useProgram(Ce),ye.bindBuffer(ye.ARRAY_BUFFER,ye.createBuffer()),ye.enableVertexAttribArray(0),ye.enableVertexAttribArray(1),ye.bindBuffer(ye.ELEMENT_ARRAY_BUFFER,ye.createBuffer()),ye.uniform1i(ye.getUniformLocation(Ce,"image"),0),ye.pixelStorei(ye.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),g=ye}return!0}let g=null,O=0,N=0,q=null,te=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),ge=new S(10),Se=new S(10);this.kb=function(Ce,Me,ye,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),ye.sort((Je,or)=>or.Ua-Je.Ua),Ve=ge.push(Et),ue!=Ve&&(g.bufferData(g.ARRAY_BUFFER,8*Ve,g.DYNAMIC_DRAW),ue=Ve),Ve=0;for(var Nt of ye)g.bufferSubData(g.ARRAY_BUFFER,Ve,Nt.Da),Ve+=4*Nt.Da.length;console.assert(Ve==4*Et);for(var ln of ye)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 ye)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 ye){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),ye=2/Ce;const or=-2/Me;g.uniform4f(q,Je.oa[0]*ye*Je.va,Je.oa[1]*or*Je.wa,Je.oa[2]*ye*Je.va,Je.oa[3]*or*Je.wa),g.uniform2f(te,Je.oa[4]*ye*Je.va+ye*(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,te=h.RenderPaint,ue=h.Renderer,se=h.StrokeCap,de=h.StrokeJoin,le=h.BlendMode,ge=N.fill,Se=N.stroke,Ce=h.FillRule.evenOdd;let Me=1;var ye=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 vt=this,ut=new Image;ut.src=URL.createObjectURL(new Blob([pe],{type:"image/png"})),ut.onload=function(){if(vt.ab=ut,vt.cb=v.gb(ut),vt.size(ut.width,ut.height),ke.loaded++,ke.loaded===ke.total){const mt=ke.ready;mt&&(mt(),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,vt,ut,mt,Tt,rt){var ft=this.ia,bn=ft.addPath;pe=pe.ia;const Ft=new DOMMatrix;Ft.a=ke,Ft.b=vt,Ft.c=ut,Ft.d=mt,Ft.e=Tt,Ft.f=rt,bn.call(ft,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,vt,ut,mt,Tt){this.ia.bezierCurveTo(pe,ke,vt,ut,mt,Tt)},close:function(){this.ia.closePath()}}),Dt=te.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,vt,ut){this.qa={Va:pe,Wa:ke,La:vt,Ma:ut,Ca:[]}},radialGradient:function(pe,ke,vt,ut){this.qa={Va:pe,Wa:ke,La:vt,Ma:ut,Ca:[],ub:!0}},addStop:function(pe,ke){this.qa.Ca.push({color:pe,stop:ke})},completeGradient:function(){},draw:function(pe,ke,vt){let ut=this.bb;var mt=this.Ha,Tt=this.qa;if(pe.globalCompositeOperation=this.$a,Tt!=null){mt=Tt.Va;var rt=Tt.Wa;const bn=Tt.La;var ft=Tt.Ma;const Ft=Tt.Ca;Tt.ub?(Tt=bn-mt,ft-=rt,mt=pe.createRadialGradient(mt,rt,0,mt,rt,Math.sqrt(Tt*Tt+ft*ft))):mt=pe.createLinearGradient(mt,rt,bn,ft);for(let Mn=0,Bt=Ft.length;Mn<Bt;Mn++)rt=Ft[Mn],mt.addColorStop(rt.stop,g(rt.color));this.Ha=mt,this.qa=null}switch(ut){case Se:pe.strokeStyle=mt,pe.lineWidth=this.eb,pe.lineCap=this.xa,pe.lineJoin=this.ya,pe.stroke(ke);break;case ge:pe.fillStyle=mt,pe.fill(ke,vt)}}});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,vt,ut,mt,Tt){const rt=this.ha,ft=rt.length-6;rt.splice(ft,6,rt[ft]*pe+rt[ft+2]*ke,rt[ft+1]*pe+rt[ft+3]*ke,rt[ft]*vt+rt[ft+2]*ut,rt[ft+1]*vt+rt[ft+3]*ut,rt[ft]*mt+rt[ft+2]*Tt+rt[ft+4],rt[ft+1]*mt+rt[ft+3]*Tt+rt[ft+5]),this.da.push(this.ba.transform.bind(this.ba,pe,ke,vt,ut,mt,Tt))},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 vt=this.ba;this.da.push(function(){vt.drawImage(pe,...ke)})},_drawRiveImage:function(pe,ke,vt){var ut=pe.ab;if(ut){var mt=this.ba,Tt=_(ke);this.da.push(function(){mt.globalCompositeOperation=Tt,mt.globalAlpha=vt,mt.drawImage(ut,0,0),mt.globalAlpha=1})}},_getMatrix:function(pe){const ke=this.ha,vt=ke.length-6;for(let ut=0;6>ut;++ut)pe[ut]=ke[vt+ut]},_drawImageMesh:function(pe,ke,vt,ut,mt,Tt,rt,ft,bn,Ft){var Mn=this.ba.canvas.width,Bt=this.ba.canvas.height;const Td=bn-rt,Id=Ft-ft;rt=Math.max(rt,0),ft=Math.max(ft,0),bn=Math.min(bn,Mn),Ft=Math.min(Ft,Bt);const So=bn-rt,Co=Ft-ft;if(console.assert(So<=Math.min(Td,Mn)),console.assert(Co<=Math.min(Id,Bt)),!(0>=So||0>=Co)){bn=So<Td||Co<Id,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 Rd=Bt&65535,Od=Bt>>16;Nt.push({oa:this.ha.slice(this.ha.length-6),image:pe,Ia:Rd,Ja:Od,xb:rt,yb:ft,Gb:xr,Pa:_r,va:Ft,wa:Mn,Da:new Float32Array(ut),Xa:new Float32Array(mt),indices:new Uint16Array(Tt),zb:bn,Ua:pe.za<<1|(bn?1:0)}),ln+=ut.length,zn+=Tt.length;var Hr=this.ba,By=_(ke);this.da.push(function(){Hr.save(),Hr.resetTransform(),Hr.globalCompositeOperation=By,Hr.globalAlpha=vt,Hr.drawImage(v.canvas(),Rd,Od,xr,_r,rt,ft,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 ye}};let or=h.load,Bs=null;h.load=function(pe){return new Promise(function(ke){let vt=null;Bs={total:0,loaded:0,ready:function(){ke(vt)}},vt=or(pe),Bs.total==0&&ke(vt)})},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 E=Object.assign({},h),C="./this.program",I=typeof window=="object",D=typeof importScripts=="function",A="",F,k;(I||D)&&(D?A=self.location.href:typeof document<"u"&&document.currentScript&&(A=document.currentScript.src),f&&(A=f),A.indexOf("blob:")!==0?A=A.substr(0,A.replace(/[?#].*/,"").lastIndexOf("/")+1):A="",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 B=h.print||console.log.bind(console),R=h.printErr||console.error.bind(console);Object.assign(h,E),E=null,h.thisProgram&&(C=h.thisProgram);var w;h.wasmBinary&&(w=h.wasmBinary),h.noExitRuntime,typeof WebAssembly!="object"&&ie("no native wasm support detected");var p,$=!1,P,j,W,Y,ne,H,L,oe;function G(){var _=p.buffer;h.HEAP8=P=new Int8Array(_),h.HEAP16=W=new Int16Array(_),h.HEAP32=ne=new Int32Array(_),h.HEAPU8=j=new Uint8Array(_),h.HEAPU16=Y=new Uint16Array(_),h.HEAPU32=H=new Uint32Array(_),h.HEAPF32=L=new Float32Array(_),h.HEAPF64=oe=new Float64Array(_)}var K,Z=[],ce=[],z=[];function U(){var _=h.preRun.shift();Z.unshift(_)}var ee=0,Q=null;function ie(_){throw h.onAbort&&h.onAbort(_),_="Aborted("+_+")",R(_),$=!0,_=new WebAssembly.RuntimeError(_+". Build with -sASSERTIONS for more info."),y(_),_}function re(_){return _.startsWith("data:application/octet-stream;base64,")}var me;if(me="canvas_advanced.wasm",!re(me)){var Te=me;me=h.locateFile?h.locateFile(Te,A):A+Te}function Pe(_){if(_==me&&w)return new Uint8Array(w);if(k)return k(_);throw"both async and sync fetching of the wasm failed"}function Ne(_){if(!w&&(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(()=>Pe(_));if(F)return new Promise((g,O)=>{F(_,N=>g(new Uint8Array(N)),O)})}return Promise.resolve().then(()=>Pe(_))}function Oe(_,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=me;return w||typeof WebAssembly.instantiateStreaming!="function"||re(O)||O.startsWith("file://")||typeof fetch!="function"?Oe(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"),Oe(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="";j[_];)g+=tt[j[_++]];return g}var gt=[];function nn(){for(;gt.length;){var _=gt.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(_){_=Cd(_);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(ne[_>>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),te=[],ue=0;g.forEach((se,de)=>{Ue.hasOwnProperty(se)?q[de]=Ue[se]:(te.push(se),kn.hasOwnProperty(se)||(kn[se]=[]),kn[se].push(()=>{q[de]=Ue[se],++ue,ue===te.length&&N(q)}))}),te.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 J(_){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 Re(_,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,te,ue,se){this.name=_,this.constructor=g,this.ga=O,this.ka=N,this.$=q,this.ob=te,this.ra=ue,this.jb=se,this.Ra=[]}function we(_,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}`),we(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=we(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}`),we(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 gd=void 0;function Hn(_,g){function O(te){q[te]||Ue[te]||(nr[te]?nr[te].forEach(O):(N.push(te),q[te]=!0))}var N=[],q={};throw g.forEach(O),new gd(`${_}: `+N.map(kt).join([", "]))}function ki(_,g,O,N,q){var te=g.length;2>te&&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=te-2,ge=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 ye=0;ye<le;++ye)ge[ye]=g[ye+2].toWireType(Ce,arguments[ye]),Se.push(ge[ye]);if(ye=N.apply(null,Se),se)Kt(Ce);else for(var Et=ue?1:2;Et<g.length;Et++){var Dt=Et===1?Me:ge[Et-2];g[Et].ea!==null&&g[Et].ea(Dt)}return Me=de?g[0].fromWireType(ye):void 0,Me}}function Mi(_,g){for(var O=[],N=0;N<_;N++)O.push(H[g+4*N>>2]);return O}function yd(_,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`),we(_.W.Y,_.W.Z.X,g.X)}function Ms(_){_>=Xe.Ea&&--Xe.get(_).Ta===0&&Xe.Za(_)}function Ty(_,g,O){switch(g){case 0:return function(N){return this.fromWireType((O?P:j)[N])};case 1:return function(N){return this.fromWireType((O?W:Y)[N>>1])};case 2:return function(N){return this.fromWireType((O?ne:H)[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 Iy(_,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 Ry(_,g,O){switch(g){case 0:return O?function(N){return P[N]}:function(N){return j[N]};case 1:return O?function(N){return W[N>>1]}:function(N){return Y[N>>1]};case 2:return O?function(N){return ne[N>>2]}:function(N){return H[N>>2]};default:throw new TypeError("Unknown integer type: "+_)}}var bd=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,wd=(_,g,O)=>{var N=g+O;for(O=g;_[O]&&!(O>=N);)++O;if(16<O-g&&_.buffer&&bd)return bd.decode(_.subarray(g,O));for(N="";g<O;){var q=_[g++];if(q&128){var te=_[g++]&63;if((q&224)==192)N+=String.fromCharCode((q&31)<<6|te);else{var ue=_[g++]&63;q=(q&240)==224?(q&15)<<12|te<<6|ue:(q&7)<<18|te<<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},Ed=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Oy=(_,g)=>{for(var O=_>>1,N=O+g/2;!(O>=N)&&Y[O];)++O;if(O<<=1,32<O-_&&Ed)return Ed.decode(j.subarray(_,O));for(O="",N=0;!(N>=g/2);++N){var q=W[_+2*N>>1];if(q==0)break;O+=String.fromCharCode(q)}return O},Py=(_,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)W[g>>1]=_.charCodeAt(q),g+=2;return W[g>>1]=0,g-N},Ay=_=>2*_.length,Dy=(_,g)=>{for(var O=0,N="";!(O>=g/4);){var q=ne[_+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},Ny=(_,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 te=_.charCodeAt(q);if(55296<=te&&57343>=te){var ue=_.charCodeAt(++q);te=65536+((te&1023)<<10)|ue&1023}if(ne[g>>2]=te,g+=4,g+4>O)break}return ne[g>>2]=0,g-N},ky=_=>{for(var g=0,O=0;O<_.length;++O){var N=_.charCodeAt(O);55296<=N&&57343>=N&&++O,g+=4}return g},My={};function ji(_){var g=My[_];return g===void 0?Fe(_):g}var Li=[];function jy(_){var g=Li.length;return Li.push(_),g}function Ly(_,g){for(var O=Array(_),N=0;N<_;++N)O[N]=At(H[g+4*N>>2],"parameter "+N);return O}var xd=[],Ls={},_d=()=>{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,Fy=[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 Sd=Array(256),Fi=0;256>Fi;++Fi)Sd[Fi]=String.fromCharCode(Fi);tt=Sd,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=_,gt.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||J(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||J(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||J(this),this.W.na&&!this.W.pa&&xe("Object already scheduled for deletion"),gt.push(this),gt.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})},gd=h.UnboundTypeError=Zt("UnboundTypeError");var Vy={I:function(_,g,O){_=Fe(_),g=At(g,"wrapper"),O=ct(O);var N=[].slice,q=g.X,te=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:te}),this.__construct.apply(this,N.call(arguments))}),te.__construct=function(){this===te&&xe("Pass correct 'this' to __construct");var le=se.implement.apply(void 0,[this].concat(N.call(arguments)));Jt(le);var ge=le.W;le.notifyOnDestruction(),ge.pa=!0,Object.defineProperties(this,{W:{value:ge}}),en(this),le=ge.Y,le=he(q,le),Qt.hasOwnProperty(le)?xe(`Tried to register registered instance: ${le}`):Qt[le]=this},te.__destruct=function(){this===te&&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(te);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,te=q.map(ue=>ue.sb).concat(q.map(ue=>ue.Db));Wt([_],te,ue=>{var se={};return q.forEach((de,le)=>{var ge=ue[le],Se=de.qb,Ce=de.rb,Me=ue[le+q.length],ye=de.Cb,Et=de.Eb;se[de.mb]={read:Dt=>ge.fromWireType(Se(Ce,Dt)),write:(Dt,Ve)=>{var Ye=[];ye(Et,Dt,Me.toWireType(Ye,Ve)),Kt(Ye)}}}),[{name:g.name,fromWireType:function(de){var le={},ge;for(ge in se)le[ge]=se[ge].read(de);return N(de),le},toWireType:function(de,le){for(var ge in se)if(!(ge in le))throw new TypeError(`Missing field: "${ge}"`);var Se=O();for(ge in se)se[ge].write(Se,le[ge]);return de!==null&&de.push(N,Se),Se},argPackAdvance:8,readValueFromPointer:Tn,ea:N}]})},z:function(){},G:function(_,g,O,N,q){var te=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=P;else if(O===2)se=W;else if(O===4)se=ne;else throw new TypeError("Unknown boolean type size: "+g);return this.fromWireType(se[ue>>te])},ea:null})},e:function(_,g,O,N,q,te,ue,se,de,le,ge,Se,Ce){ge=Fe(ge),te=qe(q,te),se&&(se=qe(ue,se)),le&&(le=qe(de,le)),Ce=qe(Se,Ce);var Me=ot(ge);Re(Me,function(){Hn(`Cannot construct ${ge} due to unbound types`,[N])}),Wt([_,g,O],N?[N]:[],function(ye){if(ye=ye[0],N)var Et=ye.X,Dt=Et.ga;else Dt=fe.prototype;ye=ze(Me,function(){if(Object.getPrototypeOf(this)!==Ve)throw new Pt("Use 'new' to construct "+ge);if(Ye.la===void 0)throw new Pt(ge+" has no accessible constructor");var ln=Ye.la[arguments.length];if(ln===void 0)throw new Pt(`Tried to invoke ctor of ${ge} 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:ye}});ye.prototype=Ve;var Ye=new Ee(ge,ye,Ve,Ce,Et,te,se,le);Ye.$&&(Ye.$.sa===void 0&&(Ye.$.sa=[]),Ye.$.sa.push(Ye)),Et=new Ge(ge,Ye,!0,!1),Dt=new Ge(ge+"*",Ye,!1,!1);var Nt=new Ge(ge+" const*",Ye,!1,!0);return Dn[_]={pointerType:Dt,fb:Nt},qt(Me,ye),[Et,Dt,Nt]})},k:function(_,g,O,N,q,te,ue){var se=Mi(O,N);g=Fe(g),te=qe(q,te),Wt([],[_],function(de){function le(){Hn(`Cannot call ${ge} due to unbound types`,se)}de=de[0];var ge=`${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,ge),Se[g].aa[O-1]=le),Wt([],se,function(Ce){if(Ce=ki(ge,[Ce[0],null].concat(Ce.slice(1)),null,te,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,te,ue,se){g=Fe(g),te=qe(q,te),Wt([],[_],function(de){de=de[0];var le=`${de.name}.${g}`,ge={get(){Hn(`Cannot access ${le} due to unbound types`,[O])},enumerable:!0,configurable:!0};return ge.set=se?()=>{Hn(`Cannot access ${le} due to unbound types`,[O])}:()=>{xe(`${le} is a read-only property`)},Object.defineProperty(de.X.constructor,g,ge),Wt([],[O],function(Se){Se=Se[0];var Ce={get(){return Se.fromWireType(te(N))},enumerable:!0};return se&&(se=qe(ue,se),Ce.set=Me=>{var ye=[];se(N,Se.toWireType(ye,Me)),Kt(ye)}),Object.defineProperty(de.X.constructor,g,Ce),[]}),[]})},o:function(_,g,O,N,q,te){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,te),[]}),[]})},a:function(_,g,O,N,q,te,ue,se){var de=Mi(O,N);g=Fe(g),te=qe(q,te),Wt([],[_],function(le){function ge(){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?(ge.ma=O-2,ge.className=le.name,Ce[g]=ge):(_e(Ce,g,Se),Ce[g].aa[O-2]=ge),Wt([],de,function(ye){return ye=ki(Se,ye,le,te,ue),Ce[g].aa===void 0?(ye.ma=O-2,Ce[g]=ye):Ce[g].aa[O-2]=ye,[]}),[]})},d:function(_,g,O,N,q,te,ue,se,de,le){g=Fe(g),q=qe(N,q),Wt([],[_],function(ge){ge=ge[0];var Se=`${ge.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(ge.X.ga,g,Ce),Wt([],de?[O,ue]:[O],function(Me){var ye=Me[0],Et={get(){var Ve=yd(this,ge,Se+" getter");return ye.fromWireType(q(te,Ve))},enumerable:!0};if(de){de=qe(se,de);var Dt=Me[1];Et.set=function(Ve){var Ye=yd(this,ge,Se+" setter"),Nt=[];de(le,Ye,Dt.toWireType(Nt,Ve)),Kt(Nt)}}return Object.defineProperty(ge.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(te){return this.constructor.values[te]},toWireType:function(te,ue){return ue.value},argPackAdvance:8,readValueFromPointer:Ty(g,O,N),ea:null}),Re(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:Iy(g,O),ea:null})},q:function(_,g,O,N,q,te){var ue=Mi(g,O);_=Fe(_),q=qe(N,q),Re(_,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,te),g-1),[]})},j:function(_,g,O,N,q){g=Fe(g),q===-1&&(q=4294967295),q=rr(O);var te=se=>se;if(N===0){var ue=32-8*O;te=se=>se<<ue>>>ue}O=g.includes("unsigned")?function(se,de){return de>>>0}:function(se,de){return de},V(_,{name:g,fromWireType:te,toWireType:O,argPackAdvance:8,readValueFromPointer:Ry(g,q,N!==0),ea:null})},g:function(_,g,O){function N(te){te>>=2;var ue=H;return new q(ue.buffer,ue[te+1],ue[te])}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=H[N>>2],te=N+4;if(O)for(var ue=te,se=0;se<=q;++se){var de=te+se;if(se==q||j[de]==0){if(ue=ue?wd(j,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(j[te+se]);le=le.join("")}return Wn(N),le},toWireType:function(N,q){q instanceof ArrayBuffer&&(q=new Uint8Array(q));var te,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(te=se=0;te<q.length;++te){var de=q.charCodeAt(te);127>=de?se++:2047>=de?se+=2:55296<=de&&57343>=de?(se+=4,++te):se+=3}else se=q.length;if(te=se,se=Vs(4+te+1),de=se+4,H[se>>2]=te,O&&ue){if(ue=de,de=te+1,te=j,0<de){de=ue+de-1;for(var le=0;le<q.length;++le){var ge=q.charCodeAt(le);if(55296<=ge&&57343>=ge){var Se=q.charCodeAt(++le);ge=65536+((ge&1023)<<10)|Se&1023}if(127>=ge){if(ue>=de)break;te[ue++]=ge}else{if(2047>=ge){if(ue+1>=de)break;te[ue++]=192|ge>>6}else{if(65535>=ge){if(ue+2>=de)break;te[ue++]=224|ge>>12}else{if(ue+3>=de)break;te[ue++]=240|ge>>18,te[ue++]=128|ge>>12&63}te[ue++]=128|ge>>6&63}te[ue++]=128|ge&63}}te[ue]=0}}else if(ue)for(ue=0;ue<te;++ue)le=q.charCodeAt(ue),255<le&&(Wn(de),xe("String has UTF-16 code units that do not fit in 8 bits")),j[de+ue]=le;else for(ue=0;ue<te;++ue)j[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=Oy,q=Py,te=Ay,ue=()=>Y,se=1;else g===4&&(N=Dy,q=Ny,te=ky,ue=()=>H,se=2);V(_,{name:O,fromWireType:function(de){for(var le=H[de>>2],ge=ue(),Se,Ce=de+4,Me=0;Me<=le;++Me){var ye=de+4+Me*g;(Me==le||ge[ye>>se]==0)&&(Ce=N(Ce,ye-Ce),Se===void 0?Se=Ce:(Se+=String.fromCharCode(0),Se+=Ce),Ce=ye+g)}return Wn(de),Se},toWireType:function(de,le){typeof le!="string"&&xe(`Cannot pass non-string to C++ string type ${O}`);var ge=te(le),Se=Vs(4+ge+g);return H[Se>>2]=ge>>se,q(le,Se+4,ge+g),de!==null&&de.push(Wn,Se),Se},argPackAdvance:8,readValueFromPointer:Tn,ea:function(de){Wn(de)}})},N:function(_,g,O,N,q,te){Nn[_]={name:Fe(g),Ba:qe(O,N),ka:qe(q,te),Na:[]}},M:function(_,g,O,N,q,te,ue,se,de,le){Nn[_].Na.push({mb:Fe(g),sb:O,qb:qe(N,q),rb:te,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 H[O>>2]=q,g.toWireType(N,_)},w:function(_,g,O,N,q){_=Li[_],g=ct(g),O=ji(O);var te=[];return H[N>>2]=je(te),_(g,O,te,q)},i:function(_,g,O,N){_=Li[_],g=ct(g),O=ji(O),_(g,O,null,N)},f:Ms,h:function(_,g){var O=Ly(_,g),N=O[0];g=N.name+"_$"+O.slice(1).map(function(ue){return ue.name}).join("_")+"$";var q=xd[g];if(q!==void 0)return q;var te=Array(_-1);return q=jy((ue,se,de,le)=>{for(var ge=0,Se=0;Se<_-1;++Se)te[Se]=O[Se+1].readValueFromPointer(le+ge),ge+=O[Se+1].argPackAdvance;for(ue=ue[se].apply(ue,te),Se=0;Se<_-1;++Se)O[Se+1].hb&&O[Se+1].hb(te[Se]);if(!N.vb)return N.toWireType(de,ue)}),xd[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=j.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 te=1;break e}catch{}te=void 0}if(te)return!0}return!1},B:(_,g)=>{var O=0;return _d().forEach(function(N,q){var te=g+O;for(q=H[_+4*q>>2]=te,te=0;te<N.length;++te)P[q++>>0]=N.charCodeAt(te);P[q>>0]=0,O+=N.length+1}),0},C:(_,g)=>{var O=_d();H[_>>2]=O.length;var N=0;return O.forEach(function(q){N+=q.length+1}),H[g>>2]=N,0},D:()=>52,y:function(){return 70},E:(_,g,O,N)=>{for(var q=0,te=0;te<O;te++){var ue=H[g>>2],se=H[g+4>>2];g+=8;for(var de=0;de<se;de++){var le=j[ue+de],ge=Fy[_];le===0||le===10?((_===1?B:R)(wd(ge,0)),ge.length=0):ge.push(le)}q+=se}return H[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),ee--,h.monitorRunDependencies&&h.monitorRunDependencies(ee),ee==0&&Q){var N=Q;Q=null,N()}return O}var g={a:Vy};if(ee++,h.monitorRunDependencies&&h.monitorRunDependencies(ee),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 Cd(){return(Cd=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;Q=function _(){Vi||$d(),Vi||(Q=_)};function $d(){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();z.unshift(g)}De(z)}}if(!(0<ee)){if(h.preRun)for(typeof h.preRun=="function"&&(h.preRun=[h.preRun]);h.preRun.length;)U();De(Z),0<ee||(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 $d(),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,E=m.fit,C=m.alignment;if(!h||!T.length||!S||!v||!b||typeof window>"u")return null;var I=function(A){var F=A.currentTarget.getBoundingClientRect(),k=d(A),B=k.clientX,R=k.clientY;if(!(!B&&!R)){var w=B-F.left,p=R-F.top,$=v.computeAlignment(E,C,{minX:0,minY:0,maxX:F.width,maxY:F.height},b.bounds),P=new v.Mat2D;$.invert(P);var j=new v.Vec2D(w,p),W=v.mapXY(P,j),Y=W.x(),ne=W.y();switch(W.delete(),P.delete(),j.delete(),$.delete(),A.type){case"touchmove":case"mouseover":case"mouseout":case"mousemove":{for(var H=0,L=T;H<L.length;H++){var oe=L[H];oe.pointerMove(Y,ne)}break}case"touchstart":case"mousedown":{for(var G=0,K=T;G<K.length;G++){var oe=K[G];oe.pointerDown(Y,ne)}break}case"touchend":case"mouseup":{for(var Z=0,ce=T;Z<ce.length;Z++){var oe=ce[Z];oe.pointerUp(Y,ne)}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(w,p,$,P){function j(W){return W instanceof $?W:new $(function(Y){Y(W)})}return new($||($=Promise))(function(W,Y){function ne(oe){try{L(P.next(oe))}catch(G){Y(G)}}function H(oe){try{L(P.throw(oe))}catch(G){Y(G)}}function L(oe){oe.done?W(oe.value):j(oe.value).then(ne,H)}L((P=P.apply(w,p||[])).next())})},d=function(w,p){var $={label:0,sent:function(){if(W[0]&1)throw W[1];return W[1]},trys:[],ops:[]},P,j,W,Y;return Y={next:ne(0),throw:ne(1),return:ne(2)},typeof Symbol=="function"&&(Y[Symbol.iterator]=function(){return this}),Y;function ne(L){return function(oe){return H([L,oe])}}function H(L){if(P)throw new TypeError("Generator is already executing.");for(;Y&&(Y=0,L[0]&&($=0)),$;)try{if(P=1,j&&(W=L[0]&2?j.return:L[0]?j.throw||((W=j.return)&&W.call(j),0):j.next)&&!(W=W.call(j,L[1])).done)return W;switch(j=0,W&&(L=[L[0]&2,W.value]),L[0]){case 0:case 1:W=L;break;case 4:return $.label++,{value:L[1],done:!1};case 5:$.label++,j=L[1],L=[0];continue;case 7:L=$.ops.pop(),$.trys.pop();continue;default:if(W=$.trys,!(W=W.length>0&&W[W.length-1])&&(L[0]===6||L[0]===2)){$=0;continue}if(L[0]===3&&(!W||L[1]>W[0]&&L[1]<W[3])){$.label=L[1];break}if(L[0]===6&&$.label<W[1]){$.label=W[1],W=L;break}if(W&&$.label<W[2]){$.label=W[2],$.ops.push(L);break}W[2]&&$.ops.pop(),$.trys.pop();continue}L=p.call(w,$)}catch(oe){L=[6,oe],j=0}finally{P=W=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}},f;(function(w){w.Cover="cover",w.Contain="contain",w.Fill="fill",w.FitWidth="fitWidth",w.FitHeight="fitHeight",w.None="none",w.ScaleDown="scaleDown"})(f||(f={}));var m;(function(w){w.Center="center",w.TopLeft="topLeft",w.TopCenter="topCenter",w.TopRight="topRight",w.CenterLeft="centerLeft",w.CenterRight="centerRight",w.BottomLeft="bottomLeft",w.BottomCenter="bottomCenter",w.BottomRight="bottomRight"})(m||(m={}));var h=function(){function w(p){var $,P,j,W,Y,ne;this.fit=($=p==null?void 0:p.fit)!==null&&$!==void 0?$:f.Contain,this.alignment=(P=p==null?void 0:p.alignment)!==null&&P!==void 0?P:m.Center,this.minX=(j=p==null?void 0:p.minX)!==null&&j!==void 0?j:0,this.minY=(W=p==null?void 0:p.minY)!==null&&W!==void 0?W:0,this.maxX=(Y=p==null?void 0:p.maxX)!==null&&Y!==void 0?Y:0,this.maxY=(ne=p==null?void 0:p.maxY)!==null&&ne!==void 0?ne:0}return w.new=function(p){var $=p.fit,P=p.alignment,j=p.minX,W=p.minY,Y=p.maxX,ne=p.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new w({fit:$,alignment:P,minX:j,minY:W,maxX:Y,maxY:ne})},w.prototype.copyWith=function(p){var $=p.fit,P=p.alignment,j=p.minX,W=p.minY,Y=p.maxX,ne=p.maxY;return new w({fit:$??this.fit,alignment:P??this.alignment,minX:j??this.minX,minY:W??this.minY,maxX:Y??this.maxX,maxY:ne??this.maxY})},w.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=$,$},w.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=$,$},w}(),b=function(){function w(){}return w.loadRuntime=function(){a.default({locateFile:function(){return w.wasmURL}}).then(function(p){var $;for(w.runtime=p;w.callBackQueue.length>0;)($=w.callBackQueue.shift())===null||$===void 0||$(w.runtime)})},w.getInstance=function(p){w.isLoading||(w.isLoading=!0,w.loadRuntime()),w.runtime?p(w.runtime):w.callBackQueue.push(p)},w.awaitInstance=function(){return new Promise(function(p){return w.getInstance(function($){return p($)})})},w.setWasmUrl=function(p){w.wasmURL=p},w.isLoading=!1,w.callBackQueue=[],w.wasmURL="https://unpkg.com/".concat(s.name,"@").concat(s.version,"/rive.wasm"),w}(),y=function(){function w(p,$,P,j){this.animation=p,this.artboard=$,this.playing=j,this.loopCount=0,this.scrubTo=null,this.instance=new P.LinearAnimationInstance(p,$)}return Object.defineProperty(w.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"time",{get:function(){return this.instance.time},set:function(p){this.instance.time=p},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),w.prototype.advance=function(p){this.scrubTo===null?this.instance.advance(p):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},w.prototype.apply=function(p){this.instance.apply(p)},Object.defineProperty(w.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),w.prototype.cleanup=function(){this.instance.delete()},w}(),T;(function(w){w[w.Number=56]="Number",w[w.Trigger=58]="Trigger",w[w.Boolean=59]="Boolean"})(T||(T={}));var S=function(){function w(p,$){this.type=p,this.runtimeInput=$}return Object.defineProperty(w.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(p){this.runtimeInput.value=p},enumerable:!1,configurable:!0}),w.prototype.fire=function(){this.type===T.Trigger&&this.runtimeInput.fire()},w}(),v=function(){function w(p,$,P,j){this.stateMachine=p,this.playing=P,this.artboard=j,this.inputs=[],this.instance=new $.StateMachineInstance(p,j),this.initInputs($)}return Object.defineProperty(w.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"statesChanged",{get:function(){for(var p=[],$=0;$<this.instance.stateChangedCount();$++)p.push(this.instance.stateChangedNameByIndex($));return p},enumerable:!1,configurable:!0}),w.prototype.advance=function(p){this.instance.advance(p)},w.prototype.initInputs=function(p){for(var $=0;$<this.instance.inputCount();$++){var P=this.instance.input($);this.inputs.push(this.mapRuntimeInput(P,p))}},w.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())},w.prototype.cleanup=function(){this.instance.delete()},w}(),E=function(){function w(p,$,P,j,W){j===void 0&&(j=[]),W===void 0&&(W=[]),this.runtime=p,this.artboard=$,this.eventManager=P,this.animations=j,this.stateMachines=W}return w.prototype.add=function(p,$,P){if(P===void 0&&(P=!0),p=B(p),p.length===0)this.animations.forEach(function(Z){return Z.playing=$}),this.stateMachines.forEach(function(Z){return Z.playing=$});else for(var j=this.animations.map(function(Z){return Z.name}),W=this.stateMachines.map(function(Z){return Z.name}),Y=0;Y<p.length;Y++){var ne=j.indexOf(p[Y]),H=W.indexOf(p[Y]);if(ne>=0||H>=0)ne>=0?this.animations[ne].playing=$:this.stateMachines[H].playing=$;else{var L=this.artboard.animationByName(p[Y]);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[Y]);if(G){var K=new v(G,this.runtime,$,this.artboard);this.stateMachines.push(K)}}}}return P&&($?this.eventManager.fire({type:C.Play,data:this.playing}):this.eventManager.fire({type:C.Pause,data:this.paused})),$?this.playing:this.paused},w.prototype.play=function(p){return this.add(p,!0)},w.prototype.pause=function(p){return this.add(p,!1)},w.prototype.scrub=function(p,$){var P=this.animations.filter(function(j){return p.includes(j.name)});return P.forEach(function(j){return j.scrubTo=$}),P.map(function(j){return j.name})},Object.defineProperty(w.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(w.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}),w.prototype.stop=function(p){var $=this;p=B(p);var P=[];if(p.length===0)P=this.animations.map(function(Y){return Y.name}).concat(this.stateMachines.map(function(Y){return Y.name})),this.animations.forEach(function(Y){return Y.cleanup()}),this.stateMachines.forEach(function(Y){return Y.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var j=this.animations.filter(function(Y){return p.includes(Y.name)});j.forEach(function(Y){Y.cleanup(),$.animations.splice($.animations.indexOf(Y),1)});var W=this.stateMachines.filter(function(Y){return p.includes(Y.name)});W.forEach(function(Y){Y.cleanup(),$.stateMachines.splice($.stateMachines.indexOf(Y),1)}),P=j.map(function(Y){return Y.name}).concat(W.map(function(Y){return Y.name}))}return this.eventManager.fire({type:C.Stop,data:P}),P},Object.defineProperty(w.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(w.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),w.prototype.atLeastOne=function(p,$){$===void 0&&($=!0);var P;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([P=this.artboard.animationByIndex(0).name],p,$):this.artboard.stateMachineCount()>0&&this.add([P=this.artboard.stateMachineByIndex(0).name],p,$)),P},w.prototype.handleLooping=function(){for(var p=0,$=this.animations.filter(function(j){return j.playing});p<$.length;p++){var P=$[p];P.loopValue===0&&P.loopCount?(P.loopCount=0,this.stop(P.name)):P.loopValue===1&&P.loopCount?(this.eventManager.fire({type:C.Loop,data:{animation:P.name,type:I.Loop}}),P.loopCount=0):P.loopValue===2&&P.loopCount>1&&(this.eventManager.fire({type:C.Loop,data:{animation:P.name,type:I.PingPong}}),P.loopCount=0)}},w.prototype.handleStateChanges=function(){for(var p=[],$=0,P=this.stateMachines.filter(function(W){return W.playing});$<P.length;$++){var j=P[$];p.push.apply(p,j.statesChanged)}p.length>0&&this.eventManager.fire({type:C.StateChange,data:p})},w.prototype.handleAdvancing=function(p){this.eventManager.fire({type:C.Advance,data:p})},w}(),C;(function(w){w.Load="load",w.LoadError="loaderror",w.Play="play",w.Pause="pause",w.Stop="stop",w.Loop="loop",w.Draw="draw",w.Advance="advance",w.StateChange="statechange"})(C||(C={}));var I;(function(w){w.OneShot="oneshot",w.Loop="loop",w.PingPong="pingpong"})(I||(I={}));var D=function(){function w(p){p===void 0&&(p=[]),this.listeners=p}return w.prototype.getListeners=function(p){return this.listeners.filter(function($){return $.type===p})},w.prototype.add=function(p){this.listeners.includes(p)||this.listeners.push(p)},w.prototype.remove=function(p){for(var $=0;$<this.listeners.length;$++){var P=this.listeners[$];if(P.type===p.type&&P.callback===p.callback){this.listeners.splice($,1);break}}},w.prototype.removeAll=function(p){var $=this;p?this.listeners.filter(function(P){return P.type===p}).forEach(function(P){return $.remove(P)}):this.listeners.splice(0,this.listeners.length)},w.prototype.fire=function(p){var $=this.getListeners(p.type);$.forEach(function(P){return P.callback(p)})},w}(),A=function(){function w(p){this.eventManager=p,this.queue=[]}return w.prototype.add=function(p){this.queue.push(p)},w.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)}},w}(),F=function(){function w(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 A(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 w.new=function(p){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new w(p)},w.prototype.init=function(p){var $=this,P=p.src,j=p.buffer,W=p.animations,Y=p.stateMachines,ne=p.artboard,H=p.autoplay,L=H===void 0?!1:H,oe=p.useOffscreenRenderer,G=oe===void 0?!1:oe;if(this.src=P,this.buffer=j,!this.src&&!this.buffer)throw new Error(w.missingErrorMessage);var K=B(W),Z=B(Y);this.loaded=!1,this.readyForPlaying=!1,b.awaitInstance().then(function(ce){$.runtime=ce,$.renderer=$.runtime.makeRenderer($.canvas,G),$.canvas.width||$.canvas.height||$.resizeDrawingSurfaceToCanvas(),$.initData(ne,K,Z,L).then(function(){return $.setupRiveListeners()}).catch(function(z){console.error(z)})}).catch(function(ce){console.error(ce)})},w.prototype.setupRiveListeners=function(){var p=this;if(!this.shouldDisableRiveListeners){var $=(this.animator.stateMachines||[]).filter(function(P){return P.playing&&p.runtime.hasListeners(P.instance)}).map(function(P){return P.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)})}},w.prototype.initData=function(p,$,P,j){var W;return u(this,void 0,void 0,function(){var Y,ne,H;return d(this,function(L){switch(L.label){case 0:return this.src?(Y=this,[4,k(this.src)]):[3,2];case 1:Y.buffer=L.sent(),L.label=2;case 2:return ne=this,[4,this.runtime.load(new Uint8Array(this.buffer))];case 3:return ne.file=L.sent(),this.file?(this.initArtboard(p,$,P,j),this.loaded=!0,this.eventManager.fire({type:C.Load,data:(W=this.src)!==null&&W!==void 0?W:"buffer"}),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,Promise.resolve()]):(H="Problem loading file; may be corrupt!",console.warn(H),this.eventManager.fire({type:C.LoadError,data:H}),[2,Promise.reject(H)])}})})},w.prototype.initArtboard=function(p,$,P,j){var W=p?this.file.artboardByName(p):this.file.defaultArtboard();if(!W){var Y="Invalid artboard name or no default artboard";console.warn(Y),this.eventManager.fire({type:C.LoadError,data:Y});return}if(this.artboard=W,this.artboard.animationCount()<1){var Y="Artboard has no animations";throw this.eventManager.fire({type:C.LoadError,data:Y}),Y}this.animator=new E(this.runtime,this.artboard,this.eventManager);var ne;$.length>0||P.length>0?(ne=$.concat(P),this.animator.add(ne,j,!1)):ne=[this.animator.atLeastOne(j,!1)],this.taskQueue.add({event:{type:j?C.Play:C.Pause,data:ne}})},w.prototype.drawFrame=function(){this.startRendering()},w.prototype.draw=function(p,$){var P=performance.now();this.frameRequestId=null,this.lastRenderTime||(this.lastRenderTime=p),this.renderSecondTimer+=p-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,$==null||$());var j=(p-this.lastRenderTime)/1e3;this.lastRenderTime=p;for(var W=this.animator.animations.filter(function(z){return z.playing||z.needsScrub}).sort(function(z){return z.needsScrub?-1:1}),Y=0,ne=W;Y<ne.length;Y++){var H=ne[Y];H.advance(j),H.instance.didLoop&&(H.loopCount+=1),H.apply(1)}for(var L=this.animator.stateMachines.filter(function(z){return z.playing}),oe=0,G=L;oe<G.length;oe++){var K=G[oe];K.advance(j)}this.artboard.advance(j);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(j),this.frameCount++;var ce=performance.now();for(this.frameTimes.push(ce),this.durations.push(ce-P);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)},w.prototype.alignRenderer=function(){var p=this,$=p.renderer,P=p.runtime,j=p._layout,W=p.artboard;$.align(j.runtimeFit(P),j.runtimeAlignment(P),{minX:j.minX,minY:j.minY,maxX:j.maxX,maxY:j.maxY},W.bounds)},Object.defineProperty(w.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(w.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}),w.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},w.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},w.prototype.play=function(p,$){var P=this;if(p=B(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return P.play(p,$)}});return}this.animator.play(p),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},w.prototype.pause=function(p){var $=this;if(p=B(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.pause(p)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(p)},w.prototype.scrub=function(p,$){var P=this;if(p=B(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return P.scrub(p,$)}});return}this.animator.scrub(p,$||0),this.drawFrame()},w.prototype.stop=function(p){var $=this;if(p=B(p),!this.readyForPlaying){this.taskQueue.add({action:function(){return $.stop(p)}});return}this.animator.stop(p),this.eventCleanup&&this.eventCleanup()},w.prototype.reset=function(p){var $,P=p==null?void 0:p.artboard,j=B(p==null?void 0:p.animations),W=B(p==null?void 0:p.stateMachines),Y=($=p==null?void 0:p.autoplay)!==null&&$!==void 0?$:!1;this.cleanupInstances(),this.initArtboard(P,j,W,Y),this.taskQueue.process()},w.prototype.load=function(p){this.stop(),this.init(p)},Object.defineProperty(w.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}),w.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},w.prototype.resizeDrawingSurfaceToCanvas=function(){if(this.canvas instanceof HTMLCanvasElement&&window){var p=this.canvas.getBoundingClientRect(),$=p.width,P=p.height,j=window.devicePixelRatio||1;this.canvas.width=j*$,this.canvas.height=j*P,this.startRendering(),this.resizeToCanvas()}},Object.defineProperty(w.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(w.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(w.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}),w.prototype.stateMachineInputs=function(p){if(this.loaded){var $=this.animator.stateMachines.find(function(P){return P.name===p});return $==null?void 0:$.inputs}},Object.defineProperty(w.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(w.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(w.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(w.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(w.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),w.prototype.on=function(p,$){this.eventManager.add({type:p,callback:$})},w.prototype.off=function(p,$){this.eventManager.remove({type:p,callback:$})},w.prototype.unsubscribe=function(p,$){console.warn("This function is deprecated: please use `off()` instead."),this.off(p,$)},w.prototype.removeAllRiveEventListeners=function(p){this.eventManager.removeAll(p)},w.prototype.unsubscribeAll=function(p){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(p)},w.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},w.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)))},w.prototype.enableFPSCounter=function(p){this.runtime.enableFPSCounter(p)},w.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(w.prototype,"contents",{get:function(){if(this.loaded){for(var p={artboards:[]},$=0;$<this.file.artboardCount();$++){for(var P=this.file.artboardByIndex($),j={name:P.name,animations:[],stateMachines:[]},W=0;W<P.animationCount();W++){var Y=P.animationByIndex(W);j.animations.push(Y.name)}for(var ne=0;ne<P.stateMachineCount();ne++){for(var H=P.stateMachineByIndex(ne),L=H.name,oe=new this.runtime.StateMachineInstance(H,P),G=[],K=0;K<oe.inputCount();K++){var Z=oe.input(K);G.push({name:Z.name,type:Z.type})}j.stateMachines.push({name:L,inputs:G})}p.artboards.push(j)}return p}},enumerable:!1,configurable:!0}),w.missingErrorMessage="Rive source file or data buffer required",w}(),k=function(w){return u(void 0,void 0,void 0,function(){var p,$,P;return d(this,function(j){switch(j.label){case 0:return p=new Request(w),[4,fetch(p)];case 1:return $=j.sent(),[4,$.arrayBuffer()];case 2:return P=j.sent(),[2,P]}})})},B=function(w){return typeof w=="string"?[w]:w instanceof Array?w:[]},R={EventManager:D,TaskQueueManager:A}})(),i})())})(og);var KT=og.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=l,n=KT;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 E,C=1,I=arguments.length;C<I;C++)for(var D in E=arguments[C])Object.prototype.hasOwnProperty.call(E,D)&&(v[D]=E[D]);return v},i.apply(this,arguments)};function a(v,E){var C={};for(var I in v)Object.prototype.hasOwnProperty.call(v,I)&&E.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++)E.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,E){E===void 0&&(E=!0);var C=t.useState({width:0,height:0}),I=C[0],D=C[1];t.useEffect(function(){if(typeof window<"u"&&E){var R=function(){D({width:window.innerWidth,height:window.innerHeight})};return f&&(R(),window.addEventListener("resize",R)),function(){return window.removeEventListener("resize",R)}}},[]);var A,F,k,B=t.useRef(new u((A=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,w=[],p=0;p<arguments.length;p++)w[p]=arguments[p];clearTimeout(k),k=window.setTimeout(function(){return A.apply(R,w)},F)})));return t.useEffect(function(){var R=B.current;if(E){var w=v.current;return v.current&&d&&R.observe(v.current),function(){R.disconnect(),w&&d&&R.unobserve(w)}}R.disconnect()},[v,B]),I}var h={useDevicePixelRatio:!0,fitCanvasToArtboardHeight:!1,useOffscreenRenderer:!0,shouldResizeCanvasToContainer:!0};function b(v){return Object.assign({},h,v)}function y(v){var E=v.riveLoaded,C=E!==void 0&&E,I=v.canvasRef,D=v.containerRef,A=v.options,F=A===void 0?{}:A,k=v.onCanvasHasResized,B=v.artboardBounds,R=b(F),w=t.useState({height:0,width:0}),p=w[0],$=p.height,P=p.width,j=w[1],W=t.useState({height:0,width:0}),Y=W[0],ne=Y.height,H=Y.width,L=W[1],oe=t.useState(!0),G=oe[0],K=oe[1],Z=R.fitCanvasToArtboardHeight,ce=R.shouldResizeCanvasToContainer,z=R.useDevicePixelRatio,U=m(D,ce),ee=function(){var Te=s(),Pe=t.useState(Te),Ne=Pe[0],Oe=Pe[1];return t.useEffect(function(){if(typeof window<"u"&&"matchMedia"in window){var We=function(){var ot=s();Oe(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}(),Q=B??{},ie=Q.maxX,re=Q.maxY,me=t.useCallback(function(){var Te,Pe,Ne,Oe,We=(Pe=(Te=D.current)===null||Te===void 0?void 0:Te.clientWidth)!==null&&Pe!==void 0?Pe:0,De=(Oe=(Ne=D.current)===null||Ne===void 0?void 0:Ne.clientHeight)!==null&&Oe!==void 0?Oe:0;return Z&&B?{width:We,height:We*(B.maxY/B.maxX)}:{width:We,height:De}},[D,Z,ie,re]);t.useEffect(function(){if(ce&&D.current&&C){var Te=me(),Pe=Te.width,Ne=Te.height,Oe=!1;if(I.current){var We=Pe!==P||Ne!==$;if(R.fitCanvasToArtboardHeight&&We&&(D.current.style.height=Ne+"px",Oe=!0),R.useDevicePixelRatio){if(We||Pe*ee!==H||Ne*ee!==ne){var De=ee*Pe,ot=ee*Ne;I.current.width=De,I.current.height=ot,I.current.style.width=Pe+"px",I.current.style.height=Ne+"px",L({width:De,height:ot}),Oe=!0}}else We&&(I.current.width=Pe,I.current.height=Ne,L({width:Pe,height:Ne}),Oe=!0);j({width:Pe,height:Ne})}k&&(G||Oe)&&k&&k(),G&&K(!1)}},[I,D,U,ee,me,G,K,ne,H,$,P,k,ce,Z,z,C])}function T(v){var E=v.setContainerRef,C=v.setCanvasRef,I=v.className,D=I===void 0?"":I,A=v.style,F=v.children,k=a(v,["setContainerRef","setCanvasRef","className","style","children"]),B=i({width:"100%",height:"100%"},A);return o.default.createElement("div",i({ref:E,className:D},!D&&{style:B}),o.default.createElement("canvas",i({ref:C,style:{verticalAlign:"top",width:0,height:0}},k),F))}function S(v,E){E===void 0&&(E={});var C=t.useRef(null),I=t.useRef(null),D=t.useState(null),A=D[0],F=D[1],k=!!v,B=b(E),R=t.useCallback(function(){A&&(A.startRendering(),A.resizeToCanvas())},[A]);y({riveLoaded:!!A,canvasRef:C,containerRef:I,options:B,onCanvasHasResized:R,artboardBounds:A==null?void 0:A.bounds});var w=t.useCallback(function(j){if(j&&v&&k){var W=B.useOffscreenRenderer,Y=new n.Rive(i(i({useOffscreenRenderer:W},v),{canvas:j}));Y.on(n.EventType.Load,function(){C.current?F(Y):Y.cleanup()})}else j===null&&C.current&&(C.current.height=0,C.current.width=0);C.current=j},[k]),p=t.useCallback(function(j){I.current=j},[]);t.useEffect(function(){var j=new IntersectionObserver(function(W){W[0].isIntersecting?A&&A.startRendering():A&&A.stopRendering()});return C.current&&j.observe(C.current),function(){j.disconnect()}},[A]),t.useEffect(function(){return function(){A&&(A.cleanup(),F(null))}},[A]);var $=v==null?void 0:v.animations;t.useEffect(function(){A&&$&&(A.isPlaying?(A.stop(A.animationNames),A.play($)):A.isPaused&&(A.stop(A.animationNames),A.pause($)))},[$,A]);var P=t.useCallback(function(j){return o.default.createElement(T,i({setContainerRef:p,setCanvasRef:w},j))},[w,p]);return{canvas:C.current,container:I.current,setCanvasRef:w,setContainerRef:p,rive:A,RiveComponent:P}}e.default=function(v){var E=v.src,C=v.artboard,I=v.animations,D=v.stateMachines,A=v.layout,F=v.useOffscreenRenderer,k=F===void 0||F,B=v.shouldDisableRiveListeners,R=B!==void 0&&B,w=v.shouldResizeCanvasToContainer,p=w===void 0||w,$=v.children,P=a(v,["src","artboard","animations","stateMachines","layout","useOffscreenRenderer","shouldDisableRiveListeners","shouldResizeCanvasToContainer","children"]),j=S({src:E,artboard:C,animations:I,layout:A,stateMachines:D,autoplay:!0,shouldDisableRiveListeners:R},{useOffscreenRenderer:k,shouldResizeCanvasToContainer:p}).RiveComponent;return o.default.createElement(j,i({},P),$)},e.useResizeCanvas=y,e.useRive=S,e.useStateMachineInput=function(v,E,C,I){var D=t.useState(null),A=D[0],F=D[1];return t.useEffect(function(){function k(){if(v&&E&&C||F(null),v&&E&&C){var B=v.stateMachineInputs(E);if(B){var R=B.find(function(w){return w.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]),A},Object.keys(n).forEach(function(v){v==="default"||e.hasOwnProperty(v)||Object.defineProperty(e,v,{enumerable:!0,get:function(){return n[v]}})})})(rg);const qT=gp(rg),wl=({src:e="https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:t,height:n,style:r,...o})=>M.jsx(et,{width:t,height:n,style:r,children:M.jsx(qT,{src:e,...o})});wl.defaultProps={src:"https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:"300px",height:"300px",style:{}};const ig=({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?M.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:M.jsx(et,{"data-test-id":s["data-testid-loader"],position:"absolute",left:"50%",top:"50%",width:n,height:r,children:M.jsx(wl,{src:i,width:n,height:r,style:{transform:"translate(-50%, -50%)"}})})}):null);ig.defaultProps={onClose:()=>{},className:"",src:void 0,noScroll:"noscroll","data-testid-backdrop":"full-loader-backdrop","data-testid-loader":"full-loader-loader"};var XT=dt({defaultClassName:"_1a8lrjn1 j1jih79l j1jih7ak",variantClassNames:{color:{primary:"_1a8lrjn2",white:"_1a8lrjn3"},size:{small:"_1a8lrjn4",medium:"_1a8lrjn5",large:"_1a8lrjn6"}},defaultVariants:{color:"primary",size:"medium"},compoundVariants:[]});const GT=({color:e,size:t,...n})=>M.jsx(et,{...n,className:Ie(XT({color:e,size:t}))});function ZT(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 M.jsx(e,{...this.props,getValue:this.getValue,onValueChange:this.onValueChange,onScrollChange:this.props.onScrollChange&&this.onScrollChange})}}}var QT="_1ypj0tt5",JT="_1ypj0tt4",eI="_1ypj0tt3",Hh="_1ypj0tt1",tI="_1ypj0tt0",nI="_1ypj0tt2";const rI=({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 M.jsx(et,{className:Ie(QT,e),children:a})},ag=ZT(rI),oI=e=>null;function iI(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 M.jsx(e,{...this.props,doScrollingComplete:this.doScrollingComplete,computeChildIndex:n,select:this.select})}},t.Item=oI,t}const aI=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,B=0,R=0,w=!1,p=!1;const $=(L,oe)=>{L.transform=oe},P=(L,oe)=>{L.transition=oe},j=(L,oe,G=.3)=>{var K,Z;k!==oe&&(k=oe,P((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(()=>{A(),f.current&&P(f.current.style,"")},+G*1e3))},W=((L=30,oe=100)=>{let G=0,K=0,Z=0;const ce={record:z=>{const U=+new Date;Z=(z-K)/(U-G),U-G>=L&&(Z=U-G<=oe?Z:0,K=z,G=U)},getVelocity:z=>(z!==K&&ce.record(z),Z)};return ce})(),Y=()=>{p=!1;let L=k;const oe=(t.length-1)*h.current;let G=.3;const K=W.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),j(0,L,G<.3?.3:G),D()},ne=L=>{w||(p=!0,R=L,B=k)},H=L=>{var oe;w||!p||(k=B-L+R,W.record(k),D(),$((oe=f.current)==null?void 0:oe.style,`translate3d(0,${-k}px,0)`))};return{touchstart:L=>ne(L.touches[0].pageY),mousedown:L=>ne(L.pageY),touchmove:L=>{L.preventDefault(),H(L.touches[0].pageY)},mousemove:L=>{L.preventDefault(),H(L.pageY)},touchend:()=>Y(),touchcancel:()=>Y(),mouseup:()=>Y(),getValue:()=>k,scrollTo:j,setDisabled:(L=!1)=>{w=L}}})(),E=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 B=l.Children.toArray(t),R=s(k,h.current,B.length);if(b.current!==R){b.current=R;const w=B[R];w&&e.onScrollChange?e.onScrollChange(w.props.value):!B&&console.warn&&console.warn("child not found",t,R)}}},A=()=>{const k=v.getValue();k>=0&&i(k,h.current,I)},F=()=>{const k=`${Hh} ${nI}`,B=w=>{const{className:p="",style:$,value:P}=w.props,j=T===P;return M.jsx("div",{style:{...$},"data-selected":j?"true":void 0,className:`${j?k:Hh} ${p}`,children:w.props.children},P)};return l.Children?l.Children.map(t,B):[].concat(t).map(B)};return l.useEffect(()=>{var w,p,$;const k=((w=d.current)==null?void 0:w.getBoundingClientRect().height)??0,B=((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/B);return R%2===0&&(R-=1),R-=1,R/=2,f.current.style.padding=`${B*R}px 0`,m.current.style.top=`${B*R}px`,v.setDisabled(c),o(T,h.current,E),Object.keys(v).forEach(P=>{var j;if(P.indexOf("touch")===0||P.indexOf("mouse")===0){const W=P.indexOf("move")>=0?{passive:!1}:{passive:!0};(j=d.current)==null||j.addEventListener(P,v[P],W)}}),()=>{Object.keys(v).forEach(P=>{var j;(P.indexOf("touch")===0||P.indexOf("mouse")===0)&&((j=d.current)==null||j.removeEventListener(P,v[P]))})}},[c,v,E,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]),M.jsxs("div",{className:Ie(tI,u),ref:d,children:[M.jsx("div",{className:Ie(eI,u),ref:m}),M.jsx("div",{className:JT,ref:f,children:F()})]})},au=iI(aI);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,sI={am:"AM",pm:"PM"},sg=e=>new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),pc=e=>e<10?`0${e}`:`${e}`,Sr=e=>new Date(+e),cI=(e,t)=>{e.setDate(Math.min(e.getDate(),sg(new Date(e.getFullYear(),t)))),e.setMonth(t)},Wh=(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)},zh=(e,t)=>{t===0?e.setTime(+e-qa/2):e.setTime(+e+qa/2)},Uh=(e,t)=>(t&&(e===0&&(e=12),e>12&&(e-=12)),e),uI=e=>["January","February","March","April","May","June","July","August","September","October","November","December"][e],lI=e=>{const{date:t,defaultDate:n=new Date(2e3,0,1),locale:r=sI,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=()=>w().getFullYear(),E=()=>p().getFullYear(),C=()=>w().getMonth(),I=()=>p().getMonth(),D=()=>w().getDate(),A=()=>p().getDate(),F=()=>w().getHours(),k=()=>p().getHours(),B=()=>w().getMinutes(),R=()=>p().getMinutes(),w=()=>u||y.current,p=()=>d||T.current,$=G=>{const K=w(),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(),z=Z.getMinutes(),U=K.getHours(),ee=K.getMinutes(),Q=G.getHours(),ie=G.getMinutes();if(Q<U||Q===U&&ie<ee)return Sr(K);if(Q>ce||Q===ce&&ie>z)return Sr(Z)}return G},P=(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:cI(ce,Z);break;case 2:ce.setFullYear(Z);break;case 3:Wh(ce,Z);break;case 4:ce.setMinutes(Z);break;case 5:zh(ce,Z);break}else if(o===Mt.TIME)switch(K){case 0:Wh(ce,Z);break;case 1:ce.setMinutes(Z);break;case 2:zh(ce,Z);break}return $(ce)},j=(G,K)=>{const Z=P(G,K);"date"in e||b(Z),e.onDateChange&&e.onDateChange(Z),e.onValueChange&&e.onValueChange(G,K)},W=(G,K)=>{if(e.onScrollChange){const Z=P(G,K);e.onScrollChange(Z,G,K)}},Y=()=>{const G=S(),K=G.getFullYear(),Z=G.getMonth(),ce=v(),z=E(),U=C(),ee=I(),Q=D(),ie=A(),re=[];for(let ze=ce;ze<=z;ze+=1)re.push({value:`${ze}`,label:`${ze}`});const me={key:"year",props:{children:re}};if(o===Mt.YEAR)return[me];const Te=[];let Pe=0,Ne=11;ce===K&&(Pe=U),z===K&&(Ne=ee);for(let ze=Pe;ze<=Ne;ze+=1){const xt=m?m(ze,G):uI(ze);Te.push({value:`${ze}`,label:xt})}const Oe={key:"month",props:{children:Te}};if(o===Mt.MONTH)return[Oe,me];const We=[];let De=1,ot=sg(G);ce===K&&U===Z&&(De=Q),z===K&&ee===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}},Oe,me]},ne=G=>{let{minHour:K=0,maxHour:Z=23,minMinute:ce=0,maxMinute:z=59}=e;const U=B(),ee=R(),Q=F(),ie=k(),re=G.getHours();if(o===Mt.DATE_TIME){const Oe=G.getFullYear(),We=G.getMonth(),De=G.getDate(),ot=v(),ze=E(),xt=C(),Xe=I(),Pt=D(),xe=A();ot===Oe&&xt===We&&Pt===De&&(K=Q,Q===re&&(ce=U)),ze===Oe&&Xe===We&&xe===De&&(Z=ie,ie===re&&(z=ee))}else K=Q,Q===re&&(ce=U),Z=ie,ie===re&&(z=ee);const me=[];K===0&&Z===0||K!==0&&Z!==0?K=Uh(K):K===0&&c&&(K=1,me.push({value:"0",label:"12"})),Z=Uh(Z);for(let Oe=K;Oe<=Z;Oe+=1)me.push({value:`${Oe}`,label:pc(Oe)});const Te=[],Pe=G.getMinutes();for(let Oe=ce;Oe<=z;Oe+=s)Te.push({value:`${Oe}`,label:pc(Oe)}),Pe>Oe&&Pe<Oe+s&&Te.push({value:`${Pe}`,label:pc(Pe)});return{cols:[{key:"hours",props:{children:me}},{key:"minutes",props:{children:Te}}].concat(c?[{key:"ampm",props:{children:[{value:"0",label:r.am},{value:"1",label:r.pm}]}}]:[]),selMinute:Pe}},H=()=>{const G=S();let K=[],Z=[];if(o===Mt.YEAR)return{cols:Y(),value:[`${G.getFullYear()}`]};if(o===Mt.MONTH)return{cols:Y(),value:[`${G.getMonth()}`,`${G.getFullYear()}`]};if((o===Mt.DATE_TIME||o===Mt.DATE)&&(K=Y(),Z=[`${G.getDate()}`,`${G.getMonth()}`,`${G.getFullYear()}`]),o===Mt.DATE_TIME||o===Mt.TIME){const ce=ne(G);K=K.concat(ce.cols);const z=G.getHours();let U=[`${z}`,`${ce.selMinute}`],ee=z;c&&(ee=z>12?z-12:z,U=[`${ee}`,`${ce.selMinute}`,`${z>=12?1:0}`]),Z=Z.concat(U)}return{value:Z,cols:K}},{value:L,cols:oe}=H();return M.jsx(ag,{className:a,selectedValue:L,onValueChange:j,onScrollChange:W,children:oe.map(G=>M.jsx(au,{disabled:i,className:`picker-item-${G.key}`,children:G.props.children.map(K=>M.jsx(au.Item,{value:K.value,children:K.label},K.value))},G.key))})};var su={exports:{}},yt={};/** @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 Yh;function
|
|
167
|
+
*/var Yh;function dI(){if(Yh)return yt;Yh=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 E=i,C=e,I=s,D=n,A=f,F=d,k=t,B=o,R=r,w=c;return yt.ContextConsumer=a,yt.ContextProvider=E,yt.Element=C,yt.ForwardRef=I,yt.Fragment=D,yt.Lazy=A,yt.Memo=F,yt.Portal=k,yt.Profiler=B,yt.StrictMode=R,yt.Suspense=w,yt.isAsyncMode=function(){return!1},yt.isConcurrentMode=function(){return!1},yt.isContextConsumer=function(p){return v(p)===a},yt.isContextProvider=function(p){return v(p)===i},yt.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},yt.isForwardRef=function(p){return v(p)===s},yt.isFragment=function(p){return v(p)===n},yt.isLazy=function(p){return v(p)===f},yt.isMemo=function(p){return v(p)===d},yt.isPortal=function(p){return v(p)===t},yt.isProfiler=function(p){return v(p)===o},yt.isStrictMode=function(p){return v(p)===r},yt.isSuspense=function(p){return v(p)===c},yt.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)},yt.typeOf=v,yt}var bt={};/** @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 Kh;function dI(){return Kh||(Kh=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 E(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 re=ie.$$typeof;switch(re){case e:var me=ie.type;switch(me){case n:case o:case r:case c:case u:return me;default:var Te=me&&me.$$typeof;switch(Te){case a:case s:case f:case d:case i:return Te;default:return re}}case t:return re}}}var I=a,D=i,A=e,F=s,k=n,B=f,R=d,w=t,p=o,$=r,P=c,j=!1,W=!1;function Y(ie){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ne(ie){return W||(W=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(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 z(ie){return C(ie)===t}function U(ie){return C(ie)===o}function ee(ie){return C(ie)===r}function Q(ie){return C(ie)===c}bt.ContextConsumer=I,bt.ContextProvider=D,bt.Element=A,bt.ForwardRef=F,bt.Fragment=k,bt.Lazy=B,bt.Memo=R,bt.Portal=w,bt.Profiler=p,bt.StrictMode=$,bt.Suspense=P,bt.isAsyncMode=Y,bt.isConcurrentMode=ne,bt.isContextConsumer=H,bt.isContextProvider=L,bt.isElement=oe,bt.isForwardRef=G,bt.isFragment=K,bt.isLazy=Z,bt.isMemo=ce,bt.isPortal=z,bt.isProfiler=U,bt.isStrictMode=ee,bt.isSuspense=Q,bt.isValidElementType=E,bt.typeOf=C}()),bt}process.env.NODE_ENV==="production"?su.exports=lI():su.exports=dI();var qh=su.exports;let Xh=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Gh=(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 Gh(n.overflowY,t)||Gh(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,fI=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var hI=(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(!Xh(e))throw new TypeError("Invalid target");let b=document.scrollingElement||document.documentElement,y=[],T=e;for(;Xh(T)&&h(T);){if(T=fI(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,E=(a=window.scrollX)!=null?a:pageXOffset,C=(s=window.scrollY)!=null?s:pageYOffset,{height:I,width:D,top:A,right:F,bottom:k,left:B}=e.getBoundingClientRect(),R=u==="start"||u==="nearest"?A:u==="end"?k:A+I/2,w=d==="center"?B+D/2:d==="end"?F:B,p=[];for(let $=0;$<y.length;$++){let P=y[$],{height:j,width:W,top:Y,right:ne,bottom:H,left:L}=P.getBoundingClientRect();if(c==="if-needed"&&A>=0&&B>=0&&k<=v&&F<=S&&A>=Y&&k<=H&&B>=L&&F<=ne)return p;let oe=getComputedStyle(P),G=parseInt(oe.borderLeftWidth,10),K=parseInt(oe.borderTopWidth,10),Z=parseInt(oe.borderRightWidth,10),ce=parseInt(oe.borderBottomWidth,10),z=0,U=0,ee="offsetWidth"in P?P.offsetWidth-P.clientWidth-G-Z:0,Q="offsetHeight"in P?P.offsetHeight-P.clientHeight-K-ce:0,ie="offsetWidth"in P?P.offsetWidth===0?0:W/P.offsetWidth:0,re="offsetHeight"in P?P.offsetHeight===0?0:j/P.offsetHeight:0;if(b===P)z=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,U=d==="start"?w:d==="center"?w-S/2:d==="end"?w-S:ua(E,E+S,S,G,Z,E+w,E+w+D,D),z=Math.max(0,z+C),U=Math.max(0,U+E);else{z=u==="start"?R-Y-K:u==="end"?R-H+ce+Q:u==="nearest"?ua(Y,H,j,K,ce+Q,R,R+I,I):R-(Y+j/2)+Q/2,U=d==="start"?w-L-G:d==="center"?w-(L+W/2)+ee/2:d==="end"?w-ne+Z+ee:ua(L,ne,W,G,Z+ee,w,w+D,D);let{scrollLeft:me,scrollTop:Te}=P;z=Math.max(0,Math.min(Te+z/re,P.scrollHeight-j/re+Q)),U=Math.max(0,Math.min(me+U/ie,P.scrollWidth-W/ie+ee)),R+=Te-z,w+=me-U}p.push({el:P,top:z,left:U})}return p},pI=0;function Zh(e){return typeof e=="function"?e:dn}function dn(){}function cg(e,t){if(e){var n=hI(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 Qh(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function El(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 Rt(){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 ug(){return String(pI++)}function lg(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 Jh(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function dg(e){return typeof e.type=="string"}function fg(e){return e.props}function vI(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var mI=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function la(e){e===void 0&&(e={});var t={};return mI.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 gI(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&&(Qh(o,e,n)||r&&Qh(o,n.document.activeElement,n))})}var xl=dn;process.env.NODE_ENV!=="production"&&(xl=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 yI=El(function(e){hg(e).textContent=""},500);function _l(e,t){var n=hg(t);e&&(n.textContent=e,yI(t))}function hg(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 pg=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,vg=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,mg=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,gg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,yg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,bg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,wg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,Eg=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,xg=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,_g=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,Sg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,cu=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,Cg=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,$g=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,Tg=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,bI=Object.freeze({__proto__:null,unknown:pg,mouseUp:vg,itemMouseEnter:mg,keyDownArrowUp:_a,keyDownArrowDown:Sa,keyDownEscape:gg,keyDownEnter:yg,keyDownHome:bg,keyDownEnd:wg,clickItem:Eg,blurInput:xg,changeInput:_g,keyDownSpaceButton:Sg,clickButton:cu,blurButton:Cg,controlledPropUpdatedSelectedItem:$g,touchEnd:Tg}),wI=["refKey","ref"],EI=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],xI=["onKeyDown","onBlur","onChange","onInput","onChangeText"],_I=["refKey","ref"],SI=["onMouseMove","onMouseDown","onClick","onPress","index","item"],CI=function(){var e=function(t){Du(n,t);function n(o){var i;i=t.call(this,o)||this,i.id=i.props.id||"downshift-"+ug(),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,E){var C=setTimeout(function(){i.timeoutIds=i.timeoutIds.filter(function(I){return I!==C}),v()},E);i.timeoutIds.push(C)},i.setItemCount=function(v){i.itemCount=v},i.unsetItemCount=function(){i.itemCount=null},i.setHighlightedIndex=function(v,E){v===void 0&&(v=i.props.defaultHighlightedIndex),E===void 0&&(E={}),E=la(E),i.internalSetState(ae({highlightedIndex:v},E))},i.clearSelection=function(v){i.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:i.props.defaultHighlightedIndex,isOpen:i.props.defaultIsOpen},v)},i.selectItem=function(v,E,C){E=la(E),i.internalSetState(ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,selectedItem:v,inputValue:i.props.itemToString(v)},E),C)},i.selectItemAtIndex=function(v,E,C){var I=i.items[v];I!=null&&i.selectItem(I,E,C)},i.selectHighlightedItem=function(v,E){return i.selectItemAtIndex(i.getState().highlightedIndex,v,E)},i.internalSetState=function(v,E){var C,I,D={},A=typeof v=="function";return!A&&v.hasOwnProperty("inputValue")&&i.props.onInputValueChange(v.inputValue,ae({},i.getStateAndHelpers(),v)),i.setState(function(F){F=i.getState(F);var k=A?v(F):v;k=i.props.stateReducer(F,k),C=k.hasOwnProperty("selectedItem");var B={};return C&&k.selectedItem!==F.selectedItem&&(I=k.selectedItem),k.type=k.type||pg,Object.keys(k).forEach(function(R){F[R]!==k[R]&&(D[R]=k[R]),R!=="type"&&(k[R],Xa(i.props,R)||(B[R]=k[R]))}),A&&k.hasOwnProperty("inputValue")&&i.props.onInputValueChange(k.inputValue,ae({},i.getStateAndHelpers(),k)),B},function(){Zh(E)();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,E){var C,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=an(I,wI),B=E===void 0?{}:E,R=B.suppressRefError,w=R===void 0?!1:R;i.getRootProps.called=!0,i.getRootProps.refKey=A,i.getRootProps.suppressRefError=w;var p=i.getState(),$=p.isOpen;return ae((C={},C[A]=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(E){var C=this;if(E.preventDefault(),this.getState().isOpen){var I=E.shiftKey?5:1;this.moveHighlightedIndex(I,{type:Sa})}else this.internalSetState({isOpen:!0,type:Sa},function(){var D=C.getItemCount();if(D>0){var A=C.getState(),F=A.highlightedIndex,k=Or(1,F,D,function(B){return C.getItemNodeFromIndex(B)});C.setHighlightedIndex(k,{type:Sa})}})},ArrowUp:function(E){var C=this;if(E.preventDefault(),this.getState().isOpen){var I=E.shiftKey?-5:-1;this.moveHighlightedIndex(I,{type:_a})}else this.internalSetState({isOpen:!0,type:_a},function(){var D=C.getItemCount();if(D>0){var A=C.getState(),F=A.highlightedIndex,k=Or(-1,F,D,function(B){return C.getItemNodeFromIndex(B)});C.setHighlightedIndex(k,{type:_a})}})},Enter:function(E){if(E.which!==229){var C=this.getState(),I=C.isOpen,D=C.highlightedIndex;if(I&&D!=null){E.preventDefault();var A=this.items[D],F=this.getItemNodeFromIndex(D);if(A==null||F&&F.hasAttribute("disabled"))return;this.selectHighlightedItem({type:yg})}}},Escape:function(E){E.preventDefault(),this.reset(ae({type:gg},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},i.buttonKeyDownHandlers=ae({},i.keyDownHandlers,{" ":function(E){E.preventDefault(),this.toggleMenu({type:Sg})}}),i.inputKeyDownHandlers=ae({},i.keyDownHandlers,{Home:function(E){var C=this,I=this.getState(),D=I.isOpen;if(D){E.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Fr(1,0,A,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:bg})}}},End:function(E){var C=this,I=this.getState(),D=I.isOpen;if(D){E.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Fr(-1,A-1,A,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:wg})}}}}),i.getToggleButtonProps=function(v){var E=v===void 0?{}:v,C=E.onClick;E.onPress;var I=E.onKeyDown,D=E.onKeyUp,A=E.onBlur,F=an(E,EI),k=i.getState(),B=k.isOpen,R={onClick:Rt(C,i.buttonHandleClick),onKeyDown:Rt(I,i.buttonHandleKeyDown),onKeyUp:Rt(D,i.buttonHandleKeyUp),onBlur:Rt(A,i.buttonHandleBlur)},w=F.disabled?{}:R;return ae({type:"button",role:"button","aria-label":B?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},w,F)},i.buttonHandleKeyUp=function(v){v.preventDefault()},i.buttonHandleKeyDown=function(v){var E=Si(v);i.buttonKeyDownHandlers[E]&&i.buttonKeyDownHandlers[E].call(If(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:cu}):i.internalSetTimeout(function(){return i.toggleMenu({type:cu})})},i.buttonHandleBlur=function(v){var E=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!==E&&i.reset({type:Cg})})},i.getLabelProps=function(v){return ae({htmlFor:i.inputId,id:i.labelId},v)},i.getInputProps=function(v){var E=v===void 0?{}:v,C=E.onKeyDown,I=E.onBlur,D=E.onChange,A=E.onInput;E.onChangeText;var F=an(E,xI),k,B={};k="onChange";var R=i.getState(),w=R.inputValue,p=R.isOpen,$=R.highlightedIndex;if(!F.disabled){var P;B=(P={},P[k]=Rt(D,A,i.inputHandleChange),P.onKeyDown=Rt(C,i.inputHandleKeyDown),P.onBlur=Rt(I,i.inputHandleBlur),P)}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:w,id:i.inputId},B,F)},i.inputHandleKeyDown=function(v){var E=Si(v);E&&i.inputKeyDownHandlers[E]&&i.inputKeyDownHandlers[E].call(If(i),v)},i.inputHandleChange=function(v){i.internalSetState({type:_g,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:xg})})},i.menuRef=function(v){i._menuNode=v},i.getMenuProps=function(v,E){var C,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=an(I,_I),B=E===void 0?{}:E,R=B.suppressRefError,w=R===void 0?!1:R;return i.getMenuProps.called=!0,i.getMenuProps.refKey=A,i.getMenuProps.suppressRefError=w,ae((C={},C[A]=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 E,C=v===void 0?{}:v,I=C.onMouseMove,D=C.onMouseDown,A=C.onClick;C.onPress;var F=C.index,k=C.item,B=k===void 0?process.env.NODE_ENV==="production"?void 0:vI("getItemProps","item"):k,R=an(C,SI);F===void 0?(i.items.push(B),F=i.items.indexOf(B)):i.items[F]=B;var w="onClick",p=A,$=(E={onMouseMove:Rt(I,function(){F!==i.getState().highlightedIndex&&(i.setHighlightedIndex(F,{type:mg}),i.avoidScrolling=!0,i.internalSetTimeout(function(){return i.avoidScrolling=!1},250))}),onMouseDown:Rt(D,function(j){j.preventDefault()})},E[w]=Rt(p,function(){i.selectItemAtIndex(F,{type:Eg})}),E),P=R.disabled?{onMouseDown:$.onMouseDown}:$;return ae({id:i.getItemId(F),role:"option","aria-selected":i.getState().highlightedIndex===F},P,R)},i.clearItems=function(){i.items=[]},i.reset=function(v,E){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)},E)},i.toggleMenu=function(v,E){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),Zh(E)()})},i.openMenu=function(v){i.internalSetState({isOpen:!0},v)},i.closeMenu=function(v){i.internalSetState({isOpen:!1},v)},i.updateStatus=El(function(){var v=i.getState(),E=i.items[v.highlightedIndex],C=i.getItemCount(),I=i.props.getA11yStatusMessage(ae({itemToString:i.props.itemToString,previousResultCount:i.previousResultCount,resultCount:C,highlightedItem:E},v));i.previousResultCount=C,_l(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,E=this.closeMenu,C=this.toggleMenu,I=this.selectItem,D=this.selectItemAtIndex,A=this.selectHighlightedItem,F=this.setHighlightedIndex,k=this.clearSelection,B=this.clearItems,R=this.reset,w=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:E,toggleMenu:C,selectItem:I,selectItemAtIndex:D,selectHighlightedItem:A,setHighlightedIndex:F,clearSelection:k,clearItems:B,setItemCount:w,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&&ep(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:vg},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:Tg},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"&&(xl(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&ep(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=Jh(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=Jh(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&&$I(a,this.getRootProps),a;if(dg(a))return l.cloneElement(a,this.getRootProps(fg(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:lg,itemToString:function(n){return n==null?"":(process.env.NODE_ENV!=="production"&&gI(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:cg},e.stateChangeTypes=bI,e}();process.env.NODE_ENV!=="production"&&(CI.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 ep(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 $I(e,t){var n=t.refKey,r=n!=="ref",o=!dg(e);o&&!r&&!qh.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+'"'),!qh.isForwardRef(e)&&!fg(e)[n]&&console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')}var TI=["isInitialMount","highlightedIndex","items","environment"],Ig={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function II(e,t,n){var r=e.props,o=e.type,i={};Object.keys(t).forEach(function(a){RI(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 RI(e,t,n,r){var o=t.props,i=t.type,a="on"+Sl(e)+"Change";o[a]&&r[e]!==void 0&&r[e]!==n[e]&&o[a](ae({type:i},r))}function OI(e,t){return t.changes}function PI(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var AI=El(function(e,t){_l(e(),t)},200),DI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?l.useLayoutEffect:l.useEffect;function NI(e){var t=e.id,n=t===void 0?"downshift-"+ug():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 Rg(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 kI(e){return e?String(e):""}function Sl(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function Cl(e){var t=l.useRef(e);return t.current=e,t}function Og(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=Cl(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&&II(f,_i(r.current,f.props),s),r.current=s},[s,n,f]),[s,d]}function MI(e,t,n){var r=Og(e,t,n),o=r[0],i=r[1];return[_i(o,n),i]}var ri={itemToString:kI,stateReducer:OI,getA11ySelectionMessage:PI,scrollIntoView:cg,environment:typeof window>"u"?{}:window};function Pn(e,t,n){n===void 0&&(n=Ig);var r=e["default"+Sl(t)];return r!==void 0?r:n[t]}function zo(e,t,n){n===void 0&&(n=Ig);var r=e[t];if(r!==void 0)return r;var o=e["initial"+Sl(t)];return o!==void 0?o:Pn(e,t,n)}function jI(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 LI(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 $l=function(){return dn};process.env.NODE_ENV!=="production"&&($l=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 tp(e,t,n){var r=n.isInitialMount,o=n.highlightedIndex,i=n.items,a=n.environment,s=an(n,TI);l.useEffect(function(){r||AI(function(){return e(ae({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length},s))},a.document)},t)}function FI(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 DI(function(){t<0||!n||!Object.keys(r.current).length||(s.current===!1?s.current=!0:a(o(t),i))},[t]),s}var Tl=dn;process.env.NODE_ENV!=="production"&&(Tl=function(t){var n=t.isInitialMount,r=t.props,o=t.state,i=l.useRef(r);l.useEffect(function(){n||(xl(o,i.current,r),i.current=r)},[o,r,n])});function np(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 VI(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 BI(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:BI});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 Il=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,Rl=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,Ol=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,Pl=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,Al=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,Dl=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,Nl=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,kl=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,Ml=process.env.NODE_ENV!=="production"?"__input_change__":8,Za=process.env.NODE_ENV!=="production"?"__input_blur__":9,jl=process.env.NODE_ENV!=="production"?"__input_focus__":10,Pg=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,Ag=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,Ll=process.env.NODE_ENV!=="production"?"__item_click__":13,Dg=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,Ng=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,kg=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,Mg=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,jg=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,Fl=process.env.NODE_ENV!=="production"?"__function_select_item__":19,Lg=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,Fg=process.env.NODE_ENV!=="production"?"__function_reset__":21,Vl=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,Vg=Object.freeze({__proto__:null,InputKeyDownArrowDown:Il,InputKeyDownArrowUp:Rl,InputKeyDownEscape:Ol,InputKeyDownHome:Pl,InputKeyDownEnd:Al,InputKeyDownPageUp:Dl,InputKeyDownPageDown:Nl,InputKeyDownEnter:kl,InputChange:Ml,InputBlur:Za,InputFocus:jl,MenuMouseLeave:Pg,ItemMouseMove:Ag,ItemClick:Ll,ToggleButtonClick:Dg,FunctionToggleMenu:Ng,FunctionOpenMenu:kg,FunctionCloseMenu:Mg,FunctionSetHighlightedIndex:jg,FunctionSelectItem:Fl,FunctionSetInputValue:Lg,FunctionReset:Fg,ControlledPropUpdatedSelectedItem:Vl});function HI(e){var t=jI(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 WI={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 zI(e,t,n){var r=l.useRef(),o=Og(e,t,n),i=o[0],a=o[1];return l.useEffect(function(){Xa(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&a({type:Vl,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)},[i.selectedItem,n.selectedItem]),[_i(i,n),a]}var Bg=dn;process.env.NODE_ENV!=="production"&&(Bg=function(t,n){X.checkPropTypes(WI,t,"prop",n.name)});var UI=ae({},ri,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:lg});function YI(e,t){var n,r=t.type,o=t.props,i=t.altKey,a;switch(r){case Ll:a={isOpen:Pn(o,"isOpen"),highlightedIndex:Pn(o,"highlightedIndex"),selectedItem:o.items[t.index],inputValue:o.itemToString(o.items[t.index])};break;case Il: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 Rl:e.isOpen?i?a=np(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 kl:a=np(o,e.highlightedIndex);break;case Ol:a=ae({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Dl:a={highlightedIndex:Or(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Nl:a={highlightedIndex:Or(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Pl:a={highlightedIndex:Fr(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case Al: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 Ml:a={isOpen:!0,highlightedIndex:Pn(o,"highlightedIndex"),inputValue:t.inputValue};break;case jl:a={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case Fl:a={selectedItem:t.selectedItem,inputValue:o.itemToString(t.selectedItem)};break;case Vl:a={inputValue:t.inputValue};break;default:return VI(e,t,Vg)}return ae({},e,a)}var KI=["onMouseLeave","refKey","ref"],qI=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],XI=["onClick","onPress","refKey","ref"],GI=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];no.stateChangeTypes=Vg;function no(e){e===void 0&&(e={}),Bg(e,no);var t=ae({},UI,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=HI(t),f=zI(YI,d,t),m=f[0],h=f[1],b=m.isOpen,y=m.highlightedIndex,T=m.selectedItem,S=m.inputValue,v=l.useRef(null),E=l.useRef({}),C=l.useRef(null),I=l.useRef(null),D=l.useRef(!0),A=NI(t),F=l.useRef(),k=Cl({state:m,props:t}),B=l.useCallback(function(z){return E.current[A.getItemId(z)]},[A]);tp(s,[b,y,S,o],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m)),tp(c,[T],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m));var R=FI({menuElement:v.current,highlightedIndex:y,isOpen:b,itemRefs:E,scrollIntoView:i,getItemNodeFromIndex:B});Tl({isInitialMount:D.current,props:t,state:m}),l.useEffect(function(){var z=n||r||b;z&&C.current&&C.current.focus()},[]),l.useEffect(function(){D.current||(F.current=o.length)});var w=LI(b,[C,v,I],a,function(){h({type:Za,selectItem:!1})}),p=$l("getInputProps","getMenuProps");l.useEffect(function(){return D.current=!1,function(){D.current=!0}},[]),l.useEffect(function(){var z;if(!b)E.current={};else if(((z=a.document)==null?void 0:z.activeElement)!==C.current){var U;C==null||(U=C.current)==null||U.focus()}},[b,a]);var $=l.useMemo(function(){return{ArrowDown:function(U){U.preventDefault(),h({type:Il,altKey:U.altKey,getItemNodeFromIndex:B})},ArrowUp:function(U){U.preventDefault(),h({type:Rl,altKey:U.altKey,getItemNodeFromIndex:B})},Home:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:Pl,getItemNodeFromIndex:B}))},End:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:Al,getItemNodeFromIndex:B}))},Escape:function(U){var ee=k.current.state;(ee.isOpen||ee.inputValue||ee.selectedItem||ee.highlightedIndex>-1)&&(U.preventDefault(),h({type:Ol}))},Enter:function(U){var ee=k.current.state;!ee.isOpen||U.which===229||(U.preventDefault(),h({type:kl,getItemNodeFromIndex:B}))},PageUp:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:Dl,getItemNodeFromIndex:B}))},PageDown:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:Nl,getItemNodeFromIndex:B}))}}},[h,k,B]),P=l.useCallback(function(z){return ae({id:A.labelId,htmlFor:A.inputId},z)},[A]),j=l.useCallback(function(z,U){var ee,Q=z===void 0?{}:z,ie=Q.onMouseLeave,re=Q.refKey,me=re===void 0?"ref":re,Te=Q.ref,Pe=an(Q,KI),Ne=U===void 0?{}:U,Oe=Ne.suppressRefError,We=Oe===void 0?!1:Oe;return p("getMenuProps",We,me,v),ae((ee={},ee[me]=hr(Te,function(De){v.current=De}),ee.id=A.menuId,ee.role="listbox",ee["aria-labelledby"]=Pe&&Pe["aria-label"]?void 0:""+A.labelId,ee.onMouseLeave=Rt(ie,function(){h({type:Pg})}),ee),Pe)},[h,p,A]),W=l.useCallback(function(z){var U,ee,Q=z===void 0?{}:z,ie=Q.item,re=Q.index,me=Q.refKey,Te=me===void 0?"ref":me,Pe=Q.ref,Ne=Q.onMouseMove,Oe=Q.onMouseDown,We=Q.onClick;Q.onPress;var De=Q.disabled,ot=an(Q,qI),ze=k.current,xt=ze.props,Xe=ze.state,Pt=Rg(ie,re,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:Ag,index:xe,disabled:De}))},Ct=function(){h({type:Ll,index:xe})},tt=function(gt){return gt.preventDefault()};return ae((U={},U[Te]=hr(Pe,function(Fe){Fe&&(E.current[A.getItemId(xe)]=Fe)}),U.disabled=De,U.role="option",U["aria-selected"]=""+(xe===Xe.highlightedIndex),U.id=A.getItemId(xe),U),!De&&(ee={},ee[ct]=Rt(je,Ct),ee),{onMouseMove:Rt(Ne,Zt),onMouseDown:Rt(Oe,tt)},ot)},[h,k,R,A]),Y=l.useCallback(function(z){var U,ee=z===void 0?{}:z,Q=ee.onClick;ee.onPress;var ie=ee.refKey,re=ie===void 0?"ref":ie,me=ee.ref,Te=an(ee,XI),Pe=k.current.state,Ne=function(){h({type:Dg})};return ae((U={},U[re]=hr(me,function(Oe){I.current=Oe}),U["aria-controls"]=A.menuId,U["aria-expanded"]=Pe.isOpen,U.id=A.toggleButtonId,U.tabIndex=-1,U),!Te.disabled&&ae({},{onClick:Rt(Q,Ne)}),Te)},[h,k,A]),ne=l.useCallback(function(z,U){var ee,Q=z===void 0?{}:z,ie=Q.onKeyDown,re=Q.onChange,me=Q.onInput,Te=Q.onFocus,Pe=Q.onBlur;Q.onChangeText;var Ne=Q.refKey,Oe=Ne===void 0?"ref":Ne,We=Q.ref,De=an(Q,GI),ot=U===void 0?{}:U,ze=ot.suppressRefError,xt=ze===void 0?!1:ze;p("getInputProps",xt,Oe,C);var Xe=k.current.state,Pt=function(gt){var nn=Si(gt);nn&&$[nn]&&$[nn](gt)},xe=function(gt){h({type:Ml,inputValue:gt.target.value})},ct=function(gt){if(Xe.isOpen&&!w.current.isMouseDown){var nn=gt.relatedTarget===null&&a.document.activeElement!==a.document.body;h({type:Za,selectItem:!nn})}},je=function(){Xe.isOpen||h({type:jl})},Zt="onChange",Ct={};if(!De.disabled){var tt;Ct=(tt={},tt[Zt]=Rt(re,me,xe),tt.onKeyDown=Rt(ie,Pt),tt.onBlur=Rt(Pe,ct),tt.onFocus=Rt(Te,je),tt)}return ae((ee={},ee[Oe]=hr(We,function(Fe){C.current=Fe}),ee["aria-activedescendant"]=Xe.isOpen&&Xe.highlightedIndex>-1?A.getItemId(Xe.highlightedIndex):"",ee["aria-autocomplete"]="list",ee["aria-controls"]=A.menuId,ee["aria-expanded"]=Xe.isOpen,ee["aria-labelledby"]=De&&De["aria-label"]?void 0:""+A.labelId,ee.autoComplete="off",ee.id=A.inputId,ee.role="combobox",ee.value=Xe.inputValue,ee),Ct,De)},[p,k,A,$,h,w,a]),H=l.useCallback(function(){h({type:Ng})},[h]),L=l.useCallback(function(){h({type:Mg})},[h]),oe=l.useCallback(function(){h({type:kg})},[h]),G=l.useCallback(function(z){h({type:jg,highlightedIndex:z})},[h]),K=l.useCallback(function(z){h({type:Fl,selectedItem:z})},[h]),Z=l.useCallback(function(z){h({type:Lg,inputValue:z})},[h]),ce=l.useCallback(function(){h({type:Fg})},[h]);return{getItemProps:W,getLabelProps:P,getMenuProps:j,getInputProps:ne,getToggleButtonProps:Y,toggleMenu:H,openMenu:oe,closeMenu:L,setHighlightedIndex:G,setInputValue:Z,selectItem:K,reset:ce,highlightedIndex:y,isOpen:b,selectedItem:T,inputValue:S}}var Hg={activeIndex:-1,selectedItems:[]};function rp(e,t){return zo(e,t,Hg)}function op(e,t){return Pn(e,t,Hg)}function ZI(e){var t=rp(e,"activeIndex"),n=rp(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function ip(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 QI(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}var JI={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})})},eR={itemToString:ri.itemToString,stateReducer:ri.stateReducer,environment:ri.environment,getA11yRemovalMessage:QI,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},Wg=dn;process.env.NODE_ENV!=="production"&&(Wg=function(t,n){X.checkPropTypes(JI,t,"prop",n.name)});var Bl=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,Hl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,Wl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,zl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,Ul=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,Yl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,Kl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,ql=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,Xl=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,Gl=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,Zl=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,Ql=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,Jl=process.env.NODE_ENV!=="production"?"__function_reset__":12,tR=Object.freeze({__proto__:null,SelectedItemClick:Bl,SelectedItemKeyDownDelete:Hl,SelectedItemKeyDownBackspace:Wl,SelectedItemKeyDownNavigationNext:zl,SelectedItemKeyDownNavigationPrevious:Ul,DropdownKeyDownNavigationPrevious:Yl,DropdownKeyDownBackspace:Kl,DropdownClick:ql,FunctionAddSelectedItem:Xl,FunctionRemoveSelectedItem:Gl,FunctionSetSelectedItems:Zl,FunctionSetActiveIndex:Ql,FunctionReset:Jl});function nR(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 Bl:c={activeIndex:r};break;case Ul:c={activeIndex:a-1<0?0:a-1};break;case zl:c={activeIndex:a+1>=s.length?-1:a+1};break;case Wl:case Hl:{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 Yl:c={activeIndex:s.length-1};break;case Kl:c={selectedItems:s.slice(0,s.length-1)};break;case Xl:c={selectedItems:[].concat(s,[i])};break;case ql:c={activeIndex:-1};break;case Gl:{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 Zl:{var m=t.selectedItems;c={selectedItems:m};break}case Ql:{var h=t.activeIndex;c={activeIndex:h};break}case Jl:c={activeIndex:op(o,"activeIndex"),selectedItems:op(o,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,c)}var rR=["refKey","ref","onClick","onKeyDown","selectedItem","index"],oR=["refKey","ref","onKeyDown","onClick","preventKeyAction"];ed.stateChangeTypes=tR;function ed(e){e===void 0&&(e={}),Wg(e,ed);var t=ae({},eR,e),n=t.getA11yRemovalMessage,r=t.itemToString,o=t.environment,i=t.keyNavigationNext,a=t.keyNavigationPrevious,s=MI(nR,ZI(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=Cl({state:c,props:t});l.useEffect(function(){if(!m.current){if(f.length<b.current.length){var R=b.current.find(function(w){return f.indexOf(w)<0});_l(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]),Tl({isInitialMount:m.current,props:t,state:c});var S=$l("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:Ul})},R[i]=function(){u({type:zl})},R.Delete=function(){u({type:Hl})},R.Backspace=function(){u({type:Wl})},R},[u,i,a]),E=l.useMemo(function(){var R;return R={},R[a]=function(w){ip(w)&&u({type:Yl})},R.Backspace=function(p){ip(p)&&u({type:Kl})},R},[u,a]),C=l.useCallback(function(R){var w,p=R===void 0?{}:R,$=p.refKey,P=$===void 0?"ref":$,j=p.ref,W=p.onClick,Y=p.onKeyDown,ne=p.selectedItem,H=p.index,L=an(p,rR),oe=T.current.state,G=Rg(ne,H,oe.selectedItems,"Pass either item or index to getSelectedItemProps!"),K=G[1],Z=K>-1&&K===oe.activeIndex,ce=function(){u({type:Bl,index:K})},z=function(ee){var Q=Si(ee);Q&&v[Q]&&v[Q](ee)};return ae((w={},w[P]=hr(j,function(U){U&&y.current.push(U)}),w.tabIndex=Z?0:-1,w.onClick=Rt(W,ce),w.onKeyDown=Rt(Y,z),w),L)},[u,T,v]),I=l.useCallback(function(R,w){var p,$=R===void 0?{}:R,P=$.refKey,j=P===void 0?"ref":P,W=$.ref,Y=$.onKeyDown,ne=$.onClick,H=$.preventKeyAction,L=H===void 0?!1:H,oe=an($,oR),G=w===void 0?{}:w,K=G.suppressRefError,Z=K===void 0?!1:K;S("getDropdownProps",Z,j,h);var ce=function(ee){var Q=Si(ee);Q&&E[Q]&&E[Q](ee)},z=function(){u({type:ql})};return ae((p={},p[j]=hr(W,function(U){U&&(h.current=U)}),p),!L&&{onKeyDown:Rt(Y,ce),onClick:Rt(ne,z)},oe)},[u,E,S]),D=l.useCallback(function(R){u({type:Xl,selectedItem:R})},[u]),A=l.useCallback(function(R){u({type:Gl,selectedItem:R})},[u]),F=l.useCallback(function(R){u({type:Zl,selectedItems:R})},[u]),k=l.useCallback(function(R){u({type:Ql,activeIndex:R})},[u]),B=l.useCallback(function(){u({type:Jl})},[u]);return{getSelectedItemProps:C,getDropdownProps:I,addSelectedItem:D,removeSelectedItem:A,setSelectedItems:F,setActiveIndex:k,reset:B,selectedItems:f,activeIndex:d}}var iR="jbnkvn0",ap=pt({defaultClassName:"jbnkvna",variantClassNames:{highlighted:{true:"jbnkvnb"},selected:{true:"jbnkvnc"},multiSelected:{true:"jbnkvnd"},isDisabled:{true:"jbnkvne"}},defaultVariants:{},compoundVariants:[]}),sp="jbnkvn9",aR="jbnkvn3",mc=pt({defaultClassName:"",variantClassNames:{isRounded:{true:"jbnkvn1",false:"jbnkvn2"}},defaultVariants:{isRounded:!1},compoundVariants:[]}),sR=pt({defaultClassName:"jbnkvn4",variantClassNames:{isMobile:{true:"jbnkvn5",false:"jbnkvn6"},isReadOnly:{true:"jbnkvn7"}},defaultVariants:{isMobile:!0},compoundVariants:[]}),cR="jbnkvn8",cp="jbnkvnf";const zg=l.createContext(void 0),uR=({children:e,contextValue:t})=>M.jsx(zg.Provider,{value:t,children:e}),td=()=>{const e=l.useContext(zg);if(e===void 0)throw new Error("useSelectProvider must be used within a SelectProvider");return e},Ug=({children:e,renderer:t})=>{const{getMenuProps:n}=td();return t?t({children:e,defaultClassName:sp,innerProps:n()}):M.jsx("div",{className:sp,...n(),children:e})};Ug.defaultProps={renderer:void 0};const Yg=({renderer:e,item:t,itemIndex:n})=>{const{isMulti:r,selectedItem:o,multipleSelectedItems:i,highlightedIndex:a,getItemProps:s,onClickItem:c}=td(),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:ap({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}):M.jsxs("div",{className:ap({highlighted:u,selected:d,multiSelected:f,isDisabled:t.isDisabled}),...m,children:[M.jsx("span",{children:t.label}),r&&i.includes(t)&&M.jsx(Eu,{size:16,color:$t.theme.colors.greenAccent1,"data-test-id":""})]},t.value)};Yg.defaultProps={renderer:void 0};const Kg=({renderer:e,...t})=>{const{formState:n,isOpen:r,getToggleButtonProps:o,isDisabled:i}=td();if(e)return e({innerProps:o(),defaultClassName:cp,isOpen:r});const a=n==="disabled"?$t.theme.colors.black:$t.theme.colors.grey1;return M.jsx("div",{className:cp,...o({disabled:i}),"data-disabled":i,children:r?M.jsx(xu,{color:a,...t}):M.jsx(si,{color:a,...t})})};Kg.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:E,isDisabled:C,isValid:I,isRounded:D}=m,[A,F]=l.useState(e),k=Au({isError:v,isDisabled:C,isValid:I}),B=l.useRef(null),{removeSelectedItem:R,selectedItems:w,addSelectedItem:p,getDropdownProps:$}=ed({initialSelectedItems:c&&t?t:[],onSelectedItemsChange(U){c&&r(U.selectedItems)}}),P=l.useMemo(()=>w.length,[w]),j=l.useCallback(U=>{let ee=U;(c&&!d||u)&&(ee="");const Q=new RegExp(ee.toLowerCase());return e.filter(ie=>Q.test(ie.label.toLowerCase()))},[e]),{isOpen:W,getToggleButtonProps:Y,getLabelProps:ne,getMenuProps:H,getInputProps:L,highlightedIndex:oe,getItemProps:G,selectedItem:K,openMenu:Z,closeMenu:ce}=no({items:A,initialSelectedItem:c?void 0:t,onInputValueChange:({inputValue:U})=>{F(j(U||""))},itemToString(U){return U?U.label:""},onSelectedItemChange(U){var ee;c||(r(U.selectedItem),u&&((ee=B.current)==null||ee.blur()),ce())},stateReducer:(U,ee)=>{const{changes:Q,type:ie}=ee,re=A.find((me,Te)=>Te===U.highlightedIndex);switch(ie){case no.stateChangeTypes.InputKeyDownEnter:case no.stateChangeTypes.ItemClick:if(c){let me=P;return w.includes(re)?(me-=1,R(re)):(me+=1,p(re)),{...Q,isOpen:!0,highlightedIndex:U.highlightedIndex,inputValue:!d&&me>0?`${me} items selected`:""}}return{...Q,isOpen:!1,highlightedIndex:U.highlightedIndex,inputValue:Q.inputValue};case no.stateChangeTypes.InputBlur:{let me=Q.inputValue;return c&&!d&&(P>0?me=`${P} items selected`:me=""),{...Q,inputValue:me}}default:return Q}}});l.useImperativeHandle(h,()=>B.current);const z={isOpen:W,formState:k,selectedItem:K,multipleSelectedItems:w,isMulti:c,isDisabled:C,totalSelected:P,highlightedIndex:oe,getMenuProps:H,getItemProps:G,getToggleButtonProps:Y,onClickItem:f};return M.jsx(uR,{contextValue:z,children:M.jsxs(et,{position:"relative",w:"$full",children:[M.jsxs(bo,{addonLeft:b,addonRight:y,helperTextLeft:T,helperTextRight:S,isError:v,errorMessage:E,isDisabled:C,isValid:I,inputAreaClassName:Re(iR,mc({isRounded:D})),className:mc({isRounded:D}),children:[M.jsxs("div",{className:aR,children:[M.jsx("input",{"data-test-id":m["data-test-id"],...L($({preventKeyAction:W,ref:B,placeholder:n,readOnly:u,disabled:C,className:sR({isMobile:d,isReadOnly:u}),onClick:()=>{W||Z()}}))}),d&&c&&M.jsx("div",{className:cR,children:P>0?`${P} items selected`:""}),d&&M.jsx(Ni,{isSelect:!0,isError:v,isDisabled:C,required:a,className:mc({isRounded:D}),...ne(),children:n})]}),M.jsx(Kg,{renderer:i==null?void 0:i.Toggle})]}),W&&M.jsx(Ug,{renderer:i==null?void 0:i.List,children:A.map((U,ee)=>M.jsx(Yg,{renderer:i==null?void 0:i.ListItem,itemIndex:ee,item:U}))})]})})});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,isRounded:!1};const qg=e=>{const t=`0${e}`;return t.substring(t.length-2,t.length)},lR=Array.from({length:31},(e,t)=>({label:qg(t+1),value:String(t+1),isDisabled:!1})),Qa=["January","February","March","April","May","June","July","August","September","October","November","December"],dR=Qa.map(e=>({label:e,value:e,isDisabled:!1})),fR=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}))},gc=(e,t)=>{if(t){const n=new Date(t);if(e==="date")return{label:qg(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),up=(e,t)=>new Date(e,ii(t)+1,0).getDate(),hR=({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<=up(n,t)&&o>new Date(n,ii(t),e,0,0,0,0)?!0:e&&t&&!n?ii(t)===1?e<=29:e<=up(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},Xg=({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 gc("date",r)}},[r,d,a]),E=l.useMemo(()=>{if(a){if(m)return m;if(r)return gc("month",r)}},[r,m,a]),C=l.useMemo(()=>{if(a){if(b)return b;if(r)return gc("year",r)}},[r,b,a]),I=l.useMemo(()=>v||E||C?hR({date:v?Number(v==null?void 0:v.value):0,month:E?E.value:"",year:C?Number(C.value):0,maxDate:t}):!1,[v,E,C,t]),D=v&&E&&!C&&!I,A=v&&!E&&C&&!I,F=!v&&E&&C&&!I,k=v&&E&&C&&!I,B=()=>M.jsx(et,{as:"button",ref:T,"data-test-id":"",position:"absolute",width:"$1",height:"$1",bottom:"$0",right:"$0",backgroundColor:"$white",border:"$none",children:M.jsx(et,{display:"none"})}),R=()=>{T.current&&T.current.focus()};return M.jsx(Ai,{...u,isOpen:a,onClose:()=>{i==null||i(),S()},children:M.jsxs(Pr,{gap:"$24",children:[M.jsxs(Pr,{gap:"$8",children:[M.jsx(et,{height:"$40",children:M.jsx(Di,{children:e})}),M.jsxs(Pr,{children:[M.jsxs(Yt,{gap:"$12",px:"$2",mb:"$4",mt:"$8",children:[M.jsx(co,{isReadOnly:!0,name:"date",label:"Date",value:v,isMobile:n,options:lR,onClickItem:R,onChange:f,isError:D||A||k,"data-test-id":"CT_Component_SelectPicker_dateField"}),M.jsx(co,{isReadOnly:!0,name:"month",label:"Month",value:E,isMobile:n,options:dR,onClickItem:R,onChange:h,isError:F||D||k,"data-test-id":"CT_Component_SelectPicker_monthField"}),M.jsx(co,{isReadOnly:!0,name:"year",label:"Year",value:C,isMobile:n,options:fR(t),onClickItem:R,onChange:y,isError:F||A||k,"data-test-id":"CT_Component_SelectPicker_yearField"})]}),(k||F||A||D)&&M.jsx(sn,{px:"$2",color:"$redAccent1",fontSize:"$caption",lineHeight:"$16",fontWeight:"$medium",children:c})]})]}),B(),M.jsx(vo,{onClick:()=>{o(new Date(Number(C==null?void 0:C.value),ii(E==null?void 0:E.value),Number(v==null?void 0:v.value))),S()},isDisabled:!C||!E||!v||!I,"data-test-id":"CT_Component_SelectPicker_buttonSave",type:"button",children:s})]})})};Xg.defaultProps={title:"Date of birth",isMobile:!1,defaultDate:void 0,maxDate:void 0,buttonText:"Confirm",errorMessage:"Invalid date of birth"};const yc="rovingFocusGroup.onEntryFocus",pR={bubbles:!1,cancelable:!0},nd="RovingFocusGroup",[uu,Gg,vR]=Ja(nd),[mR,Zg]=mn(nd,[vR]),[gR,yR]=mR(nd),bR=l.forwardRef((e,t)=>l.createElement(uu.Provider,{scope:e.__scopeRovingFocusGroup},l.createElement(uu.Slot,{scope:e.__scopeRovingFocusGroup},l.createElement(wR,ae({},e,{ref:t}))))),wR=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),E=Gg(n),C=l.useRef(!1),[I,D]=l.useState(0);return l.useEffect(()=>{const A=f.current;if(A)return A.addEventListener(yc,v),()=>A.removeEventListener(yc,v)},[v]),l.createElement(gR,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:b,onItemFocus:l.useCallback(A=>y(A),[y]),onItemShiftTab:l.useCallback(()=>S(!0),[]),onFocusableItemAdd:l.useCallback(()=>D(A=>A+1),[]),onFocusableItemRemove:l.useCallback(()=>D(A=>A-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,A=>{const F=!C.current;if(A.target===A.currentTarget&&F&&!T){const k=new CustomEvent(yc,pR);if(A.currentTarget.dispatchEvent(k),!k.defaultPrevented){const B=E().filter(P=>P.focusable),R=B.find(P=>P.active),w=B.find(P=>P.id===b),$=[R,w,...B].filter(Boolean).map(P=>P.ref.current);Qg($)}}C.current=!1}),onBlur:Ae(e.onBlur,()=>S(!1))})))}),ER="RovingFocusGroupItem",xR=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Xn(),c=i||s,u=yR(ER,n),d=u.currentTabStopId===c,f=Gg(n),{onFocusableItemAdd:m,onFocusableItemRemove:h}=u;return l.useEffect(()=>{if(r)return m(),()=>h()},[r,m,h]),l.createElement(uu.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=CR(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?$R(S,v+1):S.slice(v+1)}setTimeout(()=>Qg(S))}})})))}),_R={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function SR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function CR(e,t,n){const r=SR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return _R[r]}function Qg(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function $R(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const TR=bR,IR=xR,Jg="Radio",[RR,ey]=mn(Jg),[OR,PR]=RR(Jg),AR=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(OR,{scope:n,checked:o,disabled:a},l.createElement(Ke.button,ae({type:"button",role:"radio","aria-checked":o,"data-state":ty(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(kR,{control:d,bubbles:!h.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))}),DR="RadioIndicator",NR=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=PR(DR,n);return l.createElement(yr,{present:r||i.checked},l.createElement(Ke.span,ae({"data-state":ty(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))}),kR=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 ty(e){return e?"checked":"unchecked"}const MR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ny="RadioGroup",[jR,AP]=mn(ny,[Zg,ey]),ry=Zg(),oy=ey(),[LR,FR]=jR(ny),VR=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=ry(n),b=es(u),[y,T]=Sn({prop:i,defaultProp:o,onChange:f});return l.createElement(LR,{scope:n,name:r,required:a,disabled:s,value:y,onValueChange:T},l.createElement(TR,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}))))}),BR="RadioGroupItem",HR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=FR(BR,n),a=i.disabled||r,s=ry(n),c=oy(n),u=l.useRef(null),d=st(t,u),f=i.value===o.value,m=l.useRef(!1);return l.useEffect(()=>{const h=y=>{MR.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(IR,ae({asChild:!0},s,{focusable:!a,active:f}),l.createElement(AR,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())})})))}),WR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=oy(n);return l.createElement(NR,ae({},o,r,{ref:t}))}),zR=VR,UR=HR,YR=WR;var KR=pt({defaultClassName:"d6umgr4",variantClassNames:{disabled:{true:"d6umgr5"}},defaultVariants:{},compoundVariants:[]}),qR="d6umgr1",XR=pt({defaultClassName:"d6umgr2",variantClassNames:{disabled:{true:"d6umgr3"}},defaultVariants:{},compoundVariants:[]}),GR="d6umgr0";const iy=({children:e,className:t,disabled:n,...r})=>{const o=l.useId();return M.jsxs(Yt,{alignItems:"center",children:[M.jsx(UR,{...r,disabled:n,className:Re(t,GR),id:o,children:M.jsx(YR,{className:Re("radio-indicator",XR({disabled:n}))})}),e&&M.jsx("label",{className:Re("radio-label",KR({disabled:n})),htmlFor:o,children:e})]})};iy.defaultProps={children:void 0};const ZR=({className:e,children:t,...n})=>M.jsx(zR,{...n,className:Re(e,qR),children:t});var QR="_846x3h0",JR="_846x3h1",eO=pt({defaultClassName:"_846x3h2",variantClassNames:{size:{small:"_846x3h3",medium:"_846x3h4",large:"_846x3h5"},isHasIcon:{true:"_846x3h6"},isDisabled:{true:"_846x3h7"}},defaultVariants:{size:"small"},compoundVariants:[]});const rd=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 M.jsxs(et,{position:"relative",children:[M.jsx(et,{className:Re(QR),children:M.jsx(I0,{size:24})}),M.jsx("input",{className:Re(eO({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&&M.jsx(et,{className:Re(JR),children:o&&(!s||s&&!e)?o:M.jsx(os,{"data-test-id":"icon-close-search",onMouseDown:t,cursor:"pointer",size:24})})]})});rd.displayName="Search";rd.defaultProps={icon:void 0,isDisabled:void 0,onClear:void 0,"data-test-id":void 0};const ay="Switch",[tO,DP]=mn(ay),[nO,rO]=tO(ay),oO=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(nO,{scope:n,checked:T,disabled:s},l.createElement(Ke.button,ae({type:"button",role:"switch","aria-checked":T,"aria-required":a,"data-state":sy(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:h,onClick:Ae(e.onClick,v=>{S(E=>!E),y&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})})),y&&l.createElement(sO,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),iO="SwitchThumb",aO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=rO(iO,n);return l.createElement(Ke.span,ae({"data-state":sy(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),sO=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 sy(e){return e?"checked":"unchecked"}const cO=oO,uO=aO;var lO="b7c0j12",dO="b7c0j10",fO="b7c0j11";const cy=l.forwardRef((e,t)=>M.jsx(cO,{ref:t,className:dO,...e,children:M.jsx(uO,{className:fO,children:M.jsx(Eu,{className:lO,size:16})})}));cy.displayName="Switch";const uy=({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?M.jsxs(Yt,{flexDirection:"column","data-test-id":r,children:[M.jsx(xu,{size:10,color:o&&i?"white":"grey"}),M.jsx(si,{size:10,color:o&&a?"white":"grey"})]}):null};uy.defaultProps={sortable:!1,"data-test-id":""};var hO="_94c6vs1",pO="_94c6vs3",lp="_94c6vs2",vO="_94c6vs0";const ly=({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}},dy=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}=ly({data:r,columns:e});return l.useEffect(()=>{o&&o(f)},[o,f]),M.jsxs(s,{ref:a,as:t,className:vO,"data-test-id":n,...i,children:[M.jsx("thead",{children:M.jsx("tr",{className:pO,children:u.map(m=>M.jsx("th",{"data-test-id":"xmAUFfaxnRueeT_zBiyhc",className:lp,onClick:()=>d(m),children:M.jsxs(Yt,{alignItems:"center",gap:"$8",justifyContent:"center",px:"$16",children:[M.jsx(et,{fontWeight:"$bold",color:"$whiteTypoHigh",fontSize:"$body2",lineHeight:"$20",children:m.label}),M.jsx(uy,{accessor:m.accessor,sortable:m.sortable,sortColumn:f,"data-test-id":`table-sort-${m.label}`})]})},m.accessor))})}),M.jsx("tbody",{children:c.map((m,h)=>M.jsx("tr",{className:hO,children:m.map((b,y)=>M.jsx(et,{as:"td","data-test-id":`table-${n}-row${h}-col${y}`,className:lp,w:"33%",children:b.CellRenderer??b.value}))}))})]})});dy.defaultProps={as:"table","data-test-id":"base",onSort:void 0};var mO=pt({defaultClassName:"_5wiwut0",variantClassNames:{isActive:{true:"_5wiwut1"}},defaultVariants:{isActive:!1},compoundVariants:[]});var gO=pt({defaultClassName:"_1p5zdvr0",variantClassNames:{withShadow:{true:"_1p5zdvr1"},align:{left:"_1p5zdvr2",center:"_1p5zdvr3",right:"_1p5zdvr4"}},defaultVariants:{withShadow:!1,align:"left"},compoundVariants:[]});const od=l.createContext({index:0,setIndex:()=>null}),id=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 M.jsx(h,{"data-test-id":s["data-test-id"],as:e,ref:c,className:Re(gO({withShadow:n,align:i})),...s,children:M.jsx(od.Provider,{value:m,children:f})})});id.displayName="Tabs";id.defaultProps={as:"ul",defaultIndex:0,index:0,align:"left",withShadow:!1,children:void 0,onChange:()=>null,"data-test-id":void 0};const ad=l.forwardRef(({as:e,children:t,...n},r)=>{const{index:o,setIndex:i}=l.useContext(od),a=l.useCallback(u=>{i==null||i(u)},[i]),s=n["data-index"]===o,c=e||"li";return M.jsx(c,{"data-test-id":n["data-test-id"],as:e,ref:r,onClick:()=>a(n["data-index"]||0),className:Re(mO({isActive:s})),...n,children:M.jsx(sn,{as:"span",textStyle:"body2",children:t})})});ad.displayName="TabItem";ad.defaultProps={as:"li","data-index":void 0,"data-test-id":void 0};const fy="ToastProvider",[sd,yO,bO]=Ja("Toast"),[hy,NP]=mn("Toast",[bO]),[wO,Os]=hy(fy),py=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(sd.Provider,{scope:t},l.createElement(wO,{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))};py.propTypes={label(e){if(e.label&&typeof e.label=="string"&&!e.label.trim()){const t=`Invalid prop \`label\` supplied to \`${fy}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const EO="ToastViewport",xO=["F8"],lu="toast.viewportPause",du="toast.viewportResume",_O=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=xO,label:o="Notifications ({hotkey})",...i}=e,a=Os(EO,n),s=yO(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(lu);S.dispatchEvent(D),a.isClosePausedRef.current=!0}},E=()=>{if(a.isClosePausedRef.current){const D=new CustomEvent(du);S.dispatchEvent(D),a.isClosePausedRef.current=!1}},C=D=>{!T.contains(D.relatedTarget)&&E()},I=()=>{T.contains(document.activeElement)||E()};return T.addEventListener("focusin",v),T.addEventListener("focusout",C),T.addEventListener("pointermove",v),T.addEventListener("pointerleave",I),window.addEventListener("blur",v),window.addEventListener("focus",E),()=>{T.removeEventListener("focusin",v),T.removeEventListener("focusout",C),T.removeEventListener("pointermove",v),T.removeEventListener("pointerleave",I),window.removeEventListener("blur",v),window.removeEventListener("focus",E)}}},[b,a.isClosePausedRef]);const y=l.useCallback(({tabbingDirection:T})=>{const v=s().map(E=>{const C=E.ref.current,I=[C,...LO(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 E=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!E){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 w=y({tabbingDirection:k?"backwards":"forwards"}),p=w.findIndex($=>$===F);if(bc(w.slice(p+1)))v.preventDefault();else{var D,A;k?(D=u.current)===null||D===void 0||D.focus():(A=d.current)===null||A===void 0||A.focus()}}};return T.addEventListener("keydown",S),()=>T.removeEventListener("keydown",S)}},[s,y]),l.createElement(G0,{ref:c,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:b?void 0:"none"}},b&&l.createElement(dp,{ref:u,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"forwards"});bc(T)}}),l.createElement(sd.Slot,{scope:n},l.createElement(Ke.ol,ae({tabIndex:-1},i,{ref:m}))),b&&l.createElement(dp,{ref:d,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"backwards"});bc(T)}}))}),SO="ToastFocusProxy",dp=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Os(SO,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",CO="toast.swipeStart",$O="toast.swipeMove",TO="toast.swipeCancel",IO="toast.swipeEnd",RO=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(vy,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)})})))}),[OO,PO]=hy(Ps,{onClose(){}}),vy=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($)),E=l.useRef(null),C=l.useRef(null),I=o||y.duration,D=l.useRef(0),A=l.useRef(I),F=l.useRef(0),{onToastAdd:k,onToastRemove:B}=y,R=cn(()=>{var $;(T==null?void 0:T.contains(document.activeElement))&&(($=y.viewport)===null||$===void 0||$.focus()),a()}),w=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 P=()=>{w(A.current),u==null||u()},j=()=>{const W=new Date().getTime()-D.current;A.current=A.current-W,window.clearTimeout(F.current),c==null||c()};return $.addEventListener(lu,j),$.addEventListener(du,P),()=>{$.removeEventListener(lu,j),$.removeEventListener(du,P)}}},[y.viewport,I,c,u,w]),l.useEffect(()=>{i&&!y.isClosePausedRef.current&&w(I)},[i,I,y.isClosePausedRef,w]),l.useEffect(()=>(k(),()=>B()),[k,B]);const p=l.useMemo(()=>T?gy(T):null,[T]);return y.viewport?l.createElement(l.Fragment,null,p&&l.createElement(AO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},p),l.createElement(OO,{scope:n,onClose:R},hn.createPortal(l.createElement(sd.ItemSlot,{scope:n},l.createElement(X0,{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&&(E.current={x:$.clientX,y:$.clientY})}),onPointerMove:Ae(e.onPointerMove,$=>{if(!E.current)return;const P=$.clientX-E.current.x,j=$.clientY-E.current.y,W=!!C.current,Y=["left","right"].includes(y.swipeDirection),ne=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,H=Y?ne(0,P):0,L=Y?0:ne(0,j),oe=$.pointerType==="touch"?10:2,G={x:H,y:L},K={originalEvent:$,delta:G};W?(C.current=G,da($O,f,K,{discrete:!1})):fp(G,y.swipeDirection,oe)?(C.current=G,da(CO,d,K,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(P)>oe||Math.abs(j)>oe)&&(E.current=null)}),onPointerUp:Ae(e.onPointerUp,$=>{const P=C.current,j=$.target;if(j.hasPointerCapture($.pointerId)&&j.releasePointerCapture($.pointerId),C.current=null,E.current=null,P){const W=$.currentTarget,Y={originalEvent:$,delta:P};fp(P,y.swipeDirection,y.swipeThreshold)?da(IO,h,Y,{discrete:!0}):da(TO,m,Y,{discrete:!0}),W.addEventListener("click",ne=>ne.preventDefault(),{once:!0})}})})))),y.viewport))):null});vy.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 AO=e=>{const{__scopeToast:t,children:n,...r}=e,o=Os(Ps,t),[i,a]=l.useState(!1),[s,c]=l.useState(!1);return MO(()=>a(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:l.createElement(Jp,{asChild:!0},l.createElement(ds,r,i&&l.createElement(l.Fragment,null,o.label," ",n)))},DO="ToastAction",cd=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?l.createElement(my,{altText:n,asChild:!0},l.createElement(kO,ae({},r,{ref:t}))):null});cd.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${DO}\``)}};const NO="ToastClose",kO=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=PO(NO,n);return l.createElement(my,{asChild:!0},l.createElement(Ke.button,ae({type:"button"},r,{ref:t,onClick:Ae(e.onClick,o.onClose)})))}),my=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 gy(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),jO(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(...gy(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?wp(o,i):o.dispatchEvent(i)}const fp=(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 MO(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 jO(e){return e.nodeType===e.ELEMENT_NODE}function LO(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 bc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}const FO=py,yy=_O,by=RO,VO=cd;var BO="_10z4js29",HO=pt({defaultClassName:"_10z4js25",variantClassNames:{color:{neutral:"_10z4js26",negative:"_10z4js27"}},defaultVariants:{color:"neutral"},compoundVariants:[]}),WO="_10z4js28",zO="_10z4js2a";const wy=FO,ud=l.forwardRef(({className:e,...t},n)=>M.jsx(yy,{ref:n,className:Re(zO,e),...t}));ud.displayName=yy.displayName;const As=l.forwardRef(({className:e,color:t="neutral",...n},r)=>M.jsx(by,{ref:r,className:Re(HO({color:t}),e),...n}));As.displayName=by.displayName;As.defaultProps={viewPort:void 0,actionClassName:void 0};const ld=l.forwardRef(({className:e,...t},n)=>M.jsx(cd,{ref:n,className:Re(e),...t}));ld.displayName=VO.displayName;const UO=1,YO=1e6,qn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let wc=0;function KO(){return wc=(wc+1)%Number.MAX_VALUE,wc.toString()}const Ec=new Map,hp=e=>{if(Ec.has(e))return;const t=setTimeout(()=>{Ec.delete(e),ai({type:qn.REMOVE_TOAST,toastId:e})},YO);Ec.set(e,t)};function Ey(e,t){switch(t.type){case qn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,UO)};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?hp(n):e.toasts.forEach(r=>{hp(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=Ey($a,e),Ca.forEach(t=>{t($a)})}function xy({...e}){const t=KO(),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 _y(){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:xy,dismiss:n=>ai({type:qn.DISMISS_TOAST,toastId:n})}}const dd=l.forwardRef((e,t)=>{const{toasts:n,dismiss:r}=_y();return M.jsx(wy,{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})=>M.jsxs("div",{children:[M.jsxs(As,{ref:t,color:f,duration:u,type:d,"data-test-id":`toast-${y["data-test-id"]??""}`,...y,children:[M.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:M.jsx(sn,{textStyle:"body2",fontWeight:"$reguler",textOverflow:"ellipsis",overflow:"hidden",className:WO,children:i})}),!a&&c&&s?M.jsx(ld,{altText:s,asChild:!0,children:M.jsx(ng,{"data-test-id":`action-toast-${y["data-test-id"]??""}`,onClick:c,className:Re(BO,h),children:s})}):a]},o),M.jsx(ud,{...m})]},o))})});dd.displayName="Toaster";const[Ds,kP]=mn("Tooltip",[us]),Ns=us(),qO="TooltipProvider",XO=700,fu="tooltip.open",[GO,fd]=Ds(qO),ZO=e=>{const{__scopeTooltip:t,delayDuration:n=XO,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(GO,{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)},hd="Tooltip",[QO,ks]=Ds(hd),JO=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,c=fd(hd,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:A=>{A?(c.onOpen(),document.dispatchEvent(new CustomEvent(fu))):c.onClose(),i==null||i(A)}}),E=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(Gp,u,l.createElement(QO,{scope:t,contentId:m,open:S,stateAttribute:E,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))},pp="TooltipTrigger",eP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ks(pp,n),i=fd(pp,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(Zp,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)})))}),tP="TooltipPortal",[MP,nP]=Ds(tP,{forceMount:void 0}),Ci="TooltipContent",rP=l.forwardRef((e,t)=>{const n=nP(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(Sy,ae({side:o},i,{ref:t})):l.createElement(oP,ae({side:o},i,{ref:t})))}),oP=l.forwardRef((e,t)=>{const n=ks(Ci,e.__scopeTooltip),r=fd(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=uP(S,T.getBoundingClientRect()),E=lP(S,v),C=dP(y.getBoundingClientRect()),I=hP([...E,...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)),E=!fP(S,a);v?m():E&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,a,u,m]),l.createElement(Sy,ae({},e,{ref:i}))}),[iP,aP]=Ds(hd,{isInside:!1}),Sy=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(fu,d),()=>document.removeEventListener(fu,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(Qp,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(bp,null,r),l.createElement(iP,{scope:n,isInside:!0},l.createElement(n1,{id:c.contentId,role:"tooltip"},o||r))))}),sP="TooltipArrow",cP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ns(n);return aP(sP,n).isInside?null:l.createElement(e1,ae({},o,r,{ref:t}))});function uP(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 lP(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 dP(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 fP(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 hP(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),pP(t)}function pP(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 vP=ZO,mP=JO,gP=eP,yP=rP,bP=cP;function vp(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function wP(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 Cy(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]=Cy(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 EP(e,t){var n={};if(typeof t=="object"){var r=e;Cy(t,(a,s)=>{var c=wP(r,s);n[vp(c)]=String(a)})}else{var o=e;for(var i in o)n[vp(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 xP="var(--_4goys34)",_P="_4goys35",SP="_4goys36";const pd=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=$t.atoms.commonAtoms({color:r,bgColor:o}).className,S=$t.atoms.borderAtoms({borderColor:o}).className,E=o.replace("$","");return M.jsxs(mP,{defaultOpen:a,delayDuration:s,disableHoverableContent:c,onOpenChange:u,open:d,children:[M.jsx(gP,{asChild:!0,ref:y,children:n}),M.jsx(ms,{children:M.jsxs(yP,{align:e,alignOffset:t,side:f,sideOffset:m,...b,className:Re(SP,T,S),children:[M.jsxs(Yt,{gap:"$6",children:[h&&M.jsx(Yt,{width:"$24",children:M.jsx(A0,{size:24})}),i]}),M.jsx(bP,{className:_P,style:EP({[xP]:$t.theme.colors[E]})})]})})]})});pd.displayName="Tooltip";pd.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 vd=({children:e})=>M.jsxs(vP,{children:[e,M.jsx(dd,{})]});vd.displayName="RadixProvider";const md=({children:e,withScrollStyles:t})=>M.jsx("div",{id:"voila-ui",style:{fontFamily:$t.theme.fonts.poppins},className:Re(t??$t.scrollbarStyle),children:M.jsx(vd,{children:e})});md.displayName="Provider";md.defaultProps={withScrollStyles:!1};exports.Accordion=Ab;exports.AccordionContent=f0;exports.AccordionItem=h0;exports.AccordionTrigger=F0;exports.Alert=Op;exports.Badge=_u;exports.BaseSelect=Mu;exports.BottomSheet=B$;exports.Box=et;exports.Button=vo;exports.Card=yu;exports.Checkbox=Xm;exports.Chips=cl;exports.CloseButton=xo;exports.ConfirmDialogContext=dl;exports.ConfirmDialogProvider=MT;exports.Container=bu;exports.DatePicker=uI;exports.Dialog=ll;exports.Divider=fl;exports.Flex=Yt;exports.FullLoader=ig;exports.Grid=wu;exports.IconButton=ml;exports.Image=gl;exports.Input=pl;exports.Link=ng;exports.List=yl;exports.ListItem=bl;exports.Loader=XT;exports.LoaderAnimated=wl;exports.Modal=Ai;exports.ModalBody=Is;exports.ModalFooter=Rs;exports.ModalHeader=Di;exports.MultiPicker=ag;exports.Overlay=qE;exports.Picker=au;exports.Portal=ms;exports.Provider=md;exports.Radio=iy;exports.RadioGroup=ZR;exports.RadixProvider=vd;exports.Search=rd;exports.Select=co;exports.SelectPicker=Xg;exports.Spinner=_o;exports.Stack=Pr;exports.Switch=cy;exports.TabItem=ad;exports.Table=dy;exports.Tabs=id;exports.TabsContext=od;exports.Text=sn;exports.Textarea=vl;exports.Toast=As;exports.ToastAction=ld;exports.ToastProvider=wy;exports.ToastViewport=ud;exports.Toaster=dd;exports.Tooltip=pd;exports.linkRecipe=tg;exports.reducer=Ey;exports.toast=xy;exports.useDialog=jT;exports.useIndeterminate=aT;exports.useOnMount=Ev;exports.useRipple=sl;exports.useTableRenderer=ly;exports.useToast=_y;
|
|
174
|
+
*/var Kh;function fI(){return Kh||(Kh=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 E(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 re=ie.$$typeof;switch(re){case e:var me=ie.type;switch(me){case n:case o:case r:case c:case u:return me;default:var Te=me&&me.$$typeof;switch(Te){case a:case s:case f:case d:case i:return Te;default:return re}}case t:return re}}}var I=a,D=i,A=e,F=s,k=n,B=f,R=d,w=t,p=o,$=r,P=c,j=!1,W=!1;function Y(ie){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ne(ie){return W||(W=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(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 z(ie){return C(ie)===t}function U(ie){return C(ie)===o}function ee(ie){return C(ie)===r}function Q(ie){return C(ie)===c}bt.ContextConsumer=I,bt.ContextProvider=D,bt.Element=A,bt.ForwardRef=F,bt.Fragment=k,bt.Lazy=B,bt.Memo=R,bt.Portal=w,bt.Profiler=p,bt.StrictMode=$,bt.Suspense=P,bt.isAsyncMode=Y,bt.isConcurrentMode=ne,bt.isContextConsumer=H,bt.isContextProvider=L,bt.isElement=oe,bt.isForwardRef=G,bt.isFragment=K,bt.isLazy=Z,bt.isMemo=ce,bt.isPortal=z,bt.isProfiler=U,bt.isStrictMode=ee,bt.isSuspense=Q,bt.isValidElementType=E,bt.typeOf=C}()),bt}process.env.NODE_ENV==="production"?su.exports=dI():su.exports=fI();var qh=su.exports;let Xh=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Gh=(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 Gh(n.overflowY,t)||Gh(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,hI=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)};var pI=(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(!Xh(e))throw new TypeError("Invalid target");let b=document.scrollingElement||document.documentElement,y=[],T=e;for(;Xh(T)&&h(T);){if(T=hI(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,E=(a=window.scrollX)!=null?a:pageXOffset,C=(s=window.scrollY)!=null?s:pageYOffset,{height:I,width:D,top:A,right:F,bottom:k,left:B}=e.getBoundingClientRect(),R=u==="start"||u==="nearest"?A:u==="end"?k:A+I/2,w=d==="center"?B+D/2:d==="end"?F:B,p=[];for(let $=0;$<y.length;$++){let P=y[$],{height:j,width:W,top:Y,right:ne,bottom:H,left:L}=P.getBoundingClientRect();if(c==="if-needed"&&A>=0&&B>=0&&k<=v&&F<=S&&A>=Y&&k<=H&&B>=L&&F<=ne)return p;let oe=getComputedStyle(P),G=parseInt(oe.borderLeftWidth,10),K=parseInt(oe.borderTopWidth,10),Z=parseInt(oe.borderRightWidth,10),ce=parseInt(oe.borderBottomWidth,10),z=0,U=0,ee="offsetWidth"in P?P.offsetWidth-P.clientWidth-G-Z:0,Q="offsetHeight"in P?P.offsetHeight-P.clientHeight-K-ce:0,ie="offsetWidth"in P?P.offsetWidth===0?0:W/P.offsetWidth:0,re="offsetHeight"in P?P.offsetHeight===0?0:j/P.offsetHeight:0;if(b===P)z=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,U=d==="start"?w:d==="center"?w-S/2:d==="end"?w-S:ua(E,E+S,S,G,Z,E+w,E+w+D,D),z=Math.max(0,z+C),U=Math.max(0,U+E);else{z=u==="start"?R-Y-K:u==="end"?R-H+ce+Q:u==="nearest"?ua(Y,H,j,K,ce+Q,R,R+I,I):R-(Y+j/2)+Q/2,U=d==="start"?w-L-G:d==="center"?w-(L+W/2)+ee/2:d==="end"?w-ne+Z+ee:ua(L,ne,W,G,Z+ee,w,w+D,D);let{scrollLeft:me,scrollTop:Te}=P;z=Math.max(0,Math.min(Te+z/re,P.scrollHeight-j/re+Q)),U=Math.max(0,Math.min(me+U/ie,P.scrollWidth-W/ie+ee)),R+=Te-z,w+=me-U}p.push({el:P,top:z,left:U})}return p},vI=0;function Zh(e){return typeof e=="function"?e:dn}function dn(){}function cg(e,t){if(e){var n=pI(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 Qh(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function El(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 Rt(){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 ug(){return String(vI++)}function lg(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 Jh(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function dg(e){return typeof e.type=="string"}function fg(e){return e.props}function mI(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var gI=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function la(e){e===void 0&&(e={});var t={};return gI.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 yI(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&&(Qh(o,e,n)||r&&Qh(o,n.document.activeElement,n))})}var xl=dn;process.env.NODE_ENV!=="production"&&(xl=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 bI=El(function(e){hg(e).textContent=""},500);function _l(e,t){var n=hg(t);e&&(n.textContent=e,bI(t))}function hg(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 pg=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,vg=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,mg=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,gg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,yg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,bg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,wg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,Eg=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,xg=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,_g=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,Sg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,cu=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,Cg=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,$g=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,Tg=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,wI=Object.freeze({__proto__:null,unknown:pg,mouseUp:vg,itemMouseEnter:mg,keyDownArrowUp:_a,keyDownArrowDown:Sa,keyDownEscape:gg,keyDownEnter:yg,keyDownHome:bg,keyDownEnd:wg,clickItem:Eg,blurInput:xg,changeInput:_g,keyDownSpaceButton:Sg,clickButton:cu,blurButton:Cg,controlledPropUpdatedSelectedItem:$g,touchEnd:Tg}),EI=["refKey","ref"],xI=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],_I=["onKeyDown","onBlur","onChange","onInput","onChangeText"],SI=["refKey","ref"],CI=["onMouseMove","onMouseDown","onClick","onPress","index","item"],$I=function(){var e=function(t){Du(n,t);function n(o){var i;i=t.call(this,o)||this,i.id=i.props.id||"downshift-"+ug(),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,E){var C=setTimeout(function(){i.timeoutIds=i.timeoutIds.filter(function(I){return I!==C}),v()},E);i.timeoutIds.push(C)},i.setItemCount=function(v){i.itemCount=v},i.unsetItemCount=function(){i.itemCount=null},i.setHighlightedIndex=function(v,E){v===void 0&&(v=i.props.defaultHighlightedIndex),E===void 0&&(E={}),E=la(E),i.internalSetState(ae({highlightedIndex:v},E))},i.clearSelection=function(v){i.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:i.props.defaultHighlightedIndex,isOpen:i.props.defaultIsOpen},v)},i.selectItem=function(v,E,C){E=la(E),i.internalSetState(ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,selectedItem:v,inputValue:i.props.itemToString(v)},E),C)},i.selectItemAtIndex=function(v,E,C){var I=i.items[v];I!=null&&i.selectItem(I,E,C)},i.selectHighlightedItem=function(v,E){return i.selectItemAtIndex(i.getState().highlightedIndex,v,E)},i.internalSetState=function(v,E){var C,I,D={},A=typeof v=="function";return!A&&v.hasOwnProperty("inputValue")&&i.props.onInputValueChange(v.inputValue,ae({},i.getStateAndHelpers(),v)),i.setState(function(F){F=i.getState(F);var k=A?v(F):v;k=i.props.stateReducer(F,k),C=k.hasOwnProperty("selectedItem");var B={};return C&&k.selectedItem!==F.selectedItem&&(I=k.selectedItem),k.type=k.type||pg,Object.keys(k).forEach(function(R){F[R]!==k[R]&&(D[R]=k[R]),R!=="type"&&(k[R],Xa(i.props,R)||(B[R]=k[R]))}),A&&k.hasOwnProperty("inputValue")&&i.props.onInputValueChange(k.inputValue,ae({},i.getStateAndHelpers(),k)),B},function(){Zh(E)();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,E){var C,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=an(I,EI),B=E===void 0?{}:E,R=B.suppressRefError,w=R===void 0?!1:R;i.getRootProps.called=!0,i.getRootProps.refKey=A,i.getRootProps.suppressRefError=w;var p=i.getState(),$=p.isOpen;return ae((C={},C[A]=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(E){var C=this;if(E.preventDefault(),this.getState().isOpen){var I=E.shiftKey?5:1;this.moveHighlightedIndex(I,{type:Sa})}else this.internalSetState({isOpen:!0,type:Sa},function(){var D=C.getItemCount();if(D>0){var A=C.getState(),F=A.highlightedIndex,k=Or(1,F,D,function(B){return C.getItemNodeFromIndex(B)});C.setHighlightedIndex(k,{type:Sa})}})},ArrowUp:function(E){var C=this;if(E.preventDefault(),this.getState().isOpen){var I=E.shiftKey?-5:-1;this.moveHighlightedIndex(I,{type:_a})}else this.internalSetState({isOpen:!0,type:_a},function(){var D=C.getItemCount();if(D>0){var A=C.getState(),F=A.highlightedIndex,k=Or(-1,F,D,function(B){return C.getItemNodeFromIndex(B)});C.setHighlightedIndex(k,{type:_a})}})},Enter:function(E){if(E.which!==229){var C=this.getState(),I=C.isOpen,D=C.highlightedIndex;if(I&&D!=null){E.preventDefault();var A=this.items[D],F=this.getItemNodeFromIndex(D);if(A==null||F&&F.hasAttribute("disabled"))return;this.selectHighlightedItem({type:yg})}}},Escape:function(E){E.preventDefault(),this.reset(ae({type:gg},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},i.buttonKeyDownHandlers=ae({},i.keyDownHandlers,{" ":function(E){E.preventDefault(),this.toggleMenu({type:Sg})}}),i.inputKeyDownHandlers=ae({},i.keyDownHandlers,{Home:function(E){var C=this,I=this.getState(),D=I.isOpen;if(D){E.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Fr(1,0,A,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:bg})}}},End:function(E){var C=this,I=this.getState(),D=I.isOpen;if(D){E.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Fr(-1,A-1,A,function(k){return C.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:wg})}}}}),i.getToggleButtonProps=function(v){var E=v===void 0?{}:v,C=E.onClick;E.onPress;var I=E.onKeyDown,D=E.onKeyUp,A=E.onBlur,F=an(E,xI),k=i.getState(),B=k.isOpen,R={onClick:Rt(C,i.buttonHandleClick),onKeyDown:Rt(I,i.buttonHandleKeyDown),onKeyUp:Rt(D,i.buttonHandleKeyUp),onBlur:Rt(A,i.buttonHandleBlur)},w=F.disabled?{}:R;return ae({type:"button",role:"button","aria-label":B?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},w,F)},i.buttonHandleKeyUp=function(v){v.preventDefault()},i.buttonHandleKeyDown=function(v){var E=Si(v);i.buttonKeyDownHandlers[E]&&i.buttonKeyDownHandlers[E].call(If(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:cu}):i.internalSetTimeout(function(){return i.toggleMenu({type:cu})})},i.buttonHandleBlur=function(v){var E=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!==E&&i.reset({type:Cg})})},i.getLabelProps=function(v){return ae({htmlFor:i.inputId,id:i.labelId},v)},i.getInputProps=function(v){var E=v===void 0?{}:v,C=E.onKeyDown,I=E.onBlur,D=E.onChange,A=E.onInput;E.onChangeText;var F=an(E,_I),k,B={};k="onChange";var R=i.getState(),w=R.inputValue,p=R.isOpen,$=R.highlightedIndex;if(!F.disabled){var P;B=(P={},P[k]=Rt(D,A,i.inputHandleChange),P.onKeyDown=Rt(C,i.inputHandleKeyDown),P.onBlur=Rt(I,i.inputHandleBlur),P)}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:w,id:i.inputId},B,F)},i.inputHandleKeyDown=function(v){var E=Si(v);E&&i.inputKeyDownHandlers[E]&&i.inputKeyDownHandlers[E].call(If(i),v)},i.inputHandleChange=function(v){i.internalSetState({type:_g,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:xg})})},i.menuRef=function(v){i._menuNode=v},i.getMenuProps=function(v,E){var C,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=an(I,SI),B=E===void 0?{}:E,R=B.suppressRefError,w=R===void 0?!1:R;return i.getMenuProps.called=!0,i.getMenuProps.refKey=A,i.getMenuProps.suppressRefError=w,ae((C={},C[A]=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 E,C=v===void 0?{}:v,I=C.onMouseMove,D=C.onMouseDown,A=C.onClick;C.onPress;var F=C.index,k=C.item,B=k===void 0?process.env.NODE_ENV==="production"?void 0:mI("getItemProps","item"):k,R=an(C,CI);F===void 0?(i.items.push(B),F=i.items.indexOf(B)):i.items[F]=B;var w="onClick",p=A,$=(E={onMouseMove:Rt(I,function(){F!==i.getState().highlightedIndex&&(i.setHighlightedIndex(F,{type:mg}),i.avoidScrolling=!0,i.internalSetTimeout(function(){return i.avoidScrolling=!1},250))}),onMouseDown:Rt(D,function(j){j.preventDefault()})},E[w]=Rt(p,function(){i.selectItemAtIndex(F,{type:Eg})}),E),P=R.disabled?{onMouseDown:$.onMouseDown}:$;return ae({id:i.getItemId(F),role:"option","aria-selected":i.getState().highlightedIndex===F},P,R)},i.clearItems=function(){i.items=[]},i.reset=function(v,E){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)},E)},i.toggleMenu=function(v,E){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),Zh(E)()})},i.openMenu=function(v){i.internalSetState({isOpen:!0},v)},i.closeMenu=function(v){i.internalSetState({isOpen:!1},v)},i.updateStatus=El(function(){var v=i.getState(),E=i.items[v.highlightedIndex],C=i.getItemCount(),I=i.props.getA11yStatusMessage(ae({itemToString:i.props.itemToString,previousResultCount:i.previousResultCount,resultCount:C,highlightedItem:E},v));i.previousResultCount=C,_l(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,E=this.closeMenu,C=this.toggleMenu,I=this.selectItem,D=this.selectItemAtIndex,A=this.selectHighlightedItem,F=this.setHighlightedIndex,k=this.clearSelection,B=this.clearItems,R=this.reset,w=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:E,toggleMenu:C,selectItem:I,selectItemAtIndex:D,selectHighlightedItem:A,setHighlightedIndex:F,clearSelection:k,clearItems:B,setItemCount:w,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&&ep(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:vg},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:Tg},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"&&(xl(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&ep(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=Jh(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=Jh(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&&TI(a,this.getRootProps),a;if(dg(a))return l.cloneElement(a,this.getRootProps(fg(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:lg,itemToString:function(n){return n==null?"":(process.env.NODE_ENV!=="production"&&yI(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:cg},e.stateChangeTypes=wI,e}();process.env.NODE_ENV!=="production"&&($I.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 ep(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 TI(e,t){var n=t.refKey,r=n!=="ref",o=!dg(e);o&&!r&&!qh.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+'"'),!qh.isForwardRef(e)&&!fg(e)[n]&&console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')}var II=["isInitialMount","highlightedIndex","items","environment"],Ig={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function RI(e,t,n){var r=e.props,o=e.type,i={};Object.keys(t).forEach(function(a){OI(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 OI(e,t,n,r){var o=t.props,i=t.type,a="on"+Sl(e)+"Change";o[a]&&r[e]!==void 0&&r[e]!==n[e]&&o[a](ae({type:i},r))}function PI(e,t){return t.changes}function AI(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var DI=El(function(e,t){_l(e(),t)},200),NI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?l.useLayoutEffect:l.useEffect;function kI(e){var t=e.id,n=t===void 0?"downshift-"+ug():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 Rg(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 MI(e){return e?String(e):""}function Sl(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function Cl(e){var t=l.useRef(e);return t.current=e,t}function Og(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=Cl(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&&RI(f,_i(r.current,f.props),s),r.current=s},[s,n,f]),[s,d]}function jI(e,t,n){var r=Og(e,t,n),o=r[0],i=r[1];return[_i(o,n),i]}var ri={itemToString:MI,stateReducer:PI,getA11ySelectionMessage:AI,scrollIntoView:cg,environment:typeof window>"u"?{}:window};function Pn(e,t,n){n===void 0&&(n=Ig);var r=e["default"+Sl(t)];return r!==void 0?r:n[t]}function zo(e,t,n){n===void 0&&(n=Ig);var r=e[t];if(r!==void 0)return r;var o=e["initial"+Sl(t)];return o!==void 0?o:Pn(e,t,n)}function LI(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 FI(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 $l=function(){return dn};process.env.NODE_ENV!=="production"&&($l=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 tp(e,t,n){var r=n.isInitialMount,o=n.highlightedIndex,i=n.items,a=n.environment,s=an(n,II);l.useEffect(function(){r||DI(function(){return e(ae({highlightedIndex:o,highlightedItem:i[o],resultCount:i.length},s))},a.document)},t)}function VI(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 NI(function(){t<0||!n||!Object.keys(r.current).length||(s.current===!1?s.current=!0:a(o(t),i))},[t]),s}var Tl=dn;process.env.NODE_ENV!=="production"&&(Tl=function(t){var n=t.isInitialMount,r=t.props,o=t.state,i=l.useRef(r);l.useEffect(function(){n||(xl(o,i.current,r),i.current=r)},[o,r,n])});function np(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 BI(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 HI(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:HI});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 Il=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,Rl=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,Ol=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,Pl=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,Al=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,Dl=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,Nl=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,kl=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,Ml=process.env.NODE_ENV!=="production"?"__input_change__":8,Za=process.env.NODE_ENV!=="production"?"__input_blur__":9,jl=process.env.NODE_ENV!=="production"?"__input_focus__":10,Pg=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,Ag=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,Ll=process.env.NODE_ENV!=="production"?"__item_click__":13,Dg=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,Ng=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,kg=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,Mg=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,jg=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,Fl=process.env.NODE_ENV!=="production"?"__function_select_item__":19,Lg=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,Fg=process.env.NODE_ENV!=="production"?"__function_reset__":21,Vl=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,Vg=Object.freeze({__proto__:null,InputKeyDownArrowDown:Il,InputKeyDownArrowUp:Rl,InputKeyDownEscape:Ol,InputKeyDownHome:Pl,InputKeyDownEnd:Al,InputKeyDownPageUp:Dl,InputKeyDownPageDown:Nl,InputKeyDownEnter:kl,InputChange:Ml,InputBlur:Za,InputFocus:jl,MenuMouseLeave:Pg,ItemMouseMove:Ag,ItemClick:Ll,ToggleButtonClick:Dg,FunctionToggleMenu:Ng,FunctionOpenMenu:kg,FunctionCloseMenu:Mg,FunctionSetHighlightedIndex:jg,FunctionSelectItem:Fl,FunctionSetInputValue:Lg,FunctionReset:Fg,ControlledPropUpdatedSelectedItem:Vl});function WI(e){var t=LI(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 zI={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 UI(e,t,n){var r=l.useRef(),o=Og(e,t,n),i=o[0],a=o[1];return l.useEffect(function(){Xa(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&a({type:Vl,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)},[i.selectedItem,n.selectedItem]),[_i(i,n),a]}var Bg=dn;process.env.NODE_ENV!=="production"&&(Bg=function(t,n){X.checkPropTypes(zI,t,"prop",n.name)});var YI=ae({},ri,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:lg});function KI(e,t){var n,r=t.type,o=t.props,i=t.altKey,a;switch(r){case Ll:a={isOpen:Pn(o,"isOpen"),highlightedIndex:Pn(o,"highlightedIndex"),selectedItem:o.items[t.index],inputValue:o.itemToString(o.items[t.index])};break;case Il: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 Rl:e.isOpen?i?a=np(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 kl:a=np(o,e.highlightedIndex);break;case Ol:a=ae({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Dl:a={highlightedIndex:Or(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Nl:a={highlightedIndex:Or(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Pl:a={highlightedIndex:Fr(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case Al: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 Ml:a={isOpen:!0,highlightedIndex:Pn(o,"highlightedIndex"),inputValue:t.inputValue};break;case jl:a={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case Fl:a={selectedItem:t.selectedItem,inputValue:o.itemToString(t.selectedItem)};break;case Vl:a={inputValue:t.inputValue};break;default:return BI(e,t,Vg)}return ae({},e,a)}var qI=["onMouseLeave","refKey","ref"],XI=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],GI=["onClick","onPress","refKey","ref"],ZI=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];no.stateChangeTypes=Vg;function no(e){e===void 0&&(e={}),Bg(e,no);var t=ae({},YI,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=WI(t),f=UI(KI,d,t),m=f[0],h=f[1],b=m.isOpen,y=m.highlightedIndex,T=m.selectedItem,S=m.inputValue,v=l.useRef(null),E=l.useRef({}),C=l.useRef(null),I=l.useRef(null),D=l.useRef(!0),A=kI(t),F=l.useRef(),k=Cl({state:m,props:t}),B=l.useCallback(function(z){return E.current[A.getItemId(z)]},[A]);tp(s,[b,y,S,o],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m)),tp(c,[T],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m));var R=VI({menuElement:v.current,highlightedIndex:y,isOpen:b,itemRefs:E,scrollIntoView:i,getItemNodeFromIndex:B});Tl({isInitialMount:D.current,props:t,state:m}),l.useEffect(function(){var z=n||r||b;z&&C.current&&C.current.focus()},[]),l.useEffect(function(){D.current||(F.current=o.length)});var w=FI(b,[C,v,I],a,function(){h({type:Za,selectItem:!1})}),p=$l("getInputProps","getMenuProps");l.useEffect(function(){return D.current=!1,function(){D.current=!0}},[]),l.useEffect(function(){var z;if(!b)E.current={};else if(((z=a.document)==null?void 0:z.activeElement)!==C.current){var U;C==null||(U=C.current)==null||U.focus()}},[b,a]);var $=l.useMemo(function(){return{ArrowDown:function(U){U.preventDefault(),h({type:Il,altKey:U.altKey,getItemNodeFromIndex:B})},ArrowUp:function(U){U.preventDefault(),h({type:Rl,altKey:U.altKey,getItemNodeFromIndex:B})},Home:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:Pl,getItemNodeFromIndex:B}))},End:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:Al,getItemNodeFromIndex:B}))},Escape:function(U){var ee=k.current.state;(ee.isOpen||ee.inputValue||ee.selectedItem||ee.highlightedIndex>-1)&&(U.preventDefault(),h({type:Ol}))},Enter:function(U){var ee=k.current.state;!ee.isOpen||U.which===229||(U.preventDefault(),h({type:kl,getItemNodeFromIndex:B}))},PageUp:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:Dl,getItemNodeFromIndex:B}))},PageDown:function(U){k.current.state.isOpen&&(U.preventDefault(),h({type:Nl,getItemNodeFromIndex:B}))}}},[h,k,B]),P=l.useCallback(function(z){return ae({id:A.labelId,htmlFor:A.inputId},z)},[A]),j=l.useCallback(function(z,U){var ee,Q=z===void 0?{}:z,ie=Q.onMouseLeave,re=Q.refKey,me=re===void 0?"ref":re,Te=Q.ref,Pe=an(Q,qI),Ne=U===void 0?{}:U,Oe=Ne.suppressRefError,We=Oe===void 0?!1:Oe;return p("getMenuProps",We,me,v),ae((ee={},ee[me]=hr(Te,function(De){v.current=De}),ee.id=A.menuId,ee.role="listbox",ee["aria-labelledby"]=Pe&&Pe["aria-label"]?void 0:""+A.labelId,ee.onMouseLeave=Rt(ie,function(){h({type:Pg})}),ee),Pe)},[h,p,A]),W=l.useCallback(function(z){var U,ee,Q=z===void 0?{}:z,ie=Q.item,re=Q.index,me=Q.refKey,Te=me===void 0?"ref":me,Pe=Q.ref,Ne=Q.onMouseMove,Oe=Q.onMouseDown,We=Q.onClick;Q.onPress;var De=Q.disabled,ot=an(Q,XI),ze=k.current,xt=ze.props,Xe=ze.state,Pt=Rg(ie,re,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:Ag,index:xe,disabled:De}))},Ct=function(){h({type:Ll,index:xe})},tt=function(gt){return gt.preventDefault()};return ae((U={},U[Te]=hr(Pe,function(Fe){Fe&&(E.current[A.getItemId(xe)]=Fe)}),U.disabled=De,U.role="option",U["aria-selected"]=""+(xe===Xe.highlightedIndex),U.id=A.getItemId(xe),U),!De&&(ee={},ee[ct]=Rt(je,Ct),ee),{onMouseMove:Rt(Ne,Zt),onMouseDown:Rt(Oe,tt)},ot)},[h,k,R,A]),Y=l.useCallback(function(z){var U,ee=z===void 0?{}:z,Q=ee.onClick;ee.onPress;var ie=ee.refKey,re=ie===void 0?"ref":ie,me=ee.ref,Te=an(ee,GI),Pe=k.current.state,Ne=function(){h({type:Dg})};return ae((U={},U[re]=hr(me,function(Oe){I.current=Oe}),U["aria-controls"]=A.menuId,U["aria-expanded"]=Pe.isOpen,U.id=A.toggleButtonId,U.tabIndex=-1,U),!Te.disabled&&ae({},{onClick:Rt(Q,Ne)}),Te)},[h,k,A]),ne=l.useCallback(function(z,U){var ee,Q=z===void 0?{}:z,ie=Q.onKeyDown,re=Q.onChange,me=Q.onInput,Te=Q.onFocus,Pe=Q.onBlur;Q.onChangeText;var Ne=Q.refKey,Oe=Ne===void 0?"ref":Ne,We=Q.ref,De=an(Q,ZI),ot=U===void 0?{}:U,ze=ot.suppressRefError,xt=ze===void 0?!1:ze;p("getInputProps",xt,Oe,C);var Xe=k.current.state,Pt=function(gt){var nn=Si(gt);nn&&$[nn]&&$[nn](gt)},xe=function(gt){h({type:Ml,inputValue:gt.target.value})},ct=function(gt){if(Xe.isOpen&&!w.current.isMouseDown){var nn=gt.relatedTarget===null&&a.document.activeElement!==a.document.body;h({type:Za,selectItem:!nn})}},je=function(){Xe.isOpen||h({type:jl})},Zt="onChange",Ct={};if(!De.disabled){var tt;Ct=(tt={},tt[Zt]=Rt(re,me,xe),tt.onKeyDown=Rt(ie,Pt),tt.onBlur=Rt(Pe,ct),tt.onFocus=Rt(Te,je),tt)}return ae((ee={},ee[Oe]=hr(We,function(Fe){C.current=Fe}),ee["aria-activedescendant"]=Xe.isOpen&&Xe.highlightedIndex>-1?A.getItemId(Xe.highlightedIndex):"",ee["aria-autocomplete"]="list",ee["aria-controls"]=A.menuId,ee["aria-expanded"]=Xe.isOpen,ee["aria-labelledby"]=De&&De["aria-label"]?void 0:""+A.labelId,ee.autoComplete="off",ee.id=A.inputId,ee.role="combobox",ee.value=Xe.inputValue,ee),Ct,De)},[p,k,A,$,h,w,a]),H=l.useCallback(function(){h({type:Ng})},[h]),L=l.useCallback(function(){h({type:Mg})},[h]),oe=l.useCallback(function(){h({type:kg})},[h]),G=l.useCallback(function(z){h({type:jg,highlightedIndex:z})},[h]),K=l.useCallback(function(z){h({type:Fl,selectedItem:z})},[h]),Z=l.useCallback(function(z){h({type:Lg,inputValue:z})},[h]),ce=l.useCallback(function(){h({type:Fg})},[h]);return{getItemProps:W,getLabelProps:P,getMenuProps:j,getInputProps:ne,getToggleButtonProps:Y,toggleMenu:H,openMenu:oe,closeMenu:L,setHighlightedIndex:G,setInputValue:Z,selectItem:K,reset:ce,highlightedIndex:y,isOpen:b,selectedItem:T,inputValue:S}}var Hg={activeIndex:-1,selectedItems:[]};function rp(e,t){return zo(e,t,Hg)}function op(e,t){return Pn(e,t,Hg)}function QI(e){var t=rp(e,"activeIndex"),n=rp(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function ip(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 JI(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}var eR={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})})},tR={itemToString:ri.itemToString,stateReducer:ri.stateReducer,environment:ri.environment,getA11yRemovalMessage:JI,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},Wg=dn;process.env.NODE_ENV!=="production"&&(Wg=function(t,n){X.checkPropTypes(eR,t,"prop",n.name)});var Bl=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,Hl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,Wl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,zl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,Ul=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,Yl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,Kl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,ql=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,Xl=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,Gl=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,Zl=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,Ql=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,Jl=process.env.NODE_ENV!=="production"?"__function_reset__":12,nR=Object.freeze({__proto__:null,SelectedItemClick:Bl,SelectedItemKeyDownDelete:Hl,SelectedItemKeyDownBackspace:Wl,SelectedItemKeyDownNavigationNext:zl,SelectedItemKeyDownNavigationPrevious:Ul,DropdownKeyDownNavigationPrevious:Yl,DropdownKeyDownBackspace:Kl,DropdownClick:ql,FunctionAddSelectedItem:Xl,FunctionRemoveSelectedItem:Gl,FunctionSetSelectedItems:Zl,FunctionSetActiveIndex:Ql,FunctionReset:Jl});function rR(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 Bl:c={activeIndex:r};break;case Ul:c={activeIndex:a-1<0?0:a-1};break;case zl:c={activeIndex:a+1>=s.length?-1:a+1};break;case Wl:case Hl:{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 Yl:c={activeIndex:s.length-1};break;case Kl:c={selectedItems:s.slice(0,s.length-1)};break;case Xl:c={selectedItems:[].concat(s,[i])};break;case ql:c={activeIndex:-1};break;case Gl:{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 Zl:{var m=t.selectedItems;c={selectedItems:m};break}case Ql:{var h=t.activeIndex;c={activeIndex:h};break}case Jl:c={activeIndex:op(o,"activeIndex"),selectedItems:op(o,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return ae({},e,c)}var oR=["refKey","ref","onClick","onKeyDown","selectedItem","index"],iR=["refKey","ref","onKeyDown","onClick","preventKeyAction"];ed.stateChangeTypes=nR;function ed(e){e===void 0&&(e={}),Wg(e,ed);var t=ae({},tR,e),n=t.getA11yRemovalMessage,r=t.itemToString,o=t.environment,i=t.keyNavigationNext,a=t.keyNavigationPrevious,s=jI(rR,QI(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=Cl({state:c,props:t});l.useEffect(function(){if(!m.current){if(f.length<b.current.length){var R=b.current.find(function(w){return f.indexOf(w)<0});_l(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]),Tl({isInitialMount:m.current,props:t,state:c});var S=$l("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:Ul})},R[i]=function(){u({type:zl})},R.Delete=function(){u({type:Hl})},R.Backspace=function(){u({type:Wl})},R},[u,i,a]),E=l.useMemo(function(){var R;return R={},R[a]=function(w){ip(w)&&u({type:Yl})},R.Backspace=function(p){ip(p)&&u({type:Kl})},R},[u,a]),C=l.useCallback(function(R){var w,p=R===void 0?{}:R,$=p.refKey,P=$===void 0?"ref":$,j=p.ref,W=p.onClick,Y=p.onKeyDown,ne=p.selectedItem,H=p.index,L=an(p,oR),oe=T.current.state,G=Rg(ne,H,oe.selectedItems,"Pass either item or index to getSelectedItemProps!"),K=G[1],Z=K>-1&&K===oe.activeIndex,ce=function(){u({type:Bl,index:K})},z=function(ee){var Q=Si(ee);Q&&v[Q]&&v[Q](ee)};return ae((w={},w[P]=hr(j,function(U){U&&y.current.push(U)}),w.tabIndex=Z?0:-1,w.onClick=Rt(W,ce),w.onKeyDown=Rt(Y,z),w),L)},[u,T,v]),I=l.useCallback(function(R,w){var p,$=R===void 0?{}:R,P=$.refKey,j=P===void 0?"ref":P,W=$.ref,Y=$.onKeyDown,ne=$.onClick,H=$.preventKeyAction,L=H===void 0?!1:H,oe=an($,iR),G=w===void 0?{}:w,K=G.suppressRefError,Z=K===void 0?!1:K;S("getDropdownProps",Z,j,h);var ce=function(ee){var Q=Si(ee);Q&&E[Q]&&E[Q](ee)},z=function(){u({type:ql})};return ae((p={},p[j]=hr(W,function(U){U&&(h.current=U)}),p),!L&&{onKeyDown:Rt(Y,ce),onClick:Rt(ne,z)},oe)},[u,E,S]),D=l.useCallback(function(R){u({type:Xl,selectedItem:R})},[u]),A=l.useCallback(function(R){u({type:Gl,selectedItem:R})},[u]),F=l.useCallback(function(R){u({type:Zl,selectedItems:R})},[u]),k=l.useCallback(function(R){u({type:Ql,activeIndex:R})},[u]),B=l.useCallback(function(){u({type:Jl})},[u]);return{getSelectedItemProps:C,getDropdownProps:I,addSelectedItem:D,removeSelectedItem:A,setSelectedItems:F,setActiveIndex:k,reset:B,selectedItems:f,activeIndex:d}}var aR="jbnkvn0",ap=dt({defaultClassName:"jbnkvna",variantClassNames:{highlighted:{true:"jbnkvnb"},selected:{true:"jbnkvnc"},multiSelected:{true:"jbnkvnd"},isDisabled:{true:"jbnkvne"}},defaultVariants:{},compoundVariants:[]}),sp="jbnkvn9",sR="jbnkvn3",mc=dt({defaultClassName:"",variantClassNames:{isRounded:{true:"jbnkvn1",false:"jbnkvn2"}},defaultVariants:{isRounded:!1},compoundVariants:[]}),cR=dt({defaultClassName:"jbnkvn4",variantClassNames:{isMobile:{true:"jbnkvn5",false:"jbnkvn6"},isReadOnly:{true:"jbnkvn7"}},defaultVariants:{isMobile:!0},compoundVariants:[]}),uR="jbnkvn8",cp="jbnkvnf";const zg=l.createContext(void 0),lR=({children:e,contextValue:t})=>M.jsx(zg.Provider,{value:t,children:e}),td=()=>{const e=l.useContext(zg);if(e===void 0)throw new Error("useSelectProvider must be used within a SelectProvider");return e},Ug=({children:e,renderer:t})=>{const{getMenuProps:n}=td();return t?t({children:e,defaultClassName:sp,innerProps:n()}):M.jsx("div",{className:sp,...n(),children:e})};Ug.defaultProps={renderer:void 0};const Yg=({renderer:e,item:t,itemIndex:n})=>{const{isMulti:r,selectedItem:o,multipleSelectedItems:i,highlightedIndex:a,getItemProps:s,onClickItem:c}=td(),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:ap({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}):M.jsxs("div",{className:ap({highlighted:u,selected:d,multiSelected:f,isDisabled:t.isDisabled}),...m,children:[M.jsx("span",{children:t.label}),r&&i.includes(t)&&M.jsx(Eu,{size:16,color:$t.theme.colors.greenAccent1,"data-test-id":""})]},t.value)};Yg.defaultProps={renderer:void 0};const Kg=({renderer:e,...t})=>{const{formState:n,isOpen:r,getToggleButtonProps:o,isDisabled:i}=td();if(e)return e({innerProps:o(),defaultClassName:cp,isOpen:r});const a=n==="disabled"?$t.theme.colors.black:$t.theme.colors.grey1;return M.jsx("div",{className:cp,...o({disabled:i}),"data-disabled":i,children:r?M.jsx(xu,{color:a,...t}):M.jsx(si,{color:a,...t})})};Kg.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:E,isDisabled:C,isValid:I,isRounded:D}=m,[A,F]=l.useState(e),k=Au({isError:v,isDisabled:C,isValid:I}),B=l.useRef(null),{removeSelectedItem:R,selectedItems:w,addSelectedItem:p,getDropdownProps:$}=ed({initialSelectedItems:c&&t?t:[],onSelectedItemsChange(U){c&&r(U.selectedItems)}}),P=l.useMemo(()=>w.length,[w]),j=l.useCallback(U=>{let ee=U;(c&&!d||u)&&(ee="");const Q=new RegExp(ee.toLowerCase());return e.filter(ie=>Q.test(ie.label.toLowerCase()))},[e]),{isOpen:W,getToggleButtonProps:Y,getLabelProps:ne,getMenuProps:H,getInputProps:L,highlightedIndex:oe,getItemProps:G,selectedItem:K,openMenu:Z,closeMenu:ce}=no({items:A,initialSelectedItem:c?void 0:t,onInputValueChange:({inputValue:U})=>{F(j(U||""))},itemToString(U){return U?U.label:""},onSelectedItemChange(U){var ee;c||(r(U.selectedItem),u&&((ee=B.current)==null||ee.blur()),ce())},stateReducer:(U,ee)=>{const{changes:Q,type:ie}=ee,re=A.find((me,Te)=>Te===U.highlightedIndex);switch(ie){case no.stateChangeTypes.InputKeyDownEnter:case no.stateChangeTypes.ItemClick:if(c){let me=P;return w.includes(re)?(me-=1,R(re)):(me+=1,p(re)),{...Q,isOpen:!0,highlightedIndex:U.highlightedIndex,inputValue:!d&&me>0?`${me} items selected`:""}}return{...Q,isOpen:!1,highlightedIndex:U.highlightedIndex,inputValue:Q.inputValue};case no.stateChangeTypes.InputBlur:{let me=Q.inputValue;return c&&!d&&(P>0?me=`${P} items selected`:me=""),{...Q,inputValue:me}}default:return Q}}});l.useImperativeHandle(h,()=>B.current);const z={isOpen:W,formState:k,selectedItem:K,multipleSelectedItems:w,isMulti:c,isDisabled:C,totalSelected:P,highlightedIndex:oe,getMenuProps:H,getItemProps:G,getToggleButtonProps:Y,onClickItem:f};return M.jsx(lR,{contextValue:z,children:M.jsxs(et,{position:"relative",w:"$full",children:[M.jsxs(bo,{addonLeft:b,addonRight:y,helperTextLeft:T,helperTextRight:S,isError:v,errorMessage:E,isDisabled:C,isValid:I,inputAreaClassName:Ie(aR,mc({isRounded:D})),className:mc({isRounded:D}),children:[M.jsxs("div",{className:sR,children:[M.jsx("input",{"data-test-id":m["data-test-id"],...L($({preventKeyAction:W,ref:B,placeholder:n,readOnly:u,disabled:C,className:cR({isMobile:d,isReadOnly:u}),onClick:()=>{W||Z()}}))}),d&&c&&M.jsx("div",{className:uR,children:P>0?`${P} items selected`:""}),d&&M.jsx(Ni,{isSelect:!0,isError:v,isDisabled:C,required:a,className:mc({isRounded:D}),...ne(),children:n})]}),M.jsx(Kg,{renderer:i==null?void 0:i.Toggle})]}),W&&M.jsx(Ug,{renderer:i==null?void 0:i.List,children:A.map((U,ee)=>M.jsx(Yg,{renderer:i==null?void 0:i.ListItem,itemIndex:ee,item:U}))})]})})});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,isRounded:!1};const qg=e=>{const t=`0${e}`;return t.substring(t.length-2,t.length)},dR=Array.from({length:31},(e,t)=>({label:qg(t+1),value:String(t+1),isDisabled:!1})),Qa=["January","February","March","April","May","June","July","August","September","October","November","December"],fR=Qa.map(e=>({label:e,value:e,isDisabled:!1})),hR=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}))},gc=(e,t)=>{if(t){const n=new Date(t);if(e==="date")return{label:qg(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),up=(e,t)=>new Date(e,ii(t)+1,0).getDate(),pR=({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<=up(n,t)&&o>new Date(n,ii(t),e,0,0,0,0)?!0:e&&t&&!n?ii(t)===1?e<=29:e<=up(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},Xg=({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 gc("date",r)}},[r,d,a]),E=l.useMemo(()=>{if(a){if(m)return m;if(r)return gc("month",r)}},[r,m,a]),C=l.useMemo(()=>{if(a){if(b)return b;if(r)return gc("year",r)}},[r,b,a]),I=l.useMemo(()=>v||E||C?pR({date:v?Number(v==null?void 0:v.value):0,month:E?E.value:"",year:C?Number(C.value):0,maxDate:t}):!1,[v,E,C,t]),D=v&&E&&!C&&!I,A=v&&!E&&C&&!I,F=!v&&E&&C&&!I,k=v&&E&&C&&!I,B=()=>M.jsx(et,{as:"button",ref:T,"data-test-id":"",position:"absolute",width:"$1",height:"$1",bottom:"$0",right:"$0",backgroundColor:"$white",border:"$none",children:M.jsx(et,{display:"none"})}),R=()=>{T.current&&T.current.focus()};return M.jsx(Ai,{...u,isOpen:a,onClose:()=>{i==null||i(),S()},children:M.jsxs(Pr,{gap:"$24",children:[M.jsxs(Pr,{gap:"$8",children:[M.jsx(et,{height:"$40",children:M.jsx(Di,{children:e})}),M.jsxs(Pr,{children:[M.jsxs(Yt,{gap:"$12",px:"$2",mb:"$4",mt:"$8",children:[M.jsx(co,{isReadOnly:!0,name:"date",label:"Date",value:v,isMobile:n,options:dR,onClickItem:R,onChange:f,isError:D||A||k,"data-test-id":"CT_Component_SelectPicker_dateField"}),M.jsx(co,{isReadOnly:!0,name:"month",label:"Month",value:E,isMobile:n,options:fR,onClickItem:R,onChange:h,isError:F||D||k,"data-test-id":"CT_Component_SelectPicker_monthField"}),M.jsx(co,{isReadOnly:!0,name:"year",label:"Year",value:C,isMobile:n,options:hR(t),onClickItem:R,onChange:y,isError:F||A||k,"data-test-id":"CT_Component_SelectPicker_yearField"})]}),(k||F||A||D)&&M.jsx(sn,{px:"$2",color:"$redAccent1",fontSize:"$caption",lineHeight:"$16",fontWeight:"$medium",children:c})]})]}),B(),M.jsx(vo,{onClick:()=>{o(new Date(Number(C==null?void 0:C.value),ii(E==null?void 0:E.value),Number(v==null?void 0:v.value))),S()},isDisabled:!C||!E||!v||!I,"data-test-id":"CT_Component_SelectPicker_buttonSave",type:"button",children:s})]})})};Xg.defaultProps={title:"Date of birth",isMobile:!1,defaultDate:void 0,maxDate:void 0,buttonText:"Confirm",errorMessage:"Invalid date of birth"};var vR=dt({defaultClassName:"_1uehowr0",variantClassNames:{isActive:{true:"_1uehowr1",false:"_1uehowr2"},variant:{solid:"_1uehowr3",outline:"_1uehowr4"}},defaultVariants:{isActive:!1,variant:"solid"},compoundVariants:[[{variant:"solid",isActive:!0},"_1uehowr5"],[{variant:"solid",isActive:!1},"_1uehowr6"],[{variant:"outline",isActive:!0},"_1uehowr7"],[{variant:"outline",isActive:!1},"_1uehowr8"]]});const Gg=l.forwardRef(({isActive:e,variant:t,className:n,children:r,as:o,...i},a)=>{const s=o||"span";return M.jsx(s,{ref:a,as:"span",className:Ie(vR({isActive:e,variant:t}),n),"data-test-id":i["data-test-id"],...i,children:r})});Gg.defaultProps={as:"span","data-test-id":void 0};const yc="rovingFocusGroup.onEntryFocus",mR={bubbles:!1,cancelable:!0},nd="RovingFocusGroup",[uu,Zg,gR]=Ja(nd),[yR,Qg]=mn(nd,[gR]),[bR,wR]=yR(nd),ER=l.forwardRef((e,t)=>l.createElement(uu.Provider,{scope:e.__scopeRovingFocusGroup},l.createElement(uu.Slot,{scope:e.__scopeRovingFocusGroup},l.createElement(xR,ae({},e,{ref:t}))))),xR=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),E=Zg(n),C=l.useRef(!1),[I,D]=l.useState(0);return l.useEffect(()=>{const A=f.current;if(A)return A.addEventListener(yc,v),()=>A.removeEventListener(yc,v)},[v]),l.createElement(bR,{scope:n,orientation:r,dir:h,loop:o,currentTabStopId:b,onItemFocus:l.useCallback(A=>y(A),[y]),onItemShiftTab:l.useCallback(()=>S(!0),[]),onFocusableItemAdd:l.useCallback(()=>D(A=>A+1),[]),onFocusableItemRemove:l.useCallback(()=>D(A=>A-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,A=>{const F=!C.current;if(A.target===A.currentTarget&&F&&!T){const k=new CustomEvent(yc,mR);if(A.currentTarget.dispatchEvent(k),!k.defaultPrevented){const B=E().filter(P=>P.focusable),R=B.find(P=>P.active),w=B.find(P=>P.id===b),$=[R,w,...B].filter(Boolean).map(P=>P.ref.current);Jg($)}}C.current=!1}),onBlur:Ae(e.onBlur,()=>S(!1))})))}),_R="RovingFocusGroupItem",SR=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Xn(),c=i||s,u=wR(_R,n),d=u.currentTabStopId===c,f=Zg(n),{onFocusableItemAdd:m,onFocusableItemRemove:h}=u;return l.useEffect(()=>{if(r)return m(),()=>h()},[r,m,h]),l.createElement(uu.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=TR(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?IR(S,v+1):S.slice(v+1)}setTimeout(()=>Jg(S))}})})))}),CR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $R(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function TR(e,t,n){const r=$R(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return CR[r]}function Jg(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function IR(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const RR=ER,OR=SR,ey="Radio",[PR,ty]=mn(ey),[AR,DR]=PR(ey),NR=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(AR,{scope:n,checked:o,disabled:a},l.createElement(Ke.button,ae({type:"button",role:"radio","aria-checked":o,"data-state":ny(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(jR,{control:d,bubbles:!h.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))}),kR="RadioIndicator",MR=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=DR(kR,n);return l.createElement(yr,{present:r||i.checked},l.createElement(Ke.span,ae({"data-state":ny(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))}),jR=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 ny(e){return e?"checked":"unchecked"}const LR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ry="RadioGroup",[FR,NP]=mn(ry,[Qg,ty]),oy=Qg(),iy=ty(),[VR,BR]=FR(ry),HR=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=oy(n),b=es(u),[y,T]=Sn({prop:i,defaultProp:o,onChange:f});return l.createElement(VR,{scope:n,name:r,required:a,disabled:s,value:y,onValueChange:T},l.createElement(RR,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}))))}),WR="RadioGroupItem",zR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=BR(WR,n),a=i.disabled||r,s=oy(n),c=iy(n),u=l.useRef(null),d=st(t,u),f=i.value===o.value,m=l.useRef(!1);return l.useEffect(()=>{const h=y=>{LR.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(OR,ae({asChild:!0},s,{focusable:!a,active:f}),l.createElement(NR,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())})})))}),UR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=iy(n);return l.createElement(MR,ae({},o,r,{ref:t}))}),YR=HR,KR=zR,qR=UR;var XR=dt({defaultClassName:"d6umgr4",variantClassNames:{disabled:{true:"d6umgr5"}},defaultVariants:{},compoundVariants:[]}),GR="d6umgr1",ZR=dt({defaultClassName:"d6umgr2",variantClassNames:{disabled:{true:"d6umgr3"}},defaultVariants:{},compoundVariants:[]}),QR="d6umgr0";const ay=({children:e,className:t,disabled:n,...r})=>{const o=l.useId();return M.jsxs(Yt,{alignItems:"center",children:[M.jsx(KR,{...r,disabled:n,className:Ie(t,QR),id:o,children:M.jsx(qR,{className:Ie("radio-indicator",ZR({disabled:n}))})}),e&&M.jsx("label",{className:Ie("radio-label",XR({disabled:n})),htmlFor:o,children:e})]})};ay.defaultProps={children:void 0};const JR=({className:e,children:t,...n})=>M.jsx(YR,{...n,className:Ie(e,GR),children:t});var eO="_846x3h0",tO="_846x3h1",nO=dt({defaultClassName:"_846x3h2",variantClassNames:{size:{small:"_846x3h3",medium:"_846x3h4",large:"_846x3h5"},isHasIcon:{true:"_846x3h6"},isDisabled:{true:"_846x3h7"}},defaultVariants:{size:"small"},compoundVariants:[]});const rd=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 M.jsxs(et,{position:"relative",children:[M.jsx(et,{className:Ie(eO),children:M.jsx(R0,{size:24})}),M.jsx("input",{className:Ie(nO({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&&M.jsx(et,{className:Ie(tO),children:o&&(!s||s&&!e)?o:M.jsx(os,{"data-test-id":"icon-close-search",onMouseDown:t,cursor:"pointer",size:24})})]})});rd.displayName="Search";rd.defaultProps={icon:void 0,isDisabled:void 0,onClear:void 0,"data-test-id":void 0};const sy="Switch",[rO,kP]=mn(sy),[oO,iO]=rO(sy),aO=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(oO,{scope:n,checked:T,disabled:s},l.createElement(Ke.button,ae({type:"button",role:"switch","aria-checked":T,"aria-required":a,"data-state":cy(T),"data-disabled":s?"":void 0,disabled:s,value:c},d,{ref:h,onClick:Ae(e.onClick,v=>{S(E=>!E),y&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})})),y&&l.createElement(uO,{control:f,bubbles:!b.current,name:r,value:c,checked:T,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),sO="SwitchThumb",cO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=iO(sO,n);return l.createElement(Ke.span,ae({"data-state":cy(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),uO=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 cy(e){return e?"checked":"unchecked"}const lO=aO,dO=cO;var fO="b7c0j12",hO="b7c0j10",pO="b7c0j11";const uy=l.forwardRef((e,t)=>M.jsx(lO,{ref:t,className:hO,...e,children:M.jsx(dO,{className:pO,children:M.jsx(Eu,{className:fO,size:16})})}));uy.displayName="Switch";const ly=({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?M.jsxs(Yt,{flexDirection:"column","data-test-id":r,children:[M.jsx(xu,{size:10,color:o&&i?"white":"grey"}),M.jsx(si,{size:10,color:o&&a?"white":"grey"})]}):null};ly.defaultProps={sortable:!1,"data-test-id":""};var vO="_94c6vs1",mO="_94c6vs3",lp="_94c6vs2",gO="_94c6vs0";const dy=({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}},fy=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}=dy({data:r,columns:e});return l.useEffect(()=>{o&&o(f)},[o,f]),M.jsxs(s,{ref:a,as:t,className:gO,"data-test-id":n,...i,children:[M.jsx("thead",{children:M.jsx("tr",{className:mO,children:u.map(m=>M.jsx("th",{"data-test-id":"xmAUFfaxnRueeT_zBiyhc",className:lp,onClick:()=>d(m),children:M.jsxs(Yt,{alignItems:"center",gap:"$8",justifyContent:"center",px:"$16",children:[M.jsx(et,{fontWeight:"$bold",color:"$whiteTypoHigh",fontSize:"$body2",lineHeight:"$20",children:m.label}),M.jsx(ly,{accessor:m.accessor,sortable:m.sortable,sortColumn:f,"data-test-id":`table-sort-${m.label}`})]})},m.accessor))})}),M.jsx("tbody",{children:c.map((m,h)=>M.jsx("tr",{className:vO,children:m.map((b,y)=>M.jsx(et,{as:"td","data-test-id":`table-${n}-row${h}-col${y}`,className:lp,w:"33%",children:b.CellRenderer??b.value}))}))})]})});fy.defaultProps={as:"table","data-test-id":"base",onSort:void 0};var yO=dt({defaultClassName:"_5wiwut0",variantClassNames:{isActive:{true:"_5wiwut1"}},defaultVariants:{isActive:!1},compoundVariants:[]});var bO=dt({defaultClassName:"_1p5zdvr0",variantClassNames:{withShadow:{true:"_1p5zdvr1"},align:{left:"_1p5zdvr2",center:"_1p5zdvr3",right:"_1p5zdvr4"}},defaultVariants:{withShadow:!1,align:"left"},compoundVariants:[]});const od=l.createContext({index:0,setIndex:()=>null}),id=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 M.jsx(h,{"data-test-id":s["data-test-id"],as:e,ref:c,className:Ie(bO({withShadow:n,align:i})),...s,children:M.jsx(od.Provider,{value:m,children:f})})});id.displayName="Tabs";id.defaultProps={as:"ul",defaultIndex:0,index:0,align:"left",withShadow:!1,children:void 0,onChange:()=>null,"data-test-id":void 0};const ad=l.forwardRef(({as:e,children:t,...n},r)=>{const{index:o,setIndex:i}=l.useContext(od),a=l.useCallback(u=>{i==null||i(u)},[i]),s=n["data-index"]===o,c=e||"li";return M.jsx(c,{"data-test-id":n["data-test-id"],as:e,ref:r,onClick:()=>a(n["data-index"]||0),className:Ie(yO({isActive:s})),...n,children:M.jsx(sn,{as:"span",textStyle:"body2",children:t})})});ad.displayName="TabItem";ad.defaultProps={as:"li","data-index":void 0,"data-test-id":void 0};const hy="ToastProvider",[sd,wO,EO]=Ja("Toast"),[py,MP]=mn("Toast",[EO]),[xO,Os]=py(hy),vy=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(sd.Provider,{scope:t},l.createElement(xO,{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))};vy.propTypes={label(e){if(e.label&&typeof e.label=="string"&&!e.label.trim()){const t=`Invalid prop \`label\` supplied to \`${hy}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const _O="ToastViewport",SO=["F8"],lu="toast.viewportPause",du="toast.viewportResume",CO=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=SO,label:o="Notifications ({hotkey})",...i}=e,a=Os(_O,n),s=wO(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(lu);S.dispatchEvent(D),a.isClosePausedRef.current=!0}},E=()=>{if(a.isClosePausedRef.current){const D=new CustomEvent(du);S.dispatchEvent(D),a.isClosePausedRef.current=!1}},C=D=>{!T.contains(D.relatedTarget)&&E()},I=()=>{T.contains(document.activeElement)||E()};return T.addEventListener("focusin",v),T.addEventListener("focusout",C),T.addEventListener("pointermove",v),T.addEventListener("pointerleave",I),window.addEventListener("blur",v),window.addEventListener("focus",E),()=>{T.removeEventListener("focusin",v),T.removeEventListener("focusout",C),T.removeEventListener("pointermove",v),T.removeEventListener("pointerleave",I),window.removeEventListener("blur",v),window.removeEventListener("focus",E)}}},[b,a.isClosePausedRef]);const y=l.useCallback(({tabbingDirection:T})=>{const v=s().map(E=>{const C=E.ref.current,I=[C,...VO(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 E=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!E){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 w=y({tabbingDirection:k?"backwards":"forwards"}),p=w.findIndex($=>$===F);if(bc(w.slice(p+1)))v.preventDefault();else{var D,A;k?(D=u.current)===null||D===void 0||D.focus():(A=d.current)===null||A===void 0||A.focus()}}};return T.addEventListener("keydown",S),()=>T.removeEventListener("keydown",S)}},[s,y]),l.createElement(Z0,{ref:c,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:b?void 0:"none"}},b&&l.createElement(dp,{ref:u,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"forwards"});bc(T)}}),l.createElement(sd.Slot,{scope:n},l.createElement(Ke.ol,ae({tabIndex:-1},i,{ref:m}))),b&&l.createElement(dp,{ref:d,onFocusFromOutsideViewport:()=>{const T=y({tabbingDirection:"backwards"});bc(T)}}))}),$O="ToastFocusProxy",dp=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Os($O,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",TO="toast.swipeStart",IO="toast.swipeMove",RO="toast.swipeCancel",OO="toast.swipeEnd",PO=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(my,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)})})))}),[AO,DO]=py(Ps,{onClose(){}}),my=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($)),E=l.useRef(null),C=l.useRef(null),I=o||y.duration,D=l.useRef(0),A=l.useRef(I),F=l.useRef(0),{onToastAdd:k,onToastRemove:B}=y,R=cn(()=>{var $;(T==null?void 0:T.contains(document.activeElement))&&(($=y.viewport)===null||$===void 0||$.focus()),a()}),w=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 P=()=>{w(A.current),u==null||u()},j=()=>{const W=new Date().getTime()-D.current;A.current=A.current-W,window.clearTimeout(F.current),c==null||c()};return $.addEventListener(lu,j),$.addEventListener(du,P),()=>{$.removeEventListener(lu,j),$.removeEventListener(du,P)}}},[y.viewport,I,c,u,w]),l.useEffect(()=>{i&&!y.isClosePausedRef.current&&w(I)},[i,I,y.isClosePausedRef,w]),l.useEffect(()=>(k(),()=>B()),[k,B]);const p=l.useMemo(()=>T?yy(T):null,[T]);return y.viewport?l.createElement(l.Fragment,null,p&&l.createElement(NO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},p),l.createElement(AO,{scope:n,onClose:R},hn.createPortal(l.createElement(sd.ItemSlot,{scope:n},l.createElement(G0,{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&&(E.current={x:$.clientX,y:$.clientY})}),onPointerMove:Ae(e.onPointerMove,$=>{if(!E.current)return;const P=$.clientX-E.current.x,j=$.clientY-E.current.y,W=!!C.current,Y=["left","right"].includes(y.swipeDirection),ne=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,H=Y?ne(0,P):0,L=Y?0:ne(0,j),oe=$.pointerType==="touch"?10:2,G={x:H,y:L},K={originalEvent:$,delta:G};W?(C.current=G,da(IO,f,K,{discrete:!1})):fp(G,y.swipeDirection,oe)?(C.current=G,da(TO,d,K,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(P)>oe||Math.abs(j)>oe)&&(E.current=null)}),onPointerUp:Ae(e.onPointerUp,$=>{const P=C.current,j=$.target;if(j.hasPointerCapture($.pointerId)&&j.releasePointerCapture($.pointerId),C.current=null,E.current=null,P){const W=$.currentTarget,Y={originalEvent:$,delta:P};fp(P,y.swipeDirection,y.swipeThreshold)?da(OO,h,Y,{discrete:!0}):da(RO,m,Y,{discrete:!0}),W.addEventListener("click",ne=>ne.preventDefault(),{once:!0})}})})))),y.viewport))):null});my.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 NO=e=>{const{__scopeToast:t,children:n,...r}=e,o=Os(Ps,t),[i,a]=l.useState(!1),[s,c]=l.useState(!1);return LO(()=>a(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:l.createElement(Jp,{asChild:!0},l.createElement(ds,r,i&&l.createElement(l.Fragment,null,o.label," ",n)))},kO="ToastAction",cd=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?l.createElement(gy,{altText:n,asChild:!0},l.createElement(jO,ae({},r,{ref:t}))):null});cd.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${kO}\``)}};const MO="ToastClose",jO=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=DO(MO,n);return l.createElement(gy,{asChild:!0},l.createElement(Ke.button,ae({type:"button"},r,{ref:t,onClick:Ae(e.onClick,o.onClose)})))}),gy=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 yy(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),FO(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(...yy(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?wp(o,i):o.dispatchEvent(i)}const fp=(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 LO(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 FO(e){return e.nodeType===e.ELEMENT_NODE}function VO(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 bc(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}const BO=vy,by=CO,wy=PO,HO=cd;var WO="_10z4js29",zO=dt({defaultClassName:"_10z4js25",variantClassNames:{color:{neutral:"_10z4js26",negative:"_10z4js27"}},defaultVariants:{color:"neutral"},compoundVariants:[]}),UO="_10z4js28",YO="_10z4js2a";const Ey=BO,ud=l.forwardRef(({className:e,...t},n)=>M.jsx(by,{ref:n,className:Ie(YO,e),...t}));ud.displayName=by.displayName;const As=l.forwardRef(({className:e,color:t="neutral",...n},r)=>M.jsx(wy,{ref:r,className:Ie(zO({color:t}),e),...n}));As.displayName=wy.displayName;As.defaultProps={viewPort:void 0,actionClassName:void 0};const ld=l.forwardRef(({className:e,...t},n)=>M.jsx(cd,{ref:n,className:Ie(e),...t}));ld.displayName=HO.displayName;const KO=1,qO=1e6,qn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let wc=0;function XO(){return wc=(wc+1)%Number.MAX_VALUE,wc.toString()}const Ec=new Map,hp=e=>{if(Ec.has(e))return;const t=setTimeout(()=>{Ec.delete(e),ai({type:qn.REMOVE_TOAST,toastId:e})},qO);Ec.set(e,t)};function xy(e,t){switch(t.type){case qn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,KO)};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?hp(n):e.toasts.forEach(r=>{hp(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=xy($a,e),Ca.forEach(t=>{t($a)})}function _y({...e}){const t=XO(),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 Sy(){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:_y,dismiss:n=>ai({type:qn.DISMISS_TOAST,toastId:n})}}const dd=l.forwardRef((e,t)=>{const{toasts:n,dismiss:r}=Sy();return M.jsx(Ey,{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})=>M.jsxs("div",{children:[M.jsxs(As,{ref:t,color:f,duration:u,type:d,"data-test-id":`toast-${y["data-test-id"]??""}`,...y,children:[M.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:M.jsx(sn,{textStyle:"body2",fontWeight:"$reguler",textOverflow:"ellipsis",overflow:"hidden",className:UO,children:i})}),!a&&c&&s?M.jsx(ld,{altText:s,asChild:!0,children:M.jsx(ng,{"data-test-id":`action-toast-${y["data-test-id"]??""}`,onClick:c,className:Ie(WO,h),children:s})}):a]},o),M.jsx(ud,{...m})]},o))})});dd.displayName="Toaster";const[Ds,jP]=mn("Tooltip",[us]),Ns=us(),GO="TooltipProvider",ZO=700,fu="tooltip.open",[QO,fd]=Ds(GO),JO=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(QO,{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)},hd="Tooltip",[eP,ks]=Ds(hd),tP=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,c=fd(hd,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:A=>{A?(c.onOpen(),document.dispatchEvent(new CustomEvent(fu))):c.onClose(),i==null||i(A)}}),E=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(Gp,u,l.createElement(eP,{scope:t,contentId:m,open:S,stateAttribute:E,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))},pp="TooltipTrigger",nP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ks(pp,n),i=fd(pp,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(Zp,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)})))}),rP="TooltipPortal",[LP,oP]=Ds(rP,{forceMount:void 0}),Ci="TooltipContent",iP=l.forwardRef((e,t)=>{const n=oP(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(Cy,ae({side:o},i,{ref:t})):l.createElement(aP,ae({side:o},i,{ref:t})))}),aP=l.forwardRef((e,t)=>{const n=ks(Ci,e.__scopeTooltip),r=fd(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=dP(S,T.getBoundingClientRect()),E=fP(S,v),C=hP(y.getBoundingClientRect()),I=vP([...E,...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)),E=!pP(S,a);v?m():E&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,a,u,m]),l.createElement(Cy,ae({},e,{ref:i}))}),[sP,cP]=Ds(hd,{isInside:!1}),Cy=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(fu,d),()=>document.removeEventListener(fu,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(Qp,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(bp,null,r),l.createElement(sP,{scope:n,isInside:!0},l.createElement(r1,{id:c.contentId,role:"tooltip"},o||r))))}),uP="TooltipArrow",lP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ns(n);return cP(uP,n).isInside?null:l.createElement(t1,ae({},o,r,{ref:t}))});function dP(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 fP(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 hP(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 pP(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 vP(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),mP(t)}function mP(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 gP=JO,yP=tP,bP=nP,wP=iP,EP=lP;function vp(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function xP(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 $y(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]=$y(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 _P(e,t){var n={};if(typeof t=="object"){var r=e;$y(t,(a,s)=>{var c=xP(r,s);n[vp(c)]=String(a)})}else{var o=e;for(var i in o)n[vp(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 SP="var(--_4goys34)",CP="_4goys35",$P="_4goys36";const pd=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=$t.atoms.commonAtoms({color:r,bgColor:o}).className,S=$t.atoms.borderAtoms({borderColor:o}).className,E=o.replace("$","");return M.jsxs(yP,{defaultOpen:a,delayDuration:s,disableHoverableContent:c,onOpenChange:u,open:d,children:[M.jsx(bP,{asChild:!0,ref:y,children:n}),M.jsx(ms,{children:M.jsxs(wP,{align:e,alignOffset:t,side:f,sideOffset:m,...b,className:Ie($P,T,S),children:[M.jsxs(Yt,{gap:"$6",children:[h&&M.jsx(Yt,{width:"$24",children:M.jsx(D0,{size:24})}),i]}),M.jsx(EP,{className:CP,style:_P({[SP]:$t.theme.colors[E]})})]})})]})});pd.displayName="Tooltip";pd.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 vd=({children:e})=>M.jsxs(gP,{children:[e,M.jsx(dd,{})]});vd.displayName="RadixProvider";const md=({children:e,withScrollStyles:t})=>M.jsx("div",{id:"voila-ui",style:{fontFamily:$t.theme.fonts.poppins},className:Ie(t??$t.scrollbarStyle),children:M.jsx(vd,{children:e})});md.displayName="Provider";md.defaultProps={withScrollStyles:!1};exports.Accordion=Db;exports.AccordionContent=h0;exports.AccordionItem=p0;exports.AccordionTrigger=V0;exports.Alert=Op;exports.Badge=_u;exports.BaseSelect=Mu;exports.BottomSheet=H$;exports.Box=et;exports.Button=vo;exports.Card=yu;exports.Checkbox=Xm;exports.Chips=cl;exports.CloseButton=xo;exports.ConfirmDialogContext=dl;exports.ConfirmDialogProvider=jT;exports.Container=bu;exports.DatePicker=lI;exports.Dialog=ll;exports.Divider=fl;exports.Flex=Yt;exports.FullLoader=ig;exports.Grid=wu;exports.IconButton=ml;exports.Image=gl;exports.Input=pl;exports.Link=ng;exports.List=yl;exports.ListItem=bl;exports.Loader=GT;exports.LoaderAnimated=wl;exports.Modal=Ai;exports.ModalBody=Is;exports.ModalFooter=Rs;exports.ModalHeader=Di;exports.MultiPicker=ag;exports.Overlay=XE;exports.Picker=au;exports.Pills=Gg;exports.Portal=ms;exports.Provider=md;exports.Radio=ay;exports.RadioGroup=JR;exports.RadixProvider=vd;exports.Search=rd;exports.Select=co;exports.SelectPicker=Xg;exports.Spinner=_o;exports.Stack=Pr;exports.Switch=uy;exports.TabItem=ad;exports.Table=fy;exports.Tabs=id;exports.TabsContext=od;exports.Text=sn;exports.Textarea=vl;exports.Toast=As;exports.ToastAction=ld;exports.ToastProvider=Ey;exports.ToastViewport=ud;exports.Toaster=dd;exports.Tooltip=pd;exports.linkRecipe=tg;exports.reducer=xy;exports.toast=_y;exports.useDialog=LT;exports.useIndeterminate=sT;exports.useOnMount=Ev;exports.useRipple=sl;exports.useTableRenderer=dy;exports.useToast=Sy;
|