@ctlyst.id/voila-ui 1.56.1 → 1.56.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ Check the render method of \``+_+"`."}return""}}function an(_){{if(_!==void 0){v
24
24
 
25
25
  Check your code at `+V+":"+Q+"."}return""}}var Mn={};function Rn(_){{var V=kn();if(!V){var Q=typeof _=="string"?_:_.displayName||_.name;Q&&(V=`
26
26
 
27
- Check the top-level render call using <`+Q+">.")}return V}}function en(_,V){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var Q=Rn(V);if(Mn[Q])return;Mn[Q]=!0;var fe="";_&&_._owner&&_._owner!==ze.current&&(fe=" It was passed a child from "+h(_._owner.type)+"."),xt(_),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),xt(null)}}function tn(_,V){{if(typeof _!="object")return;if(wt(_))for(var Q=0;Q<_.length;Q++){var fe=_[Q];Jt(fe)&&en(fe,V)}else if(Jt(_))_._store&&(_._store.validated=!0);else if(_){var Se=$(_);if(typeof Se=="function"&&Se!==_.entries)for(var Pe=Se.call(_),_e;!(_e=Pe.next()).done;)Jt(_e.value)&&en(_e.value,V)}}}function nn(_){{var V=_.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===d))Q=V.propTypes;else return;if(Q){var fe=h(V);at(Q,_.props,"prop",fe,_)}else if(V.PropTypes!==void 0&&!Qt){Qt=!0;var Se=h(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Se||"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 wn(_){{for(var V=Object.keys(_.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){xt(_),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),xt(null);break}}_.ref!==null&&(xt(_),v("Invalid attribute `ref` supplied to `React.Fragment`."),xt(null))}}function dn(_,V,Q,fe,Se,Pe){{var _e=B(_);if(!_e){var we="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).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 ot=an(Se);ot?we+=ot:we+=kn();var Fe;_===null?Fe="null":wt(_)?Fe="array":_!==void 0&&_.$$typeof===t?(Fe="<"+(h(_.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Fe=typeof _,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Fe,we)}var Be=ve(_,V,Q,Se,Pe);if(Be==null)return Be;if(_e){var Ze=V.children;if(Ze!==void 0)if(fe)if(wt(Ze)){for(var Kt=0;Kt<Ze.length;Kt++)tn(Ze[Kt],_);Object.freeze&&Object.freeze(Ze)}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 tn(Ze,_)}return _===r?wn(Be):nn(Be),Be}}function Wt(_,V,Q){return dn(_,V,Q,!0)}function nr(_,V,Q){return dn(_,V,Q,!1)}var zt=nr,rr=Wt;To.Fragment=r,To.jsx=zt,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 yn(e,t=[]){let n=[];function r(i,a){const s=l.createContext(a),c=n.length;n=[...n,a];function u(d){const{scope:m,children:p,...b}=d,y=(m==null?void 0:m[e][c])||s,$=l.useMemo(()=>b,Object.values(b));return l.createElement(y.Provider,{value:$},p)}function f(d,m){const p=(m==null?void 0:m[e][c])||s,b=l.useContext(p);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}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 d=c(i)[`__scope${u}`];return{...s,...d}},{});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 bh(...e){return t=>e.forEach(n=>Ky(n,t))}function ut(...e){return l.useCallback(bh(...e),e)}const lo=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)});lo.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?bh(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});_c.displayName="SlotClone";const wh=({children:e})=>l.createElement(l.Fragment,null,e);function qy(e){return l.isValidElement(e)&&e.type===wh}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 Qa(e){const t=e+"CollectionProvider",[n,r]=yn(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:b,children:y}=p,$=l.useRef(null),x=l.useRef(new Map).current;return l.createElement(o,{scope:b,itemMap:x,collectionRef:$},y)},s=e+"CollectionSlot",c=l.forwardRef((p,b)=>{const{scope:y,children:$}=p,x=i(s,y),v=ut(b,x.collectionRef);return l.createElement(lo,{ref:v},$)}),u=e+"CollectionItemSlot",f="data-radix-collection-item",d=l.forwardRef((p,b)=>{const{scope:y,children:$,...x}=p,v=l.useRef(null),w=ut(b,v),T=i(u,y);return l.useEffect(()=>(T.itemMap.set(v,{ref:v,...x}),()=>void T.itemMap.delete(v))),l.createElement(lo,{[f]:"",ref:w},$)});function m(p){const b=i(e+"CollectionConsumer",p);return l.useCallback(()=>{const $=b.collectionRef.current;if(!$)return[];const x=Array.from($.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((T,I)=>x.indexOf(T.ref.current)-x.indexOf(I.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:c,ItemSlot:d},m,r]}function Ne(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 un(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 $n({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Gy({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=un(n),c=l.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}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=un(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"],Ue=Zy.reduce((e,t)=>{const n=l.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?lo: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 Eh(e,t){e&&vn.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=ut(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=Vi(r.current);i.current=s==="mounted"?u:"none"},[s]),Gt(()=>{const u=r.current,f=o.current;if(f!==e){const m=i.current,p=Vi(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&m!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Gt(()=>{if(t){const u=d=>{const p=Vi(r.current).includes(d.animationName);d.target===t&&p&&vn.flushSync(()=>c("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=Vi(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),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 Vi(e){return(e==null?void 0:e.animationName)||"none"}const eb=Oe["useId".toString()]||(()=>{});let tb=0;function Gn(e){const[t,n]=Oe.useState(eb());return Gt(()=>{e||n(r=>r??String(tb++))},[e]),e||(t?`radix-${t}`:"")}const xh="Collapsible",[nb,_h]=yn(xh),[rb,pu]=nb(xh),ob=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,u]=$n({prop:r,defaultProp:o,onChange:a});return l.createElement(rb,{scope:n,disabled:i,contentId:Gn(),open:c,onOpenToggle:l.useCallback(()=>u(f=>!f),[u])},l.createElement(Ue.div,ae({"data-state":hu(c),"data-disabled":i?"":void 0},s,{ref:t})))}),ib="CollapsibleTrigger",ab=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=pu(ib,n);return l.createElement(Ue.button,ae({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":hu(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ne(e.onClick,o.onOpenToggle)}))}),Sh="CollapsibleContent",sb=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=pu(Sh,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=pu(Sh,n),[s,c]=l.useState(r),u=l.useRef(null),f=ut(t,u),d=l.useRef(0),m=d.current,p=l.useRef(0),b=p.current,y=a.open||s,$=l.useRef(y),x=l.useRef();return l.useEffect(()=>{const v=requestAnimationFrame(()=>$.current=!1);return()=>cancelAnimationFrame(v)},[]),Gt(()=>{const v=u.current;if(v){x.current=x.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const w=v.getBoundingClientRect();d.current=w.height,p.current=w.width,$.current||(v.style.transitionDuration=x.current.transitionDuration,v.style.animationName=x.current.animationName),c(r)}},[a.open,r]),l.createElement(Ue.div,ae({"data-state":hu(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!y},i,{ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style}}),y&&o)});function hu(e){return e?"open":"closed"}const ub=ob,lb=ab,db=sb,fb=l.createContext(void 0);function Ja(e){const t=l.useContext(fb);return e||t||"ltr"}const br="Accordion",pb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[vu,hb,vb]=Qa(br),[es,IP]=yn(br,[vb,_h]),mu=_h(),Ch=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})))});Ch.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[$h,mb]=es(br),[Th,gb]=es(br,{collapsible:!1}),yb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...a}=e,[s,c]=$n({prop:n,defaultProp:r,onChange:o});return l.createElement($h,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:l.useCallback(()=>i&&c(""),[i,c])},l.createElement(Th,{scope:e.__scopeAccordion,collapsible:i},l.createElement(Ih,ae({},a,{ref:t}))))}),bb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a=[],s]=$n({prop:n,defaultProp:r,onChange:o}),c=l.useCallback(f=>s((d=[])=>[...d,f]),[s]),u=l.useCallback(f=>s((d=[])=>d.filter(m=>m!==f)),[s]);return l.createElement($h,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u},l.createElement(Th,{scope:e.__scopeAccordion,collapsible:!0},l.createElement(Ih,ae({},i,{ref:t}))))}),[wb,ts]=es(br),Ih=l.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...a}=e,s=l.useRef(null),c=ut(s,t),u=hb(n),d=Ja(o)==="ltr",m=Ne(e.onKeyDown,p=>{var b;if(!pb.includes(p.key))return;const y=p.target,$=u().filter(k=>{var B;return!((B=k.ref.current)!==null&&B!==void 0&&B.disabled)}),x=$.findIndex(k=>k.ref.current===y),v=$.length;if(x===-1)return;p.preventDefault();let w=x;const T=0,I=v-1,D=()=>{w=x+1,w>I&&(w=T)},A=()=>{w=x-1,w<T&&(w=I)};switch(p.key){case"Home":w=T;break;case"End":w=I;break;case"ArrowRight":i==="horizontal"&&(d?D():A());break;case"ArrowDown":i==="vertical"&&D();break;case"ArrowLeft":i==="horizontal"&&(d?A():D());break;case"ArrowUp":i==="vertical"&&A();break}const F=w%v;(b=$[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(Ue.div,ae({},a,{"data-orientation":i,ref:c,onKeyDown:r?void 0:m}))))}),Sc="AccordionItem",[Eb,gu]=es(Sc),xb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=ts(Sc,n),a=mb(Sc,n),s=mu(n),c=Gn(),u=r&&a.value.includes(r)||!1,f=i.disabled||e.disabled;return l.createElement(Eb,{scope:n,open:u,disabled:f,triggerId:c},l.createElement(ub,ae({"data-orientation":i.orientation,"data-state":Rh(u)},s,o,{ref:t,disabled:f,open:u,onOpenChange:d=>{d?a.onItemOpen(r):a.onItemClose(r)}})))}),_b="AccordionHeader",Sb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=gu(_b,n);return l.createElement(Ue.h3,ae({"data-orientation":o.orientation,"data-state":Rh(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),kd="AccordionTrigger",Cb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=gu(kd,n),a=gb(kd,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=ts(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 Rh(e){return e?"open":"closed"}const Ib=Ch,Rb=xb,Ob=Sb,Pb=Cb,Ab=Tb;function Oh(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=Oh(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Te(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Oh(e))&&(r&&(r+=" "),r+=t);return r}const Db=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ib,{id:"vds-accordion-root",className:Te("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},ns=(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:Md,flexAtoms:jd,positionAtoms:jb,radiiAtoms:Lb,shadowAtoms:Fb,sizesAtoms:Vb,spaceAtoms:Bb,typographyAtoms:Hb}=Ct.atoms,et=l.forwardRef(({as:e,children:t,className:n,isDisabled:r,isColumn:o,...i},a)=>{const s=e||"div",c=Md({display:o?"flex":i.display}),u=jd({flexWrap:o?"wrap":i.flexWrap}),{className:f,otherProps:d,style:m}=ns({commonAtoms:Md,flexAtoms:jd,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:Te(f,n),disabled:r,style:m,...d,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:Ld,spaceAtoms:Fd,commonAtoms:Vd,flexAtoms:zb}=Ct.atoms,bu=({children:e,isFluid:t,className:n,display:r,...o})=>{const a=Ld({width:"$full",maxW:t?"$full":"$lg"}),s=Fd({mx:"$auto",my:"$0"}),c=Vd({display:r}),{className:u,style:f}=ns({flexAtoms:zb,sizesAtoms:Ld,spaceAtoms:Fd,commonAtoms:Vd},o,[a,s,c]);return M.jsx("div",{className:Te("vds-container",!t&&Wb,u,n),style:f,...o,children:e})};bu.displayName="Container";bu.defaultProps={display:"block",children:null,isFluid:!1,className:void 0};const{commonAtoms:Bd,spaceAtoms:Ub,sizesAtoms:Yb,radiiAtoms:Kb,flexAtoms:qb,backgroundAtoms:Xb}=Ct.atoms,Ht=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Bd({display:"flex"}),{className:s,otherProps:c,style:u}=ns({flexAtoms:qb,commonAtoms:Bd,spaceAtoms:Ub,sizesAtoms:Yb,radiiAtoms:Kb,backgroundAtoms:Xb},r,[a]);return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Te(s,n),style:u,...c,children:t})});Ht.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};Ht.displayName="Flex";const{gridAtoms:Gb,commonAtoms:Zb,spaceAtoms:Qb,sizesAtoms:Jb,radiiAtoms:e0}=Ct.atoms,wu=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Ct.atoms.commonAtoms({display:"grid"}),{className:s,otherProps:c,style:u}=ns({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:Te(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,Hd={1:"wrap",0:"nowrap"},r0=e=>e?typeof e=="boolean"?Hd[1]:Hd[0]:void 0,Ar=l.forwardRef(({as:e="div",alignItems:t,children:n,justifyContent:r,direction:o,gap:i,wrap:a=!0,content:s,...c},u)=>{const f=n0(o),d=r0(a);return M.jsx(Ht,{ref:u,"data-test-id":c["data-test-id"],alignItems:t,display:"flex",as:e,direction:f,wrap:d,gap:i,justifyContent:r,...c,children:n})});Ar.defaultProps={as:"div",alignItems:void 0,direction:"vertical",justifyContent:void 0,gap:"4",wrap:!0,"data-test-id":void 0};Ar.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 Wd(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 zd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wd(Object(n),!0).forEach(function(r){o0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wd(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},Ke=e=>t=>{var n=e.defaultClassName,r=zd(zd({},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,f]of e.compoundVariants)i0(u,r,e.defaultVariants)&&(n+=" "+f);return n},a0=Ke({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 Xt=l.forwardRef(({as:e="p",children:t,textStyle:n,isStrikethrough:r,className:o,...i},a)=>M.jsx(et,{as:e,ref:a,className:Te(a0({textStyle:n,isStrikethrough:r}),o),...i,children:t}));Xt.displayName="Text";Xt.defaultProps={as:"p"};var s0="_13vyt6x7",c0="_13vyt6x5",u0="_13vyt6x6",l0="_13vyt6x2",d0="_13vyt6x3",f0="_13vyt6x4";const p0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ab,{id:"vds-accordion-content",className:Te(c0,t),...n,ref:r,children:M.jsx(et,{className:u0,children:e})})),h0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Rb,{id:"vds-accordion-item",className:Te(l0,t),...n,ref:r,children:e}));var Cc={exports:{}},Io={};/**
27
+ Check the top-level render call using <`+Q+">.")}return V}}function en(_,V){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var Q=Rn(V);if(Mn[Q])return;Mn[Q]=!0;var fe="";_&&_._owner&&_._owner!==ze.current&&(fe=" It was passed a child from "+h(_._owner.type)+"."),xt(_),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),xt(null)}}function tn(_,V){{if(typeof _!="object")return;if(wt(_))for(var Q=0;Q<_.length;Q++){var fe=_[Q];Jt(fe)&&en(fe,V)}else if(Jt(_))_._store&&(_._store.validated=!0);else if(_){var Se=$(_);if(typeof Se=="function"&&Se!==_.entries)for(var Pe=Se.call(_),_e;!(_e=Pe.next()).done;)Jt(_e.value)&&en(_e.value,V)}}}function nn(_){{var V=_.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===d))Q=V.propTypes;else return;if(Q){var fe=h(V);at(Q,_.props,"prop",fe,_)}else if(V.PropTypes!==void 0&&!Qt){Qt=!0;var Se=h(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Se||"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 wn(_){{for(var V=Object.keys(_.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){xt(_),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),xt(null);break}}_.ref!==null&&(xt(_),v("Invalid attribute `ref` supplied to `React.Fragment`."),xt(null))}}function dn(_,V,Q,fe,Se,Pe){{var _e=B(_);if(!_e){var we="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).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 ot=an(Se);ot?we+=ot:we+=kn();var Fe;_===null?Fe="null":wt(_)?Fe="array":_!==void 0&&_.$$typeof===t?(Fe="<"+(h(_.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Fe=typeof _,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Fe,we)}var Be=ve(_,V,Q,Se,Pe);if(Be==null)return Be;if(_e){var Ze=V.children;if(Ze!==void 0)if(fe)if(wt(Ze)){for(var Kt=0;Kt<Ze.length;Kt++)tn(Ze[Kt],_);Object.freeze&&Object.freeze(Ze)}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 tn(Ze,_)}return _===r?wn(Be):nn(Be),Be}}function Wt(_,V,Q){return dn(_,V,Q,!0)}function nr(_,V,Q){return dn(_,V,Q,!1)}var zt=nr,rr=Wt;To.Fragment=r,To.jsx=zt,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 yn(e,t=[]){let n=[];function r(i,a){const s=l.createContext(a),c=n.length;n=[...n,a];function u(d){const{scope:m,children:p,...b}=d,y=(m==null?void 0:m[e][c])||s,$=l.useMemo(()=>b,Object.values(b));return l.createElement(y.Provider,{value:$},p)}function f(d,m){const p=(m==null?void 0:m[e][c])||s,b=l.useContext(p);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}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 d=c(i)[`__scope${u}`];return{...s,...d}},{});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 bh(...e){return t=>e.forEach(n=>Ky(n,t))}function ut(...e){return l.useCallback(bh(...e),e)}const lo=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)});lo.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?bh(t,n.ref):n.ref}):l.Children.count(n)>1?l.Children.only(null):null});_c.displayName="SlotClone";const wh=({children:e})=>l.createElement(l.Fragment,null,e);function qy(e){return l.isValidElement(e)&&e.type===wh}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 Qa(e){const t=e+"CollectionProvider",[n,r]=yn(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:b,children:y}=p,$=l.useRef(null),x=l.useRef(new Map).current;return l.createElement(o,{scope:b,itemMap:x,collectionRef:$},y)},s=e+"CollectionSlot",c=l.forwardRef((p,b)=>{const{scope:y,children:$}=p,x=i(s,y),v=ut(b,x.collectionRef);return l.createElement(lo,{ref:v},$)}),u=e+"CollectionItemSlot",f="data-radix-collection-item",d=l.forwardRef((p,b)=>{const{scope:y,children:$,...x}=p,v=l.useRef(null),w=ut(b,v),T=i(u,y);return l.useEffect(()=>(T.itemMap.set(v,{ref:v,...x}),()=>void T.itemMap.delete(v))),l.createElement(lo,{[f]:"",ref:w},$)});function m(p){const b=i(e+"CollectionConsumer",p);return l.useCallback(()=>{const $=b.collectionRef.current;if(!$)return[];const x=Array.from($.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((T,I)=>x.indexOf(T.ref.current)-x.indexOf(I.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:c,ItemSlot:d},m,r]}function Ne(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 un(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 $n({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Gy({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=un(n),c=l.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}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=un(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"],Ue=Zy.reduce((e,t)=>{const n=l.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?lo: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 Eh(e,t){e&&vn.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=ut(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=Vi(r.current);i.current=s==="mounted"?u:"none"},[s]),Gt(()=>{const u=r.current,f=o.current;if(f!==e){const m=i.current,p=Vi(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&m!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Gt(()=>{if(t){const u=d=>{const p=Vi(r.current).includes(d.animationName);d.target===t&&p&&vn.flushSync(()=>c("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=Vi(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),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 Vi(e){return(e==null?void 0:e.animationName)||"none"}const eb=Oe["useId".toString()]||(()=>{});let tb=0;function Gn(e){const[t,n]=Oe.useState(eb());return Gt(()=>{e||n(r=>r??String(tb++))},[e]),e||(t?`radix-${t}`:"")}const xh="Collapsible",[nb,_h]=yn(xh),[rb,pu]=nb(xh),ob=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,u]=$n({prop:r,defaultProp:o,onChange:a});return l.createElement(rb,{scope:n,disabled:i,contentId:Gn(),open:c,onOpenToggle:l.useCallback(()=>u(f=>!f),[u])},l.createElement(Ue.div,ae({"data-state":hu(c),"data-disabled":i?"":void 0},s,{ref:t})))}),ib="CollapsibleTrigger",ab=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=pu(ib,n);return l.createElement(Ue.button,ae({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":hu(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ne(e.onClick,o.onOpenToggle)}))}),Sh="CollapsibleContent",sb=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=pu(Sh,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=pu(Sh,n),[s,c]=l.useState(r),u=l.useRef(null),f=ut(t,u),d=l.useRef(0),m=d.current,p=l.useRef(0),b=p.current,y=a.open||s,$=l.useRef(y),x=l.useRef();return l.useEffect(()=>{const v=requestAnimationFrame(()=>$.current=!1);return()=>cancelAnimationFrame(v)},[]),Gt(()=>{const v=u.current;if(v){x.current=x.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const w=v.getBoundingClientRect();d.current=w.height,p.current=w.width,$.current||(v.style.transitionDuration=x.current.transitionDuration,v.style.animationName=x.current.animationName),c(r)}},[a.open,r]),l.createElement(Ue.div,ae({"data-state":hu(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!y},i,{ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style}}),y&&o)});function hu(e){return e?"open":"closed"}const ub=ob,lb=ab,db=sb,fb=l.createContext(void 0);function Ja(e){const t=l.useContext(fb);return e||t||"ltr"}const br="Accordion",pb=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[vu,hb,vb]=Qa(br),[es,IP]=yn(br,[vb,_h]),mu=_h(),Ch=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})))});Ch.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[$h,mb]=es(br),[Th,gb]=es(br,{collapsible:!1}),yb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...a}=e,[s,c]=$n({prop:n,defaultProp:r,onChange:o});return l.createElement($h,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:c,onItemClose:l.useCallback(()=>i&&c(""),[i,c])},l.createElement(Th,{scope:e.__scopeAccordion,collapsible:i},l.createElement(Ih,ae({},a,{ref:t}))))}),bb=l.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[a=[],s]=$n({prop:n,defaultProp:r,onChange:o}),c=l.useCallback(f=>s((d=[])=>[...d,f]),[s]),u=l.useCallback(f=>s((d=[])=>d.filter(m=>m!==f)),[s]);return l.createElement($h,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u},l.createElement(Th,{scope:e.__scopeAccordion,collapsible:!0},l.createElement(Ih,ae({},i,{ref:t}))))}),[wb,ts]=es(br),Ih=l.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...a}=e,s=l.useRef(null),c=ut(s,t),u=hb(n),d=Ja(o)==="ltr",m=Ne(e.onKeyDown,p=>{var b;if(!pb.includes(p.key))return;const y=p.target,$=u().filter(k=>{var B;return!((B=k.ref.current)!==null&&B!==void 0&&B.disabled)}),x=$.findIndex(k=>k.ref.current===y),v=$.length;if(x===-1)return;p.preventDefault();let w=x;const T=0,I=v-1,D=()=>{w=x+1,w>I&&(w=T)},A=()=>{w=x-1,w<T&&(w=I)};switch(p.key){case"Home":w=T;break;case"End":w=I;break;case"ArrowRight":i==="horizontal"&&(d?D():A());break;case"ArrowDown":i==="vertical"&&D();break;case"ArrowLeft":i==="horizontal"&&(d?A():D());break;case"ArrowUp":i==="vertical"&&A();break}const F=w%v;(b=$[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(Ue.div,ae({},a,{"data-orientation":i,ref:c,onKeyDown:r?void 0:m}))))}),Sc="AccordionItem",[Eb,gu]=es(Sc),xb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=ts(Sc,n),a=mb(Sc,n),s=mu(n),c=Gn(),u=r&&a.value.includes(r)||!1,f=i.disabled||e.disabled;return l.createElement(Eb,{scope:n,open:u,disabled:f,triggerId:c},l.createElement(ub,ae({"data-orientation":i.orientation,"data-state":Rh(u)},s,o,{ref:t,disabled:f,open:u,onOpenChange:d=>{d?a.onItemOpen(r):a.onItemClose(r)}})))}),_b="AccordionHeader",Sb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=gu(_b,n);return l.createElement(Ue.h3,ae({"data-orientation":o.orientation,"data-state":Rh(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),kd="AccordionTrigger",Cb=l.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=ts(br,n),i=gu(kd,n),a=gb(kd,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=ts(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 Rh(e){return e?"open":"closed"}const Ib=Ch,Rb=xb,Ob=Sb,Pb=Cb,Ab=Tb;function Oh(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=Oh(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Te(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Oh(e))&&(r&&(r+=" "),r+=t);return r}const Db=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ib,{id:"vds-accordion-root",className:Te("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},ns=(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:Md,flexAtoms:jd,positionAtoms:jb,radiiAtoms:Lb,shadowAtoms:Fb,sizesAtoms:Vb,spaceAtoms:Bb,typographyAtoms:Hb}=Ct.atoms,et=l.forwardRef(({as:e,children:t,className:n,isDisabled:r,isColumn:o,...i},a)=>{const s=e||"div",c=Md({display:o?"flex":i.display}),u=jd({flexWrap:o?"wrap":i.flexWrap}),{className:f,otherProps:d,style:m}=ns({commonAtoms:Md,flexAtoms:jd,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:Te(f,n),disabled:r,style:m,...d,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:Ld,spaceAtoms:Fd,commonAtoms:Vd,flexAtoms:zb}=Ct.atoms,bu=({children:e,isFluid:t,className:n,display:r,...o})=>{const a=Ld({width:"$full",maxW:t?"$full":"$lg"}),s=Fd({mx:"$auto",my:"$0"}),c=Vd({display:r}),{className:u,style:f}=ns({flexAtoms:zb,sizesAtoms:Ld,spaceAtoms:Fd,commonAtoms:Vd},o,[a,s,c]);return M.jsx("div",{className:Te("vds-container",!t&&Wb,u,n),style:f,...o,children:e})};bu.displayName="Container";bu.defaultProps={display:"block",children:null,isFluid:!1,className:void 0};const{commonAtoms:Bd,spaceAtoms:Ub,sizesAtoms:Yb,radiiAtoms:Kb,flexAtoms:qb,backgroundAtoms:Xb}=Ct.atoms,Bt=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Bd({display:"flex"}),{className:s,otherProps:c,style:u}=ns({flexAtoms:qb,commonAtoms:Bd,spaceAtoms:Ub,sizesAtoms:Yb,radiiAtoms:Kb,backgroundAtoms:Xb},r,[a]);return M.jsx(i,{"data-test-id":r["data-test-id"],ref:o,className:Te(s,n),style:u,...c,children:t})});Bt.defaultProps={id:"base",as:"div",className:void 0,"data-test-id":void 0};Bt.displayName="Flex";const{gridAtoms:Gb,commonAtoms:Zb,spaceAtoms:Qb,sizesAtoms:Jb,radiiAtoms:e0}=Ct.atoms,wu=l.forwardRef(({as:e,children:t,className:n,...r},o)=>{const i=e||"div",a=Ct.atoms.commonAtoms({display:"grid"}),{className:s,otherProps:c,style:u}=ns({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:Te(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,Hd={1:"wrap",0:"nowrap"},r0=e=>e?typeof e=="boolean"?Hd[1]:Hd[0]:void 0,Ar=l.forwardRef(({as:e="div",alignItems:t,children:n,justifyContent:r,direction:o,gap:i,wrap:a=!0,content:s,...c},u)=>{const f=n0(o),d=r0(a);return M.jsx(Bt,{ref:u,"data-test-id":c["data-test-id"],alignItems:t,display:"flex",as:e,direction:f,wrap:d,gap:i,justifyContent:r,...c,children:n})});Ar.defaultProps={as:"div",alignItems:void 0,direction:"vertical",justifyContent:void 0,gap:"4",wrap:!0,"data-test-id":void 0};Ar.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 Wd(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 zd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wd(Object(n),!0).forEach(function(r){o0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wd(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},Ke=e=>t=>{var n=e.defaultClassName,r=zd(zd({},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,f]of e.compoundVariants)i0(u,r,e.defaultVariants)&&(n+=" "+f);return n},a0=Ke({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 Xt=l.forwardRef(({as:e="p",children:t,textStyle:n,isStrikethrough:r,className:o,...i},a)=>M.jsx(et,{as:e,ref:a,className:Te(a0({textStyle:n,isStrikethrough:r}),o),...i,children:t}));Xt.displayName="Text";Xt.defaultProps={as:"p"};var s0="_13vyt6x7",c0="_13vyt6x5",u0="_13vyt6x6",l0="_13vyt6x2",d0="_13vyt6x3",f0="_13vyt6x4";const p0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ab,{id:"vds-accordion-content",className:Te(c0,t),...n,ref:r,children:M.jsx(et,{className:u0,children:e})})),h0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Rb,{id:"vds-accordion-item",className:Te(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
  *
@@ -50,7 +50,7 @@ Check the render method of \``+_+"`."}return""}}function an(_){{if(_!==void 0){v
50
50
 
51
51
  Check your code at `+V+":"+Q+"."}return""}}var Mn={};function Rn(_){{var V=kn();if(!V){var Q=typeof _=="string"?_:_.displayName||_.name;Q&&(V=`
52
52
 
53
- Check the top-level render call using <`+Q+">.")}return V}}function en(_,V){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var Q=Rn(V);if(Mn[Q])return;Mn[Q]=!0;var fe="";_&&_._owner&&_._owner!==ze.current&&(fe=" It was passed a child from "+h(_._owner.type)+"."),xt(_),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),xt(null)}}function tn(_,V){{if(typeof _!="object")return;if(wt(_))for(var Q=0;Q<_.length;Q++){var fe=_[Q];Jt(fe)&&en(fe,V)}else if(Jt(_))_._store&&(_._store.validated=!0);else if(_){var Se=$(_);if(typeof Se=="function"&&Se!==_.entries)for(var Pe=Se.call(_),_e;!(_e=Pe.next()).done;)Jt(_e.value)&&en(_e.value,V)}}}function nn(_){{var V=_.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===d))Q=V.propTypes;else return;if(Q){var fe=h(V);at(Q,_.props,"prop",fe,_)}else if(V.PropTypes!==void 0&&!Qt){Qt=!0;var Se=h(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Se||"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 wn(_){{for(var V=Object.keys(_.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){xt(_),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),xt(null);break}}_.ref!==null&&(xt(_),v("Invalid attribute `ref` supplied to `React.Fragment`."),xt(null))}}function dn(_,V,Q,fe,Se,Pe){{var _e=B(_);if(!_e){var we="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).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 ot=an(Se);ot?we+=ot:we+=kn();var Fe;_===null?Fe="null":wt(_)?Fe="array":_!==void 0&&_.$$typeof===t?(Fe="<"+(h(_.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Fe=typeof _,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Fe,we)}var Be=ve(_,V,Q,Se,Pe);if(Be==null)return Be;if(_e){var Ze=V.children;if(Ze!==void 0)if(fe)if(wt(Ze)){for(var Kt=0;Kt<Ze.length;Kt++)tn(Ze[Kt],_);Object.freeze&&Object.freeze(Ze)}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 tn(Ze,_)}return _===r?wn(Be):nn(Be),Be}}function Wt(_,V,Q){return dn(_,V,Q,!0)}function nr(_,V,Q){return dn(_,V,Q,!1)}var zt=nr,rr=Wt;Bi.Fragment=r,Bi.jsx=zt,Bi.jsxs=rr}()),Bi}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?Ct.theme.colors[e.color]?Ct.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}},In=g0,y0=e=>{const{color:t,...n}=In(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}=In(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}=In(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}=In(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}=In(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})})},rs=_0,S0=e=>{const{color:t,...n}=In(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})})},C0=S0,$0=e=>{const{color:t,...n}=In(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})})},T0=$0,I0=e=>{const{color:t,...n}=In(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})})},R0=I0,O0=e=>{const{color:t,...n}=In(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})})},P0=O0,A0=e=>{const{color:t,...n}=In(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})})},D0=A0,N0=e=>{const{color:t,...n}=In(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})})},k0=N0,M0=e=>{const{color:t,...n}=In(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})})},j0=M0,L0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ob,{className:"accordion-header",id:"vds-accordion-header",children:M.jsxs(Pb,{id:"vds-accordion-trigger",className:Te(d0,t),...n,ref:r,children:[M.jsx(et,{className:f0,children:e}),M.jsx(si,{className:s0,size:24,color:Ct.theme.colors.black})]})}));var F0={success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)",warning:"var(--_1qe00b211)",error:"var(--_1qe00b214)",neutral:"var(--_1qe00b2e)"},V0=Ke({defaultClassName:"_7q2fqh0",variantClassNames:{colorScheme:{success:"_7q2fqh1",info:"_7q2fqh2",warning:"_7q2fqh3",error:"_7q2fqh4",neutral:"_7q2fqh5"}},defaultVariants:{colorScheme:"neutral"},compoundVariants:[]});const Ph=l.forwardRef(({className:e,title:t,children:n,withClose:r,colorScheme:o,onClose:i,...a},s)=>{const c="div",f=(()=>{switch(o){case"error":return R0;case"warning":return j0;case"success":return k0;default:return D0}})();return M.jsxs(c,{ref:s,className:Te(V0({colorScheme:o}),e),"data-test-id":a["data-test-id"],...a,children:[M.jsxs(Ht,{gap:"$16",children:[M.jsx(et,{display:"flex",minW:Ct.theme.space[24],children:M.jsx(f,{size:24,color:F0[o||"neutral"]})}),M.jsx(et,{pt:"$2",children:M.jsxs(Ar,{gap:"$8",children:[t&&M.jsx(Xt,{textStyle:"body2",as:"span",fontWeight:"$bold",children:t}),M.jsx(et,{children:n})]})})]}),r&&M.jsx(Ht,{pl:"$16",pt:"$4",children:M.jsx(rs,{"data-test-id":"VqcF6V40rj6neoaCMaHvB",onClick:i,cursor:"pointer",color:Ct.theme.colors.black,size:16})})]})});Ph.defaultProps={"data-test-id":void 0,title:void 0,withClose:void 0,onClose:void 0};const B0=l.forwardRef((e,t)=>{const{ratio:n=1,style:r,...o}=e;return l.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":""},l.createElement(Ue.div,ae({},o,{ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})))}),_u=({children:e,...t})=>M.jsx(B0,{...t,children:e});_u.defaultProps={children:void 0};_u.displayName="AspectRatio";var H0=Ke({defaultClassName:"_1er7sj40",variantClassNames:{colorScheme:{primary:"_1er7sj41",disabled:"_1er7sj42",yellow:"_1er7sj43",red:"_1er7sj44",blue:"_1er7sj45",neutral:"_1er7sj46"},size:{large:"_1er7sj47 _15r4f4d1oz _15r4f4d1il _15r4f4d15j _15r4f4d1bx",medium:"_1er7sj48 _15r4f4d1op _15r4f4d1ib _15r4f4d15e _15r4f4d1bs",small:"_1er7sj49 _15r4f4d1op _15r4f4d1ib _15r4f4d154 _15r4f4d1bi"},isRounded:{true:"_1er7sj4a",false:"_1er7sj4b"},variant:{primary:"_1er7sj4c",secondary:"_1er7sj4d"}},defaultVariants:{colorScheme:"primary",size:"large",variant:"primary",isRounded:!1},compoundVariants:[[{colorScheme:"primary",variant:"secondary"},"_1er7sj4e"],[{colorScheme:"disabled",variant:"secondary"},"_1er7sj4f"],[{colorScheme:"yellow",variant:"secondary"},"_1er7sj4g"],[{colorScheme:"red",variant:"secondary"},"_1er7sj4h"],[{colorScheme:"blue",variant:"secondary"},"_1er7sj4i"]]});const Su=l.forwardRef(({as:e,children:t,colorScheme:n,size:r,variant:o,isRounded:i,className:a,style:s,...c},u)=>{const f=e||"span";return M.jsx(f,{ref:u,"data-test-id":c["data-test-id"],className:Te(H0({colorScheme:n,variant:o,size:r,isRounded:i}),a),style:s,...c,children:t})});Su.defaultProps={as:"span",colorScheme:"primary",size:"large",children:void 0,"data-test-id":void 0};Su.displayName="Badge";function Kd(e,[t,n]){return Math.min(n,Math.max(t,e))}function W0(e,t=globalThis==null?void 0:globalThis.document){const n=un(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 qd;const Ah=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),os=l.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...u}=e,f=l.useContext(Ah),[d,m]=l.useState(null),p=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=l.useState({}),y=ut(t,F=>m(F)),$=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),v=$.indexOf(x),w=d?$.indexOf(d):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,I=w>=v,D=K0(F=>{const k=F.target,B=[...f.branches].some(R=>R.contains(k));!I||B||(i==null||i(F),s==null||s(F),F.defaultPrevented||c==null||c())},p),A=q0(F=>{const k=F.target;[...f.branches].some(R=>R.contains(k))||(a==null||a(F),s==null||s(F),F.defaultPrevented||c==null||c())},p);return W0(F=>{w===f.layers.size-1&&(o==null||o(F),!F.defaultPrevented&&c&&(F.preventDefault(),c()))},p),l.useEffect(()=>{if(d)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(qd=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),Xd(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=qd)}},[d,p,r,f]),l.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),Xd())},[d,f]),l.useEffect(()=>{const F=()=>b({});return document.addEventListener($c,F),()=>document.removeEventListener($c,F)},[]),l.createElement(Ue.div,ae({},u,{ref:y,style:{pointerEvents:T?I?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,D.onPointerDownCapture)}))}),Y0=l.forwardRef((e,t)=>{const n=l.useContext(Ah),r=l.useRef(null),o=ut(t,r);return l.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.createElement(Ue.div,ae({},e,{ref:o}))});function K0(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Dh(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=un(e),r=l.useRef(!1);return l.useEffect(()=>{const o=i=>{i.target&&!r.current&&Dh(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 Xd(){const e=new CustomEvent($c);document.dispatchEvent(e)}function Dh(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?Eh(o,i):o.dispatchEvent(i)}const X0=os,G0=Y0;let Ws=0;function Nh(){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:Gd()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Gd()),Ws++,()=>{Ws===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Ws--}},[])}function Gd(){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",Zd={bubbles:!1,cancelable:!0},kh=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=l.useState(null),u=un(o),f=un(i),d=l.useRef(null),m=ut(t,y=>c(y)),p=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let y=function(w){if(p.paused||!s)return;const T=w.target;s.contains(T)?d.current=T:ar(d.current,{select:!0})},$=function(w){if(p.paused||!s)return;const T=w.relatedTarget;T!==null&&(s.contains(T)||ar(d.current,{select:!0}))},x=function(w){const T=document.activeElement;for(const I of w)I.removedNodes.length>0&&(s!=null&&s.contains(T)||ar(s))};document.addEventListener("focusin",y),document.addEventListener("focusout",$);const v=new MutationObserver(x);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",$),v.disconnect()}}},[r,s,p.paused]),l.useEffect(()=>{if(s){Jd.add(p);const y=document.activeElement;if(!s.contains(y)){const x=new CustomEvent(zs,Zd);s.addEventListener(zs,u),s.dispatchEvent(x),x.defaultPrevented||(Z0(nw(Mh(s)),{select:!0}),document.activeElement===y&&ar(s))}return()=>{s.removeEventListener(zs,u),setTimeout(()=>{const x=new CustomEvent(Us,Zd);s.addEventListener(Us,f),s.dispatchEvent(x),x.defaultPrevented||ar(y??document.body,{select:!0}),s.removeEventListener(Us,f),Jd.remove(p)},0)}}},[s,u,f,p]);const b=l.useCallback(y=>{if(!n&&!r||p.paused)return;const $=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,x=document.activeElement;if($&&x){const v=y.currentTarget,[w,T]=Q0(v);w&&T?!y.shiftKey&&x===T?(y.preventDefault(),n&&ar(w,{select:!0})):y.shiftKey&&x===w&&(y.preventDefault(),n&&ar(T,{select:!0})):x===v&&y.preventDefault()}},[n,r,p.paused]);return l.createElement(Ue.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=Mh(e),n=Qd(t,e),r=Qd(t.reverse(),e);return[n,r]}function Mh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Qd(e,t){for(const n of e)if(!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 Jd=tw();function tw(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ef(e,t),e.unshift(t)},remove(t){var n;e=ef(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function ef(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,hn=Math.max,$a=Math.round,Hi=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 hn(e,vr(t,n))}function Zn(e,t){return typeof e=="function"?e(t):e}function Qn(e){return e.split("-")[0]}function go(e){return e.split("-")[1]}function Cu(e){return e==="x"?"y":"x"}function $u(e){return e==="y"?"height":"width"}function yo(e){return["top","bottom"].includes(Qn(e))?"y":"x"}function Tu(e){return Cu(yo(e))}function aw(e,t,n){n===void 0&&(n=!1);const r=go(e),o=Tu(e),i=$u(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ta(a)),[a,Ta(a)]}function sw(e){const t=Ta(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=go(e);let i=cw(Qn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ic)))),i}function Ta(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 jh(e){return typeof e!="number"?lw(e):{top:e,right:e,bottom:e,left:e}}function Ia(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function tf(e,t,n){let{reference:r,floating:o}=e;const i=yo(t),a=Tu(t),s=$u(a),c=Qn(t),u=i==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[s]/2-o[s]/2;let p;switch(c){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(go(t)){case"start":p[a]-=m*(n&&u?-1:1);break;case"end":p[a]+=m*(n&&u?-1:1);break}return p}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:f,y:d}=tf(u,r,c),m=r,p={},b=0;for(let y=0;y<s.length;y++){const{name:$,fn:x}=s[y],{x:v,y:w,data:T,reset:I}=await x({x:f,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});if(f=v??f,d=w??d,p={...p,[$]:{...p[$],...T}},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:f,y:d}=tf(u,m,c)),y=-1;continue}}return{x:f,y:d,placement:m,strategy:o,middlewareData:p}};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:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:p=0}=Zn(t,e),b=jh(p),$=s[m?d==="floating"?"reference":"floating":d],x=Ia(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement($)))==null||n?$:$.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:c})),v=d==="floating"?{...a.floating,x:r,y:o}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},I=Ia(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:w,strategy:c}):v);return{top:(x.top-I.top+b.top)/T.y,bottom:(I.bottom-x.bottom+b.bottom)/T.y,left:(x.left-I.left+b.left)/T.x,right:(I.right-x.right+b.right)/T.x}}const nf=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}=Zn(e,t)||{};if(c==null)return{};const f=jh(u),d={x:n,y:r},m=Tu(o),p=$u(m),b=await a.getDimensions(c),y=m==="y",$=y?"top":"left",x=y?"bottom":"right",v=y?"clientHeight":"clientWidth",w=i.reference[p]+i.reference[m]-d[m]-i.floating[p],T=d[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[p]);const A=w/2-T/2,F=D/2-b[p]/2-1,k=vr(f[$],F),B=vr(f[x],F),R=k,E=D-b[p]-B,h=D/2-b[p]/2+A,C=Tc(R,h,E),j=go(o)!=null&&h!=C&&i.reference[p]/2-(h<R?k:B)-b[p]/2<0?h<R?R-h:E-h:0;return{[m]:d[m]-j,data:{[m]:C,centerOffset:h-C+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:f=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...y}=Zn(e,t),$=Qn(r),x=Qn(a)===a,v=await(s.isRTL==null?void 0:s.isRTL(c.floating)),w=d||(x||!b?[Ta(a)]:sw(a));!d&&p!=="none"&&w.push(...uw(a,b,p,v));const T=[a,...w],I=await ci(t,y),D=[];let A=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&D.push(I[$]),f){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,E=T[R];if(E)return{data:{index:R,overflows:A},reset:{placement:E}};let h=(k=A.filter(C=>C.overflows[0]<=0).sort((C,P)=>C.overflows[1]-P.overflows[1])[0])==null?void 0:k.placement;if(!h)switch(m){case"bestFit":{var B;const C=(B=A.map(P=>[P.placement,P.overflows.filter(j=>j>0).reduce((j,H)=>j+H,0)]).sort((P,j)=>P[1]-j[1])[0])==null?void 0:B[0];C&&(h=C);break}case"initialPlacement":h=a;break}if(r!==h)return{reset:{placement:h}}}return{}}}};function rf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function of(e){return rw.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}=Zn(e,t);switch(r){case"referenceHidden":{const i=await ci(t,{...o,elementContext:"reference"}),a=rf(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:of(a)}}}case"escaped":{const i=await ci(t,{...o,altBoundary:!0}),a=rf(i,n.floating);return{data:{escapedOffsets:a,escaped:of(a)}}}default:return{}}}}};async function hw(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Qn(n),s=go(n),c=yo(n)==="y",u=["left","top"].includes(a)?-1:1,f=i&&c?-1:1,d=Zn(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof b=="number"&&(p=s==="end"?b*-1:b),c?{x:p*f,y:m*u}:{x:m*u,y:p*f}}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 hw(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:$=>{let{x,y:v}=$;return{x,y:v}}},...c}=Zn(e,t),u={x:n,y:r},f=await ci(t,c),d=yo(Qn(o)),m=Cu(d);let p=u[m],b=u[d];if(i){const $=m==="y"?"top":"left",x=m==="y"?"bottom":"right",v=p+f[$],w=p-f[x];p=Tc(v,p,w)}if(a){const $=d==="y"?"top":"left",x=d==="y"?"bottom":"right",v=b+f[$],w=b-f[x];b=Tc(v,b,w)}const y=s.fn({...t,[m]:p,[d]: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}=Zn(e,t),f={x:n,y:r},d=yo(o),m=Cu(d);let p=f[m],b=f[d];const y=Zn(s,t),$=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const w=m==="y"?"height":"width",T=i.reference[m]-i.floating[w]+$.mainAxis,I=i.reference[m]+i.reference[w]-$.mainAxis;p<T?p=T:p>I&&(p=I)}if(u){var x,v;const w=m==="y"?"width":"height",T=["top","left"].includes(Qn(o)),I=i.reference[d]-i.floating[w]+(T&&((x=a.offset)==null?void 0:x[d])||0)+(T?0:$.crossAxis),D=i.reference[d]+i.reference[w]+(T?0:((v=a.offset)==null?void 0:v[d])||0)-(T?$.crossAxis:0);b<I?b=I:b>D&&(b=D)}return{[m]:p,[d]: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}=Zn(e,t),c=await ci(t,s),u=Qn(n),f=go(n),d=yo(n)==="y",{width:m,height:p}=r.floating;let b,y;u==="top"||u==="bottom"?(b=u,y=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,b=f==="end"?"top":"bottom");const $=p-c[b],x=m-c[y],v=!t.middlewareData.shift;let w=$,T=x;if(d){const D=m-c.left-c.right;T=f||v?vr(x,D):D}else{const D=p-c.top-c.bottom;w=f||v?vr($,D):D}if(v&&!f){const D=hn(c.left,0),A=hn(c.right,0),F=hn(c.top,0),k=hn(c.bottom,0);d?T=m-2*(D!==0||A!==0?D+A:hn(c.left,c.right)):w=p-2*(F!==0||k!==0?F+k:hn(c.top,c.bottom))}await a({...t,availableWidth:T,availableHeight:w});const I=await o.getDimensions(i.floating);return m!==I.width||p!==I.height?{reset:{rects:!0}}:{}}}};function gr(e){return Lh(e)?(e.nodeName||"").toLowerCase():"#document"}function gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function er(e){var t;return(t=(Lh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lh(e){return e instanceof Node||e instanceof gn(e).Node}function Jn(e){return e instanceof Element||e instanceof gn(e).Element}function Bn(e){return e instanceof HTMLElement||e instanceof gn(e).HTMLElement}function af(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gn(e).ShadowRoot}function $i(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Tn(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 Iu(e){const t=Ru(),n=Tn(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=fo(e);for(;Bn(t)&&!is(t);){if(Iu(t))return t;t=fo(t)}return null}function Ru(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function is(e){return["html","body","#document"].includes(gr(e))}function Tn(e){return gn(e).getComputedStyle(e)}function as(e){return Jn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function fo(e){if(gr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||af(e)&&e.host||er(e);return af(t)?t.host:t}function Fh(e){const t=fo(e);return is(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bn(t)&&$i(t)?t:Fh(t)}function Ra(e,t){var n;t===void 0&&(t=[]);const r=Fh(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=gn(r);return o?t.concat(i,i.visualViewport||[],$i(r)?r:[]):t.concat(r,Ra(r))}function Vh(e){const t=Tn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Bn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=$a(n)!==i||$a(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ou(e){return Jn(e)?e:e.contextElement}function oo(e){const t=Ou(e);if(!Bn(t))return mr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Vh(t);let a=(i?$a(n.width):n.width)/r,s=(i?$a(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 Bh(e){const t=gn(e);return!Ru()||!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!==gn(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ou(e);let a=mr(1);t&&(r?Jn(r)&&(a=oo(r)):a=oo(e));const s=xw(i,n,r)?Bh(i):mr(0);let c=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(i){const m=gn(i),p=r&&Jn(r)?gn(r):r;let b=m.frameElement;for(;b&&r&&p!==m;){const y=oo(b),$=b.getBoundingClientRect(),x=Tn(b),v=$.left+(b.clientLeft+parseFloat(x.paddingLeft))*y.x,w=$.top+(b.clientTop+parseFloat(x.paddingTop))*y.y;c*=y.x,u*=y.y,f*=y.x,d*=y.y,c+=v,u+=w,b=gn(b).frameElement}}return Ia({width:f,height:d,x:c,y:u})}function _w(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Bn(n),i=er(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=as(n)),Bn(n))){const u=Mr(n);s=oo(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 Hh(e){return Mr(er(e)).left+as(e).scrollLeft}function Cw(e){const t=er(e),n=as(e),r=e.ownerDocument.body,o=hn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=hn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Hh(e);const s=-n.scrollTop;return Tn(r).direction==="rtl"&&(a+=hn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function $w(e,t){const n=gn(e),r=er(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=Ru();(!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=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Bn(e)?oo(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 sf(e,t,n){let r;if(t==="viewport")r=$w(e,n);else if(t==="document")r=Cw(er(e));else if(Jn(t))r=Tw(t,n);else{const o=Bh(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ia(r)}function Wh(e,t){const n=fo(e);return n===t||!Jn(n)||is(n)?!1:Tn(n).position==="fixed"||Wh(n,t)}function Iw(e,t){const n=t.get(e);if(n)return n;let r=Ra(e).filter(s=>Jn(s)&&gr(s)!=="body"),o=null;const i=Tn(e).position==="fixed";let a=i?fo(e):e;for(;Jn(a)&&!is(a);){const s=Tn(a),c=Iu(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||$i(a)&&!c&&Wh(e,a))?r=r.filter(f=>f!==a):o=s,a=fo(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,f)=>{const d=sf(t,f,o);return u.top=hn(d.top,u.top),u.right=vr(d.right,u.right),u.bottom=vr(d.bottom,u.bottom),u.left=hn(d.left,u.left),u},sf(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ow(e){return Vh(e)}function Pw(e,t,n){const r=Bn(t),o=er(t),i=n==="fixed",a=Mr(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=as(t)),r){const u=Mr(t,!0,i,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=Hh(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function cf(e,t){return!Bn(e)||Tn(e).position==="fixed"?null:t?t(e):e.offsetParent}function zh(e,t){const n=gn(e);if(!Bn(e))return n;let r=cf(e,t);for(;r&&bw(r)&&Tn(r).position==="static";)r=cf(r,t);return r&&(gr(r)==="html"||gr(r)==="body"&&Tn(r).position==="static"&&!Iu(r))?n:r||ww(e)||n}const Aw=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||zh,i=this.getDimensions;return{reference:Pw(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Dw(e){return Tn(e).direction==="rtl"}const Nw={convertOffsetParentRelativeRectToViewportRelativeRect:_w,getDocumentElement:er,getClippingRect:Rw,getOffsetParent:zh,getElementRects:Aw,getClientRects:Sw,getDimensions:Ow,getScale:oo,isElement:Jn,isRTL:Dw};function kw(e,t){let n=null,r;const o=er(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:f,width:d,height:m}=e.getBoundingClientRect();if(s||t(),!d||!m)return;const p=Hi(f),b=Hi(o.clientWidth-(u+d)),y=Hi(o.clientHeight-(f+m)),$=Hi(u),v={rootMargin:-p+"px "+-b+"px "+-y+"px "+-$+"px",threshold:hn(0,vr(1,c))||1};let w=!0;function T(I){const D=I[0].intersectionRatio;if(D!==c){if(!w)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(T,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,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=Ou(e),f=o||i?[...u?Ra(u):[],...Ra(t)]:[];f.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const d=u&&s?kw(u,n):null;let m=-1,p=null;a&&(p=new ResizeObserver(x=>{let[v]=x;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let b,y=c?Mr(e):null;c&&$();function $(){const x=Mr(e);y&&(x.x!==y.x||x.y!==y.y||x.width!==y.width||x.height!==y.height)&&n(),y=x,b=requestAnimationFrame($)}return n(),()=>{f.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d&&d(),p&&p.disconnect(),p=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?nf({element:r.current,padding:o}).fn(n):{}:r?nf({element:r,padding:o}).fn(n):{}}}};var da=typeof document<"u"?l.useLayoutEffect:l.useEffect;function Oa(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(!Oa(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)&&!Oa(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Uh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uf(e,t){const n=Uh(e);return Math.round(t*n)/n}function lf(e){const t=Oe.useRef(e);return da(()=>{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,[f,d]=Oe.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=Oe.useState(r);Oa(m,r)||p(r);const[b,y]=Oe.useState(null),[$,x]=Oe.useState(null),v=Oe.useCallback(j=>{j!=D.current&&(D.current=j,y(j))},[y]),w=Oe.useCallback(j=>{j!==A.current&&(A.current=j,x(j))},[x]),T=i||b,I=a||$,D=Oe.useRef(null),A=Oe.useRef(null),F=Oe.useRef(f),k=lf(c),B=lf(o),R=Oe.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(H=>{const Y={...H,isPositioned:!0};E.current&&!Oa(F.current,Y)&&(F.current=Y,Hy.flushSync(()=>{d(Y)}))})},[m,t,n,B]);da(()=>{u===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[u]);const E=Oe.useRef(!1);da(()=>(E.current=!0,()=>{E.current=!1}),[]),da(()=>{if(T&&(D.current=T),I&&(A.current=I),T&&I){if(k.current)return k.current(T,I,R);R()}},[T,I,R,k]);const h=Oe.useMemo(()=>({reference:D,floating:A,setReference:v,setFloating:w}),[v,w]),C=Oe.useMemo(()=>({reference:T,floating:I}),[T,I]),P=Oe.useMemo(()=>{const j={position:n,left:0,top:0};if(!C.floating)return j;const H=uf(C.floating,f.x),Y=uf(C.floating,f.y);return s?{...j,transform:"translate("+H+"px, "+Y+"px)",...Uh(C.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:Y}},[n,s,C.floating,f.x,f.y]);return Oe.useMemo(()=>({...f,update:R,refs:h,elements:C,floatingStyles:P}),[f,R,h,C,P])}const Vw=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return l.createElement(Ue.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 ss(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 Yh="Popper",[Kh,cs]=yn(Yh),[Hw,qh]=Kh(Yh),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=qh(zw,n),a=l.useRef(null),s=ut(t,a);return l.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:l.createElement(Ue.div,ae({},o,{ref:s}))}),Xh="PopperContent",[Yw,Kw]=Kh(Xh),qw=l.forwardRef((e,t)=>{var n,r,o,i,a,s,c,u;const{__scopePopper:f,side:d="bottom",sideOffset:m=0,align:p="center",alignOffset:b=0,arrowPadding:y=0,collisionBoundary:$=[],collisionPadding:x=0,sticky:v="partial",hideWhenDetached:w=!1,avoidCollisions:T=!0,onPlaced:I,...D}=e,A=qh(Xh,f),[F,k]=l.useState(null),B=ut(t,xe=>k(xe)),[R,E]=l.useState(null),h=ss(R),C=(n=h==null?void 0:h.width)!==null&&n!==void 0?n:0,P=(r=h==null?void 0:h.height)!==null&&r!==void 0?r:0,j=d+(p!=="center"?"-"+p:""),H=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},Y=Array.isArray($)?$:[$],oe=Y.length>0,W={padding:H,boundary:Y.filter(Qw),altBoundary:oe},{refs:L,floatingStyles:J,placement:U,isPositioned:K,middlewareData:Z}=Fw({strategy:"fixed",placement:j,whileElementsMounted:Mw,elements:{reference:A.anchor},middleware:[vw({mainAxis:m+P,alignmentAxis:b}),T&&mw({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?gw():void 0,...W}),T&&fw({...W}),yw({...W,apply:({elements:xe,rects:Ee,availableWidth:Ae,availableHeight:Ie})=>{const{width:Le,height:ke}=Ee.reference,at=xe.floating.style;at.setProperty("--radix-popper-available-width",`${Ae}px`),at.setProperty("--radix-popper-available-height",`${Ie}px`),at.setProperty("--radix-popper-anchor-width",`${Le}px`),at.setProperty("--radix-popper-anchor-height",`${ke}px`)}}),R&&Lw({element:R,padding:y}),Jw({arrowWidth:C,arrowHeight:P}),w&&pw({strategy:"referenceHidden"})]}),[ce,z]=Gh(U),G=un(I);Gt(()=>{K&&(G==null||G())},[K,G]);const re=(o=Z.arrow)===null||o===void 0?void 0:o.x,ne=(i=Z.arrow)===null||i===void 0?void 0:i.y,ie=((a=Z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[ee,pe]=l.useState();return Gt(()=>{F&&pe(window.getComputedStyle(F).zIndex)},[F]),l.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:K?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(s=Z.transformOrigin)===null||s===void 0?void 0:s.x,(c=Z.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},l.createElement(Yw,{scope:f,placedSide:ce,onArrowChange:E,arrowX:re,arrowY:ne,shouldHideArrow:ie},l.createElement(Ue.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,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=d?0:e.arrowWidth,p=d?0:e.arrowHeight,[b,y]=Gh(s),$={start:"0%",center:"50%",end:"100%"}[y],x=((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)+p/2;let w="",T="";return b==="bottom"?(w=d?$:`${x}px`,T=`${-p}px`):b==="top"?(w=d?$:`${x}px`,T=`${c.floating.height+p}px`):b==="right"?(w=`${-p}px`,T=d?$:`${v}px`):b==="left"&&(w=`${c.floating.width+p}px`,T=d?$:`${v}px`),{data:{x:w,y:T}}}});function Gh(e){const[t,n="center"]=e.split("-");return[t,n]}const Zh=Ww,Qh=Uw,Jh=qw,e1=Zw,ev=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?vn.createPortal(l.createElement(Ue.div,ae({},o,{ref:t})),r):null}),t1=ev;function us(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 ls=l.forwardRef((e,t)=>l.createElement(Ue.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=ls;var r1=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ur=new WeakMap,Wi=new WeakMap,zi={},Ys=0,tv=function(e){return e&&(e.host||tv(e.parentNode))},o1=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=tv(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]);zi[n]||(zi[n]=new WeakMap);var i=zi[n],a=[],s=new Set,c=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(m){if(s.has(m))f(m);else{var p=m.getAttribute(r),b=p!==null&&p!=="false",y=(Ur.get(m)||0)+1,$=(i.get(m)||0)+1;Ur.set(m,y),i.set(m,$),a.push(m),y===1&&b&&Wi.set(m,!0),$===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return f(t),s.clear(),Ys++,function(){a.forEach(function(d){var m=Ur.get(d)-1,p=i.get(d)-1;Ur.set(d,m),i.set(d,p),m||(Wi.has(d)||d.removeAttribute(r),Wi.delete(d)),p||d.removeAttribute(n)}),Ys--,Ys||(Ur=new WeakMap,Ur=new WeakMap,Wi=new WeakMap,zi={})}},nv=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}},Sn=function(){return Sn=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},Sn.apply(this,arguments)};function rv(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 fa="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 p1(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 f=a;a=[],f.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),n}}}};return o}function h1(e){e===void 0&&(e={});var t=p1(null);return t.options=Sn({async:!0,ssr:!1},e),t}var ov=function(e){var t=e.sideCar,n=rv(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 Oe.createElement(r,Sn({},n))};ov.isSideCarExport=!0;function v1(e,t){return e.useMedium(t),ov}var iv=h1(),Ks=function(){},ds=Oe.forwardRef(function(e,t){var n=Oe.useRef(null),r=Oe.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,f=e.enabled,d=e.shards,m=e.sideCar,p=e.noIsolation,b=e.inert,y=e.allowPinchZoom,$=e.as,x=$===void 0?"div":$,v=rv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=m,T=d1([n,t]),I=Sn(Sn({},v),o);return Oe.createElement(Oe.Fragment,null,f&&Oe.createElement(w,{sideCar:iv,removeScrollBar:u,shards:d,noIsolation:p,inert:b,setCallbacks:i,allowPinchZoom:!!y,lockRef:n}),a?Oe.cloneElement(Oe.Children.only(s),Sn(Sn({},I),{ref:T})):Oe.createElement(x,Sn({},I,{className:c,ref:T}),s))});ds.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ds.classNames={fullWidth:pa,zeroRight:fa};var df,m1=function(){if(df)return df;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){Oe.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},av=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=av(),$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"),`
53
+ Check the top-level render call using <`+Q+">.")}return V}}function en(_,V){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var Q=Rn(V);if(Mn[Q])return;Mn[Q]=!0;var fe="";_&&_._owner&&_._owner!==ze.current&&(fe=" It was passed a child from "+h(_._owner.type)+"."),xt(_),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),xt(null)}}function tn(_,V){{if(typeof _!="object")return;if(wt(_))for(var Q=0;Q<_.length;Q++){var fe=_[Q];Jt(fe)&&en(fe,V)}else if(Jt(_))_._store&&(_._store.validated=!0);else if(_){var Se=$(_);if(typeof Se=="function"&&Se!==_.entries)for(var Pe=Se.call(_),_e;!(_e=Pe.next()).done;)Jt(_e.value)&&en(_e.value,V)}}}function nn(_){{var V=_.type;if(V==null||typeof V=="string")return;var Q;if(typeof V=="function")Q=V.propTypes;else if(typeof V=="object"&&(V.$$typeof===c||V.$$typeof===d))Q=V.propTypes;else return;if(Q){var fe=h(V);at(Q,_.props,"prop",fe,_)}else if(V.PropTypes!==void 0&&!Qt){Qt=!0;var Se=h(V);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Se||"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 wn(_){{for(var V=Object.keys(_.props),Q=0;Q<V.length;Q++){var fe=V[Q];if(fe!=="children"&&fe!=="key"){xt(_),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),xt(null);break}}_.ref!==null&&(xt(_),v("Invalid attribute `ref` supplied to `React.Fragment`."),xt(null))}}function dn(_,V,Q,fe,Se,Pe){{var _e=B(_);if(!_e){var we="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).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 ot=an(Se);ot?we+=ot:we+=kn();var Fe;_===null?Fe="null":wt(_)?Fe="array":_!==void 0&&_.$$typeof===t?(Fe="<"+(h(_.type)||"Unknown")+" />",we=" Did you accidentally export a JSX literal instead of a component?"):Fe=typeof _,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Fe,we)}var Be=ve(_,V,Q,Se,Pe);if(Be==null)return Be;if(_e){var Ze=V.children;if(Ze!==void 0)if(fe)if(wt(Ze)){for(var Kt=0;Kt<Ze.length;Kt++)tn(Ze[Kt],_);Object.freeze&&Object.freeze(Ze)}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 tn(Ze,_)}return _===r?wn(Be):nn(Be),Be}}function Wt(_,V,Q){return dn(_,V,Q,!0)}function nr(_,V,Q){return dn(_,V,Q,!1)}var zt=nr,rr=Wt;Bi.Fragment=r,Bi.jsx=zt,Bi.jsxs=rr}()),Bi}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?Ct.theme.colors[e.color]?Ct.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}},In=g0,y0=e=>{const{color:t,...n}=In(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}=In(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}=In(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}=In(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}=In(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})})},rs=_0,S0=e=>{const{color:t,...n}=In(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})})},C0=S0,$0=e=>{const{color:t,...n}=In(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})})},T0=$0,I0=e=>{const{color:t,...n}=In(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})})},R0=I0,O0=e=>{const{color:t,...n}=In(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})})},P0=O0,A0=e=>{const{color:t,...n}=In(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})})},D0=A0,N0=e=>{const{color:t,...n}=In(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})})},k0=N0,M0=e=>{const{color:t,...n}=In(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})})},j0=M0,L0=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(Ob,{className:"accordion-header",id:"vds-accordion-header",children:M.jsxs(Pb,{id:"vds-accordion-trigger",className:Te(d0,t),...n,ref:r,children:[M.jsx(et,{className:f0,children:e}),M.jsx(si,{className:s0,size:24,color:Ct.theme.colors.black})]})}));var F0={success:"var(--_1qe00b2v)",info:"var(--_1qe00b2y)",warning:"var(--_1qe00b211)",error:"var(--_1qe00b214)",neutral:"var(--_1qe00b2e)"},V0=Ke({defaultClassName:"_7q2fqh0",variantClassNames:{colorScheme:{success:"_7q2fqh1",info:"_7q2fqh2",warning:"_7q2fqh3",error:"_7q2fqh4",neutral:"_7q2fqh5"}},defaultVariants:{colorScheme:"neutral"},compoundVariants:[]});const Ph=l.forwardRef(({className:e,title:t,children:n,withClose:r,colorScheme:o,onClose:i,...a},s)=>{const c="div",f=(()=>{switch(o){case"error":return R0;case"warning":return j0;case"success":return k0;default:return D0}})();return M.jsxs(c,{ref:s,className:Te(V0({colorScheme:o}),e),"data-test-id":a["data-test-id"],...a,children:[M.jsxs(Bt,{gap:"$16",children:[M.jsx(et,{display:"flex",minW:Ct.theme.space[24],children:M.jsx(f,{size:24,color:F0[o||"neutral"]})}),M.jsx(et,{pt:"$2",children:M.jsxs(Ar,{gap:"$8",children:[t&&M.jsx(Xt,{textStyle:"body2",as:"span",fontWeight:"$bold",children:t}),M.jsx(et,{children:n})]})})]}),r&&M.jsx(Bt,{pl:"$16",pt:"$4",children:M.jsx(rs,{"data-test-id":"VqcF6V40rj6neoaCMaHvB",onClick:i,cursor:"pointer",color:Ct.theme.colors.black,size:16})})]})});Ph.defaultProps={"data-test-id":void 0,title:void 0,withClose:void 0,onClose:void 0};const B0=l.forwardRef((e,t)=>{const{ratio:n=1,style:r,...o}=e;return l.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":""},l.createElement(Ue.div,ae({},o,{ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})))}),_u=({children:e,...t})=>M.jsx(B0,{...t,children:e});_u.defaultProps={children:void 0};_u.displayName="AspectRatio";var H0=Ke({defaultClassName:"_1er7sj40",variantClassNames:{colorScheme:{primary:"_1er7sj41",disabled:"_1er7sj42",yellow:"_1er7sj43",red:"_1er7sj44",blue:"_1er7sj45",neutral:"_1er7sj46"},size:{large:"_1er7sj47 _15r4f4d1oz _15r4f4d1il _15r4f4d15j _15r4f4d1bx",medium:"_1er7sj48 _15r4f4d1op _15r4f4d1ib _15r4f4d15e _15r4f4d1bs",small:"_1er7sj49 _15r4f4d1op _15r4f4d1ib _15r4f4d154 _15r4f4d1bi"},isRounded:{true:"_1er7sj4a",false:"_1er7sj4b"},variant:{primary:"_1er7sj4c",secondary:"_1er7sj4d"}},defaultVariants:{colorScheme:"primary",size:"large",variant:"primary",isRounded:!1},compoundVariants:[[{colorScheme:"primary",variant:"secondary"},"_1er7sj4e"],[{colorScheme:"disabled",variant:"secondary"},"_1er7sj4f"],[{colorScheme:"yellow",variant:"secondary"},"_1er7sj4g"],[{colorScheme:"red",variant:"secondary"},"_1er7sj4h"],[{colorScheme:"blue",variant:"secondary"},"_1er7sj4i"]]});const Su=l.forwardRef(({as:e,children:t,colorScheme:n,size:r,variant:o,isRounded:i,className:a,style:s,...c},u)=>{const f=e||"span";return M.jsx(f,{ref:u,"data-test-id":c["data-test-id"],className:Te(H0({colorScheme:n,variant:o,size:r,isRounded:i}),a),style:s,...c,children:t})});Su.defaultProps={as:"span",colorScheme:"primary",size:"large",children:void 0,"data-test-id":void 0};Su.displayName="Badge";function Kd(e,[t,n]){return Math.min(n,Math.max(t,e))}function W0(e,t=globalThis==null?void 0:globalThis.document){const n=un(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 qd;const Ah=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),os=l.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...u}=e,f=l.useContext(Ah),[d,m]=l.useState(null),p=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=l.useState({}),y=ut(t,F=>m(F)),$=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),v=$.indexOf(x),w=d?$.indexOf(d):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,I=w>=v,D=K0(F=>{const k=F.target,B=[...f.branches].some(R=>R.contains(k));!I||B||(i==null||i(F),s==null||s(F),F.defaultPrevented||c==null||c())},p),A=q0(F=>{const k=F.target;[...f.branches].some(R=>R.contains(k))||(a==null||a(F),s==null||s(F),F.defaultPrevented||c==null||c())},p);return W0(F=>{w===f.layers.size-1&&(o==null||o(F),!F.defaultPrevented&&c&&(F.preventDefault(),c()))},p),l.useEffect(()=>{if(d)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(qd=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),Xd(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=qd)}},[d,p,r,f]),l.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),Xd())},[d,f]),l.useEffect(()=>{const F=()=>b({});return document.addEventListener($c,F),()=>document.removeEventListener($c,F)},[]),l.createElement(Ue.div,ae({},u,{ref:y,style:{pointerEvents:T?I?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,D.onPointerDownCapture)}))}),Y0=l.forwardRef((e,t)=>{const n=l.useContext(Ah),r=l.useRef(null),o=ut(t,r);return l.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),l.createElement(Ue.div,ae({},e,{ref:o}))});function K0(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Dh(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=un(e),r=l.useRef(!1);return l.useEffect(()=>{const o=i=>{i.target&&!r.current&&Dh(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 Xd(){const e=new CustomEvent($c);document.dispatchEvent(e)}function Dh(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?Eh(o,i):o.dispatchEvent(i)}const X0=os,G0=Y0;let Ws=0;function Nh(){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:Gd()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Gd()),Ws++,()=>{Ws===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Ws--}},[])}function Gd(){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",Zd={bubbles:!1,cancelable:!0},kh=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=l.useState(null),u=un(o),f=un(i),d=l.useRef(null),m=ut(t,y=>c(y)),p=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let y=function(w){if(p.paused||!s)return;const T=w.target;s.contains(T)?d.current=T:ar(d.current,{select:!0})},$=function(w){if(p.paused||!s)return;const T=w.relatedTarget;T!==null&&(s.contains(T)||ar(d.current,{select:!0}))},x=function(w){const T=document.activeElement;for(const I of w)I.removedNodes.length>0&&(s!=null&&s.contains(T)||ar(s))};document.addEventListener("focusin",y),document.addEventListener("focusout",$);const v=new MutationObserver(x);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",$),v.disconnect()}}},[r,s,p.paused]),l.useEffect(()=>{if(s){Jd.add(p);const y=document.activeElement;if(!s.contains(y)){const x=new CustomEvent(zs,Zd);s.addEventListener(zs,u),s.dispatchEvent(x),x.defaultPrevented||(Z0(nw(Mh(s)),{select:!0}),document.activeElement===y&&ar(s))}return()=>{s.removeEventListener(zs,u),setTimeout(()=>{const x=new CustomEvent(Us,Zd);s.addEventListener(Us,f),s.dispatchEvent(x),x.defaultPrevented||ar(y??document.body,{select:!0}),s.removeEventListener(Us,f),Jd.remove(p)},0)}}},[s,u,f,p]);const b=l.useCallback(y=>{if(!n&&!r||p.paused)return;const $=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,x=document.activeElement;if($&&x){const v=y.currentTarget,[w,T]=Q0(v);w&&T?!y.shiftKey&&x===T?(y.preventDefault(),n&&ar(w,{select:!0})):y.shiftKey&&x===w&&(y.preventDefault(),n&&ar(T,{select:!0})):x===v&&y.preventDefault()}},[n,r,p.paused]);return l.createElement(Ue.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=Mh(e),n=Qd(t,e),r=Qd(t.reverse(),e);return[n,r]}function Mh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Qd(e,t){for(const n of e)if(!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 Jd=tw();function tw(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ef(e,t),e.unshift(t)},remove(t){var n;e=ef(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function ef(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,hn=Math.max,$a=Math.round,Hi=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 hn(e,vr(t,n))}function Zn(e,t){return typeof e=="function"?e(t):e}function Qn(e){return e.split("-")[0]}function go(e){return e.split("-")[1]}function Cu(e){return e==="x"?"y":"x"}function $u(e){return e==="y"?"height":"width"}function yo(e){return["top","bottom"].includes(Qn(e))?"y":"x"}function Tu(e){return Cu(yo(e))}function aw(e,t,n){n===void 0&&(n=!1);const r=go(e),o=Tu(e),i=$u(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ta(a)),[a,Ta(a)]}function sw(e){const t=Ta(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=go(e);let i=cw(Qn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Ic)))),i}function Ta(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 jh(e){return typeof e!="number"?lw(e):{top:e,right:e,bottom:e,left:e}}function Ia(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function tf(e,t,n){let{reference:r,floating:o}=e;const i=yo(t),a=Tu(t),s=$u(a),c=Qn(t),u=i==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,m=r[s]/2-o[s]/2;let p;switch(c){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(go(t)){case"start":p[a]-=m*(n&&u?-1:1);break;case"end":p[a]+=m*(n&&u?-1:1);break}return p}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:f,y:d}=tf(u,r,c),m=r,p={},b=0;for(let y=0;y<s.length;y++){const{name:$,fn:x}=s[y],{x:v,y:w,data:T,reset:I}=await x({x:f,y:d,initialPlacement:r,placement:m,strategy:o,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});if(f=v??f,d=w??d,p={...p,[$]:{...p[$],...T}},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:f,y:d}=tf(u,m,c)),y=-1;continue}}return{x:f,y:d,placement:m,strategy:o,middlewareData:p}};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:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:p=0}=Zn(t,e),b=jh(p),$=s[m?d==="floating"?"reference":"floating":d],x=Ia(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement($)))==null||n?$:$.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:c})),v=d==="floating"?{...a.floating,x:r,y:o}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),T=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},I=Ia(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:w,strategy:c}):v);return{top:(x.top-I.top+b.top)/T.y,bottom:(I.bottom-x.bottom+b.bottom)/T.y,left:(x.left-I.left+b.left)/T.x,right:(I.right-x.right+b.right)/T.x}}const nf=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}=Zn(e,t)||{};if(c==null)return{};const f=jh(u),d={x:n,y:r},m=Tu(o),p=$u(m),b=await a.getDimensions(c),y=m==="y",$=y?"top":"left",x=y?"bottom":"right",v=y?"clientHeight":"clientWidth",w=i.reference[p]+i.reference[m]-d[m]-i.floating[p],T=d[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[p]);const A=w/2-T/2,F=D/2-b[p]/2-1,k=vr(f[$],F),B=vr(f[x],F),R=k,E=D-b[p]-B,h=D/2-b[p]/2+A,C=Tc(R,h,E),j=go(o)!=null&&h!=C&&i.reference[p]/2-(h<R?k:B)-b[p]/2<0?h<R?R-h:E-h:0;return{[m]:d[m]-j,data:{[m]:C,centerOffset:h-C+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:f=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...y}=Zn(e,t),$=Qn(r),x=Qn(a)===a,v=await(s.isRTL==null?void 0:s.isRTL(c.floating)),w=d||(x||!b?[Ta(a)]:sw(a));!d&&p!=="none"&&w.push(...uw(a,b,p,v));const T=[a,...w],I=await ci(t,y),D=[];let A=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&D.push(I[$]),f){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,E=T[R];if(E)return{data:{index:R,overflows:A},reset:{placement:E}};let h=(k=A.filter(C=>C.overflows[0]<=0).sort((C,P)=>C.overflows[1]-P.overflows[1])[0])==null?void 0:k.placement;if(!h)switch(m){case"bestFit":{var B;const C=(B=A.map(P=>[P.placement,P.overflows.filter(j=>j>0).reduce((j,H)=>j+H,0)]).sort((P,j)=>P[1]-j[1])[0])==null?void 0:B[0];C&&(h=C);break}case"initialPlacement":h=a;break}if(r!==h)return{reset:{placement:h}}}return{}}}};function rf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function of(e){return rw.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}=Zn(e,t);switch(r){case"referenceHidden":{const i=await ci(t,{...o,elementContext:"reference"}),a=rf(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:of(a)}}}case"escaped":{const i=await ci(t,{...o,altBoundary:!0}),a=rf(i,n.floating);return{data:{escapedOffsets:a,escaped:of(a)}}}default:return{}}}}};async function hw(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Qn(n),s=go(n),c=yo(n)==="y",u=["left","top"].includes(a)?-1:1,f=i&&c?-1:1,d=Zn(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof b=="number"&&(p=s==="end"?b*-1:b),c?{x:p*f,y:m*u}:{x:m*u,y:p*f}}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 hw(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:$=>{let{x,y:v}=$;return{x,y:v}}},...c}=Zn(e,t),u={x:n,y:r},f=await ci(t,c),d=yo(Qn(o)),m=Cu(d);let p=u[m],b=u[d];if(i){const $=m==="y"?"top":"left",x=m==="y"?"bottom":"right",v=p+f[$],w=p-f[x];p=Tc(v,p,w)}if(a){const $=d==="y"?"top":"left",x=d==="y"?"bottom":"right",v=b+f[$],w=b-f[x];b=Tc(v,b,w)}const y=s.fn({...t,[m]:p,[d]: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}=Zn(e,t),f={x:n,y:r},d=yo(o),m=Cu(d);let p=f[m],b=f[d];const y=Zn(s,t),$=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const w=m==="y"?"height":"width",T=i.reference[m]-i.floating[w]+$.mainAxis,I=i.reference[m]+i.reference[w]-$.mainAxis;p<T?p=T:p>I&&(p=I)}if(u){var x,v;const w=m==="y"?"width":"height",T=["top","left"].includes(Qn(o)),I=i.reference[d]-i.floating[w]+(T&&((x=a.offset)==null?void 0:x[d])||0)+(T?0:$.crossAxis),D=i.reference[d]+i.reference[w]+(T?0:((v=a.offset)==null?void 0:v[d])||0)-(T?$.crossAxis:0);b<I?b=I:b>D&&(b=D)}return{[m]:p,[d]: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}=Zn(e,t),c=await ci(t,s),u=Qn(n),f=go(n),d=yo(n)==="y",{width:m,height:p}=r.floating;let b,y;u==="top"||u==="bottom"?(b=u,y=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,b=f==="end"?"top":"bottom");const $=p-c[b],x=m-c[y],v=!t.middlewareData.shift;let w=$,T=x;if(d){const D=m-c.left-c.right;T=f||v?vr(x,D):D}else{const D=p-c.top-c.bottom;w=f||v?vr($,D):D}if(v&&!f){const D=hn(c.left,0),A=hn(c.right,0),F=hn(c.top,0),k=hn(c.bottom,0);d?T=m-2*(D!==0||A!==0?D+A:hn(c.left,c.right)):w=p-2*(F!==0||k!==0?F+k:hn(c.top,c.bottom))}await a({...t,availableWidth:T,availableHeight:w});const I=await o.getDimensions(i.floating);return m!==I.width||p!==I.height?{reset:{rects:!0}}:{}}}};function gr(e){return Lh(e)?(e.nodeName||"").toLowerCase():"#document"}function gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function er(e){var t;return(t=(Lh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lh(e){return e instanceof Node||e instanceof gn(e).Node}function Jn(e){return e instanceof Element||e instanceof gn(e).Element}function Bn(e){return e instanceof HTMLElement||e instanceof gn(e).HTMLElement}function af(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gn(e).ShadowRoot}function $i(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Tn(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 Iu(e){const t=Ru(),n=Tn(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=fo(e);for(;Bn(t)&&!is(t);){if(Iu(t))return t;t=fo(t)}return null}function Ru(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function is(e){return["html","body","#document"].includes(gr(e))}function Tn(e){return gn(e).getComputedStyle(e)}function as(e){return Jn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function fo(e){if(gr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||af(e)&&e.host||er(e);return af(t)?t.host:t}function Fh(e){const t=fo(e);return is(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bn(t)&&$i(t)?t:Fh(t)}function Ra(e,t){var n;t===void 0&&(t=[]);const r=Fh(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=gn(r);return o?t.concat(i,i.visualViewport||[],$i(r)?r:[]):t.concat(r,Ra(r))}function Vh(e){const t=Tn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Bn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=$a(n)!==i||$a(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ou(e){return Jn(e)?e:e.contextElement}function oo(e){const t=Ou(e);if(!Bn(t))return mr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Vh(t);let a=(i?$a(n.width):n.width)/r,s=(i?$a(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 Bh(e){const t=gn(e);return!Ru()||!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!==gn(e)?!1:t}function Mr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Ou(e);let a=mr(1);t&&(r?Jn(r)&&(a=oo(r)):a=oo(e));const s=xw(i,n,r)?Bh(i):mr(0);let c=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(i){const m=gn(i),p=r&&Jn(r)?gn(r):r;let b=m.frameElement;for(;b&&r&&p!==m;){const y=oo(b),$=b.getBoundingClientRect(),x=Tn(b),v=$.left+(b.clientLeft+parseFloat(x.paddingLeft))*y.x,w=$.top+(b.clientTop+parseFloat(x.paddingTop))*y.y;c*=y.x,u*=y.y,f*=y.x,d*=y.y,c+=v,u+=w,b=gn(b).frameElement}}return Ia({width:f,height:d,x:c,y:u})}function _w(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Bn(n),i=er(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=as(n)),Bn(n))){const u=Mr(n);s=oo(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 Hh(e){return Mr(er(e)).left+as(e).scrollLeft}function Cw(e){const t=er(e),n=as(e),r=e.ownerDocument.body,o=hn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=hn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Hh(e);const s=-n.scrollTop;return Tn(r).direction==="rtl"&&(a+=hn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function $w(e,t){const n=gn(e),r=er(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=Ru();(!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=Mr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Bn(e)?oo(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 sf(e,t,n){let r;if(t==="viewport")r=$w(e,n);else if(t==="document")r=Cw(er(e));else if(Jn(t))r=Tw(t,n);else{const o=Bh(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ia(r)}function Wh(e,t){const n=fo(e);return n===t||!Jn(n)||is(n)?!1:Tn(n).position==="fixed"||Wh(n,t)}function Iw(e,t){const n=t.get(e);if(n)return n;let r=Ra(e).filter(s=>Jn(s)&&gr(s)!=="body"),o=null;const i=Tn(e).position==="fixed";let a=i?fo(e):e;for(;Jn(a)&&!is(a);){const s=Tn(a),c=Iu(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||$i(a)&&!c&&Wh(e,a))?r=r.filter(f=>f!==a):o=s,a=fo(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,f)=>{const d=sf(t,f,o);return u.top=hn(d.top,u.top),u.right=vr(d.right,u.right),u.bottom=vr(d.bottom,u.bottom),u.left=hn(d.left,u.left),u},sf(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ow(e){return Vh(e)}function Pw(e,t,n){const r=Bn(t),o=er(t),i=n==="fixed",a=Mr(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=as(t)),r){const u=Mr(t,!0,i,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=Hh(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function cf(e,t){return!Bn(e)||Tn(e).position==="fixed"?null:t?t(e):e.offsetParent}function zh(e,t){const n=gn(e);if(!Bn(e))return n;let r=cf(e,t);for(;r&&bw(r)&&Tn(r).position==="static";)r=cf(r,t);return r&&(gr(r)==="html"||gr(r)==="body"&&Tn(r).position==="static"&&!Iu(r))?n:r||ww(e)||n}const Aw=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||zh,i=this.getDimensions;return{reference:Pw(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function Dw(e){return Tn(e).direction==="rtl"}const Nw={convertOffsetParentRelativeRectToViewportRelativeRect:_w,getDocumentElement:er,getClippingRect:Rw,getOffsetParent:zh,getElementRects:Aw,getClientRects:Sw,getDimensions:Ow,getScale:oo,isElement:Jn,isRTL:Dw};function kw(e,t){let n=null,r;const o=er(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:f,width:d,height:m}=e.getBoundingClientRect();if(s||t(),!d||!m)return;const p=Hi(f),b=Hi(o.clientWidth-(u+d)),y=Hi(o.clientHeight-(f+m)),$=Hi(u),v={rootMargin:-p+"px "+-b+"px "+-y+"px "+-$+"px",threshold:hn(0,vr(1,c))||1};let w=!0;function T(I){const D=I[0].intersectionRatio;if(D!==c){if(!w)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(T,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,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=Ou(e),f=o||i?[...u?Ra(u):[],...Ra(t)]:[];f.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const d=u&&s?kw(u,n):null;let m=-1,p=null;a&&(p=new ResizeObserver(x=>{let[v]=x;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let b,y=c?Mr(e):null;c&&$();function $(){const x=Mr(e);y&&(x.x!==y.x||x.y!==y.y||x.width!==y.width||x.height!==y.height)&&n(),y=x,b=requestAnimationFrame($)}return n(),()=>{f.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d&&d(),p&&p.disconnect(),p=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?nf({element:r.current,padding:o}).fn(n):{}:r?nf({element:r,padding:o}).fn(n):{}}}};var da=typeof document<"u"?l.useLayoutEffect:l.useEffect;function Oa(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(!Oa(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)&&!Oa(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Uh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uf(e,t){const n=Uh(e);return Math.round(t*n)/n}function lf(e){const t=Oe.useRef(e);return da(()=>{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,[f,d]=Oe.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=Oe.useState(r);Oa(m,r)||p(r);const[b,y]=Oe.useState(null),[$,x]=Oe.useState(null),v=Oe.useCallback(j=>{j!=D.current&&(D.current=j,y(j))},[y]),w=Oe.useCallback(j=>{j!==A.current&&(A.current=j,x(j))},[x]),T=i||b,I=a||$,D=Oe.useRef(null),A=Oe.useRef(null),F=Oe.useRef(f),k=lf(c),B=lf(o),R=Oe.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(H=>{const Y={...H,isPositioned:!0};E.current&&!Oa(F.current,Y)&&(F.current=Y,Hy.flushSync(()=>{d(Y)}))})},[m,t,n,B]);da(()=>{u===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[u]);const E=Oe.useRef(!1);da(()=>(E.current=!0,()=>{E.current=!1}),[]),da(()=>{if(T&&(D.current=T),I&&(A.current=I),T&&I){if(k.current)return k.current(T,I,R);R()}},[T,I,R,k]);const h=Oe.useMemo(()=>({reference:D,floating:A,setReference:v,setFloating:w}),[v,w]),C=Oe.useMemo(()=>({reference:T,floating:I}),[T,I]),P=Oe.useMemo(()=>{const j={position:n,left:0,top:0};if(!C.floating)return j;const H=uf(C.floating,f.x),Y=uf(C.floating,f.y);return s?{...j,transform:"translate("+H+"px, "+Y+"px)",...Uh(C.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:Y}},[n,s,C.floating,f.x,f.y]);return Oe.useMemo(()=>({...f,update:R,refs:h,elements:C,floatingStyles:P}),[f,R,h,C,P])}const Vw=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return l.createElement(Ue.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 ss(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 Yh="Popper",[Kh,cs]=yn(Yh),[Hw,qh]=Kh(Yh),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=qh(zw,n),a=l.useRef(null),s=ut(t,a);return l.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:l.createElement(Ue.div,ae({},o,{ref:s}))}),Xh="PopperContent",[Yw,Kw]=Kh(Xh),qw=l.forwardRef((e,t)=>{var n,r,o,i,a,s,c,u;const{__scopePopper:f,side:d="bottom",sideOffset:m=0,align:p="center",alignOffset:b=0,arrowPadding:y=0,collisionBoundary:$=[],collisionPadding:x=0,sticky:v="partial",hideWhenDetached:w=!1,avoidCollisions:T=!0,onPlaced:I,...D}=e,A=qh(Xh,f),[F,k]=l.useState(null),B=ut(t,xe=>k(xe)),[R,E]=l.useState(null),h=ss(R),C=(n=h==null?void 0:h.width)!==null&&n!==void 0?n:0,P=(r=h==null?void 0:h.height)!==null&&r!==void 0?r:0,j=d+(p!=="center"?"-"+p:""),H=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},Y=Array.isArray($)?$:[$],oe=Y.length>0,W={padding:H,boundary:Y.filter(Qw),altBoundary:oe},{refs:L,floatingStyles:J,placement:U,isPositioned:K,middlewareData:Z}=Fw({strategy:"fixed",placement:j,whileElementsMounted:Mw,elements:{reference:A.anchor},middleware:[vw({mainAxis:m+P,alignmentAxis:b}),T&&mw({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?gw():void 0,...W}),T&&fw({...W}),yw({...W,apply:({elements:xe,rects:Ee,availableWidth:Ae,availableHeight:Ie})=>{const{width:Le,height:ke}=Ee.reference,at=xe.floating.style;at.setProperty("--radix-popper-available-width",`${Ae}px`),at.setProperty("--radix-popper-available-height",`${Ie}px`),at.setProperty("--radix-popper-anchor-width",`${Le}px`),at.setProperty("--radix-popper-anchor-height",`${ke}px`)}}),R&&Lw({element:R,padding:y}),Jw({arrowWidth:C,arrowHeight:P}),w&&pw({strategy:"referenceHidden"})]}),[ce,z]=Gh(U),G=un(I);Gt(()=>{K&&(G==null||G())},[K,G]);const re=(o=Z.arrow)===null||o===void 0?void 0:o.x,ne=(i=Z.arrow)===null||i===void 0?void 0:i.y,ie=((a=Z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[ee,pe]=l.useState();return Gt(()=>{F&&pe(window.getComputedStyle(F).zIndex)},[F]),l.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:K?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(s=Z.transformOrigin)===null||s===void 0?void 0:s.x,(c=Z.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},l.createElement(Yw,{scope:f,placedSide:ce,onArrowChange:E,arrowX:re,arrowY:ne,shouldHideArrow:ie},l.createElement(Ue.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,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=d?0:e.arrowWidth,p=d?0:e.arrowHeight,[b,y]=Gh(s),$={start:"0%",center:"50%",end:"100%"}[y],x=((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)+p/2;let w="",T="";return b==="bottom"?(w=d?$:`${x}px`,T=`${-p}px`):b==="top"?(w=d?$:`${x}px`,T=`${c.floating.height+p}px`):b==="right"?(w=`${-p}px`,T=d?$:`${v}px`):b==="left"&&(w=`${c.floating.width+p}px`,T=d?$:`${v}px`),{data:{x:w,y:T}}}});function Gh(e){const[t,n="center"]=e.split("-");return[t,n]}const Zh=Ww,Qh=Uw,Jh=qw,e1=Zw,ev=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?vn.createPortal(l.createElement(Ue.div,ae({},o,{ref:t})),r):null}),t1=ev;function us(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 ls=l.forwardRef((e,t)=>l.createElement(Ue.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=ls;var r1=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ur=new WeakMap,Wi=new WeakMap,zi={},Ys=0,tv=function(e){return e&&(e.host||tv(e.parentNode))},o1=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=tv(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]);zi[n]||(zi[n]=new WeakMap);var i=zi[n],a=[],s=new Set,c=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(m){if(s.has(m))f(m);else{var p=m.getAttribute(r),b=p!==null&&p!=="false",y=(Ur.get(m)||0)+1,$=(i.get(m)||0)+1;Ur.set(m,y),i.set(m,$),a.push(m),y===1&&b&&Wi.set(m,!0),$===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}})};return f(t),s.clear(),Ys++,function(){a.forEach(function(d){var m=Ur.get(d)-1,p=i.get(d)-1;Ur.set(d,m),i.set(d,p),m||(Wi.has(d)||d.removeAttribute(r),Wi.delete(d)),p||d.removeAttribute(n)}),Ys--,Ys||(Ur=new WeakMap,Ur=new WeakMap,Wi=new WeakMap,zi={})}},nv=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}},Sn=function(){return Sn=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},Sn.apply(this,arguments)};function rv(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 fa="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 p1(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 f=a;a=[],f.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),n}}}};return o}function h1(e){e===void 0&&(e={});var t=p1(null);return t.options=Sn({async:!0,ssr:!1},e),t}var ov=function(e){var t=e.sideCar,n=rv(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 Oe.createElement(r,Sn({},n))};ov.isSideCarExport=!0;function v1(e,t){return e.useMedium(t),ov}var iv=h1(),Ks=function(){},ds=Oe.forwardRef(function(e,t){var n=Oe.useRef(null),r=Oe.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,f=e.enabled,d=e.shards,m=e.sideCar,p=e.noIsolation,b=e.inert,y=e.allowPinchZoom,$=e.as,x=$===void 0?"div":$,v=rv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=m,T=d1([n,t]),I=Sn(Sn({},v),o);return Oe.createElement(Oe.Fragment,null,f&&Oe.createElement(w,{sideCar:iv,removeScrollBar:u,shards:d,noIsolation:p,inert:b,setCallbacks:i,allowPinchZoom:!!y,lockRef:n}),a?Oe.cloneElement(Oe.Children.only(s),Sn(Sn({},I),{ref:T})):Oe.createElement(x,Sn({},I,{className:c,ref:T}),s))});ds.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ds.classNames={fullWidth:pa,zeroRight:fa};var df,m1=function(){if(df)return df;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){Oe.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},av=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=av(),$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
54
  .`.concat(s1,` {
55
55
  overflow: hidden `).concat(r,`;
56
56
  padding-right: `).concat(s,"px ").concat(r,`;
@@ -90,7 +90,7 @@ Check the top-level render call using <`+Q+">.")}return V}}function en(_,V){{if(
90
90
  `)},T1=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=Oe.useMemo(function(){return S1(o)},[o]);return Oe.createElement(C1,{styles:$1(i,!t,o,n?"":"!important")})},Rc=!1;if(typeof window<"u")try{var Ui=Object.defineProperty({},"passive",{get:function(){return Rc=!0,!0}});window.addEventListener("test",Ui,Ui),window.removeEventListener("test",Ui,Ui)}catch{Rc=!1}var Yr=Rc?{passive:!1}:!1,I1=function(e){return e.tagName==="TEXTAREA"},sv=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!I1(e)&&n[t]==="visible")},R1=function(e){return sv(e,"overflowY")},O1=function(e){return sv(e,"overflowX")},ff=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=cv(e,n);if(r){var o=uv(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},P1=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},A1=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},cv=function(e,t){return e==="v"?R1(t):O1(t)},uv=function(e,t){return e==="v"?P1(t):A1(t)},D1=function(e,t){return e==="h"&&t==="rtl"?-1:1},N1=function(e,t,n,r,o){var i=D1(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,c=t.contains(s),u=!1,f=a>0,d=0,m=0;do{var p=uv(e,s),b=p[0],y=p[1],$=p[2],x=y-$-i*b;(b||x)&&cv(e,s)&&(d+=x,m+=b),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(f&&(o&&d===0||!o&&a>d)||!f&&(o&&m===0||!o&&-a>m))&&(u=!0),u},Yi=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pf=function(e){return[e.deltaX,e.deltaY]},hf=function(e){return e&&"current"in e?e.current:e},k1=function(e,t){return e[0]===t[0]&&e[1]===t[1]},M1=function(e){return`
91
91
  .block-interactivity-`.concat(e,` {pointer-events: none;}
92
92
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
93
- `)},j1=0,Kr=[];function L1(e){var t=Oe.useRef([]),n=Oe.useRef([0,0]),r=Oe.useRef(),o=Oe.useState(j1++)[0],i=Oe.useState(function(){return av()})[0],a=Oe.useRef(e);Oe.useEffect(function(){a.current=e},[e]),Oe.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=a1([e.lockRef.current],(e.shards||[]).map(hf),!0).filter(Boolean);return y.forEach(function($){return $.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function($){return $.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=Oe.useCallback(function(y,$){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var x=Yi(y),v=n.current,w="deltaX"in y?y.deltaX:v[0]-x[0],T="deltaY"in y?y.deltaY:v[1]-x[1],I,D=y.target,A=Math.abs(w)>Math.abs(T)?"h":"v";if("touches"in y&&A==="h"&&D.type==="range")return!1;var F=ff(A,D);if(!F)return!0;if(F?I=A:(I=A==="v"?"h":"v",F=ff(A,D)),!F)return!1;if(!r.current&&"changedTouches"in y&&(w||T)&&(r.current=I),!I)return!0;var k=r.current||I;return N1(k,$,y,k==="h"?w:T,!0)},[]),c=Oe.useCallback(function(y){var $=y;if(!(!Kr.length||Kr[Kr.length-1]!==i)){var x="deltaY"in $?pf($):Yi($),v=t.current.filter(function(I){return I.name===$.type&&I.target===$.target&&k1(I.delta,x)})[0];if(v&&v.should){$.cancelable&&$.preventDefault();return}if(!v){var w=(a.current.shards||[]).map(hf).filter(Boolean).filter(function(I){return I.contains($.target)}),T=w.length>0?s($,w[0]):!a.current.noIsolation;T&&$.cancelable&&$.preventDefault()}}},[]),u=Oe.useCallback(function(y,$,x,v){var w={name:y,delta:$,target:x,should:v};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(T){return T!==w})},1)},[]),f=Oe.useCallback(function(y){n.current=Yi(y),r.current=void 0},[]),d=Oe.useCallback(function(y){u(y.type,pf(y),y.target,s(y,e.lockRef.current))},[]),m=Oe.useCallback(function(y){u(y.type,Yi(y),y.target,s(y,e.lockRef.current))},[]);Oe.useEffect(function(){return Kr.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Yr),document.addEventListener("touchmove",c,Yr),document.addEventListener("touchstart",f,Yr),function(){Kr=Kr.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Yr),document.removeEventListener("touchmove",c,Yr),document.removeEventListener("touchstart",f,Yr)}},[]);var p=e.removeScrollBar,b=e.inert;return Oe.createElement(Oe.Fragment,null,b?Oe.createElement(i,{styles:M1(o)}):null,p?Oe.createElement(T1,{gapMode:"margin"}):null)}const F1=v1(iv,L1);var lv=Oe.forwardRef(function(e,t){return Oe.createElement(ds,Sn({},e,{ref:t,sideCar:F1}))});lv.classNames=ds.classNames;const dv=lv,V1=[" ","Enter","ArrowUp","ArrowDown"],B1=[" ","Enter"],fs="Select",[ps,hs,H1]=Qa(fs),[bo,RP]=yn(fs,[H1,cs]),Pu=cs(),[W1,Br]=bo(fs),[z1,U1]=bo(fs),Y1=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:m,required:p}=e,b=Pu(t),[y,$]=l.useState(null),[x,v]=l.useState(null),[w,T]=l.useState(!1),I=Ja(u),[D=!1,A]=$n({prop:r,defaultProp:o,onChange:i}),[F,k]=$n({prop:a,defaultProp:s,onChange:c}),B=l.useRef(null),R=y?!!y.closest("form"):!0,[E,h]=l.useState(new Set),C=Array.from(E).map(P=>P.props.value).join(";");return l.createElement(Zh,b,l.createElement(W1,{required:p,scope:t,trigger:y,onTriggerChange:$,valueNode:x,onValueNodeChange:v,valueNodeHasChildren:w,onValueNodeHasChildrenChange:T,contentId:Gn(),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=>{h(j=>new Set(j).add(P))},[]),onNativeOptionRemove:l.useCallback(P=>{h(j=>{const H=new Set(j);return H.delete(P),H})},[])},n)),R?l.createElement(hv,{key:C,"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:d,value:F,onChange:P=>k(P.target.value),disabled:m},F===void 0?l.createElement("option",{value:""}):null,Array.from(E)):null))},K1="SelectTrigger",q1=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Pu(n),a=Br(K1,n),s=a.disabled||r,c=ut(t,a.onTriggerChange),u=hs(n),[f,d,m]=vv(b=>{const y=u().filter(v=>!v.disabled),$=y.find(v=>v.value===a.value),x=mv(y,b,$);x!==void 0&&a.onValueChange(x.value)}),p=()=>{s||(a.onOpenChange(!0),m())};return l.createElement(Qh,ae({asChild:!0},i),l.createElement(Ue.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:Ne(o.onClick,b=>{b.currentTarget.focus()}),onPointerDown:Ne(o.onPointerDown,b=>{const y=b.target;y.hasPointerCapture(b.pointerId)&&y.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(p(),a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)},b.preventDefault())}),onKeyDown:Ne(o.onKeyDown,b=>{const y=f.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&d(b.key),!(y&&b.key===" ")&&V1.includes(b.key)&&(p(),b.preventDefault())})})))}),X1="SelectValue",G1=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,c=Br(X1,n),{onValueNodeHasChildrenChange:u}=c,f=i!==void 0,d=ut(t,c.onValueNodeChange);return Gt(()=>{u(f)},[u,f]),l.createElement(Ue.span,ae({},s,{ref:d,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(Ue.span,ae({"aria-hidden":!0},o,{ref:t}),r||"▼")}),po="SelectContent",Q1=l.forwardRef((e,t)=>{const n=Br(po,e.__scopeSelect),[r,o]=l.useState();if(Gt(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?vn.createPortal(l.createElement(fv,{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}))}),Kn=10,[fv,Hr]=bo(po),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:f,arrowPadding:d,collisionBoundary:m,collisionPadding:p,sticky:b,hideWhenDetached:y,avoidCollisions:$,...x}=e,v=Br(po,n),[w,T]=l.useState(null),[I,D]=l.useState(null),A=ut(t,z=>T(z)),[F,k]=l.useState(null),[B,R]=l.useState(null),E=hs(n),[h,C]=l.useState(!1),P=l.useRef(!1);l.useEffect(()=>{if(w)return nv(w)},[w]),Nh();const j=l.useCallback(z=>{const[G,...re]=E().map(ee=>ee.ref.current),[ne]=re.slice(-1),ie=document.activeElement;for(const ee of z)if(ee===ie||(ee==null||ee.scrollIntoView({block:"nearest"}),ee===G&&I&&(I.scrollTop=0),ee===ne&&I&&(I.scrollTop=I.scrollHeight),ee==null||ee.focus(),document.activeElement!==ie))return},[E,I]),H=l.useCallback(()=>j([F,w]),[j,F,w]);l.useEffect(()=>{h&&H()},[h,H]);const{onOpenChange:Y,triggerPointerDownPosRef:oe}=v;l.useEffect(()=>{if(w){let z={x:0,y:0};const G=ne=>{var ie,ee,pe,xe;z={x:Math.abs(Math.round(ne.pageX)-((ie=(ee=oe.current)===null||ee===void 0?void 0:ee.x)!==null&&ie!==void 0?ie:0)),y:Math.abs(Math.round(ne.pageY)-((pe=(xe=oe.current)===null||xe===void 0?void 0:xe.y)!==null&&pe!==void 0?pe:0))}},re=ne=>{z.x<=10&&z.y<=10?ne.preventDefault():w.contains(ne.target)||Y(!1),document.removeEventListener("pointermove",G),oe.current=null};return oe.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",re,{capture:!0})}}},[w,Y,oe]),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[W,L]=vv(z=>{const G=E().filter(ie=>!ie.disabled),re=G.find(ie=>ie.ref.current===document.activeElement),ne=mv(G,z,re);ne&&setTimeout(()=>ne.ref.current.focus())}),J=l.useCallback((z,G,re)=>{const ne=!P.current&&!re;(v.value!==void 0&&v.value===G||ne)&&(k(z),ne&&(P.current=!0))},[v.value]),U=l.useCallback(()=>w==null?void 0:w.focus(),[w]),K=l.useCallback((z,G,re)=>{const ne=!P.current&&!re;(v.value!==void 0&&v.value===G||ne)&&R(z)},[v.value]),Z=r==="popper"?vf:eE,ce=Z===vf?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:p,sticky:b,hideWhenDetached:y,avoidCollisions:$}:{};return l.createElement(fv,{scope:n,content:w,viewport:I,onViewportChange:D,itemRefCallback:J,selectedItem:F,onItemLeave:U,itemTextRefCallback:K,focusSelectedItem:H,selectedItemText:B,position:r,isPositioned:h,searchRef:W},l.createElement(dv,{as:lo,allowPinchZoom:!0},l.createElement(kh,{asChild:!0,trapped:v.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Ne(o,z=>{var G;(G=v.trigger)===null||G===void 0||G.focus({preventScroll:!0}),z.preventDefault()})},l.createElement(os,{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()},x,ce,{onPlaced:()=>C(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:Ne(x.onKeyDown,z=>{const G=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!G&&z.key.length===1&&L(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let ne=E().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(z.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const ie=z.target,ee=ne.indexOf(ie);ne=ne.slice(ee+1)}setTimeout(()=>j(ne)),z.preventDefault()}})}))))))}),eE=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Br(po,n),a=Hr(po,n),[s,c]=l.useState(null),[u,f]=l.useState(null),d=ut(t,A=>f(A)),m=hs(n),p=l.useRef(!1),b=l.useRef(!0),{viewport:y,selectedItem:$,selectedItemText:x,focusSelectedItem:v}=a,w=l.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&y&&$&&x){const A=i.trigger.getBoundingClientRect(),F=u.getBoundingClientRect(),k=i.valueNode.getBoundingClientRect(),B=x.getBoundingClientRect();if(i.dir!=="rtl"){const ie=B.left-F.left,ee=k.left-ie,pe=A.left-ee,xe=A.width+pe,Ee=Math.max(xe,F.width),Ae=window.innerWidth-Kn,Ie=Kd(ee,[Kn,Ae-Ee]);s.style.minWidth=xe+"px",s.style.left=Ie+"px"}else{const ie=F.right-B.right,ee=window.innerWidth-k.right-ie,pe=window.innerWidth-A.right-ee,xe=A.width+pe,Ee=Math.max(xe,F.width),Ae=window.innerWidth-Kn,Ie=Kd(ee,[Kn,Ae-Ee]);s.style.minWidth=xe+"px",s.style.right=Ie+"px"}const R=m(),E=window.innerHeight-Kn*2,h=y.scrollHeight,C=window.getComputedStyle(u),P=parseInt(C.borderTopWidth,10),j=parseInt(C.paddingTop,10),H=parseInt(C.borderBottomWidth,10),Y=parseInt(C.paddingBottom,10),oe=P+j+h+Y+H,W=Math.min($.offsetHeight*5,oe),L=window.getComputedStyle(y),J=parseInt(L.paddingTop,10),U=parseInt(L.paddingBottom,10),K=A.top+A.height/2-Kn,Z=E-K,ce=$.offsetHeight/2,z=$.offsetTop+ce,G=P+j+z,re=oe-G;if(G<=K){const ie=$===R[R.length-1].ref.current;s.style.bottom="0px";const ee=u.clientHeight-y.offsetTop-y.offsetHeight,pe=Math.max(Z,ce+(ie?U:0)+ee+H),xe=G+pe;s.style.height=xe+"px"}else{const ie=$===R[0].ref.current;s.style.top="0px";const pe=Math.max(K,P+y.offsetTop+(ie?J:0)+ce)+re;s.style.height=pe+"px",y.scrollTop=G-K+y.offsetTop}s.style.margin=`${Kn}px 0`,s.style.minHeight=W+"px",s.style.maxHeight=E+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[m,i.trigger,i.valueNode,s,u,y,$,x,i.dir,r]);Gt(()=>w(),[w]);const[T,I]=l.useState();Gt(()=>{u&&I(window.getComputedStyle(u).zIndex)},[u]);const D=l.useCallback(A=>{A&&b.current===!0&&(w(),v==null||v(),b.current=!1)},[w,v]);return l.createElement(tE,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:D},l.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T}},l.createElement(Ue.div,ae({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),vf=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Kn,...i}=e,a=Pu(n);return l.createElement(Jh,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,Au]=bo(po,{}),mf="SelectViewport",nE=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Hr(mf,n),i=Au(mf,n),a=ut(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(Ue.div,ae({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Ne(r.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=i;if(d!=null&&d.current&&f){const m=Math.abs(s.current-u.scrollTop);if(m>0){const p=window.innerHeight-Kn*2,b=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),$=Math.max(b,y);if($<p){const x=$+m,v=Math.min(p,x),w=x-v;f.style.height=v+"px",f.style.bottom==="0px"&&(u.scrollTop=w>0?w:0,f.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),rE="SelectGroup";bo(rE);const Oc="SelectItem",[oE,iE]=bo(Oc),aE=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Br(Oc,n),c=Hr(Oc,n),u=s.value===r,[f,d]=l.useState(i??""),[m,p]=l.useState(!1),b=ut(t,x=>{var v;return(v=c.itemRefCallback)===null||v===void 0?void 0:v.call(c,x,r,o)}),y=Gn(),$=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};return l.createElement(oE,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:l.useCallback(x=>{d(v=>{var w;return v||((w=x==null?void 0:x.textContent)!==null&&w!==void 0?w:"").trim()})},[])},l.createElement(ps.ItemSlot,{scope:n,value:r,disabled:o,textValue:f},l.createElement(Ue.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:Ne(a.onFocus,()=>p(!0)),onBlur:Ne(a.onBlur,()=>p(!1)),onPointerUp:Ne(a.onPointerUp,$),onPointerMove:Ne(a.onPointerMove,x=>{if(o){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}else x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ne(a.onPointerLeave,x=>{if(x.currentTarget===document.activeElement){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}}),onKeyDown:Ne(a.onKeyDown,x=>{var v;((v=c.searchRef)===null||v===void 0?void 0:v.current)!==""&&x.key===" "||(B1.includes(x.key)&&$(),x.key===" "&&x.preventDefault())})}))))}),Ki="SelectItemText",sE=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Br(Ki,n),s=Hr(Ki,n),c=iE(Ki,n),u=U1(Ki,n),[f,d]=l.useState(null),m=ut(t,x=>d(x),c.onItemTextChange,x=>{var v;return(v=s.itemTextRefCallback)===null||v===void 0?void 0:v.call(s,x,c.value,c.disabled)}),p=f==null?void 0:f.textContent,b=l.useMemo(()=>l.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},p),[c.disabled,c.value,p]),{onNativeOptionAdd:y,onNativeOptionRemove:$}=u;return Gt(()=>(y(b),()=>$(b)),[y,$,b]),l.createElement(l.Fragment,null,l.createElement(Ue.span,ae({id:c.textId},i,{ref:m})),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?vn.createPortal(i.children,a.valueNode):null)}),gf="SelectScrollUpButton",cE=l.forwardRef((e,t)=>{const n=Hr(gf,e.__scopeSelect),r=Au(gf,e.__scopeSelect),[o,i]=l.useState(!1),a=ut(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(pv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}})):null}),yf="SelectScrollDownButton",uE=l.forwardRef((e,t)=>{const n=Hr(yf,e.__scopeSelect),r=Au(yf,e.__scopeSelect),[o,i]=l.useState(!1),a=ut(t,r.onScrollButtonChange);return Gt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=s.scrollHeight-s.clientHeight,f=Math.ceil(s.scrollTop)<u;i(f)};const s=n.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?l.createElement(pv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}})):null}),pv=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Hr("SelectScrollButton",n),a=l.useRef(null),s=hs(n),c=l.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),Gt(()=>{var u;const f=s().find(d=>d.ref.current===document.activeElement);f==null||(u=f.ref.current)===null||u===void 0||u.scrollIntoView({block:"nearest"})},[s]),l.createElement(Ue.div,ae({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ne(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ne(o.onPointerMove,()=>{var u;(u=i.onItemLeave)===null||u===void 0||u.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ne(o.onPointerLeave,()=>{c()})}))}),hv=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=l.useRef(null),i=ut(t,o),a=us(n);return l.useEffect(()=>{const s=o.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&f){const d=new Event("change",{bubbles:!0});f.call(s,n),s.dispatchEvent(d)}},[a,n]),l.createElement(ls,{asChild:!0},l.createElement("select",ae({},r,{ref:i,defaultValue:n})))});hv.displayName="BubbleSelect";function vv(e){const t=un(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 mv(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,pE=G1,hE=Z1,vE=Q1,mE=nE,gE=aE,yE=sE,bE=cE,wE=uE;var EE=Ke({defaultClassName:"_1639370",variantClassNames:{place:{left:"_1639371",right:"_1639372"},state:{default:"_1639373",error:"_1639374",valid:"_1639375",disabled:"_1639376"}},defaultVariants:{state:"default"},compoundVariants:[]});var xE=Ke({defaultClassName:"qormpv0",variantClassNames:{isDisabled:{true:"qormpv1"}},defaultVariants:{isDisabled:!1},compoundVariants:[]});var _E=Ke({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=Ke({defaultClassName:"yihd6a6",variantClassNames:{state:{default:"yihd6a1",error:"yihd6a2",valid:"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:Te(EE({state:e,place:t})),children:M.jsx(Xt,{textStyle:"body2",children:n})});Pc.displayName="Addon";const Du=({isError:e,isDisabled:t,isValid:n})=>t?"disabled":e?"error":n?"valid":"default",wo=({children:e,helperTextLeft:t,helperTextRight:n,addonRight:r,addonLeft:o,elementLeft:i,elementRight:a,errorMessage:s,isError:c,isDisabled:u,isValid:f,className:d,inputAreaClassName:m,onClick:p})=>{const b=!!t,y=!!n,$=!b&&y,x=b||y,v=!!o,w=!!r,T=!!i,I=!!a,D=!!s,A=Du({isError:c,isDisabled:u,isValid:f}),F=l.useCallback(()=>A==="disabled"?"$blackTypoMedium":A==="error"?"$redAccent1":A==="valid"?"$greenAccent1":"$blackTypoMedium",[A]),k=()=>c&&D?M.jsx(Xt,{textStyle:"caption",color:F(),children:s}):b&&typeof t=="string"?M.jsx(Xt,{textStyle:"caption",children:t}):b?t:null;return M.jsxs("div",{"data-test-id":"CT_Field_Container",className:Te(SE),onClick:p,children:[M.jsx("div",{className:Te(_E({state:A}),d),children:M.jsxs(Ht,{justifyContent:"space-between",alignItems:"stretch",wrap:"nowrap",children:[v&&M.jsx(Pc,{formState:A,place:"left",children:o}),T&&i,M.jsx("div",{className:Te(RE,m),children:e}),I&&a,w&&M.jsx(Pc,{formState:A,place:"right",children:r})]})}),(x||D)&&M.jsxs(Ht,{justifyContent:$?"flex-end":"space-between",alignItems:"center",mt:"$6",children:[k(),y&&typeof n=="string"?M.jsx(Xt,{textStyle:"caption",children:n}):n]})]})};wo.displayName="Field";wo.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 cn(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 Nu(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ac(e,t)}var Dc={exports:{}},qi={exports:{}},pt={};/** @license React v16.13.1
93
+ `)},j1=0,Kr=[];function L1(e){var t=Oe.useRef([]),n=Oe.useRef([0,0]),r=Oe.useRef(),o=Oe.useState(j1++)[0],i=Oe.useState(function(){return av()})[0],a=Oe.useRef(e);Oe.useEffect(function(){a.current=e},[e]),Oe.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=a1([e.lockRef.current],(e.shards||[]).map(hf),!0).filter(Boolean);return y.forEach(function($){return $.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function($){return $.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=Oe.useCallback(function(y,$){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var x=Yi(y),v=n.current,w="deltaX"in y?y.deltaX:v[0]-x[0],T="deltaY"in y?y.deltaY:v[1]-x[1],I,D=y.target,A=Math.abs(w)>Math.abs(T)?"h":"v";if("touches"in y&&A==="h"&&D.type==="range")return!1;var F=ff(A,D);if(!F)return!0;if(F?I=A:(I=A==="v"?"h":"v",F=ff(A,D)),!F)return!1;if(!r.current&&"changedTouches"in y&&(w||T)&&(r.current=I),!I)return!0;var k=r.current||I;return N1(k,$,y,k==="h"?w:T,!0)},[]),c=Oe.useCallback(function(y){var $=y;if(!(!Kr.length||Kr[Kr.length-1]!==i)){var x="deltaY"in $?pf($):Yi($),v=t.current.filter(function(I){return I.name===$.type&&I.target===$.target&&k1(I.delta,x)})[0];if(v&&v.should){$.cancelable&&$.preventDefault();return}if(!v){var w=(a.current.shards||[]).map(hf).filter(Boolean).filter(function(I){return I.contains($.target)}),T=w.length>0?s($,w[0]):!a.current.noIsolation;T&&$.cancelable&&$.preventDefault()}}},[]),u=Oe.useCallback(function(y,$,x,v){var w={name:y,delta:$,target:x,should:v};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(T){return T!==w})},1)},[]),f=Oe.useCallback(function(y){n.current=Yi(y),r.current=void 0},[]),d=Oe.useCallback(function(y){u(y.type,pf(y),y.target,s(y,e.lockRef.current))},[]),m=Oe.useCallback(function(y){u(y.type,Yi(y),y.target,s(y,e.lockRef.current))},[]);Oe.useEffect(function(){return Kr.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Yr),document.addEventListener("touchmove",c,Yr),document.addEventListener("touchstart",f,Yr),function(){Kr=Kr.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Yr),document.removeEventListener("touchmove",c,Yr),document.removeEventListener("touchstart",f,Yr)}},[]);var p=e.removeScrollBar,b=e.inert;return Oe.createElement(Oe.Fragment,null,b?Oe.createElement(i,{styles:M1(o)}):null,p?Oe.createElement(T1,{gapMode:"margin"}):null)}const F1=v1(iv,L1);var lv=Oe.forwardRef(function(e,t){return Oe.createElement(ds,Sn({},e,{ref:t,sideCar:F1}))});lv.classNames=ds.classNames;const dv=lv,V1=[" ","Enter","ArrowUp","ArrowDown"],B1=[" ","Enter"],fs="Select",[ps,hs,H1]=Qa(fs),[bo,RP]=yn(fs,[H1,cs]),Pu=cs(),[W1,Br]=bo(fs),[z1,U1]=bo(fs),Y1=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:m,required:p}=e,b=Pu(t),[y,$]=l.useState(null),[x,v]=l.useState(null),[w,T]=l.useState(!1),I=Ja(u),[D=!1,A]=$n({prop:r,defaultProp:o,onChange:i}),[F,k]=$n({prop:a,defaultProp:s,onChange:c}),B=l.useRef(null),R=y?!!y.closest("form"):!0,[E,h]=l.useState(new Set),C=Array.from(E).map(P=>P.props.value).join(";");return l.createElement(Zh,b,l.createElement(W1,{required:p,scope:t,trigger:y,onTriggerChange:$,valueNode:x,onValueNodeChange:v,valueNodeHasChildren:w,onValueNodeHasChildrenChange:T,contentId:Gn(),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=>{h(j=>new Set(j).add(P))},[]),onNativeOptionRemove:l.useCallback(P=>{h(j=>{const H=new Set(j);return H.delete(P),H})},[])},n)),R?l.createElement(hv,{key:C,"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:d,value:F,onChange:P=>k(P.target.value),disabled:m},F===void 0?l.createElement("option",{value:""}):null,Array.from(E)):null))},K1="SelectTrigger",q1=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Pu(n),a=Br(K1,n),s=a.disabled||r,c=ut(t,a.onTriggerChange),u=hs(n),[f,d,m]=vv(b=>{const y=u().filter(v=>!v.disabled),$=y.find(v=>v.value===a.value),x=mv(y,b,$);x!==void 0&&a.onValueChange(x.value)}),p=()=>{s||(a.onOpenChange(!0),m())};return l.createElement(Qh,ae({asChild:!0},i),l.createElement(Ue.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:Ne(o.onClick,b=>{b.currentTarget.focus()}),onPointerDown:Ne(o.onPointerDown,b=>{const y=b.target;y.hasPointerCapture(b.pointerId)&&y.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&(p(),a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)},b.preventDefault())}),onKeyDown:Ne(o.onKeyDown,b=>{const y=f.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&d(b.key),!(y&&b.key===" ")&&V1.includes(b.key)&&(p(),b.preventDefault())})})))}),X1="SelectValue",G1=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a,...s}=e,c=Br(X1,n),{onValueNodeHasChildrenChange:u}=c,f=i!==void 0,d=ut(t,c.onValueNodeChange);return Gt(()=>{u(f)},[u,f]),l.createElement(Ue.span,ae({},s,{ref:d,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(Ue.span,ae({"aria-hidden":!0},o,{ref:t}),r||"▼")}),po="SelectContent",Q1=l.forwardRef((e,t)=>{const n=Br(po,e.__scopeSelect),[r,o]=l.useState();if(Gt(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?vn.createPortal(l.createElement(fv,{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}))}),Kn=10,[fv,Hr]=bo(po),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:f,arrowPadding:d,collisionBoundary:m,collisionPadding:p,sticky:b,hideWhenDetached:y,avoidCollisions:$,...x}=e,v=Br(po,n),[w,T]=l.useState(null),[I,D]=l.useState(null),A=ut(t,z=>T(z)),[F,k]=l.useState(null),[B,R]=l.useState(null),E=hs(n),[h,C]=l.useState(!1),P=l.useRef(!1);l.useEffect(()=>{if(w)return nv(w)},[w]),Nh();const j=l.useCallback(z=>{const[G,...re]=E().map(ee=>ee.ref.current),[ne]=re.slice(-1),ie=document.activeElement;for(const ee of z)if(ee===ie||(ee==null||ee.scrollIntoView({block:"nearest"}),ee===G&&I&&(I.scrollTop=0),ee===ne&&I&&(I.scrollTop=I.scrollHeight),ee==null||ee.focus(),document.activeElement!==ie))return},[E,I]),H=l.useCallback(()=>j([F,w]),[j,F,w]);l.useEffect(()=>{h&&H()},[h,H]);const{onOpenChange:Y,triggerPointerDownPosRef:oe}=v;l.useEffect(()=>{if(w){let z={x:0,y:0};const G=ne=>{var ie,ee,pe,xe;z={x:Math.abs(Math.round(ne.pageX)-((ie=(ee=oe.current)===null||ee===void 0?void 0:ee.x)!==null&&ie!==void 0?ie:0)),y:Math.abs(Math.round(ne.pageY)-((pe=(xe=oe.current)===null||xe===void 0?void 0:xe.y)!==null&&pe!==void 0?pe:0))}},re=ne=>{z.x<=10&&z.y<=10?ne.preventDefault():w.contains(ne.target)||Y(!1),document.removeEventListener("pointermove",G),oe.current=null};return oe.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",re,{capture:!0})}}},[w,Y,oe]),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[W,L]=vv(z=>{const G=E().filter(ie=>!ie.disabled),re=G.find(ie=>ie.ref.current===document.activeElement),ne=mv(G,z,re);ne&&setTimeout(()=>ne.ref.current.focus())}),J=l.useCallback((z,G,re)=>{const ne=!P.current&&!re;(v.value!==void 0&&v.value===G||ne)&&(k(z),ne&&(P.current=!0))},[v.value]),U=l.useCallback(()=>w==null?void 0:w.focus(),[w]),K=l.useCallback((z,G,re)=>{const ne=!P.current&&!re;(v.value!==void 0&&v.value===G||ne)&&R(z)},[v.value]),Z=r==="popper"?vf:eE,ce=Z===vf?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:m,collisionPadding:p,sticky:b,hideWhenDetached:y,avoidCollisions:$}:{};return l.createElement(fv,{scope:n,content:w,viewport:I,onViewportChange:D,itemRefCallback:J,selectedItem:F,onItemLeave:U,itemTextRefCallback:K,focusSelectedItem:H,selectedItemText:B,position:r,isPositioned:h,searchRef:W},l.createElement(dv,{as:lo,allowPinchZoom:!0},l.createElement(kh,{asChild:!0,trapped:v.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Ne(o,z=>{var G;(G=v.trigger)===null||G===void 0||G.focus({preventScroll:!0}),z.preventDefault()})},l.createElement(os,{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()},x,ce,{onPlaced:()=>C(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:Ne(x.onKeyDown,z=>{const G=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!G&&z.key.length===1&&L(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let ne=E().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(z.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const ie=z.target,ee=ne.indexOf(ie);ne=ne.slice(ee+1)}setTimeout(()=>j(ne)),z.preventDefault()}})}))))))}),eE=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Br(po,n),a=Hr(po,n),[s,c]=l.useState(null),[u,f]=l.useState(null),d=ut(t,A=>f(A)),m=hs(n),p=l.useRef(!1),b=l.useRef(!0),{viewport:y,selectedItem:$,selectedItemText:x,focusSelectedItem:v}=a,w=l.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&y&&$&&x){const A=i.trigger.getBoundingClientRect(),F=u.getBoundingClientRect(),k=i.valueNode.getBoundingClientRect(),B=x.getBoundingClientRect();if(i.dir!=="rtl"){const ie=B.left-F.left,ee=k.left-ie,pe=A.left-ee,xe=A.width+pe,Ee=Math.max(xe,F.width),Ae=window.innerWidth-Kn,Ie=Kd(ee,[Kn,Ae-Ee]);s.style.minWidth=xe+"px",s.style.left=Ie+"px"}else{const ie=F.right-B.right,ee=window.innerWidth-k.right-ie,pe=window.innerWidth-A.right-ee,xe=A.width+pe,Ee=Math.max(xe,F.width),Ae=window.innerWidth-Kn,Ie=Kd(ee,[Kn,Ae-Ee]);s.style.minWidth=xe+"px",s.style.right=Ie+"px"}const R=m(),E=window.innerHeight-Kn*2,h=y.scrollHeight,C=window.getComputedStyle(u),P=parseInt(C.borderTopWidth,10),j=parseInt(C.paddingTop,10),H=parseInt(C.borderBottomWidth,10),Y=parseInt(C.paddingBottom,10),oe=P+j+h+Y+H,W=Math.min($.offsetHeight*5,oe),L=window.getComputedStyle(y),J=parseInt(L.paddingTop,10),U=parseInt(L.paddingBottom,10),K=A.top+A.height/2-Kn,Z=E-K,ce=$.offsetHeight/2,z=$.offsetTop+ce,G=P+j+z,re=oe-G;if(G<=K){const ie=$===R[R.length-1].ref.current;s.style.bottom="0px";const ee=u.clientHeight-y.offsetTop-y.offsetHeight,pe=Math.max(Z,ce+(ie?U:0)+ee+H),xe=G+pe;s.style.height=xe+"px"}else{const ie=$===R[0].ref.current;s.style.top="0px";const pe=Math.max(K,P+y.offsetTop+(ie?J:0)+ce)+re;s.style.height=pe+"px",y.scrollTop=G-K+y.offsetTop}s.style.margin=`${Kn}px 0`,s.style.minHeight=W+"px",s.style.maxHeight=E+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[m,i.trigger,i.valueNode,s,u,y,$,x,i.dir,r]);Gt(()=>w(),[w]);const[T,I]=l.useState();Gt(()=>{u&&I(window.getComputedStyle(u).zIndex)},[u]);const D=l.useCallback(A=>{A&&b.current===!0&&(w(),v==null||v(),b.current=!1)},[w,v]);return l.createElement(tE,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:D},l.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T}},l.createElement(Ue.div,ae({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),vf=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Kn,...i}=e,a=Pu(n);return l.createElement(Jh,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,Au]=bo(po,{}),mf="SelectViewport",nE=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Hr(mf,n),i=Au(mf,n),a=ut(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(Ue.div,ae({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Ne(r.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=i;if(d!=null&&d.current&&f){const m=Math.abs(s.current-u.scrollTop);if(m>0){const p=window.innerHeight-Kn*2,b=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),$=Math.max(b,y);if($<p){const x=$+m,v=Math.min(p,x),w=x-v;f.style.height=v+"px",f.style.bottom==="0px"&&(u.scrollTop=w>0?w:0,f.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),rE="SelectGroup";bo(rE);const Oc="SelectItem",[oE,iE]=bo(Oc),aE=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=Br(Oc,n),c=Hr(Oc,n),u=s.value===r,[f,d]=l.useState(i??""),[m,p]=l.useState(!1),b=ut(t,x=>{var v;return(v=c.itemRefCallback)===null||v===void 0?void 0:v.call(c,x,r,o)}),y=Gn(),$=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};return l.createElement(oE,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:l.useCallback(x=>{d(v=>{var w;return v||((w=x==null?void 0:x.textContent)!==null&&w!==void 0?w:"").trim()})},[])},l.createElement(ps.ItemSlot,{scope:n,value:r,disabled:o,textValue:f},l.createElement(Ue.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:Ne(a.onFocus,()=>p(!0)),onBlur:Ne(a.onBlur,()=>p(!1)),onPointerUp:Ne(a.onPointerUp,$),onPointerMove:Ne(a.onPointerMove,x=>{if(o){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}else x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ne(a.onPointerLeave,x=>{if(x.currentTarget===document.activeElement){var v;(v=c.onItemLeave)===null||v===void 0||v.call(c)}}),onKeyDown:Ne(a.onKeyDown,x=>{var v;((v=c.searchRef)===null||v===void 0?void 0:v.current)!==""&&x.key===" "||(B1.includes(x.key)&&$(),x.key===" "&&x.preventDefault())})}))))}),Ki="SelectItemText",sE=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Br(Ki,n),s=Hr(Ki,n),c=iE(Ki,n),u=U1(Ki,n),[f,d]=l.useState(null),m=ut(t,x=>d(x),c.onItemTextChange,x=>{var v;return(v=s.itemTextRefCallback)===null||v===void 0?void 0:v.call(s,x,c.value,c.disabled)}),p=f==null?void 0:f.textContent,b=l.useMemo(()=>l.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},p),[c.disabled,c.value,p]),{onNativeOptionAdd:y,onNativeOptionRemove:$}=u;return Gt(()=>(y(b),()=>$(b)),[y,$,b]),l.createElement(l.Fragment,null,l.createElement(Ue.span,ae({id:c.textId},i,{ref:m})),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?vn.createPortal(i.children,a.valueNode):null)}),gf="SelectScrollUpButton",cE=l.forwardRef((e,t)=>{const n=Hr(gf,e.__scopeSelect),r=Au(gf,e.__scopeSelect),[o,i]=l.useState(!1),a=ut(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(pv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}})):null}),yf="SelectScrollDownButton",uE=l.forwardRef((e,t)=>{const n=Hr(yf,e.__scopeSelect),r=Au(yf,e.__scopeSelect),[o,i]=l.useState(!1),a=ut(t,r.onScrollButtonChange);return Gt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=s.scrollHeight-s.clientHeight,f=Math.ceil(s.scrollTop)<u;i(f)};const s=n.viewport;return c(),s.addEventListener("scroll",c),()=>s.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?l.createElement(pv,ae({},e,{ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}})):null}),pv=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Hr("SelectScrollButton",n),a=l.useRef(null),s=hs(n),c=l.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),Gt(()=>{var u;const f=s().find(d=>d.ref.current===document.activeElement);f==null||(u=f.ref.current)===null||u===void 0||u.scrollIntoView({block:"nearest"})},[s]),l.createElement(Ue.div,ae({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:Ne(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ne(o.onPointerMove,()=>{var u;(u=i.onItemLeave)===null||u===void 0||u.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ne(o.onPointerLeave,()=>{c()})}))}),hv=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=l.useRef(null),i=ut(t,o),a=us(n);return l.useEffect(()=>{const s=o.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&f){const d=new Event("change",{bubbles:!0});f.call(s,n),s.dispatchEvent(d)}},[a,n]),l.createElement(ls,{asChild:!0},l.createElement("select",ae({},r,{ref:i,defaultValue:n})))});hv.displayName="BubbleSelect";function vv(e){const t=un(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 mv(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,pE=G1,hE=Z1,vE=Q1,mE=nE,gE=aE,yE=sE,bE=cE,wE=uE;var EE=Ke({defaultClassName:"_1639370",variantClassNames:{place:{left:"_1639371",right:"_1639372"},state:{default:"_1639373",error:"_1639374",valid:"_1639375",disabled:"_1639376"}},defaultVariants:{state:"default"},compoundVariants:[]});var xE=Ke({defaultClassName:"qormpv0",variantClassNames:{isDisabled:{true:"qormpv1"}},defaultVariants:{isDisabled:!1},compoundVariants:[]});var _E=Ke({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=Ke({defaultClassName:"yihd6a6",variantClassNames:{state:{default:"yihd6a1",error:"yihd6a2",valid:"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:Te(EE({state:e,place:t})),children:M.jsx(Xt,{textStyle:"body2",children:n})});Pc.displayName="Addon";const Du=({isError:e,isDisabled:t,isValid:n})=>t?"disabled":e?"error":n?"valid":"default",wo=({children:e,helperTextLeft:t,helperTextRight:n,addonRight:r,addonLeft:o,elementLeft:i,elementRight:a,errorMessage:s,isError:c,isDisabled:u,isValid:f,className:d,inputAreaClassName:m,onClick:p})=>{const b=!!t,y=!!n,$=!b&&y,x=b||y,v=!!o,w=!!r,T=!!i,I=!!a,D=!!s,A=Du({isError:c,isDisabled:u,isValid:f}),F=l.useCallback(()=>A==="disabled"?"$blackTypoMedium":A==="error"?"$redAccent1":A==="valid"?"$greenAccent1":"$blackTypoMedium",[A]),k=()=>c&&D?M.jsx(Xt,{textStyle:"caption",color:F(),children:s}):b&&typeof t=="string"?M.jsx(Xt,{textStyle:"caption",children:t}):b?t:null;return M.jsxs("div",{"data-test-id":"CT_Field_Container",className:Te(SE),onClick:p,children:[M.jsx("div",{className:Te(_E({state:A}),d),children:M.jsxs(Bt,{justifyContent:"space-between",alignItems:"stretch",wrap:"nowrap",children:[v&&M.jsx(Pc,{formState:A,place:"left",children:o}),T&&i,M.jsx("div",{className:Te(RE,m),children:e}),I&&a,w&&M.jsx(Pc,{formState:A,place:"right",children:r})]})}),(x||D)&&M.jsxs(Bt,{justifyContent:$?"flex-end":"space-between",alignItems:"center",mt:"$6",children:[k(),y&&typeof n=="string"?M.jsx(Xt,{textStyle:"caption",children:n}):n]})]})};wo.displayName="Field";wo.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 cn(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 Nu(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ac(e,t)}var Dc={exports:{}},qi={exports:{}},pt={};/** @license React v16.13.1
94
94
  * react-is.production.min.js
95
95
  *
96
96
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -137,13 +137,13 @@ Event: `).concat(JSON.stringify(m.data)));return r.scheduler.schedule(function()
137
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(p){var b=Ut(p);n.forward(b),a=no(n,function(){return n.machine.transition(a,b,void 0,r||void 0)}),c.push.apply(c,_t([],st(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(y){return Fx(y,a)})),!1)),s=s||!!a.changed};try{for(var f=Qe(t),d=f.next();!d.done;d=f.next()){var m=d.value;u(m)}}catch(p){o={error:p}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}a.changed=s,a.actions=c,n.update(a,Ut(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=Ut(t);if(o.name.indexOf(Pf)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Pf)===0}))throw o.data.data;var i=no(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=Qe(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),dt(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,r){if(this.status!==Vt.Running)return kv(t,n);if(Nf(t))return this.spawnPromise(Promise.resolve(t),n);if(dt(t))return this.spawnCallback(t,n);if(Dx(t))return this.spawnActor(t,n);if(vx(t))return this.spawnObservable(t,n);if(jr(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($v,{state:s,id:o.id})});var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone(function(s){r.removeChild(o.id),r.send(Ut(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(Ut(ma(n,c),{origin:n})))},function(c){if(!i){o.removeChild(n);var u=Fo(n,c);try{o.send(Ut(u,{origin:n}))}catch(f){yx(c,f,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,f){var d=va(c,u,f),m=!1;return t.then(function(p){m||(d.next(p),!m&&d.complete())},function(p){m||d.error(p)}),{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(p){return p(m)}),!i&&o.send(Ut(m,{origin:n}))},f;try{f=t(u,function(m){a.add(m)})}catch(m){this.send(Fo(n,m))}if(Nf(f))return this.spawnPromise(f,n);var d=(r={id:n,send:function(m){return a.forEach(function(p){return p(m)})},subscribe:function(m){var p=va(m);return s.add(p.next),{unsubscribe:function(){s.delete(p.next)}}},stop:function(){i=!0,dt(f)&&f()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},r[sr]=function(){return this},r);return this.children.set(n,d),d},e.prototype.spawnObservable=function(t,n){var r,o=this,i,a=t.subscribe(function(c){i=c,o.send(Ut(c,{origin:n}))},function(c){o.removeChild(n),o.send(Ut(Fo(n,c),{origin:n}))},function(){o.removeChild(n),o.send(Ut(ma(n),{origin:n}))}),s=(r={id:n,send:function(){},subscribe:function(c,u,f){return t.subscribe(c,u,f)},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||Yt(!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=Wu();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=Vv,e}();function Vv(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 Ji(e){return be(be({type:Mc},e),{toJSON:function(){e.onDone,e.onError;var t=Lu(e,["onDone","onError"]);return be(be({},t),{type:Mc,src:Kx(e.src)})}})}var ro="",Hc="#",Oo="*",Gr={},Zr=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)&&(ct(i.target)||jr(i.target))}),o=t===ro?"the transient event":"event '".concat(t,"'");Yt(!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:Tv),this.id=this.config.id||_t([this.machine.key],st(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||Yt(!("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,f){var d,m=new e(u,{},void 0,{parent:i,key:f});return Object.assign(i.idMap,be((d={},d[m.id]=m,d),m.idMap)),m}):Gr;var s=0;function c(u){var f,d;u.order=s++;try{for(var m=Qe(Mv(u)),p=m.next();!p.done;p=m.next()){var b=p.value;c(b)}}catch(y){f={error:y}}finally{try{p&&!p.done&&(d=m.return)&&d.call(m)}finally{if(f)throw f.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 f=u.event;return f===ro}):ro in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=On(this.config.entry||this.config.onEntry).map(function(u){return ui(u)}),this.onExit=On(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=On(this.config.invoke).map(function(u,f){var d,m;if(jr(u)){var p=Zi(i.id,f);return i.machine.options.services=be((d={},d[p]=u,d),i.machine.options.services),Ji({src:p,id:p})}else if(ct(u.src)){var p=u.id||Zi(i.id,f);return Ji(be(be({},u),{id:p,src:u.src}))}else if(jr(u.src)||dt(u.src)){var p=u.id||Zi(i.id,f);return i.machine.options.services=be((m={},m[p]=u.src,m),i.machine.options.services),Ji(be(be({id:p},u),{src:p}))}else{var b=u.src;return Ji(be(be({id:Zi(i.id,f)},u),{src:b}))}}),this.activities=On(this.config.activities).concat(this.invoke).map(function(u){return Hu(u)}),this.transition=this.transition.bind(this),this.tags=On(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||jv(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 dt(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===ro,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=dt(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=Eo(n)?n.map(function(i,a){var s=r(i.delay,a);return be(be({},i),{event:s})}):Ot(Object.keys(n).map(function(i,a){var s=n[i],c=ct(s)?{target:s}:s,u=isNaN(+i)?i:+i,f=r(u,a);return On(c).map(function(d){return be(be({},d),{event:f,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 xn?t.value:Uo(t,this.delimiter);if(ct(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,_t([],st(Ot(a.map(function(c){return r.getStateNode(c).getStateNodes(o[c])}))),!1)),s},e.prototype.handles=function(t){var n=Iv(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof xn?t:xn.create(t),r=Array.from(Vo([],this.getStateNodes(n.value)));return new xn(be(be({},n),{value:this.resolve(n.value),configuration:r,done:ga(r,this),tags:jf(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=Qe(Object.keys(t)),c=s.next();!c.done;c=s.next()){var u=c.value,f=t[u];if(f){var d=this.getStateNode(u),m=d._transition(f,n,r);m&&(a[u]=m)}}}catch(x){o={error:x}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}var p=Object.keys(a).map(function(x){return a[x]}),b=Ot(p.map(function(x){return x.transitions})),y=p.some(function(x){return x.transitions.length>0});if(!y)return this.next(n,r);var $=Ot(Object.keys(a).map(function(x){return a[x].configuration}));return{transitions:b,exitSet:Ot(p.map(function(x){return x.exitSet})),configuration:$,source:n,actions:Ot(Object.keys(a).map(function(x){return a[x].actions}))}},e.prototype._transition=function(t,n,r){return ct(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,Ut(n))},e.prototype.next=function(t,n){var r,o,i=this,a=n.name,s=[],c=[],u;try{for(var f=Qe(this.getCandidates(a)),d=f.next();!d.done;d=f.next()){var m=d.value,p=m.cond,b=m.in,y=t.context,$=b?ct(b)&&Zr(b)?t.matches(Uo(this.getStateNodeById(b).path,this.delimiter)):Bu(Uo(b,this.delimiter),ux(this.path.slice(0,-2))(t.value)):!0,x=!1;try{x=!p||Av(this.machine,p,y,n,t)}catch(T){throw new Error("Unable to evaluate guard '".concat(p.name||p.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
138
138
  `).concat(T.message))}if(x&&$){m.target!==void 0&&(c=m.target),s.push.apply(s,_t([],st(m.actions),!1)),u=m;break}}}catch(T){r={error:T}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}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=Ot(c.map(function(T){return i.getRelativeStateNodes(T,t.historyValue)})),w=!!u.internal;return{transitions:[u],exitSet:w?[]:Ot(c.map(function(T){return i.getPotentiallyReenteringNodes(T)})),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,f,d,m=this,p=a?Vo([],this.getStateNodes(a.value)):[],b=new Set;try{for(var y=Qe(Array.from(t).sort(function(R,E){return R.order-E.order})),$=y.next();!$.done;$=y.next()){var x=$.value;(!Bo(p,x)||Bo(r.exitSet,x)||x.parent&&b.has(x.parent))&&b.add(x)}}catch(R){c={error:R}}finally{try{$&&!$.done&&(u=y.return)&&u.call(y)}finally{if(c)throw c.error}}try{for(var v=Qe(p),w=v.next();!w.done;w=v.next()){var x=w.value;(!Bo(t,x)||Bo(r.exitSet,x.parent))&&r.exitSet.push(x)}}catch(R){f={error:R}}finally{try{w&&!w.done&&(d=v.return)&&d.call(v)}finally{if(f)throw f.error}}r.exitSet.sort(function(R,E){return E.order-R.order});var T=Array.from(b).sort(function(R,E){return R.order-E.order}),I=new Set(r.exitSet),D=Ot(T.map(function(R){var E=[];if(R.type!=="final")return E;var h=R.parent;if(!h.parent)return E;E.push(Qi(R.id,R.doneData),Qi(h.id,R.doneData?Aa(R.doneData,o,i):void 0));var C=h.parent;return C.type==="parallel"&&li(C).every(function(P){return ga(r.configuration,P)})&&E.push(Qi(C.id)),E})),A=T.map(function(R){var E=R.onEntry,h=R.activities.map(function(C){return Cx(C)});return{type:"entry",actions:cr(s?_t(_t([],st(E),!1),st(h),!1):_t(_t([],st(h),!1),st(E),!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(_t(_t([],st(R.onExit),!1),st(R.activities.map(function(E){return $x(E)})),!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(Ot(_t([],st(t),!1).sort(function(R,E){return E.order-R.order}).map(function(R){return R.onExit})),this.machine.options.actions).filter(function(R){return!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=Ut(n),a;if(t instanceof xn)a=r===void 0?t:this.resolveState(xn.from(t,r));else{var s=ct(t)?this.resolve(Pa(this.getResolvedPath(t))):this.resolve(t),c=r??this.machine.context;a=this.resolveState(xn.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:[]},f=Vo([],this.getStateNodes(a.value)),d=u.configuration.length?Vo(f,u.configuration):f;return u.configuration=_t([],st(d),!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,_t([],st(a),!1)),t},e.prototype.resolveTransition=function(t,n,r,o,i){var a,s,c,u,f=this;i===void 0&&(i=io);var d=t.configuration,m=!n||t.transitions.length>0,p=m?t.configuration:n?n.configuration:[],b=ga(p,this),y=m?kx(this.machine,d):void 0,$=n?n.historyValue?n.historyValue:t.source?this.machine.historyValue(n.value):void 0:void 0,x=this.getActions(new Set(p),b,t,r,i,n,o),v=n?be({},n.activities):{};try{for(var w=Qe(x),T=w.next();!T.done;T=w.next()){var I=T.value;try{for(var D=(c=void 0,Qe(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===Fu&&(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{T&&!T.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}var k=st(Da(this,n,r,i,x,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),B=k[0],R=k[1],E=st(px(B,Fc),2),h=E[0],C=E[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,f.machine,R,i),K},n?be({},n.children):{}),H=new xn({value:y||n.value,context:R,_event:i,_sessionid:n?n._sessionid:null,historyValue:y?$?hx($,y):void 0:n?n.historyValue:void 0,history:!y||t.source?n:void 0,actions:y?C:[],activities:y?v:n?n.activities:{},events:[],configuration:p,transitions:t.transitions,children:j,done:b,tags:jf(p),machine:this}),Y=r!==R;H.changed=i.name===$v||Y;var oe=H.history;oe&&delete oe.history;var W=!b&&(this._transient||d.some(function(K){return K._transient}));if(!m&&(!W||i.name===ro))return H;var L=H;if(!b)for(W&&(L=this.resolveRaisedTransition(L,{type:nx},i,o));h.length;){var J=h.shift();L=this.resolveRaisedTransition(L,J._event,i,o)}var U=L.changed||(oe?!!L.actions.length||Y||typeof oe.value!=typeof L.value||!Fv(L.value,oe.value):void 0);return L.changed=U,L.history=oe,L},e.prototype.getStateNode=function(t){if(Zr(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=Zr(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"&&Zr(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||Gr;switch(this.type){case"parallel":return Lo(this.initialStateValue,function(i,a){return i?r.getStateNode(a).resolve(t[a]||i):Gr});case"compound":if(ct(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):Gr}):this.initialStateValue||{};default:return t||Gr}},e.prototype.getResolvedPath=function(t){if(Zr(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=Df(this.states,function(r){return r.initialStateValue||Gr},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=Na(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;ct(n.target)?t=Zr(n.target)?Pa(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(Na(this))return[this];if(this.type==="compound"&&!this.initial)return jt||Yt(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var n=ha(this.initialStateValue);return Ot(n.map(function(r){return t.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var n=st(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:Df(this.states,function(n,r){if(!t)return n.historyValue();var o=ct(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?Ot(ha(o).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var i=lx(r.path,"states")(t).current;return ct(i)?[r.getStateNode(i)]:Ot(ha(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=Ot(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=Qe(Object.keys(i)),c=s.next();!c.done;c=s.next()){var u=c.value,f=i[u];if(f.states)try{for(var d=(r=void 0,Qe(f.events)),m=d.next();!m.done;m=d.next()){var p=m.value;a.add("".concat(p))}}catch(b){r={error:b}}finally{try{m&&!m.done&&(o=d.return)&&o.call(d)}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(!ct(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
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 ct(c)&&c[0]===n.delimiter}):!0,i=this.machine.options.guards,a=this.resolveTarget(r),s=be(be({},t),{actions:cr(On(t.actions)),cond:Pv(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=Lu(i,[typeof a=="symbol"?a:a+""]);o=Ot(Object.keys(u).map(function(v){!jt&&v===ro&&Yt(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var w=Xr(v,u[v]);return jt||Xx(r,v,w),w}).concat(Xr(Oo,c)))}var f=this.config.always?Xr("",this.config.always):[],d=this.config.onDone?Xr(String(Qi(this.id)),this.config.onDone):[];jt||Yt(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var m=Ot(this.invoke.map(function(v){var w=[];return v.onDone&&w.push.apply(w,_t([],st(Xr(String(ma(v.id)),v.onDone)),!1)),v.onError&&w.push.apply(w,_t([],st(Xr(String(Fo(v.id)),v.onError)),!1)),w})),p=this.after,b=Ot(_t(_t(_t(_t([],st(d),!1),st(m),!1),st(o),!1),st(f),!1).map(function(v){return On(v).map(function(w){return r.formatTransition(w)})}));try{for(var y=Qe(p),$=y.next();!$.done;$=y.next()){var x=$.value;b.push(x)}}catch(v){t={error:v}}finally{try{$&&!$.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 Ff(e){var t=Oe.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(f){n={error:f}}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},Vf=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 Bf(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(d){return typeof d.exec=="function"&&"__effect"in d.exec}),c=Po(t_(s,function(d){return d.exec.__effect===Wc.Effect}),2),u=c[0],f=c[1];(i=t.current).push.apply(i,Vf([],Po(u.map(function(d){return[d,o]})),!1)),(a=n.current).push.apply(a,Vf([],Po(f.map(function(d){return[d,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];Bf(o,i)}}),l.useEffect(function(){for(;t.current.length;){var r=Po(t.current.shift(),2),o=r[0],i=r[1];Bf(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=Ff(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,f=t.services,d=t.delays,m=t.state,p=r_(t,["context","guards","actions","activities","services","delays","state"]),b=Ff(function(){var y={context:a,guards:s,actions:c,activities:u,services:f,delays:d},$=r.withConfig(y,function(){return Ko(Ko({},r.context),a)});return Vv($,Ko({deferEvents:!0},p))});return Yo(function(){var y;return n&&(y=b.subscribe(i_(n))),function(){y==null||y.unsubscribe()}},[n]),Yo(function(){return b.start(m?xn.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,f),Object.assign(b.machine.options.delays,d)},[c,s,u,f,d]),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?xn.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})},Nn={};l_(Nn,{assign:()=>p_,colors:()=>hr,createStringInterpolator:()=>Gu,skipAnimation:()=>Kv,to:()=>Yv,willAdvance:()=>Zu});var zu=Ri(),He=e=>Ii(e,zu),Uu=Ri();He.write=e=>Ii(e,Uu);var ys=Ri();He.onStart=e=>Ii(e,ys);var Yu=Ri();He.onFrame=e=>Ii(e,Yu);var Ku=Ri();He.onFinish=e=>Ii(e,Ku);var ao=[];He.setTimeout=(e,t)=>{const n=He.now()+t,r=()=>{const i=ao.findIndex(a=>a.cancel==r);~i&&ao.splice(i,1),dr-=~i?1:0},o={time:n,handler:e,cancel:r};return ao.splice(Bv(n),0,o),dr+=1,Hv(),o};var Bv=e=>~(~ao.findIndex(t=>t.time>e)||~ao.length);He.cancel=e=>{ys.delete(e),Yu.delete(e),Ku.delete(e),zu.delete(e),Uu.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=()=>{ys.delete(n),t=null},r};var qu=typeof window<"u"?window.requestAnimationFrame:()=>{};He.use=e=>qu=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"):zv()};var lr=-1,dr=0,zc=!1;function Ii(e,t){zc?(t.delete(e),e(0)):(t.add(e),Hv())}function Hv(){lr<0&&(lr=0,He.frameLoop!=="demand"&&qu(Wv))}function d_(){lr=-1}function Wv(){~lr&&(qu(Wv),He.batchedUpdates(zv))}function zv(){const e=lr;lr=He.now();const t=Bv(lr);if(t&&(Uv(ao.splice(0,t),n=>n.handler()),dr-=t),!dr){d_();return}ys.flush(),zu.flush(e?Math.min(64,lr-e):16.667),Yu.flush(),Uu.flush(),Ku.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,Uv(t,r=>r(n)&&e.add(r)),dr+=e.size,t=e)}}}function Uv(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}),me={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 qn(e,t){if(me.arr(e)){if(!me.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 Je=(e,t)=>e.forEach(t);function Hn(e,t,n){if(me.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 mn=e=>me.und(e)?[]:me.arr(e)?e:[e];function qo(e,t){if(e.size){const n=Array.from(e);e.clear(),Je(n,t)}}var Ho=(e,...t)=>qo(e,n=>n(...t)),Xu=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Gu,Yv,hr=null,Kv=!1,Zu=Uc,p_=e=>{e.to&&(Yv=e.to),e.now&&(He.now=e.now),e.colors!==void 0&&(hr=e.colors),e.skipAnimation!=null&&(Kv=e.skipAnimation),e.createStringInterpolator&&(Gu=e.createStringInterpolator),e.requestAnimationFrame&&He.use(e.requestAnimationFrame),e.batchedUpdates&&(He.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Zu=e.willAdvance),e.frameLoop&&(He.frameLoop=e.frameLoop)},Xo=new Set,Cn=[],rc=[],ka=0,bs={get idle(){return!Xo.size&&!Cn.length},start(e){ka>e.priority?(Xo.add(e),He.onStart(h_)):(qv(e),He(Yc))},advance:Yc,sort(e){if(ka)He.onFrame(()=>bs.sort(e));else{const t=Cn.indexOf(e);~t&&(Cn.splice(t,1),Xv(e))}},clear(){Cn=[],Xo.clear()}};function h_(){Xo.forEach(qv),Xo.clear(),He(Yc)}function qv(e){Cn.includes(e)||Xv(e)}function Xv(e){Cn.splice(v_(Cn,t=>t.priority>e.priority),0,e)}function Yc(e){const t=rc;for(let n=0;n<Cn.length;n++){const r=Cn[n];ka=r.priority,r.idle||(Zu(r),r.advance(e),r.idle||t.push(r))}return ka=0,rc=Cn,rc.length=0,Cn=t,Cn.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},An="[-+]?\\d*\\.?\\d+",Ma=An+"%";function ws(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var y_=new RegExp("rgb"+ws(An,An,An)),b_=new RegExp("rgba"+ws(An,An,An,An)),w_=new RegExp("hsl"+ws(An,Ma,Ma)),E_=new RegExp("hsla"+ws(An,Ma,Ma,An)),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:hr&&hr[e]!==void 0?hr[e]:(t=y_.exec(e))?(Qr(t[1])<<24|Qr(t[2])<<16|Qr(t[3])<<8|255)>>>0:(t=b_.exec(e))?(Qr(t[1])<<24|Qr(t[2])<<16|Qr(t[3])<<8|zf(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))?(Hf(Wf(t[1]),ea(t[2]),ea(t[3]))|255)>>>0:(t=E_.exec(e))?(Hf(Wf(t[1]),ea(t[2]),ea(t[3]))|zf(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 Hf(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 Qr(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Wf(e){return(parseFloat(e)%360+360)%360/360}function zf(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function ea(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Uf(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(me.fun(e))return e;if(me.arr(e))return di({range:e,output:t,extrapolate:n});if(me.str(e.output[0]))return Gu(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 f=I_(u,i);return T_(u,i[f],i[f+1],o[f],o[f+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)},ja=1.70158,ta=ja*1.525,Yf=ja+1,Kf=2*Math.PI/3,qf=2*Math.PI/4.5,na=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=>Yf*e*e*e-ja*e*e,easeOutBack:e=>1+Yf*Math.pow(e-1,3)+ja*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((ta+1)*2*e-ta)/2:(Math.pow(2*e-2,2)*((ta+1)*(e*2-2)+ta)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Kf),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Kf)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*qf))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*qf)/2+1,easeInBounce:e=>1-na(1-e),easeOutBounce:na,easeInOutBounce:e=>e<.5?(1-na(1-2*e))/2:(1+na(2*e-1))/2,steps:R_},fi=Symbol.for("FluidValue.get"),vo=Symbol.for("FluidValue.observers"),_n=e=>!!(e&&e[fi]),sn=e=>e&&e[fi]?e[fi]():e,Xf=e=>e[vo]||null;function P_(e,t){e.eventObserved?e.eventObserved(t):e(t)}function pi(e,t){const n=e[vo];n&&n.forEach(r=>{P_(r,t)})}var Gv=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");A_(this,e)}},A_=(e,t)=>Zv(e,fi,t);function xo(e,t){if(e[fi]){let n=e[vo];n||Zv(e,vo,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function hi(e,t){const n=e[vo];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[vo]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Zv=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ya=/[+\-]?(?: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,Gf=new RegExp(`(${ya.source})(%|[a-z]+)`,"i"),N_=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Es=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Qv=e=>{const[t,n]=k_(e);if(!t||Xu())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&&Es.test(n))return Qv(n);if(n)return n}return e},k_=e=>{const t=Es.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})`,Jv=e=>{ic||(ic=hr?new RegExp(`(${Object.keys(hr).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>sn(i).replace(Es,Qv).replace(D_,Uf).replace(ic,Uf)),n=t.map(i=>i.match(ya).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=!Gf.test(t[0])&&((c=t.find(u=>Gf.test(u)))==null?void 0:c.replace(ya,""));let s=0;return t[0].replace(ya,()=>`${o[s++](i)}${a||""}`).replace(N_,M_)}},Qu="react-spring: ",em=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Qu}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},j_=em(console.warn);function L_(){j_(`${Qu}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var F_=em(console.warn);function V_(){F_(`${Qu}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 xs(e){return me.str(e)&&(e[0]=="#"||/\d/.test(e)||!Xu()&&Es.test(e)||e in(hr||{}))}var Ju=Xu()?l.useEffect:l.useLayoutEffect,B_=()=>{const e=l.useRef(!1);return Ju(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function tm(){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 nm=e=>l.useEffect(e,z_),z_=[];function Zf(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,Vn=e=>e&&e[vi],el=(e,t)=>f_(e,vi,t),_s=e=>e&&e[vi]&&e[vi].getPayload(),rm=class{constructor(){el(this,this)}getPayload(){return this.payload||[]}},Oi=class extends rm{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,me.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 me.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,me.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(me.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()}},La={dependencies:null},Ss=class extends rm{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Hn(this.source,(n,r)=>{U_(n)?t[r]=n.getValue(e):_n(n)?t[r]=sn(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Je(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return Hn(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){La.dependencies&&_n(e)&&La.dependencies.add(e);const t=_s(e);t&&Je(t,n=>this.add(n))}},om=class extends Ss{constructor(e){super(e)}static create(e){return new om(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(xs(e)?mi:Oi).create(e)}function Kc(e){const t=Vn(e);return t?t.constructor:me.arr(e)?om:xs(e)?mi:Oi}var Qf=(e,t)=>{const n=!me.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=tm(),f=()=>{const b=i.current;if(n&&!b)return;(b?t.applyAnimatedValues(b,s.getValue(!0)):!1)===!1&&u()},d=new K_(f,c),m=l.useRef();Ju(()=>(m.current=d,Je(c,b=>xo(b,d)),()=>{m.current&&(Je(m.current.deps,b=>hi(b,m.current)),He.cancel(m.current.update))})),l.useEffect(f,[]),nm(()=>()=>{const b=m.current;Je(b.deps,y=>hi(y,b))});const p=t.getComponentProps(s.getValue());return Oe.createElement(e,{...p,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 La.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Ss(e),La.dependencies=null,[e,n]}function X_(e,t){return e&&(me.fun(e)?e(t):e.current=t),t}var Jf=Symbol.for("AnimatedComponent"),G_=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=o=>new Ss(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=a=>{const s=ep(a)||"Anonymous";return me.str(a)?a=i[a]||(i[a]=Qf(a,o)):a=a[Jf]||(a[Jf]=Qf(a,o)),a.displayName=`Animated(${s})`,a};return Hn(e,(a,s)=>{me.arr(e)&&(s=ep(a)),i[s]=i(a)}),{animated:i}},ep=e=>me.str(e)?e:e&&me.str(e.displayName)?e.displayName:me.fun(e)&&e.name||null;function Ir(e,...t){return me.fun(e)?e(...t):e}var Go=(e,t)=>e===!0||!!(t&&e&&(me.fun(e)?e(t):mn(e).includes(t))),im=(e,t)=>me.obj(e)?t&&e[t]:e,am=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Z_=e=>e,tl=(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);me.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(Hn(e,(r,o)=>{J_[o]||(t[o]=r,n++)}),n)return t}function sm(e){const t=eS(e);if(t){const n={to:t};return Hn(e,(r,o)=>o in t||(n[o]=r)),n}return{...e}}function gi(e){return e=sn(e),me.arr(e)?e.map(gi):xs(e)?Nn.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 me.fun(e)||me.arr(e)&&me.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 cm={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={...cm.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},tp(n,t),t={...n,...t}),tp(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 me.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 tp(e,t){if(!me.und(t.decay))e.duration=void 0;else{const n=!me.und(t.tension)||!me.und(t.friction);(n||!me.und(t.frequency)||!me.und(t.damping)||!me.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var np=[],aS=class{constructor(){this.changed=!1,this.values=np,this.toValues=null,this.fromValues=np,this.config=new oS,this.immediate=!1}};function um(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise((a,s)=>{let c,u,f=Go(n.cancel??(r==null?void 0:r.cancel),t);if(f)p();else{me.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 d(){o.resumeQueue.add(m),o.timeouts.delete(u),u.cancel(),c=u.time-He.now()}function m(){c>0&&!Nn.skipAnimation?(o.delayed=!0,u=He.setTimeout(p,c),o.pauseQueue.add(d),o.timeouts.add(u)):p()}function p(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(d),o.timeouts.delete(u),e<=(o.cancelId||0)&&(f=!0);try{i.start({...n,callId:e,cancel:f},a)}catch(b){s(b)}}})}var nl=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?so(e.get()):t.every(n=>n.noop)?lm(e.get()):Pn(e.get(),t.every(n=>n.finished)),lm=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Pn=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),so=e=>({value:e,cancelled:!0,finished:!1});function dm(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=tl(t,($,x)=>x==="onRest"?void 0:$);let f,d;const m=new Promise(($,x)=>(f=$,d=x)),p=$=>{const x=o<=(n.cancelId||0)&&so(r)||o!==n.asyncId&&Pn(r,!1);if(x)throw $.result=x,d($),$},b=($,x)=>{const v=new rp,w=new op;return(async()=>{if(Nn.skipAnimation)throw yi(n),w.result=Pn(r,!1),d(w),w;p(v);const T=me.obj($)?{...$}:{...x,to:$};T.parentId=o,Hn(u,(D,A)=>{me.und(T[A])&&(T[A]=D)});const I=await r.start(T);return p(v),n.paused&&await new Promise(D=>{n.resumeQueue.add(D)}),I})()};let y;if(Nn.skipAnimation)return yi(n),Pn(r,!1);try{let $;me.arr(e)?$=(async x=>{for(const v of x)await b(v)})(e):$=Promise.resolve(e(b,r.stop.bind(r))),await Promise.all([$.then(f),m]),y=Pn(r.get(),!0,!1)}catch($){if($ instanceof rp)y=$.result;else if($ instanceof op)y=$.result;else throw $}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?s:void 0,n.promise=i?c:void 0)}return me.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 rp=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.")}},op=class extends Error{constructor(){super("SkipAnimationSignal")}},Gc=e=>e instanceof rl,sS=1,rl=class extends Gv{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=Vn(this);return e&&e.getValue()}to(...e){return Nn.to(this,e)}interpolate(...e){return L_(),Nn.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){pi(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||bs.sort(this),pi(this,{type:"priority",parent:this,priority:e})}},Lr=Symbol.for("SpringPhase"),fm=1,Zc=2,Qc=4,ac=e=>(e[Lr]&fm)>0,ir=e=>(e[Lr]&Zc)>0,Ao=e=>(e[Lr]&Qc)>0,ip=(e,t)=>t?e[Lr]|=Zc|fm:e[Lr]&=~Zc,ap=(e,t)=>t?e[Lr]|=Qc:e[Lr]&=~Qc,cS=class extends rl{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,!me.und(e)||!me.und(t)){const n=me.obj(e)?{...e}:{...t,from:e};me.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ir(this)||this._state.asyncTo)||Ao(this)}get goal(){return sn(this.animation.to)}get velocity(){const e=Vn(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=_s(r.to);!a&&_n(r.to)&&(o=mn(sn(r.to))),r.values.forEach((u,f)=>{if(u.done)return;const d=u.constructor==mi?1:a?a[f].lastPosition:o[f];let m=r.immediate,p=d;if(!m){if(p=u.lastPosition,i.tension<=0){u.done=!0;return}let b=u.elapsedTime+=e;const y=r.fromValues[f],$=u.v0!=null?u.v0:u.v0=me.arr(i.velocity)?i.velocity[f]:i.velocity;let x;const v=i.precision||(y==d?.005:Math.min(1,Math.abs(d-y)*.001));if(me.und(i.duration))if(i.decay){const w=i.decay===!0?.998:i.decay,T=Math.exp(-(1-w)*b);p=y+$/(1-w)*(1-T),m=Math.abs(u.lastPosition-p)<=v,x=$*T}else{x=u.lastVelocity==null?$:u.lastVelocity;const w=i.restVelocity||v/10,T=i.clamp?0:i.bounce,I=!me.und(T),D=y==d?u.v0>0:y<d;let A,F=!1;const k=1,B=Math.ceil(e/k);for(let R=0;R<B&&(A=Math.abs(x)>w,!(!A&&(m=Math.abs(d-p)<=v,m)));++R){I&&(F=p==d||p>d==D,F&&(x=-x*T,p=d));const E=-i.tension*1e-6*(p-d),h=-i.friction*.001*x,C=(E+h)/i.mass;x=x+C*k,p=p+x*k}}else{let w=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,u.durationProgress>0&&(u.elapsedTime=i.duration*u.durationProgress,b=u.elapsedTime+=e)),w=(i.progress||0)+b/this._memoizedDuration,w=w>1?1:w<0?0:w,u.durationProgress=w),p=y+i.easing(w)*(d-y),x=(p-u.lastPosition)/e,m=w==1}u.lastVelocity=x,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),m=!0)}a&&!a[f].done&&(m=!1),m?u.done=!0:t=!1,u.setValue(p,i.round)&&(n=!0)});const s=Vn(this),c=s.getValue();if(t){const u=sn(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 me.und(e)?(n=this.queue||[],this.queue=[]):n=[me.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>nl(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=me.obj(n)?n[t]:n,(n==null||qc(n))&&(n=void 0),r=me.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=sn(r),me.und(r)?Vn(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,tl(e,(a,s)=>/^on/.test(s)?im(a,n):a)),cp(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 um(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Ao(this)||(ap(this,!0),Ho(i.pauseQueue),No(this,"onPause",Pn(this,Do(this,this.animation.to)),this))},resume:()=>{Ao(this)&&(ap(this,!1),ir(this)&&this._resume(),Ho(i.resumeQueue),No(this,"onResume",Pn(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=pm(e);if(s)return this._update(s,!0)}return a})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(so(this));const r=!me.und(e.to),o=!me.und(e.from);if(r||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(so(this));const{key:i,defaultProps:a,animation:s}=this,{to:c,from:u}=s;let{to:f=c,from:d=u}=e;o&&!r&&(!t.default||me.und(f))&&(f=d),t.reverse&&([f,d]=[d,f]);const m=!qn(d,u);m&&(s.from=d),d=sn(d);const p=!qn(f,c);p&&this._focus(f);const b=qc(t.to),{config:y}=s,{decay:$,velocity:x}=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=Vn(this);if(!v||me.und(f))return n(Pn(this,!0));const w=me.und(t.reset)?o&&!t.default:!me.und(d)&&Go(t.reset,i),T=w?d:this.get(),I=gi(f),D=me.num(I)||me.arr(I)||xs(I),A=!b&&(!D||Go(a.immediate||t.immediate,i));if(p){const R=Kc(f);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=_n(f),B=!1;if(!k){const R=w||!ac(this)&&m;(p||R)&&(B=qn(gi(T),I),k=!B),(!qn(s.immediate,A)&&!A||!qn(y.decay,$)||!qn(y.velocity,x))&&(k=!0)}if(B&&ir(this)&&(s.changed&&!w?k=!0:k||this._stop(c)),!b&&((k||_n(c))&&(s.values=v.getPayload(),s.toValues=_n(f)?null:F==mi?[1]:mn(I)),s.immediate!=A&&(s.immediate=A,!A&&!w&&this._set(c)),k)){const{onRest:R}=s;Je(lS,h=>cp(this,t,h));const E=Pn(this,Do(this,c));Ho(this._pendingCalls,E),this._pendingCalls.add(n),s.changed&&He.batchedUpdates(()=>{var h;s.changed=!w,R==null||R(E,this),w?Ir(a.onRest,E):(h=s.onStart)==null||h.call(s,E,this)})}w&&this._set(T),b?n(dm(t.to,t,this._state,this)):k?this._start():ir(this)&&!p?this._pendingCalls.add(n):n(lm(T))}_focus(e){const t=this.animation;e!==t.to&&(Xf(this)&&this._detach(),t.to=e,Xf(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;_n(t)&&(xo(t,this),Gc(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;_n(e)&&hi(e,this)}_set(e,t=!0){const n=sn(e);if(!me.und(n)){const r=Vn(this);if(!r||!qn(n,r.getValue())){const o=Kc(n);!r||r.constructor!=o?el(this,o.create(n)):r.setValue(n),r&&He.batchedUpdates(()=>{this._onChange(n,t)})}}return Vn(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,No(this,"onStart",Pn(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;Vn(this).reset(sn(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ir(this)||(ip(this,!0),Ao(this)||this._resume())}_resume(){Nn.skipAnimation?this.finish():bs.start(this)}_stop(e,t){if(ir(this)){ip(this,!1);const n=this.animation;Je(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),pi(this,{type:"idle",parent:this});const r=t?so(this.get()):Pn(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 qn(r,n)}function pm(e,t=e.loop,n=e.to){const r=Ir(t);if(r){const o=r!==!0&&sm(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=sm(e),r=new Set;return me.obj(t)&&sp(t,r),me.obj(n)&&sp(n,r),e.keys=r.size?Array.from(r):null,e}function uS(e){const t=bi(e);return me.und(t.default)&&(t.default=tl(t)),t}function sp(e,t){Hn(e,(n,r)=>n!=null&&t.add(r))}var lS=["onStart","onRest","onChange","onPause","onResume"];function cp(e,t,n){e.animation[n]=t[n]!==am(t,n)?im(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,pS=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];me.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=mn(t).map(bi):this.queue=[],this._flush?this._flush(this,n):(ym(this,n),Jc(this,n))}stop(t,n){if(t!==!!t&&(n=t),n){const r=this.springs;Je(mn(n),o=>r[o].stop(!!t))}else yi(this._state,this._lastAsyncId),this.each(r=>r.stop(!!t));return this}pause(t){if(me.und(t))this.start({pause:!0});else{const n=this.springs;Je(mn(t),r=>n[r].pause())}return this}resume(t){if(me.und(t))this.start({pause:!1});else{const n=this.springs;Je(mn(t),r=>n[r].resume())}return this}each(t){Hn(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=>nl(e,n))}async function hm(e,t,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:c}=t,u=me.obj(t.default)&&t.default;a&&(t.loop=!1),o===!1&&(t.to=null),i===!1&&(t.from=null);const f=me.arr(o)||me.fun(o)?o:void 0;f?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):Je(dS,y=>{const $=t[y];if(me.fun($)){const x=e._events[y];t[y]=({finished:v,cancelled:w})=>{const T=x.get($);T?(v||(T.finished=!1),w&&(T.cancelled=!0)):x.set($,{value:null,finished:v||!1,cancelled:w||!1})},u&&(u[y]=t[y])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Ho(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const m=(r||Object.keys(e.springs)).map(y=>e.springs[y].start(t)),p=t.cancel===!0||am(t,"cancel")===!0;(f||p&&d.asyncId)&&m.push(um(++e._lastAsyncId,{props:t,state:d,actions:{pause:Uc,resume:Uc,start(y,$){p?(yi(d,e._lastAsyncId),$(so(e))):(y.onRest=s,$(dm(f,y,d,e)))}}})),d.paused&&await new Promise(y=>{d.resumeQueue.add(y)});const b=nl(e,await Promise.all(m));if(a&&b.finished&&!(n&&b.noop)){const y=pm(t,a,o);if(y)return ym(e,[y]),hm(e,y,!0)}return c&&He.batchedUpdates(()=>c(b,e,e.item)),b}function up(e,t){const n={...e.springs};return t&&Je(mn(t),r=>{me.und(r.keys)&&(r=bi(r)),me.obj(r.to)||(r={...r,to:void 0}),gm(n,r,o=>mm(o))}),vm(e,n),n}function vm(e,t){Hn(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,xo(n,e))})}function mm(e,t){const n=new cS;return n.key=e,t&&xo(n,t),n}function gm(e,t,n){t.keys&&Je(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function ym(e,t){Je(t,n=>{gm(e.springs,n,r=>mm(r,e))})}var Cs=({children:e,...t})=>{const n=l.useContext(Fa),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=H_(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=Fa;return Oe.createElement(i,{value:t},e)},Fa=hS(Cs,{});Cs.Provider=Fa.Provider;Cs.Consumer=Fa.Consumer;function hS(e,t){return Object.assign(e,Oe.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var vS=()=>{const e=[],t=function(r){V_();const o=[];return Je(e,(i,a)=>{if(me.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 Je(e,r=>r.pause(...arguments)),this},t.resume=function(){return Je(e,r=>r.resume(...arguments)),this},t.set=function(r){Je(e,(o,i)=>{const a=me.fun(r)?r(i,o):r;a&&o.set(a)})},t.start=function(r){const o=[];return Je(e,(i,a)=>{if(me.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 Je(e,r=>r.stop(...arguments)),this},t.update=function(r){return Je(e,(o,i)=>o.update(this._getProps(r,o,i))),this};const n=function(r,o,i){return me.fun(r)?r(i,o):r};return t._getProps=n,t};function mS(e,t,n){const r=me.fun(t)&&t;r&&!n&&(n=[]);const o=l.useMemo(()=>r||arguments.length==3?vS():void 0,[]),i=l.useRef(0),a=tm(),s=l.useMemo(()=>({ctrls:[],queue:[],flush(x,v){const w=up(x,v);return i.current>0&&!s.queue.length&&!Object.keys(w).some(I=>!x.springs[I])?Jc(x,v):new Promise(I=>{vm(x,w),s.queue.push(()=>{I(Jc(x,v))}),a()})}}),[]),c=l.useRef([...s.ctrls]),u=[],f=Zf(e)||0;l.useMemo(()=>{Je(c.current.slice(e,f),x=>{nS(x,o),x.stop(!0)}),c.current.length=e,d(f,e)},[e]),l.useMemo(()=>{d(0,Math.min(f,e))},n);function d(x,v){for(let w=x;w<v;w++){const T=c.current[w]||(c.current[w]=new pS(null,s.flush)),I=r?r(w,T):t[w];I&&(u[w]=uS(I))}}const m=c.current.map((x,v)=>up(x,u[v])),p=l.useContext(Cs),b=Zf(p),y=p!==b&&tS(p);Ju(()=>{i.current++,s.ctrls=c.current;const{queue:x}=s;x.length&&(s.queue=[],Je(x,v=>v())),Je(c.current,(v,w)=>{o==null||o.add(v),y&&v.start({default:p});const T=u[w];T&&(rS(v,T.ref),v.ref?v.queue.push(T):v.start(T))})}),nm(()=>()=>{Je(s.ctrls,x=>x.stop(!0))});const $=m.map(x=>({...x}));return o?[$,o]:$}function gS(e,t){const n=me.fun(e),[[r],o]=mS(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,o]:r}var bm=class extends rl{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);el(this,r.create(n))}advance(e){const t=this._get(),n=this.get();qn(t,n)||(Vn(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&lp(this._active)&&sc(this)}_get(){const e=me.arr(this.source)?this.source.map(sn):mn(sn(this.source));return this.calc(...e)}_start(){this.idle&&!lp(this._active)&&(this.idle=!1,Je(_s(this),e=>{e.done=!1}),Nn.skipAnimation?(He.batchedUpdates(()=>this.advance()),sc(this)):bs.start(this))}_attach(){let e=1;Je(mn(this.source),t=>{_n(t)&&xo(t,this),Gc(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Je(mn(this.source),e=>{_n(e)&&hi(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=mn(this.source).reduce((t,n)=>Math.max(t,(Gc(n)?n.priority:0)+1),0))}};function yS(e){return e.idle!==!1}function lp(e){return!e.size||Array.from(e).every(yS)}function sc(e){e.idle||(e.idle=!0,Je(_s(e),t=>{t.done=!0}),pi(e,{type:"idle",parent:e}))}var Jr=(e,...t)=>new bm(e,t);Nn.assign({createStringInterpolator:Jv,to:(e,t)=>new bm(e,t)});var wm=/^--/;function bS(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!wm.test(e)&&!(Zo.hasOwnProperty(e)&&Zo[e])?t+"px":(""+t).trim()}var dp={};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),f=Object.keys(c).map(d=>n||e.hasAttribute(d)?d:dp[d]||(dp[d]=d.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));o!==void 0&&(e.textContent=o);for(const d in r)if(r.hasOwnProperty(d)){const m=bS(d,r[d]);wm.test(d)?e.style.setProperty(d,m):e.style[d]=m}f.forEach((d,m)=>{e.setAttribute(d,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)=>me.num(e)&&e!==0?e+t:e,ba=(e,t)=>me.arr(e)?e.every(n=>ba(n,t)):me.num(e)?e===t:parseFloat(e)===t,$S=class extends Ss{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(",")})`,ba(a,0)])),Hn(r,(a,s)=>{if(s==="transform")o.push([a||""]),i.push(c=>[c,c===""]);else if(_S.test(s)){if(delete r[s],me.und(a))return;const c=SS.test(s)?"px":CS.test(s)?"deg":"";o.push(mn(a)),i.push(s==="rotate3d"?([u,f,d,m])=>[`rotate3d(${u},${f},${d},${cc(m,c)})`,ba(m,0)]:u=>[`${s}(${u.map(f=>cc(f,c)).join(",")})`,ba(u,s.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new TS(o,i)),super(r)}},TS=class extends Gv{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 Je(this.inputs,(n,r)=>{const o=sn(n[0]),[i,a]=this.transforms[r](me.arr(o)?o:n.map(sn));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){e==1&&Je(this.inputs,t=>Je(t,n=>_n(n)&&xo(n,this)))}observerRemoved(e){e==0&&Je(this.inputs,t=>Je(t,n=>_n(n)&&hi(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),pi(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"];Nn.assign({batchedUpdates:vn.unstable_batchedUpdates,createStringInterpolator:Jv,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 ol(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(f){return i*f}),c=t.map(function(f){return o*f}),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 fp(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?-fp(t-e,n-t,r)+t:e>n?+fp(e-n,n-t,r)+n:e}function pp(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&&pp(e.prototype,t),n&&pp(e,n),e}function rn(){return rn=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},rn.apply(this,arguments)}function Em(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 Yn(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 hp(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 hp(e,t)}}function hp(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 $s(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 xm(){}function _m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?xm:t.length===1?t[0]:function(){for(var r,o=$s(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 vp(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 il(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]=il(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 Sm(){return typeof window<"u"&&"ontouchstart"in window}function LS(){return typeof window<"u"&&"onpointerdown"in window}function Cm(e){return"pointerId"in e?null:e.type==="touchend"?e.changedTouches:e.targetTouches}function $m(e){return Array.from(Cm(e)).map(function(t){return t.identifier})}function mp(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 gp(e,t){t===void 0&&(t=FS);var n=Cm(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},Tm=rn({},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(d){return Tm.bounds(t(d))};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,f=u===void 0?1/0:u;return[[o,a],[c,f]]}}),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=rn({},Tm,{useTouch:function(t){t===void 0&&(t=!1);var n=Sm(),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,f=ur(t,i?3:s||u?1:0);return this.filterTaps=i,f},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={}),il(e,KS)}function GS(e){return e===void 0&&(e={}),il(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 rn({_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:xm,canceled:!1,memo:void 0,args:void 0},e)}function Im(){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),f=2;f<c;f++)u[f-2]=arguments[f];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,f=rn({},o.controller.state.shared,o.state,o.mapStateValues(o.state),{locked:!!document.pointerLockElement,touches:c,down:u}),d=o.handler(f);return o.state.memo=d!==void 0?d:o.state.memo,f},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,f=i.lastOffset,d=i.movement,m=i._threshold,p=this.getInternalMovement(r,this.state),b=u[0]===!1?yp(p[0],m[0]):u[0],y=u[1]===!1?yp(p[1],m[1]):u[1],$=this.checkIntentionality([b,y],p);if($._blocked)return rn({},$,{_movement:p,delta:[0,0]});var x=$._intentional,v=p,w=[x[0]!==!1?p[0]-x[0]:0,x[1]!==!1?p[1]-x[1]:0],T=eu(w,f),I=c?o:[0,0];return w=bp(a,eu(w,s),I),rn({},$,{intentional:x[0]!==!1||x[1]!==!1,_initial:s,_movement:v,movement:w,values:r,offset:bp(a,T,I),delta:ol(w,d)})},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 yp(e,t){return Math.abs(e)>=t?nu(e)*t:!1}function bp(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],f=e[1],d=f[0],m=f[1];return[Qo(r,c,u,i),Qo(o,d,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,f=n.timeStamp,d=i.initial,m=i.bounds,p=i.threshold,b=ol(c(p),c([0,0])).map(Math.abs),y=rn({},Im()[a],{_active:!0,args:s,values:t,initial:r??t,_threshold:b,offset:u,lastOffset:u,startTime:f});return rn({},y,{_initial:vp(d,y),_bounds:vp(m,y)})}var tC=function(t){var n=this;this.classes=t,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=Sm(),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=$s(n.classes),c;!(c=s()).done;){var u=c.value;new u(n,o).addBindings(a)}var f=function(p){Fn(a,p,function(b){return n.nativeRefs[p](rn({},n.state.shared,{event:b,args:o}))})};for(var d in n.nativeRefs)f(d);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=Om(n.config),o=n.config.eventOptions;r&&Pi(r,Rm(n.domListeners),o),Object.values(n.timeouts).forEach(clearTimeout),oC(n)},this.classes=t,this.state=Im(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function nC(e,t){"pointerId"in t?e.pointerIds.add(t.pointerId):e.touchIds=new Set($m(t))}function rC(e,t){"pointerId"in t?e.pointerIds.delete(t.pointerId):$m(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),Pm(o.window,i[t]=n,r))}function sC(e,t){var n=e.config,r=e.domListeners,o=Om(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;Pi(o,Rm(r),i);for(var a=0,s=Object.entries(t);a<s.length;a++){var c=s[a],u=c[0],f=c[1],d=u.slice(2).toLowerCase();r.push([d,_m.apply(void 0,f)])}Pm(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],f=Array.isArray(u)?u:[u],d=c+o;r[d]=_m.apply(void 0,f)}return r}function Rm(e){return e===void 0&&(e=[]),e.splice(0,e.length)}function Om(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function Fn(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function Pm(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={});for(var r=$s(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=$s(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){Em(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.getInternalMovement=function(o,i){return ol(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),pC=3;function wp(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}var hC=function(e){Em(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){wp(o),aC(r.controller,r.stateKey,[["touchmove",r.preventScroll],["touchend",r.clean.bind(Yn(r))],["touchcancel",r.clean.bind(Yn(r))]],{passive:!1}),r.setTimeout(r.startDrag.bind(Yn(r)),250,o)},r.setUpDelayedDragTrigger=function(o){r.state._dragDelayed=!0,wp(o),r.setTimeout(r.startDrag.bind(Yn(r)),r.config.delay,o)},r.setStartState=function(o){var i=gp(o,r.transform);r.updateSharedState(mp(o)),r.updateGestureState(rn({},eC(Yn(r),i,o),uc(Yn(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=gp(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=mp(o);r.updateSharedState(u);var f=uc(Yn(r),o),d=tu(c._movement),m=r.state._dragIsTap;m&&d>=pC&&(m=!1),r.updateGestureState(rn({},f,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,f=u[0],d=u[1],m=r.state._intentional,p=m[0],b=m[1],y=r.config.swipeVelocity,$=y[0],x=y[1],v=r.config.swipeDistance,w=v[0],T=v[1],I=r.config.swipeDuration,D=rn({},uc(Yn(r),o),r.getMovement(r.state.values)),A=[0,0];D.elapsedTime<I&&(p!==!1&&Math.abs(s)>$&&Math.abs(f)>w&&(A[0]=nu(s)),b!==!1&&Math.abs(c)>x&&Math.abs(d)>T&&(A[1]=nu(c))),r.updateSharedState({buttons:0}),r.updateGestureState(rn({},D,{tap:i,swipe:A})),r.fireGestureHandler(r.config.filterTaps&&i===!0)}},r.clean=function(){e.prototype.clean.call(Yn(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?(Fn(o,"onTouchStart",this.onDragStart),Fn(o,"onTouchMove",this.onDragChange),Fn(o,"onTouchEnd",this.onDragEnd),Fn(o,"onTouchCancel",this.onDragEnd)):(Fn(o,"onPointerDown",this.onDragStart),Fn(o,"onPointerMove",this.onDragChange),Fn(o,"onPointerUp",this.onDragEnd),Fn(o,"onPointerCancel",this.onDragEnd)),this.config.filterTaps){var i=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Fn(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 wa(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(!wa(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(!wa(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)&&!wa(e[o[r]],t[o[r]]))return!1;return!0}return e!==e&&t!==t}function mC(e,t){try{return wa(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",hC);var n=l.useRef();return n.current||(n.current=vC(ZS,mC)),uC({drag:e},n.current(t))}var yC=Ke({defaultClassName:"aglyib0",variantClassNames:{variant:{small:"aglyib1",large:"aglyib2"}},defaultVariants:{},compoundVariants:[]});const Wr=l.forwardRef(({as:e,children:t,className:n,style:r,isDisabled:o,variant:i,...a},s)=>{const c=e||"button",u=i==="large"?16:8;return M.jsx(c,{ref:s,as:e,"data-test-id":a["data-test-id"],className:Te(yC({variant:i}),n),disabled:o,style:r,...a,children:M.jsx(et,{display:"inline-flex",children:M.jsx(rs,{size:u,color:o?Ct.theme.colors.grey1:Ct.theme.colors.black})})})});Wr.displayName="Button";Wr.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,variant:"large"};const Am=l.forwardRef(({header:e,onBack:t,onClose:n,showBack:r,showClose:o,title:i,bind:a,hasHandleBar:s,style:c},u)=>e!==!1?l.createElement(et,{...c?{style:c}:{},key:"header","data-rsbs-header":!0,"data-rsbs-header-handle-bar":s,ref:u,...s?a==null?void 0:a():{}},e||M.jsxs(Ht,{alignItems:"center",justifyContent:"space-between",pt:s?"$16":"$8",pb:"$8",gap:"$16",children:[M.jsxs(Ht,{alignItems:"center",gap:"$16",children:[r&&M.jsx(E0,{cursor:"pointer",onClick:t,size:18,color:Ct.theme.colors.grey1,"data-test-id":"vds-BS-back-btn"}),i&&M.jsx(Xt,{fontWeight:"$bold",textStyle:"subtitle2",m:"$0",children:i})]}),o&&M.jsx(Wr,{variant:"large",onClick:n,"data-test-id":"vds-BS-close-btn"})]})):M.jsx(et,{"data-rsbs-header":!0,ref:u,...a==null?void 0:a()},"header"));Am.defaultProps={title:void 0,header:void 0,showBack:void 0,showClose:!0,hasHandleBar:!0,bind:void 0,onBack:void 0,onClose:void 0,style: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}/*!
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 xm(){}function _m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?xm:t.length===1?t[0]:function(){for(var r,o=$s(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 vp(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 il(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]=il(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 Sm(){return typeof window<"u"&&"ontouchstart"in window}function LS(){return typeof window<"u"&&"onpointerdown"in window}function Cm(e){return"pointerId"in e?null:e.type==="touchend"?e.changedTouches:e.targetTouches}function $m(e){return Array.from(Cm(e)).map(function(t){return t.identifier})}function mp(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 gp(e,t){t===void 0&&(t=FS);var n=Cm(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},Tm=rn({},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(d){return Tm.bounds(t(d))};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,f=u===void 0?1/0:u;return[[o,a],[c,f]]}}),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=rn({},Tm,{useTouch:function(t){t===void 0&&(t=!1);var n=Sm(),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,f=ur(t,i?3:s||u?1:0);return this.filterTaps=i,f},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={}),il(e,KS)}function GS(e){return e===void 0&&(e={}),il(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 rn({_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:xm,canceled:!1,memo:void 0,args:void 0},e)}function Im(){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),f=2;f<c;f++)u[f-2]=arguments[f];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,f=rn({},o.controller.state.shared,o.state,o.mapStateValues(o.state),{locked:!!document.pointerLockElement,touches:c,down:u}),d=o.handler(f);return o.state.memo=d!==void 0?d:o.state.memo,f},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,f=i.lastOffset,d=i.movement,m=i._threshold,p=this.getInternalMovement(r,this.state),b=u[0]===!1?yp(p[0],m[0]):u[0],y=u[1]===!1?yp(p[1],m[1]):u[1],$=this.checkIntentionality([b,y],p);if($._blocked)return rn({},$,{_movement:p,delta:[0,0]});var x=$._intentional,v=p,w=[x[0]!==!1?p[0]-x[0]:0,x[1]!==!1?p[1]-x[1]:0],T=eu(w,f),I=c?o:[0,0];return w=bp(a,eu(w,s),I),rn({},$,{intentional:x[0]!==!1||x[1]!==!1,_initial:s,_movement:v,movement:w,values:r,offset:bp(a,T,I),delta:ol(w,d)})},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 yp(e,t){return Math.abs(e)>=t?nu(e)*t:!1}function bp(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],f=e[1],d=f[0],m=f[1];return[Qo(r,c,u,i),Qo(o,d,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,f=n.timeStamp,d=i.initial,m=i.bounds,p=i.threshold,b=ol(c(p),c([0,0])).map(Math.abs),y=rn({},Im()[a],{_active:!0,args:s,values:t,initial:r??t,_threshold:b,offset:u,lastOffset:u,startTime:f});return rn({},y,{_initial:vp(d,y),_bounds:vp(m,y)})}var tC=function(t){var n=this;this.classes=t,this.pointerIds=new Set,this.touchIds=new Set,this.supportsTouchEvents=Sm(),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=$s(n.classes),c;!(c=s()).done;){var u=c.value;new u(n,o).addBindings(a)}var f=function(p){Fn(a,p,function(b){return n.nativeRefs[p](rn({},n.state.shared,{event:b,args:o}))})};for(var d in n.nativeRefs)f(d);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=Om(n.config),o=n.config.eventOptions;r&&Pi(r,Rm(n.domListeners),o),Object.values(n.timeouts).forEach(clearTimeout),oC(n)},this.classes=t,this.state=Im(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function nC(e,t){"pointerId"in t?e.pointerIds.add(t.pointerId):e.touchIds=new Set($m(t))}function rC(e,t){"pointerId"in t?e.pointerIds.delete(t.pointerId):$m(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),Pm(o.window,i[t]=n,r))}function sC(e,t){var n=e.config,r=e.domListeners,o=Om(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;Pi(o,Rm(r),i);for(var a=0,s=Object.entries(t);a<s.length;a++){var c=s[a],u=c[0],f=c[1],d=u.slice(2).toLowerCase();r.push([d,_m.apply(void 0,f)])}Pm(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],f=Array.isArray(u)?u:[u],d=c+o;r[d]=_m.apply(void 0,f)}return r}function Rm(e){return e===void 0&&(e=[]),e.splice(0,e.length)}function Om(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function Fn(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function Pm(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={});for(var r=$s(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=$s(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){Em(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.getInternalMovement=function(o,i){return ol(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),pC=3;function wp(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}var hC=function(e){Em(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){wp(o),aC(r.controller,r.stateKey,[["touchmove",r.preventScroll],["touchend",r.clean.bind(Yn(r))],["touchcancel",r.clean.bind(Yn(r))]],{passive:!1}),r.setTimeout(r.startDrag.bind(Yn(r)),250,o)},r.setUpDelayedDragTrigger=function(o){r.state._dragDelayed=!0,wp(o),r.setTimeout(r.startDrag.bind(Yn(r)),r.config.delay,o)},r.setStartState=function(o){var i=gp(o,r.transform);r.updateSharedState(mp(o)),r.updateGestureState(rn({},eC(Yn(r),i,o),uc(Yn(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=gp(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=mp(o);r.updateSharedState(u);var f=uc(Yn(r),o),d=tu(c._movement),m=r.state._dragIsTap;m&&d>=pC&&(m=!1),r.updateGestureState(rn({},f,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,f=u[0],d=u[1],m=r.state._intentional,p=m[0],b=m[1],y=r.config.swipeVelocity,$=y[0],x=y[1],v=r.config.swipeDistance,w=v[0],T=v[1],I=r.config.swipeDuration,D=rn({},uc(Yn(r),o),r.getMovement(r.state.values)),A=[0,0];D.elapsedTime<I&&(p!==!1&&Math.abs(s)>$&&Math.abs(f)>w&&(A[0]=nu(s)),b!==!1&&Math.abs(c)>x&&Math.abs(d)>T&&(A[1]=nu(c))),r.updateSharedState({buttons:0}),r.updateGestureState(rn({},D,{tap:i,swipe:A})),r.fireGestureHandler(r.config.filterTaps&&i===!0)}},r.clean=function(){e.prototype.clean.call(Yn(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?(Fn(o,"onTouchStart",this.onDragStart),Fn(o,"onTouchMove",this.onDragChange),Fn(o,"onTouchEnd",this.onDragEnd),Fn(o,"onTouchCancel",this.onDragEnd)):(Fn(o,"onPointerDown",this.onDragStart),Fn(o,"onPointerMove",this.onDragChange),Fn(o,"onPointerUp",this.onDragEnd),Fn(o,"onPointerCancel",this.onDragEnd)),this.config.filterTaps){var i=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";Fn(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 wa(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(!wa(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(!wa(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)&&!wa(e[o[r]],t[o[r]]))return!1;return!0}return e!==e&&t!==t}function mC(e,t){try{return wa(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",hC);var n=l.useRef();return n.current||(n.current=vC(ZS,mC)),uC({drag:e},n.current(t))}var yC=Ke({defaultClassName:"aglyib0",variantClassNames:{variant:{small:"aglyib1",large:"aglyib2"}},defaultVariants:{},compoundVariants:[]});const Wr=l.forwardRef(({as:e,children:t,className:n,style:r,isDisabled:o,variant:i,...a},s)=>{const c=e||"button",u=i==="large"?16:8;return M.jsx(c,{ref:s,as:e,"data-test-id":a["data-test-id"],className:Te(yC({variant:i}),n),disabled:o,style:r,...a,children:M.jsx(et,{display:"inline-flex",children:M.jsx(rs,{size:u,color:o?Ct.theme.colors.grey1:Ct.theme.colors.black})})})});Wr.displayName="Button";Wr.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,variant:"large"};const Am=l.forwardRef(({header:e,onBack:t,onClose:n,showBack:r,showClose:o,title:i,bind:a,hasHandleBar:s,style:c},u)=>e!==!1?l.createElement(et,{...c?{style:c}:{},key:"header","data-rsbs-header":!0,"data-rsbs-header-handle-bar":s,ref:u,...s?a==null?void 0:a():{}},e||M.jsxs(Bt,{alignItems:"center",justifyContent:"space-between",pt:s?"$16":"$8",pb:"$8",gap:"$16",children:[M.jsxs(Bt,{alignItems:"center",gap:"$16",children:[r&&M.jsx(E0,{cursor:"pointer",onClick:t,size:18,color:Ct.theme.colors.grey1,"data-test-id":"vds-BS-back-btn"}),i&&M.jsx(Xt,{fontWeight:"$bold",textStyle:"subtitle2",m:"$0",children:i})]}),o&&M.jsx(Wr,{variant:"large",onClick:n,"data-test-id":"vds-BS-close-btn"})]})):M.jsx(et,{"data-rsbs-header":!0,ref:u,...a==null?void 0:a()},"header"));Am.defaultProps={title:void 0,header:void 0,showBack:void 0,showClose:!0,hasHandleBar:!0,bind:void 0,onBack:void 0,onClose:void 0,style: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}/*!
141
141
  * tabbable 6.2.0
142
142
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
143
143
  */var Dm=["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])"],Va=Dm.join(","),Nm=typeof Element>"u",Fr=Nm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ba=!Nm&&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},Ha=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},wC=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},km=function(t,n,r){if(Ha(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Va));return n&&Fr.call(t,Va)&&o.unshift(t),o=o.filter(r),o},Mm=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ha(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 f=Fr.call(a,Va);f&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!Ha(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&m){var p=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},jm=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)||wC(t))&&!jm(t)?0:t.tabIndex},EC=function(t,n){var r=Rr(t);return r<0&&n&&!jm(t)?0:r},xC=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Lm=function(t){return t.tagName==="INPUT"},_C=function(t){return Lm(t)&&t.type==="hidden"},SC=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},CC=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},$C=function(t){if(!t.name)return!0;var n=t.form||Ba(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=CC(o,t.form);return!i||i===t},TC=function(t){return Lm(t)&&t.type==="radio"},IC=function(t){return TC(t)&&!$C(t)},RC=function(t){var n,r=t&&Ba(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,f,d;r=Ba(o),o=(u=r)===null||u===void 0?void 0:u.host,i=!!((f=o)!==null&&f!==void 0&&(d=f.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},Ep=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},OC=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Fr.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Fr.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=Ba(t);if(c&&!c.shadowRoot&&o(c)===!0)return Ep(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=s}if(RC(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ep(t);return!1},PC=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 Fr.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Wa=function(t,n){return!(n.disabled||Ha(n)||_C(n)||OC(n,t)||SC(n)||PC(n))},ru=function(t,n){return!(IC(n)||Rr(n)<0||!Wa(t,n))},AC=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},DC=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=EC(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(xC).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},NC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Mm([t],n.includeContainer,{filter:ru.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:AC}):r=km(t,n.includeContainer,ru.bind(null,n)),DC(r)},kC=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Mm([t],n.includeContainer,{filter:Wa.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=km(t,n.includeContainer,Wa.bind(null,n)),r},eo=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Fr.call(t,Va)===!1?!1:ru(n,t)},MC=Dm.concat("iframe").join(","),lc=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Fr.call(t,MC)===!1?!1:Wa(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 xp(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 _p(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xp(Object(n),!0).forEach(function(r){jC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xp(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 Sp={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},Cp=function(t){return setTimeout(t,0)},$p=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},ra=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=_p({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,E,h){return R&&R[E]!==void 0?R[E]:i[h||E]},u=function(R,E){var h=typeof(E==null?void 0:E.composedPath)=="function"?E.composedPath():void 0;return a.containerGroups.findIndex(function(C){var P=C.container,j=C.tabbableNodes;return P.contains(R)||(h==null?void 0:h.includes(P))||j.find(function(H){return H===R})})},f=function(R){var E=i[R];if(typeof E=="function"){for(var h=arguments.length,C=new Array(h>1?h-1:0),P=1;P<h;P++)C[P-1]=arguments[P];E=E.apply(void 0,C)}if(E===!0&&(E=void 0),!E){if(E===void 0||E===!1)return E;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var j=E;if(typeof E=="string"&&(j=r.querySelector(E),!j))throw new Error("`".concat(R,"` as selector refers to no known node"));return j},d=function(){var R=f("initialFocus");if(R===!1)return!1;if(R===void 0||!lc(R,i.tabbableOptions))if(u(r.activeElement)>=0)R=r.activeElement;else{var E=a.tabbableGroups[0],h=E&&E.firstTabbableNode;R=h||f("fallbackFocus")}if(!R)throw new Error("Your focus-trap needs to have at least one focusable element");return R},m=function(){if(a.containerGroups=a.containers.map(function(R){var E=NC(R,i.tabbableOptions),h=kC(R,i.tabbableOptions),C=E.length>0?E[0]:void 0,P=E.length>0?E[E.length-1]:void 0,j=h.find(function(oe){return eo(oe)}),H=h.slice().reverse().find(function(oe){return eo(oe)}),Y=!!E.find(function(oe){return Rr(oe)>0});return{container:R,tabbableNodes:E,focusableNodes:h,posTabIndexesFound:Y,firstTabbableNode:C,lastTabbableNode:P,firstDomTabbableNode:j,lastDomTabbableNode:H,nextTabbableNode:function(W){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,J=E.indexOf(W);return J<0?L?h.slice(h.indexOf(W)+1).find(function(U){return eo(U)}):h.slice(0,h.indexOf(W)).reverse().find(function(U){return eo(U)}):E[J+(L?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(R){return R.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!f("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.")},p=function B(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){B(d());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,VC(R)&&R.select()}},b=function(R){var E=f("setReturnFocus",R);return E||(E===!1?!1:R)},y=function(R){var E=R.target,h=R.event,C=R.isBackward,P=C===void 0?!1:C;E=E||ra(h),m();var j=null;if(a.tabbableGroups.length>0){var H=u(E,h),Y=H>=0?a.containerGroups[H]:void 0;if(H<0)P?j=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:j=a.tabbableGroups[0].firstTabbableNode;else if(P){var oe=$p(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return E===ce});if(oe<0&&(Y.container===E||lc(E,i.tabbableOptions)&&!eo(E,i.tabbableOptions)&&!Y.nextTabbableNode(E,!1))&&(oe=H),oe>=0){var W=oe===0?a.tabbableGroups.length-1:oe-1,L=a.tabbableGroups[W];j=Rr(E)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(h)||(j=Y.nextTabbableNode(E,!1))}else{var J=$p(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return E===ce});if(J<0&&(Y.container===E||lc(E,i.tabbableOptions)&&!eo(E,i.tabbableOptions)&&!Y.nextTabbableNode(E))&&(J=H),J>=0){var U=J===a.tabbableGroups.length-1?0:J+1,K=a.tabbableGroups[U];j=Rr(E)>=0?K.firstTabbableNode:K.firstDomTabbableNode}else Jo(h)||(j=Y.nextTabbableNode(E))}}else j=f("fallbackFocus");return j},$=function(R){var E=ra(R);if(!(u(E,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},x=function(R){var E=ra(R),h=u(E,R)>=0;if(h||E instanceof Document)h&&(a.mostRecentlyFocusedNode=E);else{R.stopImmediatePropagation();var C,P=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var j=u(a.mostRecentlyFocusedNode),H=a.containerGroups[j].tabbableNodes;if(H.length>0){var Y=H.findIndex(function(oe){return oe===a.mostRecentlyFocusedNode});Y>=0&&(i.isKeyForward(a.recentNavEvent)?Y+1<H.length&&(C=H[Y+1],P=!1):Y-1>=0&&(C=H[Y-1],P=!1))}}else a.containerGroups.some(function(oe){return oe.tabbableNodes.some(function(W){return Rr(W)>0})})||(P=!1);else P=!1;P&&(C=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),p(C||a.mostRecentlyFocusedNode||d())}a.recentNavEvent=void 0},v=function(R){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var h=y({event:R,isBackward:E});h&&(Jo(R)&&R.preventDefault(),p(h))},w=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))},T=function(R){var E=ra(R);u(E,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return Sp.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?Cp(function(){p(d())}):p(d()),r.addEventListener("focusin",x,!0),r.addEventListener("mousedown",$,{capture:!0,passive:!1}),r.addEventListener("touchstart",$,{capture:!0,passive:!1}),r.addEventListener("click",T,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},D=function(){if(a.active)return r.removeEventListener("focusin",x,!0),r.removeEventListener("mousedown",$,!0),r.removeEventListener("touchstart",$,!0),r.removeEventListener("click",T,!0),r.removeEventListener("keydown",w,!0),s},A=function(R){var E=R.some(function(h){var C=Array.from(h.removedNodes);return C.some(function(P){return P===a.mostRecentlyFocusedNode})});E&&p(d())},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 E=c(R,"onActivate"),h=c(R,"onPostActivate"),C=c(R,"checkCanFocusTrap");C||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,E==null||E();var P=function(){C&&m(),I(),k(),h==null||h()};return C?(C(a.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(R){if(!a.active)return this;var E=_p({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(),Sp.deactivateTrap(o,s);var h=c(E,"onDeactivate"),C=c(E,"onPostDeactivate"),P=c(E,"checkCanReturnFocus"),j=c(E,"returnFocus","returnFocusOnDeactivate");h==null||h();var H=function(){Cp(function(){j&&p(b(a.nodeFocusedBeforeActivation)),C==null||C()})};return j&&P?(P(b(a.nodeFocusedBeforeActivation)).then(H,H),this):(H(),this)},pause:function(R){if(a.paused||!a.active)return this;var E=c(R,"onPause"),h=c(R,"onPostPause");return a.paused=!0,E==null||E(),D(),k(),h==null||h(),this},unpause:function(R){if(!a.paused||!a.active)return this;var E=c(R,"onUnpause"),h=c(R,"onPostUnpause");return a.paused=!1,E==null||E(),m(),I(),k(),h==null||h(),this},updateContainerElements:function(R){var E=[].concat(R).filter(Boolean);return a.containers=E.map(function(h){return typeof h=="string"?r.querySelector(h):h}),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 al=!1;if(typeof window<"u"){var Tp={get passive(){al=!0}};window.addEventListener("testPassive",null,Tp),window.removeEventListener("testPassive",null,Tp)}var Fm=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=[],za=!1,Vm=-1,ei=void 0,ti=void 0,Bm=function(t){return fr.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(t))})},Ua=function(t){var n=t||window.event;return Bm(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-Vm;return Bm(t.target)?!1:n&&n.scrollTop===0&&r>0||QC(n)&&r<0?Ua(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]),Fm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(Vm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&JC(o,t)},za||(document.addEventListener("touchmove",Ua,al?{passive:!1}:void 0),za=!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}),Fm?(t.ontouchstart=null,t.ontouchmove=null,za&&fr.length===0&&(document.removeEventListener("touchmove",Ua,al?{passive:!1}:void 0),za=!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 Dr=[],r$=function(){return Dr.some(function(e){return e.activeTargets.length>0})},o$=function(){return Dr.some(function(e){return e.skippedTargets.length>0})},Ip="ResizeObserver loop completed with undelivered notifications.",i$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Ip}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Ip),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 Nr=function(e){return Object.freeze(e)},a$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Nr(this)}return e}(),Hm=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,Nr(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}(),sl=function(e){return e instanceof SVGElement&&"getBBox"in e},Wm=function(e){if(sl(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)},Rp=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:{},oa=new WeakMap,Op=/auto|scroll/,c$=/^tb|vertical/,u$=/msie|trident/i.test(ni.navigator&&ni.navigator.userAgent),Ln=function(e){return parseFloat(e||"0")},co=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)},Pp=Nr({devicePixelContentBoxSize:co(),borderBoxSize:co(),contentBoxSize:co(),contentRect:new Hm(0,0,0,0)}),zm=function(e,t){if(t===void 0&&(t=!1),oa.has(e)&&!t)return oa.get(e);if(Wm(e))return oa.set(e,Pp),Pp;var n=getComputedStyle(e),r=sl(e)&&e.ownerSVGElement&&e.getBBox(),o=!u$&&n.boxSizing==="border-box",i=c$.test(n.writingMode||""),a=!r&&Op.test(n.overflowY||""),s=!r&&Op.test(n.overflowX||""),c=r?0:Ln(n.paddingTop),u=r?0:Ln(n.paddingRight),f=r?0:Ln(n.paddingBottom),d=r?0:Ln(n.paddingLeft),m=r?0:Ln(n.borderTopWidth),p=r?0:Ln(n.borderRightWidth),b=r?0:Ln(n.borderBottomWidth),y=r?0:Ln(n.borderLeftWidth),$=d+u,x=c+f,v=y+p,w=m+b,T=s?e.offsetHeight-w-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?$+v:0,A=o?x+w:0,F=r?r.width:Ln(n.width)-D-I,k=r?r.height:Ln(n.height)-A-T,B=F+$+I+v,R=k+x+T+w,E=Nr({devicePixelContentBoxSize:co(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:co(B,R,i),contentBoxSize:co(F,k,i),contentRect:new Hm(d,c,F,k)});return oa.set(e,E),E},Um=function(e,t,n){var r=zm(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=zm(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Nr([n.borderBoxSize]),this.contentBoxSize=Nr([n.contentBoxSize]),this.devicePixelContentBoxSize=Nr([n.devicePixelContentBoxSize])}return e}(),Ym=function(e){if(Wm(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=[];Dr.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var f=new l$(u.target),d=Ym(u.target);s.push(f),u.lastReportedSize=Um(u.target,u.observedBox),d<e&&(e=d)}),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},Ap=function(e){Dr.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(o){o.isActive()&&(Ym(o.target)>e?n.activeTargets.push(o):n.skippedTargets.push(o))})})},f$=function(){var e=0;for(Ap(e);r$();)e=d$(),Ap(e);return o$()&&i$(),e>0},dc,Km=[],p$=function(){return Km.splice(0).forEach(function(e){return e()})},h$=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++)}}Km.push(e),dc()},v$=function(e){h$(function(){requestAnimationFrame(e)})},Ea=0,m$=function(){return!!Ea},g$=250,y$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Dp=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Np=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=Np(t);v$(function(){var o=!1;try{o=f$()}finally{if(fc=!1,t=r-Np(),!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(),Dp.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Dp.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ou=new b$,kp=function(e){!Ea&&e>0&&ou.start(),Ea+=e,!Ea&&ou.stop()},w$=function(e){return!sl(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=Um(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}(),ia=new WeakMap,Mp=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},aa=function(){function e(){}return e.connect=function(t,n){var r=new x$(t,n);ia.set(t,r)},e.observe=function(t,n,r){var o=ia.get(t),i=o.observationTargets.length===0;Mp(o.observationTargets,n)<0&&(i&&Dr.push(o),o.observationTargets.push(new E$(n,r&&r.box)),kp(1),ou.schedule())},e.unobserve=function(t,n){var r=ia.get(t),o=Mp(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Dr.splice(Dr.indexOf(r),1),r.observationTargets.splice(o,1),kp(-1))},e.disconnect=function(t){var n=this,r=ia.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.");aa.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(!Rp(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");aa.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(!Rp(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");aa.unobserve(this,t)},e.prototype.disconnect=function(){aa.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 Ya(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(Ya).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 pc(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*.75,[i,a]=l.useState(()=>Ya(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(Ya(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]),f=T$(t,a,s),d=pc(i,{label:"headerHeight",enabled:o,resizeSourceRef:s}),m=pc(e,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),p=pc(r,{label:"footerHeight",enabled:n,resizeSourceRef:s}),b=c!=null&&c.hasPaddingY?16:0,y=c!=null&&c.hasHeader?0:20,$=c!=null&&c.hasCustomHeader?16:0,x=Math.min(f-d-p,m+b)+(d+y+$)+p;l.useDebugValue(`minHeight: ${x}`);const v=m>0;return l.useEffect(()=>{v&&u()},[v,u]),{maxHeight:f,minHeight:x,headerHeight:d,footerHeight:p}}function R$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,getSnapPoints:o,headerEnabled:i,headerRef:a,heightRef:s,lastSnapRef:c,ready:u,registerReady:f,resizeSourceRef:d,conditions:m}){const{maxHeight:p,minHeight:b,headerHeight:y,footerHeight:$}=I$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:f,resizeSourceRef:d,conditions:m}),{snapPoints:x,minSnap:v,maxSnap:w}=S$(u?o({height:s.current,footerHeight:$,headerHeight:y,minHeight:b,maxHeight:p}):[0],p);function T(I){let D;typeof I=="function"?D=I({footerHeight:$,headerHeight:y,height:s.current,minHeight:b,maxHeight:p,snapPoints:x,lastSnap:c.current}):D=I;const A=Ya(D);return x.reduce((F,k)=>Math.abs(k-A)<Math.abs(F-A)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${w}`),{minSnap:v,maxSnap:w,findSnap:T,maxHeight:p}}function O$(){return gS(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function P$({spring:e}){const t=Jr([e.y,e.maxHeight],(s,c)=>`${Math.round(Wo(c-s,0,16))}px`),n=Jr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>`${Wo(s,c,u)}px`),r=Jr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>s<c?`${c-s}px`:s>u?`${u-s}px`:"0px"),o=Jr([e.y,e.maxSnap],(s,c)=>s>=c?Math.ceil(s-c):0),i=Jr([e.y,e.minSnap],(s,c)=>{if(!c)return 0;const u=Math.max(c/2-45,0),f=Math.min(c/2+45,c),d=0,p=(1-d)/(f-u),b=(s-u)*(p+d);return Wo(b,0,1)}),a=Jr([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 qt(e=1e3){return new Promise(t=>setTimeout(t,e))}const A$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},jp={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Lp={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:{...jp,...Lp}}}},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:{...jp,...Lp}}}},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 qt()},onOpenStart:async()=>{await qt()},onCloseStart:async()=>{await qt()},onResizeStart:async()=>{await qt()},onSnapEnd:async()=>{await qt()},onOpenEnd:async()=>{await qt()},onCloseEnd:async()=>{await qt()},onResizeEnd:async()=>{await qt()},renderVisuallyHidden:async(e,t)=>{console.group("renderVisuallyHidden"),console.log({context:e,event:t}),await qt(),console.groupEnd()},activate:async(e,t)=>{console.group("activate"),console.log({context:e,event:t}),await qt(),console.groupEnd()},deactivate:async(e,t)=>{console.group("deactivate"),console.log({context:e,event:t}),await qt(),console.groupEnd()},openSmoothly:async(e,t)=>{console.group("openSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()},openImmediately:async(e,t)=>{console.group("openImmediately"),console.log({context:e,event:t}),await qt(),console.groupEnd()},snapSmoothly:async(e,t)=>{console.group("snapSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()},resizeSmoothly:async(e,t)=>{console.group("resizeSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()},closeSmoothly:async(e,t)=>{console.group("closeSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()}},guards:{initiallyClosed:N$,initiallyOpen:D$}}),{tension:M$,friction:sa}=cm.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:f,maxHeight:d,defaultSnap:m=L$,snapPoints:p=F$,blocking:b=!0,scrollLocking:y=!0,style:$,onSpringStart:x,onSpringCancel:v,onSpringEnd:w,reserveScrollBarGap:T=b,expandOnContentDrag:I=!1,title:D,showClose:A,showBack:F,onBack:k,onCloseWhenClickOutside:B=!0,hasHandleBar:R=!0,"data-test-id":E,padding:h,styles:C,refs:P,...j},H){const{ready:Y,registerReady:oe}=KC(),W=l.useRef(!1),L=l.useRef(x),J=l.useRef(v),U=l.useRef(w);l.useEffect(()=>{L.current=x,J.current=v,U.current=w},[v,x,w]);const[K,Z]=O$(),ce=l.useRef(null),z=l.useRef(null),G=l.useRef(null),re=l.useRef(null),ne=l.useRef(null),ie=l.useRef(null);l.useImperativeHandle(P==null?void 0:P.body,()=>z.current),l.useImperativeHandle(P==null?void 0:P.content,()=>G.current),l.useImperativeHandle(P==null?void 0:P.header,()=>re.current),l.useImperativeHandle(P==null?void 0:P.footer,()=>ne.current),l.useImperativeHandle(P==null?void 0:P.overlay,()=>ie.current);const ee=l.useRef(0),pe=l.useRef(),xe=l.useRef(!1),Ee=qC(),{x:Ae="default",y:Ie="default"}=h??{},Le=Ae==="default",ke=Ie==="default",at=n$({targetRef:z,enabled:Y&&y,reserveScrollBarGap:T}),We=bC({targetRef:ce,enabled:Y&&b}),wt=YC({targetRef:ce,fallbackRef:ie,initialFocusRef:u||void 0,enabled:Y&&b&&u!==!1}),{minSnap:Xe,maxSnap:At,maxHeight:$e,findSnap:Tt}=R$({contentRef:G,controlledMaxHeight:d,footerEnabled:!!o,footerRef:ne,getSnapPoints:p,headerEnabled:i!==!1,headerRef:re,heightRef:ee,lastSnapRef:c,ready:Y,registerReady:oe,resizeSourceRef:pe,conditions:{hasPaddingY:ke,hasHeader:i!==!1,hasCustomHeader:!!i}}),Ge=l.useRef($e),It=l.useRef(Xe),tt=l.useRef(At),Dt=l.useRef(Tt),De=l.useRef(0);wi(()=>{Ge.current=$e,tt.current=At,It.current=Xe,Dt.current=Tt,De.current=Tt(m)},[Tt,m,$e,At,Xe]);const nt=l.useCallback(({onRest:ve,config:{velocity:ze=1,...St}={},...xt})=>new Promise(Qt=>Z({...xt,config:{velocity:ze,...St,mass:1,tension:M$,friction:Math.max(sa,sa+(sa-sa*ze))},onRest:(...Jt)=>{Qt(...Jt),ve==null||ve(...Jt)}})),[Z]),[Zt,Lt]=c_(k$,{devTools:C$,actions:{onOpenCancel:l.useCallback(()=>{var ve;return(ve=J.current)==null?void 0:ve.call(J,{type:"OPEN"})},[]),onSnapCancel:l.useCallback(ve=>{var ze;return(ze=J.current)==null?void 0:ze.call(J,{type:"SNAP",source:ve.snapSource})},[]),onCloseCancel:l.useCallback(()=>{var ve;return(ve=J.current)==null?void 0:ve.call(J,{type:"CLOSE"})},[]),onResizeCancel:l.useCallback(()=>{var ve;return(ve=J.current)==null?void 0:ve.call(J,{type:"RESIZE",source:pe.current})},[]),onOpenEnd:l.useCallback(()=>{var ve;return(ve=U.current)==null?void 0:ve.call(U,{type:"OPEN"})},[]),onSnapEnd:l.useCallback(ve=>{var ze;return(ze=U.current)==null?void 0:ze.call(U,{type:"SNAP",source:ve.snapSource})},[]),onResizeEnd:l.useCallback(()=>{var ve;return(ve=U.current)==null?void 0:ve.call(U,{type:"RESIZE",source:pe.current})},[])},context:{initialState:s},services:{onSnapStart:l.useCallback(async(ve,ze)=>{var St;return(St=L.current)==null?void 0:St.call(L,{type:"SNAP",source:ze.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var ve;return(ve=L.current)==null?void 0:ve.call(L,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var ve;return(ve=L.current)==null?void 0:ve.call(L,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var ve;return(ve=L.current)==null?void 0:ve.call(L,{type:"RESIZE",source:pe.current})},[]),onSnapEnd:l.useCallback(async ve=>{var ze;return(ze=U.current)==null?void 0:ze.call(U,{type:"SNAP",source:ve.snapSource})},[]),onOpenEnd:l.useCallback(async()=>{var ve;return(ve=U.current)==null?void 0:ve.call(U,{type:"OPEN"})},[]),onCloseEnd:l.useCallback(async()=>{var ve;return(ve=U.current)==null?void 0:ve.call(U,{type:"CLOSE"})},[]),onResizeEnd:l.useCallback(async()=>{var ve;return(ve=U.current)==null?void 0:ve.call(U,{type:"RESIZE",source:pe.current})},[]),renderVisuallyHidden:l.useCallback(async()=>{await nt({y:De.current,ready:0,maxHeight:Ge.current,maxSnap:tt.current,minSnap:De.current,immediate:!0})},[nt]),activate:l.useCallback(async()=>{W.current=!0,await Promise.all([at.current.activate(),wt.current.activate(),We.current.activate()])},[We,wt,at]),deactivate:l.useCallback(async()=>{at.current.deactivate(),wt.current.deactivate(),We.current.deactivate(),W.current=!1},[We,wt,at]),openImmediately:l.useCallback(async()=>{ee.current=De.current,await nt({y:De.current,ready:1,maxHeight:Ge.current,maxSnap:tt.current,minSnap:De.current,immediate:!0})},[nt]),openSmoothly:l.useCallback(async()=>{await nt({y:0,ready:1,maxHeight:Ge.current,maxSnap:tt.current,minSnap:De.current,immediate:!0}),ee.current=De.current,await nt({y:De.current,ready:1,maxHeight:Ge.current,maxSnap:tt.current,minSnap:De.current,immediate:Ee.current})},[nt,Ee]),snapSmoothly:l.useCallback(async ve=>{const ze=Dt.current(ve.y);ee.current=ze,c.current=ze,await nt({y:ze,ready:1,maxHeight:Ge.current,maxSnap:tt.current,minSnap:It.current,immediate:Ee.current,config:{velocity:ve.velocity}})},[nt,c,Ee]),resizeSmoothly:l.useCallback(async()=>{const ve=Dt.current(ee.current);ee.current=ve,c.current=ve,await nt({y:ve,ready:1,maxHeight:Ge.current,maxSnap:tt.current,minSnap:It.current,immediate:pe.current==="element"?Ee.current:!0})},[nt,c,Ee]),closeSmoothly:l.useCallback(async()=>{nt({minSnap:ee.current,immediate:!0}),ee.current=0,await nt({y:0,maxHeight:Ge.current,maxSnap:tt.current,immediate:Ee.current}),await nt({ready:0,immediate:!0})},[nt,Ee])}});l.useEffect(()=>{Y&&Lt(a?"OPEN":"CLOSE")},[a,Lt,Y]),wi(()=>{($e||At||Xe)&&Lt("RESIZE")},[$e,At,Xe,Lt]),l.useEffect(()=>()=>{at.current.deactivate(),wt.current.deactivate(),We.current.deactivate()},[We,wt,at]),l.useImperativeHandle(H,()=>({snapTo:(ve,{velocity:ze=1,source:St="custom"}={})=>{Lt("SNAP",{payload:{y:Dt.current(ve),velocity:ze,source:St}})},get height(){return ee.current}}),[Lt]),l.useEffect(()=>{const ve=z.current,ze=xt=>{xe.current&&xt.preventDefault()},St=xt=>{ve&&ve.scrollTop<0&&(requestAnimationFrame(()=>{ve.style.overflow="hidden",ve.scrollTop=0,ve.style.removeProperty("overflow")}),xt.preventDefault())};return I&&(ve==null||ve.addEventListener("scroll",ze),ve==null||ve.addEventListener("touchmove",ze),ve==null||ve.addEventListener("touchstart",St)),()=>{ve==null||ve.removeEventListener("scroll",ze),ve==null||ve.removeEventListener("touchmove",ze),ve==null||ve.removeEventListener("touchstart",St)}},[I,z]);const bn=gC(({args:[{closeOnTap:ve=!1,isContentDragging:ze=!1}={}]=[],cancel:St,direction:[,xt],down:Qt,first:Jt,last:kn,memo:an=K.y.get(),movement:[,Mn],tap:Rn,velocity:en})=>{const tn=Mn*-1;if(!W.current)return St(),an;if(f&&ve&&Rn)return St(),setTimeout(()=>f(),0),an;if(Rn)return an;const nn=an+tn,wn=tn*en,dn=Math.max(It.current,Math.min(tt.current,nn+wn*2));if(!Qt&&f&&xt>0&&nn+wn<It.current/2)return St(),f(),an;let Wt=Qt?!f&&It.current===tt.current?nn<It.current?Qo(nn,It.current,tt.current*2,.55):Qo(nn,It.current/2,tt.current,.55):Qo(nn,f?0:It.current,tt.current,.55):dn;return I&&ze?(Wt>=tt.current&&(Wt=tt.current),an===tt.current&&z.current&&z.current.scrollTop>0&&(Wt=tt.current),xe.current=Wt<tt.current):xe.current=!1,Jt&&Lt("DRAG"),kn?(Lt("SNAP",{payload:{y:Wt,velocity:en>.05?en:1,source:"dragging"}}),an):(Z({y:Wt,ready:1,maxHeight:Ge.current,maxSnap:tt.current,minSnap:It.current,immediate:!0,config:{velocity:en}}),an)},{filterTaps:!0});if(Number.isNaN(tt.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(It.current))throw new TypeError("minSnapRef is NaN!!");const ln=P$({spring:K});return M.jsxs(OS.div,{...j,"data-rsbs-root":!0,"data-rsbs-state":j$.find(Zt.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!f,"data-rsbs-has-header":!!i,"data-rsbs-has-footer":!!o,className:r,ref:ce,style:{...ln,...$,opacity:K.ready},"data-test-id":E,children:[n,b&&M.jsx(et,{"data-rsbs-backdrop":!0,...B?bn({closeOnTap:B}):{}},"backdrop"),l.createElement(et,{...C!=null&&C.overlay?{style:C.overlay}:{},"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Le,"data-rsbs-overlay-has-padding-y":ke,"data-test-id":"CT-BottomSheet-Overlay",key:"overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:ie,onKeyDown:ve=>{ve.key==="Escape"&&(ve.stopPropagation(),f&&f())}},M.jsx(Am,{ref:re,title:D,header:i,showBack:F,showClose:A,bind:bn,hasHandleBar:R,onBack:k,onClose:f,style:C==null?void 0:C.header}),l.createElement(et,{...C!=null&&C.body?{style:C.body}:{},key:"scroll","data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Le,"data-rsbs-scroll-has-padding-y":ke,ref:z,...I?bn({isContentDragging:!0}):{}},M.jsx(et,{...C!=null&&C.content?{style:C.content}:{},"data-rsbs-content":!0,ref:G,children:t})),o&&l.createElement(et,{...C!=null&&C.footer?{style:C.footer}:{},key:"footer",ref:ne,"data-rsbs-footer":!0,...bn()},o))]})}),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),f=l.useRef(r&&o.isOpen?"OPEN":"CLOSED");wi(()=>o.isOpen?(cancelAnimationFrame(c.current),s(!0),()=>{f.current="CLOSED"}):()=>{f.current="CLOSED"},[o.isOpen]);const d=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(_v,{"data-rsbs-portal":!0,children:M.jsx(V$,{...o,lastSnapRef:u,ref:i,initialState:f.current,onSpringStart:d,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)}},[JSON.stringify(e),t]),n},W$=H$;process.env.NODE_ENV;var z$=Ke({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"},Fp={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var K$="p9dczu0";const cl=({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,f=s.clientY-c.top,d=i.clientHeight,m=i.clientWidth,p=Math.max(m,d);r([...n,{top:f-p/2,left:u-p/2,height:Math.max(m,d),width:Math.max(m,d),backgroundColor:t==="primary"?Ct.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))},mo=l.forwardRef(({as:e,children:t,className:n,colorScheme:r,size:o,isLoading:i,variant:a,style:s,isDisabled:c,isFluid:u,unstyled:f,noRipple:d,...m},p)=>{const b=l.useRef(null),y=cl({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(p,()=>b.current);const $=e||"button";return M.jsx($,{ref:b,as:e,"data-test-id":m["data-test-id"],className:Te(z$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:f}),a==="ghost"?Y$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?M.jsx(_o,{color:a==="outline"||a==="ghost"?Fp[r||"primary"]:Fp.white}):M.jsxs(M.Fragment,{children:[t,!d&&y]})})});mo.displayName="Button";mo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const qm="Checkbox",[q$,PP]=yn(qm),[X$,G$]=q$(qm),Z$=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...f}=e,[d,m]=l.useState(null),p=ut(t,w=>m(w)),b=l.useRef(!1),y=d?!!d.closest("form"):!0,[$=!1,x]=$n({prop:o,defaultProp:i,onChange:u}),v=l.useRef($);return l.useEffect(()=>{const w=d==null?void 0:d.form;if(w){const T=()=>x(v.current);return w.addEventListener("reset",T),()=>w.removeEventListener("reset",T)}},[d,x]),l.createElement(X$,{scope:n,state:$,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"checkbox","aria-checked":kr($)?"mixed":$,"aria-required":a,"data-state":Xm($),"data-disabled":s?"":void 0,disabled:s,value:c},f,{ref:p,onKeyDown:Ne(e.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ne(e.onClick,w=>{x(T=>kr(T)?!0:!T),y&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})})),y&&l.createElement(eT,{control:d,bubbles:!b.current,name:r,value:c,checked:$,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||kr(i.state)||i.state===!0},l.createElement(Ue.span,ae({"data-state":Xm(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=us(n),s=ss(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});c.indeterminate=kr(n),d.call(c,kr(n)?!1:n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:kr(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function kr(e){return e==="indeterminate"}function Xm(e){return kr(e)?"indeterminate":e?"checked":"unchecked"}const tT=Z$,nT=J$;var rT="glci2q0",Vp="glci2q3",oT="glci2q4",Bp={disabled:"glci2q1",enabled:"glci2q2"},iT=Ke({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 Gm=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,f]=l.useState(n);return l.useEffect(()=>{f(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:d=>{typeof d=="boolean"&&(r?r(d):f(d))},...a,children:M.jsxs(nT,{className:oT,children:[u==="indeterminate"&&M.jsx(C0,{color:"white",className:Vp}),u===!0&&M.jsx(Eu,{color:"white",className:Vp})]})}),e&&M.jsx("label",{htmlFor:c,className:o?Bp.disabled:Bp.enabled,children:e})]})});Gm.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=Ke({defaultClassName:"_10le3lp0",variantClassNames:{variant:{filled:"_10le3lp1",outline:"_10le3lp2"},size:{small:"_10le3lp3",medium:"_10le3lp4"},isActive:{true:"_10le3lp5"}},defaultVariants:{variant:"filled",isActive:!1,size:"medium"},compoundVariants:[[{variant:"outline",isActive:!0},"_10le3lp6"],[{variant:"filled",isActive:!0},"_10le3lp7"]]});const ul=l.forwardRef(({as:e,children:t,variant:n,isActive:r,prefixIcon:o,withCloseButton:i,className:a,disabled:s,style:c,onClose:u,size:f,...d},m)=>{const p=e||"button";return M.jsxs(p,{ref:m,as:e,"data-test-id":d["data-test-id"],className:Te(sT({variant:n,isActive:r,size:f}),a),disabled:s,style:c,...d,children:[o&&o,M.jsx(Xt,{textAlign:"left",textStyle:f==="small"?"caption":"body2",children:t}),i&&M.jsx(Wr,{as:"div","data-test-id":"chips-close-button",variant:"small",isDisabled:s,onClick:u})]})});ul.defaultProps={as:"button",children:void 0,isActive:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0,onClose:void 0};ul.displayName="Chip";const Zm="Dialog",[Qm,AP]=yn(Zm),[cT,wr]=Qm(Zm),uT=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,f]=$n({prop:r,defaultProp:o,onChange:i});return l.createElement(cT,{scope:t,triggerRef:s,contentRef:c,contentId:Gn(),titleId:Gn(),descriptionId:Gn(),open:u,onOpenChange:f,onOpenToggle:l.useCallback(()=>f(d=>!d),[f]),modal:a},n)},lT="DialogTrigger",dT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(lT,n),i=ut(t,o.triggerRef);return l.createElement(Ue.button,ae({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ll(o.open)},r,{ref:i,onClick:Ne(e.onClick,o.onOpenToggle)}))}),fT="DialogPortal",[DP,Jm]=Qm(fT,{forceMount:void 0}),iu="DialogOverlay",pT=l.forwardRef((e,t)=>{const n=Jm(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(hT,ae({},o,{ref:t}))):null}),hT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(iu,n);return l.createElement(dv,{as:lo,allowPinchZoom:!0,shards:[o.contentRef]},l.createElement(Ue.div,ae({"data-state":ll(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),xi="DialogContent",vT=l.forwardRef((e,t)=>{const n=Jm(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(mT,ae({},o,{ref:t})):l.createElement(gT,ae({},o,{ref:t})))}),mT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(null),o=ut(t,n.contentRef,r);return l.useEffect(()=>{const i=r.current;if(i)return nv(i)},[]),l.createElement(eg,ae({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ne(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ne(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ne(e.onFocusOutside,i=>i.preventDefault())}))}),gT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return l.createElement(eg,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()}}))}),eg=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=wr(xi,n),c=l.useRef(null),u=ut(t,c);return Nh(),l.createElement(l.Fragment,null,l.createElement(kh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},l.createElement(os,ae({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ll(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),yT="DialogClose",bT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(yT,n);return l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ne(e.onClick,()=>o.onOpenChange(!1))}))});function ll(e){return e?"open":"closed"}const wT=uT,ET=dT,xT=pT,_T=vT,ST=bT;var CT="_1jc0z8o4",$T="_1jc0z8o0",TT=Ke({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:[]}),IT="_1jc0z8o1",RT=Ke({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),OT=Ke({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const tg=l.forwardRef(({children:e,className:t,"data-test-id":n,...r},o)=>M.jsx(_T,{"data-test-id":n,className:t,ref:o,...r,children:e}));tg.defaultProps={"data-test-id":void 0};const PT=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(xT,{className:t,ref:r,...n,children:e})),AT=({children:e,className:t,...n})=>M.jsx(vs,{className:t,...n,children:e}),DT=({children:e,...t})=>M.jsx(wT,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(ET,{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:f,isCloseWhenEscape:d,...m},p)=>!n&&i?null:M.jsx(DT,{open:n,onOpenChange:r,children:M.jsxs(AT,{children:[M.jsx(PT,{className:Te(OT())}),M.jsxs(tg,{"data-test-id":t,onInteractOutside:b=>!c&&b.preventDefault(),className:Te(TT({colorScheme:s,size:o,noPadding:a}),f),...m,onEscapeKeyDown:b=>d?r==null?void 0:r():b.preventDefault(),ref:p,children:[r&&!u&&M.jsx(ST,{asChild:!0,"aria-label":"Close",children:M.jsx(Wr,{className:CT,"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,onOpenAutoFocus:void 0,onCloseAutoFocus:void 0};const Ts=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:$T,...r,children:t})});Ts.displayName="modalBody";Ts.defaultProps={as:"div",children:void 0,"data-test-id":void 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,className:IT,ref:o,...r,children:t})});Is.displayName="modalFooter";Is.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Rs=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:RT({bold:t}),...o,children:M.jsx(Xt,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Rs.displayName="modalHeader";Rs.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};var NT="ayjm8u0";const dl=({isOpen:e,onConfirm:t,onCancel:n,message:r,title:o,confirmTestId:i,isLoading:a,confirmText:s="Confirm",cancelText:c="Cancel",closeOnOverlayClick:u,size:f,classNameBody:d,actionDirection:m})=>M.jsxs(Ai,{classNameBody:d,size:f,isOpen:e,closeOnOverlayClick:u,onClose:n,closeIcon:M.jsx(et,{display:"none"}),children:[M.jsx(Rs,{children:o}),M.jsx(Ts,{children:M.jsx(Xt,{mt:"$8",mb:"$24",color:"$blackTypoMedium",textStyle:"body2",className:NT,children:r})}),M.jsx(Is,{style:{maxHeight:"none"},children:M.jsxs(Ht,{gap:"$16",justifyContent:"space-between",flexWrap:m==="horizontal"?"nowrap":"wrap",children:[M.jsx(mo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),M.jsx(mo,{"data-test-id":i,onClick:t,isLoading:a,isFluid:!0,children:s})]})})]});dl.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 fl=l.createContext({}),kT=({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:({...f})=>{n(!0),o(f)}}),[n,o]);return M.jsxs(fl.Provider,{value:c,children:[M.jsx(dl,{isOpen:t,title:(r==null?void 0:r.title)??"",onConfirm:a,onCancel:s,...r}),e]})},MT=()=>{const{openDialog:e}=l.useContext(fl);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}};var jT=Ke({defaultClassName:"_1nya5n80",variantClassNames:{variant:{medium:"_1nya5n81",thin:"_1nya5n82"}},defaultVariants:{variant:"thin"},compoundVariants:[]});const{sizesAtoms:LT}=Ct.atoms,pl=l.forwardRef(({children:e,as:t,variant:n,className:r,style:o,width:i,...a},s)=>{const c=t||"div",{className:u}=LT({width:i??"$full",...a});return M.jsx(c,{ref:s,"data-test-id":a["data-test-id"],className:Te(jT({variant:n}),u,r),style:o,...a,children:e})});pl.defaultProps={variant:"thin",as:"div",children:void 0,"data-test-id":void 0};pl.displayName="Divider";const hl=({children:e,isDisabled:t,className:n})=>M.jsx("div",{className:Te(xE({isDisabled:t}),n),children:e});hl.displayName="ActionIcon";hl.defaultProps={isDisabled:!1,className:void 0};const Di=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o,className:i},a)=>M.jsxs("label",{ref:a,className:Te(OE({state:Du({isError:e,isDisabled:t}),isTextarea:r}),i),children:[o,n&&"*"]}));Di.displayName="Label";Di.defaultProps={isTextarea:!1,className:""};const vl=l.forwardRef(({value:e,type:t,label:n,onClear:r,onBlur:o,isLoading:i,icon:a,isClearable:s=!0,required:c,containerStyles:u,inputAreaClassName:f,...d},m)=>{const{addonLeft:p,addonRight:b,helperTextLeft:y,helperTextRight:$,isError:x,errorMessage:v,isDisabled:w,isValid:T,elementLeft:I,elementRight:D,className:A,...F}=d,k=!!a,B=l.useRef(null);l.useImperativeHandle(m,()=>B.current);const[R,E]=l.useState(!1),[h,C]=l.useState(!1),P=H=>{if(R){const Y=B.current;Y&&Y.focus(),h&&(E(!1),C(!1))}else o==null||o(H)},j=()=>{const H=B.current;H&&H.focus(),h&&(E(!1),C(!1))};return l.useEffect(()=>{h&&E(!0)},[h]),M.jsxs(wo,{addonLeft:p,addonRight:b,elementLeft:I,elementRight:D,helperTextLeft:y,helperTextRight:$,isError:x,errorMessage:v,isDisabled:w,isValid:T,className:u,inputAreaClassName:Te(TE,f),children:[M.jsx("input",{ref:B,type:t,className:Te($E,A),value:e,disabled:w,"data-test-id":d["data-test-id"],required:c,onBlur:P,...F}),M.jsx(Di,{isError:x,isDisabled:w,required:c,children:n}),M.jsx("div",{className:Te(IE),"data-test-id":"icon-input-area",onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),onTouchStart:()=>C(!0),onClick:j,"aria-hidden":"true",children:M.jsxs(hl,{isDisabled:w,className:Te(s&&!i&&!k&&CE),children:[k&&!i&&a,s&&!i&&!k&&M.jsx(rs,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),i&&M.jsx(_o,{color:Ct.theme.colors.green1})]})})]})});vl.displayName="Input";vl.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0,inputAreaClassName:void 0};const ml=l.forwardRef(({value:e,label:t,rows:n=4,required:r,containerStyles:o,...i},a)=>{const{helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:f,isDisabled:d,isValid:m,...p}=i,b=l.useRef(null);l.useImperativeHandle(a,()=>b.current);const y=()=>{var $;($=b.current)==null||$.focus()};return M.jsxs(wo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:f,isDisabled:d,isValid:m,className:Te(o),onClick:y,children:[M.jsx("textarea",{ref:b,className:Te(PE),value:e,rows:n,disabled:d,"data-test-id":i["data-test-id"],required:r,...p}),M.jsx(Di,{isTextarea:!0,isError:u,isDisabled:d,required:r,children:t})]})});ml.displayName="Textarea";ml.defaultProps={containerStyles:void 0,"data-test-id":void 0};var FT=Ke({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"]]}),Hp={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const gl=l.forwardRef(({as:e,className:t,style:n,colorScheme:r,icon:o,unstyled:i,variant:a,isDisabled:s,isLoading:c,...u},f)=>{const d=l.useRef(null),m=cl({ref:d,colorScheme:r,variant:a});l.useImperativeHandle(f,()=>d.current);const p=e||"button";return M.jsx(p,{ref:d,as:e,"data-test-id":u["data-test-id"],className:Te(FT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?M.jsx(_o,{color:a==="outline"?Hp[r||"primary"]:Hp.white}):M.jsxs(M.Fragment,{children:[m,o]})})});gl.displayName="Button";gl.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var VT=Ke({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const BT=({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"})}),yl=l.forwardRef(({as:e,src:t,fit:n,width:r,height:o,loading:i,isLoading:a,fallback:s,onLoad:c,onError:u,className:f,"data-test-id":d,...m},p)=>{const b=e||"img",y=l.useMemo(()=>`${parseInt(`${r??0}`,10)}px`,[r]),$=l.useMemo(()=>`${parseInt(`${o??0}`,10)}px`,[o]),[x,v]=l.useState(!1),[w,T]=l.useState(n),I=A=>{T("fill"),v(!0),u==null||u(A)},D=A=>{v(!1),c==null||c(A)};return a&&!x?M.jsx(et,{bgColor:"$grey2",width:y,height:$}):x?s||M.jsx(BT,{width:y,height:$}):M.jsx(b,{"data-test-id":d,as:"img",width:y,height:$,src:t,loading:i,onLoad:D,onError:I,ref:p,className:Te(VT({fit:w})),...m})});yl.displayName="Image";yl.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 ng=Ke({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 rg=({children:e,className:t,isStandalone:n,textStyle:r="body2",isDisabled:o,isBold:i,...a})=>M.jsx("a",{className:Te(t,ng({isDisabled:o,textStyle:r,isBold:i,isStandalone:n})),"data-disabled":o,...a,children:e});var HT="_1cq2k9i0";const bl=l.forwardRef(({children:e,as:t,className:n,variant:r,...o},i)=>{const a=t||"ul";return M.jsx(a,{"data-test-id":o["data-test-id"],ref:i,className:Te(HT,n),...o,children:l.Children.map(e,s=>l.cloneElement(s,{variant:r}))})});bl.displayName="List";bl.defaultProps={"data-test-id":void 0,as:"ul",variant:"default"};var WT="xw6nfa0",zT="xw6nfa1",UT=Ke({defaultClassName:"xw6nfa2",variantClassNames:{variant:{small:"xw6nfa3",default:"xw6nfa4"}},defaultVariants:{variant:"default"},compoundVariants:[]});const wl=l.forwardRef(({children:e,leftIcon:t,rightIcon:n,href:r,target:o,as:i,className:a,variant:s,...c},u)=>{const f=i||"li",d=r?"a":et;return M.jsx(f,{"data-test-id":c["data-test-id"],className:Te(WT,a),...c,ref:u,children:M.jsxs(d,{href:r,target:o,className:UT({variant:s}),children:[t,M.jsx("div",{className:zT,children:e}),n]})})});wl.displayName="ListItem";wl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li",variant:void 0};var og={},ig={exports:{}};(function(e,t){(function(r,o){e.exports=o()})(Wy,()=>(()=>{var n=[,(a,s,c)=>{c.r(s),c.d(s,{default:()=>f});var u=(()=>{var d=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(m={}){var p=m,b,y;p.ready=new Promise((S,g)=>{b=S,y=g});function $(){function S(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(S.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 x(S){console.assert(!0);const g=new Map;let O=-1/0;this.push=function(N){return N=N+((1<<S)-1)>>S,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<<S}}const v=new function(){function S(){if(!g){let Et=function(Nt,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(Nt,Ve)};var Re=document.createElement("canvas"),je={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ye=Re.getContext("webgl2",je);if(ye)O=2;else if(ye=Re.getContext("webgl",je))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)),Re=ye.createProgram(),Et(Re,ye.VERTEX_SHADER,`attribute vec2 vertex;
146
+ */function xp(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 _p(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xp(Object(n),!0).forEach(function(r){jC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xp(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 Sp={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},Cp=function(t){return setTimeout(t,0)},$p=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},ra=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=_p({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,E,h){return R&&R[E]!==void 0?R[E]:i[h||E]},u=function(R,E){var h=typeof(E==null?void 0:E.composedPath)=="function"?E.composedPath():void 0;return a.containerGroups.findIndex(function(C){var P=C.container,j=C.tabbableNodes;return P.contains(R)||(h==null?void 0:h.includes(P))||j.find(function(H){return H===R})})},f=function(R){var E=i[R];if(typeof E=="function"){for(var h=arguments.length,C=new Array(h>1?h-1:0),P=1;P<h;P++)C[P-1]=arguments[P];E=E.apply(void 0,C)}if(E===!0&&(E=void 0),!E){if(E===void 0||E===!1)return E;throw new Error("`".concat(R,"` was specified but was not a node, or did not return a node"))}var j=E;if(typeof E=="string"&&(j=r.querySelector(E),!j))throw new Error("`".concat(R,"` as selector refers to no known node"));return j},d=function(){var R=f("initialFocus");if(R===!1)return!1;if(R===void 0||!lc(R,i.tabbableOptions))if(u(r.activeElement)>=0)R=r.activeElement;else{var E=a.tabbableGroups[0],h=E&&E.firstTabbableNode;R=h||f("fallbackFocus")}if(!R)throw new Error("Your focus-trap needs to have at least one focusable element");return R},m=function(){if(a.containerGroups=a.containers.map(function(R){var E=NC(R,i.tabbableOptions),h=kC(R,i.tabbableOptions),C=E.length>0?E[0]:void 0,P=E.length>0?E[E.length-1]:void 0,j=h.find(function(oe){return eo(oe)}),H=h.slice().reverse().find(function(oe){return eo(oe)}),Y=!!E.find(function(oe){return Rr(oe)>0});return{container:R,tabbableNodes:E,focusableNodes:h,posTabIndexesFound:Y,firstTabbableNode:C,lastTabbableNode:P,firstDomTabbableNode:j,lastDomTabbableNode:H,nextTabbableNode:function(W){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,J=E.indexOf(W);return J<0?L?h.slice(h.indexOf(W)+1).find(function(U){return eo(U)}):h.slice(0,h.indexOf(W)).reverse().find(function(U){return eo(U)}):E[J+(L?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(R){return R.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!f("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.")},p=function B(R){if(R!==!1&&R!==r.activeElement){if(!R||!R.focus){B(d());return}R.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=R,VC(R)&&R.select()}},b=function(R){var E=f("setReturnFocus",R);return E||(E===!1?!1:R)},y=function(R){var E=R.target,h=R.event,C=R.isBackward,P=C===void 0?!1:C;E=E||ra(h),m();var j=null;if(a.tabbableGroups.length>0){var H=u(E,h),Y=H>=0?a.containerGroups[H]:void 0;if(H<0)P?j=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:j=a.tabbableGroups[0].firstTabbableNode;else if(P){var oe=$p(a.tabbableGroups,function(Z){var ce=Z.firstTabbableNode;return E===ce});if(oe<0&&(Y.container===E||lc(E,i.tabbableOptions)&&!eo(E,i.tabbableOptions)&&!Y.nextTabbableNode(E,!1))&&(oe=H),oe>=0){var W=oe===0?a.tabbableGroups.length-1:oe-1,L=a.tabbableGroups[W];j=Rr(E)>=0?L.lastTabbableNode:L.lastDomTabbableNode}else Jo(h)||(j=Y.nextTabbableNode(E,!1))}else{var J=$p(a.tabbableGroups,function(Z){var ce=Z.lastTabbableNode;return E===ce});if(J<0&&(Y.container===E||lc(E,i.tabbableOptions)&&!eo(E,i.tabbableOptions)&&!Y.nextTabbableNode(E))&&(J=H),J>=0){var U=J===a.tabbableGroups.length-1?0:J+1,K=a.tabbableGroups[U];j=Rr(E)>=0?K.firstTabbableNode:K.firstDomTabbableNode}else Jo(h)||(j=Y.nextTabbableNode(E))}}else j=f("fallbackFocus");return j},$=function(R){var E=ra(R);if(!(u(E,R)>=0)){if(Mo(i.clickOutsideDeactivates,R)){s.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Mo(i.allowOutsideClick,R)||R.preventDefault()}},x=function(R){var E=ra(R),h=u(E,R)>=0;if(h||E instanceof Document)h&&(a.mostRecentlyFocusedNode=E);else{R.stopImmediatePropagation();var C,P=!0;if(a.mostRecentlyFocusedNode)if(Rr(a.mostRecentlyFocusedNode)>0){var j=u(a.mostRecentlyFocusedNode),H=a.containerGroups[j].tabbableNodes;if(H.length>0){var Y=H.findIndex(function(oe){return oe===a.mostRecentlyFocusedNode});Y>=0&&(i.isKeyForward(a.recentNavEvent)?Y+1<H.length&&(C=H[Y+1],P=!1):Y-1>=0&&(C=H[Y-1],P=!1))}}else a.containerGroups.some(function(oe){return oe.tabbableNodes.some(function(W){return Rr(W)>0})})||(P=!1);else P=!1;P&&(C=y({target:a.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(a.recentNavEvent)})),p(C||a.mostRecentlyFocusedNode||d())}a.recentNavEvent=void 0},v=function(R){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=R;var h=y({event:R,isBackward:E});h&&(Jo(R)&&R.preventDefault(),p(h))},w=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))},T=function(R){var E=ra(R);u(E,R)>=0||Mo(i.clickOutsideDeactivates,R)||Mo(i.allowOutsideClick,R)||(R.preventDefault(),R.stopImmediatePropagation())},I=function(){if(a.active)return Sp.activateTrap(o,s),a.delayInitialFocusTimer=i.delayInitialFocus?Cp(function(){p(d())}):p(d()),r.addEventListener("focusin",x,!0),r.addEventListener("mousedown",$,{capture:!0,passive:!1}),r.addEventListener("touchstart",$,{capture:!0,passive:!1}),r.addEventListener("click",T,{capture:!0,passive:!1}),r.addEventListener("keydown",w,{capture:!0,passive:!1}),s},D=function(){if(a.active)return r.removeEventListener("focusin",x,!0),r.removeEventListener("mousedown",$,!0),r.removeEventListener("touchstart",$,!0),r.removeEventListener("click",T,!0),r.removeEventListener("keydown",w,!0),s},A=function(R){var E=R.some(function(h){var C=Array.from(h.removedNodes);return C.some(function(P){return P===a.mostRecentlyFocusedNode})});E&&p(d())},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 E=c(R,"onActivate"),h=c(R,"onPostActivate"),C=c(R,"checkCanFocusTrap");C||m(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=r.activeElement,E==null||E();var P=function(){C&&m(),I(),k(),h==null||h()};return C?(C(a.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(R){if(!a.active)return this;var E=_p({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(),Sp.deactivateTrap(o,s);var h=c(E,"onDeactivate"),C=c(E,"onPostDeactivate"),P=c(E,"checkCanReturnFocus"),j=c(E,"returnFocus","returnFocusOnDeactivate");h==null||h();var H=function(){Cp(function(){j&&p(b(a.nodeFocusedBeforeActivation)),C==null||C()})};return j&&P?(P(b(a.nodeFocusedBeforeActivation)).then(H,H),this):(H(),this)},pause:function(R){if(a.paused||!a.active)return this;var E=c(R,"onPause"),h=c(R,"onPostPause");return a.paused=!0,E==null||E(),D(),k(),h==null||h(),this},unpause:function(R){if(!a.paused||!a.active)return this;var E=c(R,"onUnpause"),h=c(R,"onPostUnpause");return a.paused=!1,E==null||E(),m(),I(),k(),h==null||h(),this},updateContainerElements:function(R){var E=[].concat(R).filter(Boolean);return a.containers=E.map(function(h){return typeof h=="string"?r.querySelector(h):h}),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 al=!1;if(typeof window<"u"){var Tp={get passive(){al=!0}};window.addEventListener("testPassive",null,Tp),window.removeEventListener("testPassive",null,Tp)}var Fm=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=[],za=!1,Vm=-1,ei=void 0,ti=void 0,Bm=function(t){return fr.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(t))})},Ua=function(t){var n=t||window.event;return Bm(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-Vm;return Bm(t.target)?!1:n&&n.scrollTop===0&&r>0||QC(n)&&r<0?Ua(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]),Fm?(t.ontouchstart=function(o){o.targetTouches.length===1&&(Vm=o.targetTouches[0].clientY)},t.ontouchmove=function(o){o.targetTouches.length===1&&JC(o,t)},za||(document.addEventListener("touchmove",Ua,al?{passive:!1}:void 0),za=!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}),Fm?(t.ontouchstart=null,t.ontouchmove=null,za&&fr.length===0&&(document.removeEventListener("touchmove",Ua,al?{passive:!1}:void 0),za=!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 Dr=[],r$=function(){return Dr.some(function(e){return e.activeTargets.length>0})},o$=function(){return Dr.some(function(e){return e.skippedTargets.length>0})},Ip="ResizeObserver loop completed with undelivered notifications.",i$=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Ip}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Ip),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 Nr=function(e){return Object.freeze(e)},a$=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Nr(this)}return e}(),Hm=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,Nr(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}(),sl=function(e){return e instanceof SVGElement&&"getBBox"in e},Wm=function(e){if(sl(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)},Rp=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:{},oa=new WeakMap,Op=/auto|scroll/,c$=/^tb|vertical/,u$=/msie|trident/i.test(ni.navigator&&ni.navigator.userAgent),Ln=function(e){return parseFloat(e||"0")},co=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)},Pp=Nr({devicePixelContentBoxSize:co(),borderBoxSize:co(),contentBoxSize:co(),contentRect:new Hm(0,0,0,0)}),zm=function(e,t){if(t===void 0&&(t=!1),oa.has(e)&&!t)return oa.get(e);if(Wm(e))return oa.set(e,Pp),Pp;var n=getComputedStyle(e),r=sl(e)&&e.ownerSVGElement&&e.getBBox(),o=!u$&&n.boxSizing==="border-box",i=c$.test(n.writingMode||""),a=!r&&Op.test(n.overflowY||""),s=!r&&Op.test(n.overflowX||""),c=r?0:Ln(n.paddingTop),u=r?0:Ln(n.paddingRight),f=r?0:Ln(n.paddingBottom),d=r?0:Ln(n.paddingLeft),m=r?0:Ln(n.borderTopWidth),p=r?0:Ln(n.borderRightWidth),b=r?0:Ln(n.borderBottomWidth),y=r?0:Ln(n.borderLeftWidth),$=d+u,x=c+f,v=y+p,w=m+b,T=s?e.offsetHeight-w-e.clientHeight:0,I=a?e.offsetWidth-v-e.clientWidth:0,D=o?$+v:0,A=o?x+w:0,F=r?r.width:Ln(n.width)-D-I,k=r?r.height:Ln(n.height)-A-T,B=F+$+I+v,R=k+x+T+w,E=Nr({devicePixelContentBoxSize:co(Math.round(F*devicePixelRatio),Math.round(k*devicePixelRatio),i),borderBoxSize:co(B,R,i),contentBoxSize:co(F,k,i),contentRect:new Hm(d,c,F,k)});return oa.set(e,E),E},Um=function(e,t,n){var r=zm(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=zm(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Nr([n.borderBoxSize]),this.contentBoxSize=Nr([n.contentBoxSize]),this.devicePixelContentBoxSize=Nr([n.devicePixelContentBoxSize])}return e}(),Ym=function(e){if(Wm(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=[];Dr.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var f=new l$(u.target),d=Ym(u.target);s.push(f),u.lastReportedSize=Um(u.target,u.observedBox),d<e&&(e=d)}),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},Ap=function(e){Dr.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(o){o.isActive()&&(Ym(o.target)>e?n.activeTargets.push(o):n.skippedTargets.push(o))})})},f$=function(){var e=0;for(Ap(e);r$();)e=d$(),Ap(e);return o$()&&i$(),e>0},dc,Km=[],p$=function(){return Km.splice(0).forEach(function(e){return e()})},h$=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++)}}Km.push(e),dc()},v$=function(e){h$(function(){requestAnimationFrame(e)})},Ea=0,m$=function(){return!!Ea},g$=250,y$={attributes:!0,characterData:!0,childList:!0,subtree:!0},Dp=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Np=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=Np(t);v$(function(){var o=!1;try{o=f$()}finally{if(fc=!1,t=r-Np(),!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(),Dp.forEach(function(n){return ni.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Dp.forEach(function(n){return ni.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),ou=new b$,kp=function(e){!Ea&&e>0&&ou.start(),Ea+=e,!Ea&&ou.stop()},w$=function(e){return!sl(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=Um(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}(),ia=new WeakMap,Mp=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},aa=function(){function e(){}return e.connect=function(t,n){var r=new x$(t,n);ia.set(t,r)},e.observe=function(t,n,r){var o=ia.get(t),i=o.observationTargets.length===0;Mp(o.observationTargets,n)<0&&(i&&Dr.push(o),o.observationTargets.push(new E$(n,r&&r.box)),kp(1),ou.schedule())},e.unobserve=function(t,n){var r=ia.get(t),o=Mp(r.observationTargets,n),i=r.observationTargets.length===1;o>=0&&(i&&Dr.splice(Dr.indexOf(r),1),r.observationTargets.splice(o,1),kp(-1))},e.disconnect=function(t){var n=this,r=ia.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.");aa.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(!Rp(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");aa.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(!Rp(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");aa.unobserve(this,t)},e.prototype.disconnect=function(){aa.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 Ya(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(Ya).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 pc(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*.75,[i,a]=l.useState(()=>Ya(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(Ya(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]),f=T$(t,a,s),d=pc(i,{label:"headerHeight",enabled:o,resizeSourceRef:s}),m=pc(e,{label:"contentHeight",enabled:!0,resizeSourceRef:s}),p=pc(r,{label:"footerHeight",enabled:n,resizeSourceRef:s}),b=c!=null&&c.hasPaddingY?16:0,y=c!=null&&c.hasHeader?0:20,$=c!=null&&c.hasCustomHeader?16:0,x=Math.min(f-d-p,m+b)+(d+y+$)+p;l.useDebugValue(`minHeight: ${x}`);const v=m>0;return l.useEffect(()=>{v&&u()},[v,u]),{maxHeight:f,minHeight:x,headerHeight:d,footerHeight:p}}function R$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,getSnapPoints:o,headerEnabled:i,headerRef:a,heightRef:s,lastSnapRef:c,ready:u,registerReady:f,resizeSourceRef:d,conditions:m}){const{maxHeight:p,minHeight:b,headerHeight:y,footerHeight:$}=I$({contentRef:e,controlledMaxHeight:t,footerEnabled:n,footerRef:r,headerEnabled:i,headerRef:a,registerReady:f,resizeSourceRef:d,conditions:m}),{snapPoints:x,minSnap:v,maxSnap:w}=S$(u?o({height:s.current,footerHeight:$,headerHeight:y,minHeight:b,maxHeight:p}):[0],p);function T(I){let D;typeof I=="function"?D=I({footerHeight:$,headerHeight:y,height:s.current,minHeight:b,maxHeight:p,snapPoints:x,lastSnap:c.current}):D=I;const A=Ya(D);return x.reduce((F,k)=>Math.abs(k-A)<Math.abs(F-A)?k:F,v)}return l.useDebugValue(`minSnap: ${v}, maxSnap:${w}`),{minSnap:v,maxSnap:w,findSnap:T,maxHeight:p}}function O$(){return gS(()=>({y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}))}function P$({spring:e}){const t=Jr([e.y,e.maxHeight],(s,c)=>`${Math.round(Wo(c-s,0,16))}px`),n=Jr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>`${Wo(s,c,u)}px`),r=Jr([e.y,e.minSnap,e.maxSnap],(s,c,u)=>s<c?`${c-s}px`:s>u?`${u-s}px`:"0px"),o=Jr([e.y,e.maxSnap],(s,c)=>s>=c?Math.ceil(s-c):0),i=Jr([e.y,e.minSnap],(s,c)=>{if(!c)return 0;const u=Math.max(c/2-45,0),f=Math.min(c/2+45,c),d=0,p=(1-d)/(f-u),b=(s-u)*(p+d);return Wo(b,0,1)}),a=Jr([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 qt(e=1e3){return new Promise(t=>setTimeout(t,e))}const A$={CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}},jp={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},Lp={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:{...jp,...Lp}}}},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:{...jp,...Lp}}}},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 qt()},onOpenStart:async()=>{await qt()},onCloseStart:async()=>{await qt()},onResizeStart:async()=>{await qt()},onSnapEnd:async()=>{await qt()},onOpenEnd:async()=>{await qt()},onCloseEnd:async()=>{await qt()},onResizeEnd:async()=>{await qt()},renderVisuallyHidden:async(e,t)=>{console.group("renderVisuallyHidden"),console.log({context:e,event:t}),await qt(),console.groupEnd()},activate:async(e,t)=>{console.group("activate"),console.log({context:e,event:t}),await qt(),console.groupEnd()},deactivate:async(e,t)=>{console.group("deactivate"),console.log({context:e,event:t}),await qt(),console.groupEnd()},openSmoothly:async(e,t)=>{console.group("openSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()},openImmediately:async(e,t)=>{console.group("openImmediately"),console.log({context:e,event:t}),await qt(),console.groupEnd()},snapSmoothly:async(e,t)=>{console.group("snapSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()},resizeSmoothly:async(e,t)=>{console.group("resizeSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()},closeSmoothly:async(e,t)=>{console.group("closeSmoothly"),console.log({context:e,event:t}),await qt(),console.groupEnd()}},guards:{initiallyClosed:N$,initiallyOpen:D$}}),{tension:M$,friction:sa}=cm.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:f,maxHeight:d,defaultSnap:m=L$,snapPoints:p=F$,blocking:b=!0,scrollLocking:y=!0,style:$,onSpringStart:x,onSpringCancel:v,onSpringEnd:w,reserveScrollBarGap:T=b,expandOnContentDrag:I=!1,title:D,showClose:A,showBack:F,onBack:k,onCloseWhenClickOutside:B=!0,hasHandleBar:R=!0,"data-test-id":E,padding:h,styles:C,refs:P,...j},H){const{ready:Y,registerReady:oe}=KC(),W=l.useRef(!1),L=l.useRef(x),J=l.useRef(v),U=l.useRef(w);l.useEffect(()=>{L.current=x,J.current=v,U.current=w},[v,x,w]);const[K,Z]=O$(),ce=l.useRef(null),z=l.useRef(null),G=l.useRef(null),re=l.useRef(null),ne=l.useRef(null),ie=l.useRef(null);l.useImperativeHandle(P==null?void 0:P.body,()=>z.current),l.useImperativeHandle(P==null?void 0:P.content,()=>G.current),l.useImperativeHandle(P==null?void 0:P.header,()=>re.current),l.useImperativeHandle(P==null?void 0:P.footer,()=>ne.current),l.useImperativeHandle(P==null?void 0:P.overlay,()=>ie.current);const ee=l.useRef(0),pe=l.useRef(),xe=l.useRef(!1),Ee=qC(),{x:Ae="default",y:Ie="default"}=h??{},Le=Ae==="default",ke=Ie==="default",at=n$({targetRef:z,enabled:Y&&y,reserveScrollBarGap:T}),We=bC({targetRef:ce,enabled:Y&&b}),wt=YC({targetRef:ce,fallbackRef:ie,initialFocusRef:u||void 0,enabled:Y&&b&&u!==!1}),{minSnap:Xe,maxSnap:At,maxHeight:$e,findSnap:Tt}=R$({contentRef:G,controlledMaxHeight:d,footerEnabled:!!o,footerRef:ne,getSnapPoints:p,headerEnabled:i!==!1,headerRef:re,heightRef:ee,lastSnapRef:c,ready:Y,registerReady:oe,resizeSourceRef:pe,conditions:{hasPaddingY:ke,hasHeader:i!==!1,hasCustomHeader:!!i}}),Ge=l.useRef($e),It=l.useRef(Xe),tt=l.useRef(At),Dt=l.useRef(Tt),De=l.useRef(0);wi(()=>{Ge.current=$e,tt.current=At,It.current=Xe,Dt.current=Tt,De.current=Tt(m)},[Tt,m,$e,At,Xe]);const nt=l.useCallback(({onRest:ve,config:{velocity:ze=1,...St}={},...xt})=>new Promise(Qt=>Z({...xt,config:{velocity:ze,...St,mass:1,tension:M$,friction:Math.max(sa,sa+(sa-sa*ze))},onRest:(...Jt)=>{Qt(...Jt),ve==null||ve(...Jt)}})),[Z]),[Zt,Lt]=c_(k$,{devTools:C$,actions:{onOpenCancel:l.useCallback(()=>{var ve;return(ve=J.current)==null?void 0:ve.call(J,{type:"OPEN"})},[]),onSnapCancel:l.useCallback(ve=>{var ze;return(ze=J.current)==null?void 0:ze.call(J,{type:"SNAP",source:ve.snapSource})},[]),onCloseCancel:l.useCallback(()=>{var ve;return(ve=J.current)==null?void 0:ve.call(J,{type:"CLOSE"})},[]),onResizeCancel:l.useCallback(()=>{var ve;return(ve=J.current)==null?void 0:ve.call(J,{type:"RESIZE",source:pe.current})},[]),onOpenEnd:l.useCallback(()=>{var ve;return(ve=U.current)==null?void 0:ve.call(U,{type:"OPEN"})},[]),onSnapEnd:l.useCallback(ve=>{var ze;return(ze=U.current)==null?void 0:ze.call(U,{type:"SNAP",source:ve.snapSource})},[]),onResizeEnd:l.useCallback(()=>{var ve;return(ve=U.current)==null?void 0:ve.call(U,{type:"RESIZE",source:pe.current})},[])},context:{initialState:s},services:{onSnapStart:l.useCallback(async(ve,ze)=>{var St;return(St=L.current)==null?void 0:St.call(L,{type:"SNAP",source:ze.payload.source||"custom"})},[]),onOpenStart:l.useCallback(async()=>{var ve;return(ve=L.current)==null?void 0:ve.call(L,{type:"OPEN"})},[]),onCloseStart:l.useCallback(async()=>{var ve;return(ve=L.current)==null?void 0:ve.call(L,{type:"CLOSE"})},[]),onResizeStart:l.useCallback(async()=>{var ve;return(ve=L.current)==null?void 0:ve.call(L,{type:"RESIZE",source:pe.current})},[]),onSnapEnd:l.useCallback(async ve=>{var ze;return(ze=U.current)==null?void 0:ze.call(U,{type:"SNAP",source:ve.snapSource})},[]),onOpenEnd:l.useCallback(async()=>{var ve;return(ve=U.current)==null?void 0:ve.call(U,{type:"OPEN"})},[]),onCloseEnd:l.useCallback(async()=>{var ve;return(ve=U.current)==null?void 0:ve.call(U,{type:"CLOSE"})},[]),onResizeEnd:l.useCallback(async()=>{var ve;return(ve=U.current)==null?void 0:ve.call(U,{type:"RESIZE",source:pe.current})},[]),renderVisuallyHidden:l.useCallback(async()=>{await nt({y:De.current,ready:0,maxHeight:Ge.current,maxSnap:tt.current,minSnap:De.current,immediate:!0})},[nt]),activate:l.useCallback(async()=>{W.current=!0,await Promise.all([at.current.activate(),wt.current.activate(),We.current.activate()])},[We,wt,at]),deactivate:l.useCallback(async()=>{at.current.deactivate(),wt.current.deactivate(),We.current.deactivate(),W.current=!1},[We,wt,at]),openImmediately:l.useCallback(async()=>{ee.current=De.current,await nt({y:De.current,ready:1,maxHeight:Ge.current,maxSnap:tt.current,minSnap:De.current,immediate:!0})},[nt]),openSmoothly:l.useCallback(async()=>{await nt({y:0,ready:1,maxHeight:Ge.current,maxSnap:tt.current,minSnap:De.current,immediate:!0}),ee.current=De.current,await nt({y:De.current,ready:1,maxHeight:Ge.current,maxSnap:tt.current,minSnap:De.current,immediate:Ee.current})},[nt,Ee]),snapSmoothly:l.useCallback(async ve=>{const ze=Dt.current(ve.y);ee.current=ze,c.current=ze,await nt({y:ze,ready:1,maxHeight:Ge.current,maxSnap:tt.current,minSnap:It.current,immediate:Ee.current,config:{velocity:ve.velocity}})},[nt,c,Ee]),resizeSmoothly:l.useCallback(async()=>{const ve=Dt.current(ee.current);ee.current=ve,c.current=ve,await nt({y:ve,ready:1,maxHeight:Ge.current,maxSnap:tt.current,minSnap:It.current,immediate:pe.current==="element"?Ee.current:!0})},[nt,c,Ee]),closeSmoothly:l.useCallback(async()=>{nt({minSnap:ee.current,immediate:!0}),ee.current=0,await nt({y:0,maxHeight:Ge.current,maxSnap:tt.current,immediate:Ee.current}),await nt({ready:0,immediate:!0})},[nt,Ee])}});l.useEffect(()=>{Y&&Lt(a?"OPEN":"CLOSE")},[a,Lt,Y]),wi(()=>{($e||At||Xe)&&Lt("RESIZE")},[$e,At,Xe,Lt]),l.useEffect(()=>()=>{at.current.deactivate(),wt.current.deactivate(),We.current.deactivate()},[We,wt,at]),l.useImperativeHandle(H,()=>({snapTo:(ve,{velocity:ze=1,source:St="custom"}={})=>{Lt("SNAP",{payload:{y:Dt.current(ve),velocity:ze,source:St}})},get height(){return ee.current}}),[Lt]),l.useEffect(()=>{const ve=z.current,ze=xt=>{xe.current&&xt.preventDefault()},St=xt=>{ve&&ve.scrollTop<0&&(requestAnimationFrame(()=>{ve.style.overflow="hidden",ve.scrollTop=0,ve.style.removeProperty("overflow")}),xt.preventDefault())};return I&&(ve==null||ve.addEventListener("scroll",ze),ve==null||ve.addEventListener("touchmove",ze),ve==null||ve.addEventListener("touchstart",St)),()=>{ve==null||ve.removeEventListener("scroll",ze),ve==null||ve.removeEventListener("touchmove",ze),ve==null||ve.removeEventListener("touchstart",St)}},[I,z]);const bn=gC(({args:[{closeOnTap:ve=!1,isContentDragging:ze=!1}={}]=[],cancel:St,direction:[,xt],down:Qt,first:Jt,last:kn,memo:an=K.y.get(),movement:[,Mn],tap:Rn,velocity:en})=>{const tn=Mn*-1;if(!W.current)return St(),an;if(f&&ve&&Rn)return St(),setTimeout(()=>f(),0),an;if(Rn)return an;const nn=an+tn,wn=tn*en,dn=Math.max(It.current,Math.min(tt.current,nn+wn*2));if(!Qt&&f&&xt>0&&nn+wn<It.current/2)return St(),f(),an;let Wt=Qt?!f&&It.current===tt.current?nn<It.current?Qo(nn,It.current,tt.current*2,.55):Qo(nn,It.current/2,tt.current,.55):Qo(nn,f?0:It.current,tt.current,.55):dn;return I&&ze?(Wt>=tt.current&&(Wt=tt.current),an===tt.current&&z.current&&z.current.scrollTop>0&&(Wt=tt.current),xe.current=Wt<tt.current):xe.current=!1,Jt&&Lt("DRAG"),kn?(Lt("SNAP",{payload:{y:Wt,velocity:en>.05?en:1,source:"dragging"}}),an):(Z({y:Wt,ready:1,maxHeight:Ge.current,maxSnap:tt.current,minSnap:It.current,immediate:!0,config:{velocity:en}}),an)},{filterTaps:!0});if(Number.isNaN(tt.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(It.current))throw new TypeError("minSnapRef is NaN!!");const ln=P$({spring:K});return M.jsxs(OS.div,{...j,"data-rsbs-root":!0,"data-rsbs-state":j$.find(Zt.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!f,"data-rsbs-has-header":!!i,"data-rsbs-has-footer":!!o,className:r,ref:ce,style:{...ln,...$,opacity:K.ready},"data-test-id":E,children:[n,b&&M.jsx(et,{"data-rsbs-backdrop":!0,...B?bn({closeOnTap:B}):{}},"backdrop"),l.createElement(et,{...C!=null&&C.overlay?{style:C.overlay}:{},"data-rsbs-overlay":!0,"data-rsbs-overlay-has-padding-x":Le,"data-rsbs-overlay-has-padding-y":ke,"data-test-id":"CT-BottomSheet-Overlay",key:"overlay","aria-modal":"true",role:"dialog",tabIndex:-1,ref:ie,onKeyDown:ve=>{ve.key==="Escape"&&(ve.stopPropagation(),f&&f())}},M.jsx(Am,{ref:re,title:D,header:i,showBack:F,showClose:A,bind:bn,hasHandleBar:R,onBack:k,onClose:f,style:C==null?void 0:C.header}),l.createElement(et,{...C!=null&&C.body?{style:C.body}:{},key:"scroll","data-rsbs-scroll":!0,"data-rsbs-scroll-has-padding-x":Le,"data-rsbs-scroll-has-padding-y":ke,ref:z,...I?bn({isContentDragging:!0}):{}},M.jsx(et,{...C!=null&&C.content?{style:C.content}:{},"data-rsbs-content":!0,ref:G,children:t})),o&&l.createElement(et,{...C!=null&&C.footer?{style:C.footer}:{},key:"footer",ref:ne,"data-rsbs-footer":!0,...bn()},o))]})}),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),f=l.useRef(r&&o.isOpen?"OPEN":"CLOSED");wi(()=>o.isOpen?(cancelAnimationFrame(c.current),s(!0),()=>{f.current="CLOSED"}):()=>{f.current="CLOSED"},[o.isOpen]);const d=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(_v,{"data-rsbs-portal":!0,children:M.jsx(V$,{...o,lastSnapRef:u,ref:i,initialState:f.current,onSpringStart:d,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)}},[JSON.stringify(e),t]),n},W$=H$;process.env.NODE_ENV;var z$=Ke({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"},Fp={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};var K$="p9dczu0";const cl=({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,f=s.clientY-c.top,d=i.clientHeight,m=i.clientWidth,p=Math.max(m,d);r([...n,{top:f-p/2,left:u-p/2,height:Math.max(m,d),width:Math.max(m,d),backgroundColor:t==="primary"?Ct.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))},mo=l.forwardRef(({as:e,children:t,className:n,colorScheme:r,size:o,isLoading:i,variant:a,style:s,isDisabled:c,isFluid:u,unstyled:f,noRipple:d,...m},p)=>{const b=l.useRef(null),y=cl({ref:b,colorScheme:r,variant:a});l.useImperativeHandle(p,()=>b.current);const $=e||"button";return M.jsx($,{ref:b,as:e,"data-test-id":m["data-test-id"],className:Te(z$({colorScheme:r,size:o,variant:a,isFluid:u,unstyled:f}),a==="ghost"?Y$[r||"primary"]:void 0,n),disabled:c,style:s,...m,children:i?M.jsx(_o,{color:a==="outline"||a==="ghost"?Fp[r||"primary"]:Fp.white}):M.jsxs(M.Fragment,{children:[t,!d&&y]})})});mo.displayName="Button";mo.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0,isFluid:void 0,noRipple:!1};const qm="Checkbox",[q$,PP]=yn(qm),[X$,G$]=q$(qm),Z$=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...f}=e,[d,m]=l.useState(null),p=ut(t,w=>m(w)),b=l.useRef(!1),y=d?!!d.closest("form"):!0,[$=!1,x]=$n({prop:o,defaultProp:i,onChange:u}),v=l.useRef($);return l.useEffect(()=>{const w=d==null?void 0:d.form;if(w){const T=()=>x(v.current);return w.addEventListener("reset",T),()=>w.removeEventListener("reset",T)}},[d,x]),l.createElement(X$,{scope:n,state:$,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"checkbox","aria-checked":kr($)?"mixed":$,"aria-required":a,"data-state":Xm($),"data-disabled":s?"":void 0,disabled:s,value:c},f,{ref:p,onKeyDown:Ne(e.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ne(e.onClick,w=>{x(T=>kr(T)?!0:!T),y&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})})),y&&l.createElement(eT,{control:d,bubbles:!b.current,name:r,value:c,checked:$,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||kr(i.state)||i.state===!0},l.createElement(Ue.span,ae({"data-state":Xm(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=us(n),s=ss(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});c.indeterminate=kr(n),d.call(c,kr(n)?!1:n),c.dispatchEvent(m)}},[a,n,r]),l.createElement("input",ae({type:"checkbox","aria-hidden":!0,defaultChecked:kr(n)?!1:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function kr(e){return e==="indeterminate"}function Xm(e){return kr(e)?"indeterminate":e?"checked":"unchecked"}const tT=Z$,nT=J$;var rT="glci2q0",Vp="glci2q3",oT="glci2q4",Bp={disabled:"glci2q1",enabled:"glci2q2"},iT=Ke({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 Gm=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,f]=l.useState(n);return l.useEffect(()=>{f(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:d=>{typeof d=="boolean"&&(r?r(d):f(d))},...a,children:M.jsxs(nT,{className:oT,children:[u==="indeterminate"&&M.jsx(C0,{color:"white",className:Vp}),u===!0&&M.jsx(Eu,{color:"white",className:Vp})]})}),e&&M.jsx("label",{htmlFor:c,className:o?Bp.disabled:Bp.enabled,children:e})]})});Gm.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=Ke({defaultClassName:"_10le3lp0",variantClassNames:{variant:{filled:"_10le3lp1",outline:"_10le3lp2"},size:{small:"_10le3lp3",medium:"_10le3lp4"},isActive:{true:"_10le3lp5"}},defaultVariants:{variant:"filled",isActive:!1,size:"medium"},compoundVariants:[[{variant:"outline",isActive:!0},"_10le3lp6"],[{variant:"filled",isActive:!0},"_10le3lp7"]]});const ul=l.forwardRef(({as:e,children:t,variant:n,isActive:r,prefixIcon:o,withCloseButton:i,className:a,disabled:s,style:c,onClose:u,size:f,...d},m)=>{const p=e||"button";return M.jsxs(p,{ref:m,as:e,"data-test-id":d["data-test-id"],className:Te(sT({variant:n,isActive:r,size:f}),a),disabled:s,style:c,...d,children:[o&&o,M.jsx(Xt,{textAlign:"left",textStyle:f==="small"?"caption":"body2",children:t}),i&&M.jsx(Wr,{as:"div","data-test-id":"chips-close-button",variant:"small",isDisabled:s,onClick:u})]})});ul.defaultProps={as:"button",children:void 0,isActive:!1,prefixIcon:void 0,withCloseButton:!1,"data-test-id":void 0,onClose:void 0};ul.displayName="Chip";const Zm="Dialog",[Qm,AP]=yn(Zm),[cT,wr]=Qm(Zm),uT=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,f]=$n({prop:r,defaultProp:o,onChange:i});return l.createElement(cT,{scope:t,triggerRef:s,contentRef:c,contentId:Gn(),titleId:Gn(),descriptionId:Gn(),open:u,onOpenChange:f,onOpenToggle:l.useCallback(()=>f(d=>!d),[f]),modal:a},n)},lT="DialogTrigger",dT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(lT,n),i=ut(t,o.triggerRef);return l.createElement(Ue.button,ae({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ll(o.open)},r,{ref:i,onClick:Ne(e.onClick,o.onOpenToggle)}))}),fT="DialogPortal",[DP,Jm]=Qm(fT,{forceMount:void 0}),iu="DialogOverlay",pT=l.forwardRef((e,t)=>{const n=Jm(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(hT,ae({},o,{ref:t}))):null}),hT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(iu,n);return l.createElement(dv,{as:lo,allowPinchZoom:!0,shards:[o.contentRef]},l.createElement(Ue.div,ae({"data-state":ll(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),xi="DialogContent",vT=l.forwardRef((e,t)=>{const n=Jm(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(mT,ae({},o,{ref:t})):l.createElement(gT,ae({},o,{ref:t})))}),mT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(null),o=ut(t,n.contentRef,r);return l.useEffect(()=>{const i=r.current;if(i)return nv(i)},[]),l.createElement(eg,ae({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ne(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ne(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Ne(e.onFocusOutside,i=>i.preventDefault())}))}),gT=l.forwardRef((e,t)=>{const n=wr(xi,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return l.createElement(eg,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()}}))}),eg=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=wr(xi,n),c=l.useRef(null),u=ut(t,c);return Nh(),l.createElement(l.Fragment,null,l.createElement(kh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},l.createElement(os,ae({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ll(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),yT="DialogClose",bT=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wr(yT,n);return l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ne(e.onClick,()=>o.onOpenChange(!1))}))});function ll(e){return e?"open":"closed"}const wT=uT,ET=dT,xT=pT,_T=vT,ST=bT;var CT="_1jc0z8o4",$T="_1jc0z8o0",TT=Ke({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:[]}),IT="_1jc0z8o1",RT=Ke({defaultClassName:"_1jc0z8o2",variantClassNames:{bold:{true:"_1jc0z8o3"}},defaultVariants:{bold:!1},compoundVariants:[]}),OT=Ke({defaultClassName:"_1jc0z8o6",variantClassNames:{},defaultVariants:{},compoundVariants:[]});const tg=l.forwardRef(({children:e,className:t,"data-test-id":n,...r},o)=>M.jsx(_T,{"data-test-id":n,className:t,ref:o,...r,children:e}));tg.defaultProps={"data-test-id":void 0};const PT=l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(xT,{className:t,ref:r,...n,children:e})),AT=({children:e,className:t,...n})=>M.jsx(vs,{className:t,...n,children:e}),DT=({children:e,...t})=>M.jsx(wT,{...t,children:e});l.forwardRef(({children:e,className:t,...n},r)=>M.jsx(ET,{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:f,isCloseWhenEscape:d,...m},p)=>!n&&i?null:M.jsx(DT,{open:n,onOpenChange:r,children:M.jsxs(AT,{children:[M.jsx(PT,{className:Te(OT())}),M.jsxs(tg,{"data-test-id":t,onInteractOutside:b=>!c&&b.preventDefault(),className:Te(TT({colorScheme:s,size:o,noPadding:a}),f),...m,onEscapeKeyDown:b=>d?r==null?void 0:r():b.preventDefault(),ref:p,children:[r&&!u&&M.jsx(ST,{asChild:!0,"aria-label":"Close",children:M.jsx(Wr,{className:CT,"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,onOpenAutoFocus:void 0,onCloseAutoFocus:void 0};const Ts=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:$T,...r,children:t})});Ts.displayName="modalBody";Ts.defaultProps={as:"div",children:void 0,"data-test-id":void 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,className:IT,ref:o,...r,children:t})});Is.displayName="modalFooter";Is.defaultProps={as:"div",children:void 0,"data-test-id":void 0};const Rs=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:RT({bold:t}),...o,children:M.jsx(Xt,{textStyle:"subtitle1",fontWeight:"$bold",paddingRight:"$16",margin:"$0",children:n})})});Rs.displayName="modalHeader";Rs.defaultProps={as:"div",bold:!1,children:void 0,"data-test-id":void 0};var NT="ayjm8u0";const dl=({isOpen:e,onConfirm:t,onCancel:n,message:r,title:o,confirmTestId:i,isLoading:a,confirmText:s="Confirm",cancelText:c="Cancel",closeOnOverlayClick:u,size:f,classNameBody:d,actionDirection:m})=>M.jsxs(Ai,{classNameBody:d,size:f,isOpen:e,closeOnOverlayClick:u,onClose:n,closeIcon:M.jsx(et,{display:"none"}),children:[M.jsx(Rs,{children:o}),M.jsx(Ts,{children:M.jsx(Xt,{mt:"$8",mb:"$24",color:"$blackTypoMedium",textStyle:"body2",className:NT,children:r})}),M.jsx(Is,{style:{maxHeight:"none"},children:M.jsxs(Bt,{gap:"$16",justifyContent:"space-between",flexWrap:m==="horizontal"?"nowrap":"wrap",children:[M.jsx(mo,{"data-test-id":"CT_Close_Confirm",onClick:n,variant:"outline",isFluid:!0,children:c}),M.jsx(mo,{"data-test-id":i,onClick:t,isLoading:a,isFluid:!0,children:s})]})})]});dl.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 fl=l.createContext({}),kT=({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:({...f})=>{n(!0),o(f)}}),[n,o]);return M.jsxs(fl.Provider,{value:c,children:[M.jsx(dl,{isOpen:t,title:(r==null?void 0:r.title)??"",onConfirm:a,onCancel:s,...r}),e]})},MT=()=>{const{openDialog:e}=l.useContext(fl);return{confirm:async({...n})=>await new Promise(r=>{e({actionCallback:r,...n})})}};var jT=Ke({defaultClassName:"_1nya5n80",variantClassNames:{variant:{medium:"_1nya5n81",thin:"_1nya5n82"}},defaultVariants:{variant:"thin"},compoundVariants:[]});const{sizesAtoms:LT}=Ct.atoms,pl=l.forwardRef(({children:e,as:t,variant:n,className:r,style:o,width:i,...a},s)=>{const c=t||"div",{className:u}=LT({width:i??"$full",...a});return M.jsx(c,{ref:s,"data-test-id":a["data-test-id"],className:Te(jT({variant:n}),u,r),style:o,...a,children:e})});pl.defaultProps={variant:"thin",as:"div",children:void 0,"data-test-id":void 0};pl.displayName="Divider";const hl=({children:e,isDisabled:t,className:n})=>M.jsx("div",{className:Te(xE({isDisabled:t}),n),children:e});hl.displayName="ActionIcon";hl.defaultProps={isDisabled:!1,className:void 0};const Di=l.forwardRef(({isError:e,isDisabled:t,required:n,isTextarea:r,children:o,className:i},a)=>M.jsxs("label",{ref:a,className:Te(OE({state:Du({isError:e,isDisabled:t}),isTextarea:r}),i),children:[o,n&&"*"]}));Di.displayName="Label";Di.defaultProps={isTextarea:!1,className:""};const vl=l.forwardRef(({value:e,type:t,label:n,onClear:r,onBlur:o,isLoading:i,icon:a,isClearable:s=!0,required:c,containerStyles:u,inputAreaClassName:f,...d},m)=>{const{addonLeft:p,addonRight:b,helperTextLeft:y,helperTextRight:$,isError:x,errorMessage:v,isDisabled:w,isValid:T,elementLeft:I,elementRight:D,className:A,...F}=d,k=!!a,B=l.useRef(null);l.useImperativeHandle(m,()=>B.current);const[R,E]=l.useState(!1),[h,C]=l.useState(!1),P=H=>{if(R){const Y=B.current;Y&&Y.focus(),h&&(E(!1),C(!1))}else o==null||o(H)},j=()=>{const H=B.current;H&&H.focus(),h&&(E(!1),C(!1))};return l.useEffect(()=>{h&&E(!0)},[h]),M.jsxs(wo,{addonLeft:p,addonRight:b,elementLeft:I,elementRight:D,helperTextLeft:y,helperTextRight:$,isError:x,errorMessage:v,isDisabled:w,isValid:T,className:u,inputAreaClassName:Te(TE,f),children:[M.jsx("input",{ref:B,type:t,className:Te($E,A),value:e,disabled:w,"data-test-id":d["data-test-id"],required:c,onBlur:P,...F}),M.jsx(Di,{isError:x,isDisabled:w,required:c,children:n}),M.jsx("div",{className:Te(IE),"data-test-id":"icon-input-area",onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),onTouchStart:()=>C(!0),onClick:j,"aria-hidden":"true",children:M.jsxs(hl,{isDisabled:w,className:Te(s&&!i&&!k&&CE),children:[k&&!i&&a,s&&!i&&!k&&M.jsx(rs,{"data-test-id":`clear-input-${d["data-test-id"]}`,onClick:r}),i&&M.jsx(_o,{color:Ct.theme.colors.green1})]})})]})});vl.displayName="Input";vl.defaultProps={type:"text",isLoading:!1,icon:void 0,onClear:void 0,isClearable:!0,containerStyles:void 0,"data-test-id":void 0,inputAreaClassName:void 0};const ml=l.forwardRef(({value:e,label:t,rows:n=4,required:r,containerStyles:o,...i},a)=>{const{helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:f,isDisabled:d,isValid:m,...p}=i,b=l.useRef(null);l.useImperativeHandle(a,()=>b.current);const y=()=>{var $;($=b.current)==null||$.focus()};return M.jsxs(wo,{"data-test-id":"CT_Field_Container",helperTextLeft:s,helperTextRight:c,isError:u,errorMessage:f,isDisabled:d,isValid:m,className:Te(o),onClick:y,children:[M.jsx("textarea",{ref:b,className:Te(PE),value:e,rows:n,disabled:d,"data-test-id":i["data-test-id"],required:r,...p}),M.jsx(Di,{isTextarea:!0,isError:u,isDisabled:d,required:r,children:t})]})});ml.displayName="Textarea";ml.defaultProps={containerStyles:void 0,"data-test-id":void 0};var FT=Ke({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"]]}),Hp={primary:"var(--_1qe00b2a)",neutral:"var(--_1qe00b2c)",danger:"var(--_1qe00b214)",warning:"var(--_1qe00b211)",info:"var(--_1qe00b2y)",white:"var(--_1qe00b2d)"};const gl=l.forwardRef(({as:e,className:t,style:n,colorScheme:r,icon:o,unstyled:i,variant:a,isDisabled:s,isLoading:c,...u},f)=>{const d=l.useRef(null),m=cl({ref:d,colorScheme:r,variant:a});l.useImperativeHandle(f,()=>d.current);const p=e||"button";return M.jsx(p,{ref:d,as:e,"data-test-id":u["data-test-id"],className:Te(FT({colorScheme:r,unstyled:i,variant:a}),t),disabled:s,style:n,...u,children:c?M.jsx(_o,{color:a==="outline"?Hp[r||"primary"]:Hp.white}):M.jsxs(M.Fragment,{children:[m,o]})})});gl.displayName="Button";gl.defaultProps={as:"button","data-test-id":void 0,isDisabled:void 0,isLoading:void 0};var VT=Ke({defaultClassName:"",variantClassNames:{fit:{fill:"_19yf4wk0",contain:"_19yf4wk1",cover:"_19yf4wk2","scale-down":"_19yf4wk3",none:"_19yf4wk4"}},defaultVariants:{fit:"fill"},compoundVariants:[]});const BT=({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"})}),yl=l.forwardRef(({as:e,src:t,fit:n,width:r,height:o,loading:i,isLoading:a,fallback:s,onLoad:c,onError:u,className:f,"data-test-id":d,...m},p)=>{const b=e||"img",y=l.useMemo(()=>`${parseInt(`${r??0}`,10)}px`,[r]),$=l.useMemo(()=>`${parseInt(`${o??0}`,10)}px`,[o]),[x,v]=l.useState(!1),[w,T]=l.useState(n),I=A=>{T("fill"),v(!0),u==null||u(A)},D=A=>{v(!1),c==null||c(A)};return a&&!x?M.jsx(et,{bgColor:"$grey2",width:y,height:$}):x?s||M.jsx(BT,{width:y,height:$}):M.jsx(b,{"data-test-id":d,as:"img",width:y,height:$,src:t,loading:i,onLoad:D,onError:I,ref:p,className:Te(VT({fit:w})),...m})});yl.displayName="Image";yl.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 ng=Ke({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 rg=({children:e,className:t,isStandalone:n,textStyle:r="body2",isDisabled:o,isBold:i,...a})=>M.jsx("a",{className:Te(t,ng({isDisabled:o,textStyle:r,isBold:i,isStandalone:n})),"data-disabled":o,...a,children:e});var HT="_1cq2k9i0";const bl=l.forwardRef(({children:e,as:t,className:n,variant:r,...o},i)=>{const a=t||"ul";return M.jsx(a,{"data-test-id":o["data-test-id"],ref:i,className:Te(HT,n),...o,children:l.Children.map(e,s=>l.cloneElement(s,{variant:r}))})});bl.displayName="List";bl.defaultProps={"data-test-id":void 0,as:"ul",variant:"default"};var WT="xw6nfa0",zT="xw6nfa1",UT=Ke({defaultClassName:"xw6nfa2",variantClassNames:{variant:{small:"xw6nfa3",default:"xw6nfa4"}},defaultVariants:{variant:"default"},compoundVariants:[]});const wl=l.forwardRef(({children:e,leftIcon:t,rightIcon:n,href:r,target:o,as:i,className:a,variant:s,...c},u)=>{const f=i||"li",d=r?"a":et;return M.jsx(f,{"data-test-id":c["data-test-id"],className:Te(WT,a),...c,ref:u,children:M.jsxs(d,{href:r,target:o,className:UT({variant:s}),children:[t,M.jsx("div",{className:zT,children:e}),n]})})});wl.displayName="ListItem";wl.defaultProps={"data-test-id":void 0,leftIcon:void 0,rightIcon:void 0,href:void 0,target:"_self",as:"li",variant:void 0};var og={},ig={exports:{}};(function(e,t){(function(r,o){e.exports=o()})(Wy,()=>(()=>{var n=[,(a,s,c)=>{c.r(s),c.d(s,{default:()=>f});var u=(()=>{var d=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(m={}){var p=m,b,y;p.ready=new Promise((S,g)=>{b=S,y=g});function $(){function S(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(S.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 x(S){console.assert(!0);const g=new Map;let O=-1/0;this.push=function(N){return N=N+((1<<S)-1)>>S,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<<S}}const v=new function(){function S(){if(!g){let Et=function(Nt,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(Nt,Ve)};var Re=document.createElement("canvas"),je={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,preferLowPowerToHighPerformance:0,failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let ye=Re.getContext("webgl2",je);if(ye)O=2;else if(ye=Re.getContext("webgl",je))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)),Re=ye.createProgram(),Et(Re,ye.VERTEX_SHADER,`attribute vec2 vertex;
147
147
  attribute vec2 uv;
148
148
  uniform vec4 mat;
149
149
  uniform vec2 translate;
@@ -156,7 +156,7 @@ 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(Re,0,"vertex"),ye.bindAttribLocation(Re,1,"uv"),ye.linkProgram(Re),je=ye.getProgramInfoLog(Re),0<je.trim().length)throw je;q=ye.getUniformLocation(Re,"mat"),te=ye.getUniformLocation(Re,"translate"),ye.useProgram(Re),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(Re,"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 S(),N},this.gb=function(Re){if(!S())return null;const je=g.createTexture();return g.bindTexture(g.TEXTURE_2D,je),g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,Re),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),je};const de=new x(8),le=new x(8),ge=new x(10),Ce=new x(10);this.kb=function(Re,je,ye,Et,Nt){if(S()){var Ve=de.push(Re),Ye=le.push(je);(g.canvas.width!=Ve||g.canvas.height!=Ye)&&(g.canvas.width=Ve,g.canvas.height=Ye),g.viewport(0,Ye-je,Re,je),g.disable(g.SCISSOR_TEST),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),g.enable(g.SCISSOR_TEST),ye.sort((rt,or)=>or.Ua-rt.Ua),Ve=ge.push(Et),ue!=Ve&&(g.bufferData(g.ARRAY_BUFFER,8*Ve,g.DYNAMIC_DRAW),ue=Ve),Ve=0;for(var kt of ye)g.bufferSubData(g.ARRAY_BUFFER,Ve,kt.Da),Ve+=4*kt.Da.length;console.assert(Ve==4*Et);for(var fn of ye)g.bufferSubData(g.ARRAY_BUFFER,Ve,fn.Xa),Ve+=4*fn.Xa.length;console.assert(Ve==8*Et),Ve=Ce.push(Nt),se!=Ve&&(g.bufferData(g.ELEMENT_ARRAY_BUFFER,2*Ve,g.DYNAMIC_DRAW),se=Ve),kt=0;for(var Un of ye)g.bufferSubData(g.ELEMENT_ARRAY_BUFFER,kt,Un.indices),kt+=2*Un.indices.length;console.assert(kt==2*Nt),Un=0,fn=!0,Ve=kt=0;for(const rt of ye){rt.image.za!=Un&&(g.bindTexture(g.TEXTURE_2D,rt.image.cb||null),Un=rt.image.za),rt.zb?(g.scissor(rt.Ia,Ye-rt.Ja-rt.Pa,rt.Gb,rt.Pa),fn=!0):fn&&(g.scissor(0,Ye-je,Re,je),fn=!1),ye=2/Re;const or=-2/je;g.uniform4f(q,rt.oa[0]*ye*rt.va,rt.oa[1]*or*rt.wa,rt.oa[2]*ye*rt.va,rt.oa[3]*or*rt.wa),g.uniform2f(te,rt.oa[4]*ye*rt.va+ye*(rt.Ia-rt.xb*rt.va)-1,rt.oa[5]*or*rt.wa+or*(rt.Ja-rt.yb*rt.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,rt.indices.length,g.UNSIGNED_SHORT,kt),Ve+=4*rt.Da.length,kt+=2*rt.indices.length}console.assert(Ve==4*Et),console.assert(kt==2*Nt)}},this.canvas=function(){return S()&&g.canvas}};p.onRuntimeInitialized=function(){function S(he){switch(he){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(he){return"rgba("+((16711680&he)>>>16)+","+((65280&he)>>>8)+","+((255&he)>>>0)+","+((4278190080&he)>>>24)/255+")"}function O(){0<kt.length&&(v.kb(Ye.drawWidth(),Ye.drawHeight(),kt,fn,Un),kt=[],Un=fn=0,Ye.reset(512,512));for(const he of Ve){for(const Me of he.da)Me();he.da=[]}Ve.clear()}var N=p.RenderPaintStyle;const q=p.RenderPath,te=p.RenderPaint,ue=p.Renderer,se=p.StrokeCap,de=p.StrokeJoin,le=p.BlendMode,ge=N.fill,Ce=N.stroke,Re=p.FillRule.evenOdd;let je=1;var ye=p.RenderImage.extend("CanvasRenderImage",{__construct:function(){this.__parent.__construct.call(this),this.za=je,je=je+1&2147483647||1},decode:function(he){let Me=Bs;Me.total++;var vt=this,lt=new Image;lt.src=URL.createObjectURL(new Blob([he],{type:"image/png"})),lt.onload=function(){if(vt.ab=lt,vt.cb=v.gb(lt),vt.size(lt.width,lt.height),Me.loaded++,Me.loaded===Me.total){const mt=Me.ready;mt&&(mt(),Me.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(he,Me,vt,lt,mt,Rt,it){var ft=this.ia,En=ft.addPath;he=he.ia;const Ft=new DOMMatrix;Ft.a=Me,Ft.b=vt,Ft.c=lt,Ft.d=mt,Ft.e=Rt,Ft.f=it,En.call(ft,he,Ft)},fillRule:function(he){this.Ga=he},moveTo:function(he,Me){this.ia.moveTo(he,Me)},lineTo:function(he,Me){this.ia.lineTo(he,Me)},cubicTo:function(he,Me,vt,lt,mt,Rt){this.ia.bezierCurveTo(he,Me,vt,lt,mt,Rt)},close:function(){this.ia.closePath()}}),Nt=te.extend("CanvasRenderPaint",{color:function(he){this.Ha=g(he)},thickness:function(he){this.eb=he},join:function(he){switch(he){case de.miter:this.ya="miter";break;case de.round:this.ya="round";break;case de.bevel:this.ya="bevel"}},cap:function(he){switch(he){case se.butt:this.xa="butt";break;case se.round:this.xa="round";break;case se.square:this.xa="square"}},style:function(he){this.bb=he},blendMode:function(he){this.$a=S(he)},clearGradient:function(){this.qa=null},linearGradient:function(he,Me,vt,lt){this.qa={Va:he,Wa:Me,La:vt,Ma:lt,Ca:[]}},radialGradient:function(he,Me,vt,lt){this.qa={Va:he,Wa:Me,La:vt,Ma:lt,Ca:[],ub:!0}},addStop:function(he,Me){this.qa.Ca.push({color:he,stop:Me})},completeGradient:function(){},draw:function(he,Me,vt){let lt=this.bb;var mt=this.Ha,Rt=this.qa;if(he.globalCompositeOperation=this.$a,Rt!=null){mt=Rt.Va;var it=Rt.Wa;const En=Rt.La;var ft=Rt.Ma;const Ft=Rt.Ca;Rt.ub?(Rt=En-mt,ft-=it,mt=he.createRadialGradient(mt,it,0,mt,it,Math.sqrt(Rt*Rt+ft*ft))):mt=he.createLinearGradient(mt,it,En,ft);for(let jn=0,Bt=Ft.length;jn<Bt;jn++)it=Ft[jn],mt.addColorStop(it.stop,g(it.color));this.Ha=mt,this.qa=null}switch(lt){case Ce:he.strokeStyle=mt,he.lineWidth=this.eb,he.lineCap=this.xa,he.lineJoin=this.ya,he.stroke(Me);break;case ge:he.fillStyle=mt,he.fill(Me,vt)}}});const Ve=new Set;let Ye=null,kt=[],fn=0,Un=0;var rt=p.CanvasRenderer=ue.extend("Renderer",{__construct:function(he){this.__parent.__construct.call(this),this.ha=[1,0,0,1,0,0],this.ba=he.getContext("2d"),this.Fa=he,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 he=this.ha.length-6;if(6>he)throw"restore() called without matching save().";this.ha.splice(he),this.da.push(this.ba.restore.bind(this.ba))},transform:function(he,Me,vt,lt,mt,Rt){const it=this.ha,ft=it.length-6;it.splice(ft,6,it[ft]*he+it[ft+2]*Me,it[ft+1]*he+it[ft+3]*Me,it[ft]*vt+it[ft+2]*lt,it[ft+1]*vt+it[ft+3]*lt,it[ft]*mt+it[ft+2]*Rt+it[ft+4],it[ft+1]*mt+it[ft+3]*Rt+it[ft+5]),this.da.push(this.ba.transform.bind(this.ba,he,Me,vt,lt,mt,Rt))},rotate:function(he){const Me=Math.sin(he);he=Math.cos(he),this.transform(he,Me,-Me,he,0,0)},_drawPath:function(he,Me){this.da.push(Me.draw.bind(Me,this.ba,he.ia,he.Ga===Re?"evenodd":"nonzero"))},drawImage:function(he,...Me){var vt=this.ba;this.da.push(function(){vt.drawImage(he,...Me)})},_drawRiveImage:function(he,Me,vt){var lt=he.ab;if(lt){var mt=this.ba,Rt=S(Me);this.da.push(function(){mt.globalCompositeOperation=Rt,mt.globalAlpha=vt,mt.drawImage(lt,0,0),mt.globalAlpha=1})}},_getMatrix:function(he){const Me=this.ha,vt=Me.length-6;for(let lt=0;6>lt;++lt)he[lt]=Me[vt+lt]},_drawImageMesh:function(he,Me,vt,lt,mt,Rt,it,ft,En,Ft){var jn=this.ba.canvas.width,Bt=this.ba.canvas.height;const Rd=En-it,Od=Ft-ft;it=Math.max(it,0),ft=Math.max(ft,0),En=Math.min(En,jn),Ft=Math.min(Ft,Bt);const So=En-it,Co=Ft-ft;if(console.assert(So<=Math.min(Rd,jn)),console.assert(Co<=Math.min(Od,Bt)),!(0>=So||0>=Co)){En=So<Rd||Co<Od,jn=Ft=1;var xr=Math.ceil(So*Ft),_r=Math.ceil(Co*jn);Bt=v.wb(),xr>Bt&&(Ft*=Bt/xr,xr=Bt),_r>Bt&&(jn*=Bt/_r,_r=Bt),Ye||(Ye=new p.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 Pd=Bt&65535,Ad=Bt>>16;kt.push({oa:this.ha.slice(this.ha.length-6),image:he,Ia:Pd,Ja:Ad,xb:it,yb:ft,Gb:xr,Pa:_r,va:Ft,wa:jn,Da:new Float32Array(lt),Xa:new Float32Array(mt),indices:new Uint16Array(Rt),zb:En,Ua:he.za<<1|(En?1:0)}),fn+=lt.length,Un+=Rt.length;var zr=this.ba,By=S(Me);this.da.push(function(){zr.save(),zr.resetTransform(),zr.globalCompositeOperation=By,zr.globalAlpha=vt,zr.drawImage(v.canvas(),Pd,Ad,xr,_r,it,ft,So,Co),zr.restore()})}},_clipPath:function(he){this.da.push(this.ba.clip.bind(this.ba,he.ia,he.Ga===Re?"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(he,Me){this.transform(1,0,0,1,he,Me)}});p.makeRenderer=function(he){return new rt(he)},p.renderFactory={makeRenderPaint:function(){return new Nt},makeRenderPath:function(){return new Et},makeRenderImage:function(){return new ye}};let or=p.load,Bs=null;p.load=function(he){return new Promise(function(Me){let vt=null;Bs={total:0,loaded:0,ready:function(){Me(vt)}},vt=or(he),Bs.total==0&&Me(vt)})},N=new $,p.requestAnimationFrame=N.requestAnimationFrame.bind(N),p.cancelAnimationFrame=N.cancelAnimationFrame.bind(N),p.enableFPSCounter=N.lb.bind(N),p.disableFPSCounter=N.ib,N.Qa=O,p.cleanup=function(){Ye&&Ye.delete()}};var w=Object.assign({},p),T="./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),d&&(A=d),A.indexOf("blob:")!==0?A=A.substr(0,A.replace(/[?#].*/,"").lastIndexOf("/")+1):A="",D&&(k=S=>{var g=new XMLHttpRequest;return g.open("GET",S,!1),g.responseType="arraybuffer",g.send(null),new Uint8Array(g.response)}),F=(S,g,O)=>{var N=new XMLHttpRequest;N.open("GET",S,!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=p.print||console.log.bind(console),R=p.printErr||console.error.bind(console);Object.assign(p,w),w=null,p.thisProgram&&(T=p.thisProgram);var E;p.wasmBinary&&(E=p.wasmBinary),p.noExitRuntime,typeof WebAssembly!="object"&&ie("no native wasm support detected");var h,C=!1,P,j,H,Y,oe,W,L,J;function U(){var S=h.buffer;p.HEAP8=P=new Int8Array(S),p.HEAP16=H=new Int16Array(S),p.HEAP32=oe=new Int32Array(S),p.HEAPU8=j=new Uint8Array(S),p.HEAPU16=Y=new Uint16Array(S),p.HEAPU32=W=new Uint32Array(S),p.HEAPF32=L=new Float32Array(S),p.HEAPF64=J=new Float64Array(S)}var K,Z=[],ce=[],z=[];function G(){var S=p.preRun.shift();Z.unshift(S)}var re=0,ne=null;function ie(S){throw p.onAbort&&p.onAbort(S),S="Aborted("+S+")",R(S),C=!0,S=new WebAssembly.RuntimeError(S+". Build with -sASSERTIONS for more info."),y(S),S}function ee(S){return S.startsWith("data:application/octet-stream;base64,")}var pe;if(pe="canvas_advanced.wasm",!ee(pe)){var xe=pe;pe=p.locateFile?p.locateFile(xe,A):A+xe}function Ee(S){if(S==pe&&E)return new Uint8Array(E);if(k)return k(S);throw"both async and sync fetching of the wasm failed"}function Ae(S){if(!E&&(I||D)){if(typeof fetch=="function"&&!S.startsWith("file://"))return fetch(S,{credentials:"same-origin"}).then(g=>{if(!g.ok)throw"failed to load wasm binary file at '"+S+"'";return g.arrayBuffer()}).catch(()=>Ee(S));if(F)return new Promise((g,O)=>{F(S,N=>g(new Uint8Array(N)),O)})}return Promise.resolve().then(()=>Ee(S))}function Ie(S,g,O){return Ae(S).then(N=>WebAssembly.instantiate(N,g)).then(N=>N).then(O,N=>{R("failed to asynchronously prepare wasm: "+N),ie(N)})}function Le(S,g){var O=pe;return E||typeof WebAssembly.instantiateStreaming!="function"||ee(O)||O.startsWith("file://")||typeof fetch!="function"?Ie(O,S,g):fetch(O,{credentials:"same-origin"}).then(N=>WebAssembly.instantiateStreaming(N,S).then(g,function(q){return R("wasm streaming compile failed: "+q),R("falling back to ArrayBuffer instantiation"),Ie(O,S,g)}))}var ke=S=>{for(;0<S.length;)S.shift()(p)};function at(S){if(S===void 0)return"_unknown";S=S.replace(/[^a-zA-Z0-9_]/g,"$");var g=S.charCodeAt(0);return 48<=g&&57>=g?`_${S}`:S}function We(S,g){return S=at(S),{[S]:function(){return g.apply(this,arguments)}}[S]}function wt(){this.ja=[void 0],this.Oa=[]}var Xe=new wt,At=void 0;function $e(S){throw new At(S)}var Tt=S=>(S||$e("Cannot use deleted val. handle = "+S),Xe.get(S).value),Ge=S=>{switch(S){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Xe.Ya({Ta:1,value:S})}};function It(S){var g=Error,O=We(S,function(N){this.name=S,this.message=N,N=Error(N).stack,N!==void 0&&(this.stack=this.toString()+`
159
+ }`),ye.bindAttribLocation(Re,0,"vertex"),ye.bindAttribLocation(Re,1,"uv"),ye.linkProgram(Re),je=ye.getProgramInfoLog(Re),0<je.trim().length)throw je;q=ye.getUniformLocation(Re,"mat"),te=ye.getUniformLocation(Re,"translate"),ye.useProgram(Re),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(Re,"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 S(),N},this.gb=function(Re){if(!S())return null;const je=g.createTexture();return g.bindTexture(g.TEXTURE_2D,je),g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,Re),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),je};const de=new x(8),le=new x(8),ge=new x(10),Ce=new x(10);this.kb=function(Re,je,ye,Et,Nt){if(S()){var Ve=de.push(Re),Ye=le.push(je);(g.canvas.width!=Ve||g.canvas.height!=Ye)&&(g.canvas.width=Ve,g.canvas.height=Ye),g.viewport(0,Ye-je,Re,je),g.disable(g.SCISSOR_TEST),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),g.enable(g.SCISSOR_TEST),ye.sort((rt,or)=>or.Ua-rt.Ua),Ve=ge.push(Et),ue!=Ve&&(g.bufferData(g.ARRAY_BUFFER,8*Ve,g.DYNAMIC_DRAW),ue=Ve),Ve=0;for(var kt of ye)g.bufferSubData(g.ARRAY_BUFFER,Ve,kt.Da),Ve+=4*kt.Da.length;console.assert(Ve==4*Et);for(var fn of ye)g.bufferSubData(g.ARRAY_BUFFER,Ve,fn.Xa),Ve+=4*fn.Xa.length;console.assert(Ve==8*Et),Ve=Ce.push(Nt),se!=Ve&&(g.bufferData(g.ELEMENT_ARRAY_BUFFER,2*Ve,g.DYNAMIC_DRAW),se=Ve),kt=0;for(var Un of ye)g.bufferSubData(g.ELEMENT_ARRAY_BUFFER,kt,Un.indices),kt+=2*Un.indices.length;console.assert(kt==2*Nt),Un=0,fn=!0,Ve=kt=0;for(const rt of ye){rt.image.za!=Un&&(g.bindTexture(g.TEXTURE_2D,rt.image.cb||null),Un=rt.image.za),rt.zb?(g.scissor(rt.Ia,Ye-rt.Ja-rt.Pa,rt.Gb,rt.Pa),fn=!0):fn&&(g.scissor(0,Ye-je,Re,je),fn=!1),ye=2/Re;const or=-2/je;g.uniform4f(q,rt.oa[0]*ye*rt.va,rt.oa[1]*or*rt.wa,rt.oa[2]*ye*rt.va,rt.oa[3]*or*rt.wa),g.uniform2f(te,rt.oa[4]*ye*rt.va+ye*(rt.Ia-rt.xb*rt.va)-1,rt.oa[5]*or*rt.wa+or*(rt.Ja-rt.yb*rt.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,rt.indices.length,g.UNSIGNED_SHORT,kt),Ve+=4*rt.Da.length,kt+=2*rt.indices.length}console.assert(Ve==4*Et),console.assert(kt==2*Nt)}},this.canvas=function(){return S()&&g.canvas}};p.onRuntimeInitialized=function(){function S(he){switch(he){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(he){return"rgba("+((16711680&he)>>>16)+","+((65280&he)>>>8)+","+((255&he)>>>0)+","+((4278190080&he)>>>24)/255+")"}function O(){0<kt.length&&(v.kb(Ye.drawWidth(),Ye.drawHeight(),kt,fn,Un),kt=[],Un=fn=0,Ye.reset(512,512));for(const he of Ve){for(const Me of he.da)Me();he.da=[]}Ve.clear()}var N=p.RenderPaintStyle;const q=p.RenderPath,te=p.RenderPaint,ue=p.Renderer,se=p.StrokeCap,de=p.StrokeJoin,le=p.BlendMode,ge=N.fill,Ce=N.stroke,Re=p.FillRule.evenOdd;let je=1;var ye=p.RenderImage.extend("CanvasRenderImage",{__construct:function(){this.__parent.__construct.call(this),this.za=je,je=je+1&2147483647||1},decode:function(he){let Me=Bs;Me.total++;var vt=this,lt=new Image;lt.src=URL.createObjectURL(new Blob([he],{type:"image/png"})),lt.onload=function(){if(vt.ab=lt,vt.cb=v.gb(lt),vt.size(lt.width,lt.height),Me.loaded++,Me.loaded===Me.total){const mt=Me.ready;mt&&(mt(),Me.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(he,Me,vt,lt,mt,Rt,it){var ft=this.ia,En=ft.addPath;he=he.ia;const Ft=new DOMMatrix;Ft.a=Me,Ft.b=vt,Ft.c=lt,Ft.d=mt,Ft.e=Rt,Ft.f=it,En.call(ft,he,Ft)},fillRule:function(he){this.Ga=he},moveTo:function(he,Me){this.ia.moveTo(he,Me)},lineTo:function(he,Me){this.ia.lineTo(he,Me)},cubicTo:function(he,Me,vt,lt,mt,Rt){this.ia.bezierCurveTo(he,Me,vt,lt,mt,Rt)},close:function(){this.ia.closePath()}}),Nt=te.extend("CanvasRenderPaint",{color:function(he){this.Ha=g(he)},thickness:function(he){this.eb=he},join:function(he){switch(he){case de.miter:this.ya="miter";break;case de.round:this.ya="round";break;case de.bevel:this.ya="bevel"}},cap:function(he){switch(he){case se.butt:this.xa="butt";break;case se.round:this.xa="round";break;case se.square:this.xa="square"}},style:function(he){this.bb=he},blendMode:function(he){this.$a=S(he)},clearGradient:function(){this.qa=null},linearGradient:function(he,Me,vt,lt){this.qa={Va:he,Wa:Me,La:vt,Ma:lt,Ca:[]}},radialGradient:function(he,Me,vt,lt){this.qa={Va:he,Wa:Me,La:vt,Ma:lt,Ca:[],ub:!0}},addStop:function(he,Me){this.qa.Ca.push({color:he,stop:Me})},completeGradient:function(){},draw:function(he,Me,vt){let lt=this.bb;var mt=this.Ha,Rt=this.qa;if(he.globalCompositeOperation=this.$a,Rt!=null){mt=Rt.Va;var it=Rt.Wa;const En=Rt.La;var ft=Rt.Ma;const Ft=Rt.Ca;Rt.ub?(Rt=En-mt,ft-=it,mt=he.createRadialGradient(mt,it,0,mt,it,Math.sqrt(Rt*Rt+ft*ft))):mt=he.createLinearGradient(mt,it,En,ft);for(let jn=0,Ht=Ft.length;jn<Ht;jn++)it=Ft[jn],mt.addColorStop(it.stop,g(it.color));this.Ha=mt,this.qa=null}switch(lt){case Ce:he.strokeStyle=mt,he.lineWidth=this.eb,he.lineCap=this.xa,he.lineJoin=this.ya,he.stroke(Me);break;case ge:he.fillStyle=mt,he.fill(Me,vt)}}});const Ve=new Set;let Ye=null,kt=[],fn=0,Un=0;var rt=p.CanvasRenderer=ue.extend("Renderer",{__construct:function(he){this.__parent.__construct.call(this),this.ha=[1,0,0,1,0,0],this.ba=he.getContext("2d"),this.Fa=he,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 he=this.ha.length-6;if(6>he)throw"restore() called without matching save().";this.ha.splice(he),this.da.push(this.ba.restore.bind(this.ba))},transform:function(he,Me,vt,lt,mt,Rt){const it=this.ha,ft=it.length-6;it.splice(ft,6,it[ft]*he+it[ft+2]*Me,it[ft+1]*he+it[ft+3]*Me,it[ft]*vt+it[ft+2]*lt,it[ft+1]*vt+it[ft+3]*lt,it[ft]*mt+it[ft+2]*Rt+it[ft+4],it[ft+1]*mt+it[ft+3]*Rt+it[ft+5]),this.da.push(this.ba.transform.bind(this.ba,he,Me,vt,lt,mt,Rt))},rotate:function(he){const Me=Math.sin(he);he=Math.cos(he),this.transform(he,Me,-Me,he,0,0)},_drawPath:function(he,Me){this.da.push(Me.draw.bind(Me,this.ba,he.ia,he.Ga===Re?"evenodd":"nonzero"))},drawImage:function(he,...Me){var vt=this.ba;this.da.push(function(){vt.drawImage(he,...Me)})},_drawRiveImage:function(he,Me,vt){var lt=he.ab;if(lt){var mt=this.ba,Rt=S(Me);this.da.push(function(){mt.globalCompositeOperation=Rt,mt.globalAlpha=vt,mt.drawImage(lt,0,0),mt.globalAlpha=1})}},_getMatrix:function(he){const Me=this.ha,vt=Me.length-6;for(let lt=0;6>lt;++lt)he[lt]=Me[vt+lt]},_drawImageMesh:function(he,Me,vt,lt,mt,Rt,it,ft,En,Ft){var jn=this.ba.canvas.width,Ht=this.ba.canvas.height;const Rd=En-it,Od=Ft-ft;it=Math.max(it,0),ft=Math.max(ft,0),En=Math.min(En,jn),Ft=Math.min(Ft,Ht);const So=En-it,Co=Ft-ft;if(console.assert(So<=Math.min(Rd,jn)),console.assert(Co<=Math.min(Od,Ht)),!(0>=So||0>=Co)){En=So<Rd||Co<Od,jn=Ft=1;var xr=Math.ceil(So*Ft),_r=Math.ceil(Co*jn);Ht=v.wb(),xr>Ht&&(Ft*=Ht/xr,xr=Ht),_r>Ht&&(jn*=Ht/_r,_r=Ht),Ye||(Ye=new p.DynamicRectanizer(Ht),Ye.reset(512,512)),Ht=Ye.addRect(xr,_r),0>Ht&&(O(),Ve.add(this),Ht=Ye.addRect(xr,_r),console.assert(0<=Ht));var Pd=Ht&65535,Ad=Ht>>16;kt.push({oa:this.ha.slice(this.ha.length-6),image:he,Ia:Pd,Ja:Ad,xb:it,yb:ft,Gb:xr,Pa:_r,va:Ft,wa:jn,Da:new Float32Array(lt),Xa:new Float32Array(mt),indices:new Uint16Array(Rt),zb:En,Ua:he.za<<1|(En?1:0)}),fn+=lt.length,Un+=Rt.length;var zr=this.ba,By=S(Me);this.da.push(function(){zr.save(),zr.resetTransform(),zr.globalCompositeOperation=By,zr.globalAlpha=vt,zr.drawImage(v.canvas(),Pd,Ad,xr,_r,it,ft,So,Co),zr.restore()})}},_clipPath:function(he){this.da.push(this.ba.clip.bind(this.ba,he.ia,he.Ga===Re?"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(he,Me){this.transform(1,0,0,1,he,Me)}});p.makeRenderer=function(he){return new rt(he)},p.renderFactory={makeRenderPaint:function(){return new Nt},makeRenderPath:function(){return new Et},makeRenderImage:function(){return new ye}};let or=p.load,Bs=null;p.load=function(he){return new Promise(function(Me){let vt=null;Bs={total:0,loaded:0,ready:function(){Me(vt)}},vt=or(he),Bs.total==0&&Me(vt)})},N=new $,p.requestAnimationFrame=N.requestAnimationFrame.bind(N),p.cancelAnimationFrame=N.cancelAnimationFrame.bind(N),p.enableFPSCounter=N.lb.bind(N),p.disableFPSCounter=N.ib,N.Qa=O,p.cleanup=function(){Ye&&Ye.delete()}};var w=Object.assign({},p),T="./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),d&&(A=d),A.indexOf("blob:")!==0?A=A.substr(0,A.replace(/[?#].*/,"").lastIndexOf("/")+1):A="",D&&(k=S=>{var g=new XMLHttpRequest;return g.open("GET",S,!1),g.responseType="arraybuffer",g.send(null),new Uint8Array(g.response)}),F=(S,g,O)=>{var N=new XMLHttpRequest;N.open("GET",S,!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=p.print||console.log.bind(console),R=p.printErr||console.error.bind(console);Object.assign(p,w),w=null,p.thisProgram&&(T=p.thisProgram);var E;p.wasmBinary&&(E=p.wasmBinary),p.noExitRuntime,typeof WebAssembly!="object"&&ie("no native wasm support detected");var h,C=!1,P,j,H,Y,oe,W,L,J;function U(){var S=h.buffer;p.HEAP8=P=new Int8Array(S),p.HEAP16=H=new Int16Array(S),p.HEAP32=oe=new Int32Array(S),p.HEAPU8=j=new Uint8Array(S),p.HEAPU16=Y=new Uint16Array(S),p.HEAPU32=W=new Uint32Array(S),p.HEAPF32=L=new Float32Array(S),p.HEAPF64=J=new Float64Array(S)}var K,Z=[],ce=[],z=[];function G(){var S=p.preRun.shift();Z.unshift(S)}var re=0,ne=null;function ie(S){throw p.onAbort&&p.onAbort(S),S="Aborted("+S+")",R(S),C=!0,S=new WebAssembly.RuntimeError(S+". Build with -sASSERTIONS for more info."),y(S),S}function ee(S){return S.startsWith("data:application/octet-stream;base64,")}var pe;if(pe="canvas_advanced.wasm",!ee(pe)){var xe=pe;pe=p.locateFile?p.locateFile(xe,A):A+xe}function Ee(S){if(S==pe&&E)return new Uint8Array(E);if(k)return k(S);throw"both async and sync fetching of the wasm failed"}function Ae(S){if(!E&&(I||D)){if(typeof fetch=="function"&&!S.startsWith("file://"))return fetch(S,{credentials:"same-origin"}).then(g=>{if(!g.ok)throw"failed to load wasm binary file at '"+S+"'";return g.arrayBuffer()}).catch(()=>Ee(S));if(F)return new Promise((g,O)=>{F(S,N=>g(new Uint8Array(N)),O)})}return Promise.resolve().then(()=>Ee(S))}function Ie(S,g,O){return Ae(S).then(N=>WebAssembly.instantiate(N,g)).then(N=>N).then(O,N=>{R("failed to asynchronously prepare wasm: "+N),ie(N)})}function Le(S,g){var O=pe;return E||typeof WebAssembly.instantiateStreaming!="function"||ee(O)||O.startsWith("file://")||typeof fetch!="function"?Ie(O,S,g):fetch(O,{credentials:"same-origin"}).then(N=>WebAssembly.instantiateStreaming(N,S).then(g,function(q){return R("wasm streaming compile failed: "+q),R("falling back to ArrayBuffer instantiation"),Ie(O,S,g)}))}var ke=S=>{for(;0<S.length;)S.shift()(p)};function at(S){if(S===void 0)return"_unknown";S=S.replace(/[^a-zA-Z0-9_]/g,"$");var g=S.charCodeAt(0);return 48<=g&&57>=g?`_${S}`:S}function We(S,g){return S=at(S),{[S]:function(){return g.apply(this,arguments)}}[S]}function wt(){this.ja=[void 0],this.Oa=[]}var Xe=new wt,At=void 0;function $e(S){throw new At(S)}var Tt=S=>(S||$e("Cannot use deleted val. handle = "+S),Xe.get(S).value),Ge=S=>{switch(S){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Xe.Ya({Ta:1,value:S})}};function It(S){var g=Error,O=We(S,function(N){this.name=S,this.message=N,N=Error(N).stack,N!==void 0&&(this.stack=this.toString()+`
160
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 tt=void 0,Dt=void 0;function De(S){for(var g="";j[S];)g+=Dt[j[S++]];return g}var nt=[];function Zt(){for(;nt.length;){var S=nt.pop();S.W.na=!1,S.delete()}}var Lt=void 0,on={};function bn(S,g){for(g===void 0&&$e("ptr should not be undefined");S.$;)g=S.ra(g),S=S.$;return g}var ln={};function ve(S){S=Td(S);var g=De(S);return zn(S),g}function ze(S,g){var O=ln[S];return O===void 0&&$e(g+" has unknown type "+ve(S)),O}function St(){}var xt=!1;function Qt(S){--S.count.value,S.count.value===0&&(S.ca?S.fa.ka(S.ca):S.Z.X.ka(S.Y))}function Jt(S,g,O){return g===O?S:O.$===void 0?null:(S=Jt(S,g,O.$),S===null?null:O.jb(S))}var kn={};function an(S,g){return g=bn(S,g),on[g]}var Mn=void 0;function Rn(S){throw new Mn(S)}function en(S,g){return g.Z&&g.Y||Rn("makeClassHandle requires ptr and ptrType"),!!g.fa!=!!g.ca&&Rn("Both smartPtrType and smartPtr must be specified"),g.count={value:1},tn(Object.create(S,{W:{value:g}}))}function tn(S){return typeof FinalizationRegistry>"u"?(tn=g=>g,S):(xt=new FinalizationRegistry(g=>{Qt(g.W)}),tn=g=>{var O=g.W;return O.ca&&xt.register(g,{W:O},g),g},St=g=>{xt.unregister(g)},tn(S))}var nn={};function wn(S){for(;S.length;){var g=S.pop();S.pop()(g)}}function dn(S){return this.fromWireType(oe[S>>2])}var Wt={},nr={};function zt(S,g,O){function N(se){se=O(se),se.length!==S.length&&Rn("Mismatched type converter count");for(var de=0;de<S.length;++de)V(S[de],se[de])}S.forEach(function(se){nr[se]=g});var q=Array(g.length),te=[],ue=0;g.forEach((se,de)=>{ln.hasOwnProperty(se)?q[de]=ln[se]:(te.push(se),Wt.hasOwnProperty(se)||(Wt[se]=[]),Wt[se].push(()=>{q[de]=ln[se],++ue,ue===te.length&&N(q)}))}),te.length===0&&N(q)}function rr(S){switch(S){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${S}`)}}function _(S,g,O={}){var N=g.name;if(S||$e(`type "${N}" must have a positive integer typeid pointer`),ln.hasOwnProperty(S)){if(O.tb)return;$e(`Cannot register type '${N}' twice`)}ln[S]=g,delete nr[S],Wt.hasOwnProperty(S)&&(g=Wt[S],delete Wt[S],g.forEach(q=>q()))}function V(S,g,O={}){if(!("argPackAdvance"in g))throw new TypeError("registerType registeredInstance requires argPackAdvance");_(S,g,O)}function Q(S){$e(S.W.Z.X.name+" instance already deleted")}function fe(){}function Se(S,g,O){if(S[g].aa===void 0){var N=S[g];S[g]=function(){return S[g].aa.hasOwnProperty(arguments.length)||$e(`Function '${O}' called with an invalid number of arguments (${arguments.length}) - expects one of (${S[g].aa})!`),S[g].aa[arguments.length].apply(this,arguments)},S[g].aa=[],S[g].aa[N.ma]=N}}function Pe(S,g,O){p.hasOwnProperty(S)?((O===void 0||p[S].aa!==void 0&&p[S].aa[O]!==void 0)&&$e(`Cannot register public name '${S}' twice`),Se(p,S,S),p.hasOwnProperty(O)&&$e(`Cannot register multiple overloads of a function with the same number of arguments (${O})!`),p[S].aa[O]=g):(p[S]=g,O!==void 0&&(p[S].Hb=O))}function _e(S,g,O,N,q,te,ue,se){this.name=S,this.constructor=g,this.ga=O,this.ka=N,this.$=q,this.ob=te,this.ra=ue,this.jb=se,this.Ra=[]}function we(S,g,O){for(;g!==O;)g.ra||$e(`Expected null or instance of ${O.name}, got an instance of ${g.name}`),S=g.ra(S),g=g.$;return S}function ot(S,g){return g===null?(this.Aa&&$e(`null is not a valid ${this.name}`),0):(g.W||$e(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||$e(`Cannot pass deleted object as a pointer of type ${this.name}`),we(g.W.Y,g.W.Z.X,this.X))}function Fe(S,g){if(g===null){if(this.Aa&&$e(`null is not a valid ${this.name}`),this.ua){var O=this.Ba();return S!==null&&S.push(this.ka,O),O}return 0}if(g.W||$e(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||$e(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.ta&&g.W.Z.ta&&$e(`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&&$e("Passing raw pointer to smart pointer is illegal"),this.Fb){case 0:g.W.fa===this?O=g.W.ca:$e(`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,Ge(function(){N.delete()})),S!==null&&S.push(this.ka,O)}break;default:$e("Unsupporting sharing policy")}return O}function Be(S,g){return g===null?(this.Aa&&$e(`null is not a valid ${this.name}`),0):(g.W||$e(`Cannot pass "${js(g)}" as a ${this.name}`),g.W.Y||$e(`Cannot pass deleted object as a pointer of type ${this.name}`),g.W.Z.ta&&$e(`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 Ze(S,g,O,N){this.name=S,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=Fe:(this.toWireType=N?ot:Be,this.ea=null)}function Kt(S,g,O){p.hasOwnProperty(S)||Rn("Replacing nonexistant public symbol"),p[S].aa!==void 0&&O!==void 0?p[S].aa[O]=g:(p[S]=g,p[S].ma=O)}var Er=(S,g)=>{var O=[];return function(){if(O.length=0,Object.assign(O,arguments),S.includes("j")){var N=p["dynCall_"+S];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(S,g){S=De(S);var O=S.includes("j")?Er(S,g):K.get(g);return typeof O!="function"&&$e(`unknown function pointer with signature ${S}: ${g}`),O}var bd=void 0;function Wn(S,g){function O(te){q[te]||ln[te]||(nr[te]?nr[te].forEach(O):(N.push(te),q[te]=!0))}var N=[],q={};throw g.forEach(O),new bd(`${S}: `+N.map(ve).join([", "]))}function Ni(S,g,O,N,q){var te=g.length;2>te&&$e("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),Ce=[],Re=[];return function(){if(arguments.length!==le&&$e(`function ${S} called with ${arguments.length} arguments, expected ${le} args!`),Re.length=0,Ce.length=ue?2:1,Ce[0]=q,ue){var je=g[1].toWireType(Re,this);Ce[1]=je}for(var ye=0;ye<le;++ye)ge[ye]=g[ye+2].toWireType(Re,arguments[ye]),Ce.push(ge[ye]);if(ye=N.apply(null,Ce),se)wn(Re);else for(var Et=ue?1:2;Et<g.length;Et++){var Nt=Et===1?je:ge[Et-2];g[Et].ea!==null&&g[Et].ea(Nt)}return je=de?g[0].fromWireType(ye):void 0,je}}function ki(S,g){for(var O=[],N=0;N<S;N++)O.push(W[g+4*N>>2]);return O}function wd(S,g,O){return S instanceof Object||$e(`${O} with invalid "this": ${S}`),S instanceof g.X.constructor||$e(`${O} incompatible with "this" of type ${S.constructor.name}`),S.W.Y||$e(`cannot call emscripten binding method ${O} on deleted object`),we(S.W.Y,S.W.Z.X,g.X)}function Ms(S){S>=Xe.Ea&&--Xe.get(S).Ta===0&&Xe.Za(S)}function Ty(S,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?H:Y)[N>>1])};case 2:return function(N){return this.fromWireType((O?oe:W)[N>>2])};default:throw new TypeError("Unknown integer type: "+S)}}function js(S){if(S===null)return"null";var g=typeof S;return g==="object"||g==="array"||g==="function"?S.toString():""+S}function Iy(S,g){switch(g){case 2:return function(O){return this.fromWireType(L[O>>2])};case 3:return function(O){return this.fromWireType(J[O>>3])};default:throw new TypeError("Unknown float type: "+S)}}function Ry(S,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 H[N>>1]}:function(N){return Y[N>>1]};case 2:return O?function(N){return oe[N>>2]}:function(N){return W[N>>2]};default:throw new TypeError("Unknown integer type: "+S)}}var Ed=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,xd=(S,g,O)=>{var N=g+O;for(O=g;S[O]&&!(O>=N);)++O;if(16<O-g&&S.buffer&&Ed)return Ed.decode(S.subarray(g,O));for(N="";g<O;){var q=S[g++];if(q&128){var te=S[g++]&63;if((q&224)==192)N+=String.fromCharCode((q&31)<<6|te);else{var ue=S[g++]&63;q=(q&240)==224?(q&15)<<12|te<<6|ue:(q&7)<<18|te<<12|ue<<6|S[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},_d=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Oy=(S,g)=>{for(var O=S>>1,N=O+g/2;!(O>=N)&&Y[O];)++O;if(O<<=1,32<O-S&&_d)return _d.decode(j.subarray(S,O));for(O="",N=0;!(N>=g/2);++N){var q=H[S+2*N>>1];if(q==0)break;O+=String.fromCharCode(q)}return O},Py=(S,g,O)=>{if(O===void 0&&(O=2147483647),2>O)return 0;O-=2;var N=g;O=O<2*S.length?O/2:S.length;for(var q=0;q<O;++q)H[g>>1]=S.charCodeAt(q),g+=2;return H[g>>1]=0,g-N},Ay=S=>2*S.length,Dy=(S,g)=>{for(var O=0,N="";!(O>=g/4);){var q=oe[S+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=(S,g,O)=>{if(O===void 0&&(O=2147483647),4>O)return 0;var N=g;O=N+O-4;for(var q=0;q<S.length;++q){var te=S.charCodeAt(q);if(55296<=te&&57343>=te){var ue=S.charCodeAt(++q);te=65536+((te&1023)<<10)|ue&1023}if(oe[g>>2]=te,g+=4,g+4>O)break}return oe[g>>2]=0,g-N},ky=S=>{for(var g=0,O=0;O<S.length;++O){var N=S.charCodeAt(O);55296<=N&&57343>=N&&++O,g+=4}return g},My={};function Mi(S){var g=My[S];return g===void 0?De(S):g}var ji=[];function jy(S){var g=ji.length;return ji.push(S),g}function Ly(S,g){for(var O=Array(S),N=0;N<S;++N)O[N]=ze(W[g+4*N>>2],"parameter "+N);return O}var Sd=[],Ls={},Cd=()=>{if(!Fs){var S={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",_:T||"./this.program"},g;for(g in Ls)Ls[g]===void 0?delete S[g]:S[g]=Ls[g];var O=[];for(g in S)O.push(`${g}=${S[g]}`);Fs=O}return Fs},Fs,Fy=[null,[],[]];Object.assign(wt.prototype,{get(S){return this.ja[S]},has(S){return this.ja[S]!==void 0},Ya(S){var g=this.Oa.pop()||this.ja.length;return this.ja[g]=S,g},Za(S){this.ja[S]=void 0,this.Oa.push(S)}}),At=p.BindingError=class extends Error{constructor(S){super(S),this.name="BindingError"}},Xe.ja.push({value:void 0},{value:null},{value:!0},{value:!1}),Xe.Ea=Xe.ja.length,p.count_emval_handles=function(){for(var S=0,g=Xe.Ea;g<Xe.ja.length;++g)Xe.ja[g]!==void 0&&++S;return S},tt=p.PureVirtualError=It("PureVirtualError");for(var $d=Array(256),Li=0;256>Li;++Li)$d[Li]=String.fromCharCode(Li);Dt=$d,p.getInheritedInstanceCount=function(){return Object.keys(on).length},p.getLiveInheritedInstances=function(){var S=[],g;for(g in on)on.hasOwnProperty(g)&&S.push(on[g]);return S},p.flushPendingDeletes=Zt,p.setDelayFunction=function(S){Lt=S,nt.length&&Lt&&Lt(Zt)},Mn=p.InternalError=class extends Error{constructor(S){super(S),this.name="InternalError"}},fe.prototype.isAliasOf=function(S){if(!(this instanceof fe&&S instanceof fe))return!1;var g=this.W.Z.X,O=this.W.Y,N=S.W.Z.X;for(S=S.W.Y;g.$;)O=g.ra(O),g=g.$;for(;N.$;)S=N.ra(S),N=N.$;return g===N&&O===S},fe.prototype.clone=function(){if(this.W.Y||Q(this),this.W.pa)return this.W.count.value+=1,this;var S=tn,g=Object,O=g.create,N=Object.getPrototypeOf(this),q=this.W;return S=S(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}}})),S.W.count.value+=1,S.W.na=!1,S},fe.prototype.delete=function(){this.W.Y||Q(this),this.W.na&&!this.W.pa&&$e("Object already scheduled for deletion"),St(this),Qt(this.W),this.W.pa||(this.W.ca=void 0,this.W.Y=void 0)},fe.prototype.isDeleted=function(){return!this.W.Y},fe.prototype.deleteLater=function(){return this.W.Y||Q(this),this.W.na&&!this.W.pa&&$e("Object already scheduled for deletion"),nt.push(this),nt.length===1&&Lt&&Lt(Zt),this.W.na=!0,this},Ze.prototype.pb=function(S){return this.Sa&&(S=this.Sa(S)),S},Ze.prototype.Ka=function(S){this.ka&&this.ka(S)},Ze.prototype.argPackAdvance=8,Ze.prototype.readValueFromPointer=dn,Ze.prototype.deleteObject=function(S){S!==null&&S.delete()},Ze.prototype.fromWireType=function(S){function g(){return this.ua?en(this.X.ga,{Z:this.Ab,Y:O,fa:this,ca:S}):en(this.X.ga,{Z:this,Y:S})}var O=this.pb(S);if(!O)return this.Ka(S),null;var N=an(this.X,O);if(N!==void 0)return N.W.count.value===0?(N.W.Y=O,N.W.ca=S,N.clone()):(N=N.clone(),this.Ka(S),N);if(N=this.X.ob(O),N=kn[N],!N)return g.call(this);N=this.ta?N.fb:N.pointerType;var q=Jt(O,this.X,N.X);return q===null?g.call(this):this.ua?en(N.X.ga,{Z:N,Y:q,fa:this,ca:S}):en(N.X.ga,{Z:N,Y:q})},bd=p.UnboundTypeError=It("UnboundTypeError");var Vy={I:function(S,g,O){S=De(S),g=ze(g,"wrapper"),O=Tt(O);var N=[].slice,q=g.X,te=q.ga,ue=q.$.ga,se=q.$.constructor;S=We(S,function(){q.$.Ra.forEach((function(le){if(this[le]===ue[le])throw new tt(`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&&$e("Pass correct 'this' to __construct");var le=se.implement.apply(void 0,[this].concat(N.call(arguments)));St(le);var ge=le.W;le.notifyOnDestruction(),ge.pa=!0,Object.defineProperties(this,{W:{value:ge}}),tn(this),le=ge.Y,le=bn(q,le),on.hasOwnProperty(le)?$e(`Tried to register registered instance: ${le}`):on[le]=this},te.__destruct=function(){this===te&&$e("Pass correct 'this' to __destruct"),St(this);var le=this.W.Y;le=bn(q,le),on.hasOwnProperty(le)?delete on[le]:$e(`Tried to unregister unregistered instance: ${le}`)},S.prototype=Object.create(te);for(var de in O)S.prototype[de]=O[de];return Ge(S)},L:function(S){var g=nn[S];delete nn[S];var O=g.Ba,N=g.ka,q=g.Na,te=q.map(ue=>ue.sb).concat(q.map(ue=>ue.Db));zt([S],te,ue=>{var se={};return q.forEach((de,le)=>{var ge=ue[le],Ce=de.qb,Re=de.rb,je=ue[le+q.length],ye=de.Cb,Et=de.Eb;se[de.mb]={read:Nt=>ge.fromWireType(Ce(Re,Nt)),write:(Nt,Ve)=>{var Ye=[];ye(Et,Nt,je.toWireType(Ye,Ve)),wn(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 Ce=O();for(ge in se)se[ge].write(Ce,le[ge]);return de!==null&&de.push(N,Ce),Ce},argPackAdvance:8,readValueFromPointer:dn,ea:N}]})},z:function(){},G:function(S,g,O,N,q){var te=rr(O);g=De(g),V(S,{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=H;else if(O===4)se=oe;else throw new TypeError("Unknown boolean type size: "+g);return this.fromWireType(se[ue>>te])},ea:null})},e:function(S,g,O,N,q,te,ue,se,de,le,ge,Ce,Re){ge=De(ge),te=qe(q,te),se&&(se=qe(ue,se)),le&&(le=qe(de,le)),Re=qe(Ce,Re);var je=at(ge);Pe(je,function(){Wn(`Cannot construct ${ge} due to unbound types`,[N])}),zt([S,g,O],N?[N]:[],function(ye){if(ye=ye[0],N)var Et=ye.X,Nt=Et.ga;else Nt=fe.prototype;ye=We(je,function(){if(Object.getPrototypeOf(this)!==Ve)throw new At("Use 'new' to construct "+ge);if(Ye.la===void 0)throw new At(ge+" has no accessible constructor");var fn=Ye.la[arguments.length];if(fn===void 0)throw new At(`Tried to invoke ctor of ${ge} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(Ye.la).toString()}) parameters instead!`);return fn.apply(this,arguments)});var Ve=Object.create(Nt,{constructor:{value:ye}});ye.prototype=Ve;var Ye=new _e(ge,ye,Ve,Re,Et,te,se,le);Ye.$&&(Ye.$.sa===void 0&&(Ye.$.sa=[]),Ye.$.sa.push(Ye)),Et=new Ze(ge,Ye,!0,!1),Nt=new Ze(ge+"*",Ye,!1,!1);var kt=new Ze(ge+" const*",Ye,!1,!0);return kn[S]={pointerType:Nt,fb:kt},Kt(je,ye),[Et,Nt,kt]})},k:function(S,g,O,N,q,te,ue){var se=ki(O,N);g=De(g),te=qe(q,te),zt([],[S],function(de){function le(){Wn(`Cannot call ${ge} due to unbound types`,se)}de=de[0];var ge=`${de.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]);var Ce=de.X.constructor;return Ce[g]===void 0?(le.ma=O-1,Ce[g]=le):(Se(Ce,g,ge),Ce[g].aa[O-1]=le),zt([],se,function(Re){if(Re=Ni(ge,[Re[0],null].concat(Re.slice(1)),null,te,ue),Ce[g].aa===void 0?(Re.ma=O-1,Ce[g]=Re):Ce[g].aa[O-1]=Re,de.X.sa)for(const je of de.X.sa)je.constructor.hasOwnProperty(g)||(je.constructor[g]=Re);return[]}),[]})},s:function(S,g,O,N,q,te,ue,se){g=De(g),te=qe(q,te),zt([],[S],function(de){de=de[0];var le=`${de.name}.${g}`,ge={get(){Wn(`Cannot access ${le} due to unbound types`,[O])},enumerable:!0,configurable:!0};return ge.set=se?()=>{Wn(`Cannot access ${le} due to unbound types`,[O])}:()=>{$e(`${le} is a read-only property`)},Object.defineProperty(de.X.constructor,g,ge),zt([],[O],function(Ce){Ce=Ce[0];var Re={get(){return Ce.fromWireType(te(N))},enumerable:!0};return se&&(se=qe(ue,se),Re.set=je=>{var ye=[];se(N,Ce.toWireType(ye,je)),wn(ye)}),Object.defineProperty(de.X.constructor,g,Re),[]}),[]})},o:function(S,g,O,N,q,te){var ue=ki(g,O);q=qe(N,q),zt([],[S],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 At(`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]=()=>{Wn(`Cannot construct ${se.name} due to unbound types`,ue)},zt([],ue,function(le){return le.splice(1,0,null),se.X.la[g-1]=Ni(de,le,null,q,te),[]}),[]})},a:function(S,g,O,N,q,te,ue,se){var de=ki(O,N);g=De(g),te=qe(q,te),zt([],[S],function(le){function ge(){Wn(`Cannot call ${Ce} due to unbound types`,de)}le=le[0];var Ce=`${le.name}.${g}`;g.startsWith("@@")&&(g=Symbol[g.substring(2)]),se&&le.X.Ra.push(g);var Re=le.X.ga,je=Re[g];return je===void 0||je.aa===void 0&&je.className!==le.name&&je.ma===O-2?(ge.ma=O-2,ge.className=le.name,Re[g]=ge):(Se(Re,g,Ce),Re[g].aa[O-2]=ge),zt([],de,function(ye){return ye=Ni(Ce,ye,le,te,ue),Re[g].aa===void 0?(ye.ma=O-2,Re[g]=ye):Re[g].aa[O-2]=ye,[]}),[]})},d:function(S,g,O,N,q,te,ue,se,de,le){g=De(g),q=qe(N,q),zt([],[S],function(ge){ge=ge[0];var Ce=`${ge.name}.${g}`,Re={get(){Wn(`Cannot access ${Ce} due to unbound types`,[O,ue])},enumerable:!0,configurable:!0};return Re.set=de?()=>{Wn(`Cannot access ${Ce} due to unbound types`,[O,ue])}:()=>{$e(Ce+" is a read-only property")},Object.defineProperty(ge.X.ga,g,Re),zt([],de?[O,ue]:[O],function(je){var ye=je[0],Et={get(){var Ve=wd(this,ge,Ce+" getter");return ye.fromWireType(q(te,Ve))},enumerable:!0};if(de){de=qe(se,de);var Nt=je[1];Et.set=function(Ve){var Ye=wd(this,ge,Ce+" setter"),kt=[];de(le,Ye,Nt.toWireType(kt,Ve)),wn(kt)}}return Object.defineProperty(ge.X.ga,g,Et),[]}),[]})},F:function(S,g){g=De(g),V(S,{name:g,fromWireType:function(O){var N=Tt(O);return Ms(O),N},toWireType:function(O,N){return Ge(N)},argPackAdvance:8,readValueFromPointer:dn,ea:null})},l:function(S,g,O,N){function q(){}O=rr(O),g=De(g),q.values={},V(S,{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}),Pe(g,q)},c:function(S,g,O){var N=ze(S,"enum");g=De(g),S=N.constructor,N=Object.create(N.constructor.prototype,{value:{value:O},constructor:{value:We(`${N.name}_${g}`,function(){})}}),S.values[O]=N,S[g]=N},u:function(S,g,O){O=rr(O),g=De(g),V(S,{name:g,fromWireType:function(N){return N},toWireType:function(N,q){return q},argPackAdvance:8,readValueFromPointer:Iy(g,O),ea:null})},q:function(S,g,O,N,q,te){var ue=ki(g,O);S=De(S),q=qe(N,q),Pe(S,function(){Wn(`Cannot call ${S} due to unbound types`,ue)},g-1),zt([],ue,function(se){return Kt(S,Ni(S,[se[0],null].concat(se.slice(1)),null,q,te),g-1),[]})},j:function(S,g,O,N,q){g=De(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(S,{name:g,fromWireType:te,toWireType:O,argPackAdvance:8,readValueFromPointer:Ry(g,q,N!==0),ea:null})},g:function(S,g,O){function N(te){te>>=2;var ue=W;return new q(ue.buffer,ue[te+1],ue[te])}var q=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][g];O=De(O),V(S,{name:O,fromWireType:N,argPackAdvance:8,readValueFromPointer:N},{tb:!0})},v:function(S,g){g=De(g);var O=g==="std::string";V(S,{name:g,fromWireType:function(N){var q=W[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?xd(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 zn(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||$e("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,W[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 Ce=q.charCodeAt(++le);ge=65536+((ge&1023)<<10)|Ce&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&&(zn(de),$e("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(zn,se),se},argPackAdvance:8,readValueFromPointer:dn,ea:function(N){zn(N)}})},t:function(S,g,O){if(O=De(O),g===2)var N=Oy,q=Py,te=Ay,ue=()=>Y,se=1;else g===4&&(N=Dy,q=Ny,te=ky,ue=()=>W,se=2);V(S,{name:O,fromWireType:function(de){for(var le=W[de>>2],ge=ue(),Ce,Re=de+4,je=0;je<=le;++je){var ye=de+4+je*g;(je==le||ge[ye>>se]==0)&&(Re=N(Re,ye-Re),Ce===void 0?Ce=Re:(Ce+=String.fromCharCode(0),Ce+=Re),Re=ye+g)}return zn(de),Ce},toWireType:function(de,le){typeof le!="string"&&$e(`Cannot pass non-string to C++ string type ${O}`);var ge=te(le),Ce=Vs(4+ge+g);return W[Ce>>2]=ge>>se,q(le,Ce+4,ge+g),de!==null&&de.push(zn,Ce),Ce},argPackAdvance:8,readValueFromPointer:dn,ea:function(de){zn(de)}})},N:function(S,g,O,N,q,te){nn[S]={name:De(g),Ba:qe(O,N),ka:qe(q,te),Na:[]}},M:function(S,g,O,N,q,te,ue,se,de,le){nn[S].Na.push({mb:De(g),sb:O,qb:qe(N,q),rb:te,Db:ue,Cb:qe(se,de),Eb:le})},H:function(S,g){g=De(g),V(S,{vb:!0,name:g,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},r:function(S,g,O){S=Tt(S),g=ze(g,"emval::as");var N=[],q=Ge(N);return W[O>>2]=q,g.toWireType(N,S)},w:function(S,g,O,N,q){S=ji[S],g=Tt(g),O=Mi(O);var te=[];return W[N>>2]=Ge(te),S(g,O,te,q)},i:function(S,g,O,N){S=ji[S],g=Tt(g),O=Mi(O),S(g,O,null,N)},f:Ms,h:function(S,g){var O=Ly(S,g),N=O[0];g=N.name+"_$"+O.slice(1).map(function(ue){return ue.name}).join("_")+"$";var q=Sd[g];if(q!==void 0)return q;var te=Array(S-1);return q=jy((ue,se,de,le)=>{for(var ge=0,Ce=0;Ce<S-1;++Ce)te[Ce]=O[Ce+1].readValueFromPointer(le+ge),ge+=O[Ce+1].argPackAdvance;for(ue=ue[se].apply(ue,te),Ce=0;Ce<S-1;++Ce)O[Ce+1].hb&&O[Ce+1].hb(te[Ce]);if(!N.vb)return N.toWireType(de,ue)}),Sd[g]=q},p:function(S){return S=Mi(S),Ge(p[S])},K:function(S,g){return S=Tt(S),g=Tt(g),Ge(S[g])},m:function(S){4<S&&(Xe.get(S).Ta+=1)},J:function(S){return Ge(Mi(S))},n:function(S){var g=Tt(S);wn(g),Ms(S)},x:function(S,g){return S=ze(S,"_emval_take_value"),S=S.readValueFromPointer(g),Ge(S)},b:()=>{ie("")},A:S=>{var g=j.length;if(S>>>=0,2147483648<S)return!1;for(var O=1;4>=O;O*=2){var N=g*(1+.2/O);N=Math.min(N,S+100663296);var q=Math;N=Math.max(S,N);e:{q=q.min.call(q,2147483648,N+(65536-N%65536)%65536)-h.buffer.byteLength+65535>>>16;try{h.grow(q),U();var te=1;break e}catch{}te=void 0}if(te)return!0}return!1},B:(S,g)=>{var O=0;return Cd().forEach(function(N,q){var te=g+O;for(q=W[S+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:(S,g)=>{var O=Cd();W[S>>2]=O.length;var N=0;return O.forEach(function(q){N+=q.length+1}),W[g>>2]=N,0},D:()=>52,y:function(){return 70},E:(S,g,O,N)=>{for(var q=0,te=0;te<O;te++){var ue=W[g>>2],se=W[g+4>>2];g+=8;for(var de=0;de<se;de++){var le=j[ue+de],ge=Fy[S];le===0||le===10?((S===1?B:R)(xd(ge,0)),ge.length=0):ge.push(le)}q+=se}return W[N>>2]=q,0}};(function(){function S(O){if(O=O.exports,p.asm=O,h=p.asm.O,U(),K=p.asm.U,ce.unshift(p.asm.P),re--,p.monitorRunDependencies&&p.monitorRunDependencies(re),re==0&&ne){var N=ne;ne=null,N()}return O}var g={a:Vy};if(re++,p.monitorRunDependencies&&p.monitorRunDependencies(re),p.instantiateWasm)try{return p.instantiateWasm(g,S)}catch(O){R("Module.instantiateWasm callback failed with error: "+O),y(O)}return Le(g,function(O){S(O.instance)}).catch(y),{}})();function zn(){return(zn=p.asm.Q).apply(null,arguments)}function Vs(){return(Vs=p.asm.R).apply(null,arguments)}function Td(){return(Td=p.asm.S).apply(null,arguments)}p.__embind_initialize_bindings=function(){return(p.__embind_initialize_bindings=p.asm.T).apply(null,arguments)},p.dynCall_jiji=function(){return(p.dynCall_jiji=p.asm.V).apply(null,arguments)};var Fi;ne=function S(){Fi||Id(),Fi||(ne=S)};function Id(){function S(){if(!Fi&&(Fi=!0,p.calledRun=!0,!C)){if(ke(ce),b(p),p.onRuntimeInitialized&&p.onRuntimeInitialized(),p.postRun)for(typeof p.postRun=="function"&&(p.postRun=[p.postRun]);p.postRun.length;){var g=p.postRun.shift();z.unshift(g)}ke(z)}}if(!(0<re)){if(p.preRun)for(typeof p.preRun=="function"&&(p.preRun=[p.preRun]);p.preRun.length;)G();ke(Z),0<re||(p.setStatus?(p.setStatus("Running..."),setTimeout(function(){setTimeout(function(){p.setStatus("")},1),S()},1)):S())}}if(p.preInit)for(typeof p.preInit=="function"&&(p.preInit=[p.preInit]);0<p.preInit.length;)p.preInit.pop()();return Id(),m.ready}})();const f=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:()=>d});var u=void 0,f=function(m){var p,b;return["touchstart","touchmove"].indexOf(m.type)>-1&&(!((p=m.touches)===null||p===void 0)&&p.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}},d=function(m){var p=m.canvas,b=m.artboard,y=m.stateMachines,$=y===void 0?[]:y,x=m.renderer,v=m.rive,w=m.fit,T=m.alignment;if(!p||!$.length||!x||!v||!b||typeof window>"u")return null;var I=function(A){var F=A.currentTarget.getBoundingClientRect(),k=f(A),B=k.clientX,R=k.clientY;if(!(!B&&!R)){var E=B-F.left,h=R-F.top,C=v.computeAlignment(w,T,{minX:0,minY:0,maxX:F.width,maxY:F.height},b.bounds),P=new v.Mat2D;C.invert(P);var j=new v.Vec2D(E,h),H=v.mapXY(P,j),Y=H.x(),oe=H.y();switch(H.delete(),P.delete(),j.delete(),C.delete(),A.type){case"touchmove":case"mouseover":case"mouseout":case"mousemove":{for(var W=0,L=$;W<L.length;W++){var J=L[W];J.pointerMove(Y,oe)}break}case"touchstart":case"mousedown":{for(var U=0,K=$;U<K.length;U++){var J=K[U];J.pointerDown(Y,oe)}break}case"touchend":case"mouseup":{for(var Z=0,ce=$;Z<ce.length;Z++){var J=ce[Z];J.pointerUp(Y,oe)}break}}}},D=I.bind(u);return p.addEventListener("mouseover",D),p.addEventListener("mouseout",D),p.addEventListener("mousemove",D),p.addEventListener("mousedown",D),p.addEventListener("mouseup",D),p.addEventListener("touchmove",D),p.addEventListener("touchstart",D),p.addEventListener("touchend",D),function(){p.removeEventListener("mouseover",D),p.removeEventListener("mouseout",D),p.removeEventListener("mousemove",D),p.removeEventListener("mousedown",D),p.removeEventListener("mouseup",D),p.removeEventListener("touchmove",D),p.removeEventListener("touchstart",D),p.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:()=>T,Fit:()=>d,Layout:()=>p,LoopType:()=>I,Rive:()=>F,RuntimeLoader:()=>b,StateMachineInput:()=>x,StateMachineInputType:()=>$,Testing:()=>R});var a=o(1),s=o(2),c=o(3),u=function(E,h,C,P){function j(H){return H instanceof C?H:new C(function(Y){Y(H)})}return new(C||(C=Promise))(function(H,Y){function oe(J){try{L(P.next(J))}catch(U){Y(U)}}function W(J){try{L(P.throw(J))}catch(U){Y(U)}}function L(J){J.done?H(J.value):j(J.value).then(oe,W)}L((P=P.apply(E,h||[])).next())})},f=function(E,h){var C={label:0,sent:function(){if(H[0]&1)throw H[1];return H[1]},trys:[],ops:[]},P,j,H,Y;return Y={next:oe(0),throw:oe(1),return:oe(2)},typeof Symbol=="function"&&(Y[Symbol.iterator]=function(){return this}),Y;function oe(L){return function(J){return W([L,J])}}function W(L){if(P)throw new TypeError("Generator is already executing.");for(;Y&&(Y=0,L[0]&&(C=0)),C;)try{if(P=1,j&&(H=L[0]&2?j.return:L[0]?j.throw||((H=j.return)&&H.call(j),0):j.next)&&!(H=H.call(j,L[1])).done)return H;switch(j=0,H&&(L=[L[0]&2,H.value]),L[0]){case 0:case 1:H=L;break;case 4:return C.label++,{value:L[1],done:!1};case 5:C.label++,j=L[1],L=[0];continue;case 7:L=C.ops.pop(),C.trys.pop();continue;default:if(H=C.trys,!(H=H.length>0&&H[H.length-1])&&(L[0]===6||L[0]===2)){C=0;continue}if(L[0]===3&&(!H||L[1]>H[0]&&L[1]<H[3])){C.label=L[1];break}if(L[0]===6&&C.label<H[1]){C.label=H[1],H=L;break}if(H&&C.label<H[2]){C.label=H[2],C.ops.push(L);break}H[2]&&C.ops.pop(),C.trys.pop();continue}L=h.call(E,C)}catch(J){L=[6,J],j=0}finally{P=H=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}},d;(function(E){E.Cover="cover",E.Contain="contain",E.Fill="fill",E.FitWidth="fitWidth",E.FitHeight="fitHeight",E.None="none",E.ScaleDown="scaleDown"})(d||(d={}));var m;(function(E){E.Center="center",E.TopLeft="topLeft",E.TopCenter="topCenter",E.TopRight="topRight",E.CenterLeft="centerLeft",E.CenterRight="centerRight",E.BottomLeft="bottomLeft",E.BottomCenter="bottomCenter",E.BottomRight="bottomRight"})(m||(m={}));var p=function(){function E(h){var C,P,j,H,Y,oe;this.fit=(C=h==null?void 0:h.fit)!==null&&C!==void 0?C:d.Contain,this.alignment=(P=h==null?void 0:h.alignment)!==null&&P!==void 0?P:m.Center,this.minX=(j=h==null?void 0:h.minX)!==null&&j!==void 0?j:0,this.minY=(H=h==null?void 0:h.minY)!==null&&H!==void 0?H:0,this.maxX=(Y=h==null?void 0:h.maxX)!==null&&Y!==void 0?Y:0,this.maxY=(oe=h==null?void 0:h.maxY)!==null&&oe!==void 0?oe:0}return E.new=function(h){var C=h.fit,P=h.alignment,j=h.minX,H=h.minY,Y=h.maxX,oe=h.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new E({fit:C,alignment:P,minX:j,minY:H,maxX:Y,maxY:oe})},E.prototype.copyWith=function(h){var C=h.fit,P=h.alignment,j=h.minX,H=h.minY,Y=h.maxX,oe=h.maxY;return new E({fit:C??this.fit,alignment:P??this.alignment,minX:j??this.minX,minY:H??this.minY,maxX:Y??this.maxX,maxY:oe??this.maxY})},E.prototype.runtimeFit=function(h){if(this.cachedRuntimeFit)return this.cachedRuntimeFit;var C;return this.fit===d.Cover?C=h.Fit.cover:this.fit===d.Contain?C=h.Fit.contain:this.fit===d.Fill?C=h.Fit.fill:this.fit===d.FitWidth?C=h.Fit.fitWidth:this.fit===d.FitHeight?C=h.Fit.fitHeight:this.fit===d.ScaleDown?C=h.Fit.scaleDown:C=h.Fit.none,this.cachedRuntimeFit=C,C},E.prototype.runtimeAlignment=function(h){if(this.cachedRuntimeAlignment)return this.cachedRuntimeAlignment;var C;return this.alignment===m.TopLeft?C=h.Alignment.topLeft:this.alignment===m.TopCenter?C=h.Alignment.topCenter:this.alignment===m.TopRight?C=h.Alignment.topRight:this.alignment===m.CenterLeft?C=h.Alignment.centerLeft:this.alignment===m.CenterRight?C=h.Alignment.centerRight:this.alignment===m.BottomLeft?C=h.Alignment.bottomLeft:this.alignment===m.BottomCenter?C=h.Alignment.bottomCenter:this.alignment===m.BottomRight?C=h.Alignment.bottomRight:C=h.Alignment.center,this.cachedRuntimeAlignment=C,C},E}(),b=function(){function E(){}return E.loadRuntime=function(){a.default({locateFile:function(){return E.wasmURL}}).then(function(h){var C;for(E.runtime=h;E.callBackQueue.length>0;)(C=E.callBackQueue.shift())===null||C===void 0||C(E.runtime)})},E.getInstance=function(h){E.isLoading||(E.isLoading=!0,E.loadRuntime()),E.runtime?h(E.runtime):E.callBackQueue.push(h)},E.awaitInstance=function(){return new Promise(function(h){return E.getInstance(function(C){return h(C)})})},E.setWasmUrl=function(h){E.wasmURL=h},E.isLoading=!1,E.callBackQueue=[],E.wasmURL="https://unpkg.com/".concat(s.name,"@").concat(s.version,"/rive.wasm"),E}(),y=function(){function E(h,C,P,j){this.animation=h,this.artboard=C,this.playing=j,this.loopCount=0,this.scrubTo=null,this.instance=new P.LinearAnimationInstance(h,C)}return Object.defineProperty(E.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"time",{get:function(){return this.instance.time},set:function(h){this.instance.time=h},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),E.prototype.advance=function(h){this.scrubTo===null?this.instance.advance(h):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},E.prototype.apply=function(h){this.instance.apply(h)},Object.defineProperty(E.prototype,"needsScrub",{get:function(){return this.scrubTo!==null},enumerable:!1,configurable:!0}),E.prototype.cleanup=function(){this.instance.delete()},E}(),$;(function(E){E[E.Number=56]="Number",E[E.Trigger=58]="Trigger",E[E.Boolean=59]="Boolean"})($||($={}));var x=function(){function E(h,C){this.type=h,this.runtimeInput=C}return Object.defineProperty(E.prototype,"name",{get:function(){return this.runtimeInput.name},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(h){this.runtimeInput.value=h},enumerable:!1,configurable:!0}),E.prototype.fire=function(){this.type===$.Trigger&&this.runtimeInput.fire()},E}(),v=function(){function E(h,C,P,j){this.stateMachine=h,this.playing=P,this.artboard=j,this.inputs=[],this.instance=new C.StateMachineInstance(h,j),this.initInputs(C)}return Object.defineProperty(E.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"statesChanged",{get:function(){for(var h=[],C=0;C<this.instance.stateChangedCount();C++)h.push(this.instance.stateChangedNameByIndex(C));return h},enumerable:!1,configurable:!0}),E.prototype.advance=function(h){this.instance.advance(h)},E.prototype.initInputs=function(h){for(var C=0;C<this.instance.inputCount();C++){var P=this.instance.input(C);this.inputs.push(this.mapRuntimeInput(P,h))}},E.prototype.mapRuntimeInput=function(h,C){if(h.type===C.SMIInput.bool)return new x($.Boolean,h.asBool());if(h.type===C.SMIInput.number)return new x($.Number,h.asNumber());if(h.type===C.SMIInput.trigger)return new x($.Trigger,h.asTrigger())},E.prototype.cleanup=function(){this.instance.delete()},E}(),w=function(){function E(h,C,P,j,H){j===void 0&&(j=[]),H===void 0&&(H=[]),this.runtime=h,this.artboard=C,this.eventManager=P,this.animations=j,this.stateMachines=H}return E.prototype.add=function(h,C,P){if(P===void 0&&(P=!0),h=B(h),h.length===0)this.animations.forEach(function(Z){return Z.playing=C}),this.stateMachines.forEach(function(Z){return Z.playing=C});else for(var j=this.animations.map(function(Z){return Z.name}),H=this.stateMachines.map(function(Z){return Z.name}),Y=0;Y<h.length;Y++){var oe=j.indexOf(h[Y]),W=H.indexOf(h[Y]);if(oe>=0||W>=0)oe>=0?this.animations[oe].playing=C:this.stateMachines[W].playing=C;else{var L=this.artboard.animationByName(h[Y]);if(L){var J=new y(L,this.artboard,this.runtime,C);J.advance(0),J.apply(1),this.animations.push(J)}else{var U=this.artboard.stateMachineByName(h[Y]);if(U){var K=new v(U,this.runtime,C,this.artboard);this.stateMachines.push(K)}}}}return P&&(C?this.eventManager.fire({type:T.Play,data:this.playing}):this.eventManager.fire({type:T.Pause,data:this.paused})),C?this.playing:this.paused},E.prototype.play=function(h){return this.add(h,!0)},E.prototype.pause=function(h){return this.add(h,!1)},E.prototype.scrub=function(h,C){var P=this.animations.filter(function(j){return h.includes(j.name)});return P.forEach(function(j){return j.scrubTo=C}),P.map(function(j){return j.name})},Object.defineProperty(E.prototype,"playing",{get:function(){return this.animations.filter(function(h){return h.playing}).map(function(h){return h.name}).concat(this.stateMachines.filter(function(h){return h.playing}).map(function(h){return h.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"paused",{get:function(){return this.animations.filter(function(h){return!h.playing}).map(function(h){return h.name}).concat(this.stateMachines.filter(function(h){return!h.playing}).map(function(h){return h.name}))},enumerable:!1,configurable:!0}),E.prototype.stop=function(h){var C=this;h=B(h);var P=[];if(h.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 h.includes(Y.name)});j.forEach(function(Y){Y.cleanup(),C.animations.splice(C.animations.indexOf(Y),1)});var H=this.stateMachines.filter(function(Y){return h.includes(Y.name)});H.forEach(function(Y){Y.cleanup(),C.stateMachines.splice(C.stateMachines.indexOf(Y),1)}),P=j.map(function(Y){return Y.name}).concat(H.map(function(Y){return Y.name}))}return this.eventManager.fire({type:T.Stop,data:P}),P},Object.defineProperty(E.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(h,C){return h||C.playing},!1)||this.stateMachines.reduce(function(h,C){return h||C.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isStopped",{get:function(){return this.animations.length===0&&this.stateMachines.length===0},enumerable:!1,configurable:!0}),E.prototype.atLeastOne=function(h,C){C===void 0&&(C=!0);var P;return this.animations.length===0&&this.stateMachines.length===0&&(this.artboard.animationCount()>0?this.add([P=this.artboard.animationByIndex(0).name],h,C):this.artboard.stateMachineCount()>0&&this.add([P=this.artboard.stateMachineByIndex(0).name],h,C)),P},E.prototype.handleLooping=function(){for(var h=0,C=this.animations.filter(function(j){return j.playing});h<C.length;h++){var P=C[h];P.loopValue===0&&P.loopCount?(P.loopCount=0,this.stop(P.name)):P.loopValue===1&&P.loopCount?(this.eventManager.fire({type:T.Loop,data:{animation:P.name,type:I.Loop}}),P.loopCount=0):P.loopValue===2&&P.loopCount>1&&(this.eventManager.fire({type:T.Loop,data:{animation:P.name,type:I.PingPong}}),P.loopCount=0)}},E.prototype.handleStateChanges=function(){for(var h=[],C=0,P=this.stateMachines.filter(function(H){return H.playing});C<P.length;C++){var j=P[C];h.push.apply(h,j.statesChanged)}h.length>0&&this.eventManager.fire({type:T.StateChange,data:h})},E.prototype.handleAdvancing=function(h){this.eventManager.fire({type:T.Advance,data:h})},E}(),T;(function(E){E.Load="load",E.LoadError="loaderror",E.Play="play",E.Pause="pause",E.Stop="stop",E.Loop="loop",E.Draw="draw",E.Advance="advance",E.StateChange="statechange"})(T||(T={}));var I;(function(E){E.OneShot="oneshot",E.Loop="loop",E.PingPong="pingpong"})(I||(I={}));var D=function(){function E(h){h===void 0&&(h=[]),this.listeners=h}return E.prototype.getListeners=function(h){return this.listeners.filter(function(C){return C.type===h})},E.prototype.add=function(h){this.listeners.includes(h)||this.listeners.push(h)},E.prototype.remove=function(h){for(var C=0;C<this.listeners.length;C++){var P=this.listeners[C];if(P.type===h.type&&P.callback===h.callback){this.listeners.splice(C,1);break}}},E.prototype.removeAll=function(h){var C=this;h?this.listeners.filter(function(P){return P.type===h}).forEach(function(P){return C.remove(P)}):this.listeners.splice(0,this.listeners.length)},E.prototype.fire=function(h){var C=this.getListeners(h.type);C.forEach(function(P){return P.callback(h)})},E}(),A=function(){function E(h){this.eventManager=h,this.queue=[]}return E.prototype.add=function(h){this.queue.push(h)},E.prototype.process=function(){for(;this.queue.length>0;){var h=this.queue.shift();h!=null&&h.action&&h.action(),h!=null&&h.event&&this.eventManager.fire(h.event)}},E}(),F=function(){function E(h){var C;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=h.canvas,this.src=h.src,this.buffer=h.buffer,this.layout=(C=h.layout)!==null&&C!==void 0?C:new p,this.shouldDisableRiveListeners=!!h.shouldDisableRiveListeners,this.eventManager=new D,h.onLoad&&this.on(T.Load,h.onLoad),h.onLoadError&&this.on(T.LoadError,h.onLoadError),h.onPlay&&this.on(T.Play,h.onPlay),h.onPause&&this.on(T.Pause,h.onPause),h.onStop&&this.on(T.Stop,h.onStop),h.onLoop&&this.on(T.Loop,h.onLoop),h.onStateChange&&this.on(T.StateChange,h.onStateChange),h.onAdvance&&this.on(T.Advance,h.onAdvance),h.onload&&!h.onLoad&&this.on(T.Load,h.onload),h.onloaderror&&!h.onLoadError&&this.on(T.LoadError,h.onloaderror),h.onplay&&!h.onPlay&&this.on(T.Play,h.onplay),h.onpause&&!h.onPause&&this.on(T.Pause,h.onpause),h.onstop&&!h.onStop&&this.on(T.Stop,h.onstop),h.onloop&&!h.onLoop&&this.on(T.Loop,h.onloop),h.onstatechange&&!h.onStateChange&&this.on(T.StateChange,h.onstatechange),this.taskQueue=new A(this.eventManager),this.init({src:this.src,buffer:this.buffer,autoplay:h.autoplay,animations:h.animations,stateMachines:h.stateMachines,artboard:h.artboard,useOffscreenRenderer:h.useOffscreenRenderer})}return E.new=function(h){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new E(h)},E.prototype.init=function(h){var C=this,P=h.src,j=h.buffer,H=h.animations,Y=h.stateMachines,oe=h.artboard,W=h.autoplay,L=W===void 0?!1:W,J=h.useOffscreenRenderer,U=J===void 0?!1:J;if(this.src=P,this.buffer=j,!this.src&&!this.buffer)throw new Error(E.missingErrorMessage);var K=B(H),Z=B(Y);this.loaded=!1,this.readyForPlaying=!1,b.awaitInstance().then(function(ce){C.runtime=ce,C.renderer=C.runtime.makeRenderer(C.canvas,U),C.canvas.width||C.canvas.height||C.resizeDrawingSurfaceToCanvas(),C.initData(oe,K,Z,L).then(function(){return C.setupRiveListeners()}).catch(function(z){console.error(z)})}).catch(function(ce){console.error(ce)})},E.prototype.setupRiveListeners=function(){var h=this;if(!this.shouldDisableRiveListeners){var C=(this.animator.stateMachines||[]).filter(function(P){return P.playing&&h.runtime.hasListeners(P.instance)}).map(function(P){return P.instance});this.eventCleanup=(0,c.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:C,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime)})}},E.prototype.initData=function(h,C,P,j){var H;return u(this,void 0,void 0,function(){var Y,oe,W;return f(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 oe=this,[4,this.runtime.load(new Uint8Array(this.buffer))];case 3:return oe.file=L.sent(),this.file?(this.initArtboard(h,C,P,j),this.loaded=!0,this.eventManager.fire({type:T.Load,data:(H=this.src)!==null&&H!==void 0?H:"buffer"}),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,Promise.resolve()]):(W="Problem loading file; may be corrupt!",console.warn(W),this.eventManager.fire({type:T.LoadError,data:W}),[2,Promise.reject(W)])}})})},E.prototype.initArtboard=function(h,C,P,j){var H=h?this.file.artboardByName(h):this.file.defaultArtboard();if(!H){var Y="Invalid artboard name or no default artboard";console.warn(Y),this.eventManager.fire({type:T.LoadError,data:Y});return}if(this.artboard=H,this.artboard.animationCount()<1){var Y="Artboard has no animations";throw this.eventManager.fire({type:T.LoadError,data:Y}),Y}this.animator=new w(this.runtime,this.artboard,this.eventManager);var oe;C.length>0||P.length>0?(oe=C.concat(P),this.animator.add(oe,j,!1)):oe=[this.animator.atLeastOne(j,!1)],this.taskQueue.add({event:{type:j?T.Play:T.Pause,data:oe}})},E.prototype.drawFrame=function(){this.startRendering()},E.prototype.draw=function(h,C){var P=performance.now();this.frameRequestId=null,this.lastRenderTime||(this.lastRenderTime=h),this.renderSecondTimer+=h-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,C==null||C());var j=(h-this.lastRenderTime)/1e3;this.lastRenderTime=h;for(var H=this.animator.animations.filter(function(z){return z.playing||z.needsScrub}).sort(function(z){return z.needsScrub?-1:1}),Y=0,oe=H;Y<oe.length;Y++){var W=oe[Y];W.advance(j),W.instance.didLoop&&(W.loopCount+=1),W.apply(1)}for(var L=this.animator.stateMachines.filter(function(z){return z.playing}),J=0,U=L;J<U.length;J++){var K=U[J];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)},E.prototype.alignRenderer=function(){var h=this,C=h.renderer,P=h.runtime,j=h._layout,H=h.artboard;C.align(j.runtimeFit(P),j.runtimeAlignment(P),{minX:j.minX,minY:j.minY,maxX:j.maxX,maxY:j.maxY},H.bounds)},Object.defineProperty(E.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"frameTime",{get:function(){return this.durations.length===0?0:(this.durations.reduce(function(h,C){return h+C},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),E.prototype.cleanup=function(){var h,C;this.stopRendering(),this.cleanupInstances(),(h=this.renderer)===null||h===void 0||h.delete(),this.renderer=null,(C=this.file)===null||C===void 0||C.delete(),this.file=null},E.prototype.cleanupInstances=function(){this.eventCleanup!==null&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},E.prototype.play=function(h,C){var P=this;if(h=B(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return P.play(h,C)}});return}this.animator.play(h),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},E.prototype.pause=function(h){var C=this;if(h=B(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return C.pause(h)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(h)},E.prototype.scrub=function(h,C){var P=this;if(h=B(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return P.scrub(h,C)}});return}this.animator.scrub(h,C||0),this.drawFrame()},E.prototype.stop=function(h){var C=this;if(h=B(h),!this.readyForPlaying){this.taskQueue.add({action:function(){return C.stop(h)}});return}this.animator.stop(h),this.eventCleanup&&this.eventCleanup()},E.prototype.reset=function(h){var C,P=h==null?void 0:h.artboard,j=B(h==null?void 0:h.animations),H=B(h==null?void 0:h.stateMachines),Y=(C=h==null?void 0:h.autoplay)!==null&&C!==void 0?C:!1;this.cleanupInstances(),this.initArtboard(P,j,H,Y),this.taskQueue.process()},E.prototype.load=function(h){this.stop(),this.init(h)},Object.defineProperty(E.prototype,"layout",{get:function(){return this._layout},set:function(h){this._layout=h,(!h.maxX||!h.maxY)&&this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()},enumerable:!1,configurable:!0}),E.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},E.prototype.resizeDrawingSurfaceToCanvas=function(){if(this.canvas instanceof HTMLCanvasElement&&window){var h=this.canvas.getBoundingClientRect(),C=h.width,P=h.height,j=window.devicePixelRatio||1;this.canvas.width=j*C,this.canvas.height=j*P,this.startRendering(),this.resizeToCanvas()}},Object.defineProperty(E.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"animationNames",{get:function(){if(!this.loaded)return[];for(var h=[],C=0;C<this.artboard.animationCount();C++)h.push(this.artboard.animationByIndex(C).name);return h},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"stateMachineNames",{get:function(){if(!this.loaded)return[];for(var h=[],C=0;C<this.artboard.stateMachineCount();C++)h.push(this.artboard.stateMachineByIndex(C).name);return h},enumerable:!1,configurable:!0}),E.prototype.stateMachineInputs=function(h){if(this.loaded){var C=this.animator.stateMachines.find(function(P){return P.name===h});return C==null?void 0:C.inputs}},Object.defineProperty(E.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(h){return h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(h){return h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(h){return!h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(h){return!h.playing}).map(function(h){return h.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),E.prototype.on=function(h,C){this.eventManager.add({type:h,callback:C})},E.prototype.off=function(h,C){this.eventManager.remove({type:h,callback:C})},E.prototype.unsubscribe=function(h,C){console.warn("This function is deprecated: please use `off()` instead."),this.off(h,C)},E.prototype.removeAllRiveEventListeners=function(h){this.eventManager.removeAll(h)},E.prototype.unsubscribeAll=function(h){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(h)},E.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},E.prototype.startRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this.draw.bind(this)):this.frameRequestId=requestAnimationFrame(this.draw.bind(this)))},E.prototype.enableFPSCounter=function(h){this.runtime.enableFPSCounter(h)},E.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(E.prototype,"contents",{get:function(){if(this.loaded){for(var h={artboards:[]},C=0;C<this.file.artboardCount();C++){for(var P=this.file.artboardByIndex(C),j={name:P.name,animations:[],stateMachines:[]},H=0;H<P.animationCount();H++){var Y=P.animationByIndex(H);j.animations.push(Y.name)}for(var oe=0;oe<P.stateMachineCount();oe++){for(var W=P.stateMachineByIndex(oe),L=W.name,J=new this.runtime.StateMachineInstance(W,P),U=[],K=0;K<J.inputCount();K++){var Z=J.input(K);U.push({name:Z.name,type:Z.type})}j.stateMachines.push({name:L,inputs:U})}h.artboards.push(j)}return h}},enumerable:!1,configurable:!0}),E.missingErrorMessage="Rive source file or data buffer required",E}(),k=function(E){return u(void 0,void 0,void 0,function(){var h,C,P;return f(this,function(j){switch(j.label){case 0:return h=new Request(E),[4,fetch(h)];case 1:return C=j.sent(),[4,C.arrayBuffer()];case 2:return P=j.sent(),[2,P]}})})},B=function(E){return typeof E=="string"?[E]:E instanceof Array?E:[]},R={EventManager:D,TaskQueueManager:A}})(),i})())})(ig);var YT=ig.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 w,T=1,I=arguments.length;T<I;T++)for(var D in w=arguments[T])Object.prototype.hasOwnProperty.call(w,D)&&(v[D]=w[D]);return v},i.apply(this,arguments)};function a(v,w){var T={};for(var I in v)Object.prototype.hasOwnProperty.call(v,I)&&w.indexOf(I)<0&&(T[I]=v[I]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function"){var D=0;for(I=Object.getOwnPropertySymbols(v);D<I.length;D++)w.indexOf(I[D])<0&&Object.prototype.propertyIsEnumerable.call(v,I[D])&&(T[I[D]]=v[I[D]])}return T}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,f=globalThis.ResizeObserver!==void 0,d=!f;function m(v,w){w===void 0&&(w=!0);var T=t.useState({width:0,height:0}),I=T[0],D=T[1];t.useEffect(function(){if(typeof window<"u"&&w){var R=function(){D({width:window.innerWidth,height:window.innerHeight})};return d&&(R(),window.addEventListener("resize",R)),function(){return window.removeEventListener("resize",R)}}},[]);var A,F,k,B=t.useRef(new u((A=function(R){f&&D({width:R[R.length-1].contentRect.width,height:R[R.length-1].contentRect.height})},F=0,k=0,function(){for(var R=this,E=[],h=0;h<arguments.length;h++)E[h]=arguments[h];clearTimeout(k),k=window.setTimeout(function(){return A.apply(R,E)},F)})));return t.useEffect(function(){var R=B.current;if(w){var E=v.current;return v.current&&f&&R.observe(v.current),function(){R.disconnect(),E&&f&&R.unobserve(E)}}R.disconnect()},[v,B]),I}var p={useDevicePixelRatio:!0,fitCanvasToArtboardHeight:!1,useOffscreenRenderer:!0,shouldResizeCanvasToContainer:!0};function b(v){return Object.assign({},p,v)}function y(v){var w=v.riveLoaded,T=w!==void 0&&w,I=v.canvasRef,D=v.containerRef,A=v.options,F=A===void 0?{}:A,k=v.onCanvasHasResized,B=v.artboardBounds,R=b(F),E=t.useState({height:0,width:0}),h=E[0],C=h.height,P=h.width,j=E[1],H=t.useState({height:0,width:0}),Y=H[0],oe=Y.height,W=Y.width,L=H[1],J=t.useState(!0),U=J[0],K=J[1],Z=R.fitCanvasToArtboardHeight,ce=R.shouldResizeCanvasToContainer,z=R.useDevicePixelRatio,G=m(D,ce),re=function(){var xe=s(),Ee=t.useState(xe),Ae=Ee[0],Ie=Ee[1];return t.useEffect(function(){if(typeof window<"u"&&"matchMedia"in window){var Le=function(){var at=s();Ie(at)},ke=window.matchMedia("screen and (resolution: ".concat(Ae,"dppx)"));return ke.hasOwnProperty("addEventListener")?ke.addEventListener("change",Le):ke.addListener(Le),function(){ke.hasOwnProperty("removeEventListener")?ke.removeEventListener("change",Le):ke.removeListener(Le)}}},[Ae]),Ae}(),ne=B??{},ie=ne.maxX,ee=ne.maxY,pe=t.useCallback(function(){var xe,Ee,Ae,Ie,Le=(Ee=(xe=D.current)===null||xe===void 0?void 0:xe.clientWidth)!==null&&Ee!==void 0?Ee:0,ke=(Ie=(Ae=D.current)===null||Ae===void 0?void 0:Ae.clientHeight)!==null&&Ie!==void 0?Ie:0;return Z&&B?{width:Le,height:Le*(B.maxY/B.maxX)}:{width:Le,height:ke}},[D,Z,ie,ee]);t.useEffect(function(){if(ce&&D.current&&T){var xe=pe(),Ee=xe.width,Ae=xe.height,Ie=!1;if(I.current){var Le=Ee!==P||Ae!==C;if(R.fitCanvasToArtboardHeight&&Le&&(D.current.style.height=Ae+"px",Ie=!0),R.useDevicePixelRatio){if(Le||Ee*re!==W||Ae*re!==oe){var ke=re*Ee,at=re*Ae;I.current.width=ke,I.current.height=at,I.current.style.width=Ee+"px",I.current.style.height=Ae+"px",L({width:ke,height:at}),Ie=!0}}else Le&&(I.current.width=Ee,I.current.height=Ae,L({width:Ee,height:Ae}),Ie=!0);j({width:Ee,height:Ae})}k&&(U||Ie)&&k&&k(),U&&K(!1)}},[I,D,G,re,pe,U,K,oe,W,C,P,k,ce,Z,z,T])}function $(v){var w=v.setContainerRef,T=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:w,className:D},!D&&{style:B}),o.default.createElement("canvas",i({ref:T,style:{verticalAlign:"top",width:0,height:0}},k),F))}function x(v,w){w===void 0&&(w={});var T=t.useRef(null),I=t.useRef(null),D=t.useState(null),A=D[0],F=D[1],k=!!v,B=b(w),R=t.useCallback(function(){A&&(A.startRendering(),A.resizeToCanvas())},[A]);y({riveLoaded:!!A,canvasRef:T,containerRef:I,options:B,onCanvasHasResized:R,artboardBounds:A==null?void 0:A.bounds});var E=t.useCallback(function(j){if(j&&v&&k){var H=B.useOffscreenRenderer,Y=new n.Rive(i(i({useOffscreenRenderer:H},v),{canvas:j}));Y.on(n.EventType.Load,function(){T.current?F(Y):Y.cleanup()})}else j===null&&T.current&&(T.current.height=0,T.current.width=0);T.current=j},[k]),h=t.useCallback(function(j){I.current=j},[]);t.useEffect(function(){var j=new IntersectionObserver(function(H){H[0].isIntersecting?A&&A.startRendering():A&&A.stopRendering()});return T.current&&j.observe(T.current),function(){j.disconnect()}},[A]),t.useEffect(function(){return function(){A&&(A.cleanup(),F(null))}},[A]);var C=v==null?void 0:v.animations;t.useEffect(function(){A&&C&&(A.isPlaying?(A.stop(A.animationNames),A.play(C)):A.isPaused&&(A.stop(A.animationNames),A.pause(C)))},[C,A]);var P=t.useCallback(function(j){return o.default.createElement($,i({setContainerRef:h,setCanvasRef:E},j))},[E,h]);return{canvas:T.current,container:I.current,setCanvasRef:E,setContainerRef:h,rive:A,RiveComponent:P}}e.default=function(v){var w=v.src,T=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,E=v.shouldResizeCanvasToContainer,h=E===void 0||E,C=v.children,P=a(v,["src","artboard","animations","stateMachines","layout","useOffscreenRenderer","shouldDisableRiveListeners","shouldResizeCanvasToContainer","children"]),j=x({src:w,artboard:T,animations:I,layout:A,stateMachines:D,autoplay:!0,shouldDisableRiveListeners:R},{useOffscreenRenderer:k,shouldResizeCanvasToContainer:h}).RiveComponent;return o.default.createElement(j,i({},P),C)},e.useResizeCanvas=y,e.useRive=x,e.useStateMachineInput=function(v,w,T,I){var D=t.useState(null),A=D[0],F=D[1];return t.useEffect(function(){function k(){if(v&&w&&T||F(null),v&&w&&T){var B=v.stateMachineInputs(w);if(B){var R=B.find(function(E){return E.name===T});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]}})})})(og);const KT=yh(og),El=({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})});El.defaultProps={src:"https://assets.machtwatch.net/voila/asset/riv-animation/loader.riv",width:"300px",height:"300px",style:{}};const ag=({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(El,{src:i,width:n,height:r,style:{transform:"translate(-50%, -50%)"}})})}):null);ag.defaultProps={onClose:()=>{},className:"",src:void 0,noScroll:"noscroll","data-testid-backdrop":"full-loader-backdrop","data-testid-loader":"full-loader-loader"};var qT=Ke({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:Te(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",Wp="_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:Te(ZT,e),children:a})},sg=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,f=l.useRef(null),d=l.useRef(null),m=l.useRef(null),p=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]),[$,x]=l.useState(y),v=(()=>{let k=-1,B=0,R=0,E=!1,h=!1;const C=(L,J)=>{L.transform=J},P=(L,J)=>{L.transition=J},j=(L,J,U=.3)=>{var K,Z;k!==J&&(k=J,P((K=d.current)==null?void 0:K.style,`cubic-bezier(0,0,0.2,1.15) ${U}s`),C((Z=d.current)==null?void 0:Z.style,`translate3d(0,${-J}px,0)`),setTimeout(()=>{A(),d.current&&P(d.current.style,"")},+U*1e3))},H=((L=30,J=100)=>{let U=0,K=0,Z=0;const ce={record:z=>{const G=+new Date;Z=(z-K)/(G-U),G-U>=L&&(Z=G-U<=J?Z:0,K=z,U=G)},getVelocity:z=>(z!==K&&ce.record(z),Z)};return ce})(),Y=()=>{h=!1;let L=k;const J=(t.length-1)*p.current;let U=.3;const K=H.getVelocity(L)*4;K&&(L=K*40+L,U=Math.abs(K)*.1),L%p.current!==0&&(L=Math.round(L/p.current)*p.current),L<0?L=0:L>J&&(L=J),j(0,L,U<.3?.3:U),D()},oe=L=>{E||(h=!0,R=L,B=k)},W=L=>{var J;E||!h||(k=B-L+R,H.record(k),D(),C((J=d.current)==null?void 0:J.style,`translate3d(0,${-k}px,0)`))};return{touchstart:L=>oe(L.touches[0].pageY),mousedown:L=>oe(L.pageY),touchmove:L=>{L.preventDefault(),W(L.touches[0].pageY)},mousemove:L=>{L.preventDefault(),W(L.pageY)},touchend:()=>Y(),touchcancel:()=>Y(),mouseup:()=>Y(),getValue:()=>k,scrollTo:j,setDisabled:(L=!1)=>{E=L}}})(),w=l.useCallback(k=>{v.scrollTo(0,k)},[v]),T=l.useCallback(k=>{v.scrollTo(0,k,0)},[v]),I=k=>{k!==$&&("selectedValue"in e||x(k),a&&a(k))},D=()=>{const k=v.getValue();if(k>=0){const B=l.Children.toArray(t),R=s(k,p.current,B.length);if(b.current!==R){b.current=R;const E=B[R];E&&e.onScrollChange?e.onScrollChange(E.props.value):!B&&console.warn&&console.warn("child not found",t,R)}}},A=()=>{const k=v.getValue();k>=0&&i(k,p.current,I)},F=()=>{const k=`${Wp} ${tI}`,B=E=>{const{className:h="",style:C,value:P}=E.props,j=$===P;return M.jsx("div",{style:{...C},"data-selected":j?"true":void 0,className:`${j?k:Wp} ${h}`,children:E.props.children},P)};return l.Children?l.Children.map(t,B):[].concat(t).map(B)};return l.useEffect(()=>{var E,h,C;const k=((E=f.current)==null?void 0:E.getBoundingClientRect().height)??0,B=((h=m.current)==null?void 0:h.getBoundingClientRect().height)??0;p.current=((C=m.current)==null?void 0:C.getBoundingClientRect().height)??0;let R=Math.floor(k/B);return R%2===0&&(R-=1),R-=1,R/=2,d.current.style.padding=`${B*R}px 0`,m.current.style.top=`${B*R}px`,v.setDisabled(c),o($,p.current,w),Object.keys(v).forEach(P=>{var j;if(P.indexOf("touch")===0||P.indexOf("mouse")===0){const H=P.indexOf("move")>=0?{passive:!1}:{passive:!0};(j=f.current)==null||j.addEventListener(P,v[P],H)}}),()=>{Object.keys(v).forEach(P=>{var j;(P.indexOf("touch")===0||P.indexOf("mouse")===0)&&((j=f.current)==null||j.removeEventListener(P,v[P]))})}},[c,v,w,o,$]),l.useEffect(()=>{"selectedValue"in e&&$!==n&&x(n),v.setDisabled(c)},[n,$,e,v,c]),l.useEffect(()=>{o($,p.current,T)},[T,o,$]),M.jsxs("div",{className:Te(eI,u),ref:f,children:[M.jsx("div",{className:Te(JT,u),ref:m}),M.jsx("div",{className:QT,ref:d,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 Ka=24*60*60*1e3,aI={am:"AM",pm:"PM"},cg=e=>new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),hc=e=>e<10?`0${e}`:`${e}`,Sr=e=>new Date(+e),sI=(e,t)=>{e.setDate(Math.min(e.getDate(),cg(new Date(e.getFullYear(),t)))),e.setMonth(t)},zp=(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)},Up=(e,t)=>{t===0?e.setTime(+e-Ka/2):e.setTime(+e+Ka/2)},Yp=(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:f,formatDay:d,formatMonth:m}=e,[p,b]=l.useState(t||n),y=l.useRef(new Date(-1)),$=l.useRef(new Date);l.useEffect(()=>{"date"in e&&b(t||n)},[t,n,e]);const x=()=>C(p||y.current),v=()=>E().getFullYear(),w=()=>h().getFullYear(),T=()=>E().getMonth(),I=()=>h().getMonth(),D=()=>E().getDate(),A=()=>h().getDate(),F=()=>E().getHours(),k=()=>h().getHours(),B=()=>E().getMinutes(),R=()=>h().getMinutes(),E=()=>u||y.current,h=()=>f||$.current,C=U=>{const K=E(),Z=h();if(o===Mt.DATE_TIME){if(U<K)return Sr(K);if(U>Z)return Sr(Z)}else if(o===Mt.DATE||o===Mt.YEAR||o===Mt.MONTH){if(+U+Ka<=K)return Sr(K);if(U>=+Z+Ka)return Sr(Z)}else if(o===Mt.TIME){const ce=Z.getHours(),z=Z.getMinutes(),G=K.getHours(),re=K.getMinutes(),ne=U.getHours(),ie=U.getMinutes();if(ne<G||ne===G&&ie<re)return Sr(K);if(ne>ce||ne===ce&&ie>z)return Sr(Z)}return U},P=(U,K)=>{const Z=parseInt(U[K],10),ce=Sr(x());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:zp(ce,Z);break;case 4:ce.setMinutes(Z);break;case 5:Up(ce,Z);break}else if(o===Mt.TIME)switch(K){case 0:zp(ce,Z);break;case 1:ce.setMinutes(Z);break;case 2:Up(ce,Z);break}return C(ce)},j=(U,K)=>{const Z=P(U,K);"date"in e||b(Z),e.onDateChange&&e.onDateChange(Z),e.onValueChange&&e.onValueChange(U,K)},H=(U,K)=>{if(e.onScrollChange){const Z=P(U,K);e.onScrollChange(Z,U,K)}},Y=()=>{const U=x(),K=U.getFullYear(),Z=U.getMonth(),ce=v(),z=w(),G=T(),re=I(),ne=D(),ie=A(),ee=[];for(let We=ce;We<=z;We+=1)ee.push({value:`${We}`,label:`${We}`});const pe={key:"year",props:{children:ee}};if(o===Mt.YEAR)return[pe];const xe=[];let Ee=0,Ae=11;ce===K&&(Ee=G),z===K&&(Ae=re);for(let We=Ee;We<=Ae;We+=1){const wt=m?m(We,U):cI(We);xe.push({value:`${We}`,label:wt})}const Ie={key:"month",props:{children:xe}};if(o===Mt.MONTH)return[Ie,pe];const Le=[];let ke=1,at=cg(U);ce===K&&G===Z&&(ke=ne),z===K&&re===Z&&(at=ie);for(let We=ke;We<=at;We+=1){const wt=d?d(We,U):`${We}`;Le.push({value:`${We}`,label:wt})}return[{key:"day",props:{children:Le}},Ie,pe]},oe=U=>{let{minHour:K=0,maxHour:Z=23,minMinute:ce=0,maxMinute:z=59}=e;const G=B(),re=R(),ne=F(),ie=k(),ee=U.getHours();if(o===Mt.DATE_TIME){const Ie=U.getFullYear(),Le=U.getMonth(),ke=U.getDate(),at=v(),We=w(),wt=T(),Xe=I(),At=D(),$e=A();at===Ie&&wt===Le&&At===ke&&(K=ne,ne===ee&&(ce=G)),We===Ie&&Xe===Le&&$e===ke&&(Z=ie,ie===ee&&(z=re))}else K=ne,ne===ee&&(ce=G),Z=ie,ie===ee&&(z=re);const pe=[];K===0&&Z===0||K!==0&&Z!==0?K=Yp(K):K===0&&c&&(K=1,pe.push({value:"0",label:"12"})),Z=Yp(Z);for(let Ie=K;Ie<=Z;Ie+=1)pe.push({value:`${Ie}`,label:hc(Ie)});const xe=[],Ee=U.getMinutes();for(let Ie=ce;Ie<=z;Ie+=s)xe.push({value:`${Ie}`,label:hc(Ie)}),Ee>Ie&&Ee<Ie+s&&xe.push({value:`${Ee}`,label:hc(Ee)});return{cols:[{key:"hours",props:{children:pe}},{key:"minutes",props:{children:xe}}].concat(c?[{key:"ampm",props:{children:[{value:"0",label:r.am},{value:"1",label:r.pm}]}}]:[]),selMinute:Ee}},W=()=>{const U=x();let K=[],Z=[];if(o===Mt.YEAR)return{cols:Y(),value:[`${U.getFullYear()}`]};if(o===Mt.MONTH)return{cols:Y(),value:[`${U.getMonth()}`,`${U.getFullYear()}`]};if((o===Mt.DATE_TIME||o===Mt.DATE)&&(K=Y(),Z=[`${U.getDate()}`,`${U.getMonth()}`,`${U.getFullYear()}`]),o===Mt.DATE_TIME||o===Mt.TIME){const ce=oe(U);K=K.concat(ce.cols);const z=U.getHours();let G=[`${z}`,`${ce.selMinute}`],re=z;c&&(re=z>12?z-12:z,G=[`${re}`,`${ce.selMinute}`,`${z>=12?1:0}`]),Z=Z.concat(G)}return{value:Z,cols:K}},{value:L,cols:J}=W();return M.jsx(sg,{className:a,selectedValue:L,onValueChange:j,onScrollChange:H,children:J.map(U=>M.jsx(au,{disabled:i,className:`picker-item-${U.key}`,children:U.props.children.map(K=>M.jsx(au.Item,{value:K.value,children:K.label},K.value))},U.key))})};var su={exports:{}},gt={};/** @license React v17.0.2
161
161
  * react-is.production.min.js
162
162
  *
@@ -171,4 +171,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
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 qp;function dI(){return qp||(qp=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,f=60115,d=60116,m=60121,p=60122,b=60117,y=60129,$=60131;if(typeof Symbol=="function"&&Symbol.for){var x=Symbol.for;e=x("react.element"),t=x("react.portal"),n=x("react.fragment"),r=x("react.strict_mode"),o=x("react.profiler"),i=x("react.provider"),a=x("react.context"),s=x("react.forward_ref"),c=x("react.suspense"),u=x("react.suspense_list"),f=x("react.memo"),d=x("react.lazy"),m=x("react.block"),p=x("react.server.block"),b=x("react.fundamental"),x("react.scope"),x("react.opaque.id"),y=x("react.debug_trace_mode"),x("react.offscreen"),$=x("react.legacy_hidden")}var v=!1;function w(ie){return!!(typeof ie=="string"||typeof ie=="function"||ie===n||ie===o||ie===y||ie===r||ie===c||ie===u||ie===$||v||typeof ie=="object"&&ie!==null&&(ie.$$typeof===d||ie.$$typeof===f||ie.$$typeof===i||ie.$$typeof===a||ie.$$typeof===s||ie.$$typeof===b||ie.$$typeof===m||ie[0]===p))}function T(ie){if(typeof ie=="object"&&ie!==null){var ee=ie.$$typeof;switch(ee){case e:var pe=ie.type;switch(pe){case n:case o:case r:case c:case u:return pe;default:var xe=pe&&pe.$$typeof;switch(xe){case a:case s:case d:case f:case i:return xe;default:return ee}}case t:return ee}}}var I=a,D=i,A=e,F=s,k=n,B=d,R=f,E=t,h=o,C=r,P=c,j=!1,H=!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 oe(ie){return H||(H=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(ie){return T(ie)===a}function L(ie){return T(ie)===i}function J(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===e}function U(ie){return T(ie)===s}function K(ie){return T(ie)===n}function Z(ie){return T(ie)===d}function ce(ie){return T(ie)===f}function z(ie){return T(ie)===t}function G(ie){return T(ie)===o}function re(ie){return T(ie)===r}function ne(ie){return T(ie)===c}yt.ContextConsumer=I,yt.ContextProvider=D,yt.Element=A,yt.ForwardRef=F,yt.Fragment=k,yt.Lazy=B,yt.Memo=R,yt.Portal=E,yt.Profiler=h,yt.StrictMode=C,yt.Suspense=P,yt.isAsyncMode=Y,yt.isConcurrentMode=oe,yt.isContextConsumer=W,yt.isContextProvider=L,yt.isElement=J,yt.isForwardRef=U,yt.isFragment=K,yt.isLazy=Z,yt.isMemo=ce,yt.isPortal=z,yt.isProfiler=G,yt.isStrictMode=re,yt.isSuspense=ne,yt.isValidElementType=w,yt.typeOf=T}()),yt}process.env.NODE_ENV==="production"?su.exports=lI():su.exports=dI();var Xp=su.exports;let Gp=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Zp=(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 Zp(n.overflowY,t)||Zp(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},ca=(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 pI=(e,t)=>{var n,r,o,i,a,s;if(typeof document>"u")return[];let{scrollMode:c,block:u,inline:f,boundary:d,skipOverflowHiddenElements:m}=t,p=typeof d=="function"?d:C=>C!==d;if(!Gp(e))throw new TypeError("Invalid target");let b=document.scrollingElement||document.documentElement,y=[],$=e;for(;Gp($)&&p($);){if($=fI($),$===b){y.push($);break}$!=null&&$===document.body&&vc($)&&!vc(document.documentElement)||$!=null&&vc($,m)&&y.push($)}let x=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,v=(i=(o=window.visualViewport)==null?void 0:o.height)!=null?i:innerHeight,w=(a=window.scrollX)!=null?a:pageXOffset,T=(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,E=f==="center"?B+D/2:f==="end"?F:B,h=[];for(let C=0;C<y.length;C++){let P=y[C],{height:j,width:H,top:Y,right:oe,bottom:W,left:L}=P.getBoundingClientRect();if(c==="if-needed"&&A>=0&&B>=0&&k<=v&&F<=x&&A>=Y&&k<=W&&B>=L&&F<=oe)return h;let J=getComputedStyle(P),U=parseInt(J.borderLeftWidth,10),K=parseInt(J.borderTopWidth,10),Z=parseInt(J.borderRightWidth,10),ce=parseInt(J.borderBottomWidth,10),z=0,G=0,re="offsetWidth"in P?P.offsetWidth-P.clientWidth-U-Z:0,ne="offsetHeight"in P?P.offsetHeight-P.clientHeight-K-ce:0,ie="offsetWidth"in P?P.offsetWidth===0?0:H/P.offsetWidth:0,ee="offsetHeight"in P?P.offsetHeight===0?0:j/P.offsetHeight:0;if(b===P)z=u==="start"?R:u==="end"?R-v:u==="nearest"?ca(T,T+v,v,K,ce,T+R,T+R+I,I):R-v/2,G=f==="start"?E:f==="center"?E-x/2:f==="end"?E-x:ca(w,w+x,x,U,Z,w+E,w+E+D,D),z=Math.max(0,z+T),G=Math.max(0,G+w);else{z=u==="start"?R-Y-K:u==="end"?R-W+ce+ne:u==="nearest"?ca(Y,W,j,K,ce+ne,R,R+I,I):R-(Y+j/2)+ne/2,G=f==="start"?E-L-U:f==="center"?E-(L+H/2)+re/2:f==="end"?E-oe+Z+re:ca(L,oe,H,U,Z+re,E,E+D,D);let{scrollLeft:pe,scrollTop:xe}=P;z=Math.max(0,Math.min(xe+z/ee,P.scrollHeight-j/ee+ne)),G=Math.max(0,Math.min(pe+G/ie,P.scrollWidth-H/ie+re)),R+=xe-z,E+=pe-G}h.push({el:P,top:z,left:G})}return h},hI=0;function Qp(e){return typeof e=="function"?e:pn}function pn(){}function ug(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 Jp(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function xl(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 Pt(){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 pr(){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 lg(){return String(hI++)}function dg(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 eh(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function fg(e){return typeof e.type=="string"}function pg(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 ua(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]=qa(t,r)?t[r]:e[r],n},{})}function qa(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 Pr(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=Vr(e,a,n,r,o);return s===-1?t>=n?-1:t:s}function Vr(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?Vr(1,0,n,r,!1):Vr(-1,n-1,n,r,!1):-1}function Xa(e,t,n,r){return r===void 0&&(r=!0),t.some(function(o){return o&&(Jp(o,e,n)||r&&Jp(o,n.document.activeElement,n))})}var _l=pn;process.env.NODE_ENV!=="production"&&(_l=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=xl(function(e){hg(e).textContent=""},500);function Sl(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 vg=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,mg=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,gg=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,xa=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,_a=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,yg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,bg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,wg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Eg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,xg=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,_g=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,Sg=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,Cg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,cu=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,$g=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,Tg=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,Ig=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,bI=Object.freeze({__proto__:null,unknown:vg,mouseUp:mg,itemMouseEnter:gg,keyDownArrowUp:xa,keyDownArrowDown:_a,keyDownEscape:yg,keyDownEnter:bg,keyDownHome:wg,keyDownEnd:Eg,clickItem:xg,blurInput:_g,changeInput:Sg,keyDownSpaceButton:Cg,clickButton:cu,blurButton:$g,controlledPropUpdatedSelectedItem:Tg,touchEnd:Ig}),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){Nu(n,t);function n(o){var i;i=t.call(this,o)||this,i.id=i.props.id||"downshift-"+lg(),i.menuId=i.props.menuId||i.id+"-menu",i.labelId=i.props.labelId||i.id+"-label",i.inputId=i.props.inputId||i.id+"-input",i.getItemId=i.props.getItemId||function(v){return i.id+"-item-"+v},i.input=null,i.items=[],i.itemCount=null,i.previousResultCount=0,i.timeoutIds=[],i.internalSetTimeout=function(v,w){var T=setTimeout(function(){i.timeoutIds=i.timeoutIds.filter(function(I){return I!==T}),v()},w);i.timeoutIds.push(T)},i.setItemCount=function(v){i.itemCount=v},i.unsetItemCount=function(){i.itemCount=null},i.setHighlightedIndex=function(v,w){v===void 0&&(v=i.props.defaultHighlightedIndex),w===void 0&&(w={}),w=ua(w),i.internalSetState(ae({highlightedIndex:v},w))},i.clearSelection=function(v){i.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:i.props.defaultHighlightedIndex,isOpen:i.props.defaultIsOpen},v)},i.selectItem=function(v,w,T){w=ua(w),i.internalSetState(ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,selectedItem:v,inputValue:i.props.itemToString(v)},w),T)},i.selectItemAtIndex=function(v,w,T){var I=i.items[v];I!=null&&i.selectItem(I,w,T)},i.selectHighlightedItem=function(v,w){return i.selectItemAtIndex(i.getState().highlightedIndex,v,w)},i.internalSetState=function(v,w){var T,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),T=k.hasOwnProperty("selectedItem");var B={};return T&&k.selectedItem!==F.selectedItem&&(I=k.selectedItem),k.type=k.type||vg,Object.keys(k).forEach(function(R){F[R]!==k[R]&&(D[R]=k[R]),R!=="type"&&(k[R],qa(i.props,R)||(B[R]=k[R]))}),A&&k.hasOwnProperty("inputValue")&&i.props.onInputValueChange(k.inputValue,ae({},i.getStateAndHelpers(),k)),B},function(){Qp(w)();var F=Object.keys(D).length>1;F&&i.props.onStateChange(D,i.getStateAndHelpers()),T&&i.props.onSelect(v.selectedItem,i.getStateAndHelpers()),I!==void 0&&i.props.onChange(I,i.getStateAndHelpers()),i.props.onUserAction(D,i.getStateAndHelpers())})},i.rootRef=function(v){return i._rootNode=v},i.getRootProps=function(v,w){var T,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=cn(I,wI),B=w===void 0?{}:w,R=B.suppressRefError,E=R===void 0?!1:R;i.getRootProps.called=!0,i.getRootProps.refKey=A,i.getRootProps.suppressRefError=E;var h=i.getState(),C=h.isOpen;return ae((T={},T[A]=pr(F,i.rootRef),T.role="combobox",T["aria-expanded"]=C,T["aria-haspopup"]="listbox",T["aria-owns"]=C?i.menuId:null,T["aria-labelledby"]=i.labelId,T),k)},i.keyDownHandlers={ArrowDown:function(w){var T=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?5:1;this.moveHighlightedIndex(I,{type:_a})}else this.internalSetState({isOpen:!0,type:_a},function(){var D=T.getItemCount();if(D>0){var A=T.getState(),F=A.highlightedIndex,k=Pr(1,F,D,function(B){return T.getItemNodeFromIndex(B)});T.setHighlightedIndex(k,{type:_a})}})},ArrowUp:function(w){var T=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?-5:-1;this.moveHighlightedIndex(I,{type:xa})}else this.internalSetState({isOpen:!0,type:xa},function(){var D=T.getItemCount();if(D>0){var A=T.getState(),F=A.highlightedIndex,k=Pr(-1,F,D,function(B){return T.getItemNodeFromIndex(B)});T.setHighlightedIndex(k,{type:xa})}})},Enter:function(w){if(w.which!==229){var T=this.getState(),I=T.isOpen,D=T.highlightedIndex;if(I&&D!=null){w.preventDefault();var A=this.items[D],F=this.getItemNodeFromIndex(D);if(A==null||F&&F.hasAttribute("disabled"))return;this.selectHighlightedItem({type:bg})}}},Escape:function(w){w.preventDefault(),this.reset(ae({type:yg},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},i.buttonKeyDownHandlers=ae({},i.keyDownHandlers,{" ":function(w){w.preventDefault(),this.toggleMenu({type:Cg})}}),i.inputKeyDownHandlers=ae({},i.keyDownHandlers,{Home:function(w){var T=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Vr(1,0,A,function(k){return T.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:wg})}}},End:function(w){var T=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Vr(-1,A-1,A,function(k){return T.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:Eg})}}}}),i.getToggleButtonProps=function(v){var w=v===void 0?{}:v,T=w.onClick;w.onPress;var I=w.onKeyDown,D=w.onKeyUp,A=w.onBlur,F=cn(w,EI),k=i.getState(),B=k.isOpen,R={onClick:Pt(T,i.buttonHandleClick),onKeyDown:Pt(I,i.buttonHandleKeyDown),onKeyUp:Pt(D,i.buttonHandleKeyUp),onBlur:Pt(A,i.buttonHandleBlur)},E=F.disabled?{}:R;return ae({type:"button",role:"button","aria-label":B?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},E,F)},i.buttonHandleKeyUp=function(v){v.preventDefault()},i.buttonHandleKeyDown=function(v){var w=Si(v);i.buttonKeyDownHandlers[w]&&i.buttonKeyDownHandlers[w].call(Of(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 w=v.target;i.internalSetTimeout(function(){!i.isMouseDown&&(i.props.environment.document.activeElement==null||i.props.environment.document.activeElement.id!==i.inputId)&&i.props.environment.document.activeElement!==w&&i.reset({type:$g})})},i.getLabelProps=function(v){return ae({htmlFor:i.inputId,id:i.labelId},v)},i.getInputProps=function(v){var w=v===void 0?{}:v,T=w.onKeyDown,I=w.onBlur,D=w.onChange,A=w.onInput;w.onChangeText;var F=cn(w,xI),k,B={};k="onChange";var R=i.getState(),E=R.inputValue,h=R.isOpen,C=R.highlightedIndex;if(!F.disabled){var P;B=(P={},P[k]=Pt(D,A,i.inputHandleChange),P.onKeyDown=Pt(T,i.inputHandleKeyDown),P.onBlur=Pt(I,i.inputHandleBlur),P)}return ae({"aria-autocomplete":"list","aria-activedescendant":h&&typeof C=="number"&&C>=0?i.getItemId(C):null,"aria-controls":h?i.menuId:null,"aria-labelledby":F&&F["aria-label"]?void 0:i.labelId,autoComplete:"off",value:E,id:i.inputId},B,F)},i.inputHandleKeyDown=function(v){var w=Si(v);w&&i.inputKeyDownHandlers[w]&&i.inputKeyDownHandlers[w].call(Of(i),v)},i.inputHandleChange=function(v){i.internalSetState({type:Sg,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:_g})})},i.menuRef=function(v){i._menuNode=v},i.getMenuProps=function(v,w){var T,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=cn(I,_I),B=w===void 0?{}:w,R=B.suppressRefError,E=R===void 0?!1:R;return i.getMenuProps.called=!0,i.getMenuProps.refKey=A,i.getMenuProps.suppressRefError=E,ae((T={},T[A]=pr(F,i.menuRef),T.role="listbox",T["aria-labelledby"]=k&&k["aria-label"]?null:i.labelId,T.id=i.menuId,T),k)},i.getItemProps=function(v){var w,T=v===void 0?{}:v,I=T.onMouseMove,D=T.onMouseDown,A=T.onClick;T.onPress;var F=T.index,k=T.item,B=k===void 0?process.env.NODE_ENV==="production"?void 0:vI("getItemProps","item"):k,R=cn(T,SI);F===void 0?(i.items.push(B),F=i.items.indexOf(B)):i.items[F]=B;var E="onClick",h=A,C=(w={onMouseMove:Pt(I,function(){F!==i.getState().highlightedIndex&&(i.setHighlightedIndex(F,{type:gg}),i.avoidScrolling=!0,i.internalSetTimeout(function(){return i.avoidScrolling=!1},250))}),onMouseDown:Pt(D,function(j){j.preventDefault()})},w[E]=Pt(h,function(){i.selectItemAtIndex(F,{type:xg})}),w),P=R.disabled?{onMouseDown:C.onMouseDown}:C;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,w){v===void 0&&(v={}),v=ua(v),i.internalSetState(function(T){var I=T.selectedItem;return ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,inputValue:i.props.itemToString(I)},v)},w)},i.toggleMenu=function(v,w){v===void 0&&(v={}),v=ua(v),i.internalSetState(function(T){var I=T.isOpen;return ae({isOpen:!I},I&&{highlightedIndex:i.props.defaultHighlightedIndex},v)},function(){var T=i.getState(),I=T.isOpen,D=T.highlightedIndex;I&&i.getItemCount()>0&&typeof D=="number"&&i.setHighlightedIndex(D,v),Qp(w)()})},i.openMenu=function(v){i.internalSetState({isOpen:!0},v)},i.closeMenu=function(v){i.internalSetState({isOpen:!1},v)},i.updateStatus=xl(function(){var v=i.getState(),w=i.items[v.highlightedIndex],T=i.getItemCount(),I=i.props.getA11yStatusMessage(ae({itemToString:i.props.itemToString,previousResultCount:i.previousResultCount,resultCount:T,highlightedItem:w},v));i.previousResultCount=T,Sl(I,i.props.environment.document)},200);var a=i.props,s=a.defaultHighlightedIndex,c=a.initialHighlightedIndex,u=c===void 0?s:c,f=a.defaultIsOpen,d=a.initialIsOpen,m=d===void 0?f:d,p=a.initialInputValue,b=p===void 0?"":p,y=a.initialSelectedItem,$=y===void 0?null:y,x=i.getState({highlightedIndex:u,isOpen:m,inputValue:b,selectedItem:$});return x.selectedItem!=null&&i.props.initialInputValue===void 0&&(x.inputValue=i.props.itemToString(x.selectedItem)),i.state=x,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(),f=u.highlightedIndex;if(c>0){var d=Pr(i,f,c,function(m){return s.getItemNodeFromIndex(m)});this.setHighlightedIndex(d,a)}},r.getStateAndHelpers=function(){var i=this.getState(),a=i.highlightedIndex,s=i.inputValue,c=i.selectedItem,u=i.isOpen,f=this.props.itemToString,d=this.id,m=this.getRootProps,p=this.getToggleButtonProps,b=this.getLabelProps,y=this.getMenuProps,$=this.getInputProps,x=this.getItemProps,v=this.openMenu,w=this.closeMenu,T=this.toggleMenu,I=this.selectItem,D=this.selectItemAtIndex,A=this.selectHighlightedItem,F=this.setHighlightedIndex,k=this.clearSelection,B=this.clearItems,R=this.reset,E=this.setItemCount,h=this.unsetItemCount,C=this.internalSetState;return{getRootProps:m,getToggleButtonProps:p,getLabelProps:b,getMenuProps:y,getInputProps:$,getItemProps:x,reset:R,openMenu:v,closeMenu:w,toggleMenu:T,selectItem:I,selectItemAtIndex:D,selectHighlightedItem:A,setHighlightedIndex:F,clearSelection:k,clearItems:B,setItemCount:E,unsetItemCount:h,setState:C,itemToString:f,id:d,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&&th(this._menuNode,this.getMenuProps);{var a=function(){i.isMouseDown=!0},s=function(p){i.isMouseDown=!1;var b=Xa(p.target,[i._rootNode,i._menuNode],i.props.environment);!b&&i.getState().isOpen&&i.reset({type:mg},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},c=function(){i.isTouchMove=!1},u=function(){i.isTouchMove=!0},f=function(p){var b=Xa(p.target,[i._rootNode,i._menuNode],i.props.environment,!1);!i.isTouchMove&&!b&&i.getState().isOpen&&i.reset({type:Ig},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},d=this.props.environment;d.addEventListener("mousedown",a),d.addEventListener("mouseup",s),d.addEventListener("touchstart",c),d.addEventListener("touchmove",u),d.addEventListener("touchend",f),this.cleanup=function(){i.internalClearTimeouts(),i.updateStatus.cancel(),d.removeEventListener("mousedown",a),d.removeEventListener("mouseup",s),d.removeEventListener("touchstart",c),d.removeEventListener("touchmove",u),d.removeEventListener("touchend",f)}}},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,f=u.highlightedIndex,d=c&&this.getState().isOpen&&!i.isOpen,m=c!==f;return d||m},r.componentDidUpdate=function(i,a){process.env.NODE_ENV!=="production"&&(_l(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&th(this._menuNode,this.getMenuProps)),qa(this.props,"selectedItem")&&this.props.selectedItemChanged(i.selectedItem,this.props.selectedItem)&&this.internalSetState({type:Tg,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=eh(this.props.children,pn);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=eh(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(fg(a))return l.cloneElement(a,this.getRootProps(pg(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:dg,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:pn,onInputValueChange:pn,onUserAction:pn,onChange:pn,onSelect:pn,onOuterClick:pn,selectedItemChanged:function(n,r){return n!==r},environment:typeof window>"u"?{}:window,stateReducer:function(n,r){return r},suppressRefError:!1,scrollIntoView:ug},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 th(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=!fg(e);o&&!r&&!Xp.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+'"'),!Xp.isForwardRef(e)&&!pg(e)[n]&&console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')}var TI=["isInitialMount","highlightedIndex","items","environment"],Rg={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"+Cl(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=xl(function(e,t){Sl(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-"+lg():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 Og(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 Cl(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function $l(e){var t=l.useRef(e);return t.current=e,t}function Pg(e,t,n){var r=l.useRef(),o=l.useRef(),i=l.useCallback(function(m,p){o.current=p,m=_i(m,p.props);var b=e(m,p),y=p.props.stateReducer(m,ae({},p,{changes:b}));return y},[e]),a=l.useReducer(i,t),s=a[0],c=a[1],u=$l(n),f=l.useCallback(function(m){return c(ae({props:u.current},m))},[u]),d=o.current;return l.useEffect(function(){d&&r.current&&r.current!==s&&II(d,_i(r.current,d.props),s),r.current=s},[s,n,d]),[s,f]}function MI(e,t,n){var r=Pg(e,t,n),o=r[0],i=r[1];return[_i(o,n),i]}var ri={itemToString:kI,stateReducer:OI,getA11ySelectionMessage:PI,scrollIntoView:ug,environment:typeof window>"u"?{}:window};function Dn(e,t,n){n===void 0&&(n=Rg);var r=e["default"+Cl(t)];return r!==void 0?r:n[t]}function zo(e,t,n){n===void 0&&(n=Rg);var r=e[t];if(r!==void 0)return r;var o=e["initial"+Cl(t)];return o!==void 0?o:Dn(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(d){o.current.isMouseDown=!1,e&&!Xa(d.target,t.map(function(m){return m.current}),n)&&r()},s=function(){o.current.isTouchMove=!1},c=function(){o.current.isTouchMove=!0},u=function(d){e&&!o.current.isTouchMove&&!Xa(d.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 Tl=function(){return pn};process.env.NODE_ENV!=="production"&&(Tl=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,f=c.refKey,d=c.elementRef;(!d||!d.current)&&!u&&console.error('downshift: The ref prop "'+f+'" from '+s+" was not applied correctly on your element.")}),t.current=!1});var a=l.useCallback(function(s,c,u,f){i.current[s]={suppressRefError:c,refKey:u,elementRef:f}},[]);return a});function nh(e,t,n){var r=n.isInitialMount,o=n.highlightedIndex,i=n.items,a=n.environment,s=cn(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 Il=pn;process.env.NODE_ENV!=="production"&&(Il=function(t){var n=t.isInitialMount,r=t.props,o=t.state,i=l.useRef(r);l.useEffect(function(){n||(_l(o,i.current,r),i.current=r)},[o,r,n])});function rh(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:Dn(e,"isOpen"),highlightedIndex:Dn(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:Dn(o,"highlightedIndex"),isOpen:Dn(o,"isOpen"),selectedItem:Dn(o,"selectedItem"),inputValue:Dn(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.":""}Sn(Sn({},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 Rl=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,Ol=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,Pl=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,Al=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,Dl=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,Nl=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,kl=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,Ml=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,jl=process.env.NODE_ENV!=="production"?"__input_change__":8,Ga=process.env.NODE_ENV!=="production"?"__input_blur__":9,Ll=process.env.NODE_ENV!=="production"?"__input_focus__":10,Ag=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,Dg=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,Fl=process.env.NODE_ENV!=="production"?"__item_click__":13,Ng=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,kg=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,Mg=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,jg=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,Lg=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,Vl=process.env.NODE_ENV!=="production"?"__function_select_item__":19,Fg=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,Vg=process.env.NODE_ENV!=="production"?"__function_reset__":21,Bl=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,Bg=Object.freeze({__proto__:null,InputKeyDownArrowDown:Rl,InputKeyDownArrowUp:Ol,InputKeyDownEscape:Pl,InputKeyDownHome:Al,InputKeyDownEnd:Dl,InputKeyDownPageUp:Nl,InputKeyDownPageDown:kl,InputKeyDownEnter:Ml,InputChange:jl,InputBlur:Ga,InputFocus:Ll,MenuMouseLeave:Ag,ItemMouseMove:Dg,ItemClick:Fl,ToggleButtonClick:Ng,FunctionToggleMenu:kg,FunctionOpenMenu:Mg,FunctionCloseMenu:jg,FunctionSetHighlightedIndex:Lg,FunctionSelectItem:Vl,FunctionSetInputValue:Fg,FunctionReset:Vg,ControlledPropUpdatedSelectedItem:Bl});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=Pg(e,t,n),i=o[0],a=o[1];return l.useEffect(function(){qa(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&a({type:Bl,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)},[i.selectedItem,n.selectedItem]),[_i(i,n),a]}var Hg=pn;process.env.NODE_ENV!=="production"&&(Hg=function(t,n){X.checkPropTypes(WI,t,"prop",n.name)});var UI=ae({},ri,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:dg});function YI(e,t){var n,r=t.type,o=t.props,i=t.altKey,a;switch(r){case Fl:a={isOpen:Dn(o,"isOpen"),highlightedIndex:Dn(o,"highlightedIndex"),selectedItem:o.items[t.index],inputValue:o.itemToString(o.items[t.index])};break;case Rl:e.isOpen?a={highlightedIndex:Pr(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 Ol:e.isOpen?i?a=rh(o,e.highlightedIndex):a={highlightedIndex:Pr(-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:oi(o,e,-1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case Ml:a=rh(o,e.highlightedIndex);break;case Pl:a=ae({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Nl:a={highlightedIndex:Pr(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case kl:a={highlightedIndex:Pr(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Al:a={highlightedIndex:Vr(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case Dl:a={highlightedIndex:Vr(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)};break;case Ga: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 jl:a={isOpen:!0,highlightedIndex:Dn(o,"highlightedIndex"),inputValue:t.inputValue};break;case Ll:a={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case Vl:a={selectedItem:t.selectedItem,inputValue:o.itemToString(t.selectedItem)};break;case Bl:a={inputValue:t.inputValue};break;default:return VI(e,t,Bg)}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"];Or.stateChangeTypes=Bg;function Or(e){e===void 0&&(e={}),Hg(e,Or);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,f=HI(t),d=zI(YI,f,t),m=d[0],p=d[1],b=m.isOpen,y=m.highlightedIndex,$=m.selectedItem,x=m.inputValue,v=l.useRef(null),w=l.useRef({}),T=l.useRef(null),I=l.useRef(null),D=l.useRef(!0),A=NI(t),F=l.useRef(),k=$l({state:m,props:t}),B=l.useCallback(function(z){return w.current[A.getItemId(z)]},[A]);nh(s,[b,y,x,o],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m)),nh(c,[$],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:w,scrollIntoView:i,getItemNodeFromIndex:B});Il({isInitialMount:D.current,props:t,state:m}),l.useEffect(function(){var z=n||r||b;z&&T.current&&T.current.focus()},[]),l.useEffect(function(){D.current||(F.current=o.length)});var E=LI(b,[T,v,I],a,function(){p({type:Ga,selectItem:!1})}),h=Tl("getInputProps","getMenuProps");l.useEffect(function(){return D.current=!1,function(){D.current=!0}},[]),l.useEffect(function(){var z;if(!b)w.current={};else if(((z=a.document)==null?void 0:z.activeElement)!==T.current){var G;T==null||(G=T.current)==null||G.focus()}},[b,a]);var C=l.useMemo(function(){return{ArrowDown:function(G){G.preventDefault(),p({type:Rl,altKey:G.altKey,getItemNodeFromIndex:B})},ArrowUp:function(G){G.preventDefault(),p({type:Ol,altKey:G.altKey,getItemNodeFromIndex:B})},Home:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:Al,getItemNodeFromIndex:B}))},End:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:Dl,getItemNodeFromIndex:B}))},Escape:function(G){var re=k.current.state;(re.isOpen||re.inputValue||re.selectedItem||re.highlightedIndex>-1)&&(G.preventDefault(),p({type:Pl}))},Enter:function(G){var re=k.current.state;!re.isOpen||G.which===229||(G.preventDefault(),p({type:Ml,getItemNodeFromIndex:B}))},PageUp:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:Nl,getItemNodeFromIndex:B}))},PageDown:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:kl,getItemNodeFromIndex:B}))}}},[p,k,B]),P=l.useCallback(function(z){return ae({id:A.labelId,htmlFor:A.inputId},z)},[A]),j=l.useCallback(function(z,G){var re,ne=z===void 0?{}:z,ie=ne.onMouseLeave,ee=ne.refKey,pe=ee===void 0?"ref":ee,xe=ne.ref,Ee=cn(ne,KI),Ae=G===void 0?{}:G,Ie=Ae.suppressRefError,Le=Ie===void 0?!1:Ie;return h("getMenuProps",Le,pe,v),ae((re={},re[pe]=pr(xe,function(ke){v.current=ke}),re.id=A.menuId,re.role="listbox",re["aria-labelledby"]=Ee&&Ee["aria-label"]?void 0:""+A.labelId,re.onMouseLeave=Pt(ie,function(){p({type:Ag})}),re),Ee)},[p,h,A]),H=l.useCallback(function(z){var G,re,ne=z===void 0?{}:z,ie=ne.item,ee=ne.index,pe=ne.refKey,xe=pe===void 0?"ref":pe,Ee=ne.ref,Ae=ne.onMouseMove,Ie=ne.onMouseDown,Le=ne.onClick;ne.onPress;var ke=ne.disabled,at=cn(ne,qI),We=k.current,wt=We.props,Xe=We.state,At=Og(ie,ee,wt.items,"Pass either item or index to getItemProps!"),$e=At[1],Tt="onClick",Ge=Le,It=function(){$e!==Xe.highlightedIndex&&(R.current=!1,p({type:Dg,index:$e,disabled:ke}))},tt=function(){p({type:Fl,index:$e})},Dt=function(nt){return nt.preventDefault()};return ae((G={},G[xe]=pr(Ee,function(De){De&&(w.current[A.getItemId($e)]=De)}),G.disabled=ke,G.role="option",G["aria-selected"]=""+($e===Xe.highlightedIndex),G.id=A.getItemId($e),G),!ke&&(re={},re[Tt]=Pt(Ge,tt),re),{onMouseMove:Pt(Ae,It),onMouseDown:Pt(Ie,Dt)},at)},[p,k,R,A]),Y=l.useCallback(function(z){var G,re=z===void 0?{}:z,ne=re.onClick;re.onPress;var ie=re.refKey,ee=ie===void 0?"ref":ie,pe=re.ref,xe=cn(re,XI),Ee=k.current.state,Ae=function(){p({type:Ng})};return ae((G={},G[ee]=pr(pe,function(Ie){I.current=Ie}),G["aria-controls"]=A.menuId,G["aria-expanded"]=Ee.isOpen,G.id=A.toggleButtonId,G.tabIndex=-1,G),!xe.disabled&&ae({},{onClick:Pt(ne,Ae)}),xe)},[p,k,A]),oe=l.useCallback(function(z,G){var re,ne=z===void 0?{}:z,ie=ne.onKeyDown,ee=ne.onChange,pe=ne.onInput,xe=ne.onFocus,Ee=ne.onBlur;ne.onChangeText;var Ae=ne.refKey,Ie=Ae===void 0?"ref":Ae,Le=ne.ref,ke=cn(ne,GI),at=G===void 0?{}:G,We=at.suppressRefError,wt=We===void 0?!1:We;h("getInputProps",wt,Ie,T);var Xe=k.current.state,At=function(nt){var Zt=Si(nt);Zt&&C[Zt]&&C[Zt](nt)},$e=function(nt){p({type:jl,inputValue:nt.target.value})},Tt=function(nt){if(Xe.isOpen&&!E.current.isMouseDown){var Zt=nt.relatedTarget===null&&a.document.activeElement!==a.document.body;p({type:Ga,selectItem:!Zt})}},Ge=function(){Xe.isOpen||p({type:Ll})},It="onChange",tt={};if(!ke.disabled){var Dt;tt=(Dt={},Dt[It]=Pt(ee,pe,$e),Dt.onKeyDown=Pt(ie,At),Dt.onBlur=Pt(Ee,Tt),Dt.onFocus=Pt(xe,Ge),Dt)}return ae((re={},re[Ie]=pr(Le,function(De){T.current=De}),re["aria-activedescendant"]=Xe.isOpen&&Xe.highlightedIndex>-1?A.getItemId(Xe.highlightedIndex):"",re["aria-autocomplete"]="list",re["aria-controls"]=A.menuId,re["aria-expanded"]=Xe.isOpen,re["aria-labelledby"]=ke&&ke["aria-label"]?void 0:""+A.labelId,re.autoComplete="off",re.id=A.inputId,re.role="combobox",re.value=Xe.inputValue,re),tt,ke)},[h,k,A,C,p,E,a]),W=l.useCallback(function(){p({type:kg})},[p]),L=l.useCallback(function(){p({type:jg})},[p]),J=l.useCallback(function(){p({type:Mg})},[p]),U=l.useCallback(function(z){p({type:Lg,highlightedIndex:z})},[p]),K=l.useCallback(function(z){p({type:Vl,selectedItem:z})},[p]),Z=l.useCallback(function(z){p({type:Fg,inputValue:z})},[p]),ce=l.useCallback(function(){p({type:Vg})},[p]);return{getItemProps:H,getLabelProps:P,getMenuProps:j,getInputProps:oe,getToggleButtonProps:Y,toggleMenu:W,openMenu:J,closeMenu:L,setHighlightedIndex:U,setInputValue:Z,selectItem:K,reset:ce,highlightedIndex:y,isOpen:b,selectedItem:$,inputValue:x}}var Wg={activeIndex:-1,selectedItems:[]};function oh(e,t){return zo(e,t,Wg)}function ih(e,t){return Dn(e,t,Wg)}function ZI(e){var t=oh(e,"activeIndex"),n=oh(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function ah(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"},zg=pn;process.env.NODE_ENV!=="production"&&(zg=function(t,n){X.checkPropTypes(JI,t,"prop",n.name)});var Hl=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,Wl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,zl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,Ul=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,Yl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,Kl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,ql=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,Xl=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,Gl=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,Zl=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,Ql=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,Jl=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,ed=process.env.NODE_ENV!=="production"?"__function_reset__":12,tR=Object.freeze({__proto__:null,SelectedItemClick:Hl,SelectedItemKeyDownDelete:Wl,SelectedItemKeyDownBackspace:zl,SelectedItemKeyDownNavigationNext:Ul,SelectedItemKeyDownNavigationPrevious:Yl,DropdownKeyDownNavigationPrevious:Kl,DropdownKeyDownBackspace:ql,DropdownClick:Xl,FunctionAddSelectedItem:Gl,FunctionRemoveSelectedItem:Zl,FunctionSetSelectedItems:Ql,FunctionSetActiveIndex:Jl,FunctionReset:ed});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 Hl:c={activeIndex:r};break;case Yl:c={activeIndex:a-1<0?0:a-1};break;case Ul:c={activeIndex:a+1>=s.length?-1:a+1};break;case zl:case Wl:{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 Kl:c={activeIndex:s.length-1};break;case ql:c={selectedItems:s.slice(0,s.length-1)};break;case Gl:c={selectedItems:[].concat(s,[i])};break;case Xl:c={activeIndex:-1};break;case Zl:{var f=a,d=s.indexOf(i);if(d<0)break;s.length===1?f=-1:d===s.length-1&&(f=s.length-2),c={selectedItems:[].concat(s.slice(0,d),s.slice(d+1)),activeIndex:f};break}case Ql:{var m=t.selectedItems;c={selectedItems:m};break}case Jl:{var p=t.activeIndex;c={activeIndex:p};break}case ed:c={activeIndex:ih(o,"activeIndex"),selectedItems:ih(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"];td.stateChangeTypes=tR;function td(e){e===void 0&&(e={}),zg(e,td);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],f=c.activeIndex,d=c.selectedItems,m=l.useRef(!0),p=l.useRef(null),b=l.useRef(d),y=l.useRef();y.current=[];var $=$l({state:c,props:t});l.useEffect(function(){if(!m.current){if(d.length<b.current.length){var R=b.current.find(function(E){return d.indexOf(E)<0});Sl(n({itemToString:r,resultCount:d.length,removedSelectedItem:R,activeIndex:f,activeSelectedItem:d[f]}),o.document)}b.current=d}},[d.length]),l.useEffect(function(){m.current||(f===-1&&p.current?p.current.focus():y.current[f]&&y.current[f].focus())},[f]),Il({isInitialMount:m.current,props:t,state:c});var x=Tl("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:Yl})},R[i]=function(){u({type:Ul})},R.Delete=function(){u({type:Wl})},R.Backspace=function(){u({type:zl})},R},[u,i,a]),w=l.useMemo(function(){var R;return R={},R[a]=function(E){ah(E)&&u({type:Kl})},R.Backspace=function(h){ah(h)&&u({type:ql})},R},[u,a]),T=l.useCallback(function(R){var E,h=R===void 0?{}:R,C=h.refKey,P=C===void 0?"ref":C,j=h.ref,H=h.onClick,Y=h.onKeyDown,oe=h.selectedItem,W=h.index,L=cn(h,rR),J=$.current.state,U=Og(oe,W,J.selectedItems,"Pass either item or index to getSelectedItemProps!"),K=U[1],Z=K>-1&&K===J.activeIndex,ce=function(){u({type:Hl,index:K})},z=function(re){var ne=Si(re);ne&&v[ne]&&v[ne](re)};return ae((E={},E[P]=pr(j,function(G){G&&y.current.push(G)}),E.tabIndex=Z?0:-1,E.onClick=Pt(H,ce),E.onKeyDown=Pt(Y,z),E),L)},[u,$,v]),I=l.useCallback(function(R,E){var h,C=R===void 0?{}:R,P=C.refKey,j=P===void 0?"ref":P,H=C.ref,Y=C.onKeyDown,oe=C.onClick,W=C.preventKeyAction,L=W===void 0?!1:W,J=cn(C,oR),U=E===void 0?{}:E,K=U.suppressRefError,Z=K===void 0?!1:K;x("getDropdownProps",Z,j,p);var ce=function(re){var ne=Si(re);ne&&w[ne]&&w[ne](re)},z=function(){u({type:Xl})};return ae((h={},h[j]=pr(H,function(G){G&&(p.current=G)}),h),!L&&{onKeyDown:Pt(Y,ce),onClick:Pt(oe,z)},J)},[u,w,x]),D=l.useCallback(function(R){u({type:Gl,selectedItem:R})},[u]),A=l.useCallback(function(R){u({type:Zl,selectedItem:R})},[u]),F=l.useCallback(function(R){u({type:Ql,selectedItems:R})},[u]),k=l.useCallback(function(R){u({type:Jl,activeIndex:R})},[u]),B=l.useCallback(function(){u({type:ed})},[u]);return{getSelectedItemProps:T,getDropdownProps:I,addSelectedItem:D,removeSelectedItem:A,setSelectedItems:F,setActiveIndex:k,reset:B,selectedItems:d,activeIndex:f}}var iR="jbnkvn0",sh=Ke({defaultClassName:"jbnkvng",variantClassNames:{isDropdown:{true:"jbnkvnh"},highlighted:{true:"jbnkvni"},selected:{true:"jbnkvnj"},multiSelected:{true:"jbnkvnk"},isDisabled:{true:"jbnkvnl"}},defaultVariants:{},compoundVariants:[[{isDropdown:!0,highlighted:!0},"jbnkvnm"],[{isDropdown:!0,selected:!0},"jbnkvnn"],[{isDropdown:!0,isDisabled:!0},"jbnkvno"]]}),ch=Ke({defaultClassName:"jbnkvnd",variantClassNames:{isDropdown:{true:"jbnkvne",false:"jbnkvnf"}},defaultVariants:{},compoundVariants:[]}),aR="jbnkvn6",mc=Ke({defaultClassName:"",variantClassNames:{isRounded:{true:"jbnkvn1",false:"jbnkvn2"},isDisabled:{true:"jbnkvn3",false:"jbnkvn4"}},defaultVariants:{isRounded:!1},compoundVariants:[[{isRounded:!0,isDisabled:!1},"jbnkvn5"]]}),sR=Ke({defaultClassName:"jbnkvn7",variantClassNames:{isMobile:{true:"jbnkvn8",false:"jbnkvn9"},isDropdown:{true:"jbnkvna"},isReadOnly:{true:"jbnkvnb"}},defaultVariants:{isMobile:!0},compoundVariants:[]}),cR="jbnkvnc",uh="jbnkvnp";const Ug=l.createContext(void 0),uR=({children:e,contextValue:t})=>M.jsx(Ug.Provider,{value:t,children:e}),nd=()=>{const e=l.useContext(Ug);if(e===void 0)throw new Error("useSelectProvider must be used within a SelectProvider");return e},Yg=({children:e,renderer:t})=>{const{getMenuProps:n,isDropdown:r}=nd();return t?t({children:e,defaultClassName:ch,innerProps:n()}):M.jsx("div",{className:ch({isDropdown:!!r}),...n(),children:e})};Yg.defaultProps={renderer:void 0};const Kg=({renderer:e,item:t,itemIndex:n})=>{const{isMulti:r,selectedItem:o,multipleSelectedItems:i,highlightedIndex:a,getItemProps:s,onClickItem:c,isDropdown:u}=nd(),f=a===n,d=(o==null?void 0:o.value)===t.value&&!r,m=r&&i.includes(t)||!1,p=s({item:t,index:n,disabled:t.isDisabled,onClick:c});return e?e({defaultClassName:sh({highlighted:a===n,selected:o===t&&!r,multiSelected:i.includes(t),isDisabled:t.isDisabled}),innerProps:p,isMulti:r,item:t,itemIndex:n,isHighlighted:f,isSelected:d,isChecked:m}):M.jsxs("div",{className:sh({highlighted:f,selected:d,multiSelected:m,isDisabled:t.isDisabled,isDropdown:u}),...p,children:[M.jsx("span",{children:t.label}),r&&i.includes(t)&&M.jsx(Eu,{size:16,color:Ct.theme.colors.greenAccent1,"data-test-id":""})]},t.value)};Kg.defaultProps={renderer:void 0};const qg=({renderer:e,...t})=>{const{formState:n,isOpen:r,getToggleButtonProps:o,isDisabled:i,isDropdown:a}=nd(),s=a?16:24;if(e)return e({innerProps:o(),defaultClassName:uh,isOpen:r});const c=n==="disabled"?Ct.theme.colors.black:Ct.theme.colors.grey1;return M.jsx("div",{className:uh,"data-test-id":t["data-test-id"],"data-disabled":i,children:r?M.jsx(xu,{color:c,size:s}):M.jsx(si,{color:c,size:s})})};qg.defaultProps={renderer:void 0,"data-test-id":"CT_Component_IconChev"};const uo=l.forwardRef(({options:e,value:t,label:n,onChange:r,isLoading:o,components:i,required:a,containerStyles:s,isMulti:c,isReadOnly:u,isMobile:f,onClickItem:d,isDropdown:m,...p},b)=>{const{addonLeft:y,addonRight:$,helperTextLeft:x,helperTextRight:v,isError:w,errorMessage:T,isDisabled:I,isValid:D,isRounded:A,className:F}=p,[k,B]=l.useState(e),R=Du({isError:w,isDisabled:I,isValid:D}),E=l.useRef(null),h=u||m,C=A||m,{removeSelectedItem:P,selectedItems:j,addSelectedItem:H,getDropdownProps:Y}=td({initialSelectedItems:c&&t?t:[],onSelectedItemsChange(pe){c&&r(pe.selectedItems)}}),oe=l.useMemo(()=>j.length,[j]),W=l.useCallback(pe=>{let xe=pe;(c&&!f||h)&&(xe="");const Ee=new RegExp(xe.toLowerCase());return e.filter(Ae=>Ee.test(Ae.label.toLowerCase()))},[e]),{isOpen:L,getToggleButtonProps:J,getLabelProps:U,getMenuProps:K,getInputProps:Z,highlightedIndex:ce,getItemProps:z,selectedItem:G,openMenu:re,closeMenu:ne,setHighlightedIndex:ie}=Or({items:k,initialSelectedItem:c?void 0:t,onInputValueChange:({inputValue:pe})=>{B(W(pe||""))},onIsOpenChange:pe=>{var xe;if(pe.isOpen&&pe.selectedItem){const Ee=k.findIndex(Ae=>{var Ie;return Ae.value===((Ie=pe.selectedItem)==null?void 0:Ie.value)});ie(Ee)}else pe.isOpen||((xe=E.current)==null||xe.blur(),ie(-1))},itemToString(pe){return pe?pe.label:""},onSelectedItemChange(pe){var xe;c||(r(pe.selectedItem),h&&((xe=E.current)==null||xe.blur()),ne())},stateReducer:(pe,xe)=>{const{changes:Ee,type:Ae}=xe,Ie=k.find((Le,ke)=>ke===pe.highlightedIndex);switch(Ae){case Or.stateChangeTypes.InputKeyDownEnter:case Or.stateChangeTypes.ItemClick:if(c){let Le=oe;return j.includes(Ie)?(Le-=1,P(Ie)):(Le+=1,H(Ie)),{...Ee,isOpen:!0,highlightedIndex:pe.highlightedIndex,inputValue:!f&&Le>0?`${Le} items selected`:""}}return{...Ee,isOpen:!1,highlightedIndex:pe.highlightedIndex,inputValue:Ee.inputValue};case Or.stateChangeTypes.InputFocus:return{...Ee,highlightedIndex:-1,isOpen:pe.isOpen};case Or.stateChangeTypes.InputBlur:{let Le=Ee.inputValue;return c&&!f&&(oe>0?Le=`${oe} items selected`:Le=""),{...Ee,inputValue:Le}}default:return Ee}}});l.useImperativeHandle(b,()=>E.current);const ee={isOpen:L,formState:R,selectedItem:G,multipleSelectedItems:j,isMulti:c,isDisabled:I,totalSelected:oe,highlightedIndex:ce,getMenuProps:K,getItemProps:z,getToggleButtonProps:J,onClickItem:d,isDropdown:m,openMenu:re,closeMenu:ne};return M.jsx(uR,{contextValue:ee,children:M.jsxs(et,{position:"relative",w:"$full",className:F,...J({disabled:!!I}),children:[M.jsxs(wo,{addonLeft:y,addonRight:$,helperTextLeft:x,helperTextRight:v,isError:w,errorMessage:T,isDisabled:I,isValid:D,inputAreaClassName:Te(iR,mc({isRounded:C})),className:mc({isRounded:C,isDisabled:!!I}),children:[M.jsxs("div",{className:aR,children:[M.jsx("input",{"data-test-id":p["data-test-id"],...Z(Y({preventKeyAction:L,ref:E,placeholder:n,readOnly:h,disabled:I,className:sR({isMobile:f,isReadOnly:h,isDropdown:m})}))}),f&&c&&M.jsx("div",{className:cR,children:oe>0?`${oe} items selected`:""}),f&&M.jsx(Di,{isSelect:!0,isError:w,isDisabled:I,required:a,className:mc({isRounded:C}),...U(),children:n})]}),M.jsx(qg,{renderer:i==null?void 0:i.Toggle})]}),L&&M.jsx(Yg,{renderer:i==null?void 0:i.List,children:k.map((pe,xe)=>M.jsx(Kg,{renderer:i==null?void 0:i.ListItem,itemIndex:xe,item:pe}))})]})})});uo.displayName="Select";uo.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 Xg=e=>{const t=`0${e}`;return t.substring(t.length-2,t.length)},lR=Array.from({length:31},(e,t)=>({label:Xg(t+1),value:String(t+1),isDisabled:!1})),Za=["January","February","March","April","May","June","July","August","September","October","November","December"],dR=Za.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:Xg(n.getDate()),value:n.getDate().toString(),isDisabled:!1};if(e==="month")return{label:Za[n.getMonth()],value:Za[n.getMonth()],isDisabled:!1};if(e==="year"){const r=n.getFullYear().toString();return{label:r,value:r,isDisabled:!1}}}},ii=e=>Za.findIndex(t=>t===e),lh=(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<=lh(n,t)&&o>new Date(n,ii(t),e,0,0,0,0)?!0:e&&t&&!n?ii(t)===1?e<=29:e<=lh(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},Gg=({title:e,maxDate:t,isMobile:n,defaultDate:r,onSaveDate:o,onClose:i,isOpen:a,buttonText:s,errorMessage:c,...u})=>{const[f,d]=l.useState(),[m,p]=l.useState(),[b,y]=l.useState(),$=()=>{d(void 0),p(void 0),y(void 0)},x=l.useMemo(()=>{if(a){if(f)return f;if(r)return gc("date",r)}},[r,f,a]),v=l.useMemo(()=>{if(a){if(m)return m;if(r)return gc("month",r)}},[r,m,a]),w=l.useMemo(()=>{if(a){if(b)return b;if(r)return gc("year",r)}},[r,b,a]),T=l.useMemo(()=>x||v||w?pR({date:x?Number(x==null?void 0:x.value):0,month:v?v.value:"",year:w?Number(w.value):0,maxDate:t}):!1,[x,v,w,t]),I=x&&v&&!w&&!T,D=x&&!v&&w&&!T,A=!x&&v&&w&&!T,F=x&&v&&w&&!T;return M.jsx(Ai,{...u,isOpen:a,onClose:()=>{i==null||i(),$()},onCloseAutoFocus:k=>{k.preventDefault()},onOpenAutoFocus:k=>{k.preventDefault()},noPadding:!0,closeIcon:M.jsx(et,{}),children:M.jsxs(Ar,{gap:"$8",children:[M.jsxs(Ht,{p:"$16",justifyContent:"space-between",gap:"$16",alignItems:"center",children:[M.jsx(Xt,{fontWeight:"$bold",textStyle:"subtitle2",children:e}),M.jsx(Wr,{onClick:i,"data-test-id":"CT_Component_closeSelectPicker"})]}),M.jsxs(Ar,{gap:"$16",px:"$24",pb:"$24",children:[M.jsxs(Ar,{children:[M.jsxs(Ht,{gap:"$12",px:"$2",mb:"$4",children:[M.jsx(uo,{isDropdown:!0,name:"date",label:"Date",value:x,isMobile:n,options:lR,onChange:d,isError:I||D||F,"data-test-id":"CT_Component_SelectPicker_dateField"}),M.jsx(uo,{isDropdown:!0,name:"month",label:"Month",value:v,isMobile:n,options:dR,onChange:p,isError:A||I||F,"data-test-id":"CT_Component_SelectPicker_monthField"}),M.jsx(uo,{isDropdown:!0,name:"year",label:"Year",value:w,isMobile:n,options:fR(t),onChange:y,isError:A||D||F,"data-test-id":"CT_Component_SelectPicker_yearField"})]}),(F||A||D||I)&&M.jsx(Xt,{px:"$2",color:"$redAccent1",fontSize:"$caption",lineHeight:"$16",fontWeight:"$medium",children:c})]}),M.jsx(mo,{onClick:()=>{o(new Date(Number(w==null?void 0:w.value),ii(v==null?void 0:v.value),Number(x==null?void 0:x.value))),$()},isDisabled:!w||!v||!x||!T,"data-test-id":"CT_Component_SelectPicker_buttonSave",type:"button",children:s})]})]})})};Gg.defaultProps={title:"Date of birth",isMobile:!1,defaultDate:void 0,maxDate:void 0,buttonText:"Confirm",errorMessage:"Invalid date of birth"};var hR=Ke({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 Zg=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:Te(hR({isActive:e,variant:t}),n),"data-test-id":i["data-test-id"],...i,children:r})});Zg.defaultProps={as:"span","data-test-id":void 0};const yc="rovingFocusGroup.onEntryFocus",vR={bubbles:!1,cancelable:!0},rd="RovingFocusGroup",[uu,Qg,mR]=Qa(rd),[gR,Jg]=yn(rd,[mR]),[yR,bR]=gR(rd),wR=l.forwardRef((e,t)=>l.createElement(uu.Provider,{scope:e.__scopeRovingFocusGroup},l.createElement(uu.Slot,{scope:e.__scopeRovingFocusGroup},l.createElement(ER,ae({},e,{ref:t}))))),ER=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,...f}=e,d=l.useRef(null),m=ut(t,d),p=Ja(i),[b=null,y]=$n({prop:a,defaultProp:s,onChange:c}),[$,x]=l.useState(!1),v=un(u),w=Qg(n),T=l.useRef(!1),[I,D]=l.useState(0);return l.useEffect(()=>{const A=d.current;if(A)return A.addEventListener(yc,v),()=>A.removeEventListener(yc,v)},[v]),l.createElement(yR,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:b,onItemFocus:l.useCallback(A=>y(A),[y]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>D(A=>A+1),[]),onFocusableItemRemove:l.useCallback(()=>D(A=>A-1),[])},l.createElement(Ue.div,ae({tabIndex:$||I===0?-1:0,"data-orientation":r},f,{ref:m,style:{outline:"none",...e.style},onMouseDown:Ne(e.onMouseDown,()=>{T.current=!0}),onFocus:Ne(e.onFocus,A=>{const F=!T.current;if(A.target===A.currentTarget&&F&&!$){const k=new CustomEvent(yc,vR);if(A.currentTarget.dispatchEvent(k),!k.defaultPrevented){const B=w().filter(P=>P.focusable),R=B.find(P=>P.active),E=B.find(P=>P.id===b),C=[R,E,...B].filter(Boolean).map(P=>P.ref.current);ey(C)}}T.current=!1}),onBlur:Ne(e.onBlur,()=>x(!1))})))}),xR="RovingFocusGroupItem",_R=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Gn(),c=i||s,u=bR(xR,n),f=u.currentTabStopId===c,d=Qg(n),{onFocusableItemAdd:m,onFocusableItemRemove:p}=u;return l.useEffect(()=>{if(r)return m(),()=>p()},[r,m,p]),l.createElement(uu.ItemSlot,{scope:n,id:c,focusable:r,active:o},l.createElement(Ue.span,ae({tabIndex:f?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:Ne(e.onMouseDown,b=>{r?u.onItemFocus(c):b.preventDefault()}),onFocus:Ne(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Ne(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=$R(b,u.orientation,u.dir);if(y!==void 0){b.preventDefault();let x=d().filter(v=>v.focusable).map(v=>v.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const v=x.indexOf(b.currentTarget);x=u.loop?TR(x,v+1):x.slice(v+1)}setTimeout(()=>ey(x))}})})))}),SR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function CR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function $R(e,t,n){const r=CR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return SR[r]}function ey(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function TR(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const IR=wR,RR=_R,ty="Radio",[OR,ny]=yn(ty),[PR,AR]=OR(ty),DR=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:c,...u}=e,[f,d]=l.useState(null),m=ut(t,y=>d(y)),p=l.useRef(!1),b=f?!!f.closest("form"):!0;return l.createElement(PR,{scope:n,checked:o,disabled:a},l.createElement(Ue.button,ae({type:"button",role:"radio","aria-checked":o,"data-state":ry(o),"data-disabled":a?"":void 0,disabled:a,value:s},u,{ref:m,onClick:Ne(e.onClick,y=>{o||c==null||c(),b&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})),b&&l.createElement(MR,{control:f,bubbles:!p.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))}),NR="RadioIndicator",kR=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=AR(NR,n);return l.createElement(yr,{present:r||i.checked},l.createElement(Ue.span,ae({"data-state":ry(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))}),MR=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=us(n),s=ss(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});d.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 ry(e){return e?"checked":"unchecked"}const jR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],oy="RadioGroup",[LR,kP]=yn(oy,[Jg,ny]),iy=Jg(),ay=ny(),[FR,VR]=LR(oy),BR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:c,dir:u,loop:f=!0,onValueChange:d,...m}=e,p=iy(n),b=Ja(u),[y,$]=$n({prop:i,defaultProp:o,onChange:d});return l.createElement(FR,{scope:n,name:r,required:a,disabled:s,value:y,onValueChange:$},l.createElement(IR,ae({asChild:!0},p,{orientation:c,dir:b,loop:f}),l.createElement(Ue.div,ae({role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":s?"":void 0,dir:b},m,{ref:t}))))}),HR="RadioGroupItem",WR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=VR(HR,n),a=i.disabled||r,s=iy(n),c=ay(n),u=l.useRef(null),f=ut(t,u),d=i.value===o.value,m=l.useRef(!1);return l.useEffect(()=>{const p=y=>{jR.includes(y.key)&&(m.current=!0)},b=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",b)}},[]),l.createElement(RR,ae({asChild:!0},s,{focusable:!a,active:d}),l.createElement(DR,ae({disabled:a,required:i.required,checked:d},c,o,{name:i.name,ref:f,onCheck:()=>i.onValueChange(o.value),onKeyDown:Ne(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Ne(o.onFocus,()=>{var p;m.current&&((p=u.current)===null||p===void 0||p.click())})})))}),zR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=ay(n);return l.createElement(kR,ae({},o,r,{ref:t}))}),UR=BR,YR=WR,KR=zR;var qR=Ke({defaultClassName:"d6umgr4",variantClassNames:{disabled:{true:"d6umgr5"}},defaultVariants:{},compoundVariants:[]}),XR="d6umgr1",GR=Ke({defaultClassName:"d6umgr2",variantClassNames:{disabled:{true:"d6umgr3"}},defaultVariants:{},compoundVariants:[]}),ZR="d6umgr0";const sy=({children:e,className:t,disabled:n,...r})=>{const o=l.useId();return M.jsxs(Ht,{alignItems:"center",children:[M.jsx(YR,{...r,disabled:n,className:Te(t,ZR),id:o,children:M.jsx(KR,{className:Te("radio-indicator",GR({disabled:n}))})}),e&&M.jsx("label",{className:Te("radio-label",qR({disabled:n})),htmlFor:o,children:e})]})};sy.defaultProps={children:void 0};const QR=({className:e,children:t,...n})=>M.jsx(UR,{...n,className:Te(e,XR),children:t});var JR="_846x3h2",eO="_846x3h0",tO="_846x3h1",nO=Ke({defaultClassName:"_846x3h3",variantClassNames:{size:{small:"_846x3h4",medium:"_846x3h5",large:"_846x3h6"},isHasIcon:{true:"_846x3h7"},isDisabled:{true:"_846x3h8"}},defaultVariants:{size:"small"},compoundVariants:[]});const od=l.forwardRef(({value:e,size:t,isDisabled:n,icon:r,onClear:o,onFocus:i,onBlur:a,withIcon:s,className:c,...u},f)=>{const[d,m]=l.useState(!1),p=x=>{i==null||i(x),m(!0)},b=x=>{a==null||a(x),m(!1)},y=()=>{o==null||o(),m(!1)},$=l.useMemo(()=>!!(s&&(r||e&&d)),[s,d,e,r]);return M.jsxs(et,{position:"relative",children:[M.jsx(et,{className:Te(eO),children:M.jsx(T0,{size:24})}),M.jsx("input",{className:Te(nO({size:t,isHasIcon:$,isDisabled:n}),c),ref:f,value:e,"data-test-id":u["data-test-id"],onFocus:p,onBlur:b,disabled:n,...u}),$&&M.jsx(et,{className:Te(tO),children:r&&(!d||d&&!e)?r:M.jsx(et,{className:Te(JR),onMouseDown:y,children:M.jsx(rs,{"data-test-id":"icon-close-search",onMouseDown:y,cursor:"pointer",size:24})})})]})});od.displayName="Search";od.defaultProps={icon:void 0,isDisabled:void 0,onClear:void 0,withIcon:!0,"data-test-id":void 0};const cy="Switch",[rO,MP]=yn(cy),[oO,iO]=rO(cy),aO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...f}=e,[d,m]=l.useState(null),p=ut(t,v=>m(v)),b=l.useRef(!1),y=d?!!d.closest("form"):!0,[$=!1,x]=$n({prop:o,defaultProp:i,onChange:u});return l.createElement(oO,{scope:n,checked:$,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"switch","aria-checked":$,"aria-required":a,"data-state":uy($),"data-disabled":s?"":void 0,disabled:s,value:c},f,{ref:p,onClick:Ne(e.onClick,v=>{x(w=>!w),y&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})})),y&&l.createElement(uO,{control:d,bubbles:!b.current,name:r,value:c,checked:$,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(Ue.span,ae({"data-state":uy(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=us(n),s=ss(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});d.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 uy(e){return e?"checked":"unchecked"}const lO=aO,dO=cO;var fO="b7c0j16",pO=Ke({defaultClassName:"b7c0j10",variantClassNames:{variant:{normal:"b7c0j11",small:"b7c0j12"}},defaultVariants:{variant:"normal"},compoundVariants:[]}),hO=Ke({defaultClassName:"b7c0j13",variantClassNames:{variant:{normal:"b7c0j14",small:"b7c0j15"}},defaultVariants:{variant:"normal"},compoundVariants:[]});const vO={normal:16,small:12},id=l.forwardRef((e,t)=>{const{size:n="normal"}=e;return M.jsx(lO,{ref:t,className:Te(pO({variant:n})),...e,children:M.jsx(dO,{className:Te(hO({variant:n})),children:M.jsx(Eu,{className:fO,size:vO[n]})})})});id.displayName="Switch";id.defaultProps={size:"normal"};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(Ht,{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 mO=Ke({defaultClassName:"",variantClassNames:{variant:{simple:"_94c6vs1",default:"_94c6vs2"}},defaultVariants:{},compoundVariants:[]}),gO=Ke({defaultClassName:"_94c6vs6",variantClassNames:{variant:{simple:"_94c6vs7",default:"_94c6vs8"}},defaultVariants:{},compoundVariants:[]}),dh=Ke({defaultClassName:"_94c6vs3",variantClassNames:{variant:{simple:"_94c6vs4",default:"_94c6vs5"}},defaultVariants:{},compoundVariants:[]}),yO="_94c6vs0";const dy=({data:e,columns:t})=>{const[n,r]=l.useState([]),[o,i]=l.useState([]),[a,s]=l.useState({by:"",order:""}),c=d=>{const{accessor:m}=d,p=d.sortable,b=a.by===m;return p?b&&a.order==="ASC"?s({by:m,order:"DESC"}):b&&a.order==="DESC"?s({by:"",order:""}):s({by:m,order:"ASC"}):null},u=d=>typeof d=="object"?"":d,f=l.useCallback((d,m)=>{const p=[...d];return m.order==="ASC"?p.sort((y,$)=>String($[m.by]).localeCompare(String(y[m.by]))):m.order==="DESC"?p.sort((y,$)=>String(y[m.by]).localeCompare(String($[m.by]))):[...d]},[]);return l.useEffect(()=>{const d=t.map(b=>({...b,sortable:b.sortable??!1}));r(d);const p=f(e,{by:a.by,order:a.order}).map(b=>d.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(p)},[t,e,f,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,variant:o,onSort:i,...a},s)=>{const c=t||"table",{rows:u,headers:f,handleHeaderClick:d,sortColumn:m}=dy({data:r,columns:e});return l.useEffect(()=>{i&&i(m)},[i,m]),M.jsxs(c,{ref:s,as:t,className:yO,"data-test-id":n,...a,children:[M.jsx("thead",{children:M.jsx("tr",{className:gO({variant:o}),children:f.filter(p=>!!p.label).map(p=>M.jsx("th",{"data-test-id":"",className:dh({variant:o}),onClick:()=>d(p),children:M.jsxs(Ht,{alignItems:"center",gap:"$8",justifyContent:"center",px:"$16",children:[M.jsx(et,{fontWeight:"$bold",color:o==="default"?"$whiteTypoHigh":"$blackTypoHigh",fontSize:"$body2",lineHeight:"$20",children:p.label}),M.jsx(ly,{accessor:p.accessor,sortable:p.sortable,sortColumn:m,"data-test-id":`table-sort-${p.label}`})]})},p.accessor))})}),M.jsx("tbody",{children:u.map((p,b)=>M.jsx("tr",{className:mO({variant:o}),children:p.map((y,$)=>M.jsx(et,{as:"td","data-test-id":`table-${n}-row${b}-col${$}`,className:dh({variant:o}),children:y.CellRenderer??y.value}))}))})]})});fy.defaultProps={variant:"default",as:"table","data-test-id":"base",onSort:void 0};var bO=Ke({defaultClassName:"_5wiwut0",variantClassNames:{isActive:{true:"_5wiwut1"}},defaultVariants:{isActive:!1},compoundVariants:[]});var wO=Ke({defaultClassName:"_1p5zdvr0",variantClassNames:{withShadow:{true:"_1p5zdvr1"},align:{left:"_1p5zdvr2",center:"_1p5zdvr3",right:"_1p5zdvr4"}},defaultVariants:{withShadow:!1,align:"left"},compoundVariants:[]});const ad=l.createContext({index:0,setIndex:()=>null}),sd=l.forwardRef(({as:e,children:t,withShadow:n,index:r,defaultIndex:o,align:i,onChange:a,className:s,...c},u)=>{const[f,d]=l.useState(o??0),m=l.useMemo(()=>l.Children.map(t,(y,$)=>l.cloneElement(y,{"data-index":$})),[t]);l.useEffect(()=>d(r??0),[r]);const p=l.useMemo(()=>({index:f,setIndex:$=>{d($),a==null||a($)}}),[f,a]),b=e||"ul";return M.jsx(b,{"data-test-id":c["data-test-id"],as:e,ref:u,className:Te(wO({withShadow:n,align:i}),s),...c,children:M.jsx(ad.Provider,{value:p,children:m})})});sd.displayName="Tabs";sd.defaultProps={as:"ul",defaultIndex:0,index:0,align:"left",withShadow:!1,children:void 0,onChange:()=>null,"data-test-id":void 0,className:void 0};const cd=l.forwardRef(({as:e,children:t,...n},r)=>{const{index:o,setIndex:i}=l.useContext(ad),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:Te(bO({isActive:s})),...n,children:M.jsx(Xt,{as:"span",textStyle:"body2",children:t})})});cd.displayName="TabItem";cd.defaultProps={as:"li","data-index":void 0,"data-test-id":void 0};const py="ToastProvider",[ud,EO,xO]=Qa("Toast"),[hy,jP]=yn("Toast",[xO]),[_O,Os]=hy(py),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,f]=l.useState(0),d=l.useRef(!1),m=l.useRef(!1);return l.createElement(ud.Provider,{scope:t},l.createElement(_O,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:s,onViewportChange:c,onToastAdd:l.useCallback(()=>f(p=>p+1),[]),onToastRemove:l.useCallback(()=>f(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:m},a))};vy.propTypes={label(e){if(e.label&&typeof e.label=="string"&&!e.label.trim()){const t=`Invalid prop \`label\` supplied to \`${py}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const SO="ToastViewport",CO=["F8"],lu="toast.viewportPause",du="toast.viewportResume",$O=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=CO,label:o="Notifications ({hotkey})",...i}=e,a=Os(SO,n),s=EO(n),c=l.useRef(null),u=l.useRef(null),f=l.useRef(null),d=l.useRef(null),m=ut(t,d,a.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;l.useEffect(()=>{const $=x=>{var v;r.every(T=>x[T]||x.code===T)&&((v=d.current)===null||v===void 0||v.focus())};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[r]),l.useEffect(()=>{const $=c.current,x=d.current;if(b&&$&&x){const v=()=>{if(!a.isClosePausedRef.current){const D=new CustomEvent(lu);x.dispatchEvent(D),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const D=new CustomEvent(du);x.dispatchEvent(D),a.isClosePausedRef.current=!1}},T=D=>{!$.contains(D.relatedTarget)&&w()},I=()=>{$.contains(document.activeElement)||w()};return $.addEventListener("focusin",v),$.addEventListener("focusout",T),$.addEventListener("pointermove",v),$.addEventListener("pointerleave",I),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{$.removeEventListener("focusin",v),$.removeEventListener("focusout",T),$.removeEventListener("pointermove",v),$.removeEventListener("pointerleave",I),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[b,a.isClosePausedRef]);const y=l.useCallback(({tabbingDirection:$})=>{const v=s().map(w=>{const T=w.ref.current,I=[T,...BO(T)];return $==="forwards"?I:I.reverse()});return($==="forwards"?v.reverse():v).flat()},[s]);return l.useEffect(()=>{const $=d.current;if($){const x=v=>{const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const F=document.activeElement,k=v.shiftKey;if(v.target===$&&k){var I;(I=u.current)===null||I===void 0||I.focus();return}const E=y({tabbingDirection:k?"backwards":"forwards"}),h=E.findIndex(C=>C===F);if(bc(E.slice(h+1)))v.preventDefault();else{var D,A;k?(D=u.current)===null||D===void 0||D.focus():(A=f.current)===null||A===void 0||A.focus()}}};return $.addEventListener("keydown",x),()=>$.removeEventListener("keydown",x)}},[s,y]),l.createElement(G0,{ref:c,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:b?void 0:"none"}},b&&l.createElement(fh,{ref:u,onFocusFromOutsideViewport:()=>{const $=y({tabbingDirection:"forwards"});bc($)}}),l.createElement(ud.Slot,{scope:n},l.createElement(Ue.ol,ae({tabIndex:-1},i,{ref:m}))),b&&l.createElement(fh,{ref:f,onFocusFromOutsideViewport:()=>{const $=y({tabbingDirection:"backwards"});bc($)}}))}),TO="ToastFocusProxy",fh=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Os(TO,n);return l.createElement(ls,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",IO="toast.swipeStart",RO="toast.swipeMove",OO="toast.swipeCancel",PO="toast.swipeEnd",AO=l.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,c]=$n({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:un(e.onPause),onResume:un(e.onResume),onSwipeStart:Ne(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ne(e.onSwipeMove,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Ne(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:Ne(e.onSwipeEnd,u=>{const{x:f,y:d}=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",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),c(!1)})})))}),[DO,NO]=hy(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:f,onSwipeMove:d,onSwipeCancel:m,onSwipeEnd:p,...b}=e,y=Os(Ps,n),[$,x]=l.useState(null),v=ut(t,C=>x(C)),w=l.useRef(null),T=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=un(()=>{var C;($==null?void 0:$.contains(document.activeElement))&&((C=y.viewport)===null||C===void 0||C.focus()),a()}),E=l.useCallback(C=>{!C||C===1/0||(window.clearTimeout(F.current),D.current=new Date().getTime(),F.current=window.setTimeout(R,C))},[R]);l.useEffect(()=>{const C=y.viewport;if(C){const P=()=>{E(A.current),u==null||u()},j=()=>{const H=new Date().getTime()-D.current;A.current=A.current-H,window.clearTimeout(F.current),c==null||c()};return C.addEventListener(lu,j),C.addEventListener(du,P),()=>{C.removeEventListener(lu,j),C.removeEventListener(du,P)}}},[y.viewport,I,c,u,E]),l.useEffect(()=>{i&&!y.isClosePausedRef.current&&E(I)},[i,I,y.isClosePausedRef,E]),l.useEffect(()=>(k(),()=>B()),[k,B]);const h=l.useMemo(()=>$?yy($):null,[$]);return y.viewport?l.createElement(l.Fragment,null,h&&l.createElement(kO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},h),l.createElement(DO,{scope:n,onClose:R},vn.createPortal(l.createElement(ud.ItemSlot,{scope:n},l.createElement(X0,{asChild:!0,onEscapeKeyDown:Ne(s,()=>{y.isFocusedToastEscapeKeyDownRef.current||R(),y.isFocusedToastEscapeKeyDownRef.current=!1})},l.createElement(Ue.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:Ne(e.onKeyDown,C=>{C.key==="Escape"&&(s==null||s(C.nativeEvent),C.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:Ne(e.onPointerDown,C=>{C.button===0&&(w.current={x:C.clientX,y:C.clientY})}),onPointerMove:Ne(e.onPointerMove,C=>{if(!w.current)return;const P=C.clientX-w.current.x,j=C.clientY-w.current.y,H=!!T.current,Y=["left","right"].includes(y.swipeDirection),oe=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,W=Y?oe(0,P):0,L=Y?0:oe(0,j),J=C.pointerType==="touch"?10:2,U={x:W,y:L},K={originalEvent:C,delta:U};H?(T.current=U,la(RO,d,K,{discrete:!1})):ph(U,y.swipeDirection,J)?(T.current=U,la(IO,f,K,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(P)>J||Math.abs(j)>J)&&(w.current=null)}),onPointerUp:Ne(e.onPointerUp,C=>{const P=T.current,j=C.target;if(j.hasPointerCapture(C.pointerId)&&j.releasePointerCapture(C.pointerId),T.current=null,w.current=null,P){const H=C.currentTarget,Y={originalEvent:C,delta:P};ph(P,y.swipeDirection,y.swipeThreshold)?la(PO,p,Y,{discrete:!0}):la(OO,m,Y,{discrete:!0}),H.addEventListener("click",oe=>oe.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 kO=e=>{const{__scopeToast:t,children:n,...r}=e,o=Os(Ps,t),[i,a]=l.useState(!1),[s,c]=l.useState(!1);return FO(()=>a(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:l.createElement(ev,{asChild:!0},l.createElement(ls,r,i&&l.createElement(l.Fragment,null,o.label," ",n)))},MO="ToastAction",ld=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?l.createElement(gy,{altText:n,asChild:!0},l.createElement(LO,ae({},r,{ref:t}))):null});ld.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${MO}\``)}};const jO="ToastClose",LO=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=NO(jO,n);return l.createElement(gy,{asChild:!0},l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ne(e.onClick,o.onClose)})))}),gy=l.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return l.createElement(Ue.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),VO(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 la(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?Eh(o,i):o.dispatchEvent(i)}const ph=(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 FO(e=()=>{}){const t=un(e);Gt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function VO(e){return e.nodeType===e.ELEMENT_NODE}function BO(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 HO=vy,by=$O,wy=AO,WO=ld;var zO="_10z4js29",UO=Ke({defaultClassName:"_10z4js25",variantClassNames:{color:{neutral:"_10z4js26",negative:"_10z4js27"}},defaultVariants:{color:"neutral"},compoundVariants:[]}),YO="_10z4js28",KO="_10z4js2a";const Ey=HO,dd=l.forwardRef(({className:e,...t},n)=>M.jsx(by,{ref:n,className:Te(KO,e),...t}));dd.displayName=by.displayName;const As=l.forwardRef(({className:e,color:t="neutral",...n},r)=>M.jsx(wy,{ref:r,className:Te(UO({color:t}),e),...n}));As.displayName=wy.displayName;As.defaultProps={viewPort:void 0,actionClassName:void 0};const fd=l.forwardRef(({className:e,...t},n)=>M.jsx(ld,{ref:n,className:Te(e),...t}));fd.displayName=WO.displayName;const qO=1,XO=1e6,Xn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let wc=0;function GO(){return wc=(wc+1)%Number.MAX_VALUE,wc.toString()}const Ec=new Map,hh=e=>{if(Ec.has(e))return;const t=setTimeout(()=>{Ec.delete(e),ai({type:Xn.REMOVE_TOAST,toastId:e})},XO);Ec.set(e,t)};function xy(e,t){switch(t.type){case Xn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,qO)};case Xn.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case Xn.DISMISS_TOAST:{const{toastId:n}=t;return n?hh(n):e.toasts.forEach(r=>{hh(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case Xn.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)};default:return e}}const Sa=[];let Ca={toasts:[]};function ai(e){Ca=xy(Ca,e),Sa.forEach(t=>{t(Ca)})}function _y({...e}){const t=GO(),n=o=>ai({type:Xn.UPDATE_TOAST,toast:{...o,id:t}}),r=()=>ai({type:Xn.DISMISS_TOAST,toastId:t});return ai({type:Xn.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(Ca);return l.useEffect(()=>(Sa.push(t),()=>{const n=Sa.indexOf(t);n>-1&&Sa.splice(n,1)}),[e]),{...e,toast:_y,dismiss:n=>ai({type:Xn.DISMISS_TOAST,toastId:n})}}const pd=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:f="foreground",color:d="neutral",viewPort:m,actionClassName:p,isDismissable:b=!0,...y})=>M.jsxs("div",{children:[M.jsxs(As,{ref:t,color:d,duration:u,type:f,"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(Xt,{textStyle:"body2",fontWeight:"$reguler",textOverflow:"ellipsis",overflow:"hidden",className:YO,children:i})}),!a&&c&&s?M.jsx(fd,{altText:s,asChild:!0,children:M.jsx(rg,{"data-test-id":`action-toast-${y["data-test-id"]??""}`,onClick:c,isStandalone:!0,className:Te(zO,p),children:s})}):a]},o),M.jsx(dd,{...m})]},o))})});pd.displayName="Toaster";const[Ds,LP]=yn("Tooltip",[cs]),Ns=cs(),ZO="TooltipProvider",QO=700,fu="tooltip.open",[JO,hd]=Ds(ZO),eP=e=>{const{__scopeTooltip:t,delayDuration:n=QO,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 f=u.current;return()=>window.clearTimeout(f)},[]),l.createElement(JO,{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(f=>{c.current=f},[]),disableHoverableContent:o},i)},vd="Tooltip",[tP,ks]=Ds(vd),nP=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,c=hd(vd,e.__scopeTooltip),u=Ns(t),[f,d]=l.useState(null),m=Gn(),p=l.useRef(0),b=a??c.disableHoverableContent,y=s??c.delayDuration,$=l.useRef(!1),[x=!1,v]=$n({prop:r,defaultProp:o,onChange:A=>{A?(c.onOpen(),document.dispatchEvent(new CustomEvent(fu))):c.onClose(),i==null||i(A)}}),w=l.useMemo(()=>x?$.current?"delayed-open":"instant-open":"closed",[x]),T=l.useCallback(()=>{window.clearTimeout(p.current),$.current=!1,v(!0)},[v]),I=l.useCallback(()=>{window.clearTimeout(p.current),v(!1)},[v]),D=l.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{$.current=!0,v(!0)},y)},[y,v]);return l.useEffect(()=>()=>window.clearTimeout(p.current),[]),l.createElement(Zh,u,l.createElement(tP,{scope:t,contentId:m,open:x,stateAttribute:w,trigger:f,onTriggerChange:d,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?D():T()},[c.isOpenDelayed,D,T]),onTriggerLeave:l.useCallback(()=>{b?I():window.clearTimeout(p.current)},[I,b]),onOpen:T,onClose:I,disableHoverableContent:b},n))},vh="TooltipTrigger",rP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ks(vh,n),i=hd(vh,n),a=Ns(n),s=l.useRef(null),c=ut(t,s,o.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),d=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),l.createElement(Qh,ae({asChild:!0},a),l.createElement(Ue.button,ae({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:c,onPointerMove:Ne(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:Ne(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:Ne(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ne(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Ne(e.onBlur,o.onClose),onClick:Ne(e.onClick,o.onClose)})))}),oP="TooltipPortal",[FP,iP]=Ds(oP,{forceMount:void 0}),Ci="TooltipContent",aP=l.forwardRef((e,t)=>{const n=iP(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(sP,ae({side:o},i,{ref:t})))}),sP=l.forwardRef((e,t)=>{const n=ks(Ci,e.__scopeTooltip),r=hd(Ci,e.__scopeTooltip),o=l.useRef(null),i=ut(t,o),[a,s]=l.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:d}=r,m=l.useCallback(()=>{s(null),d(!1)},[d]),p=l.useCallback((b,y)=>{const $=b.currentTarget,x={x:b.clientX,y:b.clientY},v=fP(x,$.getBoundingClientRect()),w=pP(x,v),T=hP(y.getBoundingClientRect()),I=mP([...w,...T]);s(I),d(!0)},[d]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(c&&f){const b=$=>p($,f),y=$=>p($,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",y)}}},[c,f,p,m]),l.useEffect(()=>{if(a){const b=y=>{const $=y.target,x={x:y.clientX,y:y.clientY},v=(c==null?void 0:c.contains($))||(f==null?void 0:f.contains($)),w=!vP(x,a);v?m():w&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,a,u,m]),l.createElement(Cy,ae({},e,{ref:i}))}),[cP,uP]=Ds(vd,{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:f}=c;return l.useEffect(()=>(document.addEventListener(fu,f),()=>document.removeEventListener(fu,f)),[f]),l.useEffect(()=>{if(c.trigger){const d=m=>{const p=m.target;p!=null&&p.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),l.createElement(os,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f},l.createElement(Jh,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(wh,null,r),l.createElement(cP,{scope:n,isInside:!0},l.createElement(n1,{id:c.contentId,role:"tooltip"},o||r))))}),lP="TooltipArrow",dP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ns(n);return uP(lP,n).isInside?null:l.createElement(e1,ae({},o,r,{ref:t}))});function fP(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 pP(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 vP(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,f=t[a].y;c>r!=f>r&&n<(u-s)*(r-c)/(f-c)+s&&(o=!o)}return o}function mP(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),gP(t)}function gP(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 yP=eP,bP=nP,wP=rP,EP=aP,xP=dP;function mh(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function _P(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 SP(e,t){var n={};if(typeof t=="object"){var r=e;$y(t,(a,s)=>{var c=_P(r,s);n[mh(c)]=String(a)})}else{var o=e;for(var i in o)n[mh(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 CP="var(--_4goys34)",$P="_4goys35",TP="_4goys36";const md=l.forwardRef(({align:e,alignOffset:t,children:n,color:r,bgColor:o,content:i,defaultOpen:a,delayDuration:s=700,disableHoverableContent:c,onOpenChange:u,open:f,position:d,positionOffset:m,withIcon:p,...b},y)=>{const $=Ct.atoms.commonAtoms({color:r,bgColor:o}).className,x=Ct.atoms.borderAtoms({borderColor:o}).className,w=o.replace("$","");return M.jsxs(bP,{defaultOpen:a,delayDuration:s,disableHoverableContent:c,onOpenChange:u,open:f,children:[M.jsx(wP,{asChild:!0,ref:y,children:n}),M.jsx(vs,{children:M.jsxs(EP,{align:e,alignOffset:t,side:d,sideOffset:m,...b,className:Te(TP,$,x),children:[M.jsxs(Ht,{gap:"$6",children:[p&&M.jsx(Ht,{width:"$24",children:M.jsx(P0,{size:24})}),i]}),M.jsx(xP,{className:$P,style:SP({[CP]:Ct.theme.colors[w]})})]})})]})});md.displayName="Tooltip";md.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 gd=({children:e})=>M.jsxs(yP,{children:[e,M.jsx(pd,{})]});gd.displayName="RadixProvider";const yd=({children:e,withScrollStyles:t})=>M.jsx("div",{id:"voila-ui",style:{fontFamily:Ct.theme.fonts.poppins},className:Te(t??Ct.scrollbarStyle),children:M.jsx(gd,{children:e})});yd.displayName="Provider";yd.defaultProps={withScrollStyles:!1};exports.Accordion=Db;exports.AccordionContent=p0;exports.AccordionItem=h0;exports.AccordionTrigger=L0;exports.Alert=Ph;exports.AspectRatio=_u;exports.Badge=Su;exports.BaseSelect=ju;exports.BottomSheet=B$;exports.Box=et;exports.Button=mo;exports.Card=yu;exports.Checkbox=Gm;exports.Chip=ul;exports.CloseButton=Wr;exports.ConfirmDialogContext=fl;exports.ConfirmDialogProvider=kT;exports.Container=bu;exports.DatePicker=uI;exports.Dialog=dl;exports.Divider=pl;exports.Flex=Ht;exports.FullLoader=ag;exports.Grid=wu;exports.IconButton=gl;exports.Image=yl;exports.Input=vl;exports.Link=rg;exports.List=bl;exports.ListItem=wl;exports.Loader=XT;exports.LoaderAnimated=El;exports.Modal=Ai;exports.ModalBody=Ts;exports.ModalFooter=Is;exports.ModalHeader=Rs;exports.MultiPicker=sg;exports.Overlay=qE;exports.Picker=au;exports.Pills=Zg;exports.Portal=vs;exports.Provider=yd;exports.Radio=sy;exports.RadioGroup=QR;exports.RadixProvider=gd;exports.Search=od;exports.Select=uo;exports.SelectPicker=Gg;exports.Spinner=_o;exports.Stack=Ar;exports.Switch=id;exports.TabItem=cd;exports.Table=fy;exports.Tabs=sd;exports.TabsContext=ad;exports.Text=Xt;exports.Textarea=ml;exports.Toast=As;exports.ToastAction=fd;exports.ToastProvider=Ey;exports.ToastViewport=dd;exports.Toaster=pd;exports.Tooltip=md;exports.linkRecipe=ng;exports.reducer=xy;exports.toast=_y;exports.useDialog=MT;exports.useIndeterminate=aT;exports.useOnMount=xv;exports.useRipple=cl;exports.useTableRenderer=dy;exports.useToast=Sy;
174
+ */var qp;function dI(){return qp||(qp=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,f=60115,d=60116,m=60121,p=60122,b=60117,y=60129,$=60131;if(typeof Symbol=="function"&&Symbol.for){var x=Symbol.for;e=x("react.element"),t=x("react.portal"),n=x("react.fragment"),r=x("react.strict_mode"),o=x("react.profiler"),i=x("react.provider"),a=x("react.context"),s=x("react.forward_ref"),c=x("react.suspense"),u=x("react.suspense_list"),f=x("react.memo"),d=x("react.lazy"),m=x("react.block"),p=x("react.server.block"),b=x("react.fundamental"),x("react.scope"),x("react.opaque.id"),y=x("react.debug_trace_mode"),x("react.offscreen"),$=x("react.legacy_hidden")}var v=!1;function w(ie){return!!(typeof ie=="string"||typeof ie=="function"||ie===n||ie===o||ie===y||ie===r||ie===c||ie===u||ie===$||v||typeof ie=="object"&&ie!==null&&(ie.$$typeof===d||ie.$$typeof===f||ie.$$typeof===i||ie.$$typeof===a||ie.$$typeof===s||ie.$$typeof===b||ie.$$typeof===m||ie[0]===p))}function T(ie){if(typeof ie=="object"&&ie!==null){var ee=ie.$$typeof;switch(ee){case e:var pe=ie.type;switch(pe){case n:case o:case r:case c:case u:return pe;default:var xe=pe&&pe.$$typeof;switch(xe){case a:case s:case d:case f:case i:return xe;default:return ee}}case t:return ee}}}var I=a,D=i,A=e,F=s,k=n,B=d,R=f,E=t,h=o,C=r,P=c,j=!1,H=!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 oe(ie){return H||(H=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(ie){return T(ie)===a}function L(ie){return T(ie)===i}function J(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===e}function U(ie){return T(ie)===s}function K(ie){return T(ie)===n}function Z(ie){return T(ie)===d}function ce(ie){return T(ie)===f}function z(ie){return T(ie)===t}function G(ie){return T(ie)===o}function re(ie){return T(ie)===r}function ne(ie){return T(ie)===c}yt.ContextConsumer=I,yt.ContextProvider=D,yt.Element=A,yt.ForwardRef=F,yt.Fragment=k,yt.Lazy=B,yt.Memo=R,yt.Portal=E,yt.Profiler=h,yt.StrictMode=C,yt.Suspense=P,yt.isAsyncMode=Y,yt.isConcurrentMode=oe,yt.isContextConsumer=W,yt.isContextProvider=L,yt.isElement=J,yt.isForwardRef=U,yt.isFragment=K,yt.isLazy=Z,yt.isMemo=ce,yt.isPortal=z,yt.isProfiler=G,yt.isStrictMode=re,yt.isSuspense=ne,yt.isValidElementType=w,yt.typeOf=T}()),yt}process.env.NODE_ENV==="production"?su.exports=lI():su.exports=dI();var Xp=su.exports;let Gp=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Zp=(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 Zp(n.overflowY,t)||Zp(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},ca=(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 pI=(e,t)=>{var n,r,o,i,a,s;if(typeof document>"u")return[];let{scrollMode:c,block:u,inline:f,boundary:d,skipOverflowHiddenElements:m}=t,p=typeof d=="function"?d:C=>C!==d;if(!Gp(e))throw new TypeError("Invalid target");let b=document.scrollingElement||document.documentElement,y=[],$=e;for(;Gp($)&&p($);){if($=fI($),$===b){y.push($);break}$!=null&&$===document.body&&vc($)&&!vc(document.documentElement)||$!=null&&vc($,m)&&y.push($)}let x=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,v=(i=(o=window.visualViewport)==null?void 0:o.height)!=null?i:innerHeight,w=(a=window.scrollX)!=null?a:pageXOffset,T=(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,E=f==="center"?B+D/2:f==="end"?F:B,h=[];for(let C=0;C<y.length;C++){let P=y[C],{height:j,width:H,top:Y,right:oe,bottom:W,left:L}=P.getBoundingClientRect();if(c==="if-needed"&&A>=0&&B>=0&&k<=v&&F<=x&&A>=Y&&k<=W&&B>=L&&F<=oe)return h;let J=getComputedStyle(P),U=parseInt(J.borderLeftWidth,10),K=parseInt(J.borderTopWidth,10),Z=parseInt(J.borderRightWidth,10),ce=parseInt(J.borderBottomWidth,10),z=0,G=0,re="offsetWidth"in P?P.offsetWidth-P.clientWidth-U-Z:0,ne="offsetHeight"in P?P.offsetHeight-P.clientHeight-K-ce:0,ie="offsetWidth"in P?P.offsetWidth===0?0:H/P.offsetWidth:0,ee="offsetHeight"in P?P.offsetHeight===0?0:j/P.offsetHeight:0;if(b===P)z=u==="start"?R:u==="end"?R-v:u==="nearest"?ca(T,T+v,v,K,ce,T+R,T+R+I,I):R-v/2,G=f==="start"?E:f==="center"?E-x/2:f==="end"?E-x:ca(w,w+x,x,U,Z,w+E,w+E+D,D),z=Math.max(0,z+T),G=Math.max(0,G+w);else{z=u==="start"?R-Y-K:u==="end"?R-W+ce+ne:u==="nearest"?ca(Y,W,j,K,ce+ne,R,R+I,I):R-(Y+j/2)+ne/2,G=f==="start"?E-L-U:f==="center"?E-(L+H/2)+re/2:f==="end"?E-oe+Z+re:ca(L,oe,H,U,Z+re,E,E+D,D);let{scrollLeft:pe,scrollTop:xe}=P;z=Math.max(0,Math.min(xe+z/ee,P.scrollHeight-j/ee+ne)),G=Math.max(0,Math.min(pe+G/ie,P.scrollWidth-H/ie+re)),R+=xe-z,E+=pe-G}h.push({el:P,top:z,left:G})}return h},hI=0;function Qp(e){return typeof e=="function"?e:pn}function pn(){}function ug(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 Jp(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function xl(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 Pt(){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 pr(){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 lg(){return String(hI++)}function dg(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 eh(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function fg(e){return typeof e.type=="string"}function pg(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 ua(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]=qa(t,r)?t[r]:e[r],n},{})}function qa(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 Pr(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=Vr(e,a,n,r,o);return s===-1?t>=n?-1:t:s}function Vr(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?Vr(1,0,n,r,!1):Vr(-1,n-1,n,r,!1):-1}function Xa(e,t,n,r){return r===void 0&&(r=!0),t.some(function(o){return o&&(Jp(o,e,n)||r&&Jp(o,n.document.activeElement,n))})}var _l=pn;process.env.NODE_ENV!=="production"&&(_l=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=xl(function(e){hg(e).textContent=""},500);function Sl(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 vg=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,mg=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,gg=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,xa=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,_a=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,yg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,bg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,wg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Eg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,xg=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,_g=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,Sg=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,Cg=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,cu=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,$g=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,Tg=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,Ig=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,bI=Object.freeze({__proto__:null,unknown:vg,mouseUp:mg,itemMouseEnter:gg,keyDownArrowUp:xa,keyDownArrowDown:_a,keyDownEscape:yg,keyDownEnter:bg,keyDownHome:wg,keyDownEnd:Eg,clickItem:xg,blurInput:_g,changeInput:Sg,keyDownSpaceButton:Cg,clickButton:cu,blurButton:$g,controlledPropUpdatedSelectedItem:Tg,touchEnd:Ig}),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){Nu(n,t);function n(o){var i;i=t.call(this,o)||this,i.id=i.props.id||"downshift-"+lg(),i.menuId=i.props.menuId||i.id+"-menu",i.labelId=i.props.labelId||i.id+"-label",i.inputId=i.props.inputId||i.id+"-input",i.getItemId=i.props.getItemId||function(v){return i.id+"-item-"+v},i.input=null,i.items=[],i.itemCount=null,i.previousResultCount=0,i.timeoutIds=[],i.internalSetTimeout=function(v,w){var T=setTimeout(function(){i.timeoutIds=i.timeoutIds.filter(function(I){return I!==T}),v()},w);i.timeoutIds.push(T)},i.setItemCount=function(v){i.itemCount=v},i.unsetItemCount=function(){i.itemCount=null},i.setHighlightedIndex=function(v,w){v===void 0&&(v=i.props.defaultHighlightedIndex),w===void 0&&(w={}),w=ua(w),i.internalSetState(ae({highlightedIndex:v},w))},i.clearSelection=function(v){i.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:i.props.defaultHighlightedIndex,isOpen:i.props.defaultIsOpen},v)},i.selectItem=function(v,w,T){w=ua(w),i.internalSetState(ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,selectedItem:v,inputValue:i.props.itemToString(v)},w),T)},i.selectItemAtIndex=function(v,w,T){var I=i.items[v];I!=null&&i.selectItem(I,w,T)},i.selectHighlightedItem=function(v,w){return i.selectItemAtIndex(i.getState().highlightedIndex,v,w)},i.internalSetState=function(v,w){var T,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),T=k.hasOwnProperty("selectedItem");var B={};return T&&k.selectedItem!==F.selectedItem&&(I=k.selectedItem),k.type=k.type||vg,Object.keys(k).forEach(function(R){F[R]!==k[R]&&(D[R]=k[R]),R!=="type"&&(k[R],qa(i.props,R)||(B[R]=k[R]))}),A&&k.hasOwnProperty("inputValue")&&i.props.onInputValueChange(k.inputValue,ae({},i.getStateAndHelpers(),k)),B},function(){Qp(w)();var F=Object.keys(D).length>1;F&&i.props.onStateChange(D,i.getStateAndHelpers()),T&&i.props.onSelect(v.selectedItem,i.getStateAndHelpers()),I!==void 0&&i.props.onChange(I,i.getStateAndHelpers()),i.props.onUserAction(D,i.getStateAndHelpers())})},i.rootRef=function(v){return i._rootNode=v},i.getRootProps=function(v,w){var T,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=cn(I,wI),B=w===void 0?{}:w,R=B.suppressRefError,E=R===void 0?!1:R;i.getRootProps.called=!0,i.getRootProps.refKey=A,i.getRootProps.suppressRefError=E;var h=i.getState(),C=h.isOpen;return ae((T={},T[A]=pr(F,i.rootRef),T.role="combobox",T["aria-expanded"]=C,T["aria-haspopup"]="listbox",T["aria-owns"]=C?i.menuId:null,T["aria-labelledby"]=i.labelId,T),k)},i.keyDownHandlers={ArrowDown:function(w){var T=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?5:1;this.moveHighlightedIndex(I,{type:_a})}else this.internalSetState({isOpen:!0,type:_a},function(){var D=T.getItemCount();if(D>0){var A=T.getState(),F=A.highlightedIndex,k=Pr(1,F,D,function(B){return T.getItemNodeFromIndex(B)});T.setHighlightedIndex(k,{type:_a})}})},ArrowUp:function(w){var T=this;if(w.preventDefault(),this.getState().isOpen){var I=w.shiftKey?-5:-1;this.moveHighlightedIndex(I,{type:xa})}else this.internalSetState({isOpen:!0,type:xa},function(){var D=T.getItemCount();if(D>0){var A=T.getState(),F=A.highlightedIndex,k=Pr(-1,F,D,function(B){return T.getItemNodeFromIndex(B)});T.setHighlightedIndex(k,{type:xa})}})},Enter:function(w){if(w.which!==229){var T=this.getState(),I=T.isOpen,D=T.highlightedIndex;if(I&&D!=null){w.preventDefault();var A=this.items[D],F=this.getItemNodeFromIndex(D);if(A==null||F&&F.hasAttribute("disabled"))return;this.selectHighlightedItem({type:bg})}}},Escape:function(w){w.preventDefault(),this.reset(ae({type:yg},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},i.buttonKeyDownHandlers=ae({},i.keyDownHandlers,{" ":function(w){w.preventDefault(),this.toggleMenu({type:Cg})}}),i.inputKeyDownHandlers=ae({},i.keyDownHandlers,{Home:function(w){var T=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Vr(1,0,A,function(k){return T.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:wg})}}},End:function(w){var T=this,I=this.getState(),D=I.isOpen;if(D){w.preventDefault();var A=this.getItemCount();if(!(A<=0||!D)){var F=Vr(-1,A-1,A,function(k){return T.getItemNodeFromIndex(k)},!1);this.setHighlightedIndex(F,{type:Eg})}}}}),i.getToggleButtonProps=function(v){var w=v===void 0?{}:v,T=w.onClick;w.onPress;var I=w.onKeyDown,D=w.onKeyUp,A=w.onBlur,F=cn(w,EI),k=i.getState(),B=k.isOpen,R={onClick:Pt(T,i.buttonHandleClick),onKeyDown:Pt(I,i.buttonHandleKeyDown),onKeyUp:Pt(D,i.buttonHandleKeyUp),onBlur:Pt(A,i.buttonHandleBlur)},E=F.disabled?{}:R;return ae({type:"button",role:"button","aria-label":B?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},E,F)},i.buttonHandleKeyUp=function(v){v.preventDefault()},i.buttonHandleKeyDown=function(v){var w=Si(v);i.buttonKeyDownHandlers[w]&&i.buttonKeyDownHandlers[w].call(Of(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 w=v.target;i.internalSetTimeout(function(){!i.isMouseDown&&(i.props.environment.document.activeElement==null||i.props.environment.document.activeElement.id!==i.inputId)&&i.props.environment.document.activeElement!==w&&i.reset({type:$g})})},i.getLabelProps=function(v){return ae({htmlFor:i.inputId,id:i.labelId},v)},i.getInputProps=function(v){var w=v===void 0?{}:v,T=w.onKeyDown,I=w.onBlur,D=w.onChange,A=w.onInput;w.onChangeText;var F=cn(w,xI),k,B={};k="onChange";var R=i.getState(),E=R.inputValue,h=R.isOpen,C=R.highlightedIndex;if(!F.disabled){var P;B=(P={},P[k]=Pt(D,A,i.inputHandleChange),P.onKeyDown=Pt(T,i.inputHandleKeyDown),P.onBlur=Pt(I,i.inputHandleBlur),P)}return ae({"aria-autocomplete":"list","aria-activedescendant":h&&typeof C=="number"&&C>=0?i.getItemId(C):null,"aria-controls":h?i.menuId:null,"aria-labelledby":F&&F["aria-label"]?void 0:i.labelId,autoComplete:"off",value:E,id:i.inputId},B,F)},i.inputHandleKeyDown=function(v){var w=Si(v);w&&i.inputKeyDownHandlers[w]&&i.inputKeyDownHandlers[w].call(Of(i),v)},i.inputHandleChange=function(v){i.internalSetState({type:Sg,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:_g})})},i.menuRef=function(v){i._menuNode=v},i.getMenuProps=function(v,w){var T,I=v===void 0?{}:v,D=I.refKey,A=D===void 0?"ref":D,F=I.ref,k=cn(I,_I),B=w===void 0?{}:w,R=B.suppressRefError,E=R===void 0?!1:R;return i.getMenuProps.called=!0,i.getMenuProps.refKey=A,i.getMenuProps.suppressRefError=E,ae((T={},T[A]=pr(F,i.menuRef),T.role="listbox",T["aria-labelledby"]=k&&k["aria-label"]?null:i.labelId,T.id=i.menuId,T),k)},i.getItemProps=function(v){var w,T=v===void 0?{}:v,I=T.onMouseMove,D=T.onMouseDown,A=T.onClick;T.onPress;var F=T.index,k=T.item,B=k===void 0?process.env.NODE_ENV==="production"?void 0:vI("getItemProps","item"):k,R=cn(T,SI);F===void 0?(i.items.push(B),F=i.items.indexOf(B)):i.items[F]=B;var E="onClick",h=A,C=(w={onMouseMove:Pt(I,function(){F!==i.getState().highlightedIndex&&(i.setHighlightedIndex(F,{type:gg}),i.avoidScrolling=!0,i.internalSetTimeout(function(){return i.avoidScrolling=!1},250))}),onMouseDown:Pt(D,function(j){j.preventDefault()})},w[E]=Pt(h,function(){i.selectItemAtIndex(F,{type:xg})}),w),P=R.disabled?{onMouseDown:C.onMouseDown}:C;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,w){v===void 0&&(v={}),v=ua(v),i.internalSetState(function(T){var I=T.selectedItem;return ae({isOpen:i.props.defaultIsOpen,highlightedIndex:i.props.defaultHighlightedIndex,inputValue:i.props.itemToString(I)},v)},w)},i.toggleMenu=function(v,w){v===void 0&&(v={}),v=ua(v),i.internalSetState(function(T){var I=T.isOpen;return ae({isOpen:!I},I&&{highlightedIndex:i.props.defaultHighlightedIndex},v)},function(){var T=i.getState(),I=T.isOpen,D=T.highlightedIndex;I&&i.getItemCount()>0&&typeof D=="number"&&i.setHighlightedIndex(D,v),Qp(w)()})},i.openMenu=function(v){i.internalSetState({isOpen:!0},v)},i.closeMenu=function(v){i.internalSetState({isOpen:!1},v)},i.updateStatus=xl(function(){var v=i.getState(),w=i.items[v.highlightedIndex],T=i.getItemCount(),I=i.props.getA11yStatusMessage(ae({itemToString:i.props.itemToString,previousResultCount:i.previousResultCount,resultCount:T,highlightedItem:w},v));i.previousResultCount=T,Sl(I,i.props.environment.document)},200);var a=i.props,s=a.defaultHighlightedIndex,c=a.initialHighlightedIndex,u=c===void 0?s:c,f=a.defaultIsOpen,d=a.initialIsOpen,m=d===void 0?f:d,p=a.initialInputValue,b=p===void 0?"":p,y=a.initialSelectedItem,$=y===void 0?null:y,x=i.getState({highlightedIndex:u,isOpen:m,inputValue:b,selectedItem:$});return x.selectedItem!=null&&i.props.initialInputValue===void 0&&(x.inputValue=i.props.itemToString(x.selectedItem)),i.state=x,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(),f=u.highlightedIndex;if(c>0){var d=Pr(i,f,c,function(m){return s.getItemNodeFromIndex(m)});this.setHighlightedIndex(d,a)}},r.getStateAndHelpers=function(){var i=this.getState(),a=i.highlightedIndex,s=i.inputValue,c=i.selectedItem,u=i.isOpen,f=this.props.itemToString,d=this.id,m=this.getRootProps,p=this.getToggleButtonProps,b=this.getLabelProps,y=this.getMenuProps,$=this.getInputProps,x=this.getItemProps,v=this.openMenu,w=this.closeMenu,T=this.toggleMenu,I=this.selectItem,D=this.selectItemAtIndex,A=this.selectHighlightedItem,F=this.setHighlightedIndex,k=this.clearSelection,B=this.clearItems,R=this.reset,E=this.setItemCount,h=this.unsetItemCount,C=this.internalSetState;return{getRootProps:m,getToggleButtonProps:p,getLabelProps:b,getMenuProps:y,getInputProps:$,getItemProps:x,reset:R,openMenu:v,closeMenu:w,toggleMenu:T,selectItem:I,selectItemAtIndex:D,selectHighlightedItem:A,setHighlightedIndex:F,clearSelection:k,clearItems:B,setItemCount:E,unsetItemCount:h,setState:C,itemToString:f,id:d,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&&th(this._menuNode,this.getMenuProps);{var a=function(){i.isMouseDown=!0},s=function(p){i.isMouseDown=!1;var b=Xa(p.target,[i._rootNode,i._menuNode],i.props.environment);!b&&i.getState().isOpen&&i.reset({type:mg},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},c=function(){i.isTouchMove=!1},u=function(){i.isTouchMove=!0},f=function(p){var b=Xa(p.target,[i._rootNode,i._menuNode],i.props.environment,!1);!i.isTouchMove&&!b&&i.getState().isOpen&&i.reset({type:Ig},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},d=this.props.environment;d.addEventListener("mousedown",a),d.addEventListener("mouseup",s),d.addEventListener("touchstart",c),d.addEventListener("touchmove",u),d.addEventListener("touchend",f),this.cleanup=function(){i.internalClearTimeouts(),i.updateStatus.cancel(),d.removeEventListener("mousedown",a),d.removeEventListener("mouseup",s),d.removeEventListener("touchstart",c),d.removeEventListener("touchmove",u),d.removeEventListener("touchend",f)}}},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,f=u.highlightedIndex,d=c&&this.getState().isOpen&&!i.isOpen,m=c!==f;return d||m},r.componentDidUpdate=function(i,a){process.env.NODE_ENV!=="production"&&(_l(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&th(this._menuNode,this.getMenuProps)),qa(this.props,"selectedItem")&&this.props.selectedItemChanged(i.selectedItem,this.props.selectedItem)&&this.internalSetState({type:Tg,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=eh(this.props.children,pn);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=eh(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(fg(a))return l.cloneElement(a,this.getRootProps(pg(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:dg,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:pn,onInputValueChange:pn,onUserAction:pn,onChange:pn,onSelect:pn,onOuterClick:pn,selectedItemChanged:function(n,r){return n!==r},environment:typeof window>"u"?{}:window,stateReducer:function(n,r){return r},suppressRefError:!1,scrollIntoView:ug},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 th(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=!fg(e);o&&!r&&!Xp.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+'"'),!Xp.isForwardRef(e)&&!pg(e)[n]&&console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')}var TI=["isInitialMount","highlightedIndex","items","environment"],Rg={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"+Cl(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=xl(function(e,t){Sl(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-"+lg():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 Og(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 Cl(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function $l(e){var t=l.useRef(e);return t.current=e,t}function Pg(e,t,n){var r=l.useRef(),o=l.useRef(),i=l.useCallback(function(m,p){o.current=p,m=_i(m,p.props);var b=e(m,p),y=p.props.stateReducer(m,ae({},p,{changes:b}));return y},[e]),a=l.useReducer(i,t),s=a[0],c=a[1],u=$l(n),f=l.useCallback(function(m){return c(ae({props:u.current},m))},[u]),d=o.current;return l.useEffect(function(){d&&r.current&&r.current!==s&&II(d,_i(r.current,d.props),s),r.current=s},[s,n,d]),[s,f]}function MI(e,t,n){var r=Pg(e,t,n),o=r[0],i=r[1];return[_i(o,n),i]}var ri={itemToString:kI,stateReducer:OI,getA11ySelectionMessage:PI,scrollIntoView:ug,environment:typeof window>"u"?{}:window};function Dn(e,t,n){n===void 0&&(n=Rg);var r=e["default"+Cl(t)];return r!==void 0?r:n[t]}function zo(e,t,n){n===void 0&&(n=Rg);var r=e[t];if(r!==void 0)return r;var o=e["initial"+Cl(t)];return o!==void 0?o:Dn(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(d){o.current.isMouseDown=!1,e&&!Xa(d.target,t.map(function(m){return m.current}),n)&&r()},s=function(){o.current.isTouchMove=!1},c=function(){o.current.isTouchMove=!0},u=function(d){e&&!o.current.isTouchMove&&!Xa(d.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 Tl=function(){return pn};process.env.NODE_ENV!=="production"&&(Tl=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,f=c.refKey,d=c.elementRef;(!d||!d.current)&&!u&&console.error('downshift: The ref prop "'+f+'" from '+s+" was not applied correctly on your element.")}),t.current=!1});var a=l.useCallback(function(s,c,u,f){i.current[s]={suppressRefError:c,refKey:u,elementRef:f}},[]);return a});function nh(e,t,n){var r=n.isInitialMount,o=n.highlightedIndex,i=n.items,a=n.environment,s=cn(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 Il=pn;process.env.NODE_ENV!=="production"&&(Il=function(t){var n=t.isInitialMount,r=t.props,o=t.state,i=l.useRef(r);l.useEffect(function(){n||(_l(o,i.current,r),i.current=r)},[o,r,n])});function rh(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:Dn(e,"isOpen"),highlightedIndex:Dn(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:Dn(o,"highlightedIndex"),isOpen:Dn(o,"isOpen"),selectedItem:Dn(o,"selectedItem"),inputValue:Dn(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.":""}Sn(Sn({},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 Rl=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,Ol=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,Pl=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,Al=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,Dl=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,Nl=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,kl=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,Ml=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,jl=process.env.NODE_ENV!=="production"?"__input_change__":8,Ga=process.env.NODE_ENV!=="production"?"__input_blur__":9,Ll=process.env.NODE_ENV!=="production"?"__input_focus__":10,Ag=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,Dg=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,Fl=process.env.NODE_ENV!=="production"?"__item_click__":13,Ng=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,kg=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,Mg=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,jg=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,Lg=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,Vl=process.env.NODE_ENV!=="production"?"__function_select_item__":19,Fg=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,Vg=process.env.NODE_ENV!=="production"?"__function_reset__":21,Bl=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,Bg=Object.freeze({__proto__:null,InputKeyDownArrowDown:Rl,InputKeyDownArrowUp:Ol,InputKeyDownEscape:Pl,InputKeyDownHome:Al,InputKeyDownEnd:Dl,InputKeyDownPageUp:Nl,InputKeyDownPageDown:kl,InputKeyDownEnter:Ml,InputChange:jl,InputBlur:Ga,InputFocus:Ll,MenuMouseLeave:Ag,ItemMouseMove:Dg,ItemClick:Fl,ToggleButtonClick:Ng,FunctionToggleMenu:kg,FunctionOpenMenu:Mg,FunctionCloseMenu:jg,FunctionSetHighlightedIndex:Lg,FunctionSelectItem:Vl,FunctionSetInputValue:Fg,FunctionReset:Vg,ControlledPropUpdatedSelectedItem:Bl});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=Pg(e,t,n),i=o[0],a=o[1];return l.useEffect(function(){qa(n,"selectedItem")&&(n.selectedItemChanged(r.current,n.selectedItem)&&a({type:Bl,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)},[i.selectedItem,n.selectedItem]),[_i(i,n),a]}var Hg=pn;process.env.NODE_ENV!=="production"&&(Hg=function(t,n){X.checkPropTypes(WI,t,"prop",n.name)});var UI=ae({},ri,{selectedItemChanged:function(t,n){return t!==n},getA11yStatusMessage:dg});function YI(e,t){var n,r=t.type,o=t.props,i=t.altKey,a;switch(r){case Fl:a={isOpen:Dn(o,"isOpen"),highlightedIndex:Dn(o,"highlightedIndex"),selectedItem:o.items[t.index],inputValue:o.itemToString(o.items[t.index])};break;case Rl:e.isOpen?a={highlightedIndex:Pr(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 Ol:e.isOpen?i?a=rh(o,e.highlightedIndex):a={highlightedIndex:Pr(-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!0)}:a={highlightedIndex:oi(o,e,-1,t.getItemNodeFromIndex),isOpen:o.items.length>=0};break;case Ml:a=rh(o,e.highlightedIndex);break;case Pl:a=ae({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Nl:a={highlightedIndex:Pr(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case kl:a={highlightedIndex:Pr(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,!1)};break;case Al:a={highlightedIndex:Vr(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case Dl:a={highlightedIndex:Vr(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)};break;case Ga: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 jl:a={isOpen:!0,highlightedIndex:Dn(o,"highlightedIndex"),inputValue:t.inputValue};break;case Ll:a={isOpen:!0,highlightedIndex:oi(o,e,0)};break;case Vl:a={selectedItem:t.selectedItem,inputValue:o.itemToString(t.selectedItem)};break;case Bl:a={inputValue:t.inputValue};break;default:return VI(e,t,Bg)}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"];Or.stateChangeTypes=Bg;function Or(e){e===void 0&&(e={}),Hg(e,Or);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,f=HI(t),d=zI(YI,f,t),m=d[0],p=d[1],b=m.isOpen,y=m.highlightedIndex,$=m.selectedItem,x=m.inputValue,v=l.useRef(null),w=l.useRef({}),T=l.useRef(null),I=l.useRef(null),D=l.useRef(!0),A=NI(t),F=l.useRef(),k=$l({state:m,props:t}),B=l.useCallback(function(z){return w.current[A.getItemId(z)]},[A]);nh(s,[b,y,x,o],ae({isInitialMount:D.current,previousResultCount:F.current,items:o,environment:a,itemToString:u},m)),nh(c,[$],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:w,scrollIntoView:i,getItemNodeFromIndex:B});Il({isInitialMount:D.current,props:t,state:m}),l.useEffect(function(){var z=n||r||b;z&&T.current&&T.current.focus()},[]),l.useEffect(function(){D.current||(F.current=o.length)});var E=LI(b,[T,v,I],a,function(){p({type:Ga,selectItem:!1})}),h=Tl("getInputProps","getMenuProps");l.useEffect(function(){return D.current=!1,function(){D.current=!0}},[]),l.useEffect(function(){var z;if(!b)w.current={};else if(((z=a.document)==null?void 0:z.activeElement)!==T.current){var G;T==null||(G=T.current)==null||G.focus()}},[b,a]);var C=l.useMemo(function(){return{ArrowDown:function(G){G.preventDefault(),p({type:Rl,altKey:G.altKey,getItemNodeFromIndex:B})},ArrowUp:function(G){G.preventDefault(),p({type:Ol,altKey:G.altKey,getItemNodeFromIndex:B})},Home:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:Al,getItemNodeFromIndex:B}))},End:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:Dl,getItemNodeFromIndex:B}))},Escape:function(G){var re=k.current.state;(re.isOpen||re.inputValue||re.selectedItem||re.highlightedIndex>-1)&&(G.preventDefault(),p({type:Pl}))},Enter:function(G){var re=k.current.state;!re.isOpen||G.which===229||(G.preventDefault(),p({type:Ml,getItemNodeFromIndex:B}))},PageUp:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:Nl,getItemNodeFromIndex:B}))},PageDown:function(G){k.current.state.isOpen&&(G.preventDefault(),p({type:kl,getItemNodeFromIndex:B}))}}},[p,k,B]),P=l.useCallback(function(z){return ae({id:A.labelId,htmlFor:A.inputId},z)},[A]),j=l.useCallback(function(z,G){var re,ne=z===void 0?{}:z,ie=ne.onMouseLeave,ee=ne.refKey,pe=ee===void 0?"ref":ee,xe=ne.ref,Ee=cn(ne,KI),Ae=G===void 0?{}:G,Ie=Ae.suppressRefError,Le=Ie===void 0?!1:Ie;return h("getMenuProps",Le,pe,v),ae((re={},re[pe]=pr(xe,function(ke){v.current=ke}),re.id=A.menuId,re.role="listbox",re["aria-labelledby"]=Ee&&Ee["aria-label"]?void 0:""+A.labelId,re.onMouseLeave=Pt(ie,function(){p({type:Ag})}),re),Ee)},[p,h,A]),H=l.useCallback(function(z){var G,re,ne=z===void 0?{}:z,ie=ne.item,ee=ne.index,pe=ne.refKey,xe=pe===void 0?"ref":pe,Ee=ne.ref,Ae=ne.onMouseMove,Ie=ne.onMouseDown,Le=ne.onClick;ne.onPress;var ke=ne.disabled,at=cn(ne,qI),We=k.current,wt=We.props,Xe=We.state,At=Og(ie,ee,wt.items,"Pass either item or index to getItemProps!"),$e=At[1],Tt="onClick",Ge=Le,It=function(){$e!==Xe.highlightedIndex&&(R.current=!1,p({type:Dg,index:$e,disabled:ke}))},tt=function(){p({type:Fl,index:$e})},Dt=function(nt){return nt.preventDefault()};return ae((G={},G[xe]=pr(Ee,function(De){De&&(w.current[A.getItemId($e)]=De)}),G.disabled=ke,G.role="option",G["aria-selected"]=""+($e===Xe.highlightedIndex),G.id=A.getItemId($e),G),!ke&&(re={},re[Tt]=Pt(Ge,tt),re),{onMouseMove:Pt(Ae,It),onMouseDown:Pt(Ie,Dt)},at)},[p,k,R,A]),Y=l.useCallback(function(z){var G,re=z===void 0?{}:z,ne=re.onClick;re.onPress;var ie=re.refKey,ee=ie===void 0?"ref":ie,pe=re.ref,xe=cn(re,XI),Ee=k.current.state,Ae=function(){p({type:Ng})};return ae((G={},G[ee]=pr(pe,function(Ie){I.current=Ie}),G["aria-controls"]=A.menuId,G["aria-expanded"]=Ee.isOpen,G.id=A.toggleButtonId,G.tabIndex=-1,G),!xe.disabled&&ae({},{onClick:Pt(ne,Ae)}),xe)},[p,k,A]),oe=l.useCallback(function(z,G){var re,ne=z===void 0?{}:z,ie=ne.onKeyDown,ee=ne.onChange,pe=ne.onInput,xe=ne.onFocus,Ee=ne.onBlur;ne.onChangeText;var Ae=ne.refKey,Ie=Ae===void 0?"ref":Ae,Le=ne.ref,ke=cn(ne,GI),at=G===void 0?{}:G,We=at.suppressRefError,wt=We===void 0?!1:We;h("getInputProps",wt,Ie,T);var Xe=k.current.state,At=function(nt){var Zt=Si(nt);Zt&&C[Zt]&&C[Zt](nt)},$e=function(nt){p({type:jl,inputValue:nt.target.value})},Tt=function(nt){if(Xe.isOpen&&!E.current.isMouseDown){var Zt=nt.relatedTarget===null&&a.document.activeElement!==a.document.body;p({type:Ga,selectItem:!Zt})}},Ge=function(){Xe.isOpen||p({type:Ll})},It="onChange",tt={};if(!ke.disabled){var Dt;tt=(Dt={},Dt[It]=Pt(ee,pe,$e),Dt.onKeyDown=Pt(ie,At),Dt.onBlur=Pt(Ee,Tt),Dt.onFocus=Pt(xe,Ge),Dt)}return ae((re={},re[Ie]=pr(Le,function(De){T.current=De}),re["aria-activedescendant"]=Xe.isOpen&&Xe.highlightedIndex>-1?A.getItemId(Xe.highlightedIndex):"",re["aria-autocomplete"]="list",re["aria-controls"]=A.menuId,re["aria-expanded"]=Xe.isOpen,re["aria-labelledby"]=ke&&ke["aria-label"]?void 0:""+A.labelId,re.autoComplete="off",re.id=A.inputId,re.role="combobox",re.value=Xe.inputValue,re),tt,ke)},[h,k,A,C,p,E,a]),W=l.useCallback(function(){p({type:kg})},[p]),L=l.useCallback(function(){p({type:jg})},[p]),J=l.useCallback(function(){p({type:Mg})},[p]),U=l.useCallback(function(z){p({type:Lg,highlightedIndex:z})},[p]),K=l.useCallback(function(z){p({type:Vl,selectedItem:z})},[p]),Z=l.useCallback(function(z){p({type:Fg,inputValue:z})},[p]),ce=l.useCallback(function(){p({type:Vg})},[p]);return{getItemProps:H,getLabelProps:P,getMenuProps:j,getInputProps:oe,getToggleButtonProps:Y,toggleMenu:W,openMenu:J,closeMenu:L,setHighlightedIndex:U,setInputValue:Z,selectItem:K,reset:ce,highlightedIndex:y,isOpen:b,selectedItem:$,inputValue:x}}var Wg={activeIndex:-1,selectedItems:[]};function oh(e,t){return zo(e,t,Wg)}function ih(e,t){return Dn(e,t,Wg)}function ZI(e){var t=oh(e,"activeIndex"),n=oh(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function ah(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"},zg=pn;process.env.NODE_ENV!=="production"&&(zg=function(t,n){X.checkPropTypes(JI,t,"prop",n.name)});var Hl=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,Wl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,zl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,Ul=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,Yl=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,Kl=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,ql=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,Xl=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,Gl=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,Zl=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,Ql=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,Jl=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,ed=process.env.NODE_ENV!=="production"?"__function_reset__":12,tR=Object.freeze({__proto__:null,SelectedItemClick:Hl,SelectedItemKeyDownDelete:Wl,SelectedItemKeyDownBackspace:zl,SelectedItemKeyDownNavigationNext:Ul,SelectedItemKeyDownNavigationPrevious:Yl,DropdownKeyDownNavigationPrevious:Kl,DropdownKeyDownBackspace:ql,DropdownClick:Xl,FunctionAddSelectedItem:Gl,FunctionRemoveSelectedItem:Zl,FunctionSetSelectedItems:Ql,FunctionSetActiveIndex:Jl,FunctionReset:ed});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 Hl:c={activeIndex:r};break;case Yl:c={activeIndex:a-1<0?0:a-1};break;case Ul:c={activeIndex:a+1>=s.length?-1:a+1};break;case zl:case Wl:{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 Kl:c={activeIndex:s.length-1};break;case ql:c={selectedItems:s.slice(0,s.length-1)};break;case Gl:c={selectedItems:[].concat(s,[i])};break;case Xl:c={activeIndex:-1};break;case Zl:{var f=a,d=s.indexOf(i);if(d<0)break;s.length===1?f=-1:d===s.length-1&&(f=s.length-2),c={selectedItems:[].concat(s.slice(0,d),s.slice(d+1)),activeIndex:f};break}case Ql:{var m=t.selectedItems;c={selectedItems:m};break}case Jl:{var p=t.activeIndex;c={activeIndex:p};break}case ed:c={activeIndex:ih(o,"activeIndex"),selectedItems:ih(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"];td.stateChangeTypes=tR;function td(e){e===void 0&&(e={}),zg(e,td);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],f=c.activeIndex,d=c.selectedItems,m=l.useRef(!0),p=l.useRef(null),b=l.useRef(d),y=l.useRef();y.current=[];var $=$l({state:c,props:t});l.useEffect(function(){if(!m.current){if(d.length<b.current.length){var R=b.current.find(function(E){return d.indexOf(E)<0});Sl(n({itemToString:r,resultCount:d.length,removedSelectedItem:R,activeIndex:f,activeSelectedItem:d[f]}),o.document)}b.current=d}},[d.length]),l.useEffect(function(){m.current||(f===-1&&p.current?p.current.focus():y.current[f]&&y.current[f].focus())},[f]),Il({isInitialMount:m.current,props:t,state:c});var x=Tl("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:Yl})},R[i]=function(){u({type:Ul})},R.Delete=function(){u({type:Wl})},R.Backspace=function(){u({type:zl})},R},[u,i,a]),w=l.useMemo(function(){var R;return R={},R[a]=function(E){ah(E)&&u({type:Kl})},R.Backspace=function(h){ah(h)&&u({type:ql})},R},[u,a]),T=l.useCallback(function(R){var E,h=R===void 0?{}:R,C=h.refKey,P=C===void 0?"ref":C,j=h.ref,H=h.onClick,Y=h.onKeyDown,oe=h.selectedItem,W=h.index,L=cn(h,rR),J=$.current.state,U=Og(oe,W,J.selectedItems,"Pass either item or index to getSelectedItemProps!"),K=U[1],Z=K>-1&&K===J.activeIndex,ce=function(){u({type:Hl,index:K})},z=function(re){var ne=Si(re);ne&&v[ne]&&v[ne](re)};return ae((E={},E[P]=pr(j,function(G){G&&y.current.push(G)}),E.tabIndex=Z?0:-1,E.onClick=Pt(H,ce),E.onKeyDown=Pt(Y,z),E),L)},[u,$,v]),I=l.useCallback(function(R,E){var h,C=R===void 0?{}:R,P=C.refKey,j=P===void 0?"ref":P,H=C.ref,Y=C.onKeyDown,oe=C.onClick,W=C.preventKeyAction,L=W===void 0?!1:W,J=cn(C,oR),U=E===void 0?{}:E,K=U.suppressRefError,Z=K===void 0?!1:K;x("getDropdownProps",Z,j,p);var ce=function(re){var ne=Si(re);ne&&w[ne]&&w[ne](re)},z=function(){u({type:Xl})};return ae((h={},h[j]=pr(H,function(G){G&&(p.current=G)}),h),!L&&{onKeyDown:Pt(Y,ce),onClick:Pt(oe,z)},J)},[u,w,x]),D=l.useCallback(function(R){u({type:Gl,selectedItem:R})},[u]),A=l.useCallback(function(R){u({type:Zl,selectedItem:R})},[u]),F=l.useCallback(function(R){u({type:Ql,selectedItems:R})},[u]),k=l.useCallback(function(R){u({type:Jl,activeIndex:R})},[u]),B=l.useCallback(function(){u({type:ed})},[u]);return{getSelectedItemProps:T,getDropdownProps:I,addSelectedItem:D,removeSelectedItem:A,setSelectedItems:F,setActiveIndex:k,reset:B,selectedItems:d,activeIndex:f}}var iR="jbnkvn0",sh=Ke({defaultClassName:"jbnkvng",variantClassNames:{isDropdown:{true:"jbnkvnh"},highlighted:{true:"jbnkvni"},selected:{true:"jbnkvnj"},multiSelected:{true:"jbnkvnk"},isDisabled:{true:"jbnkvnl"}},defaultVariants:{},compoundVariants:[[{isDropdown:!0,highlighted:!0},"jbnkvnm"],[{isDropdown:!0,selected:!0},"jbnkvnn"],[{isDropdown:!0,isDisabled:!0},"jbnkvno"]]}),ch=Ke({defaultClassName:"jbnkvnd",variantClassNames:{isDropdown:{true:"jbnkvne",false:"jbnkvnf"}},defaultVariants:{},compoundVariants:[]}),aR="jbnkvn6",mc=Ke({defaultClassName:"",variantClassNames:{isRounded:{true:"jbnkvn1",false:"jbnkvn2"},isDisabled:{true:"jbnkvn3",false:"jbnkvn4"}},defaultVariants:{isRounded:!1},compoundVariants:[[{isRounded:!0,isDisabled:!1},"jbnkvn5"]]}),sR=Ke({defaultClassName:"jbnkvn7",variantClassNames:{isMobile:{true:"jbnkvn8",false:"jbnkvn9"},isDropdown:{true:"jbnkvna"},isReadOnly:{true:"jbnkvnb"}},defaultVariants:{isMobile:!0},compoundVariants:[]}),cR="jbnkvnc",uh="jbnkvnp";const Ug=l.createContext(void 0),uR=({children:e,contextValue:t})=>M.jsx(Ug.Provider,{value:t,children:e}),nd=()=>{const e=l.useContext(Ug);if(e===void 0)throw new Error("useSelectProvider must be used within a SelectProvider");return e},Yg=({children:e,renderer:t})=>{const{getMenuProps:n,isDropdown:r}=nd();return t?t({children:e,defaultClassName:ch,innerProps:n()}):M.jsx("div",{className:ch({isDropdown:!!r}),...n(),children:e})};Yg.defaultProps={renderer:void 0};const Kg=({renderer:e,item:t,itemIndex:n})=>{const{isMulti:r,selectedItem:o,multipleSelectedItems:i,highlightedIndex:a,getItemProps:s,onClickItem:c,isDropdown:u}=nd(),f=a===n,d=(o==null?void 0:o.value)===t.value&&!r,m=r&&i.includes(t)||!1,p=s({item:t,index:n,disabled:t.isDisabled,onClick:c});return e?e({defaultClassName:sh({highlighted:a===n,selected:o===t&&!r,multiSelected:i.includes(t),isDisabled:t.isDisabled}),innerProps:p,isMulti:r,item:t,itemIndex:n,isHighlighted:f,isSelected:d,isChecked:m}):M.jsxs("div",{className:sh({highlighted:f,selected:d,multiSelected:m,isDisabled:t.isDisabled,isDropdown:u}),...p,children:[M.jsx("span",{children:t.label}),r&&i.includes(t)&&M.jsx(Eu,{size:16,color:Ct.theme.colors.greenAccent1,"data-test-id":""})]},t.value)};Kg.defaultProps={renderer:void 0};const qg=({renderer:e,...t})=>{const{formState:n,isOpen:r,getToggleButtonProps:o,isDisabled:i,isDropdown:a}=nd(),s=a?16:24;if(e)return e({innerProps:o(),defaultClassName:uh,isOpen:r});const c=n==="disabled"?Ct.theme.colors.black:Ct.theme.colors.grey1;return M.jsx("div",{className:uh,"data-test-id":t["data-test-id"],"data-disabled":i,children:r?M.jsx(xu,{color:c,size:s}):M.jsx(si,{color:c,size:s})})};qg.defaultProps={renderer:void 0,"data-test-id":"CT_Component_IconChev"};const uo=l.forwardRef(({options:e,value:t,label:n,onChange:r,isLoading:o,components:i,required:a,containerStyles:s,isMulti:c,isReadOnly:u,isMobile:f,onClickItem:d,isDropdown:m,...p},b)=>{const{addonLeft:y,addonRight:$,helperTextLeft:x,helperTextRight:v,isError:w,errorMessage:T,isDisabled:I,isValid:D,isRounded:A,className:F}=p,[k,B]=l.useState(e),R=Du({isError:w,isDisabled:I,isValid:D}),E=l.useRef(null),h=u||m,C=A||m,{removeSelectedItem:P,selectedItems:j,addSelectedItem:H,getDropdownProps:Y}=td({initialSelectedItems:c&&t?t:[],onSelectedItemsChange(pe){c&&r(pe.selectedItems)}}),oe=l.useMemo(()=>j.length,[j]),W=l.useCallback(pe=>{let xe=pe;(c&&!f||h)&&(xe="");const Ee=new RegExp(xe.toLowerCase());return e.filter(Ae=>Ee.test(Ae.label.toLowerCase()))},[e]),{isOpen:L,getToggleButtonProps:J,getLabelProps:U,getMenuProps:K,getInputProps:Z,highlightedIndex:ce,getItemProps:z,selectedItem:G,openMenu:re,closeMenu:ne,setHighlightedIndex:ie}=Or({items:k,initialSelectedItem:c?void 0:t,onInputValueChange:({inputValue:pe})=>{B(W(pe||""))},onIsOpenChange:pe=>{var xe;if(pe.isOpen&&pe.selectedItem){const Ee=k.findIndex(Ae=>{var Ie;return Ae.value===((Ie=pe.selectedItem)==null?void 0:Ie.value)});ie(Ee)}else pe.isOpen||((xe=E.current)==null||xe.blur(),ie(-1))},itemToString(pe){return pe?pe.label:""},onSelectedItemChange(pe){var xe;c||(r(pe.selectedItem),h&&((xe=E.current)==null||xe.blur()),ne())},stateReducer:(pe,xe)=>{const{changes:Ee,type:Ae}=xe,Ie=k.find((Le,ke)=>ke===pe.highlightedIndex);switch(Ae){case Or.stateChangeTypes.InputKeyDownEnter:case Or.stateChangeTypes.ItemClick:if(c){let Le=oe;return j.includes(Ie)?(Le-=1,P(Ie)):(Le+=1,H(Ie)),{...Ee,isOpen:!0,highlightedIndex:pe.highlightedIndex,inputValue:!f&&Le>0?`${Le} items selected`:""}}return{...Ee,isOpen:!1,highlightedIndex:pe.highlightedIndex,inputValue:Ee.inputValue};case Or.stateChangeTypes.InputFocus:return{...Ee,highlightedIndex:-1,isOpen:pe.isOpen};case Or.stateChangeTypes.InputBlur:{let Le=Ee.inputValue;return c&&!f&&(oe>0?Le=`${oe} items selected`:Le=""),{...Ee,inputValue:Le}}default:return Ee}}});l.useImperativeHandle(b,()=>E.current);const ee={isOpen:L,formState:R,selectedItem:G,multipleSelectedItems:j,isMulti:c,isDisabled:I,totalSelected:oe,highlightedIndex:ce,getMenuProps:K,getItemProps:z,getToggleButtonProps:J,onClickItem:d,isDropdown:m,openMenu:re,closeMenu:ne};return M.jsx(uR,{contextValue:ee,children:M.jsxs(et,{position:"relative",w:"$full",className:F,...J({disabled:!!I}),children:[M.jsxs(wo,{addonLeft:y,addonRight:$,helperTextLeft:x,helperTextRight:v,isError:w,errorMessage:T,isDisabled:I,isValid:D,inputAreaClassName:Te(iR,mc({isRounded:C})),className:mc({isRounded:C,isDisabled:!!I}),children:[M.jsxs("div",{className:aR,children:[M.jsx("input",{"data-test-id":p["data-test-id"],...Z(Y({preventKeyAction:L,ref:E,placeholder:n,readOnly:h,disabled:I,className:sR({isMobile:f,isReadOnly:h,isDropdown:m})}))}),f&&c&&M.jsx("div",{className:cR,children:oe>0?`${oe} items selected`:""}),f&&M.jsx(Di,{isSelect:!0,isError:w,isDisabled:I,required:a,className:mc({isRounded:C}),...U(),children:n})]}),M.jsx(qg,{renderer:i==null?void 0:i.Toggle})]}),L&&M.jsx(Yg,{renderer:i==null?void 0:i.List,children:k.map((pe,xe)=>M.jsx(Kg,{renderer:i==null?void 0:i.ListItem,itemIndex:xe,item:pe}))})]})})});uo.displayName="Select";uo.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 Xg=e=>{const t=`0${e}`;return t.substring(t.length-2,t.length)},lR=Array.from({length:31},(e,t)=>({label:Xg(t+1),value:String(t+1),isDisabled:!1})),Za=["January","February","March","April","May","June","July","August","September","October","November","December"],dR=Za.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:Xg(n.getDate()),value:n.getDate().toString(),isDisabled:!1};if(e==="month")return{label:Za[n.getMonth()],value:Za[n.getMonth()],isDisabled:!1};if(e==="year"){const r=n.getFullYear().toString();return{label:r,value:r,isDisabled:!1}}}},ii=e=>Za.findIndex(t=>t===e),lh=(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<=lh(n,t)&&o>new Date(n,ii(t),e,0,0,0,0)?!0:e&&t&&!n?ii(t)===1?e<=29:e<=lh(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},Gg=({title:e,maxDate:t,isMobile:n,defaultDate:r,onSaveDate:o,onClose:i,isOpen:a,buttonText:s,errorMessage:c,...u})=>{const[f,d]=l.useState(),[m,p]=l.useState(),[b,y]=l.useState(),$=()=>{d(void 0),p(void 0),y(void 0)},x=l.useMemo(()=>{if(a){if(f)return f;if(r)return gc("date",r)}},[r,f,a]),v=l.useMemo(()=>{if(a){if(m)return m;if(r)return gc("month",r)}},[r,m,a]),w=l.useMemo(()=>{if(a){if(b)return b;if(r)return gc("year",r)}},[r,b,a]),T=l.useMemo(()=>x||v||w?pR({date:x?Number(x==null?void 0:x.value):0,month:v?v.value:"",year:w?Number(w.value):0,maxDate:t}):!1,[x,v,w,t]),I=x&&v&&!w&&!T,D=x&&!v&&w&&!T,A=!x&&v&&w&&!T,F=x&&v&&w&&!T;return M.jsx(Ai,{...u,isOpen:a,onClose:()=>{i==null||i(),$()},onCloseAutoFocus:k=>{k.preventDefault()},onOpenAutoFocus:k=>{k.preventDefault()},noPadding:!0,closeIcon:M.jsx(et,{}),children:M.jsxs(Ar,{gap:"$8",children:[M.jsxs(Bt,{p:"$16",justifyContent:"space-between",gap:"$16",alignItems:"center",children:[M.jsx(Xt,{fontWeight:"$bold",textStyle:"subtitle2",children:e}),M.jsx(Wr,{onClick:i,"data-test-id":"CT_Component_closeSelectPicker"})]}),M.jsxs(Ar,{gap:"$16",px:"$24",pb:"$24",children:[M.jsxs(Ar,{children:[M.jsxs(Bt,{gap:"$12",px:"$2",mb:"$4",children:[M.jsx(uo,{isDropdown:!0,name:"date",label:"Date",value:x,isMobile:n,options:lR,onChange:d,isError:I||D||F,"data-test-id":"CT_Component_SelectPicker_dateField"}),M.jsx(uo,{isDropdown:!0,name:"month",label:"Month",value:v,isMobile:n,options:dR,onChange:p,isError:A||I||F,"data-test-id":"CT_Component_SelectPicker_monthField"}),M.jsx(uo,{isDropdown:!0,name:"year",label:"Year",value:w,isMobile:n,options:fR(t),onChange:y,isError:A||D||F,"data-test-id":"CT_Component_SelectPicker_yearField"})]}),(F||A||D||I)&&M.jsx(Xt,{px:"$2",color:"$redAccent1",fontSize:"$caption",lineHeight:"$16",fontWeight:"$medium",children:c})]}),M.jsx(mo,{onClick:()=>{o(new Date(Number(w==null?void 0:w.value),ii(v==null?void 0:v.value),Number(x==null?void 0:x.value))),$()},isDisabled:!w||!v||!x||!T,"data-test-id":"CT_Component_SelectPicker_buttonSave",type:"button",children:s})]})]})})};Gg.defaultProps={title:"Date of birth",isMobile:!1,defaultDate:void 0,maxDate:void 0,buttonText:"Confirm",errorMessage:"Invalid date of birth"};var hR=Ke({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 Zg=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:Te(hR({isActive:e,variant:t}),n),"data-test-id":i["data-test-id"],...i,children:r})});Zg.defaultProps={as:"span","data-test-id":void 0};const yc="rovingFocusGroup.onEntryFocus",vR={bubbles:!1,cancelable:!0},rd="RovingFocusGroup",[uu,Qg,mR]=Qa(rd),[gR,Jg]=yn(rd,[mR]),[yR,bR]=gR(rd),wR=l.forwardRef((e,t)=>l.createElement(uu.Provider,{scope:e.__scopeRovingFocusGroup},l.createElement(uu.Slot,{scope:e.__scopeRovingFocusGroup},l.createElement(ER,ae({},e,{ref:t}))))),ER=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,...f}=e,d=l.useRef(null),m=ut(t,d),p=Ja(i),[b=null,y]=$n({prop:a,defaultProp:s,onChange:c}),[$,x]=l.useState(!1),v=un(u),w=Qg(n),T=l.useRef(!1),[I,D]=l.useState(0);return l.useEffect(()=>{const A=d.current;if(A)return A.addEventListener(yc,v),()=>A.removeEventListener(yc,v)},[v]),l.createElement(yR,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:b,onItemFocus:l.useCallback(A=>y(A),[y]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>D(A=>A+1),[]),onFocusableItemRemove:l.useCallback(()=>D(A=>A-1),[])},l.createElement(Ue.div,ae({tabIndex:$||I===0?-1:0,"data-orientation":r},f,{ref:m,style:{outline:"none",...e.style},onMouseDown:Ne(e.onMouseDown,()=>{T.current=!0}),onFocus:Ne(e.onFocus,A=>{const F=!T.current;if(A.target===A.currentTarget&&F&&!$){const k=new CustomEvent(yc,vR);if(A.currentTarget.dispatchEvent(k),!k.defaultPrevented){const B=w().filter(P=>P.focusable),R=B.find(P=>P.active),E=B.find(P=>P.id===b),C=[R,E,...B].filter(Boolean).map(P=>P.ref.current);ey(C)}}T.current=!1}),onBlur:Ne(e.onBlur,()=>x(!1))})))}),xR="RovingFocusGroupItem",_R=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=Gn(),c=i||s,u=bR(xR,n),f=u.currentTabStopId===c,d=Qg(n),{onFocusableItemAdd:m,onFocusableItemRemove:p}=u;return l.useEffect(()=>{if(r)return m(),()=>p()},[r,m,p]),l.createElement(uu.ItemSlot,{scope:n,id:c,focusable:r,active:o},l.createElement(Ue.span,ae({tabIndex:f?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:Ne(e.onMouseDown,b=>{r?u.onItemFocus(c):b.preventDefault()}),onFocus:Ne(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Ne(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=$R(b,u.orientation,u.dir);if(y!==void 0){b.preventDefault();let x=d().filter(v=>v.focusable).map(v=>v.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const v=x.indexOf(b.currentTarget);x=u.loop?TR(x,v+1):x.slice(v+1)}setTimeout(()=>ey(x))}})})))}),SR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function CR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function $R(e,t,n){const r=CR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return SR[r]}function ey(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function TR(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const IR=wR,RR=_R,ty="Radio",[OR,ny]=yn(ty),[PR,AR]=OR(ty),DR=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:c,...u}=e,[f,d]=l.useState(null),m=ut(t,y=>d(y)),p=l.useRef(!1),b=f?!!f.closest("form"):!0;return l.createElement(PR,{scope:n,checked:o,disabled:a},l.createElement(Ue.button,ae({type:"button",role:"radio","aria-checked":o,"data-state":ry(o),"data-disabled":a?"":void 0,disabled:a,value:s},u,{ref:m,onClick:Ne(e.onClick,y=>{o||c==null||c(),b&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})),b&&l.createElement(MR,{control:f,bubbles:!p.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))}),NR="RadioIndicator",kR=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=AR(NR,n);return l.createElement(yr,{present:r||i.checked},l.createElement(Ue.span,ae({"data-state":ry(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))}),MR=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=l.useRef(null),a=us(n),s=ss(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});d.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 ry(e){return e?"checked":"unchecked"}const jR=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],oy="RadioGroup",[LR,kP]=yn(oy,[Jg,ny]),iy=Jg(),ay=ny(),[FR,VR]=LR(oy),BR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:c,dir:u,loop:f=!0,onValueChange:d,...m}=e,p=iy(n),b=Ja(u),[y,$]=$n({prop:i,defaultProp:o,onChange:d});return l.createElement(FR,{scope:n,name:r,required:a,disabled:s,value:y,onValueChange:$},l.createElement(IR,ae({asChild:!0},p,{orientation:c,dir:b,loop:f}),l.createElement(Ue.div,ae({role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":s?"":void 0,dir:b},m,{ref:t}))))}),HR="RadioGroupItem",WR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=VR(HR,n),a=i.disabled||r,s=iy(n),c=ay(n),u=l.useRef(null),f=ut(t,u),d=i.value===o.value,m=l.useRef(!1);return l.useEffect(()=>{const p=y=>{jR.includes(y.key)&&(m.current=!0)},b=()=>m.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",b)}},[]),l.createElement(RR,ae({asChild:!0},s,{focusable:!a,active:d}),l.createElement(DR,ae({disabled:a,required:i.required,checked:d},c,o,{name:i.name,ref:f,onCheck:()=>i.onValueChange(o.value),onKeyDown:Ne(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:Ne(o.onFocus,()=>{var p;m.current&&((p=u.current)===null||p===void 0||p.click())})})))}),zR=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=ay(n);return l.createElement(kR,ae({},o,r,{ref:t}))}),UR=BR,YR=WR,KR=zR;var qR=Ke({defaultClassName:"d6umgr4",variantClassNames:{disabled:{true:"d6umgr5"}},defaultVariants:{},compoundVariants:[]}),XR="d6umgr1",GR=Ke({defaultClassName:"d6umgr2",variantClassNames:{disabled:{true:"d6umgr3"}},defaultVariants:{},compoundVariants:[]}),ZR="d6umgr0";const sy=({children:e,className:t,disabled:n,...r})=>{const o=l.useId();return M.jsxs(Bt,{alignItems:"center",children:[M.jsx(Bt,{alignItems:"center",justifyContent:"center",children:M.jsx(YR,{...r,disabled:n,className:Te(t,ZR),id:o,children:M.jsx(KR,{className:Te("radio-indicator",GR({disabled:n}))})})}),e&&M.jsx("label",{className:Te("radio-label",qR({disabled:n})),htmlFor:o,children:e})]})};sy.defaultProps={children:void 0};const QR=({className:e,children:t,...n})=>M.jsx(UR,{...n,className:Te(e,XR),children:t});var JR="_846x3h2",eO="_846x3h0",tO="_846x3h1",nO=Ke({defaultClassName:"_846x3h3",variantClassNames:{size:{small:"_846x3h4",medium:"_846x3h5",large:"_846x3h6"},isHasIcon:{true:"_846x3h7"},isDisabled:{true:"_846x3h8"}},defaultVariants:{size:"small"},compoundVariants:[]});const od=l.forwardRef(({value:e,size:t,isDisabled:n,icon:r,onClear:o,onFocus:i,onBlur:a,withIcon:s,className:c,...u},f)=>{const[d,m]=l.useState(!1),p=x=>{i==null||i(x),m(!0)},b=x=>{a==null||a(x),m(!1)},y=()=>{o==null||o(),m(!1)},$=l.useMemo(()=>!!(s&&(r||e&&d)),[s,d,e,r]);return M.jsxs(et,{position:"relative",children:[M.jsx(et,{className:Te(eO),children:M.jsx(T0,{size:24})}),M.jsx("input",{className:Te(nO({size:t,isHasIcon:$,isDisabled:n}),c),ref:f,value:e,"data-test-id":u["data-test-id"],onFocus:p,onBlur:b,disabled:n,...u}),$&&M.jsx(et,{className:Te(tO),children:r&&(!d||d&&!e)?r:M.jsx(et,{className:Te(JR),onMouseDown:y,children:M.jsx(rs,{"data-test-id":"icon-close-search",onMouseDown:y,cursor:"pointer",size:24})})})]})});od.displayName="Search";od.defaultProps={icon:void 0,isDisabled:void 0,onClear:void 0,withIcon:!0,"data-test-id":void 0};const cy="Switch",[rO,MP]=yn(cy),[oO,iO]=rO(cy),aO=l.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:c="on",onCheckedChange:u,...f}=e,[d,m]=l.useState(null),p=ut(t,v=>m(v)),b=l.useRef(!1),y=d?!!d.closest("form"):!0,[$=!1,x]=$n({prop:o,defaultProp:i,onChange:u});return l.createElement(oO,{scope:n,checked:$,disabled:s},l.createElement(Ue.button,ae({type:"button",role:"switch","aria-checked":$,"aria-required":a,"data-state":uy($),"data-disabled":s?"":void 0,disabled:s,value:c},f,{ref:p,onClick:Ne(e.onClick,v=>{x(w=>!w),y&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})})),y&&l.createElement(uO,{control:d,bubbles:!b.current,name:r,value:c,checked:$,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(Ue.span,ae({"data-state":uy(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=us(n),s=ss(t);return l.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&d){const m=new Event("click",{bubbles:r});d.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 uy(e){return e?"checked":"unchecked"}const lO=aO,dO=cO;var fO="b7c0j16",pO=Ke({defaultClassName:"b7c0j10",variantClassNames:{variant:{normal:"b7c0j11",small:"b7c0j12"}},defaultVariants:{variant:"normal"},compoundVariants:[]}),hO=Ke({defaultClassName:"b7c0j13",variantClassNames:{variant:{normal:"b7c0j14",small:"b7c0j15"}},defaultVariants:{variant:"normal"},compoundVariants:[]});const vO={normal:16,small:12},id=l.forwardRef((e,t)=>{const{size:n="normal"}=e;return M.jsx(lO,{ref:t,className:Te(pO({variant:n})),...e,children:M.jsx(dO,{className:Te(hO({variant:n})),children:M.jsx(Eu,{className:fO,size:vO[n]})})})});id.displayName="Switch";id.defaultProps={size:"normal"};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(Bt,{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 mO=Ke({defaultClassName:"",variantClassNames:{variant:{simple:"_94c6vs1",default:"_94c6vs2"}},defaultVariants:{},compoundVariants:[]}),gO=Ke({defaultClassName:"_94c6vs6",variantClassNames:{variant:{simple:"_94c6vs7",default:"_94c6vs8"}},defaultVariants:{},compoundVariants:[]}),dh=Ke({defaultClassName:"_94c6vs3",variantClassNames:{variant:{simple:"_94c6vs4",default:"_94c6vs5"}},defaultVariants:{},compoundVariants:[]}),yO="_94c6vs0";const dy=({data:e,columns:t})=>{const[n,r]=l.useState([]),[o,i]=l.useState([]),[a,s]=l.useState({by:"",order:""}),c=d=>{const{accessor:m}=d,p=d.sortable,b=a.by===m;return p?b&&a.order==="ASC"?s({by:m,order:"DESC"}):b&&a.order==="DESC"?s({by:"",order:""}):s({by:m,order:"ASC"}):null},u=d=>typeof d=="object"?"":d,f=l.useCallback((d,m)=>{const p=[...d];return m.order==="ASC"?p.sort((y,$)=>String($[m.by]).localeCompare(String(y[m.by]))):m.order==="DESC"?p.sort((y,$)=>String(y[m.by]).localeCompare(String($[m.by]))):[...d]},[]);return l.useEffect(()=>{const d=t.map(b=>({...b,sortable:b.sortable??!1}));r(d);const p=f(e,{by:a.by,order:a.order}).map(b=>d.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(p)},[t,e,f,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,variant:o,onSort:i,...a},s)=>{const c=t||"table",{rows:u,headers:f,handleHeaderClick:d,sortColumn:m}=dy({data:r,columns:e});return l.useEffect(()=>{i&&i(m)},[i,m]),M.jsxs(c,{ref:s,as:t,className:yO,"data-test-id":n,...a,children:[M.jsx("thead",{children:M.jsx("tr",{className:gO({variant:o}),children:f.filter(p=>!!p.label).map(p=>M.jsx("th",{"data-test-id":"",className:dh({variant:o}),onClick:()=>d(p),children:M.jsxs(Bt,{alignItems:"center",gap:"$8",justifyContent:"center",px:"$16",children:[M.jsx(et,{fontWeight:"$bold",color:o==="default"?"$whiteTypoHigh":"$blackTypoHigh",fontSize:"$body2",lineHeight:"$20",children:p.label}),M.jsx(ly,{accessor:p.accessor,sortable:p.sortable,sortColumn:m,"data-test-id":`table-sort-${p.label}`})]})},p.accessor))})}),M.jsx("tbody",{children:u.map((p,b)=>M.jsx("tr",{className:mO({variant:o}),children:p.map((y,$)=>M.jsx(et,{as:"td","data-test-id":`table-${n}-row${b}-col${$}`,className:dh({variant:o}),children:y.CellRenderer??y.value}))}))})]})});fy.defaultProps={variant:"default",as:"table","data-test-id":"base",onSort:void 0};var bO=Ke({defaultClassName:"_5wiwut0",variantClassNames:{isActive:{true:"_5wiwut1"}},defaultVariants:{isActive:!1},compoundVariants:[]});var wO=Ke({defaultClassName:"_1p5zdvr0",variantClassNames:{withShadow:{true:"_1p5zdvr1"},align:{left:"_1p5zdvr2",center:"_1p5zdvr3",right:"_1p5zdvr4"}},defaultVariants:{withShadow:!1,align:"left"},compoundVariants:[]});const ad=l.createContext({index:0,setIndex:()=>null}),sd=l.forwardRef(({as:e,children:t,withShadow:n,index:r,defaultIndex:o,align:i,onChange:a,className:s,...c},u)=>{const[f,d]=l.useState(o??0),m=l.useMemo(()=>l.Children.map(t,(y,$)=>l.cloneElement(y,{"data-index":$})),[t]);l.useEffect(()=>d(r??0),[r]);const p=l.useMemo(()=>({index:f,setIndex:$=>{d($),a==null||a($)}}),[f,a]),b=e||"ul";return M.jsx(b,{"data-test-id":c["data-test-id"],as:e,ref:u,className:Te(wO({withShadow:n,align:i}),s),...c,children:M.jsx(ad.Provider,{value:p,children:m})})});sd.displayName="Tabs";sd.defaultProps={as:"ul",defaultIndex:0,index:0,align:"left",withShadow:!1,children:void 0,onChange:()=>null,"data-test-id":void 0,className:void 0};const cd=l.forwardRef(({as:e,children:t,...n},r)=>{const{index:o,setIndex:i}=l.useContext(ad),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:Te(bO({isActive:s})),...n,children:M.jsx(Xt,{as:"span",textStyle:"body2",children:t})})});cd.displayName="TabItem";cd.defaultProps={as:"li","data-index":void 0,"data-test-id":void 0};const py="ToastProvider",[ud,EO,xO]=Qa("Toast"),[hy,jP]=yn("Toast",[xO]),[_O,Os]=hy(py),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,f]=l.useState(0),d=l.useRef(!1),m=l.useRef(!1);return l.createElement(ud.Provider,{scope:t},l.createElement(_O,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:s,onViewportChange:c,onToastAdd:l.useCallback(()=>f(p=>p+1),[]),onToastRemove:l.useCallback(()=>f(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:m},a))};vy.propTypes={label(e){if(e.label&&typeof e.label=="string"&&!e.label.trim()){const t=`Invalid prop \`label\` supplied to \`${py}\`. Expected non-empty \`string\`.`;return new Error(t)}return null}};const SO="ToastViewport",CO=["F8"],lu="toast.viewportPause",du="toast.viewportResume",$O=l.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=CO,label:o="Notifications ({hotkey})",...i}=e,a=Os(SO,n),s=EO(n),c=l.useRef(null),u=l.useRef(null),f=l.useRef(null),d=l.useRef(null),m=ut(t,d,a.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=a.toastCount>0;l.useEffect(()=>{const $=x=>{var v;r.every(T=>x[T]||x.code===T)&&((v=d.current)===null||v===void 0||v.focus())};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[r]),l.useEffect(()=>{const $=c.current,x=d.current;if(b&&$&&x){const v=()=>{if(!a.isClosePausedRef.current){const D=new CustomEvent(lu);x.dispatchEvent(D),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const D=new CustomEvent(du);x.dispatchEvent(D),a.isClosePausedRef.current=!1}},T=D=>{!$.contains(D.relatedTarget)&&w()},I=()=>{$.contains(document.activeElement)||w()};return $.addEventListener("focusin",v),$.addEventListener("focusout",T),$.addEventListener("pointermove",v),$.addEventListener("pointerleave",I),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{$.removeEventListener("focusin",v),$.removeEventListener("focusout",T),$.removeEventListener("pointermove",v),$.removeEventListener("pointerleave",I),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[b,a.isClosePausedRef]);const y=l.useCallback(({tabbingDirection:$})=>{const v=s().map(w=>{const T=w.ref.current,I=[T,...BO(T)];return $==="forwards"?I:I.reverse()});return($==="forwards"?v.reverse():v).flat()},[s]);return l.useEffect(()=>{const $=d.current;if($){const x=v=>{const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const F=document.activeElement,k=v.shiftKey;if(v.target===$&&k){var I;(I=u.current)===null||I===void 0||I.focus();return}const E=y({tabbingDirection:k?"backwards":"forwards"}),h=E.findIndex(C=>C===F);if(bc(E.slice(h+1)))v.preventDefault();else{var D,A;k?(D=u.current)===null||D===void 0||D.focus():(A=f.current)===null||A===void 0||A.focus()}}};return $.addEventListener("keydown",x),()=>$.removeEventListener("keydown",x)}},[s,y]),l.createElement(G0,{ref:c,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:b?void 0:"none"}},b&&l.createElement(fh,{ref:u,onFocusFromOutsideViewport:()=>{const $=y({tabbingDirection:"forwards"});bc($)}}),l.createElement(ud.Slot,{scope:n},l.createElement(Ue.ol,ae({tabIndex:-1},i,{ref:m}))),b&&l.createElement(fh,{ref:f,onFocusFromOutsideViewport:()=>{const $=y({tabbingDirection:"backwards"});bc($)}}))}),TO="ToastFocusProxy",fh=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Os(TO,n);return l.createElement(ls,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",IO="toast.swipeStart",RO="toast.swipeMove",OO="toast.swipeCancel",PO="toast.swipeEnd",AO=l.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[s=!0,c]=$n({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:un(e.onPause),onResume:un(e.onResume),onSwipeStart:Ne(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ne(e.onSwipeMove,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Ne(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:Ne(e.onSwipeEnd,u=>{const{x:f,y:d}=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",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),c(!1)})})))}),[DO,NO]=hy(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:f,onSwipeMove:d,onSwipeCancel:m,onSwipeEnd:p,...b}=e,y=Os(Ps,n),[$,x]=l.useState(null),v=ut(t,C=>x(C)),w=l.useRef(null),T=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=un(()=>{var C;($==null?void 0:$.contains(document.activeElement))&&((C=y.viewport)===null||C===void 0||C.focus()),a()}),E=l.useCallback(C=>{!C||C===1/0||(window.clearTimeout(F.current),D.current=new Date().getTime(),F.current=window.setTimeout(R,C))},[R]);l.useEffect(()=>{const C=y.viewport;if(C){const P=()=>{E(A.current),u==null||u()},j=()=>{const H=new Date().getTime()-D.current;A.current=A.current-H,window.clearTimeout(F.current),c==null||c()};return C.addEventListener(lu,j),C.addEventListener(du,P),()=>{C.removeEventListener(lu,j),C.removeEventListener(du,P)}}},[y.viewport,I,c,u,E]),l.useEffect(()=>{i&&!y.isClosePausedRef.current&&E(I)},[i,I,y.isClosePausedRef,E]),l.useEffect(()=>(k(),()=>B()),[k,B]);const h=l.useMemo(()=>$?yy($):null,[$]);return y.viewport?l.createElement(l.Fragment,null,h&&l.createElement(kO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0},h),l.createElement(DO,{scope:n,onClose:R},vn.createPortal(l.createElement(ud.ItemSlot,{scope:n},l.createElement(X0,{asChild:!0,onEscapeKeyDown:Ne(s,()=>{y.isFocusedToastEscapeKeyDownRef.current||R(),y.isFocusedToastEscapeKeyDownRef.current=!1})},l.createElement(Ue.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:Ne(e.onKeyDown,C=>{C.key==="Escape"&&(s==null||s(C.nativeEvent),C.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:Ne(e.onPointerDown,C=>{C.button===0&&(w.current={x:C.clientX,y:C.clientY})}),onPointerMove:Ne(e.onPointerMove,C=>{if(!w.current)return;const P=C.clientX-w.current.x,j=C.clientY-w.current.y,H=!!T.current,Y=["left","right"].includes(y.swipeDirection),oe=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,W=Y?oe(0,P):0,L=Y?0:oe(0,j),J=C.pointerType==="touch"?10:2,U={x:W,y:L},K={originalEvent:C,delta:U};H?(T.current=U,la(RO,d,K,{discrete:!1})):ph(U,y.swipeDirection,J)?(T.current=U,la(IO,f,K,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(P)>J||Math.abs(j)>J)&&(w.current=null)}),onPointerUp:Ne(e.onPointerUp,C=>{const P=T.current,j=C.target;if(j.hasPointerCapture(C.pointerId)&&j.releasePointerCapture(C.pointerId),T.current=null,w.current=null,P){const H=C.currentTarget,Y={originalEvent:C,delta:P};ph(P,y.swipeDirection,y.swipeThreshold)?la(PO,p,Y,{discrete:!0}):la(OO,m,Y,{discrete:!0}),H.addEventListener("click",oe=>oe.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 kO=e=>{const{__scopeToast:t,children:n,...r}=e,o=Os(Ps,t),[i,a]=l.useState(!1),[s,c]=l.useState(!1);return FO(()=>a(!0)),l.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:l.createElement(ev,{asChild:!0},l.createElement(ls,r,i&&l.createElement(l.Fragment,null,o.label," ",n)))},MO="ToastAction",ld=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n?l.createElement(gy,{altText:n,asChild:!0},l.createElement(LO,ae({},r,{ref:t}))):null});ld.propTypes={altText(e){return e.altText?null:new Error(`Missing prop \`altText\` expected on \`${MO}\``)}};const jO="ToastClose",LO=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=NO(jO,n);return l.createElement(gy,{asChild:!0},l.createElement(Ue.button,ae({type:"button"},r,{ref:t,onClick:Ne(e.onClick,o.onClose)})))}),gy=l.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return l.createElement(Ue.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),VO(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 la(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?Eh(o,i):o.dispatchEvent(i)}const ph=(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 FO(e=()=>{}){const t=un(e);Gt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function VO(e){return e.nodeType===e.ELEMENT_NODE}function BO(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 HO=vy,by=$O,wy=AO,WO=ld;var zO="_10z4js29",UO=Ke({defaultClassName:"_10z4js25",variantClassNames:{color:{neutral:"_10z4js26",negative:"_10z4js27"}},defaultVariants:{color:"neutral"},compoundVariants:[]}),YO="_10z4js28",KO="_10z4js2a";const Ey=HO,dd=l.forwardRef(({className:e,...t},n)=>M.jsx(by,{ref:n,className:Te(KO,e),...t}));dd.displayName=by.displayName;const As=l.forwardRef(({className:e,color:t="neutral",...n},r)=>M.jsx(wy,{ref:r,className:Te(UO({color:t}),e),...n}));As.displayName=wy.displayName;As.defaultProps={viewPort:void 0,actionClassName:void 0};const fd=l.forwardRef(({className:e,...t},n)=>M.jsx(ld,{ref:n,className:Te(e),...t}));fd.displayName=WO.displayName;const qO=1,XO=1e6,Xn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let wc=0;function GO(){return wc=(wc+1)%Number.MAX_VALUE,wc.toString()}const Ec=new Map,hh=e=>{if(Ec.has(e))return;const t=setTimeout(()=>{Ec.delete(e),ai({type:Xn.REMOVE_TOAST,toastId:e})},XO);Ec.set(e,t)};function xy(e,t){switch(t.type){case Xn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,qO)};case Xn.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case Xn.DISMISS_TOAST:{const{toastId:n}=t;return n?hh(n):e.toasts.forEach(r=>{hh(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case Xn.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)};default:return e}}const Sa=[];let Ca={toasts:[]};function ai(e){Ca=xy(Ca,e),Sa.forEach(t=>{t(Ca)})}function _y({...e}){const t=GO(),n=o=>ai({type:Xn.UPDATE_TOAST,toast:{...o,id:t}}),r=()=>ai({type:Xn.DISMISS_TOAST,toastId:t});return ai({type:Xn.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(Ca);return l.useEffect(()=>(Sa.push(t),()=>{const n=Sa.indexOf(t);n>-1&&Sa.splice(n,1)}),[e]),{...e,toast:_y,dismiss:n=>ai({type:Xn.DISMISS_TOAST,toastId:n})}}const pd=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:f="foreground",color:d="neutral",viewPort:m,actionClassName:p,isDismissable:b=!0,...y})=>M.jsxs("div",{children:[M.jsxs(As,{ref:t,color:d,duration:u,type:f,"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(Xt,{textStyle:"body2",fontWeight:"$reguler",textOverflow:"ellipsis",overflow:"hidden",className:YO,children:i})}),!a&&c&&s?M.jsx(fd,{altText:s,asChild:!0,children:M.jsx(rg,{"data-test-id":`action-toast-${y["data-test-id"]??""}`,onClick:c,isStandalone:!0,className:Te(zO,p),children:s})}):a]},o),M.jsx(dd,{...m})]},o))})});pd.displayName="Toaster";const[Ds,LP]=yn("Tooltip",[cs]),Ns=cs(),ZO="TooltipProvider",QO=700,fu="tooltip.open",[JO,hd]=Ds(ZO),eP=e=>{const{__scopeTooltip:t,delayDuration:n=QO,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 f=u.current;return()=>window.clearTimeout(f)},[]),l.createElement(JO,{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(f=>{c.current=f},[]),disableHoverableContent:o},i)},vd="Tooltip",[tP,ks]=Ds(vd),nP=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,c=hd(vd,e.__scopeTooltip),u=Ns(t),[f,d]=l.useState(null),m=Gn(),p=l.useRef(0),b=a??c.disableHoverableContent,y=s??c.delayDuration,$=l.useRef(!1),[x=!1,v]=$n({prop:r,defaultProp:o,onChange:A=>{A?(c.onOpen(),document.dispatchEvent(new CustomEvent(fu))):c.onClose(),i==null||i(A)}}),w=l.useMemo(()=>x?$.current?"delayed-open":"instant-open":"closed",[x]),T=l.useCallback(()=>{window.clearTimeout(p.current),$.current=!1,v(!0)},[v]),I=l.useCallback(()=>{window.clearTimeout(p.current),v(!1)},[v]),D=l.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{$.current=!0,v(!0)},y)},[y,v]);return l.useEffect(()=>()=>window.clearTimeout(p.current),[]),l.createElement(Zh,u,l.createElement(tP,{scope:t,contentId:m,open:x,stateAttribute:w,trigger:f,onTriggerChange:d,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayed?D():T()},[c.isOpenDelayed,D,T]),onTriggerLeave:l.useCallback(()=>{b?I():window.clearTimeout(p.current)},[I,b]),onOpen:T,onClose:I,disableHoverableContent:b},n))},vh="TooltipTrigger",rP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ks(vh,n),i=hd(vh,n),a=Ns(n),s=l.useRef(null),c=ut(t,s,o.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),d=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),l.createElement(Qh,ae({asChild:!0},a),l.createElement(Ue.button,ae({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:c,onPointerMove:Ne(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:Ne(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:Ne(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ne(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Ne(e.onBlur,o.onClose),onClick:Ne(e.onClick,o.onClose)})))}),oP="TooltipPortal",[FP,iP]=Ds(oP,{forceMount:void 0}),Ci="TooltipContent",aP=l.forwardRef((e,t)=>{const n=iP(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(sP,ae({side:o},i,{ref:t})))}),sP=l.forwardRef((e,t)=>{const n=ks(Ci,e.__scopeTooltip),r=hd(Ci,e.__scopeTooltip),o=l.useRef(null),i=ut(t,o),[a,s]=l.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:d}=r,m=l.useCallback(()=>{s(null),d(!1)},[d]),p=l.useCallback((b,y)=>{const $=b.currentTarget,x={x:b.clientX,y:b.clientY},v=fP(x,$.getBoundingClientRect()),w=pP(x,v),T=hP(y.getBoundingClientRect()),I=mP([...w,...T]);s(I),d(!0)},[d]);return l.useEffect(()=>()=>m(),[m]),l.useEffect(()=>{if(c&&f){const b=$=>p($,f),y=$=>p($,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",y)}}},[c,f,p,m]),l.useEffect(()=>{if(a){const b=y=>{const $=y.target,x={x:y.clientX,y:y.clientY},v=(c==null?void 0:c.contains($))||(f==null?void 0:f.contains($)),w=!vP(x,a);v?m():w&&(m(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,a,u,m]),l.createElement(Cy,ae({},e,{ref:i}))}),[cP,uP]=Ds(vd,{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:f}=c;return l.useEffect(()=>(document.addEventListener(fu,f),()=>document.removeEventListener(fu,f)),[f]),l.useEffect(()=>{if(c.trigger){const d=m=>{const p=m.target;p!=null&&p.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),l.createElement(os,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f},l.createElement(Jh,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(wh,null,r),l.createElement(cP,{scope:n,isInside:!0},l.createElement(n1,{id:c.contentId,role:"tooltip"},o||r))))}),lP="TooltipArrow",dP=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ns(n);return uP(lP,n).isInside?null:l.createElement(e1,ae({},o,r,{ref:t}))});function fP(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 pP(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 vP(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,f=t[a].y;c>r!=f>r&&n<(u-s)*(r-c)/(f-c)+s&&(o=!o)}return o}function mP(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),gP(t)}function gP(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 yP=eP,bP=nP,wP=rP,EP=aP,xP=dP;function mh(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function _P(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 SP(e,t){var n={};if(typeof t=="object"){var r=e;$y(t,(a,s)=>{var c=_P(r,s);n[mh(c)]=String(a)})}else{var o=e;for(var i in o)n[mh(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 CP="var(--_4goys34)",$P="_4goys35",TP="_4goys36";const md=l.forwardRef(({align:e,alignOffset:t,children:n,color:r,bgColor:o,content:i,defaultOpen:a,delayDuration:s=700,disableHoverableContent:c,onOpenChange:u,open:f,position:d,positionOffset:m,withIcon:p,...b},y)=>{const $=Ct.atoms.commonAtoms({color:r,bgColor:o}).className,x=Ct.atoms.borderAtoms({borderColor:o}).className,w=o.replace("$","");return M.jsxs(bP,{defaultOpen:a,delayDuration:s,disableHoverableContent:c,onOpenChange:u,open:f,children:[M.jsx(wP,{asChild:!0,ref:y,children:n}),M.jsx(vs,{children:M.jsxs(EP,{align:e,alignOffset:t,side:d,sideOffset:m,...b,className:Te(TP,$,x),children:[M.jsxs(Bt,{gap:"$6",children:[p&&M.jsx(Bt,{width:"$24",children:M.jsx(P0,{size:24})}),i]}),M.jsx(xP,{className:$P,style:SP({[CP]:Ct.theme.colors[w]})})]})})]})});md.displayName="Tooltip";md.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 gd=({children:e})=>M.jsxs(yP,{children:[e,M.jsx(pd,{})]});gd.displayName="RadixProvider";const yd=({children:e,withScrollStyles:t})=>M.jsx("div",{id:"voila-ui",style:{fontFamily:Ct.theme.fonts.poppins},className:Te(t??Ct.scrollbarStyle),children:M.jsx(gd,{children:e})});yd.displayName="Provider";yd.defaultProps={withScrollStyles:!1};exports.Accordion=Db;exports.AccordionContent=p0;exports.AccordionItem=h0;exports.AccordionTrigger=L0;exports.Alert=Ph;exports.AspectRatio=_u;exports.Badge=Su;exports.BaseSelect=ju;exports.BottomSheet=B$;exports.Box=et;exports.Button=mo;exports.Card=yu;exports.Checkbox=Gm;exports.Chip=ul;exports.CloseButton=Wr;exports.ConfirmDialogContext=fl;exports.ConfirmDialogProvider=kT;exports.Container=bu;exports.DatePicker=uI;exports.Dialog=dl;exports.Divider=pl;exports.Flex=Bt;exports.FullLoader=ag;exports.Grid=wu;exports.IconButton=gl;exports.Image=yl;exports.Input=vl;exports.Link=rg;exports.List=bl;exports.ListItem=wl;exports.Loader=XT;exports.LoaderAnimated=El;exports.Modal=Ai;exports.ModalBody=Ts;exports.ModalFooter=Is;exports.ModalHeader=Rs;exports.MultiPicker=sg;exports.Overlay=qE;exports.Picker=au;exports.Pills=Zg;exports.Portal=vs;exports.Provider=yd;exports.Radio=sy;exports.RadioGroup=QR;exports.RadixProvider=gd;exports.Search=od;exports.Select=uo;exports.SelectPicker=Gg;exports.Spinner=_o;exports.Stack=Ar;exports.Switch=id;exports.TabItem=cd;exports.Table=fy;exports.Tabs=sd;exports.TabsContext=ad;exports.Text=Xt;exports.Textarea=ml;exports.Toast=As;exports.ToastAction=fd;exports.ToastProvider=Ey;exports.ToastViewport=dd;exports.Toaster=pd;exports.Tooltip=md;exports.linkRecipe=ng;exports.reducer=xy;exports.toast=_y;exports.useDialog=MT;exports.useIndeterminate=aT;exports.useOnMount=xv;exports.useRipple=cl;exports.useTableRenderer=dy;exports.useToast=Sy;