@seeqdev/qomponents 0.0.218 → 0.0.220

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.esm.js CHANGED
@@ -64,10 +64,10 @@ http://jedwatson.github.io/classnames
64
64
  tw:rounded-lg tw:fixed tw:left-[50%] tw:top-0 tw:my-6 tw:translate-x-[-50%] tw:z-[1] ${e}`,...r,children:[y(gh,{className:`tw:hidden`}),n]})]})}));zh.displayName=Ah.displayName;const Bh=e=>y(`div`,{className:`tw:w-full tw:justify-between`,children:y(`div`,{...e})});Bh.displayName=`DialogHeader`;const Vh=e=>y(`div`,{...e});Vh.displayName=`DialogFooter`;const Hh=t.forwardRef((e,t)=>y(jh,{ref:t,...e}));Hh.displayName=jh.displayName;const Uh=t.forwardRef((e,t)=>y(Mh,{asChild:!0,children:y(`div`,{ref:t,...e})}));Uh.displayName=Mh.displayName;const Wh=({titleIcon:e,title:t=`Modal title example`,titleSuffixLabel:n,subtitle:r,children:i,open:a=!1,onClose:o,customButton:s=!1,customButtonLabel:c=`Back`,onClickCustomButton:l,submitButtonLabel:u=`Submit`,cancelButtonLabel:f=`Cancel`,disableSubmitButton:p=!1,stopPropagationSubmitButton:m=!1,onSubmit:h,isTitleEditable:g=!1,onTitleChanged:x,inputExtraClassNames:S,hideCloseIcon:C=!1,size:w=`xl`,titleIconPosition:T=`left`,hideFooterButtons:E=!1,hideSubmitButton:D=!1,hideCancelButton:O=!1,testId:k=`modal`,modalFooter:A,dialogClassName:j,titlePlaceholder:M,titleRequired:ee,titleError:N,submitButtonTooltip:P,cancelButtonTooltip:F,disableCustomButton:I,customHeader:L,middleFooterSection:R=y(v,{}),customButtonVariant:te=`outline`,submitButtonVariant:z=`theme`,keepFocusInsideModal:ne=!0,onPointerDownOutside:re,onInteractOutside:ie,ariaDescribedBy:ae})=>{let[oe,V]=_(!1);d(()=>{if(a){let e=setTimeout(()=>{document.body.style.pointerEvents=``},0);return()=>clearTimeout(e)}else document.body.style.pointerEvents=`auto`},[a]);let ce=async e=>{if(h)try{V(!0),await h(e)}finally{V(!1)}},le=()=>{let i=y(v,{});return e&&(i=typeof e==`string`?y(B,{icon:e,testId:`modalTitleIcon`,extraClassNames:`tw:flex tw:text-xl tw:mt-1`}):y(`div`,{className:`tw:mt-2`,children:e})),b(v,{children:[e&&T===`left`?y(`div`,{className:`tw:flex tw:mr-2`,children:i}):y(v,{}),y(Hh,{asChild:!0,children:g?b(`div`,{className:`tw:flex tw:w-full tw:items-center`,children:[y(yo,{extraClassNames:S,value:t,type:`text`,testId:`modalTitle`,onChange:x,placeholder:M,required:ee,showError:!!N}),N&&y(`p`,{className:`tw:text-sq-danger tw:min-w-fit tw:pl-2 tw:mb-0`,children:N})]}):L??b(`div`,{"data-testid":`modalTitle`,className:`modal-title`,children:[b(`div`,{className:`tw:flex tw:items-center`,children:[y(`h3`,{children:t}),n&&y(`span`,{className:`tw:text-xl tw:pl-0.5`,children:n})]}),r&&y(`div`,{className:`tw:italic tw:text-sm tw:text-left tw:mt-1`,"data-testid":`modal-subtitle`,children:r})]})}),e&&T===`right`?y(`div`,{className:`tw:flex tw:ml-4`,children:i}):y(v,{})]})};return a?y(Ih,{open:!0,onOpenChange:o,modal:ne,children:b(zh,{onPointerDownOutside:e=>re?re(e):e.preventDefault(),onInteractOutside:e=>ie?ie(e):e.preventDefault(),"data-testid":k,"aria-describedby":ae,className:(0,Fh.default)(`modalContent tw:w-full tw:shadow-none tw:dark:text-sq-dark-text tw:gap-0! tw:border-0 tw:dark:border tw:dark:border-gray-500`,{"tw:max-w-xs":w===`xs`,"tw:max-w-sm":w===`sm`,"tw:max-w-md":w===`md`,"tw:max-w-lg":w===`lg`,"tw:max-w-xl":w===`xl`,"tw:max-w-2xl":w===`2xl`,"tw:max-w-3xl":w===`3xl`,"tw:max-w-4xl":w===`4xl`,"tw:max-w-5xl":w===`5xl`,"tw:max-w-6xl":w===`6xl`},j),children:[b(Bh,{className:`modal-header tw:flex tw:w-full tw:justify-between tw:border-sq-disabled-gray
