@dss-kit/ui-kit 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/builders/Loader/Loader.d.ts +2 -2
- package/dist/components/builders/Loader/Loader.d.ts.map +1 -1
- package/dist/components/builders/Modal/Modal.d.ts +3 -4
- package/dist/components/builders/Modal/Modal.d.ts.map +1 -1
- package/dist/components/builders/Modal/Modal.stories.d.ts.map +1 -1
- package/dist/components/builders/Modal/ModalHeader/ModalHeader.d.ts +0 -2
- package/dist/components/builders/Modal/ModalHeader/ModalHeader.d.ts.map +1 -1
- package/dist/components/builders/Modal/ModalMain/ModalMain.d.ts.map +1 -1
- package/dist/components/builders/Modal/context.d.ts +9 -0
- package/dist/components/builders/Modal/context.d.ts.map +1 -0
- package/dist/components/builders/Modal/index.d.ts +4 -4
- package/dist/components/builders/Modal/index.d.ts.map +1 -1
- package/dist/components/builders/Portal/Portal.d.ts.map +1 -1
- package/dist/components/builders/Portal/context.d.ts +5 -0
- package/dist/components/builders/Portal/context.d.ts.map +1 -0
- package/dist/components/builders/index.d.ts +1 -0
- package/dist/components/builders/index.d.ts.map +1 -1
- package/dist/components/controls/Button/Button.d.ts +1 -1
- package/dist/components/controls/Button/Button.d.ts.map +1 -1
- package/dist/components/controls/Button/Button.stories.d.ts +2 -1
- package/dist/components/controls/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/controls/Checkbox/Checkbox.d.ts +6 -2
- package/dist/components/controls/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/controls/Select/Select.d.ts +0 -1
- package/dist/components/controls/Select/Select.d.ts.map +1 -1
- package/dist/components/controls/Select/Select.stories.d.ts.map +1 -1
- package/dist/components/shared/Popover/Popover.d.ts +9 -7
- package/dist/components/shared/Popover/Popover.d.ts.map +1 -1
- package/dist/components/shared/Popover/Popover.stories.d.ts +1 -1
- package/dist/components/shared/Popover/Popover.stories.d.ts.map +1 -1
- package/dist/components/shared/Popover/PopoverContent/PopoverContent.d.ts.map +1 -1
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.d.ts.map +1 -1
- package/dist/root.css +1 -1
- package/dist/ui-kit.cjs.js +11 -12
- package/dist/ui-kit.cjs.js.map +1 -1
- package/dist/ui-kit.css +1 -1
- package/dist/ui-kit.es.js +5248 -3398
- package/dist/ui-kit.es.js.map +1 -1
- package/dist/utils/hooks/index.d.ts +0 -1
- package/dist/utils/hooks/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/dist/utils/hooks/useDropdownPosition.d.ts +0 -33
- package/dist/utils/hooks/useDropdownPosition.d.ts.map +0 -1
package/dist/ui-kit.cjs.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),F=require("@emotion/css"),C=require("react"),ao=require("react-dom");function qr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const S=qr(C),Ru=qr(ao);function Eu(e){const{h:t,w:n,m:i,mx:o,my:s,mt:r,mr:a,mb:l,ml:u,p:c,px:d,py:f,pt:h,pr:m,pb:g,pl:y,gap:v,xGap:w,yGap:p,row:b,flex:_,relative:E,absolute:P,display:M,overflow:k,absoluteFill:A,center:j,justifyContent:U,alignItems:G,alignSelf:D,borderWidth:H,borderBottomWidth:z,borderColor:T,borderRadius:R,zIndex:L,minWidth:V,minHeight:W,maxWidth:$,maxHeight:Y,flexWrap:De,flexGrow:ne,flexShrink:fe,flexBasis:Fe,backgroundColor:st,position:rt,top:at,right:Se,bottom:lt,left:Vt,...At}=e;return{spacers:{h:t,w:n,m:i,mx:o,my:s,mt:r,mr:a,mb:l,ml:u,p:c,px:d,py:f,pt:h,pr:m,pb:g,pl:y,gap:v,xGap:w,yGap:p,row:b,flex:_,relative:E,absolute:P,display:M,overflow:k,absoluteFill:A,center:j,justifyContent:U,alignItems:G,alignSelf:D,borderWidth:H,borderBottomWidth:z,borderColor:T,borderRadius:R,zIndex:L,minWidth:V,minHeight:W,maxWidth:$,maxHeight:Y,flexWrap:De,flexGrow:ne,flexShrink:fe,flexBasis:Fe,backgroundColor:st,position:rt,top:at,right:Se,bottom:lt,left:Vt},rest:At}}const Mu=e=>F.css({display:e.display??"flex",flexDirection:e.row?"row":"column",height:e.h==="screen"?"100vh":e.h==="full"?"100%":e.h,width:e.w==="screen"?"100vw":e.w==="full"?"100%":e.w,margin:e.m,marginTop:e.mt??e.my,marginBottom:e.mb??e.my,marginLeft:e.ml??e.mx,marginRight:e.mr??e.mx,padding:e.p,paddingTop:e.pt??e.py,paddingBottom:e.pb??e.py,paddingLeft:e.pl??e.px,paddingRight:e.pr??e.px,gap:e.gap,columnGap:e.xGap,rowGap:e.yGap,justifyContent:e.center?"center":e.justifyContent,alignItems:e.center?"center":e.alignItems,alignSelf:e.alignSelf,borderWidth:e.borderWidth,borderBottomWidth:e.borderBottomWidth,borderColor:e.borderColor,borderRadius:e.borderRadius,zIndex:e.zIndex,overflow:e.overflow,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,flex:e.flex===!0?1:e.flex,flexWrap:e.flexWrap,flexGrow:e.flexGrow,flexShrink:e.flexShrink,flexBasis:e.flexBasis,backgroundColor:e.backgroundColor,position:e?.position?e?.position:e?.absolute?"absolute":e?.relative?"relative":void 0,...e.absoluteFill&&{position:"absolute",top:0,right:0,bottom:0,left:0},top:e?.top,right:e?.right,bottom:e?.bottom,left:e?.left}),I=C.forwardRef(({className:e,children:t,...n},i)=>{const{spacers:o,rest:s}=Eu(n),r=C.useMemo(()=>Mu(o),[o]);return x.jsx("div",{ref:i,className:F.cx(r,e),...s,children:t})});I.displayName="Box";const Xr=e=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function Pu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yn={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var ts;function Ga(){return ts||(ts=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",r=0;r<arguments.length;r++){var a=arguments[r];a&&(o=s(o,i(a)))}return o}function i(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var r="";for(var a in o)t.call(o,a)&&o[a]&&(r=s(r,a));return r}function s(o,r){return r?o?o+" "+r:o+r:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(dn)),dn.exports}var Wa=Ga();const Ne=Ha(Wa),Ua="_rippleOverlay_s2kim_8",Ka="_ripple_s2kim_8",ns={rippleOverlay:Ua,ripple:Ka},fn="button, a, input, label, [role='button'], [data-ripple]";function qa(e){if(typeof e.composedPath=="function")return e.composedPath();const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentNode||n.host;return t.push(window),t}const st=v.forwardRef(({color:e="rgba(0,0,0,0.18)",duration:t=1e3,radius:n="auto",className:i},s)=>{const o=v.useRef(null),[r,a]=v.useState([]),l=v.useRef([]),u=v.useRef(1),c=v.useRef(null),d=()=>{l.current.map(g=>clearTimeout(g)),l.current=[]},f=v.useCallback((g,x,w,C)=>{if(typeof window>"u")return;const y=w.getBoundingClientRect(),S=n==="auto"?Math.max(y.width,y.height)*2:n,_=g-C.left,b=x-C.top,E=Math.max(0,y.top-C.top),R=Math.max(0,y.left-C.left),A=Math.max(0,C.right-y.right),L=Math.max(0,C.bottom-y.bottom),ee=window.getComputedStyle(w).borderRadius||"0px",N=u.current++,Z={id:N,left:_-S/2,top:b-S/2,size:Math.ceil(S),clip:{top:Math.round(E),right:Math.round(A),bottom:Math.round(L),left:Math.round(R)},borderRadius:ee};a(se=>[...se,Z]);const te=window.setTimeout(()=>{a(se=>se.filter($=>$.id!==N))},t+80);l.current.push(te)},[t,n]),h=v.useCallback(g=>{try{if(!o.current)return;const x=o.current,w=x.parentElement;if(!w)return;const C=qa(g);let y=null;for(const R of C)if(R instanceof Element){if(R===w)break;if(R.matches&&R.matches(fn)){y=R;break}}if(y||(y=w),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"||y.classList.contains("ripple-disabled")))return;const S=g.target;if(S?.closest&&(S.closest("[disabled]")||S.getAttribute?.("aria-disabled")==="true"))return;const _=x.getBoundingClientRect(),{clientX:b}=g,{clientY:E}=g;f(b,E,y,_)}catch{}},[f]),p=v.useCallback(g=>{if(!o.current||!(g.key==="Enter"||g.key===" "))return;const x=o.current,w=x.parentElement;if(!w)return;const C=document.activeElement;let y=null;if(C instanceof Element&&C.matches(fn)&&(y=C),y||(y=w),y.closest&&(y.closest("[disabled]")||y.getAttribute("aria-disabled")==="true"))return;const S=x.getBoundingClientRect(),_=y.getBoundingClientRect().left+y.getBoundingClientRect().width/2,b=y.getBoundingClientRect().top+y.getBoundingClientRect().height/2;f(_,b,y,S)},[f]);return v.useImperativeHandle(s,()=>({trigger:({center:g=!0,x,y:w}={})=>{const C=o.current;if(!C)return;const y=C.parentElement;if(!y)return;const S=C.getBoundingClientRect(),_=document.activeElement instanceof Element&&document.activeElement.matches(fn)?document.activeElement:y,b=g?_.getBoundingClientRect().left+_.getBoundingClientRect().width/2:x??S.left+S.width/2,E=g?_.getBoundingClientRect().top+_.getBoundingClientRect().height/2:w??S.top+S.height/2;f(b,E,_,S)}}),[f]),v.useEffect(()=>{const g=o.current;if(!g)return;const x=g.parentElement;if(!x||typeof window>"u")return;const w=window.getComputedStyle(x);let C=!1;return w.position==="static"&&(x.style.position="relative",C=!0,c.current=x),x.addEventListener("pointerdown",h,!0),x.addEventListener("keydown",p),()=>{x.removeEventListener("pointerdown",h,!0),x.removeEventListener("keydown",p),C&&c.current&&(c.current.style.position="",c.current=null),d()}},[h,p]),v.useEffect(()=>()=>d(),[]),m.jsx("div",{ref:o,className:`${ns.rippleOverlay} ${i??""}`,"aria-hidden":!0,children:r.map(g=>m.jsx("span",{className:ns.ripple,style:{left:`${g.left}px`,top:`${g.top}px`,width:`${g.size}px`,height:`${g.size}px`,backgroundColor:e,animationDuration:`${t}ms`,clipPath:`inset(${g.clip.top}px ${g.clip.right}px ${g.clip.bottom}px ${g.clip.left}px round ${g.borderRadius})`}},g.id))})});function Yt(e,t){const{current:n}=v.useRef(e!==void 0),[i,s]=v.useState(t),o=n?e:i,r=v.useCallback(a=>{n||s(a)},[n]);return[o,r]}const Do=(e,t)=>{const[n,i]=v.useState({top:0,left:0,width:0});return v.useLayoutEffect(()=>{if(!t||!e.current||typeof window>"u")return;const s=()=>{const r=e.current.getBoundingClientRect();i({top:r.bottom+window.scrollY+4,left:r.left+window.scrollX,width:r.width})};s(),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0);const o=new ResizeObserver(()=>s());return o.observe(e.current),()=>{window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0),o.disconnect()}},[t,e]),n};function Zt(e,t,n,i=""){if(n)return e[`${t}_${n}${i}`]}function yt(e,t,n){return Zt(e,t,n,"Size")}const Xa="_button_11ykb_8",Ya="_button_primary_11ykb_19",Za="_button_secondary_11ykb_22",Ja="_button_negative_11ykb_25",Qa="_button_positive_11ykb_28",el="_button_warning_11ykb_31",tl="_button_neutral_11ykb_34",nl="_button_mdSize_11ykb_118",il="_button_smSize_11ykb_128",sl="_button_xsSize_11ykb_138",hn={button:Xa,button_primary:Ya,button_secondary:Za,button_negative:Ja,button_positive:Qa,button_warning:el,button_neutral:tl,"button_neutral-white":"_button_neutral-white_11ykb_37","button_no-bg":"_button_no-bg_11ykb_40",button_mdSize:nl,button_smSize:il,button_xsSize:sl};function wt({attr:e,children:t,className:n,type:i="button",color:s="primary",size:o="md",...r}){const a="button";return m.jsxs("button",{...e,...r,type:i,className:Ne(hn[a],n,yt(hn,a,o),Zt(hn,a,s)),children:[m.jsx(st,{}),t]})}const ol="_modal_1irhv_8",rl="_closeButton_1irhv_24",al="_size_lg_1irhv_31",ll="_size_md_1irhv_34",ul="_size_sm_1irhv_37",gn={modal:ol,"modal-animation":"_modal-animation_1irhv_1",closeButton:rl,size_lg:al,size_md:ll,size_sm:ul},Fo=v.forwardRef(({isOpen:e=!1,onClose:t,overlayClassName:n,modalClassName:i,size:s="md",closeOnBackdropClick:o=!0,closeOnEsc:r=!0,disableBodyScroll:a=!0,showAbsoluteCloseButton:l=!1,children:u},c)=>{v.useEffect(()=>{if(a&&e&&typeof window<"u"&&typeof document<"u"){const h=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}}},[e,a]);const d=v.useCallback(h=>{h.key==="Escape"&&t&&t()},[t]);v.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&r&&e)return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,r,d]);const f=v.useCallback(h=>{h.target===h.currentTarget&&o&&t&&t()},[o,t]);return e?m.jsx(rn,{children:m.jsx(V,{row:!0,top:0,right:0,bottom:0,left:0,position:"fixed",center:!0,flex:1,onClick:f,backgroundColor:"var(--fill-bg-overlay-primary)",className:n,zIndex:1,children:m.jsxs(V,{ref:c,className:M.cx(gn.modal,gn[`size_${s}`],i),relative:!0,children:[l&&m.jsx(wt,{className:gn.closeButton,onClick:t,color:"neutral",children:m.jsx(Ao,{})}),u]})})}):null});Fo.displayName="Modal";const fi=v.createContext({});function hi(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const gi=typeof window<"u",ko=gi?v.useLayoutEffect:v.useEffect,Jt=v.createContext(null);function pi(e,t){e.indexOf(t)===-1&&e.push(t)}function mi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Me=(e,t,n)=>n>t?t:n<e?e:n;function On(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ot=()=>{},Te=()=>{};process.env.NODE_ENV!=="production"&&(ot=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(On(t,n))},Te=(e,t,n)=>{if(!e)throw new Error(On(t,n))});const Ee={},Io=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Lo(e){return typeof e=="object"&&e!==null}const jo=e=>/^0[^.\s]+$/u.test(e);function vi(e){let t;return()=>(t===void 0&&(t=e()),t)}const ye=e=>e,cl=(e,t)=>n=>t(e(n)),Pt=(...e)=>e.reduce(cl),xt=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class yi{constructor(){this.subscriptions=[]}add(t){return pi(this.subscriptions,t),()=>mi(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let o=0;o<s;o++){const r=this.subscriptions[o];r&&r(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Se=e=>e*1e3,ve=e=>e/1e3;function $o(e,t){return t?e*(1e3/t):0}const is=new Set;function wi(e,t,n){e||is.has(t)||(console.warn(On(t,n)),is.add(t))}const Oo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,dl=1e-7,fl=12;function hl(e,t,n,i,s){let o,r,a=0;do r=t+(n-t)/2,o=Oo(r,i,s)-e,o>0?n=r:t=r;while(Math.abs(o)>dl&&++a<fl);return r}function Mt(e,t,n,i){if(e===t&&n===i)return ye;const s=o=>hl(o,0,1,e,n);return o=>o===0||o===1?o:Oo(s(o),t,i)}const zo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bo=e=>t=>1-e(1-t),No=Mt(.33,1.53,.69,.99),xi=Bo(No),Ho=zo(xi),Go=e=>(e*=2)<1?.5*xi(e):.5*(2-Math.pow(2,-10*(e-1))),Ci=e=>1-Math.sin(Math.acos(e)),Wo=Bo(Ci),Uo=zo(Ci),gl=Mt(.42,0,1,1),pl=Mt(0,0,.58,1),Ko=Mt(.42,0,.58,1),ml=e=>Array.isArray(e)&&typeof e[0]!="number",qo=e=>Array.isArray(e)&&typeof e[0]=="number",ss={linear:ye,easeIn:gl,easeInOut:Ko,easeOut:pl,circIn:Ci,circInOut:Uo,circOut:Wo,backIn:xi,backInOut:Ho,backOut:No,anticipate:Go},vl=e=>typeof e=="string",os=e=>{if(qo(e)){Te(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,s]=e;return Mt(t,n,i,s)}else if(vl(e))return Te(ss[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ss[e];return e},At=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function yl(e,t){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const p=f&&s?n:i;return d&&r.add(c),p.has(c)||p.add(c),c},cancel:c=>{i.delete(c),r.delete(c)},process:c=>{if(a=c,s){o=!0;return}s=!0,[n,i]=[i,n],n.forEach(l),n.clear(),s=!1,o&&(o=!1,u.process(c))}};return u}const wl=40;function Xo(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=At.reduce((y,S)=>(y[S]=yl(o),y),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:p}=r,g=()=>{const y=Ee.useManualTiming?s.timestamp:performance.now();n=!1,Ee.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(y-s.timestamp,wl),1)),s.timestamp=y,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),d.process(s),f.process(s),h.process(s),p.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(g))},x=()=>{n=!0,i=!0,s.isProcessing||e(g)};return{schedule:At.reduce((y,S)=>{const _=r[S];return y[S]=(b,E=!1,R=!1)=>(n||x(),_.schedule(b,E,R)),y},{}),cancel:y=>{for(let S=0;S<At.length;S++)r[At[S]].cancel(y)},state:s,steps:r}}const{schedule:q,cancel:Fe,state:re,steps:pn}=Xo(typeof requestAnimationFrame<"u"?requestAnimationFrame:ye,!0);let Ot;function xl(){Ot=void 0}const de={now:()=>(Ot===void 0&&de.set(re.isProcessing||Ee.useManualTiming?re.timestamp:performance.now()),Ot),set:e=>{Ot=e,queueMicrotask(xl)}},Yo=e=>t=>typeof t=="string"&&t.startsWith(e),Si=Yo("--"),Cl=Yo("var(--"),_i=e=>Cl(e)?Sl.test(e.split("/*")[0].trim()):!1,Sl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,rt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ct={...rt,transform:e=>Me(0,1,e)},Dt={...rt,default:1},ht=e=>Math.round(e*1e5)/1e5,bi=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _l(e){return e==null}const bl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ri=(e,t)=>n=>!!(typeof n=="string"&&bl.test(n)&&n.startsWith(e)||t&&!_l(n)&&Object.prototype.hasOwnProperty.call(n,t)),Zo=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,o,r,a]=i.match(bi);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Rl=e=>Me(0,255,e),mn={...rt,transform:e=>Math.round(Rl(e))},He={test:Ri("rgb","red"),parse:Zo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+mn.transform(e)+", "+mn.transform(t)+", "+mn.transform(n)+", "+ht(Ct.transform(i))+")"};function Pl(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const zn={test:Ri("#"),parse:Pl,transform:He.transform},Tt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ae=Tt("deg"),be=Tt("%"),k=Tt("px"),Ml=Tt("vh"),Tl=Tt("vw"),rs={...be,parse:e=>be.parse(e)/100,transform:e=>be.transform(e*100)},Xe={test:Ri("hsl","hue"),parse:Zo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+be.transform(ht(t))+", "+be.transform(ht(n))+", "+ht(Ct.transform(i))+")"},Q={test:e=>He.test(e)||zn.test(e)||Xe.test(e),parse:e=>He.test(e)?He.parse(e):Xe.test(e)?Xe.parse(e):zn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?He.transform(e):Xe.transform(e),getAnimatableNone:e=>{const t=Q.parse(e);return t.alpha=0,Q.transform(t)}},El=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Vl(e){return isNaN(e)&&typeof e=="string"&&(e.match(bi)?.length||0)+(e.match(El)?.length||0)>0}const Jo="number",Qo="color",Al="var",Dl="var(",as="${}",Fl=/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 St(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(Fl,l=>(Q.test(l)?(i.color.push(o),s.push(Qo),n.push(Q.parse(l))):l.startsWith(Dl)?(i.var.push(o),s.push(Al),n.push(l)):(i.number.push(o),s.push(Jo),n.push(parseFloat(l))),++o,as)).split(as);return{values:n,split:a,indexes:i,types:s}}function er(e){return St(e).values}function tr(e){const{split:t,types:n}=St(e),i=t.length;return s=>{let o="";for(let r=0;r<i;r++)if(o+=t[r],s[r]!==void 0){const a=n[r];a===Jo?o+=ht(s[r]):a===Qo?o+=Q.transform(s[r]):o+=s[r]}return o}}const kl=e=>typeof e=="number"?0:Q.test(e)?Q.getAnimatableNone(e):e;function Il(e){const t=er(e);return tr(e)(t.map(kl))}const ke={test:Vl,parse:er,createTransformer:tr,getAnimatableNone:Il};function vn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ll({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,o=0,r=0;if(!t)s=o=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=vn(l,a,e+1/3),o=vn(l,a,e),r=vn(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:i}}function Gt(e,t){return n=>n>0?t:e}const Y=(e,t,n)=>e+(t-e)*n,yn=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},jl=[zn,He,Xe],$l=e=>jl.find(t=>t.test(e));function ls(e){const t=$l(e);if(ot(!!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===Xe&&(n=Ll(n)),n}const us=(e,t)=>{const n=ls(e),i=ls(t);if(!n||!i)return Gt(e,t);const s={...n};return o=>(s.red=yn(n.red,i.red,o),s.green=yn(n.green,i.green,o),s.blue=yn(n.blue,i.blue,o),s.alpha=Y(n.alpha,i.alpha,o),He.transform(s))},Bn=new Set(["none","hidden"]);function Ol(e,t){return Bn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function zl(e,t){return n=>Y(e,t,n)}function Pi(e){return typeof e=="number"?zl:typeof e=="string"?_i(e)?Gt:Q.test(e)?us:Hl:Array.isArray(e)?nr:typeof e=="object"?Q.test(e)?us:Bl:Gt}function nr(e,t){const n=[...e],i=n.length,s=e.map((o,r)=>Pi(o)(o,t[r]));return o=>{for(let r=0;r<i;r++)n[r]=s[r](o);return n}}function Bl(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=Pi(e[s])(e[s],t[s]));return s=>{for(const o in i)n[o]=i[o](s);return n}}function Nl(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],r=e.indexes[o][i[o]],a=e.values[r]??0;n[s]=a,i[o]++}return n}const Hl=(e,t)=>{const n=ke.createTransformer(t),i=St(e),s=St(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Bn.has(e)&&!s.values.length||Bn.has(t)&&!i.values.length?Ol(e,t):Pt(nr(Nl(i,s),s.values),n):(ot(!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"),Gt(e,t))};function ir(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Y(e,t,n):Pi(e)(e,t)}const Gl=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>q.update(t,n),stop:()=>Fe(t),now:()=>re.isProcessing?re.timestamp:de.now()}},sr=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)i+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Wt=2e4;function Mi(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<Wt;)t+=n,i=e.next(t);return t>=Wt?1/0:t}function Wl(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(Mi(i),Wt);return{type:"keyframes",ease:o=>i.next(s*o).value/t,duration:ve(s)}}const Ul=5;function or(e,t,n){const i=Math.max(t-Ul,0);return $o(n-e(i),t-i)}const X={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},wn=.001;function Kl({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:i=X.mass}){let s,o;ot(e<=Se(X.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=Me(X.minDamping,X.maxDamping,r),e=Me(X.minDuration,X.maxDuration,ve(e)),r<1?(s=u=>{const c=u*r,d=c*e,f=c-n,h=Nn(u,r),p=Math.exp(-d);return wn-f/h*p},o=u=>{const d=u*r*e,f=d*n+n,h=Math.pow(r,2)*Math.pow(u,2)*e,p=Math.exp(-d),g=Nn(Math.pow(u,2),r);return(-s(u)+wn>0?-1:1)*((f-h)*p)/g}):(s=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-wn+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=Xl(s,o,a);if(e=Se(e),isNaN(l))return{stiffness:X.stiffness,damping:X.damping,duration:e};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:r*2*Math.sqrt(i*u),duration:e}}}const ql=12;function Xl(e,t,n){let i=n;for(let s=1;s<ql;s++)i=i-e(i)/t(i);return i}function Nn(e,t){return e*Math.sqrt(1-t*t)}const Yl=["duration","bounce"],Zl=["stiffness","damping","mass"];function cs(e,t){return t.some(n=>e[n]!==void 0)}function Jl(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!cs(e,Zl)&&cs(e,Yl))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,o=2*Me(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:X.mass,stiffness:s,damping:o}}else{const n=Kl(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function Ut(e=X.visualDuration,t=X.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=Jl({...n,velocity:-ve(n.velocity||0)}),p=f||0,g=u/(2*Math.sqrt(l*c)),x=r-o,w=ve(Math.sqrt(l/c)),C=Math.abs(x)<5;i||(i=C?X.restSpeed.granular:X.restSpeed.default),s||(s=C?X.restDelta.granular:X.restDelta.default);let y;if(g<1){const _=Nn(w,g);y=b=>{const E=Math.exp(-g*w*b);return r-E*((p+g*w*x)/_*Math.sin(_*b)+x*Math.cos(_*b))}}else if(g===1)y=_=>r-Math.exp(-w*_)*(x+(p+w*x)*_);else{const _=w*Math.sqrt(g*g-1);y=b=>{const E=Math.exp(-g*w*b),R=Math.min(_*b,300);return r-E*((p+g*w*x)*Math.sinh(R)+_*x*Math.cosh(R))/_}}const S={calculatedDuration:h&&d||null,next:_=>{const b=y(_);if(h)a.done=_>=d;else{let E=_===0?p:0;g<1&&(E=_===0?Se(p):or(y,_,b));const R=Math.abs(E)<=i,A=Math.abs(r-b)<=s;a.done=R&&A}return a.value=a.done?r:b,a},toString:()=>{const _=Math.min(Mi(S),Wt),b=sr(E=>S.next(_*E).value,_,30);return _+"ms "+b},toTransition:()=>{}};return S}Ut.applyToOptions=e=>{const t=Wl(e,100,Ut);return e.ease=t.ease,e.duration=Se(t.duration),e.type="keyframes",e};function Hn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=R=>a!==void 0&&R<a||l!==void 0&&R>l,p=R=>a===void 0?l:l===void 0||Math.abs(a-R)<Math.abs(l-R)?a:l;let g=n*t;const x=d+g,w=r===void 0?x:r(x);w!==x&&(g=w-d);const C=R=>-g*Math.exp(-R/i),y=R=>w+C(R),S=R=>{const A=C(R),L=y(R);f.done=Math.abs(A)<=u,f.value=f.done?w:L};let _,b;const E=R=>{h(f.value)&&(_=R,b=Ut({keyframes:[f.value,p(f.value)],velocity:or(y,R,f.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:R=>{let A=!1;return!b&&_===void 0&&(A=!0,S(R),E(R)),_!==void 0&&R>=_?b.next(R-_):(!A&&S(R),f)}}}function Ql(e,t,n){const i=[],s=n||Ee.mix||ir,o=e.length-1;for(let r=0;r<o;r++){let a=s(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||ye:t;a=Pt(l,a)}i.push(a)}return i}function eu(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const o=e.length;if(Te(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Ql(t,i,s),l=a.length,u=c=>{if(r&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=xt(e[d],e[d+1],c);return a[d](f)};return n?c=>u(Me(e[0],e[o-1],c)):u}function tu(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=xt(0,t,i);e.push(Y(n,1,s))}}function nu(e){const t=[0];return tu(t,e.length-1),t}function iu(e,t){return e.map(n=>n*t)}function su(e,t){return e.map(()=>t||Ko).splice(0,e.length-1)}function Ye({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=ml(i)?i.map(os):os(i),o={done:!1,value:t[0]},r=iu(n&&n.length===t.length?n:nu(t),e),a=eu(r,t,{ease:Array.isArray(s)?s:su(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const ou=e=>e!==null;function Ti(e,{repeat:t,repeatType:n="loop"},i,s=1){const o=e.filter(ou),a=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||i===void 0?o[a]:i}const ru={decay:Hn,inertia:Hn,tween:Ye,keyframes:Ye,spring:Ut};function rr(e){typeof e.type=="string"&&(e.type=ru[e.type])}class Ei{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const au=e=>e/100;class Vi extends Ei{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==de.now()&&this.tick(de.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;rr(t);const{type:n=Ye,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Ye;process.env.NODE_ENV!=="production"&&l!==Ye&&Te(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Ye&&typeof a[0]!="number"&&(this.mixKeyframes=Pt(au,ir(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Mi(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:p,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-u*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?w<0:w>s;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let y=this.currentTime,S=i;if(d){const R=Math.min(this.currentTime,s)/a;let A=Math.floor(R),L=R%1;!L&&R>=1&&(L=1),L===1&&A--,A=Math.min(A,d+1),!!(A%2)&&(f==="reverse"?(L=1-L,h&&(L-=h/a)):f==="mirror"&&(S=r)),y=Me(0,1,L)*a}const _=C?{done:!1,value:c[0]}:S.next(y);o&&(_.value=o(_.value));let{done:b}=_;!C&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return E&&p!==Hn&&(_.value=Ti(c,this.options,x,this.speed)),g&&g(_.value),E&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return ve(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ve(t)}get time(){return ve(this.currentTime)}set time(t){t=Se(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(de.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ve(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Gl,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),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(de.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}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function lu(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ge=e=>e*180/Math.PI,Gn=e=>{const t=Ge(Math.atan2(e[1],e[0]));return Wn(t)},uu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Gn,rotateZ:Gn,skewX:e=>Ge(Math.atan(e[1])),skewY:e=>Ge(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Wn=e=>(e=e%360,e<0&&(e+=360),e),ds=Gn,fs=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),hs=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),cu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:fs,scaleY:hs,scale:e=>(fs(e)+hs(e))/2,rotateX:e=>Wn(Ge(Math.atan2(e[6],e[5]))),rotateY:e=>Wn(Ge(Math.atan2(-e[2],e[0]))),rotateZ:ds,rotate:ds,skewX:e=>Ge(Math.atan(e[4])),skewY:e=>Ge(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Un(e){return e.includes("scale")?1:0}function Kn(e,t){if(!e||e==="none")return Un(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=cu,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=uu,s=a}if(!s)return Un(t);const o=i[t],r=s[1].split(",").map(fu);return typeof o=="function"?o(r):r[o]}const du=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Kn(n,t)};function fu(e){return parseFloat(e.trim())}const at=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],lt=new Set(at),gs=e=>e===rt||e===k,hu=new Set(["x","y","z"]),gu=at.filter(e=>!hu.has(e));function pu(e){const t=[];return gu.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const We={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})=>Kn(t,"x"),y:(e,{transform:t})=>Kn(t,"y")};We.translateX=We.x;We.translateY=We.y;const Ue=new Set;let qn=!1,Xn=!1,Yn=!1;function ar(){if(Xn){const e=Array.from(Ue).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=pu(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([o,r])=>{i.getValue(o)?.set(r)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Xn=!1,qn=!1,Ue.forEach(e=>e.complete(Yn)),Ue.clear()}function lr(){Ue.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Xn=!0)})}function mu(){Yn=!0,lr(),ar(),Yn=!1}class Ai{constructor(t,n,i,s,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Ue.add(this),qn||(qn=!0,q.read(lr),q.resolveKeyframes(ar))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const o=s?.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(i&&n){const a=i.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),s&&o===void 0&&s.set(t[0])}lu(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ue.delete(this)}cancel(){this.state==="scheduled"&&(Ue.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const vu=e=>e.startsWith("--");function yu(e,t,n){vu(t)?e.style.setProperty(t,n):e.style[t]=n}const wu=vi(()=>window.ScrollTimeline!==void 0),xu={};function Cu(e,t){const n=vi(e);return()=>xu[t]??n()}const ur=Cu(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ft=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,ps={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ft([0,.65,.55,1]),circOut:ft([.55,0,1,.45]),backIn:ft([.31,.01,.66,-.59]),backOut:ft([.33,1.53,.69,.99])};function cr(e,t){if(e)return typeof e=="function"?ur()?sr(e,t):"ease-out":qo(e)?ft(e):Array.isArray(e)?e.map(n=>cr(n,t)||ps.easeOut):ps[e]}function Su(e,t,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=cr(a,s);Array.isArray(d)&&(c.easing=d);const f={delay:i,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function dr(e){return typeof e=="function"&&"applyToOptions"in e}function _u({type:e,...t}){return dr(e)&&ur()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class bu extends Ei{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=t,Te(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=_u(t);this.animation=Su(n,i,s,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Ti(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):yu(n,i,c),this.animation.cancel()}l?.(),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;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ve(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ve(t)}get time(){return ve(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Se(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&wu()?(this.animation.timeline=t,ye):n(this)}}const fr={anticipate:Go,backInOut:Ho,circInOut:Uo};function Ru(e){return e in fr}function Pu(e){typeof e.ease=="string"&&Ru(e.ease)&&(e.ease=fr[e.ease])}const ms=10;class Mu extends bu{constructor(t){Pu(t),rr(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:o,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Vi({...r,autoplay:!1}),l=Se(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ms).value,a.sample(l).value,ms),a.stop()}}const vs=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ke.test(e)||e==="0")&&!e.startsWith("url("));function Tu(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Eu(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],r=vs(s,t),a=vs(o,t);return ot(r===a,`You are trying to animate ${t} from "${s}" to "${o}". "${r?o:s}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:Tu(e)||(n==="spring"||dr(n))&&i}function Zn(e){e.duration=0,e.type="keyframes"}const Vu=new Set(["opacity","clipPath","filter","transform"]),Au=vi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Du(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Au()&&n&&Vu.has(n)&&(n!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&r!=="inertia"}const Fu=40;class ku extends Ei{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=de.now();const f={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...d},h=c?.KeyframeResolver||Ai;this.keyframeResolver=new h(a,(p,g,x)=>this.onKeyframesResolved(p,g,f,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=de.now(),Eu(t,o,r,a)||((Ee.instantAnimations||!l)&&c?.(Ti(t,i,n)),t[0]=t[t.length-1],Zn(i),i.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Fu?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},h=!u&&Du(f)?new Mu({...f,element:f.motionValue.owner.current}):new Vi(f);h.finished.then(()=>this.notifyFinished()).catch(ye),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),mu()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Iu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Lu(e){const t=Iu.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}const ju=4;function hr(e,t,n=1){Te(n<=ju,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=Lu(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const r=o.trim();return Io(r)?parseFloat(r):r}return _i(s)?hr(s,t,n+1):s}function Di(e,t){return e?.[t]??e?.default??e}const gr=new Set(["width","height","top","left","right","bottom",...at]),$u={test:e=>e==="auto",parse:e=>e},pr=e=>t=>t.test(e),mr=[rt,k,be,Ae,Tl,Ml,$u],ys=e=>mr.find(pr(e));function Ou(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||jo(e):!0}const zu=new Set(["brightness","contrast","saturate","opacity"]);function Bu(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(bi)||[];if(!i)return e;const s=n.replace(i,"");let o=zu.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+s+")"}const Nu=/\b([a-z-]*)\(.*?\)/gu,Jn={...ke,getAnimatableNone:e=>{const t=e.match(Nu);return t?t.map(Bu).join(" "):e}},ws={...rt,transform:Math.round},Hu={rotate:Ae,rotateX:Ae,rotateY:Ae,rotateZ:Ae,scale:Dt,scaleX:Dt,scaleY:Dt,scaleZ:Dt,skew:Ae,skewX:Ae,skewY:Ae,distance:k,translateX:k,translateY:k,translateZ:k,x:k,y:k,z:k,perspective:k,transformPerspective:k,opacity:Ct,originX:rs,originY:rs,originZ:k},Fi={borderWidth:k,borderTopWidth:k,borderRightWidth:k,borderBottomWidth:k,borderLeftWidth:k,borderRadius:k,radius:k,borderTopLeftRadius:k,borderTopRightRadius:k,borderBottomRightRadius:k,borderBottomLeftRadius:k,width:k,maxWidth:k,height:k,maxHeight:k,top:k,right:k,bottom:k,left:k,padding:k,paddingTop:k,paddingRight:k,paddingBottom:k,paddingLeft:k,margin:k,marginTop:k,marginRight:k,marginBottom:k,marginLeft:k,backgroundPositionX:k,backgroundPositionY:k,...Hu,zIndex:ws,fillOpacity:Ct,strokeOpacity:Ct,numOctaves:ws},Gu={...Fi,color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,filter:Jn,WebkitFilter:Jn},vr=e=>Gu[e];function yr(e,t){let n=vr(e);return n!==Jn&&(n=ke),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Wu=new Set(["auto","none","0"]);function Uu(e,t,n){let i=0,s;for(;i<e.length&&!s;){const o=e[i];typeof o=="string"&&!Wu.has(o)&&St(o).values.length&&(s=e[i]),i++}if(s&&n)for(const o of t)e[o]=yr(n,s)}class Ku extends Ai{constructor(t,n,i,s,o){super(t,n,i,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),_i(u))){const c=hr(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!gr.has(i)||t.length!==2)return;const[s,o]=t,r=ys(s),a=ys(o);if(r!==a)if(gs(r)&&gs(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else We[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||Ou(t[s]))&&i.push(s);i.length&&Uu(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=We[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=We[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function qu(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=n?.[e]??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const wr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function xr(e){return Lo(e)&&"offsetHeight"in e}const xs=30,Xu=e=>!isNaN(parseFloat(e));class Yu{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=de.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=de.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Xu(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&wi(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new yi);const i=this.events[t].add(n);return t==="change"?()=>{i(),q.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=de.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>xs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,xs);return $o(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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 nt(e,t){return new Yu(e,t)}const{schedule:ki}=Xo(queueMicrotask,!1),Ce={x:!1,y:!1};function Cr(){return Ce.x||Ce.y}function Zu(e){return e==="x"||e==="y"?Ce[e]?null:(Ce[e]=!0,()=>{Ce[e]=!1}):Ce.x||Ce.y?null:(Ce.x=Ce.y=!0,()=>{Ce.x=Ce.y=!1})}function Sr(e,t){const n=qu(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function Cs(e){return!(e.pointerType==="touch"||Cr())}function Ju(e,t,n={}){const[i,s,o]=Sr(e,n),r=a=>{if(!Cs(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=d=>{Cs(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,s)};return i.forEach(a=>{a.addEventListener("pointerenter",r,s)}),o}const _r=(e,t)=>t?e===t?!0:_r(e,t.parentElement):!1,Ii=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Qu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ec(e){return Qu.has(e.tagName)||e.tabIndex!==-1}const zt=new WeakSet;function Ss(e){return t=>{t.key==="Enter"&&e(t)}}function xn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const tc=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=Ss(()=>{if(zt.has(n))return;xn(n,"down");const s=Ss(()=>{xn(n,"up")}),o=()=>xn(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function _s(e){return Ii(e)&&!Cr()}function nc(e,t,n={}){const[i,s,o]=Sr(e,n),r=a=>{const l=a.currentTarget;if(!_s(a))return;zt.add(l);const u=t(l,a),c=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),zt.has(l)&&zt.delete(l),_s(h)&&typeof u=="function"&&u(h,{success:p})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||_r(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,s),xr(a)&&(a.addEventListener("focus",u=>tc(u,s)),!ec(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function br(e){return Lo(e)&&"ownerSVGElement"in e}function ic(e){return br(e)&&e.tagName==="svg"}const le=e=>!!(e&&e.getVelocity),sc=[...mr,Q,ke],oc=e=>sc.find(pr(e)),Li=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function bs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function rc(...e){return t=>{let n=!1;const i=e.map(s=>{const o=bs(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<i.length;s++){const o=i[s];typeof o=="function"?o():bs(e[s],null)}}}}function ac(...e){return T.useCallback(rc(...e),e)}class lc extends T.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,s=xr(i)&&i.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function uc({children:e,isPresent:t,anchorX:n,root:i}){const s=v.useId(),o=v.useRef(null),r=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=v.useContext(Li),l=ac(o,e?.ref);return v.useInsertionEffect(()=>{const{width:u,height:c,top:d,left:f,right:h}=r.current;if(t||!o.current||!u||!c)return;const p=n==="left"?`left: ${f}`:`right: ${h}`;o.current.dataset.motionPopId=s;const g=document.createElement("style");a&&(g.nonce=a);const x=i??document.head;return x.appendChild(g),g.sheet&&g.sheet.insertRule(`
|
|
6
|
-
[data-motion-pop-id="${
|
|
5
|
+
*/var is;function Tu(){return is||(is=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",r=0;r<arguments.length;r++){var a=arguments[r];a&&(s=o(s,i(a)))}return s}function i(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var r="";for(var a in s)t.call(s,a)&&s[a]&&(r=o(r,a));return r}function o(s,r){return r?s?s+" "+r:s+r:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Yn)),Yn.exports}var Vu=Tu();const Qe=Pu(Vu),Au="_rippleOverlay_s2kim_8",Du="_ripple_s2kim_8",os={rippleOverlay:Au,ripple:Du},Zn="button, a, input, label, [role='button'], [data-ripple]";function Fu(e){if(typeof e.composedPath=="function")return e.composedPath();const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentNode||n.host;return t.push(window),t}const _t=C.forwardRef(({color:e="rgba(0,0,0,0.18)",duration:t=1e3,radius:n="auto",className:i},o)=>{const s=C.useRef(null),[r,a]=C.useState([]),l=C.useRef([]),u=C.useRef(1),c=C.useRef(null),d=()=>{l.current.map(g=>clearTimeout(g)),l.current=[]},f=C.useCallback((g,y,v,w)=>{if(typeof window>"u")return;const p=v.getBoundingClientRect(),b=n==="auto"?Math.max(p.width,p.height)*2:n,_=g-w.left,E=y-w.top,P=Math.max(0,p.top-w.top),M=Math.max(0,p.left-w.left),k=Math.max(0,w.right-p.right),A=Math.max(0,w.bottom-p.bottom),U=window.getComputedStyle(v).borderRadius||"0px",G=u.current++,D={id:G,left:_-b/2,top:E-b/2,size:Math.ceil(b),clip:{top:Math.round(P),right:Math.round(k),bottom:Math.round(A),left:Math.round(M)},borderRadius:U};a(z=>[...z,D]);const H=window.setTimeout(()=>{a(z=>z.filter(T=>T.id!==G))},t+80);l.current.push(H)},[t,n]),h=C.useCallback(g=>{try{if(!s.current)return;const y=s.current,v=y.parentElement;if(!v)return;const w=Fu(g);let p=null;for(const M of w)if(M instanceof Element){if(M===v)break;if(M.matches&&M.matches(Zn)){p=M;break}}if(p||(p=v),p.closest&&(p.closest("[disabled]")||p.getAttribute("aria-disabled")==="true"||p.classList.contains("ripple-disabled")))return;const b=g.target;if(b?.closest&&(b.closest("[disabled]")||b.getAttribute?.("aria-disabled")==="true"))return;const _=y.getBoundingClientRect(),{clientX:E}=g,{clientY:P}=g;f(E,P,p,_)}catch{}},[f]),m=C.useCallback(g=>{if(!s.current||!(g.key==="Enter"||g.key===" "))return;const y=s.current,v=y.parentElement;if(!v)return;const w=document.activeElement;let p=null;if(w instanceof Element&&w.matches(Zn)&&(p=w),p||(p=v),p.closest&&(p.closest("[disabled]")||p.getAttribute("aria-disabled")==="true"))return;const b=y.getBoundingClientRect(),_=p.getBoundingClientRect().left+p.getBoundingClientRect().width/2,E=p.getBoundingClientRect().top+p.getBoundingClientRect().height/2;f(_,E,p,b)},[f]);return C.useImperativeHandle(o,()=>({trigger:({center:g=!0,x:y,y:v}={})=>{const w=s.current;if(!w)return;const p=w.parentElement;if(!p)return;const b=w.getBoundingClientRect(),_=document.activeElement instanceof Element&&document.activeElement.matches(Zn)?document.activeElement:p,E=g?_.getBoundingClientRect().left+_.getBoundingClientRect().width/2:y??b.left+b.width/2,P=g?_.getBoundingClientRect().top+_.getBoundingClientRect().height/2:v??b.top+b.height/2;f(E,P,_,b)}}),[f]),C.useEffect(()=>{const g=s.current;if(!g)return;const y=g.parentElement;if(!y||typeof window>"u")return;const v=window.getComputedStyle(y);let w=!1;return v.position==="static"&&(y.style.position="relative",w=!0,c.current=y),y.addEventListener("pointerdown",h,!0),y.addEventListener("keydown",m),()=>{y.removeEventListener("pointerdown",h,!0),y.removeEventListener("keydown",m),w&&c.current&&(c.current.style.position="",c.current=null),d()}},[h,m]),C.useEffect(()=>()=>d(),[]),x.jsx("div",{ref:s,className:`${os.rippleOverlay} ${i??""}`,"aria-hidden":!0,children:r.map(g=>x.jsx("span",{className:os.ripple,style:{left:`${g.left}px`,top:`${g.top}px`,width:`${g.size}px`,height:`${g.size}px`,backgroundColor:e,animationDuration:`${t}ms`,clipPath:`inset(${g.clip.top}px ${g.clip.right}px ${g.clip.bottom}px ${g.clip.left}px round ${g.borderRadius})`}},g.id))})});function Fn(e,t){const{current:n}=C.useRef(e!==void 0),[i,o]=C.useState(t),s=n?e:i,r=C.useCallback(a=>{n||o(a)},[]);return[s,r]}function kn(e,t,n,i=""){if(n)return e[`${t}_${n}${i}`]}function zt(e,t,n){return kn(e,t,n,"Size")}const ku="_button_11ykb_8",Lu="_button_primary_11ykb_19",Iu="_button_secondary_11ykb_22",ju="_button_negative_11ykb_25",$u="_button_positive_11ykb_28",Ou="_button_warning_11ykb_31",Bu="_button_neutral_11ykb_34",Nu="_button_mdSize_11ykb_118",zu="_button_smSize_11ykb_128",Hu="_button_xsSize_11ykb_138",Jn={button:ku,button_primary:Lu,button_secondary:Iu,button_negative:ju,button_positive:$u,button_warning:Ou,button_neutral:Bu,"button_neutral-white":"_button_neutral-white_11ykb_37","button_no-bg":"_button_no-bg_11ykb_40",button_mdSize:Nu,button_smSize:zu,button_xsSize:Hu};function Ht({attr:e,children:t,className:n,type:i="button",color:o="primary",size:s="md",...r}){const a="button";return x.jsxs("button",{...e,...r,type:i,className:Qe(Jn[a],n,zt(Jn,a,s),kn(Jn,a,o)),children:[x.jsx(_t,{}),t]})}const Yr=C.createContext({isOpen:!1,onClose:()=>{}}),Wu=()=>C.useContext(Yr),Gu="_overlay_1rgud_8",Uu="_modal_1rgud_12",Ku="_closeButton_1rgud_28",qu="_size_lg_1rgud_35",Xu="_size_md_1rgud_38",Yu="_size_sm_1rgud_41",sn={overlay:Gu,modal:Uu,"modal-animation":"_modal-animation_1rgud_1",closeButton:Ku,size_lg:qu,size_md:Xu,size_sm:Yu},Zr=C.forwardRef(({isOpen:e,onClose:t,overlayClassName:n,modalClassName:i,size:o="md",closeOnBackdropClick:s=!0,closeOnEsc:r=!0,disableBodyScroll:a=!0,showAbsoluteCloseButton:l=!1,children:u},c)=>{C.useEffect(()=>{if(a&&e&&typeof window<"u"&&typeof document<"u"){const h=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}}},[e,a]);const d=C.useCallback(h=>{h.key==="Escape"&&t()},[t]);C.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&r&&e)return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,r,d]);const f=C.useCallback(h=>{s&&h.target===h.currentTarget&&t()},[s,t]);return e?x.jsx(Kn,{children:x.jsx(Yr.Provider,{value:{isOpen:e,onClose:t},children:x.jsx(I,{position:"fixed",top:0,right:0,bottom:0,left:0,row:!0,center:!0,flex:1,onClick:f,backgroundColor:"var(--fill-bg-overlay-primary)",className:F.cx(sn.overlay,n),zIndex:1,children:x.jsxs(I,{ref:c,className:F.cx(sn.modal,sn[`size_${o}`],i),relative:!0,children:[l&&x.jsx(Ht,{className:sn.closeButton,onClick:t,color:"neutral",children:x.jsx(Xr,{})}),u]})})})}):null});Zr.displayName="Modal";const Zu="_footer_1bo08_8",Ju={footer:Zu},Jr=C.forwardRef(({children:e,row:t=!0,flex:n=!0,gap:i="var(--spacing-lg)",p:o="var(--spacing-2xl)",className:s,...r},a)=>x.jsx(I,{flex:n,row:t,gap:i,p:o,className:F.cx(Ju.footer,s),ref:a,...r,children:e}));Jr.displayName="ModalFooter";const lo=C.createContext({});function uo(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const co=typeof window<"u",Qr=co?C.useLayoutEffect:C.useEffect,Ln=C.createContext(null);function fo(e,t){e.indexOf(t)===-1&&e.push(t)}function ho(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const $e=(e,t,n)=>n>t?t:n<e?e:n;function Ti(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Rt=()=>{},Oe=()=>{};process.env.NODE_ENV!=="production"&&(Rt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Ti(t,n))},Oe=(e,t,n)=>{if(!e)throw new Error(Ti(t,n))});const Be={},ea=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ta(e){return typeof e=="object"&&e!==null}const na=e=>/^0[^.\s]+$/u.test(e);function go(e){let t;return()=>(t===void 0&&(t=e()),t)}const we=e=>e,Qu=(e,t)=>n=>t(e(n)),Zt=(...e)=>e.reduce(Qu),Wt=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class mo{constructor(){this.subscriptions=[]}add(t){return fo(this.subscriptions,t),()=>ho(this.subscriptions,t)}notify(t,n,i){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,i);else for(let s=0;s<o;s++){const r=this.subscriptions[s];r&&r(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ee=e=>e*1e3,xe=e=>e/1e3;function ia(e,t){return t?e*(1e3/t):0}const ss=new Set;function po(e,t,n){e||ss.has(t)||(console.warn(Ti(t,n)),ss.add(t))}const oa=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ec=1e-7,tc=12;function nc(e,t,n,i,o){let s,r,a=0;do r=t+(n-t)/2,s=oa(r,i,o)-e,s>0?n=r:t=r;while(Math.abs(s)>ec&&++a<tc);return r}function Jt(e,t,n,i){if(e===t&&n===i)return we;const o=s=>nc(s,0,1,e,n);return s=>s===0||s===1?s:oa(o(s),t,i)}const sa=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ra=e=>t=>1-e(1-t),aa=Jt(.33,1.53,.69,.99),vo=ra(aa),la=sa(vo),ua=e=>(e*=2)<1?.5*vo(e):.5*(2-Math.pow(2,-10*(e-1))),yo=e=>1-Math.sin(Math.acos(e)),ca=ra(yo),da=sa(yo),ic=Jt(.42,0,1,1),oc=Jt(0,0,.58,1),fa=Jt(.42,0,.58,1),sc=e=>Array.isArray(e)&&typeof e[0]!="number",ha=e=>Array.isArray(e)&&typeof e[0]=="number",rs={linear:we,easeIn:ic,easeInOut:fa,easeOut:oc,circIn:yo,circInOut:da,circOut:ca,backIn:vo,backInOut:la,backOut:aa,anticipate:ua},rc=e=>typeof e=="string",as=e=>{if(ha(e)){Oe(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,o]=e;return Jt(t,n,i,o)}else if(rc(e))return Oe(rs[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),rs[e];return e},rn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ac(e,t){let n=new Set,i=new Set,o=!1,s=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const m=f&&o?n:i;return d&&r.add(c),m.has(c)||m.add(c),c},cancel:c=>{i.delete(c),r.delete(c)},process:c=>{if(a=c,o){s=!0;return}o=!0,[n,i]=[i,n],n.forEach(l),n.clear(),o=!1,s&&(s=!1,u.process(c))}};return u}const lc=40;function ga(e,t){let n=!1,i=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,r=rn.reduce((p,b)=>(p[b]=ac(s),p),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:m}=r,g=()=>{const p=Be.useManualTiming?o.timestamp:performance.now();n=!1,Be.useManualTiming||(o.delta=i?1e3/60:Math.max(Math.min(p-o.timestamp,lc),1)),o.timestamp=p,o.isProcessing=!0,a.process(o),l.process(o),u.process(o),c.process(o),d.process(o),f.process(o),h.process(o),m.process(o),o.isProcessing=!1,n&&t&&(i=!1,e(g))},y=()=>{n=!0,i=!0,o.isProcessing||e(g)};return{schedule:rn.reduce((p,b)=>{const _=r[b];return p[b]=(E,P=!1,M=!1)=>(n||y(),_.schedule(E,P,M)),p},{}),cancel:p=>{for(let b=0;b<rn.length;b++)r[rn[b]].cancel(p)},state:o,steps:r}}const{schedule:J,cancel:Ue,state:se,steps:Qn}=ga(typeof requestAnimationFrame<"u"?requestAnimationFrame:we,!0);let pn;function uc(){pn=void 0}const ce={now:()=>(pn===void 0&&ce.set(se.isProcessing||Be.useManualTiming?se.timestamp:performance.now()),pn),set:e=>{pn=e,queueMicrotask(uc)}},ma=e=>t=>typeof t=="string"&&t.startsWith(e),xo=ma("--"),cc=ma("var(--"),wo=e=>cc(e)?dc.test(e.split("/*")[0].trim()):!1,dc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Et={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Gt={...Et,transform:e=>$e(0,1,e)},an={...Et,default:1},jt=e=>Math.round(e*1e5)/1e5,Co=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function fc(e){return e==null}const hc=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,So=(e,t)=>n=>!!(typeof n=="string"&&hc.test(n)&&n.startsWith(e)||t&&!fc(n)&&Object.prototype.hasOwnProperty.call(n,t)),pa=(e,t,n)=>i=>{if(typeof i!="string")return i;const[o,s,r,a]=i.match(Co);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},gc=e=>$e(0,255,e),ei={...Et,transform:e=>Math.round(gc(e))},et={test:So("rgb","red"),parse:pa("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+ei.transform(e)+", "+ei.transform(t)+", "+ei.transform(n)+", "+jt(Gt.transform(i))+")"};function mc(e){let t="",n="",i="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,i+=i,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}}const Vi={test:So("#"),parse:mc,transform:et.transform},Qt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),He=Qt("deg"),Te=Qt("%"),N=Qt("px"),pc=Qt("vh"),vc=Qt("vw"),ls={...Te,parse:e=>Te.parse(e)/100,transform:e=>Te.transform(e*100)},dt={test:So("hsl","hue"),parse:pa("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+Te.transform(jt(t))+", "+Te.transform(jt(n))+", "+jt(Gt.transform(i))+")"},ie={test:e=>et.test(e)||Vi.test(e)||dt.test(e),parse:e=>et.test(e)?et.parse(e):dt.test(e)?dt.parse(e):Vi.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?et.transform(e):dt.transform(e),getAnimatableNone:e=>{const t=ie.parse(e);return t.alpha=0,ie.transform(t)}},yc=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xc(e){return isNaN(e)&&typeof e=="string"&&(e.match(Co)?.length||0)+(e.match(yc)?.length||0)>0}const va="number",ya="color",wc="var",Cc="var(",us="${}",Sc=/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 Ut(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(Sc,l=>(ie.test(l)?(i.color.push(s),o.push(ya),n.push(ie.parse(l))):l.startsWith(Cc)?(i.var.push(s),o.push(wc),n.push(l)):(i.number.push(s),o.push(va),n.push(parseFloat(l))),++s,us)).split(us);return{values:n,split:a,indexes:i,types:o}}function xa(e){return Ut(e).values}function wa(e){const{split:t,types:n}=Ut(e),i=t.length;return o=>{let s="";for(let r=0;r<i;r++)if(s+=t[r],o[r]!==void 0){const a=n[r];a===va?s+=jt(o[r]):a===ya?s+=ie.transform(o[r]):s+=o[r]}return s}}const bc=e=>typeof e=="number"?0:ie.test(e)?ie.getAnimatableNone(e):e;function _c(e){const t=xa(e);return wa(e)(t.map(bc))}const Ke={test:xc,parse:xa,createTransformer:wa,getAnimatableNone:_c};function ti(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Rc({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let o=0,s=0,r=0;if(!t)o=s=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=ti(l,a,e+1/3),s=ti(l,a,e),r=ti(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(r*255),alpha:i}}function bn(e,t){return n=>n>0?t:e}const ee=(e,t,n)=>e+(t-e)*n,ni=(e,t,n)=>{const i=e*e,o=n*(t*t-i)+i;return o<0?0:Math.sqrt(o)},Ec=[Vi,et,dt],Mc=e=>Ec.find(t=>t.test(e));function cs(e){const t=Mc(e);if(Rt(!!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===dt&&(n=Rc(n)),n}const ds=(e,t)=>{const n=cs(e),i=cs(t);if(!n||!i)return bn(e,t);const o={...n};return s=>(o.red=ni(n.red,i.red,s),o.green=ni(n.green,i.green,s),o.blue=ni(n.blue,i.blue,s),o.alpha=ee(n.alpha,i.alpha,s),et.transform(o))},Ai=new Set(["none","hidden"]);function Pc(e,t){return Ai.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Tc(e,t){return n=>ee(e,t,n)}function bo(e){return typeof e=="number"?Tc:typeof e=="string"?wo(e)?bn:ie.test(e)?ds:Dc:Array.isArray(e)?Ca:typeof e=="object"?ie.test(e)?ds:Vc:bn}function Ca(e,t){const n=[...e],i=n.length,o=e.map((s,r)=>bo(s)(s,t[r]));return s=>{for(let r=0;r<i;r++)n[r]=o[r](s);return n}}function Vc(e,t){const n={...e,...t},i={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(i[o]=bo(e[o])(e[o],t[o]));return o=>{for(const s in i)n[s]=i[s](o);return n}}function Ac(e,t){const n=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],r=e.indexes[s][i[s]],a=e.values[r]??0;n[o]=a,i[s]++}return n}const Dc=(e,t)=>{const n=Ke.createTransformer(t),i=Ut(e),o=Ut(t);return i.indexes.var.length===o.indexes.var.length&&i.indexes.color.length===o.indexes.color.length&&i.indexes.number.length>=o.indexes.number.length?Ai.has(e)&&!o.values.length||Ai.has(t)&&!i.values.length?Pc(e,t):Zt(Ca(Ac(i,o),o.values),n):(Rt(!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"),bn(e,t))};function Sa(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ee(e,t,n):bo(e)(e,t)}const Fc=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>J.update(t,n),stop:()=>Ue(t),now:()=>se.isProcessing?se.timestamp:ce.now()}},ba=(e,t,n=10)=>{let i="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)i+=Math.round(e(s/(o-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},_n=2e4;function _o(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<_n;)t+=n,i=e.next(t);return t>=_n?1/0:t}function kc(e,t=100,n){const i=n({...e,keyframes:[0,t]}),o=Math.min(_o(i),_n);return{type:"keyframes",ease:s=>i.next(o*s).value/t,duration:xe(o)}}const Lc=5;function _a(e,t,n){const i=Math.max(t-Lc,0);return ia(n-e(i),t-i)}const Q={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},ii=.001;function Ic({duration:e=Q.duration,bounce:t=Q.bounce,velocity:n=Q.velocity,mass:i=Q.mass}){let o,s;Rt(e<=Ee(Q.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=$e(Q.minDamping,Q.maxDamping,r),e=$e(Q.minDuration,Q.maxDuration,xe(e)),r<1?(o=u=>{const c=u*r,d=c*e,f=c-n,h=Di(u,r),m=Math.exp(-d);return ii-f/h*m},s=u=>{const d=u*r*e,f=d*n+n,h=Math.pow(r,2)*Math.pow(u,2)*e,m=Math.exp(-d),g=Di(Math.pow(u,2),r);return(-o(u)+ii>0?-1:1)*((f-h)*m)/g}):(o=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-ii+c*d},s=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=$c(o,s,a);if(e=Ee(e),isNaN(l))return{stiffness:Q.stiffness,damping:Q.damping,duration:e};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:r*2*Math.sqrt(i*u),duration:e}}}const jc=12;function $c(e,t,n){let i=n;for(let o=1;o<jc;o++)i=i-e(i)/t(i);return i}function Di(e,t){return e*Math.sqrt(1-t*t)}const Oc=["duration","bounce"],Bc=["stiffness","damping","mass"];function fs(e,t){return t.some(n=>e[n]!==void 0)}function Nc(e){let t={velocity:Q.velocity,stiffness:Q.stiffness,damping:Q.damping,mass:Q.mass,isResolvedFromDuration:!1,...e};if(!fs(e,Bc)&&fs(e,Oc))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),o=i*i,s=2*$e(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Q.mass,stiffness:o,damping:s}}else{const n=Ic(e);t={...t,...n,mass:Q.mass},t.isResolvedFromDuration=!0}return t}function Rn(e=Q.visualDuration,t=Q.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:o}=n;const s=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=Nc({...n,velocity:-xe(n.velocity||0)}),m=f||0,g=u/(2*Math.sqrt(l*c)),y=r-s,v=xe(Math.sqrt(l/c)),w=Math.abs(y)<5;i||(i=w?Q.restSpeed.granular:Q.restSpeed.default),o||(o=w?Q.restDelta.granular:Q.restDelta.default);let p;if(g<1){const _=Di(v,g);p=E=>{const P=Math.exp(-g*v*E);return r-P*((m+g*v*y)/_*Math.sin(_*E)+y*Math.cos(_*E))}}else if(g===1)p=_=>r-Math.exp(-v*_)*(y+(m+v*y)*_);else{const _=v*Math.sqrt(g*g-1);p=E=>{const P=Math.exp(-g*v*E),M=Math.min(_*E,300);return r-P*((m+g*v*y)*Math.sinh(M)+_*y*Math.cosh(M))/_}}const b={calculatedDuration:h&&d||null,next:_=>{const E=p(_);if(h)a.done=_>=d;else{let P=_===0?m:0;g<1&&(P=_===0?Ee(m):_a(p,_,E));const M=Math.abs(P)<=i,k=Math.abs(r-E)<=o;a.done=M&&k}return a.value=a.done?r:E,a},toString:()=>{const _=Math.min(_o(b),_n),E=ba(P=>b.next(_*P).value,_,30);return _+"ms "+E},toTransition:()=>{}};return b}Rn.applyToOptions=e=>{const t=kc(e,100,Rn);return e.ease=t.ease,e.duration=Ee(t.duration),e.type="keyframes",e};function Fi({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=M=>a!==void 0&&M<a||l!==void 0&&M>l,m=M=>a===void 0?l:l===void 0||Math.abs(a-M)<Math.abs(l-M)?a:l;let g=n*t;const y=d+g,v=r===void 0?y:r(y);v!==y&&(g=v-d);const w=M=>-g*Math.exp(-M/i),p=M=>v+w(M),b=M=>{const k=w(M),A=p(M);f.done=Math.abs(k)<=u,f.value=f.done?v:A};let _,E;const P=M=>{h(f.value)&&(_=M,E=Rn({keyframes:[f.value,m(f.value)],velocity:_a(p,M,f.value),damping:o,stiffness:s,restDelta:u,restSpeed:c}))};return P(0),{calculatedDuration:null,next:M=>{let k=!1;return!E&&_===void 0&&(k=!0,b(M),P(M)),_!==void 0&&M>=_?E.next(M-_):(!k&&b(M),f)}}}function zc(e,t,n){const i=[],o=n||Be.mix||Sa,s=e.length-1;for(let r=0;r<s;r++){let a=o(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||we:t;a=Zt(l,a)}i.push(a)}return i}function Hc(e,t,{clamp:n=!0,ease:i,mixer:o}={}){const s=e.length;if(Oe(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=zc(t,i,o),l=a.length,u=c=>{if(r&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=Wt(e[d],e[d+1],c);return a[d](f)};return n?c=>u($e(e[0],e[s-1],c)):u}function Wc(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const o=Wt(0,t,i);e.push(ee(n,1,o))}}function Gc(e){const t=[0];return Wc(t,e.length-1),t}function Uc(e,t){return e.map(n=>n*t)}function Kc(e,t){return e.map(()=>t||fa).splice(0,e.length-1)}function ft({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const o=sc(i)?i.map(as):as(i),s={done:!1,value:t[0]},r=Uc(n&&n.length===t.length?n:Gc(t),e),a=Hc(r,t,{ease:Array.isArray(o)?o:Kc(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const qc=e=>e!==null;function Ro(e,{repeat:t,repeatType:n="loop"},i,o=1){const s=e.filter(qc),a=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||i===void 0?s[a]:i}const Xc={decay:Fi,inertia:Fi,tween:ft,keyframes:ft,spring:Rn};function Ra(e){typeof e.type=="string"&&(e.type=Xc[e.type])}class Eo{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Yc=e=>e/100;class Mo extends Eo{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==ce.now()&&this.tick(ce.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ra(t);const{type:n=ft,repeat:i=0,repeatDelay:o=0,repeatType:s,velocity:r=0}=t;let{keyframes:a}=t;const l=n||ft;process.env.NODE_ENV!=="production"&&l!==ft&&Oe(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==ft&&typeof a[0]!="number"&&(this.mixKeyframes=Zt(Yc,Sa(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=_o(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+o,this.totalDuration=this.resolvedDuration*(i+1)-o,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:o,mixKeyframes:s,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:m,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let p=this.currentTime,b=i;if(d){const M=Math.min(this.currentTime,o)/a;let k=Math.floor(M),A=M%1;!A&&M>=1&&(A=1),A===1&&k--,k=Math.min(k,d+1),!!(k%2)&&(f==="reverse"?(A=1-A,h&&(A-=h/a)):f==="mirror"&&(b=r)),p=$e(0,1,A)*a}const _=w?{done:!1,value:c[0]}:b.next(p);s&&(_.value=s(_.value));let{done:E}=_;!w&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return P&&m!==Fi&&(_.value=Ro(c,this.options,y,this.speed)),g&&g(_.value),P&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return xe(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+xe(t)}get time(){return xe(this.currentTime)}set time(t){t=Ee(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ce.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=xe(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Fc,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),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(ce.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}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Zc(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const tt=e=>e*180/Math.PI,ki=e=>{const t=tt(Math.atan2(e[1],e[0]));return Li(t)},Jc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ki,rotateZ:ki,skewX:e=>tt(Math.atan(e[1])),skewY:e=>tt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Li=e=>(e=e%360,e<0&&(e+=360),e),hs=ki,gs=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ms=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Qc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:gs,scaleY:ms,scale:e=>(gs(e)+ms(e))/2,rotateX:e=>Li(tt(Math.atan2(e[6],e[5]))),rotateY:e=>Li(tt(Math.atan2(-e[2],e[0]))),rotateZ:hs,rotate:hs,skewX:e=>tt(Math.atan(e[4])),skewY:e=>tt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ii(e){return e.includes("scale")?1:0}function ji(e,t){if(!e||e==="none")return Ii(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(n)i=Qc,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Jc,o=a}if(!o)return Ii(t);const s=i[t],r=o[1].split(",").map(td);return typeof s=="function"?s(r):r[s]}const ed=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ji(n,t)};function td(e){return parseFloat(e.trim())}const Mt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Pt=new Set(Mt),ps=e=>e===Et||e===N,nd=new Set(["x","y","z"]),id=Mt.filter(e=>!nd.has(e));function od(e){const t=[];return id.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const nt={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})=>ji(t,"x"),y:(e,{transform:t})=>ji(t,"y")};nt.translateX=nt.x;nt.translateY=nt.y;const it=new Set;let $i=!1,Oi=!1,Bi=!1;function Ea(){if(Oi){const e=Array.from(it).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const o=od(i);o.length&&(n.set(i,o),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const o=n.get(i);o&&o.forEach(([s,r])=>{i.getValue(s)?.set(r)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Oi=!1,$i=!1,it.forEach(e=>e.complete(Bi)),it.clear()}function Ma(){it.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Oi=!0)})}function sd(){Bi=!0,Ma(),Ea(),Bi=!1}class Po{constructor(t,n,i,o,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=o,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(it.add(this),$i||($i=!0,J.read(Ma),J.resolveKeyframes(Ea))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:o}=this;if(t[0]===null){const s=o?.get(),r=t[t.length-1];if(s!==void 0)t[0]=s;else if(i&&n){const a=i.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),o&&s===void 0&&o.set(t[0])}Zc(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),it.delete(this)}cancel(){this.state==="scheduled"&&(it.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const rd=e=>e.startsWith("--");function ad(e,t,n){rd(t)?e.style.setProperty(t,n):e.style[t]=n}const ld=go(()=>window.ScrollTimeline!==void 0),ud={};function cd(e,t){const n=go(e);return()=>ud[t]??n()}const Pa=cd(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),It=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,vs={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 Ta(e,t){if(e)return typeof e=="function"?Pa()?ba(e,t):"ease-out":ha(e)?It(e):Array.isArray(e)?e.map(n=>Ta(n,t)||vs.easeOut):vs[e]}function dd(e,t,n,{delay:i=0,duration:o=300,repeat:s=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=Ta(a,o);Array.isArray(d)&&(c.easing=d);const f={delay:i,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:r==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function Va(e){return typeof e=="function"&&"applyToOptions"in e}function fd({type:e,...t}){return Va(e)&&Pa()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class hd extends Eo{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:i,keyframes:o,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=r,this.options=t,Oe(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=fd(t);this.animation=dd(n,i,o,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=Ro(o,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):ad(n,i,c),this.animation.cancel()}l?.(),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;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return xe(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+xe(t)}get time(){return xe(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ee(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ld()?(this.animation.timeline=t,we):n(this)}}const Aa={anticipate:ua,backInOut:la,circInOut:da};function gd(e){return e in Aa}function md(e){typeof e.ease=="string"&&gd(e.ease)&&(e.ease=Aa[e.ease])}const ys=10;class pd extends hd{constructor(t){md(t),Ra(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:o,element:s,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Mo({...r,autoplay:!1}),l=Ee(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ys).value,a.sample(l).value,ys),a.stop()}}const xs=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ke.test(e)||e==="0")&&!e.startsWith("url("));function vd(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function yd(e,t,n,i){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],r=xs(o,t),a=xs(s,t);return Rt(r===a,`You are trying to animate ${t} from "${o}" to "${s}". "${r?s:o}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:vd(e)||(n==="spring"||Va(n))&&i}function Ni(e){e.duration=0,e.type="keyframes"}const xd=new Set(["opacity","clipPath","filter","transform"]),wd=go(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Cd(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:o,damping:s,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return wd()&&n&&xd.has(n)&&(n!=="transform"||!u)&&!l&&!i&&o!=="mirror"&&s!==0&&r!=="inertia"}const Sd=40;class bd extends Eo{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ce.now();const f={autoplay:t,delay:n,type:i,repeat:o,repeatDelay:s,repeatType:r,name:l,motionValue:u,element:c,...d},h=c?.KeyframeResolver||Po;this.keyframeResolver=new h(a,(m,g,y)=>this.onKeyframesResolved(m,g,f,!y),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,o){this.keyframeResolver=void 0;const{name:s,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=ce.now(),yd(t,s,r,a)||((Be.instantAnimations||!l)&&c?.(Ro(t,i,n)),t[0]=t[t.length-1],Ni(i),i.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Sd?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},h=!u&&Cd(f)?new pd({...f,element:f.motionValue.owner.current}):new Mo(f);h.finished.then(()=>this.notifyFinished()).catch(we),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),sd()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const _d=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Rd(e){const t=_d.exec(e);if(!t)return[,];const[,n,i,o]=t;return[`--${n??i}`,o]}const Ed=4;function Da(e,t,n=1){Oe(n<=Ed,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,o]=Rd(e);if(!i)return;const s=window.getComputedStyle(t).getPropertyValue(i);if(s){const r=s.trim();return ea(r)?parseFloat(r):r}return wo(o)?Da(o,t,n+1):o}function To(e,t){return e?.[t]??e?.default??e}const Fa=new Set(["width","height","top","left","right","bottom",...Mt]),Md={test:e=>e==="auto",parse:e=>e},ka=e=>t=>t.test(e),La=[Et,N,Te,He,vc,pc,Md],ws=e=>La.find(ka(e));function Pd(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||na(e):!0}const Td=new Set(["brightness","contrast","saturate","opacity"]);function Vd(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Co)||[];if(!i)return e;const o=n.replace(i,"");let s=Td.has(t)?1:0;return i!==n&&(s*=100),t+"("+s+o+")"}const Ad=/\b([a-z-]*)\(.*?\)/gu,zi={...Ke,getAnimatableNone:e=>{const t=e.match(Ad);return t?t.map(Vd).join(" "):e}},Cs={...Et,transform:Math.round},Dd={rotate:He,rotateX:He,rotateY:He,rotateZ:He,scale:an,scaleX:an,scaleY:an,scaleZ:an,skew:He,skewX:He,skewY:He,distance:N,translateX:N,translateY:N,translateZ:N,x:N,y:N,z:N,perspective:N,transformPerspective:N,opacity:Gt,originX:ls,originY:ls,originZ:N},Vo={borderWidth:N,borderTopWidth:N,borderRightWidth:N,borderBottomWidth:N,borderLeftWidth:N,borderRadius:N,radius:N,borderTopLeftRadius:N,borderTopRightRadius:N,borderBottomRightRadius:N,borderBottomLeftRadius:N,width:N,maxWidth:N,height:N,maxHeight:N,top:N,right:N,bottom:N,left:N,padding:N,paddingTop:N,paddingRight:N,paddingBottom:N,paddingLeft:N,margin:N,marginTop:N,marginRight:N,marginBottom:N,marginLeft:N,backgroundPositionX:N,backgroundPositionY:N,...Dd,zIndex:Cs,fillOpacity:Gt,strokeOpacity:Gt,numOctaves:Cs},Fd={...Vo,color:ie,backgroundColor:ie,outlineColor:ie,fill:ie,stroke:ie,borderColor:ie,borderTopColor:ie,borderRightColor:ie,borderBottomColor:ie,borderLeftColor:ie,filter:zi,WebkitFilter:zi},Ia=e=>Fd[e];function ja(e,t){let n=Ia(e);return n!==zi&&(n=Ke),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const kd=new Set(["auto","none","0"]);function Ld(e,t,n){let i=0,o;for(;i<e.length&&!o;){const s=e[i];typeof s=="string"&&!kd.has(s)&&Ut(s).values.length&&(o=e[i]),i++}if(o&&n)for(const s of t)e[s]=ja(n,o)}class Id extends Po{constructor(t,n,i,o,s){super(t,n,i,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),wo(u))){const c=Da(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Fa.has(i)||t.length!==2)return;const[o,s]=t,r=ws(o),a=ws(s);if(r!==a)if(ps(r)&&ps(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else nt[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let o=0;o<t.length;o++)(t[o]===null||Pd(t[o]))&&i.push(o);i.length&&Ld(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=nt[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(i,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=i.length-1,r=i[s];i[s]=nt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function jd(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const o=n?.[e]??i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const $a=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Oa(e){return ta(e)&&"offsetHeight"in e}const Ss=30,$d=e=>!isNaN(parseFloat(e));class Od{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const o=ce.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ce.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=$d(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&po(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new mo);const i=this.events[t].add(n);return t==="change"?()=>{i(),J.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ce.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ss)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ss);return ia(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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 wt(e,t){return new Od(e,t)}const{schedule:Ao}=ga(queueMicrotask,!1),Re={x:!1,y:!1};function Ba(){return Re.x||Re.y}function Bd(e){return e==="x"||e==="y"?Re[e]?null:(Re[e]=!0,()=>{Re[e]=!1}):Re.x||Re.y?null:(Re.x=Re.y=!0,()=>{Re.x=Re.y=!1})}function Na(e,t){const n=jd(e),i=new AbortController,o={passive:!0,...t,signal:i.signal};return[n,o,()=>i.abort()]}function bs(e){return!(e.pointerType==="touch"||Ba())}function Nd(e,t,n={}){const[i,o,s]=Na(e,n),r=a=>{if(!bs(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=d=>{bs(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,o)};return i.forEach(a=>{a.addEventListener("pointerenter",r,o)}),s}const za=(e,t)=>t?e===t?!0:za(e,t.parentElement):!1,Do=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,zd=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Hd(e){return zd.has(e.tagName)||e.tabIndex!==-1}const vn=new WeakSet;function _s(e){return t=>{t.key==="Enter"&&e(t)}}function oi(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Wd=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=_s(()=>{if(vn.has(n))return;oi(n,"down");const o=_s(()=>{oi(n,"up")}),s=()=>oi(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function Rs(e){return Do(e)&&!Ba()}function Gd(e,t,n={}){const[i,o,s]=Na(e,n),r=a=>{const l=a.currentTarget;if(!Rs(a))return;vn.add(l);const u=t(l,a),c=(h,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),vn.has(l)&&vn.delete(l),Rs(h)&&typeof u=="function"&&u(h,{success:m})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||za(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,o),Oa(a)&&(a.addEventListener("focus",u=>Wd(u,o)),!Hd(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function Ha(e){return ta(e)&&"ownerSVGElement"in e}function Ud(e){return Ha(e)&&e.tagName==="svg"}const ae=e=>!!(e&&e.getVelocity),Kd=[...La,ie,Ke],qd=e=>Kd.find(ka(e)),Fo=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Es(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Xd(...e){return t=>{let n=!1;const i=e.map(o=>{const s=Es(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<i.length;o++){const s=i[o];typeof s=="function"?s():Es(e[o],null)}}}}function Yd(...e){return S.useCallback(Xd(...e),e)}class Zd extends S.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,o=Oa(i)&&i.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Jd({children:e,isPresent:t,anchorX:n,root:i}){const o=C.useId(),s=C.useRef(null),r=C.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=C.useContext(Fo),l=Yd(s,e?.ref);return C.useInsertionEffect(()=>{const{width:u,height:c,top:d,left:f,right:h}=r.current;if(t||!s.current||!u||!c)return;const m=n==="left"?`left: ${f}`:`right: ${h}`;s.current.dataset.motionPopId=o;const g=document.createElement("style");a&&(g.nonce=a);const y=i??document.head;return y.appendChild(g),g.sheet&&g.sheet.insertRule(`
|
|
6
|
+
[data-motion-pop-id="${o}"] {
|
|
7
7
|
position: absolute !important;
|
|
8
8
|
width: ${u}px !important;
|
|
9
9
|
height: ${c}px !important;
|
|
10
|
-
${
|
|
10
|
+
${m}px !important;
|
|
11
11
|
top: ${d}px !important;
|
|
12
12
|
}
|
|
13
|
-
`),()=>{x.contains(g)&&x.removeChild(g)}},[t]),m.jsx(lc,{isPresent:t,childRef:o,sizeRef:r,children:T.cloneElement(e,{ref:l})})}const cc=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=hi(dc),c=v.useId();let d=!0,f=v.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:s,onExitComplete:h=>{u.set(h,!0);for(const p of u.values())if(!p)return;i&&i()},register:h=>(u.set(h,!1),()=>u.delete(h))}),[n,u,i]);return o&&d&&(f={...f}),v.useMemo(()=>{u.forEach((h,p)=>u.set(p,!1))},[n]),T.useEffect(()=>{!n&&!u.size&&i&&i()},[n]),r==="popLayout"&&(e=m.jsx(uc,{isPresent:n,anchorX:a,root:l,children:e})),m.jsx(Jt.Provider,{value:f,children:e})};function dc(){return new Map}function Rr(e=!0){const t=v.useContext(Jt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,o=v.useId();v.useEffect(()=>{if(e)return s(o)},[e]);const r=v.useCallback(()=>e&&i&&i(o),[o,i,e]);return!n&&i?[!1,r]:[!0]}const Ft=e=>e.key||"";function Rs(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const fc=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=Rr(r),d=v.useMemo(()=>Rs(e),[e]),f=r&&!u?[]:d.map(Ft),h=v.useRef(!0),p=v.useRef(d),g=hi(()=>new Map),[x,w]=v.useState(d),[C,y]=v.useState(d);ko(()=>{h.current=!1,p.current=d;for(let b=0;b<C.length;b++){const E=Ft(C[b]);f.includes(E)?g.delete(E):g.get(E)!==!0&&g.set(E,!1)}},[C,f.length,f.join("-")]);const S=[];if(d!==x){let b=[...d];for(let E=0;E<C.length;E++){const R=C[E],A=Ft(R);f.includes(A)||(b.splice(E,0,R),S.push(R))}return o==="wait"&&S.length&&(b=S),y(Rs(b)),w(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&C.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.`);const{forceRender:_}=v.useContext(fi);return m.jsx(m.Fragment,{children:C.map(b=>{const E=Ft(b),R=r&&!u?!1:d===C||f.includes(E),A=()=>{if(g.has(E))g.set(E,!0);else return;let L=!0;g.forEach(B=>{B||(L=!1)}),L&&(_?.(),y(p.current),r&&c?.(),i&&i())};return m.jsx(cc,{isPresent:R,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:l,onExitComplete:R?void 0:A,anchorX:a,children:b},E)})})},Pr=v.createContext({strict:!1}),Ps={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"]},it={};for(const e in Ps)it[e]={isEnabled:t=>Ps[e].some(n=>!!t[n])};function hc(e){for(const t in e)it[t]={...it[t],...e[t]}}const gc=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"]);function Kt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||gc.has(e)}let Mr=e=>!Kt(e);function pc(e){typeof e=="function"&&(Mr=t=>t.startsWith("on")?!Kt(t):e(t))}try{pc(require("@emotion/is-prop-valid").default)}catch{}function mc(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||(Mr(s)||n===!0&&Kt(s)||!t&&!Kt(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const Qt=v.createContext({});function en(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function _t(e){return typeof e=="string"||Array.isArray(e)}const ji=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$i=["initial",...ji];function tn(e){return en(e.animate)||$i.some(t=>_t(e[t]))}function Tr(e){return!!(tn(e)||e.variants)}function vc(e,t){if(tn(e)){const{initial:n,animate:i}=e;return{initial:n===!1||_t(n)?n:void 0,animate:_t(i)?i:void 0}}return e.inherit!==!1?t:{}}function yc(e){const{initial:t,animate:n}=vc(e,v.useContext(Qt));return v.useMemo(()=>({initial:t,animate:n}),[Ms(t),Ms(n)])}function Ms(e){return Array.isArray(e)?e.join(" "):e}const bt={};function wc(e){for(const t in e)bt[t]=e[t],Si(t)&&(bt[t].isCSSVariable=!0)}function Er(e,{layout:t,layoutId:n}){return lt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!bt[e]||e==="opacity")}const xc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Cc=at.length;function Sc(e,t,n){let i="",s=!0;for(let o=0;o<Cc;o++){const r=at[o],a=e[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=wr(a,Fi[r]);if(!l){s=!1;const c=xc[r]||r;i+=`${c}(${u}) `}n&&(t[r]=u)}}return i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function Oi(e,t,n){const{style:i,vars:s,transformOrigin:o}=e;let r=!1,a=!1;for(const l in t){const u=t[l];if(lt.has(l)){r=!0;continue}else if(Si(l)){s[l]=u;continue}else{const c=wr(u,Fi[l]);l.startsWith("origin")?(a=!0,o[l]=c):i[l]=c}}if(t.transform||(r||n?i.transform=Sc(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;i.transformOrigin=`${l} ${u} ${c}`}}const zi=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Vr(e,t,n){for(const i in t)!le(t[i])&&!Er(i,n)&&(e[i]=t[i])}function _c({transformTemplate:e},t){return v.useMemo(()=>{const n=zi();return Oi(n,t,e),Object.assign({},n.vars,n.style)},[t])}function bc(e,t){const n=e.style||{},i={};return Vr(i,n,e),Object.assign(i,_c(e,t)),i}function Rc(e,t){const n={},i=bc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.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=i,n}const Pc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mc={offset:"strokeDashoffset",array:"strokeDasharray"};function Tc(e,t,n=1,i=0,s=!0){e.pathLength=1;const o=s?Pc:Mc;e[o.offset]=k.transform(-i);const r=k.transform(t),a=k.transform(n);e[o.array]=`${r} ${a}`}function Ar(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(Oi(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{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=c?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),i!==void 0&&(d.scale=i),s!==void 0&&Tc(d,s,o,r,!1)}const Dr=()=>({...zi(),attrs:{}}),Fr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ec(e,t,n,i){const s=v.useMemo(()=>{const o=Dr();return Ar(o,t,Fr(i),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Vr(o,e.style,e),s.style={...o,...s.style}}return s}const Vc=["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 Bi(e){return typeof e!="string"||e.includes("-")?!1:!!(Vc.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ac(e,t,n,{latestValues:i},s,o=!1){const a=(Bi(e)?Ec:Rc)(t,i,s,e),l=mc(t,typeof e=="string",o),u=e!==v.Fragment?{...l,...a,ref:n}:{},{children:c}=t,d=v.useMemo(()=>le(c)?c.get():c,[c]);return v.createElement(e,{...u,children:d})}function Ts(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function Ni(e,t,n,i){if(typeof t=="function"){const[s,o]=Ts(i);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=Ts(i);t=t(n!==void 0?n:e.custom,s,o)}return t}function Bt(e){return le(e)?e.get():e}function Dc({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:Fc(n,i,s,e),renderState:t()}}function Fc(e,t,n,i){const s={},o=i(e,{});for(const f in o)s[f]=Bt(o[f]);let{initial:r,animate:a}=e;const l=tn(e),u=Tr(e);t&&u&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const d=c?a:r;if(d&&typeof d!="boolean"&&!en(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=Ni(e,f[h]);if(p){const{transitionEnd:g,transition:x,...w}=p;for(const C in w){let y=w[C];if(Array.isArray(y)){const S=c?y.length-1:0;y=y[S]}y!==null&&(s[C]=y)}for(const C in g)s[C]=g[C]}}}return s}const kr=e=>(t,n)=>{const i=v.useContext(Qt),s=v.useContext(Jt),o=()=>Dc(e,t,i,s);return n?o():hi(o)};function Hi(e,t,n){const{style:i}=e,s={};for(const o in i)(le(i[o])||t.style&&le(t.style[o])||Er(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(s[o]=i[o]);return s}const kc=kr({scrapeMotionValuesFromProps:Hi,createRenderState:zi});function Ir(e,t,n){const i=Hi(e,t,n);for(const s in e)if(le(e[s])||le(t[s])){const o=at.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[o]=e[s]}return i}const Ic=kr({scrapeMotionValuesFromProps:Ir,createRenderState:Dr}),Lc=Symbol.for("motionComponentSymbol");function Ze(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function jc(e,t,n){return v.useCallback(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),n&&(typeof n=="function"?n(i):Ze(n)&&(n.current=i))},[t])}const Gi=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),$c="framerAppearId",Lr="data-"+Gi($c),jr=v.createContext({});function Oc(e,t,n,i,s){const{visualElement:o}=v.useContext(Qt),r=v.useContext(Pr),a=v.useContext(Jt),l=v.useContext(Li).reducedMotion,u=v.useRef(null);i=i||r.renderer,!u.current&&i&&(u.current=i(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=v.useContext(jr);c&&!c.projection&&s&&(c.type==="html"||c.type==="svg")&&zc(u.current,n,s,d);const f=v.useRef(!1);v.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const h=n[Lr],p=v.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return ko(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),p.current&&c.animationState&&c.animationState.animateChanges())}),v.useEffect(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),p.current=!1),c.enteringChildren=void 0)}),c}function zc(e,t,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:$r(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!r||a&&Ze(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:i,crossfade:c,layoutScroll:l,layoutRoot:u})}function $r(e){if(e)return e.options.allowProjection!==!1?e.projection:$r(e.parent)}function Cn(e,{forwardMotionProps:t=!1}={},n,i){n&&hc(n);const s=Bi(e)?Ic:kc;function o(a,l){let u;const c={...v.useContext(Li),...a,layoutId:Bc(a)},{isStatic:d}=c,f=yc(a),h=s(a,d);if(!d&&gi){Nc(c,n);const p=Hc(c);u=p.MeasureLayout,f.visualElement=Oc(e,h,c,i,p.ProjectionNode)}return m.jsxs(Qt.Provider,{value:f,children:[u&&f.visualElement?m.jsx(u,{visualElement:f.visualElement,...c}):null,Ac(e,a,jc(h,f.visualElement,l),h,d,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=v.forwardRef(o);return r[Lc]=e,r}function Bc({layoutId:e}){const t=v.useContext(fi).id;return t&&e!==void 0?t+"-"+e:e}function Nc(e,t){const n=v.useContext(Pr).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ot(!1,i,"lazy-strict-mode"):Te(!1,i,"lazy-strict-mode")}}function Hc(e){const{drag:t,layout:n}=it;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Gc(e,t){if(typeof Proxy>"u")return Cn;const n=new Map,i=(o,r)=>Cn(o,r,e,t),s=(o,r)=>(process.env.NODE_ENV!=="production"&&wi(!1,"motion() is deprecated. Use motion.create() instead."),i(o,r));return new Proxy(s,{get:(o,r)=>r==="create"?i:(n.has(r)||n.set(r,Cn(r,void 0,e,t)),n.get(r))})}function Or({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function Wc({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Uc(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Sn(e){return e===void 0||e===1}function Qn({scale:e,scaleX:t,scaleY:n}){return!Sn(e)||!Sn(t)||!Sn(n)}function Be(e){return Qn(e)||zr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zr(e){return Es(e.x)||Es(e.y)}function Es(e){return e&&e!=="0%"}function qt(e,t,n){const i=e-n,s=t*i;return n+s}function Vs(e,t,n,i,s){return s!==void 0&&(e=qt(e,s,i)),qt(e,n,i)+t}function ei(e,t=0,n=1,i,s){e.min=Vs(e.min,t,n,i,s),e.max=Vs(e.max,t,n,i,s)}function Br(e,{x:t,y:n}){ei(e.x,t.translate,t.scale,t.originPoint),ei(e.y,n.translate,n.scale,n.originPoint)}const As=.999999999999,Ds=1.0000000000001;function Kc(e,t,n,i=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,r;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Qe(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,Br(e,r)),i&&Be(o.latestValues)&&Qe(e,o.latestValues))}t.x<Ds&&t.x>As&&(t.x=1),t.y<Ds&&t.y>As&&(t.y=1)}function Je(e,t){e.min=e.min+t,e.max=e.max+t}function Fs(e,t,n,i,s=.5){const o=Y(e.min,e.max,s);ei(e,t,n,o,i)}function Qe(e,t){Fs(e.x,t.x,t.scaleX,t.scale,t.originX),Fs(e.y,t.y,t.scaleY,t.scale,t.originY)}function Nr(e,t){return Or(Uc(e.getBoundingClientRect(),t))}function qc(e,t,n){const i=Nr(e,n),{scroll:s}=t;return s&&(Je(i.x,s.offset.x),Je(i.y,s.offset.y)),i}const ks=()=>({translate:0,scale:1,origin:0,originPoint:0}),et=()=>({x:ks(),y:ks()}),Is=()=>({min:0,max:0}),J=()=>({x:Is(),y:Is()}),ti={current:null},Hr={current:!1};function Xc(){if(Hr.current=!0,!!gi)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ti.current=e.matches;e.addEventListener("change",t),t()}else ti.current=!1}const Yc=new WeakMap;function Zc(e,t,n){for(const i in t){const s=t[i],o=n[i];if(le(s))e.addValue(i,s);else if(le(o))e.addValue(i,nt(s,{owner:e}));else if(o!==s)if(e.hasValue(i)){const r=e.getValue(i);r.liveStyle===!0?r.jump(s):r.hasAnimated||r.set(s)}else{const r=e.getStaticValue(i);e.addValue(i,nt(r!==void 0?r:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Ls=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Jc{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ai,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=()=>{const f=de.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,q.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=tn(n),this.isVariantNode=Tr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&le(h)&&h.set(l[f])}}mount(t){this.current=t,Yc.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),Hr.current||Xc(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ti.current,process.env.NODE_ENV!=="production"&&wi(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(){this.projection&&this.projection.unmount(),Fe(this.notifyUpdate),Fe(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=lt.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&q.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in it){const n=it[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):J()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<Ls.length;i++){const s=Ls[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,r=t[o];r&&(this.propEventSubscriptions[s]=this.on(s,r))}this.prevMotionValues=Zc(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=nt(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Io(i)||jo(i))?i=parseFloat(i):!oc(i)&&ke.test(n)&&(i=yr(t,n)),this.setBaseTarget(t,le(i)?i.get():i)),le(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=Ni(this.props,n,this.presenceContext?.custom);o&&(i=o[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!le(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new yi),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ki.render(this.render)}}class Gr extends Jc{constructor(){super(...arguments),this.KeyframeResolver=Ku}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;le(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Wr(e,{style:t,vars:n},i,s){const o=e.style;let r;for(r in t)o[r]=t[r];s?.applyProjectionStyles(o,i);for(r in n)o.setProperty(r,n[r])}function Qc(e){return window.getComputedStyle(e)}class ed extends Gr{constructor(){super(...arguments),this.type="html",this.renderInstance=Wr}readValueFromInstance(t,n){if(lt.has(n))return this.projection?.isProjecting?Un(n):du(t,n);{const i=Qc(t),s=(Si(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Nr(t,n)}build(t,n,i){Oi(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return Hi(t,n,i)}}const Ur=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 td(e,t,n,i){Wr(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(Ur.has(s)?s:Gi(s),t.attrs[s])}class nd extends Gr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=J}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(lt.has(n)){const i=vr(n);return i&&i.default||0}return n=Ur.has(n)?n:Gi(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return Ir(t,n,i)}build(t,n,i){Ar(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){td(t,n,i,s)}mount(t){this.isSVGTag=Fr(t.tagName),super.mount(t)}}const id=(e,t)=>Bi(e)?new nd(t):new ed(t,{allowProjection:e!==v.Fragment});function tt(e,t,n){const i=e.getProps();return Ni(i,t,n!==void 0?n:i.custom,e)}const ni=e=>Array.isArray(e);function sd(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,nt(n))}function od(e){return ni(e)?e[e.length-1]||0:e}function rd(e,t){const n=tt(e,t);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const r in o){const a=od(o[r]);sd(e,r,a)}}function ad(e){return!!(le(e)&&e.add)}function ii(e,t){const n=e.getValue("willChange");if(ad(n))return n.add(t);if(!n&&Ee.WillChange){const i=new Ee.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function Kr(e){return e.props[Lr]}const ld=e=>e!==null;function ud(e,{repeat:t,repeatType:n="loop"},i){const s=e.filter(ld),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}const cd={type:"spring",stiffness:500,damping:25,restSpeed:10},dd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),fd={type:"keyframes",duration:.8},hd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},gd=(e,{keyframes:t})=>t.length>2?fd:lt.has(e)?e.startsWith("scale")?dd(t[1]):cd:hd;function pd({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Wi=(e,t,n,i={},s,o)=>r=>{const a=Di(i,e)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u=u-Se(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};pd(a)||Object.assign(c,gd(e,c)),c.duration&&(c.duration=Se(c.duration)),c.repeatDelay&&(c.repeatDelay=Se(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Zn(c),c.delay===0&&(d=!0)),(Ee.instantAnimations||Ee.skipAnimations)&&(d=!0,Zn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=ud(c.keyframes,a);if(f!==void 0){q.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Vi(c):new ku(c)};function md({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function qr(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:r,...a}=t;i&&(o=i);const l=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const c in a){const d=e.getValue(c,e.latestValues[c]??null),f=a[c];if(f===void 0||u&&md(u,c))continue;const h={delay:n,...Di(o||{},c)},p=d.get();if(p!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===p&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const w=Kr(e);if(w){const C=window.MotionHandoffAnimation(w,c,q);C!==null&&(h.startTime=C,g=!0)}}ii(e,c),d.start(Wi(c,d,f,e.shouldReduceMotion&&gr.has(c)?{type:!1}:h,e,g));const x=d.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{q.update(()=>{r&&rd(e,r)})}),l}function Xr(e,t,n,i=0,s=1){const o=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),r=e.size,a=(r-1)*i;return typeof n=="function"?n(o,r):s===1?o*i:a-o*i}function si(e,t,n={}){const i=tt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(qr(e,i,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=s;return vd(e,t,l,u,c,d,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,u]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function vd(e,t,n=0,i=0,s=0,o=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(si(l,t,{...r,delay:n+(typeof i=="function"?0:i)+Xr(e.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function yd(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(o=>si(e,o,n));i=Promise.all(s)}else if(typeof t=="string")i=si(e,t,n);else{const s=typeof t=="function"?tt(e,t,n.custom):t;i=Promise.all(qr(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}function Yr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const wd=$i.length;function Zr(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Zr(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<wd;n++){const i=$i[n],s=e.props[i];(_t(s)||s===!1)&&(t[i]=s)}return t}const xd=[...ji].reverse(),Cd=ji.length;function Sd(e){return t=>Promise.all(t.map(({animation:n,options:i})=>yd(e,n,i)))}function _d(e){let t=Sd(e),n=js(),i=!0;const s=l=>(u,c)=>{const d=tt(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:h,...p}=d;u={...u,...p,...h}}return u};function o(l){t=l(e)}function r(l){const{props:u}=e,c=Zr(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let x=0;x<Cd;x++){const w=xd[x],C=n[w],y=u[w]!==void 0?u[w]:c[w],S=_t(y),_=w===l?C.isActive:null;_===!1&&(p=x);let b=y===c[w]&&y!==u[w]&&S;if(b&&i&&e.manuallyAnimateOnMount&&(b=!1),C.protectedKeys={...h},!C.isActive&&_===null||!y&&!C.prevProp||en(y)||typeof y=="boolean")continue;const E=bd(C.prevProp,y);let R=E||w===l&&C.isActive&&!b&&S||x>p&&S,A=!1;const L=Array.isArray(y)?y:[y];let B=L.reduce(s(w),{});_===!1&&(B={});const{prevResolvedValues:ee={}}=C,N={...ee,...B},Z=$=>{R=!0,f.has($)&&(A=!0,f.delete($)),C.needsAnimating[$]=!0;const K=e.getValue($);K&&(K.liveStyle=!1)};for(const $ in N){const K=B[$],ne=ee[$];if(h.hasOwnProperty($))continue;let I=!1;ni(K)&&ni(ne)?I=!Yr(K,ne):I=K!==ne,I?K!=null?Z($):f.add($):K!==void 0&&f.has($)?Z($):C.protectedKeys[$]=!0}C.prevProp=y,C.prevResolvedValues=B,C.isActive&&(h={...h,...B}),i&&e.blockInitialAnimation&&(R=!1);const te=b&&E;R&&(!te||A)&&d.push(...L.map($=>{const K={type:w};if(typeof $=="string"&&i&&!te&&e.manuallyAnimateOnMount&&e.parent){const{parent:ne}=e,I=tt(ne,$);if(ne.enteringChildren&&I){const{delayChildren:G}=I.transition||{};K.delay=Xr(ne.enteringChildren,e,G)}}return{animation:$,options:K}}))}if(f.size){const x={};if(typeof u.initial!="boolean"){const w=tt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);w&&w.transition&&(x.transition=w.transition)}f.forEach(w=>{const C=e.getBaseTarget(w),y=e.getValue(w);y&&(y.liveStyle=!0),x[w]=C??null}),d.push({animation:x})}let g=!!d.length;return i&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),i=!1,g?t(d):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=js(),i=!0}}}function bd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Yr(t,e):!1}function ze(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function js(){return{animate:ze(!0),whileInView:ze(),whileHover:ze(),whileTap:ze(),whileDrag:ze(),whileFocus:ze(),exit:ze()}}class Le{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Rd extends Le{constructor(t){super(t),t.animationState||(t.animationState=_d(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();en(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Pd=0;class Md extends Le{constructor(){super(...arguments),this.id=Pd++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Td={animation:{Feature:Rd},exit:{Feature:Md}};function Rt(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function Et(e){return{point:{x:e.pageX,y:e.pageY}}}const Ed=e=>t=>Ii(t)&&e(t,Et(t));function gt(e,t,n,i){return Rt(e,t,Ed(n),i)}const Jr=1e-4,Vd=1-Jr,Ad=1+Jr,Qr=.01,Dd=0-Qr,Fd=0+Qr;function ue(e){return e.max-e.min}function kd(e,t,n){return Math.abs(e-t)<=n}function $s(e,t,n,i=.5){e.origin=i,e.originPoint=Y(t.min,t.max,e.origin),e.scale=ue(n)/ue(t),e.translate=Y(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Vd&&e.scale<=Ad||isNaN(e.scale))&&(e.scale=1),(e.translate>=Dd&&e.translate<=Fd||isNaN(e.translate))&&(e.translate=0)}function pt(e,t,n,i){$s(e.x,t.x,n.x,i?i.originX:void 0),$s(e.y,t.y,n.y,i?i.originY:void 0)}function Os(e,t,n){e.min=n.min+t.min,e.max=e.min+ue(t)}function Id(e,t,n){Os(e.x,t.x,n.x),Os(e.y,t.y,n.y)}function zs(e,t,n){e.min=t.min-n.min,e.max=e.min+ue(t)}function mt(e,t,n){zs(e.x,t.x,n.x),zs(e.y,t.y,n.y)}function me(e){return[e("x"),e("y")]}const ea=({current:e})=>e?e.ownerDocument.defaultView:null,Bs=(e,t)=>Math.abs(e-t);function Ld(e,t){const n=Bs(e.x,t.x),i=Bs(e.y,t.y);return Math.sqrt(n**2+i**2)}class ta{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=bn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=Ld(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!p)return;const{point:g}=f,{timestamp:x}=re;this.history.push({...g,timestamp:x});const{onStart:w,onMove:C}=this.handlers;h||(w&&w(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=_n(h,this.transformPagePoint),q.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=bn(f.type==="pointercancel"?this.lastMoveEventInfo:_n(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,w),g&&g(f,w)},!Ii(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=r,this.contextWindow=s||window;const a=Et(t),l=_n(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=re;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,bn(l,this.history)),this.removeListeners=Pt(gt(this.contextWindow,"pointermove",this.handlePointerMove),gt(this.contextWindow,"pointerup",this.handlePointerUp),gt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Fe(this.updatePoint)}}function _n(e,t){return t?{point:t(e.point)}:e}function Ns(e,t){return{x:e.x-t.x,y:e.y-t.y}}function bn({point:e},t){return{point:e,delta:Ns(e,na(t)),offset:Ns(e,jd(t)),velocity:$d(t,.1)}}function jd(e){return e[0]}function na(e){return e[e.length-1]}function $d(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=na(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>Se(t)));)n--;if(!i)return{x:0,y:0};const o=ve(s.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Od(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?Y(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?Y(n,e,i.max):Math.min(e,n)),e}function Hs(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function zd(e,{top:t,left:n,bottom:i,right:s}){return{x:Hs(e.x,n,s),y:Hs(e.y,t,i)}}function Gs(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function Bd(e,t){return{x:Gs(e.x,t.x),y:Gs(e.y,t.y)}}function Nd(e,t){let n=.5;const i=ue(e),s=ue(t);return s>i?n=xt(t.min,t.max-i,e.min):i>s&&(n=xt(e.min,e.max-s,t.min)),Me(0,1,n)}function Hd(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const oi=.35;function Gd(e=oi){return e===!1?e=0:e===!0&&(e=oi),{x:Ws(e,"left","right"),y:Ws(e,"top","bottom")}}function Ws(e,t,n){return{min:Us(e,t),max:Us(e,n)}}function Us(e,t){return typeof e=="number"?e:e[t]||0}const Wd=new WeakMap;class Ud{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=J(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Et(d).point)},r=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:g}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Zu(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),me(w=>{let C=this.getAxisMotionValue(w).get()||0;if(be.test(C)){const{projection:y}=this.visualElement;if(y&&y.layout){const S=y.layout.layoutBox[w];S&&(C=ue(S)*(parseFloat(C)/100))}}this.originPoint[w]=C}),g&&q.postRender(()=>g(d,f)),ii(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:g,onDrag:x}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:w}=f;if(p&&this.currentDirection===null){this.currentDirection=Kd(w),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,w),this.updateAxis("y",f.point,w),this.visualElement.render(),x&&x(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>me(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new ta(t,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:i,contextWindow:ea(this.visualElement)})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:r}=s;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&q.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,i){const{drag:s}=this.getProps();if(!i||!kt(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=Od(r,this.constraints[t],this.elastic[t])),o.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&Ze(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=zd(i.layoutBox,t):this.constraints=!1,this.elastic=Gd(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&me(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Hd(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ze(t))return!1;const i=t.current;Te(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=qc(i,s.root,this.visualElement.getTransformPagePoint());let r=Bd(s.layout.layoutBox,o);if(n){const a=n(Wc(r));this.hasMutatedConstraints=!!a,a&&(r=Or(a))}return r}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=me(c=>{if(!kt(c,n,this.currentDirection))return;let d=l&&l[c]||{};r&&(d={min:0,max:0});const f=s?200:1e6,h=s?40:1e7,p={type:"inertia",velocity:i?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return ii(this.visualElement,t),i.start(Wi(t,i,0,n,this.visualElement,!1))}stopAnimation(){me(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){me(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){me(n=>{const{drag:i}=this.getProps();if(!kt(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:r,max:a}=s.layout.layoutBox[n];o.set(t[n]-Y(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Ze(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};me(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();s[r]=Nd({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),me(r=>{if(!kt(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(Y(l,u,s[r]))})}addListeners(){if(!this.visualElement.current)return;Wd.set(this.visualElement,this);const t=this.visualElement.current,n=gt(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();Ze(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),q.read(i);const r=Rt(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(me(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:r=oi,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function kt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Kd(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class qd extends Le{constructor(t){super(t),this.removeGroupControls=ye,this.removeListeners=ye,this.controls=new Ud(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ye}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ks=e=>(t,n)=>{e&&q.postRender(()=>e(t,n))};class Xd extends Le{constructor(){super(...arguments),this.removePointerDownListener=ye}onPointerDown(t){this.session=new ta(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ea(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ks(t),onStart:Ks(n),onMove:i,onEnd:(o,r)=>{delete this.session,s&&q.postRender(()=>s(o,r))}}}mount(){this.removePointerDownListener=gt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Nt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function qs(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ut={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(k.test(e))e=parseFloat(e);else return e;const n=qs(e,t.target.x),i=qs(e,t.target.y);return`${n}% ${i}%`}},Yd={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=ke.parse(e);if(s.length>5)return i;const o=ke.createTransformer(e),r=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+r]/=a,s[1+r]/=l;const u=Y(a,l,.5);return typeof s[2+r]=="number"&&(s[2+r]/=u),typeof s[3+r]=="number"&&(s[3+r]/=u),o(s)}};let Rn=!1;class Zd extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:o}=t;wc(Jd),o&&(n.group&&n.group.add(o),i&&i.register&&s&&i.register(o),Rn&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Nt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:o}=this.props,{projection:r}=i;return r&&(r.isPresent=o,Rn=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?r.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?r.promote():r.relegate()||q.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ki.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;Rn=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ia(e){const[t,n]=Rr(),i=v.useContext(fi);return m.jsx(Zd,{...e,layoutGroup:i,switchLayoutGroup:v.useContext(jr),isPresent:t,safeToRemove:n})}const Jd={borderRadius:{...ut,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ut,borderTopRightRadius:ut,borderBottomLeftRadius:ut,borderBottomRightRadius:ut,boxShadow:Yd};function Qd(e,t,n){const i=le(e)?e:nt(e);return i.start(Wi("",i,t,n)),i.animation}const ef=(e,t)=>e.depth-t.depth;class tf{constructor(){this.children=[],this.isDirty=!1}add(t){pi(this.children,t),this.isDirty=!0}remove(t){mi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ef),this.isDirty=!1,this.children.forEach(t)}}function nf(e,t){const n=de.now(),i=({timestamp:s})=>{const o=s-n;o>=t&&(Fe(i),e(o-t))};return q.setup(i,!0),()=>Fe(i)}const sa=["TopLeft","TopRight","BottomLeft","BottomRight"],sf=sa.length,Xs=e=>typeof e=="string"?parseFloat(e):e,Ys=e=>typeof e=="number"||k.test(e);function of(e,t,n,i,s,o){s?(e.opacity=Y(0,n.opacity??1,rf(i)),e.opacityExit=Y(t.opacity??1,0,af(i))):o&&(e.opacity=Y(t.opacity??1,n.opacity??1,i));for(let r=0;r<sf;r++){const a=`border${sa[r]}Radius`;let l=Zs(t,a),u=Zs(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Ys(l)===Ys(u)?(e[a]=Math.max(Y(Xs(l),Xs(u),i),0),(be.test(u)||be.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=Y(t.rotate||0,n.rotate||0,i))}function Zs(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const rf=oa(0,.5,Wo),af=oa(.5,.95,ye);function oa(e,t,n){return i=>i<e?0:i>t?1:n(xt(e,t,i))}function Js(e,t){e.min=t.min,e.max=t.max}function ge(e,t){Js(e.x,t.x),Js(e.y,t.y)}function Qs(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function eo(e,t,n,i,s){return e-=t,e=qt(e,1/n,i),s!==void 0&&(e=qt(e,1/s,i)),e}function lf(e,t=0,n=1,i=.5,s,o=e,r=e){if(be.test(t)&&(t=parseFloat(t),t=Y(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=Y(o.min,o.max,i);e===o&&(a-=t),e.min=eo(e.min,t,n,a,s),e.max=eo(e.max,t,n,a,s)}function to(e,t,[n,i,s],o,r){lf(e,t[n],t[i],t[s],t.scale,o,r)}const uf=["x","scaleX","originX"],cf=["y","scaleY","originY"];function no(e,t,n,i){to(e.x,t,uf,n?n.x:void 0,i?i.x:void 0),to(e.y,t,cf,n?n.y:void 0,i?i.y:void 0)}function io(e){return e.translate===0&&e.scale===1}function ra(e){return io(e.x)&&io(e.y)}function so(e,t){return e.min===t.min&&e.max===t.max}function df(e,t){return so(e.x,t.x)&&so(e.y,t.y)}function oo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function aa(e,t){return oo(e.x,t.x)&&oo(e.y,t.y)}function ro(e){return ue(e.x)/ue(e.y)}function ao(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ff{constructor(){this.members=[]}add(t){pi(this.members,t),t.scheduleRender()}remove(t){if(mi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let i;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){i=o;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function hf(e,t,n){let i="";const s=e.x.translate/t.x,o=e.y.translate/t.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;u&&(i=`perspective(${u}px) ${i}`),c&&(i+=`rotate(${c}deg) `),d&&(i+=`rotateX(${d}deg) `),f&&(i+=`rotateY(${f}deg) `),h&&(i+=`skewX(${h}deg) `),p&&(i+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const Pn=["","X","Y","Z"],gf=1e3;let pf=0;function Mn(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function la(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Kr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",q,!(s||o))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&la(i)}function ua({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(r={},a=t?.()){this.id=pf++,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.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(yf),this.nodes.forEach(Sf),this.nodes.forEach(_f),this.nodes.forEach(wf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new tf)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new yi),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=br(r)&&!ic(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,d=0;const f=()=>this.root.updateBlockedByResize=!1;q.read(()=>{d=window.innerWidth}),e(r,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,c&&c(),c=nf(f,250),Nt.hasAnimatedSinceResize&&(Nt.hasAnimatedSinceResize=!1,this.nodes.forEach(co)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||Tf,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=u.getProps(),w=!this.targetLayout||!aa(this.targetLayout,h),C=!d&&f;if(this.options.layoutRoot||this.resumeFrom||C||d&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...Di(p,"layout"),onPlay:g,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,C)}else d||co(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Fe(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(bf),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&la(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(lo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(uo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Cf),this.nodes.forEach(mf),this.nodes.forEach(vf)):this.nodes.forEach(uo),this.clearAllSnapshots();const a=de.now();re.delta=Me(0,1e3/60,a-re.timestamp),re.timestamp=a,re.isProcessing=!0,pn.update.process(re),pn.preRender.process(re),pn.render.process(re),re.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ki.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xf),this.sharedNodes.forEach(Rf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,q.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){q.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ue(this.snapshot.measuredBox.x)&&!ue(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=J(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ra(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Be(this.latestValues)||c)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Ef(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return J();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Vf))){const{scroll:u}=this.root;u&&(Je(a.x,u.offset.x),Je(a.y,u.offset.y))}return a}removeElementScroll(r){const a=J();if(ge(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:d}=u;u!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&ge(a,r),Je(a.x,c.offset.x),Je(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=J();ge(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Qe(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Be(c.latestValues)&&Qe(l,c.latestValues)}return Be(this.latestValues)&&Qe(l,this.latestValues),l}removeTransform(r){const a=J();ge(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Be(u.latestValues))continue;Qn(u.latestValues)&&u.updateSnapshot();const c=J(),d=u.measurePageBox();ge(c,d),no(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Be(this.latestValues)&&no(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}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!==re.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=re.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=J(),this.relativeTargetOrigin=J(),mt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),ge(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=J(),this.targetWithTransforms=J()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Id(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ge(this.target,this.layout.layoutBox),Br(this.target,this.targetDelta)):ge(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=J(),this.relativeTargetOrigin=J(),mt(this.relativeTargetOrigin,this.target,f.target),ge(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Qn(this.parent.latestValues)||zr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===re.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;ge(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Kc(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=J());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Qs(this.prevProjectionDelta.x,this.projectionDelta.x),Qs(this.prevProjectionDelta.y,this.projectionDelta.y)),pt(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!ao(this.projectionDelta.x,this.prevProjectionDelta.x)||!ao(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=et(),this.projectionDelta=et(),this.projectionDeltaWithTransform=et()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=et();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=J(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=h!==p,x=this.getStack(),w=!x||x.members.length<=1,C=!!(g&&!w&&this.options.crossfade===!0&&!this.path.some(Mf));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const _=S/1e3;fo(d.x,r.x,_),fo(d.y,r.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Pf(this.relativeTarget,this.relativeTargetOrigin,f,_),y&&df(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=J()),ge(y,this.relativeTarget)),g&&(this.animationValues=c,of(c,u,this.latestValues,_,C,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Fe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=q.update(()=>{Nt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=nt(0)),this.currentAnimation=Qd(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(gf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&ca(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||J();const d=ue(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const f=ue(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}ge(a,l),Qe(a,c),pt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new ff),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Mn("z",r,u,this.animationValues);for(let c=0;c<Pn.length;c++)Mn(`rotate${Pn[c]}`,r,u,this.animationValues),Mn(`skew${Pn[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=Bt(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Bt(a?.pointerEvents)||""),this.hasProjected&&!Be(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=hf(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),r.transform=d;const{x:f,y:h}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in bt){if(c[p]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:w}=bt[p],C=d==="none"?c[p]:g(c[p],u);if(x){const y=x.length;for(let S=0;S<y;S++)r[x[S]]=C}else w?this.options.visualElement.renderState.vars[p]=C:r[p]=C}this.options.layoutId&&(r.pointerEvents=u===this?Bt(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(lo),this.root.sharedNodes.clear()}}}function mf(e){e.updateLayout()}function vf(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?me(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],f=ue(d);d.min=n[c].min,d.max=d.min+f}):ca(s,t.layoutBox,n)&&me(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],f=ue(n[c]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});const r=et();pt(r,n,t.layoutBox);const a=et();o?pt(a,e.applyTransform(i,!0),t.measuredBox):pt(a,n,t.layoutBox);const l=!ra(r);let u=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:f}=c;if(d&&f){const h=J();mt(h,t.layoutBox,d.layoutBox);const p=J();mt(p,n,f.layoutBox),aa(h,p)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=h,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function yf(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function wf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xf(e){e.clearSnapshot()}function lo(e){e.clearMeasurements()}function uo(e){e.isLayoutDirty=!1}function Cf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function co(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Sf(e){e.resolveTargetDelta()}function _f(e){e.calcProjection()}function bf(e){e.resetSkewAndRotation()}function Rf(e){e.removeLeadSnapshot()}function fo(e,t,n){e.translate=Y(t.translate,0,n),e.scale=Y(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ho(e,t,n,i){e.min=Y(t.min,n.min,i),e.max=Y(t.max,n.max,i)}function Pf(e,t,n,i){ho(e.x,t.x,n.x,i),ho(e.y,t.y,n.y,i)}function Mf(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Tf={duration:.45,ease:[.4,0,.1,1]},go=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),po=go("applewebkit/")&&!go("chrome/")?Math.round:ye;function mo(e){e.min=po(e.min),e.max=po(e.max)}function Ef(e){mo(e.x),mo(e.y)}function ca(e,t,n){return e==="position"||e==="preserve-aspect"&&!kd(ro(t),ro(n),.2)}function Vf(e){return e!==e.root&&e.scroll?.wasRoot}const Af=ua({attachResizeListener:(e,t)=>Rt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Tn={current:void 0},da=ua({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Tn.current){const e=new Af({});e.mount(window),e.setOptions({layoutScroll:!0}),Tn.current=e}return Tn.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Df={pan:{Feature:Xd},drag:{Feature:qd,ProjectionNode:da,MeasureLayout:ia}};function vo(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=i[s];o&&q.postRender(()=>o(t,Et(t)))}class Ff extends Le{mount(){const{current:t}=this.node;t&&(this.unmount=Ju(t,(n,i)=>(vo(this.node,i,"Start"),s=>vo(this.node,s,"End"))))}unmount(){}}class kf extends Le{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=Pt(Rt(this.node.current,"focus",()=>this.onFocus()),Rt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function yo(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=i[s];o&&q.postRender(()=>o(t,Et(t)))}class If extends Le{mount(){const{current:t}=this.node;t&&(this.unmount=nc(t,(n,i)=>(yo(this.node,i,"Start"),(s,{success:o})=>yo(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ri=new WeakMap,En=new WeakMap,Lf=e=>{const t=ri.get(e.target);t&&t(e)},jf=e=>{e.forEach(Lf)};function $f({root:e,...t}){const n=e||document;En.has(n)||En.set(n,{});const i=En.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(jf,{root:e,...t})),i[s]}function Of(e,t,n){const i=$f(t);return ri.set(e,n),i.observe(e),()=>{ri.delete(e),i.unobserve(e)}}const zf={some:0,all:1};class Bf extends Le{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:o}=t,r={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:zf[s]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return Of(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Nf(t,n))&&this.startObserver()}unmount(){}}function Nf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Hf={inView:{Feature:Bf},tap:{Feature:If},focus:{Feature:kf},hover:{Feature:Ff}},Gf={layout:{ProjectionNode:da,MeasureLayout:ia}},Wf={...Td,...Hf,...Df,...Gf},Ui=Gc(Wf,id),Uf="_primary_13825_8",Kf="_secondary_13825_12",qf="_tertiary_13825_16",Xf="_positive_13825_20",Yf="_negative_13825_24",Zf="_warning_13825_28",Jf="_accent_13825_32",Qf="_inverse_13825_36",eh="_text_13825_111",th="_regular_13825_117",nh="_medium_13825_121",ih="_semibold_13825_125",sh="_bold_13825_129",It={primary:Uf,secondary:Kf,tertiary:qf,positive:Xf,negative:Yf,warning:Zf,accent:Jf,inverse:Qf,"title-1":"_title-1_13825_41","title-2":"_title-2_13825_51","title-3":"_title-3_13825_61","headline-1":"_headline-1_13825_76","headline-2":"_headline-2_13825_81","headline-3":"_headline-3_13825_86","body-1":"_body-1_13825_91","body-2":"_body-2_13825_96","caption-1":"_caption-1_13825_101","caption-2":"_caption-2_13825_106",text:eh,regular:th,medium:nh,semibold:ih,bold:sh},oh=e=>{let t;e.center?t="center":e.left?t="left":e.right&&(t="right");let n;return e.uppercase?n="uppercase":e.lowercase?n="lowercase":e.capitalize&&(n="capitalize"),M.css({marginTop:e.mt,marginBottom:e.mb,marginRight:e.mr,marginLeft:e.ml,flex:e.flex,cursor:e.cursor,wordBreak:e.wordBreak,whiteSpace:e.whiteSpace,textOverflow:e.textOverflow,textDecoration:e.decoration,textAlign:t,textTransform:n,color:e.color,opacity:e.disabled?.5:void 0,overflow:e.overflow})},z=v.forwardRef(({children:e,className:t,variant:n="body-1",fontWeight:i="medium",tag:s="p",colorName:o="primary",style:r,clickOpacity:a=.5,opacityDuration:l=200,onClick:u,disabled:c,mt:d,mb:f,ml:h,mr:p,flex:g,cursor:x,wordBreak:w,whiteSpace:C,textOverflow:y,decoration:S,color:_,center:b,left:E,right:R,uppercase:A,lowercase:L,capitalize:B,overflow:ee,...N},Z)=>{const[te,se]=v.useState(!1),$=!!u,K=()=>$&&se(!0),ne=()=>$&&se(!1),I=oh({mt:d,mb:f,ml:h,mr:p,flex:g,cursor:x,wordBreak:w,whiteSpace:C,textOverflow:y,decoration:S,color:_,center:b,left:E,right:R,uppercase:A,lowercase:L,capitalize:B,overflow:ee}),G=s,P=$?M.css({opacity:te?a:1,transition:`opacity ${l}ms ease`}):"";return m.jsx(G,{ref:Z,...N,className:M.cx(It.text,It[n],It[o],It[i],P,t,I),style:r,onClick:u,onMouseDown:K,onMouseUp:ne,onMouseLeave:ne,onTouchStart:K,onTouchEnd:ne,role:$?"button":void 0,tabIndex:$?0:void 0,children:e})});z.displayName="Text";const Xt=Ui(z),rh="_loader_1qleq_8",ah={loader:rh},lh=({color:e="var(--text-accent)"})=>m.jsx("span",{className:M.cx(ah.loader,M.css({"--loader-color":e}))}),uh=M.css({display:"flex",alignItems:"center",justifyContent:"center",position:"relative",borderRadius:16,height:48,padding:"0 16px",cursor:"pointer",fontSize:16,fontWeight:600,overflow:"hidden",transition:"all 0.2s ease",gap:8}),ct={zero:"var(--corner-zero)",xs:"var(--corner-xs)",sm:"var(--corner-sm)",md:"var(--corner-md)",lg:"var(--corner-lg)",xl:"var(--corner-xl)","2xl":"var(--corner-2xl)","3xl":"var(--corner-3xl)","4xl":"var(--corner-4xl)","5xl":"var(--corner-5xl)","6xl":"var(--corner-6xl)","full-round":"var(--corner-full-round)"},ch={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},dh={clear:M.css({backgroundColor:"transparent",border:"none"}),filled:M.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:M.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},fh=(e,t,n,i)=>{if(i)return M.css({cursor:"not-allowed",opacity:.7});const s={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:e==="filled"?"var(--text-inverse)":`var(--text-${t})`};switch(e){case"filled":return M.css({...s,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return M.css({...s,backgroundColor:"transparent",border:`1px solid var(--border-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});case"clear":return M.css({...s,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return M.css(s)}},hh=({disabled:e,loading:t,onClick:n,wrapperClassName:i,buttonClassName:s,buttonDisabledClassName:o,textClassName:r,children:a,variant:l="filled",backgroundColor:u,textColor:c,textFontWeight:d,borderColor:f,color:h="accent",borderRadius:p,width:g="full",size:x="md",iconLeft:w,iconRight:C,intensity:y="primary",flex:S,..._})=>{const b=v.useMemo(()=>{switch(g){case"full":return"100%";case"auto":return"auto";default:return g}},[g]),E=v.useMemo(()=>u||(l==="filled"?h==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${h}-${y})`:"transparent"),[l,u,h,y]),R=v.useMemo(()=>{if(y==="primary"){if(h==="neutral")return"var(--text-secondary)";if(l==="filled")return"var(--text-inverse)"}else if(h==="neutral")return"var(--text-secondary)";return`var(--text-${h})`},[y,h,l]),A=v.useMemo(()=>{if(y==="primary"){if(h==="neutral")return"secondary";if(l==="filled")return"inverse"}else if(h==="neutral")return"secondary";return h},[l,h,y]),L=v.useMemo(()=>f||(l==="outline"?`var(--border-${h}-${y})`:"transparent"),[l,f,h,y]),B=v.useMemo(()=>{switch(x){case"lg":return ct.lg;case"md":case"sm":return ct.md;case"xs":return ct.sm;default:return ct.md}},[x]),ee=M.cx(uh,fh(l,h,y,e),dh[l],s,e?o:void 0,M.css({borderRadius:p?ct[p]:B,backgroundColor:E,borderColor:L,color:c,width:"100%",height:ch[x],opacity:e?.7:1})),N=v.useMemo(()=>{switch(x){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[x]);return m.jsx(V,{className:M.cx(i),w:b,flex:S,relative:!0,overflow:"hidden",children:m.jsxs(Ui.button,{whileTap:!e&&!t?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},className:ee,disabled:e||t,onClick:n,..._,children:[t?m.jsx(lh,{color:R}):m.jsxs(m.Fragment,{children:[w,m.jsx(Xt,{style:{color:c},colorName:A,variant:N,className:r,textOverflow:"ellipsis",overflow:"hidden",children:a}),C]}),m.jsx(st,{})]})})},gh=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",...e},T.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),ph=e=>T.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},T.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),mh="_checkbox_asmiz_8",vh="_disabled_asmiz_15",yh="_checkbox__ripple_asmiz_15",wh="_checkbox__input_asmiz_27",xh="_checkbox__box_asmiz_35",Ch="_secondary_asmiz_48",Sh="_checked_asmiz_54",_h="_error_asmiz_63",Re={checkbox:mh,disabled:vh,checkbox__ripple:yh,checkbox__input:wh,checkbox__box:xh,secondary:Ch,checked:Sh,error:_h},bh={sm:20,md:24},Ki=v.forwardRef(({checked:e,onChange:t,disabled:n,error:i,indeterminate:s,size:o="md",title:r,titleColor:a,subtitle:l,subtitleColor:u="secondary",name:c,required:d,variant:f="primary",flex:h},p)=>{const[g,x]=v.useState(!1),w=e!==void 0,C=w?e:g,y=b=>{w||x(b.target.checked),t?.(b)},S=bh[o],_=C||s;return m.jsxs("label",{className:M.cx(Re.checkbox,M.css({flex:h}),{[Re.disabled]:n}),children:[m.jsxs(V,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${S}px`,"--checkbox-size-double":`${S*2}px`},children:[m.jsx("input",{ref:p,type:"checkbox",checked:C,onChange:y,onClick:b=>b.stopPropagation(),disabled:n,name:c,required:d,className:M.cx(Re.checkbox__input,{[Re.disabled]:n})}),m.jsx("div",{className:M.cx(Re.checkbox__box,Re[f],{[Re.disabled]:n,[Re.error]:i,[Re.checked]:_}),children:_&&(s?m.jsx(ph,{width:S*.75,height:S*.75}):m.jsx(gh,{width:S*.75,height:S*.75}))})]}),(r||l)&&m.jsxs(V,{gap:4,children:[r&&m.jsx(z,{colorName:a,variant:o==="sm"?"body-2":"body-1",children:r}),l&&m.jsx(z,{variant:"body-2",colorName:u,children:l})]})]})});Ki.displayName="Checkbox";const Rh=e=>T.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{opacity:.5},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0002 17.9999C14.4185 17.9999 18.0002 14.4182 18.0002 9.99991C18.0002 5.58163 14.4185 1.99991 10.0002 1.99991C5.58197 1.99991 2.00024 5.58163 2.00024 9.99991C2.00024 14.4182 5.58197 17.9999 10.0002 17.9999ZM6.46514 6.46446C6.85566 6.07393 7.48883 6.07393 7.87935 6.46446L9.64712 8.23222C9.84238 8.42749 10.159 8.42749 10.3542 8.23222L12.122 6.46446C12.5125 6.07393 13.1457 6.07393 13.5362 6.46446C13.9267 6.85498 13.9267 7.48814 13.5362 7.87867L11.7684 9.64644C11.5732 9.8417 11.5732 10.1583 11.7684 10.3535L13.5362 12.1213C13.9267 12.5118 13.9267 13.145 13.5362 13.5355C13.1457 13.926 12.5125 13.926 12.122 13.5355L10.3542 11.7678C10.159 11.5725 9.84238 11.5725 9.64712 11.7678L7.87935 13.5355C7.48883 13.926 6.85566 13.926 6.46514 13.5355C6.07462 13.145 6.07462 12.5118 6.46514 12.1213L8.23291 10.3535C8.42817 10.1583 8.42817 9.8417 8.23291 9.64644L6.46514 7.87867C6.07462 7.48815 6.07462 6.85498 6.46514 6.46446Z",fill:"currentColor"}))),Ph="_disabled_ph9zm_20",Mh="_multiline_ph9zm_24",Th="_input_ph9zm_8",Eh="_sm_ph9zm_74",Vh="_md_ph9zm_79",Ah="_error_ph9zm_84",Dh="_white_ph9zm_88",Fh="_gray_ph9zm_92",ce={"input-container":"_input-container_ph9zm_8",disabled:Ph,multiline:Mh,input:Th,"input-text-size_sm":"_input-text-size_sm_ph9zm_55","input-text-size_md":"_input-text-size_md_ph9zm_59","input-text-align_left":"_input-text-align_left_ph9zm_64","input-text-align_center":"_input-text-align_center_ph9zm_67","input-text-align_right":"_input-text-align_right_ph9zm_70",sm:Eh,md:Vh,error:Ah,white:Dh,gray:Fh,"clear-button":"_clear-button_ph9zm_96"};function wo(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const fa=v.forwardRef((e,t)=>{const{label:n,prompt:i,error:s,errorText:o,size:r="md",prefix:a,suffix:l,background:u="white",showClearButton:c,disabled:d,value:f,defaultValue:h,inputClassName:p,textAlign:g="left",...x}=e,w=e.multiline===!0,C=v.useRef(null),y=v.useRef(null),[S,_]=Yt(typeof f=="string"||typeof f=="number"?String(f):void 0,h==="string"||h==="number"?String(h):"");v.useImperativeHandle(t,()=>({focus:()=>{C.current?.focus(),y.current?.focus()},blur:()=>{C.current?.blur(),y.current?.blur()},get value(){return C.current?.value||y.current?.value}}));const b=A=>{if(_(A.target.value),w){const L=e.onChange;L?.(A)}else{const L=e.onChange;L?.(A)}};v.useEffect(()=>{w&&e.autoResize&&y.current&&(y.current.style.height="auto",y.current.style.height=`${y.current.scrollHeight}px`)},[S,w,e.autoResize]);const E=()=>{if(_(""),!w){const L=C.current;if(L){L.value="";const B=wo(L),ee=e.onChange;ee?.(B)}return}const A=y.current;if(A){A.value="";const L=wo(A),B=e.onChange;B?.(L)}},R=()=>{if(w){const{rows:ee,autoResize:N,onChange:Z,multiline:te,...se}=x;return m.jsx("textarea",{ref:y,rows:e.rows??3,className:M.cx(ce.input,p,{[ce.disabled]:d,[ce[`input-text-align_${g}`]]:!!g}),disabled:d,maxLength:e.maxLength,...se,value:S,onChange:b})}const{onChange:A,multiline:L,...B}=x;return m.jsx("input",{...B,ref:C,className:M.cx(ce.input,ce[`input-text-size_${r}`],p,{[ce.disabled]:d,[ce[`input-text-align_${g}`]]:!!g}),disabled:d,type:e.type??"text",value:S,onChange:b})};return m.jsxs(V,{w:"full",gap:"var(--spacing-sm)",children:[n&&m.jsx(z,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}),m.jsxs(V,{row:!0,alignItems:w?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:M.cx(ce["input-container"],ce[u],ce[r],{[ce.error]:s,[ce.disabled]:d,[ce.multiline]:w}),children:[a&&m.jsx(V,{flex:"none",children:a}),m.jsx(V,{flex:"1",children:R()}),c&&S&&!d&&m.jsx(V,{flex:"none",children:m.jsx("span",{className:ce["clear-button"],onClick:E,children:m.jsx(Rh,{})})}),l&&m.jsx(V,{flex:"none",children:l})]}),(i||w)&&m.jsxs(V,{row:!0,gap:10,w:"full",children:[typeof i=="string"?m.jsx(z,{variant:"caption-1",colorName:"tertiary",children:i}):i,w&&e.maxLength&&m.jsx(z,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${S.length}/${e.maxLength}`})]}),o&&s&&m.jsx(z,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:o})]})});fa.displayName="Input";const kh=e=>T.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Ih=e=>T.createElement("svg",{fill:"currentColor",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 462.035 462.035",xmlSpace:"preserve",...e},T.createElement("g",null,T.createElement("path",{d:"M457.83,158.441c-0.021-0.028-0.033-0.058-0.057-0.087l-50.184-62.48c-0.564-0.701-1.201-1.305-1.879-1.845 c-2.16-2.562-5.355-4.225-8.967-4.225H65.292c-3.615,0-6.804,1.661-8.965,4.225c-0.678,0.54-1.316,1.138-1.885,1.845l-50.178,62.48 c-0.023,0.029-0.034,0.059-0.057,0.087C1.655,160.602,0,163.787,0,167.39v193.07c0,6.5,5.27,11.771,11.77,11.771h438.496 c6.5,0,11.77-5.271,11.77-11.771V167.39C462.037,163.787,460.381,160.602,457.83,158.441z M408.516,134.615l16.873,21.005h-16.873 V134.615z M384.975,113.345v42.274H296.84c-2.514,0-4.955,0.805-6.979,2.293l-58.837,43.299l-58.849-43.305 c-2.023-1.482-4.466-2.287-6.978-2.287H77.061v-42.274H384.975z M53.523,155.62H36.65l16.873-21.005V155.62z M438.498,348.69H23.54 V179.16h137.796l62.711,46.148c4.15,3.046,9.805,3.052,13.954-0.005l62.698-46.144h137.799V348.69L438.498,348.69z"}))),Lh=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{opacity:.6},T.createElement("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),Vn={sm:{h:28,p:"var(--spacing-xs) var(--spacing-sm)",text:"body-2"},md:{h:32,p:"6px var(--spacing-md)",text:"body-2"},lg:{h:40,p:"var(--spacing-sm) var(--spacing-lg)",text:"body-1"}},qi=v.forwardRef(({label:e,color:t="primary",size:n="md",onClick:i,onDelete:s,avatar:o,icon:r,disabled:a,className:l},u)=>{const c=v.useRef(null),d=v.useMemo(()=>{switch(t){case"primary":return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"};case"accent":return{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"};case"warning":return{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"};case"positive":return{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"};case"negative":return{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"};default:return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"}}},[t]),f=M.css({cursor:a?"not-allowed":i?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:d.bg}}),h=M.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return m.jsxs(V,{ref:p=>{c.current=p,typeof u=="function"?u(p):u&&(u.current=p)},row:!0,alignItems:"center",justifyContent:"center",gap:"var(--spacing-sm)",h:Vn[n].h,p:Vn[n].p,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:d.bg,color:d.color,onClick:i,className:M.cx(f,l),children:[i&&m.jsx(st,{}),o&&m.jsx(V,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:o}),r&&m.jsx(V,{children:r}),typeof e=="string"?m.jsx(z,{variant:Vn[n].text,colorName:t,textOverflow:"ellipsis",overflow:"hidden",children:e}):e,s&&!a&&m.jsx(z,{className:h,colorName:t,onClick:p=>{p.stopPropagation(),s(p)},children:m.jsx(Lh,{})})]})});qi.displayName="Tag";const jh="_disabled_v62jt_40",$h="_open_v62jt_48",Oh="_error_v62jt_51",zh="_hidden_v62jt_87",Bh="_visible_v62jt_90",Nh="_selected_v62jt_163",ie={"select-container":"_select-container_v62jt_8","full-width":"_full-width_v62jt_13","select-input":"_select-input_v62jt_17","size-xs":"_size-xs_v62jt_25","size-sm":"_size-sm_v62jt_30","size-md":"_size-md_v62jt_35",disabled:jh,open:$h,"select-arrow":"_select-arrow_v62jt_48",error:Oh,"select-value":"_select-value_v62jt_62","select-value_xs":"_select-value_xs_v62jt_74","select-placeholder":"_select-placeholder_v62jt_81",hidden:zh,visible:Bh,"select-arrow_xs":"_select-arrow_xs_v62jt_106","select-dropdown":"_select-dropdown_v62jt_116","select-menu":"_select-menu_v62jt_126","select-menu-item":"_select-menu-item_v62jt_145","select-menu-item-first":"_select-menu-item-first_v62jt_158",selected:Nh,"overflow-tooltip-container":"_overflow-tooltip-container_v62jt_167","overflow-tooltip-text":"_overflow-tooltip-text_v62jt_172","empty-block":"_empty-block_v62jt_179"};function ha({value:e,onChange:t,multiple:n=!1,returnedValue:i,renderItem:s,placeholder:o,items:r=[],fullWidth:a,size:l="md",showDefaultItem:u,disabled:c,label:d,firstItem:f,lastItem:h,observer:p,emptyText:g,onBlur:x,prompt:w,error:C,errorText:y}){const[S,_]=Yt(e,n?[]:null),b=v.useRef(null),[E,R]=v.useState(!1),A=v.useMemo(()=>n?S||[]:S!=null?[S]:[],[S,n]),L=v.useCallback(I=>i?i(I):I,[i]),B=v.useMemo(()=>{const I=new Map;return r.forEach(G=>{I.set(L(G),G)}),I},[r,L]),ee=Do(b,E),N=!r.length&&!C,Z=()=>{R(!1),x?.()},te=I=>{const G=L(I);if(n){const P=A.includes(G)?A.filter(j=>j!==G):[...A,G];_(P),t?.(P)}else _(G),t?.(G),Z()},se=I=>{if(!n)return;const G=A.filter(P=>P!==I);_(G),t?.(G)},$=()=>{const I=n?[]:null;_(I),t?.(I),n||Z()},K=()=>{if(!A.length)return m.jsx(z,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:o??"Select..."});if(n)return m.jsx(V,{flexWrap:"wrap",row:!0,gap:10,children:A.map(P=>{const j=B.get(P);return j?m.jsx(qi,{size:"sm",label:s(j),onDelete:oe=>{oe.stopPropagation(),se(P)}},P):null})});const I=B.get(A[0]);if(!I)return m.jsx(z,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:o});const G=s(I);return typeof G=="string"?m.jsx(z,{variant:l==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:G}):m.jsx(m.Fragment,{children:G})},ne=E&&m.jsx(rn,{children:m.jsx(V,{row:!0,top:0,right:0,bottom:0,left:0,position:"fixed",center:!0,flex:1,onClick:Z,display:"block",backgroundColor:"transparent",zIndex:1,children:m.jsx(Ui.div,{className:ie["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...ee,position:"absolute",zIndex:1},onMouseDown:I=>I.stopPropagation(),onClick:I=>I.stopPropagation(),children:m.jsxs("ul",{className:ie["select-menu"],children:[u&&!n&&m.jsx(V,{className:ie["select-menu-item"],role:"option",onClick:$,children:m.jsx(z,{variant:"body-2",colorName:"tertiary",children:o})}),f&&m.jsx(V,{className:M.cx(ie["select-menu-item"],ie["select-menu-item-first"]),children:f}),N&&m.jsxs(V,{className:ie["empty-block"],children:[m.jsx(V,{w:20,h:20,children:m.jsx(Ih,{})}),m.jsx(z,{variant:"body-2",children:g??"There is nothing yet"})]}),r.map(I=>{const G=L(I),P=A.includes(G);return m.jsxs(V,{row:!0,gap:10,alignItems:"center",className:M.cx(ie["select-menu-item"],{[ie.selected]:P}),role:"option",relative:!0,onClick:()=>te(I),children:[n&&m.jsx(Ki,{size:"sm",checked:P}),typeof s(I)=="string"?m.jsx(z,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:s(I)}):s(I),m.jsx(st,{})]},G)}),p,h&&m.jsx(V,{className:M.cx(ie["select-menu-item"],ie["select-menu-item-first"]),children:h})]})},"dropdown")})});return m.jsxs(V,{relative:!0,display:"inline-block",minWidth:120,w:a?"full":"auto",onMouseDown:I=>I.stopPropagation(),onClick:I=>I.stopPropagation(),children:[typeof d=="string"?m.jsx(z,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:l==="sm"?4:8,children:d}):d,m.jsxs(V,{ref:b,row:!0,gap:10,tabIndex:c?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:M.cx(ie["select-input"],ie[`size-${l}`],{[ie.error]:C,[ie.disabled]:c,[ie.open]:E}),onClick:()=>!c&&R(I=>!I),children:[m.jsx(V,{className:M.cx(ie["select-value"]),children:K()}),m.jsx(V,{className:M.cx(ie["select-arrow"],ie[`select-arrow_${l}`]),children:m.jsx(kh,{})})]}),typeof w=="string"?m.jsx(z,{variant:"caption-1",colorName:"tertiary",mt:4,children:w}):w,C&&y&&m.jsx(z,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:y}),m.jsx(fc,{initial:!1,children:ne})]})}const Hh=e=>T.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M3.94629 0.220237C3.78013 0.264025 3.64089 0.377624 3.56348 0.53176C3.27371 1.11189 3.05664 1.46395 2.83887 1.74953C2.61807 2.03873 2.38547 2.27579 2.03027 2.63039C1.21079 3.45057 0.799805 4.52619 0.799805 5.60012C0.799838 6.67406 1.21073 7.74968 2.03027 8.56985C3.67062 10.2096 6.32931 10.2095 7.96973 8.56985C8.78929 7.74968 9.20016 6.67408 9.2002 5.60012C9.15131 4.32908 8.43217 3.48543 7.94727 3.05813C7.76902 2.90106 7.40643 3.02424 7.2627 3.2134C7.24031 3.24286 7.21612 3.2739 7.18945 3.30617C6.93211 3.61754 6.56236 3.80807 6.41504 3.83156C6.38264 3.83667 6.36979 3.76513 6.2959 3.58254C5.79455 2.34427 5.78927 2.49365 5.58887 2.01125C5.48847 1.7692 5.05517 1.02727 4.92676 0.828635C4.80206 0.635591 4.64095 0.439873 4.43359 0.301292C4.29028 0.205951 4.1124 0.175957 3.94629 0.220237ZM4.75293 4.17824C5.2689 4.63997 5.60857 5.26651 5.71484 5.95071C6.10631 5.85571 6.46727 5.68318 6.78125 5.45071C6.86578 5.70826 6.89338 5.98123 6.8623 6.25051C6.83115 6.51993 6.74174 6.77966 6.60059 7.01125C6.45944 7.24281 6.27008 7.44117 6.04492 7.59231C5.81977 7.74344 5.56462 7.8443 5.29688 7.88723C5.0292 7.93013 4.75518 7.91446 4.49414 7.84133C4.23299 7.76812 3.99064 7.6383 3.78418 7.46242C3.5778 7.28657 3.41161 7.06792 3.29785 6.8218C3.18419 6.57572 3.12519 6.30771 3.125 6.03664C3.12508 5.58233 3.29054 5.14308 3.58984 4.80129C3.88917 4.4597 4.30271 4.2382 4.75293 4.17824Z",fill:"#FEAD34"})),Gh=e=>T.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M10.1483 8.61509C10.3344 8.26159 9.98299 7.89856 9.58534 7.93723C9.42671 7.95265 9.25857 7.9605 9.07422 7.96035C6.36522 7.9582 4.17129 5.76427 4.16914 3.05527C4.169 2.87115 4.17682 2.70321 4.19221 2.54477C4.23082 2.14712 3.86769 1.79411 3.50976 1.97161C2.03398 2.70343 1.20002 4.02274 1.20002 5.89477C1.20002 8.60377 3.3961 10.7998 6.1051 10.7998C7.97571 10.7998 9.38737 10.06 10.1483 8.61509Z",fill:"white"})),Wh="_container_e7tan_8",Uh="_disabled_e7tan_17",Kh="_reverse_e7tan_21",qh="_input_e7tan_25",Xh="_switchContainer_e7tan_35",Yh="_variant_accent_e7tan_43",Zh="_variant_secondary_e7tan_47",Jh="_thumb_e7tan_51",Qh="_variant_theme_e7tan_54",eg="_moon_e7tan_58",tg="_fire_e7tan_61",ng="_size_sm_e7tan_74",ig="_size_md_e7tan_80",sg="_size_lg_e7tan_86",xe={container:Wh,disabled:Uh,reverse:Kh,input:qh,switchContainer:Xh,variant_accent:Yh,variant_secondary:Zh,switch:"_switch_e7tan_35",thumb:Jh,variant_theme:Qh,moon:eg,fire:tg,size_sm:ng,size_md:ig,size_lg:sg},ga=v.forwardRef(({title:e,text:t,icon:n,disabled:i,onChange:s,checked:o,defaultValue:r,className:a,size:l="md",variant:u="accent",reverse:c=!1,w:d="auto",...f},h)=>{const[p,g]=Yt(o,r),x=v.useRef(null);v.useImperativeHandle(h,()=>({focus:()=>{x.current?.focus()},blur:()=>{x.current?.blur()},get checked(){return p??!1},setChecked:S=>{g(S),s?.(S)},toggle:()=>{const S=!p;g(S),s?.(S)},isFocused:()=>document.activeElement===x.current,isDisabled:()=>i??!1,getInputElement:()=>x.current,checkValidity:()=>x.current?.checkValidity()??!0,reset:()=>{const S=r??!1;g(S),s?.(S)}}),[p,g,s,i,r]);const w=v.useCallback(S=>{g(S.target.checked),s?.(S.target.checked)},[s]),C=v.useMemo(()=>typeof e=="string"?m.jsx(z,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:e}):e,[e]),y=v.useMemo(()=>typeof t=="string"?m.jsx(z,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:t}):t,[t]);return m.jsxs(V,{row:!0,w:d,gap:"var(--spacing-sm)",children:[m.jsxs("label",{className:M.cx(xe.container,a,{[xe.disabled]:i,[xe.reverse]:c}),children:[m.jsxs(V,{className:M.cx(xe.switchContainer,xe[`size_${l}`],xe[`variant_${u}`]),children:[m.jsx("input",{ref:x,type:"checkbox",checked:p,className:xe.input,onChange:w,disabled:i,...f}),m.jsx("div",{className:xe.switch,children:m.jsx("div",{className:xe.thumb,children:u==="theme"&&m.jsxs(m.Fragment,{children:[m.jsx(Gh,{className:xe.moon}),m.jsx(Hh,{className:xe.fire})]})})})]}),m.jsxs(V,{gap:"var(--spacing-xs)",children:[C,y]})]}),n]})});ga.displayName="Switch";const og="_primary_svt6d_8",rg="_secondary_svt6d_13",ag="_button_svt6d_18",Ve={primary:og,secondary:rg,button:ag,"button-active":"_button-active_svt6d_32","icon-container":"_icon-container_svt6d_35","button-primary":"_button-primary_svt6d_47","button-secondary":"_button-secondary_svt6d_51","button-disabled":"_button-disabled_svt6d_55","full-width":"_full-width_svt6d_60"};function lg({value:e,onChange:t,options:n,variant:i="primary",fullWidth:s=!1,className:o}){return m.jsx(V,{row:!0,alignItems:"center",borderRadius:"var(--corner-md)",p:"var(--spacing-xs)",gap:"var(--spacing-md)",className:M.cx(Ve[i],s&&Ve["full-width"],o),children:n.map(r=>{const a=r.value===e,l=r.disabled,u=r.separatorAfter??!1;return m.jsxs(v.Fragment,{children:[m.jsxs("button",{type:"button",disabled:l,className:M.cx(Ve.button,s&&Ve["full-width"],a&&Ve["button-active"],a&&Ve[`button-${i}`],l&&Ve["button-disabled"]),onClick:()=>!l&&t(r.value),children:[r.icon&&m.jsx(V,{alignItems:"center",justifyContent:"center",className:Ve["icon-container"],children:r.icon}),r.label&&m.jsx(z,{colorName:a?"primary":"tertiary",children:r.label}),!l&&m.jsx(st,{color:"var(--fill-bg-overlay-primary)"})]}),u&&m.jsx(V,{w:1,h:24,backgroundColor:"var(--fill-bg-tertiary)"})]},r.value)})})}const ug="_header_446to_8",cg={header:ug},pa=v.forwardRef(({title:e,subtitle:t,onClose:n,w:i="full",p:s,py:o,px:r="var(--spacing-2xl)",pt:a="var(--spacing-2xl)",pb:l="var(--spacing-lg)",row:u=!0,justifyContent:c="space-between",showCloseButton:d=!0},f)=>m.jsxs(V,{w:i,p:s,py:o,px:r,pt:a,pb:l,row:u,justifyContent:c,ref:f,className:cg.header,children:[m.jsxs(V,{gap:"var(--spacing-sm)",children:[m.jsx(z,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:e}),m.jsx(z,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:t})]}),d&&m.jsx(V,{children:m.jsx(wt,{onClick:n,color:"neutral",children:m.jsx(Ao,{})})})]}));pa.displayName="ModalHeader";const dg="_footer_1bo08_8",fg={footer:dg},ma=v.forwardRef(({children:e,row:t=!0,flex:n=!0,gap:i="var(--spacing-lg)",p:s="var(--spacing-2xl)",className:o,...r},a)=>m.jsx(V,{flex:n,row:t,gap:i,p:s,className:M.cx(fg.footer,o),ref:a,...r,children:e}));ma.displayName="ModalFooter";function qe(e,t,n){let i=n.initialDeps??[],s;function o(){var r,a,l,u;let c;n.key&&((r=n.debug)!=null&&r.call(n))&&(c=Date.now());const d=e();if(!(d.length!==i.length||d.some((p,g)=>i[g]!==p)))return s;i=d;let h;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(h=Date.now()),s=t(...d),n.key&&((l=n.debug)!=null&&l.call(n))){const p=Math.round((Date.now()-c)*100)/100,g=Math.round((Date.now()-h)*100)/100,x=g/16,w=(C,y)=>{for(C=String(C);C.length<y;)C=" "+C;return C};console.info(`%c⏱ ${w(g,5)} /${w(p,5)} ms`,`
|
|
13
|
+
`),()=>{y.contains(g)&&y.removeChild(g)}},[t]),x.jsx(Zd,{isPresent:t,childRef:s,sizeRef:r,children:S.cloneElement(e,{ref:l})})}const Qd=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:o,presenceAffectsLayout:s,mode:r,anchorX:a,root:l})=>{const u=uo(ef),c=C.useId();let d=!0,f=C.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:o,onExitComplete:h=>{u.set(h,!0);for(const m of u.values())if(!m)return;i&&i()},register:h=>(u.set(h,!1),()=>u.delete(h))}),[n,u,i]);return s&&d&&(f={...f}),C.useMemo(()=>{u.forEach((h,m)=>u.set(m,!1))},[n]),S.useEffect(()=>{!n&&!u.size&&i&&i()},[n]),r==="popLayout"&&(e=x.jsx(Jd,{isPresent:n,anchorX:a,root:l,children:e})),x.jsx(Ln.Provider,{value:f,children:e})};function ef(){return new Map}function Wa(e=!0){const t=C.useContext(Ln);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:o}=t,s=C.useId();C.useEffect(()=>{if(e)return o(s)},[e]);const r=C.useCallback(()=>e&&i&&i(s),[s,i,e]);return!n&&i?[!1,r]:[!0]}const ln=e=>e.key||"";function Ms(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const tf=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:s="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=Wa(r),d=C.useMemo(()=>Ms(e),[e]),f=r&&!u?[]:d.map(ln),h=C.useRef(!0),m=C.useRef(d),g=uo(()=>new Map),[y,v]=C.useState(d),[w,p]=C.useState(d);Qr(()=>{h.current=!1,m.current=d;for(let E=0;E<w.length;E++){const P=ln(w[E]);f.includes(P)?g.delete(P):g.get(P)!==!0&&g.set(P,!1)}},[w,f.length,f.join("-")]);const b=[];if(d!==y){let E=[...d];for(let P=0;P<w.length;P++){const M=w[P],k=ln(M);f.includes(k)||(E.splice(P,0,M),b.push(M))}return s==="wait"&&b.length&&(E=b),p(Ms(E)),v(d),null}process.env.NODE_ENV!=="production"&&s==="wait"&&w.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.`);const{forceRender:_}=C.useContext(lo);return x.jsx(x.Fragment,{children:w.map(E=>{const P=ln(E),M=r&&!u?!1:d===w||f.includes(P),k=()=>{if(g.has(P))g.set(P,!0);else return;let A=!0;g.forEach(j=>{j||(A=!1)}),A&&(_?.(),p(m.current),r&&c?.(),i&&i())};return x.jsx(Qd,{isPresent:M,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:l,onExitComplete:M?void 0:k,anchorX:a,children:E},P)})})},Ga=C.createContext({strict:!1}),Ps={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ct={};for(const e in Ps)Ct[e]={isEnabled:t=>Ps[e].some(n=>!!t[n])};function nf(e){for(const t in e)Ct[t]={...Ct[t],...e[t]}}const of=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"]);function En(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||of.has(e)}let Ua=e=>!En(e);function sf(e){typeof e=="function"&&(Ua=t=>t.startsWith("on")?!En(t):e(t))}try{sf(require("@emotion/is-prop-valid").default)}catch{}function rf(e,t,n){const i={};for(const o in e)o==="values"&&typeof e.values=="object"||(Ua(o)||n===!0&&En(o)||!t&&!En(o)||e.draggable&&o.startsWith("onDrag"))&&(i[o]=e[o]);return i}const In=C.createContext({});function jn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Kt(e){return typeof e=="string"||Array.isArray(e)}const ko=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lo=["initial",...ko];function $n(e){return jn(e.animate)||Lo.some(t=>Kt(e[t]))}function Ka(e){return!!($n(e)||e.variants)}function af(e,t){if($n(e)){const{initial:n,animate:i}=e;return{initial:n===!1||Kt(n)?n:void 0,animate:Kt(i)?i:void 0}}return e.inherit!==!1?t:{}}function lf(e){const{initial:t,animate:n}=af(e,C.useContext(In));return C.useMemo(()=>({initial:t,animate:n}),[Ts(t),Ts(n)])}function Ts(e){return Array.isArray(e)?e.join(" "):e}const qt={};function uf(e){for(const t in e)qt[t]=e[t],xo(t)&&(qt[t].isCSSVariable=!0)}function qa(e,{layout:t,layoutId:n}){return Pt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!qt[e]||e==="opacity")}const cf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},df=Mt.length;function ff(e,t,n){let i="",o=!0;for(let s=0;s<df;s++){const r=Mt[s],a=e[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=$a(a,Vo[r]);if(!l){o=!1;const c=cf[r]||r;i+=`${c}(${u}) `}n&&(t[r]=u)}}return i=i.trim(),n?i=n(t,o?"":i):o&&(i="none"),i}function Io(e,t,n){const{style:i,vars:o,transformOrigin:s}=e;let r=!1,a=!1;for(const l in t){const u=t[l];if(Pt.has(l)){r=!0;continue}else if(xo(l)){o[l]=u;continue}else{const c=$a(u,Vo[l]);l.startsWith("origin")?(a=!0,s[l]=c):i[l]=c}}if(t.transform||(r||n?i.transform=ff(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=s;i.transformOrigin=`${l} ${u} ${c}`}}const jo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Xa(e,t,n){for(const i in t)!ae(t[i])&&!qa(i,n)&&(e[i]=t[i])}function hf({transformTemplate:e},t){return C.useMemo(()=>{const n=jo();return Io(n,t,e),Object.assign({},n.vars,n.style)},[t])}function gf(e,t){const n=e.style||{},i={};return Xa(i,n,e),Object.assign(i,hf(e,t)),i}function mf(e,t){const n={},i=gf(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.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=i,n}const pf={offset:"stroke-dashoffset",array:"stroke-dasharray"},vf={offset:"strokeDashoffset",array:"strokeDasharray"};function yf(e,t,n=1,i=0,o=!0){e.pathLength=1;const s=o?pf:vf;e[s.offset]=N.transform(-i);const r=N.transform(t),a=N.transform(n);e[s.array]=`${r} ${a}`}function Ya(e,{attrX:t,attrY:n,attrScale:i,pathLength:o,pathSpacing:s=1,pathOffset:r=0,...a},l,u,c){if(Io(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{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=c?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),i!==void 0&&(d.scale=i),o!==void 0&&yf(d,o,s,r,!1)}const Za=()=>({...jo(),attrs:{}}),Ja=e=>typeof e=="string"&&e.toLowerCase()==="svg";function xf(e,t,n,i){const o=C.useMemo(()=>{const s=Za();return Ya(s,t,Ja(i),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Xa(s,e.style,e),o.style={...s,...o.style}}return o}const wf=["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 $o(e){return typeof e!="string"||e.includes("-")?!1:!!(wf.indexOf(e)>-1||/[A-Z]/u.test(e))}function Cf(e,t,n,{latestValues:i},o,s=!1){const a=($o(e)?xf:mf)(t,i,o,e),l=rf(t,typeof e=="string",s),u=e!==C.Fragment?{...l,...a,ref:n}:{},{children:c}=t,d=C.useMemo(()=>ae(c)?c.get():c,[c]);return C.createElement(e,{...u,children:d})}function Vs(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function Oo(e,t,n,i){if(typeof t=="function"){const[o,s]=Vs(i);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Vs(i);t=t(n!==void 0?n:e.custom,o,s)}return t}function yn(e){return ae(e)?e.get():e}function Sf({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,o){return{latestValues:bf(n,i,o,e),renderState:t()}}function bf(e,t,n,i){const o={},s=i(e,{});for(const f in s)o[f]=yn(s[f]);let{initial:r,animate:a}=e;const l=$n(e),u=Ka(e);t&&u&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const d=c?a:r;if(d&&typeof d!="boolean"&&!jn(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const m=Oo(e,f[h]);if(m){const{transitionEnd:g,transition:y,...v}=m;for(const w in v){let p=v[w];if(Array.isArray(p)){const b=c?p.length-1:0;p=p[b]}p!==null&&(o[w]=p)}for(const w in g)o[w]=g[w]}}}return o}const Qa=e=>(t,n)=>{const i=C.useContext(In),o=C.useContext(Ln),s=()=>Sf(e,t,i,o);return n?s():uo(s)};function Bo(e,t,n){const{style:i}=e,o={};for(const s in i)(ae(i[s])||t.style&&ae(t.style[s])||qa(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(o[s]=i[s]);return o}const _f=Qa({scrapeMotionValuesFromProps:Bo,createRenderState:jo});function el(e,t,n){const i=Bo(e,t,n);for(const o in e)if(ae(e[o])||ae(t[o])){const s=Mt.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;i[s]=e[o]}return i}const Rf=Qa({scrapeMotionValuesFromProps:el,createRenderState:Za}),Ef=Symbol.for("motionComponentSymbol");function ht(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Mf(e,t,n){return C.useCallback(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),n&&(typeof n=="function"?n(i):ht(n)&&(n.current=i))},[t])}const No=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Pf="framerAppearId",tl="data-"+No(Pf),nl=C.createContext({});function Tf(e,t,n,i,o){const{visualElement:s}=C.useContext(In),r=C.useContext(Ga),a=C.useContext(Ln),l=C.useContext(Fo).reducedMotion,u=C.useRef(null);i=i||r.renderer,!u.current&&i&&(u.current=i(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=C.useContext(nl);c&&!c.projection&&o&&(c.type==="html"||c.type==="svg")&&Vf(u.current,n,o,d);const f=C.useRef(!1);C.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const h=n[tl],m=C.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return Qr(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),m.current&&c.animationState&&c.animationState.animateChanges())}),C.useEffect(()=>{c&&(!m.current&&c.animationState&&c.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),m.current=!1),c.enteringChildren=void 0)}),c}function Vf(e,t,n,i){const{layoutId:o,layout:s,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:il(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!r||a&&ht(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:i,crossfade:c,layoutScroll:l,layoutRoot:u})}function il(e){if(e)return e.options.allowProjection!==!1?e.projection:il(e.parent)}function si(e,{forwardMotionProps:t=!1}={},n,i){n&&nf(n);const o=$o(e)?Rf:_f;function s(a,l){let u;const c={...C.useContext(Fo),...a,layoutId:Af(a)},{isStatic:d}=c,f=lf(a),h=o(a,d);if(!d&&co){Df(c,n);const m=Ff(c);u=m.MeasureLayout,f.visualElement=Tf(e,h,c,i,m.ProjectionNode)}return x.jsxs(In.Provider,{value:f,children:[u&&f.visualElement?x.jsx(u,{visualElement:f.visualElement,...c}):null,Cf(e,a,Mf(h,f.visualElement,l),h,d,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=C.forwardRef(s);return r[Ef]=e,r}function Af({layoutId:e}){const t=C.useContext(lo).id;return t&&e!==void 0?t+"-"+e:e}function Df(e,t){const n=C.useContext(Ga).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Rt(!1,i,"lazy-strict-mode"):Oe(!1,i,"lazy-strict-mode")}}function Ff(e){const{drag:t,layout:n}=Ct;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function kf(e,t){if(typeof Proxy>"u")return si;const n=new Map,i=(s,r)=>si(s,r,e,t),o=(s,r)=>(process.env.NODE_ENV!=="production"&&po(!1,"motion() is deprecated. Use motion.create() instead."),i(s,r));return new Proxy(o,{get:(s,r)=>r==="create"?i:(n.has(r)||n.set(r,si(r,void 0,e,t)),n.get(r))})}function ol({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function Lf({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function If(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function ri(e){return e===void 0||e===1}function Hi({scale:e,scaleX:t,scaleY:n}){return!ri(e)||!ri(t)||!ri(n)}function Je(e){return Hi(e)||sl(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function sl(e){return As(e.x)||As(e.y)}function As(e){return e&&e!=="0%"}function Mn(e,t,n){const i=e-n,o=t*i;return n+o}function Ds(e,t,n,i,o){return o!==void 0&&(e=Mn(e,o,i)),Mn(e,n,i)+t}function Wi(e,t=0,n=1,i,o){e.min=Ds(e.min,t,n,i,o),e.max=Ds(e.max,t,n,i,o)}function rl(e,{x:t,y:n}){Wi(e.x,t.translate,t.scale,t.originPoint),Wi(e.y,n.translate,n.scale,n.originPoint)}const Fs=.999999999999,ks=1.0000000000001;function jf(e,t,n,i=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,r;for(let a=0;a<o;a++){s=n[a],r=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&s.options.layoutScroll&&s.scroll&&s!==s.root&&mt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,rl(e,r)),i&&Je(s.latestValues)&&mt(e,s.latestValues))}t.x<ks&&t.x>Fs&&(t.x=1),t.y<ks&&t.y>Fs&&(t.y=1)}function gt(e,t){e.min=e.min+t,e.max=e.max+t}function Ls(e,t,n,i,o=.5){const s=ee(e.min,e.max,o);Wi(e,t,n,s,i)}function mt(e,t){Ls(e.x,t.x,t.scaleX,t.scale,t.originX),Ls(e.y,t.y,t.scaleY,t.scale,t.originY)}function al(e,t){return ol(If(e.getBoundingClientRect(),t))}function $f(e,t,n){const i=al(e,n),{scroll:o}=t;return o&&(gt(i.x,o.offset.x),gt(i.y,o.offset.y)),i}const Is=()=>({translate:0,scale:1,origin:0,originPoint:0}),pt=()=>({x:Is(),y:Is()}),js=()=>({min:0,max:0}),te=()=>({x:js(),y:js()}),Gi={current:null},ll={current:!1};function Of(){if(ll.current=!0,!!co)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Gi.current=e.matches;e.addEventListener("change",t),t()}else Gi.current=!1}const Bf=new WeakMap;function Nf(e,t,n){for(const i in t){const o=t[i],s=n[i];if(ae(o))e.addValue(i,o);else if(ae(s))e.addValue(i,wt(o,{owner:e}));else if(s!==o)if(e.hasValue(i)){const r=e.getValue(i);r.liveStyle===!0?r.jump(o):r.hasAnimated||r.set(o)}else{const r=e.getStaticValue(i);e.addValue(i,wt(r!==void 0?r:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const $s=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class zf{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:o,blockInitialAnimation:s,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Po,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=()=>{const f=ce.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,J.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=$n(n),this.isVariantNode=Ka(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&ae(h)&&h.set(l[f])}}mount(t){this.current=t,Bf.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),ll.current||Of(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Gi.current,process.env.NODE_ENV!=="production"&&po(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(){this.projection&&this.projection.unmount(),Ue(this.notifyUpdate),Ue(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=Pt.has(t);i&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&J.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ct){const n=Ct[t];if(!n)continue;const{isEnabled:i,Feature:o}=n;if(!this.features[t]&&o&&i(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):te()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<$s.length;i++){const o=$s[i];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,r=t[s];r&&(this.propEventSubscriptions[o]=this.on(o,r))}this.prevMotionValues=Nf(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=wt(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(ea(i)||na(i))?i=parseFloat(i):!qd(i)&&Ke.test(n)&&(i=ja(t,n)),this.setBaseTarget(t,ae(i)?i.get():i)),ae(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const s=Oo(this.props,n,this.presenceContext?.custom);s&&(i=s[t])}if(n&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ae(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new mo),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ao.render(this.render)}}class ul extends zf{constructor(){super(...arguments),this.KeyframeResolver=Id}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ae(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function cl(e,{style:t,vars:n},i,o){const s=e.style;let r;for(r in t)s[r]=t[r];o?.applyProjectionStyles(s,i);for(r in n)s.setProperty(r,n[r])}function Hf(e){return window.getComputedStyle(e)}class Wf extends ul{constructor(){super(...arguments),this.type="html",this.renderInstance=cl}readValueFromInstance(t,n){if(Pt.has(n))return this.projection?.isProjecting?Ii(n):ed(t,n);{const i=Hf(t),o=(xo(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return al(t,n)}build(t,n,i){Io(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return Bo(t,n,i)}}const dl=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 Gf(e,t,n,i){cl(e,t,void 0,i);for(const o in t.attrs)e.setAttribute(dl.has(o)?o:No(o),t.attrs[o])}class Uf extends ul{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=te}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Pt.has(n)){const i=Ia(n);return i&&i.default||0}return n=dl.has(n)?n:No(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return el(t,n,i)}build(t,n,i){Ya(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,o){Gf(t,n,i,o)}mount(t){this.isSVGTag=Ja(t.tagName),super.mount(t)}}const Kf=(e,t)=>$o(e)?new Uf(t):new Wf(t,{allowProjection:e!==C.Fragment});function yt(e,t,n){const i=e.getProps();return Oo(i,t,n!==void 0?n:i.custom,e)}const Ui=e=>Array.isArray(e);function qf(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wt(n))}function Xf(e){return Ui(e)?e[e.length-1]||0:e}function Yf(e,t){const n=yt(e,t);let{transitionEnd:i={},transition:o={},...s}=n||{};s={...s,...i};for(const r in s){const a=Xf(s[r]);qf(e,r,a)}}function Zf(e){return!!(ae(e)&&e.add)}function Ki(e,t){const n=e.getValue("willChange");if(Zf(n))return n.add(t);if(!n&&Be.WillChange){const i=new Be.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function fl(e){return e.props[tl]}const Jf=e=>e!==null;function Qf(e,{repeat:t,repeatType:n="loop"},i){const o=e.filter(Jf),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}const eh={type:"spring",stiffness:500,damping:25,restSpeed:10},th=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nh={type:"keyframes",duration:.8},ih={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},oh=(e,{keyframes:t})=>t.length>2?nh:Pt.has(e)?e.startsWith("scale")?th(t[1]):eh:ih;function sh({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:o,repeat:s,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const zo=(e,t,n,i={},o,s)=>r=>{const a=To(i,e)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u=u-Ee(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};sh(a)||Object.assign(c,oh(e,c)),c.duration&&(c.duration=Ee(c.duration)),c.repeatDelay&&(c.repeatDelay=Ee(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Ni(c),c.delay===0&&(d=!0)),(Be.instantAnimations||Be.skipAnimations)&&(d=!0,Ni(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=Qf(c.keyframes,a);if(f!==void 0){J.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Mo(c):new bd(c)};function rh({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function hl(e,t,{delay:n=0,transitionOverride:i,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:r,...a}=t;i&&(s=i);const l=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const c in a){const d=e.getValue(c,e.latestValues[c]??null),f=a[c];if(f===void 0||u&&rh(u,c))continue;const h={delay:n,...To(s||{},c)},m=d.get();if(m!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===m&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const v=fl(e);if(v){const w=window.MotionHandoffAnimation(v,c,J);w!==null&&(h.startTime=w,g=!0)}}Ki(e,c),d.start(zo(c,d,f,e.shouldReduceMotion&&Fa.has(c)?{type:!1}:h,e,g));const y=d.animation;y&&l.push(y)}return r&&Promise.all(l).then(()=>{J.update(()=>{r&&Yf(e,r)})}),l}function gl(e,t,n,i=0,o=1){const s=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),r=e.size,a=(r-1)*i;return typeof n=="function"?n(s,r):o===1?s*i:a-s*i}function qi(e,t,n={}){const i=yt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(hl(e,i,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=o;return ah(e,t,l,u,c,d,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[l,u]=a==="beforeChildren"?[s,r]:[r,s];return l().then(()=>u())}else return Promise.all([s(),r(n.delay)])}function ah(e,t,n=0,i=0,o=0,s=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(qi(l,t,{...r,delay:n+(typeof i=="function"?0:i)+gl(e.variantChildren,l,i,o,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function lh(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const o=t.map(s=>qi(e,s,n));i=Promise.all(o)}else if(typeof t=="string")i=qi(e,t,n);else{const o=typeof t=="function"?yt(e,t,n.custom):t;i=Promise.all(hl(e,o,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}function ml(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const uh=Lo.length;function pl(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?pl(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<uh;n++){const i=Lo[n],o=e.props[i];(Kt(o)||o===!1)&&(t[i]=o)}return t}const ch=[...ko].reverse(),dh=ko.length;function fh(e){return t=>Promise.all(t.map(({animation:n,options:i})=>lh(e,n,i)))}function hh(e){let t=fh(e),n=Os(),i=!0;const o=l=>(u,c)=>{const d=yt(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:h,...m}=d;u={...u,...m,...h}}return u};function s(l){t=l(e)}function r(l){const{props:u}=e,c=pl(e.parent)||{},d=[],f=new Set;let h={},m=1/0;for(let y=0;y<dh;y++){const v=ch[y],w=n[v],p=u[v]!==void 0?u[v]:c[v],b=Kt(p),_=v===l?w.isActive:null;_===!1&&(m=y);let E=p===c[v]&&p!==u[v]&&b;if(E&&i&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...h},!w.isActive&&_===null||!p&&!w.prevProp||jn(p)||typeof p=="boolean")continue;const P=gh(w.prevProp,p);let M=P||v===l&&w.isActive&&!E&&b||y>m&&b,k=!1;const A=Array.isArray(p)?p:[p];let j=A.reduce(o(v),{});_===!1&&(j={});const{prevResolvedValues:U={}}=w,G={...U,...j},D=T=>{M=!0,f.has(T)&&(k=!0,f.delete(T)),w.needsAnimating[T]=!0;const R=e.getValue(T);R&&(R.liveStyle=!1)};for(const T in G){const R=j[T],L=U[T];if(h.hasOwnProperty(T))continue;let V=!1;Ui(R)&&Ui(L)?V=!ml(R,L):V=R!==L,V?R!=null?D(T):f.add(T):R!==void 0&&f.has(T)?D(T):w.protectedKeys[T]=!0}w.prevProp=p,w.prevResolvedValues=j,w.isActive&&(h={...h,...j}),i&&e.blockInitialAnimation&&(M=!1);const H=E&&P;M&&(!H||k)&&d.push(...A.map(T=>{const R={type:v};if(typeof T=="string"&&i&&!H&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,V=yt(L,T);if(L.enteringChildren&&V){const{delayChildren:W}=V.transition||{};R.delay=gl(L.enteringChildren,e,W)}}return{animation:T,options:R}}))}if(f.size){const y={};if(typeof u.initial!="boolean"){const v=yt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(y.transition=v.transition)}f.forEach(v=>{const w=e.getBaseTarget(v),p=e.getValue(v);p&&(p.liveStyle=!0),y[v]=w??null}),d.push({animation:y})}let g=!!d.length;return i&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),i=!1,g?t(d):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Os(),i=!0}}}function gh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ml(t,e):!1}function Ze(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Os(){return{animate:Ze(!0),whileInView:Ze(),whileHover:Ze(),whileTap:Ze(),whileDrag:Ze(),whileFocus:Ze(),exit:Ze()}}class Ye{constructor(t){this.isMounted=!1,this.node=t}update(){}}class mh extends Ye{constructor(t){super(t),t.animationState||(t.animationState=hh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();jn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let ph=0;class vh extends Ye{constructor(){super(...arguments),this.id=ph++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const yh={animation:{Feature:mh},exit:{Feature:vh}};function Xt(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function en(e){return{point:{x:e.pageX,y:e.pageY}}}const xh=e=>t=>Do(t)&&e(t,en(t));function $t(e,t,n,i){return Xt(e,t,xh(n),i)}const vl=1e-4,wh=1-vl,Ch=1+vl,yl=.01,Sh=0-yl,bh=0+yl;function le(e){return e.max-e.min}function _h(e,t,n){return Math.abs(e-t)<=n}function Bs(e,t,n,i=.5){e.origin=i,e.originPoint=ee(t.min,t.max,e.origin),e.scale=le(n)/le(t),e.translate=ee(n.min,n.max,e.origin)-e.originPoint,(e.scale>=wh&&e.scale<=Ch||isNaN(e.scale))&&(e.scale=1),(e.translate>=Sh&&e.translate<=bh||isNaN(e.translate))&&(e.translate=0)}function Ot(e,t,n,i){Bs(e.x,t.x,n.x,i?i.originX:void 0),Bs(e.y,t.y,n.y,i?i.originY:void 0)}function Ns(e,t,n){e.min=n.min+t.min,e.max=e.min+le(t)}function Rh(e,t,n){Ns(e.x,t.x,n.x),Ns(e.y,t.y,n.y)}function zs(e,t,n){e.min=t.min-n.min,e.max=e.min+le(t)}function Bt(e,t,n){zs(e.x,t.x,n.x),zs(e.y,t.y,n.y)}function ye(e){return[e("x"),e("y")]}const xl=({current:e})=>e?e.ownerDocument.defaultView:null,Hs=(e,t)=>Math.abs(e-t);function Eh(e,t){const n=Hs(e.x,t.x),i=Hs(e.y,t.y);return Math.sqrt(n**2+i**2)}class wl{constructor(t,n,{transformPagePoint:i,contextWindow:o=window,dragSnapToOrigin:s=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=li(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=Eh(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:g}=f,{timestamp:y}=se;this.history.push({...g,timestamp:y});const{onStart:v,onMove:w}=this.handlers;h||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ai(h,this.transformPagePoint),J.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=li(f.type==="pointercancel"?this.lastMoveEventInfo:ai(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,v),g&&g(f,v)},!Do(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=r,this.contextWindow=o||window;const a=en(t),l=ai(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=se;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,li(l,this.history)),this.removeListeners=Zt($t(this.contextWindow,"pointermove",this.handlePointerMove),$t(this.contextWindow,"pointerup",this.handlePointerUp),$t(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ue(this.updatePoint)}}function ai(e,t){return t?{point:t(e.point)}:e}function Ws(e,t){return{x:e.x-t.x,y:e.y-t.y}}function li({point:e},t){return{point:e,delta:Ws(e,Cl(t)),offset:Ws(e,Mh(t)),velocity:Ph(t,.1)}}function Mh(e){return e[0]}function Cl(e){return e[e.length-1]}function Ph(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const o=Cl(e);for(;n>=0&&(i=e[n],!(o.timestamp-i.timestamp>Ee(t)));)n--;if(!i)return{x:0,y:0};const s=xe(o.timestamp-i.timestamp);if(s===0)return{x:0,y:0};const r={x:(o.x-i.x)/s,y:(o.y-i.y)/s};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Th(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?ee(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?ee(n,e,i.max):Math.min(e,n)),e}function Gs(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Vh(e,{top:t,left:n,bottom:i,right:o}){return{x:Gs(e.x,n,o),y:Gs(e.y,t,i)}}function Us(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function Ah(e,t){return{x:Us(e.x,t.x),y:Us(e.y,t.y)}}function Dh(e,t){let n=.5;const i=le(e),o=le(t);return o>i?n=Wt(t.min,t.max-i,e.min):i>o&&(n=Wt(e.min,e.max-o,t.min)),$e(0,1,n)}function Fh(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Xi=.35;function kh(e=Xi){return e===!1?e=0:e===!0&&(e=Xi),{x:Ks(e,"left","right"),y:Ks(e,"top","bottom")}}function Ks(e,t,n){return{min:qs(e,t),max:qs(e,n)}}function qs(e,t){return typeof e=="number"?e:e[t]||0}const Lh=new WeakMap;class Ih{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=te(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(en(d).point)},r=(d,f)=>{const{drag:h,dragPropagation:m,onDragStart:g}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Bd(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ye(v=>{let w=this.getAxisMotionValue(v).get()||0;if(Te.test(w)){const{projection:p}=this.visualElement;if(p&&p.layout){const b=p.layout.layoutBox[v];b&&(w=le(b)*(parseFloat(w)/100))}}this.originPoint[v]=w}),g&&J.postRender(()=>g(d,f)),Ki(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:g,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=f;if(m&&this.currentDirection===null){this.currentDirection=jh(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),y&&y(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>ye(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new wl(t,{onSessionStart:s,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:i,contextWindow:xl(this.visualElement)})}stop(t,n){const i=t||this.latestPointerEvent,o=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!o||!i)return;const{velocity:r}=o;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&J.postRender(()=>a(i,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,i){const{drag:o}=this.getProps();if(!i||!un(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let r=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(r=Th(r,this.constraints[t],this.elastic[t])),s.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&ht(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=Vh(i.layoutBox,t):this.constraints=!1,this.elastic=kh(n),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&ye(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=Fh(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ht(t))return!1;const i=t.current;Oe(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=$f(i,o.root,this.visualElement.getTransformPagePoint());let r=Ah(o.layout.layoutBox,s);if(n){const a=n(Lf(r));this.hasMutatedConstraints=!!a,a&&(r=ol(a))}return r}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:o,dragTransition:s,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=ye(c=>{if(!un(c,n,this.currentDirection))return;let d=l&&l[c]||{};r&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,m={type:"inertia",velocity:i?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return Ki(this.visualElement,t),i.start(zo(t,i,0,n,this.visualElement,!1))}stopAnimation(){ye(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ye(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),o=i[n];return o||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){ye(n=>{const{drag:i}=this.getProps();if(!un(n,i,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:r,max:a}=o.layout.layoutBox[n];s.set(t[n]-ee(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!ht(n)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ye(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();o[r]=Dh({min:l,max:l},this.constraints[r])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),ye(r=>{if(!un(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(ee(l,u,o[r]))})}addListeners(){if(!this.visualElement.current)return;Lh.set(this.visualElement,this);const t=this.visualElement.current,n=$t(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();ht(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),J.read(i);const r=Xt(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ye(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())}));return()=>{r(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:r=Xi,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:o,dragConstraints:s,dragElastic:r,dragMomentum:a}}}function un(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function jh(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class $h extends Ye{constructor(t){super(t),this.removeGroupControls=we,this.removeListeners=we,this.controls=new Ih(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||we}unmount(){this.removeGroupControls(),this.removeListeners()}}const Xs=e=>(t,n)=>{e&&J.postRender(()=>e(t,n))};class Oh extends Ye{constructor(){super(...arguments),this.removePointerDownListener=we}onPointerDown(t){this.session=new wl(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:xl(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:o}=this.node.getProps();return{onSessionStart:Xs(t),onStart:Xs(n),onMove:i,onEnd:(s,r)=>{delete this.session,o&&J.postRender(()=>o(s,r))}}}mount(){this.removePointerDownListener=$t(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const xn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ys(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Dt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(N.test(e))e=parseFloat(e);else return e;const n=Ys(e,t.target.x),i=Ys(e,t.target.y);return`${n}% ${i}%`}},Bh={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,o=Ke.parse(e);if(o.length>5)return i;const s=Ke.createTransformer(e),r=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+r]/=a,o[1+r]/=l;const u=ee(a,l,.5);return typeof o[2+r]=="number"&&(o[2+r]/=u),typeof o[3+r]=="number"&&(o[3+r]/=u),s(o)}};let ui=!1;class Nh extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:o}=this.props,{projection:s}=t;uf(zh),s&&(n.group&&n.group.add(s),i&&i.register&&o&&i.register(s),ui&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),xn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:o,isPresent:s}=this.props,{projection:r}=i;return r&&(r.isPresent=s,ui=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?r.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?r.promote():r.relegate()||J.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ao.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:o}=t;ui=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),i&&i.deregister&&i.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Sl(e){const[t,n]=Wa(),i=C.useContext(lo);return x.jsx(Nh,{...e,layoutGroup:i,switchLayoutGroup:C.useContext(nl),isPresent:t,safeToRemove:n})}const zh={borderRadius:{...Dt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Dt,borderTopRightRadius:Dt,borderBottomLeftRadius:Dt,borderBottomRightRadius:Dt,boxShadow:Bh};function Hh(e,t,n){const i=ae(e)?e:wt(e);return i.start(zo("",i,t,n)),i.animation}const Wh=(e,t)=>e.depth-t.depth;class Gh{constructor(){this.children=[],this.isDirty=!1}add(t){fo(this.children,t),this.isDirty=!0}remove(t){ho(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Wh),this.isDirty=!1,this.children.forEach(t)}}function Uh(e,t){const n=ce.now(),i=({timestamp:o})=>{const s=o-n;s>=t&&(Ue(i),e(s-t))};return J.setup(i,!0),()=>Ue(i)}const bl=["TopLeft","TopRight","BottomLeft","BottomRight"],Kh=bl.length,Zs=e=>typeof e=="string"?parseFloat(e):e,Js=e=>typeof e=="number"||N.test(e);function qh(e,t,n,i,o,s){o?(e.opacity=ee(0,n.opacity??1,Xh(i)),e.opacityExit=ee(t.opacity??1,0,Yh(i))):s&&(e.opacity=ee(t.opacity??1,n.opacity??1,i));for(let r=0;r<Kh;r++){const a=`border${bl[r]}Radius`;let l=Qs(t,a),u=Qs(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Js(l)===Js(u)?(e[a]=Math.max(ee(Zs(l),Zs(u),i),0),(Te.test(u)||Te.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=ee(t.rotate||0,n.rotate||0,i))}function Qs(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Xh=_l(0,.5,ca),Yh=_l(.5,.95,we);function _l(e,t,n){return i=>i<e?0:i>t?1:n(Wt(e,t,i))}function er(e,t){e.min=t.min,e.max=t.max}function pe(e,t){er(e.x,t.x),er(e.y,t.y)}function tr(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function nr(e,t,n,i,o){return e-=t,e=Mn(e,1/n,i),o!==void 0&&(e=Mn(e,1/o,i)),e}function Zh(e,t=0,n=1,i=.5,o,s=e,r=e){if(Te.test(t)&&(t=parseFloat(t),t=ee(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=ee(s.min,s.max,i);e===s&&(a-=t),e.min=nr(e.min,t,n,a,o),e.max=nr(e.max,t,n,a,o)}function ir(e,t,[n,i,o],s,r){Zh(e,t[n],t[i],t[o],t.scale,s,r)}const Jh=["x","scaleX","originX"],Qh=["y","scaleY","originY"];function or(e,t,n,i){ir(e.x,t,Jh,n?n.x:void 0,i?i.x:void 0),ir(e.y,t,Qh,n?n.y:void 0,i?i.y:void 0)}function sr(e){return e.translate===0&&e.scale===1}function Rl(e){return sr(e.x)&&sr(e.y)}function rr(e,t){return e.min===t.min&&e.max===t.max}function eg(e,t){return rr(e.x,t.x)&&rr(e.y,t.y)}function ar(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function El(e,t){return ar(e.x,t.x)&&ar(e.y,t.y)}function lr(e){return le(e.x)/le(e.y)}function ur(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class tg{constructor(){this.members=[]}add(t){fo(this.members,t),t.scheduleRender()}remove(t){if(ho(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let i;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){i=s;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ng(e,t,n){let i="";const o=e.x.translate/t.x,s=e.y.translate/t.y,r=n?.z||0;if((o||s||r)&&(i=`translate3d(${o}px, ${s}px, ${r}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:h,skewY:m}=n;u&&(i=`perspective(${u}px) ${i}`),c&&(i+=`rotate(${c}deg) `),d&&(i+=`rotateX(${d}deg) `),f&&(i+=`rotateY(${f}deg) `),h&&(i+=`skewX(${h}deg) `),m&&(i+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}const ci=["","X","Y","Z"],ig=1e3;let og=0;function di(e,t,n,i){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Ml(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=fl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",J,!(o||s))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Ml(i)}function Pl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(r={},a=t?.()){this.id=og++,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.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ag),this.nodes.forEach(dg),this.nodes.forEach(fg),this.nodes.forEach(lg)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Gh)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new mo),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Ha(r)&&!Ud(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,d=0;const f=()=>this.root.updateBlockedByResize=!1;J.read(()=>{d=window.innerWidth}),e(r,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,c&&c(),c=Uh(f,250),xn.hasAnimatedSinceResize&&(xn.hasAnimatedSinceResize=!1,this.nodes.forEach(fr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||vg,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!El(this.targetLayout,h),w=!d&&f;if(this.options.layoutRoot||this.resumeFrom||w||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const p={...To(m,"layout"),onPlay:g,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(p.delay=0,p.type=!1),this.startAnimation(p),this.setAnimationOrigin(c,w)}else d||fr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ue(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(hg),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ml(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(cr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(dr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(cg),this.nodes.forEach(sg),this.nodes.forEach(rg)):this.nodes.forEach(dr),this.clearAllSnapshots();const a=ce.now();se.delta=$e(0,1e3/60,a-se.timestamp),se.timestamp=a,se.isProcessing=!0,Qn.update.process(se),Qn.preRender.process(se),Qn.render.process(se),se.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ao.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ug),this.sharedNodes.forEach(gg)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,J.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){J.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!le(this.snapshot.measuredBox.x)&&!le(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=te(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=i(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Rl(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Je(this.latestValues)||c)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),yg(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return te();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(xg))){const{scroll:u}=this.root;u&&(gt(a.x,u.offset.x),gt(a.y,u.offset.y))}return a}removeElementScroll(r){const a=te();if(pe(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:d}=u;u!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&pe(a,r),gt(a.x,c.offset.x),gt(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=te();pe(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&mt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Je(c.latestValues)&&mt(l,c.latestValues)}return Je(this.latestValues)&&mt(l,this.latestValues),l}removeTransform(r){const a=te();pe(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Je(u.latestValues))continue;Hi(u.latestValues)&&u.updateSnapshot();const c=te(),d=u.measurePageBox();pe(c,d),or(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Je(this.latestValues)&&or(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}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!==se.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=se.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=te(),this.relativeTargetOrigin=te(),Bt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),pe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=te(),this.targetWithTransforms=te()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Rh(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):pe(this.target,this.layout.layoutBox),rl(this.target,this.targetDelta)):pe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=te(),this.relativeTargetOrigin=te(),Bt(this.relativeTargetOrigin,this.target,f.target),pe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Hi(this.parent.latestValues)||sl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===se.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;pe(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;jf(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=te());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(tr(this.prevProjectionDelta.x,this.projectionDelta.x),tr(this.prevProjectionDelta.y,this.projectionDelta.y)),Ot(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!ur(this.projectionDelta.x,this.prevProjectionDelta.x)||!ur(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=pt(),this.projectionDelta=pt(),this.projectionDeltaWithTransform=pt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=pt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=te(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=h!==m,y=this.getStack(),v=!y||y.members.length<=1,w=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(pg));this.animationProgress=0;let p;this.mixTargetDelta=b=>{const _=b/1e3;hr(d.x,r.x,_),hr(d.y,r.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Bt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mg(this.relativeTarget,this.relativeTargetOrigin,f,_),p&&eg(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||(p=te()),pe(p,this.relativeTarget)),g&&(this.animationValues=c,qh(c,u,this.latestValues,_,w,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ue(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=J.update(()=>{xn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=wt(0)),this.currentAnimation=Hh(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ig),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&Tl(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||te();const d=le(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const f=le(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}pe(a,l),mt(a,c),Ot(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new tg),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&di("z",r,u,this.animationValues);for(let c=0;c<ci.length;c++)di(`rotate${ci[c]}`,r,u,this.animationValues),di(`skew${ci[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=yn(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=yn(a?.pointerEvents)||""),this.hasProjected&&!Je(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=ng(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),r.transform=d;const{x:f,y:h}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in qt){if(c[m]===void 0)continue;const{correct:g,applyTo:y,isCSSVariable:v}=qt[m],w=d==="none"?c[m]:g(c[m],u);if(y){const p=y.length;for(let b=0;b<p;b++)r[y[b]]=w}else v?this.options.visualElement.renderState.vars[m]=w:r[m]=w}this.options.layoutId&&(r.pointerEvents=u===this?yn(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(cr),this.root.sharedNodes.clear()}}}function sg(e){e.updateLayout()}function rg(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:o}=e.options,s=t.source!==e.layout.source;o==="size"?ye(c=>{const d=s?t.measuredBox[c]:t.layoutBox[c],f=le(d);d.min=n[c].min,d.max=d.min+f}):Tl(o,t.layoutBox,n)&&ye(c=>{const d=s?t.measuredBox[c]:t.layoutBox[c],f=le(n[c]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});const r=pt();Ot(r,n,t.layoutBox);const a=pt();s?Ot(a,e.applyTransform(i,!0),t.measuredBox):Ot(a,n,t.layoutBox);const l=!Rl(r);let u=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:f}=c;if(d&&f){const h=te();Bt(h,t.layoutBox,d.layoutBox);const m=te();Bt(m,n,f.layoutBox),El(h,m)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=h,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function ag(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function lg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ug(e){e.clearSnapshot()}function cr(e){e.clearMeasurements()}function dr(e){e.isLayoutDirty=!1}function cg(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function fr(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function dg(e){e.resolveTargetDelta()}function fg(e){e.calcProjection()}function hg(e){e.resetSkewAndRotation()}function gg(e){e.removeLeadSnapshot()}function hr(e,t,n){e.translate=ee(t.translate,0,n),e.scale=ee(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function gr(e,t,n,i){e.min=ee(t.min,n.min,i),e.max=ee(t.max,n.max,i)}function mg(e,t,n,i){gr(e.x,t.x,n.x,i),gr(e.y,t.y,n.y,i)}function pg(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const vg={duration:.45,ease:[.4,0,.1,1]},mr=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),pr=mr("applewebkit/")&&!mr("chrome/")?Math.round:we;function vr(e){e.min=pr(e.min),e.max=pr(e.max)}function yg(e){vr(e.x),vr(e.y)}function Tl(e,t,n){return e==="position"||e==="preserve-aspect"&&!_h(lr(t),lr(n),.2)}function xg(e){return e!==e.root&&e.scroll?.wasRoot}const wg=Pl({attachResizeListener:(e,t)=>Xt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),fi={current:void 0},Vl=Pl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fi.current){const e=new wg({});e.mount(window),e.setOptions({layoutScroll:!0}),fi.current=e}return fi.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Cg={pan:{Feature:Oh},drag:{Feature:$h,ProjectionNode:Vl,MeasureLayout:Sl}};function yr(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=i[o];s&&J.postRender(()=>s(t,en(t)))}class Sg extends Ye{mount(){const{current:t}=this.node;t&&(this.unmount=Nd(t,(n,i)=>(yr(this.node,i,"Start"),o=>yr(this.node,o,"End"))))}unmount(){}}class bg extends Ye{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=Zt(Xt(this.node.current,"focus",()=>this.onFocus()),Xt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function xr(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=i[o];s&&J.postRender(()=>s(t,en(t)))}class _g extends Ye{mount(){const{current:t}=this.node;t&&(this.unmount=Gd(t,(n,i)=>(xr(this.node,i,"Start"),(o,{success:s})=>xr(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Yi=new WeakMap,hi=new WeakMap,Rg=e=>{const t=Yi.get(e.target);t&&t(e)},Eg=e=>{e.forEach(Rg)};function Mg({root:e,...t}){const n=e||document;hi.has(n)||hi.set(n,{});const i=hi.get(n),o=JSON.stringify(t);return i[o]||(i[o]=new IntersectionObserver(Eg,{root:e,...t})),i[o]}function Pg(e,t,n){const i=Mg(t);return Yi.set(e,n),i.observe(e),()=>{Yi.delete(e),i.unobserve(e)}}const Tg={some:0,all:1};class Vg extends Ye{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:o="some",once:s}=t,r={root:n?n.current:void 0,rootMargin:i,threshold:typeof o=="number"?o:Tg[o]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return Pg(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Ag(t,n))&&this.startObserver()}unmount(){}}function Ag({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Dg={inView:{Feature:Vg},tap:{Feature:_g},focus:{Feature:bg},hover:{Feature:Sg}},Fg={layout:{ProjectionNode:Vl,MeasureLayout:Sl}},kg={...yh,...Dg,...Cg,...Fg},Ho=kf(kg,Kf),Lg="_primary_13825_8",Ig="_secondary_13825_12",jg="_tertiary_13825_16",$g="_positive_13825_20",Og="_negative_13825_24",Bg="_warning_13825_28",Ng="_accent_13825_32",zg="_inverse_13825_36",Hg="_text_13825_111",Wg="_regular_13825_117",Gg="_medium_13825_121",Ug="_semibold_13825_125",Kg="_bold_13825_129",cn={primary:Lg,secondary:Ig,tertiary:jg,positive:$g,negative:Og,warning:Bg,accent:Ng,inverse:zg,"title-1":"_title-1_13825_41","title-2":"_title-2_13825_51","title-3":"_title-3_13825_61","headline-1":"_headline-1_13825_76","headline-2":"_headline-2_13825_81","headline-3":"_headline-3_13825_86","body-1":"_body-1_13825_91","body-2":"_body-2_13825_96","caption-1":"_caption-1_13825_101","caption-2":"_caption-2_13825_106",text:Hg,regular:Wg,medium:Gg,semibold:Ug,bold:Kg},qg=e=>{let t;e.center?t="center":e.left?t="left":e.right&&(t="right");let n;return e.uppercase?n="uppercase":e.lowercase?n="lowercase":e.capitalize&&(n="capitalize"),F.css({marginTop:e.mt,marginBottom:e.mb,marginRight:e.mr,marginLeft:e.ml,flex:e.flex,cursor:e.cursor,wordBreak:e.wordBreak,whiteSpace:e.whiteSpace,textOverflow:e.textOverflow,textDecoration:e.decoration,textAlign:t,textTransform:n,color:e.color,opacity:e.disabled?.5:void 0,overflow:e.overflow})},q=C.forwardRef(({children:e,className:t,variant:n="body-1",fontWeight:i="medium",tag:o="p",colorName:s="primary",style:r,clickOpacity:a=.5,opacityDuration:l=200,onClick:u,disabled:c,mt:d,mb:f,ml:h,mr:m,flex:g,cursor:y,wordBreak:v,whiteSpace:w,textOverflow:p,decoration:b,color:_,center:E,left:P,right:M,uppercase:k,lowercase:A,capitalize:j,overflow:U,...G},D)=>{const[H,z]=C.useState(!1),T=!!u,R=()=>T&&z(!0),L=()=>T&&z(!1),V=qg({mt:d,mb:f,ml:h,mr:m,flex:g,cursor:y,wordBreak:v,whiteSpace:w,textOverflow:p,decoration:b,color:_,center:E,left:P,right:M,uppercase:k,lowercase:A,capitalize:j,overflow:U}),W=o,$=T?F.css({opacity:H?a:1,transition:`opacity ${l}ms ease`}):"";return x.jsx(W,{ref:D,...G,className:F.cx(cn.text,cn[n],cn[s],cn[i],$,t,V),style:r,onClick:u,onMouseDown:R,onMouseUp:L,onMouseLeave:L,onTouchStart:R,onTouchEnd:L,role:T?"button":void 0,tabIndex:T?0:void 0,children:e})});q.displayName="Text";const Pn=Ho(q),Xg=F.css({display:"flex",alignItems:"center",justifyContent:"center",position:"relative",borderRadius:16,height:48,padding:"0 16px",cursor:"pointer",fontSize:16,fontWeight:600,overflow:"hidden",transition:"all 0.2s ease",gap:8}),Ft={zero:"var(--corner-zero)",xs:"var(--corner-xs)",sm:"var(--corner-sm)",md:"var(--corner-md)",lg:"var(--corner-lg)",xl:"var(--corner-xl)","2xl":"var(--corner-2xl)","3xl":"var(--corner-3xl)","4xl":"var(--corner-4xl)","5xl":"var(--corner-5xl)","6xl":"var(--corner-6xl)","full-round":"var(--corner-full-round)"},Yg={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},Zg={clear:F.css({backgroundColor:"transparent",border:"none"}),filled:F.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:F.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},Jg=(e,t,n,i)=>{if(i)return F.css({cursor:"not-allowed",opacity:.7});const o={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:e==="filled"?"var(--text-inverse)":`var(--text-${t})`};switch(e){case"filled":return F.css({...o,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return F.css({...o,backgroundColor:"transparent",border:`1px solid var(--border-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});case"clear":return F.css({...o,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return F.css(o)}},Qg=({disabled:e,loading:t,onClick:n,wrapperClassName:i,buttonClassName:o,buttonDisabledClassName:s,textClassName:r,children:a,variant:l="filled",backgroundColor:u,textColor:c,textFontWeight:d,borderColor:f,color:h="accent",borderRadius:m,width:g="full",size:y="md",iconLeft:v,iconRight:w,intensity:p="primary",flex:b,type:_="button",...E})=>{const P=C.useMemo(()=>{switch(g){case"full":return"100%";case"auto":return"auto";default:return g}},[g]),M=C.useMemo(()=>u||(l==="filled"?h==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${h}-${p})`:"transparent"),[l,u,h,p]),k=C.useMemo(()=>{if(p==="primary"){if(h==="neutral")return"var(--text-secondary)";if(l==="filled")return"var(--text-inverse)"}else if(h==="neutral")return"var(--text-secondary)";return`var(--text-${h})`},[p,h,l]),A=C.useMemo(()=>{if(p==="primary"){if(h==="neutral")return"secondary";if(l==="filled")return"inverse"}else if(h==="neutral")return"secondary";return h},[l,h,p]),j=C.useMemo(()=>f||(l==="outline"?`var(--border-${h}-${p})`:"transparent"),[l,f,h,p]),U=C.useMemo(()=>{switch(y){case"lg":return Ft.lg;case"md":case"sm":return Ft.md;case"xs":return Ft.sm;default:return Ft.md}},[y]),G=F.cx(Xg,Jg(l,h,p,e),Zg[l],o,e?s:void 0,F.css({borderRadius:m?Ft[m]:U,backgroundColor:M,borderColor:j,color:c,width:"100%",height:Yg[y],opacity:e?.7:1})),D=C.useMemo(()=>{switch(y){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[y]);return x.jsx(I,{className:F.cx(i),w:P,flex:b,relative:!0,overflow:"hidden",children:x.jsxs(Ho.button,{whileTap:!e&&!t?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},className:G,disabled:e||t,onClick:n,type:_,...E,children:[t?x.jsx(vu,{color:k}):x.jsxs(x.Fragment,{children:[v,x.jsx(Pn,{style:{color:c},colorName:A,variant:D,className:r,textOverflow:"ellipsis",overflow:"hidden",children:a}),w]}),x.jsx(_t,{})]})})},em=e=>S.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",...e},S.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),tm=e=>S.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},S.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),nm="_checkbox_22ifd_8",im="_disabled_22ifd_14",om="_checkbox__ripple_22ifd_14",sm="_checkbox__input_22ifd_26",rm="_checkbox__box_22ifd_33",am="_secondary_22ifd_46",lm="_checked_22ifd_52",um="_error_22ifd_61",ke={checkbox:nm,disabled:im,checkbox__ripple:om,checkbox__input:sm,checkbox__box:rm,secondary:am,checked:lm,error:um},cm={sm:20,md:24},Wo=C.forwardRef(({checked:e,onChange:t,disabled:n,error:i,indeterminate:o,size:s="md",title:r,titleColor:a,subtitle:l,subtitleColor:u="secondary",name:c,required:d,variant:f="primary",flex:h,readOnly:m},g)=>{const[y,v]=C.useState(!1),w=e!==void 0,p=w?e:y,b=k=>{w||v(k.target.checked),t?.(k)},_=cm[s],E=p||o,P=!!m&&!n,M=n?"not-allowed":P?"auto":"pointer";return x.jsxs("label",{className:F.cx(ke.checkbox,F.css({flex:h,cursor:M}),{[ke.disabled]:n}),children:[x.jsxs(I,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${_}px`,"--checkbox-size-double":`${_*2}px`},children:[x.jsx("input",{ref:g,type:"checkbox",checked:p,onChange:P?void 0:b,onClick:k=>k.stopPropagation(),disabled:n,readOnly:P,name:c,required:d,className:F.cx(ke.checkbox__input,{[ke.disabled]:n},F.css({cursor:M}))}),x.jsx("div",{className:F.cx(ke.checkbox__box,ke[f],{[ke.disabled]:n,[ke.error]:i,[ke.checked]:E}),children:E&&(o?x.jsx(tm,{width:_*.75,height:_*.75}):x.jsx(em,{width:_*.75,height:_*.75}))})]}),(r||l)&&x.jsxs(I,{gap:4,children:[r&&x.jsx(q,{colorName:a,variant:s==="sm"?"body-2":"body-1",children:r}),l&&x.jsx(q,{variant:"body-2",colorName:u,children:l})]})]})});Wo.displayName="Checkbox";const dm=e=>S.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("g",{opacity:.5},S.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0002 17.9999C14.4185 17.9999 18.0002 14.4182 18.0002 9.99991C18.0002 5.58163 14.4185 1.99991 10.0002 1.99991C5.58197 1.99991 2.00024 5.58163 2.00024 9.99991C2.00024 14.4182 5.58197 17.9999 10.0002 17.9999ZM6.46514 6.46446C6.85566 6.07393 7.48883 6.07393 7.87935 6.46446L9.64712 8.23222C9.84238 8.42749 10.159 8.42749 10.3542 8.23222L12.122 6.46446C12.5125 6.07393 13.1457 6.07393 13.5362 6.46446C13.9267 6.85498 13.9267 7.48814 13.5362 7.87867L11.7684 9.64644C11.5732 9.8417 11.5732 10.1583 11.7684 10.3535L13.5362 12.1213C13.9267 12.5118 13.9267 13.145 13.5362 13.5355C13.1457 13.926 12.5125 13.926 12.122 13.5355L10.3542 11.7678C10.159 11.5725 9.84238 11.5725 9.64712 11.7678L7.87935 13.5355C7.48883 13.926 6.85566 13.926 6.46514 13.5355C6.07462 13.145 6.07462 12.5118 6.46514 12.1213L8.23291 10.3535C8.42817 10.1583 8.42817 9.8417 8.23291 9.64644L6.46514 7.87867C6.07462 7.48815 6.07462 6.85498 6.46514 6.46446Z",fill:"currentColor"}))),fm="_disabled_ph9zm_20",hm="_multiline_ph9zm_24",gm="_input_ph9zm_8",mm="_sm_ph9zm_74",pm="_md_ph9zm_79",vm="_error_ph9zm_84",ym="_white_ph9zm_88",xm="_gray_ph9zm_92",ue={"input-container":"_input-container_ph9zm_8",disabled:fm,multiline:hm,input:gm,"input-text-size_sm":"_input-text-size_sm_ph9zm_55","input-text-size_md":"_input-text-size_md_ph9zm_59","input-text-align_left":"_input-text-align_left_ph9zm_64","input-text-align_center":"_input-text-align_center_ph9zm_67","input-text-align_right":"_input-text-align_right_ph9zm_70",sm:mm,md:pm,error:vm,white:ym,gray:xm,"clear-button":"_clear-button_ph9zm_96"};function wr(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const Al=C.forwardRef((e,t)=>{const{label:n,prompt:i,error:o,errorText:s,size:r="md",prefix:a,suffix:l,background:u="white",showClearButton:c,disabled:d,value:f,defaultValue:h,inputClassName:m,textAlign:g="left",...y}=e,v=e.multiline===!0,w=C.useRef(null),p=C.useRef(null),[b,_]=Fn(typeof f=="string"||typeof f=="number"?String(f):void 0,h==="string"||h==="number"?String(h):"");C.useImperativeHandle(t,()=>({focus:()=>{w.current?.focus(),p.current?.focus()},blur:()=>{w.current?.blur(),p.current?.blur()},get value(){return w.current?.value||p.current?.value}}));const E=k=>{if(_(k.target.value),v){const A=e.onChange;A?.(k)}else{const A=e.onChange;A?.(k)}};C.useEffect(()=>{v&&e.autoResize&&p.current&&(p.current.style.height="auto",p.current.style.height=`${p.current.scrollHeight}px`)},[b,v,e.autoResize]);const P=()=>{if(_(""),!v){const A=w.current;if(A){A.value="";const j=wr(A),U=e.onChange;U?.(j)}return}const k=p.current;if(k){k.value="";const A=wr(k),j=e.onChange;j?.(A)}},M=()=>{if(v){const{rows:U,autoResize:G,onChange:D,multiline:H,...z}=y;return x.jsx("textarea",{ref:p,rows:e.rows??3,className:F.cx(ue.input,m,{[ue.disabled]:d,[ue[`input-text-align_${g}`]]:!!g}),disabled:d,maxLength:e.maxLength,...z,value:b,onChange:E})}const{onChange:k,multiline:A,...j}=y;return x.jsx("input",{...j,ref:w,className:F.cx(ue.input,ue[`input-text-size_${r}`],m,{[ue.disabled]:d,[ue[`input-text-align_${g}`]]:!!g}),disabled:d,type:e.type??"text",value:b,onChange:E})};return x.jsxs(I,{w:"full",gap:"var(--spacing-sm)",children:[n&&x.jsx(q,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}),x.jsxs(I,{row:!0,alignItems:v?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:F.cx(ue["input-container"],ue[u],ue[r],{[ue.error]:o,[ue.disabled]:d,[ue.multiline]:v}),children:[a&&x.jsx(I,{flex:"none",children:a}),x.jsx(I,{flex:"1",children:M()}),c&&b&&!d&&x.jsx(I,{flex:"none",children:x.jsx("span",{className:ue["clear-button"],onClick:P,children:x.jsx(dm,{})})}),l&&x.jsx(I,{flex:"none",children:l})]}),(i||v)&&x.jsxs(I,{row:!0,gap:10,w:"full",children:[typeof i=="string"?x.jsx(q,{variant:"caption-1",colorName:"tertiary",children:i}):i,v&&e.maxLength&&x.jsx(q,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${b.length}/${e.maxLength}`})]}),s&&o&&x.jsx(q,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:s})]})});Al.displayName="Input";function On(){return typeof window<"u"}function Tt(e){return Dl(e)?(e.nodeName||"").toLowerCase():"#document"}function ge(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ae(e){var t;return(t=(Dl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Dl(e){return On()?e instanceof Node||e instanceof ge(e).Node:!1}function Z(e){return On()?e instanceof Element||e instanceof ge(e).Element:!1}function de(e){return On()?e instanceof HTMLElement||e instanceof ge(e).HTMLElement:!1}function Zi(e){return!On()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ge(e).ShadowRoot}const wm=new Set(["inline","contents"]);function tn(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=Ce(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!wm.has(o)}const Cm=new Set(["table","td","th"]);function Sm(e){return Cm.has(Tt(e))}const bm=[":popover-open",":modal"];function Bn(e){return bm.some(t=>{try{return e.matches(t)}catch{return!1}})}const _m=["transform","translate","scale","rotate","perspective"],Rm=["transform","translate","scale","rotate","perspective","filter"],Em=["paint","layout","strict","content"];function Go(e){const t=Nn(),n=Z(e)?Ce(e):e;return _m.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Rm.some(i=>(n.willChange||"").includes(i))||Em.some(i=>(n.contain||"").includes(i))}function Mm(e){let t=Ne(e);for(;de(t)&&!je(t);){if(Go(t))return t;if(Bn(t))return null;t=Ne(t)}return null}function Nn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Pm=new Set(["html","body","#document"]);function je(e){return Pm.has(Tt(e))}function Ce(e){return ge(e).getComputedStyle(e)}function zn(e){return Z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ne(e){if(Tt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zi(e)&&e.host||Ae(e);return Zi(t)?t.host:t}function Fl(e){const t=Ne(e);return je(t)?e.ownerDocument?e.ownerDocument.body:e.body:de(t)&&tn(t)?t:Fl(t)}function Ge(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Fl(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),r=ge(o);if(s){const a=Ji(r);return t.concat(r,r.visualViewport||[],tn(o)?o:[],a&&n?Ge(a):[])}return t.concat(o,Ge(o,[],n))}function Ji(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const St=Math.min,he=Math.max,Tn=Math.round,dn=Math.floor,Ve=e=>({x:e,y:e}),Tm={left:"right",right:"left",bottom:"top",top:"bottom"},Vm={start:"end",end:"start"};function Cr(e,t,n){return he(e,St(t,n))}function nn(e,t){return typeof e=="function"?e(t):e}function qe(e){return e.split("-")[0]}function on(e){return e.split("-")[1]}function kl(e){return e==="x"?"y":"x"}function Ll(e){return e==="y"?"height":"width"}const Am=new Set(["top","bottom"]);function Ie(e){return Am.has(qe(e))?"y":"x"}function Il(e){return kl(Ie(e))}function Dm(e,t,n){n===void 0&&(n=!1);const i=on(e),o=Il(e),s=Ll(o);let r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Vn(r)),[r,Vn(r)]}function Fm(e){const t=Vn(e);return[Qi(e),t,Qi(t)]}function Qi(e){return e.replace(/start|end/g,t=>Vm[t])}const Sr=["left","right"],br=["right","left"],km=["top","bottom"],Lm=["bottom","top"];function Im(e,t,n){switch(e){case"top":case"bottom":return n?t?br:Sr:t?Sr:br;case"left":case"right":return t?km:Lm;default:return[]}}function jm(e,t,n,i){const o=on(e);let s=Im(qe(e),n==="start",i);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(Qi)))),s}function Vn(e){return e.replace(/left|right|bottom|top/g,t=>Tm[t])}function $m(e){return{top:0,right:0,bottom:0,left:0,...e}}function Om(e){return typeof e!="number"?$m(e):{top:e,right:e,bottom:e,left:e}}function An(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}const _r="data-floating-ui-focusable",Bm="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function eo(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Zi(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function kt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function gi(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Nm(e){return e.matches("html,body")}function vt(e){return e?.ownerDocument||document}function zm(e){return de(e)&&e.matches(Bm)}function Hm(e){return e?e.hasAttribute(_r)?e:e.querySelector("["+_r+"]")||e:null}function wn(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var s;return o.parentId===t&&(!n||((s=o.context)==null?void 0:s.open))}).flatMap(o=>[o,...wn(e,o.id,n)])}function Wm(e){return"nativeEvent"in e}function Yt(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var Gm=typeof document<"u",Um=function(){},bt=Gm?C.useLayoutEffect:Um;const Km={...S};function fn(e){const t=S.useRef(e);return bt(()=>{t.current=e}),t}const qm=Km.useInsertionEffect,Xm=qm||(e=>e());function Pe(e){const t=S.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Xm(()=>{t.current=e}),S.useCallback(function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return t.current==null?void 0:t.current(...i)},[])}function Rr(e,t,n){let{reference:i,floating:o}=e;const s=Ie(t),r=Il(t),a=Ll(r),l=qe(t),u=s==="y",c=i.x+i.width/2-o.width/2,d=i.y+i.height/2-o.height/2,f=i[a]/2-o[a]/2;let h;switch(l){case"top":h={x:c,y:i.y-o.height};break;case"bottom":h={x:c,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:d};break;case"left":h={x:i.x-o.width,y:d};break;default:h={x:i.x,y:i.y}}switch(on(t)){case"start":h[r]-=f*(n&&u?-1:1);break;case"end":h[r]+=f*(n&&u?-1:1);break}return h}const Ym=async(e,t,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=n,a=s.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let u=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=Rr(u,i,l),f=i,h={},m=0;for(let g=0;g<a.length;g++){const{name:y,fn:v}=a[g],{x:w,y:p,data:b,reset:_}=await v({x:c,y:d,initialPlacement:i,placement:f,strategy:o,middlewareData:h,rects:u,platform:r,elements:{reference:e,floating:t}});c=w??c,d=p??d,h={...h,[y]:{...h[y],...b}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(u=_.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:c,y:d}=Rr(u,f,l)),g=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:h}};async function Uo(e,t){var n;t===void 0&&(t={});const{x:i,y:o,platform:s,rects:r,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=nn(t,e),m=Om(h),y=a[f?d==="floating"?"reference":"floating":d],v=An(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),w=d==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,p=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(p))?await(s.getScale==null?void 0:s.getScale(p))||{x:1,y:1}:{x:1,y:1},_=An(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:p,strategy:l}):w);return{top:(v.top-_.top+m.top)/b.y,bottom:(_.bottom-v.bottom+m.bottom)/b.y,left:(v.left-_.left+m.left)/b.x,right:(_.right-v.right+m.right)/b.x}}const Zm=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=nn(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=qe(o),w=Ie(a),p=qe(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=f||(p||!g?[Vn(a)]:Fm(a)),E=m!=="none";!f&&E&&_.push(...jm(a,g,m,b));const P=[a,..._],M=await Uo(t,y),k=[];let A=((i=s.flip)==null?void 0:i.overflows)||[];if(c&&k.push(M[v]),d){const D=Dm(o,r,b);k.push(M[D[0]],M[D[1]])}if(A=[...A,{placement:o,overflows:k}],!k.every(D=>D<=0)){var j,U;const D=(((j=s.flip)==null?void 0:j.index)||0)+1,H=P[D];if(H&&(!(d==="alignment"?w!==Ie(H):!1)||A.every(R=>Ie(R.placement)===w?R.overflows[0]>0:!0)))return{data:{index:D,overflows:A},reset:{placement:H}};let z=(U=A.filter(T=>T.overflows[0]<=0).sort((T,R)=>T.overflows[1]-R.overflows[1])[0])==null?void 0:U.placement;if(!z)switch(h){case"bestFit":{var G;const T=(G=A.filter(R=>{if(E){const L=Ie(R.placement);return L===w||L==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(L=>L>0).reduce((L,V)=>L+V,0)]).sort((R,L)=>R[1]-L[1])[0])==null?void 0:G[0];T&&(z=T);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}},Jm=new Set(["left","top"]);async function Qm(e,t){const{placement:n,platform:i,elements:o}=e,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=qe(n),a=on(n),l=Ie(n)==="y",u=Jm.has(r)?-1:1,c=s&&l?-1:1,d=nn(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const ep=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:o,y:s,placement:r,middlewareData:a}=t,l=await Qm(t,e);return r===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:r}}}}},tp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:o}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:a={fn:y=>{let{x:v,y:w}=y;return{x:v,y:w}}},...l}=nn(e,t),u={x:n,y:i},c=await Uo(t,l),d=Ie(qe(o)),f=kl(d);let h=u[f],m=u[d];if(s){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",w=h+c[y],p=h-c[v];h=Cr(w,h,p)}if(r){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",w=m+c[y],p=m-c[v];m=Cr(w,m,p)}const g=a.fn({...t,[f]:h,[d]:m});return{...g,data:{x:g.x-n,y:g.y-i,enabled:{[f]:s,[d]:r}}}}}},np=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:o,rects:s,platform:r,elements:a}=t,{apply:l=()=>{},...u}=nn(e,t),c=await Uo(t,u),d=qe(o),f=on(o),h=Ie(o)==="y",{width:m,height:g}=s.floating;let y,v;d==="top"||d==="bottom"?(y=d,v=f===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,y=f==="end"?"top":"bottom");const w=g-c.top-c.bottom,p=m-c.left-c.right,b=St(g-c[y],w),_=St(m-c[v],p),E=!t.middlewareData.shift;let P=b,M=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=p),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(P=w),E&&!f){const A=he(c.left,0),j=he(c.right,0),U=he(c.top,0),G=he(c.bottom,0);h?M=m-2*(A!==0||j!==0?A+j:he(c.left,c.right)):P=g-2*(U!==0||G!==0?U+G:he(c.top,c.bottom))}await l({...t,availableWidth:M,availableHeight:P});const k=await r.getDimensions(a.floating);return m!==k.width||g!==k.height?{reset:{rects:!0}}:{}}}};function jl(e){const t=Ce(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=de(e),s=o?e.offsetWidth:n,r=o?e.offsetHeight:i,a=Tn(n)!==s||Tn(i)!==r;return a&&(n=s,i=r),{width:n,height:i,$:a}}function Ko(e){return Z(e)?e:e.contextElement}function xt(e){const t=Ko(e);if(!de(t))return Ve(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:s}=jl(t);let r=(s?Tn(n.width):n.width)/i,a=(s?Tn(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const ip=Ve(0);function $l(e){const t=ge(e);return!Nn()||!t.visualViewport?ip:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function op(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ge(e)?!1:t}function ot(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Ko(e);let r=Ve(1);t&&(i?Z(i)&&(r=xt(i)):r=xt(e));const a=op(s,n,i)?$l(s):Ve(0);let l=(o.left+a.x)/r.x,u=(o.top+a.y)/r.y,c=o.width/r.x,d=o.height/r.y;if(s){const f=ge(s),h=i&&Z(i)?ge(i):i;let m=f,g=Ji(m);for(;g&&i&&h!==m;){const y=xt(g),v=g.getBoundingClientRect(),w=Ce(g),p=v.left+(g.clientLeft+parseFloat(w.paddingLeft))*y.x,b=v.top+(g.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,d*=y.y,l+=p,u+=b,m=ge(g),g=Ji(m)}}return An({width:c,height:d,x:l,y:u})}function Hn(e,t){const n=zn(e).scrollLeft;return t?t.left+n:ot(Ae(e)).left+n}function Ol(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-Hn(e,n),o=n.top+t.scrollTop;return{x:i,y:o}}function sp(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const s=o==="fixed",r=Ae(i),a=t?Bn(t.floating):!1;if(i===r||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Ve(1);const c=Ve(0),d=de(i);if((d||!d&&!s)&&((Tt(i)!=="body"||tn(r))&&(l=zn(i)),de(i))){const h=ot(i);u=xt(i),c.x=h.x+i.clientLeft,c.y=h.y+i.clientTop}const f=r&&!d&&!s?Ol(r,l):Ve(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function rp(e){return Array.from(e.getClientRects())}function ap(e){const t=Ae(e),n=zn(e),i=e.ownerDocument.body,o=he(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=he(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+Hn(e);const a=-n.scrollTop;return Ce(i).direction==="rtl"&&(r+=he(t.clientWidth,i.clientWidth)-o),{width:o,height:s,x:r,y:a}}const Er=25;function lp(e,t){const n=ge(e),i=Ae(e),o=n.visualViewport;let s=i.clientWidth,r=i.clientHeight,a=0,l=0;if(o){s=o.width,r=o.height;const c=Nn();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=Hn(i);if(u<=0){const c=i.ownerDocument,d=c.body,f=getComputedStyle(d),h=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(i.clientWidth-d.clientWidth-h);m<=Er&&(s-=m)}else u<=Er&&(s+=u);return{width:s,height:r,x:a,y:l}}const up=new Set(["absolute","fixed"]);function cp(e,t){const n=ot(e,!0,t==="fixed"),i=n.top+e.clientTop,o=n.left+e.clientLeft,s=de(e)?xt(e):Ve(1),r=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,u=i*s.y;return{width:r,height:a,x:l,y:u}}function Mr(e,t,n){let i;if(t==="viewport")i=lp(e,n);else if(t==="document")i=ap(Ae(e));else if(Z(t))i=cp(t,n);else{const o=$l(e);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return An(i)}function Bl(e,t){const n=Ne(e);return n===t||!Z(n)||je(n)?!1:Ce(n).position==="fixed"||Bl(n,t)}function dp(e,t){const n=t.get(e);if(n)return n;let i=Ge(e,[],!1).filter(a=>Z(a)&&Tt(a)!=="body"),o=null;const s=Ce(e).position==="fixed";let r=s?Ne(e):e;for(;Z(r)&&!je(r);){const a=Ce(r),l=Go(r);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&up.has(o.position)||tn(r)&&!l&&Bl(e,r))?i=i.filter(c=>c!==r):o=a,r=Ne(r)}return t.set(e,i),i}function fp(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const r=[...n==="clippingAncestors"?Bn(t)?[]:dp(t,this._c):[].concat(n),i],a=r[0],l=r.reduce((u,c)=>{const d=Mr(t,c,o);return u.top=he(d.top,u.top),u.right=St(d.right,u.right),u.bottom=St(d.bottom,u.bottom),u.left=he(d.left,u.left),u},Mr(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function hp(e){const{width:t,height:n}=jl(e);return{width:t,height:n}}function gp(e,t,n){const i=de(t),o=Ae(t),s=n==="fixed",r=ot(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Ve(0);function u(){l.x=Hn(o)}if(i||!i&&!s)if((Tt(t)!=="body"||tn(o))&&(a=zn(t)),i){const h=ot(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&u();s&&!i&&o&&u();const c=o&&!i&&!s?Ol(o,a):Ve(0),d=r.left+a.scrollLeft-l.x-c.x,f=r.top+a.scrollTop-l.y-c.y;return{x:d,y:f,width:r.width,height:r.height}}function mi(e){return Ce(e).position==="static"}function Pr(e,t){if(!de(e)||Ce(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ae(e)===n&&(n=n.ownerDocument.body),n}function Nl(e,t){const n=ge(e);if(Bn(e))return n;if(!de(e)){let o=Ne(e);for(;o&&!je(o);){if(Z(o)&&!mi(o))return o;o=Ne(o)}return n}let i=Pr(e,t);for(;i&&Sm(i)&&mi(i);)i=Pr(i,t);return i&&je(i)&&mi(i)&&!Go(i)?n:i||Mm(e)||n}const mp=async function(e){const t=this.getOffsetParent||Nl,n=this.getDimensions,i=await n(e.floating);return{reference:gp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function pp(e){return Ce(e).direction==="rtl"}const vp={convertOffsetParentRelativeRectToViewportRelativeRect:sp,getDocumentElement:Ae,getClippingRect:fp,getOffsetParent:Nl,getElementRects:mp,getClientRects:rp,getDimensions:hp,getScale:xt,isElement:Z,isRTL:pp};function zl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yp(e,t){let n=null,i;const o=Ae(e);function s(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function r(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(a||t(),!f||!h)return;const m=dn(d),g=dn(o.clientWidth-(c+f)),y=dn(o.clientHeight-(d+h)),v=dn(c),p={rootMargin:-m+"px "+-g+"px "+-y+"px "+-v+"px",threshold:he(0,St(1,l))||1};let b=!0;function _(E){const P=E[0].intersectionRatio;if(P!==l){if(!b)return r();P?r(!1,P):i=setTimeout(()=>{r(!1,1e-7)},1e3)}P===1&&!zl(u,e.getBoundingClientRect())&&r(),b=!1}try{n=new IntersectionObserver(_,{...p,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,p)}n.observe(e)}return r(!0),s}function Hl(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,u=Ko(e),c=o||s?[...u?Ge(u):[],...Ge(t)]:[];c.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=u&&a?yp(u,n):null;let f=-1,h=null;r&&(h=new ResizeObserver(v=>{let[w]=v;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var p;(p=h)==null||p.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let m,g=l?ot(e):null;l&&y();function y(){const v=ot(e);g&&!zl(g,v)&&n(),g=v,m=requestAnimationFrame(y)}return n(),()=>{var v;c.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),d?.(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const xp=ep,wp=tp,Cp=Zm,Sp=np,bp=(e,t,n)=>{const i=new Map,o={platform:vp,...n},s={...o.platform,_c:i};return Ym(e,t,{...o,platform:s})};var _p=typeof document<"u",Rp=function(){},Cn=_p?C.useLayoutEffect:Rp;function Dn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!Dn(e[i],t[i]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,o[i]))return!1;for(i=n;i--!==0;){const s=o[i];if(!(s==="_owner"&&e.$$typeof)&&!Dn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Wl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tr(e,t){const n=Wl(e);return Math.round(t*n)/n}function pi(e){const t=S.useRef(e);return Cn(()=>{t.current=e}),t}function Ep(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:s,floating:r}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=S.useState(i);Dn(f,i)||h(i);const[m,g]=S.useState(null),[y,v]=S.useState(null),w=S.useCallback(R=>{R!==E.current&&(E.current=R,g(R))},[]),p=S.useCallback(R=>{R!==P.current&&(P.current=R,v(R))},[]),b=s||m,_=r||y,E=S.useRef(null),P=S.useRef(null),M=S.useRef(c),k=l!=null,A=pi(l),j=pi(o),U=pi(u),G=S.useCallback(()=>{if(!E.current||!P.current)return;const R={placement:t,strategy:n,middleware:f};j.current&&(R.platform=j.current),bp(E.current,P.current,R).then(L=>{const V={...L,isPositioned:U.current!==!1};D.current&&!Dn(M.current,V)&&(M.current=V,Ru.flushSync(()=>{d(V)}))})},[f,t,n,j,U]);Cn(()=>{u===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[u]);const D=S.useRef(!1);Cn(()=>(D.current=!0,()=>{D.current=!1}),[]),Cn(()=>{if(b&&(E.current=b),_&&(P.current=_),b&&_){if(A.current)return A.current(b,_,G);G()}},[b,_,G,A,k]);const H=S.useMemo(()=>({reference:E,floating:P,setReference:w,setFloating:p}),[w,p]),z=S.useMemo(()=>({reference:b,floating:_}),[b,_]),T=S.useMemo(()=>{const R={position:n,left:0,top:0};if(!z.floating)return R;const L=Tr(z.floating,c.x),V=Tr(z.floating,c.y);return a?{...R,transform:"translate("+L+"px, "+V+"px)",...Wl(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:V}},[n,a,z.floating,c.x,c.y]);return S.useMemo(()=>({...c,update:G,refs:H,elements:z,floatingStyles:T}),[c,G,H,z,T])}const Gl=(e,t)=>({...xp(e),options:[e,t]}),Ul=(e,t)=>({...wp(e),options:[e,t]}),Kl=(e,t)=>({...Cp(e),options:[e,t]}),Mp=(e,t)=>({...Sp(e),options:[e,t]});function Pp(e){const t=S.useRef(void 0),n=S.useCallback(i=>{const o=e.map(s=>{if(s!=null){if(typeof s=="function"){const r=s,a=r(i);return typeof a=="function"?a:()=>{r(null)}}return s.current=i,()=>{s.current=null}}});return()=>{o.forEach(s=>s?.())}},e);return S.useMemo(()=>e.every(i=>i==null)?null:i=>{t.current&&(t.current(),t.current=void 0),i!=null&&(t.current=n(i))},e)}const Tp="data-floating-ui-focusable",Vr="active",Ar="selected",Vp={...S};let Dr=!1,Ap=0;const Fr=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ap++;function Dp(){const[e,t]=S.useState(()=>Dr?Fr():void 0);return bt(()=>{e==null&&t(Fr())},[]),S.useEffect(()=>{Dr=!0},[]),e}const Fp=Vp.useId,ql=Fp||Dp;let to;process.env.NODE_ENV!=="production"&&(to=new Set);function kp(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const o="Floating UI: "+n.join(" ");if(!((e=to)!=null&&e.has(o))){var s;(s=to)==null||s.add(o),console.error(o)}}function Lp(){const e=new Map;return{emit(t,n){var i;(i=e.get(t))==null||i.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var i;(i=e.get(t))==null||i.delete(n)}}}const Ip=S.createContext(null),jp=S.createContext(null),qo=()=>{var e;return((e=S.useContext(Ip))==null?void 0:e.id)||null},Xo=()=>S.useContext(jp);function Xl(e){return"data-floating-ui-"+e}function be(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const kr=Xl("safe-polygon");function vi(e,t,n){if(n&&!Yt(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const i=e();return typeof i=="number"?i:i?.[t]}return e?.[t]}function yi(e){return typeof e=="function"?e():e}function $p(e,t){t===void 0&&(t={});const{open:n,onOpenChange:i,dataRef:o,events:s,elements:r}=e,{enabled:a=!0,delay:l=0,handleClose:u=null,mouseOnly:c=!1,restMs:d=0,move:f=!0}=t,h=Xo(),m=qo(),g=fn(u),y=fn(l),v=fn(n),w=fn(d),p=S.useRef(),b=S.useRef(-1),_=S.useRef(),E=S.useRef(-1),P=S.useRef(!0),M=S.useRef(!1),k=S.useRef(()=>{}),A=S.useRef(!1),j=Pe(()=>{var T;const R=(T=o.current.openEvent)==null?void 0:T.type;return R?.includes("mouse")&&R!=="mousedown"});S.useEffect(()=>{if(!a)return;function T(R){let{open:L}=R;L||(be(b),be(E),P.current=!0,A.current=!1)}return s.on("openchange",T),()=>{s.off("openchange",T)}},[a,s]),S.useEffect(()=>{if(!a||!g.current||!n)return;function T(L){j()&&i(!1,L,"hover")}const R=vt(r.floating).documentElement;return R.addEventListener("mouseleave",T),()=>{R.removeEventListener("mouseleave",T)}},[r.floating,n,i,a,g,j]);const U=S.useCallback(function(T,R,L){R===void 0&&(R=!0),L===void 0&&(L="hover");const V=vi(y.current,"close",p.current);V&&!_.current?(be(b),b.current=window.setTimeout(()=>i(!1,T,L),V)):R&&(be(b),i(!1,T,L))},[y,i]),G=Pe(()=>{k.current(),_.current=void 0}),D=Pe(()=>{if(M.current){const T=vt(r.floating).body;T.style.pointerEvents="",T.removeAttribute(kr),M.current=!1}}),H=Pe(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);S.useEffect(()=>{if(!a)return;function T($){if(be(b),P.current=!1,c&&!Yt(p.current)||yi(w.current)>0&&!vi(y.current,"open"))return;const Y=vi(y.current,"open",p.current);Y?b.current=window.setTimeout(()=>{v.current||i(!0,$,"hover")},Y):n||i(!0,$,"hover")}function R($){if(H()){D();return}k.current();const Y=vt(r.floating);if(be(E),A.current=!1,g.current&&o.current.floatingContext){n||be(b),_.current=g.current({...o.current.floatingContext,tree:h,x:$.clientX,y:$.clientY,onClose(){D(),G(),H()||U($,!0,"safe-polygon")}});const ne=_.current;Y.addEventListener("mousemove",ne),k.current=()=>{Y.removeEventListener("mousemove",ne)};return}(p.current==="touch"?!eo(r.floating,$.relatedTarget):!0)&&U($)}function L($){H()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:h,x:$.clientX,y:$.clientY,onClose(){D(),G(),H()||U($)}})($))}function V(){be(b)}function W($){H()||U($,!1)}if(Z(r.domReference)){const $=r.domReference,Y=r.floating;return n&&$.addEventListener("mouseleave",L),f&&$.addEventListener("mousemove",T,{once:!0}),$.addEventListener("mouseenter",T),$.addEventListener("mouseleave",R),Y&&(Y.addEventListener("mouseleave",L),Y.addEventListener("mouseenter",V),Y.addEventListener("mouseleave",W)),()=>{n&&$.removeEventListener("mouseleave",L),f&&$.removeEventListener("mousemove",T),$.removeEventListener("mouseenter",T),$.removeEventListener("mouseleave",R),Y&&(Y.removeEventListener("mouseleave",L),Y.removeEventListener("mouseenter",V),Y.removeEventListener("mouseleave",W))}}},[r,a,e,c,f,U,G,D,i,n,v,h,y,g,o,H,w]),bt(()=>{var T;if(a&&n&&(T=g.current)!=null&&(T=T.__options)!=null&&T.blockPointerEvents&&j()){M.current=!0;const L=r.floating;if(Z(r.domReference)&&L){var R;const V=vt(r.floating).body;V.setAttribute(kr,"");const W=r.domReference,$=h==null||(R=h.nodesRef.current.find(Y=>Y.id===m))==null||(R=R.context)==null?void 0:R.elements.floating;return $&&($.style.pointerEvents=""),V.style.pointerEvents="none",W.style.pointerEvents="auto",L.style.pointerEvents="auto",()=>{V.style.pointerEvents="",W.style.pointerEvents="",L.style.pointerEvents=""}}}},[a,n,m,r,h,g,j]),bt(()=>{n||(p.current=void 0,A.current=!1,G(),D())},[n,G,D]),S.useEffect(()=>()=>{G(),be(b),be(E),D()},[a,r.domReference,G,D]);const z=S.useMemo(()=>{function T(R){p.current=R.pointerType}return{onPointerDown:T,onPointerEnter:T,onMouseMove(R){const{nativeEvent:L}=R;function V(){!P.current&&!v.current&&i(!0,L,"hover")}c&&!Yt(p.current)||n||yi(w.current)===0||A.current&&R.movementX**2+R.movementY**2<2||(be(E),p.current==="touch"?V():(A.current=!0,E.current=window.setTimeout(V,yi(w.current))))}}},[c,i,n,v,w]);return S.useMemo(()=>a?{reference:z}:{},[a,z])}function Lr(e){return de(e.target)&&e.target.tagName==="BUTTON"}function Op(e){return de(e.target)&&e.target.tagName==="A"}function Ir(e){return zm(e)}function Bp(e,t){t===void 0&&(t={});const{open:n,onOpenChange:i,dataRef:o,elements:{domReference:s}}=e,{enabled:r=!0,event:a="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:c=!0,stickIfOpen:d=!0}=t,f=S.useRef(),h=S.useRef(!1),m=S.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const y=f.current;g.button===0&&a!=="click"&&(Yt(y,!0)&&u||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?i(!1,g.nativeEvent,"click"):(g.preventDefault(),i(!0,g.nativeEvent,"click"))))},onClick(g){const y=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}Yt(y,!0)&&u||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?i(!1,g.nativeEvent,"click"):i(!0,g.nativeEvent,"click"))},onKeyDown(g){f.current=void 0,!(g.defaultPrevented||!c||Lr(g))&&(g.key===" "&&!Ir(s)&&(g.preventDefault(),h.current=!0),!Op(g)&&g.key==="Enter"&&i(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!c||Lr(g)||Ir(s)||g.key===" "&&h.current&&(h.current=!1,i(!(n&&l),g.nativeEvent,"click"))}}),[o,s,a,u,c,i,n,d,l]);return S.useMemo(()=>r?{reference:m}:{},[r,m])}const Np={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},zp={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},jr=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Hp(e,t){t===void 0&&(t={});const{open:n,onOpenChange:i,elements:o,dataRef:s}=e,{enabled:r=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:u="pointerdown",referencePress:c=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:m}=t,g=Xo(),y=Pe(typeof l=="function"?l:()=>!1),v=typeof l=="function"?y:l,w=S.useRef(!1),{escapeKey:p,outsidePress:b}=jr(h),{escapeKey:_,outsidePress:E}=jr(m),P=S.useRef(!1),M=Pe(D=>{var H;if(!n||!r||!a||D.key!=="Escape"||P.current)return;const z=(H=s.current.floatingContext)==null?void 0:H.nodeId,T=g?wn(g.nodesRef.current,z):[];if(!p&&(D.stopPropagation(),T.length>0)){let R=!0;if(T.forEach(L=>{var V;if((V=L.context)!=null&&V.open&&!L.context.dataRef.current.__escapeKeyBubbles){R=!1;return}}),!R)return}i(!1,Wm(D)?D.nativeEvent:D,"escape-key")}),k=Pe(D=>{var H;const z=()=>{var T;M(D),(T=kt(D))==null||T.removeEventListener("keydown",z)};(H=kt(D))==null||H.addEventListener("keydown",z)}),A=Pe(D=>{var H;const z=s.current.insideReactTree;s.current.insideReactTree=!1;const T=w.current;if(w.current=!1,u==="click"&&T||z||typeof v=="function"&&!v(D))return;const R=kt(D),L="["+Xl("inert")+"]",V=vt(o.floating).querySelectorAll(L);let W=Z(R)?R:null;for(;W&&!je(W);){const ne=Ne(W);if(je(ne)||!Z(ne))break;W=ne}if(V.length&&Z(R)&&!Nm(R)&&!eo(R,o.floating)&&Array.from(V).every(ne=>!eo(W,ne)))return;if(de(R)&&G){const ne=je(R),fe=Ce(R),Fe=/auto|scroll/,st=ne||Fe.test(fe.overflowX),rt=ne||Fe.test(fe.overflowY),at=st&&R.clientWidth>0&&R.scrollWidth>R.clientWidth,Se=rt&&R.clientHeight>0&&R.scrollHeight>R.clientHeight,lt=fe.direction==="rtl",Vt=Se&&(lt?D.offsetX<=R.offsetWidth-R.clientWidth:D.offsetX>R.clientWidth),At=at&&D.offsetY>R.clientHeight;if(Vt||At)return}const $=(H=s.current.floatingContext)==null?void 0:H.nodeId,Y=g&&wn(g.nodesRef.current,$).some(ne=>{var fe;return gi(D,(fe=ne.context)==null?void 0:fe.elements.floating)});if(gi(D,o.floating)||gi(D,o.domReference)||Y)return;const De=g?wn(g.nodesRef.current,$):[];if(De.length>0){let ne=!0;if(De.forEach(fe=>{var Fe;if((Fe=fe.context)!=null&&Fe.open&&!fe.context.dataRef.current.__outsidePressBubbles){ne=!1;return}}),!ne)return}i(!1,D,"outside-press")}),j=Pe(D=>{var H;const z=()=>{var T;A(D),(T=kt(D))==null||T.removeEventListener(u,z)};(H=kt(D))==null||H.addEventListener(u,z)});S.useEffect(()=>{if(!n||!r)return;s.current.__escapeKeyBubbles=p,s.current.__outsidePressBubbles=b;let D=-1;function H(V){i(!1,V,"ancestor-scroll")}function z(){window.clearTimeout(D),P.current=!0}function T(){D=window.setTimeout(()=>{P.current=!1},Nn()?5:0)}const R=vt(o.floating);a&&(R.addEventListener("keydown",_?k:M,_),R.addEventListener("compositionstart",z),R.addEventListener("compositionend",T)),v&&R.addEventListener(u,E?j:A,E);let L=[];return f&&(Z(o.domReference)&&(L=Ge(o.domReference)),Z(o.floating)&&(L=L.concat(Ge(o.floating))),!Z(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(Ge(o.reference.contextElement)))),L=L.filter(V=>{var W;return V!==((W=R.defaultView)==null?void 0:W.visualViewport)}),L.forEach(V=>{V.addEventListener("scroll",H,{passive:!0})}),()=>{a&&(R.removeEventListener("keydown",_?k:M,_),R.removeEventListener("compositionstart",z),R.removeEventListener("compositionend",T)),v&&R.removeEventListener(u,E?j:A,E),L.forEach(V=>{V.removeEventListener("scroll",H)}),window.clearTimeout(D)}},[s,o,a,v,u,n,i,f,r,p,b,M,_,k,A,E,j]),S.useEffect(()=>{s.current.insideReactTree=!1},[s,v,u]);const U=S.useMemo(()=>({onKeyDown:M,...c&&{[Np[d]]:D=>{i(!1,D.nativeEvent,"reference-press")},...d!=="click"&&{onClick(D){i(!1,D.nativeEvent,"reference-press")}}}}),[M,i,c,d]),G=S.useMemo(()=>({onKeyDown:M,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[zp[u]]:()=>{s.current.insideReactTree=!0}}),[M,u,s]);return S.useMemo(()=>r?{reference:U,floating:G}:{},[r,U,G])}function Wp(e){const{open:t=!1,onOpenChange:n,elements:i}=e,o=ql(),s=S.useRef({}),[r]=S.useState(()=>Lp()),a=qo()!=null;if(process.env.NODE_ENV!=="production"){const h=i.reference;h&&!Z(h)&&kp("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=S.useState(i.reference),c=Pe((h,m,g)=>{s.current.openEvent=h?m:void 0,r.emit("openchange",{open:h,event:m,reason:g,nested:a}),n?.(h,m,g)}),d=S.useMemo(()=>({setPositionReference:u}),[]),f=S.useMemo(()=>({reference:l||i.reference||null,floating:i.floating||null,domReference:i.reference}),[l,i.reference,i.floating]);return S.useMemo(()=>({dataRef:s,open:t,onOpenChange:c,elements:f,events:r,floatingId:o,refs:d}),[t,c,f,r,o,d])}function Yl(e){e===void 0&&(e={});const{nodeId:t}=e,n=Wp({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||n,o=i.elements,[s,r]=S.useState(null),[a,l]=S.useState(null),c=o?.domReference||s,d=S.useRef(null),f=Xo();bt(()=>{c&&(d.current=c)},[c]);const h=Ep({...e,elements:{...o,...a&&{reference:a}}}),m=S.useCallback(p=>{const b=Z(p)?{getBoundingClientRect:()=>p.getBoundingClientRect(),getClientRects:()=>p.getClientRects(),contextElement:p}:p;l(b),h.refs.setReference(b)},[h.refs]),g=S.useCallback(p=>{(Z(p)||p===null)&&(d.current=p,r(p)),(Z(h.refs.reference.current)||h.refs.reference.current===null||p!==null&&!Z(p))&&h.refs.setReference(p)},[h.refs]),y=S.useMemo(()=>({...h.refs,setReference:g,setPositionReference:m,domReference:d}),[h.refs,g,m]),v=S.useMemo(()=>({...h.elements,domReference:c}),[h.elements,c]),w=S.useMemo(()=>({...h,...i,refs:y,elements:v,nodeId:t}),[h,y,v,t,i]);return bt(()=>{i.dataRef.current.floatingContext=w;const p=f?.nodesRef.current.find(b=>b.id===t);p&&(p.context=w)}),S.useMemo(()=>({...h,context:w,refs:y,elements:v}),[h,y,v,w])}function xi(e,t,n){const i=new Map,o=n==="item";let s=e;if(o&&e){const{[Vr]:r,[Ar]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1,[Tp]:""},...s,...t.map(r=>{const a=r?r[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((r,a)=>(a&&Object.entries(a).forEach(l=>{let[u,c]=l;if(!(o&&[Vr,Ar].includes(u)))if(u.indexOf("on")===0){if(i.has(u)||i.set(u,[]),typeof c=="function"){var d;(d=i.get(u))==null||d.push(c),r[u]=function(){for(var f,h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];return(f=i.get(u))==null?void 0:f.map(y=>y(...m)).find(y=>y!==void 0)}}}else r[u]=c}),r),{})}}function Gp(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),i=e.map(a=>a?.item),o=S.useCallback(a=>xi(a,e,"reference"),t),s=S.useCallback(a=>xi(a,e,"floating"),n),r=S.useCallback(a=>xi(a,e,"item"),i);return S.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:r}),[o,s,r])}const Up=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Kp(e,t){var n,i;t===void 0&&(t={});const{open:o,elements:s,floatingId:r}=e,{enabled:a=!0,role:l="dialog"}=t,u=ql(),c=((n=s.domReference)==null?void 0:n.id)||u,d=S.useMemo(()=>{var w;return((w=Hm(s.floating))==null?void 0:w.id)||r},[s.floating,r]),f=(i=Up.get(l))!=null?i:l,m=qo()!=null,g=S.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:c},...f==="menu"&&m&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,m,o,c,l]),y=S.useMemo(()=>{const w={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?w:{...w,...f==="menu"&&{"aria-labelledby":c}}},[f,d,c,l]),v=S.useCallback(w=>{let{active:p,selected:b}=w;const _={role:"option",...p&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{..._,"aria-selected":b}}return{}},[d,l]);return S.useMemo(()=>a?{reference:g,floating:y,item:v}:{},[a,g,y,v])}const qp=e=>S.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Xp=e=>S.createElement("svg",{fill:"currentColor",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 462.035 462.035",xmlSpace:"preserve",...e},S.createElement("g",null,S.createElement("path",{d:"M457.83,158.441c-0.021-0.028-0.033-0.058-0.057-0.087l-50.184-62.48c-0.564-0.701-1.201-1.305-1.879-1.845 c-2.16-2.562-5.355-4.225-8.967-4.225H65.292c-3.615,0-6.804,1.661-8.965,4.225c-0.678,0.54-1.316,1.138-1.885,1.845l-50.178,62.48 c-0.023,0.029-0.034,0.059-0.057,0.087C1.655,160.602,0,163.787,0,167.39v193.07c0,6.5,5.27,11.771,11.77,11.771h438.496 c6.5,0,11.77-5.271,11.77-11.771V167.39C462.037,163.787,460.381,160.602,457.83,158.441z M408.516,134.615l16.873,21.005h-16.873 V134.615z M384.975,113.345v42.274H296.84c-2.514,0-4.955,0.805-6.979,2.293l-58.837,43.299l-58.849-43.305 c-2.023-1.482-4.466-2.287-6.978-2.287H77.061v-42.274H384.975z M53.523,155.62H36.65l16.873-21.005V155.62z M438.498,348.69H23.54 V179.16h137.796l62.711,46.148c4.15,3.046,9.805,3.052,13.954-0.005l62.698-46.144h137.799V348.69L438.498,348.69z"}))),Yp=e=>S.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("g",{opacity:.6},S.createElement("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),wi={sm:{h:28,p:"var(--spacing-xs) var(--spacing-sm)",text:"body-2"},md:{h:32,p:"6px var(--spacing-md)",text:"body-2"},lg:{h:40,p:"var(--spacing-sm) var(--spacing-lg)",text:"body-1"}},Yo=C.forwardRef(({label:e,color:t="primary",size:n="md",onClick:i,onDelete:o,avatar:s,icon:r,disabled:a,className:l},u)=>{const c=C.useRef(null),d=C.useMemo(()=>{switch(t){case"primary":return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"};case"accent":return{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"};case"warning":return{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"};case"positive":return{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"};case"negative":return{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"};default:return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"}}},[t]),f=F.css({cursor:a?"not-allowed":i?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:d.bg}}),h=F.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return x.jsxs(I,{ref:m=>{c.current=m,typeof u=="function"?u(m):u&&(u.current=m)},row:!0,alignItems:"center",justifyContent:"center",gap:"var(--spacing-sm)",h:wi[n].h,p:wi[n].p,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:d.bg,color:d.color,onClick:i,className:F.cx(f,l),children:[i&&x.jsx(_t,{}),s&&x.jsx(I,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:s}),r&&x.jsx(I,{children:r}),typeof e=="string"?x.jsx(q,{variant:wi[n].text,colorName:t,textOverflow:"ellipsis",overflow:"hidden",children:e}):e,o&&!a&&x.jsx(q,{className:h,colorName:t,onClick:m=>{m.stopPropagation(),o(m)},children:x.jsx(Yp,{})})]})});Yo.displayName="Tag";const Zp="_disabled_v62jt_40",Jp="_open_v62jt_48",Qp="_error_v62jt_51",ev="_hidden_v62jt_87",tv="_visible_v62jt_90",nv="_selected_v62jt_163",oe={"select-container":"_select-container_v62jt_8","full-width":"_full-width_v62jt_13","select-input":"_select-input_v62jt_17","size-xs":"_size-xs_v62jt_25","size-sm":"_size-sm_v62jt_30","size-md":"_size-md_v62jt_35",disabled:Zp,open:Jp,"select-arrow":"_select-arrow_v62jt_48",error:Qp,"select-value":"_select-value_v62jt_62","select-value_xs":"_select-value_xs_v62jt_74","select-placeholder":"_select-placeholder_v62jt_81",hidden:ev,visible:tv,"select-arrow_xs":"_select-arrow_xs_v62jt_106","select-dropdown":"_select-dropdown_v62jt_116","select-menu":"_select-menu_v62jt_126","select-menu-item":"_select-menu-item_v62jt_145","select-menu-item-first":"_select-menu-item-first_v62jt_158",selected:nv,"overflow-tooltip-container":"_overflow-tooltip-container_v62jt_167","overflow-tooltip-text":"_overflow-tooltip-text_v62jt_172","empty-block":"_empty-block_v62jt_179"};function Zl({value:e,onChange:t,multiple:n=!1,returnedValue:i,renderItem:o,placeholder:s,items:r=[],fullWidth:a,size:l="md",showDefaultItem:u,disabled:c,label:d,firstItem:f,lastItem:h,observer:m,emptyText:g,onBlur:y,prompt:v,error:w,errorText:p}){const[b,_]=Fn(e,n?[]:null),[E,P]=C.useState(!1),{refs:M,floatingStyles:k}=Yl({open:E,placement:"bottom-start",strategy:"fixed",middleware:[Gl(4),Kl({crossAxis:!0,fallbackAxisSideDirection:"start"}),Ul({crossAxis:!0,padding:8}),Mp({apply({rects:V,availableHeight:W,elements:$}){Object.assign($.floating.style,{width:`${V.reference.width}px`,maxHeight:typeof W=="number"?`${W}px`:"auto"})}})],whileElementsMounted:Hl}),A=C.useMemo(()=>n?b||[]:b!=null?[b]:[],[b,n]),j=C.useCallback(V=>i?i(V):V,[i]),U=C.useMemo(()=>{const V=new Map;return r.forEach(W=>{V.set(j(W),W)}),V},[r,j]),G=!r.length&&!w,D=()=>{P(!1),y?.()},H=V=>{const W=j(V);if(n){const $=A.includes(W)?A.filter(Y=>Y!==W):[...A,W];_($),t?.($)}else _(W),t?.(W),D()},z=V=>{if(!n)return;const W=A.filter($=>$!==V);_(W),t?.(W)},T=()=>{const V=n?[]:null;_(V),t?.(V),n||D()},R=()=>{if(!A.length)return x.jsx(q,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:s??"Select..."});if(n)return x.jsx(I,{flexWrap:"wrap",row:!0,gap:10,children:A.map($=>{const Y=U.get($);return Y?x.jsx(Yo,{size:"sm",label:o(Y),onDelete:De=>{De.stopPropagation(),z($)}},$):null})});const V=U.get(A[0]);if(!V)return x.jsx(q,{variant:l==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:s});const W=o(V);return typeof W=="string"?x.jsx(q,{variant:l==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:W}):x.jsx(x.Fragment,{children:W})},L=E&&x.jsx(Kn,{children:x.jsx(I,{row:!0,top:0,right:0,bottom:0,left:0,position:"fixed",center:!0,flex:1,onClick:D,display:"block",backgroundColor:"transparent",zIndex:1,children:x.jsx(Ho.div,{ref:M.setFloating,className:oe["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...k,zIndex:1},onMouseDown:V=>V.stopPropagation(),onClick:V=>V.stopPropagation(),children:x.jsxs("ul",{className:oe["select-menu"],children:[u&&!n&&x.jsx(I,{className:oe["select-menu-item"],role:"option",onClick:T,children:x.jsx(q,{variant:"body-2",colorName:"tertiary",children:s})}),f&&x.jsx(I,{className:F.cx(oe["select-menu-item"],oe["select-menu-item-first"]),children:f}),G&&x.jsxs(I,{className:oe["empty-block"],children:[x.jsx(I,{w:20,h:20,children:x.jsx(Xp,{})}),x.jsx(q,{variant:"body-2",children:g??"There is nothing yet"})]}),r.map(V=>{const W=j(V),$=A.includes(W);return x.jsxs(I,{row:!0,gap:10,alignItems:"center",className:F.cx(oe["select-menu-item"],{[oe.selected]:$}),role:"option",relative:!0,onClick:()=>H(V),children:[n&&x.jsx(Wo,{size:"sm",checked:$}),typeof o(V)=="string"?x.jsx(q,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:o(V)}):o(V),x.jsx(_t,{})]},W)}),m,h&&x.jsx(I,{className:F.cx(oe["select-menu-item"],oe["select-menu-item-first"]),children:h})]})},"dropdown")})});return x.jsxs(I,{relative:!0,display:"inline-block",minWidth:120,w:a?"full":"auto",onMouseDown:V=>V.stopPropagation(),onClick:V=>V.stopPropagation(),children:[typeof d=="string"?x.jsx(q,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:l==="sm"?4:8,children:d}):d,x.jsxs(I,{ref:M.setReference,row:!0,gap:10,tabIndex:c?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:F.cx(oe["select-input"],oe[`size-${l}`],{[oe.error]:w,[oe.disabled]:c,[oe.open]:E}),onClick:()=>!c&&P(V=>!V),children:[x.jsx(I,{className:F.cx(oe["select-value"]),children:R()}),x.jsx(I,{className:F.cx(oe["select-arrow"],oe[`select-arrow_${l}`]),children:x.jsx(qp,{})})]}),typeof v=="string"?x.jsx(q,{variant:"caption-1",colorName:"tertiary",mt:4,children:v}):v,w&&p&&x.jsx(q,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:p}),x.jsx(tf,{children:L})]})}const iv=e=>S.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M3.94629 0.220237C3.78013 0.264025 3.64089 0.377624 3.56348 0.53176C3.27371 1.11189 3.05664 1.46395 2.83887 1.74953C2.61807 2.03873 2.38547 2.27579 2.03027 2.63039C1.21079 3.45057 0.799805 4.52619 0.799805 5.60012C0.799838 6.67406 1.21073 7.74968 2.03027 8.56985C3.67062 10.2096 6.32931 10.2095 7.96973 8.56985C8.78929 7.74968 9.20016 6.67408 9.2002 5.60012C9.15131 4.32908 8.43217 3.48543 7.94727 3.05813C7.76902 2.90106 7.40643 3.02424 7.2627 3.2134C7.24031 3.24286 7.21612 3.2739 7.18945 3.30617C6.93211 3.61754 6.56236 3.80807 6.41504 3.83156C6.38264 3.83667 6.36979 3.76513 6.2959 3.58254C5.79455 2.34427 5.78927 2.49365 5.58887 2.01125C5.48847 1.7692 5.05517 1.02727 4.92676 0.828635C4.80206 0.635591 4.64095 0.439873 4.43359 0.301292C4.29028 0.205951 4.1124 0.175957 3.94629 0.220237ZM4.75293 4.17824C5.2689 4.63997 5.60857 5.26651 5.71484 5.95071C6.10631 5.85571 6.46727 5.68318 6.78125 5.45071C6.86578 5.70826 6.89338 5.98123 6.8623 6.25051C6.83115 6.51993 6.74174 6.77966 6.60059 7.01125C6.45944 7.24281 6.27008 7.44117 6.04492 7.59231C5.81977 7.74344 5.56462 7.8443 5.29688 7.88723C5.0292 7.93013 4.75518 7.91446 4.49414 7.84133C4.23299 7.76812 3.99064 7.6383 3.78418 7.46242C3.5778 7.28657 3.41161 7.06792 3.29785 6.8218C3.18419 6.57572 3.12519 6.30771 3.125 6.03664C3.12508 5.58233 3.29054 5.14308 3.58984 4.80129C3.88917 4.4597 4.30271 4.2382 4.75293 4.17824Z",fill:"#FEAD34"})),ov=e=>S.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M10.1483 8.61509C10.3344 8.26159 9.98299 7.89856 9.58534 7.93723C9.42671 7.95265 9.25857 7.9605 9.07422 7.96035C6.36522 7.9582 4.17129 5.76427 4.16914 3.05527C4.169 2.87115 4.17682 2.70321 4.19221 2.54477C4.23082 2.14712 3.86769 1.79411 3.50976 1.97161C2.03398 2.70343 1.20002 4.02274 1.20002 5.89477C1.20002 8.60377 3.3961 10.7998 6.1051 10.7998C7.97571 10.7998 9.38737 10.06 10.1483 8.61509Z",fill:"white"})),sv="_container_e7tan_8",rv="_disabled_e7tan_17",av="_reverse_e7tan_21",lv="_input_e7tan_25",uv="_switchContainer_e7tan_35",cv="_variant_accent_e7tan_43",dv="_variant_secondary_e7tan_47",fv="_thumb_e7tan_51",hv="_variant_theme_e7tan_54",gv="_moon_e7tan_58",mv="_fire_e7tan_61",pv="_size_sm_e7tan_74",vv="_size_md_e7tan_80",yv="_size_lg_e7tan_86",_e={container:sv,disabled:rv,reverse:av,input:lv,switchContainer:uv,variant_accent:cv,variant_secondary:dv,switch:"_switch_e7tan_35",thumb:fv,variant_theme:hv,moon:gv,fire:mv,size_sm:pv,size_md:vv,size_lg:yv},Jl=C.forwardRef(({title:e,text:t,icon:n,disabled:i,onChange:o,checked:s,defaultValue:r,className:a,size:l="md",variant:u="accent",reverse:c=!1,w:d="auto",...f},h)=>{const[m,g]=Fn(s,r),y=C.useRef(null);C.useImperativeHandle(h,()=>({focus:()=>{y.current?.focus()},blur:()=>{y.current?.blur()},get checked(){return m??!1},setChecked:b=>{g(b),o?.(b)},toggle:()=>{const b=!m;g(b),o?.(b)},isFocused:()=>document.activeElement===y.current,isDisabled:()=>i??!1,getInputElement:()=>y.current,checkValidity:()=>y.current?.checkValidity()??!0,reset:()=>{const b=r??!1;g(b),o?.(b)}}),[m,g,o,i,r]);const v=C.useCallback(b=>{g(b.target.checked),o?.(b.target.checked)},[o]),w=C.useMemo(()=>typeof e=="string"?x.jsx(q,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:e}):e,[e]),p=C.useMemo(()=>typeof t=="string"?x.jsx(q,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:t}):t,[t]);return x.jsxs(I,{row:!0,w:d,gap:"var(--spacing-sm)",children:[x.jsxs("label",{className:F.cx(_e.container,a,{[_e.disabled]:i,[_e.reverse]:c}),children:[x.jsxs(I,{className:F.cx(_e.switchContainer,_e[`size_${l}`],_e[`variant_${u}`]),children:[x.jsx("input",{ref:y,type:"checkbox",checked:m,className:_e.input,onChange:v,disabled:i,...f}),x.jsx("div",{className:_e.switch,children:x.jsx("div",{className:_e.thumb,children:u==="theme"&&x.jsxs(x.Fragment,{children:[x.jsx(ov,{className:_e.moon}),x.jsx(iv,{className:_e.fire})]})})})]}),x.jsxs(I,{gap:"var(--spacing-xs)",children:[w,p]})]}),n]})});Jl.displayName="Switch";const xv="_primary_svt6d_8",wv="_secondary_svt6d_13",Cv="_button_svt6d_18",ze={primary:xv,secondary:wv,button:Cv,"button-active":"_button-active_svt6d_32","icon-container":"_icon-container_svt6d_35","button-primary":"_button-primary_svt6d_47","button-secondary":"_button-secondary_svt6d_51","button-disabled":"_button-disabled_svt6d_55","full-width":"_full-width_svt6d_60"};function Sv({value:e,onChange:t,options:n,variant:i="primary",fullWidth:o=!1,className:s}){return x.jsx(I,{row:!0,alignItems:"center",borderRadius:"var(--corner-md)",p:"var(--spacing-xs)",gap:"var(--spacing-md)",className:F.cx(ze[i],o&&ze["full-width"],s),children:n.map(r=>{const a=r.value===e,l=r.disabled,u=r.separatorAfter??!1;return x.jsxs(C.Fragment,{children:[x.jsxs("button",{type:"button",disabled:l,className:F.cx(ze.button,o&&ze["full-width"],a&&ze["button-active"],a&&ze[`button-${i}`],l&&ze["button-disabled"]),onClick:()=>!l&&t(r.value),children:[r.icon&&x.jsx(I,{alignItems:"center",justifyContent:"center",className:ze["icon-container"],children:r.icon}),r.label&&x.jsx(q,{colorName:a?"primary":"tertiary",children:r.label}),!l&&x.jsx(_t,{color:"var(--fill-bg-overlay-primary)"})]}),u&&x.jsx(I,{w:1,h:24,backgroundColor:"var(--fill-bg-tertiary)"})]},r.value)})})}const bv="_header_446to_8",_v={header:bv},Ql=C.forwardRef(({title:e,subtitle:t,w:n="full",p:i,py:o,px:s="var(--spacing-2xl)",pt:r="var(--spacing-2xl)",pb:a="var(--spacing-lg)",row:l=!0,justifyContent:u="space-between",showCloseButton:c=!0},d)=>{const{onClose:f}=Wu();return x.jsxs(I,{w:n,p:i,py:o,px:s,pt:r,pb:a,row:l,justifyContent:u,ref:d,className:_v.header,children:[x.jsxs(I,{gap:"var(--spacing-sm)",children:[x.jsx(q,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:e}),x.jsx(q,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:t})]}),c&&x.jsx(I,{children:x.jsx(Ht,{onClick:f,color:"neutral",children:x.jsx(Xr,{})})})]})});Ql.displayName="ModalHeader";function ct(e,t,n){let i=n.initialDeps??[],o;function s(){var r,a,l,u;let c;n.key&&((r=n.debug)!=null&&r.call(n))&&(c=Date.now());const d=e();if(!(d.length!==i.length||d.some((m,g)=>i[g]!==m)))return o;i=d;let h;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(h=Date.now()),o=t(...d),n.key&&((l=n.debug)!=null&&l.call(n))){const m=Math.round((Date.now()-c)*100)/100,g=Math.round((Date.now()-h)*100)/100,y=g/16,v=(w,p)=>{for(w=String(w);w.length<p;)w=" "+w;return w};console.info(`%c⏱ ${v(g,5)} /${v(m,5)} ms`,`
|
|
14
14
|
font-size: .6rem;
|
|
15
15
|
font-weight: bold;
|
|
16
|
-
color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,n?.key)}return(u=n?.onChange)==null||u.call(n,s),s}return o.updateDeps=r=>{i=r},o}function xo(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const hg=(e,t)=>Math.abs(e-t)<1.01,gg=(e,t,n)=>{let i;return function(...s){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,s),n)}},Co=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},pg=e=>e,mg=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),i=[];for(let s=t;s<=n;s++)i.push(s);return i},vg=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const s=r=>{const{width:a,height:l}=r;t({width:Math.round(a),height:Math.round(l)})};if(s(Co(n)),!i.ResizeObserver)return()=>{};const o=new i.ResizeObserver(r=>{const a=()=>{const l=r[0];if(l?.borderBoxSize){const u=l.borderBoxSize[0];if(u){s({width:u.inlineSize,height:u.blockSize});return}}s(Co(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},So={passive:!0},_o=typeof window>"u"?!0:"onscrollend"in window,yg=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;let s=0;const o=e.options.useScrollendEvent&&_o?()=>{}:gg(i,()=>{t(s,!1)},e.options.isScrollingResetDelay),r=c=>()=>{const{horizontal:d,isRtl:f}=e.options;s=d?n.scrollLeft*(f&&-1||1):n.scrollTop,o(),t(s,c)},a=r(!0),l=r(!1);l(),n.addEventListener("scroll",a,So);const u=e.options.useScrollendEvent&&_o;return u&&n.addEventListener("scrollend",l,So),()=>{n.removeEventListener("scroll",a),u&&n.removeEventListener("scrollend",l)}},wg=(e,t,n)=>{if(t?.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},xg=(e,{adjustments:t=0,behavior:n},i)=>{var s,o;const r=e+t;(o=(s=i.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[i.options.horizontal?"left":"top"]:r,behavior:n})};class Cg{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const r=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var s;(s=i())==null||s.disconnect(),n=null},observe:s=>{var o;return(o=i())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=i())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([i,s])=>{typeof s>"u"&&delete n[i]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:pg,rangeExtractor:mg,onChange:()=>{},measureElement:wg,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var i,s;(s=(i=this.options).onChange)==null||s.call(i,this,n)},this.maybeNotify=qe(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,i)=>{const s=new Map,o=new Map;for(let r=i-1;r>=0;r--){const a=n[r];if(s.has(a.lane))continue;const l=o.get(a.lane);if(l==null||a.end>l.end?o.set(a.lane,a):a.end<l.end&&s.set(a.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((r,a)=>r.end===a.end?r.index-a.index:r.end-a.end)[0]:void 0},this.getMeasurementOptions=qe(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,i,s,o,r)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:i,scrollMargin:s,getItemKey:o,enabled:r}),{key:!1}),this.getMeasurements=qe(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:i,scrollMargin:s,getItemKey:o,enabled:r},a)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<n;c++){const d=o(c),f=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),h=f?f.end+this.options.gap:i+s,p=a.get(d),g=typeof p=="number"?p:this.options.estimateSize(c),x=h+g,w=f?f.lane:c%this.options.lanes;u[c]={index:c,start:h,size:g,end:x,key:d,lane:w}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=qe(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,i,s,o)=>this.range=n.length>0&&i>0?Sg({measurements:n,outerSize:i,scrollOffset:s,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=qe(()=>{let n=null,i=null;const s=this.calculateRange();return s&&(n=s.startIndex,i=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,i]},(n,i,s,o,r)=>o===null||r===null?[]:n({startIndex:o,endIndex:r,overscan:i,count:s}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const i=this.options.indexAttribute,s=n.getAttribute(i);return s?parseInt(s,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this._measureElement=(n,i)=>{const s=this.indexFromElement(n),o=this.measurementsCache[s];if(!o)return;const r=o.key,a=this.elementsCache.get(r);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(r,n)),n.isConnected&&this.resizeItem(s,this.options.measureElement(n,i,this))},this.resizeItem=(n,i)=>{const s=this.measurementsCache[n];if(!s)return;const o=this.itemSizeCache.get(s.key)??s.size,r=i-o;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,r,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",r),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,i)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((i,s)=>{i.isConnected||(this.observer.unobserve(i),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=qe(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,i)=>{const s=[];for(let o=0,r=n.length;o<r;o++){const a=n[o],l=i[a];s.push(l)}return s},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const i=this.getMeasurements();if(i.length!==0)return xo(i[va(0,i.length-1,s=>xo(i[s]).start,n)])},this.getOffsetForAlignment=(n,i,s=0)=>{const o=this.getSize(),r=this.getScrollOffset();i==="auto"&&(i=n>=r+o?"end":"start"),i==="center"?n+=(s-o)/2:i==="end"&&(n-=o);const a=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,i="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.measurementsCache[n];if(!s)return;const o=this.getSize(),r=this.getScrollOffset();if(i==="auto")if(s.end>=r+o-this.options.scrollPaddingEnd)i="end";else if(s.start<=r+this.options.scrollPaddingStart)i="start";else return[r,i];const a=i==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,i,s.size),i]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:i="start",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,i),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:i="auto",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let o=0;const r=10,a=u=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(n,u);if(!c){console.warn("Failed to get offset for index:",n);return}const[d,f]=c;this._scrollToOffset(d,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),p=this.getOffsetForIndex(n,f);if(!p){console.warn("Failed to get offset for index:",n);return}hg(p[0],h)||l(f)})},l=u=>{this.targetWindow&&(o++,o<r?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",o,r),this.targetWindow.requestAnimationFrame(()=>a(u))):console.warn(`Failed to scroll to index ${n} after ${r} attempts.`))};a(i)},this.scrollBy=(n,{behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:i})},this.getTotalSize=()=>{var n;const i=this.getMeasurements();let s;if(i.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=i[i.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let r=i.length-1;for(;r>=0&&o.some(a=>a===null);){const a=i[r];o[a.lane]===null&&(o[a.lane]=a.end),r--}s=Math.max(...o.filter(a=>a!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:i,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:i},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const va=(e,t,n,i)=>{for(;e<=t;){const s=(e+t)/2|0,o=n(s);if(o<i)e=s+1;else if(o>i)t=s-1;else return s}return e>0?e-1:0};function Sg({measurements:e,outerSize:t,scrollOffset:n,lanes:i}){const s=e.length-1,o=l=>e[l].start;if(e.length<=i)return{startIndex:0,endIndex:s};let r=va(0,s,o,n),a=r;if(i===1)for(;a<s&&e[a].end<n+t;)a++;else if(i>1){const l=Array(i).fill(0);for(;a<s&&l.some(c=>c<n+t);){const c=e[a];l[c.lane]=c.end,a++}const u=Array(i).fill(n+t);for(;r>=0&&u.some(c=>c>=n);){const c=e[r];u[c.lane]=c.start,r--}r=Math.max(0,r-r%i),a=Math.min(s,a+(i-1-a%i))}return{startIndex:r,endIndex:a}}const bo=typeof document<"u"?T.useLayoutEffect:T.useEffect;function _g(e){const t=T.useReducer(()=>({}),{})[1],n={...e,onChange:(s,o)=>{var r;o?Vo.flushSync(t):t(),(r=e.onChange)==null||r.call(e,s,o)}},[i]=T.useState(()=>new Cg(n));return i.setOptions(n),bo(()=>i._didMount(),[]),bo(()=>i._willUpdate()),i}function bg(e){return _g({observeElementRect:vg,observeElementOffset:yg,scrollToFn:xg,...e})}const Rg="_main_1qx2l_8",Ro={main:Rg},ya=v.forwardRef(({children:e,className:t,row:n=!1,estimatedItemHeight:i=100,virtualize:s=!1,maxHeight:o=448},r)=>{const a=v.useRef(null),l=v.useMemo(()=>v.Children.toArray(e),[e]),u=bg({count:l.length,getScrollElement:()=>a.current,estimateSize:()=>i,measureElement:d=>d.getBoundingClientRect().height});return v.useImperativeHandle(r,()=>({scrollToTop:()=>u.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>u.scrollToOffset(u.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(d,f={})=>u.scrollToIndex(d,{behavior:"smooth",...f}),scrollToOffset:(d,f={})=>u.scrollToOffset(d,{behavior:"smooth",...f}),scrollBy:d=>{const f=u.scrollOffset||0;u.scrollToOffset(f+d,{behavior:"smooth"})},getElement:()=>a.current,getScrollOffset:()=>u.scrollOffset||0,getTotalSize:()=>u.getTotalSize()}),[u]),v.useMemo(()=>s||l.length>50,[s,l])&&l.length>0?m.jsx(V,{ref:a,row:n,maxHeight:o,className:M.cx(Ro.main,t),w:"full",p:"var(--spacing-2xl)",children:m.jsx(V,{relative:!0,h:u.getTotalSize(),children:u.getVirtualItems().map(d=>m.jsx(V,{"data-index":d.index,ref:u.measureElement,w:"full",absolute:!0,style:{top:0,left:0,transform:`translateY(${d.start}px)`},children:l[d.index]},d.key))})}):m.jsx(V,{ref:a,className:M.cx(Ro.main,t),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:m.jsx(V,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:e})})});ya.displayName="ModalMain";const nn=Fo;nn.Header=pa;nn.Main=ya;nn.Footer=ma;/**
|
|
16
|
+
color: hsl(${Math.max(0,Math.min(120-120*y,120))}deg 100% 31%);`,n?.key)}return(u=n?.onChange)==null||u.call(n,o),o}return s.updateDeps=r=>{i=r},s}function $r(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Rv=(e,t)=>Math.abs(e-t)<1.01,Ev=(e,t,n)=>{let i;return function(...o){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,o),n)}},Or=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Mv=e=>e,Pv=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),i=[];for(let o=t;o<=n;o++)i.push(o);return i},Tv=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const o=r=>{const{width:a,height:l}=r;t({width:Math.round(a),height:Math.round(l)})};if(o(Or(n)),!i.ResizeObserver)return()=>{};const s=new i.ResizeObserver(r=>{const a=()=>{const l=r[0];if(l?.borderBoxSize){const u=l.borderBoxSize[0];if(u){o({width:u.inlineSize,height:u.blockSize});return}}o(Or(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},Br={passive:!0},Nr=typeof window>"u"?!0:"onscrollend"in window,Vv=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;let o=0;const s=e.options.useScrollendEvent&&Nr?()=>{}:Ev(i,()=>{t(o,!1)},e.options.isScrollingResetDelay),r=c=>()=>{const{horizontal:d,isRtl:f}=e.options;o=d?n.scrollLeft*(f&&-1||1):n.scrollTop,s(),t(o,c)},a=r(!0),l=r(!1);l(),n.addEventListener("scroll",a,Br);const u=e.options.useScrollendEvent&&Nr;return u&&n.addEventListener("scrollend",l,Br),()=>{n.removeEventListener("scroll",a),u&&n.removeEventListener("scrollend",l)}},Av=(e,t,n)=>{if(t?.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Dv=(e,{adjustments:t=0,behavior:n},i)=>{var o,s;const r=e+t;(s=(o=i.scrollElement)==null?void 0:o.scrollTo)==null||s.call(o,{[i.options.horizontal?"left":"top"]:r,behavior:n})};class Fv{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(s=>{const r=()=>{this._measureElement(s.target,s)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var o;(o=i())==null||o.disconnect(),n=null},observe:o=>{var s;return(s=i())==null?void 0:s.observe(o,{box:"border-box"})},unobserve:o=>{var s;return(s=i())==null?void 0:s.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([i,o])=>{typeof o>"u"&&delete n[i]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Mv,rangeExtractor:Pv,onChange:()=>{},measureElement:Av,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var i,o;(o=(i=this.options).onChange)==null||o.call(i,this,n)},this.maybeNotify=ct(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,i)=>{const o=new Map,s=new Map;for(let r=i-1;r>=0;r--){const a=n[r];if(o.has(a.lane))continue;const l=s.get(a.lane);if(l==null||a.end>l.end?s.set(a.lane,a):a.end<l.end&&o.set(a.lane,!0),o.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((r,a)=>r.end===a.end?r.index-a.index:r.end-a.end)[0]:void 0},this.getMeasurementOptions=ct(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,i,o,s,r)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:i,scrollMargin:o,getItemKey:s,enabled:r}),{key:!1}),this.getMeasurements=ct(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:i,scrollMargin:o,getItemKey:s,enabled:r},a)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<n;c++){const d=s(c),f=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),h=f?f.end+this.options.gap:i+o,m=a.get(d),g=typeof m=="number"?m:this.options.estimateSize(c),y=h+g,v=f?f.lane:c%this.options.lanes;u[c]={index:c,start:h,size:g,end:y,key:d,lane:v}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=ct(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,i,o,s)=>this.range=n.length>0&&i>0?kv({measurements:n,outerSize:i,scrollOffset:o,lanes:s}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=ct(()=>{let n=null,i=null;const o=this.calculateRange();return o&&(n=o.startIndex,i=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,i]},(n,i,o,s,r)=>s===null||r===null?[]:n({startIndex:s,endIndex:r,overscan:i,count:o}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const i=this.options.indexAttribute,o=n.getAttribute(i);return o?parseInt(o,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this._measureElement=(n,i)=>{const o=this.indexFromElement(n),s=this.measurementsCache[o];if(!s)return;const r=s.key,a=this.elementsCache.get(r);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(r,n)),n.isConnected&&this.resizeItem(o,this.options.measureElement(n,i,this))},this.resizeItem=(n,i)=>{const o=this.measurementsCache[n];if(!o)return;const s=this.itemSizeCache.get(o.key)??o.size,r=i-s;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,r,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",r),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,i)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((i,o)=>{i.isConnected||(this.observer.unobserve(i),this.elementsCache.delete(o))});return}this._measureElement(n,void 0)},this.getVirtualItems=ct(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,i)=>{const o=[];for(let s=0,r=n.length;s<r;s++){const a=n[s],l=i[a];o.push(l)}return o},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const i=this.getMeasurements();if(i.length!==0)return $r(i[eu(0,i.length-1,o=>$r(i[o]).start,n)])},this.getOffsetForAlignment=(n,i,o=0)=>{const s=this.getSize(),r=this.getScrollOffset();i==="auto"&&(i=n>=r+s?"end":"start"),i==="center"?n+=(o-s)/2:i==="end"&&(n-=s);const a=this.getTotalSize()+this.options.scrollMargin-s;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,i="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=this.measurementsCache[n];if(!o)return;const s=this.getSize(),r=this.getScrollOffset();if(i==="auto")if(o.end>=r+s-this.options.scrollPaddingEnd)i="end";else if(o.start<=r+this.options.scrollPaddingStart)i="start";else return[r,i];const a=i==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,i,o.size),i]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:i="start",behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,i),{adjustments:void 0,behavior:o})},this.scrollToIndex=(n,{align:i="auto",behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let s=0;const r=10,a=u=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(n,u);if(!c){console.warn("Failed to get offset for index:",n);return}const[d,f]=c;this._scrollToOffset(d,{adjustments:void 0,behavior:o}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),m=this.getOffsetForIndex(n,f);if(!m){console.warn("Failed to get offset for index:",n);return}Rv(m[0],h)||l(f)})},l=u=>{this.targetWindow&&(s++,s<r?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",s,r),this.targetWindow.requestAnimationFrame(()=>a(u))):console.warn(`Failed to scroll to index ${n} after ${r} attempts.`))};a(i)},this.scrollBy=(n,{behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:i})},this.getTotalSize=()=>{var n;const i=this.getMeasurements();let o;if(i.length===0)o=this.options.paddingStart;else if(this.options.lanes===1)o=((n=i[i.length-1])==null?void 0:n.end)??0;else{const s=Array(this.options.lanes).fill(null);let r=i.length-1;for(;r>=0&&s.some(a=>a===null);){const a=i[r];s[a.lane]===null&&(s[a.lane]=a.end),r--}o=Math.max(...s.filter(a=>a!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:i,behavior:o})=>{this.options.scrollToFn(n,{behavior:o,adjustments:i},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const eu=(e,t,n,i)=>{for(;e<=t;){const o=(e+t)/2|0,s=n(o);if(s<i)e=o+1;else if(s>i)t=o-1;else return o}return e>0?e-1:0};function kv({measurements:e,outerSize:t,scrollOffset:n,lanes:i}){const o=e.length-1,s=l=>e[l].start;if(e.length<=i)return{startIndex:0,endIndex:o};let r=eu(0,o,s,n),a=r;if(i===1)for(;a<o&&e[a].end<n+t;)a++;else if(i>1){const l=Array(i).fill(0);for(;a<o&&l.some(c=>c<n+t);){const c=e[a];l[c.lane]=c.end,a++}const u=Array(i).fill(n+t);for(;r>=0&&u.some(c=>c>=n);){const c=e[r];u[c.lane]=c.start,r--}r=Math.max(0,r-r%i),a=Math.min(o,a+(i-1-a%i))}return{startIndex:r,endIndex:a}}const zr=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Lv(e){const t=S.useReducer(()=>({}),{})[1],n={...e,onChange:(o,s)=>{var r;s?ao.flushSync(t):t(),(r=e.onChange)==null||r.call(e,o,s)}},[i]=S.useState(()=>new Fv(n));return i.setOptions(n),zr(()=>i._didMount(),[]),zr(()=>i._willUpdate()),i}function Iv(e){return Lv({observeElementRect:Tv,observeElementOffset:Vv,scrollToFn:Dv,...e})}const jv="_main_1qx2l_8",Hr={main:jv},tu=C.forwardRef(({children:e,className:t,row:n=!1,estimatedItemHeight:i=100,virtualize:o=!1,maxHeight:s=448},r)=>{const a=C.useRef(null),l=C.useMemo(()=>C.Children.toArray(e),[e]),u=Iv({count:l.length,getScrollElement:()=>a.current,estimateSize:()=>i,measureElement:d=>d.getBoundingClientRect().height});return C.useImperativeHandle(r,()=>({scrollToTop:()=>u.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>u.scrollToOffset(u.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(d,f={})=>u.scrollToIndex(d,{behavior:"smooth",...f}),scrollToOffset:(d,f={})=>u.scrollToOffset(d,{behavior:"smooth",...f}),scrollBy:d=>{const f=u.scrollOffset||0;u.scrollToOffset(f+d,{behavior:"smooth"})},getElement:()=>a.current,getScrollOffset:()=>u.scrollOffset||0,getTotalSize:()=>u.getTotalSize()}),[u]),C.useMemo(()=>o||l.length>50,[o,l])&&l.length>0?x.jsx(I,{ref:a,row:n,maxHeight:s,className:F.cx(Hr.main,t),w:"full",p:"var(--spacing-2xl)",children:x.jsx(I,{relative:!0,h:u.getTotalSize(),children:u.getVirtualItems().map(d=>x.jsx(I,{"data-index":d.index,ref:u.measureElement,w:"full",absolute:!0,style:{top:0,left:0,transform:`translateY(${d.start}px)`},children:l[d.index]},d.key))})}):x.jsx(I,{ref:a,className:F.cx(Hr.main,t),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:x.jsx(I,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:e})})});tu.displayName="ModalMain";const Wn=Zr;Wn.Header=Ql;Wn.Main=tu;Wn.Footer=Jr;/**
|
|
17
17
|
* table-core
|
|
18
18
|
*
|
|
19
19
|
* Copyright (c) TanStack
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
* LICENSE.md file in the root directory of this source tree.
|
|
23
23
|
*
|
|
24
24
|
* @license MIT
|
|
25
|
-
*/function
|
|
25
|
+
*/function $v(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function We(e,t){return typeof e=="function"?e(t):e}function me(e,t){return n=>{t.setState(i=>({...i,[e]:We(n,i[e])}))}}function Gn(e){return e instanceof Function}function Ov(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Bv(e,t){const n=[],i=o=>{o.forEach(s=>{n.push(s);const r=t(s);r!=null&&r.length&&i(r)})};return i(e),n}function O(e,t,n){let i=[],o;return s=>{let r;n.key&&n.debug&&(r=Date.now());const a=e(s);if(!(a.length!==i.length||a.some((c,d)=>i[d]!==c)))return o;i=a;let u;if(n.key&&n.debug&&(u=Date.now()),o=t(...a),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-r)*100)/100,d=Math.round((Date.now()-u)*100)/100,f=d/16,h=(m,g)=>{for(m=String(m);m.length<g;)m=" "+m;return m};console.info(`%c⏱ ${h(d,5)} /${h(c,5)} ms`,`
|
|
26
26
|
font-size: .6rem;
|
|
27
27
|
font-weight: bold;
|
|
28
|
-
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n?.key)}return s}}function F(e,t,n,i){return{debug:()=>{var s;return(s=e?.debugAll)!=null?s:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:i}}function Eg(e,t,n,i){const s=()=>{var r;return(r=o.getValue())!=null?r:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:s,getContext:D(()=>[e,n,t,o],(r,a,l,u)=>({table:r,column:a,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),F(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{r.createCell==null||r.createCell(o,n,t,e)},{}),o}function Vg(e,t,n,i){var s,o;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let u=(s=(o=a.id)!=null?o:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?s:typeof a.header=="string"?a.header:void 0,c;if(a.accessorFn?c=a.accessorFn:l&&(l.includes(".")?c=f=>{let h=f;for(const g of l.split(".")){var p;h=(p=h)==null?void 0:p[g],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${g}" in deeply nested key "${l}" returned undefined.`)}return h}:c=f=>f[a.accessorKey]),!u)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let d={id:`${String(u)}`,accessorFn:c,parent:i,depth:n,columnDef:a,columns:[],getFlatColumns:D(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},F(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:D(()=>[e._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let p=d.columns.flatMap(g=>g.getLeafColumns());return f(p)}return[d]},F(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(d,e);return d}const ae="debugHeaders";function Po(e,t,n){var i;let o={id:(i=n.id)!=null?i:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const r=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),r.push(l)};return a(o),r},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(o,e)}),o}const Ag={createTable:e=>{e.getHeaderGroups=D(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>{var o,r;const a=(o=i?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?o:[],l=(r=s?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?r:[],u=n.filter(d=>!(i!=null&&i.includes(d.id))&&!(s!=null&&s.includes(d.id)));return Lt(t,[...a,...u,...l],e)},F(e.options,ae,"getHeaderGroups")),e.getCenterHeaderGroups=D(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>(n=n.filter(o=>!(i!=null&&i.includes(o.id))&&!(s!=null&&s.includes(o.id))),Lt(t,n,e,"center")),F(e.options,ae,"getCenterHeaderGroups")),e.getLeftHeaderGroups=D(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,i)=>{var s;const o=(s=i?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return Lt(t,o,e,"left")},F(e.options,ae,"getLeftHeaderGroups")),e.getRightHeaderGroups=D(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,i)=>{var s;const o=(s=i?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return Lt(t,o,e,"right")},F(e.options,ae,"getRightHeaderGroups")),e.getFooterGroups=D(()=>[e.getHeaderGroups()],t=>[...t].reverse(),F(e.options,ae,"getFooterGroups")),e.getLeftFooterGroups=D(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),F(e.options,ae,"getLeftFooterGroups")),e.getCenterFooterGroups=D(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),F(e.options,ae,"getCenterFooterGroups")),e.getRightFooterGroups=D(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),F(e.options,ae,"getRightFooterGroups")),e.getFlatHeaders=D(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,ae,"getFlatHeaders")),e.getLeftFlatHeaders=D(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,ae,"getLeftFlatHeaders")),e.getCenterFlatHeaders=D(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,ae,"getCenterFlatHeaders")),e.getRightFlatHeaders=D(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,ae,"getRightFlatHeaders")),e.getCenterLeafHeaders=D(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,ae,"getCenterLeafHeaders")),e.getLeftLeafHeaders=D(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,ae,"getLeftLeafHeaders")),e.getRightLeafHeaders=D(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,ae,"getRightLeafHeaders")),e.getLeafHeaders=D(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,i)=>{var s,o,r,a,l,u;return[...(s=(o=t[0])==null?void 0:o.headers)!=null?s:[],...(r=(a=n[0])==null?void 0:a.headers)!=null?r:[],...(l=(u=i[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},F(e.options,ae,"getLeafHeaders"))}};function Lt(e,t,n,i){var s,o;let r=0;const a=function(f,h){h===void 0&&(h=1),r=Math.max(r,h),f.filter(p=>p.getIsVisible()).forEach(p=>{var g;(g=p.columns)!=null&&g.length&&a(p.columns,h+1)},0)};a(e);let l=[];const u=(f,h)=>{const p={depth:h,id:[i,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];f.forEach(x=>{const w=[...g].reverse()[0],C=x.column.depth===p.depth;let y,S=!1;if(C&&x.column.parent?y=x.column.parent:(y=x.column,S=!0),w&&w?.column===y)w.subHeaders.push(x);else{const _=Po(n,y,{id:[i,h,y.id,x?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${g.filter(b=>b.column===y).length}`:void 0,depth:h,index:g.length});_.subHeaders.push(x),g.push(_)}p.headers.push(x),x.headerGroup=p}),l.push(p),h>0&&u(g,h-1)},c=t.map((f,h)=>Po(n,f,{depth:r,index:h}));u(c,r-1),l.reverse();const d=f=>f.filter(p=>p.column.getIsVisible()).map(p=>{let g=0,x=0,w=[0];p.subHeaders&&p.subHeaders.length?(w=[],d(p.subHeaders).forEach(y=>{let{colSpan:S,rowSpan:_}=y;g+=S,w.push(_)})):g=1;const C=Math.min(...w);return x=x+C,p.colSpan=g,p.rowSpan=x,{colSpan:g,rowSpan:x}});return d((s=(o=l[0])==null?void 0:o.headers)!=null?s:[]),l}const Dg=(e,t,n,i,s,o,r)=>{let a={id:t,index:i,original:n,depth:s,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return a._valuesCache[l]=u.accessorFn(a.original,i),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=u.columnDef.getUniqueValues(a.original,i),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=a.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Tg(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],u=a;for(;;){const c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:D(()=>[e.getAllLeafColumns()],l=>l.map(u=>Eg(e,a,u,u.id)),F(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:D(()=>[a.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),F(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const u=e._features[l];u==null||u.createRow==null||u.createRow(a,e)}return a},Fg={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},wa=(e,t,n)=>{var i,s;const o=n==null||(i=n.toString())==null?void 0:i.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(o))};wa.autoRemove=e=>_e(e);const xa=(e,t,n)=>{var i;return!!(!((i=e.getValue(t))==null||(i=i.toString())==null)&&i.includes(n))};xa.autoRemove=e=>_e(e);const Ca=(e,t,n)=>{var i;return((i=e.getValue(t))==null||(i=i.toString())==null?void 0:i.toLowerCase())===n?.toLowerCase()};Ca.autoRemove=e=>_e(e);const Sa=(e,t,n)=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(n)};Sa.autoRemove=e=>_e(e);const _a=(e,t,n)=>!n.some(i=>{var s;return!((s=e.getValue(t))!=null&&s.includes(i))});_a.autoRemove=e=>_e(e)||!(e!=null&&e.length);const ba=(e,t,n)=>n.some(i=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(i)});ba.autoRemove=e=>_e(e)||!(e!=null&&e.length);const Ra=(e,t,n)=>e.getValue(t)===n;Ra.autoRemove=e=>_e(e);const Pa=(e,t,n)=>e.getValue(t)==n;Pa.autoRemove=e=>_e(e);const Xi=(e,t,n)=>{let[i,s]=n;const o=e.getValue(t);return o>=i&&o<=s};Xi.resolveFilterValue=e=>{let[t,n]=e,i=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(i)?-1/0:i,r=n===null||Number.isNaN(s)?1/0:s;if(o>r){const a=o;o=r,r=a}return[o,r]};Xi.autoRemove=e=>_e(e)||_e(e[0])&&_e(e[1]);const Pe={includesString:wa,includesStringSensitive:xa,equalsString:Ca,arrIncludes:Sa,arrIncludesAll:_a,arrIncludesSome:ba,equals:Ra,weakEquals:Pa,inNumberRange:Xi};function _e(e){return e==null||e===""}const kg={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:fe("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n?.getValue(e.id);return typeof i=="string"?Pe.includesString:typeof i=="number"?Pe.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?Pe.equals:Array.isArray(i)?Pe.arrIncludes:Pe.weakEquals},e.getFilterFn=()=>{var n,i;return sn(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(i=t.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?n:Pe[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((i=t.options.enableColumnFilters)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(i=>i.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,i;return(n=(i=t.getState().columnFilters)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(i=>{const s=e.getFilterFn(),o=i?.find(c=>c.id===e.id),r=De(n,o?o.value:void 0);if(Mo(s,r,e)){var a;return(a=i?.filter(c=>c.id!==e.id))!=null?a:[]}const l={id:e.id,value:r};if(o){var u;return(u=i?.map(c=>c.id===e.id?l:c))!=null?u:[]}return i!=null&&i.length?[...i,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),i=s=>{var o;return(o=De(t,s))==null?void 0:o.filter(r=>{const a=n.find(l=>l.id===r.id);if(a){const l=a.getFilterFn();if(Mo(l,r.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=t=>{var n,i;e.setColumnFilters(t?[]:(n=(i=e.initialState)==null?void 0:i.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Mo(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Ig=(e,t,n)=>n.reduce((i,s)=>{const o=s.getValue(e);return i+(typeof o=="number"?o:0)},0),Lg=(e,t,n)=>{let i;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(i>o||i===void 0&&o>=o)&&(i=o)}),i},jg=(e,t,n)=>{let i;return n.forEach(s=>{const o=s.getValue(e);o!=null&&(i<o||i===void 0&&o>=o)&&(i=o)}),i},$g=(e,t,n)=>{let i,s;return n.forEach(o=>{const r=o.getValue(e);r!=null&&(i===void 0?r>=r&&(i=s=r):(i>r&&(i=r),s<r&&(s=r)))}),[i,s]},Og=(e,t)=>{let n=0,i=0;if(t.forEach(s=>{let o=s.getValue(e);o!=null&&(o=+o)>=o&&(++n,i+=o)}),n)return i/n},zg=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!Mg(n))return;if(n.length===1)return n[0];const i=Math.floor(n.length/2),s=n.sort((o,r)=>o-r);return n.length%2!==0?s[i]:(s[i-1]+s[i])/2},Bg=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Ng=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Hg=(e,t)=>t.length,An={sum:Ig,min:Lg,max:jg,extent:$g,mean:Og,median:zg,unique:Bg,uniqueCount:Ng,count:Hg},Gg={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:fe("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(i=>i!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,i;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((i=t.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n?.getValue(e.id);if(typeof i=="number")return An.sum;if(Object.prototype.toString.call(i)==="[object Date]")return An.extent},e.getAggregationFn=()=>{var n,i;if(!e)throw new Error;return sn(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(i=t.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?n:An[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i;e.setGrouping(t?[]:(n=(i=e.initialState)==null?void 0:i.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const i=t.getColumn(n);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=n.subRows)!=null&&s.length)}}};function Wg(e,t,n){if(!(t!=null&&t.length)||!n)return e;const i=e.filter(o=>!t.includes(o.id));return n==="remove"?i:[...t.map(o=>e.find(r=>r.id===o)).filter(Boolean),...i]}const Ug={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:fe("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=D(n=>[vt(t,n)],n=>n.findIndex(i=>i.id===e.id),F(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var i;return((i=vt(t,n)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i;const s=vt(t,n);return((i=s[s.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=D(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,i)=>s=>{let o=[];if(!(t!=null&&t.length))o=s;else{const r=[...t],a=[...s];for(;a.length&&r.length;){const l=r.shift(),u=a.findIndex(c=>c.id===l);u>-1&&o.push(a.splice(u,1)[0])}o=[...o,...a]}return Wg(o,n,i)},F(e.options,"debugTable","_getOrderColumnsFn"))}},Dn=()=>({left:[],right:[]}),Kg={getInitialState:e=>({columnPinning:Dn(),...e}),getDefaultOptions:e=>({onColumnPinningChange:fe("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const i=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var o,r;if(n==="right"){var a,l;return{left:((a=s?.left)!=null?a:[]).filter(d=>!(i!=null&&i.includes(d))),right:[...((l=s?.right)!=null?l:[]).filter(d=>!(i!=null&&i.includes(d))),...i]}}if(n==="left"){var u,c;return{left:[...((u=s?.left)!=null?u:[]).filter(d=>!(i!=null&&i.includes(d))),...i],right:((c=s?.right)!=null?c:[]).filter(d=>!(i!=null&&i.includes(d)))}}return{left:((o=s?.left)!=null?o:[]).filter(d=>!(i!=null&&i.includes(d))),right:((r=s?.right)!=null?r:[]).filter(d=>!(i!=null&&i.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var s,o,r;return((s=i.columnDef.enablePinning)!=null?s:!0)&&((o=(r=t.options.enableColumnPinning)!=null?r:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:i,right:s}=t.getState().columnPinning,o=n.some(a=>i?.includes(a)),r=n.some(a=>s?.includes(a));return o?"left":r?"right":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();return s?(n=(i=t.getState().columnPinning)==null||(i=i[s])==null?void 0:i.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=D(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,i,s)=>{const o=[...i??[],...s??[]];return n.filter(r=>!o.includes(r.column.id))},F(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=D(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,i)=>(i??[]).map(o=>n.find(r=>r.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),F(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=D(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,i)=>(i??[]).map(o=>n.find(r=>r.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),F(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i;return e.setColumnPinning(t?Dn():(n=(i=e.initialState)==null?void 0:i.columnPinning)!=null?n:Dn())},e.getIsSomeColumnsPinned=t=>{var n;const i=e.getState().columnPinning;if(!t){var s,o;return!!((s=i.left)!=null&&s.length||(o=i.right)!=null&&o.length)}return!!((n=i[t])!=null&&n.length)},e.getLeftLeafColumns=D(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),F(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=D(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),F(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=D(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i)=>{const s=[...n??[],...i??[]];return t.filter(o=>!s.includes(o.id))},F(e.options,"debugColumns","getCenterLeafColumns"))}};function qg(e){return e||(typeof document<"u"?document:null)}const jt={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Fn=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Xg={getDefaultColumnDef:()=>jt,getInitialState:e=>({columnSizing:{},columnSizingInfo:Fn(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:fe("columnSizing",e),onColumnSizingInfoChange:fe("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,s;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:jt.minSize,(i=o??e.columnDef.size)!=null?i:jt.size),(s=e.columnDef.maxSize)!=null?s:jt.maxSize)},e.getStart=D(n=>[n,vt(t,n),t.getState().columnSizing],(n,i)=>i.slice(0,e.getIndex(n)).reduce((s,o)=>s+o.getSize(),0),F(t.options,"debugColumns","getStart")),e.getAfter=D(n=>[n,vt(t,n),t.getState().columnSizing],(n,i)=>i.slice(e.getIndex(n)+1).reduce((s,o)=>s+o.getSize(),0),F(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:i,...s}=n;return s})},e.getCanResize=()=>{var n,i;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((i=t.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const i=s=>{if(s.subHeaders.length)s.subHeaders.forEach(i);else{var o;n+=(o=s.column.getSize())!=null?o:0}};return i(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const i=t.getColumn(e.column.id),s=i?.getCanResize();return o=>{if(!i||!s||(o.persist==null||o.persist(),kn(o)&&o.touches&&o.touches.length>1))return;const r=e.getSize(),a=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[i.id,i.getSize()]],l=kn(o)?Math.round(o.touches[0].clientX):o.clientX,u={},c=(w,C)=>{typeof C=="number"&&(t.setColumnSizingInfo(y=>{var S,_;const b=t.options.columnResizeDirection==="rtl"?-1:1,E=(C-((S=y?.startOffset)!=null?S:0))*b,R=Math.max(E/((_=y?.startSize)!=null?_:0),-.999999);return y.columnSizingStart.forEach(A=>{let[L,B]=A;u[L]=Math.round(Math.max(B+B*R,0)*100)/100}),{...y,deltaOffset:E,deltaPercentage:R}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(y=>({...y,...u})))},d=w=>c("move",w),f=w=>{c("end",w),t.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=qg(n),p={moveHandler:w=>d(w.clientX),upHandler:w=>{h?.removeEventListener("mousemove",p.moveHandler),h?.removeEventListener("mouseup",p.upHandler),f(w.clientX)}},g={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),d(w.touches[0].clientX),!1),upHandler:w=>{var C;h?.removeEventListener("touchmove",g.moveHandler),h?.removeEventListener("touchend",g.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),f((C=w.touches[0])==null?void 0:C.clientX)}},x=Yg()?{passive:!1}:!1;kn(o)?(h?.addEventListener("touchmove",g.moveHandler,x),h?.addEventListener("touchend",g.upHandler,x)):(h?.addEventListener("mousemove",p.moveHandler,x),h?.addEventListener("mouseup",p.upHandler,x)),t.setColumnSizingInfo(w=>({...w,startOffset:l,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Fn():(n=e.initialState.columnSizingInfo)!=null?n:Fn())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0}}};let $t=null;function Yg(){if(typeof $t=="boolean")return $t;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return $t=e,$t}function kn(e){return e.type==="touchstart"}const Zg={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:fe("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(i=>({...i,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,i;const s=e.columns;return(n=s.length?s.some(o=>o.getIsVisible()):(i=t.getState().columnVisibility)==null?void 0:i[e.id])!=null?n:!0},e.getCanHide=()=>{var n,i;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((i=t.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=D(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(i=>i.column.getIsVisible()),F(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=D(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,i,s)=>[...n,...i,...s],F(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,i)=>D(()=>[i(),i().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),F(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var i;e.setColumnVisibility(n?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=n=>{var i;n=(i=n)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,o)=>({...s,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var i;e.toggleAllColumnsVisible((i=n.target)==null?void 0:i.checked)}}};function vt(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Jg={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Qg={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:fe("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const i=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,s,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((i=t.options.enableGlobalFilter)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Pe.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:i}=e.options;return sn(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[i])!=null?t:Pe[i]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},ep={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:fe("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var s,o;e.setExpanded(i?{}:(s=(o=e.initialState)==null?void 0:o.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const r=o.split(".");i=Math.max(i,r.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(i=>{var s;const o=i===!0?!0:!!(i!=null&&i[e.id]);let r={};if(i===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{r[a]=!0}):r=i,n=(s=n)!=null?s:!o,!o&&n)return{...r,[e.id]:!0};if(o&&!n){const{[e.id]:a,...l}=r;return l}return i})},e.getIsExpanded=()=>{var n;const i=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:i===!0||i?.[e.id])},e.getCanExpand=()=>{var n,i,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((i=t.options.enableExpanding)!=null?i:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e;for(;n&&i.parentId;)i=t.getRow(i.parentId,!0),n=i.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},ai=0,li=10,In=()=>({pageIndex:ai,pageSize:li}),tp={getInitialState:e=>({...e,pagination:{...In(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:fe("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=i=>{const s=o=>De(i,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=i=>{var s;e.setPagination(i?In():(s=e.initialState.pagination)!=null?s:In())},e.setPageIndex=i=>{e.setPagination(s=>{let o=De(i,s.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,r)),{...s,pageIndex:o}})},e.resetPageIndex=i=>{var s,o;e.setPageIndex(i?ai:(s=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?s:ai)},e.resetPageSize=i=>{var s,o;e.setPageSize(i?li:(s=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?s:li)},e.setPageSize=i=>{e.setPagination(s=>{const o=Math.max(1,De(i,s.pageSize)),r=s.pageSize*s.pageIndex,a=Math.floor(r/o);return{...s,pageIndex:a,pageSize:o}})},e.setPageCount=i=>e.setPagination(s=>{var o;let r=De(i,(o=e.options.pageCount)!=null?o:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...s,pageCount:r}}),e.getPageOptions=D(()=>[e.getPageCount()],i=>{let s=[];return i&&i>0&&(s=[...new Array(i)].fill(null).map((o,r)=>r)),s},F(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:i<s-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},Ln=()=>({top:[],bottom:[]}),np={getInitialState:e=>({rowPinning:Ln(),...e}),getDefaultOptions:e=>({onRowPinningChange:fe("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,s)=>{const o=i?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],r=s?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],a=new Set([...r,e.id,...o]);t.setRowPinning(l=>{var u,c;if(n==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var h,p;return{top:[...((h=l?.top)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((p=l?.bottom)!=null?p:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((u=l?.top)!=null?u:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((c=l?.bottom)!=null?c:[]).filter(g=>!(a!=null&&a.has(g)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:i,enablePinning:s}=t.options;return typeof i=="function"?i(e):(n=i??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:i,bottom:s}=t.getState().rowPinning,o=n.some(a=>i?.includes(a)),r=n.some(a=>s?.includes(a));return o?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();if(!s)return-1;const o=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(r=>{let{id:a}=r;return a});return(i=o?.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,i;return e.setRowPinning(t?Ln():(n=(i=e.initialState)==null?void 0:i.rowPinning)!=null?n:Ln())},e.getIsSomeRowsPinned=t=>{var n;const i=e.getState().rowPinning;if(!t){var s,o;return!!((s=i.top)!=null&&s.length||(o=i.bottom)!=null&&o.length)}return!!((n=i[t])!=null&&n.length)},e._getPinnedRows=(t,n,i)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(r=>{const a=e.getRow(r,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(r=>t.find(a=>a.id===r))).filter(Boolean).map(r=>({...r,position:i}))},e.getTopRows=D(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),F(e.options,"debugRows","getTopRows")),e.getBottomRows=D(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),F(e.options,"debugRows","getBottomRows")),e.getCenterRows=D(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,i)=>{const s=new Set([...n??[],...i??[]]);return t.filter(o=>!s.has(o.id))},F(e.options,"debugRows","getCenterRows"))}},ip={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:fe("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const i={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(o=>{o.getCanSelect()&&(i[o.id]=!0)}):s.forEach(o=>{delete i[o.id]}),i})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const i=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(o=>{ui(s,o.id,i,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=D(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?jn(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=D(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?jn(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=D(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?jn(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let i=!!(t.length&&Object.keys(n).length);return i&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let i=!!t.length;return i&&t.some(s=>!n[s.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,i)=>{const s=e.getIsSelected();t.setRowSelection(o=>{var r;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return o;const a={...o};return ui(a,e.id,n,(r=i?.selectChildren)!=null?r:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Yi(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return ci(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return ci(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return i=>{var s;n&&e.toggleSelected((s=i.target)==null?void 0:s.checked)}}}},ui=(e,t,n,i,s)=>{var o;const r=s.getRow(t,!0);n?(r.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),r.getCanSelect()&&(e[t]=!0)):delete e[t],i&&(o=r.subRows)!=null&&o.length&&r.getCanSelectSubRows()&&r.subRows.forEach(a=>ui(e,a.id,n,i,s))};function jn(e,t){const n=e.getState().rowSelection,i=[],s={},o=function(r,a){return r.map(l=>{var u;const c=Yi(l,n);if(c&&(i.push(l),s[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:o(l.subRows)}),c)return l}).filter(Boolean)};return{rows:o(t.rows),flatRows:i,rowsById:s}}function Yi(e,t){var n;return(n=t[e.id])!=null?n:!1}function ci(e,t,n){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let s=!0,o=!1;return e.subRows.forEach(r=>{if(!(o&&!s)&&(r.getCanSelect()&&(Yi(r,t)?o=!0:s=!1),r.subRows&&r.subRows.length)){const a=ci(r,t);a==="all"?o=!0:(a==="some"&&(o=!0),s=!1)}}),s?"all":o?"some":!1}const di=/([0-9]+)/gm,sp=(e,t,n)=>Ma(Ie(e.getValue(n)).toLowerCase(),Ie(t.getValue(n)).toLowerCase()),op=(e,t,n)=>Ma(Ie(e.getValue(n)),Ie(t.getValue(n))),rp=(e,t,n)=>Zi(Ie(e.getValue(n)).toLowerCase(),Ie(t.getValue(n)).toLowerCase()),ap=(e,t,n)=>Zi(Ie(e.getValue(n)),Ie(t.getValue(n))),lp=(e,t,n)=>{const i=e.getValue(n),s=t.getValue(n);return i>s?1:i<s?-1:0},up=(e,t,n)=>Zi(e.getValue(n),t.getValue(n));function Zi(e,t){return e===t?0:e>t?1:-1}function Ie(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Ma(e,t){const n=e.split(di).filter(Boolean),i=t.split(di).filter(Boolean);for(;n.length&&i.length;){const s=n.shift(),o=i.shift(),r=parseInt(s,10),a=parseInt(o,10),l=[r,a].sort();if(isNaN(l[0])){if(s>o)return 1;if(o>s)return-1;continue}if(isNaN(l[1]))return isNaN(r)?-1:1;if(r>a)return 1;if(a>r)return-1}return n.length-i.length}const dt={alphanumeric:sp,alphanumericCaseSensitive:op,text:rp,textCaseSensitive:ap,datetime:lp,basic:up},cp={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:fe("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const s of n){const o=s?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return dt.datetime;if(typeof o=="string"&&(i=!0,o.split(di).length>1))return dt.alphanumeric}return i?dt.text:dt.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,i;if(!e)throw new Error;return sn(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(i=t.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?n:dt[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{const s=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(r=>{const a=r?.find(h=>h.id===e.id),l=r?.findIndex(h=>h.id===e.id);let u=[],c,d=o?n:s==="desc";if(r!=null&&r.length&&e.getCanMultiSort()&&i?a?c="toggle":c="add":r!=null&&r.length&&l!==r.length-1?c="replace":a?c="toggle":c="replace",c==="toggle"&&(o||s||(c="remove")),c==="add"){var f;u=[...r,{id:e.id,desc:d}],u.splice(0,u.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=r.map(h=>h.id===e.id?{...h,desc:d}:h):c==="remove"?u=r.filter(h=>h.id!==e.id):u=[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var n,i;return((n=(i=e.columnDef.sortDescFirst)!=null?i:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var i,s;const o=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==o&&((i=t.options.enableSortingRemoval)==null||i)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:r==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,i;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((i=t.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,i;return(n=(i=e.columnDef.enableMultiSort)!=null?i:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const i=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,i;return(n=(i=t.getState().sorting)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return i=>{n&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i;e.setSorting(t?[]:(n=(i=e.initialState)==null?void 0:i.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},dp=[Ag,Zg,Ug,Kg,Fg,kg,Jg,Qg,cp,Gg,ep,tp,np,ip,Xg];function fp(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const i=[...dp,...(t=e._features)!=null?t:[]];let s={_features:i};const o=s._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(s)),{}),r=f=>s.options.mergeOptions?s.options.mergeOptions(o,f):{...o,...f};let l={...{},...(n=e.initialState)!=null?n:{}};s._features.forEach(f=>{var h;l=(h=f.getInitialState==null?void 0:f.getInitialState(l))!=null?h:l});const u=[];let c=!1;const d={_features:i,options:{...o,...e},initialState:l,_queue:f=>{u.push(f),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{s.setState(s.initialState)},setOptions:f=>{const h=De(f,s.options);s.options=r(h)},getState:()=>s.options.state,setState:f=>{s.options.onStateChange==null||s.options.onStateChange(f)},_getRowId:(f,h,p)=>{var g;return(g=s.options.getRowId==null?void 0:s.options.getRowId(f,h,p))!=null?g:`${p?[p.id,h].join("."):h}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(f,h)=>{let p=(h?s.getPrePaginationRowModel():s.getRowModel()).rowsById[f];if(!p&&(p=s.getCoreRowModel().rowsById[f],!p))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${f}`):new Error;return p},_getDefaultColumnDef:D(()=>[s.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:p=>{const g=p.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:p=>{var g,x;return(g=(x=p.renderValue())==null||x.toString==null?void 0:x.toString())!=null?g:null},...s._features.reduce((p,g)=>Object.assign(p,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...f}},F(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>s.options.columns,getAllColumns:D(()=>[s._getColumnDefs()],f=>{const h=function(p,g,x){return x===void 0&&(x=0),p.map(w=>{const C=Vg(s,w,x,g),y=w;return C.columns=y.columns?h(y.columns,C,x+1):[],C})};return h(f)},F(e,"debugColumns","getAllColumns")),getAllFlatColumns:D(()=>[s.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),F(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:D(()=>[s.getAllFlatColumns()],f=>f.reduce((h,p)=>(h[p.id]=p,h),{}),F(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:D(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(f,h)=>{let p=f.flatMap(g=>g.getLeafColumns());return h(p)},F(e,"debugColumns","getAllLeafColumns")),getColumn:f=>{const h=s._getAllFlatColumnsById()[f];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${f}' does not exist.`),h}};Object.assign(s,d);for(let f=0;f<s._features.length;f++){const h=s._features[f];h==null||h.createTable==null||h.createTable(s)}return s}function hp(){return e=>D(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(s,o,r){o===void 0&&(o=0);const a=[];for(let u=0;u<s.length;u++){const c=Dg(e,e._getRowId(s[u],u,r),s[u],u,o,void 0,r?.id);if(n.flatRows.push(c),n.rowsById[c.id]=c,a.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(s[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=i(c.originalSubRows,o+1,c))}}return a};return n.rows=i(t),n},F(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function gp(e){const t=[],n=i=>{var s;t.push(i),(s=i.subRows)!=null&&s.length&&i.getIsExpanded()&&i.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function pp(e){return t=>D(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,i)=>{if(!i.rows.length)return i;const{pageSize:s,pageIndex:o}=n;let{rows:r,flatRows:a,rowsById:l}=i;const u=s*o,c=u+s;r=r.slice(u,c);let d;t.options.paginateExpandedRows?d={rows:r,flatRows:a,rowsById:l}:d=gp({rows:r,flatRows:a,rowsById:l}),d.flatRows=[];const f=h=>{d.flatRows.push(h),h.subRows.length&&h.subRows.forEach(f)};return d.rows.forEach(f),d},F(t.options,"debugTable","getPaginationRowModel"))}function mp(){return e=>D(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const i=e.getState().sorting,s=[],o=i.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),r={};o.forEach(l=>{const u=e.getColumn(l.id);u&&(r[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const a=l=>{const u=l.map(c=>({...c}));return u.sort((c,d)=>{for(let h=0;h<o.length;h+=1){var f;const p=o[h],g=r[p.id],x=g.sortUndefined,w=(f=p?.desc)!=null?f:!1;let C=0;if(x){const y=c.getValue(p.id),S=d.getValue(p.id),_=y===void 0,b=S===void 0;if(_||b){if(x==="first")return _?-1:1;if(x==="last")return _?1:-1;C=_&&b?0:_?x:-x}}if(C===0&&(C=g.sortingFn(c,d,p.id)),C!==0)return w&&(C*=-1),g.invertSorting&&(C*=-1),C}return c.index-d.index}),u.forEach(c=>{var d;s.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=a(c.subRows))}),u};return{rows:a(n.rows),flatRows:s,rowsById:n.rowsById}},F(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
|
|
28
|
+
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n?.key)}return o}}function B(e,t,n,i){return{debug:()=>{var o;return(o=e?.debugAll)!=null?o:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:i}}function Nv(e,t,n,i){const o=()=>{var r;return(r=s.getValue())!=null?r:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:o,getContext:O(()=>[e,n,t,s],(r,a,l,u)=>({table:r,column:a,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),B(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{r.createCell==null||r.createCell(s,n,t,e)},{}),s}function zv(e,t,n,i){var o,s;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let u=(o=(s=a.id)!=null?s:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?o:typeof a.header=="string"?a.header:void 0,c;if(a.accessorFn?c=a.accessorFn:l&&(l.includes(".")?c=f=>{let h=f;for(const g of l.split(".")){var m;h=(m=h)==null?void 0:m[g],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${g}" in deeply nested key "${l}" returned undefined.`)}return h}:c=f=>f[a.accessorKey]),!u)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let d={id:`${String(u)}`,accessorFn:c,parent:i,depth:n,columnDef:a,columns:[],getFlatColumns:O(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},B(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:O(()=>[e._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let m=d.columns.flatMap(g=>g.getLeafColumns());return f(m)}return[d]},B(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(d,e);return d}const re="debugHeaders";function Wr(e,t,n){var i;let s={id:(i=n.id)!=null?i:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const r=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),r.push(l)};return a(s),r},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(s,e)}),s}const Hv={createTable:e=>{e.getHeaderGroups=O(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,o)=>{var s,r;const a=(s=i?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?s:[],l=(r=o?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?r:[],u=n.filter(d=>!(i!=null&&i.includes(d.id))&&!(o!=null&&o.includes(d.id)));return hn(t,[...a,...u,...l],e)},B(e.options,re,"getHeaderGroups")),e.getCenterHeaderGroups=O(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,o)=>(n=n.filter(s=>!(i!=null&&i.includes(s.id))&&!(o!=null&&o.includes(s.id))),hn(t,n,e,"center")),B(e.options,re,"getCenterHeaderGroups")),e.getLeftHeaderGroups=O(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,i)=>{var o;const s=(o=i?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?o:[];return hn(t,s,e,"left")},B(e.options,re,"getLeftHeaderGroups")),e.getRightHeaderGroups=O(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,i)=>{var o;const s=(o=i?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?o:[];return hn(t,s,e,"right")},B(e.options,re,"getRightHeaderGroups")),e.getFooterGroups=O(()=>[e.getHeaderGroups()],t=>[...t].reverse(),B(e.options,re,"getFooterGroups")),e.getLeftFooterGroups=O(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),B(e.options,re,"getLeftFooterGroups")),e.getCenterFooterGroups=O(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),B(e.options,re,"getCenterFooterGroups")),e.getRightFooterGroups=O(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),B(e.options,re,"getRightFooterGroups")),e.getFlatHeaders=O(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),B(e.options,re,"getFlatHeaders")),e.getLeftFlatHeaders=O(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),B(e.options,re,"getLeftFlatHeaders")),e.getCenterFlatHeaders=O(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),B(e.options,re,"getCenterFlatHeaders")),e.getRightFlatHeaders=O(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),B(e.options,re,"getRightFlatHeaders")),e.getCenterLeafHeaders=O(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),B(e.options,re,"getCenterLeafHeaders")),e.getLeftLeafHeaders=O(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),B(e.options,re,"getLeftLeafHeaders")),e.getRightLeafHeaders=O(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),B(e.options,re,"getRightLeafHeaders")),e.getLeafHeaders=O(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,i)=>{var o,s,r,a,l,u;return[...(o=(s=t[0])==null?void 0:s.headers)!=null?o:[],...(r=(a=n[0])==null?void 0:a.headers)!=null?r:[],...(l=(u=i[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},B(e.options,re,"getLeafHeaders"))}};function hn(e,t,n,i){var o,s;let r=0;const a=function(f,h){h===void 0&&(h=1),r=Math.max(r,h),f.filter(m=>m.getIsVisible()).forEach(m=>{var g;(g=m.columns)!=null&&g.length&&a(m.columns,h+1)},0)};a(e);let l=[];const u=(f,h)=>{const m={depth:h,id:[i,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];f.forEach(y=>{const v=[...g].reverse()[0],w=y.column.depth===m.depth;let p,b=!1;if(w&&y.column.parent?p=y.column.parent:(p=y.column,b=!0),v&&v?.column===p)v.subHeaders.push(y);else{const _=Wr(n,p,{id:[i,h,p.id,y?.id].filter(Boolean).join("_"),isPlaceholder:b,placeholderId:b?`${g.filter(E=>E.column===p).length}`:void 0,depth:h,index:g.length});_.subHeaders.push(y),g.push(_)}m.headers.push(y),y.headerGroup=m}),l.push(m),h>0&&u(g,h-1)},c=t.map((f,h)=>Wr(n,f,{depth:r,index:h}));u(c,r-1),l.reverse();const d=f=>f.filter(m=>m.column.getIsVisible()).map(m=>{let g=0,y=0,v=[0];m.subHeaders&&m.subHeaders.length?(v=[],d(m.subHeaders).forEach(p=>{let{colSpan:b,rowSpan:_}=p;g+=b,v.push(_)})):g=1;const w=Math.min(...v);return y=y+w,m.colSpan=g,m.rowSpan=y,{colSpan:g,rowSpan:y}});return d((o=(s=l[0])==null?void 0:s.headers)!=null?o:[]),l}const Wv=(e,t,n,i,o,s,r)=>{let a={id:t,index:i,original:n,depth:o,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return a._valuesCache[l]=u.accessorFn(a.original,i),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=u.columnDef.getUniqueValues(a.original,i),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=a.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Bv(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],u=a;for(;;){const c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:O(()=>[e.getAllLeafColumns()],l=>l.map(u=>Nv(e,a,u,u.id)),B(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:O(()=>[a.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),B(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const u=e._features[l];u==null||u.createRow==null||u.createRow(a,e)}return a},Gv={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},nu=(e,t,n)=>{var i,o;const s=n==null||(i=n.toString())==null?void 0:i.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(s))};nu.autoRemove=e=>Me(e);const iu=(e,t,n)=>{var i;return!!(!((i=e.getValue(t))==null||(i=i.toString())==null)&&i.includes(n))};iu.autoRemove=e=>Me(e);const ou=(e,t,n)=>{var i;return((i=e.getValue(t))==null||(i=i.toString())==null?void 0:i.toLowerCase())===n?.toLowerCase()};ou.autoRemove=e=>Me(e);const su=(e,t,n)=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(n)};su.autoRemove=e=>Me(e);const ru=(e,t,n)=>!n.some(i=>{var o;return!((o=e.getValue(t))!=null&&o.includes(i))});ru.autoRemove=e=>Me(e)||!(e!=null&&e.length);const au=(e,t,n)=>n.some(i=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(i)});au.autoRemove=e=>Me(e)||!(e!=null&&e.length);const lu=(e,t,n)=>e.getValue(t)===n;lu.autoRemove=e=>Me(e);const uu=(e,t,n)=>e.getValue(t)==n;uu.autoRemove=e=>Me(e);const Zo=(e,t,n)=>{let[i,o]=n;const s=e.getValue(t);return s>=i&&s<=o};Zo.resolveFilterValue=e=>{let[t,n]=e,i=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(i)?-1/0:i,r=n===null||Number.isNaN(o)?1/0:o;if(s>r){const a=s;s=r,r=a}return[s,r]};Zo.autoRemove=e=>Me(e)||Me(e[0])&&Me(e[1]);const Le={includesString:nu,includesStringSensitive:iu,equalsString:ou,arrIncludes:su,arrIncludesAll:ru,arrIncludesSome:au,equals:lu,weakEquals:uu,inNumberRange:Zo};function Me(e){return e==null||e===""}const Uv={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:me("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n?.getValue(e.id);return typeof i=="string"?Le.includesString:typeof i=="number"?Le.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?Le.equals:Array.isArray(i)?Le.arrIncludes:Le.weakEquals},e.getFilterFn=()=>{var n,i;return Gn(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(i=t.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?n:Le[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((i=t.options.enableColumnFilters)!=null?i:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(i=>i.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,i;return(n=(i=t.getState().columnFilters)==null?void 0:i.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(i=>{const o=e.getFilterFn(),s=i?.find(c=>c.id===e.id),r=We(n,s?s.value:void 0);if(Gr(o,r,e)){var a;return(a=i?.filter(c=>c.id!==e.id))!=null?a:[]}const l={id:e.id,value:r};if(s){var u;return(u=i?.map(c=>c.id===e.id?l:c))!=null?u:[]}return i!=null&&i.length?[...i,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),i=o=>{var s;return(s=We(t,o))==null?void 0:s.filter(r=>{const a=n.find(l=>l.id===r.id);if(a){const l=a.getFilterFn();if(Gr(l,r.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=t=>{var n,i;e.setColumnFilters(t?[]:(n=(i=e.initialState)==null?void 0:i.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Gr(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Kv=(e,t,n)=>n.reduce((i,o)=>{const s=o.getValue(e);return i+(typeof s=="number"?s:0)},0),qv=(e,t,n)=>{let i;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(i>s||i===void 0&&s>=s)&&(i=s)}),i},Xv=(e,t,n)=>{let i;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(i<s||i===void 0&&s>=s)&&(i=s)}),i},Yv=(e,t,n)=>{let i,o;return n.forEach(s=>{const r=s.getValue(e);r!=null&&(i===void 0?r>=r&&(i=o=r):(i>r&&(i=r),o<r&&(o=r)))}),[i,o]},Zv=(e,t)=>{let n=0,i=0;if(t.forEach(o=>{let s=o.getValue(e);s!=null&&(s=+s)>=s&&(++n,i+=s)}),n)return i/n},Jv=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!Ov(n))return;if(n.length===1)return n[0];const i=Math.floor(n.length/2),o=n.sort((s,r)=>s-r);return n.length%2!==0?o[i]:(o[i-1]+o[i])/2},Qv=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),ey=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,ty=(e,t)=>t.length,Ci={sum:Kv,min:qv,max:Xv,extent:Yv,mean:Zv,median:Jv,unique:Qv,uniqueCount:ey,count:ty},ny={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:me("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(i=>i!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,i;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((i=t.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n?.getValue(e.id);if(typeof i=="number")return Ci.sum;if(Object.prototype.toString.call(i)==="[object Date]")return Ci.extent},e.getAggregationFn=()=>{var n,i;if(!e)throw new Error;return Gn(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(i=t.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?n:Ci[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i;e.setGrouping(t?[]:(n=(i=e.initialState)==null?void 0:i.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const i=t.getColumn(n);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function iy(e,t,n){if(!(t!=null&&t.length)||!n)return e;const i=e.filter(s=>!t.includes(s.id));return n==="remove"?i:[...t.map(s=>e.find(r=>r.id===s)).filter(Boolean),...i]}const oy={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:me("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=O(n=>[Nt(t,n)],n=>n.findIndex(i=>i.id===e.id),B(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var i;return((i=Nt(t,n)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i;const o=Nt(t,n);return((i=o[o.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=O(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,i)=>o=>{let s=[];if(!(t!=null&&t.length))s=o;else{const r=[...t],a=[...o];for(;a.length&&r.length;){const l=r.shift(),u=a.findIndex(c=>c.id===l);u>-1&&s.push(a.splice(u,1)[0])}s=[...s,...a]}return iy(s,n,i)},B(e.options,"debugTable","_getOrderColumnsFn"))}},Si=()=>({left:[],right:[]}),sy={getInitialState:e=>({columnPinning:Si(),...e}),getDefaultOptions:e=>({onColumnPinningChange:me("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const i=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var s,r;if(n==="right"){var a,l;return{left:((a=o?.left)!=null?a:[]).filter(d=>!(i!=null&&i.includes(d))),right:[...((l=o?.right)!=null?l:[]).filter(d=>!(i!=null&&i.includes(d))),...i]}}if(n==="left"){var u,c;return{left:[...((u=o?.left)!=null?u:[]).filter(d=>!(i!=null&&i.includes(d))),...i],right:((c=o?.right)!=null?c:[]).filter(d=>!(i!=null&&i.includes(d)))}}return{left:((s=o?.left)!=null?s:[]).filter(d=>!(i!=null&&i.includes(d))),right:((r=o?.right)!=null?r:[]).filter(d=>!(i!=null&&i.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var o,s,r;return((o=i.columnDef.enablePinning)!=null?o:!0)&&((s=(r=t.options.enableColumnPinning)!=null?r:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:i,right:o}=t.getState().columnPinning,s=n.some(a=>i?.includes(a)),r=n.some(a=>o?.includes(a));return s?"left":r?"right":!1},e.getPinnedIndex=()=>{var n,i;const o=e.getIsPinned();return o?(n=(i=t.getState().columnPinning)==null||(i=i[o])==null?void 0:i.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=O(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,i,o)=>{const s=[...i??[],...o??[]];return n.filter(r=>!s.includes(r.column.id))},B(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=O(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,i)=>(i??[]).map(s=>n.find(r=>r.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),B(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=O(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,i)=>(i??[]).map(s=>n.find(r=>r.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),B(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i;return e.setColumnPinning(t?Si():(n=(i=e.initialState)==null?void 0:i.columnPinning)!=null?n:Si())},e.getIsSomeColumnsPinned=t=>{var n;const i=e.getState().columnPinning;if(!t){var o,s;return!!((o=i.left)!=null&&o.length||(s=i.right)!=null&&s.length)}return!!((n=i[t])!=null&&n.length)},e.getLeftLeafColumns=O(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(o=>o.id===i)).filter(Boolean),B(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=O(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(o=>o.id===i)).filter(Boolean),B(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=O(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i)=>{const o=[...n??[],...i??[]];return t.filter(s=>!o.includes(s.id))},B(e.options,"debugColumns","getCenterLeafColumns"))}};function ry(e){return e||(typeof document<"u"?document:null)}const gn={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},bi=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),ay={getDefaultColumnDef:()=>gn,getInitialState:e=>({columnSizing:{},columnSizingInfo:bi(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:me("columnSizing",e),onColumnSizingInfoChange:me("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,o;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:gn.minSize,(i=s??e.columnDef.size)!=null?i:gn.size),(o=e.columnDef.maxSize)!=null?o:gn.maxSize)},e.getStart=O(n=>[n,Nt(t,n),t.getState().columnSizing],(n,i)=>i.slice(0,e.getIndex(n)).reduce((o,s)=>o+s.getSize(),0),B(t.options,"debugColumns","getStart")),e.getAfter=O(n=>[n,Nt(t,n),t.getState().columnSizing],(n,i)=>i.slice(e.getIndex(n)+1).reduce((o,s)=>o+s.getSize(),0),B(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:i,...o}=n;return o})},e.getCanResize=()=>{var n,i;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((i=t.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const i=o=>{if(o.subHeaders.length)o.subHeaders.forEach(i);else{var s;n+=(s=o.column.getSize())!=null?s:0}};return i(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const i=t.getColumn(e.column.id),o=i?.getCanResize();return s=>{if(!i||!o||(s.persist==null||s.persist(),_i(s)&&s.touches&&s.touches.length>1))return;const r=e.getSize(),a=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[i.id,i.getSize()]],l=_i(s)?Math.round(s.touches[0].clientX):s.clientX,u={},c=(v,w)=>{typeof w=="number"&&(t.setColumnSizingInfo(p=>{var b,_;const E=t.options.columnResizeDirection==="rtl"?-1:1,P=(w-((b=p?.startOffset)!=null?b:0))*E,M=Math.max(P/((_=p?.startSize)!=null?_:0),-.999999);return p.columnSizingStart.forEach(k=>{let[A,j]=k;u[A]=Math.round(Math.max(j+j*M,0)*100)/100}),{...p,deltaOffset:P,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(p=>({...p,...u})))},d=v=>c("move",v),f=v=>{c("end",v),t.setColumnSizingInfo(w=>({...w,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=ry(n),m={moveHandler:v=>d(v.clientX),upHandler:v=>{h?.removeEventListener("mousemove",m.moveHandler),h?.removeEventListener("mouseup",m.upHandler),f(v.clientX)}},g={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),d(v.touches[0].clientX),!1),upHandler:v=>{var w;h?.removeEventListener("touchmove",g.moveHandler),h?.removeEventListener("touchend",g.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),f((w=v.touches[0])==null?void 0:w.clientX)}},y=ly()?{passive:!1}:!1;_i(s)?(h?.addEventListener("touchmove",g.moveHandler,y),h?.addEventListener("touchend",g.upHandler,y)):(h?.addEventListener("mousemove",m.moveHandler,y),h?.addEventListener("mouseup",m.upHandler,y)),t.setColumnSizingInfo(v=>({...v,startOffset:l,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?bi():(n=e.initialState.columnSizingInfo)!=null?n:bi())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((i,o)=>i+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((i,o)=>i+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((i,o)=>i+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((i,o)=>i+o.getSize(),0))!=null?t:0}}};let mn=null;function ly(){if(typeof mn=="boolean")return mn;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return mn=e,mn}function _i(e){return e.type==="touchstart"}const uy={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:me("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(i=>({...i,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,i;const o=e.columns;return(n=o.length?o.some(s=>s.getIsVisible()):(i=t.getState().columnVisibility)==null?void 0:i[e.id])!=null?n:!0},e.getCanHide=()=>{var n,i;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((i=t.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=O(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(i=>i.column.getIsVisible()),B(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=O(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,i,o)=>[...n,...i,...o],B(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,i)=>O(()=>[i(),i().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),B(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var i;e.setColumnVisibility(n?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=n=>{var i;n=(i=n)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,s)=>({...o,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var i;e.toggleAllColumnsVisible((i=n.target)==null?void 0:i.checked)}}};function Nt(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const cy={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},dy={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:me("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const i=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,o,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((i=t.options.enableGlobalFilter)!=null?i:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Le.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:i}=e.options;return Gn(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[i])!=null?t:Le[i]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},fy={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:me("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var i,o;if(!t){e._queue(()=>{t=!0});return}if((i=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var o,s;e.setExpanded(i?{}:(o=(s=e.initialState)==null?void 0:s.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const r=s.split(".");i=Math.max(i,r.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(i=>{var o;const s=i===!0?!0:!!(i!=null&&i[e.id]);let r={};if(i===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{r[a]=!0}):r=i,n=(o=n)!=null?o:!s,!s&&n)return{...r,[e.id]:!0};if(s&&!n){const{[e.id]:a,...l}=r;return l}return i})},e.getIsExpanded=()=>{var n;const i=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:i===!0||i?.[e.id])},e.getCanExpand=()=>{var n,i,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((i=t.options.enableExpanding)!=null?i:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e;for(;n&&i.parentId;)i=t.getRow(i.parentId,!0),n=i.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},no=0,io=10,Ri=()=>({pageIndex:no,pageSize:io}),hy={getInitialState:e=>({...e,pagination:{...Ri(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:me("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var i,o;if(!t){e._queue(()=>{t=!0});return}if((i=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=i=>{const o=s=>We(i,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=i=>{var o;e.setPagination(i?Ri():(o=e.initialState.pagination)!=null?o:Ri())},e.setPageIndex=i=>{e.setPagination(o=>{let s=We(i,o.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,r)),{...o,pageIndex:s}})},e.resetPageIndex=i=>{var o,s;e.setPageIndex(i?no:(o=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?o:no)},e.resetPageSize=i=>{var o,s;e.setPageSize(i?io:(o=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?o:io)},e.setPageSize=i=>{e.setPagination(o=>{const s=Math.max(1,We(i,o.pageSize)),r=o.pageSize*o.pageIndex,a=Math.floor(r/s);return{...o,pageIndex:a,pageSize:s}})},e.setPageCount=i=>e.setPagination(o=>{var s;let r=We(i,(s=e.options.pageCount)!=null?s:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...o,pageCount:r}}),e.getPageOptions=O(()=>[e.getPageCount()],i=>{let o=[];return i&&i>0&&(o=[...new Array(i)].fill(null).map((s,r)=>r)),o},B(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:i<o-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},Ei=()=>({top:[],bottom:[]}),gy={getInitialState:e=>({rowPinning:Ei(),...e}),getDefaultOptions:e=>({onRowPinningChange:me("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,o)=>{const s=i?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],r=o?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],a=new Set([...r,e.id,...s]);t.setRowPinning(l=>{var u,c;if(n==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var h,m;return{top:[...((h=l?.top)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((m=l?.bottom)!=null?m:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((u=l?.top)!=null?u:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((c=l?.bottom)!=null?c:[]).filter(g=>!(a!=null&&a.has(g)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:i,enablePinning:o}=t.options;return typeof i=="function"?i(e):(n=i??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:i,bottom:o}=t.getState().rowPinning,s=n.some(a=>i?.includes(a)),r=n.some(a=>o?.includes(a));return s?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var n,i;const o=e.getIsPinned();if(!o)return-1;const s=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(r=>{let{id:a}=r;return a});return(i=s?.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,i;return e.setRowPinning(t?Ei():(n=(i=e.initialState)==null?void 0:i.rowPinning)!=null?n:Ei())},e.getIsSomeRowsPinned=t=>{var n;const i=e.getState().rowPinning;if(!t){var o,s;return!!((o=i.top)!=null&&o.length||(s=i.bottom)!=null&&s.length)}return!!((n=i[t])!=null&&n.length)},e._getPinnedRows=(t,n,i)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(r=>{const a=e.getRow(r,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(r=>t.find(a=>a.id===r))).filter(Boolean).map(r=>({...r,position:i}))},e.getTopRows=O(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),B(e.options,"debugRows","getTopRows")),e.getBottomRows=O(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),B(e.options,"debugRows","getBottomRows")),e.getCenterRows=O(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,i)=>{const o=new Set([...n??[],...i??[]]);return t.filter(s=>!o.has(s.id))},B(e.options,"debugRows","getCenterRows"))}},my={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:me("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const i={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(s=>{s.getCanSelect()&&(i[s.id]=!0)}):o.forEach(s=>{delete i[s.id]}),i})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const i=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(s=>{oo(o,s.id,i,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=O(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Mi(e,n):{rows:[],flatRows:[],rowsById:{}},B(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=O(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Mi(e,n):{rows:[],flatRows:[],rowsById:{}},B(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=O(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Mi(e,n):{rows:[],flatRows:[],rowsById:{}},B(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let i=!!(t.length&&Object.keys(n).length);return i&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let i=!!t.length;return i&&t.some(o=>!n[o.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,i)=>{const o=e.getIsSelected();t.setRowSelection(s=>{var r;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return s;const a={...s};return oo(a,e.id,n,(r=i?.selectChildren)!=null?r:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Jo(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return so(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return so(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return i=>{var o;n&&e.toggleSelected((o=i.target)==null?void 0:o.checked)}}}},oo=(e,t,n,i,o)=>{var s;const r=o.getRow(t,!0);n?(r.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),r.getCanSelect()&&(e[t]=!0)):delete e[t],i&&(s=r.subRows)!=null&&s.length&&r.getCanSelectSubRows()&&r.subRows.forEach(a=>oo(e,a.id,n,i,o))};function Mi(e,t){const n=e.getState().rowSelection,i=[],o={},s=function(r,a){return r.map(l=>{var u;const c=Jo(l,n);if(c&&(i.push(l),o[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:s(l.subRows)}),c)return l}).filter(Boolean)};return{rows:s(t.rows),flatRows:i,rowsById:o}}function Jo(e,t){var n;return(n=t[e.id])!=null?n:!1}function so(e,t,n){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let o=!0,s=!1;return e.subRows.forEach(r=>{if(!(s&&!o)&&(r.getCanSelect()&&(Jo(r,t)?s=!0:o=!1),r.subRows&&r.subRows.length)){const a=so(r,t);a==="all"?s=!0:(a==="some"&&(s=!0),o=!1)}}),o?"all":s?"some":!1}const ro=/([0-9]+)/gm,py=(e,t,n)=>cu(Xe(e.getValue(n)).toLowerCase(),Xe(t.getValue(n)).toLowerCase()),vy=(e,t,n)=>cu(Xe(e.getValue(n)),Xe(t.getValue(n))),yy=(e,t,n)=>Qo(Xe(e.getValue(n)).toLowerCase(),Xe(t.getValue(n)).toLowerCase()),xy=(e,t,n)=>Qo(Xe(e.getValue(n)),Xe(t.getValue(n))),wy=(e,t,n)=>{const i=e.getValue(n),o=t.getValue(n);return i>o?1:i<o?-1:0},Cy=(e,t,n)=>Qo(e.getValue(n),t.getValue(n));function Qo(e,t){return e===t?0:e>t?1:-1}function Xe(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function cu(e,t){const n=e.split(ro).filter(Boolean),i=t.split(ro).filter(Boolean);for(;n.length&&i.length;){const o=n.shift(),s=i.shift(),r=parseInt(o,10),a=parseInt(s,10),l=[r,a].sort();if(isNaN(l[0])){if(o>s)return 1;if(s>o)return-1;continue}if(isNaN(l[1]))return isNaN(r)?-1:1;if(r>a)return 1;if(a>r)return-1}return n.length-i.length}const Lt={alphanumeric:py,alphanumericCaseSensitive:vy,text:yy,textCaseSensitive:xy,datetime:wy,basic:Cy},Sy={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:me("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const o of n){const s=o?.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return Lt.datetime;if(typeof s=="string"&&(i=!0,s.split(ro).length>1))return Lt.alphanumeric}return i?Lt.text:Lt.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,i;if(!e)throw new Error;return Gn(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(i=t.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?n:Lt[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{const o=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(r=>{const a=r?.find(h=>h.id===e.id),l=r?.findIndex(h=>h.id===e.id);let u=[],c,d=s?n:o==="desc";if(r!=null&&r.length&&e.getCanMultiSort()&&i?a?c="toggle":c="add":r!=null&&r.length&&l!==r.length-1?c="replace":a?c="toggle":c="replace",c==="toggle"&&(s||o||(c="remove")),c==="add"){var f;u=[...r,{id:e.id,desc:d}],u.splice(0,u.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=r.map(h=>h.id===e.id?{...h,desc:d}:h):c==="remove"?u=r.filter(h=>h.id!==e.id):u=[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var n,i;return((n=(i=e.columnDef.sortDescFirst)!=null?i:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var i,o;const s=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==s&&((i=t.options.enableSortingRemoval)==null||i)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:r==="desc"?"asc":"desc":s},e.getCanSort=()=>{var n,i;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((i=t.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,i;return(n=(i=e.columnDef.enableMultiSort)!=null?i:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const i=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,i;return(n=(i=t.getState().sorting)==null?void 0:i.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return i=>{n&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i;e.setSorting(t?[]:(n=(i=e.initialState)==null?void 0:i.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},by=[Hv,uy,oy,sy,Gv,Uv,cy,dy,Sy,ny,fy,hy,gy,my,ay];function _y(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const i=[...by,...(t=e._features)!=null?t:[]];let o={_features:i};const s=o._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(o)),{}),r=f=>o.options.mergeOptions?o.options.mergeOptions(s,f):{...s,...f};let l={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(f=>{var h;l=(h=f.getInitialState==null?void 0:f.getInitialState(l))!=null?h:l});const u=[];let c=!1;const d={_features:i,options:{...s,...e},initialState:l,_queue:f=>{u.push(f),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{o.setState(o.initialState)},setOptions:f=>{const h=We(f,o.options);o.options=r(h)},getState:()=>o.options.state,setState:f=>{o.options.onStateChange==null||o.options.onStateChange(f)},_getRowId:(f,h,m)=>{var g;return(g=o.options.getRowId==null?void 0:o.options.getRowId(f,h,m))!=null?g:`${m?[m.id,h].join("."):h}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(f,h)=>{let m=(h?o.getPrePaginationRowModel():o.getRowModel()).rowsById[f];if(!m&&(m=o.getCoreRowModel().rowsById[f],!m))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${f}`):new Error;return m},_getDefaultColumnDef:O(()=>[o.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:m=>{const g=m.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:m=>{var g,y;return(g=(y=m.renderValue())==null||y.toString==null?void 0:y.toString())!=null?g:null},...o._features.reduce((m,g)=>Object.assign(m,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...f}},B(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:O(()=>[o._getColumnDefs()],f=>{const h=function(m,g,y){return y===void 0&&(y=0),m.map(v=>{const w=zv(o,v,y,g),p=v;return w.columns=p.columns?h(p.columns,w,y+1):[],w})};return h(f)},B(e,"debugColumns","getAllColumns")),getAllFlatColumns:O(()=>[o.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),B(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:O(()=>[o.getAllFlatColumns()],f=>f.reduce((h,m)=>(h[m.id]=m,h),{}),B(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:O(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(f,h)=>{let m=f.flatMap(g=>g.getLeafColumns());return h(m)},B(e,"debugColumns","getAllLeafColumns")),getColumn:f=>{const h=o._getAllFlatColumnsById()[f];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${f}' does not exist.`),h}};Object.assign(o,d);for(let f=0;f<o._features.length;f++){const h=o._features[f];h==null||h.createTable==null||h.createTable(o)}return o}function Ry(){return e=>O(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(o,s,r){s===void 0&&(s=0);const a=[];for(let u=0;u<o.length;u++){const c=Wv(e,e._getRowId(o[u],u,r),o[u],u,s,void 0,r?.id);if(n.flatRows.push(c),n.rowsById[c.id]=c,a.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(o[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=i(c.originalSubRows,s+1,c))}}return a};return n.rows=i(t),n},B(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Ey(e){const t=[],n=i=>{var o;t.push(i),(o=i.subRows)!=null&&o.length&&i.getIsExpanded()&&i.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function My(e){return t=>O(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,i)=>{if(!i.rows.length)return i;const{pageSize:o,pageIndex:s}=n;let{rows:r,flatRows:a,rowsById:l}=i;const u=o*s,c=u+o;r=r.slice(u,c);let d;t.options.paginateExpandedRows?d={rows:r,flatRows:a,rowsById:l}:d=Ey({rows:r,flatRows:a,rowsById:l}),d.flatRows=[];const f=h=>{d.flatRows.push(h),h.subRows.length&&h.subRows.forEach(f)};return d.rows.forEach(f),d},B(t.options,"debugTable","getPaginationRowModel"))}function Py(){return e=>O(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const i=e.getState().sorting,o=[],s=i.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),r={};s.forEach(l=>{const u=e.getColumn(l.id);u&&(r[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const a=l=>{const u=l.map(c=>({...c}));return u.sort((c,d)=>{for(let h=0;h<s.length;h+=1){var f;const m=s[h],g=r[m.id],y=g.sortUndefined,v=(f=m?.desc)!=null?f:!1;let w=0;if(y){const p=c.getValue(m.id),b=d.getValue(m.id),_=p===void 0,E=b===void 0;if(_||E){if(y==="first")return _?-1:1;if(y==="last")return _?1:-1;w=_&&E?0:_?y:-y}}if(w===0&&(w=g.sortingFn(c,d,m.id)),w!==0)return v&&(w*=-1),g.invertSorting&&(w*=-1),w}return c.index-d.index}),u.forEach(c=>{var d;o.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=a(c.subRows))}),u};return{rows:a(n.rows),flatRows:o,rowsById:n.rowsById}},B(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
|
|
29
29
|
* react-table
|
|
30
30
|
*
|
|
31
31
|
* Copyright (c) TanStack
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* LICENSE.md file in the root directory of this source tree.
|
|
35
35
|
*
|
|
36
36
|
* @license MIT
|
|
37
|
-
*/function
|
|
37
|
+
*/function Ur(e,t){return e?Ty(e)?S.createElement(e,t):e:null}function Ty(e){return Vy(e)||typeof e=="function"||Ay(e)}function Vy(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Ay(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Dy(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=S.useState(()=>({current:_y(t)})),[i,o]=S.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...i,...e.state},onStateChange:r=>{o(r),e.onStateChange==null||e.onStateChange(r)}})),n.current}const Fy=e=>S.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("style",null,`
|
|
38
38
|
@keyframes spin {
|
|
39
39
|
from {
|
|
40
40
|
transform: rotate(0deg);
|
|
@@ -47,13 +47,12 @@
|
|
|
47
47
|
transform-origin: center;
|
|
48
48
|
animation: spin 1s linear infinite;
|
|
49
49
|
}
|
|
50
|
-
`),T.createElement("g",{className:"spinner"},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0003 6.83317C13.5692 6.83317 11.2376 7.79894 9.51851 9.51803C7.79943 11.2371 6.83366 13.5687 6.83366 15.9998C6.83366 18.431 7.79943 20.7626 9.51851 22.4817C11.2376 24.2007 13.5692 25.1665 16.0003 25.1665C18.4315 25.1665 20.7631 24.2007 22.4821 22.4817C24.2012 20.7626 25.167 18.431 25.167 15.9998C25.167 13.5687 24.2012 11.2371 22.4821 9.51803C20.7631 7.79894 18.4315 6.83317 16.0003 6.83317ZM3.16699 15.9998C3.16699 8.91217 8.91266 3.1665 16.0003 3.1665C23.088 3.1665 28.8337 8.91217 28.8337 15.9998C28.8337 23.0875 23.088 28.8332 16.0003 28.8332C8.91266 28.8332 3.16699 23.0875 3.16699 15.9998Z",fill:"currentColor",fillOpacity:.12}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9997 6.83319C13.6363 6.82787 11.3633 7.74068 9.65999 9.37907C9.30711 9.70535 8.84021 9.88001 8.35982 9.86545C7.87943 9.85089 7.42396 9.64827 7.09149 9.30122C6.75902 8.95416 6.57612 8.49043 6.58218 8.00985C6.58823 7.52928 6.78276 7.07031 7.12388 6.73174C9.50956 4.43941 12.6912 3.16143 15.9997 3.16652C16.4859 3.16652 16.9522 3.35967 17.296 3.70349C17.6398 4.04731 17.833 4.51362 17.833 4.99985C17.833 5.48608 17.6398 5.9524 17.296 6.29621C16.9522 6.64003 16.4859 6.83319 15.9997 6.83319Z",fill:"currentColor"}))),Sp=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_2074_3858)"},T.createElement("path",{d:"M21 21L16.65 16.65M19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_2074_3858"},T.createElement("rect",{width:24,height:24,fill:"white"})))),_p="_table_19yhs_8",bp={table:_p},Rp=v.forwardRef(({children:e,className:t,style:n,...i},s)=>m.jsx("td",{ref:s,className:M.cx(t),style:n,...i,children:e})),Ta=v.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:i=!1,...s},o)=>{const r=M.css({borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return m.jsx("tr",{ref:o,className:M.cx(r,t),...s,children:e})});Ta.displayName="TableBodyRow";const Pp=v.forwardRef(({children:e,className:t,style:n,justifyContent:i="flex-start",alignItems:s="flex-start",...o},r)=>{const a=M.css({justifyContent:i,alignItems:s,fontWeight:"inherit"});return m.jsx("th",{ref:r,className:M.cx(a,t),style:n,...o,children:e})}),Ea=v.forwardRef(({children:e,className:t,showBorders:n=!1,...i},s)=>{const o=M.css({backgroundColor:"var(--fill-bg-secondary)",borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return m.jsx("tr",{ref:s,className:M.cx(o,t),...i,children:e})});Ea.displayName="TableHeadRow";const Mp=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Tp=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Ep=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Vp=(e,t)=>{const n=[];if(t<=10){for(let o=1;o<=t;o++)n.push(o);return n}const i=2,s=[];for(let o=Math.max(2,e+1-i);o<=Math.min(t-1,e+1+i);o++)s.push(o);return e+1-i>2?n.push(1,"..."):n.push(1),n.push(...s),e+1+i<t-1?n.push("...",t):t>1&&n.push(t),n},Ap=({pageIndex:e,pageSize:t,totalCount:n,onPageChange:i,onPageSizeChange:s,pageSizeOptions:o=[10,20,50,100],showPageSizeSelector:r=!0,renderPageSizeSelectorItem:a=l=>l.label})=>{const l=Math.ceil(n/t),u=e>0,c=e<l-1,d=()=>{u&&i(e-1)},f=()=>{c&&i(e+1)},h=g=>{s(Number(g))},p=Vp(e,l);return n===0?null:m.jsxs(V,{row:!0,justifyContent:"space-between",children:[m.jsxs(V,{row:!0,gap:"var(--spacing-sm)",children:[m.jsx(wt,{onClick:d,disabled:!u,color:"neutral",size:"sm",children:m.jsx(Mp,{})}),m.jsx(V,{row:!0,gap:"var(--spacing-sm)",children:p.map(g=>m.jsx(Dp,{isDots:g==="...",isCurrentPage:g===e+1,disabled:g==="...",onClick:()=>i(g-1),children:g},g))}),m.jsx(wt,{color:"neutral",size:"sm",onClick:f,disabled:!c,children:m.jsx(Tp,{})})]}),r&&m.jsx(V,{children:m.jsx(ha,{value:t.toString(),size:"sm",items:o.map(g=>({value:g.toString(),label:g.toString()})),returnedValue:g=>g.value,renderItem:a,onChange:g=>h(g)})})]})},Dp=({children:e,isCurrentPage:t=!1,onClick:n,isDots:i=!1,disabled:s=!1})=>{const o=M.css({cursor:s?"not-allowed":"pointer",userSelect:"none",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:t?"var(--fill-accent-secondary)":"var(--fill-bg-secondary)",borderRadius:"var(--corner-sm)",border:t?"1px solid var(--fill-accent-secondary-hover)":"1px solid var(--border-neutral-alpha-basic)"}),r=M.css({width:"24px",height:"24px",color:t?"var(--icon-secondary)":"var(--icon-tertiary)"});return m.jsx(V,{className:o,onClick:s?void 0:n,children:i?m.jsx(Ep,{className:r}):m.jsx(z,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},Fp=M.css({position:"relative",borderRadius:"var(--corner-md)",overflow:"hidden","&::before, &::after":{content:'""',position:"absolute",top:0,bottom:14,width:96,pointerEvents:"none",zIndex:2,transition:"opacity 0.2s ease"},"&::before":{left:0,background:"linear-gradient(to left, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"},"&::after":{right:0,background:"linear-gradient(to right, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"}}),kp=M.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--neutral-86) var(--neutral-96)"}),Va=v.memo(({data:e,children:t,className:n,showBorders:i=!1,...s})=>{const[o,r]=v.useState(!1),[a,l]=v.useState(!1),u=v.useRef(null),c=v.useCallback(()=>{const f=u.current;if(!f)return;const{scrollLeft:h,scrollWidth:p,clientWidth:g}=f,x=p>g;r(x&&h>0),l(x&&h<p-g-1)},[]);v.useEffect(()=>{const f=u.current;if(!f)return;c();const h=new ResizeObserver(c);return h.observe(f),f.addEventListener("scroll",c),()=>{h.disconnect(),f.removeEventListener("scroll",c)}},[c,e]);const d=M.css({border:i?"1px solid var(--border-neutral-alpha-low)":"transparent","&::before":{opacity:o?1:0},"&::after":{opacity:a?1:0}});return m.jsx(V,{className:M.cx(Fp,d,n),...s,children:m.jsx(V,{ref:u,className:kp,children:t})})});Va.displayName="TableWrapper";const Aa=v.forwardRef(({data:e,columns:t,showBorders:n=!0,enableSorting:i=!1,enablePagination:s=!1,enableRowSelection:o=!1,enableMultiRowSelection:r=!1,sorting:a,onSortingChange:l,columnFilters:u,onColumnFiltersChange:c,columnVisibility:d,onColumnVisibilityChange:f,pagination:h,onPaginationChange:p,rowSelection:g,onRowSelectionChange:x,totalCount:w,loading:C=!1,emptyLabels:y={title:"Nothing found",description:"No results found for “result”",action:"Reset"},loadingLabels:S={title:"Loading...",description:"Please wait or reset your promt",action:"Reset"},className:_,containerClassName:b,tableOptions:E={},onRowClick:R,getRowId:A,headCellComponent:L=Pp,bodyCellComponent:B=Rp,headRowComponent:ee=Ea,bodyRowComponent:N=Ta,onReset:Z,renderPageSizeSelectorItem:te},se)=>{const $=v.useMemo(()=>Pg(),[]),[K,ne]=v.useState([]),[I,G]=v.useState([]),[P,j]=v.useState({}),[oe,W]=v.useState({pageIndex:0,pageSize:10}),[U,we]=v.useState({}),je=a??K,$e=u??I,Oe=d??P,he=h??oe,Vt=g??U,an=O=>{const H=typeof O=="function"?O(je):O;l?l(H):ne(H)},ln=O=>{const H=typeof O=="function"?O($e):O;c?c(H):G(H)},Fa=O=>{const H=typeof O=="function"?O(Oe):O;f?f(H):j(H)},un=O=>{const H=typeof O=="function"?O(he):O;p?p(H):W(H)},ka=O=>{const H=typeof O=="function"?O(Vt):O;x?x(H):we(H)},Ia=v.useMemo(()=>t.map(({key:O,accessor:H,...Ke})=>O==="accessor"?$.accessor(Oa=>Oa[H],{id:H.toString(),...Ke}):$[O]({id:H.toString(),...Ke})),[t,$]),cn=xp({data:e,columns:Ia,state:{sorting:je,columnFilters:$e,columnVisibility:Oe,pagination:he,rowSelection:Vt},onSortingChange:an,onColumnFiltersChange:ln,onColumnVisibilityChange:Fa,onPaginationChange:un,onRowSelectionChange:ka,getCoreRowModel:hp(),getSortedRowModel:i?mp():void 0,getPaginationRowModel:s?pp():void 0,enableRowSelection:o,enableMultiRowSelection:r,getRowId:A,manualPagination:!!w,pageCount:w?Math.ceil(w/he.pageSize):void 0,...E});v.useImperativeHandle(se,()=>cn);const{rows:es}=cn.getRowModel(),La=(O,H)=>{R&&R(O.original,H)},ja=M.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:"var(--fill-bg-primary)"}),$a=M.css({backgroundColor:"var(--fill-bg-secondary)",color:"var(--text-tertiary)"});return C?m.jsxs(V,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:M.cx(b),children:[m.jsx(Cp,{width:32,height:32,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),m.jsx(z,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:S.title}),m.jsx(z,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:S.description}),m.jsx(Xt,{onClick:Z,whileTap:{scale:.95},fontWeight:"medium",cursor:"pointer",colorName:"accent",children:S.action})]}):es.length?m.jsxs(V,{w:"full",gap:"var(--spacing-xl)",className:M.cx(b),children:[m.jsx(Va,{data:e,showBorders:n,children:m.jsxs("table",{className:M.cx(ja,bp.table,_),children:[m.jsx("thead",{className:$a,children:cn.getHeaderGroups().map(O=>m.jsx(ee,{showBorders:n,children:O.headers.map(H=>m.jsx(L,{style:{width:H.getSize()},onClick:H.column.getToggleSortingHandler(),children:H.isPlaceholder?null:To(H.column.columnDef.header,H.getContext())},H.id))},O.id))}),m.jsx("tbody",{children:es.map((O,H)=>m.jsx(N,{showBorders:n,isSelected:O.getIsSelected(),onClick:()=>La(O,H),children:O.getVisibleCells().map(Ke=>m.jsx(B,{children:To(Ke.column.columnDef.cell,Ke.getContext())},Ke.id))},O.id))})]})}),s&&!C&&m.jsx(Ap,{pageIndex:he.pageIndex,pageSize:he.pageSize,totalCount:w||e.length,renderPageSizeSelectorItem:te,onPageChange:O=>un({...he,pageIndex:O}),onPageSizeChange:O=>un({...he,pageSize:O,pageIndex:0})})]}):m.jsxs(V,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:M.cx(b),children:[m.jsx(Sp,{width:24,height:24,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),m.jsx(z,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:y.title}),m.jsx(z,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:y.description}),m.jsx(Xt,{onClick:Z,whileTap:{scale:.95},fontWeight:"medium",cursor:"pointer",colorName:"accent",children:y.action})]})});Aa.displayName="Table";const Ip=v.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:i="center",py:s="var(--spacing-sm)",px:o="var(--spacing-md)",minHeight:r="56px",...a},l)=>m.jsx(V,{row:t,justifyContent:n,alignItems:i,py:s,px:o,minHeight:r,ref:l,...a,children:e})),Ji=v.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:i="center",py:s="var(--spacing-sm)",px:o="var(--spacing-md)",minHeight:r="56px",...a},l)=>m.jsx(V,{row:t,justifyContent:n,alignItems:i,py:s,px:o,minHeight:r,ref:l,...a,children:e}));Ji.displayName="TableHeadCellContent";const Lp=e=>T.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M8.75 4.75L4.75 0.75L0.75 4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),jp=e=>T.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M8.75 0.75L4.75 4.75L0.75 0.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),$p=({sortDirection:e,gap:t="5px",...n})=>m.jsxs(V,{gap:t,...n,children:[m.jsx(Lp,{style:{color:e==="asc"?"var(--icon-accent)":"var(--icon-tertiary)"}}),m.jsx(jp,{style:{color:e==="desc"?"var(--icon-accent)":"var(--icon-tertiary)"}})]}),Da=({children:e,tableProps:t,gap:n="10px",...i})=>{const s=t.column.getIsSorted();return m.jsxs(Ji,{style:{cursor:"pointer",userSelect:"none"},gap:n,...i,children:[e,m.jsx($p,{sortDirection:s})]})};Da.displayName="TableHeadCellContentSortable";const on=Aa;on.HeadCellContent=Ji;on.HeadCellContentSortable=Da;on.BodyCellContent=Ip;const rn=({children:e})=>{const[t,n]=v.useState(null);return v.useEffect(()=>{let i=document.getElementById("portal-root");if(!i){const s=document.getElementById("theme-provider-scoped");if(!s){console.error(`[Portal] Не найден #theme-provider-scoped.
|
|
51
|
-
Добавь провайдер темы или создай его в HTML-шаблоне.`);return}i=document.createElement("div"),i.id="portal-root",s.appendChild(i)}n(i)},[]),t?Vo.createPortal(e,t):null},Op=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M9 17L14 12L9 7",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),zp="_link_aolvt_8",Bp="_separator_aolvt_19",Np="_nav_aolvt_23",Ht={link:zp,separator:Bp,nav:Np,"nav-item":"_nav-item_aolvt_29"},Qi=({children:e,separator:t=m.jsx(Op,{className:Ht.separator})})=>{const n=v.Children.toArray(e).filter(i=>v.isValidElement(i));return m.jsx("nav",{"aria-label":"breadcrumb",className:Ht.nav,children:n.map((i,s)=>{const o=s===n.length-1;return m.jsxs(z,{tag:"span",className:Ht["nav-item"],children:[v.cloneElement(i,{active:i.props.active??o}),!o&&t]},s)})})},Hp=({children:e,href:t,active:n,className:i,activeClassName:s,activeElement:o,onClick:r})=>n?o||m.jsx(z,{tag:"span",variant:"body-2",fontWeight:"medium",colorName:"primary",className:M.cx(i,s),onClick:r,children:e}):m.jsx("a",{href:t,className:M.cx(Ht.link,i),onClick:r,children:e});Qi.Item=Hp;Qi.displayName="Breadcrumbs";const Gp=Qi,Wp="_avatar_1oe2p_8",Up="_avatar_primary_1oe2p_22",Kp="_avatar_secondary_1oe2p_25",qp="_avatar_negative_1oe2p_28",Xp="_avatar_positive_1oe2p_31",Yp="_avatar_warning_1oe2p_34",Zp="_avatar_lgSize_1oe2p_71",Jp="_avatar_mdSize_1oe2p_85",Qp="_avatar_smSize_1oe2p_99",$n={avatar:Wp,avatar_primary:Up,avatar_secondary:Kp,avatar_negative:qp,avatar_positive:Xp,avatar_warning:Yp,avatar_lgSize:Zp,avatar_mdSize:Jp,avatar_smSize:Qp};function em({attr:e,children:t,className:n,color:i="primary",size:s="md",...o}){const r="avatar";return m.jsx("div",{...e,...o,className:Ne($n[r],n,yt($n,r,s),Zt($n,r,i)),children:t})}const tm=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),T.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Eo=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",fill:"currentColor",fillOpacity:.15}),T.createElement("path",{d:"M12 6C11.4477 6 11 6.44772 11 7V13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V7C13 6.44772 12.5523 6 12 6Z",fill:"currentColor"}),T.createElement("path",{d:"M12 15C11.4477 15 11 15.4477 11 16V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V16C13 15.4477 12.5523 15 12 15Z",fill:"currentColor"})),nm=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),T.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),im=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...e},T.createElement("path",{d:"M12 2V22M19.0711 4.92893L4.92893 19.0711M22 12H2M19.0711 19.0711L4.92893 4.92893",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),sm="_hint_prca1_8",om="_md_prca1_19",rm="_sm_prca1_24",am="_icon_prca1_29",lm="_content_prca1_40",um="_title_prca1_46",cm="_subtitle_prca1_50",dm="_disabled_prca1_55",fm="_warning_prca1_60",hm="_solid_prca1_60",gm="_negative_prca1_65",pm="_positive_prca1_70",mm="_accent_prca1_75",vm="_neutral_prca1_80",ym="_soft_prca1_85",pe={hint:sm,md:om,sm:rm,icon:am,content:lm,title:um,subtitle:cm,disabled:dm,warning:fm,solid:hm,negative:gm,positive:pm,accent:mm,neutral:vm,soft:ym},wm={negative:m.jsx(nm,{}),positive:m.jsx(tm,{}),accent:m.jsx(Eo,{}),warning:m.jsx(Eo,{}),neutral:m.jsx(im,{})},xm=({title:e,subtitle:t,color:n="warning",variant:i="soft",size:s="md",icon:o,disabled:r=!1,className:a,style:l})=>{const u=o||wm[n];return m.jsxs("div",{className:Ne(pe.hint,pe[n],pe[i],pe[s],r&&pe.disabled,a),style:l,"aria-disabled":r,children:[u&&m.jsx("span",{className:Ne(pe.icon,pe[n]),children:u}),m.jsxs("div",{className:pe.content,children:[e&&m.jsx(z,{className:Ne(pe.title,yt(pe,"title",s)),variant:s==="md"?"body-1":"caption-2",children:e}),t&&m.jsx(z,{className:Ne(pe.subtitle,yt(pe,"subtitle",s)),variant:s==="md"?"body-2":"caption-1",children:t})]})]})},Cm=M.css({position:"relative",zIndex:1}),Sm=({children:e,className:t,...n})=>m.jsx(V,{className:M.cx(Cm,t),...n,children:e}),_m=M.keyframes`
|
|
50
|
+
`),S.createElement("g",{className:"spinner"},S.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0003 6.83317C13.5692 6.83317 11.2376 7.79894 9.51851 9.51803C7.79943 11.2371 6.83366 13.5687 6.83366 15.9998C6.83366 18.431 7.79943 20.7626 9.51851 22.4817C11.2376 24.2007 13.5692 25.1665 16.0003 25.1665C18.4315 25.1665 20.7631 24.2007 22.4821 22.4817C24.2012 20.7626 25.167 18.431 25.167 15.9998C25.167 13.5687 24.2012 11.2371 22.4821 9.51803C20.7631 7.79894 18.4315 6.83317 16.0003 6.83317ZM3.16699 15.9998C3.16699 8.91217 8.91266 3.1665 16.0003 3.1665C23.088 3.1665 28.8337 8.91217 28.8337 15.9998C28.8337 23.0875 23.088 28.8332 16.0003 28.8332C8.91266 28.8332 3.16699 23.0875 3.16699 15.9998Z",fill:"currentColor",fillOpacity:.12}),S.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9997 6.83319C13.6363 6.82787 11.3633 7.74068 9.65999 9.37907C9.30711 9.70535 8.84021 9.88001 8.35982 9.86545C7.87943 9.85089 7.42396 9.64827 7.09149 9.30122C6.75902 8.95416 6.57612 8.49043 6.58218 8.00985C6.58823 7.52928 6.78276 7.07031 7.12388 6.73174C9.50956 4.43941 12.6912 3.16143 15.9997 3.16652C16.4859 3.16652 16.9522 3.35967 17.296 3.70349C17.6398 4.04731 17.833 4.51362 17.833 4.99985C17.833 5.48608 17.6398 5.9524 17.296 6.29621C16.9522 6.64003 16.4859 6.83319 15.9997 6.83319Z",fill:"currentColor"}))),ky=e=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("g",{clipPath:"url(#clip0_2074_3858)"},S.createElement("path",{d:"M21 21L16.65 16.65M19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),S.createElement("defs",null,S.createElement("clipPath",{id:"clip0_2074_3858"},S.createElement("rect",{width:24,height:24,fill:"white"})))),Ly="_table_19yhs_8",Iy={table:Ly},jy=C.forwardRef(({children:e,className:t,style:n,...i},o)=>x.jsx("td",{ref:o,className:F.cx(t),style:n,...i,children:e})),du=C.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:i=!1,...o},s)=>{const r=F.css({borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return x.jsx("tr",{ref:s,className:F.cx(r,t),...o,children:e})});du.displayName="TableBodyRow";const $y=C.forwardRef(({children:e,className:t,style:n,justifyContent:i="flex-start",alignItems:o="flex-start",...s},r)=>{const a=F.css({justifyContent:i,alignItems:o,fontWeight:"inherit"});return x.jsx("th",{ref:r,className:F.cx(a,t),style:n,...s,children:e})}),fu=C.forwardRef(({children:e,className:t,showBorders:n=!1,...i},o)=>{const s=F.css({backgroundColor:"var(--fill-bg-secondary)",borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return x.jsx("tr",{ref:o,className:F.cx(s,t),...i,children:e})});fu.displayName="TableHeadRow";const Oy=e=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),By=e=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Ny=e=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),S.createElement("path",{d:"M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),S.createElement("path",{d:"M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),zy=(e,t)=>{const n=[];if(t<=10){for(let s=1;s<=t;s++)n.push(s);return n}const i=2,o=[];for(let s=Math.max(2,e+1-i);s<=Math.min(t-1,e+1+i);s++)o.push(s);return e+1-i>2?n.push(1,"..."):n.push(1),n.push(...o),e+1+i<t-1?n.push("...",t):t>1&&n.push(t),n},Hy=({pageIndex:e,pageSize:t,totalCount:n,onPageChange:i,onPageSizeChange:o,pageSizeOptions:s=[10,20,50,100],showPageSizeSelector:r=!0,renderPageSizeSelectorItem:a=l=>l.label})=>{const l=Math.ceil(n/t),u=e>0,c=e<l-1,d=()=>{u&&i(e-1)},f=()=>{c&&i(e+1)},h=g=>{o(Number(g))},m=zy(e,l);return n===0?null:x.jsxs(I,{row:!0,justifyContent:"space-between",children:[x.jsxs(I,{row:!0,gap:"var(--spacing-sm)",children:[x.jsx(Ht,{onClick:d,disabled:!u,color:"neutral",size:"sm",children:x.jsx(Oy,{})}),x.jsx(I,{row:!0,gap:"var(--spacing-sm)",children:m.map(g=>x.jsx(Wy,{isDots:g==="...",isCurrentPage:g===e+1,disabled:g==="...",onClick:()=>i(g-1),children:g},g))}),x.jsx(Ht,{color:"neutral",size:"sm",onClick:f,disabled:!c,children:x.jsx(By,{})})]}),r&&x.jsx(I,{children:x.jsx(Zl,{value:t.toString(),size:"sm",items:s.map(g=>({value:g.toString(),label:g.toString()})),returnedValue:g=>g.value,renderItem:a,onChange:g=>h(g)})})]})},Wy=({children:e,isCurrentPage:t=!1,onClick:n,isDots:i=!1,disabled:o=!1})=>{const s=F.css({cursor:o?"not-allowed":"pointer",userSelect:"none",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:t?"var(--fill-accent-secondary)":"var(--fill-bg-secondary)",borderRadius:"var(--corner-sm)",border:t?"1px solid var(--fill-accent-secondary-hover)":"1px solid var(--border-neutral-alpha-basic)"}),r=F.css({width:"24px",height:"24px",color:t?"var(--icon-secondary)":"var(--icon-tertiary)"});return x.jsx(I,{className:s,onClick:o?void 0:n,children:i?x.jsx(Ny,{className:r}):x.jsx(q,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},Gy=F.css({position:"relative",borderRadius:"var(--corner-md)",overflow:"hidden","&::before, &::after":{content:'""',position:"absolute",top:0,bottom:14,width:96,pointerEvents:"none",zIndex:2,transition:"opacity 0.2s ease"},"&::before":{left:0,background:"linear-gradient(to left, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"},"&::after":{right:0,background:"linear-gradient(to right, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"}}),Uy=F.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--neutral-86) var(--neutral-96)"}),hu=C.memo(({data:e,children:t,className:n,showBorders:i=!1,...o})=>{const[s,r]=C.useState(!1),[a,l]=C.useState(!1),u=C.useRef(null),c=C.useCallback(()=>{const f=u.current;if(!f)return;const{scrollLeft:h,scrollWidth:m,clientWidth:g}=f,y=m>g;r(y&&h>0),l(y&&h<m-g-1)},[]);C.useEffect(()=>{const f=u.current;if(!f)return;c();const h=new ResizeObserver(c);return h.observe(f),f.addEventListener("scroll",c),()=>{h.disconnect(),f.removeEventListener("scroll",c)}},[c,e]);const d=F.css({border:i?"1px solid var(--border-neutral-alpha-low)":"transparent","&::before":{opacity:s?1:0},"&::after":{opacity:a?1:0}});return x.jsx(I,{className:F.cx(Gy,d,n),...o,children:x.jsx(I,{ref:u,className:Uy,children:t})})});hu.displayName="TableWrapper";const gu=C.forwardRef(({data:e,columns:t,showBorders:n=!0,enableSorting:i=!1,enablePagination:o=!1,enableRowSelection:s=!1,enableMultiRowSelection:r=!1,sorting:a,onSortingChange:l,columnFilters:u,onColumnFiltersChange:c,columnVisibility:d,onColumnVisibilityChange:f,pagination:h,onPaginationChange:m,rowSelection:g,onRowSelectionChange:y,totalCount:v,loading:w=!1,emptyLabels:p={title:"Nothing found",description:"No results found for “result”",action:"Reset"},loadingLabels:b={title:"Loading...",description:"Please wait or reset your promt",action:"Reset"},className:_,containerClassName:E,tableOptions:P={},onRowClick:M,getRowId:k,headCellComponent:A=$y,bodyCellComponent:j=jy,headRowComponent:U=fu,bodyRowComponent:G=du,onReset:D,renderPageSizeSelectorItem:H},z)=>{const T=C.useMemo(()=>$v(),[]),[R,L]=C.useState([]),[V,W]=C.useState([]),[$,Y]=C.useState({}),[De,ne]=C.useState({pageIndex:0,pageSize:10}),[fe,Fe]=C.useState({}),st=a??R,rt=u??V,at=d??$,Se=h??De,lt=g??fe,Vt=K=>{const X=typeof K=="function"?K(st):K;l?l(X):L(X)},At=K=>{const X=typeof K=="function"?K(rt):K;c?c(X):W(X)},yu=K=>{const X=typeof K=="function"?K(at):K;f?f(X):Y(X)},qn=K=>{const X=typeof K=="function"?K(Se):K;m?m(X):ne(X)},xu=K=>{const X=typeof K=="function"?K(lt):K;y?y(X):Fe(X)},wu=C.useMemo(()=>t.map(({key:K,accessor:X,...ut})=>K==="accessor"?T.accessor(_u=>_u[X],{id:X.toString(),...ut}):T[K]({id:X.toString(),...ut})),[t,T]),Xn=Dy({data:e,columns:wu,state:{sorting:st,columnFilters:rt,columnVisibility:at,pagination:Se,rowSelection:lt},onSortingChange:Vt,onColumnFiltersChange:At,onColumnVisibilityChange:yu,onPaginationChange:qn,onRowSelectionChange:xu,getCoreRowModel:Ry(),getSortedRowModel:i?Py():void 0,getPaginationRowModel:o?My():void 0,enableRowSelection:s,enableMultiRowSelection:r,getRowId:k,manualPagination:!!v,pageCount:v?Math.ceil(v/Se.pageSize):void 0,...P});C.useImperativeHandle(z,()=>Xn);const{rows:ns}=Xn.getRowModel(),Cu=(K,X)=>{M&&M(K.original,X)},Su=F.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:"var(--fill-bg-primary)"}),bu=F.css({backgroundColor:"var(--fill-bg-secondary)",color:"var(--text-tertiary)"});return w?x.jsxs(I,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:F.cx(E),children:[x.jsx(Fy,{width:32,height:32,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),x.jsx(q,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:b.title}),x.jsx(q,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:b.description}),x.jsx(Pn,{onClick:D,whileTap:{scale:.95},fontWeight:"medium",cursor:"pointer",colorName:"accent",children:b.action})]}):ns.length?x.jsxs(I,{w:"full",gap:"var(--spacing-xl)",className:F.cx(E),children:[x.jsx(hu,{data:e,showBorders:n,children:x.jsxs("table",{className:F.cx(Su,Iy.table,_),children:[x.jsx("thead",{className:bu,children:Xn.getHeaderGroups().map(K=>x.jsx(U,{showBorders:n,children:K.headers.map(X=>x.jsx(A,{style:{width:X.getSize()},onClick:X.column.getToggleSortingHandler(),children:X.isPlaceholder?null:Ur(X.column.columnDef.header,X.getContext())},X.id))},K.id))}),x.jsx("tbody",{children:ns.map((K,X)=>x.jsx(G,{showBorders:n,isSelected:K.getIsSelected(),onClick:()=>Cu(K,X),children:K.getVisibleCells().map(ut=>x.jsx(j,{children:Ur(ut.column.columnDef.cell,ut.getContext())},ut.id))},K.id))})]})}),o&&!w&&x.jsx(Hy,{pageIndex:Se.pageIndex,pageSize:Se.pageSize,totalCount:v||e.length,renderPageSizeSelectorItem:H,onPageChange:K=>qn({...Se,pageIndex:K}),onPageSizeChange:K=>qn({...Se,pageSize:K,pageIndex:0})})]}):x.jsxs(I,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:F.cx(E),children:[x.jsx(ky,{width:24,height:24,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),x.jsx(q,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:p.title}),x.jsx(q,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:p.description}),x.jsx(Pn,{onClick:D,whileTap:{scale:.95},fontWeight:"medium",cursor:"pointer",colorName:"accent",children:p.action})]})});gu.displayName="Table";const Ky=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:i="center",py:o="var(--spacing-sm)",px:s="var(--spacing-md)",minHeight:r="56px",...a},l)=>x.jsx(I,{row:t,justifyContent:n,alignItems:i,py:o,px:s,minHeight:r,ref:l,...a,children:e})),es=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:i="center",py:o="var(--spacing-sm)",px:s="var(--spacing-md)",minHeight:r="56px",...a},l)=>x.jsx(I,{row:t,justifyContent:n,alignItems:i,py:o,px:s,minHeight:r,ref:l,...a,children:e}));es.displayName="TableHeadCellContent";const qy=e=>S.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M8.75 4.75L4.75 0.75L0.75 4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Xy=e=>S.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M8.75 0.75L4.75 4.75L0.75 0.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Yy=({sortDirection:e,gap:t="5px",...n})=>x.jsxs(I,{gap:t,...n,children:[x.jsx(qy,{style:{color:e==="asc"?"var(--icon-accent)":"var(--icon-tertiary)"}}),x.jsx(Xy,{style:{color:e==="desc"?"var(--icon-accent)":"var(--icon-tertiary)"}})]}),mu=({children:e,tableProps:t,gap:n="10px",...i})=>{const o=t.column.getIsSorted();return x.jsxs(es,{style:{cursor:"pointer",userSelect:"none"},gap:n,...i,children:[e,x.jsx(Yy,{sortDirection:o})]})};mu.displayName="TableHeadCellContentSortable";const Un=gu;Un.HeadCellContent=es;Un.HeadCellContentSortable=mu;Un.BodyCellContent=Ky;const pu=C.createContext(null),Zy=()=>C.useContext(pu),Kn=({children:e})=>{const[t,n]=C.useState(null),i=Zy();return C.useEffect(()=>{if(typeof document>"u")return;const o=i?.current??document.body;if(!o)return;let s=o.querySelector("[data-portal-root]")??void 0;s||(s=document.createElement("div"),s.setAttribute("data-portal-root","true"),o.appendChild(s)),n(s)},[i]),t?ao.createPortal(e,t):null},Jy="_loader_1qleq_8",Qy={loader:Jy},vu=({color:e="var(--text-accent)"})=>x.jsx("span",{className:F.cx(Qy.loader,F.css({"--loader-color":e}))}),e0=e=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M9 17L14 12L9 7",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),t0="_link_aolvt_8",n0="_separator_aolvt_19",i0="_nav_aolvt_23",Sn={link:t0,separator:n0,nav:i0,"nav-item":"_nav-item_aolvt_29"},ts=({children:e,separator:t=x.jsx(e0,{className:Sn.separator})})=>{const n=C.Children.toArray(e).filter(i=>C.isValidElement(i));return x.jsx("nav",{"aria-label":"breadcrumb",className:Sn.nav,children:n.map((i,o)=>{const s=o===n.length-1;return x.jsxs(q,{tag:"span",className:Sn["nav-item"],children:[C.cloneElement(i,{active:i.props.active??s}),!s&&t]},o)})})},o0=({children:e,href:t,active:n,className:i,activeClassName:o,activeElement:s,onClick:r})=>n?s||x.jsx(q,{tag:"span",variant:"body-2",fontWeight:"medium",colorName:"primary",className:F.cx(i,o),onClick:r,children:e}):x.jsx("a",{href:t,className:F.cx(Sn.link,i),onClick:r,children:e});ts.Item=o0;ts.displayName="Breadcrumbs";const s0=ts,r0="_avatar_1oe2p_8",a0="_avatar_primary_1oe2p_22",l0="_avatar_secondary_1oe2p_25",u0="_avatar_negative_1oe2p_28",c0="_avatar_positive_1oe2p_31",d0="_avatar_warning_1oe2p_34",f0="_avatar_lgSize_1oe2p_71",h0="_avatar_mdSize_1oe2p_85",g0="_avatar_smSize_1oe2p_99",Pi={avatar:r0,avatar_primary:a0,avatar_secondary:l0,avatar_negative:u0,avatar_positive:c0,avatar_warning:d0,avatar_lgSize:f0,avatar_mdSize:h0,avatar_smSize:g0};function m0({attr:e,children:t,className:n,color:i="primary",size:o="md",...s}){const r="avatar";return x.jsx("div",{...e,...s,className:Qe(Pi[r],n,zt(Pi,r,o),kn(Pi,r,i)),children:t})}const p0=e=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),S.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Kr=e=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",fill:"currentColor",fillOpacity:.15}),S.createElement("path",{d:"M12 6C11.4477 6 11 6.44772 11 7V13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V7C13 6.44772 12.5523 6 12 6Z",fill:"currentColor"}),S.createElement("path",{d:"M12 15C11.4477 15 11 15.4477 11 16V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V16C13 15.4477 12.5523 15 12 15Z",fill:"currentColor"})),v0=e=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),S.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),y0=e=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...e},S.createElement("path",{d:"M12 2V22M19.0711 4.92893L4.92893 19.0711M22 12H2M19.0711 19.0711L4.92893 4.92893",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),x0="_hint_prca1_8",w0="_md_prca1_19",C0="_sm_prca1_24",S0="_icon_prca1_29",b0="_content_prca1_40",_0="_title_prca1_46",R0="_subtitle_prca1_50",E0="_disabled_prca1_55",M0="_warning_prca1_60",P0="_solid_prca1_60",T0="_negative_prca1_65",V0="_positive_prca1_70",A0="_accent_prca1_75",D0="_neutral_prca1_80",F0="_soft_prca1_85",ve={hint:x0,md:w0,sm:C0,icon:S0,content:b0,title:_0,subtitle:R0,disabled:E0,warning:M0,solid:P0,negative:T0,positive:V0,accent:A0,neutral:D0,soft:F0},k0={negative:x.jsx(v0,{}),positive:x.jsx(p0,{}),accent:x.jsx(Kr,{}),warning:x.jsx(Kr,{}),neutral:x.jsx(y0,{})},L0=({title:e,subtitle:t,color:n="warning",variant:i="soft",size:o="md",icon:s,disabled:r=!1,className:a,style:l})=>{const u=s||k0[n];return x.jsxs("div",{className:Qe(ve.hint,ve[n],ve[i],ve[o],r&&ve.disabled,a),style:l,"aria-disabled":r,children:[u&&x.jsx("span",{className:Qe(ve.icon,ve[n]),children:u}),x.jsxs("div",{className:ve.content,children:[e&&x.jsx(q,{className:Qe(ve.title,zt(ve,"title",o)),variant:o==="md"?"body-1":"caption-2",children:e}),t&&x.jsx(q,{className:Qe(ve.subtitle,zt(ve,"subtitle",o)),variant:o==="md"?"body-2":"caption-1",children:t})]})]})},I0=F.keyframes`
|
|
52
51
|
from {
|
|
53
52
|
opacity: 0;
|
|
54
53
|
}
|
|
55
54
|
to {
|
|
56
55
|
opacity: 1;
|
|
57
56
|
}
|
|
58
|
-
`,
|
|
57
|
+
`,j0=F.css({animation:`${I0} 0.2s ease-out`,boxShadow:"0 4px 20px 0 var(--shadow-accent-secondary)"}),$0=({children:e,className:t,...n})=>x.jsx(I,{relative:!0,backgroundColor:"var(--fill-bg-primary)",borderRadius:"var(--corner-md)",className:F.cx(j0,t),...n,children:e}),O0=({children:e,content:t,initialOpen:n=!1,open:i,onChange:o,placement:s="bottom",trigger:r="click",offset:a=12,closeOnBackdropClick:l=!0,closeOnEsc:u=!0,className:c,contentClassName:d,style:f,openDelay:h=200,closeDelay:m=200,zIndex:g=1,popoverContentComponent:y=$0})=>{const[v,w]=C.useState(n),p=i??v,b=o??w,_=C.useCallback(T=>{l&&T.target===T.currentTarget&&b(!1)},[l,b]),{context:E,refs:P,floatingStyles:M}=Yl({placement:s,open:p,onOpenChange:b,whileElementsMounted:Hl,middleware:[Gl(a),Kl({crossAxis:s.includes("-"),fallbackAxisSideDirection:s.includes("start")?"start":"end",padding:a}),Ul({padding:a})]}),k=Bp(E,{enabled:r==="click"}),A=$p(E,{enabled:r==="hover",delay:{open:h,close:m}}),j=Hp(E,{enabled:u,escapeKey:!0}),U=Kp(E),G=Gp([k,A,j,U]),D=e.ref,H=Pp([P.setReference,D]),z=C.cloneElement(e,G.getReferenceProps({...e.props,ref:H,"data-state":E.open?"open":"closed"}));return x.jsxs(x.Fragment,{children:[z,p&&x.jsxs(Kn,{children:[r!=="hover"&&l&&x.jsx(I,{position:"fixed",top:0,right:0,bottom:0,left:0,display:"block",backgroundColor:"transparent",onClick:_,zIndex:g}),x.jsx(I,{absolute:!0,zIndex:g,className:c,ref:P.setFloating,style:{...M,...f},...G.getFloatingProps(),children:x.jsx(y,{className:d,children:t})})]})]})},B0="_themeProviderScoped_etvz9_9",N0={themeProviderScoped:B0};function z0({className:e,children:t,theme:n}){const i=C.useRef(null);return x.jsx(pu.Provider,{value:i,children:x.jsx("div",{ref:i,className:Qe(N0.themeProviderScoped,e),id:"theme-provider-scoped","data-theme":n,children:t})})}exports.AnimatedText=Pn;exports.Avatar=m0;exports.Box=I;exports.Breadcrumbs=s0;exports.Button=Qg;exports.Checkbox=Wo;exports.Hint=L0;exports.IconButton=Ht;exports.Input=Al;exports.Loader=vu;exports.Modal=Wn;exports.Popover=O0;exports.Portal=Kn;exports.Ripple=_t;exports.SegmentControl=Sv;exports.Select=Zl;exports.Switch=Jl;exports.Table=Un;exports.Tag=Yo;exports.Text=q;exports.ThemeProviderScoped=z0;exports.getSizeClass=zt;exports.getStyleClass=kn;exports.useControlled=Fn;
|
|
59
58
|
//# sourceMappingURL=ui-kit.cjs.js.map
|