@dss-kit/ui-kit 0.2.15 → 0.2.17

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.
Files changed (73) hide show
  1. package/dist/components/builders/Box/Box.d.ts +2 -0
  2. package/dist/components/builders/Box/Box.d.ts.map +1 -1
  3. package/dist/components/builders/Modal/Modal.d.ts +2 -2
  4. package/dist/components/builders/Modal/Modal.d.ts.map +1 -1
  5. package/dist/components/builders/Modal/ModalFooter/ModalFooter.d.ts +38 -0
  6. package/dist/components/builders/Modal/ModalFooter/ModalFooter.d.ts.map +1 -1
  7. package/dist/components/builders/Modal/ModalHeader/ModalHeader.d.ts +16 -3
  8. package/dist/components/builders/Modal/ModalHeader/ModalHeader.d.ts.map +1 -1
  9. package/dist/components/builders/Modal/ModalMain/ModalMain.d.ts +67 -6
  10. package/dist/components/builders/Modal/ModalMain/ModalMain.d.ts.map +1 -1
  11. package/dist/components/builders/Table/TablePagination/TablePagination.d.ts.map +1 -1
  12. package/dist/components/builders/Table/TablePagination/TablePagination.utils.d.ts +16 -5
  13. package/dist/components/builders/Table/TablePagination/TablePagination.utils.d.ts.map +1 -1
  14. package/dist/components/builders/Text/Text.d.ts +2 -2
  15. package/dist/components/charts/LineChart/LineChart.d.ts +3 -2
  16. package/dist/components/charts/LineChart/LineChart.d.ts.map +1 -1
  17. package/dist/components/charts/LineChart/LineChart.stories.d.ts +3 -1
  18. package/dist/components/charts/LineChart/LineChart.stories.d.ts.map +1 -1
  19. package/dist/components/charts/LineChart/constants.d.ts.map +1 -1
  20. package/dist/components/charts/LineChart/types.d.ts +56 -13
  21. package/dist/components/charts/LineChart/types.d.ts.map +1 -1
  22. package/dist/components/charts/LineChart/utils.d.ts +3 -1
  23. package/dist/components/charts/LineChart/utils.d.ts.map +1 -1
  24. package/dist/components/charts/PieProgressChart/PieProgressChart.d.ts +2 -1
  25. package/dist/components/charts/PieProgressChart/PieProgressChart.d.ts.map +1 -1
  26. package/dist/components/controls/Input/Input.d.ts +1 -1
  27. package/dist/components/controls/Input/Input.d.ts.map +1 -1
  28. package/dist/components/controls/Input/Input.stories.d.ts +1 -0
  29. package/dist/components/controls/Input/Input.stories.d.ts.map +1 -1
  30. package/dist/components/controls/RadioGroup/Radio.d.ts +93 -0
  31. package/dist/components/controls/RadioGroup/Radio.d.ts.map +1 -0
  32. package/dist/components/controls/RadioGroup/RadioGroup.d.ts +116 -0
  33. package/dist/components/controls/RadioGroup/RadioGroup.d.ts.map +1 -0
  34. package/dist/components/controls/RadioGroup/RadioGroup.stories.d.ts +16 -0
  35. package/dist/components/controls/RadioGroup/RadioGroup.stories.d.ts.map +1 -0
  36. package/dist/components/controls/RadioGroup/context.d.ts +87 -0
  37. package/dist/components/controls/RadioGroup/context.d.ts.map +1 -0
  38. package/dist/components/controls/RadioGroup/index.d.ts +3 -0
  39. package/dist/components/controls/RadioGroup/index.d.ts.map +1 -0
  40. package/dist/components/controls/Select/Select.d.ts +12 -1
  41. package/dist/components/controls/Select/Select.d.ts.map +1 -1
  42. package/dist/components/controls/Select/Select.stories.d.ts.map +1 -1
  43. package/dist/components/controls/index.d.ts +1 -0
  44. package/dist/components/controls/index.d.ts.map +1 -1
  45. package/dist/components/index.d.ts +1 -0
  46. package/dist/components/index.d.ts.map +1 -1
  47. package/dist/components/shared/Skeleton/Skeleton.d.ts +296 -0
  48. package/dist/components/shared/Skeleton/Skeleton.d.ts.map +1 -0
  49. package/dist/components/shared/Skeleton/Skeleton.stories.d.ts +15 -0
  50. package/dist/components/shared/Skeleton/Skeleton.stories.d.ts.map +1 -0
  51. package/dist/components/shared/Skeleton/index.d.ts +3 -0
  52. package/dist/components/shared/Skeleton/index.d.ts.map +1 -0
  53. package/dist/components/shared/Tooltip/Tooltip.d.ts +139 -0
  54. package/dist/components/shared/Tooltip/Tooltip.d.ts.map +1 -0
  55. package/dist/components/shared/Tooltip/Tooltip.stories.d.ts +34 -0
  56. package/dist/components/shared/Tooltip/Tooltip.stories.d.ts.map +1 -0
  57. package/dist/components/shared/Tooltip/constants.d.ts +24 -0
  58. package/dist/components/shared/Tooltip/constants.d.ts.map +1 -0
  59. package/dist/components/shared/Tooltip/index.d.ts +3 -0
  60. package/dist/components/shared/Tooltip/index.d.ts.map +1 -0
  61. package/dist/components/shared/Tooltip/types.d.ts +16 -0
  62. package/dist/components/shared/Tooltip/types.d.ts.map +1 -0
  63. package/dist/components/shared/Tooltip/utils.d.ts +14 -0
  64. package/dist/components/shared/Tooltip/utils.d.ts.map +1 -0
  65. package/dist/components/shared/index.d.ts +2 -0
  66. package/dist/components/shared/index.d.ts.map +1 -1
  67. package/dist/root.css +1 -1
  68. package/dist/ui-kit.cjs.js +10 -29
  69. package/dist/ui-kit.cjs.js.map +1 -1
  70. package/dist/ui-kit.css +1 -1
  71. package/dist/ui-kit.es.js +5235 -4234
  72. package/dist/ui-kit.es.js.map +1 -1
  73. package/package.json +5 -5
@@ -1,40 +1,18 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),k=require("@emotion/css"),C=require("react"),fs=require("react-dom");function Zr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const b=Zr(C),Vc=Zr(fs);function Ac(e){const{h:t,w:n,m:o,mx:s,my:i,mt:r,mr:a,mb:l,ml:c,p:u,px:d,py:f,pt:h,pr:m,pb:g,pl:p,gap:w,xGap:x,yGap:v,row:S,flex:_,relative:P,absolute:V,display:M,overflow:A,absoluteFill:F,center:$,justifyContent:z,alignItems:O,alignSelf:D,borderWidth:B,borderBottomWidth:N,borderColor:E,borderRadius:R,zIndex:T,minWidth:L,minHeight:Y,maxWidth:U,maxHeight:q,flexWrap:me,flexGrow:J,flexShrink:se,flexBasis:j,backgroundColor:Z,position:ie,top:he,right:ce,bottom:Ge,left:At,...Dt}=e;return{spacers:{h:t,w:n,m:o,mx:s,my:i,mt:r,mr:a,mb:l,ml:c,p:u,px:d,py:f,pt:h,pr:m,pb:g,pl:p,gap:w,xGap:x,yGap:v,row:S,flex:_,relative:P,absolute:V,display:M,overflow:A,absoluteFill:F,center:$,justifyContent:z,alignItems:O,alignSelf:D,borderWidth:B,borderBottomWidth:N,borderColor:E,borderRadius:R,zIndex:T,minWidth:L,minHeight:Y,maxWidth:U,maxHeight:q,flexWrap:me,flexGrow:J,flexShrink:se,flexBasis:j,backgroundColor:Z,position:ie,top:he,right:ce,bottom:Ge,left:At},rest:Dt}}const Dc=e=>k.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},o)=>{const{spacers:s,rest:i}=Ac(n),r=C.useMemo(()=>Dc(s),[s]);return y.jsx("div",{ref:o,className:k.cx(r,e),...i,children:t})});I.displayName="Box";const kc="_loader_1qleq_8",Fc={loader:kc},Jr=({color:e="var(--text-accent)"})=>y.jsx("span",{className:k.cx(Fc.loader,k.css({"--loader-color":e}))}),Qr=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function Lc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qn={exports:{}};/*!
2
- Copyright (c) 2018 Jed Watson.
3
- Licensed under the MIT License (MIT), see
4
- http://jedwatson.github.io/classnames
5
- */var ri;function Ic(){return ri||(ri=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",r=0;r<arguments.length;r++){var a=arguments[r];a&&(i=s(i,o(a)))}return i}function o(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var r="";for(var a in i)t.call(i,a)&&i[a]&&(r=s(r,a));return r}function s(i,r){return r?i?i+" "+r:i+r:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Qn)),Qn.exports}var jc=Ic();const ot=Lc(jc),$c="_rippleOverlay_s2kim_8",Oc="_ripple_s2kim_8",ai={rippleOverlay:$c,ripple:Oc},eo="button, a, input, label, [role='button'], [data-ripple]";function Nc(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 ct=C.forwardRef(({color:e="rgba(0,0,0,0.18)",duration:t=1e3,radius:n="auto",className:o},s)=>{const i=C.useRef(null),[r,a]=C.useState([]),l=C.useRef([]),c=C.useRef(1),u=C.useRef(null),d=()=>{l.current.map(g=>clearTimeout(g)),l.current=[]},f=C.useCallback((g,p,w,x)=>{if(typeof window>"u")return;const v=w.getBoundingClientRect(),S=n==="auto"?Math.max(v.width,v.height)*2:n,_=g-x.left,P=p-x.top,V=Math.max(0,v.top-x.top),M=Math.max(0,v.left-x.left),A=Math.max(0,x.right-v.right),F=Math.max(0,x.bottom-v.bottom),z=window.getComputedStyle(w).borderRadius||"0px",O=c.current++,D={id:O,left:_-S/2,top:P-S/2,size:Math.ceil(S),clip:{top:Math.round(V),right:Math.round(A),bottom:Math.round(F),left:Math.round(M)},borderRadius:z};a(N=>[...N,D]);const B=window.setTimeout(()=>{a(N=>N.filter(E=>E.id!==O))},t+80);l.current.push(B)},[t,n]),h=C.useCallback(g=>{try{if(!i.current)return;const p=i.current,w=p.parentElement;if(!w)return;const x=Nc(g);let v=null;for(const M of x)if(M instanceof Element){if(M===w)break;if(M.matches&&M.matches(eo)){v=M;break}}if(v||(v=w),v.closest&&(v.closest("[disabled]")||v.getAttribute("aria-disabled")==="true"||v.classList.contains("ripple-disabled")))return;const S=g.target;if(S?.closest&&(S.closest("[disabled]")||S.getAttribute?.("aria-disabled")==="true"))return;const _=p.getBoundingClientRect(),{clientX:P}=g,{clientY:V}=g;f(P,V,v,_)}catch{}},[f]),m=C.useCallback(g=>{if(!i.current||!(g.key==="Enter"||g.key===" "))return;const p=i.current,w=p.parentElement;if(!w)return;const x=document.activeElement;let v=null;if(x instanceof Element&&x.matches(eo)&&(v=x),v||(v=w),v.closest&&(v.closest("[disabled]")||v.getAttribute("aria-disabled")==="true"))return;const S=p.getBoundingClientRect(),_=v.getBoundingClientRect().left+v.getBoundingClientRect().width/2,P=v.getBoundingClientRect().top+v.getBoundingClientRect().height/2;f(_,P,v,S)},[f]);return C.useImperativeHandle(s,()=>({trigger:({center:g=!0,x:p,y:w}={})=>{const x=i.current;if(!x)return;const v=x.parentElement;if(!v)return;const S=x.getBoundingClientRect(),_=document.activeElement instanceof Element&&document.activeElement.matches(eo)?document.activeElement:v,P=g?_.getBoundingClientRect().left+_.getBoundingClientRect().width/2:p??S.left+S.width/2,V=g?_.getBoundingClientRect().top+_.getBoundingClientRect().height/2:w??S.top+S.height/2;f(P,V,_,S)}}),[f]),C.useEffect(()=>{const g=i.current;if(!g)return;const p=g.parentElement;if(!p||typeof window>"u")return;const w=window.getComputedStyle(p);let x=!1;return w.position==="static"&&(p.style.position="relative",x=!0,u.current=p),p.addEventListener("pointerdown",h,!0),p.addEventListener("keydown",m),()=>{p.removeEventListener("pointerdown",h,!0),p.removeEventListener("keydown",m),x&&u.current&&(u.current.style.position="",u.current=null),d()}},[h,m]),C.useEffect(()=>()=>d(),[]),y.jsx("div",{ref:i,className:`${ai.rippleOverlay} ${o??""}`,"aria-hidden":!0,children:r.map(g=>y.jsx("span",{className:ai.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 Jt(e,t){const{current:n}=C.useRef(e!==void 0),[o,s]=C.useState(t),i=n?e:o,r=C.useCallback(a=>{n||s(a)},[]);return[i,r]}function In(e,t,n,o=""){if(n)return e[`${t}_${n}${o}`]}function Ht(e,t,n){return In(e,t,n,"Size")}const Bc="_button_11ykb_8",zc="_button_primary_11ykb_19",Hc="_button_secondary_11ykb_22",Wc="_button_negative_11ykb_25",Gc="_button_positive_11ykb_28",Uc="_button_warning_11ykb_31",Kc="_button_neutral_11ykb_34",qc="_button_mdSize_11ykb_118",Xc="_button_smSize_11ykb_128",Yc="_button_xsSize_11ykb_138",to={button:Bc,button_primary:zc,button_secondary:Hc,button_negative:Wc,button_positive:Gc,button_warning:Uc,button_neutral:Kc,"button_neutral-white":"_button_neutral-white_11ykb_37","button_no-bg":"_button_no-bg_11ykb_40",button_mdSize:qc,button_smSize:Xc,button_xsSize:Yc};function Wt({attr:e,children:t,className:n,type:o="button",color:s="primary",size:i="md",...r}){const a="button";return y.jsxs("button",{...e,...r,type:o,className:ot(to[a],n,Ht(to,a,i),In(to,a,s)),children:[y.jsx(ct,{}),t]})}const ea=C.createContext({isOpen:!1,onClose:()=>{}}),Zc=()=>C.useContext(ea),Jc="_overlay_1gnp0_8",Qc="_modal_1gnp0_12",eu="_closeButton_1gnp0_28",tu="_size_lg_1gnp0_35",nu="_size_md_1gnp0_38",ou="_size_sm_1gnp0_41",an={overlay:Jc,modal:Qc,"modal-animation":"_modal-animation_1gnp0_1",closeButton:eu,size_lg:tu,size_md:nu,size_sm:ou},ta=C.forwardRef(({isOpen:e,onClose:t,overlayClassName:n,modalClassName:o,size:s="md",closeOnBackdropClick:i=!0,closeOnEsc:r=!0,disableBodyScroll:a=!0,showAbsoluteCloseButton:l=!1,children:c},u)=>{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=>{i&&h.target===h.currentTarget&&t()},[i,t]);return e?y.jsx(qn,{children:y.jsx(ea.Provider,{value:{isOpen:e,onClose:t},children:y.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:k.cx(an.overlay,n),zIndex:1,children:y.jsxs(I,{ref:u,className:k.cx(an.modal,an[`size_${s}`],o),relative:!0,children:[l&&y.jsx(Wt,{className:an.closeButton,onClick:t,color:"neutral",children:y.jsx(Qr,{})}),c]})})})}):null});ta.displayName="Modal";const su="_footer_1bo08_8",iu={footer:su},na=C.forwardRef(({children:e,row:t=!0,flex:n=!0,gap:o="var(--spacing-lg)",p:s="var(--spacing-2xl)",className:i,...r},a)=>y.jsx(I,{flex:n,row:t,gap:o,p:s,className:k.cx(iu.footer,i),ref:a,...r,children:e}));na.displayName="ModalFooter";const hs=C.createContext({});function gs(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const ms=typeof window<"u",oa=ms?C.useLayoutEffect:C.useEffect,jn=C.createContext(null);function ps(e,t){e.indexOf(t)===-1&&e.push(t)}function vs(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Be=(e,t,n)=>n>t?t:n<e?e:n;function Do(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Rt=()=>{},ze=()=>{};process.env.NODE_ENV!=="production"&&(Rt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Do(t,n))},ze=(e,t,n)=>{if(!e)throw new Error(Do(t,n))});const He={},sa=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ia(e){return typeof e=="object"&&e!==null}const ra=e=>/^0[^.\s]+$/u.test(e);function ys(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ee=e=>e,ru=(e,t)=>n=>t(e(n)),Qt=(...e)=>e.reduce(ru),Gt=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class ws{constructor(){this.subscriptions=[]}add(t){return ps(this.subscriptions,t),()=>vs(this.subscriptions,t)}notify(t,n,o){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,o);else for(let i=0;i<s;i++){const r=this.subscriptions[i];r&&r(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ae=e=>e*1e3,Re=e=>e/1e3;function aa(e,t){return t?e*(1e3/t):0}const li=new Set;function xs(e,t,n){e||li.has(t)||(console.warn(Do(t,n)),li.add(t))}const la=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,au=1e-7,lu=12;function cu(e,t,n,o,s){let i,r,a=0;do r=t+(n-t)/2,i=la(r,o,s)-e,i>0?n=r:t=r;while(Math.abs(i)>au&&++a<lu);return r}function en(e,t,n,o){if(e===t&&n===o)return Ee;const s=i=>cu(i,0,1,e,n);return i=>i===0||i===1?i:la(s(i),t,o)}const ca=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ua=e=>t=>1-e(1-t),da=en(.33,1.53,.69,.99),Cs=ua(da),fa=ca(Cs),ha=e=>(e*=2)<1?.5*Cs(e):.5*(2-Math.pow(2,-10*(e-1))),Ss=e=>1-Math.sin(Math.acos(e)),ga=ua(Ss),ma=ca(Ss),uu=en(.42,0,1,1),du=en(0,0,.58,1),pa=en(.42,0,.58,1),fu=e=>Array.isArray(e)&&typeof e[0]!="number",va=e=>Array.isArray(e)&&typeof e[0]=="number",ci={linear:Ee,easeIn:uu,easeInOut:pa,easeOut:du,circIn:Ss,circInOut:ma,circOut:ga,backIn:Cs,backInOut:fa,backOut:da,anticipate:ha},hu=e=>typeof e=="string",ui=e=>{if(va(e)){ze(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,o,s]=e;return en(t,n,o,s)}else if(hu(e))return ze(ci[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ci[e];return e},ln=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function gu(e,t){let n=new Set,o=new Set,s=!1,i=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){r.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const m=f&&s?n:o;return d&&r.add(u),m.has(u)||m.add(u),u},cancel:u=>{o.delete(u),r.delete(u)},process:u=>{if(a=u,s){i=!0;return}s=!0,[n,o]=[o,n],n.forEach(l),n.clear(),s=!1,i&&(i=!1,c.process(u))}};return c}const mu=40;function ya(e,t){let n=!1,o=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,r=ln.reduce((v,S)=>(v[S]=gu(i),v),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:m}=r,g=()=>{const v=He.useManualTiming?s.timestamp:performance.now();n=!1,He.useManualTiming||(s.delta=o?1e3/60:Math.max(Math.min(v-s.timestamp,mu),1)),s.timestamp=v,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),f.process(s),h.process(s),m.process(s),s.isProcessing=!1,n&&t&&(o=!1,e(g))},p=()=>{n=!0,o=!0,s.isProcessing||e(g)};return{schedule:ln.reduce((v,S)=>{const _=r[S];return v[S]=(P,V=!1,M=!1)=>(n||p(),_.schedule(P,V,M)),v},{}),cancel:v=>{for(let S=0;S<ln.length;S++)r[ln[S]].cancel(v)},state:s,steps:r}}const{schedule:te,cancel:Ye,state:ue,steps:no}=ya(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ee,!0);let xn;function pu(){xn=void 0}const ve={now:()=>(xn===void 0&&ve.set(ue.isProcessing||He.useManualTiming?ue.timestamp:performance.now()),xn),set:e=>{xn=e,queueMicrotask(pu)}},wa=e=>t=>typeof t=="string"&&t.startsWith(e),bs=wa("--"),vu=wa("var(--"),_s=e=>vu(e)?yu.test(e.split("/*")[0].trim()):!1,yu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Et={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ut={...Et,transform:e=>Be(0,1,e)},cn={...Et,default:1},$t=e=>Math.round(e*1e5)/1e5,Rs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wu(e){return e==null}const xu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Es=(e,t)=>n=>!!(typeof n=="string"&&xu.test(n)&&n.startsWith(e)||t&&!wu(n)&&Object.prototype.hasOwnProperty.call(n,t)),xa=(e,t,n)=>o=>{if(typeof o!="string")return o;const[s,i,r,a]=o.match(Rs);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Cu=e=>Be(0,255,e),oo={...Et,transform:e=>Math.round(Cu(e))},st={test:Es("rgb","red"),parse:xa("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+oo.transform(e)+", "+oo.transform(t)+", "+oo.transform(n)+", "+$t(Ut.transform(o))+")"};function Su(e){let t="",n="",o="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,o+=o,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:s?parseInt(s,16)/255:1}}const ko={test:Es("#"),parse:Su,transform:st.transform},tn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ke=tn("deg"),Fe=tn("%"),G=tn("px"),bu=tn("vh"),_u=tn("vw"),di={...Fe,parse:e=>Fe.parse(e)/100,transform:e=>Fe.transform(e*100)},ft={test:Es("hsl","hue"),parse:xa("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Fe.transform($t(t))+", "+Fe.transform($t(n))+", "+$t(Ut.transform(o))+")"},ae={test:e=>st.test(e)||ko.test(e)||ft.test(e),parse:e=>st.test(e)?st.parse(e):ft.test(e)?ft.parse(e):ko.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?st.transform(e):ft.transform(e),getAnimatableNone:e=>{const t=ae.parse(e);return t.alpha=0,ae.transform(t)}},Ru=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Eu(e){return isNaN(e)&&typeof e=="string"&&(e.match(Rs)?.length||0)+(e.match(Ru)?.length||0)>0}const Ca="number",Sa="color",Mu="var",Pu="var(",fi="${}",Tu=/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 Kt(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(Tu,l=>(ae.test(l)?(o.color.push(i),s.push(Sa),n.push(ae.parse(l))):l.startsWith(Pu)?(o.var.push(i),s.push(Mu),n.push(l)):(o.number.push(i),s.push(Ca),n.push(parseFloat(l))),++i,fi)).split(fi);return{values:n,split:a,indexes:o,types:s}}function ba(e){return Kt(e).values}function _a(e){const{split:t,types:n}=Kt(e),o=t.length;return s=>{let i="";for(let r=0;r<o;r++)if(i+=t[r],s[r]!==void 0){const a=n[r];a===Ca?i+=$t(s[r]):a===Sa?i+=ae.transform(s[r]):i+=s[r]}return i}}const Vu=e=>typeof e=="number"?0:ae.test(e)?ae.getAnimatableNone(e):e;function Au(e){const t=ba(e);return _a(e)(t.map(Vu))}const Ze={test:Eu,parse:ba,createTransformer:_a,getAnimatableNone:Au};function so(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 Du({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let s=0,i=0,r=0;if(!t)s=i=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=so(l,a,e+1/3),i=so(l,a,e),r=so(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(r*255),alpha:o}}function Mn(e,t){return n=>n>0?t:e}const oe=(e,t,n)=>e+(t-e)*n,io=(e,t,n)=>{const o=e*e,s=n*(t*t-o)+o;return s<0?0:Math.sqrt(s)},ku=[ko,st,ft],Fu=e=>ku.find(t=>t.test(e));function hi(e){const t=Fu(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===ft&&(n=Du(n)),n}const gi=(e,t)=>{const n=hi(e),o=hi(t);if(!n||!o)return Mn(e,t);const s={...n};return i=>(s.red=io(n.red,o.red,i),s.green=io(n.green,o.green,i),s.blue=io(n.blue,o.blue,i),s.alpha=oe(n.alpha,o.alpha,i),st.transform(s))},Fo=new Set(["none","hidden"]);function Lu(e,t){return Fo.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Iu(e,t){return n=>oe(e,t,n)}function Ms(e){return typeof e=="number"?Iu:typeof e=="string"?_s(e)?Mn:ae.test(e)?gi:Ou:Array.isArray(e)?Ra:typeof e=="object"?ae.test(e)?gi:ju:Mn}function Ra(e,t){const n=[...e],o=n.length,s=e.map((i,r)=>Ms(i)(i,t[r]));return i=>{for(let r=0;r<o;r++)n[r]=s[r](i);return n}}function ju(e,t){const n={...e,...t},o={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(o[s]=Ms(e[s])(e[s],t[s]));return s=>{for(const i in o)n[i]=o[i](s);return n}}function $u(e,t){const n=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],r=e.indexes[i][o[i]],a=e.values[r]??0;n[s]=a,o[i]++}return n}const Ou=(e,t)=>{const n=Ze.createTransformer(t),o=Kt(e),s=Kt(t);return o.indexes.var.length===s.indexes.var.length&&o.indexes.color.length===s.indexes.color.length&&o.indexes.number.length>=s.indexes.number.length?Fo.has(e)&&!s.values.length||Fo.has(t)&&!o.values.length?Lu(e,t):Qt(Ra($u(o,s),s.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"),Mn(e,t))};function Ea(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?oe(e,t,n):Ms(e)(e,t)}const Nu=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>te.update(t,n),stop:()=>Ye(t),now:()=>ue.isProcessing?ue.timestamp:ve.now()}},Ma=(e,t,n=10)=>{let o="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)o+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},Pn=2e4;function Ps(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Pn;)t+=n,o=e.next(t);return t>=Pn?1/0:t}function Bu(e,t=100,n){const o=n({...e,keyframes:[0,t]}),s=Math.min(Ps(o),Pn);return{type:"keyframes",ease:i=>o.next(s*i).value/t,duration:Re(s)}}const zu=5;function Pa(e,t,n){const o=Math.max(t-zu,0);return aa(n-e(o),t-o)}const ne={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},ro=.001;function Hu({duration:e=ne.duration,bounce:t=ne.bounce,velocity:n=ne.velocity,mass:o=ne.mass}){let s,i;Rt(e<=Ae(ne.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=Be(ne.minDamping,ne.maxDamping,r),e=Be(ne.minDuration,ne.maxDuration,Re(e)),r<1?(s=c=>{const u=c*r,d=u*e,f=u-n,h=Lo(c,r),m=Math.exp(-d);return ro-f/h*m},i=c=>{const d=c*r*e,f=d*n+n,h=Math.pow(r,2)*Math.pow(c,2)*e,m=Math.exp(-d),g=Lo(Math.pow(c,2),r);return(-s(c)+ro>0?-1:1)*((f-h)*m)/g}):(s=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-ro+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=Gu(s,i,a);if(e=Ae(e),isNaN(l))return{stiffness:ne.stiffness,damping:ne.damping,duration:e};{const c=Math.pow(l,2)*o;return{stiffness:c,damping:r*2*Math.sqrt(o*c),duration:e}}}const Wu=12;function Gu(e,t,n){let o=n;for(let s=1;s<Wu;s++)o=o-e(o)/t(o);return o}function Lo(e,t){return e*Math.sqrt(1-t*t)}const Uu=["duration","bounce"],Ku=["stiffness","damping","mass"];function mi(e,t){return t.some(n=>e[n]!==void 0)}function qu(e){let t={velocity:ne.velocity,stiffness:ne.stiffness,damping:ne.damping,mass:ne.mass,isResolvedFromDuration:!1,...e};if(!mi(e,Ku)&&mi(e,Uu))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),s=o*o,i=2*Be(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:ne.mass,stiffness:s,damping:i}}else{const n=Hu(e);t={...t,...n,mass:ne.mass},t.isResolvedFromDuration=!0}return t}function Tn(e=ne.visualDuration,t=ne.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:s}=n;const i=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=qu({...n,velocity:-Re(n.velocity||0)}),m=f||0,g=c/(2*Math.sqrt(l*u)),p=r-i,w=Re(Math.sqrt(l/u)),x=Math.abs(p)<5;o||(o=x?ne.restSpeed.granular:ne.restSpeed.default),s||(s=x?ne.restDelta.granular:ne.restDelta.default);let v;if(g<1){const _=Lo(w,g);v=P=>{const V=Math.exp(-g*w*P);return r-V*((m+g*w*p)/_*Math.sin(_*P)+p*Math.cos(_*P))}}else if(g===1)v=_=>r-Math.exp(-w*_)*(p+(m+w*p)*_);else{const _=w*Math.sqrt(g*g-1);v=P=>{const V=Math.exp(-g*w*P),M=Math.min(_*P,300);return r-V*((m+g*w*p)*Math.sinh(M)+_*p*Math.cosh(M))/_}}const S={calculatedDuration:h&&d||null,next:_=>{const P=v(_);if(h)a.done=_>=d;else{let V=_===0?m:0;g<1&&(V=_===0?Ae(m):Pa(v,_,P));const M=Math.abs(V)<=o,A=Math.abs(r-P)<=s;a.done=M&&A}return a.value=a.done?r:P,a},toString:()=>{const _=Math.min(Ps(S),Pn),P=Ma(V=>S.next(_*V).value,_,30);return _+"ms "+P},toTransition:()=>{}};return S}Tn.applyToOptions=e=>{const t=Bu(e,100,Tn);return e.ease=t.ease,e.duration=Ae(t.duration),e.type="keyframes",e};function Io({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){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 p=d+g,w=r===void 0?p:r(p);w!==p&&(g=w-d);const x=M=>-g*Math.exp(-M/o),v=M=>w+x(M),S=M=>{const A=x(M),F=v(M);f.done=Math.abs(A)<=c,f.value=f.done?w:F};let _,P;const V=M=>{h(f.value)&&(_=M,P=Tn({keyframes:[f.value,m(f.value)],velocity:Pa(v,M,f.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return V(0),{calculatedDuration:null,next:M=>{let A=!1;return!P&&_===void 0&&(A=!0,S(M),V(M)),_!==void 0&&M>=_?P.next(M-_):(!A&&S(M),f)}}}function Xu(e,t,n){const o=[],s=n||He.mix||Ea,i=e.length-1;for(let r=0;r<i;r++){let a=s(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||Ee:t;a=Qt(l,a)}o.push(a)}return o}function Yu(e,t,{clamp:n=!0,ease:o,mixer:s}={}){const i=e.length;if(ze(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Xu(t,o,s),l=a.length,c=u=>{if(r&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Gt(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Be(e[0],e[i-1],u)):c}function Zu(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const s=Gt(0,t,o);e.push(oe(n,1,s))}}function Ju(e){const t=[0];return Zu(t,e.length-1),t}function Qu(e,t){return e.map(n=>n*t)}function ed(e,t){return e.map(()=>t||pa).splice(0,e.length-1)}function ht({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const s=fu(o)?o.map(ui):ui(o),i={done:!1,value:t[0]},r=Qu(n&&n.length===t.length?n:Ju(t),e),a=Yu(r,t,{ease:Array.isArray(s)?s:ed(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const td=e=>e!==null;function Ts(e,{repeat:t,repeatType:n="loop"},o,s=1){const i=e.filter(td),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||o===void 0?i[a]:o}const nd={decay:Io,inertia:Io,tween:ht,keyframes:ht,spring:Tn};function Ta(e){typeof e.type=="string"&&(e.type=nd[e.type])}class Vs{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 od=e=>e/100;class As extends Vs{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!==ve.now()&&this.tick(ve.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;Ta(t);const{type:n=ht,repeat:o=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=t;let{keyframes:a}=t;const l=n||ht;process.env.NODE_ENV!=="production"&&l!==ht&&ze(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==ht&&typeof a[0]!="number"&&(this.mixKeyframes=Qt(od,Ea(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=Ps(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(o+1)-s,this.generator=c}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:o,totalDuration:s,mixKeyframes:i,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return o.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:m,onUpdate:g,finalKeyframe:p}=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-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?w<0:w>s;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,S=o;if(d){const M=Math.min(this.currentTime,s)/a;let A=Math.floor(M),F=M%1;!F&&M>=1&&(F=1),F===1&&A--,A=Math.min(A,d+1),!!(A%2)&&(f==="reverse"?(F=1-F,h&&(F-=h/a)):f==="mirror"&&(S=r)),v=Be(0,1,F)*a}const _=x?{done:!1,value:u[0]}:S.next(v);i&&(_.value=i(_.value));let{done:P}=_;!x&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return V&&m!==Io&&(_.value=Ts(u,this.options,p,this.speed)),g&&g(_.value),V&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return Re(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Re(t)}get time(){return Re(this.currentTime)}set time(t){t=Ae(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(ve.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Re(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Nu,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=n??o),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(ve.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 sd(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const it=e=>e*180/Math.PI,jo=e=>{const t=it(Math.atan2(e[1],e[0]));return $o(t)},id={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:jo,rotateZ:jo,skewX:e=>it(Math.atan(e[1])),skewY:e=>it(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$o=e=>(e=e%360,e<0&&(e+=360),e),pi=jo,vi=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),yi=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),rd={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:vi,scaleY:yi,scale:e=>(vi(e)+yi(e))/2,rotateX:e=>$o(it(Math.atan2(e[6],e[5]))),rotateY:e=>$o(it(Math.atan2(-e[2],e[0]))),rotateZ:pi,rotate:pi,skewX:e=>it(Math.atan(e[4])),skewY:e=>it(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Oo(e){return e.includes("scale")?1:0}function No(e,t){if(!e||e==="none")return Oo(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,s;if(n)o=rd,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=id,s=a}if(!s)return Oo(t);const i=o[t],r=s[1].split(",").map(ld);return typeof i=="function"?i(r):r[i]}const ad=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return No(n,t)};function ld(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),wi=e=>e===Et||e===G,cd=new Set(["x","y","z"]),ud=Mt.filter(e=>!cd.has(e));function dd(e){const t=[];return ud.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const rt={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})=>No(t,"x"),y:(e,{transform:t})=>No(t,"y")};rt.translateX=rt.x;rt.translateY=rt.y;const at=new Set;let Bo=!1,zo=!1,Ho=!1;function Va(){if(zo){const e=Array.from(at).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const s=dd(o);s.length&&(n.set(o,s),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const s=n.get(o);s&&s.forEach(([i,r])=>{o.getValue(i)?.set(r)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}zo=!1,Bo=!1,at.forEach(e=>e.complete(Ho)),at.clear()}function Aa(){at.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(zo=!0)})}function fd(){Ho=!0,Aa(),Va(),Ho=!1}class Ds{constructor(t,n,o,s,i,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(at.add(this),Bo||(Bo=!0,te.read(Aa),te.resolveKeyframes(Va))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:s}=this;if(t[0]===null){const i=s?.get(),r=t[t.length-1];if(i!==void 0)t[0]=i;else if(o&&n){const a=o.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),s&&i===void 0&&s.set(t[0])}sd(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),at.delete(this)}cancel(){this.state==="scheduled"&&(at.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const hd=e=>e.startsWith("--");function gd(e,t,n){hd(t)?e.style.setProperty(t,n):e.style[t]=n}const md=ys(()=>window.ScrollTimeline!==void 0),pd={};function vd(e,t){const n=ys(e);return()=>pd[t]??n()}const Da=vd(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),jt=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,xi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jt([0,.65,.55,1]),circOut:jt([.55,0,1,.45]),backIn:jt([.31,.01,.66,-.59]),backOut:jt([.33,1.53,.69,.99])};function ka(e,t){if(e)return typeof e=="function"?Da()?Ma(e,t):"ease-out":va(e)?jt(e):Array.isArray(e)?e.map(n=>ka(n,t)||xi.easeOut):xi[e]}function yd(e,t,n,{delay:o=0,duration:s=300,repeat:i=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=ka(a,s);Array.isArray(d)&&(u.easing=d);const f={delay:o,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function Fa(e){return typeof e=="function"&&"applyToOptions"in e}function wd({type:e,...t}){return Fa(e)&&Da()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class xd extends Vs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:o,keyframes:s,pseudoElement:i,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=r,this.options=t,ze(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=wd(t);this.animation=yd(n,o,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Ts(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):gd(n,o,u),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 Re(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Re(t)}get time(){return Re(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ae(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&&md()?(this.animation.timeline=t,Ee):n(this)}}const La={anticipate:ha,backInOut:fa,circInOut:ma};function Cd(e){return e in La}function Sd(e){typeof e.ease=="string"&&Cd(e.ease)&&(e.ease=La[e.ease])}const Ci=10;class bd extends xd{constructor(t){Sd(t),Ta(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:o,onComplete:s,element:i,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new As({...r,autoplay:!1}),l=Ae(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Ci).value,a.sample(l).value,Ci),a.stop()}}const Si=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ze.test(e)||e==="0")&&!e.startsWith("url("));function _d(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 Rd(e,t,n,o){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],r=Si(s,t),a=Si(i,t);return Rt(r===a,`You are trying to animate ${t} from "${s}" to "${i}". "${r?i:s}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:_d(e)||(n==="spring"||Fa(n))&&o}function Wo(e){e.duration=0,e.type="keyframes"}const Ed=new Set(["opacity","clipPath","filter","transform"]),Md=ys(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Pd(e){const{motionValue:t,name:n,repeatDelay:o,repeatType:s,damping:i,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Md()&&n&&Ed.has(n)&&(n!=="transform"||!c)&&!l&&!o&&s!=="mirror"&&i!==0&&r!=="inertia"}const Td=40;class Vd extends Vs{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ve.now();const f={autoplay:t,delay:n,type:o,repeat:s,repeatDelay:i,repeatType:r,name:l,motionValue:c,element:u,...d},h=u?.KeyframeResolver||Ds;this.keyframeResolver=new h(a,(m,g,p)=>this.onKeyframesResolved(m,g,f,!p),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,o,s){this.keyframeResolver=void 0;const{name:i,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=o;this.resolvedAt=ve.now(),Rd(t,i,r,a)||((He.instantAnimations||!l)&&u?.(Ts(t,o,n)),t[0]=t[t.length-1],Wo(o),o.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Td?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...o,keyframes:t},h=!c&&Pd(f)?new bd({...f,element:f.motionValue.owner.current}):new As(f);h.finished.then(()=>this.notifyFinished()).catch(Ee),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(),fd()),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 Ad=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Dd(e){const t=Ad.exec(e);if(!t)return[,];const[,n,o,s]=t;return[`--${n??o}`,s]}const kd=4;function Ia(e,t,n=1){ze(n<=kd,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,s]=Dd(e);if(!o)return;const i=window.getComputedStyle(t).getPropertyValue(o);if(i){const r=i.trim();return sa(r)?parseFloat(r):r}return _s(s)?Ia(s,t,n+1):s}function ks(e,t){return e?.[t]??e?.default??e}const ja=new Set(["width","height","top","left","right","bottom",...Mt]),Fd={test:e=>e==="auto",parse:e=>e},$a=e=>t=>t.test(e),Oa=[Et,G,Fe,Ke,_u,bu,Fd],bi=e=>Oa.find($a(e));function Ld(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ra(e):!0}const Id=new Set(["brightness","contrast","saturate","opacity"]);function jd(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(Rs)||[];if(!o)return e;const s=n.replace(o,"");let i=Id.has(t)?1:0;return o!==n&&(i*=100),t+"("+i+s+")"}const $d=/\b([a-z-]*)\(.*?\)/gu,Go={...Ze,getAnimatableNone:e=>{const t=e.match($d);return t?t.map(jd).join(" "):e}},_i={...Et,transform:Math.round},Od={rotate:Ke,rotateX:Ke,rotateY:Ke,rotateZ:Ke,scale:cn,scaleX:cn,scaleY:cn,scaleZ:cn,skew:Ke,skewX:Ke,skewY:Ke,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:Ut,originX:di,originY:di,originZ:G},Fs={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,radius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,backgroundPositionX:G,backgroundPositionY:G,...Od,zIndex:_i,fillOpacity:Ut,strokeOpacity:Ut,numOctaves:_i},Nd={...Fs,color:ae,backgroundColor:ae,outlineColor:ae,fill:ae,stroke:ae,borderColor:ae,borderTopColor:ae,borderRightColor:ae,borderBottomColor:ae,borderLeftColor:ae,filter:Go,WebkitFilter:Go},Na=e=>Nd[e];function Ba(e,t){let n=Na(e);return n!==Go&&(n=Ze),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Bd=new Set(["auto","none","0"]);function zd(e,t,n){let o=0,s;for(;o<e.length&&!s;){const i=e[o];typeof i=="string"&&!Bd.has(i)&&Kt(i).values.length&&(s=e[o]),o++}if(s&&n)for(const i of t)e[i]=Ba(n,s)}class Hd extends Ds{constructor(t,n,o,s,i){super(t,n,o,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),_s(c))){const u=Ia(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ja.has(o)||t.length!==2)return;const[s,i]=t,r=bi(s),a=bi(i);if(r!==a)if(wi(r)&&wi(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else rt[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let s=0;s<t.length;s++)(t[s]===null||Ld(t[s]))&&o.push(s);o.length&&zd(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=rt[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(o,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,r=o[i];o[i]=rt[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 Wd(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const s=n?.[e]??o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const za=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ha(e){return ia(e)&&"offsetHeight"in e}const Ri=30,Gd=e=>!isNaN(parseFloat(e));class Ud{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{const s=ve.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ve.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Gd(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&xs(!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 ws);const o=this.events[t].add(n);return t==="change"?()=>{o(),te.read(()=>{this.events.change.getSize()||this.stop()})}:o}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,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}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=ve.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ri)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ri);return aa(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 Ct(e,t){return new Ud(e,t)}const{schedule:Ls}=ya(queueMicrotask,!1),Ve={x:!1,y:!1};function Wa(){return Ve.x||Ve.y}function Kd(e){return e==="x"||e==="y"?Ve[e]?null:(Ve[e]=!0,()=>{Ve[e]=!1}):Ve.x||Ve.y?null:(Ve.x=Ve.y=!0,()=>{Ve.x=Ve.y=!1})}function Ga(e,t){const n=Wd(e),o=new AbortController,s={passive:!0,...t,signal:o.signal};return[n,s,()=>o.abort()]}function Ei(e){return!(e.pointerType==="touch"||Wa())}function qd(e,t,n={}){const[o,s,i]=Ga(e,n),r=a=>{if(!Ei(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Ei(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return o.forEach(a=>{a.addEventListener("pointerenter",r,s)}),i}const Ua=(e,t)=>t?e===t?!0:Ua(e,t.parentElement):!1,Is=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Xd=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Yd(e){return Xd.has(e.tagName)||e.tabIndex!==-1}const Cn=new WeakSet;function Mi(e){return t=>{t.key==="Enter"&&e(t)}}function ao(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Zd=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=Mi(()=>{if(Cn.has(n))return;ao(n,"down");const s=Mi(()=>{ao(n,"up")}),i=()=>ao(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Pi(e){return Is(e)&&!Wa()}function Jd(e,t,n={}){const[o,s,i]=Ga(e,n),r=a=>{const l=a.currentTarget;if(!Pi(a))return;Cn.add(l);const c=t(l,a),u=(h,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Cn.has(l)&&Cn.delete(l),Pi(h)&&typeof c=="function"&&c(h,{success:m})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||Ua(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return o.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,s),Ha(a)&&(a.addEventListener("focus",c=>Zd(c,s)),!Yd(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Ka(e){return ia(e)&&"ownerSVGElement"in e}function Qd(e){return Ka(e)&&e.tagName==="svg"}const fe=e=>!!(e&&e.getVelocity),ef=[...Oa,ae,Ze],tf=e=>ef.find($a(e)),js=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ti(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nf(...e){return t=>{let n=!1;const o=e.map(s=>{const i=Ti(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<o.length;s++){const i=o[s];typeof i=="function"?i():Ti(e[s],null)}}}}function of(...e){return b.useCallback(nf(...e),e)}class sf extends b.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const o=n.offsetParent,s=Ha(o)&&o.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=s-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function rf({children:e,isPresent:t,anchorX:n,root:o}){const s=C.useId(),i=C.useRef(null),r=C.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=C.useContext(js),l=of(i,e?.ref);return C.useInsertionEffect(()=>{const{width:c,height:u,top:d,left:f,right:h}=r.current;if(t||!i.current||!c||!u)return;const m=n==="left"?`left: ${f}`:`right: ${h}`;i.current.dataset.motionPopId=s;const g=document.createElement("style");a&&(g.nonce=a);const p=o??document.head;return p.appendChild(g),g.sheet&&g.sheet.insertRule(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),V=require("@emotion/css"),C=require("react"),Ss=require("react-dom"),kn=require("@highcharts/react");function Ca(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _=Ca(C),iu=Ca(Ss);function ru(e){const{h:t,w:n,m:o,mx:s,my:i,mt:r,mr:a,mb:l,ml:c,p:u,px:f,py:d,pt:h,pr:m,pb:g,pl:y,gap:x,xGap:w,yGap:v,row:b,flex:S,relative:M,absolute:T,display:P,overflow:D,absoluteFill:F,center:$,justifyContent:O,alignItems:j,alignSelf:k,borderWidth:N,borderBottomWidth:z,borderColor:E,borderRadius:R,borderStyle:A,border:I,zIndex:X,minWidth:U,minHeight:q,maxWidth:Q,maxHeight:Z,flexWrap:ne,flexGrow:le,flexShrink:Ce,flexBasis:me,backgroundColor:je,position:B,top:J,right:re,bottom:ue,left:Ae,...Ve}=e;return{spacers:{h:t,w:n,m:o,mx:s,my:i,mt:r,mr:a,mb:l,ml:c,p:u,px:f,py:d,pt:h,pr:m,pb:g,pl:y,gap:x,xGap:w,yGap:v,row:b,flex:S,relative:M,absolute:T,display:P,overflow:D,absoluteFill:F,center:$,justifyContent:O,alignItems:j,alignSelf:k,borderWidth:N,borderBottomWidth:z,borderColor:E,borderRadius:R,borderStyle:A,border:I,zIndex:X,minWidth:U,minHeight:q,maxWidth:Q,maxHeight:Z,flexWrap:ne,flexGrow:le,flexShrink:Ce,flexBasis:me,backgroundColor:je,position:B,top:J,right:re,bottom:ue,left:Ae},rest:Ve}}const au=e=>V.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,borderStyle:e.borderStyle,border:e.border,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}),L=C.forwardRef(({className:e,children:t,...n},o)=>{const{spacers:s,rest:i}=ru(n),r=C.useMemo(()=>au(s),[s]);return p.jsx("div",{ref:o,className:V.cx(r,e),...i,children:t})});L.displayName="Box";const lu="_loader_1qleq_8",cu={loader:lu},Sa=({color:e="var(--text-accent)"})=>p.jsx("span",{className:V.cx(cu.loader,V.css({"--loader-color":e}))}),ba=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function uu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var io={exports:{}};var bi;function du(){return bi||(bi=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",r=0;r<arguments.length;r++){var a=arguments[r];a&&(i=s(i,o(a)))}return i}function o(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var r="";for(var a in i)t.call(i,a)&&i[a]&&(r=s(r,a));return r}function s(i,r){return r?i?i+" "+r:i+r:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(io)),io.exports}var fu=du();const lt=uu(fu),hu="_rippleOverlay_s2kim_8",gu="_ripple_s2kim_8",_i={rippleOverlay:hu,ripple:gu},ro="button, a, input, label, [role='button'], [data-ripple]";function mu(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 mt=C.forwardRef(({color:e="rgba(0,0,0,0.18)",duration:t=1e3,radius:n="auto",className:o},s)=>{const i=C.useRef(null),[r,a]=C.useState([]),l=C.useRef([]),c=C.useRef(1),u=C.useRef(null),f=()=>{l.current.map(g=>clearTimeout(g)),l.current=[]},d=C.useCallback((g,y,x,w)=>{if(typeof window>"u")return;const v=x.getBoundingClientRect(),b=n==="auto"?Math.max(v.width,v.height)*2:n,S=g-w.left,M=y-w.top,T=Math.max(0,v.top-w.top),P=Math.max(0,v.left-w.left),D=Math.max(0,w.right-v.right),F=Math.max(0,w.bottom-v.bottom),O=window.getComputedStyle(x).borderRadius||"0px",j=c.current++,k={id:j,left:S-b/2,top:M-b/2,size:Math.ceil(b),clip:{top:Math.round(T),right:Math.round(D),bottom:Math.round(F),left:Math.round(P)},borderRadius:O};a(z=>[...z,k]);const N=window.setTimeout(()=>{a(z=>z.filter(E=>E.id!==j))},t+80);l.current.push(N)},[t,n]),h=C.useCallback(g=>{try{if(!i.current)return;const y=i.current,x=y.parentElement;if(!x)return;const w=mu(g);let v=null;for(const P of w)if(P instanceof Element){if(P===x)break;if(P.matches&&P.matches(ro)){v=P;break}}if(v||(v=x),v.closest&&(v.closest("[disabled]")||v.getAttribute("aria-disabled")==="true"||v.classList.contains("ripple-disabled")))return;const b=g.target;if(b?.closest&&(b.closest("[disabled]")||b.getAttribute?.("aria-disabled")==="true"))return;const S=y.getBoundingClientRect(),{clientX:M}=g,{clientY:T}=g;d(M,T,v,S)}catch{}},[d]),m=C.useCallback(g=>{if(!i.current||!(g.key==="Enter"||g.key===" "))return;const y=i.current,x=y.parentElement;if(!x)return;const w=document.activeElement;let v=null;if(w instanceof Element&&w.matches(ro)&&(v=w),v||(v=x),v.closest&&(v.closest("[disabled]")||v.getAttribute("aria-disabled")==="true"))return;const b=y.getBoundingClientRect(),S=v.getBoundingClientRect().left+v.getBoundingClientRect().width/2,M=v.getBoundingClientRect().top+v.getBoundingClientRect().height/2;d(S,M,v,b)},[d]);return C.useImperativeHandle(s,()=>({trigger:({center:g=!0,x:y,y:x}={})=>{const w=i.current;if(!w)return;const v=w.parentElement;if(!v)return;const b=w.getBoundingClientRect(),S=document.activeElement instanceof Element&&document.activeElement.matches(ro)?document.activeElement:v,M=g?S.getBoundingClientRect().left+S.getBoundingClientRect().width/2:y??b.left+b.width/2,T=g?S.getBoundingClientRect().top+S.getBoundingClientRect().height/2:x??b.top+b.height/2;d(M,T,S,b)}}),[d]),C.useEffect(()=>{const g=i.current;if(!g)return;const y=g.parentElement;if(!y||typeof window>"u")return;const x=window.getComputedStyle(y);let w=!1;return x.position==="static"&&(y.style.position="relative",w=!0,u.current=y),y.addEventListener("pointerdown",h,!0),y.addEventListener("keydown",m),()=>{y.removeEventListener("pointerdown",h,!0),y.removeEventListener("keydown",m),w&&u.current&&(u.current.style.position="",u.current=null),f()}},[h,m]),C.useEffect(()=>()=>f(),[]),p.jsx("div",{ref:i,className:`${_i.rippleOverlay} ${o??""}`,"aria-hidden":!0,children:r.map(g=>p.jsx("span",{className:_i.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 pt(e,t){const{current:n}=C.useRef(e!==void 0),[o,s]=C.useState(t),i=n?e:o,r=C.useCallback(a=>{n||s(a)},[]);return[i,r]}function Wn(e,t,n,o=""){if(n)return e[`${t}_${n}${o}`]}function Xt(e,t,n){return Wn(e,t,n,"Size")}const pu="_button_11ykb_8",vu="_button_primary_11ykb_19",yu="_button_secondary_11ykb_22",xu="_button_negative_11ykb_25",wu="_button_positive_11ykb_28",Cu="_button_warning_11ykb_31",Su="_button_neutral_11ykb_34",bu="_button_mdSize_11ykb_118",_u="_button_smSize_11ykb_128",Ru="_button_xsSize_11ykb_138",ao={button:pu,button_primary:vu,button_secondary:yu,button_negative:xu,button_positive:wu,button_warning:Cu,button_neutral:Su,"button_neutral-white":"_button_neutral-white_11ykb_37","button_no-bg":"_button_no-bg_11ykb_40",button_mdSize:bu,button_smSize:_u,button_xsSize:Ru};function Yt({attr:e,children:t,className:n,type:o="button",color:s="primary",size:i="md",...r}){const a="button";return p.jsxs("button",{...e,...r,type:o,className:lt(ao[a],n,Xt(ao,a,i),Wn(ao,a,s)),children:[p.jsx(mt,{}),t]})}const _a=C.createContext({isOpen:!1,onClose:()=>{}}),Eu=()=>C.useContext(_a),Pu="_overlay_1gnp0_8",Mu="_modal_1gnp0_12",Tu="_closeButton_1gnp0_28",Au="_size_lg_1gnp0_35",Vu="_size_md_1gnp0_38",Du="_size_sm_1gnp0_41",fn={overlay:Pu,modal:Mu,"modal-animation":"_modal-animation_1gnp0_1",closeButton:Tu,size_lg:Au,size_md:Vu,size_sm:Du},Ra=C.forwardRef(({isOpen:e,onClose:t,overlayClassName:n,modalClassName:o,size:s="md",closeOnBackdropClick:i=!0,closeOnEsc:r=!0,disableBodyScroll:a=!0,showAbsoluteCloseButton:l,children:c},u)=>{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 f=C.useCallback(h=>{h.key==="Escape"&&t()},[t]);C.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&r&&e)return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,r,f]);const d=C.useCallback(h=>{i&&h.target===h.currentTarget&&t()},[i,t]);return e?p.jsx(un,{children:p.jsx(_a.Provider,{value:{isOpen:e,onClose:t},children:p.jsx(L,{position:"fixed",top:0,right:0,bottom:0,left:0,row:!0,center:!0,flex:1,onClick:d,backgroundColor:"var(--fill-bg-overlay-primary)",className:V.cx(fn.overlay,n),zIndex:1,children:p.jsxs(L,{ref:u,className:V.cx(fn.modal,fn[`size_${s}`],o),relative:!0,children:[l&&p.jsx(Yt,{className:fn.closeButton,onClick:t,color:"neutral",children:p.jsx(ba,{})}),c]})})})}):null});Ra.displayName="Modal";const ku="_footer_1bo08_8",Fu={footer:ku},Ea=C.forwardRef(({children:e,row:t=!0,flex:n=!0,gap:o="var(--spacing-lg)",p:s="var(--spacing-2xl)",className:i,...r},a)=>p.jsx(L,{flex:n,row:t,gap:o,p:s,className:V.cx(Fu.footer,i),ref:a,...r,children:e}));Ea.displayName="ModalFooter";const bs=C.createContext({});function _s(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const Rs=typeof window<"u",Pa=Rs?C.useLayoutEffect:C.useEffect,Gn=C.createContext(null);function Es(e,t){e.indexOf(t)===-1&&e.push(t)}function Ps(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ue=(e,t,n)=>n>t?t:n<e?e:n;function Bo(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Dt=()=>{},Ke=()=>{};process.env.NODE_ENV!=="production"&&(Dt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Bo(t,n))},Ke=(e,t,n)=>{if(!e)throw new Error(Bo(t,n))});const qe={},Ma=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Ta(e){return typeof e=="object"&&e!==null}const Aa=e=>/^0[^.\s]+$/u.test(e);function Ms(e){let t;return()=>(t===void 0&&(t=e()),t)}const Me=e=>e,Lu=(e,t)=>n=>t(e(n)),sn=(...e)=>e.reduce(Lu),Zt=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class Ts{constructor(){this.subscriptions=[]}add(t){return Es(this.subscriptions,t),()=>Ps(this.subscriptions,t)}notify(t,n,o){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,o);else for(let i=0;i<s;i++){const r=this.subscriptions[i];r&&r(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Le=e=>e*1e3,Pe=e=>e/1e3;function Va(e,t){return t?e*(1e3/t):0}const Ri=new Set;function As(e,t,n){e||Ri.has(t)||(console.warn(Bo(t,n)),Ri.add(t))}const Da=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Iu=1e-7,ju=12;function $u(e,t,n,o,s){let i,r,a=0;do r=t+(n-t)/2,i=Da(r,o,s)-e,i>0?n=r:t=r;while(Math.abs(i)>Iu&&++a<ju);return r}function rn(e,t,n,o){if(e===t&&n===o)return Me;const s=i=>$u(i,0,1,e,n);return i=>i===0||i===1?i:Da(s(i),t,o)}const ka=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Fa=e=>t=>1-e(1-t),La=rn(.33,1.53,.69,.99),Vs=Fa(La),Ia=ka(Vs),ja=e=>(e*=2)<1?.5*Vs(e):.5*(2-Math.pow(2,-10*(e-1))),Ds=e=>1-Math.sin(Math.acos(e)),$a=Fa(Ds),Oa=ka(Ds),Ou=rn(.42,0,1,1),Nu=rn(0,0,.58,1),Na=rn(.42,0,.58,1),Bu=e=>Array.isArray(e)&&typeof e[0]!="number",Ba=e=>Array.isArray(e)&&typeof e[0]=="number",Ei={linear:Me,easeIn:Ou,easeInOut:Na,easeOut:Nu,circIn:Ds,circInOut:Oa,circOut:$a,backIn:Vs,backInOut:Ia,backOut:La,anticipate:ja},zu=e=>typeof e=="string",Pi=e=>{if(Ba(e)){Ke(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,o,s]=e;return rn(t,n,o,s)}else if(zu(e))return Ke(Ei[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ei[e];return e},hn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Hu(e,t){let n=new Set,o=new Set,s=!1,i=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){r.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,f=!1,d=!1)=>{const m=d&&s?n:o;return f&&r.add(u),m.has(u)||m.add(u),u},cancel:u=>{o.delete(u),r.delete(u)},process:u=>{if(a=u,s){i=!0;return}s=!0,[n,o]=[o,n],n.forEach(l),n.clear(),s=!1,i&&(i=!1,c.process(u))}};return c}const Wu=40;function za(e,t){let n=!1,o=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,r=hn.reduce((v,b)=>(v[b]=Hu(i),v),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:f,preRender:d,render:h,postRender:m}=r,g=()=>{const v=qe.useManualTiming?s.timestamp:performance.now();n=!1,qe.useManualTiming||(s.delta=o?1e3/60:Math.max(Math.min(v-s.timestamp,Wu),1)),s.timestamp=v,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),f.process(s),d.process(s),h.process(s),m.process(s),s.isProcessing=!1,n&&t&&(o=!1,e(g))},y=()=>{n=!0,o=!0,s.isProcessing||e(g)};return{schedule:hn.reduce((v,b)=>{const S=r[b];return v[b]=(M,T=!1,P=!1)=>(n||y(),S.schedule(M,T,P)),v},{}),cancel:v=>{for(let b=0;b<hn.length;b++)r[hn[b]].cancel(v)},state:s,steps:r}}const{schedule:oe,cancel:et,state:fe,steps:lo}=za(typeof requestAnimationFrame<"u"?requestAnimationFrame:Me,!0);let En;function Gu(){En=void 0}const xe={now:()=>(En===void 0&&xe.set(fe.isProcessing||qe.useManualTiming?fe.timestamp:performance.now()),En),set:e=>{En=e,queueMicrotask(Gu)}},Ha=e=>t=>typeof t=="string"&&t.startsWith(e),Wa=Ha("--"),Uu=Ha("var(--"),ks=e=>Uu(e)?Ku.test(e.split("/*")[0].trim()):!1,Ku=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,kt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Jt={...kt,transform:e=>Ue(0,1,e)},gn={...kt,default:1},Gt=e=>Math.round(e*1e5)/1e5,Fs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qu(e){return e==null}const Xu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ls=(e,t)=>n=>!!(typeof n=="string"&&Xu.test(n)&&n.startsWith(e)||t&&!qu(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ga=(e,t,n)=>o=>{if(typeof o!="string")return o;const[s,i,r,a]=o.match(Fs);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Yu=e=>Ue(0,255,e),co={...kt,transform:e=>Math.round(Yu(e))},ct={test:Ls("rgb","red"),parse:Ga("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+co.transform(e)+", "+co.transform(t)+", "+co.transform(n)+", "+Gt(Jt.transform(o))+")"};function Zu(e){let t="",n="",o="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,o+=o,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:s?parseInt(s,16)/255:1}}const zo={test:Ls("#"),parse:Zu,transform:ct.transform},an=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ze=an("deg"),Oe=an("%"),G=an("px"),Ju=an("vh"),Qu=an("vw"),Mi={...Oe,parse:e=>Oe.parse(e)/100,transform:e=>Oe.transform(e*100)},Ct={test:Ls("hsl","hue"),parse:Ga("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Oe.transform(Gt(t))+", "+Oe.transform(Gt(n))+", "+Gt(Jt.transform(o))+")"},ae={test:e=>ct.test(e)||zo.test(e)||Ct.test(e),parse:e=>ct.test(e)?ct.parse(e):Ct.test(e)?Ct.parse(e):zo.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ct.transform(e):Ct.transform(e),getAnimatableNone:e=>{const t=ae.parse(e);return t.alpha=0,ae.transform(t)}},ed=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function td(e){return isNaN(e)&&typeof e=="string"&&(e.match(Fs)?.length||0)+(e.match(ed)?.length||0)>0}const Ua="number",Ka="color",nd="var",od="var(",Ti="${}",sd=/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 Qt(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(sd,l=>(ae.test(l)?(o.color.push(i),s.push(Ka),n.push(ae.parse(l))):l.startsWith(od)?(o.var.push(i),s.push(nd),n.push(l)):(o.number.push(i),s.push(Ua),n.push(parseFloat(l))),++i,Ti)).split(Ti);return{values:n,split:a,indexes:o,types:s}}function qa(e){return Qt(e).values}function Xa(e){const{split:t,types:n}=Qt(e),o=t.length;return s=>{let i="";for(let r=0;r<o;r++)if(i+=t[r],s[r]!==void 0){const a=n[r];a===Ua?i+=Gt(s[r]):a===Ka?i+=ae.transform(s[r]):i+=s[r]}return i}}const id=e=>typeof e=="number"?0:ae.test(e)?ae.getAnimatableNone(e):e;function rd(e){const t=qa(e);return Xa(e)(t.map(id))}const tt={test:td,parse:qa,createTransformer:Xa,getAnimatableNone:rd};function uo(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 ad({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let s=0,i=0,r=0;if(!t)s=i=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=uo(l,a,e+1/3),i=uo(l,a,e),r=uo(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(r*255),alpha:o}}function Fn(e,t){return n=>n>0?t:e}const ie=(e,t,n)=>e+(t-e)*n,fo=(e,t,n)=>{const o=e*e,s=n*(t*t-o)+o;return s<0?0:Math.sqrt(s)},ld=[zo,ct,Ct],cd=e=>ld.find(t=>t.test(e));function Ai(e){const t=cd(e);if(Dt(!!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===Ct&&(n=ad(n)),n}const Vi=(e,t)=>{const n=Ai(e),o=Ai(t);if(!n||!o)return Fn(e,t);const s={...n};return i=>(s.red=fo(n.red,o.red,i),s.green=fo(n.green,o.green,i),s.blue=fo(n.blue,o.blue,i),s.alpha=ie(n.alpha,o.alpha,i),ct.transform(s))},Ho=new Set(["none","hidden"]);function ud(e,t){return Ho.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function dd(e,t){return n=>ie(e,t,n)}function Is(e){return typeof e=="number"?dd:typeof e=="string"?ks(e)?Fn:ae.test(e)?Vi:gd:Array.isArray(e)?Ya:typeof e=="object"?ae.test(e)?Vi:fd:Fn}function Ya(e,t){const n=[...e],o=n.length,s=e.map((i,r)=>Is(i)(i,t[r]));return i=>{for(let r=0;r<o;r++)n[r]=s[r](i);return n}}function fd(e,t){const n={...e,...t},o={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(o[s]=Is(e[s])(e[s],t[s]));return s=>{for(const i in o)n[i]=o[i](s);return n}}function hd(e,t){const n=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],r=e.indexes[i][o[i]],a=e.values[r]??0;n[s]=a,o[i]++}return n}const gd=(e,t)=>{const n=tt.createTransformer(t),o=Qt(e),s=Qt(t);return o.indexes.var.length===s.indexes.var.length&&o.indexes.color.length===s.indexes.color.length&&o.indexes.number.length>=s.indexes.number.length?Ho.has(e)&&!s.values.length||Ho.has(t)&&!o.values.length?ud(e,t):sn(Ya(hd(o,s),s.values),n):(Dt(!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"),Fn(e,t))};function Za(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ie(e,t,n):Is(e)(e,t)}const md=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>oe.update(t,n),stop:()=>et(t),now:()=>fe.isProcessing?fe.timestamp:xe.now()}},Ja=(e,t,n=10)=>{let o="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)o+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},Ln=2e4;function js(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Ln;)t+=n,o=e.next(t);return t>=Ln?1/0:t}function pd(e,t=100,n){const o=n({...e,keyframes:[0,t]}),s=Math.min(js(o),Ln);return{type:"keyframes",ease:i=>o.next(s*i).value/t,duration:Pe(s)}}const vd=5;function Qa(e,t,n){const o=Math.max(t-vd,0);return Va(n-e(o),t-o)}const se={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},ho=.001;function yd({duration:e=se.duration,bounce:t=se.bounce,velocity:n=se.velocity,mass:o=se.mass}){let s,i;Dt(e<=Le(se.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=Ue(se.minDamping,se.maxDamping,r),e=Ue(se.minDuration,se.maxDuration,Pe(e)),r<1?(s=c=>{const u=c*r,f=u*e,d=u-n,h=Wo(c,r),m=Math.exp(-f);return ho-d/h*m},i=c=>{const f=c*r*e,d=f*n+n,h=Math.pow(r,2)*Math.pow(c,2)*e,m=Math.exp(-f),g=Wo(Math.pow(c,2),r);return(-s(c)+ho>0?-1:1)*((d-h)*m)/g}):(s=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-ho+u*f},i=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=wd(s,i,a);if(e=Le(e),isNaN(l))return{stiffness:se.stiffness,damping:se.damping,duration:e};{const c=Math.pow(l,2)*o;return{stiffness:c,damping:r*2*Math.sqrt(o*c),duration:e}}}const xd=12;function wd(e,t,n){let o=n;for(let s=1;s<xd;s++)o=o-e(o)/t(o);return o}function Wo(e,t){return e*Math.sqrt(1-t*t)}const Cd=["duration","bounce"],Sd=["stiffness","damping","mass"];function Di(e,t){return t.some(n=>e[n]!==void 0)}function bd(e){let t={velocity:se.velocity,stiffness:se.stiffness,damping:se.damping,mass:se.mass,isResolvedFromDuration:!1,...e};if(!Di(e,Sd)&&Di(e,Cd))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),s=o*o,i=2*Ue(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:se.mass,stiffness:s,damping:i}}else{const n=yd(e);t={...t,...n,mass:se.mass},t.isResolvedFromDuration=!0}return t}function In(e=se.visualDuration,t=se.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:s}=n;const i=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:f,velocity:d,isResolvedFromDuration:h}=bd({...n,velocity:-Pe(n.velocity||0)}),m=d||0,g=c/(2*Math.sqrt(l*u)),y=r-i,x=Pe(Math.sqrt(l/u)),w=Math.abs(y)<5;o||(o=w?se.restSpeed.granular:se.restSpeed.default),s||(s=w?se.restDelta.granular:se.restDelta.default);let v;if(g<1){const S=Wo(x,g);v=M=>{const T=Math.exp(-g*x*M);return r-T*((m+g*x*y)/S*Math.sin(S*M)+y*Math.cos(S*M))}}else if(g===1)v=S=>r-Math.exp(-x*S)*(y+(m+x*y)*S);else{const S=x*Math.sqrt(g*g-1);v=M=>{const T=Math.exp(-g*x*M),P=Math.min(S*M,300);return r-T*((m+g*x*y)*Math.sinh(P)+S*y*Math.cosh(P))/S}}const b={calculatedDuration:h&&f||null,next:S=>{const M=v(S);if(h)a.done=S>=f;else{let T=S===0?m:0;g<1&&(T=S===0?Le(m):Qa(v,S,M));const P=Math.abs(T)<=o,D=Math.abs(r-M)<=s;a.done=P&&D}return a.value=a.done?r:M,a},toString:()=>{const S=Math.min(js(b),Ln),M=Ja(T=>b.next(S*T).value,S,30);return S+"ms "+M},toTransition:()=>{}};return b}In.applyToOptions=e=>{const t=pd(e,100,In);return e.ease=t.ease,e.duration=Le(t.duration),e.type="keyframes",e};function Go({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],d={done:!1,value:f},h=P=>a!==void 0&&P<a||l!==void 0&&P>l,m=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let g=n*t;const y=f+g,x=r===void 0?y:r(y);x!==y&&(g=x-f);const w=P=>-g*Math.exp(-P/o),v=P=>x+w(P),b=P=>{const D=w(P),F=v(P);d.done=Math.abs(D)<=c,d.value=d.done?x:F};let S,M;const T=P=>{h(d.value)&&(S=P,M=In({keyframes:[d.value,m(d.value)],velocity:Qa(v,P,d.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:P=>{let D=!1;return!M&&S===void 0&&(D=!0,b(P),T(P)),S!==void 0&&P>=S?M.next(P-S):(!D&&b(P),d)}}}function _d(e,t,n){const o=[],s=n||qe.mix||Za,i=e.length-1;for(let r=0;r<i;r++){let a=s(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||Me:t;a=sn(l,a)}o.push(a)}return o}function Rd(e,t,{clamp:n=!0,ease:o,mixer:s}={}){const i=e.length;if(Ke(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=_d(t,o,s),l=a.length,c=u=>{if(r&&u<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const d=Zt(e[f],e[f+1],u);return a[f](d)};return n?u=>c(Ue(e[0],e[i-1],u)):c}function Ed(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const s=Zt(0,t,o);e.push(ie(n,1,s))}}function Pd(e){const t=[0];return Ed(t,e.length-1),t}function Md(e,t){return e.map(n=>n*t)}function Td(e,t){return e.map(()=>t||Na).splice(0,e.length-1)}function St({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const s=Bu(o)?o.map(Pi):Pi(o),i={done:!1,value:t[0]},r=Md(n&&n.length===t.length?n:Pd(t),e),a=Rd(r,t,{ease:Array.isArray(s)?s:Td(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const Ad=e=>e!==null;function $s(e,{repeat:t,repeatType:n="loop"},o,s=1){const i=e.filter(Ad),a=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||o===void 0?i[a]:o}const Vd={decay:Go,inertia:Go,tween:St,keyframes:St,spring:In};function el(e){typeof e.type=="string"&&(e.type=Vd[e.type])}class Os{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 Dd=e=>e/100;class Ns extends Os{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!==xe.now()&&this.tick(xe.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;el(t);const{type:n=St,repeat:o=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=t;let{keyframes:a}=t;const l=n||St;process.env.NODE_ENV!=="production"&&l!==St&&Ke(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==St&&typeof a[0]!="number"&&(this.mixKeyframes=sn(Dd,Za(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=js(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(o+1)-s,this.generator=c}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:o,totalDuration:s,mixKeyframes:i,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return o.next(0);const{delay:c=0,keyframes:u,repeat:f,repeatType:d,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-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-c*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?x<0:x>s;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,b=o;if(f){const P=Math.min(this.currentTime,s)/a;let D=Math.floor(P),F=P%1;!F&&P>=1&&(F=1),F===1&&D--,D=Math.min(D,f+1),D%2&&(d==="reverse"?(F=1-F,h&&(F-=h/a)):d==="mirror"&&(b=r)),v=Ue(0,1,F)*a}const S=w?{done:!1,value:u[0]}:b.next(v);i&&(S.value=i(S.value));let{done:M}=S;!w&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return T&&m!==Go&&(S.value=$s(u,this.options,y,this.speed)),g&&g(S.value),T&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return Pe(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Pe(t)}get time(){return Pe(this.currentTime)}set time(t){t=Le(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(xe.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Pe(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=md,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=n??o),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(xe.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 kd(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ut=e=>e*180/Math.PI,Uo=e=>{const t=ut(Math.atan2(e[1],e[0]));return Ko(t)},Fd={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Uo,rotateZ:Uo,skewX:e=>ut(Math.atan(e[1])),skewY:e=>ut(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ko=e=>(e=e%360,e<0&&(e+=360),e),ki=Uo,Fi=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Li=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ld={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Fi,scaleY:Li,scale:e=>(Fi(e)+Li(e))/2,rotateX:e=>Ko(ut(Math.atan2(e[6],e[5]))),rotateY:e=>Ko(ut(Math.atan2(-e[2],e[0]))),rotateZ:ki,rotate:ki,skewX:e=>ut(Math.atan(e[4])),skewY:e=>ut(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function qo(e){return e.includes("scale")?1:0}function Xo(e,t){if(!e||e==="none")return qo(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,s;if(n)o=Ld,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Fd,s=a}if(!s)return qo(t);const i=o[t],r=s[1].split(",").map(jd);return typeof i=="function"?i(r):r[i]}const Id=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Xo(n,t)};function jd(e){return parseFloat(e.trim())}const Ft=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Lt=new Set(Ft),Ii=e=>e===kt||e===G,$d=new Set(["x","y","z"]),Od=Ft.filter(e=>!$d.has(e));function Nd(e){const t=[];return Od.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const ft={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})=>Xo(t,"x"),y:(e,{transform:t})=>Xo(t,"y")};ft.translateX=ft.x;ft.translateY=ft.y;const ht=new Set;let Yo=!1,Zo=!1,Jo=!1;function tl(){if(Zo){const e=Array.from(ht).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const s=Nd(o);s.length&&(n.set(o,s),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const s=n.get(o);s&&s.forEach(([i,r])=>{o.getValue(i)?.set(r)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Zo=!1,Yo=!1,ht.forEach(e=>e.complete(Jo)),ht.clear()}function nl(){ht.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Zo=!0)})}function Bd(){Jo=!0,nl(),tl(),Jo=!1}class Bs{constructor(t,n,o,s,i,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(ht.add(this),Yo||(Yo=!0,oe.read(nl),oe.resolveKeyframes(tl))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:s}=this;if(t[0]===null){const i=s?.get(),r=t[t.length-1];if(i!==void 0)t[0]=i;else if(o&&n){const a=o.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),s&&i===void 0&&s.set(t[0])}kd(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ht.delete(this)}cancel(){this.state==="scheduled"&&(ht.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const zd=e=>e.startsWith("--");function Hd(e,t,n){zd(t)?e.style.setProperty(t,n):e.style[t]=n}const Wd=Ms(()=>window.ScrollTimeline!==void 0),Gd={};function Ud(e,t){const n=Ms(e);return()=>Gd[t]??n()}const ol=Ud(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Wt=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,ji={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wt([0,.65,.55,1]),circOut:Wt([.55,0,1,.45]),backIn:Wt([.31,.01,.66,-.59]),backOut:Wt([.33,1.53,.69,.99])};function sl(e,t){if(e)return typeof e=="function"?ol()?Ja(e,t):"ease-out":Ba(e)?Wt(e):Array.isArray(e)?e.map(n=>sl(n,t)||ji.easeOut):ji[e]}function Kd(e,t,n,{delay:o=0,duration:s=300,repeat:i=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const f=sl(a,s);Array.isArray(f)&&(u.easing=f);const d={delay:o,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:r==="reverse"?"alternate":"normal"};return c&&(d.pseudoElement=c),e.animate(u,d)}function il(e){return typeof e=="function"&&"applyToOptions"in e}function qd({type:e,...t}){return il(e)&&ol()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Xd extends Os{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:o,keyframes:s,pseudoElement:i,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=r,this.options=t,Ke(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=qd(t);this.animation=Kd(n,o,s,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=$s(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Hd(n,o,u),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 Pe(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Pe(t)}get time(){return Pe(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Le(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&&Wd()?(this.animation.timeline=t,Me):n(this)}}const rl={anticipate:ja,backInOut:Ia,circInOut:Oa};function Yd(e){return e in rl}function Zd(e){typeof e.ease=="string"&&Yd(e.ease)&&(e.ease=rl[e.ease])}const $i=10;class Jd extends Xd{constructor(t){Zd(t),el(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:o,onComplete:s,element:i,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Ns({...r,autoplay:!1}),l=Le(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-$i).value,a.sample(l).value,$i),a.stop()}}const Oi=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(tt.test(e)||e==="0")&&!e.startsWith("url("));function Qd(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 ef(e,t,n,o){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],r=Oi(s,t),a=Oi(i,t);return Dt(r===a,`You are trying to animate ${t} from "${s}" to "${i}". "${r?i:s}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:Qd(e)||(n==="spring"||il(n))&&o}function Qo(e){e.duration=0,e.type="keyframes"}const tf=new Set(["opacity","clipPath","filter","transform"]),nf=Ms(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function of(e){const{motionValue:t,name:n,repeatDelay:o,repeatType:s,damping:i,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return nf()&&n&&tf.has(n)&&(n!=="transform"||!c)&&!l&&!o&&s!=="mirror"&&i!==0&&r!=="inertia"}const sf=40;class rf extends Os{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=xe.now();const d={autoplay:t,delay:n,type:o,repeat:s,repeatDelay:i,repeatType:r,name:l,motionValue:c,element:u,...f},h=u?.KeyframeResolver||Bs;this.keyframeResolver=new h(a,(m,g,y)=>this.onKeyframesResolved(m,g,d,!y),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,o,s){this.keyframeResolver=void 0;const{name:i,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=o;this.resolvedAt=xe.now(),ef(t,i,r,a)||((qe.instantAnimations||!l)&&u?.($s(t,o,n)),t[0]=t[t.length-1],Qo(o),o.repeat=0);const d={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>sf?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...o,keyframes:t},h=!c&&of(d)?new Jd({...d,element:d.motionValue.owner.current}):new Ns(d);h.finished.then(()=>this.notifyFinished()).catch(Me),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(),Bd()),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 af=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function lf(e){const t=af.exec(e);if(!t)return[,];const[,n,o,s]=t;return[`--${n??o}`,s]}const cf=4;function al(e,t,n=1){Ke(n<=cf,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,s]=lf(e);if(!o)return;const i=window.getComputedStyle(t).getPropertyValue(o);if(i){const r=i.trim();return Ma(r)?parseFloat(r):r}return ks(s)?al(s,t,n+1):s}function zs(e,t){return e?.[t]??e?.default??e}const ll=new Set(["width","height","top","left","right","bottom",...Ft]),uf={test:e=>e==="auto",parse:e=>e},cl=e=>t=>t.test(e),ul=[kt,G,Oe,Ze,Qu,Ju,uf],Ni=e=>ul.find(cl(e));function df(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Aa(e):!0}const ff=new Set(["brightness","contrast","saturate","opacity"]);function hf(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(Fs)||[];if(!o)return e;const s=n.replace(o,"");let i=ff.has(t)?1:0;return o!==n&&(i*=100),t+"("+i+s+")"}const gf=/\b([a-z-]*)\(.*?\)/gu,es={...tt,getAnimatableNone:e=>{const t=e.match(gf);return t?t.map(hf).join(" "):e}},Bi={...kt,transform:Math.round},mf={rotate:Ze,rotateX:Ze,rotateY:Ze,rotateZ:Ze,scale:gn,scaleX:gn,scaleY:gn,scaleZ:gn,skew:Ze,skewX:Ze,skewY:Ze,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:Jt,originX:Mi,originY:Mi,originZ:G},Hs={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,radius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,backgroundPositionX:G,backgroundPositionY:G,...mf,zIndex:Bi,fillOpacity:Jt,strokeOpacity:Jt,numOctaves:Bi},pf={...Hs,color:ae,backgroundColor:ae,outlineColor:ae,fill:ae,stroke:ae,borderColor:ae,borderTopColor:ae,borderRightColor:ae,borderBottomColor:ae,borderLeftColor:ae,filter:es,WebkitFilter:es},dl=e=>pf[e];function fl(e,t){let n=dl(e);return n!==es&&(n=tt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const vf=new Set(["auto","none","0"]);function yf(e,t,n){let o=0,s;for(;o<e.length&&!s;){const i=e[o];typeof i=="string"&&!vf.has(i)&&Qt(i).values.length&&(s=e[o]),o++}if(s&&n)for(const i of t)e[i]=fl(n,s)}class xf extends Bs{constructor(t,n,o,s,i){super(t,n,o,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),ks(c))){const u=al(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ll.has(o)||t.length!==2)return;const[s,i]=t,r=Ni(s),a=Ni(i);if(r!==a)if(Ii(r)&&Ii(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else ft[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let s=0;s<t.length;s++)(t[s]===null||df(t[s]))&&o.push(s);o.length&&yf(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ft[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(o,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,r=o[i];o[i]=ft[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 wf(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const s=n?.[e]??o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const hl=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function gl(e){return Ta(e)&&"offsetHeight"in e}const zi=30,Cf=e=>!isNaN(parseFloat(e));class Sf{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{const s=xe.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=xe.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Cf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&As(!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 Ts);const o=this.events[t].add(n);return t==="change"?()=>{o(),oe.read(()=>{this.events.change.getSize()||this.stop()})}:o}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,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}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=xe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>zi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,zi);return Va(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 Tt(e,t){return new Sf(e,t)}const{schedule:Ws}=za(queueMicrotask,!1),Fe={x:!1,y:!1};function ml(){return Fe.x||Fe.y}function bf(e){return e==="x"||e==="y"?Fe[e]?null:(Fe[e]=!0,()=>{Fe[e]=!1}):Fe.x||Fe.y?null:(Fe.x=Fe.y=!0,()=>{Fe.x=Fe.y=!1})}function pl(e,t){const n=wf(e),o=new AbortController,s={passive:!0,...t,signal:o.signal};return[n,s,()=>o.abort()]}function Hi(e){return!(e.pointerType==="touch"||ml())}function _f(e,t,n={}){const[o,s,i]=pl(e,n),r=a=>{if(!Hi(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=f=>{Hi(f)&&(c(f),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return o.forEach(a=>{a.addEventListener("pointerenter",r,s)}),i}const vl=(e,t)=>t?e===t?!0:vl(e,t.parentElement):!1,Gs=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Rf=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ef(e){return Rf.has(e.tagName)||e.tabIndex!==-1}const Pn=new WeakSet;function Wi(e){return t=>{t.key==="Enter"&&e(t)}}function go(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Pf=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=Wi(()=>{if(Pn.has(n))return;go(n,"down");const s=Wi(()=>{go(n,"up")}),i=()=>go(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Gi(e){return Gs(e)&&!ml()}function Mf(e,t,n={}){const[o,s,i]=pl(e,n),r=a=>{const l=a.currentTarget;if(!Gi(a))return;Pn.add(l);const c=t(l,a),u=(h,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Pn.has(l)&&Pn.delete(l),Gi(h)&&typeof c=="function"&&c(h,{success:m})},f=h=>{u(h,l===window||l===document||n.useGlobalTarget||vl(l,h.target))},d=h=>{u(h,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",d,s)};return o.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,s),gl(a)&&(a.addEventListener("focus",c=>Pf(c,s)),!Ef(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function yl(e){return Ta(e)&&"ownerSVGElement"in e}function Tf(e){return yl(e)&&e.tagName==="svg"}const ge=e=>!!(e&&e.getVelocity),Af=[...ul,ae,tt],Vf=e=>Af.find(cl(e)),Us=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ui(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Df(...e){return t=>{let n=!1;const o=e.map(s=>{const i=Ui(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<o.length;s++){const i=o[s];typeof i=="function"?i():Ui(e[s],null)}}}}function kf(...e){return _.useCallback(Df(...e),e)}class Ff extends _.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const o=n.offsetParent,s=gl(o)&&o.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=s-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Lf({children:e,isPresent:t,anchorX:n,root:o}){const s=C.useId(),i=C.useRef(null),r=C.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=C.useContext(Us),l=kf(i,e?.ref);return C.useInsertionEffect(()=>{const{width:c,height:u,top:f,left:d,right:h}=r.current;if(t||!i.current||!c||!u)return;const m=n==="left"?`left: ${d}`:`right: ${h}`;i.current.dataset.motionPopId=s;const g=document.createElement("style");a&&(g.nonce=a);const y=o??document.head;return y.appendChild(g),g.sheet&&g.sheet.insertRule(`
6
2
  [data-motion-pop-id="${s}"] {
7
3
  position: absolute !important;
8
4
  width: ${c}px !important;
9
5
  height: ${u}px !important;
10
6
  ${m}px !important;
11
- top: ${d}px !important;
7
+ top: ${f}px !important;
12
8
  }
13
- `),()=>{p.contains(g)&&p.removeChild(g)}},[t]),y.jsx(sf,{isPresent:t,childRef:i,sizeRef:r,children:b.cloneElement(e,{ref:l})})}const af=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:s,presenceAffectsLayout:i,mode:r,anchorX:a,root:l})=>{const c=gs(lf),u=C.useId();let d=!0,f=C.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:s,onExitComplete:h=>{c.set(h,!0);for(const m of c.values())if(!m)return;o&&o()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[n,c,o]);return i&&d&&(f={...f}),C.useMemo(()=>{c.forEach((h,m)=>c.set(m,!1))},[n]),b.useEffect(()=>{!n&&!c.size&&o&&o()},[n]),r==="popLayout"&&(e=y.jsx(rf,{isPresent:n,anchorX:a,root:l,children:e})),y.jsx(jn.Provider,{value:f,children:e})};function lf(){return new Map}function qa(e=!0){const t=C.useContext(jn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:s}=t,i=C.useId();C.useEffect(()=>{if(e)return s(i)},[e]);const r=C.useCallback(()=>e&&o&&o(i),[i,o,e]);return!n&&o?[!1,r]:[!0]}const un=e=>e.key||"";function Vi(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const cf=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:s=!0,mode:i="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[c,u]=qa(r),d=C.useMemo(()=>Vi(e),[e]),f=r&&!c?[]:d.map(un),h=C.useRef(!0),m=C.useRef(d),g=gs(()=>new Map),[p,w]=C.useState(d),[x,v]=C.useState(d);oa(()=>{h.current=!1,m.current=d;for(let P=0;P<x.length;P++){const V=un(x[P]);f.includes(V)?g.delete(V):g.get(V)!==!0&&g.set(V,!1)}},[x,f.length,f.join("-")]);const S=[];if(d!==p){let P=[...d];for(let V=0;V<x.length;V++){const M=x[V],A=un(M);f.includes(A)||(P.splice(V,0,M),S.push(M))}return i==="wait"&&S.length&&(P=S),v(Vi(P)),w(d),null}process.env.NODE_ENV!=="production"&&i==="wait"&&x.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(hs);return y.jsx(y.Fragment,{children:x.map(P=>{const V=un(P),M=r&&!c?!1:d===x||f.includes(V),A=()=>{if(g.has(V))g.set(V,!0);else return;let F=!0;g.forEach($=>{$||(F=!1)}),F&&(_?.(),v(m.current),r&&u?.(),o&&o())};return y.jsx(af,{isPresent:M,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:l,onExitComplete:M?void 0:A,anchorX:a,children:P},V)})})},Xa=C.createContext({strict:!1}),Ai={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"]},St={};for(const e in Ai)St[e]={isEnabled:t=>Ai[e].some(n=>!!t[n])};function uf(e){for(const t in e)St[t]={...St[t],...e[t]}}const df=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 Vn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||df.has(e)}let Ya=e=>!Vn(e);function ff(e){typeof e=="function"&&(Ya=t=>t.startsWith("on")?!Vn(t):e(t))}try{ff(require("@emotion/is-prop-valid").default)}catch{}function hf(e,t,n){const o={};for(const s in e)s==="values"&&typeof e.values=="object"||(Ya(s)||n===!0&&Vn(s)||!t&&!Vn(s)||e.draggable&&s.startsWith("onDrag"))&&(o[s]=e[s]);return o}const $n=C.createContext({});function On(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function qt(e){return typeof e=="string"||Array.isArray(e)}const $s=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Os=["initial",...$s];function Nn(e){return On(e.animate)||Os.some(t=>qt(e[t]))}function Za(e){return!!(Nn(e)||e.variants)}function gf(e,t){if(Nn(e)){const{initial:n,animate:o}=e;return{initial:n===!1||qt(n)?n:void 0,animate:qt(o)?o:void 0}}return e.inherit!==!1?t:{}}function mf(e){const{initial:t,animate:n}=gf(e,C.useContext($n));return C.useMemo(()=>({initial:t,animate:n}),[Di(t),Di(n)])}function Di(e){return Array.isArray(e)?e.join(" "):e}const Xt={};function pf(e){for(const t in e)Xt[t]=e[t],bs(t)&&(Xt[t].isCSSVariable=!0)}function Ja(e,{layout:t,layoutId:n}){return Pt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Xt[e]||e==="opacity")}const vf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},yf=Mt.length;function wf(e,t,n){let o="",s=!0;for(let i=0;i<yf;i++){const r=Mt[i],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 c=za(a,Fs[r]);if(!l){s=!1;const u=vf[r]||r;o+=`${u}(${c}) `}n&&(t[r]=c)}}return o=o.trim(),n?o=n(t,s?"":o):s&&(o="none"),o}function Ns(e,t,n){const{style:o,vars:s,transformOrigin:i}=e;let r=!1,a=!1;for(const l in t){const c=t[l];if(Pt.has(l)){r=!0;continue}else if(bs(l)){s[l]=c;continue}else{const u=za(c,Fs[l]);l.startsWith("origin")?(a=!0,i[l]=u):o[l]=u}}if(t.transform||(r||n?o.transform=wf(t,e.transform,n):o.transform&&(o.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;o.transformOrigin=`${l} ${c} ${u}`}}const Bs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Qa(e,t,n){for(const o in t)!fe(t[o])&&!Ja(o,n)&&(e[o]=t[o])}function xf({transformTemplate:e},t){return C.useMemo(()=>{const n=Bs();return Ns(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Cf(e,t){const n=e.style||{},o={};return Qa(o,n,e),Object.assign(o,xf(e,t)),o}function Sf(e,t){const n={},o=Cf(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.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=o,n}const bf={offset:"stroke-dashoffset",array:"stroke-dasharray"},_f={offset:"strokeDashoffset",array:"strokeDasharray"};function Rf(e,t,n=1,o=0,s=!0){e.pathLength=1;const i=s?bf:_f;e[i.offset]=G.transform(-o);const r=G.transform(t),a=G.transform(n);e[i.array]=`${r} ${a}`}function el(e,{attrX:t,attrY:n,attrScale:o,pathLength:s,pathSpacing:i=1,pathOffset:r=0,...a},l,c,u){if(Ns(e,a,c),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=u?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),o!==void 0&&(d.scale=o),s!==void 0&&Rf(d,s,i,r,!1)}const tl=()=>({...Bs(),attrs:{}}),nl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ef(e,t,n,o){const s=C.useMemo(()=>{const i=tl();return el(i,t,nl(o),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Qa(i,e.style,e),s.style={...i,...s.style}}return s}const Mf=["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 zs(e){return typeof e!="string"||e.includes("-")?!1:!!(Mf.indexOf(e)>-1||/[A-Z]/u.test(e))}function Pf(e,t,n,{latestValues:o},s,i=!1){const a=(zs(e)?Ef:Sf)(t,o,s,e),l=hf(t,typeof e=="string",i),c=e!==C.Fragment?{...l,...a,ref:n}:{},{children:u}=t,d=C.useMemo(()=>fe(u)?u.get():u,[u]);return C.createElement(e,{...c,children:d})}function ki(e){const t=[{},{}];return e?.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Hs(e,t,n,o){if(typeof t=="function"){const[s,i]=ki(o);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=ki(o);t=t(n!==void 0?n:e.custom,s,i)}return t}function Sn(e){return fe(e)?e.get():e}function Tf({scrapeMotionValuesFromProps:e,createRenderState:t},n,o,s){return{latestValues:Vf(n,o,s,e),renderState:t()}}function Vf(e,t,n,o){const s={},i=o(e,{});for(const f in i)s[f]=Sn(i[f]);let{initial:r,animate:a}=e;const l=Nn(e),c=Za(e);t&&c&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const d=u?a:r;if(d&&typeof d!="boolean"&&!On(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const m=Hs(e,f[h]);if(m){const{transitionEnd:g,transition:p,...w}=m;for(const x in w){let v=w[x];if(Array.isArray(v)){const S=u?v.length-1:0;v=v[S]}v!==null&&(s[x]=v)}for(const x in g)s[x]=g[x]}}}return s}const ol=e=>(t,n)=>{const o=C.useContext($n),s=C.useContext(jn),i=()=>Tf(e,t,o,s);return n?i():gs(i)};function Ws(e,t,n){const{style:o}=e,s={};for(const i in o)(fe(o[i])||t.style&&fe(t.style[i])||Ja(i,e)||n?.getValue(i)?.liveStyle!==void 0)&&(s[i]=o[i]);return s}const Af=ol({scrapeMotionValuesFromProps:Ws,createRenderState:Bs});function sl(e,t,n){const o=Ws(e,t,n);for(const s in e)if(fe(e[s])||fe(t[s])){const i=Mt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;o[i]=e[s]}return o}const Df=ol({scrapeMotionValuesFromProps:sl,createRenderState:tl}),kf=Symbol.for("motionComponentSymbol");function gt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ff(e,t,n){return C.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):gt(n)&&(n.current=o))},[t])}const Gs=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Lf="framerAppearId",il="data-"+Gs(Lf),rl=C.createContext({});function If(e,t,n,o,s){const{visualElement:i}=C.useContext($n),r=C.useContext(Xa),a=C.useContext(jn),l=C.useContext(js).reducedMotion,c=C.useRef(null);o=o||r.renderer,!c.current&&o&&(c.current=o(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=C.useContext(rl);u&&!u.projection&&s&&(u.type==="html"||u.type==="svg")&&jf(c.current,n,s,d);const f=C.useRef(!1);C.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const h=n[il],m=C.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return oa(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),m.current&&u.animationState&&u.animationState.animateChanges())}),C.useEffect(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),m.current=!1),u.enteringChildren=void 0)}),u}function jf(e,t,n,o){const{layoutId:s,layout:i,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:al(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!r||a&&gt(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:o,crossfade:u,layoutScroll:l,layoutRoot:c})}function al(e){if(e)return e.options.allowProjection!==!1?e.projection:al(e.parent)}function lo(e,{forwardMotionProps:t=!1}={},n,o){n&&uf(n);const s=zs(e)?Df:Af;function i(a,l){let c;const u={...C.useContext(js),...a,layoutId:$f(a)},{isStatic:d}=u,f=mf(a),h=s(a,d);if(!d&&ms){Of(u,n);const m=Nf(u);c=m.MeasureLayout,f.visualElement=If(e,h,u,o,m.ProjectionNode)}return y.jsxs($n.Provider,{value:f,children:[c&&f.visualElement?y.jsx(c,{visualElement:f.visualElement,...u}):null,Pf(e,a,Ff(h,f.visualElement,l),h,d,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=C.forwardRef(i);return r[kf]=e,r}function $f({layoutId:e}){const t=C.useContext(hs).id;return t&&e!==void 0?t+"-"+e:e}function Of(e,t){const n=C.useContext(Xa).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="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,o,"lazy-strict-mode"):ze(!1,o,"lazy-strict-mode")}}function Nf(e){const{drag:t,layout:n}=St;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function Bf(e,t){if(typeof Proxy>"u")return lo;const n=new Map,o=(i,r)=>lo(i,r,e,t),s=(i,r)=>(process.env.NODE_ENV!=="production"&&xs(!1,"motion() is deprecated. Use motion.create() instead."),o(i,r));return new Proxy(s,{get:(i,r)=>r==="create"?o:(n.has(r)||n.set(r,lo(r,void 0,e,t)),n.get(r))})}function ll({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function zf({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Hf(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}function co(e){return e===void 0||e===1}function Uo({scale:e,scaleX:t,scaleY:n}){return!co(e)||!co(t)||!co(n)}function nt(e){return Uo(e)||cl(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function cl(e){return Fi(e.x)||Fi(e.y)}function Fi(e){return e&&e!=="0%"}function An(e,t,n){const o=e-n,s=t*o;return n+s}function Li(e,t,n,o,s){return s!==void 0&&(e=An(e,s,o)),An(e,n,o)+t}function Ko(e,t=0,n=1,o,s){e.min=Li(e.min,t,n,o,s),e.max=Li(e.max,t,n,o,s)}function ul(e,{x:t,y:n}){Ko(e.x,t.translate,t.scale,t.originPoint),Ko(e.y,n.translate,n.scale,n.originPoint)}const Ii=.999999999999,ji=1.0000000000001;function Wf(e,t,n,o=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,r;for(let a=0;a<s;a++){i=n[a],r=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&i.options.layoutScroll&&i.scroll&&i!==i.root&&pt(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,ul(e,r)),o&&nt(i.latestValues)&&pt(e,i.latestValues))}t.x<ji&&t.x>Ii&&(t.x=1),t.y<ji&&t.y>Ii&&(t.y=1)}function mt(e,t){e.min=e.min+t,e.max=e.max+t}function $i(e,t,n,o,s=.5){const i=oe(e.min,e.max,s);Ko(e,t,n,i,o)}function pt(e,t){$i(e.x,t.x,t.scaleX,t.scale,t.originX),$i(e.y,t.y,t.scaleY,t.scale,t.originY)}function dl(e,t){return ll(Hf(e.getBoundingClientRect(),t))}function Gf(e,t,n){const o=dl(e,n),{scroll:s}=t;return s&&(mt(o.x,s.offset.x),mt(o.y,s.offset.y)),o}const Oi=()=>({translate:0,scale:1,origin:0,originPoint:0}),vt=()=>({x:Oi(),y:Oi()}),Ni=()=>({min:0,max:0}),re=()=>({x:Ni(),y:Ni()}),qo={current:null},fl={current:!1};function Uf(){if(fl.current=!0,!!ms)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>qo.current=e.matches;e.addEventListener("change",t),t()}else qo.current=!1}const Kf=new WeakMap;function qf(e,t,n){for(const o in t){const s=t[o],i=n[o];if(fe(s))e.addValue(o,s);else if(fe(i))e.addValue(o,Ct(s,{owner:e}));else if(i!==s)if(e.hasValue(o)){const r=e.getValue(o);r.liveStyle===!0?r.jump(s):r.hasAnimated||r.set(s)}else{const r=e.getStaticValue(o);e.addValue(o,Ct(r!==void 0?r:s,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const Bi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Xf{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:s,blockInitialAnimation:i,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=Ds,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=ve.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,te.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Nn(n),this.isVariantNode=Za(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&fe(h)&&h.set(l[f])}}mount(t){this.current=t,Kf.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,o)=>this.bindToMotionValue(o,n)),fl.current||Uf(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:qo.current,process.env.NODE_ENV!=="production"&&xs(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(),Ye(this.notifyUpdate),Ye(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 o=Pt.has(t);o&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&te.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),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 St){const n=St[t];if(!n)continue;const{isEnabled:o,Feature:s}=n;if(!this.features[t]&&s&&o(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):re()}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 o=0;o<Bi.length;o++){const s=Bi[o];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,r=t[i];r&&(this.propEventSubscriptions[s]=this.on(s,r))}this.prevMotionValues=qf(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 o=this.values.get(t);n!==o&&(o&&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 o=this.values.get(t);return o===void 0&&n!==void 0&&(o=Ct(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(sa(o)||ra(o))?o=parseFloat(o):!tf(o)&&Ze.test(n)&&(o=Ba(t,n)),this.setBaseTarget(t,fe(o)?o.get():o)),fe(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let o;if(typeof n=="string"||typeof n=="object"){const i=Hs(this.props,n,this.presenceContext?.custom);i&&(o=i[t])}if(n&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!fe(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ws),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ls.render(this.render)}}class hl extends Xf{constructor(){super(...arguments),this.KeyframeResolver=Hd}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:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;fe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function gl(e,{style:t,vars:n},o,s){const i=e.style;let r;for(r in t)i[r]=t[r];s?.applyProjectionStyles(i,o);for(r in n)i.setProperty(r,n[r])}function Yf(e){return window.getComputedStyle(e)}class Zf extends hl{constructor(){super(...arguments),this.type="html",this.renderInstance=gl}readValueFromInstance(t,n){if(Pt.has(n))return this.projection?.isProjecting?Oo(n):ad(t,n);{const o=Yf(t),s=(bs(n)?o.getPropertyValue(n):o[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return dl(t,n)}build(t,n,o){Ns(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Ws(t,n,o)}}const ml=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 Jf(e,t,n,o){gl(e,t,void 0,o);for(const s in t.attrs)e.setAttribute(ml.has(s)?s:Gs(s),t.attrs[s])}class Qf extends hl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=re}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Pt.has(n)){const o=Na(n);return o&&o.default||0}return n=ml.has(n)?n:Gs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return sl(t,n,o)}build(t,n,o){el(t,n,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,n,o,s){Jf(t,n,o,s)}mount(t){this.isSVGTag=nl(t.tagName),super.mount(t)}}const eh=(e,t)=>zs(e)?new Qf(t):new Zf(t,{allowProjection:e!==C.Fragment});function wt(e,t,n){const o=e.getProps();return Hs(o,t,n!==void 0?n:o.custom,e)}const Xo=e=>Array.isArray(e);function th(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ct(n))}function nh(e){return Xo(e)?e[e.length-1]||0:e}function oh(e,t){const n=wt(e,t);let{transitionEnd:o={},transition:s={},...i}=n||{};i={...i,...o};for(const r in i){const a=nh(i[r]);th(e,r,a)}}function sh(e){return!!(fe(e)&&e.add)}function Yo(e,t){const n=e.getValue("willChange");if(sh(n))return n.add(t);if(!n&&He.WillChange){const o=new He.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function pl(e){return e.props[il]}const ih=e=>e!==null;function rh(e,{repeat:t,repeatType:n="loop"},o){const s=e.filter(ih),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[i]}const ah={type:"spring",stiffness:500,damping:25,restSpeed:10},lh=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ch={type:"keyframes",duration:.8},uh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},dh=(e,{keyframes:t})=>t.length>2?ch:Pt.has(e)?e.startsWith("scale")?lh(t[1]):ah:uh;function fh({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:s,repeat:i,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Us=(e,t,n,o={},s,i)=>r=>{const a=ks(o,e)||{},l=a.delay||o.delay||0;let{elapsed:c=0}=o;c=c-Ae(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};fh(a)||Object.assign(u,dh(e,u)),u.duration&&(u.duration=Ae(u.duration)),u.repeatDelay&&(u.repeatDelay=Ae(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Wo(u),u.delay===0&&(d=!0)),(He.instantAnimations||He.skipAnimations)&&(d=!0,Wo(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const f=rh(u.keyframes,a);if(f!==void 0){te.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new As(u):new Vd(u)};function hh({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function vl(e,t,{delay:n=0,transitionOverride:o,type:s}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:r,...a}=t;o&&(i=o);const l=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const u in a){const d=e.getValue(u,e.latestValues[u]??null),f=a[u];if(f===void 0||c&&hh(c,u))continue;const h={delay:n,...ks(i||{},u)},m=d.get();if(m!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===m&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const w=pl(e);if(w){const x=window.MotionHandoffAnimation(w,u,te);x!==null&&(h.startTime=x,g=!0)}}Yo(e,u),d.start(Us(u,d,f,e.shouldReduceMotion&&ja.has(u)?{type:!1}:h,e,g));const p=d.animation;p&&l.push(p)}return r&&Promise.all(l).then(()=>{te.update(()=>{r&&oh(e,r)})}),l}function yl(e,t,n,o=0,s=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),r=e.size,a=(r-1)*o;return typeof n=="function"?n(i,r):s===1?i*o:a-i*o}function Zo(e,t,n={}){const o=wt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(vl(e,o,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=s;return gh(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,c]=a==="beforeChildren"?[i,r]:[r,i];return l().then(()=>c())}else return Promise.all([i(),r(n.delay)])}function gh(e,t,n=0,o=0,s=0,i=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Zo(l,t,{...r,delay:n+(typeof o=="function"?0:o)+yl(e.variantChildren,l,o,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function mh(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const s=t.map(i=>Zo(e,i,n));o=Promise.all(s)}else if(typeof t=="string")o=Zo(e,t,n);else{const s=typeof t=="function"?wt(e,t,n.custom):t;o=Promise.all(vl(e,s,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function wl(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const ph=Os.length;function xl(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xl(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<ph;n++){const o=Os[n],s=e.props[o];(qt(s)||s===!1)&&(t[o]=s)}return t}const vh=[...$s].reverse(),yh=$s.length;function wh(e){return t=>Promise.all(t.map(({animation:n,options:o})=>mh(e,n,o)))}function xh(e){let t=wh(e),n=zi(),o=!0;const s=l=>(c,u)=>{const d=wt(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:h,...m}=d;c={...c,...m,...h}}return c};function i(l){t=l(e)}function r(l){const{props:c}=e,u=xl(e.parent)||{},d=[],f=new Set;let h={},m=1/0;for(let p=0;p<yh;p++){const w=vh[p],x=n[w],v=c[w]!==void 0?c[w]:u[w],S=qt(v),_=w===l?x.isActive:null;_===!1&&(m=p);let P=v===u[w]&&v!==c[w]&&S;if(P&&o&&e.manuallyAnimateOnMount&&(P=!1),x.protectedKeys={...h},!x.isActive&&_===null||!v&&!x.prevProp||On(v)||typeof v=="boolean")continue;const V=Ch(x.prevProp,v);let M=V||w===l&&x.isActive&&!P&&S||p>m&&S,A=!1;const F=Array.isArray(v)?v:[v];let $=F.reduce(s(w),{});_===!1&&($={});const{prevResolvedValues:z={}}=x,O={...z,...$},D=E=>{M=!0,f.has(E)&&(A=!0,f.delete(E)),x.needsAnimating[E]=!0;const R=e.getValue(E);R&&(R.liveStyle=!1)};for(const E in O){const R=$[E],T=z[E];if(h.hasOwnProperty(E))continue;let L=!1;Xo(R)&&Xo(T)?L=!wl(R,T):L=R!==T,L?R!=null?D(E):f.add(E):R!==void 0&&f.has(E)?D(E):x.protectedKeys[E]=!0}x.prevProp=v,x.prevResolvedValues=$,x.isActive&&(h={...h,...$}),o&&e.blockInitialAnimation&&(M=!1);const B=P&&V;M&&(!B||A)&&d.push(...F.map(E=>{const R={type:w};if(typeof E=="string"&&o&&!B&&e.manuallyAnimateOnMount&&e.parent){const{parent:T}=e,L=wt(T,E);if(T.enteringChildren&&L){const{delayChildren:Y}=L.transition||{};R.delay=yl(T.enteringChildren,e,Y)}}return{animation:E,options:R}}))}if(f.size){const p={};if(typeof c.initial!="boolean"){const w=wt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);w&&w.transition&&(p.transition=w.transition)}f.forEach(w=>{const x=e.getBaseTarget(w),v=e.getValue(w);v&&(v.liveStyle=!0),p[w]=x??null}),d.push({animation:p})}let g=!!d.length;return o&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),o=!1,g?t(d):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=r(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=zi(),o=!0}}}function Ch(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!wl(t,e):!1}function tt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zi(){return{animate:tt(!0),whileInView:tt(),whileHover:tt(),whileTap:tt(),whileDrag:tt(),whileFocus:tt(),exit:tt()}}class et{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Sh extends et{constructor(t){super(t),t.animationState||(t.animationState=xh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();On(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 bh=0;class _h extends et{constructor(){super(...arguments),this.id=bh++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)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 Rh={animation:{Feature:Sh},exit:{Feature:_h}};function Yt(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function nn(e){return{point:{x:e.pageX,y:e.pageY}}}const Eh=e=>t=>Is(t)&&e(t,nn(t));function Ot(e,t,n,o){return Yt(e,t,Eh(n),o)}const Cl=1e-4,Mh=1-Cl,Ph=1+Cl,Sl=.01,Th=0-Sl,Vh=0+Sl;function ge(e){return e.max-e.min}function Ah(e,t,n){return Math.abs(e-t)<=n}function Hi(e,t,n,o=.5){e.origin=o,e.originPoint=oe(t.min,t.max,e.origin),e.scale=ge(n)/ge(t),e.translate=oe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Mh&&e.scale<=Ph||isNaN(e.scale))&&(e.scale=1),(e.translate>=Th&&e.translate<=Vh||isNaN(e.translate))&&(e.translate=0)}function Nt(e,t,n,o){Hi(e.x,t.x,n.x,o?o.originX:void 0),Hi(e.y,t.y,n.y,o?o.originY:void 0)}function Wi(e,t,n){e.min=n.min+t.min,e.max=e.min+ge(t)}function Dh(e,t,n){Wi(e.x,t.x,n.x),Wi(e.y,t.y,n.y)}function Gi(e,t,n){e.min=t.min-n.min,e.max=e.min+ge(t)}function Bt(e,t,n){Gi(e.x,t.x,n.x),Gi(e.y,t.y,n.y)}function _e(e){return[e("x"),e("y")]}const bl=({current:e})=>e?e.ownerDocument.defaultView:null,Ui=(e,t)=>Math.abs(e-t);function kh(e,t){const n=Ui(e.x,t.x),o=Ui(e.y,t.y);return Math.sqrt(n**2+o**2)}class _l{constructor(t,n,{transformPagePoint:o,contextWindow:s=window,dragSnapToOrigin:i=!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=fo(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=kh(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:g}=f,{timestamp:p}=ue;this.history.push({...g,timestamp:p});const{onStart:w,onMove:x}=this.handlers;h||(w&&w(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=uo(h,this.transformPagePoint),te.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=fo(f.type==="pointercancel"?this.lastMoveEventInfo:uo(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,w),g&&g(f,w)},!Is(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=o,this.distanceThreshold=r,this.contextWindow=s||window;const a=nn(t),l=uo(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=ue;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,fo(l,this.history)),this.removeListeners=Qt(Ot(this.contextWindow,"pointermove",this.handlePointerMove),Ot(this.contextWindow,"pointerup",this.handlePointerUp),Ot(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ye(this.updatePoint)}}function uo(e,t){return t?{point:t(e.point)}:e}function Ki(e,t){return{x:e.x-t.x,y:e.y-t.y}}function fo({point:e},t){return{point:e,delta:Ki(e,Rl(t)),offset:Ki(e,Fh(t)),velocity:Lh(t,.1)}}function Fh(e){return e[0]}function Rl(e){return e[e.length-1]}function Lh(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const s=Rl(e);for(;n>=0&&(o=e[n],!(s.timestamp-o.timestamp>Ae(t)));)n--;if(!o)return{x:0,y:0};const i=Re(s.timestamp-o.timestamp);if(i===0)return{x:0,y:0};const r={x:(s.x-o.x)/i,y:(s.y-o.y)/i};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Ih(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?oe(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?oe(n,e,o.max):Math.min(e,n)),e}function qi(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 jh(e,{top:t,left:n,bottom:o,right:s}){return{x:qi(e.x,n,s),y:qi(e.y,t,o)}}function Xi(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function $h(e,t){return{x:Xi(e.x,t.x),y:Xi(e.y,t.y)}}function Oh(e,t){let n=.5;const o=ge(e),s=ge(t);return s>o?n=Gt(t.min,t.max-o,e.min):o>s&&(n=Gt(e.min,e.max-s,t.min)),Be(0,1,n)}function Nh(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 Jo=.35;function Bh(e=Jo){return e===!1?e=0:e===!0&&(e=Jo),{x:Yi(e,"left","right"),y:Yi(e,"top","bottom")}}function Yi(e,t,n){return{min:Zi(e,t),max:Zi(e,n)}}function Zi(e,t){return typeof e=="number"?e:e[t]||0}const zh=new WeakMap;class Hh{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=re(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:o}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(nn(d).point)},r=(d,f)=>{const{drag:h,dragPropagation:m,onDragStart:g}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Kd(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),_e(w=>{let x=this.getAxisMotionValue(w).get()||0;if(Fe.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const S=v.layout.layoutBox[w];S&&(x=ge(S)*(parseFloat(x)/100))}}this.originPoint[w]=x}),g&&te.postRender(()=>g(d,f)),Yo(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:g,onDrag:p}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:w}=f;if(m&&this.currentDirection===null){this.currentDirection=Wh(w),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,w),this.updateAxis("y",f.point,w),this.visualElement.render(),p&&p(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>_e(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new _l(t,{onSessionStart:i,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:o,contextWindow:bl(this.visualElement)})}stop(t,n){const o=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!o)return;const{velocity:r}=s;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&te.postRender(()=>a(o,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:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:s}=this.getProps();if(!o||!dn(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let r=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(r=Ih(r,this.constraints[t],this.elastic[t])),i.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&gt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=jh(o.layoutBox,t):this.constraints=!1,this.elastic=Bh(n),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&_e(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Nh(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!gt(t))return!1;const o=t.current;ze(o!==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 i=Gf(o,s.root,this.visualElement.getTransformPagePoint());let r=$h(s.layout.layoutBox,i);if(n){const a=n(zf(r));this.hasMutatedConstraints=!!a,a&&(r=ll(a))}return r}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:s,dragTransition:i,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=_e(u=>{if(!dn(u,n,this.currentDirection))return;let d=l&&l[u]||{};r&&(d={min:0,max:0});const f=s?200:1e6,h=s?40:1e7,m={type:"inertia",velocity:o?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return Yo(this.visualElement,t),o.start(Us(t,o,0,n,this.visualElement,!1))}stopAnimation(){_e(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){_e(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),s=o[n];return s||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){_e(n=>{const{drag:o}=this.getProps();if(!dn(n,o,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:r,max:a}=s.layout.layoutBox[n];i.set(t[n]-oe(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!gt(n)||!o||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};_e(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();s[r]=Oh({min:l,max:l},this.constraints[r])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),_e(r=>{if(!dn(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(oe(l,c,s[r]))})}addListeners(){if(!this.visualElement.current)return;zh.set(this.visualElement,this);const t=this.visualElement.current,n=Ot(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();gt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),te.read(o);const r=Yt(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(_e(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{r(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:r=Jo,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:s,dragConstraints:i,dragElastic:r,dragMomentum:a}}}function dn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Wh(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Gh extends et{constructor(t){super(t),this.removeGroupControls=Ee,this.removeListeners=Ee,this.controls=new Hh(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ee}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ji=e=>(t,n)=>{e&&te.postRender(()=>e(t,n))};class Uh extends et{constructor(){super(...arguments),this.removePointerDownListener=Ee}onPointerDown(t){this.session=new _l(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bl(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ji(t),onStart:Ji(n),onMove:o,onEnd:(i,r)=>{delete this.session,s&&te.postRender(()=>s(i,r))}}}mount(){this.removePointerDownListener=Ot(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 bn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Qi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const kt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(G.test(e))e=parseFloat(e);else return e;const n=Qi(e,t.target.x),o=Qi(e,t.target.y);return`${n}% ${o}%`}},Kh={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,s=Ze.parse(e);if(s.length>5)return o;const i=Ze.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 c=oe(a,l,.5);return typeof s[2+r]=="number"&&(s[2+r]/=c),typeof s[3+r]=="number"&&(s[3+r]/=c),i(s)}};let ho=!1;class qh extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:s}=this.props,{projection:i}=t;pf(Xh),i&&(n.group&&n.group.add(i),o&&o.register&&s&&o.register(i),ho&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),bn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:s,isPresent:i}=this.props,{projection:r}=o;return r&&(r.isPresent=i,ho=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?r.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?r.promote():r.relegate()||te.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ls.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:s}=t;ho=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),o&&o.deregister&&o.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function El(e){const[t,n]=qa(),o=C.useContext(hs);return y.jsx(qh,{...e,layoutGroup:o,switchLayoutGroup:C.useContext(rl),isPresent:t,safeToRemove:n})}const Xh={borderRadius:{...kt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:kt,borderTopRightRadius:kt,borderBottomLeftRadius:kt,borderBottomRightRadius:kt,boxShadow:Kh};function Yh(e,t,n){const o=fe(e)?e:Ct(e);return o.start(Us("",o,t,n)),o.animation}const Zh=(e,t)=>e.depth-t.depth;class Jh{constructor(){this.children=[],this.isDirty=!1}add(t){ps(this.children,t),this.isDirty=!0}remove(t){vs(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Zh),this.isDirty=!1,this.children.forEach(t)}}function Qh(e,t){const n=ve.now(),o=({timestamp:s})=>{const i=s-n;i>=t&&(Ye(o),e(i-t))};return te.setup(o,!0),()=>Ye(o)}const Ml=["TopLeft","TopRight","BottomLeft","BottomRight"],eg=Ml.length,er=e=>typeof e=="string"?parseFloat(e):e,tr=e=>typeof e=="number"||G.test(e);function tg(e,t,n,o,s,i){s?(e.opacity=oe(0,n.opacity??1,ng(o)),e.opacityExit=oe(t.opacity??1,0,og(o))):i&&(e.opacity=oe(t.opacity??1,n.opacity??1,o));for(let r=0;r<eg;r++){const a=`border${Ml[r]}Radius`;let l=nr(t,a),c=nr(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||tr(l)===tr(c)?(e[a]=Math.max(oe(er(l),er(c),o),0),(Fe.test(c)||Fe.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=oe(t.rotate||0,n.rotate||0,o))}function nr(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const ng=Pl(0,.5,ga),og=Pl(.5,.95,Ee);function Pl(e,t,n){return o=>o<e?0:o>t?1:n(Gt(e,t,o))}function or(e,t){e.min=t.min,e.max=t.max}function Se(e,t){or(e.x,t.x),or(e.y,t.y)}function sr(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ir(e,t,n,o,s){return e-=t,e=An(e,1/n,o),s!==void 0&&(e=An(e,1/s,o)),e}function sg(e,t=0,n=1,o=.5,s,i=e,r=e){if(Fe.test(t)&&(t=parseFloat(t),t=oe(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=oe(i.min,i.max,o);e===i&&(a-=t),e.min=ir(e.min,t,n,a,s),e.max=ir(e.max,t,n,a,s)}function rr(e,t,[n,o,s],i,r){sg(e,t[n],t[o],t[s],t.scale,i,r)}const ig=["x","scaleX","originX"],rg=["y","scaleY","originY"];function ar(e,t,n,o){rr(e.x,t,ig,n?n.x:void 0,o?o.x:void 0),rr(e.y,t,rg,n?n.y:void 0,o?o.y:void 0)}function lr(e){return e.translate===0&&e.scale===1}function Tl(e){return lr(e.x)&&lr(e.y)}function cr(e,t){return e.min===t.min&&e.max===t.max}function ag(e,t){return cr(e.x,t.x)&&cr(e.y,t.y)}function ur(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Vl(e,t){return ur(e.x,t.x)&&ur(e.y,t.y)}function dr(e){return ge(e.x)/ge(e.y)}function fr(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class lg{constructor(){this.members=[]}add(t){ps(this.members,t),t.scheduleRender()}remove(t){if(vs(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 o;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){o=i;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function cg(e,t,n){let o="";const s=e.x.translate/t.x,i=e.y.translate/t.y,r=n?.z||0;if((s||i||r)&&(o=`translate3d(${s}px, ${i}px, ${r}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:m}=n;c&&(o=`perspective(${c}px) ${o}`),u&&(o+=`rotate(${u}deg) `),d&&(o+=`rotateX(${d}deg) `),f&&(o+=`rotateY(${f}deg) `),h&&(o+=`skewX(${h}deg) `),m&&(o+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(o+=`scale(${a}, ${l})`),o||"none"}const go=["","X","Y","Z"],ug=1e3;let dg=0;function mo(e,t,n,o){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),o&&(o[e]=0))}function Al(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=pl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",te,!(s||i))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&Al(o)}function Dl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:s}){return class{constructor(r={},a=t?.()){this.id=dg++,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(gg),this.nodes.forEach(yg),this.nodes.forEach(wg),this.nodes.forEach(mg)},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 Jh)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new ws),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=Ka(r)&&!Qd(r),this.instance=r;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;te.read(()=>{d=window.innerWidth}),e(r,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=Qh(f,250),bn.hasAnimatedSinceResize&&(bn.hasAnimatedSinceResize=!1,this.nodes.forEach(mr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||_g,{onLayoutAnimationStart:g,onLayoutAnimationComplete:p}=c.getProps(),w=!this.targetLayout||!Vl(this.targetLayout,h),x=!d&&f;if(this.options.layoutRoot||this.resumeFrom||x||d&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...ks(m,"layout"),onPlay:g,onComplete:p};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,x)}else d||mr(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(),Ye(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(xg),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&&Al(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];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 c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(hr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(gr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(vg),this.nodes.forEach(fg),this.nodes.forEach(hg)):this.nodes.forEach(gr),this.clearAllSnapshots();const a=ve.now();ue.delta=Be(0,1e3/60,a-ue.timestamp),ue.timestamp=a,ue.isProcessing=!0,no.update.process(ue),no.preRender.process(ue),no.render.process(ue),ue.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ls.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(pg),this.sharedNodes.forEach(Cg)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,te.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){te.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ge(this.snapshot.measuredBox.x)&&!ge(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=re(),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=o(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&&!Tl(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||nt(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Rg(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return re();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Eg))){const{scroll:c}=this.root;c&&(mt(a.x,c.offset.x),mt(a.y,c.offset.y))}return a}removeElementScroll(r){const a=re();if(Se(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Se(a,r),mt(a.x,u.offset.x),mt(a.y,u.offset.y))}return a}applyTransform(r,a=!1){const l=re();Se(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&pt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),nt(u.latestValues)&&pt(l,u.latestValues)}return nt(this.latestValues)&&pt(l,this.latestValues),l}removeTransform(r){const a=re();Se(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!nt(c.latestValues))continue;Uo(c.latestValues)&&c.updateSnapshot();const u=re(),d=c.measurePageBox();Se(u,d),ar(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return nt(this.latestValues)&&ar(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!==ue.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:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=ue.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=re(),this.relativeTargetOrigin=re(),Bt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Se(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=re(),this.targetWithTransforms=re()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Dh(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Se(this.target,this.layout.layoutBox),ul(this.target,this.targetDelta)):Se(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=re(),this.relativeTargetOrigin=re(),Bt(this.relativeTargetOrigin,this.target,f.target),Se(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Uo(this.parent.latestValues)||cl(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===ue.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Se(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Wf(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=re());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(sr(this.prevProjectionDelta.x,this.projectionDelta.x),sr(this.prevProjectionDelta.y,this.projectionDelta.y)),Nt(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!fr(this.projectionDelta.x,this.prevProjectionDelta.x)||!fr(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=vt(),this.projectionDelta=vt(),this.projectionDeltaWithTransform=vt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=re(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=h!==m,p=this.getStack(),w=!p||p.members.length<=1,x=!!(g&&!w&&this.options.crossfade===!0&&!this.path.some(bg));this.animationProgress=0;let v;this.mixTargetDelta=S=>{const _=S/1e3;pr(d.x,r.x,_),pr(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),Sg(this.relativeTarget,this.relativeTargetOrigin,f,_),v&&ag(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=re()),Se(v,this.relativeTarget)),g&&(this.animationValues=u,tg(u,c,this.latestValues,_,x,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&&(Ye(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=te.update(()=>{bn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ct(0)),this.currentAnimation=Yh(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(ug),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&kl(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||re();const d=ge(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const f=ge(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}Se(a,l),pt(a,u),Nt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new lg),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.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 c=this.getStack();c&&c.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 c={};l.z&&mo("z",r,c,this.animationValues);for(let u=0;u<go.length;u++)mo(`rotate${go[u]}`,r,c,this.animationValues),mo(`skew${go[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);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=Sn(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Sn(a?.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=cg(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),r.transform=d;const{x:f,y:h}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in Xt){if(u[m]===void 0)continue;const{correct:g,applyTo:p,isCSSVariable:w}=Xt[m],x=d==="none"?u[m]:g(u[m],c);if(p){const v=p.length;for(let S=0;S<v;S++)r[p[S]]=x}else w?this.options.visualElement.renderState.vars[m]=x:r[m]=x}this.options.layoutId&&(r.pointerEvents=c===this?Sn(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(hr),this.root.sharedNodes.clear()}}}function fg(e){e.updateLayout()}function hg(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:o}=e.layout,{animationType:s}=e.options,i=t.source!==e.layout.source;s==="size"?_e(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=ge(d);d.min=n[u].min,d.max=d.min+f}):kl(s,t.layoutBox,n)&&_e(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=ge(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const r=vt();Nt(r,n,t.layoutBox);const a=vt();i?Nt(a,e.applyTransform(o,!0),t.measuredBox):Nt(a,n,t.layoutBox);const l=!Tl(r);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const h=re();Bt(h,t.layoutBox,d.layoutBox);const m=re();Bt(m,n,f.layoutBox),Vl(h,m)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function gg(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 mg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function pg(e){e.clearSnapshot()}function hr(e){e.clearMeasurements()}function gr(e){e.isLayoutDirty=!1}function vg(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function mr(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function yg(e){e.resolveTargetDelta()}function wg(e){e.calcProjection()}function xg(e){e.resetSkewAndRotation()}function Cg(e){e.removeLeadSnapshot()}function pr(e,t,n){e.translate=oe(t.translate,0,n),e.scale=oe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function vr(e,t,n,o){e.min=oe(t.min,n.min,o),e.max=oe(t.max,n.max,o)}function Sg(e,t,n,o){vr(e.x,t.x,n.x,o),vr(e.y,t.y,n.y,o)}function bg(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const _g={duration:.45,ease:[.4,0,.1,1]},yr=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),wr=yr("applewebkit/")&&!yr("chrome/")?Math.round:Ee;function xr(e){e.min=wr(e.min),e.max=wr(e.max)}function Rg(e){xr(e.x),xr(e.y)}function kl(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ah(dr(t),dr(n),.2)}function Eg(e){return e!==e.root&&e.scroll?.wasRoot}const Mg=Dl({attachResizeListener:(e,t)=>Yt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),po={current:void 0},Fl=Dl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!po.current){const e=new Mg({});e.mount(window),e.setOptions({layoutScroll:!0}),po.current=e}return po.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Pg={pan:{Feature:Uh},drag:{Feature:Gh,ProjectionNode:Fl,MeasureLayout:El}};function Cr(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=o[s];i&&te.postRender(()=>i(t,nn(t)))}class Tg extends et{mount(){const{current:t}=this.node;t&&(this.unmount=qd(t,(n,o)=>(Cr(this.node,o,"Start"),s=>Cr(this.node,s,"End"))))}unmount(){}}class Vg extends et{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=Qt(Yt(this.node.current,"focus",()=>this.onFocus()),Yt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Sr(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=o[s];i&&te.postRender(()=>i(t,nn(t)))}class Ag extends et{mount(){const{current:t}=this.node;t&&(this.unmount=Jd(t,(n,o)=>(Sr(this.node,o,"Start"),(s,{success:i})=>Sr(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Qo=new WeakMap,vo=new WeakMap,Dg=e=>{const t=Qo.get(e.target);t&&t(e)},kg=e=>{e.forEach(Dg)};function Fg({root:e,...t}){const n=e||document;vo.has(n)||vo.set(n,{});const o=vo.get(n),s=JSON.stringify(t);return o[s]||(o[s]=new IntersectionObserver(kg,{root:e,...t})),o[s]}function Lg(e,t,n){const o=Fg(t);return Qo.set(e,n),o.observe(e),()=>{Qo.delete(e),o.unobserve(e)}}const Ig={some:0,all:1};class jg extends et{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:s="some",once:i}=t,r={root:n?n.current:void 0,rootMargin:o,threshold:typeof s=="number"?s:Ig[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return Lg(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($g(t,n))&&this.startObserver()}unmount(){}}function $g({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Og={inView:{Feature:jg},tap:{Feature:Ag},focus:{Feature:Vg},hover:{Feature:Tg}},Ng={layout:{ProjectionNode:Fl,MeasureLayout:El}},Bg={...Rh,...Og,...Pg,...Ng},Bn=Bf(Bg,eh),zg="_primary_13825_8",Hg="_secondary_13825_12",Wg="_tertiary_13825_16",Gg="_positive_13825_20",Ug="_negative_13825_24",Kg="_warning_13825_28",qg="_accent_13825_32",Xg="_inverse_13825_36",Yg="_text_13825_111",Zg="_regular_13825_117",Jg="_medium_13825_121",Qg="_semibold_13825_125",em="_bold_13825_129",fn={primary:zg,secondary:Hg,tertiary:Wg,positive:Gg,negative:Ug,warning:Kg,accent:qg,inverse:Xg,"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:Yg,regular:Zg,medium:Jg,semibold:Qg,bold:em},tm=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"),k.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})},K=C.forwardRef(({children:e,className:t,variant:n="body-1",fontWeight:o="medium",tag:s="p",colorName:i="primary",style:r,clickOpacity:a=.5,opacityDuration:l=200,onClick:c,disabled:u,mt:d,mb:f,ml:h,mr:m,flex:g,cursor:p,wordBreak:w,whiteSpace:x,textOverflow:v,decoration:S,color:_,center:P,left:V,right:M,uppercase:A,lowercase:F,capitalize:$,overflow:z,...O},D)=>{const[B,N]=C.useState(!1),E=!!c,R=()=>E&&N(!0),T=()=>E&&N(!1),L=tm({mt:d,mb:f,ml:h,mr:m,flex:g,cursor:p,wordBreak:w,whiteSpace:x,textOverflow:v,decoration:S,color:_,center:P,left:V,right:M,uppercase:A,lowercase:F,capitalize:$,overflow:z}),Y=s,U=E?k.css({opacity:B?a:1,transition:`opacity ${l}ms ease`}):"";return y.jsx(Y,{ref:D,...O,className:k.cx(fn.text,fn[n],fn[i],fn[o],U,t,L),style:r,onClick:c,onMouseDown:R,onMouseUp:T,onMouseLeave:T,onTouchStart:R,onTouchEnd:T,role:E?"button":void 0,tabIndex:E?0:void 0,children:e})});K.displayName="Text";const Ll=Bn(K),nm=k.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)"},om={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},sm={clear:k.css({backgroundColor:"transparent",border:"none"}),filled:k.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:k.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},im=(e,t,n,o)=>{if(o)return k.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 k.css({...s,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return k.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 k.css({...s,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return k.css(s)}},es=({disabled:e,loading:t,wrapperClassName:n,buttonClassName:o,buttonDisabledClassName:s,textClassName:i,children:r,variant:a="filled",backgroundColor:l,textColor:c,textFontWeight:u,borderColor:d,color:f="accent",opacity:h,borderRadius:m,width:g="full",size:p="md",iconLeft:w,iconRight:x,intensity:v="primary",flex:S,type:_="button",...P})=>{const V=C.useMemo(()=>{switch(g){case"full":return"100%";case"auto":return"auto";default:return g}},[g]),M=C.useMemo(()=>l||(a==="filled"?f==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${f}-${v})`:"transparent"),[a,l,f,v]),A=C.useMemo(()=>{if(v==="primary"){if(f==="neutral")return"var(--text-secondary)";if(a==="filled")return"var(--text-inverse)"}else if(f==="neutral")return"var(--text-secondary)";return`var(--text-${f})`},[v,f,a]),F=C.useMemo(()=>{if(v==="primary"){if(f==="neutral")return"secondary";if(a==="filled")return"inverse"}else if(f==="neutral")return"secondary";return f},[a,f,v]),$=C.useMemo(()=>d||(a==="outline"?`var(--border-${f}-${v})`:"transparent"),[a,d,f,v]),z=C.useMemo(()=>{switch(p){case"lg":return Ft.lg;case"md":case"sm":return Ft.md;case"xs":return Ft.sm;default:return Ft.md}},[p]),O=k.cx(nm,im(a,f,v,e),sm[a],e?s:void 0,k.css({borderRadius:m?Ft[m]:z,backgroundColor:M,borderColor:$,color:c,width:"100%",height:om[p],opacity:h||(e?.7:1)}),o),D=C.useMemo(()=>{switch(p){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[p]);return y.jsx(I,{className:k.cx(n),w:V,flex:S,relative:!0,overflow:"hidden",children:y.jsxs(Bn.button,{...P,whileTap:!e&&!t?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},disabled:e||t,className:O,children:[t?y.jsx(Jr,{color:A}):y.jsxs(y.Fragment,{children:[w,y.jsx(Ll,{style:{color:c},colorName:F,variant:D,className:i,textOverflow:"ellipsis",overflow:"hidden",children:r}),x]}),y.jsx(ct,{})]})})},rm=e=>b.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",...e},b.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),am=e=>b.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},b.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),lm="_checkbox_22ifd_8",cm="_disabled_22ifd_14",um="_checkbox__ripple_22ifd_14",dm="_checkbox__input_22ifd_26",fm="_checkbox__box_22ifd_33",hm="_secondary_22ifd_46",gm="_checked_22ifd_52",mm="_error_22ifd_61",je={checkbox:lm,disabled:cm,checkbox__ripple:um,checkbox__input:dm,checkbox__box:fm,secondary:hm,checked:gm,error:mm},pm={sm:20,md:24},Ks=C.forwardRef(({checked:e,onChange:t,disabled:n,error:o,indeterminate:s,size:i="md",title:r,titleColor:a,subtitle:l,subtitleColor:c="secondary",name:u,required:d,variant:f="primary",flex:h,readOnly:m},g)=>{const[p,w]=C.useState(!1),x=e!==void 0,v=x?e:p,S=A=>{x||w(A.target.checked),t?.(A)},_=pm[i],P=v||s,V=!!m&&!n,M=n?"not-allowed":V?"auto":"pointer";return y.jsxs("label",{className:k.cx(je.checkbox,k.css({flex:h,cursor:M}),{[je.disabled]:n}),children:[y.jsxs(I,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${_}px`,"--checkbox-size-double":`${_*2}px`},children:[y.jsx("input",{ref:g,type:"checkbox",checked:v,onChange:V?void 0:S,onClick:A=>A.stopPropagation(),disabled:n,readOnly:V,name:u,required:d,className:k.cx(je.checkbox__input,{[je.disabled]:n},k.css({cursor:M}))}),y.jsx("div",{className:k.cx(je.checkbox__box,je[f],{[je.disabled]:n,[je.error]:o,[je.checked]:P}),children:P&&(s?y.jsx(am,{width:_*.75,height:_*.75}):y.jsx(rm,{width:_*.75,height:_*.75}))})]}),(r||l)&&y.jsxs(I,{gap:4,children:[r&&y.jsx(K,{colorName:a,variant:i==="sm"?"body-2":"body-1",children:r}),l&&y.jsx(K,{variant:"body-2",colorName:c,children:l})]})]})});Ks.displayName="Checkbox";const vm=e=>b.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("g",{opacity:.5},b.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"}))),ym="_disabled_19ujt_20",wm="_multiline_19ujt_24",xm="_input_19ujt_8",Cm="_sm_19ujt_74",Sm="_md_19ujt_79",bm="_error_19ujt_84",_m="_white_19ujt_88",Rm="_gray_19ujt_92",pe={"input-container":"_input-container_19ujt_8",disabled:ym,multiline:wm,input:xm,"input-text-size_sm":"_input-text-size_sm_19ujt_55","input-text-size_md":"_input-text-size_md_19ujt_59","input-text-align_left":"_input-text-align_left_19ujt_64","input-text-align_center":"_input-text-align_center_19ujt_67","input-text-align_right":"_input-text-align_right_19ujt_70",sm:Cm,md:Sm,error:bm,white:_m,gray:Rm,"clear-button":"_clear-button_19ujt_96"};function br(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const Il=C.forwardRef((e,t)=>{const{label:n,prompt:o,error:s,errorText:i,size:r="md",prefix:a,suffix:l,background:c="white",showClearButton:u,disabled:d,value:f,defaultValue:h,inputClassName:m,textAlign:g="left",...p}=e,w=e.multiline===!0,x=C.useRef(null),v=C.useRef(null),[S,_]=Jt(typeof f=="string"||typeof f=="number"?String(f):void 0,h==="string"||h==="number"?String(h):"");C.useImperativeHandle(t,()=>({focus:()=>{x.current?.focus(),v.current?.focus()},blur:()=>{x.current?.blur(),v.current?.blur()},get value(){return x.current?.value||v.current?.value},set value(A){_(A),x.current&&(x.current.value=A),v.current&&(v.current.value=A)}}));const P=A=>{if(_(A.target.value),w){const F=e.onChange;F?.(A)}else{const F=e.onChange;F?.(A)}};C.useEffect(()=>{w&&e.autoResize&&v.current&&(v.current.style.height="auto",v.current.style.height=`${v.current.scrollHeight}px`)},[S,w,e.autoResize]);const V=()=>{if(_(""),!w){const F=x.current;if(F){F.value="";const $=br(F),z=e.onChange;z?.($)}return}const A=v.current;if(A){A.value="";const F=br(A),$=e.onChange;$?.(F)}},M=()=>{if(w){const{rows:z,autoResize:O,onChange:D,multiline:B,...N}=p;return y.jsx("textarea",{ref:v,rows:e.rows??3,className:k.cx(pe.input,m,{[pe.disabled]:d,[pe[`input-text-align_${g}`]]:!!g}),disabled:d,maxLength:e.maxLength,...N,value:S,onChange:P})}const{onChange:A,multiline:F,...$}=p;return y.jsx("input",{...$,ref:x,className:k.cx(pe.input,pe[`input-text-size_${r}`],m,{[pe.disabled]:d,[pe[`input-text-align_${g}`]]:!!g}),disabled:d,type:e.type??"text",value:S,onChange:P})};return y.jsxs(I,{w:"full",gap:"var(--spacing-sm)",children:[n&&y.jsx(K,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}),y.jsxs(I,{row:!0,alignItems:w?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:k.cx(pe["input-container"],pe[c],pe[r],{[pe.error]:s,[pe.disabled]:d,[pe.multiline]:w}),children:[a&&y.jsx(I,{flex:"none",children:a}),y.jsx(I,{flex:"1",children:M()}),u&&S&&!d&&y.jsx(I,{flex:"none",children:y.jsx("span",{className:pe["clear-button"],onClick:V,children:y.jsx(vm,{})})}),l&&y.jsx(I,{flex:"none",children:l})]}),(o||w)&&y.jsxs(I,{row:!0,gap:10,w:"full",children:[typeof o=="string"?y.jsx(K,{variant:"caption-1",colorName:"tertiary",children:o}):o,w&&e.maxLength&&y.jsx(K,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${S.length}/${e.maxLength}`})]}),i&&s&&y.jsx(K,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:i})]})});Il.displayName="Input";const Em="_input_5xq63_8",Mm="_disabled_5xq63_29",Pm="_error_5xq63_37",Tm="_success_5xq63_41",Vm="_white_5xq63_50",Am="_gray_5xq63_54",Dm="_glow_5xq63_58",ut={input:Em,disabled:Mm,error:Pm,success:Tm,white:Vm,gray:Am,glow:Dm};function km(e){const t=C.useRef(void 0);return C.useEffect(()=>{t.current=e},[e]),t.current}const jl=C.forwardRef(({length:e=6,label:t,prompt:n,error:o,errorText:s,success:i,disabled:r,autoFocus:a,center:l,secure:c,loading:u,background:d="gray",numeric:f=!0,className:h,value:m,defaultValue:g,onChange:p,onComplete:w},x)=>{const v=typeof m=="string",S=v?m:g,_=typeof S=="string"?S.slice(0,e):"",[P,V]=Jt(v?m:void 0,_),[M,A]=C.useState(()=>{const E=_.slice(0,e);return Array.from({length:e},(R,T)=>E[T]??"")}),F=C.useRef(void 0),$=km(m),z=C.useRef([]);C.useEffect(()=>{if(!v)return;const E=m??"";if(E===$)return;if(E===F.current){F.current=void 0;return}const R=E.slice(0,e);A(Array.from({length:e},(T,L)=>R[L]??""))},[v,m,e,$]);const O=C.useCallback((E,R)=>{const T=E.slice(0,e);R?.fromInternal&&(F.current=T),V(T),p?.(T),T.length===e&&w?.(T)},[e,p,w,V]);C.useImperativeHandle(x,()=>({focus:()=>{z.current[0]?.focus()},blur:()=>{z.current.forEach(E=>E?.blur())},get value(){return P||""},setValue:E=>{const R=E.slice(0,e);A(Array.from({length:e},(T,L)=>R[L]??"")),O(R,{fromInternal:!0})},clear:()=>{A(Array.from({length:e},()=>"")),O("",{fromInternal:!0})}}),[e,O,P]);const D=C.useCallback((E,R)=>{if(r)return;let T=R;if(f&&(T=T.replace(/\D/g,"")),T.length>1){const q=M.slice(0,E).join("")+T+M.slice(E+1).join(""),me=Array.from({length:e},(j,Z)=>q[Z]??"");A(me),O(q,{fromInternal:!0});const J=Math.min(E+T.length,e-1),se=z.current[J];se?.focus(),se?.select();return}const L=M[E],Y=[...M];Y[E]=T,A(Y);const U=Y.join("");if(O(U,{fromInternal:!0}),!L&&T&&E<e-1){const q=z.current[E+1];q?.focus(),q?.select()}},[M,r,e,f,O]),B=C.useCallback((E,R)=>{if(!r){if(R.key==="Backspace"){R.preventDefault();const T=z.current[E];if(M[E]){const L=[...M];L[E]="",A(L),O(L.join(""),{fromInternal:!0}),T?.focus();return}if(E>0){const L=z.current[E-1];L?.focus(),L?.select()}return}R.key==="ArrowLeft"&&E>0&&(R.preventDefault(),z.current[E-1]?.focus()),R.key==="ArrowRight"&&E<e-1&&(R.preventDefault(),z.current[E+1]?.focus())}},[M,r,e,O]),N=C.useCallback((E,R)=>{if(r)return;R.preventDefault();let T=R.clipboardData.getData("text");if(f&&(T=T.replace(/\D/g,"")),!T)return;const L=e-E,Y=Math.min(T.length,L),U=T.slice(0,Y),q=[...M];for(let j=0;j<Y;j++)q[E+j]=U[j]??"";A(q);const me=q.join("");O(me,{fromInternal:!0});const J=Math.min(E+Y-1,e-1),se=z.current[J];se?.focus(),se?.select()},[M,r,e,f,O]);return y.jsxs(I,{w:"full",gap:"var(--spacing-sm)",className:h,center:l,children:[t&&y.jsx(K,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:t}),y.jsx(I,{row:!0,w:"full",gap:"var(--spacing-sm)",center:l,className:k.cx({[ut.disabled]:r}),children:Array.from({length:e}).map((E,R)=>y.jsxs(I,{relative:!0,display:"inline-block",children:[y.jsx("input",{ref:T=>{z.current[R]=T},className:k.cx(ut.input,ut[d],o&&ut.error,i&&ut.success,M[R]&&k.css({caretColor:"transparent"})),inputMode:f?"numeric":"text",type:c?"password":"text",maxLength:1,autoFocus:a&&R===0,disabled:r||u,value:M[R],onChange:T=>D(R,T.target.value),onKeyDown:T=>B(R,T),onPaste:T=>N(R,T)}),y.jsx(Bn.span,{className:ut.glow,variants:Fm,custom:R,initial:"idle",animate:u?"wave":"idle"})]},R))}),n&&y.jsx(K,{variant:"caption-1",colorName:"tertiary",children:n}),s&&o&&y.jsx(K,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:s})]})}),Fm={idle:{opacity:0,scale:1,transition:{duration:.18}},wave:(e=0)=>({opacity:[0,.2,0],scale:[1,1.03,1],transition:{duration:1.5,delay:e*.15,repeat:1/0,ease:[.42,0,.58,1]}})};jl.displayName="OtpInput";const Lm="_primary_svt6d_8",Im="_secondary_svt6d_13",jm="_button_svt6d_18",Ue={primary:Lm,secondary:Im,button:jm,"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 $m({value:e,onChange:t,options:n,variant:o="primary",fullWidth:s=!1,className:i}){return y.jsx(I,{row:!0,alignItems:"center",borderRadius:"var(--corner-md)",p:"var(--spacing-xs)",gap:"var(--spacing-md)",className:k.cx(Ue[o],s&&Ue["full-width"],i),children:n.map(r=>{const a=r.value===e,l=r.disabled,c=r.separatorAfter??!1;return y.jsxs(C.Fragment,{children:[y.jsxs("button",{type:"button",disabled:l,className:k.cx(Ue.button,s&&Ue["full-width"],a&&Ue["button-active"],a&&Ue[`button-${o}`],l&&Ue["button-disabled"]),onClick:()=>!l&&t(r.value),children:[r.icon&&y.jsx(I,{alignItems:"center",justifyContent:"center",className:Ue["icon-container"],children:r.icon}),r.label&&y.jsx(K,{colorName:a?"primary":"tertiary",children:r.label}),!l&&y.jsx(ct,{color:"var(--fill-bg-overlay-primary)"})]}),c&&y.jsx(I,{w:1,h:24,backgroundColor:"var(--fill-bg-tertiary)"})]},r.value)})})}function zn(){return typeof window<"u"}function Tt(e){return $l(e)?(e.nodeName||"").toLowerCase():"#document"}function xe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ie(e){var t;return(t=($l(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $l(e){return zn()?e instanceof Node||e instanceof xe(e).Node:!1}function ee(e){return zn()?e instanceof Element||e instanceof xe(e).Element:!1}function ye(e){return zn()?e instanceof HTMLElement||e instanceof xe(e).HTMLElement:!1}function ts(e){return!zn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xe(e).ShadowRoot}const Om=new Set(["inline","contents"]);function on(e){const{overflow:t,overflowX:n,overflowY:o,display:s}=Me(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Om.has(s)}const Nm=new Set(["table","td","th"]);function Bm(e){return Nm.has(Tt(e))}const zm=[":popover-open",":modal"];function Hn(e){return zm.some(t=>{try{return e.matches(t)}catch{return!1}})}const Hm=["transform","translate","scale","rotate","perspective"],Wm=["transform","translate","scale","rotate","perspective","filter"],Gm=["paint","layout","strict","content"];function qs(e){const t=Wn(),n=ee(e)?Me(e):e;return Hm.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Wm.some(o=>(n.willChange||"").includes(o))||Gm.some(o=>(n.contain||"").includes(o))}function Um(e){let t=We(e);for(;ye(t)&&!Ne(t);){if(qs(t))return t;if(Hn(t))return null;t=We(t)}return null}function Wn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Km=new Set(["html","body","#document"]);function Ne(e){return Km.has(Tt(e))}function Me(e){return xe(e).getComputedStyle(e)}function Gn(e){return ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function We(e){if(Tt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ts(e)&&e.host||Ie(e);return ts(t)?t.host:t}function Ol(e){const t=We(e);return Ne(t)?e.ownerDocument?e.ownerDocument.body:e.body:ye(t)&&on(t)?t:Ol(t)}function Xe(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Ol(e),i=s===((o=e.ownerDocument)==null?void 0:o.body),r=xe(s);if(i){const a=ns(r);return t.concat(r,r.visualViewport||[],on(s)?s:[],a&&n?Xe(a):[])}return t.concat(s,Xe(s,[],n))}function ns(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const bt=Math.min,we=Math.max,Dn=Math.round,hn=Math.floor,Le=e=>({x:e,y:e}),qm={left:"right",right:"left",bottom:"top",top:"bottom"},Xm={start:"end",end:"start"};function _r(e,t,n){return we(e,bt(t,n))}function sn(e,t){return typeof e=="function"?e(t):e}function Je(e){return e.split("-")[0]}function rn(e){return e.split("-")[1]}function Nl(e){return e==="x"?"y":"x"}function Bl(e){return e==="y"?"height":"width"}const Ym=new Set(["top","bottom"]);function Oe(e){return Ym.has(Je(e))?"y":"x"}function zl(e){return Nl(Oe(e))}function Zm(e,t,n){n===void 0&&(n=!1);const o=rn(e),s=zl(e),i=Bl(s);let r=s==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(r=kn(r)),[r,kn(r)]}function Jm(e){const t=kn(e);return[os(e),t,os(t)]}function os(e){return e.replace(/start|end/g,t=>Xm[t])}const Rr=["left","right"],Er=["right","left"],Qm=["top","bottom"],ep=["bottom","top"];function tp(e,t,n){switch(e){case"top":case"bottom":return n?t?Er:Rr:t?Rr:Er;case"left":case"right":return t?Qm:ep;default:return[]}}function np(e,t,n,o){const s=rn(e);let i=tp(Je(e),n==="start",o);return s&&(i=i.map(r=>r+"-"+s),t&&(i=i.concat(i.map(os)))),i}function kn(e){return e.replace(/left|right|bottom|top/g,t=>qm[t])}function op(e){return{top:0,right:0,bottom:0,left:0,...e}}function sp(e){return typeof e!="number"?op(e):{top:e,right:e,bottom:e,left:e}}function Fn(e){const{x:t,y:n,width:o,height:s}=e;return{width:o,height:s,top:n,left:t,right:t+o,bottom:n+s,x:t,y:n}}const Mr="data-floating-ui-focusable",ip="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ss(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ts(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Lt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function yo(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 rp(e){return e.matches("html,body")}function yt(e){return e?.ownerDocument||document}function ap(e){return ye(e)&&e.matches(ip)}function lp(e){return e?e.hasAttribute(Mr)?e:e.querySelector("["+Mr+"]")||e:null}function _n(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var i;return s.parentId===t&&(!n||((i=s.context)==null?void 0:i.open))}).flatMap(s=>[s,..._n(e,s.id,n)])}function cp(e){return"nativeEvent"in e}function Zt(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var up=typeof document<"u",dp=function(){},_t=up?C.useLayoutEffect:dp;const fp={...b};function gn(e){const t=b.useRef(e);return _t(()=>{t.current=e}),t}const hp=fp.useInsertionEffect,gp=hp||(e=>e());function ke(e){const t=b.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return gp(()=>{t.current=e}),b.useCallback(function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return t.current==null?void 0:t.current(...o)},[])}function Pr(e,t,n){let{reference:o,floating:s}=e;const i=Oe(t),r=zl(t),a=Bl(r),l=Je(t),c=i==="y",u=o.x+o.width/2-s.width/2,d=o.y+o.height/2-s.height/2,f=o[a]/2-s[a]/2;let h;switch(l){case"top":h={x:u,y:o.y-s.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:d};break;case"left":h={x:o.x-s.width,y:d};break;default:h={x:o.x,y:o.y}}switch(rn(t)){case"start":h[r]-=f*(n&&c?-1:1);break;case"end":h[r]+=f*(n&&c?-1:1);break}return h}const mp=async(e,t,n)=>{const{placement:o="bottom",strategy:s="absolute",middleware:i=[],platform:r}=n,a=i.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let c=await r.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=Pr(c,o,l),f=o,h={},m=0;for(let g=0;g<a.length;g++){const{name:p,fn:w}=a[g],{x,y:v,data:S,reset:_}=await w({x:u,y:d,initialPlacement:o,placement:f,strategy:s,middlewareData:h,rects:c,platform:r,elements:{reference:e,floating:t}});u=x??u,d=v??d,h={...h,[p]:{...h[p],...S}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(c=_.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:u,y:d}=Pr(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:s,middlewareData:h}};async function Xs(e,t){var n;t===void 0&&(t={});const{x:o,y:s,platform:i,rects:r,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=sn(t,e),m=sp(h),p=a[f?d==="floating"?"reference":"floating":d],w=Fn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(p)))==null||n?p:p.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:o,y:s,width:r.floating.width,height:r.floating.height}:r.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},_=Fn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:v,strategy:l}):x);return{top:(w.top-_.top+m.top)/S.y,bottom:(_.bottom-w.bottom+m.bottom)/S.y,left:(w.left-_.left+m.left)/S.x,right:(_.right-w.right+m.right)/S.x}}const pp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:s,middlewareData:i,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...p}=sn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=Je(s),x=Oe(a),v=Je(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=f||(v||!g?[kn(a)]:Jm(a)),P=m!=="none";!f&&P&&_.push(...np(a,g,m,S));const V=[a,..._],M=await Xs(t,p),A=[];let F=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&A.push(M[w]),d){const D=Zm(s,r,S);A.push(M[D[0]],M[D[1]])}if(F=[...F,{placement:s,overflows:A}],!A.every(D=>D<=0)){var $,z;const D=((($=i.flip)==null?void 0:$.index)||0)+1,B=V[D];if(B&&(!(d==="alignment"?x!==Oe(B):!1)||F.every(R=>Oe(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:D,overflows:F},reset:{placement:B}};let N=(z=F.filter(E=>E.overflows[0]<=0).sort((E,R)=>E.overflows[1]-R.overflows[1])[0])==null?void 0:z.placement;if(!N)switch(h){case"bestFit":{var O;const E=(O=F.filter(R=>{if(P){const T=Oe(R.placement);return T===x||T==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(T=>T>0).reduce((T,L)=>T+L,0)]).sort((R,T)=>R[1]-T[1])[0])==null?void 0:O[0];E&&(N=E);break}case"initialPlacement":N=a;break}if(s!==N)return{reset:{placement:N}}}return{}}}},vp=new Set(["left","top"]);async function yp(e,t){const{placement:n,platform:o,elements:s}=e,i=await(o.isRTL==null?void 0:o.isRTL(s.floating)),r=Je(n),a=rn(n),l=Oe(n)==="y",c=vp.has(r)?-1:1,u=i&&l?-1:1,d=sn(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*u,y:f*c}:{x:f*c,y:h*u}}const wp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:s,y:i,placement:r,middlewareData:a}=t,l=await yp(t,e);return r===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:r}}}}},xp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:s}=t,{mainAxis:i=!0,crossAxis:r=!1,limiter:a={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...l}=sn(e,t),c={x:n,y:o},u=await Xs(t,l),d=Oe(Je(s)),f=Nl(d);let h=c[f],m=c[d];if(i){const p=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=h+u[p],v=h-u[w];h=_r(x,h,v)}if(r){const p=d==="y"?"top":"left",w=d==="y"?"bottom":"right",x=m+u[p],v=m-u[w];m=_r(x,m,v)}const g=a.fn({...t,[f]:h,[d]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[f]:i,[d]:r}}}}}},Cp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:s,rects:i,platform:r,elements:a}=t,{apply:l=()=>{},...c}=sn(e,t),u=await Xs(t,c),d=Je(s),f=rn(s),h=Oe(s)==="y",{width:m,height:g}=i.floating;let p,w;d==="top"||d==="bottom"?(p=d,w=f===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(w=d,p=f==="end"?"top":"bottom");const x=g-u.top-u.bottom,v=m-u.left-u.right,S=bt(g-u[p],x),_=bt(m-u[w],v),P=!t.middlewareData.shift;let V=S,M=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=v),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(V=x),P&&!f){const F=we(u.left,0),$=we(u.right,0),z=we(u.top,0),O=we(u.bottom,0);h?M=m-2*(F!==0||$!==0?F+$:we(u.left,u.right)):V=g-2*(z!==0||O!==0?z+O:we(u.top,u.bottom))}await l({...t,availableWidth:M,availableHeight:V});const A=await r.getDimensions(a.floating);return m!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}};function Hl(e){const t=Me(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const s=ye(e),i=s?e.offsetWidth:n,r=s?e.offsetHeight:o,a=Dn(n)!==i||Dn(o)!==r;return a&&(n=i,o=r),{width:n,height:o,$:a}}function Ys(e){return ee(e)?e:e.contextElement}function xt(e){const t=Ys(e);if(!ye(t))return Le(1);const n=t.getBoundingClientRect(),{width:o,height:s,$:i}=Hl(t);let r=(i?Dn(n.width):n.width)/o,a=(i?Dn(n.height):n.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Sp=Le(0);function Wl(e){const t=xe(e);return!Wn()||!t.visualViewport?Sp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xe(e)?!1:t}function lt(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Ys(e);let r=Le(1);t&&(o?ee(o)&&(r=xt(o)):r=xt(e));const a=bp(i,n,o)?Wl(i):Le(0);let l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,u=s.width/r.x,d=s.height/r.y;if(i){const f=xe(i),h=o&&ee(o)?xe(o):o;let m=f,g=ns(m);for(;g&&o&&h!==m;){const p=xt(g),w=g.getBoundingClientRect(),x=Me(g),v=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*p.x,S=w.top+(g.clientTop+parseFloat(x.paddingTop))*p.y;l*=p.x,c*=p.y,u*=p.x,d*=p.y,l+=v,c+=S,m=xe(g),g=ns(m)}}return Fn({width:u,height:d,x:l,y:c})}function Un(e,t){const n=Gn(e).scrollLeft;return t?t.left+n:lt(Ie(e)).left+n}function Gl(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Un(e,n),s=n.top+t.scrollTop;return{x:o,y:s}}function _p(e){let{elements:t,rect:n,offsetParent:o,strategy:s}=e;const i=s==="fixed",r=Ie(o),a=t?Hn(t.floating):!1;if(o===r||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Le(1);const u=Le(0),d=ye(o);if((d||!d&&!i)&&((Tt(o)!=="body"||on(r))&&(l=Gn(o)),ye(o))){const h=lt(o);c=xt(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}const f=r&&!d&&!i?Gl(r,l):Le(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function Rp(e){return Array.from(e.getClientRects())}function Ep(e){const t=Ie(e),n=Gn(e),o=e.ownerDocument.body,s=we(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=we(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+Un(e);const a=-n.scrollTop;return Me(o).direction==="rtl"&&(r+=we(t.clientWidth,o.clientWidth)-s),{width:s,height:i,x:r,y:a}}const Tr=25;function Mp(e,t){const n=xe(e),o=Ie(e),s=n.visualViewport;let i=o.clientWidth,r=o.clientHeight,a=0,l=0;if(s){i=s.width,r=s.height;const u=Wn();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const c=Un(o);if(c<=0){const u=o.ownerDocument,d=u.body,f=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(o.clientWidth-d.clientWidth-h);m<=Tr&&(i-=m)}else c<=Tr&&(i+=c);return{width:i,height:r,x:a,y:l}}const Pp=new Set(["absolute","fixed"]);function Tp(e,t){const n=lt(e,!0,t==="fixed"),o=n.top+e.clientTop,s=n.left+e.clientLeft,i=ye(e)?xt(e):Le(1),r=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=o*i.y;return{width:r,height:a,x:l,y:c}}function Vr(e,t,n){let o;if(t==="viewport")o=Mp(e,n);else if(t==="document")o=Ep(Ie(e));else if(ee(t))o=Tp(t,n);else{const s=Wl(e);o={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Fn(o)}function Ul(e,t){const n=We(e);return n===t||!ee(n)||Ne(n)?!1:Me(n).position==="fixed"||Ul(n,t)}function Vp(e,t){const n=t.get(e);if(n)return n;let o=Xe(e,[],!1).filter(a=>ee(a)&&Tt(a)!=="body"),s=null;const i=Me(e).position==="fixed";let r=i?We(e):e;for(;ee(r)&&!Ne(r);){const a=Me(r),l=qs(r);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&Pp.has(s.position)||on(r)&&!l&&Ul(e,r))?o=o.filter(u=>u!==r):s=a,r=We(r)}return t.set(e,o),o}function Ap(e){let{element:t,boundary:n,rootBoundary:o,strategy:s}=e;const r=[...n==="clippingAncestors"?Hn(t)?[]:Vp(t,this._c):[].concat(n),o],a=r[0],l=r.reduce((c,u)=>{const d=Vr(t,u,s);return c.top=we(d.top,c.top),c.right=bt(d.right,c.right),c.bottom=bt(d.bottom,c.bottom),c.left=we(d.left,c.left),c},Vr(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Dp(e){const{width:t,height:n}=Hl(e);return{width:t,height:n}}function kp(e,t,n){const o=ye(t),s=Ie(t),i=n==="fixed",r=lt(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Le(0);function c(){l.x=Un(s)}if(o||!o&&!i)if((Tt(t)!=="body"||on(s))&&(a=Gn(t)),o){const h=lt(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else s&&c();i&&!o&&s&&c();const u=s&&!o&&!i?Gl(s,a):Le(0),d=r.left+a.scrollLeft-l.x-u.x,f=r.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:r.width,height:r.height}}function wo(e){return Me(e).position==="static"}function Ar(e,t){if(!ye(e)||Me(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ie(e)===n&&(n=n.ownerDocument.body),n}function Kl(e,t){const n=xe(e);if(Hn(e))return n;if(!ye(e)){let s=We(e);for(;s&&!Ne(s);){if(ee(s)&&!wo(s))return s;s=We(s)}return n}let o=Ar(e,t);for(;o&&Bm(o)&&wo(o);)o=Ar(o,t);return o&&Ne(o)&&wo(o)&&!qs(o)?n:o||Um(e)||n}const Fp=async function(e){const t=this.getOffsetParent||Kl,n=this.getDimensions,o=await n(e.floating);return{reference:kp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Lp(e){return Me(e).direction==="rtl"}const Ip={convertOffsetParentRelativeRectToViewportRelativeRect:_p,getDocumentElement:Ie,getClippingRect:Ap,getOffsetParent:Kl,getElementRects:Fp,getClientRects:Rp,getDimensions:Dp,getScale:xt,isElement:ee,isRTL:Lp};function ql(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jp(e,t){let n=null,o;const s=Ie(e);function i(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function r(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=c;if(a||t(),!f||!h)return;const m=hn(d),g=hn(s.clientWidth-(u+f)),p=hn(s.clientHeight-(d+h)),w=hn(u),v={rootMargin:-m+"px "+-g+"px "+-p+"px "+-w+"px",threshold:we(0,bt(1,l))||1};let S=!0;function _(P){const V=P[0].intersectionRatio;if(V!==l){if(!S)return r();V?r(!1,V):o=setTimeout(()=>{r(!1,1e-7)},1e3)}V===1&&!ql(c,e.getBoundingClientRect())&&r(),S=!1}try{n=new IntersectionObserver(_,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,v)}n.observe(e)}return r(!0),i}function Xl(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=Ys(e),u=s||i?[...c?Xe(c):[],...Xe(t)]:[];u.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const d=c&&a?jp(c,n):null;let f=-1,h=null;r&&(h=new ResizeObserver(w=>{let[x]=w;x&&x.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let m,g=l?lt(e):null;l&&p();function p(){const w=lt(e);g&&!ql(g,w)&&n(),g=w,m=requestAnimationFrame(p)}return n(),()=>{var w;u.forEach(x=>{s&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d?.(),(w=h)==null||w.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const $p=wp,Op=xp,Np=pp,Bp=Cp,zp=(e,t,n)=>{const o=new Map,s={platform:Ip,...n},i={...s.platform,_c:o};return mp(e,t,{...s,platform:i})};var Hp=typeof document<"u",Wp=function(){},Rn=Hp?C.useLayoutEffect:Wp;function Ln(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,o,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Ln(e[o],t[o]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,s[o]))return!1;for(o=n;o--!==0;){const i=s[o];if(!(i==="_owner"&&e.$$typeof)&&!Ln(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Yl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dr(e,t){const n=Yl(e);return Math.round(t*n)/n}function xo(e){const t=b.useRef(e);return Rn(()=>{t.current=e}),t}function Gp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:s,elements:{reference:i,floating:r}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=b.useState(o);Ln(f,o)||h(o);const[m,g]=b.useState(null),[p,w]=b.useState(null),x=b.useCallback(R=>{R!==P.current&&(P.current=R,g(R))},[]),v=b.useCallback(R=>{R!==V.current&&(V.current=R,w(R))},[]),S=i||m,_=r||p,P=b.useRef(null),V=b.useRef(null),M=b.useRef(u),A=l!=null,F=xo(l),$=xo(s),z=xo(c),O=b.useCallback(()=>{if(!P.current||!V.current)return;const R={placement:t,strategy:n,middleware:f};$.current&&(R.platform=$.current),zp(P.current,V.current,R).then(T=>{const L={...T,isPositioned:z.current!==!1};D.current&&!Ln(M.current,L)&&(M.current=L,Vc.flushSync(()=>{d(L)}))})},[f,t,n,$,z]);Rn(()=>{c===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[c]);const D=b.useRef(!1);Rn(()=>(D.current=!0,()=>{D.current=!1}),[]),Rn(()=>{if(S&&(P.current=S),_&&(V.current=_),S&&_){if(F.current)return F.current(S,_,O);O()}},[S,_,O,F,A]);const B=b.useMemo(()=>({reference:P,floating:V,setReference:x,setFloating:v}),[x,v]),N=b.useMemo(()=>({reference:S,floating:_}),[S,_]),E=b.useMemo(()=>{const R={position:n,left:0,top:0};if(!N.floating)return R;const T=Dr(N.floating,u.x),L=Dr(N.floating,u.y);return a?{...R,transform:"translate("+T+"px, "+L+"px)",...Yl(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:L}},[n,a,N.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:O,refs:B,elements:N,floatingStyles:E}),[u,O,B,N,E])}const Zl=(e,t)=>({...$p(e),options:[e,t]}),Jl=(e,t)=>({...Op(e),options:[e,t]}),Ql=(e,t)=>({...Np(e),options:[e,t]}),Up=(e,t)=>({...Bp(e),options:[e,t]});function Kp(e){const t=b.useRef(void 0),n=b.useCallback(o=>{const s=e.map(i=>{if(i!=null){if(typeof i=="function"){const r=i,a=r(o);return typeof a=="function"?a:()=>{r(null)}}return i.current=o,()=>{i.current=null}}});return()=>{s.forEach(i=>i?.())}},e);return b.useMemo(()=>e.every(o=>o==null)?null:o=>{t.current&&(t.current(),t.current=void 0),o!=null&&(t.current=n(o))},e)}const qp="data-floating-ui-focusable",kr="active",Fr="selected",Xp={...b};let Lr=!1,Yp=0;const Ir=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Yp++;function Zp(){const[e,t]=b.useState(()=>Lr?Ir():void 0);return _t(()=>{e==null&&t(Ir())},[]),b.useEffect(()=>{Lr=!0},[]),e}const Jp=Xp.useId,ec=Jp||Zp;let is;process.env.NODE_ENV!=="production"&&(is=new Set);function Qp(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const s="Floating UI: "+n.join(" ");if(!((e=is)!=null&&e.has(s))){var i;(i=is)==null||i.add(s),console.error(s)}}function ev(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(s=>s(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var o;(o=e.get(t))==null||o.delete(n)}}}const tv=b.createContext(null),nv=b.createContext(null),Zs=()=>{var e;return((e=b.useContext(tv))==null?void 0:e.id)||null},Js=()=>b.useContext(nv);function tc(e){return"data-floating-ui-"+e}function Pe(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const jr=tc("safe-polygon");function Co(e,t,n){if(n&&!Zt(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const o=e();return typeof o=="number"?o:o?.[t]}return e?.[t]}function So(e){return typeof e=="function"?e():e}function ov(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:s,events:i,elements:r}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=Js(),m=Zs(),g=gn(c),p=gn(l),w=gn(n),x=gn(d),v=b.useRef(),S=b.useRef(-1),_=b.useRef(),P=b.useRef(-1),V=b.useRef(!0),M=b.useRef(!1),A=b.useRef(()=>{}),F=b.useRef(!1),$=ke(()=>{var E;const R=(E=s.current.openEvent)==null?void 0:E.type;return R?.includes("mouse")&&R!=="mousedown"});b.useEffect(()=>{if(!a)return;function E(R){let{open:T}=R;T||(Pe(S),Pe(P),V.current=!0,F.current=!1)}return i.on("openchange",E),()=>{i.off("openchange",E)}},[a,i]),b.useEffect(()=>{if(!a||!g.current||!n)return;function E(T){$()&&o(!1,T,"hover")}const R=yt(r.floating).documentElement;return R.addEventListener("mouseleave",E),()=>{R.removeEventListener("mouseleave",E)}},[r.floating,n,o,a,g,$]);const z=b.useCallback(function(E,R,T){R===void 0&&(R=!0),T===void 0&&(T="hover");const L=Co(p.current,"close",v.current);L&&!_.current?(Pe(S),S.current=window.setTimeout(()=>o(!1,E,T),L)):R&&(Pe(S),o(!1,E,T))},[p,o]),O=ke(()=>{A.current(),_.current=void 0}),D=ke(()=>{if(M.current){const E=yt(r.floating).body;E.style.pointerEvents="",E.removeAttribute(jr),M.current=!1}}),B=ke(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);b.useEffect(()=>{if(!a)return;function E(U){if(Pe(S),V.current=!1,u&&!Zt(v.current)||So(x.current)>0&&!Co(p.current,"open"))return;const q=Co(p.current,"open",v.current);q?S.current=window.setTimeout(()=>{w.current||o(!0,U,"hover")},q):n||o(!0,U,"hover")}function R(U){if(B()){D();return}A.current();const q=yt(r.floating);if(Pe(P),F.current=!1,g.current&&s.current.floatingContext){n||Pe(S),_.current=g.current({...s.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){D(),O(),B()||z(U,!0,"safe-polygon")}});const J=_.current;q.addEventListener("mousemove",J),A.current=()=>{q.removeEventListener("mousemove",J)};return}(v.current==="touch"?!ss(r.floating,U.relatedTarget):!0)&&z(U)}function T(U){B()||s.current.floatingContext&&(g.current==null||g.current({...s.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){D(),O(),B()||z(U)}})(U))}function L(){Pe(S)}function Y(U){B()||z(U,!1)}if(ee(r.domReference)){const U=r.domReference,q=r.floating;return n&&U.addEventListener("mouseleave",T),f&&U.addEventListener("mousemove",E,{once:!0}),U.addEventListener("mouseenter",E),U.addEventListener("mouseleave",R),q&&(q.addEventListener("mouseleave",T),q.addEventListener("mouseenter",L),q.addEventListener("mouseleave",Y)),()=>{n&&U.removeEventListener("mouseleave",T),f&&U.removeEventListener("mousemove",E),U.removeEventListener("mouseenter",E),U.removeEventListener("mouseleave",R),q&&(q.removeEventListener("mouseleave",T),q.removeEventListener("mouseenter",L),q.removeEventListener("mouseleave",Y))}}},[r,a,e,u,f,z,O,D,o,n,w,h,p,g,s,B,x]),_t(()=>{var E;if(a&&n&&(E=g.current)!=null&&(E=E.__options)!=null&&E.blockPointerEvents&&$()){M.current=!0;const T=r.floating;if(ee(r.domReference)&&T){var R;const L=yt(r.floating).body;L.setAttribute(jr,"");const Y=r.domReference,U=h==null||(R=h.nodesRef.current.find(q=>q.id===m))==null||(R=R.context)==null?void 0:R.elements.floating;return U&&(U.style.pointerEvents=""),L.style.pointerEvents="none",Y.style.pointerEvents="auto",T.style.pointerEvents="auto",()=>{L.style.pointerEvents="",Y.style.pointerEvents="",T.style.pointerEvents=""}}}},[a,n,m,r,h,g,$]),_t(()=>{n||(v.current=void 0,F.current=!1,O(),D())},[n,O,D]),b.useEffect(()=>()=>{O(),Pe(S),Pe(P),D()},[a,r.domReference,O,D]);const N=b.useMemo(()=>{function E(R){v.current=R.pointerType}return{onPointerDown:E,onPointerEnter:E,onMouseMove(R){const{nativeEvent:T}=R;function L(){!V.current&&!w.current&&o(!0,T,"hover")}u&&!Zt(v.current)||n||So(x.current)===0||F.current&&R.movementX**2+R.movementY**2<2||(Pe(P),v.current==="touch"?L():(F.current=!0,P.current=window.setTimeout(L,So(x.current))))}}},[u,o,n,w,x]);return b.useMemo(()=>a?{reference:N}:{},[a,N])}function $r(e){return ye(e.target)&&e.target.tagName==="BUTTON"}function sv(e){return ye(e.target)&&e.target.tagName==="A"}function Or(e){return ap(e)}function iv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:s,elements:{domReference:i}}=e,{enabled:r=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=b.useRef(),h=b.useRef(!1),m=b.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const p=f.current;g.button===0&&a!=="click"&&(Zt(p,!0)&&c||(n&&l&&(!(s.current.openEvent&&d)||s.current.openEvent.type==="mousedown")?o(!1,g.nativeEvent,"click"):(g.preventDefault(),o(!0,g.nativeEvent,"click"))))},onClick(g){const p=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}Zt(p,!0)&&c||(n&&l&&(!(s.current.openEvent&&d)||s.current.openEvent.type==="click")?o(!1,g.nativeEvent,"click"):o(!0,g.nativeEvent,"click"))},onKeyDown(g){f.current=void 0,!(g.defaultPrevented||!u||$r(g))&&(g.key===" "&&!Or(i)&&(g.preventDefault(),h.current=!0),!sv(g)&&g.key==="Enter"&&o(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||$r(g)||Or(i)||g.key===" "&&h.current&&(h.current=!1,o(!(n&&l),g.nativeEvent,"click"))}}),[s,i,a,c,u,o,n,d,l]);return b.useMemo(()=>r?{reference:m}:{},[r,m])}const rv={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},av={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Nr=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 lv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,elements:s,dataRef:i}=e,{enabled:r=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:m}=t,g=Js(),p=ke(typeof l=="function"?l:()=>!1),w=typeof l=="function"?p:l,x=b.useRef(!1),{escapeKey:v,outsidePress:S}=Nr(h),{escapeKey:_,outsidePress:P}=Nr(m),V=b.useRef(!1),M=ke(D=>{var B;if(!n||!r||!a||D.key!=="Escape"||V.current)return;const N=(B=i.current.floatingContext)==null?void 0:B.nodeId,E=g?_n(g.nodesRef.current,N):[];if(!v&&(D.stopPropagation(),E.length>0)){let R=!0;if(E.forEach(T=>{var L;if((L=T.context)!=null&&L.open&&!T.context.dataRef.current.__escapeKeyBubbles){R=!1;return}}),!R)return}o(!1,cp(D)?D.nativeEvent:D,"escape-key")}),A=ke(D=>{var B;const N=()=>{var E;M(D),(E=Lt(D))==null||E.removeEventListener("keydown",N)};(B=Lt(D))==null||B.addEventListener("keydown",N)}),F=ke(D=>{var B;const N=i.current.insideReactTree;i.current.insideReactTree=!1;const E=x.current;if(x.current=!1,c==="click"&&E||N||typeof w=="function"&&!w(D))return;const R=Lt(D),T="["+tc("inert")+"]",L=yt(s.floating).querySelectorAll(T);let Y=ee(R)?R:null;for(;Y&&!Ne(Y);){const J=We(Y);if(Ne(J)||!ee(J))break;Y=J}if(L.length&&ee(R)&&!rp(R)&&!ss(R,s.floating)&&Array.from(L).every(J=>!ss(Y,J)))return;if(ye(R)&&O){const J=Ne(R),se=Me(R),j=/auto|scroll/,Z=J||j.test(se.overflowX),ie=J||j.test(se.overflowY),he=Z&&R.clientWidth>0&&R.scrollWidth>R.clientWidth,ce=ie&&R.clientHeight>0&&R.scrollHeight>R.clientHeight,Ge=se.direction==="rtl",At=ce&&(Ge?D.offsetX<=R.offsetWidth-R.clientWidth:D.offsetX>R.clientWidth),Dt=he&&D.offsetY>R.clientHeight;if(At||Dt)return}const U=(B=i.current.floatingContext)==null?void 0:B.nodeId,q=g&&_n(g.nodesRef.current,U).some(J=>{var se;return yo(D,(se=J.context)==null?void 0:se.elements.floating)});if(yo(D,s.floating)||yo(D,s.domReference)||q)return;const me=g?_n(g.nodesRef.current,U):[];if(me.length>0){let J=!0;if(me.forEach(se=>{var j;if((j=se.context)!=null&&j.open&&!se.context.dataRef.current.__outsidePressBubbles){J=!1;return}}),!J)return}o(!1,D,"outside-press")}),$=ke(D=>{var B;const N=()=>{var E;F(D),(E=Lt(D))==null||E.removeEventListener(c,N)};(B=Lt(D))==null||B.addEventListener(c,N)});b.useEffect(()=>{if(!n||!r)return;i.current.__escapeKeyBubbles=v,i.current.__outsidePressBubbles=S;let D=-1;function B(L){o(!1,L,"ancestor-scroll")}function N(){window.clearTimeout(D),V.current=!0}function E(){D=window.setTimeout(()=>{V.current=!1},Wn()?5:0)}const R=yt(s.floating);a&&(R.addEventListener("keydown",_?A:M,_),R.addEventListener("compositionstart",N),R.addEventListener("compositionend",E)),w&&R.addEventListener(c,P?$:F,P);let T=[];return f&&(ee(s.domReference)&&(T=Xe(s.domReference)),ee(s.floating)&&(T=T.concat(Xe(s.floating))),!ee(s.reference)&&s.reference&&s.reference.contextElement&&(T=T.concat(Xe(s.reference.contextElement)))),T=T.filter(L=>{var Y;return L!==((Y=R.defaultView)==null?void 0:Y.visualViewport)}),T.forEach(L=>{L.addEventListener("scroll",B,{passive:!0})}),()=>{a&&(R.removeEventListener("keydown",_?A:M,_),R.removeEventListener("compositionstart",N),R.removeEventListener("compositionend",E)),w&&R.removeEventListener(c,P?$:F,P),T.forEach(L=>{L.removeEventListener("scroll",B)}),window.clearTimeout(D)}},[i,s,a,w,c,n,o,f,r,v,S,M,_,A,F,P,$]),b.useEffect(()=>{i.current.insideReactTree=!1},[i,w,c]);const z=b.useMemo(()=>({onKeyDown:M,...u&&{[rv[d]]:D=>{o(!1,D.nativeEvent,"reference-press")},...d!=="click"&&{onClick(D){o(!1,D.nativeEvent,"reference-press")}}}}),[M,o,u,d]),O=b.useMemo(()=>({onKeyDown:M,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[av[c]]:()=>{i.current.insideReactTree=!0}}),[M,c,i]);return b.useMemo(()=>r?{reference:z,floating:O}:{},[r,z,O])}function cv(e){const{open:t=!1,onOpenChange:n,elements:o}=e,s=ec(),i=b.useRef({}),[r]=b.useState(()=>ev()),a=Zs()!=null;if(process.env.NODE_ENV!=="production"){const h=o.reference;h&&!ee(h)&&Qp("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=b.useState(o.reference),u=ke((h,m,g)=>{i.current.openEvent=h?m:void 0,r.emit("openchange",{open:h,event:m,reason:g,nested:a}),n?.(h,m,g)}),d=b.useMemo(()=>({setPositionReference:c}),[]),f=b.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return b.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:r,floatingId:s,refs:d}),[t,u,f,r,s,d])}function nc(e){e===void 0&&(e={});const{nodeId:t}=e,n=cv({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,s=o.elements,[i,r]=b.useState(null),[a,l]=b.useState(null),u=s?.domReference||i,d=b.useRef(null),f=Js();_t(()=>{u&&(d.current=u)},[u]);const h=Gp({...e,elements:{...s,...a&&{reference:a}}}),m=b.useCallback(v=>{const S=ee(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),getClientRects:()=>v.getClientRects(),contextElement:v}:v;l(S),h.refs.setReference(S)},[h.refs]),g=b.useCallback(v=>{(ee(v)||v===null)&&(d.current=v,r(v)),(ee(h.refs.reference.current)||h.refs.reference.current===null||v!==null&&!ee(v))&&h.refs.setReference(v)},[h.refs]),p=b.useMemo(()=>({...h.refs,setReference:g,setPositionReference:m,domReference:d}),[h.refs,g,m]),w=b.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),x=b.useMemo(()=>({...h,...o,refs:p,elements:w,nodeId:t}),[h,p,w,t,o]);return _t(()=>{o.dataRef.current.floatingContext=x;const v=f?.nodesRef.current.find(S=>S.id===t);v&&(v.context=x)}),b.useMemo(()=>({...h,context:x,refs:p,elements:w}),[h,p,w,x])}function bo(e,t,n){const o=new Map,s=n==="item";let i=e;if(s&&e){const{[kr]:r,[Fr]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[qp]:""},...i,...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[c,u]=l;if(!(s&&[kr,Fr].includes(c)))if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof u=="function"){var d;(d=o.get(c))==null||d.push(u),r[c]=function(){for(var f,h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];return(f=o.get(c))==null?void 0:f.map(p=>p(...m)).find(p=>p!==void 0)}}}else r[c]=u}),r),{})}}function uv(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),o=e.map(a=>a?.item),s=b.useCallback(a=>bo(a,e,"reference"),t),i=b.useCallback(a=>bo(a,e,"floating"),n),r=b.useCallback(a=>bo(a,e,"item"),o);return b.useMemo(()=>({getReferenceProps:s,getFloatingProps:i,getItemProps:r}),[s,i,r])}const dv=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function fv(e,t){var n,o;t===void 0&&(t={});const{open:s,elements:i,floatingId:r}=e,{enabled:a=!0,role:l="dialog"}=t,c=ec(),u=((n=i.domReference)==null?void 0:n.id)||c,d=b.useMemo(()=>{var x;return((x=lp(i.floating))==null?void 0:x.id)||r},[i.floating,r]),f=(o=dv.get(l))!=null?o:l,m=Zs()!=null,g=b.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:s?d:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":s?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&m&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,m,s,u,l]),p=b.useMemo(()=>{const x={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?x:{...x,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),w=b.useCallback(x=>{let{active:v,selected:S}=x;const _={role:"option",...v&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{..._,"aria-selected":S}}return{}},[d,l]);return b.useMemo(()=>a?{reference:g,floating:p,item:w}:{},[a,g,p,w])}const hv=e=>b.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),gv=e=>b.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},b.createElement("g",null,b.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"}))),oc=e=>b.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("g",{opacity:.6},b.createElement("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),_o={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"}},Qs=C.forwardRef(({label:e,color:t="primary",size:n="md",onClick:o,onDelete:s,avatar:i,icon:r,disabled:a,className:l},c)=>{const u=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=k.css({cursor:a?"not-allowed":o?"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=k.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return y.jsxs(I,{ref:m=>{u.current=m,typeof c=="function"?c(m):c&&(c.current=m)},row:!0,alignItems:"center",justifyContent:"center",gap:"var(--spacing-sm)",h:_o[n].h,p:_o[n].p,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:d.bg,color:d.color,onClick:o,className:k.cx(f,l),children:[o&&y.jsx(ct,{}),i&&y.jsx(I,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:i}),r&&y.jsx(I,{children:r}),typeof e=="string"?y.jsx(K,{variant:_o[n].text,colorName:t,textOverflow:"ellipsis",overflow:"hidden",children:e}):e,s&&!a&&y.jsx(K,{className:h,colorName:t,onClick:m=>{m.stopPropagation(),s(m)},children:y.jsx(oc,{})})]})});Qs.displayName="Tag";const mv="_disabled_zbo6w_40",pv="_open_zbo6w_48",vv="_error_zbo6w_51",yv="_hidden_zbo6w_87",wv="_visible_zbo6w_90",xv="_selected_zbo6w_163",le={"select-container":"_select-container_zbo6w_8","full-width":"_full-width_zbo6w_13","select-input":"_select-input_zbo6w_17","size-xs":"_size-xs_zbo6w_25","size-sm":"_size-sm_zbo6w_30","size-md":"_size-md_zbo6w_35",disabled:mv,open:pv,"select-arrow":"_select-arrow_zbo6w_48",error:vv,"select-value":"_select-value_zbo6w_62","select-value_xs":"_select-value_xs_zbo6w_74","select-placeholder":"_select-placeholder_zbo6w_81",hidden:yv,visible:wv,"select-arrow_xs":"_select-arrow_xs_zbo6w_106","select-dropdown":"_select-dropdown_zbo6w_116","select-menu":"_select-menu_zbo6w_126","select-menu-item":"_select-menu-item_zbo6w_145","select-menu-item-first":"_select-menu-item-first_zbo6w_158",selected:xv,"overflow-tooltip-container":"_overflow-tooltip-container_zbo6w_167","overflow-tooltip-text":"_overflow-tooltip-text_zbo6w_172","empty-block":"_empty-block_zbo6w_179"};function sc({value:e,onChange:t,multiple:n=!1,returnedValue:o,renderItem:s,renderInputItem:i,renderSingleInputItem:r,renderMultipleInputItem:a,renderDropdownItem:l,placeholder:c,items:u=[],fullWidth:d,size:f="md",showDefaultItem:h,disabled:m,label:g,firstItem:p,lastItem:w,observer:x,emptyText:v,onBlur:S,prompt:_,error:P,errorText:V}){const[M,A]=Jt(e,n?[]:null),[F,$]=C.useState(!1),{refs:z,floatingStyles:O}=nc({open:F,placement:"bottom-start",strategy:"fixed",middleware:[Zl(4),Ql({crossAxis:!0,fallbackAxisSideDirection:"start"}),Jl({crossAxis:!0,padding:8}),Up({apply({rects:j,availableHeight:Z,elements:ie}){Object.assign(ie.floating.style,{width:`${j.reference.width}px`,maxHeight:typeof Z=="number"?`${Z}px`:"auto"})}})],whileElementsMounted:Xl}),D=C.useMemo(()=>n?M||[]:M!=null?[M]:[],[M,n]),B=C.useCallback(j=>o?o(j):j,[o]),N=C.useMemo(()=>{const j=new Map;return u.forEach(Z=>{j.set(B(Z),Z)}),j},[u,B]),E=!u.length&&!P,R=C.useMemo(()=>D.map(j=>N.get(j)).filter(j=>!!j),[N,D]);C.useEffect(()=>{process.env.NODE_ENV!=="production"&&s&&!l&&console.warn("[Select] `renderItem` deprecated, use `renderDropdownItem` instead.")},[l,s]);const T=C.useCallback((j,Z)=>l?l(j,Z):s?s(j):String(j),[l,s]),L=()=>{$(!1),S?.()},Y=j=>{const Z=B(j);if(n){const ie=D.includes(Z)?D.filter(he=>he!==Z):[...D,Z];A(ie),t?.(ie)}else A(Z),t?.(Z),L()},U=j=>{if(!n)return;const Z=D.filter(ie=>ie!==j);A(Z),t?.(Z)},q=()=>{const j=n?[]:null;A(j),t?.(j),n||L()},me=()=>typeof c=="string"?y.jsx(K,{variant:f==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:c??"Select..."}):c,J=()=>{if(!D.length)return me();if(n)return a?a(R):i?i({mode:"multiple",selectedItems:R}):y.jsx(I,{flexWrap:"wrap",row:!0,gap:10,children:D.map(ie=>{const he=N.get(ie);return he?y.jsx(Qs,{size:"sm",label:s?s(he):String(ie),onDelete:ce=>{ce.stopPropagation(),U(ie)}},ie):null})});const j=N.get(D[0])??null;if(!j)return me();if(r)return r(j);if(i)return i({mode:"single",selectedItem:j});const Z=s?s(j):String(D[0]);return typeof Z=="string"?y.jsx(K,{variant:f==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:Z}):y.jsx(y.Fragment,{children:Z})},se=F&&y.jsx(qn,{children:y.jsx(I,{row:!0,top:0,right:0,bottom:0,left:0,position:"fixed",center:!0,flex:1,onClick:L,display:"block",backgroundColor:"transparent",zIndex:1,children:y.jsx(Bn.div,{ref:z.setFloating,className:le["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...O,zIndex:1},onMouseDown:j=>j.stopPropagation(),onClick:j=>j.stopPropagation(),children:y.jsxs("ul",{className:le["select-menu"],children:[h&&!n&&y.jsx(I,{className:le["select-menu-item"],role:"option",onClick:q,children:y.jsx(K,{variant:"body-2",colorName:"tertiary",children:c})}),p&&y.jsx(I,{className:k.cx(le["select-menu-item"],le["select-menu-item-first"]),children:p}),E&&y.jsxs(I,{className:le["empty-block"],children:[y.jsx(I,{w:20,h:20,children:y.jsx(gv,{})}),y.jsx(K,{variant:"body-2",children:v??"There is nothing yet"})]}),u.map((j,Z)=>{const ie=B(j),he=D.includes(ie),ce=T(j,{item:j,selected:he,index:Z}),Ge=typeof ce=="string";return y.jsxs(I,{row:!0,gap:10,alignItems:"center",className:k.cx(le["select-menu-item"],{[le.selected]:he}),role:"option",relative:!0,onClick:()=>Y(j),children:[n&&y.jsx(Ks,{size:"sm",checked:he}),Ge?y.jsx(K,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:ce}):ce,y.jsx(ct,{})]},ie)}),x,w&&y.jsx(I,{className:k.cx(le["select-menu-item"],le["select-menu-item-first"]),children:w})]})},"dropdown")})});return y.jsxs(I,{relative:!0,display:"inline-block",minWidth:120,w:d?"full":"auto",onMouseDown:j=>j.stopPropagation(),onClick:j=>j.stopPropagation(),children:[typeof g=="string"?y.jsx(K,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:f==="sm"?4:8,children:g}):g,y.jsxs(I,{ref:z.setReference,row:!0,gap:10,tabIndex:m?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:k.cx(le["select-input"],le[`size-${f}`],{[le.error]:P,[le.disabled]:m,[le.open]:F}),onClick:()=>!m&&$(j=>!j),children:[y.jsx(I,{className:k.cx(le["select-value"]),children:J()}),y.jsx(I,{className:k.cx(le["select-arrow"],le[`select-arrow_${f}`]),children:y.jsx(hv,{})})]}),typeof _=="string"?y.jsx(K,{variant:"caption-1",colorName:"tertiary",mt:4,children:_}):_,P&&V&&y.jsx(K,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:V}),y.jsx(cf,{children:se})]})}const Cv=e=>b.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.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"})),Sv=e=>b.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.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"})),bv="_container_e7tan_8",_v="_disabled_e7tan_17",Rv="_reverse_e7tan_21",Ev="_input_e7tan_25",Mv="_switchContainer_e7tan_35",Pv="_variant_accent_e7tan_43",Tv="_variant_secondary_e7tan_47",Vv="_thumb_e7tan_51",Av="_variant_theme_e7tan_54",Dv="_moon_e7tan_58",kv="_fire_e7tan_61",Fv="_size_sm_e7tan_74",Lv="_size_md_e7tan_80",Iv="_size_lg_e7tan_86",Te={container:bv,disabled:_v,reverse:Rv,input:Ev,switchContainer:Mv,variant_accent:Pv,variant_secondary:Tv,switch:"_switch_e7tan_35",thumb:Vv,variant_theme:Av,moon:Dv,fire:kv,size_sm:Fv,size_md:Lv,size_lg:Iv},ic=C.forwardRef(({title:e,text:t,icon:n,disabled:o,onChange:s,checked:i,defaultValue:r,className:a,size:l="md",variant:c="accent",reverse:u=!1,w:d="auto",...f},h)=>{const[m,g]=Jt(i,r),p=C.useRef(null);C.useImperativeHandle(h,()=>({focus:()=>{p.current?.focus()},blur:()=>{p.current?.blur()},get checked(){return m??!1},setChecked:S=>{g(S),s?.(S)},toggle:()=>{const S=!m;g(S),s?.(S)},isFocused:()=>document.activeElement===p.current,isDisabled:()=>o??!1,getInputElement:()=>p.current,checkValidity:()=>p.current?.checkValidity()??!0,reset:()=>{const S=r??!1;g(S),s?.(S)}}),[m,g,s,o,r]);const w=C.useCallback(S=>{g(S.target.checked),s?.(S.target.checked)},[s]),x=C.useMemo(()=>typeof e=="string"?y.jsx(K,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:e}):e,[e]),v=C.useMemo(()=>typeof t=="string"?y.jsx(K,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:t}):t,[t]);return y.jsxs(I,{row:!0,w:d,gap:"var(--spacing-sm)",children:[y.jsxs("label",{className:k.cx(Te.container,a,{[Te.disabled]:o,[Te.reverse]:u}),children:[y.jsxs(I,{className:k.cx(Te.switchContainer,Te[`size_${l}`],Te[`variant_${c}`]),children:[y.jsx("input",{ref:p,type:"checkbox",checked:m,className:Te.input,onChange:w,disabled:o,...f}),y.jsx("div",{className:Te.switch,children:y.jsx("div",{className:Te.thumb,children:c==="theme"&&y.jsxs(y.Fragment,{children:[y.jsx(Sv,{className:Te.moon}),y.jsx(Cv,{className:Te.fire})]})})})]}),y.jsxs(I,{gap:"var(--spacing-xs)",children:[x,v]})]}),n]})});ic.displayName="Switch";const jv=k.css({cursor:"pointer",userSelect:"none"}),$v=k.css({cursor:"not-allowed",opacity:.5}),Ov=k.css({transition:"color 0.2s ease"}),Nv=C.forwardRef(({label:e,selected:t,disabled:n,fullWidth:o,onClick:s},i)=>y.jsx(I,{w:o?"full":void 0,justifyContent:"center",alignItems:"center",ref:i,py:"var(--spacing-md)",px:"var(--spacing-xl)",onClick:s,className:k.cx(jv,{[$v]:n}),children:y.jsx(K,{className:Ov,colorName:t?"primary":"tertiary",fontWeight:"medium",variant:"body-2",children:e})})),Bv=k.css({borderBottom:"1px solid var(--border-neutral-alpha-basic)"}),rc=({value:e,onChange:t,options:n,fullWidth:o=!1,className:s})=>{const[i,r]=C.useState({left:0,width:0}),a=C.useRef([]),l=u=>d=>{a.current[u]=d};C.useEffect(()=>{const u=n.findIndex(f=>f.value===e),d=a.current[u];d&&r({left:d.offsetLeft,width:d.offsetWidth})},[e,n]);const c=(u,d=!1)=>()=>!d&&t(u);return y.jsxs(I,{row:!0,w:o?"full":"auto",relative:!0,className:k.cx(Bv,s),children:[n.map((u,d)=>y.jsx(Nv,{selected:e===u.value,onClick:c(u.value,u.disabled),ref:l(d),label:u.label,disabled:u.disabled,fullWidth:o},u.value)),y.jsx(I,{h:2,w:i.width,absolute:!0,bottom:-1,left:i.left,backgroundColor:"var(--border-accent-primary)",className:k.css({transition:"left 0.2s ease, width 0.2s ease"})})]})};rc.displayName="Tabs";const zv="_header_446to_8",Hv={header:zv},ac=C.forwardRef(({title:e,subtitle:t,w:n="full",p:o,py:s,px:i="var(--spacing-2xl)",pt:r="var(--spacing-2xl)",pb:a="var(--spacing-lg)",row:l=!0,justifyContent:c="space-between",showCloseButton:u=!0},d)=>{const{onClose:f}=Zc();return y.jsxs(I,{w:n,p:o,py:s,px:i,pt:r,pb:a,row:l,justifyContent:c,ref:d,className:Hv.header,children:[y.jsxs(I,{gap:"var(--spacing-sm)",children:[y.jsx(K,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:e}),y.jsx(K,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:t})]}),u&&y.jsx(I,{children:y.jsx(Wt,{onClick:f,color:"neutral",children:y.jsx(Qr,{})})})]})});ac.displayName="ModalHeader";function dt(e,t,n){let o=n.initialDeps??[],s;function i(){var r,a,l,c;let u;n.key&&((r=n.debug)!=null&&r.call(n))&&(u=Date.now());const d=e();if(!(d.length!==o.length||d.some((m,g)=>o[g]!==m)))return s;o=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 m=Math.round((Date.now()-u)*100)/100,g=Math.round((Date.now()-h)*100)/100,p=g/16,w=(x,v)=>{for(x=String(x);x.length<v;)x=" "+x;return x};console.info(`%c⏱ ${w(g,5)} /${w(m,5)} ms`,`
9
+ `),()=>{y.contains(g)&&y.removeChild(g)}},[t]),p.jsx(Ff,{isPresent:t,childRef:i,sizeRef:r,children:_.cloneElement(e,{ref:l})})}const If=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:s,presenceAffectsLayout:i,mode:r,anchorX:a,root:l})=>{const c=_s(jf),u=C.useId();let f=!0,d=C.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:n,custom:s,onExitComplete:h=>{c.set(h,!0);for(const m of c.values())if(!m)return;o&&o()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[n,c,o]);return i&&f&&(d={...d}),C.useMemo(()=>{c.forEach((h,m)=>c.set(m,!1))},[n]),_.useEffect(()=>{!n&&!c.size&&o&&o()},[n]),r==="popLayout"&&(e=p.jsx(Lf,{isPresent:n,anchorX:a,root:l,children:e})),p.jsx(Gn.Provider,{value:d,children:e})};function jf(){return new Map}function xl(e=!0){const t=C.useContext(Gn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:s}=t,i=C.useId();C.useEffect(()=>{if(e)return s(i)},[e]);const r=C.useCallback(()=>e&&o&&o(i),[i,o,e]);return!n&&o?[!1,r]:[!0]}const mn=e=>e.key||"";function Ki(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const $f=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:s=!0,mode:i="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[c,u]=xl(r),f=C.useMemo(()=>Ki(e),[e]),d=r&&!c?[]:f.map(mn),h=C.useRef(!0),m=C.useRef(f),g=_s(()=>new Map),[y,x]=C.useState(f),[w,v]=C.useState(f);Pa(()=>{h.current=!1,m.current=f;for(let M=0;M<w.length;M++){const T=mn(w[M]);d.includes(T)?g.delete(T):g.get(T)!==!0&&g.set(T,!1)}},[w,d.length,d.join("-")]);const b=[];if(f!==y){let M=[...f];for(let T=0;T<w.length;T++){const P=w[T],D=mn(P);d.includes(D)||(M.splice(T,0,P),b.push(P))}return i==="wait"&&b.length&&(M=b),v(Ki(M)),x(f),null}process.env.NODE_ENV!=="production"&&i==="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:S}=C.useContext(bs);return p.jsx(p.Fragment,{children:w.map(M=>{const T=mn(M),P=r&&!c?!1:f===w||d.includes(T),D=()=>{if(g.has(T))g.set(T,!0);else return;let F=!0;g.forEach($=>{$||(F=!1)}),F&&(S?.(),v(m.current),r&&u?.(),o&&o())};return p.jsx(If,{isPresent:P,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:l,onExitComplete:P?void 0:D,anchorX:a,children:M},T)})})},wl=C.createContext({strict:!1}),qi={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"]},At={};for(const e in qi)At[e]={isEnabled:t=>qi[e].some(n=>!!t[n])};function Of(e){for(const t in e)At[t]={...At[t],...e[t]}}const Nf=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 jn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Nf.has(e)}let Cl=e=>!jn(e);function Bf(e){typeof e=="function"&&(Cl=t=>t.startsWith("on")?!jn(t):e(t))}try{Bf(require("@emotion/is-prop-valid").default)}catch{}function zf(e,t,n){const o={};for(const s in e)s==="values"&&typeof e.values=="object"||(Cl(s)||n===!0&&jn(s)||!t&&!jn(s)||e.draggable&&s.startsWith("onDrag"))&&(o[s]=e[s]);return o}const Un=C.createContext({});function Kn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function en(e){return typeof e=="string"||Array.isArray(e)}const Ks=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qs=["initial",...Ks];function qn(e){return Kn(e.animate)||qs.some(t=>en(e[t]))}function Sl(e){return!!(qn(e)||e.variants)}function Hf(e,t){if(qn(e)){const{initial:n,animate:o}=e;return{initial:n===!1||en(n)?n:void 0,animate:en(o)?o:void 0}}return e.inherit!==!1?t:{}}function Wf(e){const{initial:t,animate:n}=Hf(e,C.useContext(Un));return C.useMemo(()=>({initial:t,animate:n}),[Xi(t),Xi(n)])}function Xi(e){return Array.isArray(e)?e.join(" "):e}function Yi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Nt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(G.test(e))e=parseFloat(e);else return e;const n=Yi(e,t.target.x),o=Yi(e,t.target.y);return`${n}% ${o}%`}},Gf={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,s=tt.parse(e);if(s.length>5)return o;const i=tt.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 c=ie(a,l,.5);return typeof s[2+r]=="number"&&(s[2+r]/=c),typeof s[3+r]=="number"&&(s[3+r]/=c),i(s)}},ts={borderRadius:{...Nt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Nt,borderTopRightRadius:Nt,borderBottomLeftRadius:Nt,borderBottomRightRadius:Nt,boxShadow:Gf};function bl(e,{layout:t,layoutId:n}){return Lt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ts[e]||e==="opacity")}const Uf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Kf=Ft.length;function qf(e,t,n){let o="",s=!0;for(let i=0;i<Kf;i++){const r=Ft[i],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 c=hl(a,Hs[r]);if(!l){s=!1;const u=Uf[r]||r;o+=`${u}(${c}) `}n&&(t[r]=c)}}return o=o.trim(),n?o=n(t,s?"":o):s&&(o="none"),o}function Xs(e,t,n){const{style:o,vars:s,transformOrigin:i}=e;let r=!1,a=!1;for(const l in t){const c=t[l];if(Lt.has(l)){r=!0;continue}else if(Wa(l)){s[l]=c;continue}else{const u=hl(c,Hs[l]);l.startsWith("origin")?(a=!0,i[l]=u):o[l]=u}}if(t.transform||(r||n?o.transform=qf(t,e.transform,n):o.transform&&(o.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;o.transformOrigin=`${l} ${c} ${u}`}}const Ys=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _l(e,t,n){for(const o in t)!ge(t[o])&&!bl(o,n)&&(e[o]=t[o])}function Xf({transformTemplate:e},t){return C.useMemo(()=>{const n=Ys();return Xs(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Yf(e,t){const n=e.style||{},o={};return _l(o,n,e),Object.assign(o,Xf(e,t)),o}function Zf(e,t){const n={},o=Yf(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.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=o,n}const Jf={offset:"stroke-dashoffset",array:"stroke-dasharray"},Qf={offset:"strokeDashoffset",array:"strokeDasharray"};function eh(e,t,n=1,o=0,s=!0){e.pathLength=1;const i=s?Jf:Qf;e[i.offset]=G.transform(-o);const r=G.transform(t),a=G.transform(n);e[i.array]=`${r} ${a}`}function Rl(e,{attrX:t,attrY:n,attrScale:o,pathLength:s,pathSpacing:i=1,pathOffset:r=0,...a},l,c,u){if(Xs(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),o!==void 0&&(f.scale=o),s!==void 0&&eh(f,s,i,r,!1)}const El=()=>({...Ys(),attrs:{}}),Pl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function th(e,t,n,o){const s=C.useMemo(()=>{const i=El();return Rl(i,t,Pl(o),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};_l(i,e.style,e),s.style={...i,...s.style}}return s}const nh=["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 Zs(e){return typeof e!="string"||e.includes("-")?!1:!!(nh.indexOf(e)>-1||/[A-Z]/u.test(e))}function oh(e,t,n,{latestValues:o},s,i=!1){const a=(Zs(e)?th:Zf)(t,o,s,e),l=zf(t,typeof e=="string",i),c=e!==C.Fragment?{...l,...a,ref:n}:{},{children:u}=t,f=C.useMemo(()=>ge(u)?u.get():u,[u]);return C.createElement(e,{...c,children:f})}function Zi(e){const t=[{},{}];return e?.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Js(e,t,n,o){if(typeof t=="function"){const[s,i]=Zi(o);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=Zi(o);t=t(n!==void 0?n:e.custom,s,i)}return t}function Mn(e){return ge(e)?e.get():e}function sh({scrapeMotionValuesFromProps:e,createRenderState:t},n,o,s){return{latestValues:ih(n,o,s,e),renderState:t()}}function ih(e,t,n,o){const s={},i=o(e,{});for(const d in i)s[d]=Mn(i[d]);let{initial:r,animate:a}=e;const l=qn(e),c=Sl(e);t&&c&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const f=u?a:r;if(f&&typeof f!="boolean"&&!Kn(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const m=Js(e,d[h]);if(m){const{transitionEnd:g,transition:y,...x}=m;for(const w in x){let v=x[w];if(Array.isArray(v)){const b=u?v.length-1:0;v=v[b]}v!==null&&(s[w]=v)}for(const w in g)s[w]=g[w]}}}return s}const Ml=e=>(t,n)=>{const o=C.useContext(Un),s=C.useContext(Gn),i=()=>sh(e,t,o,s);return n?i():_s(i)};function Qs(e,t,n){const{style:o}=e,s={};for(const i in o)(ge(o[i])||t.style&&ge(t.style[i])||bl(i,e)||n?.getValue(i)?.liveStyle!==void 0)&&(s[i]=o[i]);return s}const rh=Ml({scrapeMotionValuesFromProps:Qs,createRenderState:Ys});function Tl(e,t,n){const o=Qs(e,t,n);for(const s in e)if(ge(e[s])||ge(t[s])){const i=Ft.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;o[i]=e[s]}return o}const ah=Ml({scrapeMotionValuesFromProps:Tl,createRenderState:El}),lh=Symbol.for("motionComponentSymbol");function bt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function ch(e,t,n){return C.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):bt(n)&&(n.current=o))},[t])}const ei=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),uh="framerAppearId",Al="data-"+ei(uh),Vl=C.createContext({});function dh(e,t,n,o,s){const{visualElement:i}=C.useContext(Un),r=C.useContext(wl),a=C.useContext(Gn),l=C.useContext(Us).reducedMotion,c=C.useRef(null);o=o||r.renderer,!c.current&&o&&(c.current=o(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,f=C.useContext(Vl);u&&!u.projection&&s&&(u.type==="html"||u.type==="svg")&&fh(c.current,n,s,f);const d=C.useRef(!1);C.useInsertionEffect(()=>{u&&d.current&&u.update(n,a)});const h=n[Al],m=C.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return Pa(()=>{u&&(d.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),m.current&&u.animationState&&u.animationState.animateChanges())}),C.useEffect(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),m.current=!1),u.enteringChildren=void 0)}),u}function fh(e,t,n,o){const{layoutId:s,layout:i,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Dl(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!r||a&&bt(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:o,crossfade:u,layoutScroll:l,layoutRoot:c})}function Dl(e){if(e)return e.options.allowProjection!==!1?e.projection:Dl(e.parent)}function mo(e,{forwardMotionProps:t=!1}={},n,o){n&&Of(n);const s=Zs(e)?ah:rh;function i(a,l){let c;const u={...C.useContext(Us),...a,layoutId:hh(a)},{isStatic:f}=u,d=Wf(a),h=s(a,f);if(!f&&Rs){gh(u,n);const m=mh(u);c=m.MeasureLayout,d.visualElement=dh(e,h,u,o,m.ProjectionNode)}return p.jsxs(Un.Provider,{value:d,children:[c&&d.visualElement?p.jsx(c,{visualElement:d.visualElement,...u}):null,oh(e,a,ch(h,d.visualElement,l),h,f,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=C.forwardRef(i);return r[lh]=e,r}function hh({layoutId:e}){const t=C.useContext(bs).id;return t&&e!==void 0?t+"-"+e:e}function gh(e,t){const n=C.useContext(wl).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Dt(!1,o,"lazy-strict-mode"):Ke(!1,o,"lazy-strict-mode")}}function mh(e){const{drag:t,layout:n}=At;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function ph(e,t){if(typeof Proxy>"u")return mo;const n=new Map,o=(i,r)=>mo(i,r,e,t),s=(i,r)=>(process.env.NODE_ENV!=="production"&&As(!1,"motion() is deprecated. Use motion.create() instead."),o(i,r));return new Proxy(s,{get:(i,r)=>r==="create"?o:(n.has(r)||n.set(r,mo(r,void 0,e,t)),n.get(r))})}function kl({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function vh({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function yh(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}function po(e){return e===void 0||e===1}function ns({scale:e,scaleX:t,scaleY:n}){return!po(e)||!po(t)||!po(n)}function at(e){return ns(e)||Fl(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Fl(e){return Ji(e.x)||Ji(e.y)}function Ji(e){return e&&e!=="0%"}function $n(e,t,n){const o=e-n,s=t*o;return n+s}function Qi(e,t,n,o,s){return s!==void 0&&(e=$n(e,s,o)),$n(e,n,o)+t}function os(e,t=0,n=1,o,s){e.min=Qi(e.min,t,n,o,s),e.max=Qi(e.max,t,n,o,s)}function Ll(e,{x:t,y:n}){os(e.x,t.translate,t.scale,t.originPoint),os(e.y,n.translate,n.scale,n.originPoint)}const er=.999999999999,tr=1.0000000000001;function xh(e,t,n,o=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,r;for(let a=0;a<s;a++){i=n[a],r=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Rt(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,Ll(e,r)),o&&at(i.latestValues)&&Rt(e,i.latestValues))}t.x<tr&&t.x>er&&(t.x=1),t.y<tr&&t.y>er&&(t.y=1)}function _t(e,t){e.min=e.min+t,e.max=e.max+t}function nr(e,t,n,o,s=.5){const i=ie(e.min,e.max,s);os(e,t,n,i,o)}function Rt(e,t){nr(e.x,t.x,t.scaleX,t.scale,t.originX),nr(e.y,t.y,t.scaleY,t.scale,t.originY)}function Il(e,t){return kl(yh(e.getBoundingClientRect(),t))}function wh(e,t,n){const o=Il(e,n),{scroll:s}=t;return s&&(_t(o.x,s.offset.x),_t(o.y,s.offset.y)),o}const or=()=>({translate:0,scale:1,origin:0,originPoint:0}),Et=()=>({x:or(),y:or()}),sr=()=>({min:0,max:0}),ce=()=>({x:sr(),y:sr()}),ss={current:null},jl={current:!1};function Ch(){if(jl.current=!0,!!Rs)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ss.current=e.matches;e.addEventListener("change",t),t()}else ss.current=!1}const Sh=new WeakMap;function bh(e,t,n){for(const o in t){const s=t[o],i=n[o];if(ge(s))e.addValue(o,s);else if(ge(i))e.addValue(o,Tt(s,{owner:e}));else if(i!==s)if(e.hasValue(o)){const r=e.getValue(o);r.liveStyle===!0?r.jump(s):r.hasAnimated||r.set(s)}else{const r=e.getStaticValue(o);e.addValue(o,Tt(r!==void 0?r:s,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const ir=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class _h{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:s,blockInitialAnimation:i,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=Bs,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 d=xe.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,oe.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=qn(n),this.isVariantNode=Sl(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&ge(h)&&h.set(l[d])}}mount(t){this.current=t,Sh.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,o)=>this.bindToMotionValue(o,n)),jl.current||Ch(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ss.current,process.env.NODE_ENV!=="production"&&As(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(),et(this.notifyUpdate),et(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 o=Lt.has(t);o&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&oe.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),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 At){const n=At[t];if(!n)continue;const{isEnabled:o,Feature:s}=n;if(!this.features[t]&&s&&o(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ce()}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 o=0;o<ir.length;o++){const s=ir[o];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,r=t[i];r&&(this.propEventSubscriptions[s]=this.on(s,r))}this.prevMotionValues=bh(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 o=this.values.get(t);n!==o&&(o&&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 o=this.values.get(t);return o===void 0&&n!==void 0&&(o=Tt(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Ma(o)||Aa(o))?o=parseFloat(o):!Vf(o)&&tt.test(n)&&(o=fl(t,n)),this.setBaseTarget(t,ge(o)?o.get():o)),ge(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let o;if(typeof n=="string"||typeof n=="object"){const i=Js(this.props,n,this.presenceContext?.custom);i&&(o=i[t])}if(n&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ge(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ts),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ws.render(this.render)}}class $l extends _h{constructor(){super(...arguments),this.KeyframeResolver=xf}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:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ge(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ol(e,{style:t,vars:n},o,s){const i=e.style;let r;for(r in t)i[r]=t[r];s?.applyProjectionStyles(i,o);for(r in n)i.setProperty(r,n[r])}function Rh(e){return window.getComputedStyle(e)}class Eh extends $l{constructor(){super(...arguments),this.type="html",this.renderInstance=Ol}readValueFromInstance(t,n){if(Lt.has(n))return this.projection?.isProjecting?qo(n):Id(t,n);{const o=Rh(t),s=(Wa(n)?o.getPropertyValue(n):o[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Il(t,n)}build(t,n,o){Xs(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Qs(t,n,o)}}const Nl=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 Ph(e,t,n,o){Ol(e,t,void 0,o);for(const s in t.attrs)e.setAttribute(Nl.has(s)?s:ei(s),t.attrs[s])}class Mh extends $l{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ce}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Lt.has(n)){const o=dl(n);return o&&o.default||0}return n=Nl.has(n)?n:ei(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return Tl(t,n,o)}build(t,n,o){Rl(t,n,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,n,o,s){Ph(t,n,o,s)}mount(t){this.isSVGTag=Pl(t.tagName),super.mount(t)}}const Th=(e,t)=>Zs(e)?new Mh(t):new Eh(t,{allowProjection:e!==C.Fragment});function Pt(e,t,n){const o=e.getProps();return Js(o,t,n!==void 0?n:o.custom,e)}const is=e=>Array.isArray(e);function Ah(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Tt(n))}function Vh(e){return is(e)?e[e.length-1]||0:e}function Dh(e,t){const n=Pt(e,t);let{transitionEnd:o={},transition:s={},...i}=n||{};i={...i,...o};for(const r in i){const a=Vh(i[r]);Ah(e,r,a)}}function kh(e){return!!(ge(e)&&e.add)}function rs(e,t){const n=e.getValue("willChange");if(kh(n))return n.add(t);if(!n&&qe.WillChange){const o=new qe.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function Bl(e){return e.props[Al]}const Fh=e=>e!==null;function Lh(e,{repeat:t,repeatType:n="loop"},o){const s=e.filter(Fh),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[i]}const Ih={type:"spring",stiffness:500,damping:25,restSpeed:10},jh=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),$h={type:"keyframes",duration:.8},Oh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Nh=(e,{keyframes:t})=>t.length>2?$h:Lt.has(e)?e.startsWith("scale")?jh(t[1]):Ih:Oh;function Bh({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:s,repeat:i,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const ti=(e,t,n,o={},s,i)=>r=>{const a=zs(o,e)||{},l=a.delay||o.delay||0;let{elapsed:c=0}=o;c=c-Le(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};Bh(a)||Object.assign(u,Nh(e,u)),u.duration&&(u.duration=Le(u.duration)),u.repeatDelay&&(u.repeatDelay=Le(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Qo(u),u.delay===0&&(f=!0)),(qe.instantAnimations||qe.skipAnimations)&&(f=!0,Qo(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!i&&t.get()!==void 0){const d=Lh(u.keyframes,a);if(d!==void 0){oe.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new Ns(u):new rf(u)};function zh({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function zl(e,t,{delay:n=0,transitionOverride:o,type:s}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:r,...a}=t;o&&(i=o);const l=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const u in a){const f=e.getValue(u,e.latestValues[u]??null),d=a[u];if(d===void 0||c&&zh(c,u))continue;const h={delay:n,...zs(i||{},u)},m=f.get();if(m!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===m&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const x=Bl(e);if(x){const w=window.MotionHandoffAnimation(x,u,oe);w!==null&&(h.startTime=w,g=!0)}}rs(e,u),f.start(ti(u,f,d,e.shouldReduceMotion&&ll.has(u)?{type:!1}:h,e,g));const y=f.animation;y&&l.push(y)}return r&&Promise.all(l).then(()=>{oe.update(()=>{r&&Dh(e,r)})}),l}function Hl(e,t,n,o=0,s=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),r=e.size,a=(r-1)*o;return typeof n=="function"?n(i,r):s===1?i*o:a-i*o}function as(e,t,n={}){const o=Pt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(zl(e,o,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:f}=s;return Hh(e,t,l,c,u,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,c]=a==="beforeChildren"?[i,r]:[r,i];return l().then(()=>c())}else return Promise.all([i(),r(n.delay)])}function Hh(e,t,n=0,o=0,s=0,i=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(as(l,t,{...r,delay:n+(typeof o=="function"?0:o)+Hl(e.variantChildren,l,o,s,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Wh(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const s=t.map(i=>as(e,i,n));o=Promise.all(s)}else if(typeof t=="string")o=as(e,t,n);else{const s=typeof t=="function"?Pt(e,t,n.custom):t;o=Promise.all(zl(e,s,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function Wl(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const Gh=qs.length;function Gl(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Gl(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Gh;n++){const o=qs[n],s=e.props[o];(en(s)||s===!1)&&(t[o]=s)}return t}const Uh=[...Ks].reverse(),Kh=Ks.length;function qh(e){return t=>Promise.all(t.map(({animation:n,options:o})=>Wh(e,n,o)))}function Xh(e){let t=qh(e),n=rr(),o=!0;const s=l=>(c,u)=>{const f=Pt(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:h,...m}=f;c={...c,...m,...h}}return c};function i(l){t=l(e)}function r(l){const{props:c}=e,u=Gl(e.parent)||{},f=[],d=new Set;let h={},m=1/0;for(let y=0;y<Kh;y++){const x=Uh[y],w=n[x],v=c[x]!==void 0?c[x]:u[x],b=en(v),S=x===l?w.isActive:null;S===!1&&(m=y);let M=v===u[x]&&v!==c[x]&&b;if(M&&o&&e.manuallyAnimateOnMount&&(M=!1),w.protectedKeys={...h},!w.isActive&&S===null||!v&&!w.prevProp||Kn(v)||typeof v=="boolean")continue;const T=Yh(w.prevProp,v);let P=T||x===l&&w.isActive&&!M&&b||y>m&&b,D=!1;const F=Array.isArray(v)?v:[v];let $=F.reduce(s(x),{});S===!1&&($={});const{prevResolvedValues:O={}}=w,j={...O,...$},k=E=>{P=!0,d.has(E)&&(D=!0,d.delete(E)),w.needsAnimating[E]=!0;const R=e.getValue(E);R&&(R.liveStyle=!1)};for(const E in j){const R=$[E],A=O[E];if(h.hasOwnProperty(E))continue;let I=!1;is(R)&&is(A)?I=!Wl(R,A):I=R!==A,I?R!=null?k(E):d.add(E):R!==void 0&&d.has(E)?k(E):w.protectedKeys[E]=!0}w.prevProp=v,w.prevResolvedValues=$,w.isActive&&(h={...h,...$}),o&&e.blockInitialAnimation&&(P=!1);const N=M&&T;P&&(!N||D)&&f.push(...F.map(E=>{const R={type:x};if(typeof E=="string"&&o&&!N&&e.manuallyAnimateOnMount&&e.parent){const{parent:A}=e,I=Pt(A,E);if(A.enteringChildren&&I){const{delayChildren:X}=I.transition||{};R.delay=Hl(A.enteringChildren,e,X)}}return{animation:E,options:R}}))}if(d.size){const y={};if(typeof c.initial!="boolean"){const x=Pt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(y.transition=x.transition)}d.forEach(x=>{const w=e.getBaseTarget(x),v=e.getValue(x);v&&(v.liveStyle=!0),y[x]=w??null}),f.push({animation:y})}let g=!!f.length;return o&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),o=!1,g?t(f):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(l,c)),n[l].isActive=c;const u=r(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=rr()}}}function Yh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Wl(t,e):!1}function rt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rr(){return{animate:rt(!0),whileInView:rt(),whileHover:rt(),whileTap:rt(),whileDrag:rt(),whileFocus:rt(),exit:rt()}}class it{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Zh extends it{constructor(t){super(t),t.animationState||(t.animationState=Xh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Kn(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 Jh=0;class Qh extends it{constructor(){super(...arguments),this.id=Jh++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)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 eg={animation:{Feature:Zh},exit:{Feature:Qh}};function tn(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function ln(e){return{point:{x:e.pageX,y:e.pageY}}}const tg=e=>t=>Gs(t)&&e(t,ln(t));function Ut(e,t,n,o){return tn(e,t,tg(n),o)}const Ul=1e-4,ng=1-Ul,og=1+Ul,Kl=.01,sg=0-Kl,ig=0+Kl;function pe(e){return e.max-e.min}function rg(e,t,n){return Math.abs(e-t)<=n}function ar(e,t,n,o=.5){e.origin=o,e.originPoint=ie(t.min,t.max,e.origin),e.scale=pe(n)/pe(t),e.translate=ie(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ng&&e.scale<=og||isNaN(e.scale))&&(e.scale=1),(e.translate>=sg&&e.translate<=ig||isNaN(e.translate))&&(e.translate=0)}function Kt(e,t,n,o){ar(e.x,t.x,n.x,o?o.originX:void 0),ar(e.y,t.y,n.y,o?o.originY:void 0)}function lr(e,t,n){e.min=n.min+t.min,e.max=e.min+pe(t)}function ag(e,t,n){lr(e.x,t.x,n.x),lr(e.y,t.y,n.y)}function cr(e,t,n){e.min=t.min-n.min,e.max=e.min+pe(t)}function On(e,t,n){cr(e.x,t.x,n.x),cr(e.y,t.y,n.y)}function Ee(e){return[e("x"),e("y")]}const ql=({current:e})=>e?e.ownerDocument.defaultView:null,ur=(e,t)=>Math.abs(e-t);function lg(e,t){const n=ur(e.x,t.x),o=ur(e.y,t.y);return Math.sqrt(n**2+o**2)}class Xl{constructor(t,n,{transformPagePoint:o,contextWindow:s=window,dragSnapToOrigin:i=!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 d=yo(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=lg(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:g}=d,{timestamp:y}=fe;this.history.push({...g,timestamp:y});const{onStart:x,onMove:w}=this.handlers;h||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=vo(h,this.transformPagePoint),oe.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=yo(d.type==="pointercancel"?this.lastMoveEventInfo:vo(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,x),g&&g(d,x)},!Gs(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=o,this.distanceThreshold=r,this.contextWindow=s||window;const a=ln(t),l=vo(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=fe;this.history=[{...c,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,yo(l,this.history)),this.removeListeners=sn(Ut(this.contextWindow,"pointermove",this.handlePointerMove),Ut(this.contextWindow,"pointerup",this.handlePointerUp),Ut(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),et(this.updatePoint)}}function vo(e,t){return t?{point:t(e.point)}:e}function dr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function yo({point:e},t){return{point:e,delta:dr(e,Yl(t)),offset:dr(e,cg(t)),velocity:ug(t,.1)}}function cg(e){return e[0]}function Yl(e){return e[e.length-1]}function ug(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const s=Yl(e);for(;n>=0&&(o=e[n],!(s.timestamp-o.timestamp>Le(t)));)n--;if(!o)return{x:0,y:0};const i=Pe(s.timestamp-o.timestamp);if(i===0)return{x:0,y:0};const r={x:(s.x-o.x)/i,y:(s.y-o.y)/i};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function dg(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?ie(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?ie(n,e,o.max):Math.min(e,n)),e}function fr(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 fg(e,{top:t,left:n,bottom:o,right:s}){return{x:fr(e.x,n,s),y:fr(e.y,t,o)}}function hr(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function hg(e,t){return{x:hr(e.x,t.x),y:hr(e.y,t.y)}}function gg(e,t){let n=.5;const o=pe(e),s=pe(t);return s>o?n=Zt(t.min,t.max-o,e.min):o>s&&(n=Zt(e.min,e.max-s,t.min)),Ue(0,1,n)}function mg(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 ls=.35;function pg(e=ls){return e===!1?e=0:e===!0&&(e=ls),{x:gr(e,"left","right"),y:gr(e,"top","bottom")}}function gr(e,t,n){return{min:mr(e,t),max:mr(e,n)}}function mr(e,t){return typeof e=="number"?e:e[t]||0}const vg=new WeakMap;class yg{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=ce(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:o}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ln(f).point)},r=(f,d)=>{const{drag:h,dragPropagation:m,onDragStart:g}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bf(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ee(x=>{let w=this.getAxisMotionValue(x).get()||0;if(Oe.test(w)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[x];b&&(w=pe(b)*(parseFloat(w)/100))}}this.originPoint[x]=w}),g&&oe.postRender(()=>g(f,d)),rs(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:g,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:x}=d;if(m&&this.currentDirection===null){this.currentDirection=xg(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),y&&y(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>Ee(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Xl(t,{onSessionStart:i,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:o,contextWindow:ql(this.visualElement)})}stop(t,n){const o=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!o)return;const{velocity:r}=s;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&oe.postRender(()=>a(o,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:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:s}=this.getProps();if(!o||!pn(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let r=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(r=dg(r,this.constraints[t],this.elastic[t])),i.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&bt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=fg(o.layoutBox,t):this.constraints=!1,this.elastic=pg(n),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Ee(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=mg(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!bt(t))return!1;const o=t.current;Ke(o!==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 i=wh(o,s.root,this.visualElement.getTransformPagePoint());let r=hg(s.layout.layoutBox,i);if(n){const a=n(vh(r));this.hasMutatedConstraints=!!a,a&&(r=kl(a))}return r}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:s,dragTransition:i,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Ee(u=>{if(!pn(u,n,this.currentDirection))return;let f=l&&l[u]||{};r&&(f={min:0,max:0});const d=s?200:1e6,h=s?40:1e7,m={type:"inertia",velocity:o?t[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return rs(this.visualElement,t),o.start(ti(t,o,0,n,this.visualElement,!1))}stopAnimation(){Ee(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ee(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),s=o[n];return s||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){Ee(n=>{const{drag:o}=this.getProps();if(!pn(n,o,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:r,max:a}=s.layout.layoutBox[n];i.set(t[n]-ie(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!bt(n)||!o||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Ee(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();s[r]=gg({min:l,max:l},this.constraints[r])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Ee(r=>{if(!pn(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(ie(l,c,s[r]))})}addListeners(){if(!this.visualElement.current)return;vg.set(this.visualElement,this);const t=this.visualElement.current,n=Ut(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();bt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),oe.read(o);const r=tn(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ee(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())}));return()=>{r(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:r=ls,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:s,dragConstraints:i,dragElastic:r,dragMomentum:a}}}function pn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function xg(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class wg extends it{constructor(t){super(t),this.removeGroupControls=Me,this.removeListeners=Me,this.controls=new yg(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Me}unmount(){this.removeGroupControls(),this.removeListeners()}}const pr=e=>(t,n)=>{e&&oe.postRender(()=>e(t,n))};class Cg extends it{constructor(){super(...arguments),this.removePointerDownListener=Me}onPointerDown(t){this.session=new Xl(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ql(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:s}=this.node.getProps();return{onSessionStart:pr(t),onStart:pr(n),onMove:o,onEnd:(i,r)=>{delete this.session,s&&oe.postRender(()=>s(i,r))}}}mount(){this.removePointerDownListener=Ut(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 Tn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let xo=!1;class Sg extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),o&&o.register&&s&&o.register(i),xo&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Tn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:s,isPresent:i}=this.props,{projection:r}=o;return r&&(r.isPresent=i,xo=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?r.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?r.promote():r.relegate()||oe.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ws.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:s}=t;xo=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),o&&o.deregister&&o.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Zl(e){const[t,n]=xl(),o=C.useContext(bs);return p.jsx(Sg,{...e,layoutGroup:o,switchLayoutGroup:C.useContext(Vl),isPresent:t,safeToRemove:n})}function bg(e,t,n){const o=ge(e)?e:Tt(e);return o.start(ti("",o,t,n)),o.animation}const _g=(e,t)=>e.depth-t.depth;class Rg{constructor(){this.children=[],this.isDirty=!1}add(t){Es(this.children,t),this.isDirty=!0}remove(t){Ps(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_g),this.isDirty=!1,this.children.forEach(t)}}function Eg(e,t){const n=xe.now(),o=({timestamp:s})=>{const i=s-n;i>=t&&(et(o),e(i-t))};return oe.setup(o,!0),()=>et(o)}const Jl=["TopLeft","TopRight","BottomLeft","BottomRight"],Pg=Jl.length,vr=e=>typeof e=="string"?parseFloat(e):e,yr=e=>typeof e=="number"||G.test(e);function Mg(e,t,n,o,s,i){s?(e.opacity=ie(0,n.opacity??1,Tg(o)),e.opacityExit=ie(t.opacity??1,0,Ag(o))):i&&(e.opacity=ie(t.opacity??1,n.opacity??1,o));for(let r=0;r<Pg;r++){const a=`border${Jl[r]}Radius`;let l=xr(t,a),c=xr(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||yr(l)===yr(c)?(e[a]=Math.max(ie(vr(l),vr(c),o),0),(Oe.test(c)||Oe.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ie(t.rotate||0,n.rotate||0,o))}function xr(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Tg=Ql(0,.5,$a),Ag=Ql(.5,.95,Me);function Ql(e,t,n){return o=>o<e?0:o>t?1:n(Zt(e,t,o))}function wr(e,t){e.min=t.min,e.max=t.max}function De(e,t){wr(e.x,t.x),wr(e.y,t.y)}function Cr(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Sr(e,t,n,o,s){return e-=t,e=$n(e,1/n,o),s!==void 0&&(e=$n(e,1/s,o)),e}function Vg(e,t=0,n=1,o=.5,s,i=e,r=e){if(Oe.test(t)&&(t=parseFloat(t),t=ie(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=ie(i.min,i.max,o);e===i&&(a-=t),e.min=Sr(e.min,t,n,a,s),e.max=Sr(e.max,t,n,a,s)}function br(e,t,[n,o,s],i,r){Vg(e,t[n],t[o],t[s],t.scale,i,r)}const Dg=["x","scaleX","originX"],kg=["y","scaleY","originY"];function _r(e,t,n,o){br(e.x,t,Dg,n?n.x:void 0,o?o.x:void 0),br(e.y,t,kg,n?n.y:void 0,o?o.y:void 0)}function Rr(e){return e.translate===0&&e.scale===1}function ec(e){return Rr(e.x)&&Rr(e.y)}function Er(e,t){return e.min===t.min&&e.max===t.max}function Fg(e,t){return Er(e.x,t.x)&&Er(e.y,t.y)}function Pr(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function tc(e,t){return Pr(e.x,t.x)&&Pr(e.y,t.y)}function Mr(e){return pe(e.x)/pe(e.y)}function Tr(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Lg{constructor(){this.members=[]}add(t){Es(this.members,t),t.scheduleRender()}remove(t){if(Ps(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 o;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){o=i;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ig(e,t,n){let o="";const s=e.x.translate/t.x,i=e.y.translate/t.y,r=n?.z||0;if((s||i||r)&&(o=`translate3d(${s}px, ${i}px, ${r}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:d,skewX:h,skewY:m}=n;c&&(o=`perspective(${c}px) ${o}`),u&&(o+=`rotate(${u}deg) `),f&&(o+=`rotateX(${f}deg) `),d&&(o+=`rotateY(${d}deg) `),h&&(o+=`skewX(${h}deg) `),m&&(o+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(o+=`scale(${a}, ${l})`),o||"none"}const wo=["","X","Y","Z"],jg=1e3;let $g=0;function Co(e,t,n,o){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),o&&(o[e]=0))}function nc(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Bl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",oe,!(s||i))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&nc(o)}function oc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:s}){return class{constructor(r={},a=t?.()){this.id=$g++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Bg),this.nodes.forEach(Gg),this.nodes.forEach(Ug),this.nodes.forEach(zg)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=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 Rg)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Ts),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=yl(r)&&!Tf(r),this.instance=r;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,f=0;const d=()=>this.root.updateBlockedByResize=!1;oe.read(()=>{f=window.innerWidth}),e(r,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,u&&u(),u=Eg(d,250),Tn.hasAnimatedSinceResize&&(Tn.hasAnimatedSinceResize=!1,this.nodes.forEach(Dr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||Zg,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=c.getProps(),x=!this.targetLayout||!tc(this.targetLayout,h),w=!f&&d;if(this.options.layoutRoot||this.resumeFrom||w||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...zs(m,"layout"),onPlay:g,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,w)}else f||Dr(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(),et(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(Kg),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&&nc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ar);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Vr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Wg),this.nodes.forEach(Og),this.nodes.forEach(Ng)):this.nodes.forEach(Vr),this.clearAllSnapshots();const a=xe.now();fe.delta=Ue(0,1e3/60,a-fe.timestamp),fe.timestamp=a,fe.isProcessing=!0,lo.update.process(fe),lo.preRender.process(fe),lo.render.process(fe),fe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ws.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Hg),this.sharedNodes.forEach(qg)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,oe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){oe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!pe(this.snapshot.measuredBox.x)&&!pe(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.layoutVersion++,this.layoutCorrected=ce(),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=o(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&&!ec(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||at(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Jg(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return ce();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Qg))){const{scroll:c}=this.root;c&&(_t(a.x,c.offset.x),_t(a.y,c.offset.y))}return a}removeElementScroll(r){const a=ce();if(De(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:f}=c;c!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&De(a,r),_t(a.x,u.offset.x),_t(a.y,u.offset.y))}return a}applyTransform(r,a=!1){const l=ce();De(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Rt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),at(u.latestValues)&&Rt(l,u.latestValues)}return at(this.latestValues)&&Rt(l,this.latestValues),l}removeTransform(r){const a=ce();De(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!at(c.latestValues))continue;ns(c.latestValues)&&c.updateSnapshot();const u=ce(),f=c.measurePageBox();De(u,f),_r(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return at(this.latestValues)&&_r(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!==fe.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:u,layoutId:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=fe.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ce(),this.targetWithTransforms=ce()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ag(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):De(this.target,this.layout.layoutBox),Ll(this.target,this.targetDelta)):De(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ns(this.parent.latestValues)||Fl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,l){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ce(),this.relativeTargetOrigin=ce(),On(this.relativeTargetOrigin,a,l),De(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}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===fe.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;De(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;xh(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=ce());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Cr(this.prevProjectionDelta.x,this.projectionDelta.x),Cr(this.prevProjectionDelta.y,this.projectionDelta.y)),Kt(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Tr(this.projectionDelta.x,this.prevProjectionDelta.x)||!Tr(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,c=l?l.latestValues:{},u={...this.latestValues},f=Et();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=ce(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=h!==m,y=this.getStack(),x=!y||y.members.length<=1,w=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(Yg));this.animationProgress=0;let v;this.mixTargetDelta=b=>{const S=b/1e3;kr(f.x,r.x,S),kr(f.y,r.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(On(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Xg(this.relativeTarget,this.relativeTargetOrigin,d,S),v&&Fg(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=ce()),De(v,this.relativeTarget)),g&&(this.animationValues=u,Mg(u,c,this.latestValues,S,w,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(et(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=oe.update(()=>{Tn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Tt(0)),this.currentAnimation=bg(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(jg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&sc(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ce();const f=pe(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+f;const d=pe(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+d}De(a,l),Rt(a,u),Kt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Lg),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.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 c=this.getStack();c&&c.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 c={};l.z&&Co("z",r,c,this.animationValues);for(let u=0;u<wo.length;u++)Co(`rotate${wo[u]}`,r,c,this.animationValues),Co(`skew${wo[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);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=Mn(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Mn(a?.pointerEvents)||""),this.hasProjected&&!at(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=Ig(this.projectionDeltaWithTransform,this.treeScale,u);l&&(f=l(u,f)),r.transform=f;const{x:d,y:h}=this.projectionDelta;r.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in ts){if(u[m]===void 0)continue;const{correct:g,applyTo:y,isCSSVariable:x}=ts[m],w=f==="none"?u[m]:g(u[m],c);if(y){const v=y.length;for(let b=0;b<v;b++)r[y[b]]=w}else x?this.options.visualElement.renderState.vars[m]=w:r[m]=w}this.options.layoutId&&(r.pointerEvents=c===this?Mn(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Ar),this.root.sharedNodes.clear()}}}function Og(e){e.updateLayout()}function Ng(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:o}=e.layout,{animationType:s}=e.options,i=t.source!==e.layout.source;s==="size"?Ee(u=>{const f=i?t.measuredBox[u]:t.layoutBox[u],d=pe(f);f.min=n[u].min,f.max=f.min+d}):sc(s,t.layoutBox,n)&&Ee(u=>{const f=i?t.measuredBox[u]:t.layoutBox[u],d=pe(n[u]);f.max=f.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+d)});const r=Et();Kt(r,n,t.layoutBox);const a=Et();i?Kt(a,e.applyTransform(o,!0),t.measuredBox):Kt(a,n,t.layoutBox);const l=!ec(r);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:d}=u;if(f&&d){const h=ce();On(h,t.layoutBox,f.layoutBox);const m=ce();On(m,n,d.layoutBox),tc(h,m)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Bg(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 zg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Hg(e){e.clearSnapshot()}function Ar(e){e.clearMeasurements()}function Vr(e){e.isLayoutDirty=!1}function Wg(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Dr(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Gg(e){e.resolveTargetDelta()}function Ug(e){e.calcProjection()}function Kg(e){e.resetSkewAndRotation()}function qg(e){e.removeLeadSnapshot()}function kr(e,t,n){e.translate=ie(t.translate,0,n),e.scale=ie(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Fr(e,t,n,o){e.min=ie(t.min,n.min,o),e.max=ie(t.max,n.max,o)}function Xg(e,t,n,o){Fr(e.x,t.x,n.x,o),Fr(e.y,t.y,n.y,o)}function Yg(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Zg={duration:.45,ease:[.4,0,.1,1]},Lr=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ir=Lr("applewebkit/")&&!Lr("chrome/")?Math.round:Me;function jr(e){e.min=Ir(e.min),e.max=Ir(e.max)}function Jg(e){jr(e.x),jr(e.y)}function sc(e,t,n){return e==="position"||e==="preserve-aspect"&&!rg(Mr(t),Mr(n),.2)}function Qg(e){return e!==e.root&&e.scroll?.wasRoot}const em=oc({attachResizeListener:(e,t)=>tn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),So={current:void 0},ic=oc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!So.current){const e=new em({});e.mount(window),e.setOptions({layoutScroll:!0}),So.current=e}return So.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),tm={pan:{Feature:Cg},drag:{Feature:wg,ProjectionNode:ic,MeasureLayout:Zl}};function $r(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=o[s];i&&oe.postRender(()=>i(t,ln(t)))}class nm extends it{mount(){const{current:t}=this.node;t&&(this.unmount=_f(t,(n,o)=>($r(this.node,o,"Start"),s=>$r(this.node,s,"End"))))}unmount(){}}class om extends it{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=sn(tn(this.node.current,"focus",()=>this.onFocus()),tn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Or(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=o[s];i&&oe.postRender(()=>i(t,ln(t)))}class sm extends it{mount(){const{current:t}=this.node;t&&(this.unmount=Mf(t,(n,o)=>(Or(this.node,o,"Start"),(s,{success:i})=>Or(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const cs=new WeakMap,bo=new WeakMap,im=e=>{const t=cs.get(e.target);t&&t(e)},rm=e=>{e.forEach(im)};function am({root:e,...t}){const n=e||document;bo.has(n)||bo.set(n,{});const o=bo.get(n),s=JSON.stringify(t);return o[s]||(o[s]=new IntersectionObserver(rm,{root:e,...t})),o[s]}function lm(e,t,n){const o=am(t);return cs.set(e,n),o.observe(e),()=>{cs.delete(e),o.unobserve(e)}}const cm={some:0,all:1};class um extends it{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:s="some",once:i}=t,r={root:n?n.current:void 0,rootMargin:o,threshold:typeof s=="number"?s:cm[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),d=c?u:f;d&&d(l)};return lm(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(dm(t,n))&&this.startObserver()}unmount(){}}function dm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const fm={inView:{Feature:um},tap:{Feature:sm},focus:{Feature:om},hover:{Feature:nm}},hm={layout:{ProjectionNode:ic,MeasureLayout:Zl}},gm={...eg,...fm,...tm,...hm},Xn=ph(gm,Th),mm="_primary_13825_8",pm="_secondary_13825_12",vm="_tertiary_13825_16",ym="_positive_13825_20",xm="_negative_13825_24",wm="_warning_13825_28",Cm="_accent_13825_32",Sm="_inverse_13825_36",bm="_text_13825_111",_m="_regular_13825_117",Rm="_medium_13825_121",Em="_semibold_13825_125",Pm="_bold_13825_129",vn={primary:mm,secondary:pm,tertiary:vm,positive:ym,negative:xm,warning:wm,accent:Cm,inverse:Sm,"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:bm,regular:_m,medium:Rm,semibold:Em,bold:Pm},Mm=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"),V.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})},K=C.forwardRef(({children:e,className:t,variant:n="body-1",fontWeight:o="medium",tag:s="p",colorName:i="primary",style:r,clickOpacity:a=.5,opacityDuration:l=200,onClick:c,disabled:u,mt:f,mb:d,ml:h,mr:m,flex:g,cursor:y,wordBreak:x,whiteSpace:w,textOverflow:v,decoration:b,color:S,center:M,left:T,right:P,uppercase:D,lowercase:F,capitalize:$,overflow:O,...j},k)=>{const[N,z]=C.useState(!1),E=!!c,R=()=>E&&z(!0),A=()=>E&&z(!1),I=Mm({mt:f,mb:d,ml:h,mr:m,flex:g,cursor:y,wordBreak:x,whiteSpace:w,textOverflow:v,decoration:b,color:S,center:M,left:T,right:P,uppercase:D,lowercase:F,capitalize:$,overflow:O}),X=s,U=E?V.css({opacity:N?a:1,transition:`opacity ${l}ms ease`}):"";return p.jsx(X,{ref:k,...j,className:V.cx(vn.text,vn[n],vn[i],vn[o],U,t,I),style:r,onClick:c,onMouseDown:R,onMouseUp:A,onMouseLeave:A,onTouchStart:R,onTouchEnd:A,role:E?"button":void 0,tabIndex:E?0:void 0,children:e})});K.displayName="Text";const rc=Xn(K),Tm=V.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}),Bt={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)"},Am={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},Vm={clear:V.css({backgroundColor:"transparent",border:"none"}),filled:V.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:V.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},Dm=(e,t,n,o)=>{if(o)return V.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 V.css({...s,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return V.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 V.css({...s,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return V.css(s)}},us=({disabled:e,loading:t,wrapperClassName:n,buttonClassName:o,buttonDisabledClassName:s,textClassName:i,children:r,variant:a="filled",backgroundColor:l,textColor:c,textFontWeight:u,borderColor:f,color:d="accent",opacity:h,borderRadius:m,width:g="full",size:y="md",iconLeft:x,iconRight:w,intensity:v="primary",flex:b,type:S="button",...M})=>{const T=C.useMemo(()=>{switch(g){case"full":return"100%";case"auto":return"auto";default:return g}},[g]),P=C.useMemo(()=>l||(a==="filled"?d==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${d}-${v})`:"transparent"),[a,l,d,v]),D=C.useMemo(()=>{if(v==="primary"){if(d==="neutral")return"var(--text-secondary)";if(a==="filled")return"var(--text-inverse)"}else if(d==="neutral")return"var(--text-secondary)";return`var(--text-${d})`},[v,d,a]),F=C.useMemo(()=>{if(v==="primary"){if(d==="neutral")return"secondary";if(a==="filled")return"inverse"}else if(d==="neutral")return"secondary";return d},[a,d,v]),$=C.useMemo(()=>f||(a==="outline"?`var(--border-${d}-${v})`:"transparent"),[a,f,d,v]),O=C.useMemo(()=>{switch(y){case"lg":return Bt.lg;case"md":case"sm":return Bt.md;case"xs":return Bt.sm;default:return Bt.md}},[y]),j=V.cx(Tm,Dm(a,d,v,e),Vm[a],e?s:void 0,V.css({borderRadius:m?Bt[m]:O,backgroundColor:P,borderColor:$,color:c,width:"100%",height:Am[y],opacity:h||(e?.7:1)}),o),k=C.useMemo(()=>{switch(y){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[y]);return p.jsx(L,{className:V.cx(n),w:T,flex:b,relative:!0,overflow:"hidden",children:p.jsxs(Xn.button,{...M,whileTap:!e&&!t?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},disabled:e||t,className:j,children:[t?p.jsx(Sa,{color:D}):p.jsxs(p.Fragment,{children:[x,p.jsx(rc,{style:{color:c},colorName:F,variant:k,className:i,textOverflow:"ellipsis",overflow:"hidden",children:r}),w]}),p.jsx(mt,{})]})})},km=e=>_.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",...e},_.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),Fm=e=>_.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},_.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),Lm="_checkbox_22ifd_8",Im="_disabled_22ifd_14",jm="_checkbox__ripple_22ifd_14",$m="_checkbox__input_22ifd_26",Om="_checkbox__box_22ifd_33",Nm="_secondary_22ifd_46",Bm="_checked_22ifd_52",zm="_error_22ifd_61",ze={checkbox:Lm,disabled:Im,checkbox__ripple:jm,checkbox__input:$m,checkbox__box:Om,secondary:Nm,checked:Bm,error:zm},Hm={sm:20,md:24},ni=C.forwardRef(({checked:e,onChange:t,disabled:n,error:o,indeterminate:s,size:i="md",title:r,titleColor:a,subtitle:l,subtitleColor:c="secondary",name:u,required:f,variant:d="primary",flex:h,readOnly:m},g)=>{const[y,x]=C.useState(!1),w=e!==void 0,v=w?e:y,b=D=>{w||x(D.target.checked),t?.(D)},S=Hm[i],M=v||s,T=!!m&&!n,P=n?"not-allowed":T?"auto":"pointer";return p.jsxs("label",{className:V.cx(ze.checkbox,V.css({flex:h,cursor:P}),{[ze.disabled]:n}),children:[p.jsxs(L,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${S}px`,"--checkbox-size-double":`${S*2}px`},children:[p.jsx("input",{ref:g,type:"checkbox",checked:v,onChange:T?void 0:b,onClick:D=>D.stopPropagation(),disabled:n,readOnly:T,name:u,required:f,className:V.cx(ze.checkbox__input,{[ze.disabled]:n},V.css({cursor:P}))}),p.jsx("div",{className:V.cx(ze.checkbox__box,ze[d],{[ze.disabled]:n,[ze.error]:o,[ze.checked]:M}),children:M&&(s?p.jsx(Fm,{width:S*.75,height:S*.75}):p.jsx(km,{width:S*.75,height:S*.75}))})]}),(r||l)&&p.jsxs(L,{gap:4,children:[r&&p.jsx(K,{colorName:a,variant:i==="sm"?"body-2":"body-1",children:r}),l&&p.jsx(K,{variant:"body-2",colorName:c,children:l})]})]})});ni.displayName="Checkbox";const Wm=e=>_.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{opacity:.5},_.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"}))),Gm="_disabled_19ujt_20",Um="_multiline_19ujt_24",Km="_input_19ujt_8",qm="_sm_19ujt_74",Xm="_md_19ujt_79",Ym="_error_19ujt_84",Zm="_white_19ujt_88",Jm="_gray_19ujt_92",ye={"input-container":"_input-container_19ujt_8",disabled:Gm,multiline:Um,input:Km,"input-text-size_sm":"_input-text-size_sm_19ujt_55","input-text-size_md":"_input-text-size_md_19ujt_59","input-text-align_left":"_input-text-align_left_19ujt_64","input-text-align_center":"_input-text-align_center_19ujt_67","input-text-align_right":"_input-text-align_right_19ujt_70",sm:qm,md:Xm,error:Ym,white:Zm,gray:Jm,"clear-button":"_clear-button_19ujt_96"};function Nr(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const ac=C.forwardRef((e,t)=>{const{label:n,prompt:o,error:s,errorText:i,size:r="md",prefix:a,suffix:l,background:c="white",showClearButton:u,disabled:f,value:d,defaultValue:h,inputClassName:m,textAlign:g="left",...y}=e,x=e.multiline===!0,w=C.useRef(null),v=C.useRef(null),[b,S]=pt(typeof d=="string"||typeof d=="number"?String(d):void 0,h==="string"||h==="number"?String(h):"");C.useImperativeHandle(t,()=>({focus:()=>{w.current?.focus(),v.current?.focus()},blur:()=>{w.current?.blur(),v.current?.blur()},get value(){return w.current?.value||v.current?.value},set value(D){S(D),w.current&&(w.current.value=D),v.current&&(v.current.value=D)}}));const M=D=>{if(S(D.target.value),x){const F=e.onChange;F?.(D)}else{const F=e.onChange;F?.(D)}};C.useEffect(()=>{x&&e.autoResize&&v.current&&(v.current.style.height="auto",v.current.style.height=`${v.current.scrollHeight}px`)},[b,x,e.autoResize]);const T=()=>{if(S(""),!x){const F=w.current;if(F){F.value="";const $=Nr(F),O=e.onChange;O?.($)}return}const D=v.current;if(D){D.value="";const F=Nr(D),$=e.onChange;$?.(F)}},P=()=>{if(x){const{rows:O,autoResize:j,onChange:k,multiline:N,...z}=y;return p.jsx("textarea",{ref:v,rows:e.rows??3,className:V.cx(ye.input,m,{[ye.disabled]:f,[ye[`input-text-align_${g}`]]:!!g}),disabled:f,maxLength:e.maxLength,...z,value:b,onChange:M})}const{onChange:D,multiline:F,...$}=y;return p.jsx("input",{...$,ref:w,className:V.cx(ye.input,ye[`input-text-size_${r}`],m,{[ye.disabled]:f,[ye[`input-text-align_${g}`]]:!!g}),disabled:f,type:e.type??"text",value:b,onChange:M})};return p.jsxs(L,{w:"full",gap:"var(--spacing-sm)",children:[n&&p.jsx(K,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}),p.jsxs(L,{row:!0,alignItems:x?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:V.cx(ye["input-container"],ye[c],ye[r],{[ye.error]:s,[ye.disabled]:f,[ye.multiline]:x}),children:[a&&p.jsx(L,{flex:"none",children:a}),p.jsx(L,{flex:"1",children:P()}),u&&b&&!f&&p.jsx(L,{flex:"none",children:p.jsx("span",{className:ye["clear-button"],onClick:T,children:p.jsx(Wm,{})})}),l&&p.jsx(L,{flex:"none",children:l})]}),(o||x)&&p.jsxs(L,{row:!0,gap:10,w:"full",children:[typeof o=="string"?p.jsx(K,{variant:"caption-1",colorName:"tertiary",children:o}):o,x&&e.maxLength&&p.jsx(K,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${b.length}/${e.maxLength}`})]}),i&&s&&p.jsx(K,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:i})]})});ac.displayName="Input";const Qm="_input_5xq63_8",ep="_disabled_5xq63_29",tp="_error_5xq63_37",np="_success_5xq63_41",op="_white_5xq63_50",sp="_gray_5xq63_54",ip="_glow_5xq63_58",yt={input:Qm,disabled:ep,error:tp,success:np,white:op,gray:sp,glow:ip};function rp(e){const t=C.useRef(void 0);return C.useEffect(()=>{t.current=e},[e]),t.current}const lc=C.forwardRef(({length:e=6,label:t,prompt:n,error:o,errorText:s,success:i,disabled:r,autoFocus:a,center:l,secure:c,loading:u,background:f="gray",numeric:d=!0,className:h,value:m,defaultValue:g,onChange:y,onComplete:x},w)=>{const v=typeof m=="string",b=v?m:g,S=typeof b=="string"?b.slice(0,e):"",[M,T]=pt(v?m:void 0,S),[P,D]=C.useState(()=>{const E=S.slice(0,e);return Array.from({length:e},(R,A)=>E[A]??"")}),F=C.useRef(void 0),$=rp(m),O=C.useRef([]);C.useEffect(()=>{if(!v)return;const E=m??"";if(E===$)return;if(E===F.current){F.current=void 0;return}const R=E.slice(0,e);D(Array.from({length:e},(A,I)=>R[I]??""))},[v,m,e,$]);const j=C.useCallback((E,R)=>{const A=E.slice(0,e);R?.fromInternal&&(F.current=A),T(A),y?.(A),A.length===e&&x?.(A)},[e,y,x,T]);C.useImperativeHandle(w,()=>({focus:()=>{O.current[0]?.focus()},blur:()=>{O.current.forEach(E=>E?.blur())},get value(){return M||""},setValue:E=>{const R=E.slice(0,e);D(Array.from({length:e},(A,I)=>R[I]??"")),j(R,{fromInternal:!0})},clear:()=>{D(Array.from({length:e},()=>"")),j("",{fromInternal:!0})}}),[e,j,M]);const k=C.useCallback((E,R)=>{if(r)return;let A=R;if(d&&(A=A.replace(/\D/g,"")),A.length>1){const q=P.slice(0,E).join("")+A+P.slice(E+1).join(""),Q=Array.from({length:e},(le,Ce)=>q[Ce]??"");D(Q),j(q,{fromInternal:!0});const Z=Math.min(E+A.length,e-1),ne=O.current[Z];ne?.focus(),ne?.select();return}const I=P[E],X=[...P];X[E]=A,D(X);const U=X.join("");if(j(U,{fromInternal:!0}),!I&&A&&E<e-1){const q=O.current[E+1];q?.focus(),q?.select()}},[P,r,e,d,j]),N=C.useCallback((E,R)=>{if(!r){if(R.key==="Backspace"){R.preventDefault();const A=O.current[E];if(P[E]){const I=[...P];I[E]="",D(I),j(I.join(""),{fromInternal:!0}),A?.focus();return}if(E>0){const I=O.current[E-1];I?.focus(),I?.select()}return}R.key==="ArrowLeft"&&E>0&&(R.preventDefault(),O.current[E-1]?.focus()),R.key==="ArrowRight"&&E<e-1&&(R.preventDefault(),O.current[E+1]?.focus())}},[P,r,e,j]),z=C.useCallback((E,R)=>{if(r)return;R.preventDefault();let A=R.clipboardData.getData("text");if(d&&(A=A.replace(/\D/g,"")),!A)return;const I=e-E,X=Math.min(A.length,I),U=A.slice(0,X),q=[...P];for(let le=0;le<X;le++)q[E+le]=U[le]??"";D(q);const Q=q.join("");j(Q,{fromInternal:!0});const Z=Math.min(E+X-1,e-1),ne=O.current[Z];ne?.focus(),ne?.select()},[P,r,e,d,j]);return p.jsxs(L,{w:"full",gap:"var(--spacing-sm)",className:h,center:l,children:[t&&p.jsx(K,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:t}),p.jsx(L,{row:!0,w:"full",gap:"var(--spacing-sm)",center:l,className:V.cx({[yt.disabled]:r}),children:Array.from({length:e}).map((E,R)=>p.jsxs(L,{relative:!0,display:"inline-block",children:[p.jsx("input",{ref:A=>{O.current[R]=A},className:V.cx(yt.input,yt[f],o&&yt.error,i&&yt.success,P[R]&&V.css({caretColor:"transparent"})),inputMode:d?"numeric":"text",type:c?"password":"text",maxLength:1,autoFocus:a&&R===0,disabled:r||u,value:P[R],onChange:A=>k(R,A.target.value),onKeyDown:A=>N(R,A),onPaste:A=>z(R,A)}),p.jsx(Xn.span,{className:yt.glow,variants:ap,custom:R,initial:"idle",animate:u?"wave":"idle"})]},R))}),n&&p.jsx(K,{variant:"caption-1",colorName:"tertiary",children:n}),s&&o&&p.jsx(K,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:s})]})}),ap={idle:{opacity:0,scale:1,transition:{duration:.18}},wave:(e=0)=>({opacity:[0,.2,0],scale:[1,1.03,1],transition:{duration:1.5,delay:e*.15,repeat:1/0,ease:[.42,0,.58,1]}})};lc.displayName="OtpInput";const cc=C.createContext(null),lp=()=>C.useContext(cc),cp="_radio_zru2j_8",up="_disabled_zru2j_16",dp="_side_right_zru2j_21",zt={radio:cp,disabled:up,side_right:dp,"read-only":"_read-only_zru2j_26"},Br={sm:{inner:12,outer:20},md:{inner:16,outer:24}},uc=C.forwardRef(({value:e,children:t,checked:n,defaultChecked:o,onChange:s,disabled:i,className:r,description:a,size:l,side:c,readOnly:u,error:f},d)=>{const h=lp(),m=!!h,g=n!==void 0,[y,x]=pt(n,o),w=m?h.value===e:g?n:y,v=h?.disabled||i,b=l??h?.size??"md",S=c??h?.side??"left",M=u??h?.readOnly??!1,T=f??h?.error??!1,P=Br[b].outer,D=Br[b].inner,F=()=>{v||M||(m?h.setValue?.(e):(g||x(!w),s?.(!w)))},$=w&&T?"var(--fill-negative-tint)":w?"var(--fill-accent-tint)":"var(--fill-bg-secondary)",O=w&&T?"var(--fill-negative-primary)":w?"var(--fill-accent-primary)":void 0,j=w&&T||T&&!w?"var(--border-negative-secondary)":"var(--border-neutral-alpha-low)";return p.jsxs("button",{ref:d,role:"radio",type:"button","data-value":e,"aria-checked":w,"aria-disabled":v||void 0,tabIndex:w?0:-1,className:V.cx([zt.radio,w&&zt.checked,v&&zt.disabled,S==="right"&&zt.side_right,M&&zt["read-only"],r]),onClick:F,children:[p.jsx(L,{w:P,h:P,backgroundColor:$,borderWidth:w?0:1,borderColor:j,borderStyle:"solid",center:!0,borderRadius:"var(--corner-full-round)",children:p.jsx(L,{w:D,h:D,backgroundColor:O,borderRadius:"var(--corner-full-round)","aria-hidden":!0})}),p.jsxs(L,{alignItems:"flex-start",children:[p.jsx(K,{variant:b==="sm"?"body-2":"body-1",tag:"span",left:!0,children:t}),a&&p.jsx(K,{tag:"span",variant:"body-2",colorName:"secondary",children:a})]})]})});uc.displayName="Radio";const dc=C.forwardRef(({label:e,value:t,defaultValue:n,onChange:o,children:s,className:i,error:r=!1,disabled:a=!1,readOnly:l=!1,side:c="left",size:u="md"},f)=>{const[d,h]=pt(t,n),m=t!==void 0,g=m?t:d,y=C.useCallback(w=>{m||h(w),o?.(w)},[m,o,h]),x=C.useRef(null);return C.useImperativeHandle(f,()=>x.current),p.jsx(cc.Provider,{value:{value:g,readOnly:l,disabled:a,setValue:y,size:u,side:c,error:r},children:p.jsxs(L,{gap:"var(--spacing-sm)",ref:x,role:"radiogroup","aria-invalid":r||void 0,className:i,children:[typeof e=="string"?p.jsx(K,{colorName:"secondary",children:e}):e,p.jsx(L,{gap:"var(--spacing-lg)",children:s})]})})});dc.displayName="RadioGroup";const fp="_primary_svt6d_8",hp="_secondary_svt6d_13",gp="_button_svt6d_18",Ye={primary:fp,secondary:hp,button:gp,"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 mp({value:e,onChange:t,options:n,variant:o="primary",fullWidth:s=!1,className:i}){return p.jsx(L,{row:!0,alignItems:"center",borderRadius:"var(--corner-md)",p:"var(--spacing-xs)",gap:"var(--spacing-md)",className:V.cx(Ye[o],s&&Ye["full-width"],i),children:n.map(r=>{const a=r.value===e,l=r.disabled,c=r.separatorAfter??!1;return p.jsxs(C.Fragment,{children:[p.jsxs("button",{type:"button",disabled:l,className:V.cx(Ye.button,s&&Ye["full-width"],a&&Ye["button-active"],a&&Ye[`button-${o}`],l&&Ye["button-disabled"]),onClick:()=>!l&&t(r.value),children:[r.icon&&p.jsx(L,{alignItems:"center",justifyContent:"center",className:Ye["icon-container"],children:r.icon}),r.label&&p.jsx(K,{colorName:a?"primary":"tertiary",children:r.label}),!l&&p.jsx(mt,{color:"var(--fill-bg-overlay-primary)"})]}),c&&p.jsx(L,{w:1,h:24,backgroundColor:"var(--fill-bg-tertiary)"})]},r.value)})})}function Yn(){return typeof window<"u"}function It(e){return fc(e)?(e.nodeName||"").toLowerCase():"#document"}function we(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Be(e){var t;return(t=(fc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fc(e){return Yn()?e instanceof Node||e instanceof we(e).Node:!1}function ee(e){return Yn()?e instanceof Element||e instanceof we(e).Element:!1}function ve(e){return Yn()?e instanceof HTMLElement||e instanceof we(e).HTMLElement:!1}function ds(e){return!Yn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof we(e).ShadowRoot}const pp=new Set(["inline","contents"]);function cn(e){const{overflow:t,overflowX:n,overflowY:o,display:s}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!pp.has(s)}const vp=new Set(["table","td","th"]);function yp(e){return vp.has(It(e))}const xp=[":popover-open",":modal"];function Zn(e){return xp.some(t=>{try{return e.matches(t)}catch{return!1}})}const wp=["transform","translate","scale","rotate","perspective"],Cp=["transform","translate","scale","rotate","perspective","filter"],Sp=["paint","layout","strict","content"];function oi(e){const t=Jn(),n=ee(e)?Te(e):e;return wp.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Cp.some(o=>(n.willChange||"").includes(o))||Sp.some(o=>(n.contain||"").includes(o))}function bp(e){let t=Xe(e);for(;ve(t)&&!Ge(t);){if(oi(t))return t;if(Zn(t))return null;t=Xe(t)}return null}function Jn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _p=new Set(["html","body","#document"]);function Ge(e){return _p.has(It(e))}function Te(e){return we(e).getComputedStyle(e)}function Qn(e){return ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xe(e){if(It(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ds(e)&&e.host||Be(e);return ds(t)?t.host:t}function hc(e){const t=Xe(e);return Ge(t)?e.ownerDocument?e.ownerDocument.body:e.body:ve(t)&&cn(t)?t:hc(t)}function Qe(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=hc(e),i=s===((o=e.ownerDocument)==null?void 0:o.body),r=we(s);if(i){const a=fs(r);return t.concat(r,r.visualViewport||[],cn(s)?s:[],a&&n?Qe(a):[])}return t.concat(s,Qe(s,[],n))}function fs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const nt=Math.min,Se=Math.max,Nn=Math.round,yn=Math.floor,Ne=e=>({x:e,y:e}),Rp={left:"right",right:"left",bottom:"top",top:"bottom"},Ep={start:"end",end:"start"};function hs(e,t,n){return Se(e,nt(t,n))}function jt(e,t){return typeof e=="function"?e(t):e}function ot(e){return e.split("-")[0]}function $t(e){return e.split("-")[1]}function gc(e){return e==="x"?"y":"x"}function si(e){return e==="y"?"height":"width"}const Pp=new Set(["top","bottom"]);function We(e){return Pp.has(ot(e))?"y":"x"}function ii(e){return gc(We(e))}function Mp(e,t,n){n===void 0&&(n=!1);const o=$t(e),s=ii(e),i=si(s);let r=s==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(r=Bn(r)),[r,Bn(r)]}function Tp(e){const t=Bn(e);return[gs(e),t,gs(t)]}function gs(e){return e.replace(/start|end/g,t=>Ep[t])}const zr=["left","right"],Hr=["right","left"],Ap=["top","bottom"],Vp=["bottom","top"];function Dp(e,t,n){switch(e){case"top":case"bottom":return n?t?Hr:zr:t?zr:Hr;case"left":case"right":return t?Ap:Vp;default:return[]}}function kp(e,t,n,o){const s=$t(e);let i=Dp(ot(e),n==="start",o);return s&&(i=i.map(r=>r+"-"+s),t&&(i=i.concat(i.map(gs)))),i}function Bn(e){return e.replace(/left|right|bottom|top/g,t=>Rp[t])}function Fp(e){return{top:0,right:0,bottom:0,left:0,...e}}function mc(e){return typeof e!="number"?Fp(e):{top:e,right:e,bottom:e,left:e}}function zn(e){const{x:t,y:n,width:o,height:s}=e;return{width:o,height:s,top:n,left:t,right:t+o,bottom:n+s,x:t,y:n}}function Lp(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Ip(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:o}=t;return n+"/"+o}).join(" "):navigator.userAgent}function jp(){return/apple/i.test(navigator.vendor)}function $p(){return Lp().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Op(){return Ip().includes("jsdom/")}const Wr="data-floating-ui-focusable",Np="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Gr(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function nn(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ds(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function wt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function _o(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 Bp(e){return e.matches("html,body")}function dt(e){return e?.ownerDocument||document}function pc(e){return ve(e)&&e.matches(Np)}function zp(e){if(!e||Op())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Hp(e){return e?e.hasAttribute(Wr)?e:e.querySelector("["+Wr+"]")||e:null}function An(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var i;return s.parentId===t&&(!n||((i=s.context)==null?void 0:i.open))}).flatMap(s=>[s,...An(e,s.id,n)])}function Wp(e){return"nativeEvent"in e}function on(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var Gp=typeof document<"u",Up=function(){},Vt=Gp?C.useLayoutEffect:Up;const Kp={..._};function xn(e){const t=_.useRef(e);return Vt(()=>{t.current=e}),t}const qp=Kp.useInsertionEffect,Xp=qp||(e=>e());function $e(e){const t=_.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Xp(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return t.current==null?void 0:t.current(...o)},[])}function Ur(e,t,n){let{reference:o,floating:s}=e;const i=We(t),r=ii(t),a=si(r),l=ot(t),c=i==="y",u=o.x+o.width/2-s.width/2,f=o.y+o.height/2-s.height/2,d=o[a]/2-s[a]/2;let h;switch(l){case"top":h={x:u,y:o.y-s.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-s.width,y:f};break;default:h={x:o.x,y:o.y}}switch($t(t)){case"start":h[r]-=d*(n&&c?-1:1);break;case"end":h[r]+=d*(n&&c?-1:1);break}return h}const Yp=async(e,t,n)=>{const{placement:o="bottom",strategy:s="absolute",middleware:i=[],platform:r}=n,a=i.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let c=await r.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:f}=Ur(c,o,l),d=o,h={},m=0;for(let g=0;g<a.length;g++){const{name:y,fn:x}=a[g],{x:w,y:v,data:b,reset:S}=await x({x:u,y:f,initialPlacement:o,placement:d,strategy:s,middlewareData:h,rects:c,platform:r,elements:{reference:e,floating:t}});u=w??u,f=v??f,h={...h,[y]:{...h[y],...b}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(c=S.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:u,y:f}=Ur(c,d,l)),g=-1)}return{x:u,y:f,placement:d,strategy:s,middlewareData:h}};async function ri(e,t){var n;t===void 0&&(t={});const{x:o,y:s,platform:i,rects:r,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=jt(t,e),m=mc(h),y=a[d?f==="floating"?"reference":"floating":f],x=zn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=f==="floating"?{x:o,y:s,width:r.floating.width,height:r.floating.height}:r.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},S=zn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:l}):w);return{top:(x.top-S.top+m.top)/b.y,bottom:(S.bottom-x.bottom+m.bottom)/b.y,left:(x.left-S.left+m.left)/b.x,right:(S.right-x.right+m.right)/b.x}}const Zp=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:s,rects:i,platform:r,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=jt(e,t)||{};if(c==null)return{};const f=mc(u),d={x:n,y:o},h=ii(s),m=si(h),g=await r.getDimensions(c),y=h==="y",x=y?"top":"left",w=y?"bottom":"right",v=y?"clientHeight":"clientWidth",b=i.reference[m]+i.reference[h]-d[h]-i.floating[m],S=d[h]-i.reference[h],M=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c));let T=M?M[v]:0;(!T||!await(r.isElement==null?void 0:r.isElement(M)))&&(T=a.floating[v]||i.floating[m]);const P=b/2-S/2,D=T/2-g[m]/2-1,F=nt(f[x],D),$=nt(f[w],D),O=F,j=T-g[m]-$,k=T/2-g[m]/2+P,N=hs(O,k,j),z=!l.arrow&&$t(s)!=null&&k!==N&&i.reference[m]/2-(k<O?F:$)-g[m]/2<0,E=z?k<O?k-O:k-j:0;return{[h]:d[h]+E,data:{[h]:N,centerOffset:k-N-E,...z&&{alignmentOffset:E}},reset:z}}}),Jp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:s,middlewareData:i,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=jt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=ot(s),w=We(a),v=ot(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=d||(v||!g?[Bn(a)]:Tp(a)),M=m!=="none";!d&&M&&S.push(...kp(a,g,m,b));const T=[a,...S],P=await ri(t,y),D=[];let F=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&D.push(P[x]),f){const k=Mp(s,r,b);D.push(P[k[0]],P[k[1]])}if(F=[...F,{placement:s,overflows:D}],!D.every(k=>k<=0)){var $,O;const k=((($=i.flip)==null?void 0:$.index)||0)+1,N=T[k];if(N&&(!(f==="alignment"?w!==We(N):!1)||F.every(R=>We(R.placement)===w?R.overflows[0]>0:!0)))return{data:{index:k,overflows:F},reset:{placement:N}};let z=(O=F.filter(E=>E.overflows[0]<=0).sort((E,R)=>E.overflows[1]-R.overflows[1])[0])==null?void 0:O.placement;if(!z)switch(h){case"bestFit":{var j;const E=(j=F.filter(R=>{if(M){const A=We(R.placement);return A===w||A==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(A=>A>0).reduce((A,I)=>A+I,0)]).sort((R,A)=>R[1]-A[1])[0])==null?void 0:j[0];E&&(z=E);break}case"initialPlacement":z=a;break}if(s!==z)return{reset:{placement:z}}}return{}}}},Qp=new Set(["left","top"]);async function ev(e,t){const{placement:n,platform:o,elements:s}=e,i=await(o.isRTL==null?void 0:o.isRTL(s.floating)),r=ot(n),a=$t(n),l=We(n)==="y",c=Qp.has(r)?-1:1,u=i&&l?-1:1,f=jt(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}const tv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:s,y:i,placement:r,middlewareData:a}=t,l=await ev(t,e);return r===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:r}}}}},nv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:s}=t,{mainAxis:i=!0,crossAxis:r=!1,limiter:a={fn:y=>{let{x,y:w}=y;return{x,y:w}}},...l}=jt(e,t),c={x:n,y:o},u=await ri(t,l),f=We(ot(s)),d=gc(f);let h=c[d],m=c[f];if(i){const y=d==="y"?"top":"left",x=d==="y"?"bottom":"right",w=h+u[y],v=h-u[x];h=hs(w,h,v)}if(r){const y=f==="y"?"top":"left",x=f==="y"?"bottom":"right",w=m+u[y],v=m-u[x];m=hs(w,m,v)}const g=a.fn({...t,[d]:h,[f]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[d]:i,[f]:r}}}}}},ov=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:s,rects:i,platform:r,elements:a}=t,{apply:l=()=>{},...c}=jt(e,t),u=await ri(t,c),f=ot(s),d=$t(s),h=We(s)==="y",{width:m,height:g}=i.floating;let y,x;f==="top"||f==="bottom"?(y=f,x=d===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(x=f,y=d==="end"?"top":"bottom");const w=g-u.top-u.bottom,v=m-u.left-u.right,b=nt(g-u[y],w),S=nt(m-u[x],v),M=!t.middlewareData.shift;let T=b,P=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=v),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(T=w),M&&!d){const F=Se(u.left,0),$=Se(u.right,0),O=Se(u.top,0),j=Se(u.bottom,0);h?P=m-2*(F!==0||$!==0?F+$:Se(u.left,u.right)):T=g-2*(O!==0||j!==0?O+j:Se(u.top,u.bottom))}await l({...t,availableWidth:P,availableHeight:T});const D=await r.getDimensions(a.floating);return m!==D.width||g!==D.height?{reset:{rects:!0}}:{}}}};function vc(e){const t=Te(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const s=ve(e),i=s?e.offsetWidth:n,r=s?e.offsetHeight:o,a=Nn(n)!==i||Nn(o)!==r;return a&&(n=i,o=r),{width:n,height:o,$:a}}function ai(e){return ee(e)?e:e.contextElement}function Mt(e){const t=ai(e);if(!ve(t))return Ne(1);const n=t.getBoundingClientRect(),{width:o,height:s,$:i}=vc(t);let r=(i?Nn(n.width):n.width)/o,a=(i?Nn(n.height):n.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const sv=Ne(0);function yc(e){const t=we(e);return!Jn()||!t.visualViewport?sv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function iv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==we(e)?!1:t}function gt(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=ai(e);let r=Ne(1);t&&(o?ee(o)&&(r=Mt(o)):r=Mt(e));const a=iv(i,n,o)?yc(i):Ne(0);let l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,u=s.width/r.x,f=s.height/r.y;if(i){const d=we(i),h=o&&ee(o)?we(o):o;let m=d,g=fs(m);for(;g&&o&&h!==m;){const y=Mt(g),x=g.getBoundingClientRect(),w=Te(g),v=x.left+(g.clientLeft+parseFloat(w.paddingLeft))*y.x,b=x.top+(g.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=v,c+=b,m=we(g),g=fs(m)}}return zn({width:u,height:f,x:l,y:c})}function eo(e,t){const n=Qn(e).scrollLeft;return t?t.left+n:gt(Be(e)).left+n}function xc(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-eo(e,n),s=n.top+t.scrollTop;return{x:o,y:s}}function rv(e){let{elements:t,rect:n,offsetParent:o,strategy:s}=e;const i=s==="fixed",r=Be(o),a=t?Zn(t.floating):!1;if(o===r||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Ne(1);const u=Ne(0),f=ve(o);if((f||!f&&!i)&&((It(o)!=="body"||cn(r))&&(l=Qn(o)),ve(o))){const h=gt(o);c=Mt(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}const d=r&&!f&&!i?xc(r,l):Ne(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}}function av(e){return Array.from(e.getClientRects())}function lv(e){const t=Be(e),n=Qn(e),o=e.ownerDocument.body,s=Se(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=Se(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+eo(e);const a=-n.scrollTop;return Te(o).direction==="rtl"&&(r+=Se(t.clientWidth,o.clientWidth)-s),{width:s,height:i,x:r,y:a}}const Kr=25;function cv(e,t){const n=we(e),o=Be(e),s=n.visualViewport;let i=o.clientWidth,r=o.clientHeight,a=0,l=0;if(s){i=s.width,r=s.height;const u=Jn();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const c=eo(o);if(c<=0){const u=o.ownerDocument,f=u.body,d=getComputedStyle(f),h=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(o.clientWidth-f.clientWidth-h);m<=Kr&&(i-=m)}else c<=Kr&&(i+=c);return{width:i,height:r,x:a,y:l}}const uv=new Set(["absolute","fixed"]);function dv(e,t){const n=gt(e,!0,t==="fixed"),o=n.top+e.clientTop,s=n.left+e.clientLeft,i=ve(e)?Mt(e):Ne(1),r=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=o*i.y;return{width:r,height:a,x:l,y:c}}function qr(e,t,n){let o;if(t==="viewport")o=cv(e,n);else if(t==="document")o=lv(Be(e));else if(ee(t))o=dv(t,n);else{const s=yc(e);o={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return zn(o)}function wc(e,t){const n=Xe(e);return n===t||!ee(n)||Ge(n)?!1:Te(n).position==="fixed"||wc(n,t)}function fv(e,t){const n=t.get(e);if(n)return n;let o=Qe(e,[],!1).filter(a=>ee(a)&&It(a)!=="body"),s=null;const i=Te(e).position==="fixed";let r=i?Xe(e):e;for(;ee(r)&&!Ge(r);){const a=Te(r),l=oi(r);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&uv.has(s.position)||cn(r)&&!l&&wc(e,r))?o=o.filter(u=>u!==r):s=a,r=Xe(r)}return t.set(e,o),o}function hv(e){let{element:t,boundary:n,rootBoundary:o,strategy:s}=e;const r=[...n==="clippingAncestors"?Zn(t)?[]:fv(t,this._c):[].concat(n),o],a=r[0],l=r.reduce((c,u)=>{const f=qr(t,u,s);return c.top=Se(f.top,c.top),c.right=nt(f.right,c.right),c.bottom=nt(f.bottom,c.bottom),c.left=Se(f.left,c.left),c},qr(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function gv(e){const{width:t,height:n}=vc(e);return{width:t,height:n}}function mv(e,t,n){const o=ve(t),s=Be(t),i=n==="fixed",r=gt(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Ne(0);function c(){l.x=eo(s)}if(o||!o&&!i)if((It(t)!=="body"||cn(s))&&(a=Qn(t)),o){const h=gt(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else s&&c();i&&!o&&s&&c();const u=s&&!o&&!i?xc(s,a):Ne(0),f=r.left+a.scrollLeft-l.x-u.x,d=r.top+a.scrollTop-l.y-u.y;return{x:f,y:d,width:r.width,height:r.height}}function Ro(e){return Te(e).position==="static"}function Xr(e,t){if(!ve(e)||Te(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Be(e)===n&&(n=n.ownerDocument.body),n}function Cc(e,t){const n=we(e);if(Zn(e))return n;if(!ve(e)){let s=Xe(e);for(;s&&!Ge(s);){if(ee(s)&&!Ro(s))return s;s=Xe(s)}return n}let o=Xr(e,t);for(;o&&yp(o)&&Ro(o);)o=Xr(o,t);return o&&Ge(o)&&Ro(o)&&!oi(o)?n:o||bp(e)||n}const pv=async function(e){const t=this.getOffsetParent||Cc,n=this.getDimensions,o=await n(e.floating);return{reference:mv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function vv(e){return Te(e).direction==="rtl"}const yv={convertOffsetParentRelativeRectToViewportRelativeRect:rv,getDocumentElement:Be,getClippingRect:hv,getOffsetParent:Cc,getElementRects:pv,getClientRects:av,getDimensions:gv,getScale:Mt,isElement:ee,isRTL:vv};function Sc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xv(e,t){let n=null,o;const s=Be(e);function i(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function r(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:d,height:h}=c;if(a||t(),!d||!h)return;const m=yn(f),g=yn(s.clientWidth-(u+d)),y=yn(s.clientHeight-(f+h)),x=yn(u),v={rootMargin:-m+"px "+-g+"px "+-y+"px "+-x+"px",threshold:Se(0,nt(1,l))||1};let b=!0;function S(M){const T=M[0].intersectionRatio;if(T!==l){if(!b)return r();T?r(!1,T):o=setTimeout(()=>{r(!1,1e-7)},1e3)}T===1&&!Sc(c,e.getBoundingClientRect())&&r(),b=!1}try{n=new IntersectionObserver(S,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return r(!0),i}function li(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=ai(e),u=s||i?[...c?Qe(c):[],...Qe(t)]:[];u.forEach(x=>{s&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const f=c&&a?xv(c,n):null;let d=-1,h=null;r&&(h=new ResizeObserver(x=>{let[w]=x;w&&w.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let m,g=l?gt(e):null;l&&y();function y(){const x=gt(e);g&&!Sc(g,x)&&n(),g=x,m=requestAnimationFrame(y)}return n(),()=>{var x;u.forEach(w=>{s&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),f?.(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const wv=tv,Cv=nv,Sv=Jp,bv=ov,Yr=Zp,_v=(e,t,n)=>{const o=new Map,s={platform:yv,...n},i={...s.platform,_c:o};return Yp(e,t,{...s,platform:i})};var Rv=typeof document<"u",Ev=function(){},Vn=Rv?C.useLayoutEffect:Ev;function Hn(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,o,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Hn(e[o],t[o]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,s[o]))return!1;for(o=n;o--!==0;){const i=s[o];if(!(i==="_owner"&&e.$$typeof)&&!Hn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function bc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zr(e,t){const n=bc(e);return Math.round(t*n)/n}function Eo(e){const t=_.useRef(e);return Vn(()=>{t.current=e}),t}function Pv(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:s,elements:{reference:i,floating:r}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=_.useState(o);Hn(d,o)||h(o);const[m,g]=_.useState(null),[y,x]=_.useState(null),w=_.useCallback(R=>{R!==M.current&&(M.current=R,g(R))},[]),v=_.useCallback(R=>{R!==T.current&&(T.current=R,x(R))},[]),b=i||m,S=r||y,M=_.useRef(null),T=_.useRef(null),P=_.useRef(u),D=l!=null,F=Eo(l),$=Eo(s),O=Eo(c),j=_.useCallback(()=>{if(!M.current||!T.current)return;const R={placement:t,strategy:n,middleware:d};$.current&&(R.platform=$.current),_v(M.current,T.current,R).then(A=>{const I={...A,isPositioned:O.current!==!1};k.current&&!Hn(P.current,I)&&(P.current=I,iu.flushSync(()=>{f(I)}))})},[d,t,n,$,O]);Vn(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[c]);const k=_.useRef(!1);Vn(()=>(k.current=!0,()=>{k.current=!1}),[]),Vn(()=>{if(b&&(M.current=b),S&&(T.current=S),b&&S){if(F.current)return F.current(b,S,j);j()}},[b,S,j,F,D]);const N=_.useMemo(()=>({reference:M,floating:T,setReference:w,setFloating:v}),[w,v]),z=_.useMemo(()=>({reference:b,floating:S}),[b,S]),E=_.useMemo(()=>{const R={position:n,left:0,top:0};if(!z.floating)return R;const A=Zr(z.floating,u.x),I=Zr(z.floating,u.y);return a?{...R,transform:"translate("+A+"px, "+I+"px)",...bc(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:I}},[n,a,z.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:j,refs:N,elements:z,floatingStyles:E}),[u,j,N,z,E])}const Mv=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:s}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Yr({element:o.current,padding:s}).fn(n):{}:o?Yr({element:o,padding:s}).fn(n):{}}}},ci=(e,t)=>({...wv(e),options:[e,t]}),ui=(e,t)=>({...Cv(e),options:[e,t]}),di=(e,t)=>({...Sv(e),options:[e,t]}),Tv=(e,t)=>({...bv(e),options:[e,t]}),Av=(e,t)=>({...Mv(e),options:[e,t]});function _c(e){const t=_.useRef(void 0),n=_.useCallback(o=>{const s=e.map(i=>{if(i!=null){if(typeof i=="function"){const r=i,a=r(o);return typeof a=="function"?a:()=>{r(null)}}return i.current=o,()=>{i.current=null}}});return()=>{s.forEach(i=>i?.())}},e);return _.useMemo(()=>e.every(o=>o==null)?null:o=>{t.current&&(t.current(),t.current=void 0),o!=null&&(t.current=n(o))},e)}const Vv="data-floating-ui-focusable",Jr="active",Qr="selected",Dv={..._};let ea=!1,kv=0;const ta=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+kv++;function Fv(){const[e,t]=_.useState(()=>ea?ta():void 0);return Vt(()=>{e==null&&t(ta())},[]),_.useEffect(()=>{ea=!0},[]),e}const Lv=Dv.useId,Rc=Lv||Fv;let ms;process.env.NODE_ENV!=="production"&&(ms=new Set);function Iv(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const s="Floating UI: "+n.join(" ");if(!((e=ms)!=null&&e.has(s))){var i;(i=ms)==null||i.add(s),console.error(s)}}function jv(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(s=>s(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var o;(o=e.get(t))==null||o.delete(n)}}}const $v=_.createContext(null),Ov=_.createContext(null),fi=()=>{var e;return((e=_.useContext($v))==null?void 0:e.id)||null},hi=()=>_.useContext(Ov);function gi(e){return"data-floating-ui-"+e}function Re(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const na=gi("safe-polygon");function Po(e,t,n){if(n&&!on(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const o=e();return typeof o=="number"?o:o?.[t]}return e?.[t]}function Mo(e){return typeof e=="function"?e():e}function Ec(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:s,events:i,elements:r}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:d=!0}=t,h=hi(),m=fi(),g=xn(c),y=xn(l),x=xn(n),w=xn(f),v=_.useRef(),b=_.useRef(-1),S=_.useRef(),M=_.useRef(-1),T=_.useRef(!0),P=_.useRef(!1),D=_.useRef(()=>{}),F=_.useRef(!1),$=$e(()=>{var E;const R=(E=s.current.openEvent)==null?void 0:E.type;return R?.includes("mouse")&&R!=="mousedown"});_.useEffect(()=>{if(!a)return;function E(R){let{open:A}=R;A||(Re(b),Re(M),T.current=!0,F.current=!1)}return i.on("openchange",E),()=>{i.off("openchange",E)}},[a,i]),_.useEffect(()=>{if(!a||!g.current||!n)return;function E(A){$()&&o(!1,A,"hover")}const R=dt(r.floating).documentElement;return R.addEventListener("mouseleave",E),()=>{R.removeEventListener("mouseleave",E)}},[r.floating,n,o,a,g,$]);const O=_.useCallback(function(E,R,A){R===void 0&&(R=!0),A===void 0&&(A="hover");const I=Po(y.current,"close",v.current);I&&!S.current?(Re(b),b.current=window.setTimeout(()=>o(!1,E,A),I)):R&&(Re(b),o(!1,E,A))},[y,o]),j=$e(()=>{D.current(),S.current=void 0}),k=$e(()=>{if(P.current){const E=dt(r.floating).body;E.style.pointerEvents="",E.removeAttribute(na),P.current=!1}}),N=$e(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);_.useEffect(()=>{if(!a)return;function E(U){if(Re(b),T.current=!1,u&&!on(v.current)||Mo(w.current)>0&&!Po(y.current,"open"))return;const q=Po(y.current,"open",v.current);q?b.current=window.setTimeout(()=>{x.current||o(!0,U,"hover")},q):n||o(!0,U,"hover")}function R(U){if(N()){k();return}D.current();const q=dt(r.floating);if(Re(M),F.current=!1,g.current&&s.current.floatingContext){n||Re(b),S.current=g.current({...s.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){k(),j(),N()||O(U,!0,"safe-polygon")}});const Z=S.current;q.addEventListener("mousemove",Z),D.current=()=>{q.removeEventListener("mousemove",Z)};return}(v.current!=="touch"||!nn(r.floating,U.relatedTarget))&&O(U)}function A(U){N()||s.current.floatingContext&&(g.current==null||g.current({...s.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){k(),j(),N()||O(U)}})(U))}function I(){Re(b)}function X(U){N()||O(U,!1)}if(ee(r.domReference)){const U=r.domReference,q=r.floating;return n&&U.addEventListener("mouseleave",A),d&&U.addEventListener("mousemove",E,{once:!0}),U.addEventListener("mouseenter",E),U.addEventListener("mouseleave",R),q&&(q.addEventListener("mouseleave",A),q.addEventListener("mouseenter",I),q.addEventListener("mouseleave",X)),()=>{n&&U.removeEventListener("mouseleave",A),d&&U.removeEventListener("mousemove",E),U.removeEventListener("mouseenter",E),U.removeEventListener("mouseleave",R),q&&(q.removeEventListener("mouseleave",A),q.removeEventListener("mouseenter",I),q.removeEventListener("mouseleave",X))}}},[r,a,e,u,d,O,j,k,o,n,x,h,y,g,s,N,w]),Vt(()=>{var E;if(a&&n&&(E=g.current)!=null&&(E=E.__options)!=null&&E.blockPointerEvents&&$()){P.current=!0;const A=r.floating;if(ee(r.domReference)&&A){var R;const I=dt(r.floating).body;I.setAttribute(na,"");const X=r.domReference,U=h==null||(R=h.nodesRef.current.find(q=>q.id===m))==null||(R=R.context)==null?void 0:R.elements.floating;return U&&(U.style.pointerEvents=""),I.style.pointerEvents="none",X.style.pointerEvents="auto",A.style.pointerEvents="auto",()=>{I.style.pointerEvents="",X.style.pointerEvents="",A.style.pointerEvents=""}}}},[a,n,m,r,h,g,$]),Vt(()=>{n||(v.current=void 0,F.current=!1,j(),k())},[n,j,k]),_.useEffect(()=>()=>{j(),Re(b),Re(M),k()},[a,r.domReference,j,k]);const z=_.useMemo(()=>{function E(R){v.current=R.pointerType}return{onPointerDown:E,onPointerEnter:E,onMouseMove(R){const{nativeEvent:A}=R;function I(){!T.current&&!x.current&&o(!0,A,"hover")}u&&!on(v.current)||n||Mo(w.current)===0||F.current&&R.movementX**2+R.movementY**2<2||(Re(M),v.current==="touch"?I():(F.current=!0,M.current=window.setTimeout(I,Mo(w.current))))}}},[u,o,n,x,w]);return _.useMemo(()=>a?{reference:z}:{},[a,z])}function oa(e){return ve(e.target)&&e.target.tagName==="BUTTON"}function Nv(e){return ve(e.target)&&e.target.tagName==="A"}function sa(e){return pc(e)}function Bv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:s,elements:{domReference:i}}=e,{enabled:r=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:f=!0}=t,d=_.useRef(),h=_.useRef(!1),m=_.useMemo(()=>({onPointerDown(g){d.current=g.pointerType},onMouseDown(g){const y=d.current;g.button===0&&a!=="click"&&(on(y,!0)&&c||(n&&l&&(!(s.current.openEvent&&f)||s.current.openEvent.type==="mousedown")?o(!1,g.nativeEvent,"click"):(g.preventDefault(),o(!0,g.nativeEvent,"click"))))},onClick(g){const y=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}on(y,!0)&&c||(n&&l&&(!(s.current.openEvent&&f)||s.current.openEvent.type==="click")?o(!1,g.nativeEvent,"click"):o(!0,g.nativeEvent,"click"))},onKeyDown(g){d.current=void 0,!(g.defaultPrevented||!u||oa(g))&&(g.key===" "&&!sa(i)&&(g.preventDefault(),h.current=!0),!Nv(g)&&g.key==="Enter"&&o(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||oa(g)||sa(i)||g.key===" "&&h.current&&(h.current=!1,o(!(n&&l),g.nativeEvent,"click"))}}),[s,i,a,c,u,o,n,f,l]);return _.useMemo(()=>r?{reference:m}:{},[r,m])}const zv={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Hv={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ia=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 Pc(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,elements:s,dataRef:i}=e,{enabled:r=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:h,capture:m}=t,g=hi(),y=$e(typeof l=="function"?l:()=>!1),x=typeof l=="function"?y:l,w=_.useRef(!1),{escapeKey:v,outsidePress:b}=ia(h),{escapeKey:S,outsidePress:M}=ia(m),T=_.useRef(!1),P=$e(k=>{var N;if(!n||!r||!a||k.key!=="Escape"||T.current)return;const z=(N=i.current.floatingContext)==null?void 0:N.nodeId,E=g?An(g.nodesRef.current,z):[];if(!v&&(k.stopPropagation(),E.length>0)){let R=!0;if(E.forEach(A=>{var I;if((I=A.context)!=null&&I.open&&!A.context.dataRef.current.__escapeKeyBubbles){R=!1;return}}),!R)return}o(!1,Wp(k)?k.nativeEvent:k,"escape-key")}),D=$e(k=>{var N;const z=()=>{var E;P(k),(E=wt(k))==null||E.removeEventListener("keydown",z)};(N=wt(k))==null||N.addEventListener("keydown",z)}),F=$e(k=>{var N;const z=i.current.insideReactTree;i.current.insideReactTree=!1;const E=w.current;if(w.current=!1,c==="click"&&E||z||typeof x=="function"&&!x(k))return;const R=wt(k),A="["+gi("inert")+"]",I=dt(s.floating).querySelectorAll(A);let X=ee(R)?R:null;for(;X&&!Ge(X);){const Z=Xe(X);if(Ge(Z)||!ee(Z))break;X=Z}if(I.length&&ee(R)&&!Bp(R)&&!nn(R,s.floating)&&Array.from(I).every(Z=>!nn(X,Z)))return;if(ve(R)&&j){const Z=Ge(R),ne=Te(R),le=/auto|scroll/,Ce=Z||le.test(ne.overflowX),me=Z||le.test(ne.overflowY),je=Ce&&R.clientWidth>0&&R.scrollWidth>R.clientWidth,B=me&&R.clientHeight>0&&R.scrollHeight>R.clientHeight,J=ne.direction==="rtl",re=B&&(J?k.offsetX<=R.offsetWidth-R.clientWidth:k.offsetX>R.clientWidth),ue=je&&k.offsetY>R.clientHeight;if(re||ue)return}const U=(N=i.current.floatingContext)==null?void 0:N.nodeId,q=g&&An(g.nodesRef.current,U).some(Z=>{var ne;return _o(k,(ne=Z.context)==null?void 0:ne.elements.floating)});if(_o(k,s.floating)||_o(k,s.domReference)||q)return;const Q=g?An(g.nodesRef.current,U):[];if(Q.length>0){let Z=!0;if(Q.forEach(ne=>{var le;if((le=ne.context)!=null&&le.open&&!ne.context.dataRef.current.__outsidePressBubbles){Z=!1;return}}),!Z)return}o(!1,k,"outside-press")}),$=$e(k=>{var N;const z=()=>{var E;F(k),(E=wt(k))==null||E.removeEventListener(c,z)};(N=wt(k))==null||N.addEventListener(c,z)});_.useEffect(()=>{if(!n||!r)return;i.current.__escapeKeyBubbles=v,i.current.__outsidePressBubbles=b;let k=-1;function N(I){o(!1,I,"ancestor-scroll")}function z(){window.clearTimeout(k),T.current=!0}function E(){k=window.setTimeout(()=>{T.current=!1},Jn()?5:0)}const R=dt(s.floating);a&&(R.addEventListener("keydown",S?D:P,S),R.addEventListener("compositionstart",z),R.addEventListener("compositionend",E)),x&&R.addEventListener(c,M?$:F,M);let A=[];return d&&(ee(s.domReference)&&(A=Qe(s.domReference)),ee(s.floating)&&(A=A.concat(Qe(s.floating))),!ee(s.reference)&&s.reference&&s.reference.contextElement&&(A=A.concat(Qe(s.reference.contextElement)))),A=A.filter(I=>{var X;return I!==((X=R.defaultView)==null?void 0:X.visualViewport)}),A.forEach(I=>{I.addEventListener("scroll",N,{passive:!0})}),()=>{a&&(R.removeEventListener("keydown",S?D:P,S),R.removeEventListener("compositionstart",z),R.removeEventListener("compositionend",E)),x&&R.removeEventListener(c,M?$:F,M),A.forEach(I=>{I.removeEventListener("scroll",N)}),window.clearTimeout(k)}},[i,s,a,x,c,n,o,d,r,v,b,P,S,D,F,M,$]),_.useEffect(()=>{i.current.insideReactTree=!1},[i,x,c]);const O=_.useMemo(()=>({onKeyDown:P,...u&&{[zv[f]]:k=>{o(!1,k.nativeEvent,"reference-press")},...f!=="click"&&{onClick(k){o(!1,k.nativeEvent,"reference-press")}}}}),[P,o,u,f]),j=_.useMemo(()=>({onKeyDown:P,onMouseDown(){w.current=!0},onMouseUp(){w.current=!0},[Hv[c]]:()=>{i.current.insideReactTree=!0}}),[P,c,i]);return _.useMemo(()=>r?{reference:O,floating:j}:{},[r,O,j])}function Wv(e){const{open:t=!1,onOpenChange:n,elements:o}=e,s=Rc(),i=_.useRef({}),[r]=_.useState(()=>jv()),a=fi()!=null;if(process.env.NODE_ENV!=="production"){const h=o.reference;h&&!ee(h)&&Iv("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=_.useState(o.reference),u=$e((h,m,g)=>{i.current.openEvent=h?m:void 0,r.emit("openchange",{open:h,event:m,reason:g,nested:a}),n?.(h,m,g)}),f=_.useMemo(()=>({setPositionReference:c}),[]),d=_.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return _.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:d,events:r,floatingId:s,refs:f}),[t,u,d,r,s,f])}function mi(e){e===void 0&&(e={});const{nodeId:t}=e,n=Wv({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,s=o.elements,[i,r]=_.useState(null),[a,l]=_.useState(null),u=s?.domReference||i,f=_.useRef(null),d=hi();Vt(()=>{u&&(f.current=u)},[u]);const h=Pv({...e,elements:{...s,...a&&{reference:a}}}),m=_.useCallback(v=>{const b=ee(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),getClientRects:()=>v.getClientRects(),contextElement:v}:v;l(b),h.refs.setReference(b)},[h.refs]),g=_.useCallback(v=>{(ee(v)||v===null)&&(f.current=v,r(v)),(ee(h.refs.reference.current)||h.refs.reference.current===null||v!==null&&!ee(v))&&h.refs.setReference(v)},[h.refs]),y=_.useMemo(()=>({...h.refs,setReference:g,setPositionReference:m,domReference:f}),[h.refs,g,m]),x=_.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),w=_.useMemo(()=>({...h,...o,refs:y,elements:x,nodeId:t}),[h,y,x,t,o]);return Vt(()=>{o.dataRef.current.floatingContext=w;const v=d?.nodesRef.current.find(b=>b.id===t);v&&(v.context=w)}),_.useMemo(()=>({...h,context:w,refs:y,elements:x}),[h,y,x,w])}function To(){return $p()&&jp()}function Gv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,events:s,dataRef:i,elements:r}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=_.useRef(!1),u=_.useRef(-1),f=_.useRef(!0);_.useEffect(()=>{if(!a)return;const h=we(r.domReference);function m(){!n&&ve(r.domReference)&&r.domReference===Gr(dt(r.domReference))&&(c.current=!0)}function g(){f.current=!0}function y(){f.current=!1}return h.addEventListener("blur",m),To()&&(h.addEventListener("keydown",g,!0),h.addEventListener("pointerdown",y,!0)),()=>{h.removeEventListener("blur",m),To()&&(h.removeEventListener("keydown",g,!0),h.removeEventListener("pointerdown",y,!0))}},[r.domReference,n,a]),_.useEffect(()=>{if(!a)return;function h(m){let{reason:g}=m;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return s.on("openchange",h),()=>{s.off("openchange",h)}},[s,a]),_.useEffect(()=>()=>{Re(u)},[]);const d=_.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const m=wt(h.nativeEvent);if(l&&ee(m)){if(To()&&!h.relatedTarget){if(!f.current&&!pc(m))return}else if(!zp(m))return}o(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const m=h.relatedTarget,g=h.nativeEvent,y=ee(m)&&m.hasAttribute(gi("focus-guard"))&&m.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var x;const w=Gr(r.domReference?r.domReference.ownerDocument:document);!m&&w===r.domReference||nn((x=i.current.floatingContext)==null?void 0:x.refs.floating.current,w)||nn(r.domReference,w)||y||o(!1,g,"focus")})}}),[i,r.domReference,o,l]);return _.useMemo(()=>a?{reference:d}:{},[a,d])}function Ao(e,t,n){const o=new Map,s=n==="item";let i=e;if(s&&e){const{[Jr]:r,[Qr]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[Vv]:""},...i,...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[c,u]=l;if(!(s&&[Jr,Qr].includes(c)))if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof u=="function"){var f;(f=o.get(c))==null||f.push(u),r[c]=function(){for(var d,h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];return(d=o.get(c))==null?void 0:d.map(y=>y(...m)).find(y=>y!==void 0)}}}else r[c]=u}),r),{})}}function Mc(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),o=e.map(a=>a?.item),s=_.useCallback(a=>Ao(a,e,"reference"),t),i=_.useCallback(a=>Ao(a,e,"floating"),n),r=_.useCallback(a=>Ao(a,e,"item"),o);return _.useMemo(()=>({getReferenceProps:s,getFloatingProps:i,getItemProps:r}),[s,i,r])}const Uv=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Tc(e,t){var n,o;t===void 0&&(t={});const{open:s,elements:i,floatingId:r}=e,{enabled:a=!0,role:l="dialog"}=t,c=Rc(),u=((n=i.domReference)==null?void 0:n.id)||c,f=_.useMemo(()=>{var w;return((w=Hp(i.floating))==null?void 0:w.id)||r},[i.floating,r]),d=(o=Uv.get(l))!=null?o:l,m=fi()!=null,g=_.useMemo(()=>d==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:s?f:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":d==="alertdialog"?"dialog":d,"aria-controls":s?f:void 0,...d==="listbox"&&{role:"combobox"},...d==="menu"&&{id:u},...d==="menu"&&m&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[d,f,m,s,u,l]),y=_.useMemo(()=>{const w={id:f,...d&&{role:d}};return d==="tooltip"||l==="label"?w:{...w,...d==="menu"&&{"aria-labelledby":u}}},[d,f,u,l]),x=_.useCallback(w=>{let{active:v,selected:b}=w;const S={role:"option",...v&&{id:f+"-fui-option"}};switch(l){case"select":case"combobox":return{...S,"aria-selected":b}}return{}},[f,l]);return _.useMemo(()=>a?{reference:g,floating:y,item:x}:{},[a,g,y,x])}const Kv=e=>_.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),qv=e=>_.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},_.createElement("g",null,_.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"}))),Ac=e=>_.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{opacity:.6},_.createElement("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),Vo={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"}},pi=C.forwardRef(({label:e,color:t="primary",size:n="md",onClick:o,onDelete:s,avatar:i,icon:r,disabled:a,className:l},c)=>{const u=C.useRef(null),f=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]),d=V.css({cursor:a?"not-allowed":o?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:f.bg}}),h=V.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return p.jsxs(L,{ref:m=>{u.current=m,typeof c=="function"?c(m):c&&(c.current=m)},row:!0,alignItems:"center",justifyContent:"center",gap:"var(--spacing-sm)",h:Vo[n].h,p:Vo[n].p,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:f.bg,color:f.color,onClick:o,className:V.cx(d,l),children:[o&&p.jsx(mt,{}),i&&p.jsx(L,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:i}),r&&p.jsx(L,{children:r}),typeof e=="string"?p.jsx(K,{variant:Vo[n].text,colorName:t,textOverflow:"ellipsis",overflow:"hidden",children:e}):e,s&&!a&&p.jsx(K,{className:h,colorName:t,onClick:m=>{m.stopPropagation(),s(m)},children:p.jsx(Ac,{})})]})});pi.displayName="Tag";const Xv="_disabled_zbo6w_40",Yv="_open_zbo6w_48",Zv="_error_zbo6w_51",Jv="_hidden_zbo6w_87",Qv="_visible_zbo6w_90",ey="_selected_zbo6w_163",de={"select-container":"_select-container_zbo6w_8","full-width":"_full-width_zbo6w_13","select-input":"_select-input_zbo6w_17","size-xs":"_size-xs_zbo6w_25","size-sm":"_size-sm_zbo6w_30","size-md":"_size-md_zbo6w_35",disabled:Xv,open:Yv,"select-arrow":"_select-arrow_zbo6w_48",error:Zv,"select-value":"_select-value_zbo6w_62","select-value_xs":"_select-value_xs_zbo6w_74","select-placeholder":"_select-placeholder_zbo6w_81",hidden:Jv,visible:Qv,"select-arrow_xs":"_select-arrow_xs_zbo6w_106","select-dropdown":"_select-dropdown_zbo6w_116","select-menu":"_select-menu_zbo6w_126","select-menu-item":"_select-menu-item_zbo6w_145","select-menu-item-first":"_select-menu-item-first_zbo6w_158",selected:ey,"overflow-tooltip-container":"_overflow-tooltip-container_zbo6w_167","overflow-tooltip-text":"_overflow-tooltip-text_zbo6w_172","empty-block":"_empty-block_zbo6w_179"};function Vc({value:e,onChange:t,multiple:n=!1,returnedValue:o,renderItem:s,renderInputItem:i,renderSingleInputItem:r,renderMultipleInputItem:a,renderDropdownItem:l,placeholder:c,items:u=[],fullWidth:f,size:d="md",showDefaultItem:h,disabled:m,label:g,firstItem:y,lastItem:x,observer:w,emptyText:v,onBlur:b,prompt:S,error:M,errorText:T,dropdownMaxWidth:P=400,dropdownMinWidth:D=120,minWidth:F=120,width:$}){const[O,j]=pt(e,n?[]:null),[k,N]=C.useState(!1),{refs:z,floatingStyles:E}=mi({open:k,strategy:"fixed",middleware:[ci(4),di({crossAxis:!0,fallbackAxisSideDirection:"start"}),ui({crossAxis:!0,padding:8}),Tv({apply({availableHeight:B,availableWidth:J,elements:re}){const ue=Math.min(typeof J=="number"?J-64:P,P);Object.assign(re.floating.style,{maxHeight:typeof B=="number"?`${B}px`:"auto",maxWidth:`${ue}px`,minWidth:`${D}px`})}})],whileElementsMounted:li}),R=C.useMemo(()=>n?O||[]:O!=null?[O]:[],[O,n]),A=C.useCallback(B=>o?o(B):B,[o]),I=C.useMemo(()=>{const B=new Map;return u.forEach(J=>{B.set(A(J),J)}),B},[u,A]),X=!u.length&&!M,U=C.useMemo(()=>R.map(B=>I.get(B)).filter(B=>!!B),[I,R]);C.useEffect(()=>{process.env.NODE_ENV!=="production"&&s&&!l&&console.warn("[Select] `renderItem` deprecated, use `renderDropdownItem` instead.")},[l,s]);const q=C.useCallback((B,J)=>l?l(B,J):s?s(B):String(B),[l,s]),Q=()=>{N(!1),b?.()},Z=B=>{const J=A(B);if(n){const re=R.includes(J)?R.filter(ue=>ue!==J):[...R,J];j(re),t?.(re)}else j(J),t?.(J),Q()},ne=B=>{if(!n)return;const J=R.filter(re=>re!==B);j(J),t?.(J)},le=()=>{const B=n?[]:null;j(B),t?.(B),n||Q()},Ce=()=>typeof c=="string"?p.jsx(K,{variant:d==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:c??"Select..."}):c,me=()=>{if(!R.length)return Ce();if(n)return a?a(U):i?i({mode:"multiple",selectedItems:U}):p.jsx(L,{flexWrap:"wrap",row:!0,gap:10,children:R.map(re=>{const ue=I.get(re);return ue?p.jsx(pi,{size:"sm",label:s?s(ue):String(re),onDelete:Ae=>{Ae.stopPropagation(),ne(re)}},re):null})});const B=I.get(R[0])??null;if(!B)return Ce();if(r)return r(B);if(i)return i({mode:"single",selectedItem:B});const J=s?s(B):String(R[0]);return typeof J=="string"?p.jsx(K,{variant:d==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:J}):p.jsx(p.Fragment,{children:J})},je=k&&p.jsx(un,{children:p.jsx(L,{row:!0,top:0,right:0,bottom:0,left:0,position:"fixed",center:!0,flex:1,onClick:Q,display:"block",backgroundColor:"transparent",zIndex:1,children:p.jsx(Xn.div,{ref:z.setFloating,className:de["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...E,zIndex:1},onMouseDown:B=>B.stopPropagation(),onClick:B=>B.stopPropagation(),children:p.jsxs("ul",{className:de["select-menu"],children:[h&&!n&&p.jsx(L,{className:de["select-menu-item"],role:"option",onClick:le,children:p.jsx(K,{variant:"body-2",colorName:"tertiary",children:c})}),y&&p.jsx(L,{className:V.cx(de["select-menu-item"],de["select-menu-item-first"]),children:y}),X&&p.jsxs(L,{className:de["empty-block"],children:[p.jsx(L,{w:20,h:20,children:p.jsx(qv,{})}),p.jsx(K,{variant:"body-2",children:v??"There is nothing yet"})]}),u.map((B,J)=>{const re=A(B),ue=R.includes(re),Ae=q(B,{item:B,selected:ue,index:J}),Ve=typeof Ae=="string";return p.jsxs(L,{row:!0,gap:10,alignItems:"center",className:V.cx(de["select-menu-item"],{[de.selected]:ue}),role:"option",relative:!0,onClick:()=>Z(B),children:[n&&p.jsx(ni,{size:"sm",checked:ue}),Ve?p.jsx(K,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:Ae}):Ae,p.jsx(mt,{})]},re)}),w,x&&p.jsx(L,{className:V.cx(de["select-menu-item"],de["select-menu-item-first"]),children:x})]})},"dropdown")})});return p.jsxs(L,{relative:!0,display:"inline-block",minWidth:F,w:$||(f?"full":"auto"),onMouseDown:B=>B.stopPropagation(),onClick:B=>B.stopPropagation(),children:[typeof g=="string"?p.jsx(K,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:d==="sm"?4:8,children:g}):g,p.jsxs(L,{ref:z.setReference,row:!0,gap:10,tabIndex:m?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:V.cx(de["select-input"],de[`size-${d}`],{[de.error]:M,[de.disabled]:m,[de.open]:k}),onClick:()=>!m&&N(B=>!B),children:[p.jsx(L,{className:V.cx(de["select-value"]),children:me()}),p.jsx(L,{className:V.cx(de["select-arrow"],de[`select-arrow_${d}`]),children:p.jsx(Kv,{})})]}),typeof S=="string"?p.jsx(K,{variant:"caption-1",colorName:"tertiary",mt:4,children:S}):S,M&&T&&p.jsx(K,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:T}),p.jsx($f,{children:je})]})}const ty=e=>_.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.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"})),ny=e=>_.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.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"})),oy="_container_e7tan_8",sy="_disabled_e7tan_17",iy="_reverse_e7tan_21",ry="_input_e7tan_25",ay="_switchContainer_e7tan_35",ly="_variant_accent_e7tan_43",cy="_variant_secondary_e7tan_47",uy="_thumb_e7tan_51",dy="_variant_theme_e7tan_54",fy="_moon_e7tan_58",hy="_fire_e7tan_61",gy="_size_sm_e7tan_74",my="_size_md_e7tan_80",py="_size_lg_e7tan_86",ke={container:oy,disabled:sy,reverse:iy,input:ry,switchContainer:ay,variant_accent:ly,variant_secondary:cy,switch:"_switch_e7tan_35",thumb:uy,variant_theme:dy,moon:fy,fire:hy,size_sm:gy,size_md:my,size_lg:py},Dc=C.forwardRef(({title:e,text:t,icon:n,disabled:o,onChange:s,checked:i,defaultValue:r,className:a,size:l="md",variant:c="accent",reverse:u=!1,w:f="auto",...d},h)=>{const[m,g]=pt(i,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),s?.(b)},toggle:()=>{const b=!m;g(b),s?.(b)},isFocused:()=>document.activeElement===y.current,isDisabled:()=>o??!1,getInputElement:()=>y.current,checkValidity:()=>y.current?.checkValidity()??!0,reset:()=>{const b=r??!1;g(b),s?.(b)}}),[m,g,s,o,r]);const x=C.useCallback(b=>{g(b.target.checked),s?.(b.target.checked)},[s]),w=C.useMemo(()=>typeof e=="string"?p.jsx(K,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:e}):e,[e]),v=C.useMemo(()=>typeof t=="string"?p.jsx(K,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:t}):t,[t]);return p.jsxs(L,{row:!0,w:f,gap:"var(--spacing-sm)",children:[p.jsxs("label",{className:V.cx(ke.container,a,{[ke.disabled]:o,[ke.reverse]:u}),children:[p.jsxs(L,{className:V.cx(ke.switchContainer,ke[`size_${l}`],ke[`variant_${c}`]),children:[p.jsx("input",{ref:y,type:"checkbox",checked:m,className:ke.input,onChange:x,disabled:o,...d}),p.jsx("div",{className:ke.switch,children:p.jsx("div",{className:ke.thumb,children:c==="theme"&&p.jsxs(p.Fragment,{children:[p.jsx(ny,{className:ke.moon}),p.jsx(ty,{className:ke.fire})]})})})]}),p.jsxs(L,{gap:"var(--spacing-xs)",children:[w,v]})]}),n]})});Dc.displayName="Switch";const vy=V.css({cursor:"pointer",userSelect:"none"}),yy=V.css({cursor:"not-allowed",opacity:.5}),xy=V.css({transition:"color 0.2s ease"}),wy=C.forwardRef(({label:e,selected:t,disabled:n,fullWidth:o,onClick:s},i)=>p.jsx(L,{w:o?"full":void 0,justifyContent:"center",alignItems:"center",ref:i,py:"var(--spacing-md)",px:"var(--spacing-xl)",onClick:s,className:V.cx(vy,{[yy]:n}),children:p.jsx(K,{className:xy,colorName:t?"primary":"tertiary",fontWeight:"medium",variant:"body-2",children:e})})),Cy=V.css({borderBottom:"1px solid var(--border-neutral-alpha-basic)"}),kc=({value:e,onChange:t,options:n,fullWidth:o=!1,className:s})=>{const[i,r]=C.useState({left:0,width:0}),a=C.useRef([]),l=u=>f=>{a.current[u]=f};C.useEffect(()=>{const u=n.findIndex(d=>d.value===e),f=a.current[u];f&&r({left:f.offsetLeft,width:f.offsetWidth})},[e,n]);const c=(u,f=!1)=>()=>!f&&t(u);return p.jsxs(L,{row:!0,w:o?"full":"auto",relative:!0,className:V.cx(Cy,s),children:[n.map((u,f)=>p.jsx(wy,{selected:e===u.value,onClick:c(u.value,u.disabled),ref:l(f),label:u.label,disabled:u.disabled,fullWidth:o},u.value)),p.jsx(L,{h:2,w:i.width,absolute:!0,bottom:-1,left:i.left,backgroundColor:"var(--border-accent-primary)",className:V.css({transition:"left 0.2s ease, width 0.2s ease"})})]})};kc.displayName="Tabs";const Sy="_header_446to_8",by={header:Sy},Fc=C.forwardRef(({title:e,subtitle:t,w:n="full",p:o,py:s,px:i="var(--spacing-2xl)",pt:r="var(--spacing-2xl)",pb:a="var(--spacing-lg)",row:l=!0,justifyContent:c="space-between",showCloseButton:u=!1},f)=>{const{onClose:d}=Eu();return p.jsxs(L,{w:n,p:o,py:s,px:i,pt:r,pb:a,row:l,justifyContent:c,ref:f,className:by.header,children:[p.jsxs(L,{gap:"var(--spacing-sm)",children:[p.jsx(K,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:e}),p.jsx(K,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:t})]}),u&&p.jsx(L,{children:p.jsx(Yt,{onClick:d,color:"neutral",children:p.jsx(ba,{})})})]})});Fc.displayName="ModalHeader";function xt(e,t,n){let o=n.initialDeps??[],s,i=!0;function r(){var a,l,c;let u;n.key&&((a=n.debug)!=null&&a.call(n))&&(u=Date.now());const f=e();if(!(f.length!==o.length||f.some((m,g)=>o[g]!==m)))return s;o=f;let h;if(n.key&&((l=n.debug)!=null&&l.call(n))&&(h=Date.now()),s=t(...f),n.key&&((c=n.debug)!=null&&c.call(n))){const m=Math.round((Date.now()-u)*100)/100,g=Math.round((Date.now()-h)*100)/100,y=g/16,x=(w,v)=>{for(w=String(w);w.length<v;)w=" "+w;return w};console.info(`%c⏱ ${x(g,5)} /${x(m,5)} ms`,`
14
10
  font-size: .6rem;
15
11
  font-weight: bold;
16
- color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,n?.key)}return(c=n?.onChange)==null||c.call(n,s),s}return i.updateDeps=r=>{o=r},i}function Br(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Wv=(e,t)=>Math.abs(e-t)<1.01,Gv=(e,t,n)=>{let o;return function(...s){e.clearTimeout(o),o=e.setTimeout(()=>t.apply(this,s),n)}},zr=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Uv=e=>e,Kv=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let s=t;s<=n;s++)o.push(s);return o},qv=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;const s=r=>{const{width:a,height:l}=r;t({width:Math.round(a),height:Math.round(l)})};if(s(zr(n)),!o.ResizeObserver)return()=>{};const i=new o.ResizeObserver(r=>{const a=()=>{const l=r[0];if(l?.borderBoxSize){const c=l.borderBoxSize[0];if(c){s({width:c.inlineSize,height:c.blockSize});return}}s(zr(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},Hr={passive:!0},Wr=typeof window>"u"?!0:"onscrollend"in window,Xv=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;let s=0;const i=e.options.useScrollendEvent&&Wr?()=>{}:Gv(o,()=>{t(s,!1)},e.options.isScrollingResetDelay),r=u=>()=>{const{horizontal:d,isRtl:f}=e.options;s=d?n.scrollLeft*(f&&-1||1):n.scrollTop,i(),t(s,u)},a=r(!0),l=r(!1);l(),n.addEventListener("scroll",a,Hr);const c=e.options.useScrollendEvent&&Wr;return c&&n.addEventListener("scrollend",l,Hr),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",l)}},Yv=(e,t,n)=>{if(t?.borderBoxSize){const o=t.borderBoxSize[0];if(o)return Math.round(o[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Zv=(e,{adjustments:t=0,behavior:n},o)=>{var s,i;const r=e+t;(i=(s=o.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[o.options.horizontal?"left":"top"]:r,behavior:n})};class Jv{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 o=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{const r=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var s;(s=o())==null||s.disconnect(),n=null},observe:s=>{var i;return(i=o())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=o())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([o,s])=>{typeof s>"u"&&delete n[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Uv,rangeExtractor:Kv,onChange:()=>{},measureElement:Yv,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 o,s;(s=(o=this.options).onChange)==null||s.call(o,this,n)},this.maybeNotify=dt(()=>(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 o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.maybeNotify();return}this.scrollElement=o,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,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=i,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,o)=>{const s=new Map,i=new Map;for(let r=o-1;r>=0;r--){const a=n[r];if(s.has(a.lane))continue;const l=i.get(a.lane);if(l==null||a.end>l.end?i.set(a.lane,a):a.end<l.end&&s.set(a.lane,!0),s.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((r,a)=>r.end===a.end?r.index-a.index:r.end-a.end)[0]:void 0},this.getMeasurementOptions=dt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,o,s,i,r)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:o,scrollMargin:s,getItemKey:i,enabled:r}),{key:!1}),this.getMeasurements=dt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:o,scrollMargin:s,getItemKey:i,enabled:r},a)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,l);for(let u=l;u<n;u++){const d=i(u),f=this.options.lanes===1?c[u-1]:this.getFurthestMeasurement(c,u),h=f?f.end+this.options.gap:o+s,m=a.get(d),g=typeof m=="number"?m:this.options.estimateSize(u),p=h+g,w=f?f.lane:u%this.options.lanes;c[u]={index:u,start:h,size:g,end:p,key:d,lane:w}}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=dt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,o,s,i)=>this.range=n.length>0&&o>0?Qv({measurements:n,outerSize:o,scrollOffset:s,lanes:i}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=dt(()=>{let n=null,o=null;const s=this.calculateRange();return s&&(n=s.startIndex,o=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,o]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,o]},(n,o,s,i,r)=>i===null||r===null?[]:n({startIndex:i,endIndex:r,overscan:o,count:s}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const o=this.options.indexAttribute,s=n.getAttribute(o);return s?parseInt(s,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(n,o)=>{const s=this.indexFromElement(n),i=this.measurementsCache[s];if(!i)return;const r=i.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,o,this))},this.resizeItem=(n,o)=>{const s=this.measurementsCache[n];if(!s)return;const i=this.itemSizeCache.get(s.key)??s.size,r=o-i;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,o)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((o,s)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=dt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,o)=>{const s=[];for(let i=0,r=n.length;i<r;i++){const a=n[i],l=o[a];s.push(l)}return s},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const o=this.getMeasurements();if(o.length!==0)return Br(o[lc(0,o.length-1,s=>Br(o[s]).start,n)])},this.getOffsetForAlignment=(n,o,s=0)=>{const i=this.getSize(),r=this.getScrollOffset();o==="auto"&&(o=n>=r+i?"end":"start"),o==="center"?n+=(s-i)/2:o==="end"&&(n-=i);const a=this.getTotalSize()+this.options.scrollMargin-i;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,o="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.measurementsCache[n];if(!s)return;const i=this.getSize(),r=this.getScrollOffset();if(o==="auto")if(s.end>=r+i-this.options.scrollPaddingEnd)o="end";else if(s.start<=r+this.options.scrollPaddingStart)o="start";else return[r,o];const a=o==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,o,s.size),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:o="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,o),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:o="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 i=0;const r=10,a=c=>{if(!this.targetWindow)return;const u=this.getOffsetForIndex(n,c);if(!u){console.warn("Failed to get offset for index:",n);return}const[d,f]=u;this._scrollToOffset(d,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),m=this.getOffsetForIndex(n,f);if(!m){console.warn("Failed to get offset for index:",n);return}Wv(m[0],h)||l(f)})},l=c=>{this.targetWindow&&(i++,i<r?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",i,r),this.targetWindow.requestAnimationFrame(()=>a(c))):console.warn(`Failed to scroll to index ${n} after ${r} attempts.`))};a(o)},this.scrollBy=(n,{behavior:o}={})=>{o==="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:o})},this.getTotalSize=()=>{var n;const o=this.getMeasurements();let s;if(o.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=o[o.length-1])==null?void 0:n.end)??0;else{const i=Array(this.options.lanes).fill(null);let r=o.length-1;for(;r>=0&&i.some(a=>a===null);){const a=o[r];i[a.lane]===null&&(i[a.lane]=a.end),r--}s=Math.max(...i.filter(a=>a!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:o,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const lc=(e,t,n,o)=>{for(;e<=t;){const s=(e+t)/2|0,i=n(s);if(i<o)e=s+1;else if(i>o)t=s-1;else return s}return e>0?e-1:0};function Qv({measurements:e,outerSize:t,scrollOffset:n,lanes:o}){const s=e.length-1,i=l=>e[l].start;if(e.length<=o)return{startIndex:0,endIndex:s};let r=lc(0,s,i,n),a=r;if(o===1)for(;a<s&&e[a].end<n+t;)a++;else if(o>1){const l=Array(o).fill(0);for(;a<s&&l.some(u=>u<n+t);){const u=e[a];l[u.lane]=u.end,a++}const c=Array(o).fill(n+t);for(;r>=0&&c.some(u=>u>=n);){const u=e[r];c[u.lane]=u.start,r--}r=Math.max(0,r-r%o),a=Math.min(s,a+(o-1-a%o))}return{startIndex:r,endIndex:a}}const Gr=typeof document<"u"?b.useLayoutEffect:b.useEffect;function ey(e){const t=b.useReducer(()=>({}),{})[1],n={...e,onChange:(s,i)=>{var r;i?fs.flushSync(t):t(),(r=e.onChange)==null||r.call(e,s,i)}},[o]=b.useState(()=>new Jv(n));return o.setOptions(n),Gr(()=>o._didMount(),[]),Gr(()=>o._willUpdate()),o}function ty(e){return ey({observeElementRect:qv,observeElementOffset:Xv,scrollToFn:Zv,...e})}const ny="_main_1qx2l_8",Ur={main:ny},cc=C.forwardRef(({children:e,className:t,row:n=!1,estimatedItemHeight:o=100,virtualize:s=!1,maxHeight:i=448},r)=>{const a=C.useRef(null),l=C.useMemo(()=>C.Children.toArray(e),[e]),c=ty({count:l.length,getScrollElement:()=>a.current,estimateSize:()=>o,measureElement:d=>d.getBoundingClientRect().height});return C.useImperativeHandle(r,()=>({scrollToTop:()=>c.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>c.scrollToOffset(c.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(d,f={})=>c.scrollToIndex(d,{behavior:"smooth",...f}),scrollToOffset:(d,f={})=>c.scrollToOffset(d,{behavior:"smooth",...f}),scrollBy:d=>{const f=c.scrollOffset||0;c.scrollToOffset(f+d,{behavior:"smooth"})},getElement:()=>a.current,getScrollOffset:()=>c.scrollOffset||0,getTotalSize:()=>c.getTotalSize()}),[c]),C.useMemo(()=>s||l.length>50,[s,l])&&l.length>0?y.jsx(I,{ref:a,row:n,maxHeight:i,className:k.cx(Ur.main,t),w:"full",p:"var(--spacing-2xl)",children:y.jsx(I,{relative:!0,h:c.getTotalSize(),children:c.getVirtualItems().map(d=>y.jsx(I,{"data-index":d.index,ref:c.measureElement,w:"full",absolute:!0,style:{top:0,left:0,transform:`translateY(${d.start}px)`},children:l[d.index]},d.key))})}):y.jsx(I,{ref:a,className:k.cx(Ur.main,t),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:y.jsx(I,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:e})})});cc.displayName="ModalMain";const Kn=ta;Kn.Header=ac;Kn.Main=cc;Kn.Footer=na;const uc=C.createContext(null),oy=()=>C.useContext(uc),qn=({children:e})=>{const[t,n]=C.useState(null),o=oy();return C.useEffect(()=>{if(typeof document>"u")return;const s=o?.current??document.body;if(!s)return;let i=s.querySelector("[data-portal-root]")??void 0;i||(i=document.createElement("div"),i.setAttribute("data-portal-root","true"),s.appendChild(i)),n(i)},[o]),t?fs.createPortal(e,t):null};/**
17
- * table-core
18
- *
19
- * Copyright (c) TanStack
20
- *
21
- * This source code is licensed under the MIT license found in the
22
- * LICENSE.md file in the root directory of this source tree.
23
- *
24
- * @license MIT
25
- */function dc(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function qe(e,t){return typeof e=="function"?e(t):e}function Ce(e,t){return n=>{t.setState(o=>({...o,[e]:qe(n,o[e])}))}}function Xn(e){return e instanceof Function}function sy(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function iy(e,t){const n=[],o=s=>{s.forEach(i=>{n.push(i);const r=t(i);r!=null&&r.length&&o(r)})};return o(e),n}function H(e,t,n){let o=[],s;return i=>{let r;n.key&&n.debug&&(r=Date.now());const a=e(i);if(!(a.length!==o.length||a.some((u,d)=>o[d]!==u)))return s;o=a;let c;if(n.key&&n.debug&&(c=Date.now()),s=t(...a),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-r)*100)/100,d=Math.round((Date.now()-c)*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(u,5)} ms`,`
12
+ color: hsl(${Math.max(0,Math.min(120-120*y,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(i&&n.skipInitialOnChange)&&n.onChange(s),i=!1,s}return r.updateDeps=a=>{o=a},r}function ra(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const _y=(e,t)=>Math.abs(e-t)<1.01,Ry=(e,t,n)=>{let o;return function(...s){e.clearTimeout(o),o=e.setTimeout(()=>t.apply(this,s),n)}},aa=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Ey=e=>e,Py=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let s=t;s<=n;s++)o.push(s);return o},My=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;const s=r=>{const{width:a,height:l}=r;t({width:Math.round(a),height:Math.round(l)})};if(s(aa(n)),!o.ResizeObserver)return()=>{};const i=new o.ResizeObserver(r=>{const a=()=>{const l=r[0];if(l?.borderBoxSize){const c=l.borderBoxSize[0];if(c){s({width:c.inlineSize,height:c.blockSize});return}}s(aa(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},la={passive:!0},ca=typeof window>"u"?!0:"onscrollend"in window,Ty=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;let s=0;const i=e.options.useScrollendEvent&&ca?()=>{}:Ry(o,()=>{t(s,!1)},e.options.isScrollingResetDelay),r=u=>()=>{const{horizontal:f,isRtl:d}=e.options;s=f?n.scrollLeft*(d&&-1||1):n.scrollTop,i(),t(s,u)},a=r(!0),l=r(!1);l(),n.addEventListener("scroll",a,la);const c=e.options.useScrollendEvent&&ca;return c&&n.addEventListener("scrollend",l,la),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",l)}},Ay=(e,t,n)=>{if(t?.borderBoxSize){const o=t.borderBoxSize[0];if(o)return Math.round(o[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Vy=(e,{adjustments:t=0,behavior:n},o)=>{var s,i;const r=e+t;(i=(s=o.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[o.options.horizontal?"left":"top"]:r,behavior:n})};class Dy{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const o=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{const r=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var s;(s=o())==null||s.disconnect(),n=null},observe:s=>{var i;return(i=o())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=o())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([o,s])=>{typeof s>"u"&&delete n[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Ey,rangeExtractor:Py,onChange:()=>{},measureElement:Ay,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 o,s;(s=(o=this.options).onChange)==null||s.call(o,this,n)},this.maybeNotify=xt(()=>(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 o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.maybeNotify();return}this.scrollElement=o,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,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=i,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,o)=>{const s=new Map,i=new Map;for(let r=o-1;r>=0;r--){const a=n[r];if(s.has(a.lane))continue;const l=i.get(a.lane);if(l==null||a.end>l.end?i.set(a.lane,a):a.end<l.end&&s.set(a.lane,!0),s.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((r,a)=>r.end===a.end?r.index-a.index:r.end-a.end)[0]:void 0},this.getMeasurementOptions=xt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,o,s,i,r,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:o,scrollMargin:s,getItemKey:i,enabled:r,lanes:a}),{key:!1,skipInitialOnChange:!0,onChange:()=>{this.notify(this.isScrolling)}}),this.getMeasurements=xt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:o,scrollMargin:s,getItemKey:i,enabled:r,lanes:a},l)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const d of this.laneAssignments.keys())d>=n&&this.laneAssignments.delete(d);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(d=>{this.itemSizeCache.set(d.key,d.size)}));const c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const u=this.measurementsCache.slice(0,c),f=new Array(a).fill(void 0);for(let d=0;d<c;d++){const h=u[d];h&&(f[h.lane]=d)}for(let d=c;d<n;d++){const h=i(d),m=this.laneAssignments.get(d);let g,y;if(m!==void 0&&this.options.lanes>1){g=m;const b=f[g],S=b!==void 0?u[b]:void 0;y=S?S.end+this.options.gap:o+s}else{const b=this.options.lanes===1?u[d-1]:this.getFurthestMeasurement(u,d);y=b?b.end+this.options.gap:o+s,g=b?b.lane:d%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(d,g)}const x=l.get(h),w=typeof x=="number"?x:this.options.estimateSize(d),v=y+w;u[d]={index:d,start:y,size:w,end:v,key:h,lane:g},f[g]=d}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=xt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,o,s,i)=>this.range=n.length>0&&o>0?ky({measurements:n,outerSize:o,scrollOffset:s,lanes:i}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=xt(()=>{let n=null,o=null;const s=this.calculateRange();return s&&(n=s.startIndex,o=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,o]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,o]},(n,o,s,i,r)=>i===null||r===null?[]:n({startIndex:i,endIndex:r,overscan:o,count:s}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const o=this.options.indexAttribute,s=n.getAttribute(o);return s?parseInt(s,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(n,o)=>{const s=this.indexFromElement(n),i=this.measurementsCache[s];if(!i)return;const r=i.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,o,this))},this.resizeItem=(n,o)=>{const s=this.measurementsCache[n];if(!s)return;const i=this.itemSizeCache.get(s.key)??s.size,r=o-i;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,o)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((o,s)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=xt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,o)=>{const s=[];for(let i=0,r=n.length;i<r;i++){const a=n[i],l=o[a];s.push(l)}return s},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const o=this.getMeasurements();if(o.length!==0)return ra(o[Lc(0,o.length-1,s=>ra(o[s]).start,n)])},this.getOffsetForAlignment=(n,o,s=0)=>{const i=this.getSize(),r=this.getScrollOffset();o==="auto"&&(o=n>=r+i?"end":"start"),o==="center"?n+=(s-i)/2:o==="end"&&(n-=i);const a=this.getTotalSize()+this.options.scrollMargin-i;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,o="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.measurementsCache[n];if(!s)return;const i=this.getSize(),r=this.getScrollOffset();if(o==="auto")if(s.end>=r+i-this.options.scrollPaddingEnd)o="end";else if(s.start<=r+this.options.scrollPaddingStart)o="start";else return[r,o];const a=o==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,o,s.size),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:o="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,o),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:o="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 i=0;const r=10,a=c=>{if(!this.targetWindow)return;const u=this.getOffsetForIndex(n,c);if(!u){console.warn("Failed to get offset for index:",n);return}const[f,d]=u;this._scrollToOffset(f,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),m=this.getOffsetForIndex(n,d);if(!m){console.warn("Failed to get offset for index:",n);return}_y(m[0],h)||l(d)})},l=c=>{this.targetWindow&&(i++,i<r?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",i,r),this.targetWindow.requestAnimationFrame(()=>a(c))):console.warn(`Failed to scroll to index ${n} after ${r} attempts.`))};a(o)},this.scrollBy=(n,{behavior:o}={})=>{o==="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:o})},this.getTotalSize=()=>{var n;const o=this.getMeasurements();let s;if(o.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=o[o.length-1])==null?void 0:n.end)??0;else{const i=Array(this.options.lanes).fill(null);let r=o.length-1;for(;r>=0&&i.some(a=>a===null);){const a=o[r];i[a.lane]===null&&(i[a.lane]=a.end),r--}s=Math.max(...i.filter(a=>a!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:o,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}}const Lc=(e,t,n,o)=>{for(;e<=t;){const s=(e+t)/2|0,i=n(s);if(i<o)e=s+1;else if(i>o)t=s-1;else return s}return e>0?e-1:0};function ky({measurements:e,outerSize:t,scrollOffset:n,lanes:o}){const s=e.length-1,i=l=>e[l].start;if(e.length<=o)return{startIndex:0,endIndex:s};let r=Lc(0,s,i,n),a=r;if(o===1)for(;a<s&&e[a].end<n+t;)a++;else if(o>1){const l=Array(o).fill(0);for(;a<s&&l.some(u=>u<n+t);){const u=e[a];l[u.lane]=u.end,a++}const c=Array(o).fill(n+t);for(;r>=0&&c.some(u=>u>=n);){const u=e[r];c[u.lane]=u.start,r--}r=Math.max(0,r-r%o),a=Math.min(s,a+(o-1-a%o))}return{startIndex:r,endIndex:a}}const ua=typeof document<"u"?_.useLayoutEffect:_.useEffect;function Fy(e){const t=_.useReducer(()=>({}),{})[1],n={...e,onChange:(s,i)=>{var r;i?Ss.flushSync(t):t(),(r=e.onChange)==null||r.call(e,s,i)}},[o]=_.useState(()=>new Dy(n));return o.setOptions(n),ua(()=>o._didMount(),[]),ua(()=>o._willUpdate()),o}function Ly(e){return Fy({observeElementRect:My,observeElementOffset:Ty,scrollToFn:Vy,...e})}const Iy="_main_1qx2l_8",da={main:Iy},Ic=C.forwardRef(({children:e,className:t,row:n=!1,estimatedItemHeight:o=100,virtualize:s=!1,maxHeight:i=448},r)=>{const a=C.useRef(null),l=C.useMemo(()=>C.Children.toArray(e),[e]),c=Ly({count:l.length,getScrollElement:()=>a.current,estimateSize:()=>o,measureElement:f=>f.getBoundingClientRect().height});return C.useImperativeHandle(r,()=>({scrollToTop:()=>c.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>c.scrollToOffset(c.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(f,d={})=>c.scrollToIndex(f,{behavior:"smooth",...d}),scrollToOffset:(f,d={})=>c.scrollToOffset(f,{behavior:"smooth",...d}),scrollBy:f=>{const d=c.scrollOffset||0;c.scrollToOffset(d+f,{behavior:"smooth"})},getElement:()=>a.current,getScrollOffset:()=>c.scrollOffset||0,getTotalSize:()=>c.getTotalSize()}),[c]),C.useMemo(()=>s||l.length>50,[s,l])&&l.length>0?p.jsx(L,{ref:a,row:n,maxHeight:i,className:V.cx(da.main,t),w:"full",p:"var(--spacing-2xl)",children:p.jsx(L,{relative:!0,h:c.getTotalSize(),children:c.getVirtualItems().map(f=>p.jsx(L,{"data-index":f.index,ref:c.measureElement,w:"full",absolute:!0,style:{top:0,left:0,transform:`translateY(${f.start}px)`},children:l[f.index]},f.key))})}):p.jsx(L,{ref:a,className:V.cx(da.main,t),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:p.jsx(L,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:e})})});Ic.displayName="ModalMain";const to=Ra;to.Header=Fc;to.Main=Ic;to.Footer=Ea;const jc=C.createContext(null),jy=()=>C.useContext(jc),un=({children:e})=>{const[t,n]=C.useState(null),o=jy();return C.useEffect(()=>{if(typeof document>"u")return;const s=o?.current??document.body;if(!s)return;let i=s.querySelector("[data-portal-root]")??void 0;i||(i=document.createElement("div"),i.setAttribute("data-portal-root","true"),s.appendChild(i)),n(i)},[o]),t?Ss.createPortal(e,t):null};function $c(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Je(e,t){return typeof e=="function"?e(t):e}function be(e,t){return n=>{t.setState(o=>({...o,[e]:Je(n,o[e])}))}}function no(e){return e instanceof Function}function $y(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Oy(e,t){const n=[],o=s=>{s.forEach(i=>{n.push(i);const r=t(i);r!=null&&r.length&&o(r)})};return o(e),n}function H(e,t,n){let o=[],s;return i=>{let r;n.key&&n.debug&&(r=Date.now());const a=e(i);if(!(a.length!==o.length||a.some((u,f)=>o[f]!==u)))return s;o=a;let c;if(n.key&&n.debug&&(c=Date.now()),s=t(...a),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-r)*100)/100,f=Math.round((Date.now()-c)*100)/100,d=f/16,h=(m,g)=>{for(m=String(m);m.length<g;)m=" "+m;return m};console.info(`%c⏱ ${h(f,5)} /${h(u,5)} ms`,`
26
13
  font-size: .6rem;
27
14
  font-weight: bold;
28
- color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n?.key)}return s}}function W(e,t,n,o){return{debug:()=>{var s;return(s=e?.debugAll)!=null?s:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:o}}function ry(e,t,n,o){const s=()=>{var r;return(r=i.getValue())!=null?r:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(o),renderValue:s,getContext:H(()=>[e,n,t,i],(r,a,l,c)=>({table:r,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),W(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{r.createCell==null||r.createCell(i,n,t,e)},{}),i}function ay(e,t,n,o){var s,i;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(s=(i=a.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?s:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=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}:u=f=>f[a.accessorKey]),!c)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(c)}`,accessorFn:u,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:H(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},W(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:H(()=>[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]},W(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(d,e);return d}const de="debugHeaders";function Kr(e,t,n){var o;let i={id:(o=n.id)!=null?o: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(i),r},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(i,e)}),i}const ly={createTable:e=>{e.getHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,s)=>{var i,r;const a=(i=o?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?i:[],l=(r=s?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?r:[],c=n.filter(d=>!(o!=null&&o.includes(d.id))&&!(s!=null&&s.includes(d.id)));return mn(t,[...a,...c,...l],e)},W(e.options,de,"getHeaderGroups")),e.getCenterHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,s)=>(n=n.filter(i=>!(o!=null&&o.includes(i.id))&&!(s!=null&&s.includes(i.id))),mn(t,n,e,"center")),W(e.options,de,"getCenterHeaderGroups")),e.getLeftHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,o)=>{var s;const i=(s=o?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return mn(t,i,e,"left")},W(e.options,de,"getLeftHeaderGroups")),e.getRightHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,o)=>{var s;const i=(s=o?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return mn(t,i,e,"right")},W(e.options,de,"getRightHeaderGroups")),e.getFooterGroups=H(()=>[e.getHeaderGroups()],t=>[...t].reverse(),W(e.options,de,"getFooterGroups")),e.getLeftFooterGroups=H(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),W(e.options,de,"getLeftFooterGroups")),e.getCenterFooterGroups=H(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),W(e.options,de,"getCenterFooterGroups")),e.getRightFooterGroups=H(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),W(e.options,de,"getRightFooterGroups")),e.getFlatHeaders=H(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,de,"getFlatHeaders")),e.getLeftFlatHeaders=H(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,de,"getLeftFlatHeaders")),e.getCenterFlatHeaders=H(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,de,"getCenterFlatHeaders")),e.getRightFlatHeaders=H(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,de,"getRightFlatHeaders")),e.getCenterLeafHeaders=H(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,de,"getCenterLeafHeaders")),e.getLeftLeafHeaders=H(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,de,"getLeftLeafHeaders")),e.getRightLeafHeaders=H(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,de,"getRightLeafHeaders")),e.getLeafHeaders=H(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,o)=>{var s,i,r,a,l,c;return[...(s=(i=t[0])==null?void 0:i.headers)!=null?s:[],...(r=(a=n[0])==null?void 0:a.headers)!=null?r:[],...(l=(c=o[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},W(e.options,de,"getLeafHeaders"))}};function mn(e,t,n,o){var s,i;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 c=(f,h)=>{const m={depth:h,id:[o,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];f.forEach(p=>{const w=[...g].reverse()[0],x=p.column.depth===m.depth;let v,S=!1;if(x&&p.column.parent?v=p.column.parent:(v=p.column,S=!0),w&&w?.column===v)w.subHeaders.push(p);else{const _=Kr(n,v,{id:[o,h,v.id,p?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${g.filter(P=>P.column===v).length}`:void 0,depth:h,index:g.length});_.subHeaders.push(p),g.push(_)}m.headers.push(p),p.headerGroup=m}),l.push(m),h>0&&c(g,h-1)},u=t.map((f,h)=>Kr(n,f,{depth:r,index:h}));c(u,r-1),l.reverse();const d=f=>f.filter(m=>m.column.getIsVisible()).map(m=>{let g=0,p=0,w=[0];m.subHeaders&&m.subHeaders.length?(w=[],d(m.subHeaders).forEach(v=>{let{colSpan:S,rowSpan:_}=v;g+=S,w.push(_)})):g=1;const x=Math.min(...w);return p=p+x,m.colSpan=g,m.rowSpan=p,{colSpan:g,rowSpan:p}});return d((s=(i=l[0])==null?void 0:i.headers)!=null?s:[]),l}const cy=(e,t,n,o,s,i,r)=>{let a={id:t,index:o,original:n,depth:s,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,o),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,o),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>iy(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:H(()=>[e.getAllLeafColumns()],l=>l.map(c=>ry(e,a,c,c.id)),W(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:H(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),W(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(a,e)}return a},uy={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()}}},fc=(e,t,n)=>{var o,s;const i=n==null||(o=n.toString())==null?void 0:o.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(i))};fc.autoRemove=e=>De(e);const hc=(e,t,n)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(n))};hc.autoRemove=e=>De(e);const gc=(e,t,n)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===n?.toLowerCase()};gc.autoRemove=e=>De(e);const mc=(e,t,n)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(n)};mc.autoRemove=e=>De(e);const pc=(e,t,n)=>!n.some(o=>{var s;return!((s=e.getValue(t))!=null&&s.includes(o))});pc.autoRemove=e=>De(e)||!(e!=null&&e.length);const vc=(e,t,n)=>n.some(o=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(o)});vc.autoRemove=e=>De(e)||!(e!=null&&e.length);const yc=(e,t,n)=>e.getValue(t)===n;yc.autoRemove=e=>De(e);const wc=(e,t,n)=>e.getValue(t)==n;wc.autoRemove=e=>De(e);const ei=(e,t,n)=>{let[o,s]=n;const i=e.getValue(t);return i>=o&&i<=s};ei.resolveFilterValue=e=>{let[t,n]=e,o=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(o)?-1/0:o,r=n===null||Number.isNaN(s)?1/0:s;if(i>r){const a=i;i=r,r=a}return[i,r]};ei.autoRemove=e=>De(e)||De(e[0])&&De(e[1]);const $e={includesString:fc,includesStringSensitive:hc,equalsString:gc,arrIncludes:mc,arrIncludesAll:pc,arrIncludesSome:vc,equals:yc,weakEquals:wc,inNumberRange:ei};function De(e){return e==null||e===""}const dy={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ce("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=n?.getValue(e.id);return typeof o=="string"?$e.includesString:typeof o=="number"?$e.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?$e.equals:Array.isArray(o)?$e.arrIncludes:$e.weakEquals},e.getFilterFn=()=>{var n,o;return Xn(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(o=t.options.filterFns)==null?void 0:o[e.columnDef.filterFn])!=null?n:$e[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,o,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((o=t.options.enableColumnFilters)!=null?o:!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(o=>o.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,o;return(n=(o=t.getState().columnFilters)==null?void 0:o.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(o=>{const s=e.getFilterFn(),i=o?.find(u=>u.id===e.id),r=qe(n,i?i.value:void 0);if(qr(s,r,e)){var a;return(a=o?.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:r};if(i){var c;return(c=o?.map(u=>u.id===e.id?l:u))!=null?c:[]}return o!=null&&o.length?[...o,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),o=s=>{var i;return(i=qe(t,s))==null?void 0:i.filter(r=>{const a=n.find(l=>l.id===r.id);if(a){const l=a.getFilterFn();if(qr(l,r.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(o)},e.resetColumnFilters=t=>{var n,o;e.setColumnFilters(t?[]:(n=(o=e.initialState)==null?void 0:o.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 qr(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const fy=(e,t,n)=>n.reduce((o,s)=>{const i=s.getValue(e);return o+(typeof i=="number"?i:0)},0),hy=(e,t,n)=>{let o;return n.forEach(s=>{const i=s.getValue(e);i!=null&&(o>i||o===void 0&&i>=i)&&(o=i)}),o},gy=(e,t,n)=>{let o;return n.forEach(s=>{const i=s.getValue(e);i!=null&&(o<i||o===void 0&&i>=i)&&(o=i)}),o},my=(e,t,n)=>{let o,s;return n.forEach(i=>{const r=i.getValue(e);r!=null&&(o===void 0?r>=r&&(o=s=r):(o>r&&(o=r),s<r&&(s=r)))}),[o,s]},py=(e,t)=>{let n=0,o=0;if(t.forEach(s=>{let i=s.getValue(e);i!=null&&(i=+i)>=i&&(++n,o+=i)}),n)return o/n},vy=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!sy(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),s=n.sort((i,r)=>i-r);return n.length%2!==0?s[o]:(s[o-1]+s[o])/2},yy=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),wy=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,xy=(e,t)=>t.length,Ro={sum:fy,min:hy,max:gy,extent:my,mean:py,median:vy,unique:yy,uniqueCount:wy,count:xy},Cy={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:Ce("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(o=>o!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,o;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((o=t.options.enableGrouping)!=null?o:!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],o=n?.getValue(e.id);if(typeof o=="number")return Ro.sum;if(Object.prototype.toString.call(o)==="[object Date]")return Ro.extent},e.getAggregationFn=()=>{var n,o;if(!e)throw new Error;return Xn(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(o=t.options.aggregationFns)==null?void 0:o[e.columnDef.aggregationFn])!=null?n:Ro[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,o;e.setGrouping(t?[]:(n=(o=e.initialState)==null?void 0:o.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 o=t.getColumn(n);return o!=null&&o.columnDef.getGroupingValue?(e._groupingValuesCache[n]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,o)=>{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 Sy(e,t,n){if(!(t!=null&&t.length)||!n)return e;const o=e.filter(i=>!t.includes(i.id));return n==="remove"?o:[...t.map(i=>e.find(r=>r.id===i)).filter(Boolean),...o]}const by={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ce("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=H(n=>[zt(t,n)],n=>n.findIndex(o=>o.id===e.id),W(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var o;return((o=zt(t,n)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=n=>{var o;const s=zt(t,n);return((o=s[s.length-1])==null?void 0:o.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=H(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,o)=>s=>{let i=[];if(!(t!=null&&t.length))i=s;else{const r=[...t],a=[...s];for(;a.length&&r.length;){const l=r.shift(),c=a.findIndex(u=>u.id===l);c>-1&&i.push(a.splice(c,1)[0])}i=[...i,...a]}return Sy(i,n,o)},W(e.options,"debugTable","_getOrderColumnsFn"))}},Eo=()=>({left:[],right:[]}),_y={getInitialState:e=>({columnPinning:Eo(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ce("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const o=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var i,r;if(n==="right"){var a,l;return{left:((a=s?.left)!=null?a:[]).filter(d=>!(o!=null&&o.includes(d))),right:[...((l=s?.right)!=null?l:[]).filter(d=>!(o!=null&&o.includes(d))),...o]}}if(n==="left"){var c,u;return{left:[...((c=s?.left)!=null?c:[]).filter(d=>!(o!=null&&o.includes(d))),...o],right:((u=s?.right)!=null?u:[]).filter(d=>!(o!=null&&o.includes(d)))}}return{left:((i=s?.left)!=null?i:[]).filter(d=>!(o!=null&&o.includes(d))),right:((r=s?.right)!=null?r:[]).filter(d=>!(o!=null&&o.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var s,i,r;return((s=o.columnDef.enablePinning)!=null?s:!0)&&((i=(r=t.options.enableColumnPinning)!=null?r:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:o,right:s}=t.getState().columnPinning,i=n.some(a=>o?.includes(a)),r=n.some(a=>s?.includes(a));return i?"left":r?"right":!1},e.getPinnedIndex=()=>{var n,o;const s=e.getIsPinned();return s?(n=(o=t.getState().columnPinning)==null||(o=o[s])==null?void 0:o.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,o,s)=>{const i=[...o??[],...s??[]];return n.filter(r=>!i.includes(r.column.id))},W(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,o)=>(o??[]).map(i=>n.find(r=>r.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),W(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,o)=>(o??[]).map(i=>n.find(r=>r.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),W(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,o;return e.setColumnPinning(t?Eo():(n=(o=e.initialState)==null?void 0:o.columnPinning)!=null?n:Eo())},e.getIsSomeColumnsPinned=t=>{var n;const o=e.getState().columnPinning;if(!t){var s,i;return!!((s=o.left)!=null&&s.length||(i=o.right)!=null&&i.length)}return!!((n=o[t])!=null&&n.length)},e.getLeftLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(o=>t.find(s=>s.id===o)).filter(Boolean),W(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(o=>t.find(s=>s.id===o)).filter(Boolean),W(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o)=>{const s=[...n??[],...o??[]];return t.filter(i=>!s.includes(i.id))},W(e.options,"debugColumns","getCenterLeafColumns"))}};function Ry(e){return e||(typeof document<"u"?document:null)}const pn={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Mo=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Ey={getDefaultColumnDef:()=>pn,getInitialState:e=>({columnSizing:{},columnSizingInfo:Mo(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ce("columnSizing",e),onColumnSizingInfoChange:Ce("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,o,s;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:pn.minSize,(o=i??e.columnDef.size)!=null?o:pn.size),(s=e.columnDef.maxSize)!=null?s:pn.maxSize)},e.getStart=H(n=>[n,zt(t,n),t.getState().columnSizing],(n,o)=>o.slice(0,e.getIndex(n)).reduce((s,i)=>s+i.getSize(),0),W(t.options,"debugColumns","getStart")),e.getAfter=H(n=>[n,zt(t,n),t.getState().columnSizing],(n,o)=>o.slice(e.getIndex(n)+1).reduce((s,i)=>s+i.getSize(),0),W(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:o,...s}=n;return s})},e.getCanResize=()=>{var n,o;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((o=t.options.enableColumnResizing)!=null?o:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const o=s=>{if(s.subHeaders.length)s.subHeaders.forEach(o);else{var i;n+=(i=s.column.getSize())!=null?i:0}};return o(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 o=t.getColumn(e.column.id),s=o?.getCanResize();return i=>{if(!o||!s||(i.persist==null||i.persist(),Po(i)&&i.touches&&i.touches.length>1))return;const r=e.getSize(),a=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[o.id,o.getSize()]],l=Po(i)?Math.round(i.touches[0].clientX):i.clientX,c={},u=(w,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(v=>{var S,_;const P=t.options.columnResizeDirection==="rtl"?-1:1,V=(x-((S=v?.startOffset)!=null?S:0))*P,M=Math.max(V/((_=v?.startSize)!=null?_:0),-.999999);return v.columnSizingStart.forEach(A=>{let[F,$]=A;c[F]=Math.round(Math.max($+$*M,0)*100)/100}),{...v,deltaOffset:V,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(v=>({...v,...c})))},d=w=>u("move",w),f=w=>{u("end",w),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=Ry(n),m={moveHandler:w=>d(w.clientX),upHandler:w=>{h?.removeEventListener("mousemove",m.moveHandler),h?.removeEventListener("mouseup",m.upHandler),f(w.clientX)}},g={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),d(w.touches[0].clientX),!1),upHandler:w=>{var x;h?.removeEventListener("touchmove",g.moveHandler),h?.removeEventListener("touchend",g.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),f((x=w.touches[0])==null?void 0:x.clientX)}},p=My()?{passive:!1}:!1;Po(i)?(h?.addEventListener("touchmove",g.moveHandler,p),h?.addEventListener("touchend",g.upHandler,p)):(h?.addEventListener("mousemove",m.moveHandler,p),h?.addEventListener("mouseup",m.upHandler,p)),t.setColumnSizingInfo(w=>({...w,startOffset:l,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:o.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?Mo():(n=e.initialState.columnSizingInfo)!=null?n:Mo())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0}}};let vn=null;function My(){if(typeof vn=="boolean")return vn;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 vn=e,vn}function Po(e){return e.type==="touchstart"}const Py={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ce("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(o=>({...o,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,o;const s=e.columns;return(n=s.length?s.some(i=>i.getIsVisible()):(o=t.getState().columnVisibility)==null?void 0:o[e.id])!=null?n:!0},e.getCanHide=()=>{var n,o;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((o=t.options.enableHiding)!=null?o:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=H(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),W(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=H(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,o,s)=>[...n,...o,...s],W(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,o)=>H(()=>[o(),o().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),W(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 o;e.setColumnVisibility(n?{}:(o=e.initialState.columnVisibility)!=null?o:{})},e.toggleAllColumnsVisible=n=>{var o;n=(o=n)!=null?o:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,i)=>({...s,[i.id]:n||!(i.getCanHide!=null&&i.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 o;e.toggleAllColumnsVisible((o=n.target)==null?void 0:o.checked)}}};function zt(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Ty={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()}}},Vy={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ce("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const o=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,o,s,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=t.options.enableGlobalFilter)!=null?o:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>$e.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:o}=e.options;return Xn(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[o])!=null?t:$e[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Ay={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ce("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var o,s;if(!t){e._queue(()=>{t=!0});return}if((o=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?o:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=o=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(o),e.toggleAllRowsExpanded=o=>{o??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=o=>{var s,i;e.setExpanded(o?{}:(s=(i=e.initialState)==null?void 0:i.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const o=e.getState().expanded;return o===!0||Object.values(o).some(Boolean)},e.getIsAllRowsExpanded=()=>{const o=e.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const r=i.split(".");o=Math.max(o,r.length)}),o},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(o=>{var s;const i=o===!0?!0:!!(o!=null&&o[e.id]);let r={};if(o===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{r[a]=!0}):r=o,n=(s=n)!=null?s:!i,!i&&n)return{...r,[e.id]:!0};if(i&&!n){const{[e.id]:a,...l}=r;return l}return o})},e.getIsExpanded=()=>{var n;const o=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:o===!0||o?.[e.id])},e.getCanExpand=()=>{var n,o,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((o=t.options.enableExpanding)!=null?o:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,o=e;for(;n&&o.parentId;)o=t.getRow(o.parentId,!0),n=o.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},rs=0,as=10,To=()=>({pageIndex:rs,pageSize:as}),Dy={getInitialState:e=>({...e,pagination:{...To(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ce("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var o,s;if(!t){e._queue(()=>{t=!0});return}if((o=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=o=>{const s=i=>qe(o,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=o=>{var s;e.setPagination(o?To():(s=e.initialState.pagination)!=null?s:To())},e.setPageIndex=o=>{e.setPagination(s=>{let i=qe(o,s.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,r)),{...s,pageIndex:i}})},e.resetPageIndex=o=>{var s,i;e.setPageIndex(o?rs:(s=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?s:rs)},e.resetPageSize=o=>{var s,i;e.setPageSize(o?as:(s=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?s:as)},e.setPageSize=o=>{e.setPagination(s=>{const i=Math.max(1,qe(o,s.pageSize)),r=s.pageSize*s.pageIndex,a=Math.floor(r/i);return{...s,pageIndex:a,pageSize:i}})},e.setPageCount=o=>e.setPagination(s=>{var i;let r=qe(o,(i=e.options.pageCount)!=null?i:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...s,pageCount:r}}),e.getPageOptions=H(()=>[e.getPageCount()],o=>{let s=[];return o&&o>0&&(s=[...new Array(o)].fill(null).map((i,r)=>r)),s},W(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:o}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:o<s-1},e.previousPage=()=>e.setPageIndex(o=>o-1),e.nextPage=()=>e.setPageIndex(o=>o+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 o;return(o=e.options.pageCount)!=null?o:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var o;return(o=e.options.rowCount)!=null?o:e.getPrePaginationRowModel().rows.length}}},Vo=()=>({top:[],bottom:[]}),ky={getInitialState:e=>({rowPinning:Vo(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ce("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,o,s)=>{const i=o?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],r=s?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...r,e.id,...i]);t.setRowPinning(l=>{var c,u;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:((c=l?.top)!=null?c:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((u=l?.bottom)!=null?u:[]).filter(g=>!(a!=null&&a.has(g)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:s}=t.options;return typeof o=="function"?o(e):(n=o??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:o,bottom:s}=t.getState().rowPinning,i=n.some(a=>o?.includes(a)),r=n.some(a=>s?.includes(a));return i?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var n,o;const s=e.getIsPinned();if(!s)return-1;const i=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(r=>{let{id:a}=r;return a});return(o=i?.indexOf(e.id))!=null?o:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,o;return e.setRowPinning(t?Vo():(n=(o=e.initialState)==null?void 0:o.rowPinning)!=null?n:Vo())},e.getIsSomeRowsPinned=t=>{var n;const o=e.getState().rowPinning;if(!t){var s,i;return!!((s=o.top)!=null&&s.length||(i=o.bottom)!=null&&i.length)}return!!((n=o[t])!=null&&n.length)},e._getPinnedRows=(t,n,o)=>{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:o}))},e.getTopRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),W(e.options,"debugRows","getTopRows")),e.getBottomRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),W(e.options,"debugRows","getBottomRows")),e.getCenterRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,o)=>{const s=new Set([...n??[],...o??[]]);return t.filter(i=>!s.has(i.id))},W(e.options,"debugRows","getCenterRows"))}},Fy={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ce("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 o={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(i=>{i.getCanSelect()&&(o[i.id]=!0)}):s.forEach(i=>{delete o[i.id]}),o})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(i=>{ls(s,i.id,o,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=H(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Ao(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=H(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Ao(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=H(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Ao(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let o=!!(t.length&&Object.keys(n).length);return o&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let o=!!t.length;return o&&t.some(s=>!n[s.id])&&(o=!1),o},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,o)=>{const s=e.getIsSelected();t.setRowSelection(i=>{var r;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return i;const a={...i};return ls(a,e.id,n,(r=o?.selectChildren)!=null?r:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return ti(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return cs(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return cs(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 o=>{var s;n&&e.toggleSelected((s=o.target)==null?void 0:s.checked)}}}},ls=(e,t,n,o,s)=>{var i;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],o&&(i=r.subRows)!=null&&i.length&&r.getCanSelectSubRows()&&r.subRows.forEach(a=>ls(e,a.id,n,o,s))};function Ao(e,t){const n=e.getState().rowSelection,o=[],s={},i=function(r,a){return r.map(l=>{var c;const u=ti(l,n);if(u&&(o.push(l),s[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:i(l.subRows)}),u)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:o,rowsById:s}}function ti(e,t){var n;return(n=t[e.id])!=null?n:!1}function cs(e,t,n){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let s=!0,i=!1;return e.subRows.forEach(r=>{if(!(i&&!s)&&(r.getCanSelect()&&(ti(r,t)?i=!0:s=!1),r.subRows&&r.subRows.length)){const a=cs(r,t);a==="all"?i=!0:(a==="some"&&(i=!0),s=!1)}}),s?"all":i?"some":!1}const us=/([0-9]+)/gm,Ly=(e,t,n)=>xc(Qe(e.getValue(n)).toLowerCase(),Qe(t.getValue(n)).toLowerCase()),Iy=(e,t,n)=>xc(Qe(e.getValue(n)),Qe(t.getValue(n))),jy=(e,t,n)=>ni(Qe(e.getValue(n)).toLowerCase(),Qe(t.getValue(n)).toLowerCase()),$y=(e,t,n)=>ni(Qe(e.getValue(n)),Qe(t.getValue(n))),Oy=(e,t,n)=>{const o=e.getValue(n),s=t.getValue(n);return o>s?1:o<s?-1:0},Ny=(e,t,n)=>ni(e.getValue(n),t.getValue(n));function ni(e,t){return e===t?0:e>t?1:-1}function Qe(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function xc(e,t){const n=e.split(us).filter(Boolean),o=t.split(us).filter(Boolean);for(;n.length&&o.length;){const s=n.shift(),i=o.shift(),r=parseInt(s,10),a=parseInt(i,10),l=[r,a].sort();if(isNaN(l[0])){if(s>i)return 1;if(i>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-o.length}const It={alphanumeric:Ly,alphanumericCaseSensitive:Iy,text:jy,textCaseSensitive:$y,datetime:Oy,basic:Ny},By={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ce("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const s of n){const i=s?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return It.datetime;if(typeof i=="string"&&(o=!0,i.split(us).length>1))return It.alphanumeric}return o?It.text:It.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,o;if(!e)throw new Error;return Xn(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(o=t.options.sortingFns)==null?void 0:o[e.columnDef.sortingFn])!=null?n:It[e.columnDef.sortingFn]},e.toggleSorting=(n,o)=>{const s=e.getNextSortingOrder(),i=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 c=[],u,d=i?n:s==="desc";if(r!=null&&r.length&&e.getCanMultiSort()&&o?a?u="toggle":u="add":r!=null&&r.length&&l!==r.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(i||s||(u="remove")),u==="add"){var f;c=[...r,{id:e.id,desc:d}],c.splice(0,c.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=r.map(h=>h.id===e.id?{...h,desc:d}:h):u==="remove"?c=r.filter(h=>h.id!==e.id):c=[{id:e.id,desc:d}];return c})},e.getFirstSortDir=()=>{var n,o;return((n=(o=e.columnDef.sortDescFirst)!=null?o:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var o,s;const i=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==i&&((o=t.options.enableSortingRemoval)==null||o)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:r==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,o;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((o=t.options.enableSorting)!=null?o:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,o;return(n=(o=e.columnDef.enableMultiSort)!=null?o:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const o=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return o?o.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,o;return(n=(o=t.getState().sorting)==null?void 0:o.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(o=>o.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return o=>{n&&(o.persist==null||o.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(o):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,o;e.setSorting(t?[]:(n=(o=e.initialState)==null?void 0:o.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())}},zy=[ly,Py,by,_y,uy,dy,Ty,Vy,By,Cy,Ay,Dy,ky,Fy,Ey];function Hy(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const o=[...zy,...(t=e._features)!=null?t:[]];let s={_features:o};const i=s._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(s)),{}),r=f=>s.options.mergeOptions?s.options.mergeOptions(i,f):{...i,...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 c=[];let u=!1;const d={_features:o,options:{...i,...e},initialState:l,_queue:f=>{c.push(f),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{s.setState(s.initialState)},setOptions:f=>{const h=qe(f,s.options);s.options=r(h)},getState:()=>s.options.state,setState:f=>{s.options.onStateChange==null||s.options.onStateChange(f)},_getRowId:(f,h,m)=>{var g;return(g=s.options.getRowId==null?void 0:s.options.getRowId(f,h,m))!=null?g:`${m?[m.id,h].join("."):h}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(f,h)=>{let m=(h?s.getPrePaginationRowModel():s.getRowModel()).rowsById[f];if(!m&&(m=s.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:H(()=>[s.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,p;return(g=(p=m.renderValue())==null||p.toString==null?void 0:p.toString())!=null?g:null},...s._features.reduce((m,g)=>Object.assign(m,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...f}},W(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>s.options.columns,getAllColumns:H(()=>[s._getColumnDefs()],f=>{const h=function(m,g,p){return p===void 0&&(p=0),m.map(w=>{const x=ay(s,w,p,g),v=w;return x.columns=v.columns?h(v.columns,x,p+1):[],x})};return h(f)},W(e,"debugColumns","getAllColumns")),getAllFlatColumns:H(()=>[s.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),W(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:H(()=>[s.getAllFlatColumns()],f=>f.reduce((h,m)=>(h[m.id]=m,h),{}),W(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:H(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(f,h)=>{let m=f.flatMap(g=>g.getLeafColumns());return h(m)},W(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 Wy(){return e=>H(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(s,i,r){i===void 0&&(i=0);const a=[];for(let c=0;c<s.length;c++){const u=cy(e,e._getRowId(s[c],c,r),s[c],c,i,void 0,r?.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(s[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=o(u.originalSubRows,i+1,u))}}return a};return n.rows=o(t),n},W(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Gy(e){const t=[],n=o=>{var s;t.push(o),(s=o.subRows)!=null&&s.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function Uy(e){return t=>H(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,o)=>{if(!o.rows.length)return o;const{pageSize:s,pageIndex:i}=n;let{rows:r,flatRows:a,rowsById:l}=o;const c=s*i,u=c+s;r=r.slice(c,u);let d;t.options.paginateExpandedRows?d={rows:r,flatRows:a,rowsById:l}:d=Gy({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},W(t.options,"debugTable","getPaginationRowModel"))}function Ky(){return e=>H(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const o=e.getState().sorting,s=[],i=o.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),r={};i.forEach(l=>{const c=e.getColumn(l.id);c&&(r[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=l=>{const c=l.map(u=>({...u}));return c.sort((u,d)=>{for(let h=0;h<i.length;h+=1){var f;const m=i[h],g=r[m.id],p=g.sortUndefined,w=(f=m?.desc)!=null?f:!1;let x=0;if(p){const v=u.getValue(m.id),S=d.getValue(m.id),_=v===void 0,P=S===void 0;if(_||P){if(p==="first")return _?-1:1;if(p==="last")return _?1:-1;x=_&&P?0:_?p:-p}}if(x===0&&(x=g.sortingFn(u,d,m.id)),x!==0)return w&&(x*=-1),g.invertSorting&&(x*=-1),x}return u.index-d.index}),c.forEach(u=>{var d;s.push(u),(d=u.subRows)!=null&&d.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:s,rowsById:n.rowsById}},W(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
29
- * react-table
30
- *
31
- * Copyright (c) TanStack
32
- *
33
- * This source code is licensed under the MIT license found in the
34
- * LICENSE.md file in the root directory of this source tree.
35
- *
36
- * @license MIT
37
- */function Xr(e,t){return e?qy(e)?b.createElement(e,t):e:null}function qy(e){return Xy(e)||typeof e=="function"||Yy(e)}function Xy(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Yy(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Zy(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=b.useState(()=>({current:Hy(t)})),[o,s]=b.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...o,...e.state},onStateChange:r=>{s(r),e.onStateChange==null||e.onStateChange(r)}})),n.current}const Jy=e=>b.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("style",null,`
15
+ color: hsl(${Math.max(0,Math.min(120-120*d,120))}deg 100% 31%);`,n?.key)}return s}}function W(e,t,n,o){return{debug:()=>{var s;return(s=e?.debugAll)!=null?s:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:o}}function Ny(e,t,n,o){const s=()=>{var r;return(r=i.getValue())!=null?r:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(o),renderValue:s,getContext:H(()=>[e,n,t,i],(r,a,l,c)=>({table:r,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),W(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{r.createCell==null||r.createCell(i,n,t,e)},{}),i}function By(e,t,n,o){var s,i;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(s=(i=a.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?s:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=d=>{let h=d;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}:u=d=>d[a.accessorKey]),!c)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 f={id:`${String(c)}`,accessorFn:u,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:H(()=>[!0],()=>{var d;return[f,...(d=f.columns)==null?void 0:d.flatMap(h=>h.getFlatColumns())]},W(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:H(()=>[e._getOrderColumnsFn()],d=>{var h;if((h=f.columns)!=null&&h.length){let m=f.columns.flatMap(g=>g.getLeafColumns());return d(m)}return[f]},W(e.options,"debugColumns","column.getLeafColumns"))};for(const d of e._features)d.createColumn==null||d.createColumn(f,e);return f}const he="debugHeaders";function fa(e,t,n){var o;let i={id:(o=n.id)!=null?o: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(i),r},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(i,e)}),i}const zy={createTable:e=>{e.getHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,s)=>{var i,r;const a=(i=o?.map(f=>n.find(d=>d.id===f)).filter(Boolean))!=null?i:[],l=(r=s?.map(f=>n.find(d=>d.id===f)).filter(Boolean))!=null?r:[],c=n.filter(f=>!(o!=null&&o.includes(f.id))&&!(s!=null&&s.includes(f.id)));return wn(t,[...a,...c,...l],e)},W(e.options,he,"getHeaderGroups")),e.getCenterHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,s)=>(n=n.filter(i=>!(o!=null&&o.includes(i.id))&&!(s!=null&&s.includes(i.id))),wn(t,n,e,"center")),W(e.options,he,"getCenterHeaderGroups")),e.getLeftHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,o)=>{var s;const i=(s=o?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return wn(t,i,e,"left")},W(e.options,he,"getLeftHeaderGroups")),e.getRightHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,o)=>{var s;const i=(s=o?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?s:[];return wn(t,i,e,"right")},W(e.options,he,"getRightHeaderGroups")),e.getFooterGroups=H(()=>[e.getHeaderGroups()],t=>[...t].reverse(),W(e.options,he,"getFooterGroups")),e.getLeftFooterGroups=H(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),W(e.options,he,"getLeftFooterGroups")),e.getCenterFooterGroups=H(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),W(e.options,he,"getCenterFooterGroups")),e.getRightFooterGroups=H(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),W(e.options,he,"getRightFooterGroups")),e.getFlatHeaders=H(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,he,"getFlatHeaders")),e.getLeftFlatHeaders=H(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,he,"getLeftFlatHeaders")),e.getCenterFlatHeaders=H(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,he,"getCenterFlatHeaders")),e.getRightFlatHeaders=H(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,he,"getRightFlatHeaders")),e.getCenterLeafHeaders=H(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,he,"getCenterLeafHeaders")),e.getLeftLeafHeaders=H(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,he,"getLeftLeafHeaders")),e.getRightLeafHeaders=H(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,he,"getRightLeafHeaders")),e.getLeafHeaders=H(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,o)=>{var s,i,r,a,l,c;return[...(s=(i=t[0])==null?void 0:i.headers)!=null?s:[],...(r=(a=n[0])==null?void 0:a.headers)!=null?r:[],...(l=(c=o[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},W(e.options,he,"getLeafHeaders"))}};function wn(e,t,n,o){var s,i;let r=0;const a=function(d,h){h===void 0&&(h=1),r=Math.max(r,h),d.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 c=(d,h)=>{const m={depth:h,id:[o,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];d.forEach(y=>{const x=[...g].reverse()[0],w=y.column.depth===m.depth;let v,b=!1;if(w&&y.column.parent?v=y.column.parent:(v=y.column,b=!0),x&&x?.column===v)x.subHeaders.push(y);else{const S=fa(n,v,{id:[o,h,v.id,y?.id].filter(Boolean).join("_"),isPlaceholder:b,placeholderId:b?`${g.filter(M=>M.column===v).length}`:void 0,depth:h,index:g.length});S.subHeaders.push(y),g.push(S)}m.headers.push(y),y.headerGroup=m}),l.push(m),h>0&&c(g,h-1)},u=t.map((d,h)=>fa(n,d,{depth:r,index:h}));c(u,r-1),l.reverse();const f=d=>d.filter(m=>m.column.getIsVisible()).map(m=>{let g=0,y=0,x=[0];m.subHeaders&&m.subHeaders.length?(x=[],f(m.subHeaders).forEach(v=>{let{colSpan:b,rowSpan:S}=v;g+=b,x.push(S)})):g=1;const w=Math.min(...x);return y=y+w,m.colSpan=g,m.rowSpan=y,{colSpan:g,rowSpan:y}});return f((s=(i=l[0])==null?void 0:i.headers)!=null?s:[]),l}const Hy=(e,t,n,o,s,i,r)=>{let a={id:t,index:o,original:n,depth:s,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,o),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,o),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Oy(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:H(()=>[e.getAllLeafColumns()],l=>l.map(c=>Ny(e,a,c,c.id)),W(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:H(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),W(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(a,e)}return a},Wy={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()}}},Oc=(e,t,n)=>{var o,s;const i=n==null||(o=n.toString())==null?void 0:o.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(i))};Oc.autoRemove=e=>Ie(e);const Nc=(e,t,n)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(n))};Nc.autoRemove=e=>Ie(e);const Bc=(e,t,n)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===n?.toLowerCase()};Bc.autoRemove=e=>Ie(e);const zc=(e,t,n)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(n)};zc.autoRemove=e=>Ie(e);const Hc=(e,t,n)=>!n.some(o=>{var s;return!((s=e.getValue(t))!=null&&s.includes(o))});Hc.autoRemove=e=>Ie(e)||!(e!=null&&e.length);const Wc=(e,t,n)=>n.some(o=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(o)});Wc.autoRemove=e=>Ie(e)||!(e!=null&&e.length);const Gc=(e,t,n)=>e.getValue(t)===n;Gc.autoRemove=e=>Ie(e);const Uc=(e,t,n)=>e.getValue(t)==n;Uc.autoRemove=e=>Ie(e);const vi=(e,t,n)=>{let[o,s]=n;const i=e.getValue(t);return i>=o&&i<=s};vi.resolveFilterValue=e=>{let[t,n]=e,o=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(o)?-1/0:o,r=n===null||Number.isNaN(s)?1/0:s;if(i>r){const a=i;i=r,r=a}return[i,r]};vi.autoRemove=e=>Ie(e)||Ie(e[0])&&Ie(e[1]);const He={includesString:Oc,includesStringSensitive:Nc,equalsString:Bc,arrIncludes:zc,arrIncludesAll:Hc,arrIncludesSome:Wc,equals:Gc,weakEquals:Uc,inNumberRange:vi};function Ie(e){return e==null||e===""}const Gy={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:be("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=n?.getValue(e.id);return typeof o=="string"?He.includesString:typeof o=="number"?He.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?He.equals:Array.isArray(o)?He.arrIncludes:He.weakEquals},e.getFilterFn=()=>{var n,o;return no(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(o=t.options.filterFns)==null?void 0:o[e.columnDef.filterFn])!=null?n:He[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,o,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((o=t.options.enableColumnFilters)!=null?o:!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(o=>o.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,o;return(n=(o=t.getState().columnFilters)==null?void 0:o.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(o=>{const s=e.getFilterFn(),i=o?.find(u=>u.id===e.id),r=Je(n,i?i.value:void 0);if(ha(s,r,e)){var a;return(a=o?.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:r};if(i){var c;return(c=o?.map(u=>u.id===e.id?l:u))!=null?c:[]}return o!=null&&o.length?[...o,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),o=s=>{var i;return(i=Je(t,s))==null?void 0:i.filter(r=>{const a=n.find(l=>l.id===r.id);if(a){const l=a.getFilterFn();if(ha(l,r.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(o)},e.resetColumnFilters=t=>{var n,o;e.setColumnFilters(t?[]:(n=(o=e.initialState)==null?void 0:o.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 ha(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Uy=(e,t,n)=>n.reduce((o,s)=>{const i=s.getValue(e);return o+(typeof i=="number"?i:0)},0),Ky=(e,t,n)=>{let o;return n.forEach(s=>{const i=s.getValue(e);i!=null&&(o>i||o===void 0&&i>=i)&&(o=i)}),o},qy=(e,t,n)=>{let o;return n.forEach(s=>{const i=s.getValue(e);i!=null&&(o<i||o===void 0&&i>=i)&&(o=i)}),o},Xy=(e,t,n)=>{let o,s;return n.forEach(i=>{const r=i.getValue(e);r!=null&&(o===void 0?r>=r&&(o=s=r):(o>r&&(o=r),s<r&&(s=r)))}),[o,s]},Yy=(e,t)=>{let n=0,o=0;if(t.forEach(s=>{let i=s.getValue(e);i!=null&&(i=+i)>=i&&(++n,o+=i)}),n)return o/n},Zy=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!$y(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),s=n.sort((i,r)=>i-r);return n.length%2!==0?s[o]:(s[o-1]+s[o])/2},Jy=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Qy=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,e0=(e,t)=>t.length,Do={sum:Uy,min:Ky,max:qy,extent:Xy,mean:Yy,median:Zy,unique:Jy,uniqueCount:Qy,count:e0},t0={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:be("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(o=>o!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,o;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((o=t.options.enableGrouping)!=null?o:!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],o=n?.getValue(e.id);if(typeof o=="number")return Do.sum;if(Object.prototype.toString.call(o)==="[object Date]")return Do.extent},e.getAggregationFn=()=>{var n,o;if(!e)throw new Error;return no(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(o=t.options.aggregationFns)==null?void 0:o[e.columnDef.aggregationFn])!=null?n:Do[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,o;e.setGrouping(t?[]:(n=(o=e.initialState)==null?void 0:o.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 o=t.getColumn(n);return o!=null&&o.columnDef.getGroupingValue?(e._groupingValuesCache[n]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,o)=>{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 n0(e,t,n){if(!(t!=null&&t.length)||!n)return e;const o=e.filter(i=>!t.includes(i.id));return n==="remove"?o:[...t.map(i=>e.find(r=>r.id===i)).filter(Boolean),...o]}const o0={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:be("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=H(n=>[qt(t,n)],n=>n.findIndex(o=>o.id===e.id),W(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var o;return((o=qt(t,n)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=n=>{var o;const s=qt(t,n);return((o=s[s.length-1])==null?void 0:o.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=H(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,o)=>s=>{let i=[];if(!(t!=null&&t.length))i=s;else{const r=[...t],a=[...s];for(;a.length&&r.length;){const l=r.shift(),c=a.findIndex(u=>u.id===l);c>-1&&i.push(a.splice(c,1)[0])}i=[...i,...a]}return n0(i,n,o)},W(e.options,"debugTable","_getOrderColumnsFn"))}},ko=()=>({left:[],right:[]}),s0={getInitialState:e=>({columnPinning:ko(),...e}),getDefaultOptions:e=>({onColumnPinningChange:be("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const o=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var i,r;if(n==="right"){var a,l;return{left:((a=s?.left)!=null?a:[]).filter(f=>!(o!=null&&o.includes(f))),right:[...((l=s?.right)!=null?l:[]).filter(f=>!(o!=null&&o.includes(f))),...o]}}if(n==="left"){var c,u;return{left:[...((c=s?.left)!=null?c:[]).filter(f=>!(o!=null&&o.includes(f))),...o],right:((u=s?.right)!=null?u:[]).filter(f=>!(o!=null&&o.includes(f)))}}return{left:((i=s?.left)!=null?i:[]).filter(f=>!(o!=null&&o.includes(f))),right:((r=s?.right)!=null?r:[]).filter(f=>!(o!=null&&o.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var s,i,r;return((s=o.columnDef.enablePinning)!=null?s:!0)&&((i=(r=t.options.enableColumnPinning)!=null?r:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:o,right:s}=t.getState().columnPinning,i=n.some(a=>o?.includes(a)),r=n.some(a=>s?.includes(a));return i?"left":r?"right":!1},e.getPinnedIndex=()=>{var n,o;const s=e.getIsPinned();return s?(n=(o=t.getState().columnPinning)==null||(o=o[s])==null?void 0:o.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,o,s)=>{const i=[...o??[],...s??[]];return n.filter(r=>!i.includes(r.column.id))},W(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,o)=>(o??[]).map(i=>n.find(r=>r.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),W(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,o)=>(o??[]).map(i=>n.find(r=>r.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),W(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,o;return e.setColumnPinning(t?ko():(n=(o=e.initialState)==null?void 0:o.columnPinning)!=null?n:ko())},e.getIsSomeColumnsPinned=t=>{var n;const o=e.getState().columnPinning;if(!t){var s,i;return!!((s=o.left)!=null&&s.length||(i=o.right)!=null&&i.length)}return!!((n=o[t])!=null&&n.length)},e.getLeftLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(o=>t.find(s=>s.id===o)).filter(Boolean),W(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(o=>t.find(s=>s.id===o)).filter(Boolean),W(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o)=>{const s=[...n??[],...o??[]];return t.filter(i=>!s.includes(i.id))},W(e.options,"debugColumns","getCenterLeafColumns"))}};function i0(e){return e||(typeof document<"u"?document:null)}const Cn={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Fo=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),r0={getDefaultColumnDef:()=>Cn,getInitialState:e=>({columnSizing:{},columnSizingInfo:Fo(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:be("columnSizing",e),onColumnSizingInfoChange:be("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,o,s;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Cn.minSize,(o=i??e.columnDef.size)!=null?o:Cn.size),(s=e.columnDef.maxSize)!=null?s:Cn.maxSize)},e.getStart=H(n=>[n,qt(t,n),t.getState().columnSizing],(n,o)=>o.slice(0,e.getIndex(n)).reduce((s,i)=>s+i.getSize(),0),W(t.options,"debugColumns","getStart")),e.getAfter=H(n=>[n,qt(t,n),t.getState().columnSizing],(n,o)=>o.slice(e.getIndex(n)+1).reduce((s,i)=>s+i.getSize(),0),W(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:o,...s}=n;return s})},e.getCanResize=()=>{var n,o;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((o=t.options.enableColumnResizing)!=null?o:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const o=s=>{if(s.subHeaders.length)s.subHeaders.forEach(o);else{var i;n+=(i=s.column.getSize())!=null?i:0}};return o(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 o=t.getColumn(e.column.id),s=o?.getCanResize();return i=>{if(!o||!s||(i.persist==null||i.persist(),Lo(i)&&i.touches&&i.touches.length>1))return;const r=e.getSize(),a=e?e.getLeafHeaders().map(x=>[x.column.id,x.column.getSize()]):[[o.id,o.getSize()]],l=Lo(i)?Math.round(i.touches[0].clientX):i.clientX,c={},u=(x,w)=>{typeof w=="number"&&(t.setColumnSizingInfo(v=>{var b,S;const M=t.options.columnResizeDirection==="rtl"?-1:1,T=(w-((b=v?.startOffset)!=null?b:0))*M,P=Math.max(T/((S=v?.startSize)!=null?S:0),-.999999);return v.columnSizingStart.forEach(D=>{let[F,$]=D;c[F]=Math.round(Math.max($+$*P,0)*100)/100}),{...v,deltaOffset:T,deltaPercentage:P}}),(t.options.columnResizeMode==="onChange"||x==="end")&&t.setColumnSizing(v=>({...v,...c})))},f=x=>u("move",x),d=x=>{u("end",x),t.setColumnSizingInfo(w=>({...w,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=i0(n),m={moveHandler:x=>f(x.clientX),upHandler:x=>{h?.removeEventListener("mousemove",m.moveHandler),h?.removeEventListener("mouseup",m.upHandler),d(x.clientX)}},g={moveHandler:x=>(x.cancelable&&(x.preventDefault(),x.stopPropagation()),f(x.touches[0].clientX),!1),upHandler:x=>{var w;h?.removeEventListener("touchmove",g.moveHandler),h?.removeEventListener("touchend",g.upHandler),x.cancelable&&(x.preventDefault(),x.stopPropagation()),d((w=x.touches[0])==null?void 0:w.clientX)}},y=a0()?{passive:!1}:!1;Lo(i)?(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(x=>({...x,startOffset:l,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:o.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?Fo():(n=e.initialState.columnSizingInfo)!=null?n:Fo())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,s)=>o+s.getSize(),0))!=null?t:0}}};let Sn=null;function a0(){if(typeof Sn=="boolean")return Sn;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 Sn=e,Sn}function Lo(e){return e.type==="touchstart"}const l0={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:be("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(o=>({...o,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,o;const s=e.columns;return(n=s.length?s.some(i=>i.getIsVisible()):(o=t.getState().columnVisibility)==null?void 0:o[e.id])!=null?n:!0},e.getCanHide=()=>{var n,o;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((o=t.options.enableHiding)!=null?o:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=H(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),W(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=H(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,o,s)=>[...n,...o,...s],W(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,o)=>H(()=>[o(),o().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),W(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 o;e.setColumnVisibility(n?{}:(o=e.initialState.columnVisibility)!=null?o:{})},e.toggleAllColumnsVisible=n=>{var o;n=(o=n)!=null?o:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,i)=>({...s,[i.id]:n||!(i.getCanHide!=null&&i.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 o;e.toggleAllColumnsVisible((o=n.target)==null?void 0:o.checked)}}};function qt(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const c0={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()}}},u0={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:be("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const o=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,o,s,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=t.options.enableGlobalFilter)!=null?o:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>He.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:o}=e.options;return no(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[o])!=null?t:He[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},d0={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:be("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var o,s;if(!t){e._queue(()=>{t=!0});return}if((o=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?o:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=o=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(o),e.toggleAllRowsExpanded=o=>{o??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=o=>{var s,i;e.setExpanded(o?{}:(s=(i=e.initialState)==null?void 0:i.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const o=e.getState().expanded;return o===!0||Object.values(o).some(Boolean)},e.getIsAllRowsExpanded=()=>{const o=e.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const r=i.split(".");o=Math.max(o,r.length)}),o},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(o=>{var s;const i=o===!0?!0:!!(o!=null&&o[e.id]);let r={};if(o===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{r[a]=!0}):r=o,n=(s=n)!=null?s:!i,!i&&n)return{...r,[e.id]:!0};if(i&&!n){const{[e.id]:a,...l}=r;return l}return o})},e.getIsExpanded=()=>{var n;const o=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:o===!0||o?.[e.id])},e.getCanExpand=()=>{var n,o,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((o=t.options.enableExpanding)!=null?o:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,o=e;for(;n&&o.parentId;)o=t.getRow(o.parentId,!0),n=o.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},ps=0,vs=10,Io=()=>({pageIndex:ps,pageSize:vs}),f0={getInitialState:e=>({...e,pagination:{...Io(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:be("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var o,s;if(!t){e._queue(()=>{t=!0});return}if((o=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=o=>{const s=i=>Je(o,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=o=>{var s;e.setPagination(o?Io():(s=e.initialState.pagination)!=null?s:Io())},e.setPageIndex=o=>{e.setPagination(s=>{let i=Je(o,s.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,r)),{...s,pageIndex:i}})},e.resetPageIndex=o=>{var s,i;e.setPageIndex(o?ps:(s=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?s:ps)},e.resetPageSize=o=>{var s,i;e.setPageSize(o?vs:(s=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?s:vs)},e.setPageSize=o=>{e.setPagination(s=>{const i=Math.max(1,Je(o,s.pageSize)),r=s.pageSize*s.pageIndex,a=Math.floor(r/i);return{...s,pageIndex:a,pageSize:i}})},e.setPageCount=o=>e.setPagination(s=>{var i;let r=Je(o,(i=e.options.pageCount)!=null?i:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...s,pageCount:r}}),e.getPageOptions=H(()=>[e.getPageCount()],o=>{let s=[];return o&&o>0&&(s=[...new Array(o)].fill(null).map((i,r)=>r)),s},W(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:o}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:o<s-1},e.previousPage=()=>e.setPageIndex(o=>o-1),e.nextPage=()=>e.setPageIndex(o=>o+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 o;return(o=e.options.pageCount)!=null?o:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var o;return(o=e.options.rowCount)!=null?o:e.getPrePaginationRowModel().rows.length}}},jo=()=>({top:[],bottom:[]}),h0={getInitialState:e=>({rowPinning:jo(),...e}),getDefaultOptions:e=>({onRowPinningChange:be("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,o,s)=>{const i=o?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],r=s?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...r,e.id,...i]);t.setRowPinning(l=>{var c,u;if(n==="bottom"){var f,d;return{top:((f=l?.top)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((d=l?.bottom)!=null?d:[]).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:((c=l?.top)!=null?c:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((u=l?.bottom)!=null?u:[]).filter(g=>!(a!=null&&a.has(g)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:s}=t.options;return typeof o=="function"?o(e):(n=o??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:o,bottom:s}=t.getState().rowPinning,i=n.some(a=>o?.includes(a)),r=n.some(a=>s?.includes(a));return i?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var n,o;const s=e.getIsPinned();if(!s)return-1;const i=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(r=>{let{id:a}=r;return a});return(o=i?.indexOf(e.id))!=null?o:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,o;return e.setRowPinning(t?jo():(n=(o=e.initialState)==null?void 0:o.rowPinning)!=null?n:jo())},e.getIsSomeRowsPinned=t=>{var n;const o=e.getState().rowPinning;if(!t){var s,i;return!!((s=o.top)!=null&&s.length||(i=o.bottom)!=null&&i.length)}return!!((n=o[t])!=null&&n.length)},e._getPinnedRows=(t,n,o)=>{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:o}))},e.getTopRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),W(e.options,"debugRows","getTopRows")),e.getBottomRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),W(e.options,"debugRows","getBottomRows")),e.getCenterRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,o)=>{const s=new Set([...n??[],...o??[]]);return t.filter(i=>!s.has(i.id))},W(e.options,"debugRows","getCenterRows"))}},g0={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:be("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 o={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(i=>{i.getCanSelect()&&(o[i.id]=!0)}):s.forEach(i=>{delete o[i.id]}),o})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(i=>{ys(s,i.id,o,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=H(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?$o(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=H(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?$o(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=H(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?$o(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let o=!!(t.length&&Object.keys(n).length);return o&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let o=!!t.length;return o&&t.some(s=>!n[s.id])&&(o=!1),o},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,o)=>{const s=e.getIsSelected();t.setRowSelection(i=>{var r;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return i;const a={...i};return ys(a,e.id,n,(r=o?.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 xs(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return xs(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 o=>{var s;n&&e.toggleSelected((s=o.target)==null?void 0:s.checked)}}}},ys=(e,t,n,o,s)=>{var i;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],o&&(i=r.subRows)!=null&&i.length&&r.getCanSelectSubRows()&&r.subRows.forEach(a=>ys(e,a.id,n,o,s))};function $o(e,t){const n=e.getState().rowSelection,o=[],s={},i=function(r,a){return r.map(l=>{var c;const u=yi(l,n);if(u&&(o.push(l),s[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:i(l.subRows)}),u)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:o,rowsById:s}}function yi(e,t){var n;return(n=t[e.id])!=null?n:!1}function xs(e,t,n){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let s=!0,i=!1;return e.subRows.forEach(r=>{if(!(i&&!s)&&(r.getCanSelect()&&(yi(r,t)?i=!0:s=!1),r.subRows&&r.subRows.length)){const a=xs(r,t);a==="all"?i=!0:(a==="some"&&(i=!0),s=!1)}}),s?"all":i?"some":!1}const ws=/([0-9]+)/gm,m0=(e,t,n)=>Kc(st(e.getValue(n)).toLowerCase(),st(t.getValue(n)).toLowerCase()),p0=(e,t,n)=>Kc(st(e.getValue(n)),st(t.getValue(n))),v0=(e,t,n)=>xi(st(e.getValue(n)).toLowerCase(),st(t.getValue(n)).toLowerCase()),y0=(e,t,n)=>xi(st(e.getValue(n)),st(t.getValue(n))),x0=(e,t,n)=>{const o=e.getValue(n),s=t.getValue(n);return o>s?1:o<s?-1:0},w0=(e,t,n)=>xi(e.getValue(n),t.getValue(n));function xi(e,t){return e===t?0:e>t?1:-1}function st(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Kc(e,t){const n=e.split(ws).filter(Boolean),o=t.split(ws).filter(Boolean);for(;n.length&&o.length;){const s=n.shift(),i=o.shift(),r=parseInt(s,10),a=parseInt(i,10),l=[r,a].sort();if(isNaN(l[0])){if(s>i)return 1;if(i>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-o.length}const Ht={alphanumeric:m0,alphanumericCaseSensitive:p0,text:v0,textCaseSensitive:y0,datetime:x0,basic:w0},C0={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:be("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const s of n){const i=s?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return Ht.datetime;if(typeof i=="string"&&(o=!0,i.split(ws).length>1))return Ht.alphanumeric}return o?Ht.text:Ht.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,o;if(!e)throw new Error;return no(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(o=t.options.sortingFns)==null?void 0:o[e.columnDef.sortingFn])!=null?n:Ht[e.columnDef.sortingFn]},e.toggleSorting=(n,o)=>{const s=e.getNextSortingOrder(),i=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 c=[],u,f=i?n:s==="desc";if(r!=null&&r.length&&e.getCanMultiSort()&&o?a?u="toggle":u="add":r!=null&&r.length&&l!==r.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(i||s||(u="remove")),u==="add"){var d;c=[...r,{id:e.id,desc:f}],c.splice(0,c.length-((d=t.options.maxMultiSortColCount)!=null?d:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=r.map(h=>h.id===e.id?{...h,desc:f}:h):u==="remove"?c=r.filter(h=>h.id!==e.id):c=[{id:e.id,desc:f}];return c})},e.getFirstSortDir=()=>{var n,o;return((n=(o=e.columnDef.sortDescFirst)!=null?o:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var o,s;const i=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==i&&((o=t.options.enableSortingRemoval)==null||o)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:r==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,o;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((o=t.options.enableSorting)!=null?o:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,o;return(n=(o=e.columnDef.enableMultiSort)!=null?o:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const o=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return o?o.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,o;return(n=(o=t.getState().sorting)==null?void 0:o.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(o=>o.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return o=>{n&&(o.persist==null||o.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(o):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,o;e.setSorting(t?[]:(n=(o=e.initialState)==null?void 0:o.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())}},S0=[zy,l0,o0,s0,Wy,Gy,c0,u0,C0,t0,d0,f0,h0,g0,r0];function b0(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const o=[...S0,...(t=e._features)!=null?t:[]];let s={_features:o};const i=s._features.reduce((d,h)=>Object.assign(d,h.getDefaultOptions==null?void 0:h.getDefaultOptions(s)),{}),r=d=>s.options.mergeOptions?s.options.mergeOptions(i,d):{...i,...d};let l={...{},...(n=e.initialState)!=null?n:{}};s._features.forEach(d=>{var h;l=(h=d.getInitialState==null?void 0:d.getInitialState(l))!=null?h:l});const c=[];let u=!1;const f={_features:o,options:{...i,...e},initialState:l,_queue:d=>{c.push(d),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{s.setState(s.initialState)},setOptions:d=>{const h=Je(d,s.options);s.options=r(h)},getState:()=>s.options.state,setState:d=>{s.options.onStateChange==null||s.options.onStateChange(d)},_getRowId:(d,h,m)=>{var g;return(g=s.options.getRowId==null?void 0:s.options.getRowId(d,h,m))!=null?g:`${m?[m.id,h].join("."):h}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(d,h)=>{let m=(h?s.getPrePaginationRowModel():s.getRowModel()).rowsById[d];if(!m&&(m=s.getCoreRowModel().rowsById[d],!m))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${d}`):new Error;return m},_getDefaultColumnDef:H(()=>[s.options.defaultColumn],d=>{var h;return d=(h=d)!=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},...s._features.reduce((m,g)=>Object.assign(m,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...d}},W(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>s.options.columns,getAllColumns:H(()=>[s._getColumnDefs()],d=>{const h=function(m,g,y){return y===void 0&&(y=0),m.map(x=>{const w=By(s,x,y,g),v=x;return w.columns=v.columns?h(v.columns,w,y+1):[],w})};return h(d)},W(e,"debugColumns","getAllColumns")),getAllFlatColumns:H(()=>[s.getAllColumns()],d=>d.flatMap(h=>h.getFlatColumns()),W(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:H(()=>[s.getAllFlatColumns()],d=>d.reduce((h,m)=>(h[m.id]=m,h),{}),W(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:H(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(d,h)=>{let m=d.flatMap(g=>g.getLeafColumns());return h(m)},W(e,"debugColumns","getAllLeafColumns")),getColumn:d=>{const h=s._getAllFlatColumnsById()[d];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${d}' does not exist.`),h}};Object.assign(s,f);for(let d=0;d<s._features.length;d++){const h=s._features[d];h==null||h.createTable==null||h.createTable(s)}return s}function _0(){return e=>H(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(s,i,r){i===void 0&&(i=0);const a=[];for(let c=0;c<s.length;c++){const u=Hy(e,e._getRowId(s[c],c,r),s[c],c,i,void 0,r?.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(s[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=o(u.originalSubRows,i+1,u))}}return a};return n.rows=o(t),n},W(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function R0(e){const t=[],n=o=>{var s;t.push(o),(s=o.subRows)!=null&&s.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function E0(e){return t=>H(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,o)=>{if(!o.rows.length)return o;const{pageSize:s,pageIndex:i}=n;let{rows:r,flatRows:a,rowsById:l}=o;const c=s*i,u=c+s;r=r.slice(c,u);let f;t.options.paginateExpandedRows?f={rows:r,flatRows:a,rowsById:l}:f=R0({rows:r,flatRows:a,rowsById:l}),f.flatRows=[];const d=h=>{f.flatRows.push(h),h.subRows.length&&h.subRows.forEach(d)};return f.rows.forEach(d),f},W(t.options,"debugTable","getPaginationRowModel"))}function P0(){return e=>H(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const o=e.getState().sorting,s=[],i=o.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),r={};i.forEach(l=>{const c=e.getColumn(l.id);c&&(r[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=l=>{const c=l.map(u=>({...u}));return c.sort((u,f)=>{for(let h=0;h<i.length;h+=1){var d;const m=i[h],g=r[m.id],y=g.sortUndefined,x=(d=m?.desc)!=null?d:!1;let w=0;if(y){const v=u.getValue(m.id),b=f.getValue(m.id),S=v===void 0,M=b===void 0;if(S||M){if(y==="first")return S?-1:1;if(y==="last")return S?1:-1;w=S&&M?0:S?y:-y}}if(w===0&&(w=g.sortingFn(u,f,m.id)),w!==0)return x&&(w*=-1),g.invertSorting&&(w*=-1),w}return u.index-f.index}),c.forEach(u=>{var f;s.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:s,rowsById:n.rowsById}},W(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function ga(e,t){return e?M0(e)?_.createElement(e,t):e:null}function M0(e){return T0(e)||typeof e=="function"||A0(e)}function T0(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function A0(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function V0(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=_.useState(()=>({current:b0(t)})),[o,s]=_.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...o,...e.state},onStateChange:r=>{s(r),e.onStateChange==null||e.onStateChange(r)}})),n.current}const D0=e=>_.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("style",null,`
38
16
  @keyframes spin {
39
17
  from {
40
18
  transform: rotate(0deg);
@@ -47,12 +25,15 @@
47
25
  transform-origin: center;
48
26
  animation: spin 1s linear infinite;
49
27
  }
50
- `),b.createElement("g",{className:"spinner"},b.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}),b.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"}))),Qy=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("g",{clipPath:"url(#clip0_2074_3858)"},b.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"})),b.createElement("defs",null,b.createElement("clipPath",{id:"clip0_2074_3858"},b.createElement("rect",{width:24,height:24,fill:"white"})))),e0="_table_19yhs_8",t0={table:e0},Cc=C.forwardRef(({children:e,className:t,style:n,...o},s)=>y.jsx("td",{ref:s,className:k.cx(t),style:n,...o,children:e}));Cc.displayName="TableBodyCell";const Sc=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:o="center",py:s="var(--spacing-sm)",px:i="var(--spacing-md)",minHeight:r="56px",...a},l)=>y.jsx(I,{row:t,justifyContent:n,alignItems:o,py:s,px:i,minHeight:r,ref:l,...a,children:e}));Sc.displayName="TableBodyCellContent";const bc=C.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:o=!1,...s},i)=>{const r=k.css({borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return y.jsx("tr",{ref:i,className:k.cx(r,t),...s,children:e})});bc.displayName="TableBodyRow";const n0=C.forwardRef(({children:e,className:t,style:n,justifyContent:o="flex-start",alignItems:s="flex-start",...i},r)=>{const a=k.css({justifyContent:o,alignItems:s,fontWeight:"inherit"});return y.jsx("th",{ref:r,className:k.cx(a,t),style:n,...i,children:e})}),oi=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:o="center",py:s="var(--spacing-sm)",px:i="var(--spacing-md)",minHeight:r="56px",...a},l)=>y.jsx(I,{row:t,justifyContent:n,alignItems:o,py:s,px:i,minHeight:r,ref:l,...a,children:e}));oi.displayName="TableHeadCellContent";const o0=e=>b.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M8.75 0.75L4.75 4.75L0.75 0.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),s0=e=>b.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M8.75 4.75L4.75 0.75L0.75 4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),i0=({sortDirection:e,gap:t="5px",...n})=>y.jsxs(I,{gap:t,...n,children:[y.jsx(s0,{style:{color:e==="asc"?"var(--icon-accent)":"var(--icon-tertiary)"}}),y.jsx(o0,{style:{color:e==="desc"?"var(--icon-accent)":"var(--icon-tertiary)"}})]}),_c=({children:e,tableProps:t,gap:n="10px",...o})=>{const s=t.column.getIsSorted();return y.jsxs(oi,{style:{cursor:"pointer",userSelect:"none"},gap:n,...o,children:[e,y.jsx(i0,{sortDirection:s})]})};_c.displayName="TableHeadCellContentSortable";const Rc=C.forwardRef(({children:e,className:t,showBorders:n=!1,...o},s)=>{const i=k.css({backgroundColor:"var(--fill-bg-secondary)",borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return y.jsx("tr",{ref:s,className:k.cx(i,t),...o,children:e})});Rc.displayName="TableHeadRow";const r0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),a0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),l0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.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"}),b.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"}),b.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"})),c0=(e,t)=>{const n=[];if(t<=10){for(let i=1;i<=t;i++)n.push(i);return n}const o=2,s=[];for(let i=Math.max(2,e+1-o);i<=Math.min(t-1,e+1+o);i++)s.push(i);return e+1-o>2?n.push(1,"..."):n.push(1),n.push(...s),e+1+o<t-1?n.push("...",t):t>1&&n.push(t),n},u0=({pageIndex:e,pageSize:t,totalCount:n,onPageChange:o,onPageSizeChange:s,pageSizeOptions:i=[10,20,50,100],showPageSizeSelector:r=!0,renderPageSizeSelectorDropdownItem:a=c=>c.label,renderPageSizeSelectorInputItem:l})=>{const c=Math.ceil(n/t),u=e>0,d=e<c-1,f=()=>{u&&o(e-1)},h=()=>{d&&o(e+1)},m=p=>{s(Number(p))},g=c0(e,c);return n===0?null:y.jsxs(I,{row:!0,justifyContent:"space-between",children:[y.jsxs(I,{row:!0,gap:"var(--spacing-sm)",children:[y.jsx(Wt,{onClick:f,disabled:!u,color:"neutral",size:"sm",children:y.jsx(r0,{})}),y.jsx(I,{row:!0,gap:"var(--spacing-sm)",children:g.map(p=>y.jsx(d0,{isDots:p==="...",isCurrentPage:p===e+1,disabled:p==="...",onClick:()=>o(p-1),children:p},p))}),y.jsx(Wt,{color:"neutral",size:"sm",onClick:h,disabled:!d,children:y.jsx(a0,{})})]}),r&&y.jsx(I,{children:y.jsx(sc,{value:t.toString(),size:"sm",items:i.map(p=>({value:p.toString(),label:p.toString()})),returnedValue:p=>p.value,renderDropdownItem:a,renderSingleInputItem:l,onChange:p=>m(p)})})]})},d0=({children:e,isCurrentPage:t=!1,onClick:n,isDots:o=!1,disabled:s=!1})=>{const i=k.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=k.css({width:"24px",height:"24px",color:t?"var(--icon-secondary)":"var(--icon-tertiary)"});return y.jsx(I,{className:i,onClick:s?void 0:n,children:o?y.jsx(l0,{className:r}):y.jsx(K,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},f0=k.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%)"}}),h0=k.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--gray-86) var(--gray-96)"}),Ec=C.memo(({data:e,children:t,className:n,showBorders:o=!1,...s})=>{const[i,r]=C.useState(!1),[a,l]=C.useState(!1),c=C.useRef(null),u=C.useCallback(()=>{const f=c.current;if(!f)return;const{scrollLeft:h,scrollWidth:m,clientWidth:g}=f,p=m>g;r(p&&h>0),l(p&&h<m-g-1)},[]);C.useEffect(()=>{const f=c.current;if(!f)return;u();const h=new ResizeObserver(u);return h.observe(f),f.addEventListener("scroll",u),()=>{h.disconnect(),f.removeEventListener("scroll",u)}},[u,e]);const d=k.css({border:o?"1px solid var(--border-neutral-alpha-low)":"transparent","&::before":{opacity:i?1:0},"&::after":{opacity:a?1:0}});return y.jsx(I,{className:k.cx(f0,d,n),...s,children:y.jsx(I,{ref:c,className:h0,children:t})})});Ec.displayName="TableWrapper";const g0=k.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:"var(--fill-bg-primary)"}),m0=k.css({backgroundColor:"var(--fill-bg-secondary)",color:"var(--text-tertiary)"}),Vt=({ref:e,data:t,columns:n,showBorders:o=!0,enableSorting:s=!1,enablePagination:i=!1,enableRowSelection:r=!1,enableMultiRowSelection:a=!1,sorting:l,onSortingChange:c,columnFilters:u,onColumnFiltersChange:d,columnVisibility:f,onColumnVisibilityChange:h,pagination:m,onPaginationChange:g,rowSelection:p,onRowSelectionChange:w,totalCount:x,loading:v=!1,emptyLabels:S={title:"Nothing found",description:"No results found for “result”",action:"Reset"},loadingLabels:_={title:"Loading...",description:"Please wait or reset your promt",action:"Reset"},className:P,containerClassName:V,tableOptions:M={},onRowClick:A,getRowId:F,headCellComponent:$=n0,bodyCellComponent:z=Cc,headRowComponent:O=Rc,bodyRowComponent:D=bc,onReset:B,renderPageSizeSelectorDropdownItem:N,renderPageSizeSelectorInputItem:E})=>{const[R,T]=C.useState([]),[L,Y]=C.useState([]),[U,q]=C.useState({}),[me,J]=C.useState({pageIndex:0,pageSize:10}),[se,j]=C.useState({}),Z=l??R,ie=u??L,he=f??U,ce=m??me,Ge=p??se,At=X=>{const Q=typeof X=="function"?X(Z):X;c?c(Q):T(Q)},Dt=X=>{const Q=typeof X=="function"?X(ie):X;d?d(Q):Y(Q)},Pc=X=>{const Q=typeof X=="function"?X(he):X;h?h(Q):q(Q)},Yn=X=>{const Q=typeof X=="function"?X(ce):X;g?g(Q):J(Q)},Zn=Zy({data:t,columns:n,state:{sorting:Z,columnFilters:ie,columnVisibility:he,pagination:ce,rowSelection:Ge},onSortingChange:At,onColumnFiltersChange:Dt,onColumnVisibilityChange:Pc,onPaginationChange:Yn,onRowSelectionChange:X=>{const Q=typeof X=="function"?X(Ge):X;w?w(Q):j(Q)},getCoreRowModel:Wy(),getSortedRowModel:s?Ky():void 0,getPaginationRowModel:i?Uy():void 0,enableRowSelection:r,enableMultiRowSelection:a,getRowId:F,manualPagination:!!x,pageCount:x?Math.ceil(x/ce.pageSize):void 0,...M});C.useImperativeHandle(e,()=>Zn);const{rows:ii}=Zn.getRowModel(),Tc=(X,Q)=>{A&&A(X.original,Q)};return v?y.jsxs(I,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:k.cx(V),children:[y.jsx(Jy,{width:32,height:32,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),y.jsx(K,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:_.title}),y.jsx(K,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:_.description}),typeof _.action=="string"?y.jsx(es,{width:"auto",onClick:B,intensity:"secondary",color:"accent",children:_.action}):_.action]}):ii.length?y.jsxs(I,{w:"full",gap:"var(--spacing-xl)",className:k.cx(V),children:[y.jsx(Ec,{data:t,showBorders:o,children:y.jsxs("table",{className:k.cx(g0,t0.table,P),children:[y.jsx("thead",{className:m0,children:Zn.getHeaderGroups().map(X=>y.jsx(O,{showBorders:o,children:X.headers.map(Q=>y.jsx($,{style:{width:Q.getSize()},onClick:Q.column.getToggleSortingHandler(),children:Q.isPlaceholder?null:Xr(Q.column.columnDef.header,Q.getContext())},Q.id))},X.id))}),y.jsx("tbody",{children:ii.map((X,Q)=>y.jsx(D,{showBorders:o,isSelected:X.getIsSelected(),onClick:()=>Tc(X,Q),children:X.getVisibleCells().map(Jn=>y.jsx(z,{children:Xr(Jn.column.columnDef.cell,Jn.getContext())},Jn.id))},X.id))})]})}),i&&!v&&y.jsx(u0,{pageIndex:ce.pageIndex,pageSize:ce.pageSize,totalCount:x||t.length,renderPageSizeSelectorDropdownItem:N,renderPageSizeSelectorInputItem:E,onPageChange:X=>Yn({...ce,pageIndex:X}),onPageSizeChange:X=>Yn({...ce,pageSize:X,pageIndex:0})})]}):y.jsxs(I,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:k.cx(V),children:[y.jsx(Qy,{width:24,height:24,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),y.jsx(K,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:S.title}),y.jsx(K,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:S.description}),typeof S.action=="string"?y.jsx(es,{width:"auto",onClick:B,intensity:"secondary",color:"accent",children:S.action}):S.action]})};Vt.displayName="Table";Vt.HeadCellContent=oi;Vt.BodyCellContent=Sc;Vt.HeadCellContentSortable=_c;Vt.createColumnHelper=dc;const p0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("path",{d:"M9 17L14 12L9 7",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),v0="_link_aolvt_8",y0="_separator_aolvt_19",w0="_nav_aolvt_23",En={link:v0,separator:y0,nav:w0,"nav-item":"_nav-item_aolvt_29"},si=({children:e,separator:t=y.jsx(p0,{className:En.separator})})=>{const n=C.Children.toArray(e).filter(o=>C.isValidElement(o));return y.jsx("nav",{"aria-label":"breadcrumb",className:En.nav,children:n.map((o,s)=>{const i=s===n.length-1;return y.jsxs(K,{tag:"span",className:En["nav-item"],children:[C.cloneElement(o,{active:o.props.active??i}),!i&&t]},s)})})},x0=({children:e,href:t,active:n,className:o,activeClassName:s,activeElement:i,onClick:r})=>n?i||y.jsx(K,{tag:"span",variant:"body-2",fontWeight:"medium",colorName:"primary",className:k.cx(o,s),onClick:r,children:e}):y.jsx("a",{href:t,className:k.cx(En.link,o),onClick:r,children:e});si.Item=x0;si.displayName="Breadcrumbs";const C0=si,S0="_avatar_wstms_8",b0="_fullRound_wstms_15",_0="_avatar_primary_wstms_25",R0="_avatar_secondary_wstms_28",E0="_avatar_negative_wstms_31",M0="_avatar_positive_wstms_34",P0="_avatar_warning_wstms_37",T0="_avatar_neutral_wstms_40",V0="_avatar_2xsSize_wstms_83",A0="_avatar_xsSize_wstms_97",D0="_avatar_smSize_wstms_111",k0="_avatar_mdSize_wstms_125",F0="_avatar_lgSize_wstms_139",L0="_avatar_xlSize_wstms_153",I0="_avatar_2xlSize_wstms_167",yn={avatar:S0,fullRound:b0,avatar_primary:_0,avatar_secondary:R0,avatar_negative:E0,avatar_positive:M0,avatar_warning:P0,avatar_neutral:T0,avatar_2xsSize:V0,avatar_xsSize:A0,avatar_smSize:D0,avatar_mdSize:k0,avatar_lgSize:F0,avatar_xlSize:L0,avatar_2xlSize:I0};function j0({attr:e,children:t,className:n,color:o="primary",size:s="md",fullRound:i=!1,...r}){const a="avatar";return y.jsx("div",{...e,...r,className:ot(yn[a],n,Ht(yn,a,s),In(yn,a,o),{[yn.fullRound]:i}),children:t})}const ds={neutral:{border:"var(--border-neutral-alpha-low)",bg:"var(--status-neutral-tint)",color:"var(--text-secondary)",colorName:"secondary"},accent:{border:"var(--border-accent-secondary)",bg:"var(--status-accent-tint-low)",color:"var(--text-accent)",colorName:"accent"},warning:{border:"var(--border-warning-secondary)",bg:"var(--status-warning-tint-low)",color:"var(--text-warning)",colorName:"warning"},positive:{border:"var(--border-positive-secondary)",bg:"var(--status-positive-tint-low)",color:"var(--text-positive)",colorName:"positive"},negative:{border:"var(--border-negative-secondary)",bg:"var(--status-negative-tint-low)",color:"var(--text-negative)",colorName:"negative"}},wn={sm:{h:24,text:"caption-1",corner:"var(--corner-xs)",p:"6px var(--spacing-sm)"},md:{h:32,text:"body-2",corner:"var(--corner-sm)",p:"6px var(--spacing-md)"},lg:{h:40,text:"body-2",corner:"var(--corner-md)",p:"6px var(--spacing-lg)"}},$0=(e,t,n,o)=>{const s=ds[t];let i=s.bg,r="none";const a=s.color;switch(e){case"outline":i="transparent",r=`1px solid ${s.border}`;break;case"clear":i="transparent";break;case"filled":default:i=s.bg;break}return k.css({cursor:n?"not-allowed":o?"pointer":"default",opacity:n?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s",backgroundColor:i,color:a,border:r})},O0=k.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}}),Mc=({label:e,color:t="neutral",size:n="md",variant:o="filled",leftElement:s,rightElement:i,disabled:r,onClick:a,onDelete:l,className:c})=>{const u=$0(o,t,r,a);return y.jsxs(I,{row:!0,alignItems:"center",gap:"var(--spacing-sm)",p:wn[n].p,h:wn[n].h,overflow:"hidden",borderRadius:wn[n].corner,onClick:a,className:k.cx(u,c),children:[a&&y.jsx(ct,{}),s,y.jsx(K,{variant:wn[n].text,colorName:ds[t].colorName,textOverflow:"ellipsis",children:e}),i,l&&!r&&y.jsx(K,{className:O0,colorName:ds[t].colorName,onClick:d=>{d.stopPropagation(),l(d)},children:y.jsx(oc,{})})]})};Mc.displayName="Badge";const N0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),b.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Yr=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.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}),b.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"}),b.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"})),B0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},b.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),b.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),z0=e=>b.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...e},b.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"})),H0="_hint_prca1_8",W0="_md_prca1_19",G0="_sm_prca1_24",U0="_icon_prca1_29",K0="_content_prca1_40",q0="_title_prca1_46",X0="_subtitle_prca1_50",Y0="_disabled_prca1_55",Z0="_warning_prca1_60",J0="_solid_prca1_60",Q0="_negative_prca1_65",ew="_positive_prca1_70",tw="_accent_prca1_75",nw="_neutral_prca1_80",ow="_soft_prca1_85",be={hint:H0,md:W0,sm:G0,icon:U0,content:K0,title:q0,subtitle:X0,disabled:Y0,warning:Z0,solid:J0,negative:Q0,positive:ew,accent:tw,neutral:nw,soft:ow},sw={negative:y.jsx(B0,{}),positive:y.jsx(N0,{}),accent:y.jsx(Yr,{}),warning:y.jsx(Yr,{}),neutral:y.jsx(z0,{})},iw=({title:e,subtitle:t,color:n="warning",variant:o="soft",size:s="md",icon:i,disabled:r=!1,className:a,style:l})=>{const c=i||sw[n];return y.jsxs("div",{className:ot(be.hint,be[n],be[o],be[s],r&&be.disabled,a),style:l,"aria-disabled":r,children:[c&&y.jsx("span",{className:ot(be.icon,be[n]),children:c}),y.jsxs("div",{className:be.content,children:[e&&y.jsx(K,{className:ot(be.title,Ht(be,"title",s)),variant:s==="md"?"body-1":"caption-2",children:e}),t&&y.jsx(K,{className:ot(be.subtitle,Ht(be,"subtitle",s)),variant:s==="md"?"body-2":"caption-1",children:t})]})]})},rw=k.keyframes`
28
+ `),_.createElement("g",{className:"spinner"},_.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}),_.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"}))),k0=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{clipPath:"url(#clip0_2074_3858)"},_.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"})),_.createElement("defs",null,_.createElement("clipPath",{id:"clip0_2074_3858"},_.createElement("rect",{width:24,height:24,fill:"white"})))),F0="_table_19yhs_8",L0={table:F0},qc=C.forwardRef(({children:e,className:t,style:n,...o},s)=>p.jsx("td",{ref:s,className:V.cx(t),style:n,...o,children:e}));qc.displayName="TableBodyCell";const Xc=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:o="center",py:s="var(--spacing-sm)",px:i="var(--spacing-md)",minHeight:r="56px",...a},l)=>p.jsx(L,{row:t,justifyContent:n,alignItems:o,py:s,px:i,minHeight:r,ref:l,...a,children:e}));Xc.displayName="TableBodyCellContent";const Yc=C.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:o=!1,...s},i)=>{const r=V.css({borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return p.jsx("tr",{ref:i,className:V.cx(r,t),...s,children:e})});Yc.displayName="TableBodyRow";const I0=C.forwardRef(({children:e,className:t,style:n,justifyContent:o="flex-start",alignItems:s="flex-start",...i},r)=>{const a=V.css({justifyContent:o,alignItems:s,fontWeight:"inherit"});return p.jsx("th",{ref:r,className:V.cx(a,t),style:n,...i,children:e})}),wi=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:o="center",py:s="var(--spacing-sm)",px:i="var(--spacing-md)",minHeight:r="56px",...a},l)=>p.jsx(L,{row:t,justifyContent:n,alignItems:o,py:s,px:i,minHeight:r,ref:l,...a,children:e}));wi.displayName="TableHeadCellContent";const j0=e=>_.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M8.75 0.75L4.75 4.75L0.75 0.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),$0=e=>_.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M8.75 4.75L4.75 0.75L0.75 4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),O0=({sortDirection:e,gap:t="5px",...n})=>p.jsxs(L,{gap:t,...n,children:[p.jsx($0,{style:{color:e==="asc"?"var(--icon-accent)":"var(--icon-tertiary)"}}),p.jsx(j0,{style:{color:e==="desc"?"var(--icon-accent)":"var(--icon-tertiary)"}})]}),Zc=({children:e,tableProps:t,gap:n="10px",...o})=>{const s=t.column.getIsSorted();return p.jsxs(wi,{style:{cursor:"pointer",userSelect:"none"},gap:n,...o,children:[e,p.jsx(O0,{sortDirection:s})]})};Zc.displayName="TableHeadCellContentSortable";const Jc=C.forwardRef(({children:e,className:t,showBorders:n=!1,...o},s)=>{const i=V.css({backgroundColor:"var(--fill-bg-secondary)",borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return p.jsx("tr",{ref:s,className:V.cx(i,t),...o,children:e})});Jc.displayName="TableHeadRow";const N0=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),B0=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),z0=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.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"}),_.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"}),_.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"})),Oo=(e,t)=>{const n=t-e+1;return Array.from({length:n},(o,s)=>e+s)};function H0(e){const{count:t=1,page:n,maxVisiblePages:o=10}=e;let s=1,i=1;if(o<=2)return[n];o<=4?(s=0,i=0):o<=6?(s=1,i=0):o<=7?(s=1,i=Math.max(0,Math.floor((o-4)/2))):(s=1,i=Math.max(1,Math.floor((o-5)/2)));const r=Oo(1,Math.min(s,t)),a=Oo(Math.max(t-s+1,s+1),t),l=Math.max(Math.min(n-i,t-s-i*2-1),s+2),c=Math.min(Math.max(n+i,s+i*2+2),t-s-1);return[...r,...l>s+2?["start-dots"]:s+1<t-s?[s+1]:[],...Oo(l,c),...c<t-s-1?["end-dots"]:t-s>s?[t-s]:[],...a]}const W0=({pageIndex:e,pageSize:t,totalCount:n,onPageChange:o,onPageSizeChange:s,pageSizeOptions:i=[10,20,50,100],showPageSizeSelector:r=!0,renderPageSizeSelectorDropdownItem:a=c=>c.label,renderPageSizeSelectorInputItem:l})=>{const c=C.useRef(null),[u,f]=C.useState(0),d=Math.ceil(n/t),h=e>0,m=e<d-1;C.useEffect(()=>{const S=c.current;if(!S)return;const M=new ResizeObserver(T=>{for(const P of T)f(P.contentRect.width)});return M.observe(S),()=>{M.disconnect()}},[]);const y=(S=>{if(S<=0)return 1;const F=S-96;if(F<=40)return 1;const $=Math.floor((F+8)/48);return Math.max(1,Math.min(10,$))})(u),x=H0({page:e+1,count:d,maxVisiblePages:y}),w=()=>{h&&o(e-1)},v=()=>{m&&o(e+1)},b=S=>{s(Number(S))};return n===0?null:p.jsxs(L,{flex:1,row:!0,justifyContent:"space-between",children:[p.jsxs(L,{ref:c,flex:1,row:!0,overflow:"hidden",gap:"var(--spacing-sm)",children:[p.jsx(Yt,{onClick:w,disabled:!h,color:"neutral",size:"sm",children:p.jsx(N0,{})}),p.jsx(L,{row:!0,gap:"var(--spacing-sm)",children:x.map(S=>p.jsx(G0,{isDots:S==="start-dots"||S==="end-dots",isCurrentPage:S===e+1,disabled:S==="start-dots"||S==="end-dots",onClick:()=>o(S-1),children:S},S))}),p.jsx(Yt,{color:"neutral",size:"sm",onClick:v,disabled:!m,children:p.jsx(B0,{})})]}),r&&p.jsx(L,{alignItems:"flex-end",children:p.jsx(Vc,{width:"fit-content",value:t.toString(),size:"sm",items:i.map(S=>({value:S.toString(),label:S.toString()})),returnedValue:S=>S.value,renderDropdownItem:a,renderSingleInputItem:l,onChange:S=>b(S)})})]})},G0=({children:e,isCurrentPage:t=!1,onClick:n,isDots:o=!1,disabled:s=!1})=>{const i=V.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=V.css({width:"24px",height:"24px",color:t?"var(--icon-secondary)":"var(--icon-tertiary)"});return p.jsx(L,{className:i,onClick:s?void 0:n,children:o?p.jsx(z0,{className:r}):p.jsx(K,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},U0=V.css({position:"relative",borderRadius:"var(--corner-md)",overflow:"hidden","&::before, &::after":{content:'""',position:"absolute",top:0,bottom:14,width:96,pointerEvents:"none",zIndex:1,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%)"}}),K0=V.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--gray-86) var(--gray-96)"}),Qc=C.memo(({data:e,children:t,className:n,showBorders:o=!1,...s})=>{const[i,r]=C.useState(!1),[a,l]=C.useState(!1),c=C.useRef(null),u=C.useCallback(()=>{const d=c.current;if(!d)return;const{scrollLeft:h,scrollWidth:m,clientWidth:g}=d,y=m>g;r(y&&h>0),l(y&&h<m-g-1)},[]);C.useEffect(()=>{const d=c.current;if(!d)return;u();const h=new ResizeObserver(u);return h.observe(d),d.addEventListener("scroll",u),()=>{h.disconnect(),d.removeEventListener("scroll",u)}},[u,e]);const f=V.css({border:o?"1px solid var(--border-neutral-alpha-low)":"transparent","&::before":{opacity:i?1:0},"&::after":{opacity:a?1:0}});return p.jsx(L,{className:V.cx(U0,f,n),...s,children:p.jsx(L,{ref:c,className:K0,children:t})})});Qc.displayName="TableWrapper";const q0=V.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:"var(--fill-bg-primary)"}),X0=V.css({backgroundColor:"var(--fill-bg-secondary)",color:"var(--text-tertiary)"}),Ot=({ref:e,data:t,columns:n,showBorders:o=!0,enableSorting:s=!1,enablePagination:i=!1,enableRowSelection:r=!1,enableMultiRowSelection:a=!1,sorting:l,onSortingChange:c,columnFilters:u,onColumnFiltersChange:f,columnVisibility:d,onColumnVisibilityChange:h,pagination:m,onPaginationChange:g,rowSelection:y,onRowSelectionChange:x,totalCount:w,loading:v=!1,emptyLabels:b={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:M,containerClassName:T,tableOptions:P={},onRowClick:D,getRowId:F,headCellComponent:$=I0,bodyCellComponent:O=qc,headRowComponent:j=Jc,bodyRowComponent:k=Yc,onReset:N,renderPageSizeSelectorDropdownItem:z,renderPageSizeSelectorInputItem:E})=>{const[R,A]=C.useState([]),[I,X]=C.useState([]),[U,q]=C.useState({}),[Q,Z]=C.useState({pageIndex:0,pageSize:10}),[ne,le]=C.useState({}),Ce=l??R,me=u??I,je=d??U,B=m??Q,J=y??ne,re=Y=>{const te=typeof Y=="function"?Y(Ce):Y;c?c(te):A(te)},ue=Y=>{const te=typeof Y=="function"?Y(me):Y;f?f(te):X(te)},Ae=Y=>{const te=typeof Y=="function"?Y(je):Y;h?h(te):q(te)},Ve=Y=>{const te=typeof Y=="function"?Y(B):Y;g?g(te):Z(te)},vt=V0({data:t,columns:n,state:{sorting:Ce,columnFilters:me,columnVisibility:je,pagination:B,rowSelection:J},onSortingChange:re,onColumnFiltersChange:ue,onColumnVisibilityChange:Ae,onPaginationChange:Ve,onRowSelectionChange:Y=>{const te=typeof Y=="function"?Y(J):Y;x?x(te):le(te)},getCoreRowModel:_0(),getSortedRowModel:s?P0():void 0,getPaginationRowModel:i?E0():void 0,enableRowSelection:r,enableMultiRowSelection:a,getRowId:F,manualPagination:!!w,pageCount:w?Math.ceil(w/B.pageSize):void 0,...P});C.useImperativeHandle(e,()=>vt);const{rows:dn}=vt.getRowModel(),oo=(Y,te)=>{D&&D(Y.original,te)};return v?p.jsxs(L,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:V.cx(T),children:[p.jsx(D0,{width:32,height:32,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),p.jsx(K,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:S.title}),p.jsx(K,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:S.description}),typeof S.action=="string"?p.jsx(us,{width:"auto",onClick:N,intensity:"secondary",color:"accent",children:S.action}):S.action]}):dn.length?p.jsxs(L,{w:"full",gap:"var(--spacing-xl)",className:V.cx(T),children:[p.jsx(Qc,{data:t,showBorders:o,children:p.jsxs("table",{className:V.cx(q0,L0.table,M),children:[p.jsx("thead",{className:X0,children:vt.getHeaderGroups().map(Y=>p.jsx(j,{showBorders:o,children:Y.headers.map(te=>p.jsx($,{style:{width:te.getSize()},onClick:te.column.getToggleSortingHandler(),children:te.isPlaceholder?null:ga(te.column.columnDef.header,te.getContext())},te.id))},Y.id))}),p.jsx("tbody",{children:dn.map((Y,te)=>p.jsx(k,{showBorders:o,isSelected:Y.getIsSelected(),onClick:()=>oo(Y,te),children:Y.getVisibleCells().map(so=>p.jsx(O,{children:ga(so.column.columnDef.cell,so.getContext())},so.id))},Y.id))})]})}),i&&!v&&p.jsx(W0,{pageIndex:B.pageIndex,pageSize:B.pageSize,totalCount:w||t.length,renderPageSizeSelectorDropdownItem:z,renderPageSizeSelectorInputItem:E,onPageChange:Y=>Ve({...B,pageIndex:Y}),onPageSizeChange:Y=>Ve({...B,pageSize:Y,pageIndex:0})})]}):p.jsxs(L,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:V.cx(T),children:[p.jsx(k0,{width:24,height:24,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),p.jsx(K,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:b.title}),p.jsx(K,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:b.description}),typeof b.action=="string"?p.jsx(us,{width:"auto",onClick:N,intensity:"secondary",color:"accent",children:b.action}):b.action]})};Ot.displayName="Table";Ot.HeadCellContent=wi;Ot.BodyCellContent=Xc;Ot.HeadCellContentSortable=Zc;Ot.createColumnHelper=$c;const No={chart:{type:"areaspline",backgroundColor:"transparent",spacing:[0,0,0,0],margin:[0,0,0,0]},xAxis:{gridLineWidth:0,lineWidth:0,tickWidth:0,labels:{enabled:!1},title:{text:""}},yAxis:{gridLineWidth:0,lineWidth:0,tickWidth:0,labels:{enabled:!1},title:{text:""}},legend:{enabled:!1},credits:{enabled:!1}},Y0={positive:{color:"var(--fill-positive-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-positive-tint-high)"],[1,"var(--fill-positive-transparent)"]]}},negative:{color:"var(--fill-negative-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-negative-tint-high)"],[1,"var(--fill-negative-transparent)"]]}},accent:{color:"var(--fill-accent-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-accent-tint-high)"],[1,"var(--fill-accent-transparent)"]]}},warning:{color:"var(--fill-warning-primary)",fillColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"var(--fill-warning-tint-high)"],[1,"var(--fill-warning-transparent)"]]}}},Z0=(e,t,n,o,s)=>({...No,plotOptions:{areaspline:{marker:{enabled:!1,states:{hover:{enabled:s}}},allowPointSelect:!1}},xAxis:{...No.xAxis,...n},yAxis:{...No.yAxis,...o},series:[{type:"areaspline",data:t,...Y0[e]}]}),J0=e=>({outside:!0,enabled:!!e,padding:0,position:{alignByTranslate:!0},shadow:{color:"var(--effect-shadow-m)",offsetX:0,offsetY:0},borderRadius:8,backgroundColor:"var(--fill-bg-primary)",useHTML:!0,...e}),eu=({color:e="positive",data:t=[],xAxis:n,yAxis:o,containerProps:s,highcharts:i,tooltip:r})=>{const a=C.useRef(null);C.useEffect(()=>()=>{typeof a=="object"&&a?.current?.chart&&a.current.chart.destroy()},[]);const l=C.useMemo(()=>Z0(e,t,n,o,!!r),[e,t,n,o,r]),c=C.useMemo(()=>r?J0(r):{enabled:!1},[r]);return p.jsx(kn.Chart,{highcharts:i,ref:a,options:l,containerProps:s,children:p.jsx(kn.Tooltip,{...c})})};eu.displayName="LineChart";const Q0={chart:{type:"pie",backgroundColor:"transparent",spacing:[0,0,0,0],margin:[0,0,0,0],events:{click:void 0}},title:{align:"center",verticalAlign:"middle",floating:!0,style:{fontSize:"24px",fontWeight:"600",color:"var(--text-primary)"}},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},startAngle:90,endAngle:-90,innerSize:"90%",borderWidth:0,states:{hover:{enabled:!1},select:{enabled:!1},inactive:{enabled:!1}},enableMouseTracking:!1}},tooltip:{enabled:!1},legend:{enabled:!1},credits:{enabled:!1}},ex={positive:{colors:["var(--fill-positive-primary)","var(--fill-positive-tint-high)"]},negative:{colors:["var(--fill-negative-primary)","var(--fill-negative-tint-high)"]},accent:{colors:["var(--fill-accent-primary)","var(--fill-accent-tint-high)"]},warning:{colors:["var(--fill-warning-primary)","var(--fill-warning-tint-high)"]}},tx=(e,t)=>({...Q0,series:[{type:"pie",data:[{name:"",y:Math.min(e,100)},{name:"",y:Math.max(100-e,0)}],...ex[t]}]}),tu=C.forwardRef(({highcharts:e,color:t="positive",percentage:n,label:o=r=>`${r}%`,containerProps:s},i)=>{const r=C.useRef(null),a=i||r;C.useEffect(()=>()=>{typeof a=="object"&&a?.current?.chart&&a.current.chart.destroy()},[a]);const l=C.useMemo(()=>tx(n,t),[n,t]);return p.jsx(kn.Chart,{highcharts:e,ref:a,options:l,containerProps:s,children:p.jsx(kn.Title,{children:o?.(n)})})});tu.displayName="PieProgressChart";const nx=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M9 17L14 12L9 7",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),ox="_link_aolvt_8",sx="_separator_aolvt_19",ix="_nav_aolvt_23",Dn={link:ox,separator:sx,nav:ix,"nav-item":"_nav-item_aolvt_29"},Ci=({children:e,separator:t=p.jsx(nx,{className:Dn.separator})})=>{const n=C.Children.toArray(e).filter(o=>C.isValidElement(o));return p.jsx("nav",{"aria-label":"breadcrumb",className:Dn.nav,children:n.map((o,s)=>{const i=s===n.length-1;return p.jsxs(K,{tag:"span",className:Dn["nav-item"],children:[C.cloneElement(o,{active:o.props.active??i}),!i&&t]},s)})})},rx=({children:e,href:t,active:n,className:o,activeClassName:s,activeElement:i,onClick:r})=>n?i||p.jsx(K,{tag:"span",variant:"body-2",fontWeight:"medium",colorName:"primary",className:V.cx(o,s),onClick:r,children:e}):p.jsx("a",{href:t,className:V.cx(Dn.link,o),onClick:r,children:e});Ci.Item=rx;Ci.displayName="Breadcrumbs";const ax=Ci,lx="_avatar_wstms_8",cx="_fullRound_wstms_15",ux="_avatar_primary_wstms_25",dx="_avatar_secondary_wstms_28",fx="_avatar_negative_wstms_31",hx="_avatar_positive_wstms_34",gx="_avatar_warning_wstms_37",mx="_avatar_neutral_wstms_40",px="_avatar_2xsSize_wstms_83",vx="_avatar_xsSize_wstms_97",yx="_avatar_smSize_wstms_111",xx="_avatar_mdSize_wstms_125",wx="_avatar_lgSize_wstms_139",Cx="_avatar_xlSize_wstms_153",Sx="_avatar_2xlSize_wstms_167",bn={avatar:lx,fullRound:cx,avatar_primary:ux,avatar_secondary:dx,avatar_negative:fx,avatar_positive:hx,avatar_warning:gx,avatar_neutral:mx,avatar_2xsSize:px,avatar_xsSize:vx,avatar_smSize:yx,avatar_mdSize:xx,avatar_lgSize:wx,avatar_xlSize:Cx,avatar_2xlSize:Sx};function bx({attr:e,children:t,className:n,color:o="primary",size:s="md",fullRound:i=!1,...r}){const a="avatar";return p.jsx("div",{...e,...r,className:lt(bn[a],n,Xt(bn,a,s),Wn(bn,a,o),{[bn.fullRound]:i}),children:t})}const Cs={neutral:{border:"var(--border-neutral-alpha-low)",bg:"var(--status-neutral-tint)",color:"var(--text-secondary)",colorName:"secondary"},accent:{border:"var(--border-accent-secondary)",bg:"var(--status-accent-tint-low)",color:"var(--text-accent)",colorName:"accent"},warning:{border:"var(--border-warning-secondary)",bg:"var(--status-warning-tint-low)",color:"var(--text-warning)",colorName:"warning"},positive:{border:"var(--border-positive-secondary)",bg:"var(--status-positive-tint-low)",color:"var(--text-positive)",colorName:"positive"},negative:{border:"var(--border-negative-secondary)",bg:"var(--status-negative-tint-low)",color:"var(--text-negative)",colorName:"negative"}},_n={sm:{h:24,text:"caption-1",corner:"var(--corner-xs)",p:"6px var(--spacing-sm)"},md:{h:32,text:"body-2",corner:"var(--corner-sm)",p:"6px var(--spacing-md)"},lg:{h:40,text:"body-2",corner:"var(--corner-md)",p:"6px var(--spacing-lg)"}},_x=(e,t,n,o)=>{const s=Cs[t];let i=s.bg,r="none";const a=s.color;switch(e){case"outline":i="transparent",r=`1px solid ${s.border}`;break;case"clear":i="transparent";break;default:i=s.bg;break}return V.css({cursor:n?"not-allowed":o?"pointer":"default",opacity:n?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s",backgroundColor:i,color:a,border:r})},Rx=V.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}}),nu=({label:e,color:t="neutral",size:n="md",variant:o="filled",leftElement:s,rightElement:i,disabled:r,onClick:a,onDelete:l,className:c})=>{const u=_x(o,t,r,a);return p.jsxs(L,{row:!0,alignItems:"center",gap:"var(--spacing-sm)",p:_n[n].p,h:_n[n].h,overflow:"hidden",borderRadius:_n[n].corner,onClick:a,className:V.cx(u,c),children:[a&&p.jsx(mt,{}),s,p.jsx(K,{variant:_n[n].text,colorName:Cs[t].colorName,textOverflow:"ellipsis",children:e}),i,l&&!r&&p.jsx(K,{className:Rx,colorName:Cs[t].colorName,onClick:f=>{f.stopPropagation(),l(f)},children:p.jsx(Ac,{})})]})};nu.displayName="Badge";const Ex=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),_.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),ma=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.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}),_.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"}),_.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"})),Px=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),_.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),Mx=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...e},_.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"})),Tx="_hint_prca1_8",Ax="_md_prca1_19",Vx="_sm_prca1_24",Dx="_icon_prca1_29",kx="_content_prca1_40",Fx="_title_prca1_46",Lx="_subtitle_prca1_50",Ix="_disabled_prca1_55",jx="_warning_prca1_60",$x="_solid_prca1_60",Ox="_negative_prca1_65",Nx="_positive_prca1_70",Bx="_accent_prca1_75",zx="_neutral_prca1_80",Hx="_soft_prca1_85",_e={hint:Tx,md:Ax,sm:Vx,icon:Dx,content:kx,title:Fx,subtitle:Lx,disabled:Ix,warning:jx,solid:$x,negative:Ox,positive:Nx,accent:Bx,neutral:zx,soft:Hx},Wx={negative:p.jsx(Px,{}),positive:p.jsx(Ex,{}),accent:p.jsx(ma,{}),warning:p.jsx(ma,{}),neutral:p.jsx(Mx,{})},Gx=({title:e,subtitle:t,color:n="warning",variant:o="soft",size:s="md",icon:i,disabled:r=!1,className:a,style:l})=>{const c=i||Wx[n];return p.jsxs("div",{className:lt(_e.hint,_e[n],_e[o],_e[s],r&&_e.disabled,a),style:l,"aria-disabled":r,children:[c&&p.jsx("span",{className:lt(_e.icon,_e[n]),children:c}),p.jsxs("div",{className:_e.content,children:[e&&p.jsx(K,{className:lt(_e.title,Xt(_e,"title",s)),variant:s==="md"?"body-1":"caption-2",children:e}),t&&p.jsx(K,{className:lt(_e.subtitle,Xt(_e,"subtitle",s)),variant:s==="md"?"body-2":"caption-1",children:t})]})]})},Ux=V.keyframes`
51
29
  from {
52
30
  opacity: 0;
53
31
  }
54
32
  to {
55
33
  opacity: 1;
56
34
  }
57
- `,aw=k.css({animation:`${rw} 0.2s ease-out`,boxShadow:"0 4px 20px 0 var(--effect-shadow-s)"}),lw=({children:e,className:t,...n})=>y.jsx(I,{relative:!0,backgroundColor:"var(--fill-bg-primary)",borderRadius:"var(--corner-md)",className:k.cx(aw,t),...n,children:e}),cw=({children:e,content:t,initialOpen:n=!1,open:o,onChange:s,placement:i="bottom",trigger:r="click",offset:a=12,closeOnBackdropClick:l=!0,closeOnEsc:c=!0,className:u,contentClassName:d,style:f,openDelay:h=200,closeDelay:m=200,zIndex:g=1,popoverContentComponent:p=lw})=>{const[w,x]=C.useState(n),v=o??w,S=s??x,_=C.useCallback(E=>{l&&E.target===E.currentTarget&&S(!1)},[l,S]),{context:P,refs:V,floatingStyles:M}=nc({placement:i,open:v,onOpenChange:S,whileElementsMounted:Xl,middleware:[Zl(a),Ql({crossAxis:i.includes("-"),fallbackAxisSideDirection:i.includes("start")?"start":"end",padding:a}),Jl({padding:a})]}),A=iv(P,{enabled:r==="click"}),F=ov(P,{enabled:r==="hover",delay:{open:h,close:m}}),$=lv(P,{enabled:c,escapeKey:!0}),z=fv(P),O=uv([A,F,$,z]),D=e.ref,B=Kp([V.setReference,D]),N=C.cloneElement(e,O.getReferenceProps({...e.props,ref:B,"data-state":P.open?"open":"closed"}));return y.jsxs(y.Fragment,{children:[N,v&&y.jsxs(qn,{children:[r!=="hover"&&l&&y.jsx(I,{position:"fixed",top:0,right:0,bottom:0,left:0,display:"block",backgroundColor:"transparent",onClick:_,zIndex:g}),y.jsx(I,{absolute:!0,zIndex:g,className:u,ref:V.setFloating,style:{...M,...f},...O.getFloatingProps(),children:y.jsx(p,{className:d,children:t})})]})]})},uw="_themeProviderScoped_wp43s_9",dw={themeProviderScoped:uw};function fw({className:e,children:t,theme:n}){const o=C.useRef(null);return y.jsx(uc.Provider,{value:o,children:y.jsx("div",{ref:o,className:ot(dw.themeProviderScoped,e),id:"theme-provider-scoped","data-theme":n,children:t})})}exports.AnimatedText=Ll;exports.Avatar=j0;exports.Badge=Mc;exports.Box=I;exports.Breadcrumbs=C0;exports.Button=es;exports.Checkbox=Ks;exports.Hint=iw;exports.IconButton=Wt;exports.Input=Il;exports.Loader=Jr;exports.Modal=Kn;exports.OtpInput=jl;exports.Popover=cw;exports.Portal=qn;exports.Ripple=ct;exports.SegmentControl=$m;exports.Select=sc;exports.Switch=ic;exports.Table=Vt;exports.Tabs=rc;exports.Tag=Qs;exports.Text=K;exports.ThemeProviderScoped=fw;exports.createColumnHelper=dc;exports.getSizeClass=Ht;exports.getStyleClass=In;exports.useControlled=Jt;
35
+ `,Kx=V.css({animation:`${Ux} 0.2s ease-out`,boxShadow:"0 4px 20px 0 var(--effect-shadow-s)"}),qx=({children:e,className:t,...n})=>p.jsx(L,{relative:!0,backgroundColor:"var(--fill-bg-primary)",borderRadius:"var(--corner-md)",className:V.cx(Kx,t),...n,children:e}),Xx=({children:e,content:t,initialOpen:n=!1,open:o,onChange:s,placement:i="bottom",trigger:r="click",offset:a=12,closeOnBackdropClick:l=!0,closeOnEsc:c=!0,className:u,contentClassName:f,style:d,openDelay:h=200,closeDelay:m=200,zIndex:g=1,popoverContentComponent:y=qx})=>{const[x,w]=C.useState(n),v=o??x,b=s??w,S=C.useCallback(E=>{l&&E.target===E.currentTarget&&b(!1)},[l,b]),{context:M,refs:T,floatingStyles:P}=mi({placement:i,open:v,onOpenChange:b,whileElementsMounted:li,middleware:[ci(a),di({crossAxis:i.includes("-"),fallbackAxisSideDirection:i.includes("start")?"start":"end",padding:a}),ui({padding:a})]}),D=Bv(M,{enabled:r==="click"}),F=Ec(M,{enabled:r==="hover",delay:{open:h,close:m}}),$=Pc(M,{enabled:c,escapeKey:!0}),O=Tc(M),j=Mc([D,F,$,O]),k=e.ref,N=_c([T.setReference,k]),z=C.cloneElement(e,j.getReferenceProps({...e.props,ref:N,"data-state":M.open?"open":"closed"}));return p.jsxs(p.Fragment,{children:[z,v&&p.jsxs(un,{children:[r!=="hover"&&l&&p.jsx(L,{position:"fixed",top:0,right:0,bottom:0,left:0,display:"block",backgroundColor:"transparent",onClick:S,zIndex:g}),p.jsx(L,{absolute:!0,zIndex:g,className:u,ref:T.setFloating,style:{...P,...d},...j.getFloatingProps(),children:p.jsx(y,{className:f,children:t})})]})]})},pa={xs:{width:16,height:16},sm:{width:24,height:24},md:{width:32,height:32},lg:{width:40,height:40},xl:{width:48,height:48}},Yx={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)",circular:"50%"},va=V.css({backgroundColor:"var(--status-neutral-tint)",borderRadius:"var(--corner-sm)",position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,background:"linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent)",transform:"translateX(-100%)"}}),Zx=V.css({animation:"skeleton-pulse 1.5s ease-in-out infinite","@keyframes skeleton-pulse":{"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}}),Jx=V.css({"&::before":{animation:"skeleton-wave 1.6s linear infinite"},"@keyframes skeleton-wave":{"0%":{transform:"translateX(-100%)"},"50%":{transform:"translateX(100%)"},"100%":{transform:"translateX(100%)"}}}),ya=(e,t)=>{if(t!==void 0)return V.css({borderRadius:Yx[t]});switch(e){case"circular":return V.css({borderRadius:"50%"});case"text":return V.css({borderRadius:"var(--corner-xs)"});default:return V.css({borderRadius:"var(--corner-sm)"})}},xa=e=>{switch(e){case"pulse":return Zx;case"wave":return Jx;default:return""}},ou=({width:e,height:t,variant:n="rectangular",size:o="md",animation:s="wave",lines:i=1,className:r,children:a,loading:l=!0,borderRadius:c})=>{if(!l&&a)return p.jsx(p.Fragment,{children:a});if(!l)return null;const u=e||pa[o].width,f=t||pa[o].height;return n==="text"&&i>1?p.jsx(L,{gap:"var(--spacing-sm)",className:r,children:Array.from({length:i},(d,h)=>p.jsx(L,{className:V.cx(va,ya(n,c),xa(s)),w:h===i-1?"70%":u,h:f},h))}):p.jsx(L,{className:V.cx(va,ya(n,c),xa(s),r),w:u,h:f})};ou.displayName="Skeleton";const Qx={top:"polygon(100% 0%, 50% 100%, 0% 0%)",bottom:"polygon(0% 100%, 50% 0%, 100% 100%)","top-start":"polygon(0% 0%, 0% 100%, 100% 0%)","top-end":"polygon(100% 0%, 100% 100%, 0% 0%)","bottom-start":"polygon(0% 100%, 0% 0%, 100% 100%)","bottom-end":"polygon(100% 100%, 100% 0%, 0% 100%)",left:"polygon(0% 100%, 100% 50%, 0% 0%)",right:"polygon(100% 100%, 0% 50%, 100% 0%)"},ew=10,tw=6,Rn=1,wa={primary:{backgroundColor:"var(--fill-bg-primary)",color:"var(--text-primary)"},inverse:{backgroundColor:"var(--fill-bg-primary-inverse)",color:"var(--text-primary-inverse)"}},nw=(e,t)=>(e==="top"||e==="bottom")&&t?`${e}-${t}`:e,ow=(e,t,n)=>n?(e==="top"||e==="bottom")&&t?{[e==="top"?t==="start"?"borderBottomLeftRadius":"borderBottomRightRadius":t==="start"?"borderTopLeftRadius":"borderTopRightRadius"]:0}:{}:{},sw=(e,t,n)=>e==="left"||e==="right"?{width:6,height:n}:t?{width:8,height:6}:{width:n,height:6},iw=(e,t,n)=>e?(t==="top"||t==="bottom")&&n?{x:n==="start"?0:void 0,y:e.y}:{x:e.x,y:e.y}:{x:void 0,y:void 0},rw=V.keyframes`
36
+ from { opacity: 0; transform: translateY(2px); }
37
+ to { opacity: 1; transform: translateY(0); }
38
+ `,aw=V.css({boxShadow:"0 4px 20px 0 var(--effect-shadow-m)",animation:`${rw} 0.16s ease-out`,fontSize:"12px",lineHeight:"16px",fontWeight:"500",wordBreak:"break-word"}),lw=V.css({position:"absolute",clipPath:"var(--tooltip-arrow-shape)"}),su=({color:e="primary",children:t,content:n,disabled:o=!1,initialOpen:s=!1,open:i,onChange:r,placement:a="top",trigger:l="hover",offset:c=5,showArrow:u=!0,openDelay:f=400,closeDelay:d=0,closeOnEsc:h=!0,zIndex:m=1,maxWidth:g,className:y,contentClassName:x,style:w,id:v,p:b="var(--spacing-md)",borderRadius:S="var(--corner-sm)"})=>{const[M,T]=C.useState(s),[P,D]=C.useState(null),F=i??M,$=r??T,O=C.useId(),j=v??`tooltip-${O}`,k=n==null||n==="",N=!o&&!k,z=C.useCallback(oo=>{N&&$(oo)},[N,$]),E=c+(u?tw:0),{context:R,refs:A,floatingStyles:I,middlewareData:X,placement:U}=mi({placement:a,open:N?F:!1,onOpenChange:z,whileElementsMounted:li,middleware:[ci(E),di({crossAxis:a.includes("-"),fallbackAxisSideDirection:a.includes("start")?"start":"end",padding:E}),ui({padding:E}),...u&&P?[Av({element:P,padding:0})]:[]]}),q=X.arrow,Q=U.split("-")[0],Z=U.includes("-")?U.split("-")[1]:null,ne=iw(q,Q,Z),le=nw(Q,Z),Ce=ow(Q,Z,u),me=sw(Q,Z,ew),je=V.css({...Ce,...wa[e]}),B=V.css({left:ne.x??void 0,top:ne.y??void 0,width:me.width,height:me.height,"--tooltip-arrow-shape":Qx[le],...Q==="top"&&{bottom:-me.height+Rn},...Q==="bottom"&&{top:-me.height+Rn},...Q==="left"&&{right:-me.width+Rn},...Q==="right"&&{left:-me.width+Rn},...Z==="end"&&(Q==="top"||Q==="bottom")&&{left:"auto",right:0},...wa[e]}),J=Ec(R,{enabled:l==="hover"&&N,delay:{open:f,close:d},move:!1}),re=Gv(R,{enabled:l==="hover"&&N}),ue=Pc(R,{enabled:h&&N,escapeKey:!0}),Ae=Tc(R,{role:"tooltip"}),Ve=Mc([J,re,ue,Ae]),Si=t.ref,vt=_c([A.setReference,Si]),dn=C.useMemo(()=>C.cloneElement(t,Ve.getReferenceProps({...t.props,ref:vt,"data-state":R.open?"open":"closed",...R.open?{"aria-describedby":j}:{}})),[t,Ve,R.open,j,vt]);return p.jsxs(p.Fragment,{children:[dn,N&&F&&p.jsx(un,{children:p.jsx(L,{absolute:!0,zIndex:m,className:y,ref:A.setFloating,style:{...I,...w},...Ve.getFloatingProps({id:j}),children:p.jsxs(L,{relative:!0,maxWidth:g,p:b,borderRadius:S,className:V.cx(aw,je,x),children:[u&&p.jsx(L,{ref:D,className:V.cx(lw,B)}),typeof n=="string"?p.jsx(K,{colorName:e,variant:"caption-1",fontWeight:"medium",children:n}):n]})})})]})};su.displayName="Tooltip";const cw="_themeProviderScoped_wp43s_9",uw={themeProviderScoped:cw};function dw({className:e,children:t,theme:n}){const o=C.useRef(null);return p.jsx(jc.Provider,{value:o,children:p.jsx("div",{ref:o,className:lt(uw.themeProviderScoped,e),id:"theme-provider-scoped","data-theme":n,children:t})})}exports.AnimatedText=rc;exports.Avatar=bx;exports.Badge=nu;exports.Box=L;exports.Breadcrumbs=ax;exports.Button=us;exports.Checkbox=ni;exports.Hint=Gx;exports.IconButton=Yt;exports.Input=ac;exports.LineChart=eu;exports.Loader=Sa;exports.Modal=to;exports.OtpInput=lc;exports.PieProgressChart=tu;exports.Popover=Xx;exports.Portal=un;exports.Radio=uc;exports.RadioGroup=dc;exports.Ripple=mt;exports.SegmentControl=mp;exports.Select=Vc;exports.Skeleton=ou;exports.Switch=Dc;exports.Table=Ot;exports.Tabs=kc;exports.Tag=pi;exports.Text=K;exports.ThemeProviderScoped=dw;exports.Tooltip=su;exports.createColumnHelper=$c;exports.getSizeClass=Xt;exports.getStyleClass=Wn;exports.useControlled=pt;
58
39
  //# sourceMappingURL=ui-kit.cjs.js.map