65
65
  tw:dark:border-sq-dark-disabled-gray tw:border-0 tw:border-b tw:px-6 tw:py-4`,children:[y(`div`,{className:`tw:flex tw:w-full`,children:le()}),!C&&y(Rh,{autoFocus:!1,className:`tw:[&:has(:focus-visible)]:none tw:opacity-70 tw:bg-transparent tw:hover:opacity-100 close tw:text-base tw:cursor-pointer tw:ml-4`,"data-testid":`closeButton`,children:y(`span`,{className:`tw:cursor-pointer`,children:`×`})})]}),y(Uh,{className:`modal-body tw:px-6 tw:py-4 tw:overflow-y-auto`,children:i}),!E&&y(Vh,{className:`modal-footer tw:px-6 tw:py-4`,children:A??b(`div`,{className:`tw:flex tw:w-full tw:justify-between`,"data-testid":`modalFooter`,children:[y(`div`,{className:`tw:flex tw:justify-start`,children:s&&y(se,{label:c,onClick:l,disabled:I,extraClassNames:`tw:justify-start tw:min-w-25`,testId:`customButton`,variant:te})}),b(`div`,{className:`tw:flex tw:justify-end`,children:[y(`div`,{className:`tw:flex tw:items-center`,children:R}),!O&&y(Rh,{asChild:!0,children:y(se,{label:f,extraClassNames:`tw:mr-5 tw:min-w-25`,tooltip:F,variant:`outline`,stopPropagation:!1,testId:`cancelButton`})}),!D&&y(se,{label:u,onClick:ce,disabled:p||oe,variant:z,stopPropagation:m,tooltip:P,icon:oe?`fc-loading-notch tw:animate-spin`:void 0,iconPosition:`left`,testId:`submitButton`,extraClassNames:`tw:min-w-25`})]})]})})]})}):y(v,{})};var Gh=Wh;function Kh(e){let n=e+`CollectionProvider`,[r,i]=de(n),[a,o]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:n,children:r}=e,i=t.useRef(null),o=t.useRef(new Map).current;return y(a,{scope:n,itemMap:o,collectionRef:i,children:r})};s.displayName=n;let c=e+`CollectionSlot`,l=pe(c),u=t.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=o(c,n),a=H(t,i.collectionRef);return y(l,{ref:a,children:r})});u.displayName=c;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,p=pe(d),m=t.forwardRef((e,n)=>{let{scope:r,children:i,...a}=e,s=t.useRef(null),c=H(n,s),l=o(d,r);return t.useEffect(()=>(l.itemMap.set(s,{ref:s,...a}),()=>void l.itemMap.delete(s))),y(p,{[f]:``,ref:c,children:i})});m.displayName=d;function h(n){let r=o(e+`CollectionConsumer`,n),i=t.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`)),n=Array.from(r.itemMap.values()),i=n.sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return i},[r.collectionRef,r.itemMap]);return i}return[{Provider:s,Slot:u,ItemSlot:m},h,i]}var qh=e.createContext(void 0);function Jh(t){let n=e.useContext(qh);return t||n||`ltr`}var Yh=`rovingFocusGroup.onEntryFocus`,Xh={bubbles:!1,cancelable:!0},Zh=`RovingFocusGroup`,[Qh,$h,eg]=Kh(Zh),[tg,ng]=de(Zh,[eg]),[rg,ig]=tg(Zh),ag=e.forwardRef((e,t)=>y(Qh.Provider,{scope:e.__scopeRovingFocusGroup,children:y(Qh.Slot,{scope:e.__scopeRovingFocusGroup,children:y(og,{...e,ref:t})})}));ag.displayName=Zh;var og=e.forwardRef((t,n)=>{let{__scopeRovingFocusGroup:r,orientation:i,loop:a=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=t,p=e.useRef(null),m=H(n,p),h=Jh(o),[g,_]=ii({prop:s,defaultProp:c??null,onChange:l,caller:Zh}),[v,b]=e.useState(!1),x=xe(u),S=$h(r),C=e.useRef(!1),[w,T]=e.useState(0);return e.useEffect(()=>{let e=p.current;if(e)return e.addEventListener(Yh,x),()=>e.removeEventListener(Yh,x)},[x]),y(rg,{scope:r,orientation:i,dir:h,loop:a,currentTabStopId:g,onItemFocus:e.useCallback(e=>_(e),[_]),onItemShiftTab:e.useCallback(()=>b(!0),[]),onFocusableItemAdd:e.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:e.useCallback(()=>T(e=>e-1),[]),children:y(U.div,{tabIndex:v||w===0?-1:0,"data-orientation":i,...f,ref:m,style:{outline:`none`,...t.style},onMouseDown:V(t.onMouseDown,()=>{C.current=!0}),onFocus:V(t.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(Yh,Xh);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable),t=e.find(e=>e.active),n=e.find(e=>e.id===g),r=[t,n,...e].filter(Boolean),i=r.map(e=>e.ref.current);fg(i,d)}}C.current=!1}),onBlur:V(t.onBlur,()=>b(!1))})})}),sg=`RovingFocusGroupItem`,cg=e.forwardRef((t,n)=>{let{__scopeRovingFocusGroup:r,focusable:i=!0,active:a=!1,tabStopId:o,children:s,...c}=t,l=it(),u=o||l,d=ig(sg,r),f=d.currentTabStopId===u,p=$h(r),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=d;return e.useEffect(()=>{if(i)return m(),()=>h()},[i,m,h]),y(Qh.ItemSlot,{scope:r,id:u,focusable:i,active:a,children:y(U.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:n,onMouseDown:V(t.onMouseDown,e=>{i?d.onItemFocus(u):e.preventDefault()}),onFocus:V(t.onFocus,()=>d.onItemFocus(u)),onKeyDown:V(t.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){d.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=dg(e,d.orientation,d.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=p().filter(e=>e.focusable),r=n.map(e=>e.ref.current);if(t===`last`)r.reverse();else if(t===`prev`||t===`next`){t===`prev`&&r.reverse();let n=r.indexOf(e.currentTarget);r=d.loop?pg(r,n+1):r.slice(n+1)}setTimeout(()=>fg(r))}}),children:typeof s==`function`?s({isCurrentTabStop:f,hasTabStop:g!=null}):s})})});cg.displayName=sg;var lg={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function ug(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function dg(e,t,n){let r=ug(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return lg[r]}function fg(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function pg(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var mg=ag,hg=cg,gg=`Tabs`,[_g,vg]=de(gg,[ng]),yg=ng(),[bg,xg]=_g(gg),Sg=e.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=Jh(s),[d,f]=ii({prop:r,onChange:i,defaultProp:a??``,caller:gg});return y(bg,{scope:n,baseId:it(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:y(U.div,{dir:u,"data-orientation":o,...l,ref:t})})});Sg.displayName=gg;var Cg=`TabsList`,wg=e.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=xg(Cg,n),o=yg(n);return y(mg,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:y(U.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});wg.displayName=Cg;var Tg=`TabsTrigger`,Eg=e.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=xg(Tg,n),s=yg(n),c=kg(o.baseId,r),l=Ag(o.baseId,r),u=r===o.value;return y(hg,{asChild:!0,...s,focusable:!i,active:u,children:y(U.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:V(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:V(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:V(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});Eg.displayName=Tg;var Dg=`TabsContent`,Og=e.forwardRef((t,n)=>{let{__scopeTabs:r,value:i,forceMount:a,children:o,...s}=t,c=xg(Dg,r),l=kg(c.baseId,i),u=Ag(c.baseId,i),d=i===c.value,f=e.useRef(d);return e.useEffect(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),y($r,{present:a||d,children:({present:e})=>y(U.div,{"data-state":d?`active`:`inactive`,"data-orientation":c.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!e,id:u,tabIndex:0,...s,ref:n,style:{...t.style,animationDuration:f.current?`0s`:void 0},children:e&&o})})});Og.displayName=Dg;function kg(e,t){return`${e}-trigger-${t}`}function Ag(e,t){return`${e}-content-${t}`}var jg=Sg,Mg=wg,Ng=Eg,Pg=Og;const Fg=({tabs:e,defaultActiveTab:t,activeTab:n,onTabSelect:r,extraClassNames:i,testId:a,id:o,stretchTabs:s=!1})=>{let c=e=>{n!==e&&r&&r(e)};return b(jg,{className:`tw:flex tw:flex-col tw:min-w-75 tw:max-w-full tw:flex-grow tw:focus-visible:outline-none ${i||``}`,defaultValue:t,"data-testid":a,id:o,value:n,onValueChange:c,children:[y(Mg,{className:`tw:flex tw:flex-row tw:flex-wrap tw:z-[1001]`,children:e.map(({id:e,icon:t,label:r,tabExtraClassNames:i,testId:a,disabled:o,tabLabelExtraClassNames:c=``},l)=>y(Ng,{className:`tw:bg-sq-white tw:dark:bg-sq-dark-background tw:h-sq-25 tw:focus-visible:outline-none tw:min-w-25 tw:px-4 tw:border-solid tw:flex tw:flex-1 tw:justify-center tw:items-center tw:border-r-[2px] tw:last:border-r-0 tw:border-sq-overlay tw:dark:border-gray-700 ${s?``:`tw:max-w-max tw:min-w-fit`} ${i||``} ${n===e?`tw:border-b-sq-theme-darker tw:dark:border-b-sq-theme-darker tw:border-b-[0.1875rem]`:`tw:hover:bg-sq-light-gray tw:border-b-[0.0625rem] tw:hover:dark:bg-gray-700`}`,"data-testid":a,disabled:o,value:e,children:b(`span`,{className:`tw:flex tw:items-center tw:overflow-hidden`,children:[t&&y(B,{icon:t,testId:`${e}_tab-icon`,extraClassNames:`tw:text-sq-15 tw:mr-sq-7 tw:flex-shrink-0`}),y(`span`,{className:`tw:text-sq-13 tw:font-medium tw:whitespace-nowrap tw:overflow-hidden tw:text-ellipsis ${n===e?`tw:dark:text-sq-dark-text tw:text-gray-500`:`tw:dark:text-sq-theme-darker tw:text-sq-theme-dark`} ${c}`,children:r})]})},`${r}-${e}-${l}`))}),e.map((e,t)=>y(Pg,{className:`tw:bg-sq-white tw:dark:bg-sq-dark-background tw:overflow-y-auto tw:-mt-sq-1 tw:border-t-[0.0625rem] tw:border-t-sq-overlay tw:dark:border-t-gray-700 tw:z-[500] tw:flex tw:flex-col tw:flex-grow tw:focus-visible:outline-none ${e.tabContentExtraClassNames||``}`,value:e.id,children:e.content},`${e.label}_${t}_content`))]})};var Ig=Fg,Lg=`Collapsible`,[Rg,zg]=de(Lg),[Bg,Vg]=Rg(Lg),Hg=e.forwardRef((t,n)=>{let{__scopeCollapsible:r,open:i,defaultOpen:a,disabled:o,onOpenChange:s,...c}=t,[l,u]=ii({prop:i,defaultProp:a??!1,onChange:s,caller:Lg});return y(Bg,{scope:r,disabled:o,contentId:it(),open:l,onOpenToggle:e.useCallback(()=>u(e=>!e),[u]),children:y(U.div,{"data-state":Jg(l),"data-disabled":o?``:void 0,...c,ref:n})})});Hg.displayName=Lg;var Ug=`CollapsibleTrigger`,Wg=e.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=Vg(Ug,n);return y(U.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Jg(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:V(e.onClick,i.onOpenToggle)})});Wg.displayName=Ug;var Gg=`CollapsibleContent`,Kg=e.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Vg(Gg,e.__scopeCollapsible);return y($r,{present:n||i.open,children:({present:e})=>y(qg,{...r,ref:t,present:e})})});Kg.displayName=Gg;var qg=e.forwardRef((t,n)=>{let{__scopeCollapsible:r,present:i,children:a,...o}=t,s=Vg(Gg,r),[c,l]=e.useState(i),u=e.useRef(null),d=H(n,u),f=e.useRef(0),p=f.current,m=e.useRef(0),h=m.current,g=s.open||c,_=e.useRef(g),v=e.useRef(void 0);return e.useEffect(()=>{let e=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(e)},[]),tt(()=>{let e=u.current;if(e){v.current=v.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();f.current=t.height,m.current=t.width,_.current||(e.style.transitionDuration=v.current.transitionDuration,e.style.animationName=v.current.animationName),l(i)}},[s.open,i]),y(U.div,{"data-state":Jg(s.open),"data-disabled":s.disabled?``:void 0,id:s.contentId,hidden:!g,...o,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...t.style},children:g&&a})});function Jg(e){return e?`open`:`closed`}var Yg=Hg,Xg=Wg,Zg=Kg,Qg=`Accordion`,$g=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[e_,t_,n_]=Kh(Qg),[r_,i_]=de(Qg,[n_,zg]),a_=zg(),o_=t.forwardRef((e,t)=>{let{type:n,...r}=e,i=r,a=r;return y(e_.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?y(f_,{...a,ref:t}):y(d_,{...i,ref:t})})});o_.displayName=Qg;var[s_,c_]=r_(Qg),[l_,u_]=r_(Qg,{collapsible:!1}),d_=t.forwardRef((e,n)=>{let{value:r,defaultValue:i,onValueChange:a=()=>{},collapsible:o=!1,...s}=e,[c,l]=ii({prop:r,defaultProp:i??``,onChange:a,caller:Qg});return y(s_,{scope:e.__scopeAccordion,value:t.useMemo(()=>c?[c]:[],[c]),onItemOpen:l,onItemClose:t.useCallback(()=>o&&l(``),[o,l]),children:y(l_,{scope:e.__scopeAccordion,collapsible:o,children:y(h_,{...s,ref:n})})})}),f_=t.forwardRef((e,n)=>{let{value:r,defaultValue:i,onValueChange:a=()=>{},...o}=e,[s,c]=ii({prop:r,defaultProp:i??[],onChange:a,caller:Qg}),l=t.useCallback(e=>c((t=[])=>[...t,e]),[c]),u=t.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return y(s_,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:u,children:y(l_,{scope:e.__scopeAccordion,collapsible:!0,children:y(h_,{...o,ref:n})})})}),[p_,m_]=r_(Qg),h_=t.forwardRef((e,n)=>{let{__scopeAccordion:r,disabled:i,dir:a,orientation:o=`vertical`,...s}=e,c=t.useRef(null),l=H(c,n),u=t_(r),d=Jh(a),f=d===`ltr`,p=V(e.onKeyDown,e=>{if(!$g.includes(e.key))return;let t=e.target,n=u().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let a=r,s=i-1,c=()=>{a=r+1,a>s&&(a=0)},l=()=>{a=r-1,a<0&&(a=s)};switch(e.key){case`Home`:a=0;break;case`End`:a=s;break;case`ArrowRight`:o===`horizontal`&&(f?c():l());break;case`ArrowDown`:o===`vertical`&&c();break;case`ArrowLeft`:o===`horizontal`&&(f?l():c());break;case`ArrowUp`:o===`vertical`&&l();break}let d=a%i;n[d].ref.current?.focus()});return y(p_,{scope:r,disabled:i,direction:a,orientation:o,children:y(e_.Slot,{scope:r,children:y(U.div,{...s,"data-orientation":o,ref:l,onKeyDown:i?void 0:p})})})}),g_=`AccordionItem`,[__,v_]=r_(g_),y_=t.forwardRef((e,t)=>{let{__scopeAccordion:n,value:r,...i}=e,a=m_(g_,n),o=c_(g_,n),s=a_(n),c=it(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return y(__,{scope:n,open:l,disabled:u,triggerId:c,children:y(Yg,{"data-orientation":a.orientation,"data-state":E_(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})});y_.displayName=g_;var b_=`AccordionHeader`,x_=t.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=m_(Qg,n),a=v_(b_,n);return y(U.h3,{"data-orientation":i.orientation,"data-state":E_(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})});x_.displayName=b_;var S_=`AccordionTrigger`,C_=t.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=m_(Qg,n),a=v_(S_,n),o=u_(S_,n),s=a_(n);return y(e_.ItemSlot,{scope:n,children:y(Xg,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})});C_.displayName=S_;var w_=`AccordionContent`,T_=t.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=m_(Qg,n),a=v_(w_,n),o=a_(n);return y(Zg,{role:`region`,"aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})});T_.displayName=w_;function E_(e){return e?`open`:`closed`}var D_=o_,O_=y_,k_=C_,A_=T_;const j_=({accordionItems:e,defaultValue:t,value:n,onItemSelect:r,disabled:i,extraClassNames:a,testId:o})=>y(D_,{className:`tw:rounded-md tw:w-full tw:focus-visible:outline-none ${a||``}`,type:`single`,defaultValue:t,value:n,collapsible:!0,"data-testid":o,onValueChange:e=>r(e),children:e.map(e=>b(O_,{className:`tw:p-0 tw:flex tw:flex-col tw:w-full`,disabled:i,value:e.value,children:[y(k_,{disabled:i,className:`tw:w-full tw:cursor-default tw:focus-visible:outline-none tw:bg-transparent`,children:e.trigger}),y(A_,{className:`tw:data-[state=open]:animate-slideDown tw:data-[state=closed]:animate-slideUp tw:overflow-hidden tw:focus-visible:outline-none ${e.contentClassNames||``}`,children:e.content})]},e.value))});var M_=j_;const N_=[`tw:bg-sq-white`,`tw:dark:bg-sq-dark-background`].join(` `),P_=[`tw:border-solid`,`tw:border`,`tw:rounded-[0.5rem]`,`tw:border-sq-disabled-gray`,`tw:dark:border-gray-500`].join(` `),F_=[`tw:opacity-50`,`tw:cursor-not-allowed`].join(` `),I_=({children:t,trigger:n,id:r,hasArrow:i,extraTriggerClassNames:a,extraPopoverClassNames:o,containerTestId:s,onInteractOutside:c,onPointerDownOutside:l,isTriggerAsChild:u=!1,shouldTriggerFullWidth:d=!1,disabled:f=!1,align:p=`end`,alignOffset:m=-35,placement:h=`bottom`,placementOffset:_=2,isHoverEnabled:v=!1,hoverOpenDelay:x=300,onOpenChange:S,isOpen:C,isCloseOnContentClick:w=!1,isPortal:T=!1,...E})=>{let D=ne(E),O=g(null),[k,A]=e.useState(!1),j=()=>{O.current&&=(clearTimeout(O.current),null)},M=()=>{v&&(j(),O.current=setTimeout(()=>{A(!0),S&&S(!0)},x))},ee=()=>{v&&(j(),O.current=setTimeout(()=>{A(!1),S&&S(!1)},200))};e.useEffect(()=>j,[]);let N=()=>y(to,{sideOffset:_,align:p,side:h,onInteractOutside:c,onPointerDownOutside:l,alignOffset:v?-10:m,asChild:!0,onClick:()=>w&&S&&S(!1),className:`tw:focus-visible:outline-none tw:outline-none tw:w-full tw:h-full`,children:b(`div`,{"data-testid":s,className:`${N_} ${P_} tw:relative tw:z-[1200] tw:min-w-6 tw:focus-visible:outline-none tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out
66
66
  tw:data-[side=top]:animate-slideDownAndFade tw:data-[side=right]:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade tw:text-sq-text-color
67
- ${o||``}`,children:[i&&y(no,{asChild:!0,children:y(`div`,{className:`tw:fill-transparent tw:bg-sq-white tw:w-sq-15 tw:h-sq-15 tw:-mt-sq-7 tw:rotate-45 tw:dark:bg-sq-dark-background tw:border-b tw:border-r tw:border-sq-disabled-gray tw:dark:border-gray-500`})}),t]})}),P=e=>b(Qa,{open:e,defaultOpen:!1,onOpenChange:S,children:[n?y($a,{id:r,asChild:u,className:`tw:focus-visible:outline-none tw:outline-none tw:bg-transparent ${d?`tw:w-full tw:h-full`:``}`,disabled:f,children:y(`div`,{...D,onMouseOver:M,onMouseOut:ee,className:`tw:focus-visible:outline-none tw:outline-none tw:dark:text-sq-white ${f?F_:``} ${d?`tw:flex tw:flex-col tw:items-center tw:justify-center`:`tw:inline`} ${a||``}`,children:n})}):y($a,{asChild:!0,children:y(`div`,{})}),T?y(eo,{children:N()}):N()]});return P(v?k:C)};var L_=I_,R_=[`Enter`,` `],z_=[`ArrowDown`,`PageUp`,`Home`],B_=[`ArrowUp`,`PageDown`,`End`],V_=[...z_,...B_],H_={ltr:[...R_,`ArrowRight`],rtl:[...R_,`ArrowLeft`]},U_={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},W_=`Menu`,[G_,K_,q_]=Kh(W_),[J_,Y_]=de(W_,[q_,Ar,ng]),X_=Ar(),Z_=ng(),[Q_,$_]=J_(W_),[ev,tv]=J_(W_),nv=t=>{let{__scopeMenu:n,open:r=!1,children:i,dir:a,onOpenChange:o,modal:s=!0}=t,c=X_(n),[l,u]=e.useState(null),d=e.useRef(!1),f=xe(o),p=Jh(a);return e.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),y(Kr,{...c,children:y(Q_,{scope:n,open:r,onOpenChange:f,content:l,onContentChange:u,children:y(ev,{scope:n,onClose:e.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:s,children:i})})})};nv.displayName=W_;var rv=`MenuAnchor`,iv=e.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=X_(n);return y(qr,{...i,...r,ref:t})});iv.displayName=rv;var av=`MenuPortal`,[ov,sv]=J_(av,{forceMount:void 0}),cv=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=$_(av,t);return y(ov,{scope:t,forceMount:n,children:y($r,{present:n||a.open,children:y(Zr,{asChild:!0,container:i,children:r})})})};cv.displayName=av;var lv=`MenuContent`,[uv,dv]=J_(lv),fv=e.forwardRef((e,t)=>{let n=sv(lv,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=$_(lv,e.__scopeMenu),o=tv(lv,e.__scopeMenu);return y(G_.Provider,{scope:e.__scopeMenu,children:y($r,{present:r||a.open,children:y(G_.Slot,{scope:e.__scopeMenu,children:o.modal?y(pv,{...i,ref:t}):y(mv,{...i,ref:t})})})})}),pv=e.forwardRef((t,n)=>{let r=$_(lv,t.__scopeMenu),i=e.useRef(null),a=H(n,i);return e.useEffect(()=>{let e=i.current;if(e)return hi(e)},[]),y(gv,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:V(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),mv=e.forwardRef((e,t)=>{let n=$_(lv,e.__scopeMenu);return y(gv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),hv=pe(`MenuContent.ScrollLock`),gv=e.forwardRef((t,n)=>{let{__scopeMenu:r,loop:i=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:h,...g}=t,_=$_(lv,r),v=tv(lv,r),b=X_(r),x=Z_(r),S=K_(r),[C,w]=e.useState(null),T=e.useRef(null),E=H(n,T,_.onContentChange),D=e.useRef(0),O=e.useRef(``),k=e.useRef(0),A=e.useRef(null),j=e.useRef(`right`),M=e.useRef(0),ee=h?Ta:e.Fragment,N=h?{as:hv,allowPinchZoom:!0}:void 0,P=e=>{let t=O.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=n.map(e=>e.textValue),o=ey(a,t,i),s=n.find(e=>e.textValue===o)?.ref.current;(function e(t){O.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))})(t),s&&setTimeout(()=>s.focus())};e.useEffect(()=>()=>window.clearTimeout(D.current),[]),Le();let F=e.useCallback(e=>{let t=j.current===A.current?.side;return t&&ny(e,A.current?.area)},[]);return y(uv,{scope:r,searchRef:O,onItemEnter:e.useCallback(e=>{F(e)&&e.preventDefault()},[F]),onItemLeave:e.useCallback(e=>{F(e)||(T.current?.focus(),w(null))},[F]),onTriggerLeave:e.useCallback(e=>{F(e)&&e.preventDefault()},[F]),pointerGraceTimerRef:k,onPointerGraceIntentChange:e.useCallback(e=>{A.current=e},[]),children:y(ee,{...N,children:y(Ue,{asChild:!0,trapped:a,onMountAutoFocus:V(o,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:y(ke,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:y(mg,{asChild:!0,...x,dir:v.dir,orientation:`vertical`,loop:i,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:V(l,e=>{v.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:y(Jr,{role:`menu`,"aria-orientation":`vertical`,"data-state":Yv(_.open),"data-radix-menu-content":``,dir:v.dir,...b,...g,ref:E,style:{outline:`none`,...g.style},onKeyDown:V(g.onKeyDown,e=>{let t=e.target,n=t.closest(`[data-radix-menu-content]`)===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,i=e.key.length===1;n&&(e.key===`Tab`&&e.preventDefault(),!r&&i&&P(e.key));let a=T.current;if(e.target!==a||!V_.includes(e.key))return;e.preventDefault();let o=S().filter(e=>!e.disabled),s=o.map(e=>e.ref.current);B_.includes(e.key)&&s.reverse(),Qv(s)}),onBlur:V(t.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:V(t.onPointerMove,ry(e=>{let t=e.target,n=M.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>M.current?`right`:`left`;j.current=t,M.current=e.clientX}}))})})})})})})});fv.displayName=lv;var _v=`MenuGroup`,vv=e.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return y(U.div,{role:`group`,...r,ref:t})});vv.displayName=_v;var yv=`MenuLabel`,bv=e.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return y(U.div,{...r,ref:t})});bv.displayName=yv;var xv=`MenuItem`,Sv=`menu.itemSelect`,Cv=e.forwardRef((t,n)=>{let{disabled:r=!1,onSelect:i,...a}=t,o=e.useRef(null),s=tv(xv,t.__scopeMenu),c=dv(xv,t.__scopeMenu),l=H(n,o),u=e.useRef(!1),d=()=>{let e=o.current;if(!r&&e){let t=new CustomEvent(Sv,{bubbles:!0,cancelable:!0});e.addEventListener(Sv,e=>i?.(e),{once:!0}),be(e,t),t.defaultPrevented?u.current=!1:s.onClose()}};return y(wv,{...a,ref:l,disabled:r,onClick:V(t.onClick,d),onPointerDown:e=>{t.onPointerDown?.(e),u.current=!0},onPointerUp:V(t.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:V(t.onKeyDown,e=>{let t=c.searchRef.current!==``;r||t&&e.key===` `||R_.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Cv.displayName=xv;var wv=e.forwardRef((t,n)=>{let{__scopeMenu:r,disabled:i=!1,textValue:a,...o}=t,s=dv(xv,r),c=Z_(r),l=e.useRef(null),u=H(n,l),[d,f]=e.useState(!1),[p,m]=e.useState(``);return e.useEffect(()=>{let e=l.current;e&&m((e.textContent??``).trim())},[o.children]),y(G_.ItemSlot,{scope:r,disabled:i,textValue:a??p,children:y(hg,{asChild:!0,...c,focusable:!i,children:y(U.div,{role:`menuitem`,"data-highlighted":d?``:void 0,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,...o,ref:u,onPointerMove:V(t.onPointerMove,ry(e=>{if(i)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){let t=e.currentTarget;t.focus({preventScroll:!0})}})),onPointerLeave:V(t.onPointerLeave,ry(e=>s.onItemLeave(e))),onFocus:V(t.onFocus,()=>f(!0)),onBlur:V(t.onBlur,()=>f(!1))})})})}),Tv=`MenuCheckboxItem`,Ev=e.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return y(Pv,{scope:e.__scopeMenu,checked:n,children:y(Cv,{role:`menuitemcheckbox`,"aria-checked":Xv(n)?`mixed`:n,...i,ref:t,"data-state":Zv(n),onSelect:V(i.onSelect,()=>r?.(Xv(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ev.displayName=Tv;var Dv=`MenuRadioGroup`,[Ov,kv]=J_(Dv,{value:void 0,onValueChange:()=>{}}),Av=e.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=xe(r);return y(Ov,{scope:e.__scopeMenu,value:n,onValueChange:a,children:y(vv,{...i,ref:t})})});Av.displayName=Dv;var jv=`MenuRadioItem`,Mv=e.forwardRef((e,t)=>{let{value:n,...r}=e,i=kv(jv,e.__scopeMenu),a=n===i.value;return y(Pv,{scope:e.__scopeMenu,checked:a,children:y(Cv,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Zv(a),onSelect:V(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Mv.displayName=jv;var Nv=`MenuItemIndicator`,[Pv,Fv]=J_(Nv,{checked:!1}),Iv=e.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Fv(Nv,n);return y($r,{present:r||Xv(a.checked)||a.checked===!0,children:y(U.span,{...i,ref:t,"data-state":Zv(a.checked)})})});Iv.displayName=Nv;var Lv=`MenuSeparator`,Rv=e.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return y(U.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Rv.displayName=Lv;var zv=`MenuArrow`,Bv=e.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=X_(n);return y(Yr,{...i,...r,ref:t})});Bv.displayName=zv;var Vv=`MenuSub`,[Hv,Uv]=J_(Vv),Wv=t=>{let{__scopeMenu:n,children:r,open:i=!1,onOpenChange:a}=t,o=$_(Vv,n),s=X_(n),[c,l]=e.useState(null),[u,d]=e.useState(null),f=xe(a);return e.useEffect(()=>(o.open===!1&&f(!1),()=>f(!1)),[o.open,f]),y(Kr,{...s,children:y(Q_,{scope:n,open:i,onOpenChange:f,content:u,onContentChange:d,children:y(Hv,{scope:n,contentId:it(),triggerId:it(),trigger:c,onTriggerChange:l,children:r})})})};Wv.displayName=Vv;var Gv=`MenuSubTrigger`,Kv=e.forwardRef((t,n)=>{let r=$_(Gv,t.__scopeMenu),i=tv(Gv,t.__scopeMenu),a=Uv(Gv,t.__scopeMenu),o=dv(Gv,t.__scopeMenu),s=e.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=o,u={__scopeMenu:t.__scopeMenu},d=e.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return e.useEffect(()=>d,[d]),e.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),l(null)}},[c,l]),y(iv,{asChild:!0,...u,children:y(wv,{id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":r.open,"aria-controls":a.contentId,"data-state":Yv(r.open),...t,ref:le(n,a.onTriggerChange),onClick:e=>{t.onClick?.(e),!(t.disabled||e.defaultPrevented)&&(e.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:V(t.onPointerMove,ry(e=>{o.onItemEnter(e),!e.defaultPrevented&&!t.disabled&&!r.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:V(t.onPointerLeave,ry(e=>{d();let t=r.content?.getBoundingClientRect();if(t){let n=r.content?.dataset.side,i=n===`right`,a=i?-5:5,s=t[i?`left`:`right`],l=t[i?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:n}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:V(t.onKeyDown,e=>{let n=o.searchRef.current!==``;t.disabled||n&&e.key===` `||H_[i.dir].includes(e.key)&&(r.onOpenChange(!0),r.content?.focus(),e.preventDefault())})})})});Kv.displayName=Gv;var qv=`MenuSubContent`,Jv=e.forwardRef((t,n)=>{let r=sv(lv,t.__scopeMenu),{forceMount:i=r.forceMount,...a}=t,o=$_(lv,t.__scopeMenu),s=tv(lv,t.__scopeMenu),c=Uv(qv,t.__scopeMenu),l=e.useRef(null),u=H(n,l);return y(G_.Provider,{scope:t.__scopeMenu,children:y($r,{present:i||o.open,children:y(G_.Slot,{scope:t.__scopeMenu,children:y(gv,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:`start`,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:V(t.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:V(t.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:V(t.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=U_[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});Jv.displayName=qv;function Yv(e){return e?`open`:`closed`}function Xv(e){return e===`indeterminate`}function Zv(e){return Xv(e)?`indeterminate`:e?`checked`:`unchecked`}function Qv(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function $v(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ey(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0]),i=r?t[0]:t,a=n?e.indexOf(n):-1,o=$v(e,Math.max(a,0)),s=i.length===1;s&&(o=o.filter(e=>e!==n));let c=o.find(e=>e.toLowerCase().startsWith(i.toLowerCase()));return c===n?void 0:c}function ty(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y,f=l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c;f&&(i=!i)}return i}function ny(e,t){if(!t)return!1;let n={x:e.clientX,y:e.clientY};return ty(n,t)}function ry(e){return t=>t.pointerType===`mouse`?e(t):void 0}var iy=nv,ay=iv,oy=cv,sy=fv,cy=vv,ly=bv,uy=Cv,dy=Ev,fy=Av,py=Mv,my=Iv,hy=Rv,gy=Bv,_y=Wv,vy=Kv,yy=Jv,by=`DropdownMenu`,[xy,Sy]=de(by,[Y_]),Cy=Y_(),[wy,Ty]=xy(by),Ey=t=>{let{__scopeDropdownMenu:n,children:r,dir:i,open:a,defaultOpen:o,onOpenChange:s,modal:c=!0}=t,l=Cy(n),u=e.useRef(null),[d,f]=ii({prop:a,defaultProp:o??!1,onChange:s,caller:by});return y(wy,{scope:n,triggerId:it(),triggerRef:u,contentId:it(),open:d,onOpenChange:f,onOpenToggle:e.useCallback(()=>f(e=>!e),[f]),modal:c,children:y(iy,{...l,open:d,onOpenChange:f,dir:i,modal:c,children:r})})};Ey.displayName=by;var Dy=`DropdownMenuTrigger`,Oy=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Ty(Dy,n),o=Cy(n);return y(ay,{asChild:!0,...o,children:y(U.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:le(t,a.triggerRef),onPointerDown:V(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:V(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Oy.displayName=Dy;var ky=`DropdownMenuPortal`,Ay=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Cy(t);return y(oy,{...r,...n})};Ay.displayName=ky;var jy=`DropdownMenuContent`,My=e.forwardRef((t,n)=>{let{__scopeDropdownMenu:r,...i}=t,a=Ty(jy,r),o=Cy(r),s=e.useRef(!1);return y(sy,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...i,ref:n,onCloseAutoFocus:V(t.onCloseAutoFocus,e=>{s.current||a.triggerRef.current?.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:V(t.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!a.modal||r)&&(s.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});My.displayName=jy;var Ny=`DropdownMenuGroup`,Py=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(cy,{...i,...r,ref:t})});Py.displayName=Ny;var Fy=`DropdownMenuLabel`,Iy=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(ly,{...i,...r,ref:t})});Iy.displayName=Fy;var Ly=`DropdownMenuItem`,Ry=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(uy,{...i,...r,ref:t})});Ry.displayName=Ly;var zy=`DropdownMenuCheckboxItem`,By=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(dy,{...i,...r,ref:t})});By.displayName=zy;var Vy=`DropdownMenuRadioGroup`,Hy=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(fy,{...i,...r,ref:t})});Hy.displayName=Vy;var Uy=`DropdownMenuRadioItem`,Wy=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(py,{...i,...r,ref:t})});Wy.displayName=Uy;var Gy=`DropdownMenuItemIndicator`,Ky=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(my,{...i,...r,ref:t})});Ky.displayName=Gy;var qy=`DropdownMenuSeparator`,Jy=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(hy,{...i,...r,ref:t})});Jy.displayName=qy;var Yy=`DropdownMenuArrow`,Xy=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(gy,{...i,...r,ref:t})});Xy.displayName=Yy;var Zy=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=Cy(t),[s,c]=ii({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return y(_y,{...o,open:s,onOpenChange:c,children:n})},Qy=`DropdownMenuSubTrigger`,$y=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(vy,{...i,...r,ref:t})});$y.displayName=Qy;var eb=`DropdownMenuSubContent`,tb=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(yy,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});tb.displayName=eb;var nb=Ey,rb=Oy,ib=Ay,ab=My,ob=Iy,sb=Ry,cb=Jy,lb=Xy,ub=Zy,db=$y,fb=tb;const pb=[`tw:border-solid`,`tw:border`,`tw:rounded-[0.5rem]`,`tw:border-sq-disabled-gray`,`tw:dark:border-gray-500`].join(` `),mb=[`tw:bg-sq-white`,`tw:dark:bg-sq-dark-background`].join(` `),hb=e=>{let{label:t,variant:n=`outline`,size:r=`sm`,icon:i,iconStyle:a=`text`,iconColor:o,iconPosition:s=`left`,iconPrefix:c,extraClassNames:l=``,testId:u,id:d,disabled:f=!1,...p}=e;return y(gb,{...e,children:y(rb,{asChild:!0,id:d,disabled:f,children:y(se,{label:t,variant:n,size:r,icon:i,iconStyle:a,iconColor:o,iconPosition:s,iconPrefix:c,extraClassNames:l,testId:u,disabled:f,tooltip:p.tooltip,tooltipOptions:{delay:p.tooltipDelay,position:p.tooltipPlacement}})})})},gb=({dropdownItems:e,id:t,children:n,contentExtraClassNames:r=``,containerTestId:i,align:a=`end`,placement:o=`bottom`,placementOffset:s=5,alignOffset:c=-35,hasArrow:l=!1,onOpenChange:u,isOpen:d,setFocusOnTriggerOnClose:f=!0,keepFocusInsideDropdown:p=!0,onContainerClick:m})=>b(nb,{defaultOpen:!1,open:d,onOpenChange:u,modal:p,children:[n,y(ib,{children:y(ab,{onClick:m,sideOffset:s,side:o,align:a,alignOffset:c,asChild:!0,onCloseAutoFocus:e=>!f&&e.preventDefault(),className:`tw:focus-visible:outline-none tw:outline-none`,children:b(`div`,{"data-testid":i,className:`${mb} tw:relative tw:z-[1200] tw:min-w-6 tw:py-2 tw:focus-visible:outline-none tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out forceFont tw:data-[side=top]:animate-slideDownAndFade tw:data-[side=right]:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade ${pb} ${r}`,children:[l&&y(lb,{asChild:!0,children:y(`div`,{className:`tw:fill-transparent tw:bg-sq-white tw:w-sq-15 tw:h-sq-15 tw:rotate-45 tw:dark:bg-sq-dark-background tw:border-b tw:border-r tw:border-sq-disabled-gray tw:dark:border-gray-500 tw:-mt-sq-7`})}),e.map((e,n)=>{let r=ne(e);return e.isLabel?b(ob,{className:e.itemExtraClassNames,...r,children:[e.icon&&y(B,{icon:e.icon,testId:e.iconTestId,type:`text`,color:e.iconColor,extraClassNames:`tw:text-sq-text-color tw:dark:text-sq-white tw:w-4.5`}),y(`div`,{"data-testid":e.labelTestId,className:`tw:text-sq-13 tw:ml-1 ${e.disabled?`tw:text-sq-disabled-gray`:`tw:text-sq-text-color tw:dark:text-sq-white`} tw:not-italic tw:font-normal ${e.labelClasses}`,children:e.label})]},(e.id||``)+n):Array.isArray(e.subMenuItems)&&e.subMenuItems.length>0?b(ub,{children:[b(db,{id:t,className:`tw:cursor-pointer tw:flex tw:justify-between tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:leading-none tw:items-center tw:h-sq-27 tw:pl-sq-19 tw:relative tw:select-none tw:outline-none tw:data-disabled:pointer-events-none ${e.itemExtraClassNames||``}`,"data-testid":e.testId,disabled:e.disabled,...r,children:[b(`div`,{className:`tw:flex`,children:[e.icon&&y(`div`,{className:`tw:min-w-5`,children:y(B,{icon:e.icon,extraClassNames:`tw:w-4.5 ${e.disabled?`tw:text-sq-disabled-gray!`:`tw:text-sq-text-color tw:dark:text-sq-white`} ${e.iconExtraClassNames||``}`})}),y(`div`,{"data-testid":e.labelTestId,"data-customid":e.labelCustomId,className:`tw:text-sq-13 tw:ml-1 ${e.disabled&&`tw:opacity-30!`} tw:not-italic tw:font-semibold ${e.labelClasses}`,children:e.label})]}),y(`div`,{className:`tw:flex tw:justify-center tw:items-center`,children:y(B,{size:`sm`,icon:`fc-arrow-dropdown tw:rotate-270`,extraClassNames:`${e.disabled?`tw:text-sq-disabled-gray`:`tw:text-sq-text-color tw:dark:text-sq-white`} tw:ml-4 tw:mr-2 tw:text-2`})})]}),y(ib,{children:y(fb,{className:`tw:focus-visible:outline-none tw:outline-none`,children:y(`div`,{"data-testid":i,className:`${mb} tw:relative tw:z-[1000] tw:min-w-6 tw:py-2 tw:focus-visible:outline-none tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out forceFont tw:data-[side=top]:animate-slideDownAndFade tw:data-[side=right]:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade ${pb}`,children:e.subMenuItems.map((t,n)=>b(sb,{onSelect:t.onClick,"data-qtip-text":t.tooltip,className:`tw:cursor-pointer tw:flex tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:leading-none tw:items-center tw:h-sq-27 tw:px-sq-19 tw:relative tw:select-none tw:outline-none tw:data-disabled:pointer-events-none`,disabled:t.disabled,children:[t.iconClass&&y(B,{icon:t.iconClass,type:`text`,extraClassNames:`tw:w-4.5 ${e.disabled&&`tw:opacity-30!`}`}),y(`div`,{className:`tw:text-sq-13 tw:ml-1 ${t.disabled?`tw:text-sq-disabled-gray`:`tw:text-sq-text-color tw:dark:text-sq-white`} tw:not-italic tw:font-normal ${e.labelClasses}`,children:t.label})]},t.label+n))})})})]},(e.id||e.icon||``)+n):b(`div`,{...r,children:[b(sb,{"data-customid":e.itemCustomId,onSelect:t=>{e.onClick(t)},className:`tw:cursor-pointer tw:flex tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:leading-none tw:items-center tw:min-h-sq-27 tw:px-sq-19 tw:relative tw:select-none tw:outline-none tw:data-disabled:pointer-events-none ${e.itemExtraClassNames||``}`,"data-testid":e.testId,disabled:e.disabled,children:[e.icon&&y(`div`,{className:`tw:min-w-5`,children:y(B,{icon:e.icon,testId:e.iconTestId,type:e.iconType||`text`,color:e.iconColor,customId:e.iconCustomId,extraClassNames:`tw:w-sq-4.5 ${e.disabled&&`tw:opacity-30!`} ${e.iconExtraClassNames||``}`})}),y(`div`,{"data-testid":e.labelTestId,"data-customid":e.labelCustomId,className:`tw:text-sq-13 tw:ml-1 ${e.disabled?`tw:text-sq-disabled-gray`:`tw:text-sq-text-color tw:dark:text-sq-white`} tw:not-italic tw:font-normal ${e.labelClasses||``}`,children:e.label})]},(e.id||e.icon||``)+n),e.hasDivider&&y(cb,{"data-testid":`dropdown-divider-${n}`,className:`tw:h-px tw:bg-sq-disabled-gray tw:dark:bg-gray-500 tw:my-2`})]},(e.id||``)+n)})]})})})]});var _b=hb;const vb=[`tw:opacity-50`,`tw:cursor-not-allowed`].join(` `),yb=e=>{let{triggerIcon:t,id:n,extraClassNames:r=``,disabled:i=!1,...a}=e,o=ne(a);return y(gb,{...e,children:y(rb,{id:n,className:`tw:bg-transparent tw:border-none tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none`,disabled:i,children:y(`div`,{...o,className:`tw:bg-transparent tw:flex tw:flex-col tw:items-center tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none ${i?vb:``} ${r}`,children:t})})})};var bb=yb;const xb=({children:e,dismissible:t=!0,onClose:n,show:r=!0,variant:i,testId:a=`alert-id`,id:o,extraClassNames:s,...c})=>{let l={theme:`tw:text-sq-text-color tw:bg-sq-theme-highlight/10 tw:dark:bg-sq-theme-hover-dark tw:dark:text-sq-text-color-dark`,formulaError:`tw:text-red-800 tw:bg-red-200 tw:rounded-[0.25rem]!`,danger:`tw:text-sq-text-color tw:bg-sq-danger`,warning:`tw:bg-sq-bg-warning tw:text-sq-text-color tw:dark:text-sq-multi-gray-dark`,gray:`tw:bg-sq-hover-gray tw:text-sq-text-color tw:dark:bg-sq-tools-background-dark tw:dark:text-sq-text-color-dark`},u={theme:`tw:border-sq-theme-dark`,danger:`tw:border-sq-danger`,warning:`tw:border-none`,gray:`tw:border-sq-darkish-gray`,formulaError:`tw:border-red-100`},d=`tw:mx-auto tw:leading-normal tw:outline-none tw:py-2 tw:px-3 tw:rounded-[10px] tw:w-full tw:relative tw:border-solid tw:border tw:text-sm tw:flex tw:flex-col tw:justify-center tw:items-center ${l[i]} ${s} ${u[i]}`;return r?b(`div`,{"data-testid":a,id:o,className:d,children:[e,t&&y(B,{icon:`fc-delete`,type:i.match(/danger|warning|formulaError/)?`color`:`theme`,color:i.match(/danger|warning|formulaError/)?`inherit`:void 0,extraClassNames:`tw:self-end tw:text-size-11 tw:cursor-pointer tw:absolute tw:right-2.5 tw:top-2.5 ${i.match(/danger|warning|gray|formulaError/)?`tw:text-sq-text-color tw:dark:text-sq-dark-text`:``}`,testId:`${a}-close-btn`,onClick:n,...c})]}):y(`div`,{})},Sb=({onClick:e,icon:t,color:n,type:r=`default`,extraClassNames:i,viewBox:a=`0 0 19 19`,id:o,testId:s,customId:c,...l})=>{let u=`${e?`tw:cursor-pointer`:``} ${i} tw:focus:outline-none tw:focus-visible:outline-none
68
- tw:outline-none`,d=ne(l),f=r===`default`?`currentColor`:`var(--theme-icon)`;return y(`div`,{onClick:e,...d,className:`svgContainer ${u}`,children:y(`svg`,{xmlns:`http://www.w3.org/2000/svg`,className:`tw:text-sq-theme-icon tw:dark:text-sq-white`,viewBox:a,fill:n||f,"data-testid":s,children:y(`path`,{d:io(t)})})})};var Cb=Sb,wb=N(Ph());const Tb=e=>{let t=y(v,{});return e.icon&&(t=ro(e.icon)?y(Cb,{icon:e.icon,extraClassNames:e.iconExtraClassNames+`tw:p-1 tw:h-9 tw:w-9 tw:dark:text-sq-white tw:text-5.5! tw:text-sq-white`,...e}):y(B,{icon:e.icon,type:`text`,extraClassNames:`tw:dark:text-sq-white tw:text-5.5! tw:text-sq-white tw:min-w-9 `+e.iconExtraClassNames})),b(`div`,{className:`tw:flex-row tw:flex tw:p-2.5 tw:pl-5 tw:w-150 tw:gap-4`,children:[y(`div`,{className:(0,wb.default)(`tw:rounded-[0.1875rem] tw:h-9 tw:w-9 tw:bg-sq-theme-dark tw:flex tw:justify-center tw:items-center tw:mt-1.5`,e.iconContainerExtraClassNames),children:t}),b(`div`,{className:`tw:flex tw:flex-col tw:justify-center`,children:[y(`div`,{className:`tw:text-[20px] tw:font-semibold`,children:e.display}),y(`div`,{className:`tw:text-sq-13 tw:leading-4`,children:e.text})]})]})},Eb=e=>{let t=y(v,{});return e.icon&&(t=ro(e.icon)?y(Cb,{icon:e.icon,extraClassNames:`tw:w-4 tw:text-5 tw:dark:text-sq-white tw:text-sq-text-color `+e.iconExtraClassNames,type:`default`,...e}):y(B,{icon:e.icon,type:`text`,extraClassNames:`tw:text-5 tw:dark:text-sq-white tw:text-sq-text-color `+e.iconExtraClassNames})),y(`div`,{className:`tw:flex-col tw:flex tw:p-2.5`,children:b(`div`,{className:`tw:flex tw:flex-row tw:gap-2 tw:items-end`,children:[y(`div`,{className:`tw:rounded-[0.1875rem] tw:h-5 tw:w-5 tw:flex tw:justify-center tw:items-center `,children:t}),y(`div`,{className:`tw:text-sq-13`,children:e.display})]})})},Db=e=>b(`div`,{className:`tw:flex-col tw:flex tw:justify-start tw:p-2.5 tw:font-normal tw:text-left tw:text-sq-text-color tw:dark:text-sq-dark-text`,children:[y(`h5`,{className:`tw:text-4 tw:font-medium tw:text-sq-theme-dark tw:leading-4.5`,children:e.display}),y(`div`,{className:`tw:text-sq-13 tw:text-sq-text-color tw:dark:text-sq-dark-text tw:mt-1!`,children:e.text})]}),Ob=[`tw:border-solid`,`tw:border`,`tw:rounded-md`,`tw:border-sq-disabled-gray`,`tw:dark:border-gray-500`].join(` `),kb=[`tw:bg-sq-white`,`tw:dark:bg-sq-dark-background`].join(` `),Ab=[`tw:opacity-50`,`tw:cursor-not-allowed`].join(` `),jb=(e,t)=>{switch(e){case`create-workbench`:return y(Tb,{...t});case`view-workbench`:return y(Eb,{...t});case`insert-seeq-content`:return y(Db,{...t});default:return y(Tb,{...t})}},Mb=({seeqActionDropdownItems:e,trigger:t,id:n,extraClassNames:r,containerTestId:i,disabled:a=!1,align:o=`end`,placement:s=`bottom`,placementOffset:c=5,alignOffset:l=-35,hasArrow:u=!1,onOpenChange:d,isOpen:f,setFocusOnTriggerOnClose:p=!0,keepFocusInsideDropdown:m=!0,variant:h,...g})=>{let _=ne(g);return b(nb,{defaultOpen:!1,open:f,onOpenChange:d,modal:m,children:[y(rb,{id:n,"data-testid":n,className:`tw:border-none tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none`,asChild:!0,disabled:a,children:y(`div`,{..._,className:`tw:bg-transparent tw:flex tw:flex-col tw:items-center tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none ${a?Ab:``} ${r||``}`,children:t})}),y(ab,{sideOffset:c,side:s,align:o,alignOffset:l,asChild:!0,onCloseAutoFocus:e=>!p&&e.preventDefault(),className:`tw:focus-visible:outline-none tw:outline-none`,children:b(`div`,{"data-testid":i,className:kb+` tw:relative tw:z-[1200] tw:min-w-6 tw:py-2 tw:shadow-[0_4px_8px_rgba(0,0,0,0.2)] tw:focus-visible:outline-none tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out forceFont tw:data-[side=top]:animate-slideDownAndFade tw:data-[side=right]:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade `+Ob,children:[u&&y(lb,{asChild:!0,children:y(`div`,{className:` tw:fill-transparent tw:bg-sq-white tw:w-sq-15 tw:h-sq-15 tw:rotate-45 tw:dark:bg-sq-dark-background tw:border-b tw:border-r tw:border-sq-disabled-gray tw:dark:border-gray-500 tw:-mt-sq-7`})}),e.map((e,t)=>b(`div`,{children:[y(sb,{onSelect:t=>{e.action(t)},className:`tw:cursor-pointer tw:flex tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:relative tw:select-none tw:outline-none tw:data-[disabled]:text-sq-disabled-gray tw:data-[disabled]:pointer-events-none`,"data-testid":e.testId,disabled:!e.enabled,children:jb(h,e)}),e.divider&&y(cb,{"data-testid":`dropdown-divider-${t}`,className:`tw:h-px tw:bg-sq-disabled-gray tw:dark:bg-gray-500 tw:my-2`})]},e.display+t))]})})]})};var Nb=Mb;const Pb=[`tw:border-sq-disabled-gray`,`tw:dark:border-sq-dark-disabled-gray`,`tw:dark:focus:border-sq-theme-darker`,`tw:dark:active:border-sq-theme-darker`,`tw:focus:border-sq-theme-dark`,`tw:active:border-sq-theme-dark`].join(` `),Fb=t.forwardRef((e,n)=>{let{readonly:r=!1,onChange:i,onKeyUp:a,onFocus:o,onBlur:s,onKeyDown:c,name:l,value:u,placeholder:d,append:f=[],extraClassNames:p=``,id:m,testId:h,showError:g,required:_,autoComplete:v,autoFocus:x,disabled:S,type:C,step:w,min:T,max:E,field:D,maxLength:O,minLength:k,inputGroup:A,...j}=e,M=ne(j),ee=`tw:flex tw:outline-none tw:rounded-md tw:w-full tw:relative tw:flex-wrap ${p}`,N=f.filter(Boolean),P=A??(N.length>0?`left`:void 0),F=P===`left`?`tw:rounded-l-md tw:rounded-r-none`:P===`right`?`tw:rounded-r-md tw:rounded-l-none`:`tw:rounded-md`,I=`tw:leading-normal tw:outline-none tw:py-1 tw:px-3 tw:p-1 tw:border-solid tw:border ${p} tw:text-sq-text-color tw:disabled:text-sq-darkish-gray tw:dark:bg-sq-dark-background tw:dark:text-sq-dark-text tw:disabled:dark:text-sq-disabled-gray ${F} ${g?`tw:border-sq-danger`:Pb} `,L=t.isValidElement(D)&&typeof D.type!=`string`,R=L?t.cloneElement(D,{inputGroup:P}):D;return b(`div`,{id:`input-group-${m}`,className:ee,children:[D?y(`div`,{"data-testid":h,className:`tw:flex tw:flex-1 tw:cursor-pointer tw:active:z-50 ${I}`,children:R}):y(yo,{testId:h,readonly:r,onChange:i,onKeyUp:a,onFocus:o,onBlur:s,onKeyDown:c,name:l,ref:n,showError:g,value:u,required:_,placeholder:d,autoComplete:v,autoFocus:x,id:m,type:C,disabled:S,step:w,min:T,max:E,maxLength:O,minLength:k,inputGroup:P,extraClassNames:`tw:flex tw:flex-1 tw:w-full tw:focus:z-30 ${p}`,...M}),N.map((e,t)=>e?.variant===`button`?y(se,{extraClassNames:`$
67
+ ${o||``}`,children:[i&&y(no,{asChild:!0,children:y(`div`,{className:`tw:fill-transparent tw:bg-sq-white tw:w-sq-15 tw:h-sq-15 tw:-mt-sq-7 tw:rotate-45 tw:dark:bg-sq-dark-background tw:border-b tw:border-r tw:border-sq-disabled-gray tw:dark:border-gray-500`})}),t]})}),P=e=>b(Qa,{open:e,defaultOpen:!1,onOpenChange:S,children:[n?y($a,{id:r,asChild:u,className:`tw:focus-visible:outline-none tw:outline-none tw:bg-transparent ${d?`tw:w-full tw:h-full`:``}`,disabled:f,children:y(`div`,{...D,onMouseOver:M,onMouseOut:ee,className:`tw:focus-visible:outline-none tw:outline-none tw:dark:text-sq-white ${f?F_:``} ${d?`tw:flex tw:flex-col tw:items-center tw:justify-center`:`tw:inline`} ${a||``}`,children:n})}):y($a,{asChild:!0,children:y(`div`,{})}),T?y(eo,{children:N()}):N()]});return P(v?k:C)};var L_=I_,R_=[`Enter`,` `],z_=[`ArrowDown`,`PageUp`,`Home`],B_=[`ArrowUp`,`PageDown`,`End`],V_=[...z_,...B_],H_={ltr:[...R_,`ArrowRight`],rtl:[...R_,`ArrowLeft`]},U_={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},W_=`Menu`,[G_,K_,q_]=Kh(W_),[J_,Y_]=de(W_,[q_,Ar,ng]),X_=Ar(),Z_=ng(),[Q_,$_]=J_(W_),[ev,tv]=J_(W_),nv=t=>{let{__scopeMenu:n,open:r=!1,children:i,dir:a,onOpenChange:o,modal:s=!0}=t,c=X_(n),[l,u]=e.useState(null),d=e.useRef(!1),f=xe(o),p=Jh(a);return e.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),y(Kr,{...c,children:y(Q_,{scope:n,open:r,onOpenChange:f,content:l,onContentChange:u,children:y(ev,{scope:n,onClose:e.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:s,children:i})})})};nv.displayName=W_;var rv=`MenuAnchor`,iv=e.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=X_(n);return y(qr,{...i,...r,ref:t})});iv.displayName=rv;var av=`MenuPortal`,[ov,sv]=J_(av,{forceMount:void 0}),cv=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=$_(av,t);return y(ov,{scope:t,forceMount:n,children:y($r,{present:n||a.open,children:y(Zr,{asChild:!0,container:i,children:r})})})};cv.displayName=av;var lv=`MenuContent`,[uv,dv]=J_(lv),fv=e.forwardRef((e,t)=>{let n=sv(lv,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=$_(lv,e.__scopeMenu),o=tv(lv,e.__scopeMenu);return y(G_.Provider,{scope:e.__scopeMenu,children:y($r,{present:r||a.open,children:y(G_.Slot,{scope:e.__scopeMenu,children:o.modal?y(pv,{...i,ref:t}):y(mv,{...i,ref:t})})})})}),pv=e.forwardRef((t,n)=>{let r=$_(lv,t.__scopeMenu),i=e.useRef(null),a=H(n,i);return e.useEffect(()=>{let e=i.current;if(e)return hi(e)},[]),y(gv,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:V(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),mv=e.forwardRef((e,t)=>{let n=$_(lv,e.__scopeMenu);return y(gv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),hv=pe(`MenuContent.ScrollLock`),gv=e.forwardRef((t,n)=>{let{__scopeMenu:r,loop:i=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:h,...g}=t,_=$_(lv,r),v=tv(lv,r),b=X_(r),x=Z_(r),S=K_(r),[C,w]=e.useState(null),T=e.useRef(null),E=H(n,T,_.onContentChange),D=e.useRef(0),O=e.useRef(``),k=e.useRef(0),A=e.useRef(null),j=e.useRef(`right`),M=e.useRef(0),ee=h?Ta:e.Fragment,N=h?{as:hv,allowPinchZoom:!0}:void 0,P=e=>{let t=O.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=n.map(e=>e.textValue),o=ey(a,t,i),s=n.find(e=>e.textValue===o)?.ref.current;(function e(t){O.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))})(t),s&&setTimeout(()=>s.focus())};e.useEffect(()=>()=>window.clearTimeout(D.current),[]),Le();let F=e.useCallback(e=>{let t=j.current===A.current?.side;return t&&ny(e,A.current?.area)},[]);return y(uv,{scope:r,searchRef:O,onItemEnter:e.useCallback(e=>{F(e)&&e.preventDefault()},[F]),onItemLeave:e.useCallback(e=>{F(e)||(T.current?.focus(),w(null))},[F]),onTriggerLeave:e.useCallback(e=>{F(e)&&e.preventDefault()},[F]),pointerGraceTimerRef:k,onPointerGraceIntentChange:e.useCallback(e=>{A.current=e},[]),children:y(ee,{...N,children:y(Ue,{asChild:!0,trapped:a,onMountAutoFocus:V(o,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:y(ke,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:y(mg,{asChild:!0,...x,dir:v.dir,orientation:`vertical`,loop:i,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:V(l,e=>{v.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:y(Jr,{role:`menu`,"aria-orientation":`vertical`,"data-state":Yv(_.open),"data-radix-menu-content":``,dir:v.dir,...b,...g,ref:E,style:{outline:`none`,...g.style},onKeyDown:V(g.onKeyDown,e=>{let t=e.target,n=t.closest(`[data-radix-menu-content]`)===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,i=e.key.length===1;n&&(e.key===`Tab`&&e.preventDefault(),!r&&i&&P(e.key));let a=T.current;if(e.target!==a||!V_.includes(e.key))return;e.preventDefault();let o=S().filter(e=>!e.disabled),s=o.map(e=>e.ref.current);B_.includes(e.key)&&s.reverse(),Qv(s)}),onBlur:V(t.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:V(t.onPointerMove,ry(e=>{let t=e.target,n=M.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>M.current?`right`:`left`;j.current=t,M.current=e.clientX}}))})})})})})})});fv.displayName=lv;var _v=`MenuGroup`,vv=e.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return y(U.div,{role:`group`,...r,ref:t})});vv.displayName=_v;var yv=`MenuLabel`,bv=e.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return y(U.div,{...r,ref:t})});bv.displayName=yv;var xv=`MenuItem`,Sv=`menu.itemSelect`,Cv=e.forwardRef((t,n)=>{let{disabled:r=!1,onSelect:i,...a}=t,o=e.useRef(null),s=tv(xv,t.__scopeMenu),c=dv(xv,t.__scopeMenu),l=H(n,o),u=e.useRef(!1),d=()=>{let e=o.current;if(!r&&e){let t=new CustomEvent(Sv,{bubbles:!0,cancelable:!0});e.addEventListener(Sv,e=>i?.(e),{once:!0}),be(e,t),t.defaultPrevented?u.current=!1:s.onClose()}};return y(wv,{...a,ref:l,disabled:r,onClick:V(t.onClick,d),onPointerDown:e=>{t.onPointerDown?.(e),u.current=!0},onPointerUp:V(t.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:V(t.onKeyDown,e=>{let t=c.searchRef.current!==``;r||t&&e.key===` `||R_.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Cv.displayName=xv;var wv=e.forwardRef((t,n)=>{let{__scopeMenu:r,disabled:i=!1,textValue:a,...o}=t,s=dv(xv,r),c=Z_(r),l=e.useRef(null),u=H(n,l),[d,f]=e.useState(!1),[p,m]=e.useState(``);return e.useEffect(()=>{let e=l.current;e&&m((e.textContent??``).trim())},[o.children]),y(G_.ItemSlot,{scope:r,disabled:i,textValue:a??p,children:y(hg,{asChild:!0,...c,focusable:!i,children:y(U.div,{role:`menuitem`,"data-highlighted":d?``:void 0,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,...o,ref:u,onPointerMove:V(t.onPointerMove,ry(e=>{if(i)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){let t=e.currentTarget;t.focus({preventScroll:!0})}})),onPointerLeave:V(t.onPointerLeave,ry(e=>s.onItemLeave(e))),onFocus:V(t.onFocus,()=>f(!0)),onBlur:V(t.onBlur,()=>f(!1))})})})}),Tv=`MenuCheckboxItem`,Ev=e.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return y(Pv,{scope:e.__scopeMenu,checked:n,children:y(Cv,{role:`menuitemcheckbox`,"aria-checked":Xv(n)?`mixed`:n,...i,ref:t,"data-state":Zv(n),onSelect:V(i.onSelect,()=>r?.(Xv(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ev.displayName=Tv;var Dv=`MenuRadioGroup`,[Ov,kv]=J_(Dv,{value:void 0,onValueChange:()=>{}}),Av=e.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=xe(r);return y(Ov,{scope:e.__scopeMenu,value:n,onValueChange:a,children:y(vv,{...i,ref:t})})});Av.displayName=Dv;var jv=`MenuRadioItem`,Mv=e.forwardRef((e,t)=>{let{value:n,...r}=e,i=kv(jv,e.__scopeMenu),a=n===i.value;return y(Pv,{scope:e.__scopeMenu,checked:a,children:y(Cv,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Zv(a),onSelect:V(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Mv.displayName=jv;var Nv=`MenuItemIndicator`,[Pv,Fv]=J_(Nv,{checked:!1}),Iv=e.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Fv(Nv,n);return y($r,{present:r||Xv(a.checked)||a.checked===!0,children:y(U.span,{...i,ref:t,"data-state":Zv(a.checked)})})});Iv.displayName=Nv;var Lv=`MenuSeparator`,Rv=e.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return y(U.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Rv.displayName=Lv;var zv=`MenuArrow`,Bv=e.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=X_(n);return y(Yr,{...i,...r,ref:t})});Bv.displayName=zv;var Vv=`MenuSub`,[Hv,Uv]=J_(Vv),Wv=t=>{let{__scopeMenu:n,children:r,open:i=!1,onOpenChange:a}=t,o=$_(Vv,n),s=X_(n),[c,l]=e.useState(null),[u,d]=e.useState(null),f=xe(a);return e.useEffect(()=>(o.open===!1&&f(!1),()=>f(!1)),[o.open,f]),y(Kr,{...s,children:y(Q_,{scope:n,open:i,onOpenChange:f,content:u,onContentChange:d,children:y(Hv,{scope:n,contentId:it(),triggerId:it(),trigger:c,onTriggerChange:l,children:r})})})};Wv.displayName=Vv;var Gv=`MenuSubTrigger`,Kv=e.forwardRef((t,n)=>{let r=$_(Gv,t.__scopeMenu),i=tv(Gv,t.__scopeMenu),a=Uv(Gv,t.__scopeMenu),o=dv(Gv,t.__scopeMenu),s=e.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=o,u={__scopeMenu:t.__scopeMenu},d=e.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return e.useEffect(()=>d,[d]),e.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),l(null)}},[c,l]),y(iv,{asChild:!0,...u,children:y(wv,{id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":r.open,"aria-controls":a.contentId,"data-state":Yv(r.open),...t,ref:le(n,a.onTriggerChange),onClick:e=>{t.onClick?.(e),!(t.disabled||e.defaultPrevented)&&(e.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:V(t.onPointerMove,ry(e=>{o.onItemEnter(e),!e.defaultPrevented&&!t.disabled&&!r.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:V(t.onPointerLeave,ry(e=>{d();let t=r.content?.getBoundingClientRect();if(t){let n=r.content?.dataset.side,i=n===`right`,a=i?-5:5,s=t[i?`left`:`right`],l=t[i?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:n}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:V(t.onKeyDown,e=>{let n=o.searchRef.current!==``;t.disabled||n&&e.key===` `||H_[i.dir].includes(e.key)&&(r.onOpenChange(!0),r.content?.focus(),e.preventDefault())})})})});Kv.displayName=Gv;var qv=`MenuSubContent`,Jv=e.forwardRef((t,n)=>{let r=sv(lv,t.__scopeMenu),{forceMount:i=r.forceMount,...a}=t,o=$_(lv,t.__scopeMenu),s=tv(lv,t.__scopeMenu),c=Uv(qv,t.__scopeMenu),l=e.useRef(null),u=H(n,l);return y(G_.Provider,{scope:t.__scopeMenu,children:y($r,{present:i||o.open,children:y(G_.Slot,{scope:t.__scopeMenu,children:y(gv,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:`start`,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:V(t.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:V(t.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:V(t.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=U_[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});Jv.displayName=qv;function Yv(e){return e?`open`:`closed`}function Xv(e){return e===`indeterminate`}function Zv(e){return Xv(e)?`indeterminate`:e?`checked`:`unchecked`}function Qv(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function $v(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ey(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0]),i=r?t[0]:t,a=n?e.indexOf(n):-1,o=$v(e,Math.max(a,0)),s=i.length===1;s&&(o=o.filter(e=>e!==n));let c=o.find(e=>e.toLowerCase().startsWith(i.toLowerCase()));return c===n?void 0:c}function ty(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y,f=l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c;f&&(i=!i)}return i}function ny(e,t){if(!t)return!1;let n={x:e.clientX,y:e.clientY};return ty(n,t)}function ry(e){return t=>t.pointerType===`mouse`?e(t):void 0}var iy=nv,ay=iv,oy=cv,sy=fv,cy=vv,ly=bv,uy=Cv,dy=Ev,fy=Av,py=Mv,my=Iv,hy=Rv,gy=Bv,_y=Wv,vy=Kv,yy=Jv,by=`DropdownMenu`,[xy,Sy]=de(by,[Y_]),Cy=Y_(),[wy,Ty]=xy(by),Ey=t=>{let{__scopeDropdownMenu:n,children:r,dir:i,open:a,defaultOpen:o,onOpenChange:s,modal:c=!0}=t,l=Cy(n),u=e.useRef(null),[d,f]=ii({prop:a,defaultProp:o??!1,onChange:s,caller:by});return y(wy,{scope:n,triggerId:it(),triggerRef:u,contentId:it(),open:d,onOpenChange:f,onOpenToggle:e.useCallback(()=>f(e=>!e),[f]),modal:c,children:y(iy,{...l,open:d,onOpenChange:f,dir:i,modal:c,children:r})})};Ey.displayName=by;var Dy=`DropdownMenuTrigger`,Oy=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Ty(Dy,n),o=Cy(n);return y(ay,{asChild:!0,...o,children:y(U.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:le(t,a.triggerRef),onPointerDown:V(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:V(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Oy.displayName=Dy;var ky=`DropdownMenuPortal`,Ay=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Cy(t);return y(oy,{...r,...n})};Ay.displayName=ky;var jy=`DropdownMenuContent`,My=e.forwardRef((t,n)=>{let{__scopeDropdownMenu:r,...i}=t,a=Ty(jy,r),o=Cy(r),s=e.useRef(!1);return y(sy,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...i,ref:n,onCloseAutoFocus:V(t.onCloseAutoFocus,e=>{s.current||a.triggerRef.current?.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:V(t.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!a.modal||r)&&(s.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});My.displayName=jy;var Ny=`DropdownMenuGroup`,Py=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(cy,{...i,...r,ref:t})});Py.displayName=Ny;var Fy=`DropdownMenuLabel`,Iy=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(ly,{...i,...r,ref:t})});Iy.displayName=Fy;var Ly=`DropdownMenuItem`,Ry=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(uy,{...i,...r,ref:t})});Ry.displayName=Ly;var zy=`DropdownMenuCheckboxItem`,By=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(dy,{...i,...r,ref:t})});By.displayName=zy;var Vy=`DropdownMenuRadioGroup`,Hy=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(fy,{...i,...r,ref:t})});Hy.displayName=Vy;var Uy=`DropdownMenuRadioItem`,Wy=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(py,{...i,...r,ref:t})});Wy.displayName=Uy;var Gy=`DropdownMenuItemIndicator`,Ky=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(my,{...i,...r,ref:t})});Ky.displayName=Gy;var qy=`DropdownMenuSeparator`,Jy=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(hy,{...i,...r,ref:t})});Jy.displayName=qy;var Yy=`DropdownMenuArrow`,Xy=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(gy,{...i,...r,ref:t})});Xy.displayName=Yy;var Zy=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=Cy(t),[s,c]=ii({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return y(_y,{...o,open:s,onOpenChange:c,children:n})},Qy=`DropdownMenuSubTrigger`,$y=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(vy,{...i,...r,ref:t})});$y.displayName=Qy;var eb=`DropdownMenuSubContent`,tb=e.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Cy(n);return y(yy,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});tb.displayName=eb;var nb=Ey,rb=Oy,ib=Ay,ab=My,ob=Iy,sb=Ry,cb=Jy,lb=Xy,ub=Zy,db=$y,fb=tb;const pb=[`tw:border-solid`,`tw:border`,`tw:rounded-[0.5rem]`,`tw:border-sq-disabled-gray`,`tw:dark:border-gray-500`].join(` `),mb=[`tw:bg-sq-white`,`tw:dark:bg-sq-dark-background`].join(` `),hb=e=>{let{label:t,variant:n=`outline`,size:r=`sm`,icon:i,iconStyle:a=`text`,iconColor:o,iconPosition:s=`left`,iconPrefix:c,extraClassNames:l=``,testId:u,id:d,disabled:f=!1,...p}=e;return y(gb,{...e,children:y(rb,{asChild:!0,id:d,disabled:f,children:y(se,{label:t,variant:n,size:r,icon:i,iconStyle:a,iconColor:o,iconPosition:s,iconPrefix:c,extraClassNames:l,testId:u,disabled:f,tooltip:p.tooltip,tooltipOptions:{delay:p.tooltipDelay,position:p.tooltipPlacement}})})})},gb=({dropdownItems:e,id:t,children:n,contentExtraClassNames:r=``,containerTestId:i,align:a=`end`,placement:o=`bottom`,placementOffset:s=5,alignOffset:c=-35,hasArrow:l=!1,onOpenChange:u,isOpen:d,setFocusOnTriggerOnClose:f=!0,keepFocusInsideDropdown:p=!0,onContainerClick:m})=>b(nb,{defaultOpen:!1,open:d,onOpenChange:u,modal:p,children:[n,y(ib,{children:y(ab,{onClick:m,sideOffset:s,side:o,align:a,alignOffset:c,asChild:!0,onCloseAutoFocus:e=>!f&&e.preventDefault(),className:`tw:focus-visible:outline-none tw:outline-none`,children:b(`div`,{"data-testid":i,className:`${mb} tw:relative tw:z-[1200] tw:min-w-6 tw:py-2 tw:focus-visible:outline-none tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out forceFont tw:data-[side=top]:animate-slideDownAndFade tw:data-[side=right]:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade ${pb} ${r}`,children:[l&&y(lb,{asChild:!0,children:y(`div`,{className:`tw:fill-transparent tw:bg-sq-white tw:w-sq-15 tw:h-sq-15 tw:rotate-45 tw:dark:bg-sq-dark-background tw:border-b tw:border-r tw:border-sq-disabled-gray tw:dark:border-gray-500 tw:-mt-sq-7`})}),e.map((e,n)=>{let r=ne(e);return e.isLabel?b(ob,{className:e.itemExtraClassNames,...r,children:[e.icon&&y(B,{icon:e.icon,testId:e.iconTestId,type:`text`,color:e.iconColor,extraClassNames:`tw:text-sq-text-color tw:dark:text-sq-white tw:w-4.5`}),y(`div`,{"data-testid":e.labelTestId,className:`tw:text-sq-13 tw:ml-1 ${e.disabled?`tw:text-sq-disabled-gray`:`tw:text-sq-text-color tw:dark:text-sq-white`} tw:not-italic tw:font-normal ${e.labelClasses}`,children:e.label})]},(e.id||``)+n):Array.isArray(e.subMenuItems)&&e.subMenuItems.length>0?b(ub,{children:[b(db,{id:t,className:`tw:cursor-pointer tw:flex tw:justify-between tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:leading-none tw:items-center tw:h-sq-27 tw:pl-sq-19 tw:relative tw:select-none tw:outline-none tw:data-disabled:pointer-events-none ${e.itemExtraClassNames||``}`,"data-testid":e.testId,disabled:e.disabled,...r,children:[b(`div`,{className:`tw:flex`,children:[e.icon&&y(`div`,{className:`tw:min-w-5`,children:y(B,{icon:e.icon,extraClassNames:`tw:w-4.5 ${e.disabled?`tw:text-sq-disabled-gray!`:`tw:text-sq-text-color tw:dark:text-sq-white`} ${e.iconExtraClassNames||``}`})}),y(`div`,{"data-testid":e.labelTestId,"data-customid":e.labelCustomId,className:`tw:text-sq-13 tw:ml-1 ${e.disabled&&`tw:opacity-30!`} tw:not-italic tw:font-semibold ${e.labelClasses}`,children:e.label})]}),y(`div`,{className:`tw:flex tw:justify-center tw:items-center`,children:y(B,{size:`sm`,icon:`fc-arrow-dropdown tw:rotate-270`,extraClassNames:`${e.disabled?`tw:text-sq-disabled-gray`:`tw:text-sq-text-color tw:dark:text-sq-white`} tw:ml-4 tw:mr-2 tw:text-2`})})]}),y(ib,{children:y(fb,{className:`tw:focus-visible:outline-none tw:outline-none`,children:y(`div`,{"data-testid":i,className:`${mb} tw:relative tw:z-[1000] tw:min-w-6 tw:py-2 tw:focus-visible:outline-none tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out forceFont tw:data-[side=top]:animate-slideDownAndFade tw:data-[side=right]:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade ${pb}`,children:e.subMenuItems.map((t,n)=>b(sb,{onSelect:t.onClick,"data-qtip-text":t.tooltip,className:`tw:cursor-pointer tw:flex tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:leading-none tw:items-center tw:h-sq-27 tw:px-sq-19 tw:relative tw:select-none tw:outline-none tw:data-disabled:pointer-events-none`,disabled:t.disabled,children:[t.iconClass&&y(B,{icon:t.iconClass,type:`text`,extraClassNames:`tw:w-4.5 ${e.disabled&&`tw:opacity-30!`}`}),y(`div`,{className:`tw:text-sq-13 tw:ml-1 ${t.disabled?`tw:text-sq-disabled-gray`:`tw:text-sq-text-color tw:dark:text-sq-white`} tw:not-italic tw:font-normal ${e.labelClasses}`,children:t.label})]},t.label+n))})})})]},(e.id||e.icon||``)+n):b(`div`,{...r,children:[b(sb,{"data-customid":e.itemCustomId,onSelect:t=>{e.onClick(t)},className:`tw:cursor-pointer tw:flex tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:leading-none tw:items-center tw:min-h-sq-27 tw:px-sq-19 tw:relative tw:select-none tw:outline-none tw:data-disabled:pointer-events-none ${e.itemExtraClassNames||``}`,"data-testid":e.testId,disabled:e.disabled,children:[e.icon&&y(`div`,{className:`tw:min-w-5`,children:y(B,{icon:e.icon,testId:e.iconTestId,type:e.iconType||`text`,color:e.iconColor,customId:e.iconCustomId,extraClassNames:`tw:w-sq-4.5 ${e.disabled&&`tw:opacity-30!`} ${e.iconExtraClassNames||``}`})}),y(`div`,{"data-testid":e.labelTestId,"data-customid":e.labelCustomId,className:`tw:text-sq-13 tw:ml-1 ${e.disabled?`tw:text-sq-disabled-gray`:`tw:text-sq-text-color tw:dark:text-sq-white`} tw:not-italic tw:font-normal ${e.labelClasses||``}`,children:e.label})]},(e.id||e.icon||``)+n),e.hasDivider&&y(cb,{"data-testid":`dropdown-divider-${n}`,className:`tw:h-px tw:bg-sq-disabled-gray tw:dark:bg-gray-500 tw:my-2`})]},(e.id||``)+n)})]})})})]});var _b=hb;const vb=[`tw:opacity-50`,`tw:cursor-not-allowed`].join(` `),yb=e=>{let{triggerIcon:t,id:n,extraClassNames:r=``,disabled:i=!1,...a}=e,o=ne(a);return y(gb,{...e,children:y(rb,{id:n,className:`tw:bg-transparent tw:border-none tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none`,disabled:i,children:y(`div`,{...o,className:`tw:bg-transparent tw:flex tw:flex-col tw:items-center tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none ${i?vb:``} ${r}`,children:t})})})};var bb=yb;const xb=({children:e,dismissible:t=!0,onClose:n,show:r=!0,variant:i,testId:a=`alert-id`,id:o,extraClassNames:s,...c})=>{let l={theme:`tw:text-sq-text-color tw:bg-sq-theme-highlight/10 tw:dark:bg-sq-theme-hover-dark tw:dark:text-sq-text-color-dark`,formulaError:`tw:text-red-800 tw:bg-red-200 tw:rounded-[0.25rem]!`,danger:`tw:text-sq-text-color tw:bg-sq-danger`,warning:`tw:bg-sq-bg-warning tw:text-sq-text-color tw:dark:text-sq-multi-gray-dark`,gray:`tw:bg-sq-hover-gray tw:text-sq-text-color tw:dark:bg-sq-tools-background-dark tw:dark:text-sq-text-color-dark`},u={theme:`tw:border-sq-theme-dark`,danger:`tw:border-sq-danger`,warning:`tw:border-none`,gray:`tw:border-sq-darkish-gray`,formulaError:`tw:border-red-100`},d=`tw:mx-auto tw:leading-normal tw:outline-none tw:py-2 tw:px-3 tw:rounded-[10px] tw:w-full tw:relative tw:border-solid tw:border tw:text-sm tw:flex tw:flex-col tw:justify-center tw:items-center ${l[i]} ${s} ${u[i]}`;return r?b(`div`,{"data-testid":a,id:o,className:d,children:[e,t&&y(B,{icon:`fc-delete`,type:i.match(/danger|warning|formulaError/)?`color`:`theme`,color:i.match(/danger|warning|formulaError/)?`inherit`:void 0,extraClassNames:`tw:self-end tw:text-size-11 tw:cursor-pointer tw:absolute tw:right-2.5 tw:top-2.5 ${i.match(/danger|warning|gray|formulaError/)?`tw:text-sq-text-color tw:dark:text-sq-dark-text`:``}`,testId:`${a}-close-btn`,onClick:n,...c})]}):y(`div`,{})},Sb={new:`tw:bg-sq-warning-bg-color tw:dark:bg-sq-text-dark-warning-color tw:text-sq-text-dark-warning-color tw:dark:text-sq-warning-bg-color`,preview:`tw:bg-sq-badge-preview-bg tw:dark:bg-sq-bg-default-preview-dark tw:text-sq-text-interactive tw:dark:text-sq-text-interactive-dark`},Cb=({children:e,variant:t=`new`,testId:n,extraClassNames:r=``})=>{let i=`tw:inline-flex tw:items-center tw:rounded-[3px] tw:px-[5px] tw:py-[2px] tw:text-[0.8rem] tw:whitespace-nowrap tw:italic ${Sb[t]} ${r}`.trim();return y(`span`,{"data-testid":n,className:i,children:e})};var wb=Cb;const Tb=({onClick:e,icon:t,color:n,type:r=`default`,extraClassNames:i,viewBox:a=`0 0 19 19`,id:o,testId:s,customId:c,...l})=>{let u=`${e?`tw:cursor-pointer`:``} ${i} tw:focus:outline-none tw:focus-visible:outline-none
68
+ tw:outline-none`,d=ne(l),f=r===`default`?`currentColor`:`var(--theme-icon)`;return y(`div`,{onClick:e,...d,className:`svgContainer ${u}`,children:y(`svg`,{xmlns:`http://www.w3.org/2000/svg`,className:`tw:text-sq-theme-icon tw:dark:text-sq-white`,viewBox:a,fill:n||f,"data-testid":s,children:y(`path`,{d:io(t)})})})};var Eb=Tb,Db=N(Ph());const Ob=e=>{let t=y(v,{});return e.icon&&(t=ro(e.icon)?y(Eb,{icon:e.icon,extraClassNames:e.iconExtraClassNames+`tw:p-1 tw:h-9 tw:w-9 tw:dark:text-sq-white tw:text-5.5! tw:text-sq-white`,...e}):y(B,{icon:e.icon,type:`text`,extraClassNames:`tw:dark:text-sq-white tw:text-5.5! tw:text-sq-white tw:min-w-9 `+e.iconExtraClassNames})),b(`div`,{className:`tw:flex-row tw:flex tw:p-2.5 tw:pl-5 tw:w-150 tw:gap-4`,children:[y(`div`,{className:(0,Db.default)(`tw:rounded-[0.1875rem] tw:h-9 tw:w-9 tw:bg-sq-theme-dark tw:flex tw:justify-center tw:items-center tw:mt-1.5`,e.iconContainerExtraClassNames),children:t}),b(`div`,{className:`tw:flex tw:flex-col tw:justify-center`,children:[y(`div`,{className:`tw:text-[20px] tw:font-semibold`,children:e.display}),y(`div`,{className:`tw:text-sq-13 tw:leading-4`,children:e.text})]})]})},kb=e=>{let t=y(v,{});return e.icon&&(t=ro(e.icon)?y(Eb,{icon:e.icon,extraClassNames:`tw:w-4 tw:text-5 tw:dark:text-sq-white tw:text-sq-text-color `+e.iconExtraClassNames,type:`default`,...e}):y(B,{icon:e.icon,type:`text`,extraClassNames:`tw:text-5 tw:dark:text-sq-white tw:text-sq-text-color `+e.iconExtraClassNames})),y(`div`,{className:`tw:flex-col tw:flex tw:p-2.5`,children:b(`div`,{className:`tw:flex tw:flex-row tw:gap-2 tw:items-end`,children:[y(`div`,{className:`tw:rounded-[0.1875rem] tw:h-5 tw:w-5 tw:flex tw:justify-center tw:items-center `,children:t}),y(`div`,{className:`tw:text-sq-13`,children:e.display})]})})},Ab=e=>b(`div`,{className:`tw:flex-col tw:flex tw:justify-start tw:p-2.5 tw:font-normal tw:text-left tw:text-sq-text-color tw:dark:text-sq-dark-text`,children:[y(`h5`,{className:`tw:text-4 tw:font-medium tw:text-sq-theme-dark tw:leading-4.5`,children:e.display}),y(`div`,{className:`tw:text-sq-13 tw:text-sq-text-color tw:dark:text-sq-dark-text tw:mt-1!`,children:e.text})]}),jb=[`tw:border-solid`,`tw:border`,`tw:rounded-md`,`tw:border-sq-disabled-gray`,`tw:dark:border-gray-500`].join(` `),Mb=[`tw:bg-sq-white`,`tw:dark:bg-sq-dark-background`].join(` `),Nb=[`tw:opacity-50`,`tw:cursor-not-allowed`].join(` `),Pb=(e,t)=>{switch(e){case`create-workbench`:return y(Ob,{...t});case`view-workbench`:return y(kb,{...t});case`insert-seeq-content`:return y(Ab,{...t});default:return y(Ob,{...t})}},Fb=({seeqActionDropdownItems:e,trigger:t,id:n,extraClassNames:r,containerTestId:i,disabled:a=!1,align:o=`end`,placement:s=`bottom`,placementOffset:c=5,alignOffset:l=-35,hasArrow:u=!1,onOpenChange:d,isOpen:f,setFocusOnTriggerOnClose:p=!0,keepFocusInsideDropdown:m=!0,variant:h,...g})=>{let _=ne(g);return b(nb,{defaultOpen:!1,open:f,onOpenChange:d,modal:m,children:[y(rb,{id:n,"data-testid":n,className:`tw:border-none tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none`,asChild:!0,disabled:a,children:y(`div`,{..._,className:`tw:bg-transparent tw:flex tw:flex-col tw:items-center tw:focus-visible:outline-none tw:focus:outline-none tw:focus-within:outline-none ${a?Nb:``} ${r||``}`,children:t})}),y(ab,{sideOffset:c,side:s,align:o,alignOffset:l,asChild:!0,onCloseAutoFocus:e=>!p&&e.preventDefault(),className:`tw:focus-visible:outline-none tw:outline-none`,children:b(`div`,{"data-testid":i,className:Mb+` tw:relative tw:z-[1200] tw:min-w-6 tw:py-2 tw:shadow-[0_4px_8px_rgba(0,0,0,0.2)] tw:focus-visible:outline-none tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out forceFont tw:data-[side=top]:animate-slideDownAndFade tw:data-[side=right]:animate-slideLeftAndFade tw:data-[side=bottom]:animate-slideUpAndFade tw:data-[side=left]:animate-slideRightAndFade `+jb,children:[u&&y(lb,{asChild:!0,children:y(`div`,{className:` tw:fill-transparent tw:bg-sq-white tw:w-sq-15 tw:h-sq-15 tw:rotate-45 tw:dark:bg-sq-dark-background tw:border-b tw:border-r tw:border-sq-disabled-gray tw:dark:border-gray-500 tw:-mt-sq-7`})}),e.map((e,t)=>b(`div`,{children:[y(sb,{onSelect:t=>{e.action(t)},className:`tw:cursor-pointer tw:flex tw:dark:text-sq-white tw:hover:bg-sq-gray-highlight tw:dark:hover:bg-sq-gray-highlight-dark tw:relative tw:select-none tw:outline-none tw:data-[disabled]:text-sq-disabled-gray tw:data-[dim]:opacity-50 tw:aria-disabled:pointer-events-none`,"data-testid":e.testId,"data-dim":e.dim?``:void 0,disabled:!e.enabled,children:Pb(h,e)}),e.divider&&y(cb,{"data-testid":`dropdown-divider-${t}`,className:`tw:h-px tw:bg-sq-disabled-gray tw:dark:bg-gray-500 tw:my-2`})]},e.id??t))]})})]})};var Ib=Fb;const Lb=[`tw:border-sq-disabled-gray`,`tw:dark:border-sq-dark-disabled-gray`,`tw:dark:focus:border-sq-theme-darker`,`tw:dark:active:border-sq-theme-darker`,`tw:focus:border-sq-theme-dark`,`tw:active:border-sq-theme-dark`].join(` `),Rb=t.forwardRef((e,n)=>{let{readonly:r=!1,onChange:i,onKeyUp:a,onFocus:o,onBlur:s,onKeyDown:c,name:l,value:u,placeholder:d,append:f=[],extraClassNames:p=``,id:m,testId:h,showError:g,required:_,autoComplete:v,autoFocus:x,disabled:S,type:C,step:w,min:T,max:E,field:D,maxLength:O,minLength:k,inputGroup:A,...j}=e,M=ne(j),ee=`tw:flex tw:outline-none tw:rounded-md tw:w-full tw:relative tw:flex-wrap ${p}`,N=f.filter(Boolean),P=A??(N.length>0?`left`:void 0),F=P===`left`?`tw:rounded-l-md tw:rounded-r-none`:P===`right`?`tw:rounded-r-md tw:rounded-l-none`:`tw:rounded-md`,I=`tw:leading-normal tw:outline-none tw:py-1 tw:px-3 tw:p-1 tw:border-solid tw:border ${p} tw:text-sq-text-color tw:disabled:text-sq-darkish-gray tw:dark:bg-sq-dark-background tw:dark:text-sq-dark-text tw:disabled:dark:text-sq-disabled-gray ${F} ${g?`tw:border-sq-danger`:Lb} `,L=t.isValidElement(D)&&typeof D.type!=`string`,R=L?t.cloneElement(D,{inputGroup:P}):D;return b(`div`,{id:`input-group-${m}`,className:ee,children:[D?y(`div`,{"data-testid":h,className:`tw:flex tw:flex-1 tw:cursor-pointer tw:active:z-50 ${I}`,children:R}):y(yo,{testId:h,readonly:r,onChange:i,onKeyUp:a,onFocus:o,onBlur:s,onKeyDown:c,name:l,ref:n,showError:g,value:u,required:_,placeholder:d,autoComplete:v,autoFocus:x,id:m,type:C,disabled:S,step:w,min:T,max:E,maxLength:O,minLength:k,inputGroup:P,extraClassNames:`tw:flex tw:flex-1 tw:w-full tw:focus:z-30 ${p}`,...M}),N.map((e,t)=>e?.variant===`button`?y(se,{extraClassNames:`$
69
69
  index ? 'tw:-ml-px' : 'tw:ml-0'
70
- } tw:focus:z-40 tw:focus:border tw:rounded-none tw:last:rounded-r-md`,...e.buttonProps},t):y(`div`,{className:`${Pb} ${t?`tw:-ml-px`:`tw:ml-0`} tw:flex tw:items-center tw:justify-center tw:rounded-none tw:last:rounded-r-md tw:active:z-30 tw:active:border tw:border`,children:e?.element},t))]})}),Ib=a({});function Lb(e){let t=g(null);return t.current===null&&(t.current=e()),t.current}const Rb=typeof window<`u`,zb=Rb?m:d,Bb=a(null);function Vb(e,t){e.indexOf(t)===-1&&e.push(t)}function Hb(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ub=(e,t,n)=>n>t?t:n<e?e:n,Wb={},Gb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Kb(e){return typeof e==`object`&&!!e}const qb=e=>/^0[^.\s]+$/u.test(e);function Jb(e){let t;return()=>(t===void 0&&(t=e()),t)}const Yb=e=>e,Xb=(e,t)=>n=>t(e(n)),Zb=(...e)=>e.reduce(Xb),Qb=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r};var $b=class{constructor(){this.subscriptions=[]}add(e){return Vb(this.subscriptions,e),()=>Hb(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};const ex=e=>e*1e3,tx=e=>e/1e3;function nx(e,t){return t?e*(1e3/t):0}const rx=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function ix(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=rx(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>1e-7&&++s<12);return o}function ax(e,t,n,r){if(e===t&&n===r)return Yb;let i=t=>ix(t,0,1,e,n);return e=>e===0||e===1?e:rx(i(e),t,r)}const ox=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,sx=e=>t=>1-e(1-t),cx=ax(.33,1.53,.69,.99),lx=sx(cx),ux=ox(lx),dx=e=>(e*=2)<1?.5*lx(e):.5*(2-2**(-10*(e-1))),fx=e=>1-Math.sin(Math.acos(e)),px=sx(fx),mx=ox(fx),hx=ax(.42,0,1,1),gx=ax(0,0,.58,1),_x=ax(.42,0,.58,1),vx=e=>Array.isArray(e)&&typeof e[0]!=`number`,yx=e=>Array.isArray(e)&&typeof e[0]==`number`,bx={linear:Yb,easeIn:hx,easeInOut:_x,easeOut:gx,circIn:fx,circInOut:mx,circOut:px,backIn:lx,backInOut:ux,backOut:cx,anticipate:dx},xx=e=>typeof e==`string`,Sx=e=>{if(yx(e)){e.length;let[t,n,r,i]=e;return ax(t,n,r,i)}else if(xx(e))return bx[e],`${e}`,bx[e];return e},Cx=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],wx={value:null,addProjectionMetrics:null};function Tx(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i,c=s?n:r;return t&&o.add(e),c.has(e)||c.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),t&&wx.value&&wx.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}function Ex(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Cx.reduce((e,n)=>(e[n]=Tx(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=Wb.useManualTiming?i.timestamp:performance.now();n=!1,Wb.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)},_=Cx.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),v=e=>{for(let t=0;t<Cx.length;t++)o[Cx[t]].cancel(e)};return{schedule:_,cancel:v,state:i,steps:o}}const{schedule:X,cancel:Dx,state:Ox,steps:kx}=Ex(typeof requestAnimationFrame<`u`?requestAnimationFrame:Yb,!0);let Ax;function jx(){Ax=void 0}const Mx={now:()=>(Ax===void 0&&Mx.set(Ox.isProcessing||Wb.useManualTiming?Ox.timestamp:performance.now()),Ax),set:e=>{Ax=e,queueMicrotask(jx)}},Nx={layout:0,mainThread:0,waapi:0},Px=e=>t=>typeof t==`string`&&t.startsWith(e),Fx=Px(`--`),Ix=Px(`var(--`),Lx=e=>{let t=Ix(e);return t?Rx.test(e.split(`/*`)[0].trim()):!1},Rx=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,zx={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Bx={...zx,transform:e=>Ub(0,1,e)},Vx={...zx,default:1},Hx=e=>Math.round(e*1e5)/1e5,Ux=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Wx(e){return e==null}const Gx=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Kx=(e,t)=>n=>!!(typeof n==`string`&&Gx.test(n)&&n.startsWith(e)||t&&!Wx(n)&&Object.prototype.hasOwnProperty.call(n,t)),qx=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Ux);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Jx=e=>Ub(0,255,e),Yx={...zx,transform:e=>Math.round(Jx(e))},Xx={test:Kx(`rgb`,`red`),parse:qx(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Yx.transform(e)+`, `+Yx.transform(t)+`, `+Yx.transform(n)+`, `+Hx(Bx.transform(r))+`)`};function Zx(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Qx={test:Kx(`#`),parse:Zx,transform:Xx.transform},$x=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),eS=$x(`deg`),tS=$x(`%`),Z=$x(`px`),nS=$x(`vh`),rS=$x(`vw`),iS=(()=>({...tS,parse:e=>tS.parse(e)/100,transform:e=>tS.transform(e*100)}))(),aS={test:Kx(`hsl`,`hue`),parse:qx(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+tS.transform(Hx(t))+`, `+tS.transform(Hx(n))+`, `+Hx(Bx.transform(r))+`)`},oS={test:e=>Xx.test(e)||Qx.test(e)||aS.test(e),parse:e=>Xx.test(e)?Xx.parse(e):aS.test(e)?aS.parse(e):Qx.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Xx.transform(e):aS.transform(e),getAnimatableNone:e=>{let t=oS.parse(e);return t.alpha=0,oS.transform(t)}},sS=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function cS(e){return isNaN(e)&&typeof e==`string`&&(e.match(Ux)?.length||0)+(e.match(sS)?.length||0)>0}const lS=`number`,uS=`color`,dS=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function fS(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0,o=t.replace(dS,e=>(oS.test(e)?(r.color.push(a),i.push(uS),n.push(oS.parse(e))):e.startsWith(`var(`)?(r.var.push(a),i.push(`var`),n.push(e)):(r.number.push(a),i.push(lS),n.push(parseFloat(e))),++a,"${}")),s=o.split("${}");return{values:n,split:s,indexes:r,types:i}}function pS(e){return fS(e).values}function mS(e){let{split:t,types:n}=fS(e),r=t.length;return e=>{let i=``;for(let a=0;a<r;a++)if(i+=t[a],e[a]!==void 0){let t=n[a];t===lS?i+=Hx(e[a]):t===uS?i+=oS.transform(e[a]):i+=e[a]}return i}}const hS=e=>typeof e==`number`?0:oS.test(e)?oS.getAnimatableNone(e):e;function gS(e){let t=pS(e),n=mS(e);return n(t.map(hS))}const _S={test:cS,parse:pS,createTransformer:mS,getAnimatableNone:gS};function vS(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function yS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=vS(s,r,e+1/3),a=vS(s,r,e),o=vS(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function bS(e,t){return n=>n>0?t:e}const Q=(e,t,n)=>e+(t-e)*n,xS=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},SS=[Qx,Xx,aS],CS=e=>SS.find(t=>t.test(e));function wS(e){let t=CS(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===aS&&(n=yS(n)),n}const TS=(e,t)=>{let n=wS(e),r=wS(t);if(!n||!r)return bS(e,t);let i={...n};return e=>(i.red=xS(n.red,r.red,e),i.green=xS(n.green,r.green,e),i.blue=xS(n.blue,r.blue,e),i.alpha=Q(n.alpha,r.alpha,e),Xx.transform(i))},ES=new Set([`none`,`hidden`]);function DS(e,t){return ES.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function OS(e,t){return n=>Q(e,t,n)}function kS(e){return typeof e==`number`?OS:typeof e==`string`?Lx(e)?bS:oS.test(e)?TS:NS:Array.isArray(e)?AS:typeof e==`object`?oS.test(e)?TS:jS:bS}function AS(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>kS(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function jS(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=kS(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function MS(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}const NS=(e,t)=>{let n=_S.createTransformer(t),r=fS(e),i=fS(t),a=r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length;return a?ES.has(e)&&!i.values.length||ES.has(t)&&!r.values.length?DS(e,t):Zb(AS(MS(r,i),i.values),n):(`${e}${t}`,bS(e,t))};function PS(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Q(e,t,n);let r=kS(e);return r(e,t)}const FS=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>X.update(t,e),stop:()=>Dx(t),now:()=>Ox.isProcessing?Ox.timestamp:Mx.now()}},IS=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},LS=2e4;function RS(e){let t=0,n=e.next(t);for(;!n.done&&t<LS;)t+=50,n=e.next(t);return t>=LS?1/0:t}function zS(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(RS(r),LS);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:tx(i)}}function BS(e,t,n){let r=Math.max(t-5,0);return nx(n-e(r),t-r)}const $={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},VS=.001;function HS({duration:e=$.duration,bounce:t=$.bounce,velocity:n=$.velocity,mass:r=$.mass}){let i,a;$.maxDuration;let o=1-t;o=Ub($.minDamping,$.maxDamping,o),e=Ub($.minDuration,$.maxDuration,tx(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=WS(t,o),c=Math.exp(-i);return VS-a/s*c},a=t=>{let r=t*o,a=r*e,s=a*n+n,c=o**2*t**2*e,l=Math.exp(-a),u=WS(t**2,o),d=-i(t)+VS>0?-1:1;return d*((s-c)*l)/u}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-VS+r*i},a=t=>{let r=Math.exp(-t*e),i=(n-t)*(e*e);return r*i});let s=5/e,c=US(i,a,s);if(e=ex(e),isNaN(c))return{stiffness:$.stiffness,damping:$.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}function US(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}function WS(e,t){return e*Math.sqrt(1-t*t)}const GS=[`duration`,`bounce`],KS=[`stiffness`,`damping`,`mass`];function qS(e,t){return t.some(t=>e[t]!==void 0)}function JS(e){let t={velocity:$.velocity,stiffness:$.stiffness,damping:$.damping,mass:$.mass,isResolvedFromDuration:!1,...e};if(!qS(e,KS)&&qS(e,GS))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*Ub(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:$.mass,stiffness:i,damping:a}}else{let n=HS(e);t={...t,...n,mass:$.mass},t.isResolvedFromDuration=!0}return t}function YS(e=$.visualDuration,t=$.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=JS({...n,velocity:-tx(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=tx(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?$.restSpeed.granular:$.restSpeed.default,i||=v?$.restDelta.granular:$.restDelta.default;let y;if(h<1){let e=WS(_,h);y=t=>{let n=Math.exp(-h*_*t);return o-n*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=e===0?m:0;h<1&&(n=e===0?ex(m):BS(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(RS(b),LS),t=IS(t=>b.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return b}YS.applyToOptions=e=>{let t=zS(e,100,YS);return e.ease=t.ease,e.duration=ex(t.duration),e.type=`keyframes`,e};function XS({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=YS({keyframes:[f.value,m(f.value)],velocity:BS(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function ZS(e,t,n){let r=[],i=n||Wb.mix||PS,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);if(t){let e=Array.isArray(t)?t[n]||Yb:t;a=Zb(e,a)}r.push(a)}return r}function QS(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=ZS(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=Qb(e[r],e[r+1],n);return s[r](i)};return n?t=>l(Ub(e[0],e[a-1],t)):l}function $S(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Qb(0,t,r);e.push(Q(n,1,i))}}function eC(e){let t=[0];return $S(t,e.length-1),t}function tC(e,t){return e.map(e=>e*t)}function nC(e,t){return e.map(()=>t||_x).splice(0,e.length-1)}function rC({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=vx(r)?r.map(Sx):Sx(r),a={done:!1,value:t[0]},o=tC(n&&n.length===t.length?n:eC(t),e),s=QS(o,t,{ease:Array.isArray(i)?i:nC(t,i)});return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}const iC=e=>e!==null;function aC(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(iC),o=i<0||t&&n!==`loop`&&t%2==1,s=o?0:a.length-1;return!s||r===void 0?a[s]:r}const oC={decay:XS,inertia:XS,tween:rC,keyframes:rC,spring:YS};function sC(e){typeof e.type==`string`&&(e.type=oC[e.type])}var cC=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}};const lC=e=>e/100;var uC=class extends cC{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Mx.now()&&this.tick(Mx.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},Nx.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;sC(e);let{type:t=rC,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||rC;s!==rC&&typeof o[0]!=`number`&&(this.mixKeyframes=Zb(lC,PS(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=RS(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1);let i=!!(t%2);i&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=Ub(0,1,n)*o}let b=_?{done:!1,value:l[0]}:y.next(v);i&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==XS&&(b.value=aC(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return tx(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+tx(e)}get time(){return tx(this.currentTime)}set time(e){e=ex(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Mx.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=tx(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=FS,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(Mx.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,Nx.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function dC(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const fC=e=>e*180/Math.PI,pC=e=>{let t=fC(Math.atan2(e[1],e[0]));return hC(t)},mC={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:pC,rotateZ:pC,skewX:e=>fC(Math.atan(e[1])),skewY:e=>fC(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},hC=e=>(e%=360,e<0&&(e+=360),e),gC=pC,_C=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),vC=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),yC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_C,scaleY:vC,scale:e=>(_C(e)+vC(e))/2,rotateX:e=>hC(fC(Math.atan2(e[6],e[5]))),rotateY:e=>hC(fC(Math.atan2(-e[2],e[0]))),rotateZ:gC,rotate:gC,skewX:e=>fC(Math.atan(e[4])),skewY:e=>fC(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function bC(e){return e.includes(`scale`)?1:0}function xC(e,t){if(!e||e===`none`)return bC(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=yC,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=mC,i=t}if(!i)return bC(t);let a=r[t],o=i[1].split(`,`).map(CC);return typeof a==`function`?a(o):o[a]}const SC=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return xC(n,t)};function CC(e){return parseFloat(e.trim())}const wC=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],TC=(()=>new Set(wC))(),EC=e=>e===zx||e===Z,DC=new Set([`x`,`y`,`z`]),OC=wC.filter(e=>!DC.has(e));function kC(e){let t=[];return OC.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}const AC={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>xC(t,`x`),y:(e,{transform:t})=>xC(t,`y`)};AC.translateX=AC.x,AC.translateY=AC.y;const jC=new Set;let MC=!1,NC=!1,PC=!1;function FC(){if(NC){let e=Array.from(jC).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=kC(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}NC=!1,MC=!1,jC.forEach(e=>e.complete(PC)),jC.clear()}function IC(){jC.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(NC=!0)})}function LC(){PC=!0,IC(),FC(),PC=!1}var RC=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(jC.add(this),MC||(MC=!0,X.read(IC),X.resolveKeyframes(FC))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}dC(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),jC.delete(this)}cancel(){this.state===`scheduled`&&(jC.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}};const zC=e=>e.startsWith(`--`);function BC(e,t,n){zC(t)?e.style.setProperty(t,n):e.style[t]=n}const VC=Jb(()=>window.ScrollTimeline!==void 0),HC={};function UC(e,t){let n=Jb(e);return()=>HC[t]??n()}const WC=UC(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),GC=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,KC={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:GC([0,.65,.55,1]),circOut:GC([.55,0,1,.45]),backIn:GC([.31,.01,.66,-.59]),backOut:GC([.33,1.53,.69,.99])};function qC(e,t){if(e)return typeof e==`function`?WC()?IS(e,t):`ease-out`:yx(e)?GC(e):Array.isArray(e)?e.map(e=>qC(e,t)||KC.easeOut):KC[e]}function JC(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=qC(s,i);Array.isArray(d)&&(u.easing=d),wx.value&&Nx.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return wx.value&&p.finished.finally(()=>{Nx.waapi--}),p}function YC(e){return typeof e==`function`&&`applyToOptions`in e}function XC({type:e,...t}){return YC(e)&&WC()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var ZC=class extends cC{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=XC(e);this.animation=JC(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=aC(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):BC(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return tx(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+tx(e)}get time(){return tx(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=ex(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&VC()?(this.animation.timeline=e,Yb):t(this)}};const QC={anticipate:dx,backInOut:ux,circInOut:mx};function $C(e){return e in QC}function ew(e){typeof e.ease==`string`&&$C(e.ease)&&(e.ease=QC[e.ease])}var tw=class extends ZC{constructor(e){ew(e),sC(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new uC({...a,autoplay:!1}),s=ex(this.finishedTime??this.time);t.setWithVelocity(o.sample(s-10).value,o.sample(s).value,10),o.stop()}};const nw=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(_S.test(e)||e===`0`)&&!e.startsWith(`url(`));function rw(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function iw(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=nw(i,t),s=nw(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:rw(e)||(n===`spring`||YC(n))&&r}function aw(e){e.duration=0,e.type=`keyframes`}const ow=new Set([`opacity`,`clipPath`,`filter`,`transform`]),sw=Jb(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function cw(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e,s=t?.owner?.current;if(!(s instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return sw()&&n&&ow.has(n)&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var lw=class extends cC{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Mx.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||RC;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Mx.now(),iw(e,i,a,o)||((Wb.instantAnimations||!s)&&l?.(aC(e,n,t)),e[0]=e[e.length-1],aw(n),n.repeat=0);let u=r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,d={startTime:u,finalKeyframe:t,...n,keyframes:e},f=!c&&cw(d)?new tw({...d,element:d.motionValue.owner.current}):new uC(d);f.finished.then(()=>this.notifyFinished()).catch(Yb),this.pendingTimeline&&=(this.stopTimeline=f.attachTimeline(this.pendingTimeline),void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),LC()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};const uw=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function dw(e){let t=uw.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function fw(e,t,n=1){`${e}`;let[r,i]=dw(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Gb(e)?parseFloat(e):e}return Lx(i)?fw(i,t,n+1):i}function pw(e,t){return e?.[t]??e?.default??e}const mw=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...wC]),hw={test:e=>e===`auto`,parse:e=>e},gw=e=>t=>t.test(e),_w=[zx,Z,tS,eS,rS,nS,hw],vw=e=>_w.find(gw(e));function yw(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||qb(e)}const bw=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function xw(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Ux)||[];if(!r)return e;let i=n.replace(r,``),a=bw.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}const Sw=/\b([a-z-]*)\(.*?\)/gu,Cw={..._S,getAnimatableNone:e=>{let t=e.match(Sw);return t?t.map(xw).join(` `):e}},ww={...zx,transform:Math.round},Tw={rotate:eS,rotateX:eS,rotateY:eS,rotateZ:eS,scale:Vx,scaleX:Vx,scaleY:Vx,scaleZ:Vx,skew:eS,skewX:eS,skewY:eS,distance:Z,translateX:Z,translateY:Z,translateZ:Z,x:Z,y:Z,z:Z,perspective:Z,transformPerspective:Z,opacity:Bx,originX:iS,originY:iS,originZ:Z},Ew={borderWidth:Z,borderTopWidth:Z,borderRightWidth:Z,borderBottomWidth:Z,borderLeftWidth:Z,borderRadius:Z,radius:Z,borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomRightRadius:Z,borderBottomLeftRadius:Z,width:Z,maxWidth:Z,height:Z,maxHeight:Z,top:Z,right:Z,bottom:Z,left:Z,padding:Z,paddingTop:Z,paddingRight:Z,paddingBottom:Z,paddingLeft:Z,margin:Z,marginTop:Z,marginRight:Z,marginBottom:Z,marginLeft:Z,backgroundPositionX:Z,backgroundPositionY:Z,...Tw,zIndex:ww,fillOpacity:Bx,strokeOpacity:Bx,numOctaves:ww},Dw={...Ew,color:oS,backgroundColor:oS,outlineColor:oS,fill:oS,stroke:oS,borderColor:oS,borderTopColor:oS,borderRightColor:oS,borderBottomColor:oS,borderLeftColor:oS,filter:Cw,WebkitFilter:Cw},Ow=e=>Dw[e];function kw(e,t){let n=Ow(e);return n!==Cw&&(n=_S),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Aw=new Set([`auto`,`none`,`0`]);function jw(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Aw.has(t)&&fS(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=kw(n,i)}var Mw=class extends RC{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Lx(r))){let i=fw(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!mw.has(n)||e.length!==2)return;let[r,i]=e,a=vw(r),o=vw(i);if(a!==o)if(EC(a)&&EC(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else AC[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||yw(e[t]))&&n.push(t);n.length&&jw(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=AC[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=AC[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function Nw(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const Pw=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Fw(e){return Kb(e)&&`offsetHeight`in e}const Iw=e=>!isNaN(parseFloat(e)),Lw={current:void 0};var Rw=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Mx.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Mx.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Iw(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new $b);let n=this.events[e].add(t);return e===`change`?()=>{n(),X.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Lw.current&&Lw.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=Mx.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return nx(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function zw(e,t){return new Rw(e,t)}const{schedule:Bw,cancel:Vw}=Ex(queueMicrotask,!1),Hw={x:!1,y:!1};function Uw(){return Hw.x||Hw.y}function Ww(e){return e===`x`||e===`y`?Hw[e]?null:(Hw[e]=!0,()=>{Hw[e]=!1}):Hw.x||Hw.y?null:(Hw.x=Hw.y=!0,()=>{Hw.x=Hw.y=!1})}function Gw(e,t){let n=Nw(e),r=new AbortController,i={passive:!0,...t,signal:r.signal},a=()=>r.abort();return[n,i,a]}function Kw(e){return!(e.pointerType===`touch`||Uw())}function qw(e,t,n={}){let[r,i,a]=Gw(e,n),o=e=>{if(!Kw(e))return;let{target:n}=e,r=t(n,e);if(typeof r!=`function`||!n)return;let a=e=>{Kw(e)&&(r(e),n.removeEventListener(`pointerleave`,a))};n.addEventListener(`pointerleave`,a,i)};return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}const Jw=(e,t)=>t?e===t?!0:Jw(e,t.parentElement):!1,Yw=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Xw=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Zw(e){return Xw.has(e.tagName)||e.tabIndex!==-1}const Qw=new WeakSet;function $w(e){return t=>{t.key===`Enter`&&e(t)}}function eT(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}const tT=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=$w(()=>{if(Qw.has(n))return;eT(n,`down`);let e=$w(()=>{eT(n,`up`)}),r=()=>eT(n,`cancel`);n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,r,t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function nT(e){return Yw(e)&&!Uw()}function rT(e,t,n={}){let[r,i,a]=Gw(e,n),o=e=>{let r=e.currentTarget;if(!nT(e))return;Qw.add(r);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),Qw.has(r)&&Qw.delete(r),nT(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Jw(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{let t=n.useGlobalTarget?window:e;t.addEventListener(`pointerdown`,o,i),Fw(e)&&(e.addEventListener(`focus`,e=>tT(e,i)),!Zw(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function iT(e){return Kb(e)&&`ownerSVGElement`in e}function aT(e){return iT(e)&&e.tagName===`svg`}const oT=e=>!!(e&&e.getVelocity),sT=[..._w,oS,_S],cT=e=>sT.find(gw(e)),lT=a({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function uT(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function dT(...e){return t=>{let n=!1,r=e.map(e=>{let r=uT(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():uT(e[t],null)}}}}function fT(...t){return e.useCallback(dT(...t),t)}var pT=class extends e.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=t.offsetParent,n=Fw(e)&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}};function mT({children:t,isPresent:n,anchorX:r,root:i}){let a=f(),o=g(null),s=g({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=u(lT),l=fT(o,t?.ref);return p(()=>{let{width:e,height:t,top:l,left:u,right:d}=s.current;if(n||!o.current||!e||!t)return;let f=r===`left`?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=a;let p=document.createElement(`style`);c&&(p.nonce=c);let m=i??document.head;return m.appendChild(p),p.sheet&&p.sheet.insertRule(`
70
+ } tw:focus:z-40 tw:focus:border tw:rounded-none tw:last:rounded-r-md`,...e.buttonProps},t):y(`div`,{className:`${Lb} ${t?`tw:-ml-px`:`tw:ml-0`} tw:flex tw:items-center tw:justify-center tw:rounded-none tw:last:rounded-r-md tw:active:z-30 tw:active:border tw:border`,children:e?.element},t))]})}),zb=a({});function Bb(e){let t=g(null);return t.current===null&&(t.current=e()),t.current}const Vb=typeof window<`u`,Hb=Vb?m:d,Ub=a(null);function Wb(e,t){e.indexOf(t)===-1&&e.push(t)}function Gb(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}const Kb=(e,t,n)=>n>t?t:n<e?e:n,qb={},Jb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Yb(e){return typeof e==`object`&&!!e}const Xb=e=>/^0[^.\s]+$/u.test(e);function Zb(e){let t;return()=>(t===void 0&&(t=e()),t)}const Qb=e=>e,$b=(e,t)=>n=>t(e(n)),ex=(...e)=>e.reduce($b),tx=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r};var nx=class{constructor(){this.subscriptions=[]}add(e){return Wb(this.subscriptions,e),()=>Gb(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};const rx=e=>e*1e3,ix=e=>e/1e3;function ax(e,t){return t?e*(1e3/t):0}const ox=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function sx(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=ox(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>1e-7&&++s<12);return o}function cx(e,t,n,r){if(e===t&&n===r)return Qb;let i=t=>sx(t,0,1,e,n);return e=>e===0||e===1?e:ox(i(e),t,r)}const lx=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ux=e=>t=>1-e(1-t),dx=cx(.33,1.53,.69,.99),fx=ux(dx),px=lx(fx),mx=e=>(e*=2)<1?.5*fx(e):.5*(2-2**(-10*(e-1))),hx=e=>1-Math.sin(Math.acos(e)),gx=ux(hx),_x=lx(hx),vx=cx(.42,0,1,1),yx=cx(0,0,.58,1),bx=cx(.42,0,.58,1),xx=e=>Array.isArray(e)&&typeof e[0]!=`number`,Sx=e=>Array.isArray(e)&&typeof e[0]==`number`,Cx={linear:Qb,easeIn:vx,easeInOut:bx,easeOut:yx,circIn:hx,circInOut:_x,circOut:gx,backIn:fx,backInOut:px,backOut:dx,anticipate:mx},wx=e=>typeof e==`string`,Tx=e=>{if(Sx(e)){e.length;let[t,n,r,i]=e;return cx(t,n,r,i)}else if(wx(e))return Cx[e],`${e}`,Cx[e];return e},Ex=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],Dx={value:null,addProjectionMetrics:null};function Ox(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i,c=s?n:r;return t&&o.add(e),c.has(e)||c.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),t&&Dx.value&&Dx.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}function kx(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Ex.reduce((e,n)=>(e[n]=Ox(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=qb.useManualTiming?i.timestamp:performance.now();n=!1,qb.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,40),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)},_=Ex.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),v=e=>{for(let t=0;t<Ex.length;t++)o[Ex[t]].cancel(e)};return{schedule:_,cancel:v,state:i,steps:o}}const{schedule:X,cancel:Ax,state:jx,steps:Mx}=kx(typeof requestAnimationFrame<`u`?requestAnimationFrame:Qb,!0);let Nx;function Px(){Nx=void 0}const Fx={now:()=>(Nx===void 0&&Fx.set(jx.isProcessing||qb.useManualTiming?jx.timestamp:performance.now()),Nx),set:e=>{Nx=e,queueMicrotask(Px)}},Ix={layout:0,mainThread:0,waapi:0},Lx=e=>t=>typeof t==`string`&&t.startsWith(e),Rx=Lx(`--`),zx=Lx(`var(--`),Bx=e=>{let t=zx(e);return t?Vx.test(e.split(`/*`)[0].trim()):!1},Vx=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Hx={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Ux={...Hx,transform:e=>Kb(0,1,e)},Wx={...Hx,default:1},Gx=e=>Math.round(e*1e5)/1e5,Kx=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qx(e){return e==null}const Jx=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Yx=(e,t)=>n=>!!(typeof n==`string`&&Jx.test(n)&&n.startsWith(e)||t&&!qx(n)&&Object.prototype.hasOwnProperty.call(n,t)),Xx=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Kx);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Zx=e=>Kb(0,255,e),Qx={...Hx,transform:e=>Math.round(Zx(e))},$x={test:Yx(`rgb`,`red`),parse:Xx(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Qx.transform(e)+`, `+Qx.transform(t)+`, `+Qx.transform(n)+`, `+Gx(Ux.transform(r))+`)`};function eS(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const tS={test:Yx(`#`),parse:eS,transform:$x.transform},nS=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),rS=nS(`deg`),iS=nS(`%`),Z=nS(`px`),aS=nS(`vh`),oS=nS(`vw`),sS=(()=>({...iS,parse:e=>iS.parse(e)/100,transform:e=>iS.transform(e*100)}))(),cS={test:Yx(`hsl`,`hue`),parse:Xx(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+iS.transform(Gx(t))+`, `+iS.transform(Gx(n))+`, `+Gx(Ux.transform(r))+`)`},lS={test:e=>$x.test(e)||tS.test(e)||cS.test(e),parse:e=>$x.test(e)?$x.parse(e):cS.test(e)?cS.parse(e):tS.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?$x.transform(e):cS.transform(e),getAnimatableNone:e=>{let t=lS.parse(e);return t.alpha=0,lS.transform(t)}},uS=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function dS(e){return isNaN(e)&&typeof e==`string`&&(e.match(Kx)?.length||0)+(e.match(uS)?.length||0)>0}const fS=`number`,pS=`color`,mS=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function hS(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0,o=t.replace(mS,e=>(lS.test(e)?(r.color.push(a),i.push(pS),n.push(lS.parse(e))):e.startsWith(`var(`)?(r.var.push(a),i.push(`var`),n.push(e)):(r.number.push(a),i.push(fS),n.push(parseFloat(e))),++a,"${}")),s=o.split("${}");return{values:n,split:s,indexes:r,types:i}}function gS(e){return hS(e).values}function _S(e){let{split:t,types:n}=hS(e),r=t.length;return e=>{let i=``;for(let a=0;a<r;a++)if(i+=t[a],e[a]!==void 0){let t=n[a];t===fS?i+=Gx(e[a]):t===pS?i+=lS.transform(e[a]):i+=e[a]}return i}}const vS=e=>typeof e==`number`?0:lS.test(e)?lS.getAnimatableNone(e):e;function yS(e){let t=gS(e),n=_S(e);return n(t.map(vS))}const bS={test:dS,parse:gS,createTransformer:_S,getAnimatableNone:yS};function xS(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function SS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=xS(s,r,e+1/3),a=xS(s,r,e),o=xS(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function CS(e,t){return n=>n>0?t:e}const Q=(e,t,n)=>e+(t-e)*n,wS=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},TS=[tS,$x,cS],ES=e=>TS.find(t=>t.test(e));function DS(e){let t=ES(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===cS&&(n=SS(n)),n}const OS=(e,t)=>{let n=DS(e),r=DS(t);if(!n||!r)return CS(e,t);let i={...n};return e=>(i.red=wS(n.red,r.red,e),i.green=wS(n.green,r.green,e),i.blue=wS(n.blue,r.blue,e),i.alpha=Q(n.alpha,r.alpha,e),$x.transform(i))},kS=new Set([`none`,`hidden`]);function AS(e,t){return kS.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function jS(e,t){return n=>Q(e,t,n)}function MS(e){return typeof e==`number`?jS:typeof e==`string`?Bx(e)?CS:lS.test(e)?OS:IS:Array.isArray(e)?NS:typeof e==`object`?lS.test(e)?OS:PS:CS}function NS(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>MS(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function PS(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=MS(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function FS(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}const IS=(e,t)=>{let n=bS.createTransformer(t),r=hS(e),i=hS(t),a=r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length;return a?kS.has(e)&&!i.values.length||kS.has(t)&&!r.values.length?AS(e,t):ex(NS(FS(r,i),i.values),n):(`${e}${t}`,CS(e,t))};function LS(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Q(e,t,n);let r=MS(e);return r(e,t)}const RS=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>X.update(t,e),stop:()=>Ax(t),now:()=>jx.isProcessing?jx.timestamp:Fx.now()}},zS=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},BS=2e4;function VS(e){let t=0,n=e.next(t);for(;!n.done&&t<BS;)t+=50,n=e.next(t);return t>=BS?1/0:t}function HS(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(VS(r),BS);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:ix(i)}}function US(e,t,n){let r=Math.max(t-5,0);return ax(n-e(r),t-r)}const $={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},WS=.001;function GS({duration:e=$.duration,bounce:t=$.bounce,velocity:n=$.velocity,mass:r=$.mass}){let i,a;$.maxDuration;let o=1-t;o=Kb($.minDamping,$.maxDamping,o),e=Kb($.minDuration,$.maxDuration,ix(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=qS(t,o),c=Math.exp(-i);return WS-a/s*c},a=t=>{let r=t*o,a=r*e,s=a*n+n,c=o**2*t**2*e,l=Math.exp(-a),u=qS(t**2,o),d=-i(t)+WS>0?-1:1;return d*((s-c)*l)/u}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-WS+r*i},a=t=>{let r=Math.exp(-t*e),i=(n-t)*(e*e);return r*i});let s=5/e,c=KS(i,a,s);if(e=rx(e),isNaN(c))return{stiffness:$.stiffness,damping:$.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}function KS(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}function qS(e,t){return e*Math.sqrt(1-t*t)}const JS=[`duration`,`bounce`],YS=[`stiffness`,`damping`,`mass`];function XS(e,t){return t.some(t=>e[t]!==void 0)}function ZS(e){let t={velocity:$.velocity,stiffness:$.stiffness,damping:$.damping,mass:$.mass,isResolvedFromDuration:!1,...e};if(!XS(e,YS)&&XS(e,JS))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*Kb(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:$.mass,stiffness:i,damping:a}}else{let n=GS(e);t={...t,...n,mass:$.mass},t.isResolvedFromDuration=!0}return t}function QS(e=$.visualDuration,t=$.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=ZS({...n,velocity:-ix(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=ix(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?$.restSpeed.granular:$.restSpeed.default,i||=v?$.restDelta.granular:$.restDelta.default;let y;if(h<1){let e=qS(_,h);y=t=>{let n=Math.exp(-h*_*t);return o-n*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=e===0?m:0;h<1&&(n=e===0?rx(m):US(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(VS(b),BS),t=zS(t=>b.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return b}QS.applyToOptions=e=>{let t=HS(e,100,QS);return e.ease=t.ease,e.duration=rx(t.duration),e.type=`keyframes`,e};function $S({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=QS({keyframes:[f.value,m(f.value)],velocity:US(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function eC(e,t,n){let r=[],i=n||qb.mix||LS,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);if(t){let e=Array.isArray(t)?t[n]||Qb:t;a=ex(e,a)}r.push(a)}return r}function tC(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=eC(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=tx(e[r],e[r+1],n);return s[r](i)};return n?t=>l(Kb(e[0],e[a-1],t)):l}function nC(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=tx(0,t,r);e.push(Q(n,1,i))}}function rC(e){let t=[0];return nC(t,e.length-1),t}function iC(e,t){return e.map(e=>e*t)}function aC(e,t){return e.map(()=>t||bx).splice(0,e.length-1)}function oC({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=xx(r)?r.map(Tx):Tx(r),a={done:!1,value:t[0]},o=iC(n&&n.length===t.length?n:rC(t),e),s=tC(o,t,{ease:Array.isArray(i)?i:aC(t,i)});return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}const sC=e=>e!==null;function cC(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(sC),o=i<0||t&&n!==`loop`&&t%2==1,s=o?0:a.length-1;return!s||r===void 0?a[s]:r}const lC={decay:$S,inertia:$S,tween:oC,keyframes:oC,spring:QS};function uC(e){typeof e.type==`string`&&(e.type=lC[e.type])}var dC=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}};const fC=e=>e/100;var pC=class extends dC{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Fx.now()&&this.tick(Fx.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},Ix.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;uC(e);let{type:t=oC,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||oC;s!==oC&&typeof o[0]!=`number`&&(this.mixKeyframes=ex(fC,LS(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=VS(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1);let i=!!(t%2);i&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=Kb(0,1,n)*o}let b=_?{done:!1,value:l[0]}:y.next(v);i&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==$S&&(b.value=cC(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return ix(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+ix(e)}get time(){return ix(this.currentTime)}set time(e){e=rx(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Fx.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=ix(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=RS,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(Fx.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,Ix.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function mC(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const hC=e=>e*180/Math.PI,gC=e=>{let t=hC(Math.atan2(e[1],e[0]));return vC(t)},_C={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:gC,rotateZ:gC,skewX:e=>hC(Math.atan(e[1])),skewY:e=>hC(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},vC=e=>(e%=360,e<0&&(e+=360),e),yC=gC,bC=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),xC=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),SC={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:bC,scaleY:xC,scale:e=>(bC(e)+xC(e))/2,rotateX:e=>vC(hC(Math.atan2(e[6],e[5]))),rotateY:e=>vC(hC(Math.atan2(-e[2],e[0]))),rotateZ:yC,rotate:yC,skewX:e=>hC(Math.atan(e[4])),skewY:e=>hC(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function CC(e){return e.includes(`scale`)?1:0}function wC(e,t){if(!e||e===`none`)return CC(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=SC,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_C,i=t}if(!i)return CC(t);let a=r[t],o=i[1].split(`,`).map(EC);return typeof a==`function`?a(o):o[a]}const TC=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return wC(n,t)};function EC(e){return parseFloat(e.trim())}const DC=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],OC=(()=>new Set(DC))(),kC=e=>e===Hx||e===Z,AC=new Set([`x`,`y`,`z`]),jC=DC.filter(e=>!AC.has(e));function MC(e){let t=[];return jC.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}const NC={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>wC(t,`x`),y:(e,{transform:t})=>wC(t,`y`)};NC.translateX=NC.x,NC.translateY=NC.y;const PC=new Set;let FC=!1,IC=!1,LC=!1;function RC(){if(IC){let e=Array.from(PC).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=MC(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}IC=!1,FC=!1,PC.forEach(e=>e.complete(LC)),PC.clear()}function zC(){PC.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(IC=!0)})}function BC(){LC=!0,zC(),RC(),LC=!1}var VC=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(PC.add(this),FC||(FC=!0,X.read(zC),X.resolveKeyframes(RC))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}mC(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),PC.delete(this)}cancel(){this.state===`scheduled`&&(PC.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}};const HC=e=>e.startsWith(`--`);function UC(e,t,n){HC(t)?e.style.setProperty(t,n):e.style[t]=n}const WC=Zb(()=>window.ScrollTimeline!==void 0),GC={};function KC(e,t){let n=Zb(e);return()=>GC[t]??n()}const qC=KC(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),JC=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,YC={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:JC([0,.65,.55,1]),circOut:JC([.55,0,1,.45]),backIn:JC([.31,.01,.66,-.59]),backOut:JC([.33,1.53,.69,.99])};function XC(e,t){if(e)return typeof e==`function`?qC()?zS(e,t):`ease-out`:Sx(e)?JC(e):Array.isArray(e)?e.map(e=>XC(e,t)||YC.easeOut):YC[e]}function ZC(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=XC(s,i);Array.isArray(d)&&(u.easing=d),Dx.value&&Ix.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return Dx.value&&p.finished.finally(()=>{Ix.waapi--}),p}function QC(e){return typeof e==`function`&&`applyToOptions`in e}function $C({type:e,...t}){return QC(e)&&qC()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var ew=class extends dC{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=$C(e);this.animation=ZC(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=cC(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):UC(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return ix(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+ix(e)}get time(){return ix(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=rx(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&WC()?(this.animation.timeline=e,Qb):t(this)}};const tw={anticipate:mx,backInOut:px,circInOut:_x};function nw(e){return e in tw}function rw(e){typeof e.ease==`string`&&nw(e.ease)&&(e.ease=tw[e.ease])}var iw=class extends ew{constructor(e){rw(e),uC(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new pC({...a,autoplay:!1}),s=rx(this.finishedTime??this.time);t.setWithVelocity(o.sample(s-10).value,o.sample(s).value,10),o.stop()}};const aw=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(bS.test(e)||e===`0`)&&!e.startsWith(`url(`));function ow(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function sw(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=aw(i,t),s=aw(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:ow(e)||(n===`spring`||QC(n))&&r}function cw(e){e.duration=0,e.type=`keyframes`}const lw=new Set([`opacity`,`clipPath`,`filter`,`transform`]),uw=Zb(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function dw(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e,s=t?.owner?.current;if(!(s instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return uw()&&n&&lw.has(n)&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var fw=class extends dC{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Fx.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||VC;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Fx.now(),sw(e,i,a,o)||((qb.instantAnimations||!s)&&l?.(cC(e,n,t)),e[0]=e[e.length-1],cw(n),n.repeat=0);let u=r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,d={startTime:u,finalKeyframe:t,...n,keyframes:e},f=!c&&dw(d)?new iw({...d,element:d.motionValue.owner.current}):new pC(d);f.finished.then(()=>this.notifyFinished()).catch(Qb),this.pendingTimeline&&=(this.stopTimeline=f.attachTimeline(this.pendingTimeline),void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),BC()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};const pw=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function mw(e){let t=pw.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function hw(e,t,n=1){`${e}`;let[r,i]=mw(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Jb(e)?parseFloat(e):e}return Bx(i)?hw(i,t,n+1):i}function gw(e,t){return e?.[t]??e?.default??e}const _w=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...DC]),vw={test:e=>e===`auto`,parse:e=>e},yw=e=>t=>t.test(e),bw=[Hx,Z,iS,rS,oS,aS,vw],xw=e=>bw.find(yw(e));function Sw(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||Xb(e)}const Cw=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function ww(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Kx)||[];if(!r)return e;let i=n.replace(r,``),a=Cw.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}const Tw=/\b([a-z-]*)\(.*?\)/gu,Ew={...bS,getAnimatableNone:e=>{let t=e.match(Tw);return t?t.map(ww).join(` `):e}},Dw={...Hx,transform:Math.round},Ow={rotate:rS,rotateX:rS,rotateY:rS,rotateZ:rS,scale:Wx,scaleX:Wx,scaleY:Wx,scaleZ:Wx,skew:rS,skewX:rS,skewY:rS,distance:Z,translateX:Z,translateY:Z,translateZ:Z,x:Z,y:Z,z:Z,perspective:Z,transformPerspective:Z,opacity:Ux,originX:sS,originY:sS,originZ:Z},kw={borderWidth:Z,borderTopWidth:Z,borderRightWidth:Z,borderBottomWidth:Z,borderLeftWidth:Z,borderRadius:Z,radius:Z,borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomRightRadius:Z,borderBottomLeftRadius:Z,width:Z,maxWidth:Z,height:Z,maxHeight:Z,top:Z,right:Z,bottom:Z,left:Z,padding:Z,paddingTop:Z,paddingRight:Z,paddingBottom:Z,paddingLeft:Z,margin:Z,marginTop:Z,marginRight:Z,marginBottom:Z,marginLeft:Z,backgroundPositionX:Z,backgroundPositionY:Z,...Ow,zIndex:Dw,fillOpacity:Ux,strokeOpacity:Ux,numOctaves:Dw},Aw={...kw,color:lS,backgroundColor:lS,outlineColor:lS,fill:lS,stroke:lS,borderColor:lS,borderTopColor:lS,borderRightColor:lS,borderBottomColor:lS,borderLeftColor:lS,filter:Ew,WebkitFilter:Ew},jw=e=>Aw[e];function Mw(e,t){let n=jw(e);return n!==Ew&&(n=bS),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Nw=new Set([`auto`,`none`,`0`]);function Pw(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Nw.has(t)&&hS(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Mw(n,i)}var Fw=class extends VC{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Bx(r))){let i=hw(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!_w.has(n)||e.length!==2)return;let[r,i]=e,a=xw(r),o=xw(i);if(a!==o)if(kC(a)&&kC(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else NC[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Sw(e[t]))&&n.push(t);n.length&&Pw(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=NC[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=NC[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function Iw(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const Lw=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Rw(e){return Yb(e)&&`offsetHeight`in e}const zw=e=>!isNaN(parseFloat(e)),Bw={current:void 0};var Vw=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Fx.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Fx.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=zw(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new nx);let n=this.events[e].add(t);return e===`change`?()=>{n(),X.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Bw.current&&Bw.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=Fx.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return ax(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Hw(e,t){return new Vw(e,t)}const{schedule:Uw,cancel:Ww}=kx(queueMicrotask,!1),Gw={x:!1,y:!1};function Kw(){return Gw.x||Gw.y}function qw(e){return e===`x`||e===`y`?Gw[e]?null:(Gw[e]=!0,()=>{Gw[e]=!1}):Gw.x||Gw.y?null:(Gw.x=Gw.y=!0,()=>{Gw.x=Gw.y=!1})}function Jw(e,t){let n=Iw(e),r=new AbortController,i={passive:!0,...t,signal:r.signal},a=()=>r.abort();return[n,i,a]}function Yw(e){return!(e.pointerType===`touch`||Kw())}function Xw(e,t,n={}){let[r,i,a]=Jw(e,n),o=e=>{if(!Yw(e))return;let{target:n}=e,r=t(n,e);if(typeof r!=`function`||!n)return;let a=e=>{Yw(e)&&(r(e),n.removeEventListener(`pointerleave`,a))};n.addEventListener(`pointerleave`,a,i)};return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}const Zw=(e,t)=>t?e===t?!0:Zw(e,t.parentElement):!1,Qw=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,$w=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function eT(e){return $w.has(e.tagName)||e.tabIndex!==-1}const tT=new WeakSet;function nT(e){return t=>{t.key===`Enter`&&e(t)}}function rT(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}const iT=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=nT(()=>{if(tT.has(n))return;rT(n,`down`);let e=nT(()=>{rT(n,`up`)}),r=()=>rT(n,`cancel`);n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,r,t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function aT(e){return Qw(e)&&!Kw()}function oT(e,t,n={}){let[r,i,a]=Jw(e,n),o=e=>{let r=e.currentTarget;if(!aT(e))return;tT.add(r);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),tT.has(r)&&tT.delete(r),aT(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Zw(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{let t=n.useGlobalTarget?window:e;t.addEventListener(`pointerdown`,o,i),Rw(e)&&(e.addEventListener(`focus`,e=>iT(e,i)),!eT(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function sT(e){return Yb(e)&&`ownerSVGElement`in e}function cT(e){return sT(e)&&e.tagName===`svg`}const lT=e=>!!(e&&e.getVelocity),uT=[...bw,lS,bS],dT=e=>uT.find(yw(e)),fT=a({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function pT(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function mT(...e){return t=>{let n=!1,r=e.map(e=>{let r=pT(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():pT(e[t],null)}}}}function hT(...t){return e.useCallback(mT(...t),t)}var gT=class extends e.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=t.offsetParent,n=Rw(e)&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}};function _T({children:t,isPresent:n,anchorX:r,root:i}){let a=f(),o=g(null),s=g({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=u(fT),l=hT(o,t?.ref);return p(()=>{let{width:e,height:t,top:l,left:u,right:d}=s.current;if(n||!o.current||!e||!t)return;let f=r===`left`?`left: ${u}`:`right: ${d}`;o.current.dataset.motionPopId=a;let p=document.createElement(`style`);c&&(p.nonce=c);let m=i??document.head;return m.appendChild(p),p.sheet&&p.sheet.insertRule(`
71
71
  [data-motion-pop-id="${a}"] {
72
72
  position: absolute !important;
73
73
  width: ${e}px !important;
@@ -75,10 +75,10 @@ http://jedwatson.github.io/classnames
75
75
  ${f}px !important;
76
76
  top: ${l}px !important;
77
77
  }
78
- `),()=>{m.contains(p)&&m.removeChild(p)}},[n]),y(pT,{isPresent:n,childRef:o,sizeRef:s,children:e.cloneElement(t,{ref:l})})}const hT=({children:t,initial:n,isPresent:r,onExitComplete:i,custom:a,presenceAffectsLayout:o,mode:s,anchorX:c,root:l})=>{let u=Lb(gT),d=f(),p=!0,m=h(()=>(p=!1,{id:d,initial:n,isPresent:r,custom:a,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;i&&i()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[r,u,i]);return o&&p&&(m={...m}),h(()=>{u.forEach((e,t)=>u.set(t,!1))},[r]),e.useEffect(()=>{!r&&!u.size&&i&&i()},[r]),s===`popLayout`&&(t=y(mT,{isPresent:r,anchorX:c,root:l,children:t})),y(Bb.Provider,{value:m,children:t})};function gT(){return new Map}function _T(e=!0){let t=u(Bb);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=f();d(()=>{if(e)return i(a)},[e]);let o=l(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const vT=e=>e.key||``;function yT(e){let t=[];return n.forEach(e,e=>{c(e)&&t.push(e)}),t}const bT=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,root:c})=>{let[l,d]=_T(o),f=h(()=>yT(e),[e]),p=o&&!l?[]:f.map(vT),m=g(!0),b=g(f),x=Lb(()=>new Map),[S,C]=_(f),[w,T]=_(f);zb(()=>{m.current=!1,b.current=f;for(let e=0;e<w.length;e++){let t=vT(w[e]);p.includes(t)?x.delete(t):x.get(t)!==!0&&x.set(t,!1)}},[w,p.length,p.join(`-`)]);let E=[];if(f!==S){let e=[...f];for(let t=0;t<w.length;t++){let n=w[t],r=vT(n);p.includes(r)||(e.splice(t,0,n),E.push(n))}return a===`wait`&&E.length&&(e=E),T(yT(e)),C(f),null}let{forceRender:D}=u(Ib);return y(v,{children:w.map(e=>{let u=vT(e),h=o&&!l?!1:f===w||p.includes(u),g=()=>{if(x.has(u))x.set(u,!0);else return;let e=!0;x.forEach(t=>{t||(e=!1)}),e&&(D?.(),T(b.current),o&&d?.(),r&&r())};return y(hT,{isPresent:h,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:c,onExitComplete:h?void 0:g,anchorX:s,children:e},u)})})},xT=a({strict:!1}),ST={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},CT={};for(let e in ST)CT[e]={isEnabled:t=>ST[e].some(e=>!!t[e])};function wT(e){for(let t in e)CT[t]={...CT[t],...e[t]}}const TT=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.ignoreStrict.viewport`.split(`.`));function ET(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||TT.has(e)}var DT={};M(DT,{default:()=>kT});var OT,kT,AT=A((()=>{ru(),OT=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,kT=nu(function(e){return OT.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})}));let jT=e=>!ET(e);function MT(e){typeof e==`function`&&(jT=t=>t.startsWith(`on`)?!ET(t):e(t))}try{MT((AT(),P(DT)).default)}catch{}function NT(e,t,n){let r={};for(let i in e){if(i===`values`&&typeof e.values==`object`)continue;(jT(i)||n===!0&&ET(i)||!t&&!ET(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i])}return r}const PT=a({});function FT(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function IT(e){return typeof e==`string`||Array.isArray(e)}const LT=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],RT=[`initial`,...LT];function zT(e){return FT(e.animate)||RT.some(t=>IT(e[t]))}function BT(e){return!!(zT(e)||e.variants)}function VT(e,t){if(zT(e)){let{initial:t,animate:n}=e;return{initial:t===!1||IT(t)?t:void 0,animate:IT(n)?n:void 0}}return e.inherit===!1?{}:t}function HT(e){let{initial:t,animate:n}=VT(e,u(PT));return h(()=>({initial:t,animate:n}),[UT(t),UT(n)])}function UT(e){return Array.isArray(e)?e.join(` `):e}function WT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const GT={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(Z.test(e))e=parseFloat(e);else return e;let n=WT(e,t.target.x),r=WT(e,t.target.y);return`${n}% ${r}%`}},KT={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=_S.parse(e);if(i.length>5)return r;let a=_S.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Q(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},qT={borderRadius:{...GT,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:GT,borderTopRightRadius:GT,borderBottomLeftRadius:GT,borderBottomRightRadius:GT,boxShadow:KT};function JT(e,{layout:t,layoutId:n}){return TC.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!qT[e]||e===`opacity`)}const YT={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},XT=wC.length;function ZT(e,t,n){let r=``,i=!0;for(let a=0;a<XT;a++){let o=wC[a],s=e[o];if(s===void 0)continue;let c=!0;if(c=typeof s==`number`?s===(o.startsWith(`scale`)?1:0):parseFloat(s)===0,!c||n){let e=Pw(s,Ew[o]);if(!c){i=!1;let t=YT[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function QT(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(TC.has(e)){o=!0;continue}else if(Fx(e)){i[e]=n;continue}else{let t=Pw(n,Ew[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=ZT(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}const $T=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function eE(e,t,n){for(let r in t)!oT(t[r])&&!JT(r,n)&&(e[r]=t[r])}function tE({transformTemplate:e},t){return h(()=>{let n=$T();return QT(n,t,e),Object.assign({},n.vars,n.style)},[t])}function nE(e,t){let n=e.style||{},r={};return eE(r,n,e),Object.assign(r,tE(e,t)),r}function rE(e,t){let n={},r=nE(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const iE={offset:`stroke-dashoffset`,array:`stroke-dasharray`},aE={offset:`strokeDashoffset`,array:`strokeDasharray`};function oE(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?iE:aE;e[a.offset]=Z.transform(-r);let o=Z.transform(t),s=Z.transform(n);e[a.array]=`${o} ${s}`}function sE(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(QT(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&oE(d,i,a,o,!1)}const cE=()=>({...$T(),attrs:{}}),lE=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function uE(e,t,n,r){let i=h(()=>{let n=cE();return sE(n,t,lE(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};eE(t,e.style,e),i.style={...t,...i.style}}return i}const dE=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function fE(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(dE.indexOf(e)>-1||/[A-Z]/u.test(e))}function pE(e,t,n,{latestValues:r},a,s=!1){let c=fE(e)?uE:rE,l=c(t,r,a,e),u=NT(t,typeof e==`string`,s),d=e===i?{}:{...u,...l,ref:n},{children:f}=t,p=h(()=>oT(f)?f.get():f,[f]);return o(e,{...d,children:p})}function mE(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function hE(e,t,n,r){if(typeof t==`function`){let[i,a]=mE(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=mE(r);t=t(n===void 0?e.custom:n,i,a)}return t}function gE(e){return oT(e)?e.get():e}function _E({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){let a={latestValues:vE(n,r,i,e),renderState:t()};return a}function vE(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=gE(a[e]);let{initial:o,animate:s}=e,c=zT(e),l=BT(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!FT(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=hE(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}const yE=e=>(t,n)=>{let r=u(PT),i=u(Bb),a=()=>_E(e,t,r,i);return n?a():Lb(a)};function bE(e,t,n){let{style:r}=e,i={};for(let a in r)(oT(r[a])||t.style&&oT(t.style[a])||JT(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}const xE=yE({scrapeMotionValuesFromProps:bE,createRenderState:$T});function SE(e,t,n){let r=bE(e,t,n);for(let n in e)if(oT(e[n])||oT(t[n])){let t=wC.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}const CE=yE({scrapeMotionValuesFromProps:SE,createRenderState:cE}),wE=Symbol.for(`motionComponentSymbol`);function TE(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function EE(e,t,n){return l(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):TE(n)&&(n.current=r))},[t])}const DE=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),OE=`data-`+DE(`framerAppearId`),kE=a({});function AE(e,t,n,r,i){let{visualElement:a}=u(PT),o=u(xT),s=u(Bb),c=u(lT).reducedMotion,l=g(null);r||=o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:a,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));let f=l.current,m=u(kE);f&&!f.projection&&i&&(f.type===`html`||f.type===`svg`)&&jE(l.current,n,i,m);let h=g(!1);p(()=>{f&&h.current&&f.update(n,s)});let _=n[OE],v=g(!!_&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return zb(()=>{f&&(h.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),v.current&&f.animationState&&f.animationState.animateChanges())}),d(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),f.enteringChildren=void 0)}),f}function jE(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:ME(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&TE(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function ME(e){if(e)return e.options.allowProjection===!1?ME(e.parent):e.projection}function NE(e,{forwardMotionProps:t=!1}={},n,r){n&&wT(n);let i=fE(e)?CE:xE;function a(a,o){let s,c={...u(lT),...a,layoutId:PE(a)},{isStatic:l}=c,d=HT(a),f=i(a,l);if(!l&&Rb){FE(c,n);let t=IE(c);s=t.MeasureLayout,d.visualElement=AE(e,f,c,r,t.ProjectionNode)}return b(PT.Provider,{value:d,children:[s&&d.visualElement?y(s,{visualElement:d.visualElement,...c}):null,pE(e,a,EE(f,d.visualElement,o),f,l,t)]})}a.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let o=s(a);return o[wE]=e,o}function PE({layoutId:e}){let t=u(Ib).id;return t&&e!==void 0?t+`-`+e:e}function FE(e,t){u(xT).strict}function IE(e){let{drag:t,layout:n}=CT;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function LE(e,t){if(typeof Proxy>`u`)return NE;let n=new Map,r=(n,r)=>NE(n,r,e,t),i=(e,t)=>r(e,t);return new Proxy(i,{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,NE(a,void 0,e,t)),n.get(a))})}function RE({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function zE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function BE(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function VE(e){return e===void 0||e===1}function HE({scale:e,scaleX:t,scaleY:n}){return!VE(e)||!VE(t)||!VE(n)}function UE(e){return HE(e)||WE(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function WE(e){return GE(e.x)||GE(e.y)}function GE(e){return e&&e!==`0%`}function KE(e,t,n){let r=e-n,i=t*r;return n+i}function qE(e,t,n,r,i){return i!==void 0&&(e=KE(e,i,r)),KE(e,n,r)+t}function JE(e,t=0,n=1,r,i){e.min=qE(e.min,t,n,r,i),e.max=qE(e.max,t,n,r,i)}function YE(e,{x:t,y:n}){JE(e.x,t.translate,t.scale,t.originPoint),JE(e.y,n.translate,n.scale,n.originPoint)}const XE=.999999999999,ZE=1.0000000000001;function QE(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&tD(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,YE(e,o)),r&&UE(a.latestValues)&&tD(e,a.latestValues))}t.x<ZE&&t.x>XE&&(t.x=1),t.y<ZE&&t.y>XE&&(t.y=1)}function $E(e,t){e.min+=t,e.max+=t}function eD(e,t,n,r,i=.5){let a=Q(e.min,e.max,i);JE(e,t,n,a,r)}function tD(e,t){eD(e.x,t.x,t.scaleX,t.scale,t.originX),eD(e.y,t.y,t.scaleY,t.scale,t.originY)}function nD(e,t){return RE(BE(e.getBoundingClientRect(),t))}function rD(e,t,n){let r=nD(e,n),{scroll:i}=t;return i&&($E(r.x,i.offset.x),$E(r.y,i.offset.y)),r}const iD=()=>({translate:0,scale:1,origin:0,originPoint:0}),aD=()=>({x:iD(),y:iD()}),oD=()=>({min:0,max:0}),sD=()=>({x:oD(),y:oD()}),cD={current:null},lD={current:!1};function uD(){if(lD.current=!0,Rb)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>cD.current=e.matches;e.addEventListener(`change`,t),t()}else cD.current=!1}const dD=new WeakMap;function fD(e,t,n){for(let r in t){let i=t[r],a=n[r];if(oT(i))e.addValue(r,i);else if(oT(a))e.addValue(r,zw(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,zw(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}const pD=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`];var mD=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=RC,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=Mx.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,X.render(this.render,!1,!0))};let{latestValues:s,renderState:c}=a;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=zT(t),this.isVariantNode=BT(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:l,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in u){let t=u[e];s[e]!==void 0&&oT(t)&&t.set(s[e])}}mount(e){this.current=e,dD.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),lD.current||uD(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:cD.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),Dx(this.notifyUpdate),Dx(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=TC.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&X.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in CT){let t=CT[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):sD()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<pD.length;t++){let n=pD[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=`on`+n,i=e[r];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=fD(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=zw(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Gb(n)||qb(n))?n=parseFloat(n):!cT(n)&&_S.test(t)&&(n=kw(e,t)),this.setBaseTarget(e,oT(n)?n.get():n)),oT(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=hE(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!oT(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new $b),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Bw.render(this.render)}},hD=class extends mD{constructor(){super(...arguments),this.KeyframeResolver=Mw}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;oT(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function gD(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function _D(e){return window.getComputedStyle(e)}var vD=class extends hD{constructor(){super(...arguments),this.type=`html`,this.renderInstance=gD}readValueFromInstance(e,t){if(TC.has(t))return this.projection?.isProjecting?bC(t):SC(e,t);{let n=_D(e),r=(Fx(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return nD(e,t)}build(e,t,n){QT(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return bE(e,t,n)}};const yD=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]);function bD(e,t,n,r){for(let n in gD(e,t,void 0,r),t.attrs)e.setAttribute(yD.has(n)?n:DE(n),t.attrs[n])}var xD=class extends hD{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=sD}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(TC.has(t)){let e=Ow(t);return e&&e.default||0}return t=yD.has(t)?t:DE(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return SE(e,t,n)}build(e,t,n){sE(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){bD(e,t,n,r)}mount(e){this.isSVGTag=lE(e.tagName),super.mount(e)}};const SD=(e,t)=>fE(e)?new xD(t):new vD(t,{allowProjection:e!==i});function CD(e,t,n){let r=e.getProps();return hE(r,t,n===void 0?r.custom:n,e)}const wD=e=>Array.isArray(e);function TD(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zw(n))}function ED(e){return wD(e)?e[e.length-1]||0:e}function DD(e,t){let n=CD(e,t),{transitionEnd:r={},transition:i={},...a}=n||{};for(let t in a={...a,...r},a){let n=ED(a[t]);TD(e,t,n)}}function OD(e){return!!(oT(e)&&e.add)}function kD(e,t){let n=e.getValue(`willChange`);if(OD(n))return n.add(t);if(!n&&Wb.WillChange){let n=new Wb.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function AD(e){return e.props[OE]}const jD=e=>e!==null;function MD(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(jD),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}const ND={type:`spring`,stiffness:500,damping:25,restSpeed:10},PD=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),FD={type:`keyframes`,duration:.8},ID={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},LD=(e,{keyframes:t})=>t.length>2?FD:TC.has(e)?e.startsWith(`scale`)?PD(t[1]):ND:ID;function RD({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const zD=(e,t,n,r={},i,a)=>o=>{let s=pw(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=ex(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};RD(s)||Object.assign(u,LD(e,u)),u.duration&&=ex(u.duration),u.repeatDelay&&=ex(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(aw(u),u.delay===0&&(d=!0)),(Wb.instantAnimations||Wb.skipAnimations)&&(d=!0,aw(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=MD(u.keyframes,s);if(e!==void 0){X.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new uC(u):new lw(u)};function BD({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function VD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);let c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||l&&BD(l,t))continue;let o={delay:n,...pw(a||{},t)},u=r.get();if(u!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===u&&!o.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){let n=AD(e);if(n){let e=window.MotionHandoffAnimation(n,t,X);e!==null&&(o.startTime=e,d=!0)}}kD(e,t),r.start(zD(t,r,i,e.shouldReduceMotion&&mw.has(t)?{type:!1}:o,e,d));let f=r.animation;f&&c.push(f)}return o&&Promise.all(c).then(()=>{X.update(()=>{o&&DD(e,o)})}),c}function HD(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r,c=typeof n==`function`;return c?n(a,o):i===1?a*r:s-a*r}function UD(e,t,n={}){let r=CD(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(VD(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return WD(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function WD(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(UD(c,t,{...o,delay:n+(typeof r==`function`?0:r)+HD(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function GD(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>UD(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=UD(e,t,n);else{let i=typeof t==`function`?CD(e,t,n.custom):t;r=Promise.all(VD(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}function KD(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const qD=RT.length;function JD(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&JD(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<qD;n++){let r=RT[n],i=e.props[r];(IT(i)||i===!1)&&(t[r]=i)}return t}const YD=[...LT].reverse(),XD=LT.length;function ZD(e){return t=>Promise.all(t.map(({animation:t,options:n})=>GD(e,t,n)))}function QD(e){let t=ZD(e),n=tO(),r=!0,i=t=>(n,r)=>{let i=CD(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=JD(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<XD;t++){let f=YD[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=IT(m),g=f===a?p.isActive:null;g===!1&&(d=t);let _=m===s[f]&&m!==o[f]&&h;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),p.protectedKeys={...u},!p.isActive&&g===null||!m&&!p.prevProp||FT(m)||typeof m==`boolean`)continue;let v=$D(p.prevProp,m),y=v||f===a&&p.isActive&&!_&&h||t>d&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},T=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=wD(t)&&wD(n)?!KD(t,n):t!==n,r?t==null?l.add(e):T(e):t!==void 0&&l.has(e)?T(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1);let E=_&&v,D=!E||b;y&&D&&c.push(...x.map(t=>{let n={type:f};if(typeof t==`string`&&r&&!E&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=CD(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=HD(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(l.size){let t={};if(typeof o.initial!=`boolean`){let n=CD(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=o(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=tO()}}}function $D(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!KD(t,e):!1}function eO(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function tO(){return{animate:eO(!0),whileInView:eO(),whileHover:eO(),whileTap:eO(),whileDrag:eO(),whileFocus:eO(),exit:eO()}}var nO=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},rO=class extends nO{constructor(e){super(e),e.animationState||=QD(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();FT(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};let iO=0;var aO=class extends nO{constructor(){super(...arguments),this.id=iO++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}};const oO={animation:{Feature:rO},exit:{Feature:aO}};function sO(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function cO(e){return{point:{x:e.pageX,y:e.pageY}}}const lO=e=>t=>Yw(t)&&e(t,cO(t));function uO(e,t,n,r){return sO(e,t,lO(n),r)}const dO=1e-4;1-dO,1+dO;const fO=.01;0-fO,0+fO;function pO(e){return e.max-e.min}function mO(e,t,n){return Math.abs(e-t)<=n}function hO(e,t,n,r=.5){e.origin=r,e.originPoint=Q(t.min,t.max,e.origin),e.scale=pO(n)/pO(t),e.translate=Q(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function gO(e,t,n,r){hO(e.x,t.x,n.x,r?r.originX:void 0),hO(e.y,t.y,n.y,r?r.originY:void 0)}function _O(e,t,n){e.min=n.min+t.min,e.max=e.min+pO(t)}function vO(e,t,n){_O(e.x,t.x,n.x),_O(e.y,t.y,n.y)}function yO(e,t,n){e.min=t.min-n.min,e.max=e.min+pO(t)}function bO(e,t,n){yO(e.x,t.x,n.x),yO(e.y,t.y,n.y)}function xO(e){return[e(`x`),e(`y`)]}const SO=({current:e})=>e?e.ownerDocument.defaultView:null,CO=(e,t)=>Math.abs(e-t);function wO(e,t){let n=CO(e.x,t.x),r=CO(e.y,t.y);return Math.sqrt(n**2+r**2)}var TO=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=OO(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=wO(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=Ox;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=EO(t,this.transformPagePoint),X.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=OO(e.type===`pointercancel`?this.lastMoveEventInfo:EO(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Yw(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let o=cO(e),s=EO(o,this.transformPagePoint),{point:c}=s,{timestamp:l}=Ox;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,OO(s,this.history)),this.removeListeners=Zb(uO(this.contextWindow,`pointermove`,this.handlePointerMove),uO(this.contextWindow,`pointerup`,this.handlePointerUp),uO(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Dx(this.updatePoint)}};function EO(e,t){return t?{point:t(e.point)}:e}function DO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function OO({point:e},t){return{point:e,delta:DO(e,AO(t)),offset:DO(e,kO(t)),velocity:jO(t,.1)}}function kO(e){return e[0]}function AO(e){return e[e.length-1]}function jO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=AO(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ex(t)));)n--;if(!r)return{x:0,y:0};let a=tx(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function MO(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Q(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Q(n,e,r.max):Math.min(e,n)),e}function NO(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function PO(e,{top:t,left:n,bottom:r,right:i}){return{x:NO(e.x,n,i),y:NO(e.y,t,r)}}function FO(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function IO(e,t){return{x:FO(e.x,t.x),y:FO(e.y,t.y)}}function LO(e,t){let n=.5,r=pO(e),i=pO(t);return i>r?n=Qb(t.min,t.max-r,e.min):r>i&&(n=Qb(e.min,e.max-i,t.min)),Ub(0,1,n)}function RO(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const zO=.35;function BO(e=zO){return e===!1?e=0:e===!0&&(e=zO),{x:VO(e,`left`,`right`),y:VO(e,`top`,`bottom`)}}function VO(e,t,n){return{min:HO(e,t),max:HO(e,n)}}function HO(e,t){return typeof e==`number`?e:e[t]||0}const UO=new WeakMap;var WO=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=sD(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(cO(e).point)},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ww(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xO(e=>{let t=this.getAxisMotionValue(e).get()||0;if(tS.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];if(r){let e=pO(r);t=e*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&X.postRender(()=>i(e,t)),kD(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=KO(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>xO(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:l}=this.getProps();this.panSession=new TO(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:SO(this.visualElement)})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&X.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!GO(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=MO(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&TE(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=PO(n.layoutBox,e):this.constraints=!1,this.elastic=BO(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&xO(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=RO(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!TE(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=rD(n,r.root,this.visualElement.getTransformPagePoint()),a=IO(r.layout.layoutBox,i);if(t){let e=t(zE(a));this.hasMutatedConstraints=!!e,e&&(a=RE(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=xO(o=>{if(!GO(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return kD(this.visualElement,e),n.start(zD(e,n,0,t,this.visualElement,!1))}stopAnimation(){xO(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){xO(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){xO(t=>{let{drag:n}=this.getProps();if(!GO(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-Q(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!TE(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};xO(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=LO({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),xO(t=>{if(!GO(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(Q(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;UO.set(this.visualElement,this);let e=this.visualElement.current,t=uO(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();TE(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),X.read(n);let a=sO(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(xO(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{a(),t(),i(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=zO,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function GO(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function KO(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var qO=class extends nO{constructor(e){super(e),this.removeGroupControls=Yb,this.removeListeners=Yb,this.controls=new WO(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Yb}unmount(){this.removeGroupControls(),this.removeListeners()}};const JO=e=>(t,n)=>{e&&X.postRender(()=>e(t,n))};var YO=class extends nO{constructor(){super(...arguments),this.removePointerDownListener=Yb}onPointerDown(e){this.session=new TO(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:SO(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:JO(e),onStart:JO(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&X.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=uO(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};const XO={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let ZO=!1;var QO=class extends r{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),ZO&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),XO.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,ZO=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||X.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Bw.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;ZO=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function $O(e){let[t,n]=_T(),r=u(Ib);return y(QO,{...e,layoutGroup:r,switchLayoutGroup:u(kE),isPresent:t,safeToRemove:n})}function ek(e,t,n){let r=oT(e)?e:zw(e);return r.start(zD(``,r,t,n)),r.animation}const tk=(e,t)=>e.depth-t.depth;var nk=class{constructor(){this.children=[],this.isDirty=!1}add(e){Vb(this.children,e),this.isDirty=!0}remove(e){Hb(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(tk),this.isDirty=!1,this.children.forEach(e)}};function rk(e,t){let n=Mx.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(Dx(r),e(a-t))};return X.setup(r,!0),()=>Dx(r)}const ik=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],ak=ik.length,ok=e=>typeof e==`string`?parseFloat(e):e,sk=e=>typeof e==`number`||Z.test(e);function ck(e,t,n,r,i,a){i?(e.opacity=Q(0,n.opacity??1,uk(r)),e.opacityExit=Q(t.opacity??1,0,dk(r))):a&&(e.opacity=Q(t.opacity??1,n.opacity??1,r));for(let i=0;i<ak;i++){let a=`border${ik[i]}Radius`,o=lk(t,a),s=lk(n,a);if(o===void 0&&s===void 0)continue;o||=0,s||=0;let c=o===0||s===0||sk(o)===sk(s);c?(e[a]=Math.max(Q(ok(o),ok(s),r),0),(tS.test(s)||tS.test(o))&&(e[a]+=`%`)):e[a]=s}(t.rotate||n.rotate)&&(e.rotate=Q(t.rotate||0,n.rotate||0,r))}function lk(e,t){return e[t]===void 0?e.borderRadius:e[t]}const uk=fk(0,.5,px),dk=fk(.5,.95,Yb);function fk(e,t,n){return r=>r<e?0:r>t?1:n(Qb(e,t,r))}function pk(e,t){e.min=t.min,e.max=t.max}function mk(e,t){pk(e.x,t.x),pk(e.y,t.y)}function hk(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function gk(e,t,n,r,i){return e-=t,e=KE(e,1/n,r),i!==void 0&&(e=KE(e,1/i,r)),e}function _k(e,t=0,n=1,r=.5,i,a=e,o=e){if(tS.test(t)){t=parseFloat(t);let e=Q(o.min,o.max,t/100);t=e-o.min}if(typeof t!=`number`)return;let s=Q(a.min,a.max,r);e===a&&(s-=t),e.min=gk(e.min,t,n,s,i),e.max=gk(e.max,t,n,s,i)}function vk(e,t,[n,r,i],a,o){_k(e,t[n],t[r],t[i],t.scale,a,o)}const yk=[`x`,`scaleX`,`originX`],bk=[`y`,`scaleY`,`originY`];function xk(e,t,n,r){vk(e.x,t,yk,n?n.x:void 0,r?r.x:void 0),vk(e.y,t,bk,n?n.y:void 0,r?r.y:void 0)}function Sk(e){return e.translate===0&&e.scale===1}function Ck(e){return Sk(e.x)&&Sk(e.y)}function wk(e,t){return e.min===t.min&&e.max===t.max}function Tk(e,t){return wk(e.x,t.x)&&wk(e.y,t.y)}function Ek(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Dk(e,t){return Ek(e.x,t.x)&&Ek(e.y,t.y)}function Ok(e){return pO(e.x)/pO(e.y)}function kk(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Ak=class{constructor(){this.members=[]}add(e){Vb(this.members,e),e.scheduleRender()}remove(e){if(Hb(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function jk(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}const Mk={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Nk=[``,`X`,`Y`,`Z`];let Pk=0;function Fk(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ik(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=AD(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,X,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ik(r)}function Lk({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Pk++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,wx.value&&(Mk.nodes=Mk.calculatedTargetDeltas=Mk.calculatedProjections=0),this.nodes.forEach(Bk),this.nodes.forEach(qk),this.nodes.forEach(Jk),this.nodes.forEach(Vk),wx.addProjectionMetrics&&wx.addProjectionMetrics(Mk)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new nk)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new $b),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=iT(t)&&!aT(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;X.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=rk(i,250),XO.hasAnimatedSinceResize&&(XO.hasAnimatedSinceResize=!1,this.nodes.forEach(Kk)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||tA,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Dk(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...pw(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||Kk(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Dx(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Yk),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ik(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){this.updateScheduled=!1;let e=this.isUpdateBlocked();if(e){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Uk);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Wk);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Gk),this.nodes.forEach(Rk),this.nodes.forEach(zk)):this.nodes.forEach(Wk),this.clearAllSnapshots();let t=Mx.now();Ox.delta=Ub(0,1e3/60,t-Ox.timestamp),Ox.timestamp=t,Ox.isProcessing=!0,kx.update.process(Ox),kx.preRender.process(Ox),kx.render.process(Ox),Ox.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bw.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Hk),this.sharedNodes.forEach(Xk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,X.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){X.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!pO(this.snapshot.measuredBox.x)&&!pO(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){let t=this.path[e];t.updateScroll()}let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=sD(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Ck(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||UE(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),aA(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return sD();let t=e.measureViewportBox(),n=this.scroll?.wasRoot||this.path.some(sA);if(!n){let{scroll:e}=this.root;e&&($E(t.x,e.offset.x),$E(t.y,e.offset.y))}return t}removeElementScroll(e){let t=sD();if(mk(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&mk(t,e),$E(t.x,i.offset.x),$E(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=sD();mk(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&tD(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),UE(r.latestValues)&&tD(n,r.latestValues)}return UE(this.latestValues)&&tD(n,this.latestValues),n}removeTransform(e){let t=sD();mk(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!UE(n.latestValues))continue;HE(n.latestValues)&&n.updateSnapshot();let r=sD(),i=n.measurePageBox();mk(r,i),xk(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return UE(this.latestValues)&&xk(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ox.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t,r=!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize);if(r)return;let{layout:i,layoutId:a}=this.options;if(!this.layout||!(i||a))return;this.resolvedRelativeTargetAt=Ox.timestamp;let o=this.getClosestProjectingParent();o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=sD(),this.targetWithTransforms=sD()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vO(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):mk(this.target,this.layout.layoutBox),YE(this.target,this.targetDelta)):mk(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,o&&!!o.resumingFrom==!!this.resumingFrom&&!o.options.layoutScroll&&o.target&&this.animationProgress!==1?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),wx.value&&Mk.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||HE(this.parent.latestValues)||WE(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=sD(),this.relativeTargetOrigin=sD(),bO(this.relativeTargetOrigin,t,n),mk(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Ox.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;mk(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;QE(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=sD());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(hk(this.prevProjectionDelta.x,this.projectionDelta.x),hk(this.prevProjectionDelta.y,this.projectionDelta.y)),gO(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!kk(this.projectionDelta.x,this.prevProjectionDelta.x)||!kk(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),wx.value&&Mk.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=aD(),this.projectionDelta=aD(),this.projectionDeltaWithTransform=aD()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=aD();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=sD(),s=n?n.source:void 0,c=this.layout?this.layout.source:void 0,l=s!==c,u=this.getStack(),d=!u||u.members.length<=1,f=!!(l&&!d&&this.options.crossfade===!0&&!this.path.some(eA));this.animationProgress=0;let p;this.mixTargetDelta=t=>{let n=t/1e3;Zk(a.x,e.x,n),Zk(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bO(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$k(this.relativeTarget,this.relativeTargetOrigin,o,n),p&&Tk(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||=sD(),mk(p,this.relativeTarget)),l&&(this.animationValues=i,ck(i,r,this.latestValues,n,f,d)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(Dx(this.pendingAnimation),void 0),this.pendingAnimation=X.update(()=>{XO.hasAnimatedSinceResize=!0,Nx.layout++,this.motionValue||=zw(0),this.currentAnimation=ek(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Nx.layout--},onComplete:()=>{Nx.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&oA(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||sD();let t=pO(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=pO(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}mk(t,n),tD(t,i),gO(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ak);let n=this.sharedNodes.get(e);n.add(t);let r=t.options.initialPromotionConfig;t.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Fk(`z`,e,r,this.animationValues);for(let t=0;t<Nk.length;t++)Fk(`rotate${Nk[t]}`,e,r,this.animationValues),Fk(`skew${Nk[t]}`,e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=gE(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=gE(t?.pointerEvents)||``),this.hasProjected&&!UE(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=jk(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;for(let t in e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit,qT){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=qT[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?gE(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Uk),this.root.sharedNodes.clear()}}}function Rk(e){e.updateLayout()}function zk(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?xO(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=pO(r);r.min=n[e].min,r.max=r.min+i}):oA(i,t.layoutBox,n)&&xO(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=pO(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=aD();gO(o,n,t.layoutBox);let s=aD();a?gO(s,e.applyTransform(r,!0),t.measuredBox):gO(s,n,t.layoutBox);let c=!Ck(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=sD();bO(o,t.layoutBox,i.layoutBox);let s=sD();bO(s,n,a.layoutBox),Dk(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Bk(e){wx.value&&Mk.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Vk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Hk(e){e.clearSnapshot()}function Uk(e){e.clearMeasurements()}function Wk(e){e.isLayoutDirty=!1}function Gk(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Kk(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qk(e){e.resolveTargetDelta()}function Jk(e){e.calcProjection()}function Yk(e){e.resetSkewAndRotation()}function Xk(e){e.removeLeadSnapshot()}function Zk(e,t,n){e.translate=Q(t.translate,0,n),e.scale=Q(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Qk(e,t,n,r){e.min=Q(t.min,n.min,r),e.max=Q(t.max,n.max,r)}function $k(e,t,n,r){Qk(e.x,t.x,n.x,r),Qk(e.y,t.y,n.y,r)}function eA(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const tA={duration:.45,ease:[.4,0,.1,1]},nA=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),rA=nA(`applewebkit/`)&&!nA(`chrome/`)?Math.round:Yb;function iA(e){e.min=rA(e.min),e.max=rA(e.max)}function aA(e){iA(e.x),iA(e.y)}function oA(e,t,n){return e===`position`||e===`preserve-aspect`&&!mO(Ok(t),Ok(n),.2)}function sA(e){return e!==e.root&&e.scroll?.wasRoot}const cA=Lk({attachResizeListener:(e,t)=>sO(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),lA={current:void 0},uA=Lk({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!lA.current){let e=new cA({});e.mount(window),e.setOptions({layoutScroll:!0}),lA.current=e}return lA.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),dA={pan:{Feature:YO},drag:{Feature:qO,ProjectionNode:uA,MeasureLayout:$O}};function fA(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=`onHover`+n,a=r[i];a&&X.postRender(()=>a(t,cO(t)))}var pA=class extends nO{mount(){let{current:e}=this.node;e&&(this.unmount=qw(e,(e,t)=>(fA(this.node,t,`Start`),e=>fA(this.node,e,`End`))))}unmount(){}},mA=class extends nO{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=Zb(sO(this.node.current,`focus`,()=>this.onFocus()),sO(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function hA(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=`onTap`+(n===`End`?``:n),a=r[i];a&&X.postRender(()=>a(t,cO(t)))}var gA=class extends nO{mount(){let{current:e}=this.node;e&&(this.unmount=rT(e,(e,t)=>(hA(this.node,t,`Start`),(e,{success:t})=>hA(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};const _A=new WeakMap,vA=new WeakMap,yA=e=>{let t=_A.get(e.target);t&&t(e)},bA=e=>{e.forEach(yA)};function xA({root:e,...t}){let n=e||document;vA.has(n)||vA.set(n,{});let r=vA.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(bA,{root:e,...t})),r[i]}function SA(e,t,n){let r=xA(t);return _A.set(e,n),r.observe(e),()=>{_A.delete(e),r.unobserve(e)}}const CA={some:0,all:1};var wA=class extends nO{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:CA[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};return SA(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node,n=[`amount`,`margin`,`root`].some(TA(e,t));n&&this.startObserver()}unmount(){}};function TA({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const EA={inView:{Feature:wA},tap:{Feature:gA},focus:{Feature:mA},hover:{Feature:pA}},DA={layout:{ProjectionNode:uA,MeasureLayout:$O}},OA={...oO,...EA,...dA,...DA},kA=LE(OA,SD),AA=({isVisible:e,children:t})=>{let n=g(null),[r,i]=_(0);return d(()=>{n.current&&setTimeout(()=>{i((n.current?.scrollHeight??0)+5)},0)},[t]),y(bT,{initial:!1,children:e&&y(kA.div,{initial:{height:0,opacity:0},animate:{height:r,opacity:1},exit:{height:0,opacity:0},transition:{type:`spring`,damping:20,stiffness:100},children:y(`div`,{ref:n,children:t})})})};var jA=AA;function MA(e,[t,n]){return Math.min(n,Math.max(t,e))}function NA(t){let n=e.useRef({value:t,previous:t});return e.useMemo(()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous),[t])}var PA=[`PageUp`,`PageDown`],FA=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],IA={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},LA=`Slider`,[RA,zA,BA]=Kh(LA),[VA,HA]=de(LA,[BA]),[UA,WA]=VA(LA),GA=e.forwardRef((t,n)=>{let{name:r,min:i=0,max:a=100,step:o=1,orientation:s=`horizontal`,disabled:c=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[i],value:d,onValueChange:f=()=>{},onValueCommit:p=()=>{},inverted:m=!1,form:h,...g}=t,_=e.useRef(new Set),v=e.useRef(0),b=s===`horizontal`,x=b?JA:YA,[S=[],C]=ii({prop:d,defaultProp:u,onChange:e=>{let t=[..._.current];t[v.current]?.focus(),f(e)}}),w=e.useRef(S);function T(e){let t=lj(S,e);O(e,t)}function E(e){O(e,v.current)}function D(){let e=w.current[v.current],t=S[v.current],n=t!==e;n&&p(S)}function O(e,t,{commit:n}={commit:!1}){let r=mj(o),s=hj(Math.round((e-i)/o)*o+i,r),c=MA(s,[i,a]);C((e=[])=>{let r=oj(e,c,t);if(fj(r,l*o)){v.current=r.indexOf(c);let t=String(r)!==String(e);return t&&n&&p(r),t?r:e}else return e})}return y(UA,{scope:t.__scopeSlider,name:r,disabled:c,min:i,max:a,valueIndexToChangeRef:v,thumbs:_.current,values:S,orientation:s,form:h,children:y(RA.Provider,{scope:t.__scopeSlider,children:y(RA.Slot,{scope:t.__scopeSlider,children:y(x,{"aria-disabled":c,"data-disabled":c?``:void 0,...g,ref:n,onPointerDown:V(g.onPointerDown,()=>{c||(w.current=S)}),min:i,max:a,inverted:m,onSlideStart:c?void 0:T,onSlideMove:c?void 0:E,onSlideEnd:c?void 0:D,onHomeKeyDown:()=>!c&&O(i,0,{commit:!0}),onEndKeyDown:()=>!c&&O(a,S.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){let n=PA.includes(e.key),r=n||e.shiftKey&&FA.includes(e.key),i=r?10:1,a=v.current,s=S[a],c=o*i*t;O(s+c,a,{commit:!0})}}})})})})});GA.displayName=LA;var[KA,qA]=VA(LA,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),JA=e.forwardRef((t,n)=>{let{min:r,max:i,dir:a,inverted:o,onSlideStart:s,onSlideMove:c,onSlideEnd:l,onStepKeyDown:u,...d}=t,[f,p]=e.useState(null),m=H(n,e=>p(e)),h=e.useRef(void 0),g=Jh(a),_=g===`ltr`,v=_&&!o||!_&&o;function b(e){let t=h.current||f.getBoundingClientRect(),n=[0,t.width],a=v?[r,i]:[i,r],o=pj(n,a);return h.current=t,o(e-t.left)}return y(KA,{scope:t.__scopeSlider,startEdge:v?`left`:`right`,endEdge:v?`right`:`left`,direction:v?1:-1,size:`width`,children:y(XA,{dir:g,"data-orientation":`horizontal`,...d,ref:m,style:{...d.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=b(e.clientX);s?.(t)},onSlideMove:e=>{let t=b(e.clientX);c?.(t)},onSlideEnd:()=>{h.current=void 0,l?.()},onStepKeyDown:e=>{let t=v?`from-left`:`from-right`,n=IA[t].includes(e.key);u?.({event:e,direction:n?-1:1})}})})}),YA=e.forwardRef((t,n)=>{let{min:r,max:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=t,d=e.useRef(null),f=H(n,d),p=e.useRef(void 0),m=!a;function h(e){let t=p.current||d.current.getBoundingClientRect(),n=[0,t.height],a=m?[i,r]:[r,i],o=pj(n,a);return p.current=t,o(e-t.top)}return y(KA,{scope:t.__scopeSlider,startEdge:m?`bottom`:`top`,endEdge:m?`top`:`bottom`,size:`height`,direction:m?1:-1,children:y(XA,{"data-orientation":`vertical`,...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=h(e.clientY);o?.(t)},onSlideMove:e=>{let t=h(e.clientY);s?.(t)},onSlideEnd:()=>{p.current=void 0,c?.()},onStepKeyDown:e=>{let t=m?`from-bottom`:`from-top`,n=IA[t].includes(e.key);l?.({event:e,direction:n?-1:1})}})})}),XA=e.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=WA(LA,n);return y(U.span,{...l,ref:t,onKeyDown:V(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):PA.concat(FA).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:V(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:V(e.onPointerMove,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:V(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),ZA=`SliderTrack`,QA=e.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=WA(ZA,n);return y(U.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});QA.displayName=ZA;var $A=`SliderRange`,ej=e.forwardRef((t,n)=>{let{__scopeSlider:r,...i}=t,a=WA($A,r),o=qA($A,r),s=e.useRef(null),c=H(n,s),l=a.values.length,u=a.values.map(e=>sj(e,a.min,a.max)),d=l>1?Math.min(...u):0,f=100-Math.max(...u);return y(U.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?``:void 0,...i,ref:c,style:{...t.style,[o.startEdge]:d+`%`,[o.endEdge]:f+`%`}})});ej.displayName=$A;var tj=`SliderThumb`,nj=e.forwardRef((t,n)=>{let r=zA(t.__scopeSlider),[i,a]=e.useState(null),o=H(n,e=>a(e)),s=e.useMemo(()=>i?r().findIndex(e=>e.ref.current===i):-1,[r,i]);return y(rj,{...t,ref:o,index:s})}),rj=e.forwardRef((t,n)=>{let{__scopeSlider:r,index:i,name:a,...o}=t,s=WA(tj,r),c=qA(tj,r),[l,u]=e.useState(null),d=H(n,e=>u(e)),f=l?s.form||!!l.closest(`form`):!0,p=Dr(l),m=s.values[i],h=m===void 0?0:sj(m,s.min,s.max),g=cj(i,s.values.length),_=p?.[c.size],v=_?uj(_,h,c.direction):0;return e.useEffect(()=>{if(l)return s.thumbs.add(l),()=>{s.thumbs.delete(l)}},[l,s.thumbs]),b(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[c.startEdge]:`calc(${h}% + ${v}px)`},children:[y(RA.ItemSlot,{scope:t.__scopeSlider,children:y(U.span,{role:`slider`,"aria-label":t[`aria-label`]||g,"aria-valuemin":s.min,"aria-valuenow":m,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?``:void 0,tabIndex:s.disabled?void 0:0,...o,ref:d,style:m===void 0?{display:`none`}:t.style,onFocus:V(t.onFocus,()=>{s.valueIndexToChangeRef.current=i})})}),f&&y(aj,{name:a??(s.name?s.name+(s.values.length>1?`[]`:``):void 0),form:s.form,value:m},i)]})});nj.displayName=tj;var ij=`RadioBubbleInput`,aj=e.forwardRef(({__scopeSlider:t,value:n,...r},i)=>{let a=e.useRef(null),o=H(a,i),s=NA(n);return e.useEffect(()=>{let e=a.current;if(!e)return;let t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,`value`),i=r.set;if(s!==n&&i){let t=new Event(`input`,{bubbles:!0});i.call(e,n),e.dispatchEvent(t)}},[s,n]),y(U.input,{style:{display:`none`},...r,ref:o,defaultValue:n})});aj.displayName=ij;function oj(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function sj(e,t,n){let r=n-t,i=100/r,a=i*(e-t);return MA(a,[0,100])}function cj(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function lj(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function uj(e,t,n){let r=e/2,i=pj([0,50],[0,r]);return(r-i(t)*n)*n}function dj(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function fj(e,t){if(t>0){let n=dj(e),r=Math.min(...n);return r>=t}return!0}function pj(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function mj(e){return(String(e).split(`.`)[1]||``).length}function hj(e,t){let n=10**t;return Math.round(e*n)/n}var gj=GA,_j=QA,vj=ej,yj=nj;const bj=e=>{let{onValueChange:t,onPointerUp:n,id:r,value:i,name:a,disabled:o=!1,rootExtraClassNames:s=``,trackExtraClassNames:c=``,rangeExtraClassNames:l=``,thumbExtraClassNames:u=``,step:d,min:f,max:p}=e;return b(gj,{className:`tw:relative tw:flex tw:h-5 tw:w-full tw:touch-none tw:select-none tw:items-center ${s}`,defaultValue:[i],value:[i],onValueChange:e=>t&&t(e),onPointerUp:e=>n&&n(e),name:a,id:r,max:p,min:f,disabled:o,step:d,children:[y(_j,{className:`tw:relative tw:h-sq-5 tw:grow tw:rounded-sm tw:bg-sq-dark-gray tw:dark:bg-sq-dark-disabled-gray ${c}`,children:y(vj,{className:`tw:absolute tw:h-full tw:rounded-full ${l}`})}),y(yj,{className:`tw:block tw:h-sq-15 tw:w-sq-15 tw:rounded-full tw:bg-sq-theme-dark tw:active:bg-sq-theme-darker tw:focus:outline-none tw:focus-visible:outline-none tw:aria-disabled:bg-sq-dark-gray tw:dark:aria-disabled:bg-sq-dark-disabled-gray tw:transition tw:ease-in-out ${u}`,"aria-disabled":o})]})};function xj(t,n=[]){let r=[];function i(n,i){let a=e.createContext(i);a.displayName=n+`Context`;let o=r.length;r=[...r,i];let s=n=>{let{scope:r,children:i,...s}=n,c=r?.[t]?.[o]||a,l=e.useMemo(()=>s,Object.values(s));return y(c.Provider,{value:l,children:i})};s.displayName=n+`Provider`;function c(r,s){let c=s?.[t]?.[o]||a,l=e.useContext(c);if(l)return l;if(i!==void 0)return i;throw Error(`\`${r}\` must be used within \`${n}\``)}return[s,c]}let a=()=>{let n=r.map(t=>e.createContext(t));return function(r){let i=r?.[t]||n;return e.useMemo(()=>({[`__scope${t}`]:{...r,[t]:i}}),[r,i])}};return a.scopeName=t,[i,Sj(a,...n)]}function Sj(...t){let n=t[0];if(t.length===1)return n;let r=()=>{let r=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){let i=r.reduce((e,{useScope:n,scopeName:r})=>{let i=n(t),a=i[`__scope${r}`];return{...e,...a}},{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:i}),[i])}};return r.scopeName=n.scopeName,r}var Cj=Symbol.for(`react.lazy`),wj=e.use;function Tj(e){return typeof e==`object`&&!!e&&`then`in e}function Ej(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Cj&&`_payload`in e&&Tj(e._payload)}function Dj(t){let n=Oj(t),r=e.forwardRef((t,r)=>{let{children:i,...a}=t;Ej(i)&&typeof wj==`function`&&(i=wj(i._payload));let o=e.Children.toArray(i),s=o.find(Aj);if(s){let t=s.props.children,i=o.map(n=>n===s?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return y(n,{...a,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,i):null})}return y(n,{...a,ref:r,children:i})});return r.displayName=`${t}.Slot`,r}function Oj(t){let n=e.forwardRef((t,n)=>{let{children:r,...i}=t;if(Ej(r)&&typeof wj==`function`&&(r=wj(r._payload)),e.isValidElement(r)){let t=Mj(r),a=jj(i,r.props);return r.type!==e.Fragment&&(a.ref=n?le(n,t):t),e.cloneElement(r,a)}return e.Children.count(r)>1?e.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var kj=Symbol(`radix.slottable`);function Aj(t){return e.isValidElement(t)&&typeof t.type==`function`&&`__radixId`in t.type&&t.type.__radixId===kj}function jj(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r],o=/^on[A-Z]/.test(r);o?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Mj(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Nj=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`],Pj=Nj.reduce((t,n)=>{let r=Dj(`Primitive.${n}`),i=e.forwardRef((e,t)=>{let{asChild:i,...a}=e,o=i?r:n;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),y(o,{...a,ref:t})});return i.displayName=`Primitive.${n}`,{...t,[n]:i}},{}),Fj=`Progress`,Ij=100,[Lj,Rj]=xj(Fj),[zj,Bj]=Lj(Fj),Vj=e.forwardRef((e,t)=>{let{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=Wj,...o}=e;(i||i===0)&&!qj(i)&&console.error(Yj(`${i}`,`Progress`));let s=qj(i)?i:Ij;r!==null&&!Jj(r,s)&&console.error(Xj(`${r}`,`Progress`));let c=Jj(r,s)?r:null,l=Kj(c)?a(c,s):void 0;return y(zj,{scope:n,value:c,max:s,children:y(Pj.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Kj(c)?c:void 0,"aria-valuetext":l,role:`progressbar`,"data-state":Gj(c,s),"data-value":c??void 0,"data-max":s,...o,ref:t})})});Vj.displayName=Fj;var Hj=`ProgressIndicator`,Uj=e.forwardRef((e,t)=>{let{__scopeProgress:n,...r}=e,i=Bj(Hj,n);return y(Pj.div,{"data-state":Gj(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});Uj.displayName=Hj;function Wj(e,t){return`${Math.round(e/t*100)}%`}function Gj(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}function Kj(e){return typeof e==`number`}function qj(e){return Kj(e)&&!isNaN(e)&&e>0}function Jj(e,t){return Kj(e)&&!isNaN(e)&&e<=t&&e>=0}function Yj(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ij}\`.`}function Xj(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
78
+ `),()=>{m.contains(p)&&m.removeChild(p)}},[n]),y(gT,{isPresent:n,childRef:o,sizeRef:s,children:e.cloneElement(t,{ref:l})})}const vT=({children:t,initial:n,isPresent:r,onExitComplete:i,custom:a,presenceAffectsLayout:o,mode:s,anchorX:c,root:l})=>{let u=Bb(yT),d=f(),p=!0,m=h(()=>(p=!1,{id:d,initial:n,isPresent:r,custom:a,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;i&&i()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[r,u,i]);return o&&p&&(m={...m}),h(()=>{u.forEach((e,t)=>u.set(t,!1))},[r]),e.useEffect(()=>{!r&&!u.size&&i&&i()},[r]),s===`popLayout`&&(t=y(_T,{isPresent:r,anchorX:c,root:l,children:t})),y(Ub.Provider,{value:m,children:t})};function yT(){return new Map}function bT(e=!0){let t=u(Ub);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=f();d(()=>{if(e)return i(a)},[e]);let o=l(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const xT=e=>e.key||``;function ST(e){let t=[];return n.forEach(e,e=>{c(e)&&t.push(e)}),t}const CT=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,root:c})=>{let[l,d]=bT(o),f=h(()=>ST(e),[e]),p=o&&!l?[]:f.map(xT),m=g(!0),b=g(f),x=Bb(()=>new Map),[S,C]=_(f),[w,T]=_(f);Hb(()=>{m.current=!1,b.current=f;for(let e=0;e<w.length;e++){let t=xT(w[e]);p.includes(t)?x.delete(t):x.get(t)!==!0&&x.set(t,!1)}},[w,p.length,p.join(`-`)]);let E=[];if(f!==S){let e=[...f];for(let t=0;t<w.length;t++){let n=w[t],r=xT(n);p.includes(r)||(e.splice(t,0,n),E.push(n))}return a===`wait`&&E.length&&(e=E),T(ST(e)),C(f),null}let{forceRender:D}=u(zb);return y(v,{children:w.map(e=>{let u=xT(e),h=o&&!l?!1:f===w||p.includes(u),g=()=>{if(x.has(u))x.set(u,!0);else return;let e=!0;x.forEach(t=>{t||(e=!1)}),e&&(D?.(),T(b.current),o&&d?.(),r&&r())};return y(vT,{isPresent:h,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:c,onExitComplete:h?void 0:g,anchorX:s,children:e},u)})})},wT=a({strict:!1}),TT={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},ET={};for(let e in TT)ET[e]={isEnabled:t=>TT[e].some(e=>!!t[e])};function DT(e){for(let t in e)ET[t]={...ET[t],...e[t]}}const OT=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.ignoreStrict.viewport`.split(`.`));function kT(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||OT.has(e)}var AT={};M(AT,{default:()=>MT});var jT,MT,NT=A((()=>{ru(),jT=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,MT=nu(function(e){return jT.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})}));let PT=e=>!kT(e);function FT(e){typeof e==`function`&&(PT=t=>t.startsWith(`on`)?!kT(t):e(t))}try{FT((NT(),P(AT)).default)}catch{}function IT(e,t,n){let r={};for(let i in e){if(i===`values`&&typeof e.values==`object`)continue;(PT(i)||n===!0&&kT(i)||!t&&!kT(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i])}return r}const LT=a({});function RT(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function zT(e){return typeof e==`string`||Array.isArray(e)}const BT=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],VT=[`initial`,...BT];function HT(e){return RT(e.animate)||VT.some(t=>zT(e[t]))}function UT(e){return!!(HT(e)||e.variants)}function WT(e,t){if(HT(e)){let{initial:t,animate:n}=e;return{initial:t===!1||zT(t)?t:void 0,animate:zT(n)?n:void 0}}return e.inherit===!1?{}:t}function GT(e){let{initial:t,animate:n}=WT(e,u(LT));return h(()=>({initial:t,animate:n}),[KT(t),KT(n)])}function KT(e){return Array.isArray(e)?e.join(` `):e}function qT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const JT={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(Z.test(e))e=parseFloat(e);else return e;let n=qT(e,t.target.x),r=qT(e,t.target.y);return`${n}% ${r}%`}},YT={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=bS.parse(e);if(i.length>5)return r;let a=bS.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Q(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},XT={borderRadius:{...JT,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:JT,borderTopRightRadius:JT,borderBottomLeftRadius:JT,borderBottomRightRadius:JT,boxShadow:YT};function ZT(e,{layout:t,layoutId:n}){return OC.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!XT[e]||e===`opacity`)}const QT={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},$T=DC.length;function eE(e,t,n){let r=``,i=!0;for(let a=0;a<$T;a++){let o=DC[a],s=e[o];if(s===void 0)continue;let c=!0;if(c=typeof s==`number`?s===(o.startsWith(`scale`)?1:0):parseFloat(s)===0,!c||n){let e=Lw(s,kw[o]);if(!c){i=!1;let t=QT[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function tE(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(OC.has(e)){o=!0;continue}else if(Rx(e)){i[e]=n;continue}else{let t=Lw(n,kw[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=eE(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}const nE=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function rE(e,t,n){for(let r in t)!lT(t[r])&&!ZT(r,n)&&(e[r]=t[r])}function iE({transformTemplate:e},t){return h(()=>{let n=nE();return tE(n,t,e),Object.assign({},n.vars,n.style)},[t])}function aE(e,t){let n=e.style||{},r={};return rE(r,n,e),Object.assign(r,iE(e,t)),r}function oE(e,t){let n={},r=aE(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const sE={offset:`stroke-dashoffset`,array:`stroke-dasharray`},cE={offset:`strokeDashoffset`,array:`strokeDasharray`};function lE(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?sE:cE;e[a.offset]=Z.transform(-r);let o=Z.transform(t),s=Z.transform(n);e[a.array]=`${o} ${s}`}function uE(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(tE(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&lE(d,i,a,o,!1)}const dE=()=>({...nE(),attrs:{}}),fE=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function pE(e,t,n,r){let i=h(()=>{let n=dE();return uE(n,t,fE(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};rE(t,e.style,e),i.style={...t,...i.style}}return i}const mE=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function hE(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(mE.indexOf(e)>-1||/[A-Z]/u.test(e))}function gE(e,t,n,{latestValues:r},a,s=!1){let c=hE(e)?pE:oE,l=c(t,r,a,e),u=IT(t,typeof e==`string`,s),d=e===i?{}:{...u,...l,ref:n},{children:f}=t,p=h(()=>lT(f)?f.get():f,[f]);return o(e,{...d,children:p})}function _E(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function vE(e,t,n,r){if(typeof t==`function`){let[i,a]=_E(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=_E(r);t=t(n===void 0?e.custom:n,i,a)}return t}function yE(e){return lT(e)?e.get():e}function bE({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){let a={latestValues:xE(n,r,i,e),renderState:t()};return a}function xE(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=yE(a[e]);let{initial:o,animate:s}=e,c=HT(e),l=UT(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!RT(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=vE(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}const SE=e=>(t,n)=>{let r=u(LT),i=u(Ub),a=()=>bE(e,t,r,i);return n?a():Bb(a)};function CE(e,t,n){let{style:r}=e,i={};for(let a in r)(lT(r[a])||t.style&&lT(t.style[a])||ZT(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}const wE=SE({scrapeMotionValuesFromProps:CE,createRenderState:nE});function TE(e,t,n){let r=CE(e,t,n);for(let n in e)if(lT(e[n])||lT(t[n])){let t=DC.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}const EE=SE({scrapeMotionValuesFromProps:TE,createRenderState:dE}),DE=Symbol.for(`motionComponentSymbol`);function OE(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function kE(e,t,n){return l(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):OE(n)&&(n.current=r))},[t])}const AE=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),jE=`data-`+AE(`framerAppearId`),ME=a({});function NE(e,t,n,r,i){let{visualElement:a}=u(LT),o=u(wT),s=u(Ub),c=u(fT).reducedMotion,l=g(null);r||=o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:a,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));let f=l.current,m=u(ME);f&&!f.projection&&i&&(f.type===`html`||f.type===`svg`)&&PE(l.current,n,i,m);let h=g(!1);p(()=>{f&&h.current&&f.update(n,s)});let _=n[jE],v=g(!!_&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return Hb(()=>{f&&(h.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),v.current&&f.animationState&&f.animationState.animateChanges())}),d(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),f.enteringChildren=void 0)}),f}function PE(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:FE(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&OE(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function FE(e){if(e)return e.options.allowProjection===!1?FE(e.parent):e.projection}function IE(e,{forwardMotionProps:t=!1}={},n,r){n&&DT(n);let i=hE(e)?EE:wE;function a(a,o){let s,c={...u(fT),...a,layoutId:LE(a)},{isStatic:l}=c,d=GT(a),f=i(a,l);if(!l&&Vb){RE(c,n);let t=zE(c);s=t.MeasureLayout,d.visualElement=NE(e,f,c,r,t.ProjectionNode)}return b(LT.Provider,{value:d,children:[s&&d.visualElement?y(s,{visualElement:d.visualElement,...c}):null,gE(e,a,kE(f,d.visualElement,o),f,l,t)]})}a.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let o=s(a);return o[DE]=e,o}function LE({layoutId:e}){let t=u(zb).id;return t&&e!==void 0?t+`-`+e:e}function RE(e,t){u(wT).strict}function zE(e){let{drag:t,layout:n}=ET;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function BE(e,t){if(typeof Proxy>`u`)return IE;let n=new Map,r=(n,r)=>IE(n,r,e,t),i=(e,t)=>r(e,t);return new Proxy(i,{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,IE(a,void 0,e,t)),n.get(a))})}function VE({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function HE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function UE(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function WE(e){return e===void 0||e===1}function GE({scale:e,scaleX:t,scaleY:n}){return!WE(e)||!WE(t)||!WE(n)}function KE(e){return GE(e)||qE(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qE(e){return JE(e.x)||JE(e.y)}function JE(e){return e&&e!==`0%`}function YE(e,t,n){let r=e-n,i=t*r;return n+i}function XE(e,t,n,r,i){return i!==void 0&&(e=YE(e,i,r)),YE(e,n,r)+t}function ZE(e,t=0,n=1,r,i){e.min=XE(e.min,t,n,r,i),e.max=XE(e.max,t,n,r,i)}function QE(e,{x:t,y:n}){ZE(e.x,t.translate,t.scale,t.originPoint),ZE(e.y,n.translate,n.scale,n.originPoint)}const $E=.999999999999,eD=1.0000000000001;function tD(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&iD(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,QE(e,o)),r&&KE(a.latestValues)&&iD(e,a.latestValues))}t.x<eD&&t.x>$E&&(t.x=1),t.y<eD&&t.y>$E&&(t.y=1)}function nD(e,t){e.min+=t,e.max+=t}function rD(e,t,n,r,i=.5){let a=Q(e.min,e.max,i);ZE(e,t,n,a,r)}function iD(e,t){rD(e.x,t.x,t.scaleX,t.scale,t.originX),rD(e.y,t.y,t.scaleY,t.scale,t.originY)}function aD(e,t){return VE(UE(e.getBoundingClientRect(),t))}function oD(e,t,n){let r=aD(e,n),{scroll:i}=t;return i&&(nD(r.x,i.offset.x),nD(r.y,i.offset.y)),r}const sD=()=>({translate:0,scale:1,origin:0,originPoint:0}),cD=()=>({x:sD(),y:sD()}),lD=()=>({min:0,max:0}),uD=()=>({x:lD(),y:lD()}),dD={current:null},fD={current:!1};function pD(){if(fD.current=!0,Vb)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>dD.current=e.matches;e.addEventListener(`change`,t),t()}else dD.current=!1}const mD=new WeakMap;function hD(e,t,n){for(let r in t){let i=t[r],a=n[r];if(lT(i))e.addValue(r,i);else if(lT(a))e.addValue(r,Hw(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Hw(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}const gD=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`];var _D=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=VC,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=Fx.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,X.render(this.render,!1,!0))};let{latestValues:s,renderState:c}=a;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=HT(t),this.isVariantNode=UT(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:l,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in u){let t=u[e];s[e]!==void 0&&lT(t)&&t.set(s[e])}}mount(e){this.current=e,mD.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),fD.current||pD(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:dD.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),Ax(this.notifyUpdate),Ax(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=OC.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&X.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in ET){let t=ET[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):uD()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<gD.length;t++){let n=gD[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=`on`+n,i=e[r];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=hD(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Hw(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Jb(n)||Xb(n))?n=parseFloat(n):!dT(n)&&bS.test(t)&&(n=Mw(e,t)),this.setBaseTarget(e,lT(n)?n.get():n)),lT(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=vE(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!lT(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new nx),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Uw.render(this.render)}},vD=class extends _D{constructor(){super(...arguments),this.KeyframeResolver=Fw}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;lT(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function yD(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function bD(e){return window.getComputedStyle(e)}var xD=class extends vD{constructor(){super(...arguments),this.type=`html`,this.renderInstance=yD}readValueFromInstance(e,t){if(OC.has(t))return this.projection?.isProjecting?CC(t):TC(e,t);{let n=bD(e),r=(Rx(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return aD(e,t)}build(e,t,n){tE(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return CE(e,t,n)}};const SD=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]);function CD(e,t,n,r){for(let n in yD(e,t,void 0,r),t.attrs)e.setAttribute(SD.has(n)?n:AE(n),t.attrs[n])}var wD=class extends vD{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=uD}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(OC.has(t)){let e=jw(t);return e&&e.default||0}return t=SD.has(t)?t:AE(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return TE(e,t,n)}build(e,t,n){uE(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){CD(e,t,n,r)}mount(e){this.isSVGTag=fE(e.tagName),super.mount(e)}};const TD=(e,t)=>hE(e)?new wD(t):new xD(t,{allowProjection:e!==i});function ED(e,t,n){let r=e.getProps();return vE(r,t,n===void 0?r.custom:n,e)}const DD=e=>Array.isArray(e);function OD(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Hw(n))}function kD(e){return DD(e)?e[e.length-1]||0:e}function AD(e,t){let n=ED(e,t),{transitionEnd:r={},transition:i={},...a}=n||{};for(let t in a={...a,...r},a){let n=kD(a[t]);OD(e,t,n)}}function jD(e){return!!(lT(e)&&e.add)}function MD(e,t){let n=e.getValue(`willChange`);if(jD(n))return n.add(t);if(!n&&qb.WillChange){let n=new qb.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function ND(e){return e.props[jE]}const PD=e=>e!==null;function FD(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(PD),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}const ID={type:`spring`,stiffness:500,damping:25,restSpeed:10},LD=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),RD={type:`keyframes`,duration:.8},zD={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},BD=(e,{keyframes:t})=>t.length>2?RD:OC.has(e)?e.startsWith(`scale`)?LD(t[1]):ID:zD;function VD({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const HD=(e,t,n,r={},i,a)=>o=>{let s=gw(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=rx(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};VD(s)||Object.assign(u,BD(e,u)),u.duration&&=rx(u.duration),u.repeatDelay&&=rx(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(cw(u),u.delay===0&&(d=!0)),(qb.instantAnimations||qb.skipAnimations)&&(d=!0,cw(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=FD(u.keyframes,s);if(e!==void 0){X.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new pC(u):new fw(u)};function UD({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function WD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);let c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||l&&UD(l,t))continue;let o={delay:n,...gw(a||{},t)},u=r.get();if(u!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===u&&!o.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){let n=ND(e);if(n){let e=window.MotionHandoffAnimation(n,t,X);e!==null&&(o.startTime=e,d=!0)}}MD(e,t),r.start(HD(t,r,i,e.shouldReduceMotion&&_w.has(t)?{type:!1}:o,e,d));let f=r.animation;f&&c.push(f)}return o&&Promise.all(c).then(()=>{X.update(()=>{o&&AD(e,o)})}),c}function GD(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r,c=typeof n==`function`;return c?n(a,o):i===1?a*r:s-a*r}function KD(e,t,n={}){let r=ED(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(WD(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return qD(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function qD(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(KD(c,t,{...o,delay:n+(typeof r==`function`?0:r)+GD(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function JD(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>KD(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=KD(e,t,n);else{let i=typeof t==`function`?ED(e,t,n.custom):t;r=Promise.all(WD(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}function YD(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const XD=VT.length;function ZD(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&ZD(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<XD;n++){let r=VT[n],i=e.props[r];(zT(i)||i===!1)&&(t[r]=i)}return t}const QD=[...BT].reverse(),$D=BT.length;function eO(e){return t=>Promise.all(t.map(({animation:t,options:n})=>JD(e,t,n)))}function tO(e){let t=eO(e),n=iO(),r=!0,i=t=>(n,r)=>{let i=ED(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=ZD(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<$D;t++){let f=QD[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=zT(m),g=f===a?p.isActive:null;g===!1&&(d=t);let _=m===s[f]&&m!==o[f]&&h;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),p.protectedKeys={...u},!p.isActive&&g===null||!m&&!p.prevProp||RT(m)||typeof m==`boolean`)continue;let v=nO(p.prevProp,m),y=v||f===a&&p.isActive&&!_&&h||t>d&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},T=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=DD(t)&&DD(n)?!YD(t,n):t!==n,r?t==null?l.add(e):T(e):t!==void 0&&l.has(e)?T(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1);let E=_&&v,D=!E||b;y&&D&&c.push(...x.map(t=>{let n={type:f};if(typeof t==`string`&&r&&!E&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=ED(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=GD(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(l.size){let t={};if(typeof o.initial!=`boolean`){let n=ED(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=o(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=iO()}}}function nO(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!YD(t,e):!1}function rO(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function iO(){return{animate:rO(!0),whileInView:rO(),whileHover:rO(),whileTap:rO(),whileDrag:rO(),whileFocus:rO(),exit:rO()}}var aO=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},oO=class extends aO{constructor(e){super(e),e.animationState||=tO(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();RT(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};let sO=0;var cO=class extends aO{constructor(){super(...arguments),this.id=sO++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}};const lO={animation:{Feature:oO},exit:{Feature:cO}};function uO(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function dO(e){return{point:{x:e.pageX,y:e.pageY}}}const fO=e=>t=>Qw(t)&&e(t,dO(t));function pO(e,t,n,r){return uO(e,t,fO(n),r)}const mO=1e-4;1-mO,1+mO;const hO=.01;0-hO,0+hO;function gO(e){return e.max-e.min}function _O(e,t,n){return Math.abs(e-t)<=n}function vO(e,t,n,r=.5){e.origin=r,e.originPoint=Q(t.min,t.max,e.origin),e.scale=gO(n)/gO(t),e.translate=Q(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function yO(e,t,n,r){vO(e.x,t.x,n.x,r?r.originX:void 0),vO(e.y,t.y,n.y,r?r.originY:void 0)}function bO(e,t,n){e.min=n.min+t.min,e.max=e.min+gO(t)}function xO(e,t,n){bO(e.x,t.x,n.x),bO(e.y,t.y,n.y)}function SO(e,t,n){e.min=t.min-n.min,e.max=e.min+gO(t)}function CO(e,t,n){SO(e.x,t.x,n.x),SO(e.y,t.y,n.y)}function wO(e){return[e(`x`),e(`y`)]}const TO=({current:e})=>e?e.ownerDocument.defaultView:null,EO=(e,t)=>Math.abs(e-t);function DO(e,t){let n=EO(e.x,t.x),r=EO(e.y,t.y);return Math.sqrt(n**2+r**2)}var OO=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=jO(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=DO(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=jx;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=kO(t,this.transformPagePoint),X.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=jO(e.type===`pointercancel`?this.lastMoveEventInfo:kO(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Qw(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let o=dO(e),s=kO(o,this.transformPagePoint),{point:c}=s,{timestamp:l}=jx;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,jO(s,this.history)),this.removeListeners=ex(pO(this.contextWindow,`pointermove`,this.handlePointerMove),pO(this.contextWindow,`pointerup`,this.handlePointerUp),pO(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ax(this.updatePoint)}};function kO(e,t){return t?{point:t(e.point)}:e}function AO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function jO({point:e},t){return{point:e,delta:AO(e,NO(t)),offset:AO(e,MO(t)),velocity:PO(t,.1)}}function MO(e){return e[0]}function NO(e){return e[e.length-1]}function PO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=NO(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>rx(t)));)n--;if(!r)return{x:0,y:0};let a=ix(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function FO(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Q(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Q(n,e,r.max):Math.min(e,n)),e}function IO(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function LO(e,{top:t,left:n,bottom:r,right:i}){return{x:IO(e.x,n,i),y:IO(e.y,t,r)}}function RO(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function zO(e,t){return{x:RO(e.x,t.x),y:RO(e.y,t.y)}}function BO(e,t){let n=.5,r=gO(e),i=gO(t);return i>r?n=tx(t.min,t.max-r,e.min):r>i&&(n=tx(e.min,e.max-i,t.min)),Kb(0,1,n)}function VO(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const HO=.35;function UO(e=HO){return e===!1?e=0:e===!0&&(e=HO),{x:WO(e,`left`,`right`),y:WO(e,`top`,`bottom`)}}function WO(e,t,n){return{min:GO(e,t),max:GO(e,n)}}function GO(e,t){return typeof e==`number`?e:e[t]||0}const KO=new WeakMap;var qO=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=uD(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(dO(e).point)},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=qw(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),wO(e=>{let t=this.getAxisMotionValue(e).get()||0;if(iS.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];if(r){let e=gO(r);t=e*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&X.postRender(()=>i(e,t)),MD(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=YO(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>wO(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:l}=this.getProps();this.panSession=new OO(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:TO(this.visualElement)})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&X.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!JO(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=FO(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&OE(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=LO(n.layoutBox,e):this.constraints=!1,this.elastic=UO(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&wO(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=VO(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!OE(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=oD(n,r.root,this.visualElement.getTransformPagePoint()),a=zO(r.layout.layoutBox,i);if(t){let e=t(HE(a));this.hasMutatedConstraints=!!e,e&&(a=VE(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=wO(o=>{if(!JO(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return MD(this.visualElement,e),n.start(HD(e,n,0,t,this.visualElement,!1))}stopAnimation(){wO(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){wO(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){wO(t=>{let{drag:n}=this.getProps();if(!JO(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-Q(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!OE(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};wO(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=BO({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),wO(t=>{if(!JO(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(Q(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;KO.set(this.visualElement,this);let e=this.visualElement.current,t=pO(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();OE(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),X.read(n);let a=uO(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(wO(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{a(),t(),i(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=HO,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function JO(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function YO(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var XO=class extends aO{constructor(e){super(e),this.removeGroupControls=Qb,this.removeListeners=Qb,this.controls=new qO(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qb}unmount(){this.removeGroupControls(),this.removeListeners()}};const ZO=e=>(t,n)=>{e&&X.postRender(()=>e(t,n))};var QO=class extends aO{constructor(){super(...arguments),this.removePointerDownListener=Qb}onPointerDown(e){this.session=new OO(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:TO(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:ZO(e),onStart:ZO(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&X.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=pO(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};const $O={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let ek=!1;var tk=class extends r{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),ek&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),$O.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,ek=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||X.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Uw.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;ek=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function nk(e){let[t,n]=bT(),r=u(zb);return y(tk,{...e,layoutGroup:r,switchLayoutGroup:u(ME),isPresent:t,safeToRemove:n})}function rk(e,t,n){let r=lT(e)?e:Hw(e);return r.start(HD(``,r,t,n)),r.animation}const ik=(e,t)=>e.depth-t.depth;var ak=class{constructor(){this.children=[],this.isDirty=!1}add(e){Wb(this.children,e),this.isDirty=!0}remove(e){Gb(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ik),this.isDirty=!1,this.children.forEach(e)}};function ok(e,t){let n=Fx.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(Ax(r),e(a-t))};return X.setup(r,!0),()=>Ax(r)}const sk=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],ck=sk.length,lk=e=>typeof e==`string`?parseFloat(e):e,uk=e=>typeof e==`number`||Z.test(e);function dk(e,t,n,r,i,a){i?(e.opacity=Q(0,n.opacity??1,pk(r)),e.opacityExit=Q(t.opacity??1,0,mk(r))):a&&(e.opacity=Q(t.opacity??1,n.opacity??1,r));for(let i=0;i<ck;i++){let a=`border${sk[i]}Radius`,o=fk(t,a),s=fk(n,a);if(o===void 0&&s===void 0)continue;o||=0,s||=0;let c=o===0||s===0||uk(o)===uk(s);c?(e[a]=Math.max(Q(lk(o),lk(s),r),0),(iS.test(s)||iS.test(o))&&(e[a]+=`%`)):e[a]=s}(t.rotate||n.rotate)&&(e.rotate=Q(t.rotate||0,n.rotate||0,r))}function fk(e,t){return e[t]===void 0?e.borderRadius:e[t]}const pk=hk(0,.5,gx),mk=hk(.5,.95,Qb);function hk(e,t,n){return r=>r<e?0:r>t?1:n(tx(e,t,r))}function gk(e,t){e.min=t.min,e.max=t.max}function _k(e,t){gk(e.x,t.x),gk(e.y,t.y)}function vk(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function yk(e,t,n,r,i){return e-=t,e=YE(e,1/n,r),i!==void 0&&(e=YE(e,1/i,r)),e}function bk(e,t=0,n=1,r=.5,i,a=e,o=e){if(iS.test(t)){t=parseFloat(t);let e=Q(o.min,o.max,t/100);t=e-o.min}if(typeof t!=`number`)return;let s=Q(a.min,a.max,r);e===a&&(s-=t),e.min=yk(e.min,t,n,s,i),e.max=yk(e.max,t,n,s,i)}function xk(e,t,[n,r,i],a,o){bk(e,t[n],t[r],t[i],t.scale,a,o)}const Sk=[`x`,`scaleX`,`originX`],Ck=[`y`,`scaleY`,`originY`];function wk(e,t,n,r){xk(e.x,t,Sk,n?n.x:void 0,r?r.x:void 0),xk(e.y,t,Ck,n?n.y:void 0,r?r.y:void 0)}function Tk(e){return e.translate===0&&e.scale===1}function Ek(e){return Tk(e.x)&&Tk(e.y)}function Dk(e,t){return e.min===t.min&&e.max===t.max}function Ok(e,t){return Dk(e.x,t.x)&&Dk(e.y,t.y)}function kk(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ak(e,t){return kk(e.x,t.x)&&kk(e.y,t.y)}function jk(e){return gO(e.x)/gO(e.y)}function Mk(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Nk=class{constructor(){this.members=[]}add(e){Wb(this.members,e),e.scheduleRender()}remove(e){if(Gb(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function Pk(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}const Fk={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Ik=[``,`X`,`Y`,`Z`];let Lk=0;function Rk(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function zk(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=ND(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,X,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&zk(r)}function Bk({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Lk++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Dx.value&&(Fk.nodes=Fk.calculatedTargetDeltas=Fk.calculatedProjections=0),this.nodes.forEach(Uk),this.nodes.forEach(Xk),this.nodes.forEach(Zk),this.nodes.forEach(Wk),Dx.addProjectionMetrics&&Dx.addProjectionMetrics(Fk)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new ak)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new nx),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=sT(t)&&!cT(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;X.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=ok(i,250),$O.hasAnimatedSinceResize&&($O.hasAnimatedSinceResize=!1,this.nodes.forEach(Yk)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||iA,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Ak(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...gw(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||Yk(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ax(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Qk),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&zk(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){this.updateScheduled=!1;let e=this.isUpdateBlocked();if(e){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Kk);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(qk);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Jk),this.nodes.forEach(Vk),this.nodes.forEach(Hk)):this.nodes.forEach(qk),this.clearAllSnapshots();let t=Fx.now();jx.delta=Kb(0,1e3/60,t-jx.timestamp),jx.timestamp=t,jx.isProcessing=!0,Mx.update.process(jx),Mx.preRender.process(jx),Mx.render.process(jx),jx.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Uw.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Gk),this.sharedNodes.forEach($k)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,X.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){X.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!gO(this.snapshot.measuredBox.x)&&!gO(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){let t=this.path[e];t.updateScroll()}let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=uD(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Ek(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||KE(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),cA(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return uD();let t=e.measureViewportBox(),n=this.scroll?.wasRoot||this.path.some(uA);if(!n){let{scroll:e}=this.root;e&&(nD(t.x,e.offset.x),nD(t.y,e.offset.y))}return t}removeElementScroll(e){let t=uD();if(_k(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&_k(t,e),nD(t.x,i.offset.x),nD(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=uD();_k(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&iD(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),KE(r.latestValues)&&iD(n,r.latestValues)}return KE(this.latestValues)&&iD(n,this.latestValues),n}removeTransform(e){let t=uD();_k(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!KE(n.latestValues))continue;GE(n.latestValues)&&n.updateSnapshot();let r=uD(),i=n.measurePageBox();_k(r,i),wk(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return KE(this.latestValues)&&wk(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==jx.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t,r=!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize);if(r)return;let{layout:i,layoutId:a}=this.options;if(!this.layout||!(i||a))return;this.resolvedRelativeTargetAt=jx.timestamp;let o=this.getClosestProjectingParent();o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=uD(),this.targetWithTransforms=uD()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),xO(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):_k(this.target,this.layout.layoutBox),QE(this.target,this.targetDelta)):_k(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,o&&!!o.resumingFrom==!!this.resumingFrom&&!o.options.layoutScroll&&o.target&&this.animationProgress!==1?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),Dx.value&&Fk.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||GE(this.parent.latestValues)||qE(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=uD(),this.relativeTargetOrigin=uD(),CO(this.relativeTargetOrigin,t,n),_k(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===jx.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;_k(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;tD(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=uD());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(vk(this.prevProjectionDelta.x,this.projectionDelta.x),vk(this.prevProjectionDelta.y,this.projectionDelta.y)),yO(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Mk(this.projectionDelta.x,this.prevProjectionDelta.x)||!Mk(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Dx.value&&Fk.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=cD(),this.projectionDelta=cD(),this.projectionDeltaWithTransform=cD()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=cD();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=uD(),s=n?n.source:void 0,c=this.layout?this.layout.source:void 0,l=s!==c,u=this.getStack(),d=!u||u.members.length<=1,f=!!(l&&!d&&this.options.crossfade===!0&&!this.path.some(rA));this.animationProgress=0;let p;this.mixTargetDelta=t=>{let n=t/1e3;eA(a.x,e.x,n),eA(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(CO(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),nA(this.relativeTarget,this.relativeTargetOrigin,o,n),p&&Ok(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||=uD(),_k(p,this.relativeTarget)),l&&(this.animationValues=i,dk(i,r,this.latestValues,n,f,d)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(Ax(this.pendingAnimation),void 0),this.pendingAnimation=X.update(()=>{$O.hasAnimatedSinceResize=!0,Ix.layout++,this.motionValue||=Hw(0),this.currentAnimation=rk(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Ix.layout--},onComplete:()=>{Ix.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&lA(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||uD();let t=gO(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=gO(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}_k(t,n),iD(t,i),yO(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Nk);let n=this.sharedNodes.get(e);n.add(t);let r=t.options.initialPromotionConfig;t.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Rk(`z`,e,r,this.animationValues);for(let t=0;t<Ik.length;t++)Rk(`rotate${Ik[t]}`,e,r,this.animationValues),Rk(`skew${Ik[t]}`,e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=yE(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=yE(t?.pointerEvents)||``),this.hasProjected&&!KE(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Pk(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;for(let t in e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit,XT){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=XT[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?yE(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Kk),this.root.sharedNodes.clear()}}}function Vk(e){e.updateLayout()}function Hk(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?wO(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=gO(r);r.min=n[e].min,r.max=r.min+i}):lA(i,t.layoutBox,n)&&wO(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=gO(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=cD();yO(o,n,t.layoutBox);let s=cD();a?yO(s,e.applyTransform(r,!0),t.measuredBox):yO(s,n,t.layoutBox);let c=!Ek(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=uD();CO(o,t.layoutBox,i.layoutBox);let s=uD();CO(s,n,a.layoutBox),Ak(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Uk(e){Dx.value&&Fk.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Wk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Gk(e){e.clearSnapshot()}function Kk(e){e.clearMeasurements()}function qk(e){e.isLayoutDirty=!1}function Jk(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Yk(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Xk(e){e.resolveTargetDelta()}function Zk(e){e.calcProjection()}function Qk(e){e.resetSkewAndRotation()}function $k(e){e.removeLeadSnapshot()}function eA(e,t,n){e.translate=Q(t.translate,0,n),e.scale=Q(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function tA(e,t,n,r){e.min=Q(t.min,n.min,r),e.max=Q(t.max,n.max,r)}function nA(e,t,n,r){tA(e.x,t.x,n.x,r),tA(e.y,t.y,n.y,r)}function rA(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const iA={duration:.45,ease:[.4,0,.1,1]},aA=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),oA=aA(`applewebkit/`)&&!aA(`chrome/`)?Math.round:Qb;function sA(e){e.min=oA(e.min),e.max=oA(e.max)}function cA(e){sA(e.x),sA(e.y)}function lA(e,t,n){return e===`position`||e===`preserve-aspect`&&!_O(jk(t),jk(n),.2)}function uA(e){return e!==e.root&&e.scroll?.wasRoot}const dA=Bk({attachResizeListener:(e,t)=>uO(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),fA={current:void 0},pA=Bk({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fA.current){let e=new dA({});e.mount(window),e.setOptions({layoutScroll:!0}),fA.current=e}return fA.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),mA={pan:{Feature:QO},drag:{Feature:XO,ProjectionNode:pA,MeasureLayout:nk}};function hA(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=`onHover`+n,a=r[i];a&&X.postRender(()=>a(t,dO(t)))}var gA=class extends aO{mount(){let{current:e}=this.node;e&&(this.unmount=Xw(e,(e,t)=>(hA(this.node,t,`Start`),e=>hA(this.node,e,`End`))))}unmount(){}},_A=class extends aO{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=ex(uO(this.node.current,`focus`,()=>this.onFocus()),uO(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function vA(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=`onTap`+(n===`End`?``:n),a=r[i];a&&X.postRender(()=>a(t,dO(t)))}var yA=class extends aO{mount(){let{current:e}=this.node;e&&(this.unmount=oT(e,(e,t)=>(vA(this.node,t,`Start`),(e,{success:t})=>vA(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};const bA=new WeakMap,xA=new WeakMap,SA=e=>{let t=bA.get(e.target);t&&t(e)},CA=e=>{e.forEach(SA)};function wA({root:e,...t}){let n=e||document;xA.has(n)||xA.set(n,{});let r=xA.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(CA,{root:e,...t})),r[i]}function TA(e,t,n){let r=wA(t);return bA.set(e,n),r.observe(e),()=>{bA.delete(e),r.unobserve(e)}}const EA={some:0,all:1};var DA=class extends aO{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:EA[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};return TA(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node,n=[`amount`,`margin`,`root`].some(OA(e,t));n&&this.startObserver()}unmount(){}};function OA({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const kA={inView:{Feature:DA},tap:{Feature:yA},focus:{Feature:_A},hover:{Feature:gA}},AA={layout:{ProjectionNode:pA,MeasureLayout:nk}},jA={...lO,...kA,...mA,...AA},MA=BE(jA,TD),NA=({isVisible:e,children:t})=>{let n=g(null),[r,i]=_(0);return d(()=>{n.current&&setTimeout(()=>{i((n.current?.scrollHeight??0)+5)},0)},[t]),y(CT,{initial:!1,children:e&&y(MA.div,{initial:{height:0,opacity:0},animate:{height:r,opacity:1},exit:{height:0,opacity:0},transition:{type:`spring`,damping:20,stiffness:100},children:y(`div`,{ref:n,children:t})})})};var PA=NA;function FA(e,[t,n]){return Math.min(n,Math.max(t,e))}function IA(t){let n=e.useRef({value:t,previous:t});return e.useMemo(()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous),[t])}var LA=[`PageUp`,`PageDown`],RA=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],zA={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},BA=`Slider`,[VA,HA,UA]=Kh(BA),[WA,GA]=de(BA,[UA]),[KA,qA]=WA(BA),JA=e.forwardRef((t,n)=>{let{name:r,min:i=0,max:a=100,step:o=1,orientation:s=`horizontal`,disabled:c=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[i],value:d,onValueChange:f=()=>{},onValueCommit:p=()=>{},inverted:m=!1,form:h,...g}=t,_=e.useRef(new Set),v=e.useRef(0),b=s===`horizontal`,x=b?ZA:QA,[S=[],C]=ii({prop:d,defaultProp:u,onChange:e=>{let t=[..._.current];t[v.current]?.focus(),f(e)}}),w=e.useRef(S);function T(e){let t=fj(S,e);O(e,t)}function E(e){O(e,v.current)}function D(){let e=w.current[v.current],t=S[v.current],n=t!==e;n&&p(S)}function O(e,t,{commit:n}={commit:!1}){let r=_j(o),s=vj(Math.round((e-i)/o)*o+i,r),c=FA(s,[i,a]);C((e=[])=>{let r=lj(e,c,t);if(hj(r,l*o)){v.current=r.indexOf(c);let t=String(r)!==String(e);return t&&n&&p(r),t?r:e}else return e})}return y(KA,{scope:t.__scopeSlider,name:r,disabled:c,min:i,max:a,valueIndexToChangeRef:v,thumbs:_.current,values:S,orientation:s,form:h,children:y(VA.Provider,{scope:t.__scopeSlider,children:y(VA.Slot,{scope:t.__scopeSlider,children:y(x,{"aria-disabled":c,"data-disabled":c?``:void 0,...g,ref:n,onPointerDown:V(g.onPointerDown,()=>{c||(w.current=S)}),min:i,max:a,inverted:m,onSlideStart:c?void 0:T,onSlideMove:c?void 0:E,onSlideEnd:c?void 0:D,onHomeKeyDown:()=>!c&&O(i,0,{commit:!0}),onEndKeyDown:()=>!c&&O(a,S.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){let n=LA.includes(e.key),r=n||e.shiftKey&&RA.includes(e.key),i=r?10:1,a=v.current,s=S[a],c=o*i*t;O(s+c,a,{commit:!0})}}})})})})});JA.displayName=BA;var[YA,XA]=WA(BA,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),ZA=e.forwardRef((t,n)=>{let{min:r,max:i,dir:a,inverted:o,onSlideStart:s,onSlideMove:c,onSlideEnd:l,onStepKeyDown:u,...d}=t,[f,p]=e.useState(null),m=H(n,e=>p(e)),h=e.useRef(void 0),g=Jh(a),_=g===`ltr`,v=_&&!o||!_&&o;function b(e){let t=h.current||f.getBoundingClientRect(),n=[0,t.width],a=v?[r,i]:[i,r],o=gj(n,a);return h.current=t,o(e-t.left)}return y(YA,{scope:t.__scopeSlider,startEdge:v?`left`:`right`,endEdge:v?`right`:`left`,direction:v?1:-1,size:`width`,children:y($A,{dir:g,"data-orientation":`horizontal`,...d,ref:m,style:{...d.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=b(e.clientX);s?.(t)},onSlideMove:e=>{let t=b(e.clientX);c?.(t)},onSlideEnd:()=>{h.current=void 0,l?.()},onStepKeyDown:e=>{let t=v?`from-left`:`from-right`,n=zA[t].includes(e.key);u?.({event:e,direction:n?-1:1})}})})}),QA=e.forwardRef((t,n)=>{let{min:r,max:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=t,d=e.useRef(null),f=H(n,d),p=e.useRef(void 0),m=!a;function h(e){let t=p.current||d.current.getBoundingClientRect(),n=[0,t.height],a=m?[i,r]:[r,i],o=gj(n,a);return p.current=t,o(e-t.top)}return y(YA,{scope:t.__scopeSlider,startEdge:m?`bottom`:`top`,endEdge:m?`top`:`bottom`,size:`height`,direction:m?1:-1,children:y($A,{"data-orientation":`vertical`,...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=h(e.clientY);o?.(t)},onSlideMove:e=>{let t=h(e.clientY);s?.(t)},onSlideEnd:()=>{p.current=void 0,c?.()},onStepKeyDown:e=>{let t=m?`from-bottom`:`from-top`,n=zA[t].includes(e.key);l?.({event:e,direction:n?-1:1})}})})}),$A=e.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=qA(BA,n);return y(U.span,{...l,ref:t,onKeyDown:V(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):LA.concat(RA).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:V(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:V(e.onPointerMove,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:V(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),ej=`SliderTrack`,tj=e.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=qA(ej,n);return y(U.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});tj.displayName=ej;var nj=`SliderRange`,rj=e.forwardRef((t,n)=>{let{__scopeSlider:r,...i}=t,a=qA(nj,r),o=XA(nj,r),s=e.useRef(null),c=H(n,s),l=a.values.length,u=a.values.map(e=>uj(e,a.min,a.max)),d=l>1?Math.min(...u):0,f=100-Math.max(...u);return y(U.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?``:void 0,...i,ref:c,style:{...t.style,[o.startEdge]:d+`%`,[o.endEdge]:f+`%`}})});rj.displayName=nj;var ij=`SliderThumb`,aj=e.forwardRef((t,n)=>{let r=HA(t.__scopeSlider),[i,a]=e.useState(null),o=H(n,e=>a(e)),s=e.useMemo(()=>i?r().findIndex(e=>e.ref.current===i):-1,[r,i]);return y(oj,{...t,ref:o,index:s})}),oj=e.forwardRef((t,n)=>{let{__scopeSlider:r,index:i,name:a,...o}=t,s=qA(ij,r),c=XA(ij,r),[l,u]=e.useState(null),d=H(n,e=>u(e)),f=l?s.form||!!l.closest(`form`):!0,p=Dr(l),m=s.values[i],h=m===void 0?0:uj(m,s.min,s.max),g=dj(i,s.values.length),_=p?.[c.size],v=_?pj(_,h,c.direction):0;return e.useEffect(()=>{if(l)return s.thumbs.add(l),()=>{s.thumbs.delete(l)}},[l,s.thumbs]),b(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[c.startEdge]:`calc(${h}% + ${v}px)`},children:[y(VA.ItemSlot,{scope:t.__scopeSlider,children:y(U.span,{role:`slider`,"aria-label":t[`aria-label`]||g,"aria-valuemin":s.min,"aria-valuenow":m,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?``:void 0,tabIndex:s.disabled?void 0:0,...o,ref:d,style:m===void 0?{display:`none`}:t.style,onFocus:V(t.onFocus,()=>{s.valueIndexToChangeRef.current=i})})}),f&&y(cj,{name:a??(s.name?s.name+(s.values.length>1?`[]`:``):void 0),form:s.form,value:m},i)]})});aj.displayName=ij;var sj=`RadioBubbleInput`,cj=e.forwardRef(({__scopeSlider:t,value:n,...r},i)=>{let a=e.useRef(null),o=H(a,i),s=IA(n);return e.useEffect(()=>{let e=a.current;if(!e)return;let t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,`value`),i=r.set;if(s!==n&&i){let t=new Event(`input`,{bubbles:!0});i.call(e,n),e.dispatchEvent(t)}},[s,n]),y(U.input,{style:{display:`none`},...r,ref:o,defaultValue:n})});cj.displayName=sj;function lj(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function uj(e,t,n){let r=n-t,i=100/r,a=i*(e-t);return FA(a,[0,100])}function dj(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function fj(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function pj(e,t,n){let r=e/2,i=gj([0,50],[0,r]);return(r-i(t)*n)*n}function mj(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function hj(e,t){if(t>0){let n=mj(e),r=Math.min(...n);return r>=t}return!0}function gj(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function _j(e){return(String(e).split(`.`)[1]||``).length}function vj(e,t){let n=10**t;return Math.round(e*n)/n}var yj=JA,bj=tj,xj=rj,Sj=aj;const Cj=e=>{let{onValueChange:t,onPointerUp:n,id:r,value:i,name:a,disabled:o=!1,rootExtraClassNames:s=``,trackExtraClassNames:c=``,rangeExtraClassNames:l=``,thumbExtraClassNames:u=``,step:d,min:f,max:p}=e;return b(yj,{className:`tw:relative tw:flex tw:h-5 tw:w-full tw:touch-none tw:select-none tw:items-center ${s}`,defaultValue:[i],value:[i],onValueChange:e=>t&&t(e),onPointerUp:e=>n&&n(e),name:a,id:r,max:p,min:f,disabled:o,step:d,children:[y(bj,{className:`tw:relative tw:h-sq-5 tw:grow tw:rounded-sm tw:bg-sq-dark-gray tw:dark:bg-sq-dark-disabled-gray ${c}`,children:y(xj,{className:`tw:absolute tw:h-full tw:rounded-full ${l}`})}),y(Sj,{className:`tw:block tw:h-sq-15 tw:w-sq-15 tw:rounded-full tw:bg-sq-theme-dark tw:active:bg-sq-theme-darker tw:focus:outline-none tw:focus-visible:outline-none tw:aria-disabled:bg-sq-dark-gray tw:dark:aria-disabled:bg-sq-dark-disabled-gray tw:transition tw:ease-in-out ${u}`,"aria-disabled":o})]})};function wj(t,n=[]){let r=[];function i(n,i){let a=e.createContext(i);a.displayName=n+`Context`;let o=r.length;r=[...r,i];let s=n=>{let{scope:r,children:i,...s}=n,c=r?.[t]?.[o]||a,l=e.useMemo(()=>s,Object.values(s));return y(c.Provider,{value:l,children:i})};s.displayName=n+`Provider`;function c(r,s){let c=s?.[t]?.[o]||a,l=e.useContext(c);if(l)return l;if(i!==void 0)return i;throw Error(`\`${r}\` must be used within \`${n}\``)}return[s,c]}let a=()=>{let n=r.map(t=>e.createContext(t));return function(r){let i=r?.[t]||n;return e.useMemo(()=>({[`__scope${t}`]:{...r,[t]:i}}),[r,i])}};return a.scopeName=t,[i,Tj(a,...n)]}function Tj(...t){let n=t[0];if(t.length===1)return n;let r=()=>{let r=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){let i=r.reduce((e,{useScope:n,scopeName:r})=>{let i=n(t),a=i[`__scope${r}`];return{...e,...a}},{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:i}),[i])}};return r.scopeName=n.scopeName,r}var Ej=Symbol.for(`react.lazy`),Dj=e.use;function Oj(e){return typeof e==`object`&&!!e&&`then`in e}function kj(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Ej&&`_payload`in e&&Oj(e._payload)}function Aj(t){let n=jj(t),r=e.forwardRef((t,r)=>{let{children:i,...a}=t;kj(i)&&typeof Dj==`function`&&(i=Dj(i._payload));let o=e.Children.toArray(i),s=o.find(Nj);if(s){let t=s.props.children,i=o.map(n=>n===s?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return y(n,{...a,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,i):null})}return y(n,{...a,ref:r,children:i})});return r.displayName=`${t}.Slot`,r}function jj(t){let n=e.forwardRef((t,n)=>{let{children:r,...i}=t;if(kj(r)&&typeof Dj==`function`&&(r=Dj(r._payload)),e.isValidElement(r)){let t=Fj(r),a=Pj(i,r.props);return r.type!==e.Fragment&&(a.ref=n?le(n,t):t),e.cloneElement(r,a)}return e.Children.count(r)>1?e.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var Mj=Symbol(`radix.slottable`);function Nj(t){return e.isValidElement(t)&&typeof t.type==`function`&&`__radixId`in t.type&&t.type.__radixId===Mj}function Pj(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r],o=/^on[A-Z]/.test(r);o?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Fj(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ij=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`],Lj=Ij.reduce((t,n)=>{let r=Aj(`Primitive.${n}`),i=e.forwardRef((e,t)=>{let{asChild:i,...a}=e,o=i?r:n;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),y(o,{...a,ref:t})});return i.displayName=`Primitive.${n}`,{...t,[n]:i}},{}),Rj=`Progress`,zj=100,[Bj,Vj]=wj(Rj),[Hj,Uj]=Bj(Rj),Wj=e.forwardRef((e,t)=>{let{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=qj,...o}=e;(i||i===0)&&!Xj(i)&&console.error(Qj(`${i}`,`Progress`));let s=Xj(i)?i:zj;r!==null&&!Zj(r,s)&&console.error($j(`${r}`,`Progress`));let c=Zj(r,s)?r:null,l=Yj(c)?a(c,s):void 0;return y(Hj,{scope:n,value:c,max:s,children:y(Lj.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Yj(c)?c:void 0,"aria-valuetext":l,role:`progressbar`,"data-state":Jj(c,s),"data-value":c??void 0,"data-max":s,...o,ref:t})})});Wj.displayName=Rj;var Gj=`ProgressIndicator`,Kj=e.forwardRef((e,t)=>{let{__scopeProgress:n,...r}=e,i=Uj(Gj,n);return y(Lj.div,{"data-state":Jj(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});Kj.displayName=Gj;function qj(e,t){return`${Math.round(e/t*100)}%`}function Jj(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}function Yj(e){return typeof e==`number`}function Xj(e){return Yj(e)&&!isNaN(e)&&e>0}function Zj(e,t){return Yj(e)&&!isNaN(e)&&e<=t&&e>=0}function Qj(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${zj}\`.`}function $j(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
79
79
  - a positive number
80
- - less than the value passed to \`max\` (or ${Ij} if no \`max\` prop is set)
80
+ - less than the value passed to \`max\` (or ${zj} if no \`max\` prop is set)
81
81
  - \`null\` or \`undefined\` if the progress is indeterminate.
82
82
 
83
- Defaulting to \`null\`.`}var Zj=Vj,Qj=Uj,$j=j(((exports,t)=>{(function(e){var n=/^\s+/,r=/\s+$/,i=0,a=e.round,o=e.min,s=e.max,c=e.random;function l(e,t){if(e||=``,t||={},e instanceof l)return e;if(!(this instanceof l))return new l(e,t);var n=u(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=a(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=n.ok,this._tc_id=i++}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,i,a,o,s;return n=t.r/255,r=t.g/255,i=t.b/255,a=n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4),o=r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4),s=i<=.03928?i/12.92:e.pow((i+.055)/1.055,2.4),.2126*a+.7152*o+.0722*s},setAlpha:function(e){return this._a=P(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=m(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=m(this._r,this._g,this._b),t=a(e.h*360),n=a(e.s*100),r=a(e.v*100);return this._a==1?`hsv(`+t+`, `+n+`%, `+r+`%)`:`hsva(`+t+`, `+n+`%, `+r+`%, `+this._roundA+`)`},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=a(e.h*360),n=a(e.s*100),r=a(e.l*100);return this._a==1?`hsl(`+t+`, `+n+`%, `+r+`%)`:`hsla(`+t+`, `+n+`%, `+r+`%, `+this._roundA+`)`},toHex:function(e){return g(this._r,this._g,this._b,e)},toHexString:function(e){return`#`+this.toHex(e)},toHex8:function(e){return _(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return`#`+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return this._a==1?`rgb(`+a(this._r)+`, `+a(this._g)+`, `+a(this._b)+`)`:`rgba(`+a(this._r)+`, `+a(this._g)+`, `+a(this._b)+`, `+this._roundA+`)`},toPercentageRgb:function(){return{r:a(F(this._r,255)*100)+`%`,g:a(F(this._g,255)*100)+`%`,b:a(F(this._b,255)*100)+`%`,a:this._a}},toPercentageRgbString:function(){return this._a==1?`rgb(`+a(F(this._r,255)*100)+`%, `+a(F(this._g,255)*100)+`%, `+a(F(this._b,255)*100)+`%)`:`rgba(`+a(F(this._r,255)*100)+`%, `+a(F(this._g,255)*100)+`%, `+a(F(this._b,255)*100)+`%, `+this._roundA+`)`},toName:function(){return this._a===0?`transparent`:this._a<1?!1:ee[g(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t=`#`+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?`GradientType = 1, `:``;if(e){var i=l(e);n=`#`+v(i._r,i._g,i._b,i._a)}return`progid:DXImageTransform.Microsoft.gradient(`+r+`startColorstr=`+t+`,endColorstr=`+n+`)`},toString:function(e){var t=!!e;e||=this._format;var n=!1,r=this._a<1&&this._a>=0,i=!t&&r&&(e===`hex`||e===`hex6`||e===`hex3`||e===`hex4`||e===`hex8`||e===`name`);return i?e===`name`&&this._a===0?this.toName():this.toRgbString():(e===`rgb`&&(n=this.toRgbString()),e===`prgb`&&(n=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(n=this.toHexString()),e===`hex3`&&(n=this.toHexString(!0)),e===`hex4`&&(n=this.toHex8String(!0)),e===`hex8`&&(n=this.toHex8String()),e===`name`&&(n=this.toName()),e===`hsl`&&(n=this.toHslString()),e===`hsv`&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(S,arguments)},brighten:function(){return this._applyModification(C,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(y,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(j,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(D,arguments)},tetrad:function(){return this._applyCombination(O,arguments)}},l.fromRatio=function(e,t){if(typeof e==`object`){var n={};for(var r in e)e.hasOwnProperty(r)&&(r===`a`?n[r]=e[r]:n[r]=ne(e[r]));e=n}return l(e,t)};function u(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,c=!1,l=!1;return typeof e==`string`&&(e=oe(e)),typeof e==`object`&&(B(e.r)&&B(e.g)&&B(e.b)?(t=d(e.r,e.g,e.b),c=!0,l=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):B(e.h)&&B(e.s)&&B(e.v)?(r=ne(e.s),i=ne(e.v),t=h(e.h,r,i),c=!0,l=`hsv`):B(e.h)&&B(e.s)&&B(e.l)&&(r=ne(e.s),a=ne(e.l),t=p(e.h,r,a),c=!0,l=`hsl`),e.hasOwnProperty(`a`)&&(n=e.a)),n=P(n),{ok:c,format:e.format||l,r:o(255,s(t.r,0)),g:o(255,s(t.g,0)),b:o(255,s(t.b,0)),a:n}}function d(e,t,n){return{r:F(e,255)*255,g:F(t,255)*255,b:F(n,255)*255}}function f(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r=s(e,t,n),i=o(e,t,n),a,c,l=(r+i)/2;if(r==i)a=c=0;else{var u=r-i;switch(c=l>.5?u/(2-r-i):u/(r+i),r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:c,l}}function p(e,t,n){var r,i,a;e=F(e,360),t=F(t,100),n=F(n,100);function o(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(t===0)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;r=o(c,s,e+1/3),i=o(c,s,e),a=o(c,s,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function m(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r=s(e,t,n),i=o(e,t,n),a,c,l=r,u=r-i;if(c=r===0?0:u/r,r==i)a=0;else{switch(r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:c,v:l}}function h(t,n,r){t=F(t,360)*6,n=F(n,100),r=F(r,100);var i=e.floor(t),a=t-i,o=r*(1-n),s=r*(1-a*n),c=r*(1-(1-a)*n),l=i%6,u=[r,s,o,o,c,r][l],d=[c,r,r,s,o,o][l],f=[o,o,c,r,r,s][l];return{r:u*255,g:d*255,b:f*255}}function g(e,t,n,r){var i=[z(a(e).toString(16)),z(a(t).toString(16)),z(a(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(``)}function _(e,t,n,r,i){var o=[z(a(e).toString(16)),z(a(t).toString(16)),z(a(n).toString(16)),z(re(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join(``)}function v(e,t,n,r){var i=[z(re(r)),z(a(e).toString(16)),z(a(t).toString(16)),z(a(n).toString(16))];return i.join(``)}l.equals=function(e,t){return!e||!t?!1:l(e).toRgbString()==l(t).toRgbString()},l.random=function(){return l.fromRatio({r:c(),g:c(),b:c()})};function y(e,t){t=t===0?0:t||10;var n=l(e).toHsl();return n.s-=t/100,n.s=I(n.s),l(n)}function b(e,t){t=t===0?0:t||10;var n=l(e).toHsl();return n.s+=t/100,n.s=I(n.s),l(n)}function x(e){return l(e).desaturate(100)}function S(e,t){t=t===0?0:t||10;var n=l(e).toHsl();return n.l+=t/100,n.l=I(n.l),l(n)}function C(e,t){t=t===0?0:t||10;var n=l(e).toRgb();return n.r=s(0,o(255,n.r-a(255*-(t/100)))),n.g=s(0,o(255,n.g-a(255*-(t/100)))),n.b=s(0,o(255,n.b-a(255*-(t/100)))),l(n)}function w(e,t){t=t===0?0:t||10;var n=l(e).toHsl();return n.l-=t/100,n.l=I(n.l),l(n)}function T(e,t){var n=l(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,l(n)}function E(e){var t=l(e).toHsl();return t.h=(t.h+180)%360,l(t)}function D(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+120)%360,s:t.s,l:t.l}),l({h:(n+240)%360,s:t.s,l:t.l})]}function O(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+90)%360,s:t.s,l:t.l}),l({h:(n+180)%360,s:t.s,l:t.l}),l({h:(n+270)%360,s:t.s,l:t.l})]}function k(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+72)%360,s:t.s,l:t.l}),l({h:(n+216)%360,s:t.s,l:t.l})]}function A(e,t,n){t||=6,n||=30;var r=l(e).toHsl(),i=360/n,a=[l(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(l(r));return a}function j(e,t){t||=6;for(var n=l(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(l({h:r,s:i,v:a})),a=(a+s)%1;return o}l.mix=function(e,t,n){n=n===0?0:n||50;var r=l(e).toRgb(),i=l(t).toRgb(),a=n/100,o={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return l(o)},l.readability=function(t,n){var r=l(t),i=l(n);return(e.max(r.getLuminance(),i.getLuminance())+.05)/(e.min(r.getLuminance(),i.getLuminance())+.05)},l.isReadable=function(e,t,n){var r=l.readability(e,t),i,a;switch(a=!1,i=se(n),i.level+i.size){case`AAsmall`:case`AAAlarge`:a=r>=4.5;break;case`AAlarge`:a=r>=3;break;case`AAAsmall`:a=r>=7;break}return a},l.mostReadable=function(e,t,n){var r=null,i=0,a,o,s,c;n||={},o=n.includeFallbackColors,s=n.level,c=n.size;for(var u=0;u<t.length;u++)a=l.readability(e,t[u]),a>i&&(i=a,r=l(t[u]));return l.isReadable(e,r,{level:s,size:c})||!o?r:(n.includeFallbackColors=!1,l.mostReadable(e,[`#fff`,`#000`],n))};var M=l.names={aliceblue:`f0f8ff`,antiquewhite:`faebd7`,aqua:`0ff`,aquamarine:`7fffd4`,azure:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`000`,blanchedalmond:`ffebcd`,blue:`00f`,blueviolet:`8a2be2`,brown:`a52a2a`,burlywood:`deb887`,burntsienna:`ea7e5d`,cadetblue:`5f9ea0`,chartreuse:`7fff00`,chocolate:`d2691e`,coral:`ff7f50`,cornflowerblue:`6495ed`,cornsilk:`fff8dc`,crimson:`dc143c`,cyan:`0ff`,darkblue:`00008b`,darkcyan:`008b8b`,darkgoldenrod:`b8860b`,darkgray:`a9a9a9`,darkgreen:`006400`,darkgrey:`a9a9a9`,darkkhaki:`bdb76b`,darkmagenta:`8b008b`,darkolivegreen:`556b2f`,darkorange:`ff8c00`,darkorchid:`9932cc`,darkred:`8b0000`,darksalmon:`e9967a`,darkseagreen:`8fbc8f`,darkslateblue:`483d8b`,darkslategray:`2f4f4f`,darkslategrey:`2f4f4f`,darkturquoise:`00ced1`,darkviolet:`9400d3`,deeppink:`ff1493`,deepskyblue:`00bfff`,dimgray:`696969`,dimgrey:`696969`,dodgerblue:`1e90ff`,firebrick:`b22222`,floralwhite:`fffaf0`,forestgreen:`228b22`,fuchsia:`f0f`,gainsboro:`dcdcdc`,ghostwhite:`f8f8ff`,gold:`ffd700`,goldenrod:`daa520`,gray:`808080`,green:`008000`,greenyellow:`adff2f`,grey:`808080`,honeydew:`f0fff0`,hotpink:`ff69b4`,indianred:`cd5c5c`,indigo:`4b0082`,ivory:`fffff0`,khaki:`f0e68c`,lavender:`e6e6fa`,lavenderblush:`fff0f5`,lawngreen:`7cfc00`,lemonchiffon:`fffacd`,lightblue:`add8e6`,lightcoral:`f08080`,lightcyan:`e0ffff`,lightgoldenrodyellow:`fafad2`,lightgray:`d3d3d3`,lightgreen:`90ee90`,lightgrey:`d3d3d3`,lightpink:`ffb6c1`,lightsalmon:`ffa07a`,lightseagreen:`20b2aa`,lightskyblue:`87cefa`,lightslategray:`789`,lightslategrey:`789`,lightsteelblue:`b0c4de`,lightyellow:`ffffe0`,lime:`0f0`,limegreen:`32cd32`,linen:`faf0e6`,magenta:`f0f`,maroon:`800000`,mediumaquamarine:`66cdaa`,mediumblue:`0000cd`,mediumorchid:`ba55d3`,mediumpurple:`9370db`,mediumseagreen:`3cb371`,mediumslateblue:`7b68ee`,mediumspringgreen:`00fa9a`,mediumturquoise:`48d1cc`,mediumvioletred:`c71585`,midnightblue:`191970`,mintcream:`f5fffa`,mistyrose:`ffe4e1`,moccasin:`ffe4b5`,navajowhite:`ffdead`,navy:`000080`,oldlace:`fdf5e6`,olive:`808000`,olivedrab:`6b8e23`,orange:`ffa500`,orangered:`ff4500`,orchid:`da70d6`,palegoldenrod:`eee8aa`,palegreen:`98fb98`,paleturquoise:`afeeee`,palevioletred:`db7093`,papayawhip:`ffefd5`,peachpuff:`ffdab9`,peru:`cd853f`,pink:`ffc0cb`,plum:`dda0dd`,powderblue:`b0e0e6`,purple:`800080`,rebeccapurple:`663399`,red:`f00`,rosybrown:`bc8f8f`,royalblue:`4169e1`,saddlebrown:`8b4513`,salmon:`fa8072`,sandybrown:`f4a460`,seagreen:`2e8b57`,seashell:`fff5ee`,sienna:`a0522d`,silver:`c0c0c0`,skyblue:`87ceeb`,slateblue:`6a5acd`,slategray:`708090`,slategrey:`708090`,snow:`fffafa`,springgreen:`00ff7f`,steelblue:`4682b4`,tan:`d2b48c`,teal:`008080`,thistle:`d8bfd8`,tomato:`ff6347`,turquoise:`40e0d0`,violet:`ee82ee`,wheat:`f5deb3`,white:`fff`,whitesmoke:`f5f5f5`,yellow:`ff0`,yellowgreen:`9acd32`},ee=l.hexNames=N(M);function N(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function P(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F(t,n){R(t)&&(t=`100%`);var r=te(t);return t=o(n,s(0,parseFloat(t))),r&&(t=parseInt(t*n,10)/100),e.abs(t-n)<1e-6?1:t%n/parseFloat(n)}function I(e){return o(1,s(0,e))}function L(e){return parseInt(e,16)}function R(e){return typeof e==`string`&&e.indexOf(`.`)!=-1&&parseFloat(e)===1}function te(e){return typeof e==`string`&&e.indexOf(`%`)!=-1}function z(e){return e.length==1?`0`+e:``+e}function ne(e){return e<=1&&(e=e*100+`%`),e}function re(t){return e.round(parseFloat(t)*255).toString(16)}function ie(e){return L(e)/255}var ae=(function(){var e=`[-\\+]?\\d+%?`,t=`[-\\+]?\\d*\\.\\d+%?`,n=`(?:`+t+`)|(?:`+e+`)`,r=`[\\s|\\(]+(`+n+`)[,|\\s]+(`+n+`)[,|\\s]+(`+n+`)\\s*\\)?`,i=`[\\s|\\(]+(`+n+`)[,|\\s]+(`+n+`)[,|\\s]+(`+n+`)[,|\\s]+(`+n+`)\\s*\\)?`;return{CSS_UNIT:new RegExp(n),rgb:RegExp(`rgb`+r),rgba:RegExp(`rgba`+i),hsl:RegExp(`hsl`+r),hsla:RegExp(`hsla`+i),hsv:RegExp(`hsv`+r),hsva:RegExp(`hsva`+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function B(e){return!!ae.CSS_UNIT.exec(e)}function oe(e){e=e.replace(n,``).replace(r,``).toLowerCase();var t=!1;if(M[e])e=M[e],t=!0;else if(e==`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};var i;return(i=ae.rgb.exec(e))?{r:i[1],g:i[2],b:i[3]}:(i=ae.rgba.exec(e))?{r:i[1],g:i[2],b:i[3],a:i[4]}:(i=ae.hsl.exec(e))?{h:i[1],s:i[2],l:i[3]}:(i=ae.hsla.exec(e))?{h:i[1],s:i[2],l:i[3],a:i[4]}:(i=ae.hsv.exec(e))?{h:i[1],s:i[2],v:i[3]}:(i=ae.hsva.exec(e))?{h:i[1],s:i[2],v:i[3],a:i[4]}:(i=ae.hex8.exec(e))?{r:L(i[1]),g:L(i[2]),b:L(i[3]),a:ie(i[4]),format:t?`name`:`hex8`}:(i=ae.hex6.exec(e))?{r:L(i[1]),g:L(i[2]),b:L(i[3]),format:t?`name`:`hex`}:(i=ae.hex4.exec(e))?{r:L(i[1]+``+i[1]),g:L(i[2]+``+i[2]),b:L(i[3]+``+i[3]),a:ie(i[4]+``+i[4]),format:t?`name`:`hex8`}:(i=ae.hex3.exec(e))?{r:L(i[1]+``+i[1]),g:L(i[2]+``+i[2]),b:L(i[3]+``+i[3]),format:t?`name`:`hex`}:!1}function se(e){var t,n;return e||={level:`AA`,size:`small`},t=(e.level||`AA`).toUpperCase(),n=(e.size||`small`).toLowerCase(),t!==`AA`&&t!==`AAA`&&(t=`AA`),n!==`small`&&n!==`large`&&(n=`small`),{level:t,size:n}}t!==void 0&&t.exports?t.exports=l:typeof define==`function`&&define.amd?define(function(){return l}):window.tinycolor=l})(Math)})),eM=N($j());const tM={duration:660,easing:`ease-in-out`,fill:`forwards`},nM=`tw:left-1 tw:text-xs tw:text-sq-text-color tw:dark:text-sq-dark-text tw:items-center tw:h-4.5`,rM=e=>{let{value:n,color:r=void 0,testId:i,label:a,extraClasses:o=``,labelClasses:s=``,valuesLength:c,max:l,index:u,totalValue:f,...p}=e,m=ne(p),h=g(0),_=g(null),v=g(null),[b,x]=t.useState(``),S=``;f>=l?u===0&&c===1?S=`tw:rounded-[0.9375rem]`:u===0?S=`tw:rounded-l-[0.9375rem]`:u===c-1&&(S=`tw:rounded-r-[0.9375rem]`):u===0&&(S=`tw:rounded-l-[0.9375rem]`);let C=r||void 0,w=r?``:`tw:bg-sq-theme-dark`,T=i?`progress-bar-indicator-${i}`:`progress-bar-indicator`;d(()=>{if(!v.current)return;function e(){_.current&&=(_.current.cancel(),null)}let t=Number(n)/Number(l)*100,r=h.current;e(),v.current.style.width=`${t}%`;let i=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;return!i&&t!==r&&(_.current=v.current.animate([{width:`${r}%`},{width:`${t}%`}],tM)),h.current=t,()=>e()},[n,l]),d(()=>{v.current&&E(v.current)},[r]);let E=e=>{let t=getComputedStyle(e),n=t.backgroundColor,r=(0,eM.default)(n).isDark()?`tw:text-sq-white tw:dark:text-sq-white`:`tw:text-sq-text-color tw:dark:text-sq-text-color`;x(r)};return y(Qj,{className:`tw:w-full tw:h-4.5 tw:flex tw:justify-center tw:items-center ${c===1?``:`tw:overflow-hidden`} ${S} ${w} ${o}`,...m,"data-qtip-text":p.tooltip?p.tooltip:`${n}%`,"data-segment-value":n,"data-testid":T,ref:v,style:{backgroundColor:C,width:`${h.current}%`},children:a?y(`span`,{className:`${nM} ${s} ${b} ${c===1?`tw:absolute tw:z-50`:``}`,children:a}):void 0})},iM=({values:e=[],max:t=100,containerExtraClasses:n=``,zeroValueLabel:r=`No progress yet`})=>{let i=e.reduce((e,{value:t})=>e+t,0);return y(Zj,{className:`tw:relative tw:h-4.5 tw:w-full tw:overflow-hidden tw:rounded-[0.9375rem] tw:bg-sq-dark-gray tw:dark:bg-sq-dark-disabled-gray tw:flex tw:flex-1 ${n}`,max:t,value:i,children:i>0?e.map((n,r)=>o(rM,{...n,max:t,valuesLength:e.length,index:r,totalValue:i,key:r})):y(`div`,{className:`${nM} tw:mx-auto tw:overflow-hidden`,children:r})})};var aM=iM;const oM={outline:`tw:bg-sq-disabled-gray tw:border-sq-theme-dark`,theme:`tw:bg-sq-theme-highlight`,danger:``,"theme-light":``,"no-border":`tw:bg-sq-disabled-gray!`,warning:``},sM={outline:`tw:dark:bg-sq-multi-gray-dark tw:dark:border-sq-theme-dark`,theme:`tw:dark:bg-sq-theme-highlight`,danger:``,"theme-light":``,"no-border":`tw:dark:bg-sq-multi-gray-dark!`,warning:``},cM=e=>{let{id:t,extraClassNames:n=``,testId:r,onChange:i,buttons:a=[],...o}=e,s=ne(o),c=`tw:flex tw:outline-none tw:w-full tw:relative tw:flex-wrap ${n}`;return y(`div`,{id:t?`button-group-${t}`:void 0,"data-testid":r,className:c,...s,children:a.filter(Boolean).map((e,t)=>{if(e?.variant===`button`){let{isActive:n,...r}=e.buttonProps;return y(se,{...r,extraClassNames:`tw:-ml-sq-1 tw:focus:z-40 tw:outline-none tw:focus:border tw:rounded-none tw:first:rounded-l-md tw:last:rounded-r-md ${n?`${oM[e.buttonProps.variant??`outline`]} ${sM[e.buttonProps.variant??`outline`]} `:``} ${e.buttonProps.extraClassNames}`,onClick:()=>i&&i(e.buttonProps.value)},t)}return e?.element})})},lM=({testId:e=`carousel-id`,activeIndex:t=0,extraClassNames:n=``,onSlide:r=()=>{},autoSlide:i,showIndicators:a=!0,continuous:o=!0,interval:s=4e3,prevIcon:c=`fc-arrow-dropdown tw:rotate-90`,nextIcon:l=`fc-arrow-dropdown tw:rotate-270`,showArrows:u=!0,iconExtraClassNames:f=``,carouselItems:p=[]})=>{let[m,h]=_(t),g=e=>{let t=(e+p.length)%p.length;h(t),r(t,t>m?`right`:`left`)};d(()=>{if(i){let e=setInterval(()=>{o||m<p.length-1?g(m+1):clearInterval(e)},s);return()=>clearInterval(e)}},[i,m,o,s,p.length]),d(()=>{t!==m&&h(t)},[t]);let v=()=>{if(m===0&&!o)return;let e=m-1;e<0&&(e=p.length-1),g(e)},x=()=>{if(m===p.length-1){if(!o)return;g(0)}else g(m+1)},S={type:`spring`,damping:20,stiffness:100},C={initial:e=>({x:e>0?`100%`:`-100%`,opacity:0}),animate:{x:0,opacity:1,transition:S},exit:e=>({x:e>0?`-100%`:`100%`,opacity:0,transition:S})};return b(`div`,{"data-testid":e,className:`tw:flex tw:flex-col tw:items-center tw:justify-center tw:w-full tw:overflow-hidden ${n}`,children:[b(`div`,{className:`tw:flex tw:items-center tw:w-full tw:h-max tw:gap-1`,children:[u&&y(se,{icon:c,size:`lg`,variant:`no-border`,testId:`carousel-prev`,extraClassNames:`${m===0&&!o?`tw:invisible`:``} ${f} tw:animate-fadeIn`,onClick:v}),y(`div`,{className:`tw:h-full tw:w-full tw:overflow-hidden`,children:y(kA.div,{custom:1,initial:`initial`,animate:`animate`,exit:`exit`,variants:C,className:`tw:w-full`,children:p[m]},m)}),u&&y(se,{icon:l,testId:`carousel-next`,size:`lg`,variant:`no-border`,extraClassNames:`${m===p.length-1&&!o?`tw:invisible`:``} ${f} tw:animate-fadeIn`,onClick:x})]}),a&&y(`div`,{className:`tw:flex tw:gap-1 tw:mt-2`,children:p.map((e,t)=>y(`div`,{className:`tw:w-2 tw:h-2 tw:rounded-full tw:cursor-pointer ${t===m?`tw:bg-sq-theme-dark`:`tw:bg-sq-darkish-gray`}`,onClick:()=>g(t)},t))})]})};var uM=lM;const dM=[`button`,`reset`,`submit`,`link`],fM=[`xs`,`sm`,`lg`],pM=[`outline`,`theme`,`theme-light`,`warning`,`danger`,`no-border`],mM=[`left`,`right`],hM=[`theme`,`white`,`dark-gray`,`darkish-gray`,`gray`,`color`,`info`,`text`,`warning`,`inherit`,`danger`,`theme-light`,`success`],gM=[...hM,`default`],_M=[`outline`,`theme`,`theme-light`,`warning`,`danger`,`no-border`];export{M_ as Accordion,xb as Alert,se as Button,cM as ButtonGroup,_b as ButtonWithDropdown,L_ as ButtonWithPopover,uM as Carousel,Co as Checkbox,jA as Collapse,te as DEFAULT_TOOL_TIP_DELAY,B as Icon,Fb as InputGroup,Gh as Modal,aM as ProgressBar,Cc as QTip,Nb as SeeqActionDropdown,qm as Select,Qf as SelectComponents,bj as Slider,Ig as Tabs,To as TextArea,yo as TextField,fo as ToolbarButton,Eo as Tooltip,bb as TriggerWithDropdown,fM as buttonSizes,dM as buttonTypes,pM as buttonVariants,mM as iconPositions,hM as iconTypes,gM as svgIconTypes,_M as toolbarButtonVariants,z as tooltipPositions};
83
+ Defaulting to \`null\`.`}var eM=Wj,tM=Kj,nM=j(((exports,t)=>{(function(e){var n=/^\s+/,r=/\s+$/,i=0,a=e.round,o=e.min,s=e.max,c=e.random;function l(e,t){if(e||=``,t||={},e instanceof l)return e;if(!(this instanceof l))return new l(e,t);var n=u(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=a(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=n.ok,this._tc_id=i++}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,i,a,o,s;return n=t.r/255,r=t.g/255,i=t.b/255,a=n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4),o=r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4),s=i<=.03928?i/12.92:e.pow((i+.055)/1.055,2.4),.2126*a+.7152*o+.0722*s},setAlpha:function(e){return this._a=P(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=m(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=m(this._r,this._g,this._b),t=a(e.h*360),n=a(e.s*100),r=a(e.v*100);return this._a==1?`hsv(`+t+`, `+n+`%, `+r+`%)`:`hsva(`+t+`, `+n+`%, `+r+`%, `+this._roundA+`)`},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=a(e.h*360),n=a(e.s*100),r=a(e.l*100);return this._a==1?`hsl(`+t+`, `+n+`%, `+r+`%)`:`hsla(`+t+`, `+n+`%, `+r+`%, `+this._roundA+`)`},toHex:function(e){return g(this._r,this._g,this._b,e)},toHexString:function(e){return`#`+this.toHex(e)},toHex8:function(e){return _(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return`#`+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return this._a==1?`rgb(`+a(this._r)+`, `+a(this._g)+`, `+a(this._b)+`)`:`rgba(`+a(this._r)+`, `+a(this._g)+`, `+a(this._b)+`, `+this._roundA+`)`},toPercentageRgb:function(){return{r:a(F(this._r,255)*100)+`%`,g:a(F(this._g,255)*100)+`%`,b:a(F(this._b,255)*100)+`%`,a:this._a}},toPercentageRgbString:function(){return this._a==1?`rgb(`+a(F(this._r,255)*100)+`%, `+a(F(this._g,255)*100)+`%, `+a(F(this._b,255)*100)+`%)`:`rgba(`+a(F(this._r,255)*100)+`%, `+a(F(this._g,255)*100)+`%, `+a(F(this._b,255)*100)+`%, `+this._roundA+`)`},toName:function(){return this._a===0?`transparent`:this._a<1?!1:ee[g(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t=`#`+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?`GradientType = 1, `:``;if(e){var i=l(e);n=`#`+v(i._r,i._g,i._b,i._a)}return`progid:DXImageTransform.Microsoft.gradient(`+r+`startColorstr=`+t+`,endColorstr=`+n+`)`},toString:function(e){var t=!!e;e||=this._format;var n=!1,r=this._a<1&&this._a>=0,i=!t&&r&&(e===`hex`||e===`hex6`||e===`hex3`||e===`hex4`||e===`hex8`||e===`name`);return i?e===`name`&&this._a===0?this.toName():this.toRgbString():(e===`rgb`&&(n=this.toRgbString()),e===`prgb`&&(n=this.toPercentageRgbString()),(e===`hex`||e===`hex6`)&&(n=this.toHexString()),e===`hex3`&&(n=this.toHexString(!0)),e===`hex4`&&(n=this.toHex8String(!0)),e===`hex8`&&(n=this.toHex8String()),e===`name`&&(n=this.toName()),e===`hsl`&&(n=this.toHslString()),e===`hsv`&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(S,arguments)},brighten:function(){return this._applyModification(C,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(y,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(j,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(D,arguments)},tetrad:function(){return this._applyCombination(O,arguments)}},l.fromRatio=function(e,t){if(typeof e==`object`){var n={};for(var r in e)e.hasOwnProperty(r)&&(r===`a`?n[r]=e[r]:n[r]=ne(e[r]));e=n}return l(e,t)};function u(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,c=!1,l=!1;return typeof e==`string`&&(e=oe(e)),typeof e==`object`&&(B(e.r)&&B(e.g)&&B(e.b)?(t=d(e.r,e.g,e.b),c=!0,l=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):B(e.h)&&B(e.s)&&B(e.v)?(r=ne(e.s),i=ne(e.v),t=h(e.h,r,i),c=!0,l=`hsv`):B(e.h)&&B(e.s)&&B(e.l)&&(r=ne(e.s),a=ne(e.l),t=p(e.h,r,a),c=!0,l=`hsl`),e.hasOwnProperty(`a`)&&(n=e.a)),n=P(n),{ok:c,format:e.format||l,r:o(255,s(t.r,0)),g:o(255,s(t.g,0)),b:o(255,s(t.b,0)),a:n}}function d(e,t,n){return{r:F(e,255)*255,g:F(t,255)*255,b:F(n,255)*255}}function f(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r=s(e,t,n),i=o(e,t,n),a,c,l=(r+i)/2;if(r==i)a=c=0;else{var u=r-i;switch(c=l>.5?u/(2-r-i):u/(r+i),r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:c,l}}function p(e,t,n){var r,i,a;e=F(e,360),t=F(t,100),n=F(n,100);function o(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(t===0)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;r=o(c,s,e+1/3),i=o(c,s,e),a=o(c,s,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function m(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r=s(e,t,n),i=o(e,t,n),a,c,l=r,u=r-i;if(c=r===0?0:u/r,r==i)a=0;else{switch(r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:c,v:l}}function h(t,n,r){t=F(t,360)*6,n=F(n,100),r=F(r,100);var i=e.floor(t),a=t-i,o=r*(1-n),s=r*(1-a*n),c=r*(1-(1-a)*n),l=i%6,u=[r,s,o,o,c,r][l],d=[c,r,r,s,o,o][l],f=[o,o,c,r,r,s][l];return{r:u*255,g:d*255,b:f*255}}function g(e,t,n,r){var i=[z(a(e).toString(16)),z(a(t).toString(16)),z(a(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join(``)}function _(e,t,n,r,i){var o=[z(a(e).toString(16)),z(a(t).toString(16)),z(a(n).toString(16)),z(re(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join(``)}function v(e,t,n,r){var i=[z(re(r)),z(a(e).toString(16)),z(a(t).toString(16)),z(a(n).toString(16))];return i.join(``)}l.equals=function(e,t){return!e||!t?!1:l(e).toRgbString()==l(t).toRgbString()},l.random=function(){return l.fromRatio({r:c(),g:c(),b:c()})};function y(e,t){t=t===0?0:t||10;var n=l(e).toHsl();return n.s-=t/100,n.s=I(n.s),l(n)}function b(e,t){t=t===0?0:t||10;var n=l(e).toHsl();return n.s+=t/100,n.s=I(n.s),l(n)}function x(e){return l(e).desaturate(100)}function S(e,t){t=t===0?0:t||10;var n=l(e).toHsl();return n.l+=t/100,n.l=I(n.l),l(n)}function C(e,t){t=t===0?0:t||10;var n=l(e).toRgb();return n.r=s(0,o(255,n.r-a(255*-(t/100)))),n.g=s(0,o(255,n.g-a(255*-(t/100)))),n.b=s(0,o(255,n.b-a(255*-(t/100)))),l(n)}function w(e,t){t=t===0?0:t||10;var n=l(e).toHsl();return n.l-=t/100,n.l=I(n.l),l(n)}function T(e,t){var n=l(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,l(n)}function E(e){var t=l(e).toHsl();return t.h=(t.h+180)%360,l(t)}function D(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+120)%360,s:t.s,l:t.l}),l({h:(n+240)%360,s:t.s,l:t.l})]}function O(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+90)%360,s:t.s,l:t.l}),l({h:(n+180)%360,s:t.s,l:t.l}),l({h:(n+270)%360,s:t.s,l:t.l})]}function k(e){var t=l(e).toHsl(),n=t.h;return[l(e),l({h:(n+72)%360,s:t.s,l:t.l}),l({h:(n+216)%360,s:t.s,l:t.l})]}function A(e,t,n){t||=6,n||=30;var r=l(e).toHsl(),i=360/n,a=[l(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(l(r));return a}function j(e,t){t||=6;for(var n=l(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(l({h:r,s:i,v:a})),a=(a+s)%1;return o}l.mix=function(e,t,n){n=n===0?0:n||50;var r=l(e).toRgb(),i=l(t).toRgb(),a=n/100,o={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return l(o)},l.readability=function(t,n){var r=l(t),i=l(n);return(e.max(r.getLuminance(),i.getLuminance())+.05)/(e.min(r.getLuminance(),i.getLuminance())+.05)},l.isReadable=function(e,t,n){var r=l.readability(e,t),i,a;switch(a=!1,i=se(n),i.level+i.size){case`AAsmall`:case`AAAlarge`:a=r>=4.5;break;case`AAlarge`:a=r>=3;break;case`AAAsmall`:a=r>=7;break}return a},l.mostReadable=function(e,t,n){var r=null,i=0,a,o,s,c;n||={},o=n.includeFallbackColors,s=n.level,c=n.size;for(var u=0;u<t.length;u++)a=l.readability(e,t[u]),a>i&&(i=a,r=l(t[u]));return l.isReadable(e,r,{level:s,size:c})||!o?r:(n.includeFallbackColors=!1,l.mostReadable(e,[`#fff`,`#000`],n))};var M=l.names={aliceblue:`f0f8ff`,antiquewhite:`faebd7`,aqua:`0ff`,aquamarine:`7fffd4`,azure:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`000`,blanchedalmond:`ffebcd`,blue:`00f`,blueviolet:`8a2be2`,brown:`a52a2a`,burlywood:`deb887`,burntsienna:`ea7e5d`,cadetblue:`5f9ea0`,chartreuse:`7fff00`,chocolate:`d2691e`,coral:`ff7f50`,cornflowerblue:`6495ed`,cornsilk:`fff8dc`,crimson:`dc143c`,cyan:`0ff`,darkblue:`00008b`,darkcyan:`008b8b`,darkgoldenrod:`b8860b`,darkgray:`a9a9a9`,darkgreen:`006400`,darkgrey:`a9a9a9`,darkkhaki:`bdb76b`,darkmagenta:`8b008b`,darkolivegreen:`556b2f`,darkorange:`ff8c00`,darkorchid:`9932cc`,darkred:`8b0000`,darksalmon:`e9967a`,darkseagreen:`8fbc8f`,darkslateblue:`483d8b`,darkslategray:`2f4f4f`,darkslategrey:`2f4f4f`,darkturquoise:`00ced1`,darkviolet:`9400d3`,deeppink:`ff1493`,deepskyblue:`00bfff`,dimgray:`696969`,dimgrey:`696969`,dodgerblue:`1e90ff`,firebrick:`b22222`,floralwhite:`fffaf0`,forestgreen:`228b22`,fuchsia:`f0f`,gainsboro:`dcdcdc`,ghostwhite:`f8f8ff`,gold:`ffd700`,goldenrod:`daa520`,gray:`808080`,green:`008000`,greenyellow:`adff2f`,grey:`808080`,honeydew:`f0fff0`,hotpink:`ff69b4`,indianred:`cd5c5c`,indigo:`4b0082`,ivory:`fffff0`,khaki:`f0e68c`,lavender:`e6e6fa`,lavenderblush:`fff0f5`,lawngreen:`7cfc00`,lemonchiffon:`fffacd`,lightblue:`add8e6`,lightcoral:`f08080`,lightcyan:`e0ffff`,lightgoldenrodyellow:`fafad2`,lightgray:`d3d3d3`,lightgreen:`90ee90`,lightgrey:`d3d3d3`,lightpink:`ffb6c1`,lightsalmon:`ffa07a`,lightseagreen:`20b2aa`,lightskyblue:`87cefa`,lightslategray:`789`,lightslategrey:`789`,lightsteelblue:`b0c4de`,lightyellow:`ffffe0`,lime:`0f0`,limegreen:`32cd32`,linen:`faf0e6`,magenta:`f0f`,maroon:`800000`,mediumaquamarine:`66cdaa`,mediumblue:`0000cd`,mediumorchid:`ba55d3`,mediumpurple:`9370db`,mediumseagreen:`3cb371`,mediumslateblue:`7b68ee`,mediumspringgreen:`00fa9a`,mediumturquoise:`48d1cc`,mediumvioletred:`c71585`,midnightblue:`191970`,mintcream:`f5fffa`,mistyrose:`ffe4e1`,moccasin:`ffe4b5`,navajowhite:`ffdead`,navy:`000080`,oldlace:`fdf5e6`,olive:`808000`,olivedrab:`6b8e23`,orange:`ffa500`,orangered:`ff4500`,orchid:`da70d6`,palegoldenrod:`eee8aa`,palegreen:`98fb98`,paleturquoise:`afeeee`,palevioletred:`db7093`,papayawhip:`ffefd5`,peachpuff:`ffdab9`,peru:`cd853f`,pink:`ffc0cb`,plum:`dda0dd`,powderblue:`b0e0e6`,purple:`800080`,rebeccapurple:`663399`,red:`f00`,rosybrown:`bc8f8f`,royalblue:`4169e1`,saddlebrown:`8b4513`,salmon:`fa8072`,sandybrown:`f4a460`,seagreen:`2e8b57`,seashell:`fff5ee`,sienna:`a0522d`,silver:`c0c0c0`,skyblue:`87ceeb`,slateblue:`6a5acd`,slategray:`708090`,slategrey:`708090`,snow:`fffafa`,springgreen:`00ff7f`,steelblue:`4682b4`,tan:`d2b48c`,teal:`008080`,thistle:`d8bfd8`,tomato:`ff6347`,turquoise:`40e0d0`,violet:`ee82ee`,wheat:`f5deb3`,white:`fff`,whitesmoke:`f5f5f5`,yellow:`ff0`,yellowgreen:`9acd32`},ee=l.hexNames=N(M);function N(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function P(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F(t,n){R(t)&&(t=`100%`);var r=te(t);return t=o(n,s(0,parseFloat(t))),r&&(t=parseInt(t*n,10)/100),e.abs(t-n)<1e-6?1:t%n/parseFloat(n)}function I(e){return o(1,s(0,e))}function L(e){return parseInt(e,16)}function R(e){return typeof e==`string`&&e.indexOf(`.`)!=-1&&parseFloat(e)===1}function te(e){return typeof e==`string`&&e.indexOf(`%`)!=-1}function z(e){return e.length==1?`0`+e:``+e}function ne(e){return e<=1&&(e=e*100+`%`),e}function re(t){return e.round(parseFloat(t)*255).toString(16)}function ie(e){return L(e)/255}var ae=(function(){var e=`[-\\+]?\\d+%?`,t=`[-\\+]?\\d*\\.\\d+%?`,n=`(?:`+t+`)|(?:`+e+`)`,r=`[\\s|\\(]+(`+n+`)[,|\\s]+(`+n+`)[,|\\s]+(`+n+`)\\s*\\)?`,i=`[\\s|\\(]+(`+n+`)[,|\\s]+(`+n+`)[,|\\s]+(`+n+`)[,|\\s]+(`+n+`)\\s*\\)?`;return{CSS_UNIT:new RegExp(n),rgb:RegExp(`rgb`+r),rgba:RegExp(`rgba`+i),hsl:RegExp(`hsl`+r),hsla:RegExp(`hsla`+i),hsv:RegExp(`hsv`+r),hsva:RegExp(`hsva`+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function B(e){return!!ae.CSS_UNIT.exec(e)}function oe(e){e=e.replace(n,``).replace(r,``).toLowerCase();var t=!1;if(M[e])e=M[e],t=!0;else if(e==`transparent`)return{r:0,g:0,b:0,a:0,format:`name`};var i;return(i=ae.rgb.exec(e))?{r:i[1],g:i[2],b:i[3]}:(i=ae.rgba.exec(e))?{r:i[1],g:i[2],b:i[3],a:i[4]}:(i=ae.hsl.exec(e))?{h:i[1],s:i[2],l:i[3]}:(i=ae.hsla.exec(e))?{h:i[1],s:i[2],l:i[3],a:i[4]}:(i=ae.hsv.exec(e))?{h:i[1],s:i[2],v:i[3]}:(i=ae.hsva.exec(e))?{h:i[1],s:i[2],v:i[3],a:i[4]}:(i=ae.hex8.exec(e))?{r:L(i[1]),g:L(i[2]),b:L(i[3]),a:ie(i[4]),format:t?`name`:`hex8`}:(i=ae.hex6.exec(e))?{r:L(i[1]),g:L(i[2]),b:L(i[3]),format:t?`name`:`hex`}:(i=ae.hex4.exec(e))?{r:L(i[1]+``+i[1]),g:L(i[2]+``+i[2]),b:L(i[3]+``+i[3]),a:ie(i[4]+``+i[4]),format:t?`name`:`hex8`}:(i=ae.hex3.exec(e))?{r:L(i[1]+``+i[1]),g:L(i[2]+``+i[2]),b:L(i[3]+``+i[3]),format:t?`name`:`hex`}:!1}function se(e){var t,n;return e||={level:`AA`,size:`small`},t=(e.level||`AA`).toUpperCase(),n=(e.size||`small`).toLowerCase(),t!==`AA`&&t!==`AAA`&&(t=`AA`),n!==`small`&&n!==`large`&&(n=`small`),{level:t,size:n}}t!==void 0&&t.exports?t.exports=l:typeof define==`function`&&define.amd?define(function(){return l}):window.tinycolor=l})(Math)})),rM=N(nM());const iM={duration:660,easing:`ease-in-out`,fill:`forwards`},aM=`tw:left-1 tw:text-xs tw:text-sq-text-color tw:dark:text-sq-dark-text tw:items-center tw:h-4.5`,oM=e=>{let{value:n,color:r=void 0,testId:i,label:a,extraClasses:o=``,labelClasses:s=``,valuesLength:c,max:l,index:u,totalValue:f,...p}=e,m=ne(p),h=g(0),_=g(null),v=g(null),[b,x]=t.useState(``),S=``;f>=l?u===0&&c===1?S=`tw:rounded-[0.9375rem]`:u===0?S=`tw:rounded-l-[0.9375rem]`:u===c-1&&(S=`tw:rounded-r-[0.9375rem]`):u===0&&(S=`tw:rounded-l-[0.9375rem]`);let C=r||void 0,w=r?``:`tw:bg-sq-theme-dark`,T=i?`progress-bar-indicator-${i}`:`progress-bar-indicator`;d(()=>{if(!v.current)return;function e(){_.current&&=(_.current.cancel(),null)}let t=Number(n)/Number(l)*100,r=h.current;e(),v.current.style.width=`${t}%`;let i=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;return!i&&t!==r&&(_.current=v.current.animate([{width:`${r}%`},{width:`${t}%`}],iM)),h.current=t,()=>e()},[n,l]),d(()=>{v.current&&E(v.current)},[r]);let E=e=>{let t=getComputedStyle(e),n=t.backgroundColor,r=(0,rM.default)(n).isDark()?`tw:text-sq-white tw:dark:text-sq-white`:`tw:text-sq-text-color tw:dark:text-sq-text-color`;x(r)};return y(tM,{className:`tw:w-full tw:h-4.5 tw:flex tw:justify-center tw:items-center ${c===1?``:`tw:overflow-hidden`} ${S} ${w} ${o}`,...m,"data-qtip-text":p.tooltip?p.tooltip:`${n}%`,"data-segment-value":n,"data-testid":T,ref:v,style:{backgroundColor:C,width:`${h.current}%`},children:a?y(`span`,{className:`${aM} ${s} ${b} ${c===1?`tw:absolute tw:z-50`:``}`,children:a}):void 0})},sM=({values:e=[],max:t=100,containerExtraClasses:n=``,zeroValueLabel:r=`No progress yet`})=>{let i=e.reduce((e,{value:t})=>e+t,0);return y(eM,{className:`tw:relative tw:h-4.5 tw:w-full tw:overflow-hidden tw:rounded-[0.9375rem] tw:bg-sq-dark-gray tw:dark:bg-sq-dark-disabled-gray tw:flex tw:flex-1 ${n}`,max:t,value:i,children:i>0?e.map((n,r)=>o(oM,{...n,max:t,valuesLength:e.length,index:r,totalValue:i,key:r})):y(`div`,{className:`${aM} tw:mx-auto tw:overflow-hidden`,children:r})})};var cM=sM;const lM={outline:`tw:bg-sq-disabled-gray tw:border-sq-theme-dark`,theme:`tw:bg-sq-theme-highlight`,danger:``,"theme-light":``,"no-border":`tw:bg-sq-disabled-gray!`,warning:``},uM={outline:`tw:dark:bg-sq-multi-gray-dark tw:dark:border-sq-theme-dark`,theme:`tw:dark:bg-sq-theme-highlight`,danger:``,"theme-light":``,"no-border":`tw:dark:bg-sq-multi-gray-dark!`,warning:``},dM=e=>{let{id:t,extraClassNames:n=``,testId:r,onChange:i,buttons:a=[],...o}=e,s=ne(o),c=`tw:flex tw:outline-none tw:w-full tw:relative tw:flex-wrap ${n}`;return y(`div`,{id:t?`button-group-${t}`:void 0,"data-testid":r,className:c,...s,children:a.filter(Boolean).map((e,t)=>{if(e?.variant===`button`){let{isActive:n,...r}=e.buttonProps;return y(se,{...r,extraClassNames:`tw:-ml-sq-1 tw:focus:z-40 tw:outline-none tw:focus:border tw:rounded-none tw:first:rounded-l-md tw:last:rounded-r-md ${n?`${lM[e.buttonProps.variant??`outline`]} ${uM[e.buttonProps.variant??`outline`]} `:``} ${e.buttonProps.extraClassNames}`,onClick:()=>i&&i(e.buttonProps.value)},t)}return e?.element})})},fM=({testId:e=`carousel-id`,activeIndex:t=0,extraClassNames:n=``,onSlide:r=()=>{},autoSlide:i,showIndicators:a=!0,continuous:o=!0,interval:s=4e3,prevIcon:c=`fc-arrow-dropdown tw:rotate-90`,nextIcon:l=`fc-arrow-dropdown tw:rotate-270`,showArrows:u=!0,iconExtraClassNames:f=``,carouselItems:p=[]})=>{let[m,h]=_(t),g=e=>{let t=(e+p.length)%p.length;h(t),r(t,t>m?`right`:`left`)};d(()=>{if(i){let e=setInterval(()=>{o||m<p.length-1?g(m+1):clearInterval(e)},s);return()=>clearInterval(e)}},[i,m,o,s,p.length]),d(()=>{t!==m&&h(t)},[t]);let v=()=>{if(m===0&&!o)return;let e=m-1;e<0&&(e=p.length-1),g(e)},x=()=>{if(m===p.length-1){if(!o)return;g(0)}else g(m+1)},S={type:`spring`,damping:20,stiffness:100},C={initial:e=>({x:e>0?`100%`:`-100%`,opacity:0}),animate:{x:0,opacity:1,transition:S},exit:e=>({x:e>0?`-100%`:`100%`,opacity:0,transition:S})};return b(`div`,{"data-testid":e,className:`tw:flex tw:flex-col tw:items-center tw:justify-center tw:w-full tw:overflow-hidden ${n}`,children:[b(`div`,{className:`tw:flex tw:items-center tw:w-full tw:h-max tw:gap-1`,children:[u&&y(se,{icon:c,size:`lg`,variant:`no-border`,testId:`carousel-prev`,extraClassNames:`${m===0&&!o?`tw:invisible`:``} ${f} tw:animate-fadeIn`,onClick:v}),y(`div`,{className:`tw:h-full tw:w-full tw:overflow-hidden`,children:y(MA.div,{custom:1,initial:`initial`,animate:`animate`,exit:`exit`,variants:C,className:`tw:w-full`,children:p[m]},m)}),u&&y(se,{icon:l,testId:`carousel-next`,size:`lg`,variant:`no-border`,extraClassNames:`${m===p.length-1&&!o?`tw:invisible`:``} ${f} tw:animate-fadeIn`,onClick:x})]}),a&&y(`div`,{className:`tw:flex tw:gap-1 tw:mt-2`,children:p.map((e,t)=>y(`div`,{className:`tw:w-2 tw:h-2 tw:rounded-full tw:cursor-pointer ${t===m?`tw:bg-sq-theme-dark`:`tw:bg-sq-darkish-gray`}`,onClick:()=>g(t)},t))})]})};var pM=fM;const mM=[`button`,`reset`,`submit`,`link`],hM=[`xs`,`sm`,`lg`],gM=[`outline`,`theme`,`theme-light`,`warning`,`danger`,`no-border`],_M=[`left`,`right`],vM=[`theme`,`white`,`dark-gray`,`darkish-gray`,`gray`,`color`,`info`,`text`,`warning`,`inherit`,`danger`,`theme-light`,`success`],yM=[...vM,`default`],bM=[`outline`,`theme`,`theme-light`,`warning`,`danger`,`no-border`];export{M_ as Accordion,xb as Alert,wb as Badge,se as Button,dM as ButtonGroup,_b as ButtonWithDropdown,L_ as ButtonWithPopover,pM as Carousel,Co as Checkbox,PA as Collapse,te as DEFAULT_TOOL_TIP_DELAY,B as Icon,Rb as InputGroup,Gh as Modal,cM as ProgressBar,Cc as QTip,Ib as SeeqActionDropdown,qm as Select,Qf as SelectComponents,Cj as Slider,Ig as Tabs,To as TextArea,yo as TextField,fo as ToolbarButton,Eo as Tooltip,bb as TriggerWithDropdown,hM as buttonSizes,mM as buttonTypes,gM as buttonVariants,_M as iconPositions,vM as iconTypes,yM as svgIconTypes,bM as toolbarButtonVariants,z as tooltipPositions};
84
84
  //# sourceMappingURL=index.esm.js.map