@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/iconFont/FontCustom.woff +0 -0
- package/dist/iconFont/FontCustom.woff2 +0 -0
- package/dist/index.esm.js +6 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/src/Badge/Badge.d.ts +15 -0
- package/dist/src/Badge/Badge.types.d.ts +26 -0
- package/dist/src/Badge/index.d.ts +2 -0
- package/dist/src/SeeqActionDropdown/SeeqActionDropdown.types.d.ts +9 -3
- package/dist/src/index.build.d.ts +2 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/styles.css +106 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -66,10 +66,10 @@ http://jedwatson.github.io/classnames
|
|
|
66
66
|
tw:rounded-lg tw:fixed tw:left-[50%] tw:top-0 tw:my-6 tw:translate-x-[-50%] tw:z-[1] ${e}`,...r,children:[(0,p.jsx)(Fg,{className:`tw:hidden`}),n]})]})}));a_.displayName=Yg.displayName;const o_=e=>(0,p.jsx)(`div`,{className:`tw:w-full tw:justify-between`,children:(0,p.jsx)(`div`,{...e})});o_.displayName=`DialogHeader`;const s_=e=>(0,p.jsx)(`div`,{...e});s_.displayName=`DialogFooter`;const c_=f.default.forwardRef((e,t)=>(0,p.jsx)(Xg,{ref:t,...e}));c_.displayName=Xg.displayName;const l_=f.default.forwardRef((e,t)=>(0,p.jsx)(Zg,{asChild:!0,children:(0,p.jsx)(`div`,{ref:t,...e})}));l_.displayName=Zg.displayName;const u_=({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:d=`Cancel`,disableSubmitButton:m=!1,stopPropagationSubmitButton:h=!1,onSubmit:g,isTitleEditable:_=!1,onTitleChanged:v,inputExtraClassNames:y,hideCloseIcon:b=!1,size:x=`xl`,titleIconPosition:S=`left`,hideFooterButtons:C=!1,hideSubmitButton:w=!1,hideCancelButton:T=!1,testId:D=`modal`,modalFooter:k,dialogClassName:A,titlePlaceholder:j,titleRequired:M,titleError:N,submitButtonTooltip:P,cancelButtonTooltip:F,disableCustomButton:I,customHeader:L,middleFooterSection:R=(0,p.jsx)(p.Fragment,{}),customButtonVariant:z=`outline`,submitButtonVariant:ee=`theme`,keepFocusInsideModal:B=!0,onPointerDownOutside:te,onInteractOutside:ne,ariaDescribedBy:V})=>{let[re,H]=(0,f.useState)(!1);(0,f.useEffect)(()=>{if(a){let e=setTimeout(()=>{document.body.style.pointerEvents=``},0);return()=>clearTimeout(e)}else document.body.style.pointerEvents=`auto`},[a]);let ie=async e=>{if(g)try{H(!0),await g(e)}finally{H(!1)}},ae=()=>{let i=(0,p.jsx)(p.Fragment,{});return e&&(i=typeof e==`string`?(0,p.jsx)(E,{icon:e,testId:`modalTitleIcon`,extraClassNames:`tw:flex tw:text-xl tw:mt-1`}):(0,p.jsx)(`div`,{className:`tw:mt-2`,children:e})),(0,p.jsxs)(p.Fragment,{children:[e&&S===`left`?(0,p.jsx)(`div`,{className:`tw:flex tw:mr-2`,children:i}):(0,p.jsx)(p.Fragment,{}),(0,p.jsx)(c_,{asChild:!0,children:_?(0,p.jsxs)(`div`,{className:`tw:flex tw:w-full tw:items-center`,children:[(0,p.jsx)(fo,{extraClassNames:y,value:t,type:`text`,testId:`modalTitle`,onChange:v,placeholder:j,required:M,showError:!!N}),N&&(0,p.jsx)(`p`,{className:`tw:text-sq-danger tw:min-w-fit tw:pl-2 tw:mb-0`,children:N})]}):L??(0,p.jsxs)(`div`,{"data-testid":`modalTitle`,className:`modal-title`,children:[(0,p.jsxs)(`div`,{className:`tw:flex tw:items-center`,children:[(0,p.jsx)(`h3`,{children:t}),n&&(0,p.jsx)(`span`,{className:`tw:text-xl tw:pl-0.5`,children:n})]}),r&&(0,p.jsx)(`div`,{className:`tw:italic tw:text-sm tw:text-left tw:mt-1`,"data-testid":`modal-subtitle`,children:r})]})}),e&&S===`right`?(0,p.jsx)(`div`,{className:`tw:flex tw:ml-4`,children:i}):(0,p.jsx)(p.Fragment,{})]})};return a?(0,p.jsx)(n_,{open:!0,onOpenChange:o,modal:B,children:(0,p.jsxs)(a_,{onPointerDownOutside:e=>te?te(e):e.preventDefault(),onInteractOutside:e=>ne?ne(e):e.preventDefault(),"data-testid":D,"aria-describedby":V,className:(0,e_.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":x===`xs`,"tw:max-w-sm":x===`sm`,"tw:max-w-md":x===`md`,"tw:max-w-lg":x===`lg`,"tw:max-w-xl":x===`xl`,"tw:max-w-2xl":x===`2xl`,"tw:max-w-3xl":x===`3xl`,"tw:max-w-4xl":x===`4xl`,"tw:max-w-5xl":x===`5xl`,"tw:max-w-6xl":x===`6xl`},A),children:[(0,p.jsxs)(o_,{className:`modal-header tw:flex tw:w-full tw:justify-between tw:border-sq-disabled-gray
|
|
67
67
|
tw:dark:border-sq-dark-disabled-gray tw:border-0 tw:border-b tw:px-6 tw:py-4`,children:[(0,p.jsx)(`div`,{className:`tw:flex tw:w-full`,children:ae()}),!b&&(0,p.jsx)(i_,{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:(0,p.jsx)(`span`,{className:`tw:cursor-pointer`,children:`×`})})]}),(0,p.jsx)(l_,{className:`modal-body tw:px-6 tw:py-4 tw:overflow-y-auto`,children:i}),!C&&(0,p.jsx)(s_,{className:`modal-footer tw:px-6 tw:py-4`,children:k??(0,p.jsxs)(`div`,{className:`tw:flex tw:w-full tw:justify-between`,"data-testid":`modalFooter`,children:[(0,p.jsx)(`div`,{className:`tw:flex tw:justify-start`,children:s&&(0,p.jsx)(O,{label:c,onClick:l,disabled:I,extraClassNames:`tw:justify-start tw:min-w-25`,testId:`customButton`,variant:z})}),(0,p.jsxs)(`div`,{className:`tw:flex tw:justify-end`,children:[(0,p.jsx)(`div`,{className:`tw:flex tw:items-center`,children:R}),!T&&(0,p.jsx)(i_,{asChild:!0,children:(0,p.jsx)(O,{label:d,extraClassNames:`tw:mr-5 tw:min-w-25`,tooltip:F,variant:`outline`,stopPropagation:!1,testId:`cancelButton`})}),!w&&(0,p.jsx)(O,{label:u,onClick:ie,disabled:m||re,variant:ee,stopPropagation:h,tooltip:P,icon:re?`fc-loading-notch tw:animate-spin`:void 0,iconPosition:`left`,testId:`submitButton`,extraClassNames:`tw:min-w-25`})]})]})})]})}):(0,p.jsx)(p.Fragment,{})};var d_=u_;function f_(e){let t=e+`CollectionProvider`,[n,r]=F(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=f.default.useRef(null),a=f.default.useRef(new Map).current;return(0,p.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=L(s),l=f.default.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=a(s,n),o=N(t,i.collectionRef);return(0,p.jsx)(c,{ref:o,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,m=L(u),h=f.default.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=f.default.useRef(null),s=N(t,o),c=a(u,n);return f.default.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,p.jsx)(m,{[d]:``,ref:s,children:r})});h.displayName=u;function g(t){let n=a(e+`CollectionConsumer`,t),r=f.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`)),r=Array.from(n.itemMap.values()),i=r.sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return i},[n.collectionRef,n.itemMap]);return r}return[{Provider:o,Slot:l,ItemSlot:h},g,r]}var p_=f.createContext(void 0);function m_(e){let t=f.useContext(p_);return e||t||`ltr`}var h_=`rovingFocusGroup.onEntryFocus`,g_={bubbles:!1,cancelable:!0},__=`RovingFocusGroup`,[v_,y_,b_]=f_(__),[x_,S_]=F(__,[b_]),[C_,w_]=x_(__),T_=f.forwardRef((e,t)=>(0,p.jsx)(v_.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(v_.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(E_,{...e,ref:t})})}));T_.displayName=__;var E_=f.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,m=f.useRef(null),h=N(t,m),g=m_(a),[_,v]=Vr({prop:o,defaultProp:s??null,onChange:c,caller:__}),[y,b]=f.useState(!1),x=H(l),S=y_(n),C=f.useRef(!1),[w,T]=f.useState(0);return f.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(h_,x),()=>e.removeEventListener(h_,x)},[x]),(0,p.jsx)(C_,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:_,onItemFocus:f.useCallback(e=>v(e),[v]),onItemShiftTab:f.useCallback(()=>b(!0),[]),onFocusableItemAdd:f.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:f.useCallback(()=>T(e=>e-1),[]),children:(0,p.jsx)(V.div,{tabIndex:y||w===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:`none`,...e.style},onMouseDown:A(e.onMouseDown,()=>{C.current=!0}),onFocus:A(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(h_,g_);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===_),r=[t,n,...e].filter(Boolean),i=r.map(e=>e.ref.current);M_(i,u)}}C.current=!1}),onBlur:A(e.onBlur,()=>b(!1))})})}),D_=`RovingFocusGroupItem`,O_=f.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Be(),l=a||c,u=w_(D_,n),d=u.currentTabStopId===l,m=y_(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:_}=u;return f.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),(0,p.jsx)(v_.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,p.jsx)(V.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:A(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:A(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:A(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=j_(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().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=u.loop?N_(r,n+1):r.slice(n+1)}setTimeout(()=>M_(r))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:_!=null}):o})})});O_.displayName=D_;var k_={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function A_(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function j_(e,t,n){let r=A_(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return k_[r]}function M_(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function N_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var P_=T_,F_=O_,I_=`Tabs`,[L_,R_]=F(I_,[S_]),z_=S_(),[B_,V_]=L_(I_),H_=f.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=m_(s),[d,f]=Vr({prop:r,onChange:i,defaultProp:a??``,caller:I_});return(0,p.jsx)(B_,{scope:n,baseId:Be(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,p.jsx)(V.div,{dir:u,"data-orientation":o,...l,ref:t})})});H_.displayName=I_;var U_=`TabsList`,W_=f.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=V_(U_,n),o=z_(n);return(0,p.jsx)(P_,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,p.jsx)(V.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});W_.displayName=U_;var G_=`TabsTrigger`,K_=f.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=V_(G_,n),s=z_(n),c=Y_(o.baseId,r),l=X_(o.baseId,r),u=r===o.value;return(0,p.jsx)(F_,{asChild:!0,...s,focusable:!i,active:u,children:(0,p.jsx)(V.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:A(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:A(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:A(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});K_.displayName=G_;var q_=`TabsContent`,J_=f.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=V_(q_,n),c=Y_(s.baseId,r),l=X_(s.baseId,r),u=r===s.value,d=f.useRef(u);return f.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,p.jsx)(Ir,{present:i||u,children:({present:n})=>(0,p.jsx)(V.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});J_.displayName=q_;function Y_(e,t){return`${e}-trigger-${t}`}function X_(e,t){return`${e}-content-${t}`}var Z_=H_,Q_=W_,$_=K_,ev=J_;const tv=({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(0,p.jsxs)(Z_,{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:[(0,p.jsx)(Q_,{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)=>(0,p.jsx)($_,{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:(0,p.jsxs)(`span`,{className:`tw:flex tw:items-center tw:overflow-hidden`,children:[t&&(0,p.jsx)(E,{icon:t,testId:`${e}_tab-icon`,extraClassNames:`tw:text-sq-15 tw:mr-sq-7 tw:flex-shrink-0`}),(0,p.jsx)(`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)=>(0,p.jsx)(ev,{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 nv=tv,rv=`Collapsible`,[iv,av]=F(rv),[ov,sv]=iv(rv),cv=f.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=Vr({prop:r,defaultProp:i??!1,onChange:o,caller:rv});return(0,p.jsx)(ov,{scope:n,disabled:a,contentId:Be(),open:c,onOpenToggle:f.useCallback(()=>l(e=>!e),[l]),children:(0,p.jsx)(V.div,{"data-state":mv(c),"data-disabled":a?``:void 0,...s,ref:t})})});cv.displayName=rv;var lv=`CollapsibleTrigger`,uv=f.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=sv(lv,n);return(0,p.jsx)(V.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":mv(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:A(e.onClick,i.onOpenToggle)})});uv.displayName=lv;var dv=`CollapsibleContent`,fv=f.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=sv(dv,e.__scopeCollapsible);return(0,p.jsx)(Ir,{present:n||i.open,children:({present:e})=>(0,p.jsx)(pv,{...r,ref:t,present:e})})});fv.displayName=dv;var pv=f.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=sv(dv,n),[s,c]=f.useState(r),l=f.useRef(null),u=N(t,l),d=f.useRef(0),m=d.current,h=f.useRef(0),g=h.current,_=o.open||s,v=f.useRef(_),y=f.useRef(void 0);return f.useEffect(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),Le(()=>{let e=l.current;if(e){y.current=y.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,h.current=t.width,v.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),c(r)}},[o.open,r]),(0,p.jsx)(V.div,{"data-state":mv(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!_,...a,ref:u,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:_&&i})});function mv(e){return e?`open`:`closed`}var hv=cv,gv=uv,_v=fv,vv=`Accordion`,yv=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[bv,xv,Sv]=f_(vv),[Cv,wv]=F(vv,[Sv,av]),Tv=av(),Ev=f.default.forwardRef((e,t)=>{let{type:n,...r}=e,i=r,a=r;return(0,p.jsx)(bv.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,p.jsx)(Mv,{...a,ref:t}):(0,p.jsx)(jv,{...i,ref:t})})});Ev.displayName=vv;var[Dv,Ov]=Cv(vv),[kv,Av]=Cv(vv,{collapsible:!1}),jv=f.default.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[s,c]=Vr({prop:n,defaultProp:r??``,onChange:i,caller:vv});return(0,p.jsx)(Dv,{scope:e.__scopeAccordion,value:f.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:f.default.useCallback(()=>a&&c(``),[a,c]),children:(0,p.jsx)(kv,{scope:e.__scopeAccordion,collapsible:a,children:(0,p.jsx)(Fv,{...o,ref:t})})})}),Mv=f.default.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=Vr({prop:n,defaultProp:r??[],onChange:i,caller:vv}),c=f.default.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=f.default.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,p.jsx)(Dv,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:l,children:(0,p.jsx)(kv,{scope:e.__scopeAccordion,collapsible:!0,children:(0,p.jsx)(Fv,{...a,ref:t})})})}),[Nv,Pv]=Cv(vv),Fv=f.default.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...o}=e,s=f.default.useRef(null),c=N(s,t),l=xv(n),u=m_(i),d=u===`ltr`,m=A(e.onKeyDown,e=>{if(!yv.includes(e.key))return;let t=e.target,n=l().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let o=r,s=i-1,c=()=>{o=r+1,o>s&&(o=0)},u=()=>{o=r-1,o<0&&(o=s)};switch(e.key){case`Home`:o=0;break;case`End`:o=s;break;case`ArrowRight`:a===`horizontal`&&(d?c():u());break;case`ArrowDown`:a===`vertical`&&c();break;case`ArrowLeft`:a===`horizontal`&&(d?u():c());break;case`ArrowUp`:a===`vertical`&&u();break}let f=o%i;n[f].ref.current?.focus()});return(0,p.jsx)(Nv,{scope:n,disabled:r,direction:i,orientation:a,children:(0,p.jsx)(bv.Slot,{scope:n,children:(0,p.jsx)(V.div,{...o,"data-orientation":a,ref:c,onKeyDown:r?void 0:m})})})}),Iv=`AccordionItem`,[Lv,Rv]=Cv(Iv),zv=f.default.forwardRef((e,t)=>{let{__scopeAccordion:n,value:r,...i}=e,a=Pv(Iv,n),o=Ov(Iv,n),s=Tv(n),c=Be(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,p.jsx)(Lv,{scope:n,open:l,disabled:u,triggerId:c,children:(0,p.jsx)(hv,{"data-orientation":a.orientation,"data-state":Kv(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})});zv.displayName=Iv;var Bv=`AccordionHeader`,Vv=f.default.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=Pv(vv,n),a=Rv(Bv,n);return(0,p.jsx)(V.h3,{"data-orientation":i.orientation,"data-state":Kv(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})});Vv.displayName=Bv;var Hv=`AccordionTrigger`,Uv=f.default.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=Pv(vv,n),a=Rv(Hv,n),o=Av(Hv,n),s=Tv(n);return(0,p.jsx)(bv.ItemSlot,{scope:n,children:(0,p.jsx)(gv,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})});Uv.displayName=Hv;var Wv=`AccordionContent`,Gv=f.default.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=Pv(vv,n),a=Rv(Wv,n),o=Tv(n);return(0,p.jsx)(_v,{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}})});Gv.displayName=Wv;function Kv(e){return e?`open`:`closed`}var qv=Ev,Jv=zv,Yv=Uv,Xv=Gv;const Zv=({accordionItems:e,defaultValue:t,value:n,onItemSelect:r,disabled:i,extraClassNames:a,testId:o})=>(0,p.jsx)(qv,{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=>(0,p.jsxs)(Jv,{className:`tw:p-0 tw:flex tw:flex-col tw:w-full`,disabled:i,value:e.value,children:[(0,p.jsx)(Yv,{disabled:i,className:`tw:w-full tw:cursor-default tw:focus-visible:outline-none tw:bg-transparent`,children:e.trigger}),(0,p.jsx)(Xv,{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 Qv=Zv;const $v=[`tw:bg-sq-white`,`tw:dark:bg-sq-dark-background`].join(` `),ey=[`tw:border-solid`,`tw:border`,`tw:rounded-[0.5rem]`,`tw:border-sq-disabled-gray`,`tw:dark:border-gray-500`].join(` `),ty=[`tw:opacity-50`,`tw:cursor-not-allowed`].join(` `),ny=({children:e,trigger:t,id:n,hasArrow:r,extraTriggerClassNames:i,extraPopoverClassNames:a,containerTestId:o,onInteractOutside:s,onPointerDownOutside:c,isTriggerAsChild:l=!1,shouldTriggerFullWidth:u=!1,disabled:d=!1,align:m=`end`,alignOffset:h=-35,placement:g=`bottom`,placementOffset:_=2,isHoverEnabled:v=!1,hoverOpenDelay:y=300,onOpenChange:b,isOpen:x,isCloseOnContentClick:C=!1,isPortal:w=!1,...T})=>{let E=S(T),D=(0,f.useRef)(null),[O,k]=f.useState(!1),A=()=>{D.current&&=(clearTimeout(D.current),null)},j=()=>{v&&(A(),D.current=setTimeout(()=>{k(!0),b&&b(!0)},y))},M=()=>{v&&(A(),D.current=setTimeout(()=>{k(!1),b&&b(!1)},200))};f.useEffect(()=>A,[]);let N=()=>(0,p.jsx)(Ua,{sideOffset:_,align:m,side:g,onInteractOutside:s,onPointerDownOutside:c,alignOffset:v?-10:h,asChild:!0,onClick:()=>C&&b&&b(!1),className:`tw:focus-visible:outline-none tw:outline-none tw:w-full tw:h-full`,children:(0,p.jsxs)(`div`,{"data-testid":o,className:`${$v} ${ey} 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
|
|
68
68
|
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
|
|
69
|
-
${a||``}`,children:[r&&(0,p.jsx)(Wa,{asChild:!0,children:(0,p.jsx)(`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`})}),e]})}),P=e=>(0,p.jsxs)(Ba,{open:e,defaultOpen:!1,onOpenChange:b,children:[t?(0,p.jsx)(Va,{id:n,asChild:l,className:`tw:focus-visible:outline-none tw:outline-none tw:bg-transparent ${u?`tw:w-full tw:h-full`:``}`,disabled:d,children:(0,p.jsx)(`div`,{...E,onMouseOver:j,onMouseOut:M,className:`tw:focus-visible:outline-none tw:outline-none tw:dark:text-sq-white ${d?ty:``} ${u?`tw:flex tw:flex-col tw:items-center tw:justify-center`:`tw:inline`} ${i||``}`,children:t})}):(0,p.jsx)(Va,{asChild:!0,children:(0,p.jsx)(`div`,{})}),w?(0,p.jsx)(Ha,{children:N()}):N()]});return P(v?O:x)};var ry=ny,iy=u(Gr(),1),ay=u(da(),1),oy=[`Enter`,` `],sy=[`ArrowDown`,`PageUp`,`Home`],cy=[`ArrowUp`,`PageDown`,`End`],ly=[...sy,...cy],uy={ltr:[...oy,`ArrowRight`],rtl:[...oy,`ArrowLeft`]},dy={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},fy=`Menu`,[py,my,hy]=f_(fy),[gy,_y]=F(fy,[hy,pr,S_]),vy=pr(),yy=S_(),[by,xy]=gy(fy),[Sy,Cy]=gy(fy),wy=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=vy(t),[c,l]=f.useState(null),u=f.useRef(!1),d=H(a),m=m_(i);return f.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.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})}},[]),(0,p.jsx)(kr,{...s,children:(0,p.jsx)(by,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,p.jsx)(Sy,{scope:t,onClose:f.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:m,modal:o,children:r})})})};wy.displayName=fy;var Ty=`MenuAnchor`,Ey=f.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=vy(n);return(0,p.jsx)(Ar,{...i,...r,ref:t})});Ey.displayName=Ty;var Dy=`MenuPortal`,[Oy,ky]=gy(Dy,{forceMount:void 0}),Ay=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=xy(Dy,t);return(0,p.jsx)(Oy,{scope:t,forceMount:n,children:(0,p.jsx)(Ir,{present:n||a.open,children:(0,p.jsx)(Pr,{asChild:!0,container:i,children:r})})})};Ay.displayName=Dy;var jy=`MenuContent`,[My,Ny]=gy(jy),Py=f.forwardRef((e,t)=>{let n=ky(jy,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=xy(jy,e.__scopeMenu),o=Cy(jy,e.__scopeMenu);return(0,p.jsx)(py.Provider,{scope:e.__scopeMenu,children:(0,p.jsx)(Ir,{present:r||a.open,children:(0,p.jsx)(py.Slot,{scope:e.__scopeMenu,children:o.modal?(0,p.jsx)(Fy,{...i,ref:t}):(0,p.jsx)(Iy,{...i,ref:t})})})})}),Fy=f.forwardRef((e,t)=>{let n=xy(jy,e.__scopeMenu),r=f.useRef(null),i=N(t,r);return f.useEffect(()=>{let e=r.current;if(e)return(0,iy.hideOthers)(e)},[]),(0,p.jsx)(Ry,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:A(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Iy=f.forwardRef((e,t)=>{let n=xy(jy,e.__scopeMenu);return(0,p.jsx)(Ry,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ly=L(`MenuContent.ScrollLock`),Ry=f.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=xy(jy,n),y=Cy(jy,n),b=vy(n),x=yy(n),S=my(n),[C,w]=f.useState(null),T=f.useRef(null),E=N(t,T,v.onContentChange),D=f.useRef(0),O=f.useRef(``),k=f.useRef(0),j=f.useRef(null),M=f.useRef(`right`),P=f.useRef(0),F=g?ay.RemoveScroll:f.Fragment,I=g?{as:Ly,allowPinchZoom:!0}:void 0,L=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=Sb(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())};f.useEffect(()=>()=>window.clearTimeout(D.current),[]),ye();let R=f.useCallback(e=>{let t=M.current===j.current?.side;return t&&wb(e,j.current?.area)},[]);return(0,p.jsx)(My,{scope:n,searchRef:O,onItemEnter:f.useCallback(e=>{R(e)&&e.preventDefault()},[R]),onItemLeave:f.useCallback(e=>{R(e)||(T.current?.focus(),w(null))},[R]),onTriggerLeave:f.useCallback(e=>{R(e)&&e.preventDefault()},[R]),pointerGraceTimerRef:k,onPointerGraceIntentChange:f.useCallback(e=>{j.current=e},[]),children:(0,p.jsx)(F,{...I,children:(0,p.jsx)(Te,{asChild:!0,trapped:i,onMountAutoFocus:A(a,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,p.jsx)(de,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:m,onDismiss:h,children:(0,p.jsx)(P_,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:A(c,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,p.jsx)(jr,{role:`menu`,"aria-orientation":`vertical`,"data-state":_b(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:E,style:{outline:`none`,..._.style},onKeyDown:A(_.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&&L(e.key));let a=T.current;if(e.target!==a||!ly.includes(e.key))return;e.preventDefault();let o=S().filter(e=>!e.disabled),s=o.map(e=>e.ref.current);cy.includes(e.key)&&s.reverse(),bb(s)}),onBlur:A(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:A(e.onPointerMove,Tb(e=>{let t=e.target,n=P.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>P.current?`right`:`left`;M.current=t,P.current=e.clientX}}))})})})})})})});Py.displayName=jy;var zy=`MenuGroup`,By=f.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,p.jsx)(V.div,{role:`group`,...r,ref:t})});By.displayName=zy;var Vy=`MenuLabel`,Hy=f.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,p.jsx)(V.div,{...r,ref:t})});Hy.displayName=Vy;var Uy=`MenuItem`,Wy=`menu.itemSelect`,Gy=f.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=f.useRef(null),o=Cy(Uy,e.__scopeMenu),s=Ny(Uy,e.__scopeMenu),c=N(t,a),l=f.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Wy,{bubbles:!0,cancelable:!0});e.addEventListener(Wy,e=>r?.(e),{once:!0}),re(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,p.jsx)(Ky,{...i,ref:c,disabled:n,onClick:A(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:A(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:A(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||oy.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Gy.displayName=Uy;var Ky=f.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Ny(Uy,n),s=yy(n),c=f.useRef(null),l=N(t,c),[u,d]=f.useState(!1),[m,h]=f.useState(``);return f.useEffect(()=>{let e=c.current;e&&h((e.textContent??``).trim())},[a.children]),(0,p.jsx)(py.ItemSlot,{scope:n,disabled:r,textValue:i??m,children:(0,p.jsx)(F_,{asChild:!0,...s,focusable:!r,children:(0,p.jsx)(V.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:A(e.onPointerMove,Tb(e=>{if(r)o.onItemLeave(e);else if(o.onItemEnter(e),!e.defaultPrevented){let t=e.currentTarget;t.focus({preventScroll:!0})}})),onPointerLeave:A(e.onPointerLeave,Tb(e=>o.onItemLeave(e))),onFocus:A(e.onFocus,()=>d(!0)),onBlur:A(e.onBlur,()=>d(!1))})})})}),qy=`MenuCheckboxItem`,Jy=f.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,p.jsx)(nb,{scope:e.__scopeMenu,checked:n,children:(0,p.jsx)(Gy,{role:`menuitemcheckbox`,"aria-checked":vb(n)?`mixed`:n,...i,ref:t,"data-state":yb(n),onSelect:A(i.onSelect,()=>r?.(vb(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Jy.displayName=qy;var Yy=`MenuRadioGroup`,[Xy,Zy]=gy(Yy,{value:void 0,onValueChange:()=>{}}),Qy=f.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=H(r);return(0,p.jsx)(Xy,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,p.jsx)(By,{...i,ref:t})})});Qy.displayName=Yy;var $y=`MenuRadioItem`,eb=f.forwardRef((e,t)=>{let{value:n,...r}=e,i=Zy($y,e.__scopeMenu),a=n===i.value;return(0,p.jsx)(nb,{scope:e.__scopeMenu,checked:a,children:(0,p.jsx)(Gy,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":yb(a),onSelect:A(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});eb.displayName=$y;var tb=`MenuItemIndicator`,[nb,rb]=gy(tb,{checked:!1}),ib=f.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=rb(tb,n);return(0,p.jsx)(Ir,{present:r||vb(a.checked)||a.checked===!0,children:(0,p.jsx)(V.span,{...i,ref:t,"data-state":yb(a.checked)})})});ib.displayName=tb;var ab=`MenuSeparator`,ob=f.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,p.jsx)(V.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});ob.displayName=ab;var sb=`MenuArrow`,cb=f.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=vy(n);return(0,p.jsx)(Mr,{...i,...r,ref:t})});cb.displayName=sb;var lb=`MenuSub`,[ub,db]=gy(lb),fb=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=xy(lb,t),o=vy(t),[s,c]=f.useState(null),[l,u]=f.useState(null),d=H(i);return f.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,p.jsx)(kr,{...o,children:(0,p.jsx)(by,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,p.jsx)(ub,{scope:t,contentId:Be(),triggerId:Be(),trigger:s,onTriggerChange:c,children:n})})})};fb.displayName=lb;var pb=`MenuSubTrigger`,mb=f.forwardRef((e,t)=>{let n=xy(pb,e.__scopeMenu),r=Cy(pb,e.__scopeMenu),i=db(pb,e.__scopeMenu),a=Ny(pb,e.__scopeMenu),o=f.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=f.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return f.useEffect(()=>u,[u]),f.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,p.jsx)(Ey,{asChild:!0,...l,children:(0,p.jsx)(Ky,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":_b(n.open),...e,ref:M(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:A(e.onPointerMove,Tb(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:A(e.onPointerLeave,Tb(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:A(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||uy[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});mb.displayName=pb;var hb=`MenuSubContent`,gb=f.forwardRef((e,t)=>{let n=ky(jy,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=xy(jy,e.__scopeMenu),o=Cy(jy,e.__scopeMenu),s=db(hb,e.__scopeMenu),c=f.useRef(null),l=N(t,c);return(0,p.jsx)(py.Provider,{scope:e.__scopeMenu,children:(0,p.jsx)(Ir,{present:r||a.open,children:(0,p.jsx)(py.Slot,{scope:e.__scopeMenu,children:(0,p.jsx)(Ry,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:A(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:A(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:A(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=dy[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});gb.displayName=hb;function _b(e){return e?`open`:`closed`}function vb(e){return e===`indeterminate`}function yb(e){return vb(e)?`indeterminate`:e?`checked`:`unchecked`}function bb(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Sb(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=xb(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 Cb(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 wb(e,t){if(!t)return!1;let n={x:e.clientX,y:e.clientY};return Cb(n,t)}function Tb(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Eb=wy,Db=Ey,Ob=Ay,kb=Py,Ab=By,jb=Hy,Mb=Gy,Nb=Jy,Pb=Qy,Fb=eb,Ib=ib,Lb=ob,Rb=cb,zb=fb,Bb=mb,Vb=gb,Hb=`DropdownMenu`,[Ub,Wb]=F(Hb,[_y]),Gb=_y(),[Kb,qb]=Ub(Hb),Jb=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Gb(t),l=f.useRef(null),[u,d]=Vr({prop:i,defaultProp:a??!1,onChange:o,caller:Hb});return(0,p.jsx)(Kb,{scope:t,triggerId:Be(),triggerRef:l,contentId:Be(),open:u,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,p.jsx)(Eb,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};Jb.displayName=Hb;var Yb=`DropdownMenuTrigger`,Xb=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=qb(Yb,n),o=Gb(n);return(0,p.jsx)(Db,{asChild:!0,...o,children:(0,p.jsx)(V.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:M(t,a.triggerRef),onPointerDown:A(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:A(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Xb.displayName=Yb;var Zb=`DropdownMenuPortal`,Qb=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Gb(t);return(0,p.jsx)(Ob,{...r,...n})};Qb.displayName=Zb;var $b=`DropdownMenuContent`,ex=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qb($b,n),a=Gb(n),o=f.useRef(!1);return(0,p.jsx)(kb,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:A(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:A(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),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)`}})});ex.displayName=$b;var tx=`DropdownMenuGroup`,nx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Ab,{...i,...r,ref:t})});nx.displayName=tx;var rx=`DropdownMenuLabel`,ix=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(jb,{...i,...r,ref:t})});ix.displayName=rx;var ax=`DropdownMenuItem`,ox=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Mb,{...i,...r,ref:t})});ox.displayName=ax;var sx=`DropdownMenuCheckboxItem`,cx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Nb,{...i,...r,ref:t})});cx.displayName=sx;var lx=`DropdownMenuRadioGroup`,ux=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Pb,{...i,...r,ref:t})});ux.displayName=lx;var dx=`DropdownMenuRadioItem`,fx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Fb,{...i,...r,ref:t})});fx.displayName=dx;var px=`DropdownMenuItemIndicator`,mx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Ib,{...i,...r,ref:t})});mx.displayName=px;var hx=`DropdownMenuSeparator`,gx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Lb,{...i,...r,ref:t})});gx.displayName=hx;var _x=`DropdownMenuArrow`,vx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Rb,{...i,...r,ref:t})});vx.displayName=_x;var yx=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=Gb(t),[s,c]=Vr({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,p.jsx)(zb,{...o,open:s,onOpenChange:c,children:n})},bx=`DropdownMenuSubTrigger`,xx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Bb,{...i,...r,ref:t})});xx.displayName=bx;var Sx=`DropdownMenuSubContent`,Cx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Vb,{...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)`}})});Cx.displayName=Sx;var wx=Jb,Tx=Xb,Ex=Qb,Dx=ex,Ox=ix,kx=ox,Ax=gx,jx=vx,Mx=yx,Nx=xx,Px=Cx;const Fx=[`tw:border-solid`,`tw:border`,`tw:rounded-[0.5rem]`,`tw:border-sq-disabled-gray`,`tw:dark:border-gray-500`].join(` `),Ix=[`tw:bg-sq-white`,`tw:dark:bg-sq-dark-background`].join(` `),Lx=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,...m}=e;return(0,p.jsx)(Rx,{...e,children:(0,p.jsx)(Tx,{asChild:!0,id:d,disabled:f,children:(0,p.jsx)(O,{label:t,variant:n,size:r,icon:i,iconStyle:a,iconColor:o,iconPosition:s,iconPrefix:c,extraClassNames:l,testId:u,disabled:f,tooltip:m.tooltip,tooltipOptions:{delay:m.tooltipDelay,position:m.tooltipPlacement}})})})},Rx=({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:m=!0,onContainerClick:h})=>(0,p.jsxs)(wx,{defaultOpen:!1,open:d,onOpenChange:u,modal:m,children:[n,(0,p.jsx)(Ex,{children:(0,p.jsx)(Dx,{onClick:h,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:(0,p.jsxs)(`div`,{"data-testid":i,className:`${Ix} 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 ${Fx} ${r}`,children:[l&&(0,p.jsx)(jx,{asChild:!0,children:(0,p.jsx)(`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=S(e);return e.isLabel?(0,p.jsxs)(Ox,{className:e.itemExtraClassNames,...r,children:[e.icon&&(0,p.jsx)(E,{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`}),(0,p.jsx)(`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?(0,p.jsxs)(Mx,{children:[(0,p.jsxs)(Nx,{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:[(0,p.jsxs)(`div`,{className:`tw:flex`,children:[e.icon&&(0,p.jsx)(`div`,{className:`tw:min-w-5`,children:(0,p.jsx)(E,{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||``}`})}),(0,p.jsx)(`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})]}),(0,p.jsx)(`div`,{className:`tw:flex tw:justify-center tw:items-center`,children:(0,p.jsx)(E,{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`})})]}),(0,p.jsx)(Ex,{children:(0,p.jsx)(Px,{className:`tw:focus-visible:outline-none tw:outline-none`,children:(0,p.jsx)(`div`,{"data-testid":i,className:`${Ix} 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 ${Fx}`,children:e.subMenuItems.map((t,n)=>(0,p.jsxs)(kx,{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&&(0,p.jsx)(E,{icon:t.iconClass,type:`text`,extraClassNames:`tw:w-4.5 ${e.disabled&&`tw:opacity-30!`}`}),(0,p.jsx)(`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):(0,p.jsxs)(`div`,{...r,children:[(0,p.jsxs)(kx,{"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&&(0,p.jsx)(`div`,{className:`tw:min-w-5`,children:(0,p.jsx)(E,{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||``}`})}),(0,p.jsx)(`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&&(0,p.jsx)(Ax,{"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 zx=Lx;const Bx=[`tw:opacity-50`,`tw:cursor-not-allowed`].join(` `),Vx=e=>{let{triggerIcon:t,id:n,extraClassNames:r=``,disabled:i=!1,...a}=e,o=S(a);return(0,p.jsx)(Rx,{...e,children:(0,p.jsx)(Tx,{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:(0,p.jsx)(`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?Bx:``} ${r}`,children:t})})})};var Hx=Vx;const Ux=`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`,Wx=`tw:dark:bg-sq-theme-hover-dark tw:dark:text-sq-text-color-dark`,Gx=`tw:text-sq-text-color tw:bg-sq-theme-highlight/10`,Kx=`tw:border-sq-danger`,qx=`tw:border-sq-theme-dark`,Jx=({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?(0,p.jsxs)(`div`,{"data-testid":a,id:o,className:d,children:[e,t&&(0,p.jsx)(E,{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})]}):(0,p.jsx)(`div`,{})},Yx=({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
|
|
70
|
-
tw:outline-none`,d=S(l),f=r===`default`?`currentColor`:`var(--theme-icon)`;return(0,p.jsx)(`div`,{onClick:e,...d,className:`svgContainer ${u}`,children:(0,p.jsx)(`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:(0,p.jsx)(`path`,{d:qa(t)})})})};var
|
|
69
|
+
${a||``}`,children:[r&&(0,p.jsx)(Wa,{asChild:!0,children:(0,p.jsx)(`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`})}),e]})}),P=e=>(0,p.jsxs)(Ba,{open:e,defaultOpen:!1,onOpenChange:b,children:[t?(0,p.jsx)(Va,{id:n,asChild:l,className:`tw:focus-visible:outline-none tw:outline-none tw:bg-transparent ${u?`tw:w-full tw:h-full`:``}`,disabled:d,children:(0,p.jsx)(`div`,{...E,onMouseOver:j,onMouseOut:M,className:`tw:focus-visible:outline-none tw:outline-none tw:dark:text-sq-white ${d?ty:``} ${u?`tw:flex tw:flex-col tw:items-center tw:justify-center`:`tw:inline`} ${i||``}`,children:t})}):(0,p.jsx)(Va,{asChild:!0,children:(0,p.jsx)(`div`,{})}),w?(0,p.jsx)(Ha,{children:N()}):N()]});return P(v?O:x)};var ry=ny,iy=u(Gr(),1),ay=u(da(),1),oy=[`Enter`,` `],sy=[`ArrowDown`,`PageUp`,`Home`],cy=[`ArrowUp`,`PageDown`,`End`],ly=[...sy,...cy],uy={ltr:[...oy,`ArrowRight`],rtl:[...oy,`ArrowLeft`]},dy={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},fy=`Menu`,[py,my,hy]=f_(fy),[gy,_y]=F(fy,[hy,pr,S_]),vy=pr(),yy=S_(),[by,xy]=gy(fy),[Sy,Cy]=gy(fy),wy=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=vy(t),[c,l]=f.useState(null),u=f.useRef(!1),d=H(a),m=m_(i);return f.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.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})}},[]),(0,p.jsx)(kr,{...s,children:(0,p.jsx)(by,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,p.jsx)(Sy,{scope:t,onClose:f.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:m,modal:o,children:r})})})};wy.displayName=fy;var Ty=`MenuAnchor`,Ey=f.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=vy(n);return(0,p.jsx)(Ar,{...i,...r,ref:t})});Ey.displayName=Ty;var Dy=`MenuPortal`,[Oy,ky]=gy(Dy,{forceMount:void 0}),Ay=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=xy(Dy,t);return(0,p.jsx)(Oy,{scope:t,forceMount:n,children:(0,p.jsx)(Ir,{present:n||a.open,children:(0,p.jsx)(Pr,{asChild:!0,container:i,children:r})})})};Ay.displayName=Dy;var jy=`MenuContent`,[My,Ny]=gy(jy),Py=f.forwardRef((e,t)=>{let n=ky(jy,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=xy(jy,e.__scopeMenu),o=Cy(jy,e.__scopeMenu);return(0,p.jsx)(py.Provider,{scope:e.__scopeMenu,children:(0,p.jsx)(Ir,{present:r||a.open,children:(0,p.jsx)(py.Slot,{scope:e.__scopeMenu,children:o.modal?(0,p.jsx)(Fy,{...i,ref:t}):(0,p.jsx)(Iy,{...i,ref:t})})})})}),Fy=f.forwardRef((e,t)=>{let n=xy(jy,e.__scopeMenu),r=f.useRef(null),i=N(t,r);return f.useEffect(()=>{let e=r.current;if(e)return(0,iy.hideOthers)(e)},[]),(0,p.jsx)(Ry,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:A(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Iy=f.forwardRef((e,t)=>{let n=xy(jy,e.__scopeMenu);return(0,p.jsx)(Ry,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ly=L(`MenuContent.ScrollLock`),Ry=f.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=xy(jy,n),y=Cy(jy,n),b=vy(n),x=yy(n),S=my(n),[C,w]=f.useState(null),T=f.useRef(null),E=N(t,T,v.onContentChange),D=f.useRef(0),O=f.useRef(``),k=f.useRef(0),j=f.useRef(null),M=f.useRef(`right`),P=f.useRef(0),F=g?ay.RemoveScroll:f.Fragment,I=g?{as:Ly,allowPinchZoom:!0}:void 0,L=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=Sb(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())};f.useEffect(()=>()=>window.clearTimeout(D.current),[]),ye();let R=f.useCallback(e=>{let t=M.current===j.current?.side;return t&&wb(e,j.current?.area)},[]);return(0,p.jsx)(My,{scope:n,searchRef:O,onItemEnter:f.useCallback(e=>{R(e)&&e.preventDefault()},[R]),onItemLeave:f.useCallback(e=>{R(e)||(T.current?.focus(),w(null))},[R]),onTriggerLeave:f.useCallback(e=>{R(e)&&e.preventDefault()},[R]),pointerGraceTimerRef:k,onPointerGraceIntentChange:f.useCallback(e=>{j.current=e},[]),children:(0,p.jsx)(F,{...I,children:(0,p.jsx)(Te,{asChild:!0,trapped:i,onMountAutoFocus:A(a,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,p.jsx)(de,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:m,onDismiss:h,children:(0,p.jsx)(P_,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:A(c,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,p.jsx)(jr,{role:`menu`,"aria-orientation":`vertical`,"data-state":_b(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:E,style:{outline:`none`,..._.style},onKeyDown:A(_.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&&L(e.key));let a=T.current;if(e.target!==a||!ly.includes(e.key))return;e.preventDefault();let o=S().filter(e=>!e.disabled),s=o.map(e=>e.ref.current);cy.includes(e.key)&&s.reverse(),bb(s)}),onBlur:A(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:A(e.onPointerMove,Tb(e=>{let t=e.target,n=P.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>P.current?`right`:`left`;M.current=t,P.current=e.clientX}}))})})})})})})});Py.displayName=jy;var zy=`MenuGroup`,By=f.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,p.jsx)(V.div,{role:`group`,...r,ref:t})});By.displayName=zy;var Vy=`MenuLabel`,Hy=f.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,p.jsx)(V.div,{...r,ref:t})});Hy.displayName=Vy;var Uy=`MenuItem`,Wy=`menu.itemSelect`,Gy=f.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=f.useRef(null),o=Cy(Uy,e.__scopeMenu),s=Ny(Uy,e.__scopeMenu),c=N(t,a),l=f.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Wy,{bubbles:!0,cancelable:!0});e.addEventListener(Wy,e=>r?.(e),{once:!0}),re(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,p.jsx)(Ky,{...i,ref:c,disabled:n,onClick:A(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:A(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:A(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||oy.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Gy.displayName=Uy;var Ky=f.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Ny(Uy,n),s=yy(n),c=f.useRef(null),l=N(t,c),[u,d]=f.useState(!1),[m,h]=f.useState(``);return f.useEffect(()=>{let e=c.current;e&&h((e.textContent??``).trim())},[a.children]),(0,p.jsx)(py.ItemSlot,{scope:n,disabled:r,textValue:i??m,children:(0,p.jsx)(F_,{asChild:!0,...s,focusable:!r,children:(0,p.jsx)(V.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:A(e.onPointerMove,Tb(e=>{if(r)o.onItemLeave(e);else if(o.onItemEnter(e),!e.defaultPrevented){let t=e.currentTarget;t.focus({preventScroll:!0})}})),onPointerLeave:A(e.onPointerLeave,Tb(e=>o.onItemLeave(e))),onFocus:A(e.onFocus,()=>d(!0)),onBlur:A(e.onBlur,()=>d(!1))})})})}),qy=`MenuCheckboxItem`,Jy=f.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,p.jsx)(nb,{scope:e.__scopeMenu,checked:n,children:(0,p.jsx)(Gy,{role:`menuitemcheckbox`,"aria-checked":vb(n)?`mixed`:n,...i,ref:t,"data-state":yb(n),onSelect:A(i.onSelect,()=>r?.(vb(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Jy.displayName=qy;var Yy=`MenuRadioGroup`,[Xy,Zy]=gy(Yy,{value:void 0,onValueChange:()=>{}}),Qy=f.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=H(r);return(0,p.jsx)(Xy,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,p.jsx)(By,{...i,ref:t})})});Qy.displayName=Yy;var $y=`MenuRadioItem`,eb=f.forwardRef((e,t)=>{let{value:n,...r}=e,i=Zy($y,e.__scopeMenu),a=n===i.value;return(0,p.jsx)(nb,{scope:e.__scopeMenu,checked:a,children:(0,p.jsx)(Gy,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":yb(a),onSelect:A(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});eb.displayName=$y;var tb=`MenuItemIndicator`,[nb,rb]=gy(tb,{checked:!1}),ib=f.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=rb(tb,n);return(0,p.jsx)(Ir,{present:r||vb(a.checked)||a.checked===!0,children:(0,p.jsx)(V.span,{...i,ref:t,"data-state":yb(a.checked)})})});ib.displayName=tb;var ab=`MenuSeparator`,ob=f.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,p.jsx)(V.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});ob.displayName=ab;var sb=`MenuArrow`,cb=f.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=vy(n);return(0,p.jsx)(Mr,{...i,...r,ref:t})});cb.displayName=sb;var lb=`MenuSub`,[ub,db]=gy(lb),fb=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=xy(lb,t),o=vy(t),[s,c]=f.useState(null),[l,u]=f.useState(null),d=H(i);return f.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,p.jsx)(kr,{...o,children:(0,p.jsx)(by,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,p.jsx)(ub,{scope:t,contentId:Be(),triggerId:Be(),trigger:s,onTriggerChange:c,children:n})})})};fb.displayName=lb;var pb=`MenuSubTrigger`,mb=f.forwardRef((e,t)=>{let n=xy(pb,e.__scopeMenu),r=Cy(pb,e.__scopeMenu),i=db(pb,e.__scopeMenu),a=Ny(pb,e.__scopeMenu),o=f.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=f.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return f.useEffect(()=>u,[u]),f.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,p.jsx)(Ey,{asChild:!0,...l,children:(0,p.jsx)(Ky,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":_b(n.open),...e,ref:M(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:A(e.onPointerMove,Tb(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:A(e.onPointerLeave,Tb(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:A(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||uy[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});mb.displayName=pb;var hb=`MenuSubContent`,gb=f.forwardRef((e,t)=>{let n=ky(jy,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=xy(jy,e.__scopeMenu),o=Cy(jy,e.__scopeMenu),s=db(hb,e.__scopeMenu),c=f.useRef(null),l=N(t,c);return(0,p.jsx)(py.Provider,{scope:e.__scopeMenu,children:(0,p.jsx)(Ir,{present:r||a.open,children:(0,p.jsx)(py.Slot,{scope:e.__scopeMenu,children:(0,p.jsx)(Ry,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:A(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:A(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:A(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=dy[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});gb.displayName=hb;function _b(e){return e?`open`:`closed`}function vb(e){return e===`indeterminate`}function yb(e){return vb(e)?`indeterminate`:e?`checked`:`unchecked`}function bb(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Sb(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=xb(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 Cb(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 wb(e,t){if(!t)return!1;let n={x:e.clientX,y:e.clientY};return Cb(n,t)}function Tb(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Eb=wy,Db=Ey,Ob=Ay,kb=Py,Ab=By,jb=Hy,Mb=Gy,Nb=Jy,Pb=Qy,Fb=eb,Ib=ib,Lb=ob,Rb=cb,zb=fb,Bb=mb,Vb=gb,Hb=`DropdownMenu`,[Ub,Wb]=F(Hb,[_y]),Gb=_y(),[Kb,qb]=Ub(Hb),Jb=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Gb(t),l=f.useRef(null),[u,d]=Vr({prop:i,defaultProp:a??!1,onChange:o,caller:Hb});return(0,p.jsx)(Kb,{scope:t,triggerId:Be(),triggerRef:l,contentId:Be(),open:u,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,p.jsx)(Eb,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};Jb.displayName=Hb;var Yb=`DropdownMenuTrigger`,Xb=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=qb(Yb,n),o=Gb(n);return(0,p.jsx)(Db,{asChild:!0,...o,children:(0,p.jsx)(V.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:M(t,a.triggerRef),onPointerDown:A(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:A(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Xb.displayName=Yb;var Zb=`DropdownMenuPortal`,Qb=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Gb(t);return(0,p.jsx)(Ob,{...r,...n})};Qb.displayName=Zb;var $b=`DropdownMenuContent`,ex=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=qb($b,n),a=Gb(n),o=f.useRef(!1);return(0,p.jsx)(kb,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:A(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:A(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),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)`}})});ex.displayName=$b;var tx=`DropdownMenuGroup`,nx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Ab,{...i,...r,ref:t})});nx.displayName=tx;var rx=`DropdownMenuLabel`,ix=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(jb,{...i,...r,ref:t})});ix.displayName=rx;var ax=`DropdownMenuItem`,ox=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Mb,{...i,...r,ref:t})});ox.displayName=ax;var sx=`DropdownMenuCheckboxItem`,cx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Nb,{...i,...r,ref:t})});cx.displayName=sx;var lx=`DropdownMenuRadioGroup`,ux=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Pb,{...i,...r,ref:t})});ux.displayName=lx;var dx=`DropdownMenuRadioItem`,fx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Fb,{...i,...r,ref:t})});fx.displayName=dx;var px=`DropdownMenuItemIndicator`,mx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Ib,{...i,...r,ref:t})});mx.displayName=px;var hx=`DropdownMenuSeparator`,gx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Lb,{...i,...r,ref:t})});gx.displayName=hx;var _x=`DropdownMenuArrow`,vx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Rb,{...i,...r,ref:t})});vx.displayName=_x;var yx=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=Gb(t),[s,c]=Vr({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,p.jsx)(zb,{...o,open:s,onOpenChange:c,children:n})},bx=`DropdownMenuSubTrigger`,xx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Bb,{...i,...r,ref:t})});xx.displayName=bx;var Sx=`DropdownMenuSubContent`,Cx=f.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Gb(n);return(0,p.jsx)(Vb,{...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)`}})});Cx.displayName=Sx;var wx=Jb,Tx=Xb,Ex=Qb,Dx=ex,Ox=ix,kx=ox,Ax=gx,jx=vx,Mx=yx,Nx=xx,Px=Cx;const Fx=[`tw:border-solid`,`tw:border`,`tw:rounded-[0.5rem]`,`tw:border-sq-disabled-gray`,`tw:dark:border-gray-500`].join(` `),Ix=[`tw:bg-sq-white`,`tw:dark:bg-sq-dark-background`].join(` `),Lx=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,...m}=e;return(0,p.jsx)(Rx,{...e,children:(0,p.jsx)(Tx,{asChild:!0,id:d,disabled:f,children:(0,p.jsx)(O,{label:t,variant:n,size:r,icon:i,iconStyle:a,iconColor:o,iconPosition:s,iconPrefix:c,extraClassNames:l,testId:u,disabled:f,tooltip:m.tooltip,tooltipOptions:{delay:m.tooltipDelay,position:m.tooltipPlacement}})})})},Rx=({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:m=!0,onContainerClick:h})=>(0,p.jsxs)(wx,{defaultOpen:!1,open:d,onOpenChange:u,modal:m,children:[n,(0,p.jsx)(Ex,{children:(0,p.jsx)(Dx,{onClick:h,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:(0,p.jsxs)(`div`,{"data-testid":i,className:`${Ix} 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 ${Fx} ${r}`,children:[l&&(0,p.jsx)(jx,{asChild:!0,children:(0,p.jsx)(`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=S(e);return e.isLabel?(0,p.jsxs)(Ox,{className:e.itemExtraClassNames,...r,children:[e.icon&&(0,p.jsx)(E,{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`}),(0,p.jsx)(`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?(0,p.jsxs)(Mx,{children:[(0,p.jsxs)(Nx,{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:[(0,p.jsxs)(`div`,{className:`tw:flex`,children:[e.icon&&(0,p.jsx)(`div`,{className:`tw:min-w-5`,children:(0,p.jsx)(E,{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||``}`})}),(0,p.jsx)(`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})]}),(0,p.jsx)(`div`,{className:`tw:flex tw:justify-center tw:items-center`,children:(0,p.jsx)(E,{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`})})]}),(0,p.jsx)(Ex,{children:(0,p.jsx)(Px,{className:`tw:focus-visible:outline-none tw:outline-none`,children:(0,p.jsx)(`div`,{"data-testid":i,className:`${Ix} 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 ${Fx}`,children:e.subMenuItems.map((t,n)=>(0,p.jsxs)(kx,{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&&(0,p.jsx)(E,{icon:t.iconClass,type:`text`,extraClassNames:`tw:w-4.5 ${e.disabled&&`tw:opacity-30!`}`}),(0,p.jsx)(`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):(0,p.jsxs)(`div`,{...r,children:[(0,p.jsxs)(kx,{"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&&(0,p.jsx)(`div`,{className:`tw:min-w-5`,children:(0,p.jsx)(E,{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||``}`})}),(0,p.jsx)(`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&&(0,p.jsx)(Ax,{"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 zx=Lx;const Bx=[`tw:opacity-50`,`tw:cursor-not-allowed`].join(` `),Vx=e=>{let{triggerIcon:t,id:n,extraClassNames:r=``,disabled:i=!1,...a}=e,o=S(a);return(0,p.jsx)(Rx,{...e,children:(0,p.jsx)(Tx,{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:(0,p.jsx)(`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?Bx:``} ${r}`,children:t})})})};var Hx=Vx;const Ux=`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`,Wx=`tw:dark:bg-sq-theme-hover-dark tw:dark:text-sq-text-color-dark`,Gx=`tw:text-sq-text-color tw:bg-sq-theme-highlight/10`,Kx=`tw:border-sq-danger`,qx=`tw:border-sq-theme-dark`,Jx=({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?(0,p.jsxs)(`div`,{"data-testid":a,id:o,className:d,children:[e,t&&(0,p.jsx)(E,{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})]}):(0,p.jsx)(`div`,{})},Yx=`tw:inline-flex tw:items-center tw:rounded-[3px] tw:px-[5px] tw:py-[2px] tw:text-[0.8rem] tw:whitespace-nowrap tw:italic`,Xx={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`},Zx=({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 ${Xx[t]} ${r}`.trim();return(0,p.jsx)(`span`,{"data-testid":n,className:i,children:e})};var Qx=Zx;const $x=({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
|
|
70
|
+
tw:outline-none`,d=S(l),f=r===`default`?`currentColor`:`var(--theme-icon)`;return(0,p.jsx)(`div`,{onClick:e,...d,className:`svgContainer ${u}`,children:(0,p.jsx)(`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:(0,p.jsx)(`path`,{d:qa(t)})})})};var eS=$x,tS=u($g());const nS=e=>{let t=(0,p.jsx)(p.Fragment,{});return e.icon&&(t=Ka(e.icon)?(0,p.jsx)(eS,{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}):(0,p.jsx)(E,{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})),(0,p.jsxs)(`div`,{className:`tw:flex-row tw:flex tw:p-2.5 tw:pl-5 tw:w-150 tw:gap-4`,children:[(0,p.jsx)(`div`,{className:(0,tS.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}),(0,p.jsxs)(`div`,{className:`tw:flex tw:flex-col tw:justify-center`,children:[(0,p.jsx)(`div`,{className:`tw:text-[20px] tw:font-semibold`,children:e.display}),(0,p.jsx)(`div`,{className:`tw:text-sq-13 tw:leading-4`,children:e.text})]})]})},rS=e=>{let t=(0,p.jsx)(p.Fragment,{});return e.icon&&(t=Ka(e.icon)?(0,p.jsx)(eS,{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}):(0,p.jsx)(E,{icon:e.icon,type:`text`,extraClassNames:`tw:text-5 tw:dark:text-sq-white tw:text-sq-text-color `+e.iconExtraClassNames})),(0,p.jsx)(`div`,{className:`tw:flex-col tw:flex tw:p-2.5`,children:(0,p.jsxs)(`div`,{className:`tw:flex tw:flex-row tw:gap-2 tw:items-end`,children:[(0,p.jsx)(`div`,{className:`tw:rounded-[0.1875rem] tw:h-5 tw:w-5 tw:flex tw:justify-center tw:items-center `,children:t}),(0,p.jsx)(`div`,{className:`tw:text-sq-13`,children:e.display})]})})},iS=e=>(0,p.jsxs)(`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:[(0,p.jsx)(`h5`,{className:`tw:text-4 tw:font-medium tw:text-sq-theme-dark tw:leading-4.5`,children:e.display}),(0,p.jsx)(`div`,{className:`tw:text-sq-13 tw:text-sq-text-color tw:dark:text-sq-dark-text tw:mt-1!`,children:e.text})]}),aS=[`tw:border-solid`,`tw:border`,`tw:rounded-md`,`tw:border-sq-disabled-gray`,`tw:dark:border-gray-500`].join(` `),oS=[`tw:bg-sq-white`,`tw:dark:bg-sq-dark-background`].join(` `),sS=[`tw:opacity-50`,`tw:cursor-not-allowed`].join(` `),cS=(e,t)=>{switch(e){case`create-workbench`:return(0,p.jsx)(nS,{...t});case`view-workbench`:return(0,p.jsx)(rS,{...t});case`insert-seeq-content`:return(0,p.jsx)(iS,{...t});default:return(0,p.jsx)(nS,{...t})}},lS=({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:m=!0,keepFocusInsideDropdown:h=!0,variant:g,..._})=>{let v=S(_);return(0,p.jsxs)(wx,{defaultOpen:!1,open:f,onOpenChange:d,modal:h,children:[(0,p.jsx)(Tx,{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:(0,p.jsx)(`div`,{...v,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?sS:``} ${r||``}`,children:t})}),(0,p.jsx)(Dx,{sideOffset:c,side:s,align:o,alignOffset:l,asChild:!0,onCloseAutoFocus:e=>!m&&e.preventDefault(),className:`tw:focus-visible:outline-none tw:outline-none`,children:(0,p.jsxs)(`div`,{"data-testid":i,className:oS+` 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 `+aS,children:[u&&(0,p.jsx)(jx,{asChild:!0,children:(0,p.jsx)(`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)=>(0,p.jsxs)(`div`,{children:[(0,p.jsx)(kx,{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:cS(g,e)}),e.divider&&(0,p.jsx)(Ax,{"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 uS=lS;const dS=`tw:flex tw:outline-none tw:rounded-md tw:w-full tw:relative tw:flex-wrap`,fS=`tw:border-sq-danger`,pS=[`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(` `),mS=`tw:leading-normal tw:outline-none tw:py-1 tw:px-3 tw:p-1 tw:border-solid tw:border`,hS=`tw:dark:bg-sq-dark-background tw:dark:text-sq-dark-text tw:disabled:dark:text-sq-disabled-gray`,gS=`tw:text-sq-text-color tw:disabled:text-sq-darkish-gray`,_S=f.default.forwardRef((e,t)=>{let{readonly:n=!1,onChange:r,onKeyUp:i,onFocus:a,onBlur:o,onKeyDown:s,name:c,value:l,placeholder:u,append:d=[],extraClassNames:m=``,id:h,testId:g,showError:_,required:v,autoComplete:y,autoFocus:b,disabled:x,type:C,step:w,min:T,max:E,field:D,maxLength:k,minLength:A,inputGroup:j,...M}=e,N=S(M),P=`tw:flex tw:outline-none tw:rounded-md tw:w-full tw:relative tw:flex-wrap ${m}`,F=d.filter(Boolean),I=j??(F.length>0?`left`:void 0),L=I===`left`?`tw:rounded-l-md tw:rounded-r-none`:I===`right`?`tw:rounded-r-md tw:rounded-l-none`:`tw:rounded-md`,R=`tw:leading-normal tw:outline-none tw:py-1 tw:px-3 tw:p-1 tw:border-solid tw:border ${m} 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 ${L} ${_?`tw:border-sq-danger`:pS} `,z=f.default.isValidElement(D)&&typeof D.type!=`string`,ee=z?f.default.cloneElement(D,{inputGroup:I}):D;return(0,p.jsxs)(`div`,{id:`input-group-${h}`,className:P,children:[D?(0,p.jsx)(`div`,{"data-testid":g,className:`tw:flex tw:flex-1 tw:cursor-pointer tw:active:z-50 ${R}`,children:ee}):(0,p.jsx)(fo,{testId:g,readonly:n,onChange:r,onKeyUp:i,onFocus:a,onBlur:o,onKeyDown:s,name:c,ref:t,showError:_,value:l,required:v,placeholder:u,autoComplete:y,autoFocus:b,id:h,type:C,disabled:x,step:w,min:T,max:E,maxLength:k,minLength:A,inputGroup:I,extraClassNames:`tw:flex tw:flex-1 tw:w-full tw:focus:z-30 ${m}`,...N}),F.map((e,t)=>e?.variant===`button`?(0,p.jsx)(O,{extraClassNames:`$
|
|
71
71
|
index ? 'tw:-ml-px' : 'tw:ml-0'
|
|
72
|
-
} tw:focus:z-40 tw:focus:border tw:rounded-none tw:last:rounded-r-md`,...e.buttonProps},t):(0,p.jsx)(`div`,{className:`${lS} ${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))]})}),mS=(0,f.createContext)({});function hS(e){let t=(0,f.useRef)(null);return t.current===null&&(t.current=e()),t.current}const gS=typeof window<`u`,_S=gS?f.useLayoutEffect:f.useEffect,vS=(0,f.createContext)(null);function yS(e,t){e.indexOf(t)===-1&&e.push(t)}function bS(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}const xS=(e,t,n)=>n>t?t:n<e?e:n;function SS(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let CS=()=>{},wS=()=>{};process.env.NODE_ENV!==`production`&&(CS=(e,t,n)=>{!e&&typeof console<`u`&&console.warn(SS(t,n))},wS=(e,t,n)=>{if(!e)throw Error(SS(t,n))});const TS={},ES=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function DS(e){return typeof e==`object`&&!!e}const OS=e=>/^0[^.\s]+$/u.test(e);function kS(e){let t;return()=>(t===void 0&&(t=e()),t)}const AS=e=>e,jS=(e,t)=>n=>t(e(n)),MS=(...e)=>e.reduce(jS),NS=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r};var PS=class{constructor(){this.subscriptions=[]}add(e){return yS(this.subscriptions,e),()=>bS(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 FS=e=>e*1e3,IS=e=>e/1e3;function LS(e,t){return t?e*(1e3/t):0}const RS=new Set;function zS(e,t,n){e||RS.has(t)||(console.warn(SS(t,n)),RS.add(t))}const BS=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,VS=1e-7,HS=12;function US(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=BS(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>1e-7&&++s<12);return o}function WS(e,t,n,r){if(e===t&&n===r)return AS;let i=t=>US(t,0,1,e,n);return e=>e===0||e===1?e:BS(i(e),t,r)}const GS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,KS=e=>t=>1-e(1-t),qS=WS(.33,1.53,.69,.99),JS=KS(qS),YS=GS(JS),XS=e=>(e*=2)<1?.5*JS(e):.5*(2-2**(-10*(e-1))),ZS=e=>1-Math.sin(Math.acos(e)),QS=KS(ZS),$S=GS(ZS),eC=WS(.42,0,1,1),tC=WS(0,0,.58,1),nC=WS(.42,0,.58,1),rC=e=>Array.isArray(e)&&typeof e[0]!=`number`,iC=e=>Array.isArray(e)&&typeof e[0]==`number`,aC={linear:AS,easeIn:eC,easeInOut:nC,easeOut:tC,circIn:ZS,circInOut:$S,circOut:QS,backIn:JS,backInOut:YS,backOut:qS,anticipate:XS},oC=e=>typeof e==`string`,sC=e=>{if(iC(e)){wS(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return WS(t,n,r,i)}else if(oC(e))return wS(aC[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),aC[e];return e},cC=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],lC={value:null,addProjectionMetrics:null};function uC(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&&lC.value&&lC.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}const dC=40;function fC(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=cC.reduce((e,n)=>(e[n]=uC(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=TS.useManualTiming?i.timestamp:performance.now();n=!1,TS.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)},_=cC.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<cC.length;t++)o[cC[t]].cancel(e)};return{schedule:_,cancel:v,state:i,steps:o}}const{schedule:X,cancel:pC,state:mC,steps:hC}=fC(typeof requestAnimationFrame<`u`?requestAnimationFrame:AS,!0);let gC;function _C(){gC=void 0}const vC={now:()=>(gC===void 0&&vC.set(mC.isProcessing||TS.useManualTiming?mC.timestamp:performance.now()),gC),set:e=>{gC=e,queueMicrotask(_C)}},yC={layout:0,mainThread:0,waapi:0},bC=e=>t=>typeof t==`string`&&t.startsWith(e),xC=bC(`--`),SC=bC(`var(--`),CC=e=>{let t=SC(e);return t?wC.test(e.split(`/*`)[0].trim()):!1},wC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,TC={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},EC={...TC,transform:e=>xS(0,1,e)},DC={...TC,default:1},OC=e=>Math.round(e*1e5)/1e5,kC=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function AC(e){return e==null}const jC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,MC=(e,t)=>n=>!!(typeof n==`string`&&jC.test(n)&&n.startsWith(e)||t&&!AC(n)&&Object.prototype.hasOwnProperty.call(n,t)),NC=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(kC);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},PC=e=>xS(0,255,e),FC={...TC,transform:e=>Math.round(PC(e))},IC={test:MC(`rgb`,`red`),parse:NC(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+FC.transform(e)+`, `+FC.transform(t)+`, `+FC.transform(n)+`, `+OC(EC.transform(r))+`)`};function LC(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 RC={test:MC(`#`),parse:LC,transform:IC.transform},zC=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),BC=zC(`deg`),VC=zC(`%`),Z=zC(`px`),HC=zC(`vh`),UC=zC(`vw`),WC=(()=>({...VC,parse:e=>VC.parse(e)/100,transform:e=>VC.transform(e*100)}))(),GC={test:MC(`hsl`,`hue`),parse:NC(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+VC.transform(OC(t))+`, `+VC.transform(OC(n))+`, `+OC(EC.transform(r))+`)`},KC={test:e=>IC.test(e)||RC.test(e)||GC.test(e),parse:e=>IC.test(e)?IC.parse(e):GC.test(e)?GC.parse(e):RC.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?IC.transform(e):GC.transform(e),getAnimatableNone:e=>{let t=KC.parse(e);return t.alpha=0,KC.transform(t)}},qC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function JC(e){return isNaN(e)&&typeof e==`string`&&(e.match(kC)?.length||0)+(e.match(qC)?.length||0)>0}const YC=`number`,XC=`color`,ZC=`var`,QC=`var(`,$C="${}",ew=/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 tw(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0,o=t.replace(ew,e=>(KC.test(e)?(r.color.push(a),i.push(XC),n.push(KC.parse(e))):e.startsWith(`var(`)?(r.var.push(a),i.push(`var`),n.push(e)):(r.number.push(a),i.push(YC),n.push(parseFloat(e))),++a,"${}")),s=o.split("${}");return{values:n,split:s,indexes:r,types:i}}function nw(e){return tw(e).values}function rw(e){let{split:t,types:n}=tw(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===YC?i+=OC(e[a]):t===XC?i+=KC.transform(e[a]):i+=e[a]}return i}}const iw=e=>typeof e==`number`?0:KC.test(e)?KC.getAnimatableNone(e):e;function aw(e){let t=nw(e),n=rw(e);return n(t.map(iw))}const ow={test:JC,parse:nw,createTransformer:rw,getAnimatableNone:aw};function sw(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 cw({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=sw(s,r,e+1/3),a=sw(s,r,e),o=sw(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function lw(e,t){return n=>n>0?t:e}const Q=(e,t,n)=>e+(t-e)*n,uw=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},dw=[RC,IC,GC],fw=e=>dw.find(t=>t.test(e));function pw(e){let t=fw(e);if(CS(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,`color-not-animatable`),!t)return!1;let n=t.parse(e);return t===GC&&(n=cw(n)),n}const mw=(e,t)=>{let n=pw(e),r=pw(t);if(!n||!r)return lw(e,t);let i={...n};return e=>(i.red=uw(n.red,r.red,e),i.green=uw(n.green,r.green,e),i.blue=uw(n.blue,r.blue,e),i.alpha=Q(n.alpha,r.alpha,e),IC.transform(i))},hw=new Set([`none`,`hidden`]);function gw(e,t){return hw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function _w(e,t){return n=>Q(e,t,n)}function vw(e){return typeof e==`number`?_w:typeof e==`string`?CC(e)?lw:KC.test(e)?mw:Sw:Array.isArray(e)?yw:typeof e==`object`?KC.test(e)?mw:bw:lw}function yw(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>vw(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function bw(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=vw(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function xw(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 Sw=(e,t)=>{let n=ow.createTransformer(t),r=tw(e),i=tw(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?hw.has(e)&&!i.values.length||hw.has(t)&&!r.values.length?gw(e,t):MS(yw(xw(r,i),i.values),n):(CS(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,`complex-values-different`),lw(e,t))};function Cw(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Q(e,t,n);let r=vw(e);return r(e,t)}const ww=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>X.update(t,e),stop:()=>pC(t),now:()=>mC.isProcessing?mC.timestamp:vC.now()}},Tw=(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)})`},Ew=2e4;function Dw(e){let t=0,n=e.next(t);for(;!n.done&&t<Ew;)t+=50,n=e.next(t);return t>=Ew?1/0:t}function Ow(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Dw(r),Ew);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:IS(i)}}const kw=5;function Aw(e,t,n){let r=Math.max(t-5,0);return LS(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},jw=.001;function Mw({duration:e=$.duration,bounce:t=$.bounce,velocity:n=$.velocity,mass:r=$.mass}){let i,a;CS(e<=FS($.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=xS($.minDamping,$.maxDamping,o),e=xS($.minDuration,$.maxDuration,IS(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Fw(t,o),c=Math.exp(-i);return jw-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=Fw(t**2,o),d=-i(t)+jw>0?-1:1;return d*((s-c)*l)/u}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-jw+r*i},a=t=>{let r=Math.exp(-t*e),i=(n-t)*(e*e);return r*i});let s=5/e,c=Pw(i,a,s);if(e=FS(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}}}const Nw=12;function Pw(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}function Fw(e,t){return e*Math.sqrt(1-t*t)}const Iw=[`duration`,`bounce`],Lw=[`stiffness`,`damping`,`mass`];function Rw(e,t){return t.some(t=>e[t]!==void 0)}function zw(e){let t={velocity:$.velocity,stiffness:$.stiffness,damping:$.damping,mass:$.mass,isResolvedFromDuration:!1,...e};if(!Rw(e,Lw)&&Rw(e,Iw))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*xS(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:$.mass,stiffness:i,damping:a}}else{let n=Mw(e);t={...t,...n,mass:$.mass},t.isResolvedFromDuration=!0}return t}function Bw(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}=zw({...n,velocity:-IS(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=IS(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=Fw(_,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?FS(m):Aw(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(Dw(b),Ew),t=Tw(t=>b.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return b}Bw.applyToOptions=e=>{let t=Ow(e,100,Bw);return e.ease=t.ease,e.duration=FS(t.duration),e.type=`keyframes`,e};function Vw({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=Bw({keyframes:[f.value,m(f.value)],velocity:Aw(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 Hw(e,t,n){let r=[],i=n||TS.mix||Cw,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]||AS:t;a=MS(e,a)}r.push(a)}return r}function Uw(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(wS(a===t.length,`Both input and output ranges must be the same length`,`range-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=Hw(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=NS(e[r],e[r+1],n);return s[r](i)};return n?t=>l(xS(e[0],e[a-1],t)):l}function Ww(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=NS(0,t,r);e.push(Q(n,1,i))}}function Gw(e){let t=[0];return Ww(t,e.length-1),t}function Kw(e,t){return e.map(e=>e*t)}function qw(e,t){return e.map(()=>t||nC).splice(0,e.length-1)}function Jw({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=rC(r)?r.map(sC):sC(r),a={done:!1,value:t[0]},o=Kw(n&&n.length===t.length?n:Gw(t),e),s=Uw(o,t,{ease:Array.isArray(i)?i:qw(t,i)});return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}const Yw=e=>e!==null;function Xw(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Yw),o=i<0||t&&n!==`loop`&&t%2==1,s=o?0:a.length-1;return!s||r===void 0?a[s]:r}const Zw={decay:Vw,inertia:Vw,tween:Jw,keyframes:Jw,spring:Bw};function Qw(e){typeof e.type==`string`&&(e.type=Zw[e.type])}var $w=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 eT=e=>e/100;var tT=class extends $w{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!==vC.now()&&this.tick(vC.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},yC.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Qw(e);let{type:t=Jw,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Jw;process.env.NODE_ENV!==`production`&&s!==Jw&&wS(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,`spring-two-frames`),s!==Jw&&typeof o[0]!=`number`&&(this.mixKeyframes=MS(eT,Cw(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=Dw(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=xS(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!==Vw&&(b.value=Xw(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 IS(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+IS(e)}get time(){return IS(this.currentTime)}set time(e){e=FS(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(vC.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=IS(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=ww,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(vC.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,yC.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 nT(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const rT=e=>e*180/Math.PI,iT=e=>{let t=rT(Math.atan2(e[1],e[0]));return oT(t)},aT={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:iT,rotateZ:iT,skewX:e=>rT(Math.atan(e[1])),skewY:e=>rT(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},oT=e=>(e%=360,e<0&&(e+=360),e),sT=iT,cT=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),lT=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),uT={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:cT,scaleY:lT,scale:e=>(cT(e)+lT(e))/2,rotateX:e=>oT(rT(Math.atan2(e[6],e[5]))),rotateY:e=>oT(rT(Math.atan2(-e[2],e[0]))),rotateZ:sT,rotate:sT,skewX:e=>rT(Math.atan(e[4])),skewY:e=>rT(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function dT(e){return e.includes(`scale`)?1:0}function fT(e,t){if(!e||e===`none`)return dT(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=uT,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=aT,i=t}if(!i)return dT(t);let a=r[t],o=i[1].split(`,`).map(mT);return typeof a==`function`?a(o):o[a]}const pT=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return fT(n,t)};function mT(e){return parseFloat(e.trim())}const hT=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],gT=(()=>new Set(hT))(),_T=e=>e===TC||e===Z,vT=new Set([`x`,`y`,`z`]),yT=hT.filter(e=>!vT.has(e));function bT(e){let t=[];return yT.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}const xT={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})=>fT(t,`x`),y:(e,{transform:t})=>fT(t,`y`)};xT.translateX=xT.x,xT.translateY=xT.y;const ST=new Set;let CT=!1,wT=!1,TT=!1;function ET(){if(wT){let e=Array.from(ST).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=bT(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)})}wT=!1,CT=!1,ST.forEach(e=>e.complete(TT)),ST.clear()}function DT(){ST.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wT=!0)})}function OT(){TT=!0,DT(),ET(),TT=!1}var kT=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?(ST.add(this),CT||(CT=!0,X.read(DT),X.resolveKeyframes(ET))):(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])}nT(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ST.delete(this)}cancel(){this.state===`scheduled`&&(ST.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}};const AT=e=>e.startsWith(`--`);function jT(e,t,n){AT(t)?e.style.setProperty(t,n):e.style[t]=n}const MT=kS(()=>window.ScrollTimeline!==void 0),NT={};function PT(e,t){let n=kS(e);return()=>NT[t]??n()}const FT=PT(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),IT=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,LT={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:IT([0,.65,.55,1]),circOut:IT([.55,0,1,.45]),backIn:IT([.31,.01,.66,-.59]),backOut:IT([.33,1.53,.69,.99])};function RT(e,t){if(e)return typeof e==`function`?FT()?Tw(e,t):`ease-out`:iC(e)?IT(e):Array.isArray(e)?e.map(e=>RT(e,t)||LT.easeOut):LT[e]}function zT(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=RT(s,i);Array.isArray(d)&&(u.easing=d),lC.value&&yC.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 lC.value&&p.finished.finally(()=>{yC.waapi--}),p}function BT(e){return typeof e==`function`&&`applyToOptions`in e}function VT({type:e,...t}){return BT(e)&&FT()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var HT=class extends $w{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,wS(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=VT(e);this.animation=zT(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Xw(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):jT(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 IS(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+IS(e)}get time(){return IS(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=FS(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&&MT()?(this.animation.timeline=e,AS):t(this)}};const UT={anticipate:XS,backInOut:YS,circInOut:$S};function WT(e){return e in UT}function GT(e){typeof e.ease==`string`&&WT(e.ease)&&(e.ease=UT[e.ease])}const KT=10;var qT=class extends HT{constructor(e){GT(e),Qw(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 tT({...a,autoplay:!1}),s=FS(this.finishedTime??this.time);t.setWithVelocity(o.sample(s-10).value,o.sample(s).value,10),o.stop()}};const JT=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(ow.test(e)||e===`0`)&&!e.startsWith(`url(`));function YT(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 XT(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=JT(i,t),s=JT(a,t);return CS(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,`value-not-animatable`),!o||!s?!1:YT(e)||(n===`spring`||BT(n))&&r}function ZT(e){e.duration=0,e.type=`keyframes`}const QT=new Set([`opacity`,`clipPath`,`filter`,`transform`]),$T=kS(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function eE(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 $T()&&n&&QT.has(n)&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}const tE=40;var nE=class extends $w{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=vC.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||kT;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=vC.now(),XT(e,i,a,o)||((TS.instantAnimations||!s)&&l?.(Xw(e,n,t)),e[0]=e[e.length-1],ZT(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&&eE(d)?new qT({...d,element:d.motionValue.owner.current}):new tT(d);f.finished.then(()=>this.notifyFinished()).catch(AS),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(),OT()),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 rE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function iE(e){let t=rE.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}const aE=4;function oE(e,t,n=1){wS(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=iE(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return ES(e)?parseFloat(e):e}return CC(i)?oE(i,t,n+1):i}function sE(e,t){return e?.[t]??e?.default??e}const cE=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...hT]),lE={test:e=>e===`auto`,parse:e=>e},uE=e=>t=>t.test(e),dE=[TC,Z,VC,BC,UC,HC,lE],fE=e=>dE.find(uE(e));function pE(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||OS(e)}const mE=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function hE(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(kC)||[];if(!r)return e;let i=n.replace(r,``),a=mE.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}const gE=/\b([a-z-]*)\(.*?\)/gu,_E={...ow,getAnimatableNone:e=>{let t=e.match(gE);return t?t.map(hE).join(` `):e}},vE={...TC,transform:Math.round},yE={rotate:BC,rotateX:BC,rotateY:BC,rotateZ:BC,scale:DC,scaleX:DC,scaleY:DC,scaleZ:DC,skew:BC,skewX:BC,skewY:BC,distance:Z,translateX:Z,translateY:Z,translateZ:Z,x:Z,y:Z,z:Z,perspective:Z,transformPerspective:Z,opacity:EC,originX:WC,originY:WC,originZ:Z},bE={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,...yE,zIndex:vE,fillOpacity:EC,strokeOpacity:EC,numOctaves:vE},xE={...bE,color:KC,backgroundColor:KC,outlineColor:KC,fill:KC,stroke:KC,borderColor:KC,borderTopColor:KC,borderRightColor:KC,borderBottomColor:KC,borderLeftColor:KC,filter:_E,WebkitFilter:_E},SE=e=>xE[e];function CE(e,t){let n=SE(e);return n!==_E&&(n=ow),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const wE=new Set([`auto`,`none`,`0`]);function TE(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!wE.has(t)&&tw(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=CE(n,i)}var EE=class extends kT{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(),CC(r))){let i=oE(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!cE.has(n)||e.length!==2)return;let[r,i]=e,a=fE(r),o=fE(i);if(a!==o)if(_T(a)&&_T(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else xT[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||pE(e[t]))&&n.push(t);n.length&&TE(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=xT[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]=xT[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 DE(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 OE=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function kE(e){return DS(e)&&`offsetHeight`in e}const AE=30,jE=e=>!isNaN(parseFloat(e)),ME={current:void 0};var NE=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=vC.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=vC.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=jE(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!==`production`&&zS(!1,`value.onChange(callback) is deprecated. Switch to value.on("change", callback).`),this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new PS);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 ME.current&&ME.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=vC.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return LS(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 PE(e,t){return new NE(e,t)}const{schedule:FE,cancel:IE}=fC(queueMicrotask,!1),LE={x:!1,y:!1};function RE(){return LE.x||LE.y}function zE(e){return e===`x`||e===`y`?LE[e]?null:(LE[e]=!0,()=>{LE[e]=!1}):LE.x||LE.y?null:(LE.x=LE.y=!0,()=>{LE.x=LE.y=!1})}function BE(e,t){let n=DE(e),r=new AbortController,i={passive:!0,...t,signal:r.signal},a=()=>r.abort();return[n,i,a]}function VE(e){return!(e.pointerType===`touch`||RE())}function HE(e,t,n={}){let[r,i,a]=BE(e,n),o=e=>{if(!VE(e))return;let{target:n}=e,r=t(n,e);if(typeof r!=`function`||!n)return;let a=e=>{VE(e)&&(r(e),n.removeEventListener(`pointerleave`,a))};n.addEventListener(`pointerleave`,a,i)};return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}const UE=(e,t)=>t?e===t?!0:UE(e,t.parentElement):!1,WE=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,GE=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function KE(e){return GE.has(e.tagName)||e.tabIndex!==-1}const qE=new WeakSet;function JE(e){return t=>{t.key===`Enter`&&e(t)}}function YE(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}const XE=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=JE(()=>{if(qE.has(n))return;YE(n,`down`);let e=JE(()=>{YE(n,`up`)}),r=()=>YE(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 ZE(e){return WE(e)&&!RE()}function QE(e,t,n={}){let[r,i,a]=BE(e,n),o=e=>{let r=e.currentTarget;if(!ZE(e))return;qE.add(r);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),qE.has(r)&&qE.delete(r),ZE(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||UE(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),kE(e)&&(e.addEventListener(`focus`,e=>XE(e,i)),!KE(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function $E(e){return DS(e)&&`ownerSVGElement`in e}function eD(e){return $E(e)&&e.tagName===`svg`}const tD=e=>!!(e&&e.getVelocity),nD=[...dE,KC,ow],rD=e=>nD.find(uE(e)),iD=(0,f.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function aD(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function oD(...e){return t=>{let n=!1,r=e.map(e=>{let r=aD(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():aD(e[t],null)}}}}function sD(...e){return f.useCallback(oD(...e),e)}var cD=class extends f.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=t.offsetParent,n=kE(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 lD({children:e,isPresent:t,anchorX:n,root:r}){let i=(0,f.useId)(),a=(0,f.useRef)(null),o=(0,f.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,f.useContext)(iD),c=sD(a,e?.ref);return(0,f.useInsertionEffect)(()=>{let{width:e,height:c,top:l,left:u,right:d}=o.current;if(t||!a.current||!e||!c)return;let f=n===`left`?`left: ${u}`:`right: ${d}`;a.current.dataset.motionPopId=i;let p=document.createElement(`style`);s&&(p.nonce=s);let m=r??document.head;return m.appendChild(p),p.sheet&&p.sheet.insertRule(`
|
|
72
|
+
} tw:focus:z-40 tw:focus:border tw:rounded-none tw:last:rounded-r-md`,...e.buttonProps},t):(0,p.jsx)(`div`,{className:`${pS} ${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))]})}),vS=(0,f.createContext)({});function yS(e){let t=(0,f.useRef)(null);return t.current===null&&(t.current=e()),t.current}const bS=typeof window<`u`,xS=bS?f.useLayoutEffect:f.useEffect,SS=(0,f.createContext)(null);function CS(e,t){e.indexOf(t)===-1&&e.push(t)}function wS(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}const TS=(e,t,n)=>n>t?t:n<e?e:n;function ES(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let DS=()=>{},OS=()=>{};process.env.NODE_ENV!==`production`&&(DS=(e,t,n)=>{!e&&typeof console<`u`&&console.warn(ES(t,n))},OS=(e,t,n)=>{if(!e)throw Error(ES(t,n))});const kS={},AS=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function jS(e){return typeof e==`object`&&!!e}const MS=e=>/^0[^.\s]+$/u.test(e);function NS(e){let t;return()=>(t===void 0&&(t=e()),t)}const PS=e=>e,FS=(e,t)=>n=>t(e(n)),IS=(...e)=>e.reduce(FS),LS=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r};var RS=class{constructor(){this.subscriptions=[]}add(e){return CS(this.subscriptions,e),()=>wS(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 zS=e=>e*1e3,BS=e=>e/1e3;function VS(e,t){return t?e*(1e3/t):0}const HS=new Set;function US(e,t,n){e||HS.has(t)||(console.warn(ES(t,n)),HS.add(t))}const WS=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,GS=1e-7,KS=12;function qS(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=WS(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>1e-7&&++s<12);return o}function JS(e,t,n,r){if(e===t&&n===r)return PS;let i=t=>qS(t,0,1,e,n);return e=>e===0||e===1?e:WS(i(e),t,r)}const YS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,XS=e=>t=>1-e(1-t),ZS=JS(.33,1.53,.69,.99),QS=XS(ZS),$S=YS(QS),eC=e=>(e*=2)<1?.5*QS(e):.5*(2-2**(-10*(e-1))),tC=e=>1-Math.sin(Math.acos(e)),nC=XS(tC),rC=YS(tC),iC=JS(.42,0,1,1),aC=JS(0,0,.58,1),oC=JS(.42,0,.58,1),sC=e=>Array.isArray(e)&&typeof e[0]!=`number`,cC=e=>Array.isArray(e)&&typeof e[0]==`number`,lC={linear:PS,easeIn:iC,easeInOut:oC,easeOut:aC,circIn:tC,circInOut:rC,circOut:nC,backIn:QS,backInOut:$S,backOut:ZS,anticipate:eC},uC=e=>typeof e==`string`,dC=e=>{if(cC(e)){OS(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return JS(t,n,r,i)}else if(uC(e))return OS(lC[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),lC[e];return e},fC=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],pC={value:null,addProjectionMetrics:null};function mC(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&&pC.value&&pC.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}const hC=40;function gC(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=fC.reduce((e,n)=>(e[n]=mC(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=kS.useManualTiming?i.timestamp:performance.now();n=!1,kS.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)},_=fC.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<fC.length;t++)o[fC[t]].cancel(e)};return{schedule:_,cancel:v,state:i,steps:o}}const{schedule:X,cancel:_C,state:vC,steps:yC}=gC(typeof requestAnimationFrame<`u`?requestAnimationFrame:PS,!0);let bC;function xC(){bC=void 0}const SC={now:()=>(bC===void 0&&SC.set(vC.isProcessing||kS.useManualTiming?vC.timestamp:performance.now()),bC),set:e=>{bC=e,queueMicrotask(xC)}},CC={layout:0,mainThread:0,waapi:0},wC=e=>t=>typeof t==`string`&&t.startsWith(e),TC=wC(`--`),EC=wC(`var(--`),DC=e=>{let t=EC(e);return t?OC.test(e.split(`/*`)[0].trim()):!1},OC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,kC={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},AC={...kC,transform:e=>TS(0,1,e)},jC={...kC,default:1},MC=e=>Math.round(e*1e5)/1e5,NC=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function PC(e){return e==null}const FC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,IC=(e,t)=>n=>!!(typeof n==`string`&&FC.test(n)&&n.startsWith(e)||t&&!PC(n)&&Object.prototype.hasOwnProperty.call(n,t)),LC=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(NC);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},RC=e=>TS(0,255,e),zC={...kC,transform:e=>Math.round(RC(e))},BC={test:IC(`rgb`,`red`),parse:LC(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+zC.transform(e)+`, `+zC.transform(t)+`, `+zC.transform(n)+`, `+MC(AC.transform(r))+`)`};function VC(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 HC={test:IC(`#`),parse:VC,transform:BC.transform},UC=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),WC=UC(`deg`),GC=UC(`%`),Z=UC(`px`),KC=UC(`vh`),qC=UC(`vw`),JC=(()=>({...GC,parse:e=>GC.parse(e)/100,transform:e=>GC.transform(e*100)}))(),YC={test:IC(`hsl`,`hue`),parse:LC(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+GC.transform(MC(t))+`, `+GC.transform(MC(n))+`, `+MC(AC.transform(r))+`)`},XC={test:e=>BC.test(e)||HC.test(e)||YC.test(e),parse:e=>BC.test(e)?BC.parse(e):YC.test(e)?YC.parse(e):HC.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?BC.transform(e):YC.transform(e),getAnimatableNone:e=>{let t=XC.parse(e);return t.alpha=0,XC.transform(t)}},ZC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function QC(e){return isNaN(e)&&typeof e==`string`&&(e.match(NC)?.length||0)+(e.match(ZC)?.length||0)>0}const $C=`number`,ew=`color`,tw=`var`,nw=`var(`,rw="${}",iw=/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 aw(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0,o=t.replace(iw,e=>(XC.test(e)?(r.color.push(a),i.push(ew),n.push(XC.parse(e))):e.startsWith(`var(`)?(r.var.push(a),i.push(`var`),n.push(e)):(r.number.push(a),i.push($C),n.push(parseFloat(e))),++a,"${}")),s=o.split("${}");return{values:n,split:s,indexes:r,types:i}}function ow(e){return aw(e).values}function sw(e){let{split:t,types:n}=aw(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===$C?i+=MC(e[a]):t===ew?i+=XC.transform(e[a]):i+=e[a]}return i}}const cw=e=>typeof e==`number`?0:XC.test(e)?XC.getAnimatableNone(e):e;function lw(e){let t=ow(e),n=sw(e);return n(t.map(cw))}const uw={test:QC,parse:ow,createTransformer:sw,getAnimatableNone:lw};function dw(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 fw({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=dw(s,r,e+1/3),a=dw(s,r,e),o=dw(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function pw(e,t){return n=>n>0?t:e}const Q=(e,t,n)=>e+(t-e)*n,mw=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},hw=[HC,BC,YC],gw=e=>hw.find(t=>t.test(e));function _w(e){let t=gw(e);if(DS(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,`color-not-animatable`),!t)return!1;let n=t.parse(e);return t===YC&&(n=fw(n)),n}const vw=(e,t)=>{let n=_w(e),r=_w(t);if(!n||!r)return pw(e,t);let i={...n};return e=>(i.red=mw(n.red,r.red,e),i.green=mw(n.green,r.green,e),i.blue=mw(n.blue,r.blue,e),i.alpha=Q(n.alpha,r.alpha,e),BC.transform(i))},yw=new Set([`none`,`hidden`]);function bw(e,t){return yw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function xw(e,t){return n=>Q(e,t,n)}function Sw(e){return typeof e==`number`?xw:typeof e==`string`?DC(e)?pw:XC.test(e)?vw:Ew:Array.isArray(e)?Cw:typeof e==`object`?XC.test(e)?vw:ww:pw}function Cw(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Sw(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function ww(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Sw(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Tw(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 Ew=(e,t)=>{let n=uw.createTransformer(t),r=aw(e),i=aw(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?yw.has(e)&&!i.values.length||yw.has(t)&&!r.values.length?bw(e,t):IS(Cw(Tw(r,i),i.values),n):(DS(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,`complex-values-different`),pw(e,t))};function Dw(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Q(e,t,n);let r=Sw(e);return r(e,t)}const Ow=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>X.update(t,e),stop:()=>_C(t),now:()=>vC.isProcessing?vC.timestamp:SC.now()}},kw=(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)})`},Aw=2e4;function jw(e){let t=0,n=e.next(t);for(;!n.done&&t<Aw;)t+=50,n=e.next(t);return t>=Aw?1/0:t}function Mw(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(jw(r),Aw);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:BS(i)}}const Nw=5;function Pw(e,t,n){let r=Math.max(t-5,0);return VS(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},Fw=.001;function Iw({duration:e=$.duration,bounce:t=$.bounce,velocity:n=$.velocity,mass:r=$.mass}){let i,a;DS(e<=zS($.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=TS($.minDamping,$.maxDamping,o),e=TS($.minDuration,$.maxDuration,BS(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=zw(t,o),c=Math.exp(-i);return Fw-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=zw(t**2,o),d=-i(t)+Fw>0?-1:1;return d*((s-c)*l)/u}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Fw+r*i},a=t=>{let r=Math.exp(-t*e),i=(n-t)*(e*e);return r*i});let s=5/e,c=Rw(i,a,s);if(e=zS(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}}}const Lw=12;function Rw(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}function zw(e,t){return e*Math.sqrt(1-t*t)}const Bw=[`duration`,`bounce`],Vw=[`stiffness`,`damping`,`mass`];function Hw(e,t){return t.some(t=>e[t]!==void 0)}function Uw(e){let t={velocity:$.velocity,stiffness:$.stiffness,damping:$.damping,mass:$.mass,isResolvedFromDuration:!1,...e};if(!Hw(e,Vw)&&Hw(e,Bw))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*TS(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:$.mass,stiffness:i,damping:a}}else{let n=Iw(e);t={...t,...n,mass:$.mass},t.isResolvedFromDuration=!0}return t}function Ww(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}=Uw({...n,velocity:-BS(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=BS(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=zw(_,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?zS(m):Pw(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(jw(b),Aw),t=kw(t=>b.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return b}Ww.applyToOptions=e=>{let t=Mw(e,100,Ww);return e.ease=t.ease,e.duration=zS(t.duration),e.type=`keyframes`,e};function Gw({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=Ww({keyframes:[f.value,m(f.value)],velocity:Pw(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 Kw(e,t,n){let r=[],i=n||kS.mix||Dw,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]||PS:t;a=IS(e,a)}r.push(a)}return r}function qw(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(OS(a===t.length,`Both input and output ranges must be the same length`,`range-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=Kw(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=LS(e[r],e[r+1],n);return s[r](i)};return n?t=>l(TS(e[0],e[a-1],t)):l}function Jw(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=LS(0,t,r);e.push(Q(n,1,i))}}function Yw(e){let t=[0];return Jw(t,e.length-1),t}function Xw(e,t){return e.map(e=>e*t)}function Zw(e,t){return e.map(()=>t||oC).splice(0,e.length-1)}function Qw({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=sC(r)?r.map(dC):dC(r),a={done:!1,value:t[0]},o=Xw(n&&n.length===t.length?n:Yw(t),e),s=qw(o,t,{ease:Array.isArray(i)?i:Zw(t,i)});return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}const $w=e=>e!==null;function eT(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter($w),o=i<0||t&&n!==`loop`&&t%2==1,s=o?0:a.length-1;return!s||r===void 0?a[s]:r}const tT={decay:Gw,inertia:Gw,tween:Qw,keyframes:Qw,spring:Ww};function nT(e){typeof e.type==`string`&&(e.type=tT[e.type])}var rT=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 iT=e=>e/100;var aT=class extends rT{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!==SC.now()&&this.tick(SC.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},CC.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;nT(e);let{type:t=Qw,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Qw;process.env.NODE_ENV!==`production`&&s!==Qw&&OS(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,`spring-two-frames`),s!==Qw&&typeof o[0]!=`number`&&(this.mixKeyframes=IS(iT,Dw(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=jw(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=TS(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!==Gw&&(b.value=eT(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 BS(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+BS(e)}get time(){return BS(this.currentTime)}set time(e){e=zS(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(SC.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=BS(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Ow,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(SC.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,CC.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 oT(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const sT=e=>e*180/Math.PI,cT=e=>{let t=sT(Math.atan2(e[1],e[0]));return uT(t)},lT={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:cT,rotateZ:cT,skewX:e=>sT(Math.atan(e[1])),skewY:e=>sT(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},uT=e=>(e%=360,e<0&&(e+=360),e),dT=cT,fT=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),pT=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),mT={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:fT,scaleY:pT,scale:e=>(fT(e)+pT(e))/2,rotateX:e=>uT(sT(Math.atan2(e[6],e[5]))),rotateY:e=>uT(sT(Math.atan2(-e[2],e[0]))),rotateZ:dT,rotate:dT,skewX:e=>sT(Math.atan(e[4])),skewY:e=>sT(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function hT(e){return e.includes(`scale`)?1:0}function gT(e,t){if(!e||e===`none`)return hT(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=mT,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=lT,i=t}if(!i)return hT(t);let a=r[t],o=i[1].split(`,`).map(vT);return typeof a==`function`?a(o):o[a]}const _T=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return gT(n,t)};function vT(e){return parseFloat(e.trim())}const yT=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],bT=(()=>new Set(yT))(),xT=e=>e===kC||e===Z,ST=new Set([`x`,`y`,`z`]),CT=yT.filter(e=>!ST.has(e));function wT(e){let t=[];return CT.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}const TT={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})=>gT(t,`x`),y:(e,{transform:t})=>gT(t,`y`)};TT.translateX=TT.x,TT.translateY=TT.y;const ET=new Set;let DT=!1,OT=!1,kT=!1;function AT(){if(OT){let e=Array.from(ET).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=wT(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)})}OT=!1,DT=!1,ET.forEach(e=>e.complete(kT)),ET.clear()}function jT(){ET.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(OT=!0)})}function MT(){kT=!0,jT(),AT(),kT=!1}var NT=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?(ET.add(this),DT||(DT=!0,X.read(jT),X.resolveKeyframes(AT))):(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])}oT(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ET.delete(this)}cancel(){this.state===`scheduled`&&(ET.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}};const PT=e=>e.startsWith(`--`);function FT(e,t,n){PT(t)?e.style.setProperty(t,n):e.style[t]=n}const IT=NS(()=>window.ScrollTimeline!==void 0),LT={};function RT(e,t){let n=NS(e);return()=>LT[t]??n()}const zT=RT(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),BT=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,VT={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:BT([0,.65,.55,1]),circOut:BT([.55,0,1,.45]),backIn:BT([.31,.01,.66,-.59]),backOut:BT([.33,1.53,.69,.99])};function HT(e,t){if(e)return typeof e==`function`?zT()?kw(e,t):`ease-out`:cC(e)?BT(e):Array.isArray(e)?e.map(e=>HT(e,t)||VT.easeOut):VT[e]}function UT(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=HT(s,i);Array.isArray(d)&&(u.easing=d),pC.value&&CC.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 pC.value&&p.finished.finally(()=>{CC.waapi--}),p}function WT(e){return typeof e==`function`&&`applyToOptions`in e}function GT({type:e,...t}){return WT(e)&&zT()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var KT=class extends rT{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,OS(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=GT(e);this.animation=UT(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=eT(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):FT(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 BS(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+BS(e)}get time(){return BS(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=zS(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&&IT()?(this.animation.timeline=e,PS):t(this)}};const qT={anticipate:eC,backInOut:$S,circInOut:rC};function JT(e){return e in qT}function YT(e){typeof e.ease==`string`&&JT(e.ease)&&(e.ease=qT[e.ease])}const XT=10;var ZT=class extends KT{constructor(e){YT(e),nT(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 aT({...a,autoplay:!1}),s=zS(this.finishedTime??this.time);t.setWithVelocity(o.sample(s-10).value,o.sample(s).value,10),o.stop()}};const QT=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(uw.test(e)||e===`0`)&&!e.startsWith(`url(`));function $T(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 eE(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=QT(i,t),s=QT(a,t);return DS(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,`value-not-animatable`),!o||!s?!1:$T(e)||(n===`spring`||WT(n))&&r}function tE(e){e.duration=0,e.type=`keyframes`}const nE=new Set([`opacity`,`clipPath`,`filter`,`transform`]),rE=NS(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function iE(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 rE()&&n&&nE.has(n)&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}const aE=40;var oE=class extends rT{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=SC.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||NT;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=SC.now(),eE(e,i,a,o)||((kS.instantAnimations||!s)&&l?.(eT(e,n,t)),e[0]=e[e.length-1],tE(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&&iE(d)?new ZT({...d,element:d.motionValue.owner.current}):new aT(d);f.finished.then(()=>this.notifyFinished()).catch(PS),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(),MT()),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 sE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cE(e){let t=sE.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}const lE=4;function uE(e,t,n=1){OS(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=cE(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return AS(e)?parseFloat(e):e}return DC(i)?uE(i,t,n+1):i}function dE(e,t){return e?.[t]??e?.default??e}const fE=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...yT]),pE={test:e=>e===`auto`,parse:e=>e},mE=e=>t=>t.test(e),hE=[kC,Z,GC,WC,qC,KC,pE],gE=e=>hE.find(mE(e));function _E(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||MS(e)}const vE=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function yE(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(NC)||[];if(!r)return e;let i=n.replace(r,``),a=vE.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}const bE=/\b([a-z-]*)\(.*?\)/gu,xE={...uw,getAnimatableNone:e=>{let t=e.match(bE);return t?t.map(yE).join(` `):e}},SE={...kC,transform:Math.round},CE={rotate:WC,rotateX:WC,rotateY:WC,rotateZ:WC,scale:jC,scaleX:jC,scaleY:jC,scaleZ:jC,skew:WC,skewX:WC,skewY:WC,distance:Z,translateX:Z,translateY:Z,translateZ:Z,x:Z,y:Z,z:Z,perspective:Z,transformPerspective:Z,opacity:AC,originX:JC,originY:JC,originZ:Z},wE={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,...CE,zIndex:SE,fillOpacity:AC,strokeOpacity:AC,numOctaves:SE},TE={...wE,color:XC,backgroundColor:XC,outlineColor:XC,fill:XC,stroke:XC,borderColor:XC,borderTopColor:XC,borderRightColor:XC,borderBottomColor:XC,borderLeftColor:XC,filter:xE,WebkitFilter:xE},EE=e=>TE[e];function DE(e,t){let n=EE(e);return n!==xE&&(n=uw),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const OE=new Set([`auto`,`none`,`0`]);function kE(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!OE.has(t)&&aw(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=DE(n,i)}var AE=class extends NT{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(),DC(r))){let i=uE(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!fE.has(n)||e.length!==2)return;let[r,i]=e,a=gE(r),o=gE(i);if(a!==o)if(xT(a)&&xT(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else TT[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||_E(e[t]))&&n.push(t);n.length&&kE(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=TT[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]=TT[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 jE(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 ME=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function NE(e){return jS(e)&&`offsetHeight`in e}const PE=30,FE=e=>!isNaN(parseFloat(e)),IE={current:void 0};var LE=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=SC.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=SC.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=FE(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!==`production`&&US(!1,`value.onChange(callback) is deprecated. Switch to value.on("change", callback).`),this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new RS);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 IE.current&&IE.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=SC.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return VS(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 RE(e,t){return new LE(e,t)}const{schedule:zE,cancel:BE}=gC(queueMicrotask,!1),VE={x:!1,y:!1};function HE(){return VE.x||VE.y}function UE(e){return e===`x`||e===`y`?VE[e]?null:(VE[e]=!0,()=>{VE[e]=!1}):VE.x||VE.y?null:(VE.x=VE.y=!0,()=>{VE.x=VE.y=!1})}function WE(e,t){let n=jE(e),r=new AbortController,i={passive:!0,...t,signal:r.signal},a=()=>r.abort();return[n,i,a]}function GE(e){return!(e.pointerType===`touch`||HE())}function KE(e,t,n={}){let[r,i,a]=WE(e,n),o=e=>{if(!GE(e))return;let{target:n}=e,r=t(n,e);if(typeof r!=`function`||!n)return;let a=e=>{GE(e)&&(r(e),n.removeEventListener(`pointerleave`,a))};n.addEventListener(`pointerleave`,a,i)};return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}const qE=(e,t)=>t?e===t?!0:qE(e,t.parentElement):!1,JE=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,YE=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function XE(e){return YE.has(e.tagName)||e.tabIndex!==-1}const ZE=new WeakSet;function QE(e){return t=>{t.key===`Enter`&&e(t)}}function $E(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}const eD=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=QE(()=>{if(ZE.has(n))return;$E(n,`down`);let e=QE(()=>{$E(n,`up`)}),r=()=>$E(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 tD(e){return JE(e)&&!HE()}function nD(e,t,n={}){let[r,i,a]=WE(e,n),o=e=>{let r=e.currentTarget;if(!tD(e))return;ZE.add(r);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),ZE.has(r)&&ZE.delete(r),tD(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||qE(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),NE(e)&&(e.addEventListener(`focus`,e=>eD(e,i)),!XE(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function rD(e){return jS(e)&&`ownerSVGElement`in e}function iD(e){return rD(e)&&e.tagName===`svg`}const aD=e=>!!(e&&e.getVelocity),oD=[...hE,XC,uw],sD=e=>oD.find(mE(e)),cD=(0,f.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function lD(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function uD(...e){return t=>{let n=!1,r=e.map(e=>{let r=lD(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():lD(e[t],null)}}}}function dD(...e){return f.useCallback(uD(...e),e)}var fD=class extends f.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=t.offsetParent,n=NE(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 pD({children:e,isPresent:t,anchorX:n,root:r}){let i=(0,f.useId)(),a=(0,f.useRef)(null),o=(0,f.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,f.useContext)(cD),c=dD(a,e?.ref);return(0,f.useInsertionEffect)(()=>{let{width:e,height:c,top:l,left:u,right:d}=o.current;if(t||!a.current||!e||!c)return;let f=n===`left`?`left: ${u}`:`right: ${d}`;a.current.dataset.motionPopId=i;let p=document.createElement(`style`);s&&(p.nonce=s);let m=r??document.head;return m.appendChild(p),p.sheet&&p.sheet.insertRule(`
|
|
73
73
|
[data-motion-pop-id="${i}"] {
|
|
74
74
|
position: absolute !important;
|
|
75
75
|
width: ${e}px !important;
|
|
@@ -77,10 +77,10 @@ http://jedwatson.github.io/classnames
|
|
|
77
77
|
${f}px !important;
|
|
78
78
|
top: ${l}px !important;
|
|
79
79
|
}
|
|
80
|
-
`),()=>{m.contains(p)&&m.removeChild(p)}},[t]),(0,p.jsx)(cD,{isPresent:t,childRef:a,sizeRef:o,children:f.cloneElement(e,{ref:c})})}const uD=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,root:c})=>{let l=hS(dD),u=(0,f.useId)(),d=!0,m=(0,f.useMemo)(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:e=>{l.set(e,!0);for(let e of l.values())if(!e)return;r&&r()},register:e=>(l.set(e,!1),()=>l.delete(e))}),[n,l,r]);return a&&d&&(m={...m}),(0,f.useMemo)(()=>{l.forEach((e,t)=>l.set(t,!1))},[n]),f.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o===`popLayout`&&(e=(0,p.jsx)(lD,{isPresent:n,anchorX:s,root:c,children:e})),(0,p.jsx)(vS.Provider,{value:m,children:e})};function dD(){return new Map}function fD(e=!0){let t=(0,f.useContext)(vS);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,f.useId)();(0,f.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,f.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const pD=e=>e.key||``;function mD(e){let t=[];return f.Children.forEach(e,e=>{(0,f.isValidElement)(e)&&t.push(e)}),t}const hD=({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,u]=fD(o),d=(0,f.useMemo)(()=>mD(e),[e]),m=o&&!l?[]:d.map(pD),h=(0,f.useRef)(!0),g=(0,f.useRef)(d),_=hS(()=>new Map),[v,y]=(0,f.useState)(d),[b,x]=(0,f.useState)(d);_S(()=>{h.current=!1,g.current=d;for(let e=0;e<b.length;e++){let t=pD(b[e]);m.includes(t)?_.delete(t):_.get(t)!==!0&&_.set(t,!1)}},[b,m.length,m.join(`-`)]);let S=[];if(d!==v){let e=[...d];for(let t=0;t<b.length;t++){let n=b[t],r=pD(n);m.includes(r)||(e.splice(t,0,n),S.push(n))}return a===`wait`&&S.length&&(e=S),x(mD(e)),y(d),null}process.env.NODE_ENV!==`production`&&a===`wait`&&b.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);let{forceRender:C}=(0,f.useContext)(mS);return(0,p.jsx)(p.Fragment,{children:b.map(e=>{let f=pD(e),v=o&&!l?!1:d===b||m.includes(f),y=()=>{if(_.has(f))_.set(f,!0);else return;let e=!0;_.forEach(t=>{t||(e=!1)}),e&&(C?.(),x(g.current),o&&u?.(),r&&r())};return(0,p.jsx)(uD,{isPresent:v,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:c,onExitComplete:v?void 0:y,anchorX:s,children:e},f)})})},gD=(0,f.createContext)({strict:!1}),_D={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`]},vD={};for(let e in _D)vD[e]={isEnabled:t=>_D[e].some(e=>!!t[e])};function yD(e){for(let t in e)vD[t]={...vD[t],...e[t]}}const bD=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 xD(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||bD.has(e)}var SD={};c(SD,{default:()=>wD});var CD,wD,TD=o((()=>{du(),CD=/^((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)-.*))$/,wD=uu(function(e){return CD.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})}));let ED=e=>!xD(e);function DD(e){typeof e==`function`&&(ED=t=>t.startsWith(`on`)?!xD(t):e(t))}try{DD((TD(),d(SD)).default)}catch{}function OD(e,t,n){let r={};for(let i in e){if(i===`values`&&typeof e.values==`object`)continue;(ED(i)||n===!0&&xD(i)||!t&&!xD(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i])}return r}const kD=(0,f.createContext)({});function AD(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function jD(e){return typeof e==`string`||Array.isArray(e)}const MD=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],ND=[`initial`,...MD];function PD(e){return AD(e.animate)||ND.some(t=>jD(e[t]))}function FD(e){return!!(PD(e)||e.variants)}function ID(e,t){if(PD(e)){let{initial:t,animate:n}=e;return{initial:t===!1||jD(t)?t:void 0,animate:jD(n)?n:void 0}}return e.inherit===!1?{}:t}function LD(e){let{initial:t,animate:n}=ID(e,(0,f.useContext)(kD));return(0,f.useMemo)(()=>({initial:t,animate:n}),[RD(t),RD(n)])}function RD(e){return Array.isArray(e)?e.join(` `):e}function zD(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const BD={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(Z.test(e))e=parseFloat(e);else return e;let n=zD(e,t.target.x),r=zD(e,t.target.y);return`${n}% ${r}%`}},VD={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=ow.parse(e);if(i.length>5)return r;let a=ow.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)}},HD={borderRadius:{...BD,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:BD,borderTopRightRadius:BD,borderBottomLeftRadius:BD,borderBottomRightRadius:BD,boxShadow:VD};function UD(e,{layout:t,layoutId:n}){return gT.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!HD[e]||e===`opacity`)}const WD={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},GD=hT.length;function KD(e,t,n){let r=``,i=!0;for(let a=0;a<GD;a++){let o=hT[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=OE(s,bE[o]);if(!c){i=!1;let t=WD[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function qD(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(gT.has(e)){o=!0;continue}else if(xC(e)){i[e]=n;continue}else{let t=OE(n,bE[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=KD(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 JD=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function YD(e,t,n){for(let r in t)!tD(t[r])&&!UD(r,n)&&(e[r]=t[r])}function XD({transformTemplate:e},t){return(0,f.useMemo)(()=>{let n=JD();return qD(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ZD(e,t){let n=e.style||{},r={};return YD(r,n,e),Object.assign(r,XD(e,t)),r}function QD(e,t){let n={},r=ZD(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 $D={offset:`stroke-dashoffset`,array:`stroke-dasharray`},eO={offset:`strokeDashoffset`,array:`strokeDasharray`};function tO(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?$D:eO;e[a.offset]=Z.transform(-r);let o=Z.transform(t),s=Z.transform(n);e[a.array]=`${o} ${s}`}function nO(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(qD(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&&tO(d,i,a,o,!1)}const rO=()=>({...JD(),attrs:{}}),iO=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function aO(e,t,n,r){let i=(0,f.useMemo)(()=>{let n=rO();return nO(n,t,iO(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};YD(t,e.style,e),i.style={...t,...i.style}}return i}const oO=[`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 sO(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(oO.indexOf(e)>-1||/[A-Z]/u.test(e))}function cO(e,t,n,{latestValues:r},i,a=!1){let o=sO(e)?aO:QD,s=o(t,r,i,e),c=OD(t,typeof e==`string`,a),l=e===f.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,f.useMemo)(()=>tD(u)?u.get():u,[u]);return(0,f.createElement)(e,{...l,children:d})}function lO(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function uO(e,t,n,r){if(typeof t==`function`){let[i,a]=lO(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]=lO(r);t=t(n===void 0?e.custom:n,i,a)}return t}function dO(e){return tD(e)?e.get():e}function fO({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){let a={latestValues:pO(n,r,i,e),renderState:t()};return a}function pO(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=dO(a[e]);let{initial:o,animate:s}=e,c=PD(e),l=FD(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`&&!AD(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=uO(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 mO=e=>(t,n)=>{let r=(0,f.useContext)(kD),i=(0,f.useContext)(vS),a=()=>fO(e,t,r,i);return n?a():hS(a)};function hO(e,t,n){let{style:r}=e,i={};for(let a in r)(tD(r[a])||t.style&&tD(t.style[a])||UD(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}const gO=mO({scrapeMotionValuesFromProps:hO,createRenderState:JD});function _O(e,t,n){let r=hO(e,t,n);for(let n in e)if(tD(e[n])||tD(t[n])){let t=hT.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}const vO=mO({scrapeMotionValuesFromProps:_O,createRenderState:rO}),yO=Symbol.for(`motionComponentSymbol`);function bO(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function xO(e,t,n){return(0,f.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):bO(n)&&(n.current=r))},[t])}const SO=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),CO=`framerAppearId`,wO=`data-`+SO(`framerAppearId`),TO=(0,f.createContext)({});function EO(e,t,n,r,i){let{visualElement:a}=(0,f.useContext)(kD),o=(0,f.useContext)(gD),s=(0,f.useContext)(vS),c=(0,f.useContext)(iD).reducedMotion,l=(0,f.useRef)(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 u=l.current,d=(0,f.useContext)(TO);u&&!u.projection&&i&&(u.type===`html`||u.type===`svg`)&&DO(l.current,n,i,d);let p=(0,f.useRef)(!1);(0,f.useInsertionEffect)(()=>{u&&p.current&&u.update(n,s)});let m=n[wO],h=(0,f.useRef)(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return _S(()=>{u&&(p.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),h.current&&u.animationState&&u.animationState.animateChanges())}),(0,f.useEffect)(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),!1),u.enteringChildren=void 0)}),u}function DO(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:OO(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&bO(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function OO(e){if(e)return e.options.allowProjection===!1?OO(e.parent):e.projection}function kO(e,{forwardMotionProps:t=!1}={},n,r){n&&yD(n);let i=sO(e)?vO:gO;function a(a,o){let s,c={...(0,f.useContext)(iD),...a,layoutId:AO(a)},{isStatic:l}=c,u=LD(a),d=i(a,l);if(!l&&gS){jO(c,n);let t=MO(c);s=t.MeasureLayout,u.visualElement=EO(e,d,c,r,t.ProjectionNode)}return(0,p.jsxs)(kD.Provider,{value:u,children:[s&&u.visualElement?(0,p.jsx)(s,{visualElement:u.visualElement,...c}):null,cO(e,a,xO(d,u.visualElement,o),d,l,t)]})}a.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let o=(0,f.forwardRef)(a);return o[yO]=e,o}function AO({layoutId:e}){let t=(0,f.useContext)(mS).id;return t&&e!==void 0?t+`-`+e:e}function jO(e,t){let n=(0,f.useContext)(gD).strict;if(process.env.NODE_ENV!==`production`&&t&&n){let t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?CS(!1,t,`lazy-strict-mode`):wS(!1,t,`lazy-strict-mode`)}}function MO(e){let{drag:t,layout:n}=vD;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function NO(e,t){if(typeof Proxy>`u`)return kO;let n=new Map,r=(n,r)=>kO(n,r,e,t),i=(e,t)=>(process.env.NODE_ENV!==`production`&&zS(!1,`motion() is deprecated. Use motion.create() instead.`),r(e,t));return new Proxy(i,{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,kO(a,void 0,e,t)),n.get(a))})}function PO({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function FO({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function IO(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 LO(e){return e===void 0||e===1}function RO({scale:e,scaleX:t,scaleY:n}){return!LO(e)||!LO(t)||!LO(n)}function zO(e){return RO(e)||BO(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function BO(e){return VO(e.x)||VO(e.y)}function VO(e){return e&&e!==`0%`}function HO(e,t,n){let r=e-n,i=t*r;return n+i}function UO(e,t,n,r,i){return i!==void 0&&(e=HO(e,i,r)),HO(e,n,r)+t}function WO(e,t=0,n=1,r,i){e.min=UO(e.min,t,n,r,i),e.max=UO(e.max,t,n,r,i)}function GO(e,{x:t,y:n}){WO(e.x,t.translate,t.scale,t.originPoint),WO(e.y,n.translate,n.scale,n.originPoint)}const KO=.999999999999,qO=1.0000000000001;function JO(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&&ZO(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,GO(e,o)),r&&zO(a.latestValues)&&ZO(e,a.latestValues))}t.x<qO&&t.x>KO&&(t.x=1),t.y<qO&&t.y>KO&&(t.y=1)}function YO(e,t){e.min+=t,e.max+=t}function XO(e,t,n,r,i=.5){let a=Q(e.min,e.max,i);WO(e,t,n,a,r)}function ZO(e,t){XO(e.x,t.x,t.scaleX,t.scale,t.originX),XO(e.y,t.y,t.scaleY,t.scale,t.originY)}function QO(e,t){return PO(IO(e.getBoundingClientRect(),t))}function $O(e,t,n){let r=QO(e,n),{scroll:i}=t;return i&&(YO(r.x,i.offset.x),YO(r.y,i.offset.y)),r}const ek=()=>({translate:0,scale:1,origin:0,originPoint:0}),tk=()=>({x:ek(),y:ek()}),nk=()=>({min:0,max:0}),rk=()=>({x:nk(),y:nk()}),ik={current:null},ak={current:!1};function ok(){if(ak.current=!0,gS)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>ik.current=e.matches;e.addEventListener(`change`,t),t()}else ik.current=!1}const sk=new WeakMap;function ck(e,t,n){for(let r in t){let i=t[r],a=n[r];if(tD(i))e.addValue(r,i);else if(tD(a))e.addValue(r,PE(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,PE(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}const lk=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`];var uk=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=kT,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=vC.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=PD(t),this.isVariantNode=FD(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&&tD(t)&&t.set(s[e])}}mount(e){this.current=e,sk.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)),ak.current||ok(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:ik.current,process.env.NODE_ENV!==`production`&&zS(this.shouldReduceMotion!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),pC(this.notifyUpdate),pC(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=gT.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 vD){let t=vD[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):rk()}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<lk.length;t++){let n=lk[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=ck(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=PE(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`&&(ES(n)||OS(n))?n=parseFloat(n):!rD(n)&&ow.test(t)&&(n=CE(e,t)),this.setBaseTarget(e,tD(n)?n.get():n)),tD(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=uO(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&&!tD(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 PS),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){FE.render(this.render)}},dk=class extends uk{constructor(){super(...arguments),this.KeyframeResolver=EE}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;tD(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function fk(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 pk(e){return window.getComputedStyle(e)}var mk=class extends dk{constructor(){super(...arguments),this.type=`html`,this.renderInstance=fk}readValueFromInstance(e,t){if(gT.has(t))return this.projection?.isProjecting?dT(t):pT(e,t);{let n=pk(e),r=(xC(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return QO(e,t)}build(e,t,n){qD(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return hO(e,t,n)}};const hk=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 gk(e,t,n,r){for(let n in fk(e,t,void 0,r),t.attrs)e.setAttribute(hk.has(n)?n:SO(n),t.attrs[n])}var _k=class extends dk{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=rk}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(gT.has(t)){let e=SE(t);return e&&e.default||0}return t=hk.has(t)?t:SO(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return _O(e,t,n)}build(e,t,n){nO(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){gk(e,t,n,r)}mount(e){this.isSVGTag=iO(e.tagName),super.mount(e)}};const vk=(e,t)=>sO(e)?new _k(t):new mk(t,{allowProjection:e!==f.Fragment});function yk(e,t,n){let r=e.getProps();return uO(r,t,n===void 0?r.custom:n,e)}const bk=e=>Array.isArray(e);function xk(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,PE(n))}function Sk(e){return bk(e)?e[e.length-1]||0:e}function Ck(e,t){let n=yk(e,t),{transitionEnd:r={},transition:i={},...a}=n||{};for(let t in a={...a,...r},a){let n=Sk(a[t]);xk(e,t,n)}}function wk(e){return!!(tD(e)&&e.add)}function Tk(e,t){let n=e.getValue(`willChange`);if(wk(n))return n.add(t);if(!n&&TS.WillChange){let n=new TS.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Ek(e){return e.props[wO]}const Dk=e=>e!==null;function Ok(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(Dk),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}const kk={type:`spring`,stiffness:500,damping:25,restSpeed:10},Ak=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),jk={type:`keyframes`,duration:.8},Mk={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Nk=(e,{keyframes:t})=>t.length>2?jk:gT.has(e)?e.startsWith(`scale`)?Ak(t[1]):kk:Mk;function Pk({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 Fk=(e,t,n,r={},i,a)=>o=>{let s=sE(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=FS(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};Pk(s)||Object.assign(u,Nk(e,u)),u.duration&&=FS(u.duration),u.repeatDelay&&=FS(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ZT(u),u.delay===0&&(d=!0)),(TS.instantAnimations||TS.skipAnimations)&&(d=!0,ZT(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Ok(u.keyframes,s);if(e!==void 0){X.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new tT(u):new nE(u)};function Ik({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Lk(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&&Ik(l,t))continue;let o={delay:n,...sE(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=Ek(e);if(n){let e=window.MotionHandoffAnimation(n,t,X);e!==null&&(o.startTime=e,d=!0)}}Tk(e,t),r.start(Fk(t,r,i,e.shouldReduceMotion&&cE.has(t)?{type:!1}:o,e,d));let f=r.animation;f&&c.push(f)}return o&&Promise.all(c).then(()=>{X.update(()=>{o&&Ck(e,o)})}),c}function Rk(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 zk(e,t,n={}){let r=yk(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(Lk(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Bk(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 Bk(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(zk(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Rk(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Vk(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>zk(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=zk(e,t,n);else{let i=typeof t==`function`?yk(e,t,n.custom):t;r=Promise.all(Lk(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}function Hk(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 Uk=ND.length;function Wk(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&Wk(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<Uk;n++){let r=ND[n],i=e.props[r];(jD(i)||i===!1)&&(t[r]=i)}return t}const Gk=[...MD].reverse(),Kk=MD.length;function qk(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Vk(e,t,n)))}function Jk(e){let t=qk(e),n=Zk(),r=!0,i=t=>(n,r)=>{let i=yk(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=Wk(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<Kk;t++){let f=Gk[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=jD(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||AD(m)||typeof m==`boolean`)continue;let v=Yk(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=bk(t)&&bk(n)?!Hk(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=yk(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Rk(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(l.size){let t={};if(typeof o.initial!=`boolean`){let n=yk(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=Zk()}}}function Yk(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Hk(t,e):!1}function Xk(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Zk(){return{animate:Xk(!0),whileInView:Xk(),whileHover:Xk(),whileTap:Xk(),whileDrag:Xk(),whileFocus:Xk(),exit:Xk()}}var Qk=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},$k=class extends Qk{constructor(e){super(e),e.animationState||=Jk(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();AD(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 eA=0;var tA=class extends Qk{constructor(){super(...arguments),this.id=eA++}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 nA={animation:{Feature:$k},exit:{Feature:tA}};function rA(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function iA(e){return{point:{x:e.pageX,y:e.pageY}}}const aA=e=>t=>WE(t)&&e(t,iA(t));function oA(e,t,n,r){return rA(e,t,aA(n),r)}const sA=1e-4,cA=1-sA,lA=1+sA,uA=.01,dA=0-uA,fA=0+uA;function pA(e){return e.max-e.min}function mA(e,t,n){return Math.abs(e-t)<=n}function hA(e,t,n,r=.5){e.origin=r,e.originPoint=Q(t.min,t.max,e.origin),e.scale=pA(n)/pA(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 gA(e,t,n,r){hA(e.x,t.x,n.x,r?r.originX:void 0),hA(e.y,t.y,n.y,r?r.originY:void 0)}function _A(e,t,n){e.min=n.min+t.min,e.max=e.min+pA(t)}function vA(e,t,n){_A(e.x,t.x,n.x),_A(e.y,t.y,n.y)}function yA(e,t,n){e.min=t.min-n.min,e.max=e.min+pA(t)}function bA(e,t,n){yA(e.x,t.x,n.x),yA(e.y,t.y,n.y)}function xA(e){return[e(`x`),e(`y`)]}const SA=({current:e})=>e?e.ownerDocument.defaultView:null,CA=(e,t)=>Math.abs(e-t);function wA(e,t){let n=CA(e.x,t.x),r=CA(e.y,t.y);return Math.sqrt(n**2+r**2)}var TA=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=OA(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=wA(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=mC;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=EA(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=OA(e.type===`pointercancel`?this.lastMoveEventInfo:EA(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!WE(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let o=iA(e),s=EA(o,this.transformPagePoint),{point:c}=s,{timestamp:l}=mC;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,OA(s,this.history)),this.removeListeners=MS(oA(this.contextWindow,`pointermove`,this.handlePointerMove),oA(this.contextWindow,`pointerup`,this.handlePointerUp),oA(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),pC(this.updatePoint)}};function EA(e,t){return t?{point:t(e.point)}:e}function DA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function OA({point:e},t){return{point:e,delta:DA(e,AA(t)),offset:DA(e,kA(t)),velocity:jA(t,.1)}}function kA(e){return e[0]}function AA(e){return e[e.length-1]}function jA(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=AA(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>FS(t)));)n--;if(!r)return{x:0,y:0};let a=IS(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 MA(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 NA(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 PA(e,{top:t,left:n,bottom:r,right:i}){return{x:NA(e.x,n,i),y:NA(e.y,t,r)}}function FA(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 IA(e,t){return{x:FA(e.x,t.x),y:FA(e.y,t.y)}}function LA(e,t){let n=.5,r=pA(e),i=pA(t);return i>r?n=NS(t.min,t.max-r,e.min):r>i&&(n=NS(e.min,e.max-i,t.min)),xS(0,1,n)}function RA(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 zA=.35;function BA(e=zA){return e===!1?e=0:e===!0&&(e=zA),{x:VA(e,`left`,`right`),y:VA(e,`top`,`bottom`)}}function VA(e,t,n){return{min:HA(e,t),max:HA(e,n)}}function HA(e,t){return typeof e==`number`?e:e[t]||0}const UA=new WeakMap;var WA=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=rk(),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(iA(e).point)},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=zE(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),xA(e=>{let t=this.getAxisMotionValue(e).get()||0;if(VC.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];if(r){let e=pA(r);t=e*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&X.postRender(()=>i(e,t)),Tk(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=KA(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=()=>xA(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:l}=this.getProps();this.panSession=new TA(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:SA(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||!GA(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=MA(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&&bO(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=PA(n.layoutBox,e):this.constraints=!1,this.elastic=BA(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&xA(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=RA(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!bO(e))return!1;let n=e.current;wS(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.",`drag-constraints-ref`);let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=$O(n,r.root,this.visualElement.getTransformPagePoint()),a=IA(r.layout.layoutBox,i);if(t){let e=t(FO(a));this.hasMutatedConstraints=!!e,e&&(a=PO(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=xA(o=>{if(!GA(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 Tk(this.visualElement,e),n.start(Fk(e,n,0,t,this.visualElement,!1))}stopAnimation(){xA(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){xA(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){xA(t=>{let{drag:n}=this.getProps();if(!GA(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(!bO(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};xA(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=LA({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(),xA(t=>{if(!GA(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;UA.set(this.visualElement,this);let e=this.visualElement.current,t=oA(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();bO(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=rA(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(xA(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=zA,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function GA(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function KA(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var qA=class extends Qk{constructor(e){super(e),this.removeGroupControls=AS,this.removeListeners=AS,this.controls=new WA(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||AS}unmount(){this.removeGroupControls(),this.removeListeners()}};const JA=e=>(t,n)=>{e&&X.postRender(()=>e(t,n))};var YA=class extends Qk{constructor(){super(...arguments),this.removePointerDownListener=AS}onPointerDown(e){this.session=new TA(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:SA(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:JA(e),onStart:JA(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&X.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=oA(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 XA={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let ZA=!1;var QA=class extends f.Component{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),ZA&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),XA.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,ZA=!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(),FE.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;ZA=!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 $A(e){let[t,n]=fD(),r=(0,f.useContext)(mS);return(0,p.jsx)(QA,{...e,layoutGroup:r,switchLayoutGroup:(0,f.useContext)(TO),isPresent:t,safeToRemove:n})}function ej(e,t,n){let r=tD(e)?e:PE(e);return r.start(Fk(``,r,t,n)),r.animation}const tj=(e,t)=>e.depth-t.depth;var nj=class{constructor(){this.children=[],this.isDirty=!1}add(e){yS(this.children,e),this.isDirty=!0}remove(e){bS(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(tj),this.isDirty=!1,this.children.forEach(e)}};function rj(e,t){let n=vC.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(pC(r),e(a-t))};return X.setup(r,!0),()=>pC(r)}const ij=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],aj=ij.length,oj=e=>typeof e==`string`?parseFloat(e):e,sj=e=>typeof e==`number`||Z.test(e);function cj(e,t,n,r,i,a){i?(e.opacity=Q(0,n.opacity??1,uj(r)),e.opacityExit=Q(t.opacity??1,0,dj(r))):a&&(e.opacity=Q(t.opacity??1,n.opacity??1,r));for(let i=0;i<aj;i++){let a=`border${ij[i]}Radius`,o=lj(t,a),s=lj(n,a);if(o===void 0&&s===void 0)continue;o||=0,s||=0;let c=o===0||s===0||sj(o)===sj(s);c?(e[a]=Math.max(Q(oj(o),oj(s),r),0),(VC.test(s)||VC.test(o))&&(e[a]+=`%`)):e[a]=s}(t.rotate||n.rotate)&&(e.rotate=Q(t.rotate||0,n.rotate||0,r))}function lj(e,t){return e[t]===void 0?e.borderRadius:e[t]}const uj=fj(0,.5,QS),dj=fj(.5,.95,AS);function fj(e,t,n){return r=>r<e?0:r>t?1:n(NS(e,t,r))}function pj(e,t){e.min=t.min,e.max=t.max}function mj(e,t){pj(e.x,t.x),pj(e.y,t.y)}function hj(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function gj(e,t,n,r,i){return e-=t,e=HO(e,1/n,r),i!==void 0&&(e=HO(e,1/i,r)),e}function _j(e,t=0,n=1,r=.5,i,a=e,o=e){if(VC.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=gj(e.min,t,n,s,i),e.max=gj(e.max,t,n,s,i)}function vj(e,t,[n,r,i],a,o){_j(e,t[n],t[r],t[i],t.scale,a,o)}const yj=[`x`,`scaleX`,`originX`],bj=[`y`,`scaleY`,`originY`];function xj(e,t,n,r){vj(e.x,t,yj,n?n.x:void 0,r?r.x:void 0),vj(e.y,t,bj,n?n.y:void 0,r?r.y:void 0)}function Sj(e){return e.translate===0&&e.scale===1}function Cj(e){return Sj(e.x)&&Sj(e.y)}function wj(e,t){return e.min===t.min&&e.max===t.max}function Tj(e,t){return wj(e.x,t.x)&&wj(e.y,t.y)}function Ej(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Dj(e,t){return Ej(e.x,t.x)&&Ej(e.y,t.y)}function Oj(e){return pA(e.x)/pA(e.y)}function kj(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Aj=class{constructor(){this.members=[]}add(e){yS(this.members,e),e.scheduleRender()}remove(e){if(bS(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 jj(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 Mj={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Nj=[``,`X`,`Y`,`Z`],Pj=1e3;let Fj=0;function Ij(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Lj(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Ek(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&&Lj(r)}function Rj({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Fj++,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,lC.value&&(Mj.nodes=Mj.calculatedTargetDeltas=Mj.calculatedProjections=0),this.nodes.forEach(Vj),this.nodes.forEach(Jj),this.nodes.forEach(Yj),this.nodes.forEach(Hj),lC.addProjectionMetrics&&lC.addProjectionMetrics(Mj)},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 nj)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new PS),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=$E(t)&&!eD(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=rj(i,250),XA.hasAnimatedSinceResize&&(XA.hasAnimatedSinceResize=!1,this.nodes.forEach(qj)))})}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()||nM,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Dj(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={...sE(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||qj(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(),pC(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(Xj),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&&Lj(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(Wj);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Gj);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Kj),this.nodes.forEach(zj),this.nodes.forEach(Bj)):this.nodes.forEach(Gj),this.clearAllSnapshots();let t=vC.now();mC.delta=xS(0,1e3/60,t-mC.timestamp),mC.timestamp=t,mC.isProcessing=!0,hC.update.process(mC),hC.preRender.process(mC),hC.render.process(mC),mC.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,FE.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Uj),this.sharedNodes.forEach(Zj)}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&&!pA(this.snapshot.measuredBox.x)&&!pA(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=rk(),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&&!Cj(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||zO(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)),oM(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return rk();let t=e.measureViewportBox(),n=this.scroll?.wasRoot||this.path.some(cM);if(!n){let{scroll:e}=this.root;e&&(YO(t.x,e.offset.x),YO(t.y,e.offset.y))}return t}removeElementScroll(e){let t=rk();if(mj(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&&mj(t,e),YO(t.x,i.offset.x),YO(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=rk();mj(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&&ZO(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),zO(r.latestValues)&&ZO(n,r.latestValues)}return zO(this.latestValues)&&ZO(n,this.latestValues),n}removeTransform(e){let t=rk();mj(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!zO(n.latestValues))continue;RO(n.latestValues)&&n.updateSnapshot();let r=rk(),i=n.measurePageBox();mj(r,i),xj(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return zO(this.latestValues)&&xj(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!==mC.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=mC.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=rk(),this.targetWithTransforms=rk()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vA(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):mj(this.target,this.layout.layoutBox),GO(this.target,this.targetDelta)):mj(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),lC.value&&Mj.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||RO(this.parent.latestValues)||BO(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=rk(),this.relativeTargetOrigin=rk(),bA(this.relativeTargetOrigin,t,n),mj(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===mC.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;mj(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;JO(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=rk());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(hj(this.prevProjectionDelta.x,this.projectionDelta.x),hj(this.prevProjectionDelta.y,this.projectionDelta.y)),gA(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!kj(this.projectionDelta.x,this.prevProjectionDelta.x)||!kj(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),lC.value&&Mj.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=tk(),this.projectionDelta=tk(),this.projectionDeltaWithTransform=tk()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=tk();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=rk(),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(tM));this.animationProgress=0;let p;this.mixTargetDelta=t=>{let n=t/1e3;Qj(a.x,e.x,n),Qj(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bA(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),eM(this.relativeTarget,this.relativeTargetOrigin,o,n),p&&Tj(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||=rk(),mj(p,this.relativeTarget)),l&&(this.animationValues=i,cj(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&&=(pC(this.pendingAnimation),void 0),this.pendingAnimation=X.update(()=>{XA.hasAnimatedSinceResize=!0,yC.layout++,this.motionValue||=PE(0),this.currentAnimation=ej(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{yC.layout--},onComplete:()=>{yC.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&&sM(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||rk();let t=pA(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=pA(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}mj(t,n),ZO(t,i),gA(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Aj);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&&Ij(`z`,e,r,this.animationValues);for(let t=0;t<Nj.length;t++)Ij(`rotate${Nj[t]}`,e,r,this.animationValues),Ij(`skew${Nj[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=dO(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=dO(t?.pointerEvents)||``),this.hasProjected&&!zO(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=jj(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,HD){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=HD[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?dO(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Wj),this.root.sharedNodes.clear()}}}function zj(e){e.updateLayout()}function Bj(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`?xA(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=pA(r);r.min=n[e].min,r.max=r.min+i}):sM(i,t.layoutBox,n)&&xA(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=pA(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=tk();gA(o,n,t.layoutBox);let s=tk();a?gA(s,e.applyTransform(r,!0),t.measuredBox):gA(s,n,t.layoutBox);let c=!Cj(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=rk();bA(o,t.layoutBox,i.layoutBox);let s=rk();bA(s,n,a.layoutBox),Dj(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 Vj(e){lC.value&&Mj.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 Hj(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Uj(e){e.clearSnapshot()}function Wj(e){e.clearMeasurements()}function Gj(e){e.isLayoutDirty=!1}function Kj(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function qj(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Jj(e){e.resolveTargetDelta()}function Yj(e){e.calcProjection()}function Xj(e){e.resetSkewAndRotation()}function Zj(e){e.removeLeadSnapshot()}function Qj(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 $j(e,t,n,r){e.min=Q(t.min,n.min,r),e.max=Q(t.max,n.max,r)}function eM(e,t,n,r){$j(e.x,t.x,n.x,r),$j(e.y,t.y,n.y,r)}function tM(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const nM={duration:.45,ease:[.4,0,.1,1]},rM=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),iM=rM(`applewebkit/`)&&!rM(`chrome/`)?Math.round:AS;function aM(e){e.min=iM(e.min),e.max=iM(e.max)}function oM(e){aM(e.x),aM(e.y)}function sM(e,t,n){return e===`position`||e===`preserve-aspect`&&!mA(Oj(t),Oj(n),.2)}function cM(e){return e!==e.root&&e.scroll?.wasRoot}const lM=Rj({attachResizeListener:(e,t)=>rA(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),uM={current:void 0},dM=Rj({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!uM.current){let e=new lM({});e.mount(window),e.setOptions({layoutScroll:!0}),uM.current=e}return uM.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),fM={pan:{Feature:YA},drag:{Feature:qA,ProjectionNode:dM,MeasureLayout:$A}};function pM(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,iA(t)))}var mM=class extends Qk{mount(){let{current:e}=this.node;e&&(this.unmount=HE(e,(e,t)=>(pM(this.node,t,`Start`),e=>pM(this.node,e,`End`))))}unmount(){}},hM=class extends Qk{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=MS(rA(this.node.current,`focus`,()=>this.onFocus()),rA(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function gM(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,iA(t)))}var _M=class extends Qk{mount(){let{current:e}=this.node;e&&(this.unmount=QE(e,(e,t)=>(gM(this.node,t,`Start`),(e,{success:t})=>gM(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};const vM=new WeakMap,yM=new WeakMap,bM=e=>{let t=vM.get(e.target);t&&t(e)},xM=e=>{e.forEach(bM)};function SM({root:e,...t}){let n=e||document;yM.has(n)||yM.set(n,{});let r=yM.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(xM,{root:e,...t})),r[i]}function CM(e,t,n){let r=SM(t);return vM.set(e,n),r.observe(e),()=>{vM.delete(e),r.unobserve(e)}}const wM={some:0,all:1};var TM=class extends Qk{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:wM[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 CM(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(EM(e,t));n&&this.startObserver()}unmount(){}};function EM({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const DM={inView:{Feature:TM},tap:{Feature:_M},focus:{Feature:hM},hover:{Feature:mM}},OM={layout:{ProjectionNode:dM,MeasureLayout:$A}},kM={...nA,...DM,...fM,...OM},AM=NO(kM,vk),jM=({isVisible:e,children:t})=>{let n=(0,f.useRef)(null),[r,i]=(0,f.useState)(0);return(0,f.useEffect)(()=>{n.current&&setTimeout(()=>{i((n.current?.scrollHeight??0)+5)},0)},[t]),(0,p.jsx)(hD,{initial:!1,children:e&&(0,p.jsx)(AM.div,{initial:{height:0,opacity:0},animate:{height:r,opacity:1},exit:{height:0,opacity:0},transition:{type:`spring`,damping:20,stiffness:100},children:(0,p.jsx)(`div`,{ref:n,children:t})})})};var MM=jM;function NM(e,[t,n]){return Math.min(n,Math.max(t,e))}function PM(e){let t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var FM=[`PageUp`,`PageDown`],IM=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],LM={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},RM=`Slider`,[zM,BM,VM]=f_(RM),[HM,UM]=F(RM,[VM]),[WM,GM]=HM(RM),KM=f.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:m=()=>{},inverted:h=!1,form:g,..._}=e,v=f.useRef(new Set),y=f.useRef(0),b=o===`horizontal`,x=b?YM:XM,[S=[],C]=Vr({prop:u,defaultProp:l,onChange:e=>{let t=[...v.current];t[y.current]?.focus(),d(e)}}),w=f.useRef(S);function T(e){let t=uN(S,e);O(e,t)}function E(e){O(e,y.current)}function D(){let e=w.current[y.current],t=S[y.current],n=t!==e;n&&m(S)}function O(e,t,{commit:n}={commit:!1}){let o=hN(a),s=gN(Math.round((e-r)/a)*a+r,o),l=NM(s,[r,i]);C((e=[])=>{let r=sN(e,l,t);if(pN(r,c*a)){y.current=r.indexOf(l);let t=String(r)!==String(e);return t&&n&&m(r),t?r:e}else return e})}return(0,p.jsx)(WM,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:y,thumbs:v.current,values:S,orientation:o,form:g,children:(0,p.jsx)(zM.Provider,{scope:e.__scopeSlider,children:(0,p.jsx)(zM.Slot,{scope:e.__scopeSlider,children:(0,p.jsx)(x,{"aria-disabled":s,"data-disabled":s?``:void 0,..._,ref:t,onPointerDown:A(_.onPointerDown,()=>{s||(w.current=S)}),min:r,max:i,inverted:h,onSlideStart:s?void 0:T,onSlideMove:s?void 0:E,onSlideEnd:s?void 0:D,onHomeKeyDown:()=>!s&&O(r,0,{commit:!0}),onEndKeyDown:()=>!s&&O(i,S.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){let n=FM.includes(e.key),r=n||e.shiftKey&&IM.includes(e.key),i=r?10:1,o=y.current,s=S[o],c=a*i*t;O(s+c,o,{commit:!0})}}})})})})});KM.displayName=RM;var[qM,JM]=HM(RM,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),YM=f.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,m]=f.useState(null),h=N(t,e=>m(e)),g=f.useRef(void 0),_=m_(i),v=_===`ltr`,y=v&&!a||!v&&a;function b(e){let t=g.current||d.getBoundingClientRect(),i=[0,t.width],a=y?[n,r]:[r,n],o=mN(i,a);return g.current=t,o(e-t.left)}return(0,p.jsx)(qM,{scope:e.__scopeSlider,startEdge:y?`left`:`right`,endEdge:y?`right`:`left`,direction:y?1:-1,size:`width`,children:(0,p.jsx)(ZM,{dir:_,"data-orientation":`horizontal`,...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=b(e.clientX);o?.(t)},onSlideMove:e=>{let t=b(e.clientX);s?.(t)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:e=>{let t=y?`from-left`:`from-right`,n=LM[t].includes(e.key);l?.({event:e,direction:n?-1:1})}})})}),XM=f.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=f.useRef(null),d=N(t,u),m=f.useRef(void 0),h=!i;function g(e){let t=m.current||u.current.getBoundingClientRect(),i=[0,t.height],a=h?[r,n]:[n,r],o=mN(i,a);return m.current=t,o(e-t.top)}return(0,p.jsx)(qM,{scope:e.__scopeSlider,startEdge:h?`bottom`:`top`,endEdge:h?`top`:`bottom`,size:`height`,direction:h?1:-1,children:(0,p.jsx)(ZM,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=g(e.clientY);a?.(t)},onSlideMove:e=>{let t=g(e.clientY);o?.(t)},onSlideEnd:()=>{m.current=void 0,s?.()},onStepKeyDown:e=>{let t=h?`from-bottom`:`from-top`,n=LM[t].includes(e.key);c?.({event:e,direction:n?-1:1})}})})}),ZM=f.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=GM(RM,n);return(0,p.jsx)(V.span,{...l,ref:t,onKeyDown:A(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):FM.concat(IM).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:A(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:A(e.onPointerMove,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:A(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),QM=`SliderTrack`,$M=f.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=GM(QM,n);return(0,p.jsx)(V.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});$M.displayName=QM;var eN=`SliderRange`,tN=f.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=GM(eN,n),a=JM(eN,n),o=f.useRef(null),s=N(t,o),c=i.values.length,l=i.values.map(e=>cN(e,i.min,i.max)),u=c>1?Math.min(...l):0,d=100-Math.max(...l);return(0,p.jsx)(V.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:s,style:{...e.style,[a.startEdge]:u+`%`,[a.endEdge]:d+`%`}})});tN.displayName=eN;var nN=`SliderThumb`,rN=f.forwardRef((e,t)=>{let n=BM(e.__scopeSlider),[r,i]=f.useState(null),a=N(t,e=>i(e)),o=f.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,p.jsx)(iN,{...e,ref:a,index:o})}),iN=f.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=GM(nN,n),s=JM(nN,n),[c,l]=f.useState(null),u=N(t,e=>l(e)),d=c?o.form||!!c.closest(`form`):!0,m=ur(c),h=o.values[r],g=h===void 0?0:cN(h,o.min,o.max),_=lN(r,o.values.length),v=m?.[s.size],y=v?dN(v,g,s.direction):0;return f.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,p.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${g}% + ${y}px)`},children:[(0,p.jsx)(zM.ItemSlot,{scope:e.__scopeSlider,children:(0,p.jsx)(V.span,{role:`slider`,"aria-label":e[`aria-label`]||_,"aria-valuemin":o.min,"aria-valuenow":h,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:h===void 0?{display:`none`}:e.style,onFocus:A(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,p.jsx)(oN,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:h},r)]})});rN.displayName=nN;var aN=`RadioBubbleInput`,oN=f.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=f.useRef(null),a=N(i,r),o=PM(t);return f.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`),a=r.set;if(o!==t&&a){let n=new Event(`input`,{bubbles:!0});a.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,p.jsx)(V.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});oN.displayName=aN;function sN(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function cN(e,t,n){let r=n-t,i=100/r,a=i*(e-t);return NM(a,[0,100])}function lN(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function uN(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 dN(e,t,n){let r=e/2,i=mN([0,50],[0,r]);return(r-i(t)*n)*n}function fN(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function pN(e,t){if(t>0){let n=fN(e),r=Math.min(...n);return r>=t}return!0}function mN(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 hN(e){return(String(e).split(`.`)[1]||``).length}function gN(e,t){let n=10**t;return Math.round(e*n)/n}var _N=KM,vN=$M,yN=tN,bN=rN;const xN=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:m}=e;return(0,p.jsxs)(_N,{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:m,min:f,disabled:o,step:d,children:[(0,p.jsx)(vN,{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:(0,p.jsx)(yN,{className:`tw:absolute tw:h-full tw:rounded-full ${l}`})}),(0,p.jsx)(bN,{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 SN(e,t=[]){let n=[];function r(t,r){let i=f.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=f.useMemo(()=>o,Object.values(o));return(0,p.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=f.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>f.createContext(e));return function(n){let r=n?.[e]||t;return f.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,CN(i,...t)]}function CN(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e),a=i[`__scope${r}`];return{...t,...a}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var wN=Symbol.for(`react.lazy`),TN=f.use;function EN(e){return typeof e==`object`&&!!e&&`then`in e}function DN(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===wN&&`_payload`in e&&EN(e._payload)}function ON(e){let t=kN(e),n=f.forwardRef((e,n)=>{let{children:r,...i}=e;DN(r)&&typeof TN==`function`&&(r=TN(r._payload));let a=f.Children.toArray(r),o=a.find(jN);if(o){let e=o.props.children,r=a.map(t=>t===o?f.Children.count(e)>1?f.Children.only(null):f.isValidElement(e)?e.props.children:null:t);return(0,p.jsx)(t,{...i,ref:n,children:f.isValidElement(e)?f.cloneElement(e,void 0,r):null})}return(0,p.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function kN(e){let t=f.forwardRef((e,t)=>{let{children:n,...r}=e;if(DN(n)&&typeof TN==`function`&&(n=TN(n._payload)),f.isValidElement(n)){let e=NN(n),i=MN(r,n.props);return n.type!==f.Fragment&&(i.ref=t?M(t,e):e),f.cloneElement(n,i)}return f.Children.count(n)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var AN=Symbol(`radix.slottable`);function jN(e){return f.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===AN}function MN(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 NN(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 PN=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`],FN=PN.reduce((e,t)=>{let n=ON(`Primitive.${t}`),r=f.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,p.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),IN=`Progress`,LN=100,[RN,zN]=SN(IN),[BN,VN]=RN(IN),HN=f.forwardRef((e,t)=>{let{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=GN,...o}=e;(i||i===0)&&!JN(i)&&console.error(XN(`${i}`,`Progress`));let s=JN(i)?i:LN;r!==null&&!YN(r,s)&&console.error(ZN(`${r}`,`Progress`));let c=YN(r,s)?r:null,l=qN(c)?a(c,s):void 0;return(0,p.jsx)(BN,{scope:n,value:c,max:s,children:(0,p.jsx)(FN.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":qN(c)?c:void 0,"aria-valuetext":l,role:`progressbar`,"data-state":KN(c,s),"data-value":c??void 0,"data-max":s,...o,ref:t})})});HN.displayName=IN;var UN=`ProgressIndicator`,WN=f.forwardRef((e,t)=>{let{__scopeProgress:n,...r}=e,i=VN(UN,n);return(0,p.jsx)(FN.div,{"data-state":KN(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});WN.displayName=UN;function GN(e,t){return`${Math.round(e/t*100)}%`}function KN(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}function qN(e){return typeof e==`number`}function JN(e){return qN(e)&&!isNaN(e)&&e>0}function YN(e,t){return qN(e)&&!isNaN(e)&&e<=t&&e>=0}function XN(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${LN}\`.`}function ZN(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
80
|
+
`),()=>{m.contains(p)&&m.removeChild(p)}},[t]),(0,p.jsx)(fD,{isPresent:t,childRef:a,sizeRef:o,children:f.cloneElement(e,{ref:c})})}const mD=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,root:c})=>{let l=yS(hD),u=(0,f.useId)(),d=!0,m=(0,f.useMemo)(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:e=>{l.set(e,!0);for(let e of l.values())if(!e)return;r&&r()},register:e=>(l.set(e,!1),()=>l.delete(e))}),[n,l,r]);return a&&d&&(m={...m}),(0,f.useMemo)(()=>{l.forEach((e,t)=>l.set(t,!1))},[n]),f.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o===`popLayout`&&(e=(0,p.jsx)(pD,{isPresent:n,anchorX:s,root:c,children:e})),(0,p.jsx)(SS.Provider,{value:m,children:e})};function hD(){return new Map}function gD(e=!0){let t=(0,f.useContext)(SS);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,f.useId)();(0,f.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,f.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const _D=e=>e.key||``;function vD(e){let t=[];return f.Children.forEach(e,e=>{(0,f.isValidElement)(e)&&t.push(e)}),t}const yD=({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,u]=gD(o),d=(0,f.useMemo)(()=>vD(e),[e]),m=o&&!l?[]:d.map(_D),h=(0,f.useRef)(!0),g=(0,f.useRef)(d),_=yS(()=>new Map),[v,y]=(0,f.useState)(d),[b,x]=(0,f.useState)(d);xS(()=>{h.current=!1,g.current=d;for(let e=0;e<b.length;e++){let t=_D(b[e]);m.includes(t)?_.delete(t):_.get(t)!==!0&&_.set(t,!1)}},[b,m.length,m.join(`-`)]);let S=[];if(d!==v){let e=[...d];for(let t=0;t<b.length;t++){let n=b[t],r=_D(n);m.includes(r)||(e.splice(t,0,n),S.push(n))}return a===`wait`&&S.length&&(e=S),x(vD(e)),y(d),null}process.env.NODE_ENV!==`production`&&a===`wait`&&b.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);let{forceRender:C}=(0,f.useContext)(vS);return(0,p.jsx)(p.Fragment,{children:b.map(e=>{let f=_D(e),v=o&&!l?!1:d===b||m.includes(f),y=()=>{if(_.has(f))_.set(f,!0);else return;let e=!0;_.forEach(t=>{t||(e=!1)}),e&&(C?.(),x(g.current),o&&u?.(),r&&r())};return(0,p.jsx)(mD,{isPresent:v,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:c,onExitComplete:v?void 0:y,anchorX:s,children:e},f)})})},bD=(0,f.createContext)({strict:!1}),xD={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`]},SD={};for(let e in xD)SD[e]={isEnabled:t=>xD[e].some(e=>!!t[e])};function CD(e){for(let t in e)SD[t]={...SD[t],...e[t]}}const wD=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 TD(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||wD.has(e)}var ED={};c(ED,{default:()=>OD});var DD,OD,kD=o((()=>{du(),DD=/^((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)-.*))$/,OD=uu(function(e){return DD.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})}));let AD=e=>!TD(e);function jD(e){typeof e==`function`&&(AD=t=>t.startsWith(`on`)?!TD(t):e(t))}try{jD((kD(),d(ED)).default)}catch{}function MD(e,t,n){let r={};for(let i in e){if(i===`values`&&typeof e.values==`object`)continue;(AD(i)||n===!0&&TD(i)||!t&&!TD(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i])}return r}const ND=(0,f.createContext)({});function PD(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function FD(e){return typeof e==`string`||Array.isArray(e)}const ID=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],LD=[`initial`,...ID];function RD(e){return PD(e.animate)||LD.some(t=>FD(e[t]))}function zD(e){return!!(RD(e)||e.variants)}function BD(e,t){if(RD(e)){let{initial:t,animate:n}=e;return{initial:t===!1||FD(t)?t:void 0,animate:FD(n)?n:void 0}}return e.inherit===!1?{}:t}function VD(e){let{initial:t,animate:n}=BD(e,(0,f.useContext)(ND));return(0,f.useMemo)(()=>({initial:t,animate:n}),[HD(t),HD(n)])}function HD(e){return Array.isArray(e)?e.join(` `):e}function UD(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const WD={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(Z.test(e))e=parseFloat(e);else return e;let n=UD(e,t.target.x),r=UD(e,t.target.y);return`${n}% ${r}%`}},GD={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=uw.parse(e);if(i.length>5)return r;let a=uw.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)}},KD={borderRadius:{...WD,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:WD,borderTopRightRadius:WD,borderBottomLeftRadius:WD,borderBottomRightRadius:WD,boxShadow:GD};function qD(e,{layout:t,layoutId:n}){return bT.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!KD[e]||e===`opacity`)}const JD={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},YD=yT.length;function XD(e,t,n){let r=``,i=!0;for(let a=0;a<YD;a++){let o=yT[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=ME(s,wE[o]);if(!c){i=!1;let t=JD[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function ZD(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(bT.has(e)){o=!0;continue}else if(TC(e)){i[e]=n;continue}else{let t=ME(n,wE[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=XD(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 QD=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $D(e,t,n){for(let r in t)!aD(t[r])&&!qD(r,n)&&(e[r]=t[r])}function eO({transformTemplate:e},t){return(0,f.useMemo)(()=>{let n=QD();return ZD(n,t,e),Object.assign({},n.vars,n.style)},[t])}function tO(e,t){let n=e.style||{},r={};return $D(r,n,e),Object.assign(r,eO(e,t)),r}function nO(e,t){let n={},r=tO(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 rO={offset:`stroke-dashoffset`,array:`stroke-dasharray`},iO={offset:`strokeDashoffset`,array:`strokeDasharray`};function aO(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?rO:iO;e[a.offset]=Z.transform(-r);let o=Z.transform(t),s=Z.transform(n);e[a.array]=`${o} ${s}`}function oO(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(ZD(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&&aO(d,i,a,o,!1)}const sO=()=>({...QD(),attrs:{}}),cO=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function lO(e,t,n,r){let i=(0,f.useMemo)(()=>{let n=sO();return oO(n,t,cO(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};$D(t,e.style,e),i.style={...t,...i.style}}return i}const uO=[`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 dO(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(uO.indexOf(e)>-1||/[A-Z]/u.test(e))}function fO(e,t,n,{latestValues:r},i,a=!1){let o=dO(e)?lO:nO,s=o(t,r,i,e),c=MD(t,typeof e==`string`,a),l=e===f.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,f.useMemo)(()=>aD(u)?u.get():u,[u]);return(0,f.createElement)(e,{...l,children:d})}function pO(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function mO(e,t,n,r){if(typeof t==`function`){let[i,a]=pO(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]=pO(r);t=t(n===void 0?e.custom:n,i,a)}return t}function hO(e){return aD(e)?e.get():e}function gO({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){let a={latestValues:_O(n,r,i,e),renderState:t()};return a}function _O(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=hO(a[e]);let{initial:o,animate:s}=e,c=RD(e),l=zD(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`&&!PD(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=mO(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 vO=e=>(t,n)=>{let r=(0,f.useContext)(ND),i=(0,f.useContext)(SS),a=()=>gO(e,t,r,i);return n?a():yS(a)};function yO(e,t,n){let{style:r}=e,i={};for(let a in r)(aD(r[a])||t.style&&aD(t.style[a])||qD(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}const bO=vO({scrapeMotionValuesFromProps:yO,createRenderState:QD});function xO(e,t,n){let r=yO(e,t,n);for(let n in e)if(aD(e[n])||aD(t[n])){let t=yT.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}const SO=vO({scrapeMotionValuesFromProps:xO,createRenderState:sO}),CO=Symbol.for(`motionComponentSymbol`);function wO(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function TO(e,t,n){return(0,f.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):wO(n)&&(n.current=r))},[t])}const EO=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),DO=`framerAppearId`,OO=`data-`+EO(`framerAppearId`),kO=(0,f.createContext)({});function AO(e,t,n,r,i){let{visualElement:a}=(0,f.useContext)(ND),o=(0,f.useContext)(bD),s=(0,f.useContext)(SS),c=(0,f.useContext)(cD).reducedMotion,l=(0,f.useRef)(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 u=l.current,d=(0,f.useContext)(kO);u&&!u.projection&&i&&(u.type===`html`||u.type===`svg`)&&jO(l.current,n,i,d);let p=(0,f.useRef)(!1);(0,f.useInsertionEffect)(()=>{u&&p.current&&u.update(n,s)});let m=n[OO],h=(0,f.useRef)(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return xS(()=>{u&&(p.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),h.current&&u.animationState&&u.animationState.animateChanges())}),(0,f.useEffect)(()=>{u&&(!h.current&&u.animationState&&u.animationState.animateChanges(),h.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),!1),u.enteringChildren=void 0)}),u}function jO(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:MO(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&wO(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function MO(e){if(e)return e.options.allowProjection===!1?MO(e.parent):e.projection}function NO(e,{forwardMotionProps:t=!1}={},n,r){n&&CD(n);let i=dO(e)?SO:bO;function a(a,o){let s,c={...(0,f.useContext)(cD),...a,layoutId:PO(a)},{isStatic:l}=c,u=VD(a),d=i(a,l);if(!l&&bS){FO(c,n);let t=IO(c);s=t.MeasureLayout,u.visualElement=AO(e,d,c,r,t.ProjectionNode)}return(0,p.jsxs)(ND.Provider,{value:u,children:[s&&u.visualElement?(0,p.jsx)(s,{visualElement:u.visualElement,...c}):null,fO(e,a,TO(d,u.visualElement,o),d,l,t)]})}a.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let o=(0,f.forwardRef)(a);return o[CO]=e,o}function PO({layoutId:e}){let t=(0,f.useContext)(vS).id;return t&&e!==void 0?t+`-`+e:e}function FO(e,t){let n=(0,f.useContext)(bD).strict;if(process.env.NODE_ENV!==`production`&&t&&n){let t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?DS(!1,t,`lazy-strict-mode`):OS(!1,t,`lazy-strict-mode`)}}function IO(e){let{drag:t,layout:n}=SD;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function LO(e,t){if(typeof Proxy>`u`)return NO;let n=new Map,r=(n,r)=>NO(n,r,e,t),i=(e,t)=>(process.env.NODE_ENV!==`production`&&US(!1,`motion() is deprecated. Use motion.create() instead.`),r(e,t));return new Proxy(i,{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,NO(a,void 0,e,t)),n.get(a))})}function RO({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function zO({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function BO(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 VO(e){return e===void 0||e===1}function HO({scale:e,scaleX:t,scaleY:n}){return!VO(e)||!VO(t)||!VO(n)}function UO(e){return HO(e)||WO(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function WO(e){return GO(e.x)||GO(e.y)}function GO(e){return e&&e!==`0%`}function KO(e,t,n){let r=e-n,i=t*r;return n+i}function qO(e,t,n,r,i){return i!==void 0&&(e=KO(e,i,r)),KO(e,n,r)+t}function JO(e,t=0,n=1,r,i){e.min=qO(e.min,t,n,r,i),e.max=qO(e.max,t,n,r,i)}function YO(e,{x:t,y:n}){JO(e.x,t.translate,t.scale,t.originPoint),JO(e.y,n.translate,n.scale,n.originPoint)}const XO=.999999999999,ZO=1.0000000000001;function QO(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&&tk(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,YO(e,o)),r&&UO(a.latestValues)&&tk(e,a.latestValues))}t.x<ZO&&t.x>XO&&(t.x=1),t.y<ZO&&t.y>XO&&(t.y=1)}function $O(e,t){e.min+=t,e.max+=t}function ek(e,t,n,r,i=.5){let a=Q(e.min,e.max,i);JO(e,t,n,a,r)}function tk(e,t){ek(e.x,t.x,t.scaleX,t.scale,t.originX),ek(e.y,t.y,t.scaleY,t.scale,t.originY)}function nk(e,t){return RO(BO(e.getBoundingClientRect(),t))}function rk(e,t,n){let r=nk(e,n),{scroll:i}=t;return i&&($O(r.x,i.offset.x),$O(r.y,i.offset.y)),r}const ik=()=>({translate:0,scale:1,origin:0,originPoint:0}),ak=()=>({x:ik(),y:ik()}),ok=()=>({min:0,max:0}),sk=()=>({x:ok(),y:ok()}),ck={current:null},lk={current:!1};function uk(){if(lk.current=!0,bS)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>ck.current=e.matches;e.addEventListener(`change`,t),t()}else ck.current=!1}const dk=new WeakMap;function fk(e,t,n){for(let r in t){let i=t[r],a=n[r];if(aD(i))e.addValue(r,i);else if(aD(a))e.addValue(r,RE(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,RE(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}const pk=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`];var mk=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=NT,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=SC.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=RD(t),this.isVariantNode=zD(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&&aD(t)&&t.set(s[e])}}mount(e){this.current=e,dk.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)),lk.current||uk(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:ck.current,process.env.NODE_ENV!==`production`&&US(this.shouldReduceMotion!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),_C(this.notifyUpdate),_C(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=bT.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 SD){let t=SD[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):sk()}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<pk.length;t++){let n=pk[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=fk(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=RE(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`&&(AS(n)||MS(n))?n=parseFloat(n):!sD(n)&&uw.test(t)&&(n=DE(e,t)),this.setBaseTarget(e,aD(n)?n.get():n)),aD(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=mO(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&&!aD(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 RS),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){zE.render(this.render)}},hk=class extends mk{constructor(){super(...arguments),this.KeyframeResolver=AE}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;aD(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function gk(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 _k(e){return window.getComputedStyle(e)}var vk=class extends hk{constructor(){super(...arguments),this.type=`html`,this.renderInstance=gk}readValueFromInstance(e,t){if(bT.has(t))return this.projection?.isProjecting?hT(t):_T(e,t);{let n=_k(e),r=(TC(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return nk(e,t)}build(e,t,n){ZD(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return yO(e,t,n)}};const yk=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 bk(e,t,n,r){for(let n in gk(e,t,void 0,r),t.attrs)e.setAttribute(yk.has(n)?n:EO(n),t.attrs[n])}var xk=class extends hk{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=sk}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(bT.has(t)){let e=EE(t);return e&&e.default||0}return t=yk.has(t)?t:EO(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return xO(e,t,n)}build(e,t,n){oO(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){bk(e,t,n,r)}mount(e){this.isSVGTag=cO(e.tagName),super.mount(e)}};const Sk=(e,t)=>dO(e)?new xk(t):new vk(t,{allowProjection:e!==f.Fragment});function Ck(e,t,n){let r=e.getProps();return mO(r,t,n===void 0?r.custom:n,e)}const wk=e=>Array.isArray(e);function Tk(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,RE(n))}function Ek(e){return wk(e)?e[e.length-1]||0:e}function Dk(e,t){let n=Ck(e,t),{transitionEnd:r={},transition:i={},...a}=n||{};for(let t in a={...a,...r},a){let n=Ek(a[t]);Tk(e,t,n)}}function Ok(e){return!!(aD(e)&&e.add)}function kk(e,t){let n=e.getValue(`willChange`);if(Ok(n))return n.add(t);if(!n&&kS.WillChange){let n=new kS.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Ak(e){return e.props[OO]}const jk=e=>e!==null;function Mk(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(jk),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}const Nk={type:`spring`,stiffness:500,damping:25,restSpeed:10},Pk=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Fk={type:`keyframes`,duration:.8},Ik={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Lk=(e,{keyframes:t})=>t.length>2?Fk:bT.has(e)?e.startsWith(`scale`)?Pk(t[1]):Nk:Ik;function Rk({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 zk=(e,t,n,r={},i,a)=>o=>{let s=dE(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=zS(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};Rk(s)||Object.assign(u,Lk(e,u)),u.duration&&=zS(u.duration),u.repeatDelay&&=zS(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(tE(u),u.delay===0&&(d=!0)),(kS.instantAnimations||kS.skipAnimations)&&(d=!0,tE(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Mk(u.keyframes,s);if(e!==void 0){X.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new aT(u):new oE(u)};function Bk({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Vk(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&&Bk(l,t))continue;let o={delay:n,...dE(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=Ak(e);if(n){let e=window.MotionHandoffAnimation(n,t,X);e!==null&&(o.startTime=e,d=!0)}}kk(e,t),r.start(zk(t,r,i,e.shouldReduceMotion&&fE.has(t)?{type:!1}:o,e,d));let f=r.animation;f&&c.push(f)}return o&&Promise.all(c).then(()=>{X.update(()=>{o&&Dk(e,o)})}),c}function Hk(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 Uk(e,t,n={}){let r=Ck(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(Vk(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Wk(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 Wk(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(Uk(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Hk(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Gk(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Uk(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Uk(e,t,n);else{let i=typeof t==`function`?Ck(e,t,n.custom):t;r=Promise.all(Vk(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}function Kk(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 qk=LD.length;function Jk(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&Jk(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<qk;n++){let r=LD[n],i=e.props[r];(FD(i)||i===!1)&&(t[r]=i)}return t}const Yk=[...ID].reverse(),Xk=ID.length;function Zk(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Gk(e,t,n)))}function Qk(e){let t=Zk(e),n=tA(),r=!0,i=t=>(n,r)=>{let i=Ck(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=Jk(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<Xk;t++){let f=Yk[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=FD(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||PD(m)||typeof m==`boolean`)continue;let v=$k(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=wk(t)&&wk(n)?!Kk(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=Ck(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Hk(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(l.size){let t={};if(typeof o.initial!=`boolean`){let n=Ck(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=tA()}}}function $k(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Kk(t,e):!1}function eA(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function tA(){return{animate:eA(!0),whileInView:eA(),whileHover:eA(),whileTap:eA(),whileDrag:eA(),whileFocus:eA(),exit:eA()}}var nA=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},rA=class extends nA{constructor(e){super(e),e.animationState||=Qk(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();PD(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 iA=0;var aA=class extends nA{constructor(){super(...arguments),this.id=iA++}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 oA={animation:{Feature:rA},exit:{Feature:aA}};function sA(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function cA(e){return{point:{x:e.pageX,y:e.pageY}}}const lA=e=>t=>JE(t)&&e(t,cA(t));function uA(e,t,n,r){return sA(e,t,lA(n),r)}const dA=1e-4,fA=1-dA,pA=1+dA,mA=.01,hA=0-mA,gA=0+mA;function _A(e){return e.max-e.min}function vA(e,t,n){return Math.abs(e-t)<=n}function yA(e,t,n,r=.5){e.origin=r,e.originPoint=Q(t.min,t.max,e.origin),e.scale=_A(n)/_A(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 bA(e,t,n,r){yA(e.x,t.x,n.x,r?r.originX:void 0),yA(e.y,t.y,n.y,r?r.originY:void 0)}function xA(e,t,n){e.min=n.min+t.min,e.max=e.min+_A(t)}function SA(e,t,n){xA(e.x,t.x,n.x),xA(e.y,t.y,n.y)}function CA(e,t,n){e.min=t.min-n.min,e.max=e.min+_A(t)}function wA(e,t,n){CA(e.x,t.x,n.x),CA(e.y,t.y,n.y)}function TA(e){return[e(`x`),e(`y`)]}const EA=({current:e})=>e?e.ownerDocument.defaultView:null,DA=(e,t)=>Math.abs(e-t);function OA(e,t){let n=DA(e.x,t.x),r=DA(e.y,t.y);return Math.sqrt(n**2+r**2)}var kA=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=MA(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=OA(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=vC;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=AA(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=MA(e.type===`pointercancel`?this.lastMoveEventInfo:AA(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!JE(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let o=cA(e),s=AA(o,this.transformPagePoint),{point:c}=s,{timestamp:l}=vC;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,MA(s,this.history)),this.removeListeners=IS(uA(this.contextWindow,`pointermove`,this.handlePointerMove),uA(this.contextWindow,`pointerup`,this.handlePointerUp),uA(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),_C(this.updatePoint)}};function AA(e,t){return t?{point:t(e.point)}:e}function jA(e,t){return{x:e.x-t.x,y:e.y-t.y}}function MA({point:e},t){return{point:e,delta:jA(e,PA(t)),offset:jA(e,NA(t)),velocity:FA(t,.1)}}function NA(e){return e[0]}function PA(e){return e[e.length-1]}function FA(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=PA(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>zS(t)));)n--;if(!r)return{x:0,y:0};let a=BS(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 IA(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 LA(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 RA(e,{top:t,left:n,bottom:r,right:i}){return{x:LA(e.x,n,i),y:LA(e.y,t,r)}}function zA(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 BA(e,t){return{x:zA(e.x,t.x),y:zA(e.y,t.y)}}function VA(e,t){let n=.5,r=_A(e),i=_A(t);return i>r?n=LS(t.min,t.max-r,e.min):r>i&&(n=LS(e.min,e.max-i,t.min)),TS(0,1,n)}function HA(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 UA=.35;function WA(e=UA){return e===!1?e=0:e===!0&&(e=UA),{x:GA(e,`left`,`right`),y:GA(e,`top`,`bottom`)}}function GA(e,t,n){return{min:KA(e,t),max:KA(e,n)}}function KA(e,t){return typeof e==`number`?e:e[t]||0}const qA=new WeakMap;var JA=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=sk(),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(cA(e).point)},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=UE(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),TA(e=>{let t=this.getAxisMotionValue(e).get()||0;if(GC.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];if(r){let e=_A(r);t=e*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&X.postRender(()=>i(e,t)),kk(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=XA(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=()=>TA(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:l}=this.getProps();this.panSession=new kA(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:EA(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||!YA(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=IA(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&&wO(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=RA(n.layoutBox,e):this.constraints=!1,this.elastic=WA(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&TA(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=HA(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!wO(e))return!1;let n=e.current;OS(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.",`drag-constraints-ref`);let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=rk(n,r.root,this.visualElement.getTransformPagePoint()),a=BA(r.layout.layoutBox,i);if(t){let e=t(zO(a));this.hasMutatedConstraints=!!e,e&&(a=RO(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=TA(o=>{if(!YA(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 kk(this.visualElement,e),n.start(zk(e,n,0,t,this.visualElement,!1))}stopAnimation(){TA(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){TA(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){TA(t=>{let{drag:n}=this.getProps();if(!YA(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(!wO(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};TA(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=VA({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(),TA(t=>{if(!YA(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;qA.set(this.visualElement,this);let e=this.visualElement.current,t=uA(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();wO(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=sA(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(TA(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=UA,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function YA(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function XA(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var ZA=class extends nA{constructor(e){super(e),this.removeGroupControls=PS,this.removeListeners=PS,this.controls=new JA(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||PS}unmount(){this.removeGroupControls(),this.removeListeners()}};const QA=e=>(t,n)=>{e&&X.postRender(()=>e(t,n))};var $A=class extends nA{constructor(){super(...arguments),this.removePointerDownListener=PS}onPointerDown(e){this.session=new kA(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:EA(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:QA(e),onStart:QA(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&X.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=uA(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 ej={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let tj=!1;var nj=class extends f.Component{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),tj&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ej.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,tj=!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(),zE.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;tj=!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 rj(e){let[t,n]=gD(),r=(0,f.useContext)(vS);return(0,p.jsx)(nj,{...e,layoutGroup:r,switchLayoutGroup:(0,f.useContext)(kO),isPresent:t,safeToRemove:n})}function ij(e,t,n){let r=aD(e)?e:RE(e);return r.start(zk(``,r,t,n)),r.animation}const aj=(e,t)=>e.depth-t.depth;var oj=class{constructor(){this.children=[],this.isDirty=!1}add(e){CS(this.children,e),this.isDirty=!0}remove(e){wS(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(aj),this.isDirty=!1,this.children.forEach(e)}};function sj(e,t){let n=SC.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(_C(r),e(a-t))};return X.setup(r,!0),()=>_C(r)}const cj=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],lj=cj.length,uj=e=>typeof e==`string`?parseFloat(e):e,dj=e=>typeof e==`number`||Z.test(e);function fj(e,t,n,r,i,a){i?(e.opacity=Q(0,n.opacity??1,mj(r)),e.opacityExit=Q(t.opacity??1,0,hj(r))):a&&(e.opacity=Q(t.opacity??1,n.opacity??1,r));for(let i=0;i<lj;i++){let a=`border${cj[i]}Radius`,o=pj(t,a),s=pj(n,a);if(o===void 0&&s===void 0)continue;o||=0,s||=0;let c=o===0||s===0||dj(o)===dj(s);c?(e[a]=Math.max(Q(uj(o),uj(s),r),0),(GC.test(s)||GC.test(o))&&(e[a]+=`%`)):e[a]=s}(t.rotate||n.rotate)&&(e.rotate=Q(t.rotate||0,n.rotate||0,r))}function pj(e,t){return e[t]===void 0?e.borderRadius:e[t]}const mj=gj(0,.5,nC),hj=gj(.5,.95,PS);function gj(e,t,n){return r=>r<e?0:r>t?1:n(LS(e,t,r))}function _j(e,t){e.min=t.min,e.max=t.max}function vj(e,t){_j(e.x,t.x),_j(e.y,t.y)}function yj(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function bj(e,t,n,r,i){return e-=t,e=KO(e,1/n,r),i!==void 0&&(e=KO(e,1/i,r)),e}function xj(e,t=0,n=1,r=.5,i,a=e,o=e){if(GC.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=bj(e.min,t,n,s,i),e.max=bj(e.max,t,n,s,i)}function Sj(e,t,[n,r,i],a,o){xj(e,t[n],t[r],t[i],t.scale,a,o)}const Cj=[`x`,`scaleX`,`originX`],wj=[`y`,`scaleY`,`originY`];function Tj(e,t,n,r){Sj(e.x,t,Cj,n?n.x:void 0,r?r.x:void 0),Sj(e.y,t,wj,n?n.y:void 0,r?r.y:void 0)}function Ej(e){return e.translate===0&&e.scale===1}function Dj(e){return Ej(e.x)&&Ej(e.y)}function Oj(e,t){return e.min===t.min&&e.max===t.max}function kj(e,t){return Oj(e.x,t.x)&&Oj(e.y,t.y)}function Aj(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function jj(e,t){return Aj(e.x,t.x)&&Aj(e.y,t.y)}function Mj(e){return _A(e.x)/_A(e.y)}function Nj(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Pj=class{constructor(){this.members=[]}add(e){CS(this.members,e),e.scheduleRender()}remove(e){if(wS(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 Fj(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 Ij={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Lj=[``,`X`,`Y`,`Z`],Rj=1e3;let zj=0;function Bj(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Vj(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Ak(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&&Vj(r)}function Hj({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=zj++,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,pC.value&&(Ij.nodes=Ij.calculatedTargetDeltas=Ij.calculatedProjections=0),this.nodes.forEach(Gj),this.nodes.forEach(Qj),this.nodes.forEach($j),this.nodes.forEach(Kj),pC.addProjectionMetrics&&pC.addProjectionMetrics(Ij)},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 oj)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new RS),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=rD(t)&&!iD(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=sj(i,250),ej.hasAnimatedSinceResize&&(ej.hasAnimatedSinceResize=!1,this.nodes.forEach(Zj)))})}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()||oM,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!jj(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={...dE(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||Zj(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(),_C(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(eM),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&&Vj(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(Jj);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Yj);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Xj),this.nodes.forEach(Uj),this.nodes.forEach(Wj)):this.nodes.forEach(Yj),this.clearAllSnapshots();let t=SC.now();vC.delta=TS(0,1e3/60,t-vC.timestamp),vC.timestamp=t,vC.isProcessing=!0,yC.update.process(vC),yC.preRender.process(vC),yC.render.process(vC),vC.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,zE.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qj),this.sharedNodes.forEach(tM)}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&&!_A(this.snapshot.measuredBox.x)&&!_A(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=sk(),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&&!Dj(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||UO(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)),uM(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return sk();let t=e.measureViewportBox(),n=this.scroll?.wasRoot||this.path.some(fM);if(!n){let{scroll:e}=this.root;e&&($O(t.x,e.offset.x),$O(t.y,e.offset.y))}return t}removeElementScroll(e){let t=sk();if(vj(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&&vj(t,e),$O(t.x,i.offset.x),$O(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=sk();vj(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&&tk(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),UO(r.latestValues)&&tk(n,r.latestValues)}return UO(this.latestValues)&&tk(n,this.latestValues),n}removeTransform(e){let t=sk();vj(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!UO(n.latestValues))continue;HO(n.latestValues)&&n.updateSnapshot();let r=sk(),i=n.measurePageBox();vj(r,i),Tj(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return UO(this.latestValues)&&Tj(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!==vC.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=vC.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=sk(),this.targetWithTransforms=sk()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),SA(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):vj(this.target,this.layout.layoutBox),YO(this.target,this.targetDelta)):vj(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),pC.value&&Ij.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||HO(this.parent.latestValues)||WO(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=sk(),this.relativeTargetOrigin=sk(),wA(this.relativeTargetOrigin,t,n),vj(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===vC.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;vj(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;QO(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=sk());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(yj(this.prevProjectionDelta.x,this.projectionDelta.x),yj(this.prevProjectionDelta.y,this.projectionDelta.y)),bA(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Nj(this.projectionDelta.x,this.prevProjectionDelta.x)||!Nj(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),pC.value&&Ij.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=ak(),this.projectionDelta=ak(),this.projectionDeltaWithTransform=ak()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=ak();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=sk(),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(aM));this.animationProgress=0;let p;this.mixTargetDelta=t=>{let n=t/1e3;nM(a.x,e.x,n),nM(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wA(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),iM(this.relativeTarget,this.relativeTargetOrigin,o,n),p&&kj(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||=sk(),vj(p,this.relativeTarget)),l&&(this.animationValues=i,fj(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&&=(_C(this.pendingAnimation),void 0),this.pendingAnimation=X.update(()=>{ej.hasAnimatedSinceResize=!0,CC.layout++,this.motionValue||=RE(0),this.currentAnimation=ij(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{CC.layout--},onComplete:()=>{CC.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&&dM(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||sk();let t=_A(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=_A(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}vj(t,n),tk(t,i),bA(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Pj);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&&Bj(`z`,e,r,this.animationValues);for(let t=0;t<Lj.length;t++)Bj(`rotate${Lj[t]}`,e,r,this.animationValues),Bj(`skew${Lj[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=hO(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=hO(t?.pointerEvents)||``),this.hasProjected&&!UO(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Fj(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,KD){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=KD[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?hO(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Jj),this.root.sharedNodes.clear()}}}function Uj(e){e.updateLayout()}function Wj(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`?TA(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=_A(r);r.min=n[e].min,r.max=r.min+i}):dM(i,t.layoutBox,n)&&TA(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=_A(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=ak();bA(o,n,t.layoutBox);let s=ak();a?bA(s,e.applyTransform(r,!0),t.measuredBox):bA(s,n,t.layoutBox);let c=!Dj(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=sk();wA(o,t.layoutBox,i.layoutBox);let s=sk();wA(s,n,a.layoutBox),jj(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 Gj(e){pC.value&&Ij.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 Kj(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function qj(e){e.clearSnapshot()}function Jj(e){e.clearMeasurements()}function Yj(e){e.isLayoutDirty=!1}function Xj(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Zj(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Qj(e){e.resolveTargetDelta()}function $j(e){e.calcProjection()}function eM(e){e.resetSkewAndRotation()}function tM(e){e.removeLeadSnapshot()}function nM(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 rM(e,t,n,r){e.min=Q(t.min,n.min,r),e.max=Q(t.max,n.max,r)}function iM(e,t,n,r){rM(e.x,t.x,n.x,r),rM(e.y,t.y,n.y,r)}function aM(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const oM={duration:.45,ease:[.4,0,.1,1]},sM=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),cM=sM(`applewebkit/`)&&!sM(`chrome/`)?Math.round:PS;function lM(e){e.min=cM(e.min),e.max=cM(e.max)}function uM(e){lM(e.x),lM(e.y)}function dM(e,t,n){return e===`position`||e===`preserve-aspect`&&!vA(Mj(t),Mj(n),.2)}function fM(e){return e!==e.root&&e.scroll?.wasRoot}const pM=Hj({attachResizeListener:(e,t)=>sA(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),mM={current:void 0},hM=Hj({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!mM.current){let e=new pM({});e.mount(window),e.setOptions({layoutScroll:!0}),mM.current=e}return mM.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),gM={pan:{Feature:$A},drag:{Feature:ZA,ProjectionNode:hM,MeasureLayout:rj}};function _M(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,cA(t)))}var vM=class extends nA{mount(){let{current:e}=this.node;e&&(this.unmount=KE(e,(e,t)=>(_M(this.node,t,`Start`),e=>_M(this.node,e,`End`))))}unmount(){}},yM=class extends nA{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=IS(sA(this.node.current,`focus`,()=>this.onFocus()),sA(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function bM(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,cA(t)))}var xM=class extends nA{mount(){let{current:e}=this.node;e&&(this.unmount=nD(e,(e,t)=>(bM(this.node,t,`Start`),(e,{success:t})=>bM(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};const SM=new WeakMap,CM=new WeakMap,wM=e=>{let t=SM.get(e.target);t&&t(e)},TM=e=>{e.forEach(wM)};function EM({root:e,...t}){let n=e||document;CM.has(n)||CM.set(n,{});let r=CM.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(TM,{root:e,...t})),r[i]}function DM(e,t,n){let r=EM(t);return SM.set(e,n),r.observe(e),()=>{SM.delete(e),r.unobserve(e)}}const OM={some:0,all:1};var kM=class extends nA{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:OM[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 DM(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(AM(e,t));n&&this.startObserver()}unmount(){}};function AM({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const jM={inView:{Feature:kM},tap:{Feature:xM},focus:{Feature:yM},hover:{Feature:vM}},MM={layout:{ProjectionNode:hM,MeasureLayout:rj}},NM={...oA,...jM,...gM,...MM},PM=LO(NM,Sk),FM=({isVisible:e,children:t})=>{let n=(0,f.useRef)(null),[r,i]=(0,f.useState)(0);return(0,f.useEffect)(()=>{n.current&&setTimeout(()=>{i((n.current?.scrollHeight??0)+5)},0)},[t]),(0,p.jsx)(yD,{initial:!1,children:e&&(0,p.jsx)(PM.div,{initial:{height:0,opacity:0},animate:{height:r,opacity:1},exit:{height:0,opacity:0},transition:{type:`spring`,damping:20,stiffness:100},children:(0,p.jsx)(`div`,{ref:n,children:t})})})};var IM=FM;function LM(e,[t,n]){return Math.min(n,Math.max(t,e))}function RM(e){let t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var zM=[`PageUp`,`PageDown`],BM=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],VM={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},HM=`Slider`,[UM,WM,GM]=f_(HM),[KM,qM]=F(HM,[GM]),[JM,YM]=KM(HM),XM=f.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:m=()=>{},inverted:h=!1,form:g,..._}=e,v=f.useRef(new Set),y=f.useRef(0),b=o===`horizontal`,x=b?$M:eN,[S=[],C]=Vr({prop:u,defaultProp:l,onChange:e=>{let t=[...v.current];t[y.current]?.focus(),d(e)}}),w=f.useRef(S);function T(e){let t=mN(S,e);O(e,t)}function E(e){O(e,y.current)}function D(){let e=w.current[y.current],t=S[y.current],n=t!==e;n&&m(S)}function O(e,t,{commit:n}={commit:!1}){let o=yN(a),s=bN(Math.round((e-r)/a)*a+r,o),l=LM(s,[r,i]);C((e=[])=>{let r=dN(e,l,t);if(_N(r,c*a)){y.current=r.indexOf(l);let t=String(r)!==String(e);return t&&n&&m(r),t?r:e}else return e})}return(0,p.jsx)(JM,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:y,thumbs:v.current,values:S,orientation:o,form:g,children:(0,p.jsx)(UM.Provider,{scope:e.__scopeSlider,children:(0,p.jsx)(UM.Slot,{scope:e.__scopeSlider,children:(0,p.jsx)(x,{"aria-disabled":s,"data-disabled":s?``:void 0,..._,ref:t,onPointerDown:A(_.onPointerDown,()=>{s||(w.current=S)}),min:r,max:i,inverted:h,onSlideStart:s?void 0:T,onSlideMove:s?void 0:E,onSlideEnd:s?void 0:D,onHomeKeyDown:()=>!s&&O(r,0,{commit:!0}),onEndKeyDown:()=>!s&&O(i,S.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){let n=zM.includes(e.key),r=n||e.shiftKey&&BM.includes(e.key),i=r?10:1,o=y.current,s=S[o],c=a*i*t;O(s+c,o,{commit:!0})}}})})})})});XM.displayName=HM;var[ZM,QM]=KM(HM,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),$M=f.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,m]=f.useState(null),h=N(t,e=>m(e)),g=f.useRef(void 0),_=m_(i),v=_===`ltr`,y=v&&!a||!v&&a;function b(e){let t=g.current||d.getBoundingClientRect(),i=[0,t.width],a=y?[n,r]:[r,n],o=vN(i,a);return g.current=t,o(e-t.left)}return(0,p.jsx)(ZM,{scope:e.__scopeSlider,startEdge:y?`left`:`right`,endEdge:y?`right`:`left`,direction:y?1:-1,size:`width`,children:(0,p.jsx)(tN,{dir:_,"data-orientation":`horizontal`,...u,ref:h,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=b(e.clientX);o?.(t)},onSlideMove:e=>{let t=b(e.clientX);s?.(t)},onSlideEnd:()=>{g.current=void 0,c?.()},onStepKeyDown:e=>{let t=y?`from-left`:`from-right`,n=VM[t].includes(e.key);l?.({event:e,direction:n?-1:1})}})})}),eN=f.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=f.useRef(null),d=N(t,u),m=f.useRef(void 0),h=!i;function g(e){let t=m.current||u.current.getBoundingClientRect(),i=[0,t.height],a=h?[r,n]:[n,r],o=vN(i,a);return m.current=t,o(e-t.top)}return(0,p.jsx)(ZM,{scope:e.__scopeSlider,startEdge:h?`bottom`:`top`,endEdge:h?`top`:`bottom`,size:`height`,direction:h?1:-1,children:(0,p.jsx)(tN,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=g(e.clientY);a?.(t)},onSlideMove:e=>{let t=g(e.clientY);o?.(t)},onSlideEnd:()=>{m.current=void 0,s?.()},onStepKeyDown:e=>{let t=h?`from-bottom`:`from-top`,n=VM[t].includes(e.key);c?.({event:e,direction:n?-1:1})}})})}),tN=f.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=YM(HM,n);return(0,p.jsx)(V.span,{...l,ref:t,onKeyDown:A(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):zM.concat(BM).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:A(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:A(e.onPointerMove,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:A(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),nN=`SliderTrack`,rN=f.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=YM(nN,n);return(0,p.jsx)(V.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});rN.displayName=nN;var iN=`SliderRange`,aN=f.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=YM(iN,n),a=QM(iN,n),o=f.useRef(null),s=N(t,o),c=i.values.length,l=i.values.map(e=>fN(e,i.min,i.max)),u=c>1?Math.min(...l):0,d=100-Math.max(...l);return(0,p.jsx)(V.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:s,style:{...e.style,[a.startEdge]:u+`%`,[a.endEdge]:d+`%`}})});aN.displayName=iN;var oN=`SliderThumb`,sN=f.forwardRef((e,t)=>{let n=WM(e.__scopeSlider),[r,i]=f.useState(null),a=N(t,e=>i(e)),o=f.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,p.jsx)(cN,{...e,ref:a,index:o})}),cN=f.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=YM(oN,n),s=QM(oN,n),[c,l]=f.useState(null),u=N(t,e=>l(e)),d=c?o.form||!!c.closest(`form`):!0,m=ur(c),h=o.values[r],g=h===void 0?0:fN(h,o.min,o.max),_=pN(r,o.values.length),v=m?.[s.size],y=v?hN(v,g,s.direction):0;return f.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,p.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${g}% + ${y}px)`},children:[(0,p.jsx)(UM.ItemSlot,{scope:e.__scopeSlider,children:(0,p.jsx)(V.span,{role:`slider`,"aria-label":e[`aria-label`]||_,"aria-valuemin":o.min,"aria-valuenow":h,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:h===void 0?{display:`none`}:e.style,onFocus:A(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,p.jsx)(uN,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:h},r)]})});sN.displayName=oN;var lN=`RadioBubbleInput`,uN=f.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=f.useRef(null),a=N(i,r),o=RM(t);return f.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`),a=r.set;if(o!==t&&a){let n=new Event(`input`,{bubbles:!0});a.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,p.jsx)(V.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});uN.displayName=lN;function dN(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function fN(e,t,n){let r=n-t,i=100/r,a=i*(e-t);return LM(a,[0,100])}function pN(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function mN(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 hN(e,t,n){let r=e/2,i=vN([0,50],[0,r]);return(r-i(t)*n)*n}function gN(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function _N(e,t){if(t>0){let n=gN(e),r=Math.min(...n);return r>=t}return!0}function vN(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 yN(e){return(String(e).split(`.`)[1]||``).length}function bN(e,t){let n=10**t;return Math.round(e*n)/n}var xN=XM,SN=rN,CN=aN,wN=sN;const TN=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:m}=e;return(0,p.jsxs)(xN,{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:m,min:f,disabled:o,step:d,children:[(0,p.jsx)(SN,{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:(0,p.jsx)(CN,{className:`tw:absolute tw:h-full tw:rounded-full ${l}`})}),(0,p.jsx)(wN,{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 EN(e,t=[]){let n=[];function r(t,r){let i=f.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=f.useMemo(()=>o,Object.values(o));return(0,p.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=f.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>f.createContext(e));return function(n){let r=n?.[e]||t;return f.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,DN(i,...t)]}function DN(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e),a=i[`__scope${r}`];return{...t,...a}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var ON=Symbol.for(`react.lazy`),kN=f.use;function AN(e){return typeof e==`object`&&!!e&&`then`in e}function jN(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ON&&`_payload`in e&&AN(e._payload)}function MN(e){let t=NN(e),n=f.forwardRef((e,n)=>{let{children:r,...i}=e;jN(r)&&typeof kN==`function`&&(r=kN(r._payload));let a=f.Children.toArray(r),o=a.find(FN);if(o){let e=o.props.children,r=a.map(t=>t===o?f.Children.count(e)>1?f.Children.only(null):f.isValidElement(e)?e.props.children:null:t);return(0,p.jsx)(t,{...i,ref:n,children:f.isValidElement(e)?f.cloneElement(e,void 0,r):null})}return(0,p.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function NN(e){let t=f.forwardRef((e,t)=>{let{children:n,...r}=e;if(jN(n)&&typeof kN==`function`&&(n=kN(n._payload)),f.isValidElement(n)){let e=LN(n),i=IN(r,n.props);return n.type!==f.Fragment&&(i.ref=t?M(t,e):e),f.cloneElement(n,i)}return f.Children.count(n)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var PN=Symbol(`radix.slottable`);function FN(e){return f.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===PN}function IN(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 LN(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 RN=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`],zN=RN.reduce((e,t)=>{let n=MN(`Primitive.${t}`),r=f.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,p.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),BN=`Progress`,VN=100,[HN,UN]=EN(BN),[WN,GN]=HN(BN),KN=f.forwardRef((e,t)=>{let{__scopeProgress:n,value:r=null,max:i,getValueLabel:a=YN,...o}=e;(i||i===0)&&!QN(i)&&console.error(eP(`${i}`,`Progress`));let s=QN(i)?i:VN;r!==null&&!$N(r,s)&&console.error(tP(`${r}`,`Progress`));let c=$N(r,s)?r:null,l=ZN(c)?a(c,s):void 0;return(0,p.jsx)(WN,{scope:n,value:c,max:s,children:(0,p.jsx)(zN.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":ZN(c)?c:void 0,"aria-valuetext":l,role:`progressbar`,"data-state":XN(c,s),"data-value":c??void 0,"data-max":s,...o,ref:t})})});KN.displayName=BN;var qN=`ProgressIndicator`,JN=f.forwardRef((e,t)=>{let{__scopeProgress:n,...r}=e,i=GN(qN,n);return(0,p.jsx)(zN.div,{"data-state":XN(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});JN.displayName=qN;function YN(e,t){return`${Math.round(e/t*100)}%`}function XN(e,t){return e==null?`indeterminate`:e===t?`complete`:`loading`}function ZN(e){return typeof e==`number`}function QN(e){return ZN(e)&&!isNaN(e)&&e>0}function $N(e,t){return ZN(e)&&!isNaN(e)&&e<=t&&e>=0}function eP(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${VN}\`.`}function tP(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
81
81
|
- a positive number
|
|
82
|
-
- less than the value passed to \`max\` (or ${
|
|
82
|
+
- less than the value passed to \`max\` (or ${VN} if no \`max\` prop is set)
|
|
83
83
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
84
84
|
|
|
85
|
-
Defaulting to \`null\`.`}var QN=HN,$N=WN,eP=s(((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=F(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(I(this._r,255)*100)+`%`,g:a(I(this._g,255)*100)+`%`,b:a(I(this._b,255)*100)+`%`,a:this._a}},toPercentageRgbString:function(){return this._a==1?`rgb(`+a(I(this._r,255)*100)+`%, `+a(I(this._g,255)*100)+`%, `+a(I(this._b,255)*100)+`%)`:`rgba(`+a(I(this._r,255)*100)+`%, `+a(I(this._g,255)*100)+`%, `+a(I(this._b,255)*100)+`%, `+this._roundA+`)`},toName:function(){return this._a===0?`transparent`:this._a<1?!1:N[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]=te(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=ie(e)),typeof e==`object`&&(H(e.r)&&H(e.g)&&H(e.b)?(t=d(e.r,e.g,e.b),c=!0,l=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):H(e.h)&&H(e.s)&&H(e.v)?(r=te(e.s),i=te(e.v),t=h(e.h,r,i),c=!0,l=`hsv`):H(e.h)&&H(e.s)&&H(e.l)&&(r=te(e.s),a=te(e.l),t=p(e.h,r,a),c=!0,l=`hsl`),e.hasOwnProperty(`a`)&&(n=e.a)),n=F(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:I(e,255)*255,g:I(t,255)*255,b:I(n,255)*255}}function f(e,t,n){e=I(e,255),t=I(t,255),n=I(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=I(e,360),t=I(t,100),n=I(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=I(e,255),t=I(t,255),n=I(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=I(t,360)*6,n=I(n,100),r=I(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=[B(a(e).toString(16)),B(a(t).toString(16)),B(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=[B(a(e).toString(16)),B(a(t).toString(16)),B(a(n).toString(16)),B(ne(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=[B(ne(r)),B(a(e).toString(16)),B(a(t).toString(16)),B(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=L(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=L(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=L(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=L(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=ae(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`},N=l.hexNames=P(M);function P(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function I(t,n){z(t)&&(t=`100%`);var r=ee(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 L(e){return o(1,s(0,e))}function R(e){return parseInt(e,16)}function z(e){return typeof e==`string`&&e.indexOf(`.`)!=-1&&parseFloat(e)===1}function ee(e){return typeof e==`string`&&e.indexOf(`%`)!=-1}function B(e){return e.length==1?`0`+e:``+e}function te(e){return e<=1&&(e=e*100+`%`),e}function ne(t){return e.round(parseFloat(t)*255).toString(16)}function V(e){return R(e)/255}var re=(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 H(e){return!!re.CSS_UNIT.exec(e)}function ie(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=re.rgb.exec(e))?{r:i[1],g:i[2],b:i[3]}:(i=re.rgba.exec(e))?{r:i[1],g:i[2],b:i[3],a:i[4]}:(i=re.hsl.exec(e))?{h:i[1],s:i[2],l:i[3]}:(i=re.hsla.exec(e))?{h:i[1],s:i[2],l:i[3],a:i[4]}:(i=re.hsv.exec(e))?{h:i[1],s:i[2],v:i[3]}:(i=re.hsva.exec(e))?{h:i[1],s:i[2],v:i[3],a:i[4]}:(i=re.hex8.exec(e))?{r:R(i[1]),g:R(i[2]),b:R(i[3]),a:V(i[4]),format:t?`name`:`hex8`}:(i=re.hex6.exec(e))?{r:R(i[1]),g:R(i[2]),b:R(i[3]),format:t?`name`:`hex`}:(i=re.hex4.exec(e))?{r:R(i[1]+``+i[1]),g:R(i[2]+``+i[2]),b:R(i[3]+``+i[3]),a:V(i[4]+``+i[4]),format:t?`name`:`hex8`}:(i=re.hex3.exec(e))?{r:R(i[1]+``+i[1]),g:R(i[2]+``+i[2]),b:R(i[3]+``+i[3]),format:t?`name`:`hex`}:!1}function ae(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)})),tP=u(eP());const nP={duration:660,easing:`ease-in-out`,fill:`forwards`},rP=`tw:left-1 tw:text-xs tw:text-sq-text-color tw:dark:text-sq-dark-text tw:items-center tw:h-4.5`,iP=e=>{let{value:t,color:n=void 0,testId:r,label:i,extraClasses:a=``,labelClasses:o=``,valuesLength:s,max:c,index:l,totalValue:u,...d}=e,m=S(d),h=(0,f.useRef)(0),g=(0,f.useRef)(null),_=(0,f.useRef)(null),[v,y]=f.default.useState(``),b=``;u>=c?l===0&&s===1?b=`tw:rounded-[0.9375rem]`:l===0?b=`tw:rounded-l-[0.9375rem]`:l===s-1&&(b=`tw:rounded-r-[0.9375rem]`):l===0&&(b=`tw:rounded-l-[0.9375rem]`);let x=n||void 0,C=n?``:`tw:bg-sq-theme-dark`,w=r?`progress-bar-indicator-${r}`:`progress-bar-indicator`;(0,f.useEffect)(()=>{if(!_.current)return;function e(){g.current&&=(g.current.cancel(),null)}let n=Number(t)/Number(c)*100,r=h.current;e(),_.current.style.width=`${n}%`;let i=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;return!i&&n!==r&&(g.current=_.current.animate([{width:`${r}%`},{width:`${n}%`}],nP)),h.current=n,()=>e()},[t,c]),(0,f.useEffect)(()=>{_.current&&T(_.current)},[n]);let T=e=>{let t=getComputedStyle(e),n=t.backgroundColor,r=(0,tP.default)(n).isDark()?`tw:text-sq-white tw:dark:text-sq-white`:`tw:text-sq-text-color tw:dark:text-sq-text-color`;y(r)};return(0,p.jsx)($N,{className:`tw:w-full tw:h-4.5 tw:flex tw:justify-center tw:items-center ${s===1?``:`tw:overflow-hidden`} ${b} ${C} ${a}`,...m,"data-qtip-text":d.tooltip?d.tooltip:`${t}%`,"data-segment-value":t,"data-testid":w,ref:_,style:{backgroundColor:x,width:`${h.current}%`},children:i?(0,p.jsx)(`span`,{className:`${rP} ${o} ${v} ${s===1?`tw:absolute tw:z-50`:``}`,children:i}):void 0})},aP=({values:e=[],max:t=100,containerExtraClasses:n=``,zeroValueLabel:r=`No progress yet`})=>{let i=e.reduce((e,{value:t})=>e+t,0);return(0,p.jsx)(QN,{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)=>(0,f.createElement)(iP,{...n,max:t,valuesLength:e.length,index:r,totalValue:i,key:r})):(0,p.jsx)(`div`,{className:`${rP} tw:mx-auto tw:overflow-hidden`,children:r})})};var oP=aP;const sP=`tw:flex tw:outline-none tw:w-full tw:relative tw:flex-wrap`,cP={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:``},lP={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:``},uP=e=>{let{id:t,extraClassNames:n=``,testId:r,onChange:i,buttons:a=[],...o}=e,s=S(o),c=`tw:flex tw:outline-none tw:w-full tw:relative tw:flex-wrap ${n}`;return(0,p.jsx)(`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(0,p.jsx)(O,{...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?`${cP[e.buttonProps.variant??`outline`]} ${lP[e.buttonProps.variant??`outline`]} `:``} ${e.buttonProps.extraClassNames}`,onClick:()=>i&&i(e.buttonProps.value)},t)}return e?.element})})},dP=({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:d=``,carouselItems:m=[]})=>{let[h,g]=(0,f.useState)(t),_=e=>{let t=(e+m.length)%m.length;g(t),r(t,t>h?`right`:`left`)};(0,f.useEffect)(()=>{if(i){let e=setInterval(()=>{o||h<m.length-1?_(h+1):clearInterval(e)},s);return()=>clearInterval(e)}},[i,h,o,s,m.length]),(0,f.useEffect)(()=>{t!==h&&g(t)},[t]);let v=()=>{if(h===0&&!o)return;let e=h-1;e<0&&(e=m.length-1),_(e)},y=()=>{if(h===m.length-1){if(!o)return;_(0)}else _(h+1)},b={type:`spring`,damping:20,stiffness:100},x={initial:e=>({x:e>0?`100%`:`-100%`,opacity:0}),animate:{x:0,opacity:1,transition:b},exit:e=>({x:e>0?`-100%`:`100%`,opacity:0,transition:b})};return(0,p.jsxs)(`div`,{"data-testid":e,className:`tw:flex tw:flex-col tw:items-center tw:justify-center tw:w-full tw:overflow-hidden ${n}`,children:[(0,p.jsxs)(`div`,{className:`tw:flex tw:items-center tw:w-full tw:h-max tw:gap-1`,children:[u&&(0,p.jsx)(O,{icon:c,size:`lg`,variant:`no-border`,testId:`carousel-prev`,extraClassNames:`${h===0&&!o?`tw:invisible`:``} ${d} tw:animate-fadeIn`,onClick:v}),(0,p.jsx)(`div`,{className:`tw:h-full tw:w-full tw:overflow-hidden`,children:(0,p.jsx)(AM.div,{custom:1,initial:`initial`,animate:`animate`,exit:`exit`,variants:x,className:`tw:w-full`,children:m[h]},h)}),u&&(0,p.jsx)(O,{icon:l,testId:`carousel-next`,size:`lg`,variant:`no-border`,extraClassNames:`${h===m.length-1&&!o?`tw:invisible`:``} ${d} tw:animate-fadeIn`,onClick:y})]}),a&&(0,p.jsx)(`div`,{className:`tw:flex tw:gap-1 tw:mt-2`,children:m.map((e,t)=>(0,p.jsx)(`div`,{className:`tw:w-2 tw:h-2 tw:rounded-full tw:cursor-pointer ${t===h?`tw:bg-sq-theme-dark`:`tw:bg-sq-darkish-gray`}`,onClick:()=>_(t)},t))})]})};var fP=dP;const pP=[`button`,`reset`,`submit`,`link`],mP=[`xs`,`sm`,`lg`],hP=[`outline`,`theme`,`theme-light`,`warning`,`danger`,`no-border`],gP=[`left`,`right`],_P=[`theme`,`white`,`dark-gray`,`darkish-gray`,`gray`,`color`,`info`,`text`,`warning`,`inherit`,`danger`,`theme-light`,`success`],vP=[..._P,`default`],yP=[`outline`,`theme`,`theme-light`,`warning`,`danger`,`no-border`];exports.Accordion=Qv,exports.Alert=Jx,exports.Button=O,exports.ButtonGroup=uP,exports.ButtonWithDropdown=zx,exports.ButtonWithPopover=ry,exports.Carousel=fP,exports.Checkbox=vo,exports.Collapse=MM,exports.DEFAULT_TOOL_TIP_DELAY=b,exports.Icon=E,exports.InputGroup=pS,exports.Modal=d_,exports.ProgressBar=oP,exports.QTip=Ac,exports.SeeqActionDropdown=oS,exports.Select=ug,exports.SelectComponents=vp,exports.Slider=xN,exports.Tabs=nv,exports.TextArea=wo,exports.TextField=fo,exports.ToolbarButton=eo,exports.Tooltip=To,exports.TriggerWithDropdown=Hx,exports.buttonSizes=mP,exports.buttonTypes=pP,exports.buttonVariants=hP,exports.iconPositions=gP,exports.iconTypes=_P,exports.svgIconTypes=vP,exports.toolbarButtonVariants=yP,exports.tooltipPositions=x;
|
|
85
|
+
Defaulting to \`null\`.`}var nP=KN,rP=JN,iP=s(((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=F(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(I(this._r,255)*100)+`%`,g:a(I(this._g,255)*100)+`%`,b:a(I(this._b,255)*100)+`%`,a:this._a}},toPercentageRgbString:function(){return this._a==1?`rgb(`+a(I(this._r,255)*100)+`%, `+a(I(this._g,255)*100)+`%, `+a(I(this._b,255)*100)+`%)`:`rgba(`+a(I(this._r,255)*100)+`%, `+a(I(this._g,255)*100)+`%, `+a(I(this._b,255)*100)+`%, `+this._roundA+`)`},toName:function(){return this._a===0?`transparent`:this._a<1?!1:N[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]=te(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=ie(e)),typeof e==`object`&&(H(e.r)&&H(e.g)&&H(e.b)?(t=d(e.r,e.g,e.b),c=!0,l=String(e.r).substr(-1)===`%`?`prgb`:`rgb`):H(e.h)&&H(e.s)&&H(e.v)?(r=te(e.s),i=te(e.v),t=h(e.h,r,i),c=!0,l=`hsv`):H(e.h)&&H(e.s)&&H(e.l)&&(r=te(e.s),a=te(e.l),t=p(e.h,r,a),c=!0,l=`hsl`),e.hasOwnProperty(`a`)&&(n=e.a)),n=F(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:I(e,255)*255,g:I(t,255)*255,b:I(n,255)*255}}function f(e,t,n){e=I(e,255),t=I(t,255),n=I(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=I(e,360),t=I(t,100),n=I(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=I(e,255),t=I(t,255),n=I(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=I(t,360)*6,n=I(n,100),r=I(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=[B(a(e).toString(16)),B(a(t).toString(16)),B(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=[B(a(e).toString(16)),B(a(t).toString(16)),B(a(n).toString(16)),B(ne(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=[B(ne(r)),B(a(e).toString(16)),B(a(t).toString(16)),B(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=L(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=L(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=L(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=L(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=ae(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`},N=l.hexNames=P(M);function P(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function I(t,n){z(t)&&(t=`100%`);var r=ee(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 L(e){return o(1,s(0,e))}function R(e){return parseInt(e,16)}function z(e){return typeof e==`string`&&e.indexOf(`.`)!=-1&&parseFloat(e)===1}function ee(e){return typeof e==`string`&&e.indexOf(`%`)!=-1}function B(e){return e.length==1?`0`+e:``+e}function te(e){return e<=1&&(e=e*100+`%`),e}function ne(t){return e.round(parseFloat(t)*255).toString(16)}function V(e){return R(e)/255}var re=(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 H(e){return!!re.CSS_UNIT.exec(e)}function ie(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=re.rgb.exec(e))?{r:i[1],g:i[2],b:i[3]}:(i=re.rgba.exec(e))?{r:i[1],g:i[2],b:i[3],a:i[4]}:(i=re.hsl.exec(e))?{h:i[1],s:i[2],l:i[3]}:(i=re.hsla.exec(e))?{h:i[1],s:i[2],l:i[3],a:i[4]}:(i=re.hsv.exec(e))?{h:i[1],s:i[2],v:i[3]}:(i=re.hsva.exec(e))?{h:i[1],s:i[2],v:i[3],a:i[4]}:(i=re.hex8.exec(e))?{r:R(i[1]),g:R(i[2]),b:R(i[3]),a:V(i[4]),format:t?`name`:`hex8`}:(i=re.hex6.exec(e))?{r:R(i[1]),g:R(i[2]),b:R(i[3]),format:t?`name`:`hex`}:(i=re.hex4.exec(e))?{r:R(i[1]+``+i[1]),g:R(i[2]+``+i[2]),b:R(i[3]+``+i[3]),a:V(i[4]+``+i[4]),format:t?`name`:`hex8`}:(i=re.hex3.exec(e))?{r:R(i[1]+``+i[1]),g:R(i[2]+``+i[2]),b:R(i[3]+``+i[3]),format:t?`name`:`hex`}:!1}function ae(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)})),aP=u(iP());const oP={duration:660,easing:`ease-in-out`,fill:`forwards`},sP=`tw:left-1 tw:text-xs tw:text-sq-text-color tw:dark:text-sq-dark-text tw:items-center tw:h-4.5`,cP=e=>{let{value:t,color:n=void 0,testId:r,label:i,extraClasses:a=``,labelClasses:o=``,valuesLength:s,max:c,index:l,totalValue:u,...d}=e,m=S(d),h=(0,f.useRef)(0),g=(0,f.useRef)(null),_=(0,f.useRef)(null),[v,y]=f.default.useState(``),b=``;u>=c?l===0&&s===1?b=`tw:rounded-[0.9375rem]`:l===0?b=`tw:rounded-l-[0.9375rem]`:l===s-1&&(b=`tw:rounded-r-[0.9375rem]`):l===0&&(b=`tw:rounded-l-[0.9375rem]`);let x=n||void 0,C=n?``:`tw:bg-sq-theme-dark`,w=r?`progress-bar-indicator-${r}`:`progress-bar-indicator`;(0,f.useEffect)(()=>{if(!_.current)return;function e(){g.current&&=(g.current.cancel(),null)}let n=Number(t)/Number(c)*100,r=h.current;e(),_.current.style.width=`${n}%`;let i=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;return!i&&n!==r&&(g.current=_.current.animate([{width:`${r}%`},{width:`${n}%`}],oP)),h.current=n,()=>e()},[t,c]),(0,f.useEffect)(()=>{_.current&&T(_.current)},[n]);let T=e=>{let t=getComputedStyle(e),n=t.backgroundColor,r=(0,aP.default)(n).isDark()?`tw:text-sq-white tw:dark:text-sq-white`:`tw:text-sq-text-color tw:dark:text-sq-text-color`;y(r)};return(0,p.jsx)(rP,{className:`tw:w-full tw:h-4.5 tw:flex tw:justify-center tw:items-center ${s===1?``:`tw:overflow-hidden`} ${b} ${C} ${a}`,...m,"data-qtip-text":d.tooltip?d.tooltip:`${t}%`,"data-segment-value":t,"data-testid":w,ref:_,style:{backgroundColor:x,width:`${h.current}%`},children:i?(0,p.jsx)(`span`,{className:`${sP} ${o} ${v} ${s===1?`tw:absolute tw:z-50`:``}`,children:i}):void 0})},lP=({values:e=[],max:t=100,containerExtraClasses:n=``,zeroValueLabel:r=`No progress yet`})=>{let i=e.reduce((e,{value:t})=>e+t,0);return(0,p.jsx)(nP,{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)=>(0,f.createElement)(cP,{...n,max:t,valuesLength:e.length,index:r,totalValue:i,key:r})):(0,p.jsx)(`div`,{className:`${sP} tw:mx-auto tw:overflow-hidden`,children:r})})};var uP=lP;const dP=`tw:flex tw:outline-none tw:w-full tw:relative tw:flex-wrap`,fP={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:``},pP={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:``},mP=e=>{let{id:t,extraClassNames:n=``,testId:r,onChange:i,buttons:a=[],...o}=e,s=S(o),c=`tw:flex tw:outline-none tw:w-full tw:relative tw:flex-wrap ${n}`;return(0,p.jsx)(`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(0,p.jsx)(O,{...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?`${fP[e.buttonProps.variant??`outline`]} ${pP[e.buttonProps.variant??`outline`]} `:``} ${e.buttonProps.extraClassNames}`,onClick:()=>i&&i(e.buttonProps.value)},t)}return e?.element})})},hP=({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:d=``,carouselItems:m=[]})=>{let[h,g]=(0,f.useState)(t),_=e=>{let t=(e+m.length)%m.length;g(t),r(t,t>h?`right`:`left`)};(0,f.useEffect)(()=>{if(i){let e=setInterval(()=>{o||h<m.length-1?_(h+1):clearInterval(e)},s);return()=>clearInterval(e)}},[i,h,o,s,m.length]),(0,f.useEffect)(()=>{t!==h&&g(t)},[t]);let v=()=>{if(h===0&&!o)return;let e=h-1;e<0&&(e=m.length-1),_(e)},y=()=>{if(h===m.length-1){if(!o)return;_(0)}else _(h+1)},b={type:`spring`,damping:20,stiffness:100},x={initial:e=>({x:e>0?`100%`:`-100%`,opacity:0}),animate:{x:0,opacity:1,transition:b},exit:e=>({x:e>0?`-100%`:`100%`,opacity:0,transition:b})};return(0,p.jsxs)(`div`,{"data-testid":e,className:`tw:flex tw:flex-col tw:items-center tw:justify-center tw:w-full tw:overflow-hidden ${n}`,children:[(0,p.jsxs)(`div`,{className:`tw:flex tw:items-center tw:w-full tw:h-max tw:gap-1`,children:[u&&(0,p.jsx)(O,{icon:c,size:`lg`,variant:`no-border`,testId:`carousel-prev`,extraClassNames:`${h===0&&!o?`tw:invisible`:``} ${d} tw:animate-fadeIn`,onClick:v}),(0,p.jsx)(`div`,{className:`tw:h-full tw:w-full tw:overflow-hidden`,children:(0,p.jsx)(PM.div,{custom:1,initial:`initial`,animate:`animate`,exit:`exit`,variants:x,className:`tw:w-full`,children:m[h]},h)}),u&&(0,p.jsx)(O,{icon:l,testId:`carousel-next`,size:`lg`,variant:`no-border`,extraClassNames:`${h===m.length-1&&!o?`tw:invisible`:``} ${d} tw:animate-fadeIn`,onClick:y})]}),a&&(0,p.jsx)(`div`,{className:`tw:flex tw:gap-1 tw:mt-2`,children:m.map((e,t)=>(0,p.jsx)(`div`,{className:`tw:w-2 tw:h-2 tw:rounded-full tw:cursor-pointer ${t===h?`tw:bg-sq-theme-dark`:`tw:bg-sq-darkish-gray`}`,onClick:()=>_(t)},t))})]})};var gP=hP;const _P=[`button`,`reset`,`submit`,`link`],vP=[`xs`,`sm`,`lg`],yP=[`outline`,`theme`,`theme-light`,`warning`,`danger`,`no-border`],bP=[`left`,`right`],xP=[`theme`,`white`,`dark-gray`,`darkish-gray`,`gray`,`color`,`info`,`text`,`warning`,`inherit`,`danger`,`theme-light`,`success`],SP=[...xP,`default`],CP=[`outline`,`theme`,`theme-light`,`warning`,`danger`,`no-border`];exports.Accordion=Qv,exports.Alert=Jx,exports.Badge=Qx,exports.Button=O,exports.ButtonGroup=mP,exports.ButtonWithDropdown=zx,exports.ButtonWithPopover=ry,exports.Carousel=gP,exports.Checkbox=vo,exports.Collapse=IM,exports.DEFAULT_TOOL_TIP_DELAY=b,exports.Icon=E,exports.InputGroup=_S,exports.Modal=d_,exports.ProgressBar=uP,exports.QTip=Ac,exports.SeeqActionDropdown=uS,exports.Select=ug,exports.SelectComponents=vp,exports.Slider=TN,exports.Tabs=nv,exports.TextArea=wo,exports.TextField=fo,exports.ToolbarButton=eo,exports.Tooltip=To,exports.TriggerWithDropdown=Hx,exports.buttonSizes=vP,exports.buttonTypes=_P,exports.buttonVariants=yP,exports.iconPositions=bP,exports.iconTypes=xP,exports.svgIconTypes=SP,exports.toolbarButtonVariants=CP,exports.tooltipPositions=x;
|
|
86
86
|
//# sourceMappingURL=index.js.map
|