tcce-design-system 0.3.21 → 0.3.22

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.
@@ -40,7 +40,7 @@
40
40
  font-style: normal;
41
41
  font-weight: 700;
42
42
  line-height: 161.76%;
43
- `},Hr={80:g.css`
43
+ `},jr={80:g.css`
44
44
  font-family: 'Dax', serif;
45
45
  font-size: 5em;
46
46
  font-style: normal;
@@ -142,12 +142,12 @@
142
142
  font-style: normal;
143
143
  font-weight: 400;
144
144
  line-height: 133%;
145
- `},jr=g.h1`
145
+ `},Gr=g.h1`
146
146
  ${({size:e=24})=>En[e]}
147
147
  margin: 0;
148
148
  color: ${({color:e})=>e||"var(--color-main-blue-primary)"};
149
149
  `,Ec=g.h2`
150
- ${({size:e=24})=>Hr[e]}
150
+ ${({size:e=24})=>jr[e]}
151
151
  margin: 0;
152
152
  color: ${({color:e})=>e||"var(--color-main-blue-primary)"};
153
153
  `,Ie=g.span`
@@ -164,7 +164,7 @@
164
164
  outline: none;
165
165
  box-shadow: var(--shadow-hover-black-card);
166
166
  }
167
- `,Gr={tn:"1rem",sm:"1.5rem",md:"2rem",lg:"3rem"},U=({component:e,size:t="1.5rem",color:n="currentColor",className:o,iconProps:r={}})=>{const i=typeof t=="string"&&t in Gr?Gr[t]:t;return p.jsx(Dc,{$color:n,className:o,children:typeof e=="function"?p.jsx(e,{size:i,...r}):e})},Dn=m.createContext({});function Fn(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ur=typeof window<"u",Kr=Ur?m.useLayoutEffect:m.useEffect,Ut=m.createContext(null);function An(e,t){e.indexOf(t)===-1&&e.push(t)}function In(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const $e=(e,t,n)=>n>t?t:n<e?e:n;function Ln(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let tt=()=>{},Ve=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(tt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Ln(t,n))},Ve=(e,t,n)=>{if(!e)throw new Error(Ln(t,n))});const Ee={},Wr=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function qr(e){return typeof e=="object"&&e!==null}const Yr=e=>/^0[^.\s]+$/u.test(e);function Rn(e){let t;return()=>(t===void 0&&(t=e()),t)}const pe=e=>e,Fc=(e,t)=>n=>t(e(n)),Ct=(...e)=>e.reduce(Fc),Tt=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class _n{constructor(){this.subscriptions=[]}add(t){return An(this.subscriptions,t),()=>In(this.subscriptions,t)}notify(t,n,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,o);else for(let i=0;i<r;i++){const s=this.subscriptions[i];s&&s(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Pe=e=>e*1e3,ge=e=>e/1e3;function Xr(e,t){return t?e*(1e3/t):0}const Zr=new Set;function Nn(e,t,n){e||Zr.has(t)||(console.warn(Ln(t,n)),Zr.add(t))}const Jr=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ac=1e-7,Ic=12;function Lc(e,t,n,o,r){let i,s,a=0;do s=t+(n-t)/2,i=Jr(s,o,r)-e,i>0?n=s:t=s;while(Math.abs(i)>Ac&&++a<Ic);return s}function $t(e,t,n,o){if(e===t&&n===o)return pe;const r=i=>Lc(i,0,1,e,n);return i=>i===0||i===1?i:Jr(r(i),t,o)}const Qr=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ei=e=>t=>1-e(1-t),ti=$t(.33,1.53,.69,.99),Bn=ei(ti),ni=Qr(Bn),oi=e=>(e*=2)<1?.5*Bn(e):.5*(2-Math.pow(2,-10*(e-1))),zn=e=>1-Math.sin(Math.acos(e)),ri=ei(zn),ii=Qr(zn),Rc=$t(.42,0,1,1),_c=$t(0,0,.58,1),si=$t(.42,0,.58,1),Nc=e=>Array.isArray(e)&&typeof e[0]!="number",ai=e=>Array.isArray(e)&&typeof e[0]=="number",li={linear:pe,easeIn:Rc,easeInOut:si,easeOut:_c,circIn:zn,circInOut:ii,circOut:ri,backIn:Bn,backInOut:ni,backOut:ti,anticipate:oi},Bc=e=>typeof e=="string",ci=e=>{if(ai(e)){Ve(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,o,r]=e;return $t(t,n,o,r)}else if(Bc(e))return Ve(li[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),li[e];return e},Kt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function zc(e,t){let n=new Set,o=new Set,r=!1,i=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(d){s.has(d)&&(c.schedule(d),e()),d(a)}const c={schedule:(d,u=!1,h=!1)=>{const v=h&&r?n:o;return u&&s.add(d),v.has(d)||v.add(d),d},cancel:d=>{o.delete(d),s.delete(d)},process:d=>{if(a=d,r){i=!0;return}r=!0,[n,o]=[o,n],n.forEach(l),n.clear(),r=!1,i&&(i=!1,c.process(d))}};return c}const Oc=40;function ui(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Kt.reduce((x,P)=>(x[P]=zc(i),x),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:f,postRender:v}=s,y=()=>{const x=Ee.useManualTiming?r.timestamp:performance.now();n=!1,Ee.useManualTiming||(r.delta=o?1e3/60:Math.max(Math.min(x-r.timestamp,Oc),1)),r.timestamp=x,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),d.process(r),u.process(r),h.process(r),f.process(r),v.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(y))},b=()=>{n=!0,o=!0,r.isProcessing||e(y)};return{schedule:Kt.reduce((x,P)=>{const T=s[P];return x[P]=(k,V=!1,$=!1)=>(n||b(),T.schedule(k,V,$)),x},{}),cancel:x=>{for(let P=0;P<Kt.length;P++)s[Kt[P]].cancel(x)},state:r,steps:s}}const{schedule:K,cancel:Le,state:oe,steps:On}=ui(typeof requestAnimationFrame<"u"?requestAnimationFrame:pe,!0);let Wt;function Hc(){Wt=void 0}const le={now:()=>(Wt===void 0&&le.set(oe.isProcessing||Ee.useManualTiming?oe.timestamp:performance.now()),Wt),set:e=>{Wt=e,queueMicrotask(Hc)}},di=e=>t=>typeof t=="string"&&t.startsWith(e),fi=di("--"),jc=di("var(--"),Hn=e=>jc(e)?Gc.test(e.split("/*")[0].trim()):!1,Gc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function hi(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const nt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Pt={...nt,transform:e=>$e(0,1,e)},qt={...nt,default:1},kt=e=>Math.round(e*1e5)/1e5,jn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Uc(e){return e==null}const Kc=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Gn=(e,t)=>n=>!!(typeof n=="string"&&Kc.test(n)&&n.startsWith(e)||t&&!Uc(n)&&Object.prototype.hasOwnProperty.call(n,t)),mi=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,i,s,a]=o.match(jn);return{[e]:parseFloat(r),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Wc=e=>$e(0,255,e),Un={...nt,transform:e=>Math.round(Wc(e))},Ke={test:Gn("rgb","red"),parse:mi("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+Un.transform(e)+", "+Un.transform(t)+", "+Un.transform(n)+", "+kt(Pt.transform(o))+")"};function qc(e){let t="",n="",o="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,o+=o,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const Kn={test:Gn("#"),parse:qc,transform:Ke.transform},Mt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Re=Mt("deg"),ke=Mt("%"),E=Mt("px"),Yc=Mt("vh"),Xc=Mt("vw"),pi={...ke,parse:e=>ke.parse(e)/100,transform:e=>ke.transform(e*100)},ot={test:Gn("hsl","hue"),parse:mi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+ke.transform(kt(t))+", "+ke.transform(kt(n))+", "+kt(Pt.transform(o))+")"},Q={test:e=>Ke.test(e)||Kn.test(e)||ot.test(e),parse:e=>Ke.test(e)?Ke.parse(e):ot.test(e)?ot.parse(e):Kn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ke.transform(e):ot.transform(e),getAnimatableNone:e=>{const t=Q.parse(e);return t.alpha=0,Q.transform(t)}},Zc=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Jc(e){return isNaN(e)&&typeof e=="string"&&(e.match(jn)?.length||0)+(e.match(Zc)?.length||0)>0}const gi="number",vi="color",Qc="var",eu="var(",yi="${}",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 Vt(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let i=0;const a=t.replace(tu,l=>(Q.test(l)?(o.color.push(i),r.push(vi),n.push(Q.parse(l))):l.startsWith(eu)?(o.var.push(i),r.push(Qc),n.push(l)):(o.number.push(i),r.push(gi),n.push(parseFloat(l))),++i,yi)).split(yi);return{values:n,split:a,indexes:o,types:r}}function wi(e){return Vt(e).values}function bi(e){const{split:t,types:n}=Vt(e),o=t.length;return r=>{let i="";for(let s=0;s<o;s++)if(i+=t[s],r[s]!==void 0){const a=n[s];a===gi?i+=kt(r[s]):a===vi?i+=Q.transform(r[s]):i+=r[s]}return i}}const nu=e=>typeof e=="number"?0:Q.test(e)?Q.getAnimatableNone(e):e;function ou(e){const t=wi(e);return bi(e)(t.map(nu))}const _e={test:Jc,parse:wi,createTransformer:bi,getAnimatableNone:ou};function Wn(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 ru({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let r=0,i=0,s=0;if(!t)r=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=Wn(l,a,e+1/3),i=Wn(l,a,e),s=Wn(l,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:o}}function Yt(e,t){return n=>n>0?t:e}const Y=(e,t,n)=>e+(t-e)*n,qn=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},iu=[Kn,Ke,ot],su=e=>iu.find(t=>t.test(e));function xi(e){const t=su(e);if(tt(!!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===ot&&(n=ru(n)),n}const Si=(e,t)=>{const n=xi(e),o=xi(t);if(!n||!o)return Yt(e,t);const r={...n};return i=>(r.red=qn(n.red,o.red,i),r.green=qn(n.green,o.green,i),r.blue=qn(n.blue,o.blue,i),r.alpha=Y(n.alpha,o.alpha,i),Ke.transform(r))},Yn=new Set(["none","hidden"]);function au(e,t){return Yn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function lu(e,t){return n=>Y(e,t,n)}function Xn(e){return typeof e=="number"?lu:typeof e=="string"?Hn(e)?Yt:Q.test(e)?Si:du:Array.isArray(e)?Ci:typeof e=="object"?Q.test(e)?Si:cu:Yt}function Ci(e,t){const n=[...e],o=n.length,r=e.map((i,s)=>Xn(i)(i,t[s]));return i=>{for(let s=0;s<o;s++)n[s]=r[s](i);return n}}function cu(e,t){const n={...e,...t},o={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(o[r]=Xn(e[r])(e[r],t[r]));return r=>{for(const i in o)n[i]=o[i](r);return n}}function uu(e,t){const n=[],o={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const i=t.types[r],s=e.indexes[i][o[i]],a=e.values[s]??0;n[r]=a,o[i]++}return n}const du=(e,t)=>{const n=_e.createTransformer(t),o=Vt(e),r=Vt(t);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?Yn.has(e)&&!r.values.length||Yn.has(t)&&!o.values.length?au(e,t):Ct(Ci(uu(o,r),r.values),n):(tt(!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"),Yt(e,t))};function Ti(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Y(e,t,n):Xn(e)(e,t)}const fu=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>K.update(t,n),stop:()=>Le(t),now:()=>oe.isProcessing?oe.timestamp:le.now()}},$i=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let i=0;i<r;i++)o+=Math.round(e(i/(r-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},Xt=2e4;function Zn(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Xt;)t+=n,o=e.next(t);return t>=Xt?1/0:t}function hu(e,t=100,n){const o=n({...e,keyframes:[0,t]}),r=Math.min(Zn(o),Xt);return{type:"keyframes",ease:i=>o.next(r*i).value/t,duration:ge(r)}}const mu=5;function Pi(e,t,n){const o=Math.max(t-mu,0);return Xr(n-e(o),t-o)}const X={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Jn=.001;function pu({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:o=X.mass}){let r,i;tt(e<=Pe(X.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=$e(X.minDamping,X.maxDamping,s),e=$e(X.minDuration,X.maxDuration,ge(e)),s<1?(r=c=>{const d=c*s,u=d*e,h=d-n,f=Qn(c,s),v=Math.exp(-u);return Jn-h/f*v},i=c=>{const u=c*s*e,h=u*n+n,f=Math.pow(s,2)*Math.pow(c,2)*e,v=Math.exp(-u),y=Qn(Math.pow(c,2),s);return(-r(c)+Jn>0?-1:1)*((h-f)*v)/y}):(r=c=>{const d=Math.exp(-c*e),u=(c-n)*e+1;return-Jn+d*u},i=c=>{const d=Math.exp(-c*e),u=(n-c)*(e*e);return d*u});const a=5/e,l=vu(r,i,a);if(e=Pe(e),isNaN(l))return{stiffness:X.stiffness,damping:X.damping,duration:e};{const c=Math.pow(l,2)*o;return{stiffness:c,damping:s*2*Math.sqrt(o*c),duration:e}}}const gu=12;function vu(e,t,n){let o=n;for(let r=1;r<gu;r++)o=o-e(o)/t(o);return o}function Qn(e,t){return e*Math.sqrt(1-t*t)}const yu=["duration","bounce"],wu=["stiffness","damping","mass"];function ki(e,t){return t.some(n=>e[n]!==void 0)}function bu(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!ki(e,wu)&&ki(e,yu))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),r=o*o,i=2*$e(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:X.mass,stiffness:r,damping:i}}else{const n=pu(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function Zt(e=X.visualDuration,t=X.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:r}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:f}=bu({...n,velocity:-ge(n.velocity||0)}),v=h||0,y=c/(2*Math.sqrt(l*d)),b=s-i,w=ge(Math.sqrt(l/d)),C=Math.abs(b)<5;o||(o=C?X.restSpeed.granular:X.restSpeed.default),r||(r=C?X.restDelta.granular:X.restDelta.default);let x;if(y<1){const T=Qn(w,y);x=k=>{const V=Math.exp(-y*w*k);return s-V*((v+y*w*b)/T*Math.sin(T*k)+b*Math.cos(T*k))}}else if(y===1)x=T=>s-Math.exp(-w*T)*(b+(v+w*b)*T);else{const T=w*Math.sqrt(y*y-1);x=k=>{const V=Math.exp(-y*w*k),$=Math.min(T*k,300);return s-V*((v+y*w*b)*Math.sinh($)+T*b*Math.cosh($))/T}}const P={calculatedDuration:f&&u||null,next:T=>{const k=x(T);if(f)a.done=T>=u;else{let V=T===0?v:0;y<1&&(V=T===0?Pe(v):Pi(x,T,k));const $=Math.abs(V)<=o,A=Math.abs(s-k)<=r;a.done=$&&A}return a.value=a.done?s:k,a},toString:()=>{const T=Math.min(Zn(P),Xt),k=$i(V=>P.next(T*V).value,T,30);return T+"ms "+k},toTransition:()=>{}};return P}Zt.applyToOptions=e=>{const t=hu(e,100,Zt);return e.ease=t.ease,e.duration=Pe(t.duration),e.type="keyframes",e};function eo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=e[0],h={done:!1,value:u},f=$=>a!==void 0&&$<a||l!==void 0&&$>l,v=$=>a===void 0?l:l===void 0||Math.abs(a-$)<Math.abs(l-$)?a:l;let y=n*t;const b=u+y,w=s===void 0?b:s(b);w!==b&&(y=w-u);const C=$=>-y*Math.exp(-$/o),x=$=>w+C($),P=$=>{const A=C($),I=x($);h.done=Math.abs(A)<=c,h.value=h.done?w:I};let T,k;const V=$=>{f(h.value)&&(T=$,k=Zt({keyframes:[h.value,v(h.value)],velocity:Pi(x,$,h.value),damping:r,stiffness:i,restDelta:c,restSpeed:d}))};return V(0),{calculatedDuration:null,next:$=>{let A=!1;return!k&&T===void 0&&(A=!0,P($),V($)),T!==void 0&&$>=T?k.next($-T):(!A&&P($),h)}}}function xu(e,t,n){const o=[],r=n||Ee.mix||Ti,i=e.length-1;for(let s=0;s<i;s++){let a=r(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||pe:t;a=Ct(l,a)}o.push(a)}return o}function Su(e,t,{clamp:n=!0,ease:o,mixer:r}={}){const i=e.length;if(Ve(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 s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=xu(t,o,r),l=a.length,c=d=>{if(s&&d<e[0])return t[0];let u=0;if(l>1)for(;u<e.length-2&&!(d<e[u+1]);u++);const h=Tt(e[u],e[u+1],d);return a[u](h)};return n?d=>c($e(e[0],e[i-1],d)):c}function Cu(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=Tt(0,t,o);e.push(Y(n,1,r))}}function Tu(e){const t=[0];return Cu(t,e.length-1),t}function $u(e,t){return e.map(n=>n*t)}function Pu(e,t){return e.map(()=>t||si).splice(0,e.length-1)}function rt({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=Nc(o)?o.map(ci):ci(o),i={done:!1,value:t[0]},s=$u(n&&n.length===t.length?n:Tu(t),e),a=Su(s,t,{ease:Array.isArray(r)?r:Pu(t,r)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const ku=e=>e!==null;function to(e,{repeat:t,repeatType:n="loop"},o,r=1){const i=e.filter(ku),a=r<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||o===void 0?i[a]:o}const Mu={decay:eo,inertia:eo,tween:rt,keyframes:rt,spring:Zt};function Mi(e){typeof e.type=="string"&&(e.type=Mu[e.type])}class no{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 Vu=e=>e/100;class oo extends no{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!==le.now()&&this.tick(le.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;Mi(t);const{type:n=rt,repeat:o=0,repeatDelay:r=0,repeatType:i,velocity:s=0}=t;let{keyframes:a}=t;const l=n||rt;process.env.NODE_ENV!=="production"&&l!==rt&&Ve(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==rt&&typeof a[0]!="number"&&(this.mixKeyframes=Ct(Vu,Ti(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=Zn(c));const{calculatedDuration:d}=c;this.calculatedDuration=d,this.resolvedDuration=d+r,this.totalDuration=this.resolvedDuration*(o+1)-r,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:r,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return o.next(0);const{delay:c=0,keyframes:d,repeat:u,repeatType:h,repeatDelay:f,type:v,onUpdate:y,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-c*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?w<0:w>r;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let x=this.currentTime,P=o;if(u){const $=Math.min(this.currentTime,r)/a;let A=Math.floor($),I=$%1;!I&&$>=1&&(I=1),I===1&&A--,A=Math.min(A,u+1),A%2&&(h==="reverse"?(I=1-I,f&&(I-=f/a)):h==="mirror"&&(P=s)),x=$e(0,1,I)*a}const T=C?{done:!1,value:d[0]}:P.next(x);i&&(T.value=i(T.value));let{done:k}=T;!C&&l!==null&&(k=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return V&&v!==eo&&(T.value=to(d,this.options,b,this.speed)),y&&y(T.value),V&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return ge(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ge(t)}get time(){return ge(this.currentTime)}set time(t){t=Pe(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(le.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ge(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=fu,startTime:n}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),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(le.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 Eu(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const We=e=>e*180/Math.PI,ro=e=>{const t=We(Math.atan2(e[1],e[0]));return io(t)},Du={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ro,rotateZ:ro,skewX:e=>We(Math.atan(e[1])),skewY:e=>We(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},io=e=>(e=e%360,e<0&&(e+=360),e),Vi=ro,Ei=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Di=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Fu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ei,scaleY:Di,scale:e=>(Ei(e)+Di(e))/2,rotateX:e=>io(We(Math.atan2(e[6],e[5]))),rotateY:e=>io(We(Math.atan2(-e[2],e[0]))),rotateZ:Vi,rotate:Vi,skewX:e=>We(Math.atan(e[4])),skewY:e=>We(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function so(e){return e.includes("scale")?1:0}function ao(e,t){if(!e||e==="none")return so(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,r;if(n)o=Fu,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Du,r=a}if(!r)return so(t);const i=o[t],s=r[1].split(",").map(Iu);return typeof i=="function"?i(s):s[i]}const Au=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ao(n,t)};function Iu(e){return parseFloat(e.trim())}const it=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],st=new Set(it),Fi=e=>e===nt||e===E,Lu=new Set(["x","y","z"]),Ru=it.filter(e=>!Lu.has(e));function _u(e){const t=[];return Ru.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const Ne={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})=>ao(t,"x"),y:(e,{transform:t})=>ao(t,"y")};Ne.translateX=Ne.x,Ne.translateY=Ne.y;const qe=new Set;let lo=!1,co=!1,uo=!1;function Ai(){if(co){const e=Array.from(qe).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=_u(o);r.length&&(n.set(o,r),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const r=n.get(o);r&&r.forEach(([i,s])=>{o.getValue(i)?.set(s)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}co=!1,lo=!1,qe.forEach(e=>e.complete(uo)),qe.clear()}function Ii(){qe.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(co=!0)})}function Nu(){uo=!0,Ii(),Ai(),uo=!1}class fo{constructor(t,n,o,r,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=r,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(qe.add(this),lo||(lo=!0,K.read(Ii),K.resolveKeyframes(Ai))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:r}=this;if(t[0]===null){const i=r?.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(o&&n){const a=o.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),r&&i===void 0&&r.set(t[0])}Eu(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),qe.delete(this)}cancel(){this.state==="scheduled"&&(qe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Bu=e=>e.startsWith("--");function zu(e,t,n){Bu(t)?e.style.setProperty(t,n):e.style[t]=n}const Ou=Rn(()=>window.ScrollTimeline!==void 0),Hu={};function ju(e,t){const n=Rn(e);return()=>Hu[t]??n()}const Li=ju(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Et=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,Ri={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Et([0,.65,.55,1]),circOut:Et([.55,0,1,.45]),backIn:Et([.31,.01,.66,-.59]),backOut:Et([.33,1.53,.69,.99])};function _i(e,t){if(e)return typeof e=="function"?Li()?$i(e,t):"ease-out":ai(e)?Et(e):Array.isArray(e)?e.map(n=>_i(n,t)||Ri.easeOut):Ri[e]}function Gu(e,t,n,{delay:o=0,duration:r=300,repeat:i=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c=void 0){const d={[t]:n};l&&(d.offset=l);const u=_i(a,r);Array.isArray(u)&&(d.easing=u);const h={delay:o,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(d,h)}function Ni(e){return typeof e=="function"&&"applyToOptions"in e}function Uu({type:e,...t}){return Ni(e)&&Li()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Ku extends no{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:o,keyframes:r,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,Ve(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Uu(t);this.animation=Gu(n,o,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=to(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(d):zu(n,o,d),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,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 ge(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ge(t)}get time(){return ge(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Pe(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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Ou()?(this.animation.timeline=t,pe):n(this)}}const Bi={anticipate:oi,backInOut:ni,circInOut:ii};function Wu(e){return e in Bi}function qu(e){typeof e.ease=="string"&&Wu(e.ease)&&(e.ease=Bi[e.ease])}const ho=10;class Yu extends Ku{constructor(t){qu(t),Mi(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:o,onComplete:r,element:i,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new oo({...s,autoplay:!1}),l=Math.max(ho,le.now()-this.startTime),c=$e(0,ho,l-ho);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const zi=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_e.test(e)||e==="0")&&!e.startsWith("url("));function Xu(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 Zu(e,t,n,o){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=zi(r,t),a=zi(i,t);return tt(s===a,`You are trying to animate ${t} from "${r}" to "${i}". "${s?i:r}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:Xu(e)||(n==="spring"||Ni(n))&&o}function mo(e){e.duration=0,e.type="keyframes"}const Ju=new Set(["opacity","clipPath","filter","transform"]),Qu=Rn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ed(e){const{motionValue:t,name:n,repeatDelay:o,repeatType:r,damping:i,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Qu()&&n&&Ju.has(n)&&(n!=="transform"||!c)&&!l&&!o&&r!=="mirror"&&i!==0&&s!=="inertia"}const td=40;class nd extends no{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s="loop",keyframes:a,name:l,motionValue:c,element:d,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=le.now();const h={autoplay:t,delay:n,type:o,repeat:r,repeatDelay:i,repeatType:s,name:l,motionValue:c,element:d,...u},f=d?.KeyframeResolver||fo;this.keyframeResolver=new f(a,(v,y,b)=>this.onKeyframesResolved(v,y,h,!b),l,c,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,o,r){this.keyframeResolver=void 0;const{name:i,type:s,velocity:a,delay:l,isHandoff:c,onUpdate:d}=o;this.resolvedAt=le.now(),Zu(t,i,s,a)||((Ee.instantAnimations||!l)&&d?.(to(t,o,n)),t[0]=t[t.length-1],mo(o),o.repeat=0);const h={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>td?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...o,keyframes:t},f=!c&&ed(h)?new Yu({...h,element:h.motionValue.owner.current}):new oo(h);f.finished.then(()=>this.notifyFinished()).catch(pe),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}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(),Nu()),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 od=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function rd(e){const t=od.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const id=4;function Oi(e,t,n=1){Ve(n<=id,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,r]=rd(e);if(!o)return;const i=window.getComputedStyle(t).getPropertyValue(o);if(i){const s=i.trim();return Wr(s)?parseFloat(s):s}return Hn(r)?Oi(r,t,n+1):r}function po(e,t){return e?.[t]??e?.default??e}const sd={type:"spring",stiffness:500,damping:25,restSpeed:10},ad=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ld={type:"keyframes",duration:.8},cd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ud=(e,{keyframes:t})=>t.length>2?ld:st.has(e)?e.startsWith("scale")?ad(t[1]):sd:cd;function dd({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const fd=e=>e!==null;function hd(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(fd),i=t&&n!=="loop"&&t%2===1?0:r.length-1;return r[i]}function Hi(e,t,n,o=0,r=1){const i=Array.from(e).sort((c,d)=>c.sortNodePosition(d)).indexOf(t),s=e.size,a=(s-1)*o;return typeof n=="function"?n(i,s):r===1?i*o:a-i*o}const go=(e,t,n,o={},r,i)=>s=>{const a=po(o,e)||{},l=a.delay||o.delay||0;let{elapsed:c=0}=o;c=c-Pe(l);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:r};dd(a)||Object.assign(d,ud(e,d)),d.duration&&(d.duration=Pe(d.duration)),d.repeatDelay&&(d.repeatDelay=Pe(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(mo(d),d.delay===0&&(u=!0)),(Ee.instantAnimations||Ee.skipAnimations)&&(u=!0,mo(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,u&&!i&&t.get()!==void 0){const h=hd(d.keyframes,a);if(h!==void 0){K.update(()=>{d.onUpdate(h),d.onComplete()});return}}return a.isSync?new oo(d):new nd(d)},ji=new Set(["width","height","top","left","right","bottom",...it]),Gi=30,md=e=>!isNaN(parseFloat(e));class pd{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{const r=le.now();if(this.updatedAt!==r&&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=le.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=md(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Nn(!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 _n);const o=this.events[t].add(n);return t==="change"?()=>{o(),K.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=le.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Gi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Gi);return Xr(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 at(e,t){return new pd(e,t)}function Ui(e){const t=[{},{}];return e?.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function vo(e,t,n,o){if(typeof t=="function"){const[r,i]=Ui(o);t=t(n!==void 0?n:e.custom,r,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,i]=Ui(o);t=t(n!==void 0?n:e.custom,r,i)}return t}function lt(e,t,n){const o=e.getProps();return vo(o,t,n!==void 0?n:o.custom,e)}const yo=e=>Array.isArray(e);function gd(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,at(n))}function vd(e){return yo(e)?e[e.length-1]||0:e}function yd(e,t){const n=lt(e,t);let{transitionEnd:o={},transition:r={},...i}=n||{};i={...i,...o};for(const s in i){const a=vd(i[s]);gd(e,s,a)}}const ie=e=>!!(e&&e.getVelocity);function wd(e){return!!(ie(e)&&e.add)}function wo(e,t){const n=e.getValue("willChange");if(wd(n))return n.add(t);if(!n&&Ee.WillChange){const o=new Ee.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function bo(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Ki="data-"+bo("framerAppearId");function Wi(e){return e.props[Ki]}function bd({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function qi(e,t,{delay:n=0,transitionOverride:o,type:r}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:s,...a}=t;o&&(i=o);const l=[],c=r&&e.animationState&&e.animationState.getState()[r];for(const d in a){const u=e.getValue(d,e.latestValues[d]??null),h=a[d];if(h===void 0||c&&bd(c,d))continue;const f={delay:n,...po(i||{},d)},v=u.get();if(v!==void 0&&!u.isAnimating&&!Array.isArray(h)&&h===v&&!f.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const w=Wi(e);if(w){const C=window.MotionHandoffAnimation(w,d,K);C!==null&&(f.startTime=C,y=!0)}}wo(e,d),u.start(go(d,u,h,e.shouldReduceMotion&&ji.has(d)?{type:!1}:f,e,y));const b=u.animation;b&&l.push(b)}return s&&Promise.all(l).then(()=>{K.update(()=>{s&&yd(e,s)})}),l}function xo(e,t,n={}){const o=lt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(r=n.transitionOverride);const i=o?()=>Promise.all(qi(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:u}=r;return xd(e,t,l,c,d,u,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[l,c]=a==="beforeChildren"?[i,s]:[s,i];return l().then(()=>c())}else return Promise.all([i(),s(n.delay)])}function xd(e,t,n=0,o=0,r=0,i=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(xo(l,t,{...s,delay:n+(typeof o=="function"?0:o)+Hi(e.variantChildren,l,o,r,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Sd(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const r=t.map(i=>xo(e,i,n));o=Promise.all(r)}else if(typeof t=="string")o=xo(e,t,n);else{const r=typeof t=="function"?lt(e,t,n.custom):t;o=Promise.all(qi(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}const Cd={test:e=>e==="auto",parse:e=>e},Yi=e=>t=>t.test(e),Xi=[nt,E,ke,Re,Xc,Yc,Cd],Zi=e=>Xi.find(Yi(e));function Td(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Yr(e):!0}const $d=new Set(["brightness","contrast","saturate","opacity"]);function Pd(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(jn)||[];if(!o)return e;const r=n.replace(o,"");let i=$d.has(t)?1:0;return o!==n&&(i*=100),t+"("+i+r+")"}const kd=/\b([a-z-]*)\(.*?\)/gu,So={..._e,getAnimatableNone:e=>{const t=e.match(kd);return t?t.map(Pd).join(" "):e}},Ji={...nt,transform:Math.round},Co={borderWidth:E,borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E,borderRadius:E,radius:E,borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomRightRadius:E,borderBottomLeftRadius:E,width:E,maxWidth:E,height:E,maxHeight:E,top:E,right:E,bottom:E,left:E,inset:E,insetBlock:E,insetBlockStart:E,insetBlockEnd:E,insetInline:E,insetInlineStart:E,insetInlineEnd:E,padding:E,paddingTop:E,paddingRight:E,paddingBottom:E,paddingLeft:E,paddingBlock:E,paddingBlockStart:E,paddingBlockEnd:E,paddingInline:E,paddingInlineStart:E,paddingInlineEnd:E,margin:E,marginTop:E,marginRight:E,marginBottom:E,marginLeft:E,marginBlock:E,marginBlockStart:E,marginBlockEnd:E,marginInline:E,marginInlineStart:E,marginInlineEnd:E,backgroundPositionX:E,backgroundPositionY:E,...{rotate:Re,rotateX:Re,rotateY:Re,rotateZ:Re,scale:qt,scaleX:qt,scaleY:qt,scaleZ:qt,skew:Re,skewX:Re,skewY:Re,distance:E,translateX:E,translateY:E,translateZ:E,x:E,y:E,z:E,perspective:E,transformPerspective:E,opacity:Pt,originX:pi,originY:pi,originZ:E},zIndex:Ji,fillOpacity:Pt,strokeOpacity:Pt,numOctaves:Ji},Md={...Co,color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,filter:So,WebkitFilter:So},Qi=e=>Md[e];function es(e,t){let n=Qi(e);return n!==So&&(n=_e),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Vd=new Set(["auto","none","0"]);function Ed(e,t,n){let o=0,r;for(;o<e.length&&!r;){const i=e[o];typeof i=="string"&&!Vd.has(i)&&Vt(i).values.length&&(r=e[o]),o++}if(r&&n)for(const i of t)e[i]=es(n,r)}class Dd extends fo{constructor(t,n,o,r,i){super(t,n,o,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let u=t[d];if(typeof u=="string"&&(u=u.trim(),Hn(u))){const h=Oi(u,n.current);h!==void 0&&(t[d]=h),d===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!ji.has(o)||t.length!==2)return;const[r,i]=t,s=Zi(r),a=Zi(i),l=hi(r),c=hi(i);if(l!==c&&Ne[o]){this.needsMeasurement=!0;return}if(s!==a)if(Fi(s)&&Fi(a))for(let d=0;d<t.length;d++){const u=t[d];typeof u=="string"&&(t[d]=parseFloat(u))}else Ne[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let r=0;r<t.length;r++)(t[r]===null||Td(t[r]))&&o.push(r);o.length&&Ed(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=Ne[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(o,r).jump(r,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const i=o.length-1,s=o[i];o[i]=Ne[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Fd(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const r=n?.[e]??o.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const ts=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ns(e){return qr(e)&&"offsetHeight"in e}const{schedule:To}=ui(queueMicrotask,!1),be={x:!1,y:!1};function os(){return be.x||be.y}function Ad(e){return e==="x"||e==="y"?be[e]?null:(be[e]=!0,()=>{be[e]=!1}):be.x||be.y?null:(be.x=be.y=!0,()=>{be.x=be.y=!1})}function rs(e,t){const n=Fd(e),o=new AbortController,r={passive:!0,...t,signal:o.signal};return[n,r,()=>o.abort()]}function is(e){return!(e.pointerType==="touch"||os())}function Id(e,t,n={}){const[o,r,i]=rs(e,n),s=a=>{if(!is(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const d=u=>{is(u)&&(c(u),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,r)};return o.forEach(a=>{a.addEventListener("pointerenter",s,r)}),i}const ss=(e,t)=>t?e===t?!0:ss(e,t.parentElement):!1,$o=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Ld=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function as(e){return Ld.has(e.tagName)||e.isContentEditable===!0}const Jt=new WeakSet;function ls(e){return t=>{t.key==="Enter"&&e(t)}}function Po(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Rd=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=ls(()=>{if(Jt.has(n))return;Po(n,"down");const r=ls(()=>{Po(n,"up")}),i=()=>Po(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function cs(e){return $o(e)&&!os()}function _d(e,t,n={}){const[o,r,i]=rs(e,n),s=a=>{const l=a.currentTarget;if(!cs(a))return;Jt.add(l);const c=t(l,a),d=(f,v)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",h),Jt.has(l)&&Jt.delete(l),cs(f)&&typeof c=="function"&&c(f,{success:v})},u=f=>{d(f,l===window||l===document||n.useGlobalTarget||ss(l,f.target))},h=f=>{d(f,!1)};window.addEventListener("pointerup",u,r),window.addEventListener("pointercancel",h,r)};return o.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,r),ns(a)&&(a.addEventListener("focus",c=>Rd(c,r)),!as(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function us(e){return qr(e)&&"ownerSVGElement"in e}function Nd(e){return us(e)&&e.tagName==="svg"}const Bd=[...Xi,Q,_e],zd=e=>Bd.find(Yi(e)),ds=()=>({translate:0,scale:1,origin:0,originPoint:0}),ct=()=>({x:ds(),y:ds()}),fs=()=>({min:0,max:0}),ee=()=>({x:fs(),y:fs()}),ko={current:null},hs={current:!1},Od=typeof window<"u";function Hd(){if(hs.current=!0,!!Od)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ko.current=e.matches;e.addEventListener("change",t),t()}else ko.current=!1}const jd=new WeakMap;function Qt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Dt(e){return typeof e=="string"||Array.isArray(e)}const Mo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vo=["initial",...Mo];function en(e){return Qt(e.animate)||Vo.some(t=>Dt(e[t]))}function ms(e){return!!(en(e)||e.variants)}function Gd(e,t,n){for(const o in t){const r=t[o],i=n[o];if(ie(r))e.addValue(o,r);else if(ie(i))e.addValue(o,at(r,{owner:e}));else if(i!==r)if(e.hasValue(o)){const s=e.getValue(o);s.liveStyle===!0?s.jump(r):s.hasAnimated||s.set(r)}else{const s=e.getStaticValue(o);e.addValue(o,at(s!==void 0?s:r,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const ps=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let tn={};function gs(e){tn=e}function Ud(){return tn}class Kd{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:i,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fo,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 h=le.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,K.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;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=r,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=en(n),this.isVariantNode=ms(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...u}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in u){const f=u[h];l[h]!==void 0&&ie(f)&&f.set(l[h])}}mount(t){this.current=t,jd.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)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(hs.current||Hd(),this.shouldReduceMotion=ko.current),process.env.NODE_ENV!=="production"&&Nn(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(),Le(this.notifyUpdate),Le(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=st.has(t);o&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&K.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),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 tn){const n=tn[t];if(!n)continue;const{isEnabled:o,Feature:r}=n;if(!this.features[t]&&r&&o(this.props)&&(this.features[t]=new r(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):ee()}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<ps.length;o++){const r=ps[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const i="on"+r,s=t[i];s&&(this.propEventSubscriptions[r]=this.on(r,s))}this.prevMotionValues=Gd(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=at(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"&&(Wr(o)||Yr(o))?o=parseFloat(o):!zd(o)&&_e.test(n)&&(o=es(t,n)),this.setBaseTarget(t,ie(o)?o.get():o)),ie(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=vo(this.props,n,this.presenceContext?.custom);i&&(o=i[t])}if(n&&o!==void 0)return o;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!ie(r)?r:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new _n),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){To.render(this.render)}}class Be{constructor(t){this.isMounted=!1,this.node=t}update(){}}class vs extends Kd{constructor(){super(...arguments),this.KeyframeResolver=Dd}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const o=t.style;return o?o[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;ie(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function ys({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function Wd({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function qd(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 Eo(e){return e===void 0||e===1}function Do({scale:e,scaleX:t,scaleY:n}){return!Eo(e)||!Eo(t)||!Eo(n)}function Ye(e){return Do(e)||ws(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ws(e){return bs(e.x)||bs(e.y)}function bs(e){return e&&e!=="0%"}function nn(e,t,n){const o=e-n,r=t*o;return n+r}function xs(e,t,n,o,r){return r!==void 0&&(e=nn(e,r,o)),nn(e,n,o)+t}function Fo(e,t=0,n=1,o,r){e.min=xs(e.min,t,n,o,r),e.max=xs(e.max,t,n,o,r)}function Ss(e,{x:t,y:n}){Fo(e.x,t.translate,t.scale,t.originPoint),Fo(e.y,n.translate,n.scale,n.originPoint)}const Cs=.999999999999,Ts=1.0000000000001;function Yd(e,t,n,o=!1){const r=n.length;if(!r)return;t.x=t.y=1;let i,s;for(let a=0;a<r;a++){i=n[a],s=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&&dt(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Ss(e,s)),o&&Ye(i.latestValues)&&dt(e,i.latestValues))}t.x<Ts&&t.x>Cs&&(t.x=1),t.y<Ts&&t.y>Cs&&(t.y=1)}function ut(e,t){e.min=e.min+t,e.max=e.max+t}function $s(e,t,n,o,r=.5){const i=Y(e.min,e.max,r);Fo(e,t,n,i,o)}function dt(e,t){$s(e.x,t.x,t.scaleX,t.scale,t.originX),$s(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ps(e,t){return ys(qd(e.getBoundingClientRect(),t))}function Xd(e,t,n){const o=Ps(e,n),{scroll:r}=t;return r&&(ut(o.x,r.offset.x),ut(o.y,r.offset.y)),o}const Zd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Jd=it.length;function Qd(e,t,n){let o="",r=!0;for(let i=0;i<Jd;i++){const s=it[i],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(s.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=ts(a,Co[s]);if(!l){r=!1;const d=Zd[s]||s;o+=`${d}(${c}) `}n&&(t[s]=c)}}return o=o.trim(),n?o=n(t,r?"":o):r&&(o="none"),o}function Ao(e,t,n){const{style:o,vars:r,transformOrigin:i}=e;let s=!1,a=!1;for(const l in t){const c=t[l];if(st.has(l)){s=!0;continue}else if(fi(l)){r[l]=c;continue}else{const d=ts(c,Co[l]);l.startsWith("origin")?(a=!0,i[l]=d):o[l]=d}}if(t.transform||(s||n?o.transform=Qd(t,e.transform,n):o.transform&&(o.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:d=0}=i;o.transformOrigin=`${l} ${c} ${d}`}}function ks(e,{style:t,vars:n},o,r){const i=e.style;let s;for(s in t)i[s]=t[s];r?.applyProjectionStyles(i,o);for(s in n)i.setProperty(s,n[s])}function Ms(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ft={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(E.test(e))e=parseFloat(e);else return e;const n=Ms(e,t.target.x),o=Ms(e,t.target.y);return`${n}% ${o}%`}},ef={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,r=_e.parse(e);if(r.length>5)return o;const i=_e.createTransformer(e),s=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+s]/=a,r[1+s]/=l;const c=Y(a,l,.5);return typeof r[2+s]=="number"&&(r[2+s]/=c),typeof r[3+s]=="number"&&(r[3+s]/=c),i(r)}},Io={borderRadius:{...Ft,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ft,borderTopRightRadius:Ft,borderBottomLeftRadius:Ft,borderBottomRightRadius:Ft,boxShadow:ef};function Vs(e,{layout:t,layoutId:n}){return st.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Io[e]||e==="opacity")}function Lo(e,t,n){const o=e.style,r=t?.style,i={};if(!o)return i;for(const s in o)(ie(o[s])||r&&ie(r[s])||Vs(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=o[s]);return i}function tf(e){return window.getComputedStyle(e)}class nf extends vs{constructor(){super(...arguments),this.type="html",this.renderInstance=ks}readValueFromInstance(t,n){if(st.has(n))return this.projection?.isProjecting?so(n):Au(t,n);{const o=tf(t),r=(fi(n)?o.getPropertyValue(n):o[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ps(t,n)}build(t,n,o){Ao(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Lo(t,n,o)}}const of={offset:"stroke-dashoffset",array:"stroke-dasharray"},rf={offset:"strokeDashoffset",array:"strokeDasharray"};function sf(e,t,n=1,o=0,r=!0){e.pathLength=1;const i=r?of:rf;e[i.offset]=E.transform(-o);const s=E.transform(t),a=E.transform(n);e[i.array]=`${s} ${a}`}const af=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Es(e,{attrX:t,attrY:n,attrScale:o,pathLength:r,pathSpacing:i=1,pathOffset:s=0,...a},l,c,d){if(Ao(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:u,style:h}=e;u.transform&&(h.transform=u.transform,delete u.transform),(h.transform||u.transformOrigin)&&(h.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),h.transform&&(h.transformBox=d?.transformBox??"fill-box",delete u.transformBox);for(const f of af)u[f]!==void 0&&(h[f]=u[f],delete u[f]);t!==void 0&&(u.x=t),n!==void 0&&(u.y=n),o!==void 0&&(u.scale=o),r!==void 0&&sf(u,r,i,s,!1)}const Ds=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"]),Fs=e=>typeof e=="string"&&e.toLowerCase()==="svg";function lf(e,t,n,o){ks(e,t,void 0,o);for(const r in t.attrs)e.setAttribute(Ds.has(r)?r:bo(r),t.attrs[r])}function As(e,t,n){const o=Lo(e,t,n);for(const r in e)if(ie(e[r])||ie(t[r])){const i=it.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[i]=e[r]}return o}class cf extends vs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ee}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(st.has(n)){const o=Qi(n);return o&&o.default||0}return n=Ds.has(n)?n:bo(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return As(t,n,o)}build(t,n,o){Es(t,n,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,n,o,r){lf(t,n,o,r)}mount(t){this.isSVGTag=Fs(t.tagName),super.mount(t)}}const uf=Vo.length;function Is(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Is(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<uf;n++){const o=Vo[n],r=e.props[o];(Dt(r)||r===!1)&&(t[o]=r)}return t}function Ls(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 df=[...Mo].reverse(),ff=Mo.length;function hf(e){return t=>Promise.all(t.map(({animation:n,options:o})=>Sd(e,n,o)))}function mf(e){let t=hf(e),n=Rs(),o=!0;const r=l=>(c,d)=>{const u=lt(e,d,l==="exit"?e.presenceContext?.custom:void 0);if(u){const{transition:h,transitionEnd:f,...v}=u;c={...c,...v,...f}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,d=Is(e.parent)||{},u=[],h=new Set;let f={},v=1/0;for(let b=0;b<ff;b++){const w=df[b],C=n[w],x=c[w]!==void 0?c[w]:d[w],P=Dt(x),T=w===l?C.isActive:null;T===!1&&(v=b);let k=x===d[w]&&x!==c[w]&&P;if(k&&o&&e.manuallyAnimateOnMount&&(k=!1),C.protectedKeys={...f},!C.isActive&&T===null||!x&&!C.prevProp||Qt(x)||typeof x=="boolean")continue;const V=pf(C.prevProp,x);let $=V||w===l&&C.isActive&&!k&&P||b>v&&P,A=!1;const I=Array.isArray(x)?x:[x];let B=I.reduce(r(w),{});T===!1&&(B={});const{prevResolvedValues:H={}}=C,M={...H,...B},F=L=>{$=!0,h.has(L)&&(A=!0,h.delete(L)),C.needsAnimating[L]=!0;const j=e.getValue(L);j&&(j.liveStyle=!1)};for(const L in M){const j=B[L],te=H[L];if(f.hasOwnProperty(L))continue;let J=!1;yo(j)&&yo(te)?J=!Ls(j,te):J=j!==te,J?j!=null?F(L):h.add(L):j!==void 0&&h.has(L)?F(L):C.protectedKeys[L]=!0}C.prevProp=x,C.prevResolvedValues=B,C.isActive&&(f={...f,...B}),o&&e.blockInitialAnimation&&($=!1);const z=k&&V;$&&(!z||A)&&u.push(...I.map(L=>{const j={type:w};if(typeof L=="string"&&o&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:te}=e,J=lt(te,L);if(te.enteringChildren&&J){const{delayChildren:ue}=J.transition||{};j.delay=Hi(te.enteringChildren,e,ue)}}return{animation:L,options:j}}))}if(h.size){const b={};if(typeof c.initial!="boolean"){const w=lt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);w&&w.transition&&(b.transition=w.transition)}h.forEach(w=>{const C=e.getBaseTarget(w),x=e.getValue(w);x&&(x.liveStyle=!0),b[w]=C??null}),u.push({animation:b})}let y=!!u.length;return o&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),o=!1,y?t(u):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(u=>u.animationState?.setActive(l,c)),n[l].isActive=c;const d=s(l);for(const u in n)n[u].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Rs()}}}function pf(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ls(t,e):!1}function Xe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Rs(){return{animate:Xe(!0),whileInView:Xe(),whileHover:Xe(),whileTap:Xe(),whileDrag:Xe(),whileFocus:Xe(),exit:Xe()}}const _s=1e-4,gf=1-_s,vf=1+_s,Ns=.01,yf=0-Ns,wf=0+Ns;function ce(e){return e.max-e.min}function bf(e,t,n){return Math.abs(e-t)<=n}function Bs(e,t,n,o=.5){e.origin=o,e.originPoint=Y(t.min,t.max,e.origin),e.scale=ce(n)/ce(t),e.translate=Y(n.min,n.max,e.origin)-e.originPoint,(e.scale>=gf&&e.scale<=vf||isNaN(e.scale))&&(e.scale=1),(e.translate>=yf&&e.translate<=wf||isNaN(e.translate))&&(e.translate=0)}function At(e,t,n,o){Bs(e.x,t.x,n.x,o?o.originX:void 0),Bs(e.y,t.y,n.y,o?o.originY:void 0)}function zs(e,t,n){e.min=n.min+t.min,e.max=e.min+ce(t)}function xf(e,t,n){zs(e.x,t.x,n.x),zs(e.y,t.y,n.y)}function Os(e,t,n){e.min=t.min-n.min,e.max=e.min+ce(t)}function on(e,t,n){Os(e.x,t.x,n.x),Os(e.y,t.y,n.y)}function Hs(e,t,n,o,r){return e-=t,e=nn(e,1/n,o),r!==void 0&&(e=nn(e,1/r,o)),e}function Sf(e,t=0,n=1,o=.5,r,i=e,s=e){if(ke.test(t)&&(t=parseFloat(t),t=Y(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Y(i.min,i.max,o);e===i&&(a-=t),e.min=Hs(e.min,t,n,a,r),e.max=Hs(e.max,t,n,a,r)}function js(e,t,[n,o,r],i,s){Sf(e,t[n],t[o],t[r],t.scale,i,s)}const Cf=["x","scaleX","originX"],Tf=["y","scaleY","originY"];function Gs(e,t,n,o){js(e.x,t,Cf,n?n.x:void 0,o?o.x:void 0),js(e.y,t,Tf,n?n.y:void 0,o?o.y:void 0)}function Us(e,t){e.min=t.min,e.max=t.max}function xe(e,t){Us(e.x,t.x),Us(e.y,t.y)}function Ks(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ws(e){return e.translate===0&&e.scale===1}function qs(e){return Ws(e.x)&&Ws(e.y)}function Ys(e,t){return e.min===t.min&&e.max===t.max}function $f(e,t){return Ys(e.x,t.x)&&Ys(e.y,t.y)}function Xs(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Zs(e,t){return Xs(e.x,t.x)&&Xs(e.y,t.y)}function Js(e){return ce(e.x)/ce(e.y)}function Qs(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ve(e){return[e("x"),e("y")]}function Pf(e,t,n){let o="";const r=e.x.translate/t.x,i=e.y.translate/t.y,s=n?.z||0;if((r||i||s)&&(o=`translate3d(${r}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:d,rotateX:u,rotateY:h,skewX:f,skewY:v}=n;c&&(o=`perspective(${c}px) ${o}`),d&&(o+=`rotate(${d}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `),f&&(o+=`skewX(${f}deg) `),v&&(o+=`skewY(${v}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 ea=["TopLeft","TopRight","BottomLeft","BottomRight"],kf=ea.length,ta=e=>typeof e=="string"?parseFloat(e):e,na=e=>typeof e=="number"||E.test(e);function Mf(e,t,n,o,r,i){r?(e.opacity=Y(0,n.opacity??1,Vf(o)),e.opacityExit=Y(t.opacity??1,0,Ef(o))):i&&(e.opacity=Y(t.opacity??1,n.opacity??1,o));for(let s=0;s<kf;s++){const a=`border${ea[s]}Radius`;let l=oa(t,a),c=oa(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||na(l)===na(c)?(e[a]=Math.max(Y(ta(l),ta(c),o),0),(ke.test(c)||ke.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Y(t.rotate||0,n.rotate||0,o))}function oa(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Vf=ra(0,.5,ri),Ef=ra(.5,.95,pe);function ra(e,t,n){return o=>o<e?0:o>t?1:n(Tt(e,t,o))}function Df(e,t){const n=le.now(),o=({timestamp:r})=>{const i=r-n;i>=t&&(Le(o),e(i-t))};return K.setup(o,!0),()=>Le(o)}function It(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function rn(e){return ie(e)?e.get():e}function Ff(e,t,n){const o=ie(e)?e:at(e);return o.start(go("",o,t,n)),o.animation}const Af=(e,t)=>e.depth-t.depth;class If{constructor(){this.children=[],this.isDirty=!1}add(t){An(this.children,t),this.isDirty=!0}remove(t){In(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Af),this.isDirty=!1,this.children.forEach(t)}}class Lf{constructor(){this.members=[]}add(t){An(this.members,t),t.scheduleRender()}remove(t){if(In(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(r=>t===r);if(n===0)return!1;let o;for(let r=n;r>=0;r--){const i=this.members[r];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:r}=t.options;r===!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)}}const sn={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ro=["","X","Y","Z"],Rf=1e3;let _f=0;function _o(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function ia(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Wi(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",K,!(r||i))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&ia(o)}function sa({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(s={},a=t?.()){this.id=_f++,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(zf),this.nodes.forEach(Gf),this.nodes.forEach(Uf),this.nodes.forEach(Of)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,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 If)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new _n),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=us(s)&&!Nd(s),this.instance=s;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let d,u=0;const h=()=>this.root.updateBlockedByResize=!1;K.read(()=>{u=window.innerWidth}),e(s,()=>{const f=window.innerWidth;f!==u&&(u=f,this.root.updateBlockedByResize=!0,d&&d(),d=Df(h,250),sn.hasAnimatedSinceResize&&(sn.hasAnimatedSinceResize=!1,this.nodes.forEach(ca)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:u,hasRelativeLayoutChanged:h,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||Xf,{onLayoutAnimationStart:y,onLayoutAnimationComplete:b}=c.getProps(),w=!this.targetLayout||!Zs(this.targetLayout,f),C=!u&&h;if(this.options.layoutRoot||this.resumeFrom||C||u&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...po(v,"layout"),onPlay:y,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(d,C)}else u||ca(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Le(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(Kf),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ia(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const u=this.path[d];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.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(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(aa);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(la);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(jf),this.nodes.forEach(Nf),this.nodes.forEach(Bf)):this.nodes.forEach(la),this.clearAllSnapshots();const a=le.now();oe.delta=$e(0,1e3/60,a-oe.timestamp),oe.timestamp=a,oe.isProcessing=!0,On.update.process(oe),On.preRender.process(oe),On.render.process(oe),oe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,To.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Hf),this.sharedNodes.forEach(Wf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,K.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){K.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ce(this.snapshot.measuredBox.x)&&!ce(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 s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=ee(),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,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!qs(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||Ye(this.latestValues)||d)&&(r(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),Zf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return ee();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Jf))){const{scroll:c}=this.root;c&&(ut(a.x,c.offset.x),ut(a.y,c.offset.y))}return a}removeElementScroll(s){const a=ee();if(xe(a,s),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:d,options:u}=c;c!==this.root&&d&&u.layoutScroll&&(d.wasRoot&&xe(a,s),ut(a.x,d.offset.x),ut(a.y,d.offset.y))}return a}applyTransform(s,a=!1){const l=ee();xe(l,s);for(let c=0;c<this.path.length;c++){const d=this.path[c];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&dt(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Ye(d.latestValues)&&dt(l,d.latestValues)}return Ye(this.latestValues)&&dt(l,this.latestValues),l}removeTransform(s){const a=ee();xe(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ye(c.latestValues))continue;Do(c.latestValues)&&c.updateSnapshot();const d=ee(),u=c.measurePageBox();xe(d,u),Gs(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return Ye(this.latestValues)&&Gs(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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!==oe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!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(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:u}=this.options;if(!this.layout||!(d||u))return;this.resolvedRelativeTargetAt=oe.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ee(),this.targetWithTransforms=ee()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),xf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):xe(this.target,this.layout.layoutBox),Ss(this.target,this.targetDelta)):xe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Do(this.parent.latestValues)||ws(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,l){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ee(),this.relativeTargetOrigin=ee(),on(this.relativeTargetOrigin,a,l),xe(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===oe.timestamp&&(l=!1),l)return;const{layout:c,layoutId:d}=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||d))return;xe(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,h=this.treeScale.y;Yd(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=ee());const{target:f}=s;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ks(this.prevProjectionDelta.x,this.projectionDelta.x),Ks(this.prevProjectionDelta.y,this.projectionDelta.y)),At(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==h||!Qs(this.projectionDelta.x,this.prevProjectionDelta.x)||!Qs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ct(),this.projectionDelta=ct(),this.projectionDeltaWithTransform=ct()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},u=ct();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=ee(),f=l?l.source:void 0,v=this.layout?this.layout.source:void 0,y=f!==v,b=this.getStack(),w=!b||b.members.length<=1,C=!!(y&&!w&&this.options.crossfade===!0&&!this.path.some(Yf));this.animationProgress=0;let x;this.mixTargetDelta=P=>{const T=P/1e3;ua(u.x,s.x,T),ua(u.y,s.y,T),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(on(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),qf(this.relativeTarget,this.relativeTargetOrigin,h,T),x&&$f(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=ee()),xe(x,this.relativeTarget)),y&&(this.animationValues=d,Mf(d,c,this.latestValues,T,C,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Le(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=K.update(()=>{sn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=at(0)),this.currentAnimation=Ff(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Rf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:d}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&pa(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ee();const u=ce(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+u;const h=ce(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}xe(a,l),dt(a,d),At(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Lf),this.sharedNodes.get(s).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 s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&_o("z",s,c,this.animationValues);for(let d=0;d<Ro.length;d++)_o(`rotate${Ro[d]}`,s,c,this.animationValues),_o(`skew${Ro[d]}`,s,c,this.animationValues);s.render();for(const d in c)s.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=rn(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=rn(a?.pointerEvents)||""),this.hasProjected&&!Ye(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const d=c.animationValues||c.latestValues;this.applyTransformsToTarget();let u=Pf(this.projectionDeltaWithTransform,this.treeScale,d);l&&(u=l(d,u)),s.transform=u;const{x:h,y:f}=this.projectionDelta;s.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,c.animationValues?s.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:s.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const v in Io){if(d[v]===void 0)continue;const{correct:y,applyTo:b,isCSSVariable:w}=Io[v],C=u==="none"?d[v]:y(d[v],c);if(b){const x=b.length;for(let P=0;P<x;P++)s[b[P]]=C}else w?this.options.visualElement.renderState.vars[v]=C:s[v]=C}this.options.layoutId&&(s.pointerEvents=c===this?rn(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(aa),this.root.sharedNodes.clear()}}}function Nf(e){e.updateLayout()}function Bf(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:r}=e.options,i=t.source!==e.layout.source;r==="size"?ve(d=>{const u=i?t.measuredBox[d]:t.layoutBox[d],h=ce(u);u.min=n[d].min,u.max=u.min+h}):pa(r,t.layoutBox,n)&&ve(d=>{const u=i?t.measuredBox[d]:t.layoutBox[d],h=ce(n[d]);u.max=u.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const s=ct();At(s,n,t.layoutBox);const a=ct();i?At(a,e.applyTransform(o,!0),t.measuredBox):At(a,n,t.layoutBox);const l=!qs(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:u,layout:h}=d;if(u&&h){const f=ee();on(f,t.layoutBox,u.layoutBox);const v=ee();on(v,n,h.layoutBox),Zs(f,v)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=f,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function zf(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 Of(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Hf(e){e.clearSnapshot()}function aa(e){e.clearMeasurements()}function la(e){e.isLayoutDirty=!1}function jf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ca(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Gf(e){e.resolveTargetDelta()}function Uf(e){e.calcProjection()}function Kf(e){e.resetSkewAndRotation()}function Wf(e){e.removeLeadSnapshot()}function ua(e,t,n){e.translate=Y(t.translate,0,n),e.scale=Y(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function da(e,t,n,o){e.min=Y(t.min,n.min,o),e.max=Y(t.max,n.max,o)}function qf(e,t,n,o){da(e.x,t.x,n.x,o),da(e.y,t.y,n.y,o)}function Yf(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Xf={duration:.45,ease:[.4,0,.1,1]},fa=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ha=fa("applewebkit/")&&!fa("chrome/")?Math.round:pe;function ma(e){e.min=ha(e.min),e.max=ha(e.max)}function Zf(e){ma(e.x),ma(e.y)}function pa(e,t,n){return e==="position"||e==="preserve-aspect"&&!bf(Js(t),Js(n),.2)}function Jf(e){return e!==e.root&&e.scroll?.wasRoot}const Qf=sa({attachResizeListener:(e,t)=>It(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),No={current:void 0},ga=sa({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!No.current){const e=new Qf({});e.mount(window),e.setOptions({layoutScroll:!0}),No.current=e}return No.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Bo=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function va(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function eh(...e){return t=>{let n=!1;const o=e.map(r=>{const i=va(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<o.length;r++){const i=o[r];typeof i=="function"?i():va(e[r],null)}}}}function th(...e){return Ue.useCallback(eh(...e),e)}class nh extends Ue.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const o=n.offsetParent,r=ns(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=r-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function oh({children:e,isPresent:t,anchorX:n,root:o}){const r=m.useId(),i=m.useRef(null),s=m.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=m.useContext(Bo),l=e.props?.ref??e?.ref,c=th(i,l);return m.useInsertionEffect(()=>{const{width:d,height:u,top:h,left:f,right:v}=s.current;if(t||!i.current||!d||!u)return;const y=n==="left"?`left: ${f}`:`right: ${v}`;i.current.dataset.motionPopId=r;const b=document.createElement("style");a&&(b.nonce=a);const w=o??document.head;return w.appendChild(b),b.sheet&&b.sheet.insertRule(`
167
+ `,Ur={tn:"1rem",sm:"1.5rem",md:"2rem",lg:"3rem"},U=({component:e,size:t="1.5rem",color:n="currentColor",className:o,iconProps:r={}})=>{const i=typeof t=="string"&&t in Ur?Ur[t]:t;return p.jsx(Dc,{$color:n,className:o,children:typeof e=="function"?p.jsx(e,{size:i,...r}):e})},Dn=m.createContext({});function Fn(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const Kr=typeof window<"u",Wr=Kr?m.useLayoutEffect:m.useEffect,Ut=m.createContext(null);function An(e,t){e.indexOf(t)===-1&&e.push(t)}function In(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const $e=(e,t,n)=>n>t?t:n<e?e:n;function Ln(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let tt=()=>{},Ve=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(tt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Ln(t,n))},Ve=(e,t,n)=>{if(!e)throw new Error(Ln(t,n))});const Ee={},qr=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Yr(e){return typeof e=="object"&&e!==null}const Xr=e=>/^0[^.\s]+$/u.test(e);function Rn(e){let t;return()=>(t===void 0&&(t=e()),t)}const pe=e=>e,Fc=(e,t)=>n=>t(e(n)),Ct=(...e)=>e.reduce(Fc),Tt=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class _n{constructor(){this.subscriptions=[]}add(t){return An(this.subscriptions,t),()=>In(this.subscriptions,t)}notify(t,n,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,o);else for(let i=0;i<r;i++){const s=this.subscriptions[i];s&&s(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Pe=e=>e*1e3,ge=e=>e/1e3;function Zr(e,t){return t?e*(1e3/t):0}const Jr=new Set;function Nn(e,t,n){e||Jr.has(t)||(console.warn(Ln(t,n)),Jr.add(t))}const Qr=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ac=1e-7,Ic=12;function Lc(e,t,n,o,r){let i,s,a=0;do s=t+(n-t)/2,i=Qr(s,o,r)-e,i>0?n=s:t=s;while(Math.abs(i)>Ac&&++a<Ic);return s}function $t(e,t,n,o){if(e===t&&n===o)return pe;const r=i=>Lc(i,0,1,e,n);return i=>i===0||i===1?i:Qr(r(i),t,o)}const ei=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ti=e=>t=>1-e(1-t),ni=$t(.33,1.53,.69,.99),Bn=ti(ni),oi=ei(Bn),ri=e=>(e*=2)<1?.5*Bn(e):.5*(2-Math.pow(2,-10*(e-1))),zn=e=>1-Math.sin(Math.acos(e)),ii=ti(zn),si=ei(zn),Rc=$t(.42,0,1,1),_c=$t(0,0,.58,1),ai=$t(.42,0,.58,1),Nc=e=>Array.isArray(e)&&typeof e[0]!="number",li=e=>Array.isArray(e)&&typeof e[0]=="number",ci={linear:pe,easeIn:Rc,easeInOut:ai,easeOut:_c,circIn:zn,circInOut:si,circOut:ii,backIn:Bn,backInOut:oi,backOut:ni,anticipate:ri},Bc=e=>typeof e=="string",ui=e=>{if(li(e)){Ve(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,o,r]=e;return $t(t,n,o,r)}else if(Bc(e))return Ve(ci[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ci[e];return e},Kt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function zc(e,t){let n=new Set,o=new Set,r=!1,i=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(d){s.has(d)&&(c.schedule(d),e()),d(a)}const c={schedule:(d,u=!1,h=!1)=>{const v=h&&r?n:o;return u&&s.add(d),v.has(d)||v.add(d),d},cancel:d=>{o.delete(d),s.delete(d)},process:d=>{if(a=d,r){i=!0;return}r=!0,[n,o]=[o,n],n.forEach(l),n.clear(),r=!1,i&&(i=!1,c.process(d))}};return c}const Oc=40;function di(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Kt.reduce((x,P)=>(x[P]=zc(i),x),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:f,postRender:v}=s,y=()=>{const x=Ee.useManualTiming?r.timestamp:performance.now();n=!1,Ee.useManualTiming||(r.delta=o?1e3/60:Math.max(Math.min(x-r.timestamp,Oc),1)),r.timestamp=x,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),d.process(r),u.process(r),h.process(r),f.process(r),v.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(y))},b=()=>{n=!0,o=!0,r.isProcessing||e(y)};return{schedule:Kt.reduce((x,P)=>{const T=s[P];return x[P]=(k,V=!1,$=!1)=>(n||b(),T.schedule(k,V,$)),x},{}),cancel:x=>{for(let P=0;P<Kt.length;P++)s[Kt[P]].cancel(x)},state:r,steps:s}}const{schedule:K,cancel:Le,state:oe,steps:On}=di(typeof requestAnimationFrame<"u"?requestAnimationFrame:pe,!0);let Wt;function Hc(){Wt=void 0}const le={now:()=>(Wt===void 0&&le.set(oe.isProcessing||Ee.useManualTiming?oe.timestamp:performance.now()),Wt),set:e=>{Wt=e,queueMicrotask(Hc)}},fi=e=>t=>typeof t=="string"&&t.startsWith(e),hi=fi("--"),jc=fi("var(--"),Hn=e=>jc(e)?Gc.test(e.split("/*")[0].trim()):!1,Gc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function mi(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const nt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Pt={...nt,transform:e=>$e(0,1,e)},qt={...nt,default:1},kt=e=>Math.round(e*1e5)/1e5,jn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Uc(e){return e==null}const Kc=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Gn=(e,t)=>n=>!!(typeof n=="string"&&Kc.test(n)&&n.startsWith(e)||t&&!Uc(n)&&Object.prototype.hasOwnProperty.call(n,t)),pi=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,i,s,a]=o.match(jn);return{[e]:parseFloat(r),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Wc=e=>$e(0,255,e),Un={...nt,transform:e=>Math.round(Wc(e))},Ke={test:Gn("rgb","red"),parse:pi("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+Un.transform(e)+", "+Un.transform(t)+", "+Un.transform(n)+", "+kt(Pt.transform(o))+")"};function qc(e){let t="",n="",o="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,o+=o,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const Kn={test:Gn("#"),parse:qc,transform:Ke.transform},Mt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Re=Mt("deg"),ke=Mt("%"),E=Mt("px"),Yc=Mt("vh"),Xc=Mt("vw"),gi={...ke,parse:e=>ke.parse(e)/100,transform:e=>ke.transform(e*100)},ot={test:Gn("hsl","hue"),parse:pi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+ke.transform(kt(t))+", "+ke.transform(kt(n))+", "+kt(Pt.transform(o))+")"},Q={test:e=>Ke.test(e)||Kn.test(e)||ot.test(e),parse:e=>Ke.test(e)?Ke.parse(e):ot.test(e)?ot.parse(e):Kn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ke.transform(e):ot.transform(e),getAnimatableNone:e=>{const t=Q.parse(e);return t.alpha=0,Q.transform(t)}},Zc=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Jc(e){return isNaN(e)&&typeof e=="string"&&(e.match(jn)?.length||0)+(e.match(Zc)?.length||0)>0}const vi="number",yi="color",Qc="var",eu="var(",wi="${}",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 Vt(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let i=0;const a=t.replace(tu,l=>(Q.test(l)?(o.color.push(i),r.push(yi),n.push(Q.parse(l))):l.startsWith(eu)?(o.var.push(i),r.push(Qc),n.push(l)):(o.number.push(i),r.push(vi),n.push(parseFloat(l))),++i,wi)).split(wi);return{values:n,split:a,indexes:o,types:r}}function bi(e){return Vt(e).values}function xi(e){const{split:t,types:n}=Vt(e),o=t.length;return r=>{let i="";for(let s=0;s<o;s++)if(i+=t[s],r[s]!==void 0){const a=n[s];a===vi?i+=kt(r[s]):a===yi?i+=Q.transform(r[s]):i+=r[s]}return i}}const nu=e=>typeof e=="number"?0:Q.test(e)?Q.getAnimatableNone(e):e;function ou(e){const t=bi(e);return xi(e)(t.map(nu))}const _e={test:Jc,parse:bi,createTransformer:xi,getAnimatableNone:ou};function Wn(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 ru({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let r=0,i=0,s=0;if(!t)r=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=Wn(l,a,e+1/3),i=Wn(l,a,e),s=Wn(l,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:o}}function Yt(e,t){return n=>n>0?t:e}const Y=(e,t,n)=>e+(t-e)*n,qn=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},iu=[Kn,Ke,ot],su=e=>iu.find(t=>t.test(e));function Si(e){const t=su(e);if(tt(!!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===ot&&(n=ru(n)),n}const Ci=(e,t)=>{const n=Si(e),o=Si(t);if(!n||!o)return Yt(e,t);const r={...n};return i=>(r.red=qn(n.red,o.red,i),r.green=qn(n.green,o.green,i),r.blue=qn(n.blue,o.blue,i),r.alpha=Y(n.alpha,o.alpha,i),Ke.transform(r))},Yn=new Set(["none","hidden"]);function au(e,t){return Yn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function lu(e,t){return n=>Y(e,t,n)}function Xn(e){return typeof e=="number"?lu:typeof e=="string"?Hn(e)?Yt:Q.test(e)?Ci:du:Array.isArray(e)?Ti:typeof e=="object"?Q.test(e)?Ci:cu:Yt}function Ti(e,t){const n=[...e],o=n.length,r=e.map((i,s)=>Xn(i)(i,t[s]));return i=>{for(let s=0;s<o;s++)n[s]=r[s](i);return n}}function cu(e,t){const n={...e,...t},o={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(o[r]=Xn(e[r])(e[r],t[r]));return r=>{for(const i in o)n[i]=o[i](r);return n}}function uu(e,t){const n=[],o={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const i=t.types[r],s=e.indexes[i][o[i]],a=e.values[s]??0;n[r]=a,o[i]++}return n}const du=(e,t)=>{const n=_e.createTransformer(t),o=Vt(e),r=Vt(t);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?Yn.has(e)&&!r.values.length||Yn.has(t)&&!o.values.length?au(e,t):Ct(Ti(uu(o,r),r.values),n):(tt(!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"),Yt(e,t))};function $i(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Y(e,t,n):Xn(e)(e,t)}const fu=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>K.update(t,n),stop:()=>Le(t),now:()=>oe.isProcessing?oe.timestamp:le.now()}},Pi=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let i=0;i<r;i++)o+=Math.round(e(i/(r-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},Xt=2e4;function Zn(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Xt;)t+=n,o=e.next(t);return t>=Xt?1/0:t}function hu(e,t=100,n){const o=n({...e,keyframes:[0,t]}),r=Math.min(Zn(o),Xt);return{type:"keyframes",ease:i=>o.next(r*i).value/t,duration:ge(r)}}const mu=5;function ki(e,t,n){const o=Math.max(t-mu,0);return Zr(n-e(o),t-o)}const X={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Jn=.001;function pu({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:o=X.mass}){let r,i;tt(e<=Pe(X.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=$e(X.minDamping,X.maxDamping,s),e=$e(X.minDuration,X.maxDuration,ge(e)),s<1?(r=c=>{const d=c*s,u=d*e,h=d-n,f=Qn(c,s),v=Math.exp(-u);return Jn-h/f*v},i=c=>{const u=c*s*e,h=u*n+n,f=Math.pow(s,2)*Math.pow(c,2)*e,v=Math.exp(-u),y=Qn(Math.pow(c,2),s);return(-r(c)+Jn>0?-1:1)*((h-f)*v)/y}):(r=c=>{const d=Math.exp(-c*e),u=(c-n)*e+1;return-Jn+d*u},i=c=>{const d=Math.exp(-c*e),u=(n-c)*(e*e);return d*u});const a=5/e,l=vu(r,i,a);if(e=Pe(e),isNaN(l))return{stiffness:X.stiffness,damping:X.damping,duration:e};{const c=Math.pow(l,2)*o;return{stiffness:c,damping:s*2*Math.sqrt(o*c),duration:e}}}const gu=12;function vu(e,t,n){let o=n;for(let r=1;r<gu;r++)o=o-e(o)/t(o);return o}function Qn(e,t){return e*Math.sqrt(1-t*t)}const yu=["duration","bounce"],wu=["stiffness","damping","mass"];function Mi(e,t){return t.some(n=>e[n]!==void 0)}function bu(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!Mi(e,wu)&&Mi(e,yu))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),r=o*o,i=2*$e(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:X.mass,stiffness:r,damping:i}}else{const n=pu(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function Zt(e=X.visualDuration,t=X.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:r}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:f}=bu({...n,velocity:-ge(n.velocity||0)}),v=h||0,y=c/(2*Math.sqrt(l*d)),b=s-i,w=ge(Math.sqrt(l/d)),C=Math.abs(b)<5;o||(o=C?X.restSpeed.granular:X.restSpeed.default),r||(r=C?X.restDelta.granular:X.restDelta.default);let x;if(y<1){const T=Qn(w,y);x=k=>{const V=Math.exp(-y*w*k);return s-V*((v+y*w*b)/T*Math.sin(T*k)+b*Math.cos(T*k))}}else if(y===1)x=T=>s-Math.exp(-w*T)*(b+(v+w*b)*T);else{const T=w*Math.sqrt(y*y-1);x=k=>{const V=Math.exp(-y*w*k),$=Math.min(T*k,300);return s-V*((v+y*w*b)*Math.sinh($)+T*b*Math.cosh($))/T}}const P={calculatedDuration:f&&u||null,next:T=>{const k=x(T);if(f)a.done=T>=u;else{let V=T===0?v:0;y<1&&(V=T===0?Pe(v):ki(x,T,k));const $=Math.abs(V)<=o,A=Math.abs(s-k)<=r;a.done=$&&A}return a.value=a.done?s:k,a},toString:()=>{const T=Math.min(Zn(P),Xt),k=Pi(V=>P.next(T*V).value,T,30);return T+"ms "+k},toTransition:()=>{}};return P}Zt.applyToOptions=e=>{const t=hu(e,100,Zt);return e.ease=t.ease,e.duration=Pe(t.duration),e.type="keyframes",e};function eo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=e[0],h={done:!1,value:u},f=$=>a!==void 0&&$<a||l!==void 0&&$>l,v=$=>a===void 0?l:l===void 0||Math.abs(a-$)<Math.abs(l-$)?a:l;let y=n*t;const b=u+y,w=s===void 0?b:s(b);w!==b&&(y=w-u);const C=$=>-y*Math.exp(-$/o),x=$=>w+C($),P=$=>{const A=C($),I=x($);h.done=Math.abs(A)<=c,h.value=h.done?w:I};let T,k;const V=$=>{f(h.value)&&(T=$,k=Zt({keyframes:[h.value,v(h.value)],velocity:ki(x,$,h.value),damping:r,stiffness:i,restDelta:c,restSpeed:d}))};return V(0),{calculatedDuration:null,next:$=>{let A=!1;return!k&&T===void 0&&(A=!0,P($),V($)),T!==void 0&&$>=T?k.next($-T):(!A&&P($),h)}}}function xu(e,t,n){const o=[],r=n||Ee.mix||$i,i=e.length-1;for(let s=0;s<i;s++){let a=r(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||pe:t;a=Ct(l,a)}o.push(a)}return o}function Su(e,t,{clamp:n=!0,ease:o,mixer:r}={}){const i=e.length;if(Ve(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 s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=xu(t,o,r),l=a.length,c=d=>{if(s&&d<e[0])return t[0];let u=0;if(l>1)for(;u<e.length-2&&!(d<e[u+1]);u++);const h=Tt(e[u],e[u+1],d);return a[u](h)};return n?d=>c($e(e[0],e[i-1],d)):c}function Cu(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=Tt(0,t,o);e.push(Y(n,1,r))}}function Tu(e){const t=[0];return Cu(t,e.length-1),t}function $u(e,t){return e.map(n=>n*t)}function Pu(e,t){return e.map(()=>t||ai).splice(0,e.length-1)}function rt({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=Nc(o)?o.map(ui):ui(o),i={done:!1,value:t[0]},s=$u(n&&n.length===t.length?n:Tu(t),e),a=Su(s,t,{ease:Array.isArray(r)?r:Pu(t,r)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const ku=e=>e!==null;function to(e,{repeat:t,repeatType:n="loop"},o,r=1){const i=e.filter(ku),a=r<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||o===void 0?i[a]:o}const Mu={decay:eo,inertia:eo,tween:rt,keyframes:rt,spring:Zt};function Vi(e){typeof e.type=="string"&&(e.type=Mu[e.type])}class no{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 Vu=e=>e/100;class oo extends no{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!==le.now()&&this.tick(le.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;Vi(t);const{type:n=rt,repeat:o=0,repeatDelay:r=0,repeatType:i,velocity:s=0}=t;let{keyframes:a}=t;const l=n||rt;process.env.NODE_ENV!=="production"&&l!==rt&&Ve(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==rt&&typeof a[0]!="number"&&(this.mixKeyframes=Ct(Vu,$i(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=Zn(c));const{calculatedDuration:d}=c;this.calculatedDuration=d,this.resolvedDuration=d+r,this.totalDuration=this.resolvedDuration*(o+1)-r,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:r,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return o.next(0);const{delay:c=0,keyframes:d,repeat:u,repeatType:h,repeatDelay:f,type:v,onUpdate:y,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-c*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?w<0:w>r;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let x=this.currentTime,P=o;if(u){const $=Math.min(this.currentTime,r)/a;let A=Math.floor($),I=$%1;!I&&$>=1&&(I=1),I===1&&A--,A=Math.min(A,u+1),A%2&&(h==="reverse"?(I=1-I,f&&(I-=f/a)):h==="mirror"&&(P=s)),x=$e(0,1,I)*a}const T=C?{done:!1,value:d[0]}:P.next(x);i&&(T.value=i(T.value));let{done:k}=T;!C&&l!==null&&(k=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return V&&v!==eo&&(T.value=to(d,this.options,b,this.speed)),y&&y(T.value),V&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return ge(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ge(t)}get time(){return ge(this.currentTime)}set time(t){t=Pe(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(le.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ge(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=fu,startTime:n}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),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(le.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 Eu(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const We=e=>e*180/Math.PI,ro=e=>{const t=We(Math.atan2(e[1],e[0]));return io(t)},Du={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ro,rotateZ:ro,skewX:e=>We(Math.atan(e[1])),skewY:e=>We(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},io=e=>(e=e%360,e<0&&(e+=360),e),Ei=ro,Di=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Fi=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Fu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Di,scaleY:Fi,scale:e=>(Di(e)+Fi(e))/2,rotateX:e=>io(We(Math.atan2(e[6],e[5]))),rotateY:e=>io(We(Math.atan2(-e[2],e[0]))),rotateZ:Ei,rotate:Ei,skewX:e=>We(Math.atan(e[4])),skewY:e=>We(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function so(e){return e.includes("scale")?1:0}function ao(e,t){if(!e||e==="none")return so(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,r;if(n)o=Fu,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Du,r=a}if(!r)return so(t);const i=o[t],s=r[1].split(",").map(Iu);return typeof i=="function"?i(s):s[i]}const Au=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ao(n,t)};function Iu(e){return parseFloat(e.trim())}const it=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],st=new Set(it),Ai=e=>e===nt||e===E,Lu=new Set(["x","y","z"]),Ru=it.filter(e=>!Lu.has(e));function _u(e){const t=[];return Ru.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const Ne={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})=>ao(t,"x"),y:(e,{transform:t})=>ao(t,"y")};Ne.translateX=Ne.x,Ne.translateY=Ne.y;const qe=new Set;let lo=!1,co=!1,uo=!1;function Ii(){if(co){const e=Array.from(qe).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=_u(o);r.length&&(n.set(o,r),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const r=n.get(o);r&&r.forEach(([i,s])=>{o.getValue(i)?.set(s)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}co=!1,lo=!1,qe.forEach(e=>e.complete(uo)),qe.clear()}function Li(){qe.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(co=!0)})}function Nu(){uo=!0,Li(),Ii(),uo=!1}class fo{constructor(t,n,o,r,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=r,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(qe.add(this),lo||(lo=!0,K.read(Li),K.resolveKeyframes(Ii))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:r}=this;if(t[0]===null){const i=r?.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(o&&n){const a=o.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),r&&i===void 0&&r.set(t[0])}Eu(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),qe.delete(this)}cancel(){this.state==="scheduled"&&(qe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Bu=e=>e.startsWith("--");function zu(e,t,n){Bu(t)?e.style.setProperty(t,n):e.style[t]=n}const Ou=Rn(()=>window.ScrollTimeline!==void 0),Hu={};function ju(e,t){const n=Rn(e);return()=>Hu[t]??n()}const Ri=ju(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Et=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,_i={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Et([0,.65,.55,1]),circOut:Et([.55,0,1,.45]),backIn:Et([.31,.01,.66,-.59]),backOut:Et([.33,1.53,.69,.99])};function Ni(e,t){if(e)return typeof e=="function"?Ri()?Pi(e,t):"ease-out":li(e)?Et(e):Array.isArray(e)?e.map(n=>Ni(n,t)||_i.easeOut):_i[e]}function Gu(e,t,n,{delay:o=0,duration:r=300,repeat:i=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c=void 0){const d={[t]:n};l&&(d.offset=l);const u=Ni(a,r);Array.isArray(u)&&(d.easing=u);const h={delay:o,duration:r,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(d,h)}function Bi(e){return typeof e=="function"&&"applyToOptions"in e}function Uu({type:e,...t}){return Bi(e)&&Ri()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Ku extends no{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:o,keyframes:r,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,Ve(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Uu(t);this.animation=Gu(n,o,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=to(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(d):zu(n,o,d),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,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 ge(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ge(t)}get time(){return ge(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Pe(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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Ou()?(this.animation.timeline=t,pe):n(this)}}const zi={anticipate:ri,backInOut:oi,circInOut:si};function Wu(e){return e in zi}function qu(e){typeof e.ease=="string"&&Wu(e.ease)&&(e.ease=zi[e.ease])}const ho=10;class Yu extends Ku{constructor(t){qu(t),Vi(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:o,onComplete:r,element:i,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new oo({...s,autoplay:!1}),l=Math.max(ho,le.now()-this.startTime),c=$e(0,ho,l-ho);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const Oi=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_e.test(e)||e==="0")&&!e.startsWith("url("));function Xu(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 Zu(e,t,n,o){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=Oi(r,t),a=Oi(i,t);return tt(s===a,`You are trying to animate ${t} from "${r}" to "${i}". "${s?i:r}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:Xu(e)||(n==="spring"||Bi(n))&&o}function mo(e){e.duration=0,e.type="keyframes"}const Ju=new Set(["opacity","clipPath","filter","transform"]),Qu=Rn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ed(e){const{motionValue:t,name:n,repeatDelay:o,repeatType:r,damping:i,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Qu()&&n&&Ju.has(n)&&(n!=="transform"||!c)&&!l&&!o&&r!=="mirror"&&i!==0&&s!=="inertia"}const td=40;class nd extends no{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s="loop",keyframes:a,name:l,motionValue:c,element:d,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=le.now();const h={autoplay:t,delay:n,type:o,repeat:r,repeatDelay:i,repeatType:s,name:l,motionValue:c,element:d,...u},f=d?.KeyframeResolver||fo;this.keyframeResolver=new f(a,(v,y,b)=>this.onKeyframesResolved(v,y,h,!b),l,c,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,o,r){this.keyframeResolver=void 0;const{name:i,type:s,velocity:a,delay:l,isHandoff:c,onUpdate:d}=o;this.resolvedAt=le.now(),Zu(t,i,s,a)||((Ee.instantAnimations||!l)&&d?.(to(t,o,n)),t[0]=t[t.length-1],mo(o),o.repeat=0);const h={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>td?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...o,keyframes:t},f=!c&&ed(h)?new Yu({...h,element:h.motionValue.owner.current}):new oo(h);f.finished.then(()=>this.notifyFinished()).catch(pe),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}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(),Nu()),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 od=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function rd(e){const t=od.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const id=4;function Hi(e,t,n=1){Ve(n<=id,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,r]=rd(e);if(!o)return;const i=window.getComputedStyle(t).getPropertyValue(o);if(i){const s=i.trim();return qr(s)?parseFloat(s):s}return Hn(r)?Hi(r,t,n+1):r}function po(e,t){return e?.[t]??e?.default??e}const sd={type:"spring",stiffness:500,damping:25,restSpeed:10},ad=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ld={type:"keyframes",duration:.8},cd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ud=(e,{keyframes:t})=>t.length>2?ld:st.has(e)?e.startsWith("scale")?ad(t[1]):sd:cd;function dd({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const fd=e=>e!==null;function hd(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(fd),i=t&&n!=="loop"&&t%2===1?0:r.length-1;return r[i]}function ji(e,t,n,o=0,r=1){const i=Array.from(e).sort((c,d)=>c.sortNodePosition(d)).indexOf(t),s=e.size,a=(s-1)*o;return typeof n=="function"?n(i,s):r===1?i*o:a-i*o}const go=(e,t,n,o={},r,i)=>s=>{const a=po(o,e)||{},l=a.delay||o.delay||0;let{elapsed:c=0}=o;c=c-Pe(l);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:r};dd(a)||Object.assign(d,ud(e,d)),d.duration&&(d.duration=Pe(d.duration)),d.repeatDelay&&(d.repeatDelay=Pe(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(mo(d),d.delay===0&&(u=!0)),(Ee.instantAnimations||Ee.skipAnimations)&&(u=!0,mo(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,u&&!i&&t.get()!==void 0){const h=hd(d.keyframes,a);if(h!==void 0){K.update(()=>{d.onUpdate(h),d.onComplete()});return}}return a.isSync?new oo(d):new nd(d)},Gi=new Set(["width","height","top","left","right","bottom",...it]),Ui=30,md=e=>!isNaN(parseFloat(e));class pd{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{const r=le.now();if(this.updatedAt!==r&&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=le.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=md(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Nn(!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 _n);const o=this.events[t].add(n);return t==="change"?()=>{o(),K.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=le.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ui)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ui);return Zr(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 at(e,t){return new pd(e,t)}function Ki(e){const t=[{},{}];return e?.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function vo(e,t,n,o){if(typeof t=="function"){const[r,i]=Ki(o);t=t(n!==void 0?n:e.custom,r,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,i]=Ki(o);t=t(n!==void 0?n:e.custom,r,i)}return t}function lt(e,t,n){const o=e.getProps();return vo(o,t,n!==void 0?n:o.custom,e)}const yo=e=>Array.isArray(e);function gd(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,at(n))}function vd(e){return yo(e)?e[e.length-1]||0:e}function yd(e,t){const n=lt(e,t);let{transitionEnd:o={},transition:r={},...i}=n||{};i={...i,...o};for(const s in i){const a=vd(i[s]);gd(e,s,a)}}const ie=e=>!!(e&&e.getVelocity);function wd(e){return!!(ie(e)&&e.add)}function wo(e,t){const n=e.getValue("willChange");if(wd(n))return n.add(t);if(!n&&Ee.WillChange){const o=new Ee.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function bo(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Wi="data-"+bo("framerAppearId");function qi(e){return e.props[Wi]}function bd({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function Yi(e,t,{delay:n=0,transitionOverride:o,type:r}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:s,...a}=t;o&&(i=o);const l=[],c=r&&e.animationState&&e.animationState.getState()[r];for(const d in a){const u=e.getValue(d,e.latestValues[d]??null),h=a[d];if(h===void 0||c&&bd(c,d))continue;const f={delay:n,...po(i||{},d)},v=u.get();if(v!==void 0&&!u.isAnimating&&!Array.isArray(h)&&h===v&&!f.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const w=qi(e);if(w){const C=window.MotionHandoffAnimation(w,d,K);C!==null&&(f.startTime=C,y=!0)}}wo(e,d),u.start(go(d,u,h,e.shouldReduceMotion&&Gi.has(d)?{type:!1}:f,e,y));const b=u.animation;b&&l.push(b)}return s&&Promise.all(l).then(()=>{K.update(()=>{s&&yd(e,s)})}),l}function xo(e,t,n={}){const o=lt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(r=n.transitionOverride);const i=o?()=>Promise.all(Yi(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:u}=r;return xd(e,t,l,c,d,u,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[l,c]=a==="beforeChildren"?[i,s]:[s,i];return l().then(()=>c())}else return Promise.all([i(),s(n.delay)])}function xd(e,t,n=0,o=0,r=0,i=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(xo(l,t,{...s,delay:n+(typeof o=="function"?0:o)+ji(e.variantChildren,l,o,r,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Sd(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const r=t.map(i=>xo(e,i,n));o=Promise.all(r)}else if(typeof t=="string")o=xo(e,t,n);else{const r=typeof t=="function"?lt(e,t,n.custom):t;o=Promise.all(Yi(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}const Cd={test:e=>e==="auto",parse:e=>e},Xi=e=>t=>t.test(e),Zi=[nt,E,ke,Re,Xc,Yc,Cd],Ji=e=>Zi.find(Xi(e));function Td(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Xr(e):!0}const $d=new Set(["brightness","contrast","saturate","opacity"]);function Pd(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(jn)||[];if(!o)return e;const r=n.replace(o,"");let i=$d.has(t)?1:0;return o!==n&&(i*=100),t+"("+i+r+")"}const kd=/\b([a-z-]*)\(.*?\)/gu,So={..._e,getAnimatableNone:e=>{const t=e.match(kd);return t?t.map(Pd).join(" "):e}},Qi={...nt,transform:Math.round},Co={borderWidth:E,borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E,borderRadius:E,radius:E,borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomRightRadius:E,borderBottomLeftRadius:E,width:E,maxWidth:E,height:E,maxHeight:E,top:E,right:E,bottom:E,left:E,inset:E,insetBlock:E,insetBlockStart:E,insetBlockEnd:E,insetInline:E,insetInlineStart:E,insetInlineEnd:E,padding:E,paddingTop:E,paddingRight:E,paddingBottom:E,paddingLeft:E,paddingBlock:E,paddingBlockStart:E,paddingBlockEnd:E,paddingInline:E,paddingInlineStart:E,paddingInlineEnd:E,margin:E,marginTop:E,marginRight:E,marginBottom:E,marginLeft:E,marginBlock:E,marginBlockStart:E,marginBlockEnd:E,marginInline:E,marginInlineStart:E,marginInlineEnd:E,backgroundPositionX:E,backgroundPositionY:E,...{rotate:Re,rotateX:Re,rotateY:Re,rotateZ:Re,scale:qt,scaleX:qt,scaleY:qt,scaleZ:qt,skew:Re,skewX:Re,skewY:Re,distance:E,translateX:E,translateY:E,translateZ:E,x:E,y:E,z:E,perspective:E,transformPerspective:E,opacity:Pt,originX:gi,originY:gi,originZ:E},zIndex:Qi,fillOpacity:Pt,strokeOpacity:Pt,numOctaves:Qi},Md={...Co,color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,filter:So,WebkitFilter:So},es=e=>Md[e];function ts(e,t){let n=es(e);return n!==So&&(n=_e),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Vd=new Set(["auto","none","0"]);function Ed(e,t,n){let o=0,r;for(;o<e.length&&!r;){const i=e[o];typeof i=="string"&&!Vd.has(i)&&Vt(i).values.length&&(r=e[o]),o++}if(r&&n)for(const i of t)e[i]=ts(n,r)}class Dd extends fo{constructor(t,n,o,r,i){super(t,n,o,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let u=t[d];if(typeof u=="string"&&(u=u.trim(),Hn(u))){const h=Hi(u,n.current);h!==void 0&&(t[d]=h),d===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Gi.has(o)||t.length!==2)return;const[r,i]=t,s=Ji(r),a=Ji(i),l=mi(r),c=mi(i);if(l!==c&&Ne[o]){this.needsMeasurement=!0;return}if(s!==a)if(Ai(s)&&Ai(a))for(let d=0;d<t.length;d++){const u=t[d];typeof u=="string"&&(t[d]=parseFloat(u))}else Ne[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let r=0;r<t.length;r++)(t[r]===null||Td(t[r]))&&o.push(r);o.length&&Ed(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=Ne[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(o,r).jump(r,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const i=o.length-1,s=o[i];o[i]=Ne[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Fd(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const r=n?.[e]??o.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const ns=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function os(e){return Yr(e)&&"offsetHeight"in e}const{schedule:To}=di(queueMicrotask,!1),be={x:!1,y:!1};function rs(){return be.x||be.y}function Ad(e){return e==="x"||e==="y"?be[e]?null:(be[e]=!0,()=>{be[e]=!1}):be.x||be.y?null:(be.x=be.y=!0,()=>{be.x=be.y=!1})}function is(e,t){const n=Fd(e),o=new AbortController,r={passive:!0,...t,signal:o.signal};return[n,r,()=>o.abort()]}function ss(e){return!(e.pointerType==="touch"||rs())}function Id(e,t,n={}){const[o,r,i]=is(e,n),s=a=>{if(!ss(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const d=u=>{ss(u)&&(c(u),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,r)};return o.forEach(a=>{a.addEventListener("pointerenter",s,r)}),i}const as=(e,t)=>t?e===t?!0:as(e,t.parentElement):!1,$o=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Ld=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ls(e){return Ld.has(e.tagName)||e.isContentEditable===!0}const Jt=new WeakSet;function cs(e){return t=>{t.key==="Enter"&&e(t)}}function Po(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Rd=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=cs(()=>{if(Jt.has(n))return;Po(n,"down");const r=cs(()=>{Po(n,"up")}),i=()=>Po(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function us(e){return $o(e)&&!rs()}function _d(e,t,n={}){const[o,r,i]=is(e,n),s=a=>{const l=a.currentTarget;if(!us(a))return;Jt.add(l);const c=t(l,a),d=(f,v)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",h),Jt.has(l)&&Jt.delete(l),us(f)&&typeof c=="function"&&c(f,{success:v})},u=f=>{d(f,l===window||l===document||n.useGlobalTarget||as(l,f.target))},h=f=>{d(f,!1)};window.addEventListener("pointerup",u,r),window.addEventListener("pointercancel",h,r)};return o.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,r),os(a)&&(a.addEventListener("focus",c=>Rd(c,r)),!ls(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function ds(e){return Yr(e)&&"ownerSVGElement"in e}function Nd(e){return ds(e)&&e.tagName==="svg"}const Bd=[...Zi,Q,_e],zd=e=>Bd.find(Xi(e)),fs=()=>({translate:0,scale:1,origin:0,originPoint:0}),ct=()=>({x:fs(),y:fs()}),hs=()=>({min:0,max:0}),ee=()=>({x:hs(),y:hs()}),ko={current:null},ms={current:!1},Od=typeof window<"u";function Hd(){if(ms.current=!0,!!Od)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ko.current=e.matches;e.addEventListener("change",t),t()}else ko.current=!1}const jd=new WeakMap;function Qt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Dt(e){return typeof e=="string"||Array.isArray(e)}const Mo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vo=["initial",...Mo];function en(e){return Qt(e.animate)||Vo.some(t=>Dt(e[t]))}function ps(e){return!!(en(e)||e.variants)}function Gd(e,t,n){for(const o in t){const r=t[o],i=n[o];if(ie(r))e.addValue(o,r);else if(ie(i))e.addValue(o,at(r,{owner:e}));else if(i!==r)if(e.hasValue(o)){const s=e.getValue(o);s.liveStyle===!0?s.jump(r):s.hasAnimated||s.set(r)}else{const s=e.getStaticValue(o);e.addValue(o,at(s!==void 0?s:r,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const gs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let tn={};function vs(e){tn=e}function Ud(){return tn}class Kd{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:i,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fo,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 h=le.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,K.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;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=r,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=en(n),this.isVariantNode=ps(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...u}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in u){const f=u[h];l[h]!==void 0&&ie(f)&&f.set(l[h])}}mount(t){this.current=t,jd.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)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ms.current||Hd(),this.shouldReduceMotion=ko.current),process.env.NODE_ENV!=="production"&&Nn(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(),Le(this.notifyUpdate),Le(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=st.has(t);o&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&K.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),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 tn){const n=tn[t];if(!n)continue;const{isEnabled:o,Feature:r}=n;if(!this.features[t]&&r&&o(this.props)&&(this.features[t]=new r(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):ee()}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<gs.length;o++){const r=gs[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const i="on"+r,s=t[i];s&&(this.propEventSubscriptions[r]=this.on(r,s))}this.prevMotionValues=Gd(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=at(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"&&(qr(o)||Xr(o))?o=parseFloat(o):!zd(o)&&_e.test(n)&&(o=ts(t,n)),this.setBaseTarget(t,ie(o)?o.get():o)),ie(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=vo(this.props,n,this.presenceContext?.custom);i&&(o=i[t])}if(n&&o!==void 0)return o;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!ie(r)?r:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new _n),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){To.render(this.render)}}class Be{constructor(t){this.isMounted=!1,this.node=t}update(){}}class ys extends Kd{constructor(){super(...arguments),this.KeyframeResolver=Dd}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const o=t.style;return o?o[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;ie(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function ws({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function Wd({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function qd(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 Eo(e){return e===void 0||e===1}function Do({scale:e,scaleX:t,scaleY:n}){return!Eo(e)||!Eo(t)||!Eo(n)}function Ye(e){return Do(e)||bs(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function bs(e){return xs(e.x)||xs(e.y)}function xs(e){return e&&e!=="0%"}function nn(e,t,n){const o=e-n,r=t*o;return n+r}function Ss(e,t,n,o,r){return r!==void 0&&(e=nn(e,r,o)),nn(e,n,o)+t}function Fo(e,t=0,n=1,o,r){e.min=Ss(e.min,t,n,o,r),e.max=Ss(e.max,t,n,o,r)}function Cs(e,{x:t,y:n}){Fo(e.x,t.translate,t.scale,t.originPoint),Fo(e.y,n.translate,n.scale,n.originPoint)}const Ts=.999999999999,$s=1.0000000000001;function Yd(e,t,n,o=!1){const r=n.length;if(!r)return;t.x=t.y=1;let i,s;for(let a=0;a<r;a++){i=n[a],s=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&&dt(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Cs(e,s)),o&&Ye(i.latestValues)&&dt(e,i.latestValues))}t.x<$s&&t.x>Ts&&(t.x=1),t.y<$s&&t.y>Ts&&(t.y=1)}function ut(e,t){e.min=e.min+t,e.max=e.max+t}function Ps(e,t,n,o,r=.5){const i=Y(e.min,e.max,r);Fo(e,t,n,i,o)}function dt(e,t){Ps(e.x,t.x,t.scaleX,t.scale,t.originX),Ps(e.y,t.y,t.scaleY,t.scale,t.originY)}function ks(e,t){return ws(qd(e.getBoundingClientRect(),t))}function Xd(e,t,n){const o=ks(e,n),{scroll:r}=t;return r&&(ut(o.x,r.offset.x),ut(o.y,r.offset.y)),o}const Zd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Jd=it.length;function Qd(e,t,n){let o="",r=!0;for(let i=0;i<Jd;i++){const s=it[i],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(s.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=ns(a,Co[s]);if(!l){r=!1;const d=Zd[s]||s;o+=`${d}(${c}) `}n&&(t[s]=c)}}return o=o.trim(),n?o=n(t,r?"":o):r&&(o="none"),o}function Ao(e,t,n){const{style:o,vars:r,transformOrigin:i}=e;let s=!1,a=!1;for(const l in t){const c=t[l];if(st.has(l)){s=!0;continue}else if(hi(l)){r[l]=c;continue}else{const d=ns(c,Co[l]);l.startsWith("origin")?(a=!0,i[l]=d):o[l]=d}}if(t.transform||(s||n?o.transform=Qd(t,e.transform,n):o.transform&&(o.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:d=0}=i;o.transformOrigin=`${l} ${c} ${d}`}}function Ms(e,{style:t,vars:n},o,r){const i=e.style;let s;for(s in t)i[s]=t[s];r?.applyProjectionStyles(i,o);for(s in n)i.setProperty(s,n[s])}function Vs(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ft={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(E.test(e))e=parseFloat(e);else return e;const n=Vs(e,t.target.x),o=Vs(e,t.target.y);return`${n}% ${o}%`}},ef={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,r=_e.parse(e);if(r.length>5)return o;const i=_e.createTransformer(e),s=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+s]/=a,r[1+s]/=l;const c=Y(a,l,.5);return typeof r[2+s]=="number"&&(r[2+s]/=c),typeof r[3+s]=="number"&&(r[3+s]/=c),i(r)}},Io={borderRadius:{...Ft,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ft,borderTopRightRadius:Ft,borderBottomLeftRadius:Ft,borderBottomRightRadius:Ft,boxShadow:ef};function Es(e,{layout:t,layoutId:n}){return st.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Io[e]||e==="opacity")}function Lo(e,t,n){const o=e.style,r=t?.style,i={};if(!o)return i;for(const s in o)(ie(o[s])||r&&ie(r[s])||Es(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=o[s]);return i}function tf(e){return window.getComputedStyle(e)}class nf extends ys{constructor(){super(...arguments),this.type="html",this.renderInstance=Ms}readValueFromInstance(t,n){if(st.has(n))return this.projection?.isProjecting?so(n):Au(t,n);{const o=tf(t),r=(hi(n)?o.getPropertyValue(n):o[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ks(t,n)}build(t,n,o){Ao(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Lo(t,n,o)}}const of={offset:"stroke-dashoffset",array:"stroke-dasharray"},rf={offset:"strokeDashoffset",array:"strokeDasharray"};function sf(e,t,n=1,o=0,r=!0){e.pathLength=1;const i=r?of:rf;e[i.offset]=E.transform(-o);const s=E.transform(t),a=E.transform(n);e[i.array]=`${s} ${a}`}const af=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ds(e,{attrX:t,attrY:n,attrScale:o,pathLength:r,pathSpacing:i=1,pathOffset:s=0,...a},l,c,d){if(Ao(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:u,style:h}=e;u.transform&&(h.transform=u.transform,delete u.transform),(h.transform||u.transformOrigin)&&(h.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),h.transform&&(h.transformBox=d?.transformBox??"fill-box",delete u.transformBox);for(const f of af)u[f]!==void 0&&(h[f]=u[f],delete u[f]);t!==void 0&&(u.x=t),n!==void 0&&(u.y=n),o!==void 0&&(u.scale=o),r!==void 0&&sf(u,r,i,s,!1)}const Fs=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"]),As=e=>typeof e=="string"&&e.toLowerCase()==="svg";function lf(e,t,n,o){Ms(e,t,void 0,o);for(const r in t.attrs)e.setAttribute(Fs.has(r)?r:bo(r),t.attrs[r])}function Is(e,t,n){const o=Lo(e,t,n);for(const r in e)if(ie(e[r])||ie(t[r])){const i=it.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[i]=e[r]}return o}class cf extends ys{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ee}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(st.has(n)){const o=es(n);return o&&o.default||0}return n=Fs.has(n)?n:bo(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return Is(t,n,o)}build(t,n,o){Ds(t,n,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,n,o,r){lf(t,n,o,r)}mount(t){this.isSVGTag=As(t.tagName),super.mount(t)}}const uf=Vo.length;function Ls(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ls(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<uf;n++){const o=Vo[n],r=e.props[o];(Dt(r)||r===!1)&&(t[o]=r)}return t}function Rs(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 df=[...Mo].reverse(),ff=Mo.length;function hf(e){return t=>Promise.all(t.map(({animation:n,options:o})=>Sd(e,n,o)))}function mf(e){let t=hf(e),n=_s(),o=!0;const r=l=>(c,d)=>{const u=lt(e,d,l==="exit"?e.presenceContext?.custom:void 0);if(u){const{transition:h,transitionEnd:f,...v}=u;c={...c,...v,...f}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,d=Ls(e.parent)||{},u=[],h=new Set;let f={},v=1/0;for(let b=0;b<ff;b++){const w=df[b],C=n[w],x=c[w]!==void 0?c[w]:d[w],P=Dt(x),T=w===l?C.isActive:null;T===!1&&(v=b);let k=x===d[w]&&x!==c[w]&&P;if(k&&o&&e.manuallyAnimateOnMount&&(k=!1),C.protectedKeys={...f},!C.isActive&&T===null||!x&&!C.prevProp||Qt(x)||typeof x=="boolean")continue;const V=pf(C.prevProp,x);let $=V||w===l&&C.isActive&&!k&&P||b>v&&P,A=!1;const I=Array.isArray(x)?x:[x];let B=I.reduce(r(w),{});T===!1&&(B={});const{prevResolvedValues:H={}}=C,M={...H,...B},F=L=>{$=!0,h.has(L)&&(A=!0,h.delete(L)),C.needsAnimating[L]=!0;const j=e.getValue(L);j&&(j.liveStyle=!1)};for(const L in M){const j=B[L],te=H[L];if(f.hasOwnProperty(L))continue;let J=!1;yo(j)&&yo(te)?J=!Rs(j,te):J=j!==te,J?j!=null?F(L):h.add(L):j!==void 0&&h.has(L)?F(L):C.protectedKeys[L]=!0}C.prevProp=x,C.prevResolvedValues=B,C.isActive&&(f={...f,...B}),o&&e.blockInitialAnimation&&($=!1);const z=k&&V;$&&(!z||A)&&u.push(...I.map(L=>{const j={type:w};if(typeof L=="string"&&o&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:te}=e,J=lt(te,L);if(te.enteringChildren&&J){const{delayChildren:ue}=J.transition||{};j.delay=ji(te.enteringChildren,e,ue)}}return{animation:L,options:j}}))}if(h.size){const b={};if(typeof c.initial!="boolean"){const w=lt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);w&&w.transition&&(b.transition=w.transition)}h.forEach(w=>{const C=e.getBaseTarget(w),x=e.getValue(w);x&&(x.liveStyle=!0),b[w]=C??null}),u.push({animation:b})}let y=!!u.length;return o&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),o=!1,y?t(u):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(u=>u.animationState?.setActive(l,c)),n[l].isActive=c;const d=s(l);for(const u in n)n[u].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=_s()}}}function pf(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Rs(t,e):!1}function Xe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _s(){return{animate:Xe(!0),whileInView:Xe(),whileHover:Xe(),whileTap:Xe(),whileDrag:Xe(),whileFocus:Xe(),exit:Xe()}}const Ns=1e-4,gf=1-Ns,vf=1+Ns,Bs=.01,yf=0-Bs,wf=0+Bs;function ce(e){return e.max-e.min}function bf(e,t,n){return Math.abs(e-t)<=n}function zs(e,t,n,o=.5){e.origin=o,e.originPoint=Y(t.min,t.max,e.origin),e.scale=ce(n)/ce(t),e.translate=Y(n.min,n.max,e.origin)-e.originPoint,(e.scale>=gf&&e.scale<=vf||isNaN(e.scale))&&(e.scale=1),(e.translate>=yf&&e.translate<=wf||isNaN(e.translate))&&(e.translate=0)}function At(e,t,n,o){zs(e.x,t.x,n.x,o?o.originX:void 0),zs(e.y,t.y,n.y,o?o.originY:void 0)}function Os(e,t,n){e.min=n.min+t.min,e.max=e.min+ce(t)}function xf(e,t,n){Os(e.x,t.x,n.x),Os(e.y,t.y,n.y)}function Hs(e,t,n){e.min=t.min-n.min,e.max=e.min+ce(t)}function on(e,t,n){Hs(e.x,t.x,n.x),Hs(e.y,t.y,n.y)}function js(e,t,n,o,r){return e-=t,e=nn(e,1/n,o),r!==void 0&&(e=nn(e,1/r,o)),e}function Sf(e,t=0,n=1,o=.5,r,i=e,s=e){if(ke.test(t)&&(t=parseFloat(t),t=Y(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Y(i.min,i.max,o);e===i&&(a-=t),e.min=js(e.min,t,n,a,r),e.max=js(e.max,t,n,a,r)}function Gs(e,t,[n,o,r],i,s){Sf(e,t[n],t[o],t[r],t.scale,i,s)}const Cf=["x","scaleX","originX"],Tf=["y","scaleY","originY"];function Us(e,t,n,o){Gs(e.x,t,Cf,n?n.x:void 0,o?o.x:void 0),Gs(e.y,t,Tf,n?n.y:void 0,o?o.y:void 0)}function Ks(e,t){e.min=t.min,e.max=t.max}function xe(e,t){Ks(e.x,t.x),Ks(e.y,t.y)}function Ws(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function qs(e){return e.translate===0&&e.scale===1}function Ys(e){return qs(e.x)&&qs(e.y)}function Xs(e,t){return e.min===t.min&&e.max===t.max}function $f(e,t){return Xs(e.x,t.x)&&Xs(e.y,t.y)}function Zs(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Js(e,t){return Zs(e.x,t.x)&&Zs(e.y,t.y)}function Qs(e){return ce(e.x)/ce(e.y)}function ea(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ve(e){return[e("x"),e("y")]}function Pf(e,t,n){let o="";const r=e.x.translate/t.x,i=e.y.translate/t.y,s=n?.z||0;if((r||i||s)&&(o=`translate3d(${r}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:d,rotateX:u,rotateY:h,skewX:f,skewY:v}=n;c&&(o=`perspective(${c}px) ${o}`),d&&(o+=`rotate(${d}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `),f&&(o+=`skewX(${f}deg) `),v&&(o+=`skewY(${v}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 ta=["TopLeft","TopRight","BottomLeft","BottomRight"],kf=ta.length,na=e=>typeof e=="string"?parseFloat(e):e,oa=e=>typeof e=="number"||E.test(e);function Mf(e,t,n,o,r,i){r?(e.opacity=Y(0,n.opacity??1,Vf(o)),e.opacityExit=Y(t.opacity??1,0,Ef(o))):i&&(e.opacity=Y(t.opacity??1,n.opacity??1,o));for(let s=0;s<kf;s++){const a=`border${ta[s]}Radius`;let l=ra(t,a),c=ra(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||oa(l)===oa(c)?(e[a]=Math.max(Y(na(l),na(c),o),0),(ke.test(c)||ke.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Y(t.rotate||0,n.rotate||0,o))}function ra(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Vf=ia(0,.5,ii),Ef=ia(.5,.95,pe);function ia(e,t,n){return o=>o<e?0:o>t?1:n(Tt(e,t,o))}function Df(e,t){const n=le.now(),o=({timestamp:r})=>{const i=r-n;i>=t&&(Le(o),e(i-t))};return K.setup(o,!0),()=>Le(o)}function It(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function rn(e){return ie(e)?e.get():e}function Ff(e,t,n){const o=ie(e)?e:at(e);return o.start(go("",o,t,n)),o.animation}const Af=(e,t)=>e.depth-t.depth;class If{constructor(){this.children=[],this.isDirty=!1}add(t){An(this.children,t),this.isDirty=!0}remove(t){In(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Af),this.isDirty=!1,this.children.forEach(t)}}class Lf{constructor(){this.members=[]}add(t){An(this.members,t),t.scheduleRender()}remove(t){if(In(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(r=>t===r);if(n===0)return!1;let o;for(let r=n;r>=0;r--){const i=this.members[r];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:r}=t.options;r===!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)}}const sn={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ro=["","X","Y","Z"],Rf=1e3;let _f=0;function _o(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function sa(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=qi(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",K,!(r||i))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&sa(o)}function aa({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(s={},a=t?.()){this.id=_f++,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(zf),this.nodes.forEach(Gf),this.nodes.forEach(Uf),this.nodes.forEach(Of)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,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 If)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new _n),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=ds(s)&&!Nd(s),this.instance=s;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let d,u=0;const h=()=>this.root.updateBlockedByResize=!1;K.read(()=>{u=window.innerWidth}),e(s,()=>{const f=window.innerWidth;f!==u&&(u=f,this.root.updateBlockedByResize=!0,d&&d(),d=Df(h,250),sn.hasAnimatedSinceResize&&(sn.hasAnimatedSinceResize=!1,this.nodes.forEach(ua)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:u,hasRelativeLayoutChanged:h,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||Xf,{onLayoutAnimationStart:y,onLayoutAnimationComplete:b}=c.getProps(),w=!this.targetLayout||!Js(this.targetLayout,f),C=!u&&h;if(this.options.layoutRoot||this.resumeFrom||C||u&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...po(v,"layout"),onPlay:y,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(d,C)}else u||ua(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Le(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(Kf),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sa(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const u=this.path[d];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.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(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(la);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ca);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(jf),this.nodes.forEach(Nf),this.nodes.forEach(Bf)):this.nodes.forEach(ca),this.clearAllSnapshots();const a=le.now();oe.delta=$e(0,1e3/60,a-oe.timestamp),oe.timestamp=a,oe.isProcessing=!0,On.update.process(oe),On.preRender.process(oe),On.render.process(oe),oe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,To.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Hf),this.sharedNodes.forEach(Wf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,K.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){K.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ce(this.snapshot.measuredBox.x)&&!ce(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 s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=ee(),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,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ys(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||Ye(this.latestValues)||d)&&(r(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),Zf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return ee();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Jf))){const{scroll:c}=this.root;c&&(ut(a.x,c.offset.x),ut(a.y,c.offset.y))}return a}removeElementScroll(s){const a=ee();if(xe(a,s),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:d,options:u}=c;c!==this.root&&d&&u.layoutScroll&&(d.wasRoot&&xe(a,s),ut(a.x,d.offset.x),ut(a.y,d.offset.y))}return a}applyTransform(s,a=!1){const l=ee();xe(l,s);for(let c=0;c<this.path.length;c++){const d=this.path[c];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&dt(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Ye(d.latestValues)&&dt(l,d.latestValues)}return Ye(this.latestValues)&&dt(l,this.latestValues),l}removeTransform(s){const a=ee();xe(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ye(c.latestValues))continue;Do(c.latestValues)&&c.updateSnapshot();const d=ee(),u=c.measurePageBox();xe(d,u),Us(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return Ye(this.latestValues)&&Us(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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!==oe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!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(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:u}=this.options;if(!this.layout||!(d||u))return;this.resolvedRelativeTargetAt=oe.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ee(),this.targetWithTransforms=ee()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),xf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):xe(this.target,this.layout.layoutBox),Cs(this.target,this.targetDelta)):xe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Do(this.parent.latestValues)||bs(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,l){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ee(),this.relativeTargetOrigin=ee(),on(this.relativeTargetOrigin,a,l),xe(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===oe.timestamp&&(l=!1),l)return;const{layout:c,layoutId:d}=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||d))return;xe(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,h=this.treeScale.y;Yd(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=ee());const{target:f}=s;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ws(this.prevProjectionDelta.x,this.projectionDelta.x),Ws(this.prevProjectionDelta.y,this.projectionDelta.y)),At(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==h||!ea(this.projectionDelta.x,this.prevProjectionDelta.x)||!ea(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ct(),this.projectionDelta=ct(),this.projectionDeltaWithTransform=ct()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},u=ct();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=ee(),f=l?l.source:void 0,v=this.layout?this.layout.source:void 0,y=f!==v,b=this.getStack(),w=!b||b.members.length<=1,C=!!(y&&!w&&this.options.crossfade===!0&&!this.path.some(Yf));this.animationProgress=0;let x;this.mixTargetDelta=P=>{const T=P/1e3;da(u.x,s.x,T),da(u.y,s.y,T),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(on(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),qf(this.relativeTarget,this.relativeTargetOrigin,h,T),x&&$f(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=ee()),xe(x,this.relativeTarget)),y&&(this.animationValues=d,Mf(d,c,this.latestValues,T,C,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Le(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=K.update(()=>{sn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=at(0)),this.currentAnimation=Ff(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Rf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:d}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&ga(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ee();const u=ce(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+u;const h=ce(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}xe(a,l),dt(a,d),At(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Lf),this.sharedNodes.get(s).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 s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&_o("z",s,c,this.animationValues);for(let d=0;d<Ro.length;d++)_o(`rotate${Ro[d]}`,s,c,this.animationValues),_o(`skew${Ro[d]}`,s,c,this.animationValues);s.render();for(const d in c)s.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=rn(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=rn(a?.pointerEvents)||""),this.hasProjected&&!Ye(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const d=c.animationValues||c.latestValues;this.applyTransformsToTarget();let u=Pf(this.projectionDeltaWithTransform,this.treeScale,d);l&&(u=l(d,u)),s.transform=u;const{x:h,y:f}=this.projectionDelta;s.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,c.animationValues?s.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:s.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const v in Io){if(d[v]===void 0)continue;const{correct:y,applyTo:b,isCSSVariable:w}=Io[v],C=u==="none"?d[v]:y(d[v],c);if(b){const x=b.length;for(let P=0;P<x;P++)s[b[P]]=C}else w?this.options.visualElement.renderState.vars[v]=C:s[v]=C}this.options.layoutId&&(s.pointerEvents=c===this?rn(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(la),this.root.sharedNodes.clear()}}}function Nf(e){e.updateLayout()}function Bf(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:r}=e.options,i=t.source!==e.layout.source;r==="size"?ve(d=>{const u=i?t.measuredBox[d]:t.layoutBox[d],h=ce(u);u.min=n[d].min,u.max=u.min+h}):ga(r,t.layoutBox,n)&&ve(d=>{const u=i?t.measuredBox[d]:t.layoutBox[d],h=ce(n[d]);u.max=u.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const s=ct();At(s,n,t.layoutBox);const a=ct();i?At(a,e.applyTransform(o,!0),t.measuredBox):At(a,n,t.layoutBox);const l=!Ys(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:u,layout:h}=d;if(u&&h){const f=ee();on(f,t.layoutBox,u.layoutBox);const v=ee();on(v,n,h.layoutBox),Js(f,v)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=f,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function zf(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 Of(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Hf(e){e.clearSnapshot()}function la(e){e.clearMeasurements()}function ca(e){e.isLayoutDirty=!1}function jf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ua(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Gf(e){e.resolveTargetDelta()}function Uf(e){e.calcProjection()}function Kf(e){e.resetSkewAndRotation()}function Wf(e){e.removeLeadSnapshot()}function da(e,t,n){e.translate=Y(t.translate,0,n),e.scale=Y(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function fa(e,t,n,o){e.min=Y(t.min,n.min,o),e.max=Y(t.max,n.max,o)}function qf(e,t,n,o){fa(e.x,t.x,n.x,o),fa(e.y,t.y,n.y,o)}function Yf(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Xf={duration:.45,ease:[.4,0,.1,1]},ha=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ma=ha("applewebkit/")&&!ha("chrome/")?Math.round:pe;function pa(e){e.min=ma(e.min),e.max=ma(e.max)}function Zf(e){pa(e.x),pa(e.y)}function ga(e,t,n){return e==="position"||e==="preserve-aspect"&&!bf(Qs(t),Qs(n),.2)}function Jf(e){return e!==e.root&&e.scroll?.wasRoot}const Qf=aa({attachResizeListener:(e,t)=>It(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),No={current:void 0},va=aa({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!No.current){const e=new Qf({});e.mount(window),e.setOptions({layoutScroll:!0}),No.current=e}return No.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Bo=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ya(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function eh(...e){return t=>{let n=!1;const o=e.map(r=>{const i=ya(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<o.length;r++){const i=o[r];typeof i=="function"?i():ya(e[r],null)}}}}function th(...e){return Ue.useCallback(eh(...e),e)}class nh extends Ue.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const o=n.offsetParent,r=os(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=r-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function oh({children:e,isPresent:t,anchorX:n,root:o}){const r=m.useId(),i=m.useRef(null),s=m.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=m.useContext(Bo),l=e.props?.ref??e?.ref,c=th(i,l);return m.useInsertionEffect(()=>{const{width:d,height:u,top:h,left:f,right:v}=s.current;if(t||!i.current||!d||!u)return;const y=n==="left"?`left: ${f}`:`right: ${v}`;i.current.dataset.motionPopId=r;const b=document.createElement("style");a&&(b.nonce=a);const w=o??document.head;return w.appendChild(b),b.sheet&&b.sheet.insertRule(`
168
168
  [data-motion-pop-id="${r}"] {
169
169
  position: absolute !important;
170
170
  width: ${d}px !important;
@@ -172,7 +172,7 @@
172
172
  ${y}px !important;
173
173
  top: ${h}px !important;
174
174
  }
175
- `),()=>{w.contains(b)&&w.removeChild(b)}},[t]),p.jsx(nh,{isPresent:t,childRef:i,sizeRef:s,children:Ue.cloneElement(e,{ref:c})})}const rh=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:r,presenceAffectsLayout:i,mode:s,anchorX:a,root:l})=>{const c=Fn(ih),d=m.useId();let u=!0,h=m.useMemo(()=>(u=!1,{id:d,initial:t,isPresent:n,custom:r,onExitComplete:f=>{c.set(f,!0);for(const v of c.values())if(!v)return;o&&o()},register:f=>(c.set(f,!1),()=>c.delete(f))}),[n,c,o]);return i&&u&&(h={...h}),m.useMemo(()=>{c.forEach((f,v)=>c.set(v,!1))},[n]),Ue.useEffect(()=>{!n&&!c.size&&o&&o()},[n]),s==="popLayout"&&(e=p.jsx(oh,{isPresent:n,anchorX:a,root:l,children:e})),p.jsx(Ut.Provider,{value:h,children:e})};function ih(){return new Map}function ya(e=!0){const t=m.useContext(Ut);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,i=m.useId();m.useEffect(()=>{if(e)return r(i)},[e]);const s=m.useCallback(()=>e&&o&&o(i),[i,o,e]);return!n&&o?[!1,s]:[!0]}const an=e=>e.key||"";function wa(e){const t=[];return m.Children.forEach(e,n=>{m.isValidElement(n)&&t.push(n)}),t}const Lt=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:i="sync",propagate:s=!1,anchorX:a="left",root:l})=>{const[c,d]=ya(s),u=m.useMemo(()=>wa(e),[e]),h=s&&!c?[]:u.map(an),f=m.useRef(!0),v=m.useRef(u),y=Fn(()=>new Map),b=m.useRef(new Set),[w,C]=m.useState(u),[x,P]=m.useState(u);Kr(()=>{f.current=!1,v.current=u;for(let V=0;V<x.length;V++){const $=an(x[V]);h.includes($)?(y.delete($),b.current.delete($)):y.get($)!==!0&&y.set($,!1)}},[x,h.length,h.join("-")]);const T=[];if(u!==w){let V=[...u];for(let $=0;$<x.length;$++){const A=x[$],I=an(A);h.includes(I)||(V.splice($,0,A),T.push(A))}return i==="wait"&&T.length&&(V=T),P(wa(V)),C(u),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:k}=m.useContext(Dn);return p.jsx(p.Fragment,{children:x.map(V=>{const $=an(V),A=s&&!c?!1:u===x||h.includes($),I=()=>{if(b.current.has($))return;if(b.current.add($),y.has($))y.set($,!0);else return;let B=!0;y.forEach(H=>{H||(B=!1)}),B&&(k?.(),P(v.current),s&&d?.(),o&&o())};return p.jsx(rh,{isPresent:A,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:i,root:l,onExitComplete:A?void 0:I,anchorX:a,children:V},$)})})},ba=m.createContext({strict:!1}),xa={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"]};let Sa=!1;function sh(){if(Sa)return;const e={};for(const t in xa)e[t]={isEnabled:n=>xa[t].some(o=>!!n[o])};gs(e),Sa=!0}function Ca(){return sh(),Ud()}function ah(e){const t=Ca();for(const n in e)t[n]={...t[n],...e[n]};gs(t)}const lh=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 ln(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||lh.has(e)}let Ta=e=>!ln(e);function ch(e){typeof e=="function"&&(Ta=t=>t.startsWith("on")?!ln(t):e(t))}try{ch(require("@emotion/is-prop-valid").default)}catch{}function uh(e,t,n){const o={};for(const r in e)r==="values"&&typeof e.values=="object"||(Ta(r)||n===!0&&ln(r)||!t&&!ln(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}const cn=m.createContext({});function dh(e,t){if(en(e)){const{initial:n,animate:o}=e;return{initial:n===!1||Dt(n)?n:void 0,animate:Dt(o)?o:void 0}}return e.inherit!==!1?t:{}}function fh(e){const{initial:t,animate:n}=dh(e,m.useContext(cn));return m.useMemo(()=>({initial:t,animate:n}),[$a(t),$a(n)])}function $a(e){return Array.isArray(e)?e.join(" "):e}const zo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Pa(e,t,n){for(const o in t)!ie(t[o])&&!Vs(o,n)&&(e[o]=t[o])}function hh({transformTemplate:e},t){return m.useMemo(()=>{const n=zo();return Ao(n,t,e),Object.assign({},n.vars,n.style)},[t])}function mh(e,t){const n=e.style||{},o={};return Pa(o,n,e),Object.assign(o,hh(e,t)),o}function ph(e,t){const n={},o=mh(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 ka=()=>({...zo(),attrs:{}});function gh(e,t,n,o){const r=m.useMemo(()=>{const i=ka();return Es(i,t,Fs(o),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Pa(i,e.style,e),r.style={...i,...r.style}}return r}const vh=["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 Oo(e){return typeof e!="string"||e.includes("-")?!1:!!(vh.indexOf(e)>-1||/[A-Z]/u.test(e))}function yh(e,t,n,{latestValues:o},r,i=!1,s){const l=(s??Oo(e)?gh:ph)(t,o,r,e),c=uh(t,typeof e=="string",i),d=e!==m.Fragment?{...c,...l,ref:n}:{},{children:u}=t,h=m.useMemo(()=>ie(u)?u.get():u,[u]);return m.createElement(e,{...d,children:h})}function wh({scrapeMotionValuesFromProps:e,createRenderState:t},n,o,r){return{latestValues:bh(n,o,r,e),renderState:t()}}function bh(e,t,n,o){const r={},i=o(e,{});for(const h in i)r[h]=rn(i[h]);let{initial:s,animate:a}=e;const l=en(e),c=ms(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const u=d?a:s;if(u&&typeof u!="boolean"&&!Qt(u)){const h=Array.isArray(u)?u:[u];for(let f=0;f<h.length;f++){const v=vo(e,h[f]);if(v){const{transitionEnd:y,transition:b,...w}=v;for(const C in w){let x=w[C];if(Array.isArray(x)){const P=d?x.length-1:0;x=x[P]}x!==null&&(r[C]=x)}for(const C in y)r[C]=y[C]}}}return r}const Ma=e=>(t,n)=>{const o=m.useContext(cn),r=m.useContext(Ut),i=()=>wh(e,t,o,r);return n?i():Fn(i)},xh=Ma({scrapeMotionValuesFromProps:Lo,createRenderState:zo}),Sh=Ma({scrapeMotionValuesFromProps:As,createRenderState:ka}),Ch=Symbol.for("motionComponentSymbol");function Th(e,t,n){const o=m.useRef(n);m.useInsertionEffect(()=>{o.current=n});const r=m.useRef(null);return m.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const s=o.current;if(typeof s=="function")if(i){const a=s(i);typeof a=="function"&&(r.current=a)}else r.current?(r.current(),r.current=null):s(i);else s&&(s.current=i)},[t])}const Va=m.createContext({});function Rt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function $h(e,t,n,o,r,i){const{visualElement:s}=m.useContext(cn),a=m.useContext(ba),l=m.useContext(Ut),c=m.useContext(Bo).reducedMotion,d=m.useRef(null);o=o||a.renderer,!d.current&&o&&(d.current=o(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:i}));const u=d.current,h=m.useContext(Va);u&&!u.projection&&r&&(u.type==="html"||u.type==="svg")&&Ph(d.current,n,r,h);const f=m.useRef(!1);m.useInsertionEffect(()=>{u&&f.current&&u.update(n,l)});const v=n[Ki],y=m.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return Kr(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),y.current&&u.animationState&&u.animationState.animateChanges())}),m.useEffect(()=>{u&&(!y.current&&u.animationState&&u.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),y.current=!1),u.enteringChildren=void 0)}),u}function Ph(e,t,n,o){const{layoutId:r,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ea(e.parent)),e.projection.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!s||a&&Rt(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:o,crossfade:d,layoutScroll:l,layoutRoot:c})}function Ea(e){if(e)return e.options.allowProjection!==!1?e.projection:Ea(e.parent)}function Ho(e,{forwardMotionProps:t=!1,type:n}={},o,r){o&&ah(o);const i=n?n==="svg":Oo(e),s=i?Sh:xh;function a(c,d){let u;const h={...m.useContext(Bo),...c,layoutId:kh(c)},{isStatic:f}=h,v=fh(c),y=s(c,f);if(!f&&Ur){Mh(h,o);const b=Vh(h);u=b.MeasureLayout,v.visualElement=$h(e,y,h,r,b.ProjectionNode,i)}return p.jsxs(cn.Provider,{value:v,children:[u&&v.visualElement?p.jsx(u,{visualElement:v.visualElement,...h}):null,yh(e,c,Th(y,v.visualElement,d),y,f,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=m.forwardRef(a);return l[Ch]=e,l}function kh({layoutId:e}){const t=m.useContext(Dn).id;return t&&e!==void 0?t+"-"+e:e}function Mh(e,t){const n=m.useContext(ba).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?tt(!1,o,"lazy-strict-mode"):Ve(!1,o,"lazy-strict-mode")}}function Vh(e){const t=Ca(),{drag:n,layout:o}=t;if(!n&&!o)return{};const r={...n,...o};return{MeasureLayout:n?.isEnabled(e)||o?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Eh(e,t){if(typeof Proxy>"u")return Ho;const n=new Map,o=(i,s)=>Ho(i,s,e,t),r=(i,s)=>(process.env.NODE_ENV!=="production"&&Nn(!1,"motion() is deprecated. Use motion.create() instead."),o(i,s));return new Proxy(r,{get:(i,s)=>s==="create"?o:(n.has(s)||n.set(s,Ho(s,void 0,e,t)),n.get(s))})}const Dh=(e,t)=>t.isSVG??Oo(e)?new cf(t):new nf(t,{allowProjection:e!==m.Fragment});class Fh extends Be{constructor(t){super(t),t.animationState||(t.animationState=mf(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Qt(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 Ah=0;class Ih extends Be{constructor(){super(...arguments),this.id=Ah++}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 r=this.node.animationState.setActive("exit",!t);n&&!t&&r.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 Lh={animation:{Feature:Fh},exit:{Feature:Ih}};function _t(e){return{point:{x:e.pageX,y:e.pageY}}}const Rh=e=>t=>$o(t)&&e(t,_t(t));function Nt(e,t,n,o){return It(e,t,Rh(n),o)}const Da=({current:e})=>e?e.ownerDocument.defaultView:null,Fa=(e,t)=>Math.abs(e-t);function _h(e,t){const n=Fa(e.x,t.x),o=Fa(e.y,t.y);return Math.sqrt(n**2+o**2)}const Aa=new Set(["auto","scroll"]);class Ia{constructor(t,n,{transformPagePoint:o,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Go(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,y=_h(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!y)return;const{point:b}=f,{timestamp:w}=oe;this.history.push({...b,timestamp:w});const{onStart:C,onMove:x}=this.handlers;v||(C&&C(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,v)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=jo(v,this.transformPagePoint),K.update(this.updatePoint,!0)},this.handlePointerUp=(f,v)=>{this.end();const{onEnd:y,onSessionEnd:b,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=Go(f.type==="pointercancel"?this.lastMoveEventInfo:jo(v,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,C),b&&b(f,C)},!$o(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=o,this.distanceThreshold=s,this.contextWindow=r||window;const l=_t(t),c=jo(l,this.transformPagePoint),{point:d}=c,{timestamp:u}=oe;this.history=[{...d,timestamp:u}];const{onSessionStart:h}=n;h&&h(t,Go(c,this.history)),this.removeListeners=Ct(Nt(this.contextWindow,"pointermove",this.handlePointerMove),Nt(this.contextWindow,"pointerup",this.handlePointerUp),Nt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const o=getComputedStyle(n);(Aa.has(o.overflowX)||Aa.has(o.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const o=t===window,r=o?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:r.x-n.x,y:r.y-n.y};i.x===0&&i.y===0||(o?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,r),K.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Le(this.updatePoint)}}function jo(e,t){return t?{point:t(e.point)}:e}function La(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Go({point:e},t){return{point:e,delta:La(e,Ra(t)),offset:La(e,Nh(t)),velocity:Bh(t,.1)}}function Nh(e){return e[0]}function Ra(e){return e[e.length-1]}function Bh(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=Ra(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>Pe(t)));)n--;if(!o)return{x:0,y:0};const i=ge(r.timestamp-o.timestamp);if(i===0)return{x:0,y:0};const s={x:(r.x-o.x)/i,y:(r.y-o.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function zh(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?Y(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?Y(n,e,o.max):Math.min(e,n)),e}function _a(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 Oh(e,{top:t,left:n,bottom:o,right:r}){return{x:_a(e.x,n,r),y:_a(e.y,t,o)}}function Na(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 Hh(e,t){return{x:Na(e.x,t.x),y:Na(e.y,t.y)}}function jh(e,t){let n=.5;const o=ce(e),r=ce(t);return r>o?n=Tt(t.min,t.max-o,e.min):o>r&&(n=Tt(e.min,e.max-r,t.min)),$e(0,1,n)}function Gh(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 Uo=.35;function Uh(e=Uo){return e===!1?e=0:e===!0&&(e=Uo),{x:Ba(e,"left","right"),y:Ba(e,"top","bottom")}}function Ba(e,t,n){return{min:za(e,t),max:za(e,n)}}function za(e,t){return typeof e=="number"?e:e[t]||0}const Kh=new WeakMap;class Wh{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=ee(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:o}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=u=>{n?(this.stopAnimation(),this.snapToCursor(_t(u).point)):this.pauseAnimation()},s=(u,h)=>{this.stopAnimation();const{drag:f,dragPropagation:v,onDragStart:y}=this.getProps();if(f&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ad(f),!this.openDragLock))return;this.latestPointerEvent=u,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ve(w=>{let C=this.getAxisMotionValue(w).get()||0;if(ke.test(C)){const{projection:x}=this.visualElement;if(x&&x.layout){const P=x.layout.layoutBox[w];P&&(C=ce(P)*(parseFloat(C)/100))}}this.originPoint[w]=C}),y&&K.postRender(()=>y(u,h)),wo(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(u,h)=>{this.latestPointerEvent=u,this.latestPanInfo=h;const{dragPropagation:f,dragDirectionLock:v,onDirectionLock:y,onDrag:b}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:w}=h;if(v&&this.currentDirection===null){this.currentDirection=qh(w),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,w),this.updateAxis("y",h.point,w),this.visualElement.render(),b&&b(u,h)},l=(u,h)=>{this.latestPointerEvent=u,this.latestPanInfo=h,this.stop(u,h),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>ve(u=>this.getAnimationState(u)==="paused"&&this.getAxisMotionValue(u).animation?.play()),{dragSnapToOrigin:d}=this.getProps();this.panSession=new Ia(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:o,contextWindow:Da(this.visualElement),element:this.visualElement.current})}stop(t,n){const o=t||this.latestPointerEvent,r=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!o)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&K.postRender(()=>a(o,r))}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:r}=this.getProps();if(!o||!un(t,r,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(s=zh(s,this.constraints[t],this.elastic[t])),i.set(s)}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,r=this.constraints;t&&Rt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=Oh(o.layoutBox,t):this.constraints=!1,this.elastic=Uh(n),r!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&ve(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Gh(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Rt(t))return!1;const o=t.current;Ve(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:r}=this.visualElement;if(!r||!r.layout)return!1;const i=Xd(o,r.root,this.visualElement.getTransformPagePoint());let s=Hh(r.layout.layoutBox,i);if(n){const a=n(Wd(s));this.hasMutatedConstraints=!!a,a&&(s=ys(a))}return s}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:r,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ve(d=>{if(!un(d,n,this.currentDirection))return;let u=l&&l[d]||{};s&&(u={min:0,max:0});const h=r?200:1e6,f=r?40:1e7,v={type:"inertia",velocity:o?t[d]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(d,v)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return wo(this.visualElement,t),o.start(go(t,o,0,n,this.visualElement,!1))}stopAnimation(){ve(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ve(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(),r=o[n];return r||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){ve(n=>{const{drag:o}=this.getProps();if(!un(n,o,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(n);if(r&&r.layout){const{min:s,max:a}=r.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-Y(s,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!Rt(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};ve(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();r[s]=jh({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),ve(s=>{if(!un(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Y(l,c,r[s]))})}addListeners(){if(!this.visualElement.current)return;Kh.set(this.visualElement,this);const t=this.visualElement.current,n=Nt(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&!as(l.target)&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();Rt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),K.read(o);const s=It(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ve(d=>{const u=this.getAxisMotionValue(d);u&&(this.originPoint[d]+=l[d].translate,u.set(u.get()+l[d].translate))}),this.visualElement.render())}));return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:s=Uo,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:r,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function un(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function qh(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Yh extends Be{constructor(t){super(t),this.removeGroupControls=pe,this.removeListeners=pe,this.controls=new Wh(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pe}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const Oa=e=>(t,n)=>{e&&K.postRender(()=>e(t,n))};class Xh extends Be{constructor(){super(...arguments),this.removePointerDownListener=pe}onPointerDown(t){this.session=new Ia(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Da(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:Oa(t),onStart:Oa(n),onMove:o,onEnd:(i,s)=>{delete this.session,r&&K.postRender(()=>r(i,s))}}}mount(){this.removePointerDownListener=Nt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ko=!1;class Zh extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:r}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),o&&o.register&&r&&o.register(i),Ko&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),sn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:r,isPresent:i}=this.props,{projection:s}=o;return s&&(s.isPresent=i,Ko=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==i?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||K.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),To.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:r}=t;Ko=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ha(e){const[t,n]=ya(),o=m.useContext(Dn);return p.jsx(Zh,{...e,layoutGroup:o,switchLayoutGroup:m.useContext(Va),isPresent:t,safeToRemove:n})}const Jh={pan:{Feature:Xh},drag:{Feature:Yh,ProjectionNode:ga,MeasureLayout:Ha}};function ja(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,i=o[r];i&&K.postRender(()=>i(t,_t(t)))}class Qh extends Be{mount(){const{current:t}=this.node;t&&(this.unmount=Id(t,(n,o)=>(ja(this.node,o,"Start"),r=>ja(this.node,r,"End"))))}unmount(){}}class em extends Be{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=Ct(It(this.node.current,"focus",()=>this.onFocus()),It(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ga(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 r="onTap"+(n==="End"?"":n),i=o[r];i&&K.postRender(()=>i(t,_t(t)))}class tm extends Be{mount(){const{current:t}=this.node;t&&(this.unmount=_d(t,(n,o)=>(Ga(this.node,o,"Start"),(r,{success:i})=>Ga(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Wo=new WeakMap,qo=new WeakMap,nm=e=>{const t=Wo.get(e.target);t&&t(e)},om=e=>{e.forEach(nm)};function rm({root:e,...t}){const n=e||document;qo.has(n)||qo.set(n,{});const o=qo.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(om,{root:e,...t})),o[r]}function im(e,t,n){const o=rm(t);return Wo.set(e,n),o.observe(e),()=>{Wo.delete(e),o.unobserve(e)}}const sm={some:0,all:1};class am extends Be{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:r="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:sm[r]},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:d,onViewportLeave:u}=this.node.getProps(),h=c?d:u;h&&h(l)};return im(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(lm(t,n))&&this.startObserver()}unmount(){}}function lm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const cm={...Lh,...{inView:{Feature:am},tap:{Feature:tm},focus:{Feature:em},hover:{Feature:Qh}},...Jh,...{layout:{ProjectionNode:ga,MeasureLayout:Ha}}},De=Eh(cm,Dh),um={sm:g.css`
175
+ `),()=>{w.contains(b)&&w.removeChild(b)}},[t]),p.jsx(nh,{isPresent:t,childRef:i,sizeRef:s,children:Ue.cloneElement(e,{ref:c})})}const rh=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:r,presenceAffectsLayout:i,mode:s,anchorX:a,root:l})=>{const c=Fn(ih),d=m.useId();let u=!0,h=m.useMemo(()=>(u=!1,{id:d,initial:t,isPresent:n,custom:r,onExitComplete:f=>{c.set(f,!0);for(const v of c.values())if(!v)return;o&&o()},register:f=>(c.set(f,!1),()=>c.delete(f))}),[n,c,o]);return i&&u&&(h={...h}),m.useMemo(()=>{c.forEach((f,v)=>c.set(v,!1))},[n]),Ue.useEffect(()=>{!n&&!c.size&&o&&o()},[n]),s==="popLayout"&&(e=p.jsx(oh,{isPresent:n,anchorX:a,root:l,children:e})),p.jsx(Ut.Provider,{value:h,children:e})};function ih(){return new Map}function wa(e=!0){const t=m.useContext(Ut);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,i=m.useId();m.useEffect(()=>{if(e)return r(i)},[e]);const s=m.useCallback(()=>e&&o&&o(i),[i,o,e]);return!n&&o?[!1,s]:[!0]}const an=e=>e.key||"";function ba(e){const t=[];return m.Children.forEach(e,n=>{m.isValidElement(n)&&t.push(n)}),t}const Lt=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:i="sync",propagate:s=!1,anchorX:a="left",root:l})=>{const[c,d]=wa(s),u=m.useMemo(()=>ba(e),[e]),h=s&&!c?[]:u.map(an),f=m.useRef(!0),v=m.useRef(u),y=Fn(()=>new Map),b=m.useRef(new Set),[w,C]=m.useState(u),[x,P]=m.useState(u);Wr(()=>{f.current=!1,v.current=u;for(let V=0;V<x.length;V++){const $=an(x[V]);h.includes($)?(y.delete($),b.current.delete($)):y.get($)!==!0&&y.set($,!1)}},[x,h.length,h.join("-")]);const T=[];if(u!==w){let V=[...u];for(let $=0;$<x.length;$++){const A=x[$],I=an(A);h.includes(I)||(V.splice($,0,A),T.push(A))}return i==="wait"&&T.length&&(V=T),P(ba(V)),C(u),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:k}=m.useContext(Dn);return p.jsx(p.Fragment,{children:x.map(V=>{const $=an(V),A=s&&!c?!1:u===x||h.includes($),I=()=>{if(b.current.has($))return;if(b.current.add($),y.has($))y.set($,!0);else return;let B=!0;y.forEach(H=>{H||(B=!1)}),B&&(k?.(),P(v.current),s&&d?.(),o&&o())};return p.jsx(rh,{isPresent:A,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:i,root:l,onExitComplete:A?void 0:I,anchorX:a,children:V},$)})})},xa=m.createContext({strict:!1}),Sa={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"]};let Ca=!1;function sh(){if(Ca)return;const e={};for(const t in Sa)e[t]={isEnabled:n=>Sa[t].some(o=>!!n[o])};vs(e),Ca=!0}function Ta(){return sh(),Ud()}function ah(e){const t=Ta();for(const n in e)t[n]={...t[n],...e[n]};vs(t)}const lh=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 ln(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||lh.has(e)}let $a=e=>!ln(e);function ch(e){typeof e=="function"&&($a=t=>t.startsWith("on")?!ln(t):e(t))}try{ch(require("@emotion/is-prop-valid").default)}catch{}function uh(e,t,n){const o={};for(const r in e)r==="values"&&typeof e.values=="object"||($a(r)||n===!0&&ln(r)||!t&&!ln(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}const cn=m.createContext({});function dh(e,t){if(en(e)){const{initial:n,animate:o}=e;return{initial:n===!1||Dt(n)?n:void 0,animate:Dt(o)?o:void 0}}return e.inherit!==!1?t:{}}function fh(e){const{initial:t,animate:n}=dh(e,m.useContext(cn));return m.useMemo(()=>({initial:t,animate:n}),[Pa(t),Pa(n)])}function Pa(e){return Array.isArray(e)?e.join(" "):e}const zo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ka(e,t,n){for(const o in t)!ie(t[o])&&!Es(o,n)&&(e[o]=t[o])}function hh({transformTemplate:e},t){return m.useMemo(()=>{const n=zo();return Ao(n,t,e),Object.assign({},n.vars,n.style)},[t])}function mh(e,t){const n=e.style||{},o={};return ka(o,n,e),Object.assign(o,hh(e,t)),o}function ph(e,t){const n={},o=mh(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 Ma=()=>({...zo(),attrs:{}});function gh(e,t,n,o){const r=m.useMemo(()=>{const i=Ma();return Ds(i,t,As(o),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};ka(i,e.style,e),r.style={...i,...r.style}}return r}const vh=["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 Oo(e){return typeof e!="string"||e.includes("-")?!1:!!(vh.indexOf(e)>-1||/[A-Z]/u.test(e))}function yh(e,t,n,{latestValues:o},r,i=!1,s){const l=(s??Oo(e)?gh:ph)(t,o,r,e),c=uh(t,typeof e=="string",i),d=e!==m.Fragment?{...c,...l,ref:n}:{},{children:u}=t,h=m.useMemo(()=>ie(u)?u.get():u,[u]);return m.createElement(e,{...d,children:h})}function wh({scrapeMotionValuesFromProps:e,createRenderState:t},n,o,r){return{latestValues:bh(n,o,r,e),renderState:t()}}function bh(e,t,n,o){const r={},i=o(e,{});for(const h in i)r[h]=rn(i[h]);let{initial:s,animate:a}=e;const l=en(e),c=ps(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const u=d?a:s;if(u&&typeof u!="boolean"&&!Qt(u)){const h=Array.isArray(u)?u:[u];for(let f=0;f<h.length;f++){const v=vo(e,h[f]);if(v){const{transitionEnd:y,transition:b,...w}=v;for(const C in w){let x=w[C];if(Array.isArray(x)){const P=d?x.length-1:0;x=x[P]}x!==null&&(r[C]=x)}for(const C in y)r[C]=y[C]}}}return r}const Va=e=>(t,n)=>{const o=m.useContext(cn),r=m.useContext(Ut),i=()=>wh(e,t,o,r);return n?i():Fn(i)},xh=Va({scrapeMotionValuesFromProps:Lo,createRenderState:zo}),Sh=Va({scrapeMotionValuesFromProps:Is,createRenderState:Ma}),Ch=Symbol.for("motionComponentSymbol");function Th(e,t,n){const o=m.useRef(n);m.useInsertionEffect(()=>{o.current=n});const r=m.useRef(null);return m.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const s=o.current;if(typeof s=="function")if(i){const a=s(i);typeof a=="function"&&(r.current=a)}else r.current?(r.current(),r.current=null):s(i);else s&&(s.current=i)},[t])}const Ea=m.createContext({});function Rt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function $h(e,t,n,o,r,i){const{visualElement:s}=m.useContext(cn),a=m.useContext(xa),l=m.useContext(Ut),c=m.useContext(Bo).reducedMotion,d=m.useRef(null);o=o||a.renderer,!d.current&&o&&(d.current=o(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:i}));const u=d.current,h=m.useContext(Ea);u&&!u.projection&&r&&(u.type==="html"||u.type==="svg")&&Ph(d.current,n,r,h);const f=m.useRef(!1);m.useInsertionEffect(()=>{u&&f.current&&u.update(n,l)});const v=n[Wi],y=m.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return Wr(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),y.current&&u.animationState&&u.animationState.animateChanges())}),m.useEffect(()=>{u&&(!y.current&&u.animationState&&u.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),y.current=!1),u.enteringChildren=void 0)}),u}function Ph(e,t,n,o){const{layoutId:r,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Da(e.parent)),e.projection.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!s||a&&Rt(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:o,crossfade:d,layoutScroll:l,layoutRoot:c})}function Da(e){if(e)return e.options.allowProjection!==!1?e.projection:Da(e.parent)}function Ho(e,{forwardMotionProps:t=!1,type:n}={},o,r){o&&ah(o);const i=n?n==="svg":Oo(e),s=i?Sh:xh;function a(c,d){let u;const h={...m.useContext(Bo),...c,layoutId:kh(c)},{isStatic:f}=h,v=fh(c),y=s(c,f);if(!f&&Kr){Mh(h,o);const b=Vh(h);u=b.MeasureLayout,v.visualElement=$h(e,y,h,r,b.ProjectionNode,i)}return p.jsxs(cn.Provider,{value:v,children:[u&&v.visualElement?p.jsx(u,{visualElement:v.visualElement,...h}):null,yh(e,c,Th(y,v.visualElement,d),y,f,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=m.forwardRef(a);return l[Ch]=e,l}function kh({layoutId:e}){const t=m.useContext(Dn).id;return t&&e!==void 0?t+"-"+e:e}function Mh(e,t){const n=m.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?tt(!1,o,"lazy-strict-mode"):Ve(!1,o,"lazy-strict-mode")}}function Vh(e){const t=Ta(),{drag:n,layout:o}=t;if(!n&&!o)return{};const r={...n,...o};return{MeasureLayout:n?.isEnabled(e)||o?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Eh(e,t){if(typeof Proxy>"u")return Ho;const n=new Map,o=(i,s)=>Ho(i,s,e,t),r=(i,s)=>(process.env.NODE_ENV!=="production"&&Nn(!1,"motion() is deprecated. Use motion.create() instead."),o(i,s));return new Proxy(r,{get:(i,s)=>s==="create"?o:(n.has(s)||n.set(s,Ho(s,void 0,e,t)),n.get(s))})}const Dh=(e,t)=>t.isSVG??Oo(e)?new cf(t):new nf(t,{allowProjection:e!==m.Fragment});class Fh extends Be{constructor(t){super(t),t.animationState||(t.animationState=mf(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Qt(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 Ah=0;class Ih extends Be{constructor(){super(...arguments),this.id=Ah++}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 r=this.node.animationState.setActive("exit",!t);n&&!t&&r.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 Lh={animation:{Feature:Fh},exit:{Feature:Ih}};function _t(e){return{point:{x:e.pageX,y:e.pageY}}}const Rh=e=>t=>$o(t)&&e(t,_t(t));function Nt(e,t,n,o){return It(e,t,Rh(n),o)}const Fa=({current:e})=>e?e.ownerDocument.defaultView:null,Aa=(e,t)=>Math.abs(e-t);function _h(e,t){const n=Aa(e.x,t.x),o=Aa(e.y,t.y);return Math.sqrt(n**2+o**2)}const Ia=new Set(["auto","scroll"]);class La{constructor(t,n,{transformPagePoint:o,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Go(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,y=_h(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!y)return;const{point:b}=f,{timestamp:w}=oe;this.history.push({...b,timestamp:w});const{onStart:C,onMove:x}=this.handlers;v||(C&&C(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,v)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=jo(v,this.transformPagePoint),K.update(this.updatePoint,!0)},this.handlePointerUp=(f,v)=>{this.end();const{onEnd:y,onSessionEnd:b,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=Go(f.type==="pointercancel"?this.lastMoveEventInfo:jo(v,this.transformPagePoint),this.history);this.startEvent&&y&&y(f,C),b&&b(f,C)},!$o(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=o,this.distanceThreshold=s,this.contextWindow=r||window;const l=_t(t),c=jo(l,this.transformPagePoint),{point:d}=c,{timestamp:u}=oe;this.history=[{...d,timestamp:u}];const{onSessionStart:h}=n;h&&h(t,Go(c,this.history)),this.removeListeners=Ct(Nt(this.contextWindow,"pointermove",this.handlePointerMove),Nt(this.contextWindow,"pointerup",this.handlePointerUp),Nt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const o=getComputedStyle(n);(Ia.has(o.overflowX)||Ia.has(o.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const o=t===window,r=o?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:r.x-n.x,y:r.y-n.y};i.x===0&&i.y===0||(o?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,r),K.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Le(this.updatePoint)}}function jo(e,t){return t?{point:t(e.point)}:e}function Ra(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Go({point:e},t){return{point:e,delta:Ra(e,_a(t)),offset:Ra(e,Nh(t)),velocity:Bh(t,.1)}}function Nh(e){return e[0]}function _a(e){return e[e.length-1]}function Bh(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=_a(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>Pe(t)));)n--;if(!o)return{x:0,y:0};const i=ge(r.timestamp-o.timestamp);if(i===0)return{x:0,y:0};const s={x:(r.x-o.x)/i,y:(r.y-o.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function zh(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?Y(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?Y(n,e,o.max):Math.min(e,n)),e}function Na(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 Oh(e,{top:t,left:n,bottom:o,right:r}){return{x:Na(e.x,n,r),y:Na(e.y,t,o)}}function Ba(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 Hh(e,t){return{x:Ba(e.x,t.x),y:Ba(e.y,t.y)}}function jh(e,t){let n=.5;const o=ce(e),r=ce(t);return r>o?n=Tt(t.min,t.max-o,e.min):o>r&&(n=Tt(e.min,e.max-r,t.min)),$e(0,1,n)}function Gh(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 Uo=.35;function Uh(e=Uo){return e===!1?e=0:e===!0&&(e=Uo),{x:za(e,"left","right"),y:za(e,"top","bottom")}}function za(e,t,n){return{min:Oa(e,t),max:Oa(e,n)}}function Oa(e,t){return typeof e=="number"?e:e[t]||0}const Kh=new WeakMap;class Wh{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=ee(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:o}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=u=>{n?(this.stopAnimation(),this.snapToCursor(_t(u).point)):this.pauseAnimation()},s=(u,h)=>{this.stopAnimation();const{drag:f,dragPropagation:v,onDragStart:y}=this.getProps();if(f&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ad(f),!this.openDragLock))return;this.latestPointerEvent=u,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ve(w=>{let C=this.getAxisMotionValue(w).get()||0;if(ke.test(C)){const{projection:x}=this.visualElement;if(x&&x.layout){const P=x.layout.layoutBox[w];P&&(C=ce(P)*(parseFloat(C)/100))}}this.originPoint[w]=C}),y&&K.postRender(()=>y(u,h)),wo(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(u,h)=>{this.latestPointerEvent=u,this.latestPanInfo=h;const{dragPropagation:f,dragDirectionLock:v,onDirectionLock:y,onDrag:b}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:w}=h;if(v&&this.currentDirection===null){this.currentDirection=qh(w),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,w),this.updateAxis("y",h.point,w),this.visualElement.render(),b&&b(u,h)},l=(u,h)=>{this.latestPointerEvent=u,this.latestPanInfo=h,this.stop(u,h),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>ve(u=>this.getAnimationState(u)==="paused"&&this.getAxisMotionValue(u).animation?.play()),{dragSnapToOrigin:d}=this.getProps();this.panSession=new La(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:o,contextWindow:Fa(this.visualElement),element:this.visualElement.current})}stop(t,n){const o=t||this.latestPointerEvent,r=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!o)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&K.postRender(()=>a(o,r))}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:r}=this.getProps();if(!o||!un(t,r,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(s=zh(s,this.constraints[t],this.elastic[t])),i.set(s)}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,r=this.constraints;t&&Rt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=Oh(o.layoutBox,t):this.constraints=!1,this.elastic=Uh(n),r!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&ve(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=Gh(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Rt(t))return!1;const o=t.current;Ve(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:r}=this.visualElement;if(!r||!r.layout)return!1;const i=Xd(o,r.root,this.visualElement.getTransformPagePoint());let s=Hh(r.layout.layoutBox,i);if(n){const a=n(Wd(s));this.hasMutatedConstraints=!!a,a&&(s=ws(a))}return s}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:r,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ve(d=>{if(!un(d,n,this.currentDirection))return;let u=l&&l[d]||{};s&&(u={min:0,max:0});const h=r?200:1e6,f=r?40:1e7,v={type:"inertia",velocity:o?t[d]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(d,v)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return wo(this.visualElement,t),o.start(go(t,o,0,n,this.visualElement,!1))}stopAnimation(){ve(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ve(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(),r=o[n];return r||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){ve(n=>{const{drag:o}=this.getProps();if(!un(n,o,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(n);if(r&&r.layout){const{min:s,max:a}=r.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-Y(s,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!Rt(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};ve(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();r[s]=jh({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),ve(s=>{if(!un(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(Y(l,c,r[s]))})}addListeners(){if(!this.visualElement.current)return;Kh.set(this.visualElement,this);const t=this.visualElement.current,n=Nt(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&!ls(l.target)&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();Rt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),K.read(o);const s=It(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ve(d=>{const u=this.getAxisMotionValue(d);u&&(this.originPoint[d]+=l[d].translate,u.set(u.get()+l[d].translate))}),this.visualElement.render())}));return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:s=Uo,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:r,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function un(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function qh(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Yh extends Be{constructor(t){super(t),this.removeGroupControls=pe,this.removeListeners=pe,this.controls=new Wh(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pe}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ha=e=>(t,n)=>{e&&K.postRender(()=>e(t,n))};class Xh extends Be{constructor(){super(...arguments),this.removePointerDownListener=pe}onPointerDown(t){this.session=new La(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Fa(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ha(t),onStart:Ha(n),onMove:o,onEnd:(i,s)=>{delete this.session,r&&K.postRender(()=>r(i,s))}}}mount(){this.removePointerDownListener=Nt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ko=!1;class Zh extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:r}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),o&&o.register&&r&&o.register(i),Ko&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),sn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:r,isPresent:i}=this.props,{projection:s}=o;return s&&(s.isPresent=i,Ko=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==i?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||K.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),To.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:r}=t;Ko=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ja(e){const[t,n]=wa(),o=m.useContext(Dn);return p.jsx(Zh,{...e,layoutGroup:o,switchLayoutGroup:m.useContext(Ea),isPresent:t,safeToRemove:n})}const Jh={pan:{Feature:Xh},drag:{Feature:Yh,ProjectionNode:va,MeasureLayout:ja}};function Ga(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,i=o[r];i&&K.postRender(()=>i(t,_t(t)))}class Qh extends Be{mount(){const{current:t}=this.node;t&&(this.unmount=Id(t,(n,o)=>(Ga(this.node,o,"Start"),r=>Ga(this.node,r,"End"))))}unmount(){}}class em extends Be{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=Ct(It(this.node.current,"focus",()=>this.onFocus()),It(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ua(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 r="onTap"+(n==="End"?"":n),i=o[r];i&&K.postRender(()=>i(t,_t(t)))}class tm extends Be{mount(){const{current:t}=this.node;t&&(this.unmount=_d(t,(n,o)=>(Ua(this.node,o,"Start"),(r,{success:i})=>Ua(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Wo=new WeakMap,qo=new WeakMap,nm=e=>{const t=Wo.get(e.target);t&&t(e)},om=e=>{e.forEach(nm)};function rm({root:e,...t}){const n=e||document;qo.has(n)||qo.set(n,{});const o=qo.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(om,{root:e,...t})),o[r]}function im(e,t,n){const o=rm(t);return Wo.set(e,n),o.observe(e),()=>{Wo.delete(e),o.unobserve(e)}}const sm={some:0,all:1};class am extends Be{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:r="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:sm[r]},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:d,onViewportLeave:u}=this.node.getProps(),h=c?d:u;h&&h(l)};return im(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(lm(t,n))&&this.startObserver()}unmount(){}}function lm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const cm={...Lh,...{inView:{Feature:am},tap:{Feature:tm},focus:{Feature:em},hover:{Feature:Qh}},...Jh,...{layout:{ProjectionNode:va,MeasureLayout:ja}}},De=Eh(cm,Dh),um={sm:g.css`
176
176
  width: 1.25rem;
177
177
  height: 1.25rem;
178
178
  `,md:g.css`
@@ -184,7 +184,7 @@
184
184
  `,xl:g.css`
185
185
  width: 4rem;
186
186
  height: 4rem;
187
- `},Ua={primary:g.css`
187
+ `},Ka={primary:g.css`
188
188
  color: var(--color-main-blue-primary);
189
189
  `,orange:g.css`
190
190
  color: var(--color-main-orange-primary);
@@ -196,7 +196,7 @@
196
196
  position: relative;
197
197
  display: block;
198
198
  ${({$size:e="md"})=>um[e]}
199
- ${({$color:e="primary"})=>Ua[e]}
199
+ ${({$color:e="primary"})=>Ka[e]}
200
200
  user-select: none;
201
201
  `,fm=g.div`
202
202
  display: flex;
@@ -212,7 +212,7 @@
212
212
  width: 100%;
213
213
  `,mm=g(De.p)`
214
214
  ${D[16]}
215
- ${({$color:e="primary"})=>Ua[e]}
215
+ ${({$color:e="primary"})=>Ka[e]}
216
216
  margin: 0;
217
217
  `,pm=({variant:e,title:t})=>p.jsxs(De.svg,{width:"100%",height:"100%",viewBox:"0 0 50 50",style:{position:"absolute",top:0,left:0,zIndex:1,padding:"2.1px 2.5px 2.5px 0px"},animate:e==="rotate"?{rotate:[0,360]}:{scale:[1,.7,1]},transition:e==="rotate"?{repeat:1/0,duration:2,ease:"linear"}:{repeat:1/0,duration:2,ease:"easeInOut"},children:[p.jsx("g",{transform:"scale(0.15) translate(-10, -1)",children:p.jsx("path",{fill:"currentColor",d:`M67.251411,286.749390
218
218
  C42.999393,262.534088 27.711603,233.886490 21.140957,200.638245
@@ -418,7 +418,7 @@
418
418
  `,Dm=({orientation:e="horizontal",color:t="var(--color-dark-300)",length:n,thickness:o,className:r=""})=>p.jsx(Em,{$orientation:e,$color:t,$length:n,$thickness:o,className:r,role:"separator","aria-orientation":e}),Fm=g.span`
419
419
  ${({$size:e})=>D[e]}
420
420
  color: ${({$color:e})=>e||"var(--color-main-grey)"};
421
- `,ht=({children:e,size:t=16,color:n,className:o,style:r})=>p.jsx(Fm,{$size:t,$color:n,className:o,style:r,children:e});function Am(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Im=e=>{switch(e){case"success":return _m;case"info":return Bm;case"warning":return Nm;case"error":return zm;default:return null}},Lm=Array(12).fill(0),Rm=({visible:e,className:t})=>m.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},m.createElement("div",{className:"sonner-spinner"},Lm.map((n,o)=>m.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),_m=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Nm=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Bm=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),zm=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Om=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},m.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),m.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Hm=()=>{const[e,t]=m.useState(document.hidden);return m.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Yo=1;class jm{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:o,...r}=t,i=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Yo++,s=this.toasts.find(l=>l.id===i),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(l=>l.id===i?(this.publish({...l,...t,id:i,title:o}),{...l,...t,id:i,dismissible:a,title:o}):l):this.addToast({title:o,...r,dismissible:a,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(o=>o({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let o;n.loading!==void 0&&(o=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let i=o!==void 0,s;const a=r.then(async c=>{if(s=["resolve",c],m.isValidElement(c))i=!1,this.create({id:o,type:"default",message:c});else if(Um(c)&&!c.ok){i=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,v=typeof u=="object"&&!m.isValidElement(u)?u:{message:u};this.create({id:o,type:"error",description:h,...v})}else if(c instanceof Error){i=!1;const u=typeof n.error=="function"?await n.error(c):n.error,h=typeof n.description=="function"?await n.description(c):n.description,v=typeof u=="object"&&!m.isValidElement(u)?u:{message:u};this.create({id:o,type:"error",description:h,...v})}else if(n.success!==void 0){i=!1;const u=typeof n.success=="function"?await n.success(c):n.success,h=typeof n.description=="function"?await n.description(c):n.description,v=typeof u=="object"&&!m.isValidElement(u)?u:{message:u};this.create({id:o,type:"success",description:h,...v})}}).catch(async c=>{if(s=["reject",c],n.error!==void 0){i=!1;const d=typeof n.error=="function"?await n.error(c):n.error,u=typeof n.description=="function"?await n.description(c):n.description,f=typeof d=="object"&&!m.isValidElement(d)?d:{message:d};this.create({id:o,type:"error",description:u,...f})}}).finally(()=>{i&&(this.dismiss(o),o=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,d)=>a.then(()=>s[0]==="reject"?d(s[1]):c(s[1])).catch(d));return typeof o!="string"&&typeof o!="number"?{unwrap:l}:Object.assign(o,{unwrap:l})},this.custom=(t,n)=>{const o=n?.id||Yo++;return this.create({jsx:t(o),id:o,...n}),o},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const de=new jm,Gm=(e,t)=>{const n=t?.id||Yo++;return de.addToast({title:e,...t,id:n}),n},Um=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Km=Gm,Wm=()=>de.toasts,qm=()=>de.getActiveToasts(),Ym=Object.assign(Km,{success:de.success,info:de.info,warning:de.warning,error:de.error,custom:de.custom,message:de.message,promise:de.promise,dismiss:de.dismiss,loading:de.loading},{getHistory:Wm,getToasts:qm});Am("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function fn(e){return e.label!==void 0}const Xm=3,Zm="24px",Jm="16px",Ka=4e3,Qm=356,ep=14,tp=45,np=200;function Me(...e){return e.filter(Boolean).join(" ")}function op(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}const rp=e=>{var t,n,o,r,i,s,a,l,c;const{invert:d,toast:u,unstyled:h,interacting:f,setHeights:v,visibleToasts:y,heights:b,index:w,toasts:C,expanded:x,removeToast:P,defaultRichColors:T,closeButton:k,style:V,cancelButtonStyle:$,actionButtonStyle:A,className:I="",descriptionClassName:B="",duration:H,position:M,gap:F,expandByDefault:z,classNames:N,icons:L,closeButtonAriaLabel:j="Close toast"}=e,[te,J]=m.useState(null),[ue,gt]=m.useState(null),[G,Z]=m.useState(!1),[W,ye]=m.useState(!1),[vt,q]=m.useState(!1),[yt,Tn]=m.useState(!1),[$n,wt]=m.useState(!1),[Fy,Br]=m.useState(0),[Ay,wc]=m.useState(0),Gt=m.useRef(u.duration||H||Ka),bc=m.useRef(null),Ae=m.useRef(null),Iy=w===0,Ly=w+1<=y,he=u.type,bt=u.dismissible!==!1,Ry=u.className||"",_y=u.descriptionClassName||"",Pn=m.useMemo(()=>b.findIndex(O=>O.toastId===u.id)||0,[b,u.id]),Ny=m.useMemo(()=>{var O;return(O=u.closeButton)!=null?O:k},[u.closeButton,k]),xc=m.useMemo(()=>u.duration||H||Ka,[u.duration,H]),zr=m.useRef(0),xt=m.useRef(0),Sc=m.useRef(0),St=m.useRef(null),[By,zy]=M.split("-"),Cc=m.useMemo(()=>b.reduce((O,ne,ae)=>ae>=Pn?O:O+ne.height,0),[b,Pn]),Tc=Hm(),Oy=u.invert||d,Or=he==="loading";xt.current=m.useMemo(()=>Pn*F+Cc,[Pn,Cc]),m.useEffect(()=>{Gt.current=xc},[xc]),m.useEffect(()=>{Z(!0)},[]),m.useEffect(()=>{const O=Ae.current;if(O){const ne=O.getBoundingClientRect().height;return wc(ne),v(ae=>[{toastId:u.id,height:ne,position:u.position},...ae]),()=>v(ae=>ae.filter(me=>me.toastId!==u.id))}},[v,u.id]),m.useLayoutEffect(()=>{if(!G)return;const O=Ae.current,ne=O.style.height;O.style.height="auto";const ae=O.getBoundingClientRect().height;O.style.height=ne,wc(ae),v(me=>me.find(re=>re.toastId===u.id)?me.map(re=>re.toastId===u.id?{...re,height:ae}:re):[{toastId:u.id,height:ae,position:u.position},...me])},[G,u.title,u.description,v,u.id,u.jsx,u.action,u.cancel]);const Ge=m.useCallback(()=>{ye(!0),Br(xt.current),v(O=>O.filter(ne=>ne.toastId!==u.id)),setTimeout(()=>{P(u)},np)},[u,P,v,xt]);m.useEffect(()=>{if(u.promise&&he==="loading"||u.duration===1/0||u.type==="loading")return;let O;return x||f||Tc?(()=>{if(Sc.current<zr.current){const me=new Date().getTime()-zr.current;Gt.current=Gt.current-me}Sc.current=new Date().getTime()})():Gt.current!==1/0&&(zr.current=new Date().getTime(),O=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),Ge()},Gt.current)),()=>clearTimeout(O)},[x,f,u,he,Tc,Ge]),m.useEffect(()=>{u.delete&&(Ge(),u.onDismiss==null||u.onDismiss.call(u,u))},[Ge,u.delete]);function Hy(){var O;if(L?.loading){var ne;return m.createElement("div",{className:Me(N?.loader,u==null||(ne=u.classNames)==null?void 0:ne.loader,"sonner-loader"),"data-visible":he==="loading"},L.loading)}return m.createElement(Rm,{className:Me(N?.loader,u==null||(O=u.classNames)==null?void 0:O.loader),visible:he==="loading"})}const jy=u.icon||L?.[he]||Im(he);var $c,Pc;return m.createElement("li",{tabIndex:0,ref:Ae,className:Me(I,Ry,N?.toast,u==null||(t=u.classNames)==null?void 0:t.toast,N?.default,N?.[he],u==null||(n=u.classNames)==null?void 0:n[he]),"data-sonner-toast":"","data-rich-colors":($c=u.richColors)!=null?$c:T,"data-styled":!(u.jsx||u.unstyled||h),"data-mounted":G,"data-promise":!!u.promise,"data-swiped":$n,"data-removed":W,"data-visible":Ly,"data-y-position":By,"data-x-position":zy,"data-index":w,"data-front":Iy,"data-swiping":vt,"data-dismissible":bt,"data-type":he,"data-invert":Oy,"data-swipe-out":yt,"data-swipe-direction":ue,"data-expanded":!!(x||z&&G),"data-testid":u.testId,style:{"--index":w,"--toasts-before":w,"--z-index":C.length-w,"--offset":`${W?Fy:xt.current}px`,"--initial-height":z?"auto":`${Ay}px`,...V,...u.style},onDragEnd:()=>{q(!1),J(null),St.current=null},onPointerDown:O=>{O.button!==2&&(Or||!bt||(bc.current=new Date,Br(xt.current),O.target.setPointerCapture(O.pointerId),O.target.tagName!=="BUTTON"&&(q(!0),St.current={x:O.clientX,y:O.clientY})))},onPointerUp:()=>{var O,ne,ae;if(yt||!bt)return;St.current=null;const me=Number(((O=Ae.current)==null?void 0:O.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),kn=Number(((ne=Ae.current)==null?void 0:ne.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),re=new Date().getTime()-((ae=bc.current)==null?void 0:ae.getTime()),we=te==="x"?me:kn,Mn=Math.abs(we)/re;if(Math.abs(we)>=tp||Mn>.11){Br(xt.current),u.onDismiss==null||u.onDismiss.call(u,u),gt(te==="x"?me>0?"right":"left":kn>0?"down":"up"),Ge(),Tn(!0);return}else{var Ce,Te;(Ce=Ae.current)==null||Ce.style.setProperty("--swipe-amount-x","0px"),(Te=Ae.current)==null||Te.style.setProperty("--swipe-amount-y","0px")}wt(!1),q(!1),J(null)},onPointerMove:O=>{var ne,ae,me;if(!St.current||!bt||((ne=window.getSelection())==null?void 0:ne.toString().length)>0)return;const re=O.clientY-St.current.y,we=O.clientX-St.current.x;var Mn;const Ce=(Mn=e.swipeDirections)!=null?Mn:op(M);!te&&(Math.abs(we)>1||Math.abs(re)>1)&&J(Math.abs(we)>Math.abs(re)?"x":"y");let Te={x:0,y:0};const kc=et=>1/(1.5+Math.abs(et)/20);if(te==="y"){if(Ce.includes("top")||Ce.includes("bottom"))if(Ce.includes("top")&&re<0||Ce.includes("bottom")&&re>0)Te.y=re;else{const et=re*kc(re);Te.y=Math.abs(et)<Math.abs(re)?et:re}}else if(te==="x"&&(Ce.includes("left")||Ce.includes("right")))if(Ce.includes("left")&&we<0||Ce.includes("right")&&we>0)Te.x=we;else{const et=we*kc(we);Te.x=Math.abs(et)<Math.abs(we)?et:we}(Math.abs(Te.x)>0||Math.abs(Te.y)>0)&&wt(!0),(ae=Ae.current)==null||ae.style.setProperty("--swipe-amount-x",`${Te.x}px`),(me=Ae.current)==null||me.style.setProperty("--swipe-amount-y",`${Te.y}px`)}},Ny&&!u.jsx&&he!=="loading"?m.createElement("button",{"aria-label":j,"data-disabled":Or,"data-close-button":!0,onClick:Or||!bt?()=>{}:()=>{Ge(),u.onDismiss==null||u.onDismiss.call(u,u)},className:Me(N?.closeButton,u==null||(o=u.classNames)==null?void 0:o.closeButton)},(Pc=L?.close)!=null?Pc:Om):null,(he||u.icon||u.promise)&&u.icon!==null&&(L?.[he]!==null||u.icon)?m.createElement("div",{"data-icon":"",className:Me(N?.icon,u==null||(r=u.classNames)==null?void 0:r.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||Hy():null,u.type!=="loading"?jy:null):null,m.createElement("div",{"data-content":"",className:Me(N?.content,u==null||(i=u.classNames)==null?void 0:i.content)},m.createElement("div",{"data-title":"",className:Me(N?.title,u==null||(s=u.classNames)==null?void 0:s.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?m.createElement("div",{"data-description":"",className:Me(B,_y,N?.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),m.isValidElement(u.cancel)?u.cancel:u.cancel&&fn(u.cancel)?m.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||$,onClick:O=>{fn(u.cancel)&&bt&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,O),Ge())},className:Me(N?.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,m.isValidElement(u.action)?u.action:u.action&&fn(u.action)?m.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||A,onClick:O=>{fn(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,O),!O.defaultPrevented&&Ge())},className:Me(N?.actionButton,u==null||(c=u.classNames)==null?void 0:c.actionButton)},u.action.label):null)};function Wa(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function ip(e,t){const n={};return[e,t].forEach((o,r)=>{const i=r===1,s=i?"--mobile-offset":"--offset",a=i?Jm:Zm;function l(c){["top","right","bottom","left"].forEach(d=>{n[`${s}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(c=>{o[c]===void 0?n[`${s}-${c}`]=a:n[`${s}-${c}`]=typeof o[c]=="number"?`${o[c]}px`:o[c]}):l(a)}),n}const sp=m.forwardRef(function(t,n){const{id:o,invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:a,closeButton:l,className:c,offset:d,mobileOffset:u,theme:h="light",richColors:f,duration:v,style:y,visibleToasts:b=Xm,toastOptions:w,dir:C=Wa(),gap:x=ep,icons:P,containerAriaLabel:T="Notifications"}=t,[k,V]=m.useState([]),$=m.useMemo(()=>o?k.filter(G=>G.toasterId===o):k.filter(G=>!G.toasterId),[k,o]),A=m.useMemo(()=>Array.from(new Set([i].concat($.filter(G=>G.position).map(G=>G.position)))),[$,i]),[I,B]=m.useState([]),[H,M]=m.useState(!1),[F,z]=m.useState(!1),[N,L]=m.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=m.useRef(null),te=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),J=m.useRef(null),ue=m.useRef(!1),gt=m.useCallback(G=>{V(Z=>{var W;return(W=Z.find(ye=>ye.id===G.id))!=null&&W.delete||de.dismiss(G.id),Z.filter(({id:ye})=>ye!==G.id)})},[]);return m.useEffect(()=>de.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{V(Z=>Z.map(W=>W.id===G.id?{...W,delete:!0}:W))});return}setTimeout(()=>{Vn.flushSync(()=>{V(Z=>{const W=Z.findIndex(ye=>ye.id===G.id);return W!==-1?[...Z.slice(0,W),{...Z[W],...G},...Z.slice(W+1)]:[G,...Z]})})})}),[k]),m.useEffect(()=>{if(h!=="system"){L(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:Z})=>{L(Z?"dark":"light")})}catch{G.addListener(({matches:W})=>{try{L(W?"dark":"light")}catch(ye){console.error(ye)}})}},[h]),m.useEffect(()=>{k.length<=1&&M(!1)},[k]),m.useEffect(()=>{const G=Z=>{var W;if(s.every(q=>Z[q]||Z.code===q)){var vt;M(!0),(vt=j.current)==null||vt.focus()}Z.code==="Escape"&&(document.activeElement===j.current||(W=j.current)!=null&&W.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[s]),m.useEffect(()=>{if(j.current)return()=>{J.current&&(J.current.focus({preventScroll:!0}),J.current=null,ue.current=!1)}},[j.current]),m.createElement("section",{ref:n,"aria-label":`${T} ${te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((G,Z)=>{var W;const[ye,vt]=G.split("-");return $.length?m.createElement("ol",{key:G,dir:C==="auto"?Wa():C,tabIndex:-1,ref:j,className:c,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":ye,"data-x-position":vt,style:{"--front-toast-height":`${((W=I[0])==null?void 0:W.height)||0}px`,"--width":`${Qm}px`,"--gap":`${x}px`,...y,...ip(d,u)},onBlur:q=>{ue.current&&!q.currentTarget.contains(q.relatedTarget)&&(ue.current=!1,J.current&&(J.current.focus({preventScroll:!0}),J.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||ue.current||(ue.current=!0,J.current=q.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{F||M(!1)},onDragEnd:()=>M(!1),onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||z(!0)},onPointerUp:()=>z(!1)},$.filter(q=>!q.position&&Z===0||q.position===G).map((q,yt)=>{var Tn,$n;return m.createElement(rp,{key:q.id,icons:P,index:yt,toast:q,defaultRichColors:f,duration:(Tn=w?.duration)!=null?Tn:v,className:w?.className,descriptionClassName:w?.descriptionClassName,invert:r,visibleToasts:b,closeButton:($n=w?.closeButton)!=null?$n:l,interacting:F,position:G,style:w?.style,unstyled:w?.unstyled,classNames:w?.classNames,cancelButtonStyle:w?.cancelButtonStyle,actionButtonStyle:w?.actionButtonStyle,closeButtonAriaLabel:w?.closeButtonAriaLabel,removeToast:gt,toasts:$.filter(wt=>wt.position==q.position),heights:I.filter(wt=>wt.position==q.position),setHeights:B,expandByDefault:a,gap:x,expanded:H,swipeDirections:t.swipeDirections})})):null}))}),ap=({spinnerColor:e="orange",...t})=>p.jsx(sp,{position:"bottom-center",theme:"light",richColors:!0,visibleToasts:3,closeButton:!0,duration:3e3,mobileOffset:{bottom:"16px"},toastOptions:{className:"my-toast"},icons:{loading:p.jsx(dn,{color:e,size:"sm"})},...t}),lp={elevated:g.css`
421
+ `,ht=({children:e,size:t=16,color:n,className:o,style:r})=>p.jsx(Fm,{$size:t,$color:n,className:o,style:r,children:e});function Am(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Im=e=>{switch(e){case"success":return _m;case"info":return Bm;case"warning":return Nm;case"error":return zm;default:return null}},Lm=Array(12).fill(0),Rm=({visible:e,className:t})=>m.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},m.createElement("div",{className:"sonner-spinner"},Lm.map((n,o)=>m.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),_m=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Nm=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Bm=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),zm=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},m.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Om=m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},m.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),m.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Hm=()=>{const[e,t]=m.useState(document.hidden);return m.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Yo=1;class jm{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:o,...r}=t,i=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Yo++,s=this.toasts.find(l=>l.id===i),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(l=>l.id===i?(this.publish({...l,...t,id:i,title:o}),{...l,...t,id:i,dismissible:a,title:o}):l):this.addToast({title:o,...r,dismissible:a,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(o=>o({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let o;n.loading!==void 0&&(o=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let i=o!==void 0,s;const a=r.then(async c=>{if(s=["resolve",c],m.isValidElement(c))i=!1,this.create({id:o,type:"default",message:c});else if(Um(c)&&!c.ok){i=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,v=typeof u=="object"&&!m.isValidElement(u)?u:{message:u};this.create({id:o,type:"error",description:h,...v})}else if(c instanceof Error){i=!1;const u=typeof n.error=="function"?await n.error(c):n.error,h=typeof n.description=="function"?await n.description(c):n.description,v=typeof u=="object"&&!m.isValidElement(u)?u:{message:u};this.create({id:o,type:"error",description:h,...v})}else if(n.success!==void 0){i=!1;const u=typeof n.success=="function"?await n.success(c):n.success,h=typeof n.description=="function"?await n.description(c):n.description,v=typeof u=="object"&&!m.isValidElement(u)?u:{message:u};this.create({id:o,type:"success",description:h,...v})}}).catch(async c=>{if(s=["reject",c],n.error!==void 0){i=!1;const d=typeof n.error=="function"?await n.error(c):n.error,u=typeof n.description=="function"?await n.description(c):n.description,f=typeof d=="object"&&!m.isValidElement(d)?d:{message:d};this.create({id:o,type:"error",description:u,...f})}}).finally(()=>{i&&(this.dismiss(o),o=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,d)=>a.then(()=>s[0]==="reject"?d(s[1]):c(s[1])).catch(d));return typeof o!="string"&&typeof o!="number"?{unwrap:l}:Object.assign(o,{unwrap:l})},this.custom=(t,n)=>{const o=n?.id||Yo++;return this.create({jsx:t(o),id:o,...n}),o},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const de=new jm,Gm=(e,t)=>{const n=t?.id||Yo++;return de.addToast({title:e,...t,id:n}),n},Um=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Km=Gm,Wm=()=>de.toasts,qm=()=>de.getActiveToasts(),Ym=Object.assign(Km,{success:de.success,info:de.info,warning:de.warning,error:de.error,custom:de.custom,message:de.message,promise:de.promise,dismiss:de.dismiss,loading:de.loading},{getHistory:Wm,getToasts:qm});Am("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function fn(e){return e.label!==void 0}const Xm=3,Zm="24px",Jm="16px",Wa=4e3,Qm=356,ep=14,tp=45,np=200;function Me(...e){return e.filter(Boolean).join(" ")}function op(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}const rp=e=>{var t,n,o,r,i,s,a,l,c;const{invert:d,toast:u,unstyled:h,interacting:f,setHeights:v,visibleToasts:y,heights:b,index:w,toasts:C,expanded:x,removeToast:P,defaultRichColors:T,closeButton:k,style:V,cancelButtonStyle:$,actionButtonStyle:A,className:I="",descriptionClassName:B="",duration:H,position:M,gap:F,expandByDefault:z,classNames:N,icons:L,closeButtonAriaLabel:j="Close toast"}=e,[te,J]=m.useState(null),[ue,gt]=m.useState(null),[G,Z]=m.useState(!1),[W,ye]=m.useState(!1),[vt,q]=m.useState(!1),[yt,Tn]=m.useState(!1),[$n,wt]=m.useState(!1),[Ay,zr]=m.useState(0),[Iy,wc]=m.useState(0),Gt=m.useRef(u.duration||H||Wa),bc=m.useRef(null),Ae=m.useRef(null),Ly=w===0,Ry=w+1<=y,he=u.type,bt=u.dismissible!==!1,_y=u.className||"",Ny=u.descriptionClassName||"",Pn=m.useMemo(()=>b.findIndex(O=>O.toastId===u.id)||0,[b,u.id]),By=m.useMemo(()=>{var O;return(O=u.closeButton)!=null?O:k},[u.closeButton,k]),xc=m.useMemo(()=>u.duration||H||Wa,[u.duration,H]),Or=m.useRef(0),xt=m.useRef(0),Sc=m.useRef(0),St=m.useRef(null),[zy,Oy]=M.split("-"),Cc=m.useMemo(()=>b.reduce((O,ne,ae)=>ae>=Pn?O:O+ne.height,0),[b,Pn]),Tc=Hm(),Hy=u.invert||d,Hr=he==="loading";xt.current=m.useMemo(()=>Pn*F+Cc,[Pn,Cc]),m.useEffect(()=>{Gt.current=xc},[xc]),m.useEffect(()=>{Z(!0)},[]),m.useEffect(()=>{const O=Ae.current;if(O){const ne=O.getBoundingClientRect().height;return wc(ne),v(ae=>[{toastId:u.id,height:ne,position:u.position},...ae]),()=>v(ae=>ae.filter(me=>me.toastId!==u.id))}},[v,u.id]),m.useLayoutEffect(()=>{if(!G)return;const O=Ae.current,ne=O.style.height;O.style.height="auto";const ae=O.getBoundingClientRect().height;O.style.height=ne,wc(ae),v(me=>me.find(re=>re.toastId===u.id)?me.map(re=>re.toastId===u.id?{...re,height:ae}:re):[{toastId:u.id,height:ae,position:u.position},...me])},[G,u.title,u.description,v,u.id,u.jsx,u.action,u.cancel]);const Ge=m.useCallback(()=>{ye(!0),zr(xt.current),v(O=>O.filter(ne=>ne.toastId!==u.id)),setTimeout(()=>{P(u)},np)},[u,P,v,xt]);m.useEffect(()=>{if(u.promise&&he==="loading"||u.duration===1/0||u.type==="loading")return;let O;return x||f||Tc?(()=>{if(Sc.current<Or.current){const me=new Date().getTime()-Or.current;Gt.current=Gt.current-me}Sc.current=new Date().getTime()})():Gt.current!==1/0&&(Or.current=new Date().getTime(),O=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),Ge()},Gt.current)),()=>clearTimeout(O)},[x,f,u,he,Tc,Ge]),m.useEffect(()=>{u.delete&&(Ge(),u.onDismiss==null||u.onDismiss.call(u,u))},[Ge,u.delete]);function jy(){var O;if(L?.loading){var ne;return m.createElement("div",{className:Me(N?.loader,u==null||(ne=u.classNames)==null?void 0:ne.loader,"sonner-loader"),"data-visible":he==="loading"},L.loading)}return m.createElement(Rm,{className:Me(N?.loader,u==null||(O=u.classNames)==null?void 0:O.loader),visible:he==="loading"})}const Gy=u.icon||L?.[he]||Im(he);var $c,Pc;return m.createElement("li",{tabIndex:0,ref:Ae,className:Me(I,_y,N?.toast,u==null||(t=u.classNames)==null?void 0:t.toast,N?.default,N?.[he],u==null||(n=u.classNames)==null?void 0:n[he]),"data-sonner-toast":"","data-rich-colors":($c=u.richColors)!=null?$c:T,"data-styled":!(u.jsx||u.unstyled||h),"data-mounted":G,"data-promise":!!u.promise,"data-swiped":$n,"data-removed":W,"data-visible":Ry,"data-y-position":zy,"data-x-position":Oy,"data-index":w,"data-front":Ly,"data-swiping":vt,"data-dismissible":bt,"data-type":he,"data-invert":Hy,"data-swipe-out":yt,"data-swipe-direction":ue,"data-expanded":!!(x||z&&G),"data-testid":u.testId,style:{"--index":w,"--toasts-before":w,"--z-index":C.length-w,"--offset":`${W?Ay:xt.current}px`,"--initial-height":z?"auto":`${Iy}px`,...V,...u.style},onDragEnd:()=>{q(!1),J(null),St.current=null},onPointerDown:O=>{O.button!==2&&(Hr||!bt||(bc.current=new Date,zr(xt.current),O.target.setPointerCapture(O.pointerId),O.target.tagName!=="BUTTON"&&(q(!0),St.current={x:O.clientX,y:O.clientY})))},onPointerUp:()=>{var O,ne,ae;if(yt||!bt)return;St.current=null;const me=Number(((O=Ae.current)==null?void 0:O.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),kn=Number(((ne=Ae.current)==null?void 0:ne.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),re=new Date().getTime()-((ae=bc.current)==null?void 0:ae.getTime()),we=te==="x"?me:kn,Mn=Math.abs(we)/re;if(Math.abs(we)>=tp||Mn>.11){zr(xt.current),u.onDismiss==null||u.onDismiss.call(u,u),gt(te==="x"?me>0?"right":"left":kn>0?"down":"up"),Ge(),Tn(!0);return}else{var Ce,Te;(Ce=Ae.current)==null||Ce.style.setProperty("--swipe-amount-x","0px"),(Te=Ae.current)==null||Te.style.setProperty("--swipe-amount-y","0px")}wt(!1),q(!1),J(null)},onPointerMove:O=>{var ne,ae,me;if(!St.current||!bt||((ne=window.getSelection())==null?void 0:ne.toString().length)>0)return;const re=O.clientY-St.current.y,we=O.clientX-St.current.x;var Mn;const Ce=(Mn=e.swipeDirections)!=null?Mn:op(M);!te&&(Math.abs(we)>1||Math.abs(re)>1)&&J(Math.abs(we)>Math.abs(re)?"x":"y");let Te={x:0,y:0};const kc=et=>1/(1.5+Math.abs(et)/20);if(te==="y"){if(Ce.includes("top")||Ce.includes("bottom"))if(Ce.includes("top")&&re<0||Ce.includes("bottom")&&re>0)Te.y=re;else{const et=re*kc(re);Te.y=Math.abs(et)<Math.abs(re)?et:re}}else if(te==="x"&&(Ce.includes("left")||Ce.includes("right")))if(Ce.includes("left")&&we<0||Ce.includes("right")&&we>0)Te.x=we;else{const et=we*kc(we);Te.x=Math.abs(et)<Math.abs(we)?et:we}(Math.abs(Te.x)>0||Math.abs(Te.y)>0)&&wt(!0),(ae=Ae.current)==null||ae.style.setProperty("--swipe-amount-x",`${Te.x}px`),(me=Ae.current)==null||me.style.setProperty("--swipe-amount-y",`${Te.y}px`)}},By&&!u.jsx&&he!=="loading"?m.createElement("button",{"aria-label":j,"data-disabled":Hr,"data-close-button":!0,onClick:Hr||!bt?()=>{}:()=>{Ge(),u.onDismiss==null||u.onDismiss.call(u,u)},className:Me(N?.closeButton,u==null||(o=u.classNames)==null?void 0:o.closeButton)},(Pc=L?.close)!=null?Pc:Om):null,(he||u.icon||u.promise)&&u.icon!==null&&(L?.[he]!==null||u.icon)?m.createElement("div",{"data-icon":"",className:Me(N?.icon,u==null||(r=u.classNames)==null?void 0:r.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||jy():null,u.type!=="loading"?Gy:null):null,m.createElement("div",{"data-content":"",className:Me(N?.content,u==null||(i=u.classNames)==null?void 0:i.content)},m.createElement("div",{"data-title":"",className:Me(N?.title,u==null||(s=u.classNames)==null?void 0:s.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?m.createElement("div",{"data-description":"",className:Me(B,Ny,N?.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),m.isValidElement(u.cancel)?u.cancel:u.cancel&&fn(u.cancel)?m.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||$,onClick:O=>{fn(u.cancel)&&bt&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,O),Ge())},className:Me(N?.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,m.isValidElement(u.action)?u.action:u.action&&fn(u.action)?m.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||A,onClick:O=>{fn(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,O),!O.defaultPrevented&&Ge())},className:Me(N?.actionButton,u==null||(c=u.classNames)==null?void 0:c.actionButton)},u.action.label):null)};function qa(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function ip(e,t){const n={};return[e,t].forEach((o,r)=>{const i=r===1,s=i?"--mobile-offset":"--offset",a=i?Jm:Zm;function l(c){["top","right","bottom","left"].forEach(d=>{n[`${s}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(c=>{o[c]===void 0?n[`${s}-${c}`]=a:n[`${s}-${c}`]=typeof o[c]=="number"?`${o[c]}px`:o[c]}):l(a)}),n}const sp=m.forwardRef(function(t,n){const{id:o,invert:r,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:a,closeButton:l,className:c,offset:d,mobileOffset:u,theme:h="light",richColors:f,duration:v,style:y,visibleToasts:b=Xm,toastOptions:w,dir:C=qa(),gap:x=ep,icons:P,containerAriaLabel:T="Notifications"}=t,[k,V]=m.useState([]),$=m.useMemo(()=>o?k.filter(G=>G.toasterId===o):k.filter(G=>!G.toasterId),[k,o]),A=m.useMemo(()=>Array.from(new Set([i].concat($.filter(G=>G.position).map(G=>G.position)))),[$,i]),[I,B]=m.useState([]),[H,M]=m.useState(!1),[F,z]=m.useState(!1),[N,L]=m.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=m.useRef(null),te=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),J=m.useRef(null),ue=m.useRef(!1),gt=m.useCallback(G=>{V(Z=>{var W;return(W=Z.find(ye=>ye.id===G.id))!=null&&W.delete||de.dismiss(G.id),Z.filter(({id:ye})=>ye!==G.id)})},[]);return m.useEffect(()=>de.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{V(Z=>Z.map(W=>W.id===G.id?{...W,delete:!0}:W))});return}setTimeout(()=>{Vn.flushSync(()=>{V(Z=>{const W=Z.findIndex(ye=>ye.id===G.id);return W!==-1?[...Z.slice(0,W),{...Z[W],...G},...Z.slice(W+1)]:[G,...Z]})})})}),[k]),m.useEffect(()=>{if(h!=="system"){L(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:Z})=>{L(Z?"dark":"light")})}catch{G.addListener(({matches:W})=>{try{L(W?"dark":"light")}catch(ye){console.error(ye)}})}},[h]),m.useEffect(()=>{k.length<=1&&M(!1)},[k]),m.useEffect(()=>{const G=Z=>{var W;if(s.every(q=>Z[q]||Z.code===q)){var vt;M(!0),(vt=j.current)==null||vt.focus()}Z.code==="Escape"&&(document.activeElement===j.current||(W=j.current)!=null&&W.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[s]),m.useEffect(()=>{if(j.current)return()=>{J.current&&(J.current.focus({preventScroll:!0}),J.current=null,ue.current=!1)}},[j.current]),m.createElement("section",{ref:n,"aria-label":`${T} ${te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((G,Z)=>{var W;const[ye,vt]=G.split("-");return $.length?m.createElement("ol",{key:G,dir:C==="auto"?qa():C,tabIndex:-1,ref:j,className:c,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":ye,"data-x-position":vt,style:{"--front-toast-height":`${((W=I[0])==null?void 0:W.height)||0}px`,"--width":`${Qm}px`,"--gap":`${x}px`,...y,...ip(d,u)},onBlur:q=>{ue.current&&!q.currentTarget.contains(q.relatedTarget)&&(ue.current=!1,J.current&&(J.current.focus({preventScroll:!0}),J.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||ue.current||(ue.current=!0,J.current=q.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{F||M(!1)},onDragEnd:()=>M(!1),onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||z(!0)},onPointerUp:()=>z(!1)},$.filter(q=>!q.position&&Z===0||q.position===G).map((q,yt)=>{var Tn,$n;return m.createElement(rp,{key:q.id,icons:P,index:yt,toast:q,defaultRichColors:f,duration:(Tn=w?.duration)!=null?Tn:v,className:w?.className,descriptionClassName:w?.descriptionClassName,invert:r,visibleToasts:b,closeButton:($n=w?.closeButton)!=null?$n:l,interacting:F,position:G,style:w?.style,unstyled:w?.unstyled,classNames:w?.classNames,cancelButtonStyle:w?.cancelButtonStyle,actionButtonStyle:w?.actionButtonStyle,closeButtonAriaLabel:w?.closeButtonAriaLabel,removeToast:gt,toasts:$.filter(wt=>wt.position==q.position),heights:I.filter(wt=>wt.position==q.position),setHeights:B,expandByDefault:a,gap:x,expanded:H,swipeDirections:t.swipeDirections})})):null}))}),ap=({spinnerColor:e="orange",...t})=>p.jsx(sp,{position:"bottom-center",theme:"light",richColors:!0,visibleToasts:3,closeButton:!0,duration:3e3,mobileOffset:{bottom:"16px"},toastOptions:{className:"my-toast"},icons:{loading:p.jsx(dn,{color:e,size:"sm"})},...t}),lp={elevated:g.css`
422
422
  background-color: var(--color-main-white);
423
423
  box-shadow: var(--shadow-black-card);
424
424
  border: none;
@@ -444,24 +444,38 @@
444
444
  padding: 1.25rem;
445
445
  gap: 0.5rem;
446
446
  `},up=g.css`
447
+ position: relative;
447
448
  transition:
448
- box-shadow 0.3s ease-out,
449
- background-color 0.3s ease-out,
450
- outline-color 0.3s ease-out;
451
- border-bottom: 2px solid transparent;
449
+ transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
450
+ box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
451
+ background-color 0.2s ease-out;
452
+ cursor: pointer;
453
+
454
+ &::after {
455
+ content: '';
456
+ position: absolute;
457
+ inset: 0;
458
+ border-radius: inherit;
459
+ border: 2px solid var(--color-main-blue-primary);
460
+ opacity: 0;
461
+ transition: opacity 0.2s ease-out;
462
+ }
452
463
 
453
464
  &:hover {
454
- cursor: pointer;
455
- box-shadow: var(--shadow-hover-black-card);
456
- background-color: var(--color-main-alternative-secondary);
465
+ transform: translateY(-2px);
466
+ box-shadow:
467
+ 0 8px 16px rgba(0, 0, 0, 0.08),
468
+ 0 2px 4px rgba(0, 0, 0, 0.04);
457
469
  }
458
470
 
459
471
  &:active {
460
- border-bottom: 2px solid var(--color-main-blue-primary);
472
+ transform: translateY(0);
473
+ transition-duration: 0.1s;
461
474
  }
462
475
 
463
- &:focus-visible {
464
- outline-color: var(--color-main-blue-primary);
476
+ &:focus-visible::after {
477
+ opacity: 1;
478
+ outline: none;
465
479
  }
466
480
  `,dp=g.css`
467
481
  opacity: 0.6;
@@ -480,6 +494,7 @@
480
494
  height: fit-content;
481
495
  outline: 2px solid transparent;
482
496
  outline-offset: -1px;
497
+
483
498
  ${({$variant:e})=>lp[e]}
484
499
  ${({$clickable:e})=>e&&up}
485
500
  ${({$disabled:e})=>e&&dp}
@@ -535,7 +550,7 @@
535
550
  `,Tp=g.css`
536
551
  cursor: not-allowed;
537
552
  opacity: 0.6;
538
- `,hn=({children:e,htmlFor:t,className:n,required:o,disabled:r=!1,size:i="md",...s})=>p.jsxs(Cp,{className:n,htmlFor:t,$htmlFor:t,$size:i,$disabled:r,...s,children:[e,o&&p.jsx("span",{style:{color:"var(--color-main-warning-state)"},children:"*"})]}),qa=["text","email","password","number","tel","url","date","datetime-local","time","search","textarea","select","checkbox","radio","pin"],Ya=e=>qa.includes(e),ze=e=>e.map(t=>({name:t.name||"",label:t.label||"",type:t.type&&Ya(t.type)?t.type:"text",placeholder:t.placeholder,required:t.required||!1,disabled:t.disabled||!1,options:t.options||[],validation:t.validation,checkboxLabel:t.checkboxLabel,radioName:t.radioName,pinLength:t.pinLength||6,pinType:t.pinType||"number",rows:t.rows||4,size:t.size||"md",inputClassName:t.inputClassName,labelClassName:t.labelClassName,messageErrorClassName:t.messageErrorClassName})),$p=e=>e.map(t=>({value:t.value,label:t.label})),Pp={text:(e,t,n)=>ze([{name:e,label:t,type:"text",...n}])[0],email:(e,t,n)=>ze([{name:e,label:t,type:"email",required:!0,...n}])[0],password:(e,t,n)=>ze([{name:e,label:t,type:"password",required:!0,validation:{pattern:"^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d@$!%*?&]{8,}$",custom:o=>{if(o&&o.length<8)return"Password must be at least 8 characters long"}},...n}])[0],select:(e,t,n,o)=>ze([{name:e,label:t,type:"select",options:n,required:!0,...o}])[0],checkbox:(e,t,n)=>ze([{name:e,label:t,type:"checkbox",checkboxLabel:t,...n}])[0],radio:(e,t,n,o)=>ze([{name:e,label:t,type:"radio",options:n,radioName:e,required:!0,...o}])[0],pin:(e,t,n=6,o)=>ze([{name:e,label:t,type:"pin",pinLength:n,pinType:"number",required:!0,validation:{custom:r=>{if(r&&r.length!==n)return`${t} must be ${n} digits long`}},...o}])[0]},kp=(e,t,n,o,r,i,s,a)=>{const{field:l,...c}=t,d={...l,...c,size:c.size,hasError:c.hasError,disabled:c.disabled,placeholder:c.placeholder,className:c.className};switch(e){case"textarea":return{component:"textarea",props:{...d,rows:s?.rows||4}};case"select":return{component:"select",props:{...d,options:n?.options||[],onOptionSelect:n?.onOptionSelect,placeholder:t.placeholder||"Selecciona una opción"}};case"checkbox":return{component:"checkbox",props:{...d,label:o?.checkboxLabel||o?.label,checked:t.field.value||o?.checked||!1}};case"radio":return{component:"radio",props:{...d,options:r?.options||[],radioName:r?.radioName||t.name,onRadioChange:r?.onRadioChange}};case"pin":return{component:"pin",props:{...d,length:i?.pinLength||6,type:i?.pinType||"number",onComplete:i?.onPinComplete}};case"password":return{component:"password",props:{...d,type:"password"}};case"search":return{component:"search",props:{...d,onSearch:a?.onSearch}};default:return{component:"base",props:{...d,type:t.type||e||"text"}}}},Ze=g.css`
553
+ `,hn=({children:e,htmlFor:t,className:n,required:o,disabled:r=!1,size:i="md",...s})=>p.jsxs(Cp,{className:n,htmlFor:t,$htmlFor:t,$size:i,$disabled:r,...s,children:[e,o&&p.jsx("span",{style:{color:"var(--color-main-warning-state)"},children:"*"})]}),Ya=["text","email","password","number","tel","url","date","datetime-local","time","search","textarea","select","checkbox","radio","pin"],Xa=e=>Ya.includes(e),ze=e=>e.map(t=>({name:t.name||"",label:t.label||"",type:t.type&&Xa(t.type)?t.type:"text",placeholder:t.placeholder,required:t.required||!1,disabled:t.disabled||!1,options:t.options||[],validation:t.validation,checkboxLabel:t.checkboxLabel,radioName:t.radioName,pinLength:t.pinLength||6,pinType:t.pinType||"number",rows:t.rows||4,size:t.size||"md",inputClassName:t.inputClassName,labelClassName:t.labelClassName,messageErrorClassName:t.messageErrorClassName})),$p=e=>e.map(t=>({value:t.value,label:t.label})),Pp={text:(e,t,n)=>ze([{name:e,label:t,type:"text",...n}])[0],email:(e,t,n)=>ze([{name:e,label:t,type:"email",required:!0,...n}])[0],password:(e,t,n)=>ze([{name:e,label:t,type:"password",required:!0,validation:{pattern:"^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d@$!%*?&]{8,}$",custom:o=>{if(o&&o.length<8)return"Password must be at least 8 characters long"}},...n}])[0],select:(e,t,n,o)=>ze([{name:e,label:t,type:"select",options:n,required:!0,...o}])[0],checkbox:(e,t,n)=>ze([{name:e,label:t,type:"checkbox",checkboxLabel:t,...n}])[0],radio:(e,t,n,o)=>ze([{name:e,label:t,type:"radio",options:n,radioName:e,required:!0,...o}])[0],pin:(e,t,n=6,o)=>ze([{name:e,label:t,type:"pin",pinLength:n,pinType:"number",required:!0,validation:{custom:r=>{if(r&&r.length!==n)return`${t} must be ${n} digits long`}},...o}])[0]},kp=(e,t,n,o,r,i,s,a)=>{const{field:l,...c}=t,d={...l,...c,size:c.size,hasError:c.hasError,disabled:c.disabled,placeholder:c.placeholder,className:c.className};switch(e){case"textarea":return{component:"textarea",props:{...d,rows:s?.rows||4}};case"select":return{component:"select",props:{...d,options:n?.options||[],onOptionSelect:n?.onOptionSelect,placeholder:t.placeholder||"Selecciona una opción"}};case"checkbox":return{component:"checkbox",props:{...d,label:o?.checkboxLabel||o?.label,checked:t.field.value||o?.checked||!1}};case"radio":return{component:"radio",props:{...d,options:r?.options||[],radioName:r?.radioName||t.name,onRadioChange:r?.onRadioChange}};case"pin":return{component:"pin",props:{...d,length:i?.pinLength||6,type:i?.pinType||"number",onComplete:i?.onPinComplete}};case"password":return{component:"password",props:{...d,type:"password"}};case"search":return{component:"search",props:{...d,onSearch:a?.onSearch}};default:return{component:"base",props:{...d,type:t.type||e||"text"}}}},Ze=g.css`
539
554
  display: flex;
540
555
  justify-content: space-between;
541
556
  align-items: center;
@@ -593,7 +608,7 @@
593
608
  border: var(--border-input-disabled) !important;
594
609
  cursor: not-allowed;
595
610
  opacity: 0.6;
596
- `,Xa=g.css`
611
+ `,Za=g.css`
597
612
  border: none;
598
613
  border-top: 0;
599
614
  border-right: 0;
@@ -646,10 +661,10 @@
646
661
  ${({$size:e})=>Bt[e]}
647
662
  ${({$hasError:e})=>e&&Je}
648
663
  ${({$disabled:e})=>e&&Oe}
649
- ${({$isFlushed:e})=>e&&Xa}
664
+ ${({$isFlushed:e})=>e&&Za}
650
665
  `,Vp=g.input`
651
666
  ${mn}
652
- `,Zo=m.forwardRef(({size:e="md",hasError:t=!1,disabled:n=!1,type:o="text",flushed:r=!1,leftIcon:i,rightIcon:s,iconSize:a="md",iconColor:l="currentColor",className:c,...d},u)=>p.jsxs(Mp,{$size:e,$hasError:t,className:c,$isFlushed:r,children:[i&&p.jsx(U,{component:i,size:a,color:n?"var(--color-dark-200)":l}),p.jsx(Vp,{ref:u,type:o,$hasError:t,disabled:n,...d}),s&&p.jsx(U,{component:s,size:a,color:n?"var(--color-dark-200)":l})]}));Zo.displayName="BaseInput";const Ep=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z"})),Za=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"})),Dp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})),Fp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M11.9498 7.94975L10.5356 9.36396L8.00079 6.828L8.00004 20H6.00004L6.00079 6.828L3.46451 9.36396L2.05029 7.94975L7.00004 3L11.9498 7.94975ZM21.9498 16.0503L17 21L12.0503 16.0503L13.4645 14.636L16.0008 17.172L16 4H18L18.0008 17.172L20.5356 14.636L21.9498 16.0503Z"})),Ja=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z"})),Ap=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M10 6V8H5V19H16V14H18V20C18 20.5523 17.5523 21 17 21H4C3.44772 21 3 20.5523 3 20V7C3 6.44772 3.44772 6 4 6H10ZM21 3V11H19L18.9999 6.413L11.2071 14.2071L9.79289 12.7929L17.5849 5H13V3H21Z"})),Ip=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z"})),Lp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M17.8827 19.2968C16.1814 20.3755 14.1638 21.0002 12.0003 21.0002C6.60812 21.0002 2.12215 17.1204 1.18164 12.0002C1.61832 9.62282 2.81932 7.5129 4.52047 5.93457L1.39366 2.80777L2.80788 1.39355L22.6069 21.1925L21.1927 22.6068L17.8827 19.2968ZM5.9356 7.3497C4.60673 8.56015 3.6378 10.1672 3.22278 12.0002C4.14022 16.0521 7.7646 19.0002 12.0003 19.0002C13.5997 19.0002 15.112 18.5798 16.4243 17.8384L14.396 15.8101C13.7023 16.2472 12.8808 16.5002 12.0003 16.5002C9.51498 16.5002 7.50026 14.4854 7.50026 12.0002C7.50026 11.1196 7.75317 10.2981 8.19031 9.60442L5.9356 7.3497ZM12.9139 14.328L9.67246 11.0866C9.5613 11.3696 9.50026 11.6777 9.50026 12.0002C9.50026 13.3809 10.6196 14.5002 12.0003 14.5002C12.3227 14.5002 12.6309 14.4391 12.9139 14.328ZM20.8068 16.5925L19.376 15.1617C20.0319 14.2268 20.5154 13.1586 20.7777 12.0002C19.8603 7.94818 16.2359 5.00016 12.0003 5.00016C11.1544 5.00016 10.3329 5.11773 9.55249 5.33818L7.97446 3.76015C9.22127 3.26959 10.5793 3.00016 12.0003 3.00016C17.3924 3.00016 21.8784 6.87992 22.8189 12.0002C22.5067 13.6998 21.8038 15.2628 20.8068 16.5925ZM11.7229 7.50857C11.8146 7.50299 11.9071 7.50016 12.0003 7.50016C14.4855 7.50016 16.5003 9.51488 16.5003 12.0002C16.5003 12.0933 16.4974 12.1858 16.4919 12.2775L11.7229 7.50857Z"})),Rp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M21 4V6H20L14 15V22H10V15L4 6H3V4H21Z"})),_p=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M21 4V6H20L15 13.5V22H9V13.5L4 6H3V4H21ZM6.4037 6L11 12.8944V20H13V12.8944L17.5963 6H6.4037Z"})),Np=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M5 22C4.44772 22 4 21.5523 4 21V3C4 2.44772 4.44772 2 5 2H19C19.5523 2 20 2.44772 20 3V6H18V4H6V20H18V18H20V21C20 21.5523 19.5523 22 19 22H5ZM18 16V13H11V11H18V8L23 12L18 16Z"})),Qa=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M3 4H21V6H3V4ZM3 11H21V13H3V11ZM3 18H21V20H3V18Z"})),Bp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M20 17H22V19H2V17H4V10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10V17ZM9 21H15V23H9V21Z"})),zp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M20 17H22V19H2V17H4V10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10V17ZM18 17V10C18 6.68629 15.3137 4 12 4C8.68629 4 6 6.68629 6 10V17H18ZM9 21H15V23H9V21Z"})),el=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z"})),Op=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M12 12.5858L16.2426 16.8284L14.8284 18.2426L13 16.415V22H11V16.413L9.17157 18.2426L7.75736 16.8284L12 12.5858ZM12 2C15.5934 2 18.5544 4.70761 18.9541 8.19395C21.2858 8.83154 23 10.9656 23 13.5C23 16.3688 20.8036 18.7246 18.0006 18.9776L18.0009 16.9644C19.6966 16.7214 21 15.2629 21 13.5C21 11.567 19.433 10 17.5 10C17.2912 10 17.0867 10.0183 16.8887 10.054C16.9616 9.7142 17 9.36158 17 9C17 6.23858 14.7614 4 12 4C9.23858 4 7 6.23858 7 9C7 9.36158 7.03838 9.7142 7.11205 10.0533C6.91331 10.0183 6.70879 10 6.5 10C4.567 10 3 11.567 3 13.5C3 15.2003 4.21241 16.6174 5.81986 16.934L6.00005 16.9646L6.00039 18.9776C3.19696 18.7252 1 16.3692 1 13.5C1 10.9656 2.71424 8.83154 5.04648 8.19411C5.44561 4.70761 8.40661 2 12 2Z"})),Hp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M20 22H18V20C18 18.3431 16.6569 17 15 17H9C7.34315 17 6 18.3431 6 20V22H4V20C4 17.2386 6.23858 15 9 15H15C17.7614 15 20 17.2386 20 20V22ZM12 13C8.68629 13 6 10.3137 6 7C6 3.68629 8.68629 1 12 1C15.3137 1 18 3.68629 18 7C18 10.3137 15.3137 13 12 13ZM12 11C14.2091 11 16 9.20914 16 7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7C8 9.20914 9.79086 11 12 11Z"})),jp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M22.0003 13.0001L22.0004 11.0002L5.82845 11.0002L9.77817 7.05044L8.36396 5.63623L2 12.0002L8.36396 18.3642L9.77817 16.9499L5.8284 13.0002L22.0003 13.0001Z"})),Gp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M1.99974 13.0001L1.9996 11.0002L18.1715 11.0002L14.2218 7.05044L15.636 5.63623L22 12.0002L15.636 18.3642L14.2218 16.9499L18.1716 13.0002L1.99974 13.0001Z"})),Up=g.div`
667
+ `,Zo=m.forwardRef(({size:e="md",hasError:t=!1,disabled:n=!1,type:o="text",flushed:r=!1,leftIcon:i,rightIcon:s,iconSize:a="md",iconColor:l="currentColor",className:c,...d},u)=>p.jsxs(Mp,{$size:e,$hasError:t,className:c,$isFlushed:r,children:[i&&p.jsx(U,{component:i,size:a,color:n?"var(--color-dark-200)":l}),p.jsx(Vp,{ref:u,type:o,$hasError:t,disabled:n,...d}),s&&p.jsx(U,{component:s,size:a,color:n?"var(--color-dark-200)":l})]}));Zo.displayName="BaseInput";const Ep=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z"})),Ja=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"})),Dp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})),Fp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M11.9498 7.94975L10.5356 9.36396L8.00079 6.828L8.00004 20H6.00004L6.00079 6.828L3.46451 9.36396L2.05029 7.94975L7.00004 3L11.9498 7.94975ZM21.9498 16.0503L17 21L12.0503 16.0503L13.4645 14.636L16.0008 17.172L16 4H18L18.0008 17.172L20.5356 14.636L21.9498 16.0503Z"})),Qa=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z"})),Ap=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M10 6V8H5V19H16V14H18V20C18 20.5523 17.5523 21 17 21H4C3.44772 21 3 20.5523 3 20V7C3 6.44772 3.44772 6 4 6H10ZM21 3V11H19L18.9999 6.413L11.2071 14.2071L9.79289 12.7929L17.5849 5H13V3H21Z"})),Ip=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z"})),Lp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M17.8827 19.2968C16.1814 20.3755 14.1638 21.0002 12.0003 21.0002C6.60812 21.0002 2.12215 17.1204 1.18164 12.0002C1.61832 9.62282 2.81932 7.5129 4.52047 5.93457L1.39366 2.80777L2.80788 1.39355L22.6069 21.1925L21.1927 22.6068L17.8827 19.2968ZM5.9356 7.3497C4.60673 8.56015 3.6378 10.1672 3.22278 12.0002C4.14022 16.0521 7.7646 19.0002 12.0003 19.0002C13.5997 19.0002 15.112 18.5798 16.4243 17.8384L14.396 15.8101C13.7023 16.2472 12.8808 16.5002 12.0003 16.5002C9.51498 16.5002 7.50026 14.4854 7.50026 12.0002C7.50026 11.1196 7.75317 10.2981 8.19031 9.60442L5.9356 7.3497ZM12.9139 14.328L9.67246 11.0866C9.5613 11.3696 9.50026 11.6777 9.50026 12.0002C9.50026 13.3809 10.6196 14.5002 12.0003 14.5002C12.3227 14.5002 12.6309 14.4391 12.9139 14.328ZM20.8068 16.5925L19.376 15.1617C20.0319 14.2268 20.5154 13.1586 20.7777 12.0002C19.8603 7.94818 16.2359 5.00016 12.0003 5.00016C11.1544 5.00016 10.3329 5.11773 9.55249 5.33818L7.97446 3.76015C9.22127 3.26959 10.5793 3.00016 12.0003 3.00016C17.3924 3.00016 21.8784 6.87992 22.8189 12.0002C22.5067 13.6998 21.8038 15.2628 20.8068 16.5925ZM11.7229 7.50857C11.8146 7.50299 11.9071 7.50016 12.0003 7.50016C14.4855 7.50016 16.5003 9.51488 16.5003 12.0002C16.5003 12.0933 16.4974 12.1858 16.4919 12.2775L11.7229 7.50857Z"})),Rp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M21 4V6H20L14 15V22H10V15L4 6H3V4H21Z"})),_p=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M21 4V6H20L15 13.5V22H9V13.5L4 6H3V4H21ZM6.4037 6L11 12.8944V20H13V12.8944L17.5963 6H6.4037Z"})),Np=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M5 22C4.44772 22 4 21.5523 4 21V3C4 2.44772 4.44772 2 5 2H19C19.5523 2 20 2.44772 20 3V6H18V4H6V20H18V18H20V21C20 21.5523 19.5523 22 19 22H5ZM18 16V13H11V11H18V8L23 12L18 16Z"})),el=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M3 4H21V6H3V4ZM3 11H21V13H3V11ZM3 18H21V20H3V18Z"})),Bp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M20 17H22V19H2V17H4V10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10V17ZM9 21H15V23H9V21Z"})),zp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M20 17H22V19H2V17H4V10C4 5.58172 7.58172 2 12 2C16.4183 2 20 5.58172 20 10V17ZM18 17V10C18 6.68629 15.3137 4 12 4C8.68629 4 6 6.68629 6 10V17H18ZM9 21H15V23H9V21Z"})),tl=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z"})),Op=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M12 12.5858L16.2426 16.8284L14.8284 18.2426L13 16.415V22H11V16.413L9.17157 18.2426L7.75736 16.8284L12 12.5858ZM12 2C15.5934 2 18.5544 4.70761 18.9541 8.19395C21.2858 8.83154 23 10.9656 23 13.5C23 16.3688 20.8036 18.7246 18.0006 18.9776L18.0009 16.9644C19.6966 16.7214 21 15.2629 21 13.5C21 11.567 19.433 10 17.5 10C17.2912 10 17.0867 10.0183 16.8887 10.054C16.9616 9.7142 17 9.36158 17 9C17 6.23858 14.7614 4 12 4C9.23858 4 7 6.23858 7 9C7 9.36158 7.03838 9.7142 7.11205 10.0533C6.91331 10.0183 6.70879 10 6.5 10C4.567 10 3 11.567 3 13.5C3 15.2003 4.21241 16.6174 5.81986 16.934L6.00005 16.9646L6.00039 18.9776C3.19696 18.7252 1 16.3692 1 13.5C1 10.9656 2.71424 8.83154 5.04648 8.19411C5.44561 4.70761 8.40661 2 12 2Z"})),Hp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M20 22H18V20C18 18.3431 16.6569 17 15 17H9C7.34315 17 6 18.3431 6 20V22H4V20C4 17.2386 6.23858 15 9 15H15C17.7614 15 20 17.2386 20 20V22ZM12 13C8.68629 13 6 10.3137 6 7C6 3.68629 8.68629 1 12 1C15.3137 1 18 3.68629 18 7C18 10.3137 15.3137 13 12 13ZM12 11C14.2091 11 16 9.20914 16 7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7C8 9.20914 9.79086 11 12 11Z"})),jp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M22.0003 13.0001L22.0004 11.0002L5.82845 11.0002L9.77817 7.05044L8.36396 5.63623L2 12.0002L8.36396 18.3642L9.77817 16.9499L5.8284 13.0002L22.0003 13.0001Z"})),Gp=({color:e="currentColor",size:t=24,className:n,...o})=>m.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...o,className:"remixicon "+(n||"")},m.createElement("path",{d:"M1.99974 13.0001L1.9996 11.0002L18.1715 11.0002L14.2218 7.05044L15.636 5.63623L22 12.0002L15.636 18.3642L14.2218 16.9499L18.1716 13.0002L1.99974 13.0001Z"})),Up=g.div`
653
668
  ${Ze}
654
669
  ${({$size:e})=>Bt[e??"md"]}
655
670
  ${({$hasError:e})=>e&&Je}
@@ -660,7 +675,7 @@
660
675
  `,Wp=g.span`
661
676
  ${pn}
662
677
  cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
663
- `,tl=({size:e="md",leftIcon:t,iconSize:n="sm",iconColor:o="currentColor",placeholder:r="Contraseña...",hasError:i=!1,disabled:s=!1,className:a,...l})=>{const[c,d]=m.useState(!1),u=()=>d(h=>!h);return p.jsxs(Up,{$size:e,$hasError:i,$disabled:s,className:a,children:[t&&p.jsx(U,{component:t,size:n,color:s?"var(--color-dark-200)":o}),p.jsx(Kp,{type:c?"text":"password",placeholder:r,disabled:s,...l}),p.jsx(Wp,{$disabled:s,onClick:s?void 0:u,children:p.jsx(U,{component:c?Lp:Ip,size:n,color:s?"var(--color-dark-200)":o})})]})},nl=(e,t)=>{if(!t.trim())return e;const n=t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return e.filter(o=>o.label.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").includes(n))},Jo=e=>{const t=e.findIndex(n=>!n.disabled);return t!==-1?t:0},qp=e=>{for(let t=e.length-1;t>=0;t--)if(!e[t].disabled)return t;return e.length-1},Qo=(e,t,n)=>{let o=e;do o=(o+t+n.length)%n.length;while(n[o]?.disabled&&o!==e);return o},Yp=(e,t)=>({target:{value:String(e),name:t},currentTarget:{value:String(e),name:t}}),Xp=(e,t)=>{if(t>=0&&e.current){const n=e.current.children[t];n&&n.scrollIntoView({block:"nearest",behavior:"smooth"})}},Zp=(e,t)=>{if(typeof e=="string"||typeof e=="number"){const n=t.findIndex(o=>o.value===e);if(n!==-1&&!t[n]?.disabled)return n}return Jo(t)},Jp=({options:e,value:t,name:n,disabled:o=!1,onChange:r,onOptionSelect:i,searchable:s=!1,clearSearchOnSelect:a=!0})=>{const l=m.useRef(null),c=m.useRef(null),d=m.useRef(null),u=m.useRef(null),h=m.useRef(null),f=m.useRef(!1),v=m.useId(),[y,b]=m.useState(!1),[w,C]=m.useState(-1),[x,P]=m.useState(""),T=e.find(M=>M.value===t),k=m.useMemo(()=>s?nl(e,x):e,[e,x,s]);m.useEffect(()=>{y&&(s&&h.current?h.current.focus():c.current&&c.current.focus(),C(Zp(t,k)))},[y,k,t,s]),m.useEffect(()=>{Xp(d,w)},[w]),m.useEffect(()=>{if(!y)return;const M=F=>{l.current&&(l.current.contains(F.target)||b(!1))};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[y]),m.useEffect(()=>{y?f.current=!0:f.current&&requestAnimationFrame(()=>{u.current?.focus()})},[y]);const V=M=>{M.disabled||(i?.(M),r&&r(Yp(M.value,n)),a&&P(""),b(!1),C(-1))};return{open:y,activeIndex:w,selected:T,searchQuery:x,filteredOptions:k,containerRef:l,menuRef:c,menuContentRef:d,buttonRef:u,inputRef:h,id:v,setOpen:b,setActiveIndex:C,setSearchQuery:P,commitSelection:V,handleKeyDownButton:M=>{o||(M.key==="ArrowDown"||M.key==="ArrowUp"?(M.preventDefault(),b(!0)):(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),b(F=>!F)))},handleKeyDownInput:M=>{if(!o)if(M.key==="ArrowDown")M.preventDefault(),y?C(Qo(w,1,k)):b(!0);else if(M.key==="ArrowUp")M.preventDefault(),y?C(Qo(w,-1,k)):b(!0);else if(M.key==="Enter")if(M.preventDefault(),y&&w>=0){const F=k[w];F&&!F.disabled&&V(F)}else b(!0);else M.key==="Escape"&&(M.preventDefault(),x?P(""):b(!1))},handleKeyDownMenu:M=>{if(M.key==="Escape"){M.preventDefault(),b(!1),C(-1);return}if(M.key==="ArrowDown"||M.key==="ArrowUp"){M.preventDefault();const F=M.key==="ArrowDown"?1:-1;C(Qo(w,F,k))}else if(M.key==="Enter"){M.preventDefault();const F=k[w];F&&!F.disabled&&V(F)}else M.key==="Home"?(M.preventDefault(),C(Jo(k))):M.key==="End"&&(M.preventDefault(),C(qp(k)))},handleToggle:()=>{o||b(M=>!M)},handleSearchChange:M=>{const F=M.target.value;P(F),y||b(!0),C(Jo(nl(e,F)))}}},Qp=g.div`
678
+ `,nl=({size:e="md",leftIcon:t,iconSize:n="sm",iconColor:o="currentColor",placeholder:r="Contraseña...",hasError:i=!1,disabled:s=!1,className:a,...l})=>{const[c,d]=m.useState(!1),u=()=>d(h=>!h);return p.jsxs(Up,{$size:e,$hasError:i,$disabled:s,className:a,children:[t&&p.jsx(U,{component:t,size:n,color:s?"var(--color-dark-200)":o}),p.jsx(Kp,{type:c?"text":"password",placeholder:r,disabled:s,...l}),p.jsx(Wp,{$disabled:s,onClick:s?void 0:u,children:p.jsx(U,{component:c?Lp:Ip,size:n,color:s?"var(--color-dark-200)":o})})]})},ol=(e,t)=>{if(!t.trim())return e;const n=t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return e.filter(o=>o.label.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").includes(n))},Jo=e=>{const t=e.findIndex(n=>!n.disabled);return t!==-1?t:0},qp=e=>{for(let t=e.length-1;t>=0;t--)if(!e[t].disabled)return t;return e.length-1},Qo=(e,t,n)=>{let o=e;do o=(o+t+n.length)%n.length;while(n[o]?.disabled&&o!==e);return o},Yp=(e,t)=>({target:{value:String(e),name:t},currentTarget:{value:String(e),name:t}}),Xp=(e,t)=>{if(t>=0&&e.current){const n=e.current.children[t];n&&n.scrollIntoView({block:"nearest",behavior:"smooth"})}},Zp=(e,t)=>{if(typeof e=="string"||typeof e=="number"){const n=t.findIndex(o=>o.value===e);if(n!==-1&&!t[n]?.disabled)return n}return Jo(t)},Jp=({options:e,value:t,name:n,disabled:o=!1,onChange:r,onOptionSelect:i,searchable:s=!1,clearSearchOnSelect:a=!0})=>{const l=m.useRef(null),c=m.useRef(null),d=m.useRef(null),u=m.useRef(null),h=m.useRef(null),f=m.useRef(!1),v=m.useId(),[y,b]=m.useState(!1),[w,C]=m.useState(-1),[x,P]=m.useState(""),T=e.find(M=>M.value===t),k=m.useMemo(()=>s?ol(e,x):e,[e,x,s]);m.useEffect(()=>{y&&(s&&h.current?h.current.focus():c.current&&c.current.focus(),C(Zp(t,k)))},[y,k,t,s]),m.useEffect(()=>{Xp(d,w)},[w]),m.useEffect(()=>{if(!y)return;const M=F=>{l.current&&(l.current.contains(F.target)||b(!1))};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[y]),m.useEffect(()=>{y?f.current=!0:f.current&&requestAnimationFrame(()=>{u.current?.focus()})},[y]);const V=M=>{M.disabled||(i?.(M),r&&r(Yp(M.value,n)),a&&P(""),b(!1),C(-1))};return{open:y,activeIndex:w,selected:T,searchQuery:x,filteredOptions:k,containerRef:l,menuRef:c,menuContentRef:d,buttonRef:u,inputRef:h,id:v,setOpen:b,setActiveIndex:C,setSearchQuery:P,commitSelection:V,handleKeyDownButton:M=>{o||(M.key==="ArrowDown"||M.key==="ArrowUp"?(M.preventDefault(),b(!0)):(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),b(F=>!F)))},handleKeyDownInput:M=>{if(!o)if(M.key==="ArrowDown")M.preventDefault(),y?C(Qo(w,1,k)):b(!0);else if(M.key==="ArrowUp")M.preventDefault(),y?C(Qo(w,-1,k)):b(!0);else if(M.key==="Enter")if(M.preventDefault(),y&&w>=0){const F=k[w];F&&!F.disabled&&V(F)}else b(!0);else M.key==="Escape"&&(M.preventDefault(),x?P(""):b(!1))},handleKeyDownMenu:M=>{if(M.key==="Escape"){M.preventDefault(),b(!1),C(-1);return}if(M.key==="ArrowDown"||M.key==="ArrowUp"){M.preventDefault();const F=M.key==="ArrowDown"?1:-1;C(Qo(w,F,k))}else if(M.key==="Enter"){M.preventDefault();const F=k[w];F&&!F.disabled&&V(F)}else M.key==="Home"?(M.preventDefault(),C(Jo(k))):M.key==="End"&&(M.preventDefault(),C(qp(k)))},handleToggle:()=>{o||b(M=>!M)},handleSearchChange:M=>{const F=M.target.value;P(F),y||b(!0),C(Jo(ol(e,F)))}}},Qp=g.div`
664
679
  position: relative;
665
680
  width: 100%;
666
681
  `,eg=g.div`
@@ -671,7 +686,7 @@
671
686
  transform: translateY(-50%) rotate(${({$open:e})=>e?"-180deg":"0deg"});
672
687
  pointer-events: none;
673
688
  transition: transform 0.3s ease-out;
674
- `,ol=g.button`
689
+ `,rl=g.button`
675
690
  ${Ze}
676
691
  ${({$size:e})=>Bt[e]}
677
692
  ${({$hasError:e})=>e&&Je}
@@ -741,7 +756,7 @@
741
756
  ${D[18]}
742
757
  `,lg:g.css`
743
758
  ${D[18]}
744
- `},rl=m.forwardRef(({size:e,hasError:t,disabled:n,hasValue:o,displayText:r,open:i,inputClassName:s,onClick:a,onKeyDown:l,ariaHaspopup:c,ariaExpanded:d,ariaControls:u,ariaInvalid:h,title:f,searchable:v=!1,searchQuery:y="",searchPlaceholder:b,onSearchChange:w,onInputKeyDown:C,inputRef:x},P)=>{const T={$size:e,$hasError:t,$hasValue:o,$disabled:n,disabled:n,className:s,onClick:a,title:f,"aria-haspopup":c,"aria-expanded":d,"aria-controls":u,"aria-invalid":h},k=m.useCallback(V=>{v&&x&&"current"in x&&(x.current=V),P&&(typeof P=="function"?P(V):P&&"current"in P&&(P.current=V))},[v,x,P]);return p.jsxs(p.Fragment,{children:[v?p.jsx(ol,{...T,as:"input",type:"text",ref:k,value:i?y:r,onChange:w,onKeyDown:C,placeholder:b||r,role:"combobox","aria-autocomplete":"list",autoComplete:"off",title:f}):p.jsx(ol,{...T,type:"button",ref:k,onKeyDown:l,children:r}),p.jsx(eg,{$size:e,$disabled:n,$open:i,children:p.jsx(U,{component:Za,size:e==="sm"||e==="md"?"sm":"md",color:n?"var(--color-dark-200)":"var(--color-main-blue-primary)"})})]})});rl.displayName="SelectTrigger";const il=({option:e,size:t,active:n,selected:o,id:r,className:i,onMouseEnter:s,onClick:a})=>p.jsx(og,{id:r,className:i,role:"option",$size:t,"aria-selected":o,$active:n,$disabled:e.disabled,onMouseEnter:s,onClick:a,children:e.label});il.displayName="SelectOption";const sl=({open:e,options:t,size:n,activeIndex:o,selectedValue:r,menuRef:i,menuContentRef:s,id:a,optionsClassName:l,optionClassName:c,noResultsMessage:d="No results found",onKeyDown:u,onOptionClick:h,onOptionMouseEnter:f})=>p.jsx(Lt,{children:e&&p.jsx(tg,{ref:i,className:"custom-scrollbar",id:`${a}-listbox`,role:"listbox",tabIndex:0,"aria-activedescendant":o>=0?`${a}-option-${o}`:void 0,initial:{opacity:0,height:0,scaleY:.8},animate:{opacity:1,height:"auto",scaleY:1},exit:{opacity:0,height:0,scaleY:.8},transition:{duration:.25,ease:[.4,0,.2,1]},onKeyDown:u,children:p.jsx(ng,{ref:s,className:l,children:t.length===0?p.jsx(ht,{children:d}):t.map((v,y)=>{const b=y===o;let w=v.className??(typeof c=="string"?c:void 0);if(typeof c=="function")try{const C=c(v);C&&(w=C)}catch(C){console.error(C)}return p.jsx(il,{option:v,size:n,active:b,selected:r===v.value,id:`${a}-option-${y}`,className:w,onMouseEnter:()=>{!v.disabled&&e&&f(y)},onClick:()=>h(v)},v.value)})})})});sl.displayName="SelectMenu";const gn=m.forwardRef(({size:e="md",hasError:t=!1,disabled:n=!1,options:o=[],placeholder:r,onOptionSelect:i,onChange:s,value:a,name:l,className:c,inputClassName:d,optionsClassName:u,optionClassName:h,searchable:f=!1,searchPlaceholder:v,clearSearchOnSelect:y=!0,noResultsMessage:b},w)=>{const{open:C,activeIndex:x,selected:P,searchQuery:T,filteredOptions:k,containerRef:V,menuRef:$,menuContentRef:A,buttonRef:I,inputRef:B,id:H,setActiveIndex:M,commitSelection:F,handleKeyDownButton:z,handleKeyDownInput:N,handleKeyDownMenu:L,handleToggle:j,handleSearchChange:te}=Jp({options:o,value:a,name:l,disabled:n,onChange:s,onOptionSelect:i,searchable:f,clearSearchOnSelect:y}),J=ue=>{I.current=ue,typeof w=="function"?w(ue):w&&"current"in w&&(w.current=ue)};return p.jsxs(Qp,{ref:V,className:c,children:[l&&p.jsx("input",{type:"hidden",name:l,value:P?.value??""}),p.jsx(rl,{ref:J,size:e,hasError:t,disabled:n,hasValue:!!P,displayText:P?.label??r??"",open:C,inputClassName:d,onClick:j,onKeyDown:z,ariaHaspopup:"listbox",ariaExpanded:C,ariaControls:`${H}-listbox`,ariaInvalid:t||void 0,title:P?.label??r??"Select an option",searchable:f,searchQuery:T,searchPlaceholder:v,onSearchChange:te,onInputKeyDown:N,inputRef:B}),p.jsx(sl,{open:C,options:k,size:e,activeIndex:x,selectedValue:a,menuRef:$,menuContentRef:A,id:H,optionsClassName:u,optionClassName:h,noResultsMessage:b,onKeyDown:L,onOptionClick:F,onOptionMouseEnter:M})]})});gn.displayName="SelectInput";const ig=g.textarea`
759
+ `},il=m.forwardRef(({size:e,hasError:t,disabled:n,hasValue:o,displayText:r,open:i,inputClassName:s,onClick:a,onKeyDown:l,ariaHaspopup:c,ariaExpanded:d,ariaControls:u,ariaInvalid:h,title:f,searchable:v=!1,searchQuery:y="",searchPlaceholder:b,onSearchChange:w,onInputKeyDown:C,inputRef:x},P)=>{const T={$size:e,$hasError:t,$hasValue:o,$disabled:n,disabled:n,className:s,onClick:a,title:f,"aria-haspopup":c,"aria-expanded":d,"aria-controls":u,"aria-invalid":h},k=m.useCallback(V=>{v&&x&&"current"in x&&(x.current=V),P&&(typeof P=="function"?P(V):P&&"current"in P&&(P.current=V))},[v,x,P]);return p.jsxs(p.Fragment,{children:[v?p.jsx(rl,{...T,as:"input",type:"text",ref:k,value:i?y:r,onChange:w,onKeyDown:C,placeholder:b||r,role:"combobox","aria-autocomplete":"list",autoComplete:"off",title:f}):p.jsx(rl,{...T,type:"button",ref:k,onKeyDown:l,children:r}),p.jsx(eg,{$size:e,$disabled:n,$open:i,children:p.jsx(U,{component:Ja,size:e==="sm"||e==="md"?"sm":"md",color:n?"var(--color-dark-200)":"var(--color-main-blue-primary)"})})]})});il.displayName="SelectTrigger";const sl=({option:e,size:t,active:n,selected:o,id:r,className:i,onMouseEnter:s,onClick:a})=>p.jsx(og,{id:r,className:i,role:"option",$size:t,"aria-selected":o,$active:n,$disabled:e.disabled,onMouseEnter:s,onClick:a,children:e.label});sl.displayName="SelectOption";const al=({open:e,options:t,size:n,activeIndex:o,selectedValue:r,menuRef:i,menuContentRef:s,id:a,optionsClassName:l,optionClassName:c,noResultsMessage:d="No results found",onKeyDown:u,onOptionClick:h,onOptionMouseEnter:f})=>p.jsx(Lt,{children:e&&p.jsx(tg,{ref:i,className:"custom-scrollbar",id:`${a}-listbox`,role:"listbox",tabIndex:0,"aria-activedescendant":o>=0?`${a}-option-${o}`:void 0,initial:{opacity:0,height:0,scaleY:.8},animate:{opacity:1,height:"auto",scaleY:1},exit:{opacity:0,height:0,scaleY:.8},transition:{duration:.25,ease:[.4,0,.2,1]},onKeyDown:u,children:p.jsx(ng,{ref:s,className:l,children:t.length===0?p.jsx(ht,{children:d}):t.map((v,y)=>{const b=y===o;let w=v.className??(typeof c=="string"?c:void 0);if(typeof c=="function")try{const C=c(v);C&&(w=C)}catch(C){console.error(C)}return p.jsx(sl,{option:v,size:n,active:b,selected:r===v.value,id:`${a}-option-${y}`,className:w,onMouseEnter:()=>{!v.disabled&&e&&f(y)},onClick:()=>h(v)},v.value)})})})});al.displayName="SelectMenu";const gn=m.forwardRef(({size:e="md",hasError:t=!1,disabled:n=!1,options:o=[],placeholder:r,onOptionSelect:i,onChange:s,value:a,name:l,className:c,inputClassName:d,optionsClassName:u,optionClassName:h,searchable:f=!1,searchPlaceholder:v,clearSearchOnSelect:y=!0,noResultsMessage:b},w)=>{const{open:C,activeIndex:x,selected:P,searchQuery:T,filteredOptions:k,containerRef:V,menuRef:$,menuContentRef:A,buttonRef:I,inputRef:B,id:H,setActiveIndex:M,commitSelection:F,handleKeyDownButton:z,handleKeyDownInput:N,handleKeyDownMenu:L,handleToggle:j,handleSearchChange:te}=Jp({options:o,value:a,name:l,disabled:n,onChange:s,onOptionSelect:i,searchable:f,clearSearchOnSelect:y}),J=ue=>{I.current=ue,typeof w=="function"?w(ue):w&&"current"in w&&(w.current=ue)};return p.jsxs(Qp,{ref:V,className:c,children:[l&&p.jsx("input",{type:"hidden",name:l,value:P?.value??""}),p.jsx(il,{ref:J,size:e,hasError:t,disabled:n,hasValue:!!P,displayText:P?.label??r??"",open:C,inputClassName:d,onClick:j,onKeyDown:z,ariaHaspopup:"listbox",ariaExpanded:C,ariaControls:`${H}-listbox`,ariaInvalid:t||void 0,title:P?.label??r??"Select an option",searchable:f,searchQuery:T,searchPlaceholder:v,onSearchChange:te,onInputKeyDown:N,inputRef:B}),p.jsx(al,{open:C,options:k,size:e,activeIndex:x,selectedValue:a,menuRef:$,menuContentRef:A,id:H,optionsClassName:u,optionClassName:h,noResultsMessage:b,onKeyDown:L,onOptionClick:F,onOptionMouseEnter:M})]})});gn.displayName="SelectInput";const ig=g.textarea`
745
760
  ${Ze}
746
761
  ${({$size:e})=>sg[e]}
747
762
  ${({$hasError:e})=>e&&Je}
@@ -784,7 +799,7 @@
784
799
  ${({$size:e})=>Bt[e??"md"]}
785
800
  `,lg=g.input`
786
801
  ${mn}
787
- `,tr=({size:e="md",leftIcon:t,rightIcon:n=el,iconSize:o="sm",iconColor:r="currentColor",placeholder:i="Buscar...",onSearch:s,className:a,...l})=>{const c=d=>{s?.(d.target.value)};return p.jsxs(ag,{$size:e,className:a,children:[t&&p.jsx(U,{component:t,size:o,color:r}),p.jsx(lg,{placeholder:i,onChange:c,...l}),n?p.jsx(U,{component:n,size:o,color:r}):p.jsx(U,{component:el,size:o,color:r})]})},cg={default:g.css`
802
+ `,tr=({size:e="md",leftIcon:t,rightIcon:n=tl,iconSize:o="sm",iconColor:r="currentColor",placeholder:i="Buscar...",onSearch:s,className:a,...l})=>{const c=d=>{s?.(d.target.value)};return p.jsxs(ag,{$size:e,className:a,children:[t&&p.jsx(U,{component:t,size:o,color:r}),p.jsx(lg,{placeholder:i,onChange:c,...l}),n?p.jsx(U,{component:n,size:o,color:r}):p.jsx(U,{component:tl,size:o,color:r})]})},cg={default:g.css`
788
803
  min-height: 18rem;
789
804
  padding: 2rem;
790
805
  `,compact:g.css`
@@ -913,7 +928,7 @@
913
928
  cursor: not-allowed;
914
929
  opacity: 0.5;
915
930
  }
916
- `,Cg=(e,t)=>{const[n,o]=m.useState(!1),r=m.useCallback(l=>{l.preventDefault(),l.stopPropagation(),t||o(!0)},[t]),i=m.useCallback(l=>{l.preventDefault(),l.stopPropagation(),t||o(!1)},[t]),s=m.useCallback(l=>{l.preventDefault(),l.stopPropagation()},[]),a=m.useCallback(l=>{l.preventDefault(),l.stopPropagation(),t||(o(!1),e(l.dataTransfer.files))},[t,e]);return m.useEffect(()=>()=>{n&&o(!1)},[n]),{isDragging:n,dragHandlers:{onDragEnter:r,onDragLeave:i,onDragOver:s,onDrop:a}}},Tg=({maxFileSize:e,accept:t,multiple:n,onError:o})=>{const[r,i]=m.useState(""),s=m.useCallback(l=>{i(l),o?.(l)},[o]),a=m.useCallback(l=>{if(e&&l.some(c=>c.size>e)){const c=e/1048576,d=c>=1?`File size exceeds maximum of ${c.toFixed(1)}MB`:`File size exceeds maximum of ${Math.round(e/1024)}KB`;return s(d),!1}if(t){const c=t.split(",").map(u=>u.trim().toLowerCase());if(l.find(u=>{const h=u.type.toLowerCase(),f=`.${u.name.split(".").pop()?.toLowerCase()}`;return!c.some(v=>{if(v===h||v===f)return!0;if(v.endsWith("/*")){const y=v.slice(0,-2);return h.startsWith(`${y}/`)}return!1})})){const u=`File type not accepted. Allowed: ${t}`;return s(u),!1}}return!n&&l.length>1?(s("Only one file is allowed"),!1):(i(""),!0)},[e,t,n,s]);return{error:r,validateFiles:a,clearError:()=>i("")}},$g=e=>{const t=["Bytes","KB","MB"],n=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,n)).toFixed(2)} ${t[n]}`},al=({files:e,onRemove:t,disabled:n})=>e.length===0?null:p.jsx(wg,{children:e.map((o,r)=>p.jsxs(bg,{children:[p.jsxs("div",{className:"flex min-w-[0] flex-col gap-1",children:[p.jsx(xg,{size:14,children:o.name}),p.jsx(ht,{size:12,children:$g(o.size)})]}),p.jsx(Sg,{type:"button",onClick:()=>t(r),"aria-label":`Remove ${o.name}`,disabled:n,children:p.jsx(Ja,{})})]},`${o.name}-${r}`))}),Pg=({variant:e="default",multiple:t=!1,maxFileSize:n=10,accept:o="image/*,application/pdf",helperText:r="Upload files here",value:i,defaultValue:s,onChange:a,onError:l,onFileRemove:c,disabled:d=!1,hasError:u=!1,errorMessage:h="",className:f="",dropZoneContainerClassName:v="",size:y="md"})=>{const b=i!==void 0,[w,C]=m.useState(s||[]),x=b?i:w,P=n*1024*1024,{error:T,validateFiles:k,clearError:V}=Tg({maxFileSize:P,accept:o,multiple:t,onError:l}),$=(F,z)=>{if(!F||F.length===0)return;const N=Array.from(F);if(!k(N))return;const L=t?[...x,...N]:N;b||C(L),a?.(L,z)},A=F=>{const z=x[F],N=x.filter((L,j)=>j!==F);b||C(N),c?.(z,F),a?.(N),N.length===0&&V()},{isDragging:I,dragHandlers:B}=Cg($,d),H=u||!!T,M=h||T;return p.jsxs(gg,{$size:y,className:f,children:[p.jsxs("label",{"aria-label":"File upload area",className:`p-4 ${v}`,children:[p.jsxs(vg,{$variant:e,$isDragging:I,$hasError:H,$disabled:d,role:"button",tabIndex:d?-1:0,"aria-disabled":d,onKeyDown:F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),F.currentTarget.querySelector("input")?.click())},...B,children:[p.jsx(U,{component:Op,size:"lg",color:d?"var(--color-dark-200)":"var(--color-main-blue-primary)",className:"!text-[5rem]"}),p.jsxs(yg,{$disabled:d,children:[p.jsx("strong",{children:"Click to upload"})," or drag and drop"]}),r&&!H&&p.jsx(Ie,{size:14,color:"var(--color-main-grey)",children:r})]}),p.jsx("input",{type:"file",multiple:t,accept:o,disabled:d,onChange:F=>$(F.target.files,F.nativeEvent),style:{display:"none"},"aria-label":"File input"})]}),H&&M&&p.jsx(Xo,{size:"sm",children:M}),p.jsx(al,{files:x,onRemove:A,disabled:d})]})},mt={xs:"1rem",sm:"1.25rem",md:"1.5rem",lg:"1.75rem"},kg=g.div`
931
+ `,Cg=(e,t)=>{const[n,o]=m.useState(!1),r=m.useCallback(l=>{l.preventDefault(),l.stopPropagation(),t||o(!0)},[t]),i=m.useCallback(l=>{l.preventDefault(),l.stopPropagation(),t||o(!1)},[t]),s=m.useCallback(l=>{l.preventDefault(),l.stopPropagation()},[]),a=m.useCallback(l=>{l.preventDefault(),l.stopPropagation(),t||(o(!1),e(l.dataTransfer.files))},[t,e]);return m.useEffect(()=>()=>{n&&o(!1)},[n]),{isDragging:n,dragHandlers:{onDragEnter:r,onDragLeave:i,onDragOver:s,onDrop:a}}},Tg=({maxFileSize:e,accept:t,multiple:n,onError:o})=>{const[r,i]=m.useState(""),s=m.useCallback(l=>{i(l),o?.(l)},[o]),a=m.useCallback(l=>{if(e&&l.some(c=>c.size>e)){const c=e/1048576,d=c>=1?`File size exceeds maximum of ${c.toFixed(1)}MB`:`File size exceeds maximum of ${Math.round(e/1024)}KB`;return s(d),!1}if(t){const c=t.split(",").map(u=>u.trim().toLowerCase());if(l.find(u=>{const h=u.type.toLowerCase(),f=`.${u.name.split(".").pop()?.toLowerCase()}`;return!c.some(v=>{if(v===h||v===f)return!0;if(v.endsWith("/*")){const y=v.slice(0,-2);return h.startsWith(`${y}/`)}return!1})})){const u=`File type not accepted. Allowed: ${t}`;return s(u),!1}}return!n&&l.length>1?(s("Only one file is allowed"),!1):(i(""),!0)},[e,t,n,s]);return{error:r,validateFiles:a,clearError:()=>i("")}},$g=e=>{const t=["Bytes","KB","MB"],n=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,n)).toFixed(2)} ${t[n]}`},ll=({files:e,onRemove:t,disabled:n})=>e.length===0?null:p.jsx(wg,{children:e.map((o,r)=>p.jsxs(bg,{children:[p.jsxs("div",{className:"flex min-w-[0] flex-col gap-1",children:[p.jsx(xg,{size:14,children:o.name}),p.jsx(ht,{size:12,children:$g(o.size)})]}),p.jsx(Sg,{type:"button",onClick:()=>t(r),"aria-label":`Remove ${o.name}`,disabled:n,children:p.jsx(Qa,{})})]},`${o.name}-${r}`))}),Pg=({variant:e="default",multiple:t=!1,maxFileSize:n=10,accept:o="image/*,application/pdf",helperText:r="Upload files here",value:i,defaultValue:s,onChange:a,onError:l,onFileRemove:c,disabled:d=!1,hasError:u=!1,errorMessage:h="",className:f="",dropZoneContainerClassName:v="",size:y="md"})=>{const b=i!==void 0,[w,C]=m.useState(s||[]),x=b?i:w,P=n*1024*1024,{error:T,validateFiles:k,clearError:V}=Tg({maxFileSize:P,accept:o,multiple:t,onError:l}),$=(F,z)=>{if(!F||F.length===0)return;const N=Array.from(F);if(!k(N))return;const L=t?[...x,...N]:N;b||C(L),a?.(L,z)},A=F=>{const z=x[F],N=x.filter((L,j)=>j!==F);b||C(N),c?.(z,F),a?.(N),N.length===0&&V()},{isDragging:I,dragHandlers:B}=Cg($,d),H=u||!!T,M=h||T;return p.jsxs(gg,{$size:y,className:f,children:[p.jsxs("label",{"aria-label":"File upload area",className:`p-4 ${v}`,children:[p.jsxs(vg,{$variant:e,$isDragging:I,$hasError:H,$disabled:d,role:"button",tabIndex:d?-1:0,"aria-disabled":d,onKeyDown:F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),F.currentTarget.querySelector("input")?.click())},...B,children:[p.jsx(U,{component:Op,size:"lg",color:d?"var(--color-dark-200)":"var(--color-main-blue-primary)",className:"!text-[5rem]"}),p.jsxs(yg,{$disabled:d,children:[p.jsx("strong",{children:"Click to upload"})," or drag and drop"]}),r&&!H&&p.jsx(Ie,{size:14,color:"var(--color-main-grey)",children:r})]}),p.jsx("input",{type:"file",multiple:t,accept:o,disabled:d,onChange:F=>$(F.target.files,F.nativeEvent),style:{display:"none"},"aria-label":"File input"})]}),H&&M&&p.jsx(Xo,{size:"sm",children:M}),p.jsx(ll,{files:x,onRemove:A,disabled:d})]})},mt={xs:"1rem",sm:"1.25rem",md:"1.5rem",lg:"1.75rem"},kg=g.div`
917
932
  position: relative;
918
933
  `,Mg=g.input`
919
934
  position: absolute;
@@ -969,12 +984,12 @@
969
984
  height: ${({$size:e})=>e==="xs"?"1.5px":"2px"};
970
985
  background-color: white;
971
986
  border-radius: 1px;
972
- `,nr=m.forwardRef(({size:e="md",hasError:t=!1,indeterminate:n=!1,checked:o,disabled:r=!1,onChange:i,className:s,checkboxClassName:a,...l},c)=>{const d=m.useId(),u=l.id??d,h=!!o,f=m.useRef(null),v=m.useCallback(y=>{if(f.current=y,!!c)if(typeof c=="function")try{c(y)}catch{}else c.current=y},[c]);return m.useEffect(()=>{f.current&&(f.current.indeterminate=!!n)},[n]),p.jsxs(kg,{className:s,children:[p.jsx(Mg,{ref:v,type:"checkbox",checked:h||!1,disabled:r,onChange:i,id:u,name:l.name,"aria-invalid":t||void 0,"aria-disabled":r||void 0,"aria-checked":n?"mixed":h?"true":"false",$size:e,...l}),p.jsxs(Vg,{$checked:!!h||!!n,$hasError:t,$disabled:r,$size:e,className:a,children:[h&&!n&&p.jsx(Dg,{$disabled:r,$size:e,viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:e==="xs"?2.5:3,d:"M5 13l4 4L19 7"})}),n&&p.jsx(Fg,{$size:e})]})]})});nr.displayName="CheckboxInput";const ll=({children:e,size:t="md",disabled:n=!1,htmlFor:o,onLabelClick:r,className:i,onClick:s,...a})=>{const l=c=>{n||(r&&r(),s&&s(c))};return p.jsx(hn,{size:t,disabled:n,htmlFor:o,onClick:l,className:i,...a,children:e})},Ag=g.section`
987
+ `,nr=m.forwardRef(({size:e="md",hasError:t=!1,indeterminate:n=!1,checked:o,disabled:r=!1,onChange:i,className:s,checkboxClassName:a,...l},c)=>{const d=m.useId(),u=l.id??d,h=!!o,f=m.useRef(null),v=m.useCallback(y=>{if(f.current=y,!!c)if(typeof c=="function")try{c(y)}catch{}else c.current=y},[c]);return m.useEffect(()=>{f.current&&(f.current.indeterminate=!!n)},[n]),p.jsxs(kg,{className:s,children:[p.jsx(Mg,{ref:v,type:"checkbox",checked:h||!1,disabled:r,onChange:i,id:u,name:l.name,"aria-invalid":t||void 0,"aria-disabled":r||void 0,"aria-checked":n?"mixed":h?"true":"false",$size:e,...l}),p.jsxs(Vg,{$checked:!!h||!!n,$hasError:t,$disabled:r,$size:e,className:a,children:[h&&!n&&p.jsx(Dg,{$disabled:r,$size:e,viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:e==="xs"?2.5:3,d:"M5 13l4 4L19 7"})}),n&&p.jsx(Fg,{$size:e})]})]})});nr.displayName="CheckboxInput";const cl=({children:e,size:t="md",disabled:n=!1,htmlFor:o,onLabelClick:r,className:i,onClick:s,...a})=>{const l=c=>{n||(r&&r(),s&&s(c))};return p.jsx(hn,{size:t,disabled:n,htmlFor:o,onClick:l,className:i,...a,children:e})},Ag=g.section`
973
988
  display: flex;
974
989
  align-items: center;
975
990
  justify-content: center;
976
991
  gap: 1rem;
977
- `,zt=m.forwardRef(({size:e="md",label:t,hasError:n=!1,indeterminate:o=!1,checked:r,disabled:i=!1,onChange:s,onLabelClick:a,className:l,checkboxClassName:c,labelClassName:d,...u},h)=>{const f=m.useId(),v=u.id??f;return p.jsxs(Ag,{className:l,children:[p.jsx(nr,{ref:h,size:e,hasError:n,indeterminate:o,checked:r,disabled:i,onChange:s,checkboxClassName:c,id:v,...u}),t&&p.jsx(ll,{size:e,disabled:i,htmlFor:v,onLabelClick:a,className:d,children:t})]})});zt.displayName="Checkbox";const Ig=g.div`
992
+ `,zt=m.forwardRef(({size:e="md",label:t,hasError:n=!1,indeterminate:o=!1,checked:r,disabled:i=!1,onChange:s,onLabelClick:a,className:l,checkboxClassName:c,labelClassName:d,...u},h)=>{const f=m.useId(),v=u.id??f;return p.jsxs(Ag,{className:l,children:[p.jsx(nr,{ref:h,size:e,hasError:n,indeterminate:o,checked:r,disabled:i,onChange:s,checkboxClassName:c,id:v,...u}),t&&p.jsx(cl,{size:e,disabled:i,htmlFor:v,onLabelClick:a,className:d,children:t})]})});zt.displayName="Checkbox";const Ig=g.div`
978
993
  position: relative;
979
994
  display: inline-block;
980
995
  `,Lg=g.input`
@@ -1038,11 +1053,11 @@
1038
1053
  width: 3.5rem;
1039
1054
  height: 4rem;
1040
1055
  ${D[40]}
1041
- `},or=m.forwardRef(({size:e="md",hasError:t=!1,variant:n="outlined",disabled:o=!1,className:r,maxLength:i=1,type:s="text",...a},l)=>{const c=m.useId(),d=a.id??c;return p.jsx(Ig,{children:p.jsx(Lg,{ref:l,$size:e,$hasError:t,$disabled:o,$variant:n,className:r,maxLength:i,type:s,disabled:o,id:d,"aria-invalid":t||void 0,"aria-disabled":o||void 0,...a})})});or.displayName="PinInput";const cl=(e,t,n,o,r,i,s="text",a,l)=>{const c=e.target.value;if(c.length>1)return;const d=i??r.length;if(s==="number"&&c&&!/^\d$/.test(c))return;const u=[...n];u[t]=c,o(u);const h=u.join("");a?.(h),c&&t<i-1&&r[t+1].current?.focus(),u.every(f=>f!=="")&&u.length>=d&&l?.(h)},ul=(e,t,n,o,r,i)=>{if(e.key==="Backspace"&&!n[t]&&t>0){if(n[t]){if(r){o[t-1].current?.focus();const s=[...n];s[t-1]="",r(s),i?.(s.join(""))}return}if(t>0&&(o[t-1].current?.focus(),r)){const s=[...n];s[t-1]="",r(s),i?.(s.join(""))}}e.key==="ArrowLeft"&&t>0&&o[t-1]?.current?.focus(),e.key==="ArrowRight"&&t<o.length-1&&o[t+1]?.current?.focus()},dl=(e,t,n,o,r,i,s="text",a,l)=>{e.preventDefault();const c=e.clipboardData.getData("text");if(!c)return;const d=i??r.length,u=[...n];for(let y=0;y<c.length;y++){const b=t+y;if(b>=d)break;const w=c[y];s==="number"&&!/^\d$/.test(w)||(u[b]=w)}o(u),a?.(u.join(""));const h=u.findIndex(y=>y===""),f=h!==-1?Math.min(Math.max(h,t),d-1):d-1;r[f].current?.focus();const v=u.join("");u.every(y=>y!=="")&&u.length>=d&&l?.(v)},fl=e=>Array(e).fill(null).map(()=>m.createRef()),Ng=(e,t,n="text")=>!(e.length!==t||n==="number"&&!/^\d+$/.test(e)),Bg=g.div`
1056
+ `},or=m.forwardRef(({size:e="md",hasError:t=!1,variant:n="outlined",disabled:o=!1,className:r,maxLength:i=1,type:s="text",...a},l)=>{const c=m.useId(),d=a.id??c;return p.jsx(Ig,{children:p.jsx(Lg,{ref:l,$size:e,$hasError:t,$disabled:o,$variant:n,className:r,maxLength:i,type:s,disabled:o,id:d,"aria-invalid":t||void 0,"aria-disabled":o||void 0,...a})})});or.displayName="PinInput";const ul=(e,t,n,o,r,i,s="text",a,l)=>{const c=e.target.value;if(c.length>1)return;const d=i??r.length;if(s==="number"&&c&&!/^\d$/.test(c))return;const u=[...n];u[t]=c,o(u);const h=u.join("");a?.(h),c&&t<i-1&&r[t+1].current?.focus(),u.every(f=>f!=="")&&u.length>=d&&l?.(h)},dl=(e,t,n,o,r,i)=>{if(e.key==="Backspace"&&!n[t]&&t>0){if(n[t]){if(r){o[t-1].current?.focus();const s=[...n];s[t-1]="",r(s),i?.(s.join(""))}return}if(t>0&&(o[t-1].current?.focus(),r)){const s=[...n];s[t-1]="",r(s),i?.(s.join(""))}}e.key==="ArrowLeft"&&t>0&&o[t-1]?.current?.focus(),e.key==="ArrowRight"&&t<o.length-1&&o[t+1]?.current?.focus()},fl=(e,t,n,o,r,i,s="text",a,l)=>{e.preventDefault();const c=e.clipboardData.getData("text");if(!c)return;const d=i??r.length,u=[...n];for(let y=0;y<c.length;y++){const b=t+y;if(b>=d)break;const w=c[y];s==="number"&&!/^\d$/.test(w)||(u[b]=w)}o(u),a?.(u.join(""));const h=u.findIndex(y=>y===""),f=h!==-1?Math.min(Math.max(h,t),d-1):d-1;r[f].current?.focus();const v=u.join("");u.every(y=>y!=="")&&u.length>=d&&l?.(v)},hl=e=>Array(e).fill(null).map(()=>m.createRef()),Ng=(e,t,n="text")=>!(e.length!==t||n==="number"&&!/^\d+$/.test(e)),Bg=g.div`
1042
1057
  display: flex;
1043
1058
  gap: 8px;
1044
1059
  align-items: center;
1045
- `,rr=({length:e=6,size:t="md",variant:n="outlined",hasError:o=!1,type:r="number",onChange:i,onComplete:s,className:a,pinInputClassName:l})=>{const[c,d]=m.useState(Array(e).fill("")),u=m.useMemo(()=>fl(e),[e]);return p.jsx(Bg,{className:a,children:Array.from({length:e},(h,f)=>p.jsx(or,{className:l,size:t,variant:n,hasError:o,value:c[f],onChange:v=>cl(v,f,c,d,u,e,r,i,s),onKeyDown:v=>ul(v,f,c,u,d,i),onPaste:v=>dl(v,f,c,d,u,e,r,i,s),ref:u[f]},f))})};rr.displayName="PinInputGroup";const zg=g.div`
1060
+ `,rr=({length:e=6,size:t="md",variant:n="outlined",hasError:o=!1,type:r="number",onChange:i,onComplete:s,className:a,pinInputClassName:l})=>{const[c,d]=m.useState(Array(e).fill("")),u=m.useMemo(()=>hl(e),[e]);return p.jsx(Bg,{className:a,children:Array.from({length:e},(h,f)=>p.jsx(or,{className:l,size:t,variant:n,hasError:o,value:c[f],onChange:v=>ul(v,f,c,d,u,e,r,i,s),onKeyDown:v=>dl(v,f,c,u,d,i),onPaste:v=>fl(v,f,c,d,u,e,r,i,s),ref:u[f]},f))})};rr.displayName="PinInputGroup";const zg=g.div`
1046
1061
  position: relative;
1047
1062
  `,Og=g.input`
1048
1063
  position: absolute;
@@ -1104,12 +1119,12 @@
1104
1119
  display: flex;
1105
1120
  flex-direction: column;
1106
1121
  gap: 0.75rem;
1107
- `,hl=({type:e,inputId:t,name:n,size:o,hasError:r,disabled:i,placeholder:s,inputClassName:a,fieldValue:l,ariaProps:c,options:d=[],onSelectChange:u,optionClassName:h,optionsClassName:f,checkboxLabel:v,onCheckboxChange:y,radioName:b,onRadioChange:w,pinLength:C=6,pinType:x="number",onPinChange:P,onPinComplete:T,onStandardChange:k,onTextAreaChange:V,leftIcon:$,rightIcon:A,iconSize:I,iconColor:B,additionalProps:H={}})=>{switch(e){case"textarea":return p.jsx(er,{id:t,name:n,className:a,hasError:r,disabled:i,value:l??"",size:o,placeholder:s,onChange:V,...H,...c});case"select":{const M=H,{optionClassName:F,optionsClassName:z,...N}=M,L=F??h,j=z??f;return p.jsx(gn,{id:t,name:n,className:a,hasError:r,disabled:i,size:o,value:l??"",onChange:u,options:d,placeholder:s||"Select",optionsClassName:j,optionClassName:L,...N,...c})}case"checkbox":return p.jsx(zt,{id:t,name:n,className:a,hasError:r,disabled:i,size:o,checked:!!l,label:v,onChange:y,...H,...c});case"radio":{const M=d;return p.jsx(qg,{children:M.map(F=>p.jsx(ar,{name:b||n,value:F.value,label:F.label,size:o,hasError:r,disabled:i,checked:l===F.value,onChange:z=>w?.(z,F.value),...c},F.value))})}case"pin":return p.jsx(rr,{length:C,type:x,size:o,hasError:r,onChange:P,onComplete:T,...H,...c});case"password":{const{...M}=H;return p.jsx(tl,{id:t,name:n,className:a,hasError:r,disabled:i,size:o,placeholder:s,leftIcon:$,iconSize:I,iconColor:B,onChange:k,...M,...c})}case"search":return p.jsx(tr,{className:a,size:o,placeholder:s,leftIcon:$,rightIcon:A,iconSize:I,iconColor:B,onSearch:H.onSearch,...c});default:return p.jsx(Zo,{id:t,name:n,className:a,hasError:r,disabled:i,size:o,placeholder:s,type:Wg.includes(e)?e:"text",leftIcon:$,rightIcon:A,iconSize:I,iconColor:B,value:l??"",onChange:k,...H,...c})}};hl.displayName="FieldRenderer";const Yg=g.div`
1122
+ `,ml=({type:e,inputId:t,name:n,size:o,hasError:r,disabled:i,placeholder:s,inputClassName:a,fieldValue:l,ariaProps:c,options:d=[],onSelectChange:u,optionClassName:h,optionsClassName:f,checkboxLabel:v,onCheckboxChange:y,radioName:b,onRadioChange:w,pinLength:C=6,pinType:x="number",onPinChange:P,onPinComplete:T,onStandardChange:k,onTextAreaChange:V,leftIcon:$,rightIcon:A,iconSize:I,iconColor:B,additionalProps:H={}})=>{switch(e){case"textarea":return p.jsx(er,{id:t,name:n,className:a,hasError:r,disabled:i,value:l??"",size:o,placeholder:s,onChange:V,...H,...c});case"select":{const M=H,{optionClassName:F,optionsClassName:z,...N}=M,L=F??h,j=z??f;return p.jsx(gn,{id:t,name:n,className:a,hasError:r,disabled:i,size:o,value:l??"",onChange:u,options:d,placeholder:s||"Select",optionsClassName:j,optionClassName:L,...N,...c})}case"checkbox":return p.jsx(zt,{id:t,name:n,className:a,hasError:r,disabled:i,size:o,checked:!!l,label:v,onChange:y,...H,...c});case"radio":{const M=d;return p.jsx(qg,{children:M.map(F=>p.jsx(ar,{name:b||n,value:F.value,label:F.label,size:o,hasError:r,disabled:i,checked:l===F.value,onChange:z=>w?.(z,F.value),...c},F.value))})}case"pin":return p.jsx(rr,{length:C,type:x,size:o,hasError:r,onChange:P,onComplete:T,...H,...c});case"password":{const{...M}=H;return p.jsx(nl,{id:t,name:n,className:a,hasError:r,disabled:i,size:o,placeholder:s,leftIcon:$,iconSize:I,iconColor:B,onChange:k,...M,...c})}case"search":return p.jsx(tr,{className:a,size:o,placeholder:s,leftIcon:$,rightIcon:A,iconSize:I,iconColor:B,onSearch:H.onSearch,...c});default:return p.jsx(Zo,{id:t,name:n,className:a,hasError:r,disabled:i,size:o,placeholder:s,type:Wg.includes(e)?e:"text",leftIcon:$,rightIcon:A,iconSize:I,iconColor:B,value:l??"",onChange:k,...H,...c})}};ml.displayName="FieldRenderer";const Yg=g.div`
1108
1123
  display: flex;
1109
1124
  flex-direction: column;
1110
1125
  gap: 0.5rem;
1111
1126
  width: 100%;
1112
- `,Xg=m.memo(({inputId:e,label:t,size:n,required:o,disabled:r,hasError:i,errorMessage:s,isCheckbox:a=!1,className:l,labelClassName:c,messageErrorClassName:d,children:u})=>p.jsxs(Yg,{className:l,children:[t&&!a&&p.jsx(hn,{htmlFor:e,size:n,required:o,disabled:r,className:c,children:t}),u,i&&s&&p.jsx(Xo,{id:`${e}-error`,size:n,className:d,children:s})]})),Zg=({id:e,name:t,label:n,type:o="text",size:r="md",placeholder:i,disabled:s=!1,required:a=!1,options:l=[],checkboxLabel:c,radioName:d,pinLength:u=6,pinType:h="number",rows:f=4,className:v,inputClassName:y,labelClassName:b,messageErrorClassName:w,leftIcon:C,rightIcon:x,iconSize:P,iconColor:T,onOptionSelect:k,onRadioChange:V,onPinComplete:$,onChange:A,optionsClassName:I,optionClassName:B,...H})=>{const{field:M,hasError:F,errorMessage:z,inputId:N,ariaProps:L,handleStandardChange:j,handleTextAreaChange:te,handleCheckboxChange:J,handleSelectChange:ue,handleRadioChange:gt,handlePinChange:G,handlePinComplete:Z}=Kg({name:t,required:a,onChange:A,onOptionSelect:k,onRadioChange:V,onPinComplete:$,options:l}),W=e?.toString?.()||N;return p.jsx(Xg,{inputId:W,label:n,size:r,required:a,disabled:s,hasError:F,errorMessage:z,isCheckbox:o==="checkbox",className:v,labelClassName:b,messageErrorClassName:w,children:p.jsx(hl,{type:o,inputId:W,name:t,size:r,hasError:F,disabled:s,placeholder:i,inputClassName:y,fieldValue:M.value,ariaProps:L,options:l,onSelectChange:ue,checkboxLabel:c,onCheckboxChange:J,radioName:d,onRadioChange:gt,pinLength:u,pinType:h,rows:f,onPinChange:G,onPinComplete:Z,onStandardChange:j,onTextAreaChange:te,leftIcon:C,rightIcon:x,iconSize:P,iconColor:T,optionsClassName:I,optionClassName:B,additionalProps:H})})},ml={initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2,ease:"easeInOut"},layout:!1},lr={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,ease:"easeInOut"}},Jg={fromBottom:{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},transition:{duration:.2,ease:"easeInOut"}},fromTop:{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.2,ease:"easeInOut"}},fromLeft:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2,ease:"easeInOut"}},fromRight:{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.2,ease:"easeInOut"}}},pl={initial:{height:0,opacity:0,y:-6},animate:{height:"auto",opacity:1,y:0},exit:{height:0,opacity:0,y:-6},transition:{duration:.2,ease:"easeInOut"}},Qg=g(De.div)`
1127
+ `,Xg=m.memo(({inputId:e,label:t,size:n,required:o,disabled:r,hasError:i,errorMessage:s,isCheckbox:a=!1,className:l,labelClassName:c,messageErrorClassName:d,children:u})=>p.jsxs(Yg,{className:l,children:[t&&!a&&p.jsx(hn,{htmlFor:e,size:n,required:o,disabled:r,className:c,children:t}),u,i&&s&&p.jsx(Xo,{id:`${e}-error`,size:n,className:d,children:s})]})),Zg=({id:e,name:t,label:n,type:o="text",size:r="md",placeholder:i,disabled:s=!1,required:a=!1,options:l=[],checkboxLabel:c,radioName:d,pinLength:u=6,pinType:h="number",rows:f=4,className:v,inputClassName:y,labelClassName:b,messageErrorClassName:w,leftIcon:C,rightIcon:x,iconSize:P,iconColor:T,onOptionSelect:k,onRadioChange:V,onPinComplete:$,onChange:A,optionsClassName:I,optionClassName:B,...H})=>{const{field:M,hasError:F,errorMessage:z,inputId:N,ariaProps:L,handleStandardChange:j,handleTextAreaChange:te,handleCheckboxChange:J,handleSelectChange:ue,handleRadioChange:gt,handlePinChange:G,handlePinComplete:Z}=Kg({name:t,required:a,onChange:A,onOptionSelect:k,onRadioChange:V,onPinComplete:$,options:l}),W=e?.toString?.()||N;return p.jsx(Xg,{inputId:W,label:n,size:r,required:a,disabled:s,hasError:F,errorMessage:z,isCheckbox:o==="checkbox",className:v,labelClassName:b,messageErrorClassName:w,children:p.jsx(ml,{type:o,inputId:W,name:t,size:r,hasError:F,disabled:s,placeholder:i,inputClassName:y,fieldValue:M.value,ariaProps:L,options:l,onSelectChange:ue,checkboxLabel:c,onCheckboxChange:J,radioName:d,onRadioChange:gt,pinLength:u,pinType:h,rows:f,onPinChange:G,onPinComplete:Z,onStandardChange:j,onTextAreaChange:te,leftIcon:C,rightIcon:x,iconSize:P,iconColor:T,optionsClassName:I,optionClassName:B,additionalProps:H})})},pl={initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2,ease:"easeInOut"},layout:!1},lr={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,ease:"easeInOut"}},Jg={fromBottom:{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},transition:{duration:.2,ease:"easeInOut"}},fromTop:{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.2,ease:"easeInOut"}},fromLeft:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2,ease:"easeInOut"}},fromRight:{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.2,ease:"easeInOut"}}},gl={initial:{height:0,opacity:0,y:-6},animate:{height:"auto",opacity:1,y:0},exit:{height:0,opacity:0,y:-6},transition:{duration:.2,ease:"easeInOut"}},Qg=g(De.div)`
1113
1128
  position: fixed;
1114
1129
  inset: 0;
1115
1130
  z-index: 50;
@@ -1169,7 +1184,7 @@
1169
1184
  transform: scale(1.1);
1170
1185
  outline: none;
1171
1186
  }
1172
- `,n0=e=>{const t=m.useRef(null),n=m.useRef(null);return m.useEffect(()=>{if(!e)return;n.current=document.activeElement;const o=t.current,r=()=>{o&&(o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.focus())},i=window.setTimeout(r,0),s=l=>{const c=["a[href]","area[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","iframe","object","embed",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]'];return Array.from(l.querySelectorAll(c.join(","))).filter(d=>!!(d.offsetWidth||d.offsetHeight||d.getClientRects().length))},a=l=>{if(l.key!=="Tab"||!o)return;const c=s(o);if(c.length===0){l.preventDefault(),o.focus();return}const d=c[0],u=c[c.length-1],h=document.activeElement;!l.shiftKey&&h===u?(l.preventDefault(),d.focus()):l.shiftKey&&h===d&&(l.preventDefault(),u.focus())};return document.addEventListener("keydown",a),()=>{window.clearTimeout(i),document.removeEventListener("keydown",a),n.current&&n.current.focus()}},[e]),t},o0=(e,t,n=!0)=>{m.useEffect(()=>{if(!e||!n)return;const o=r=>{r.key==="Escape"&&t()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[e,t,n])},r0=e=>{m.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e])},gl=({isOpen:e,onClose:t,children:n,className:o,closeOnBackdropClick:r=!0,showCloseButton:i=!1,size:s="md",fullScreen:a=!1,closeOnEsc:l=!0,ariaLabel:c,ariaLabelledBy:d,ariaDescribedBy:u})=>{const h=n0(e);o0(e,t,l),r0(e);const f=y=>{r&&y.target===y.currentTarget&&t()},v=p.jsx(Lt,{children:e&&p.jsx(Qg,{...lr,onClick:f,children:p.jsxs(e0,{...ml,ref:h,$size:s,$fullScreen:a,className:o,onClick:y=>y.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":c,"aria-labelledby":c?void 0:d,"aria-describedby":u,children:[i&&p.jsx(t0,{className:`${pn} cursor-pointer`,onClick:t,"aria-label":"Close dialog",children:p.jsx(U,{component:Ja,size:"sm"})}),n]})})});return typeof document>"u"?v:Vn.createPortal(v,document.body)},i0=g.div`
1187
+ `,n0=e=>{const t=m.useRef(null),n=m.useRef(null);return m.useEffect(()=>{if(!e)return;n.current=document.activeElement;const o=t.current,r=()=>{o&&(o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.focus())},i=window.setTimeout(r,0),s=l=>{const c=["a[href]","area[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","iframe","object","embed",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]'];return Array.from(l.querySelectorAll(c.join(","))).filter(d=>!!(d.offsetWidth||d.offsetHeight||d.getClientRects().length))},a=l=>{if(l.key!=="Tab"||!o)return;const c=s(o);if(c.length===0){l.preventDefault(),o.focus();return}const d=c[0],u=c[c.length-1],h=document.activeElement;!l.shiftKey&&h===u?(l.preventDefault(),d.focus()):l.shiftKey&&h===d&&(l.preventDefault(),u.focus())};return document.addEventListener("keydown",a),()=>{window.clearTimeout(i),document.removeEventListener("keydown",a),n.current&&n.current.focus()}},[e]),t},o0=(e,t,n=!0)=>{m.useEffect(()=>{if(!e||!n)return;const o=r=>{r.key==="Escape"&&t()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[e,t,n])},r0=e=>{m.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e])},vl=({isOpen:e,onClose:t,children:n,className:o,closeOnBackdropClick:r=!0,showCloseButton:i=!1,size:s="md",fullScreen:a=!1,closeOnEsc:l=!0,ariaLabel:c,ariaLabelledBy:d,ariaDescribedBy:u})=>{const h=n0(e);o0(e,t,l),r0(e);const f=y=>{r&&y.target===y.currentTarget&&t()},v=p.jsx(Lt,{children:e&&p.jsx(Qg,{...lr,onClick:f,children:p.jsxs(e0,{...pl,ref:h,$size:s,$fullScreen:a,className:o,onClick:y=>y.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":c,"aria-labelledby":c?void 0:d,"aria-describedby":u,children:[i&&p.jsx(t0,{className:`${pn} cursor-pointer`,onClick:t,"aria-label":"Close dialog",children:p.jsx(U,{component:Qa,size:"sm"})}),n]})})});return typeof document>"u"?v:Vn.createPortal(v,document.body)},i0=g.div`
1173
1188
  display: flex;
1174
1189
  align-items: center;
1175
1190
  justify-content: space-between;
@@ -1202,7 +1217,7 @@
1202
1217
  flex-shrink: 0;
1203
1218
  margin-left: auto;
1204
1219
  }
1205
- `,vl=({showDivider:e=!1,variant:t="default",children:n,className:o,...r})=>p.jsx(i0,{$showDivider:e,$variant:t,className:o,...r,children:n}),s0=g.div`
1220
+ `,yl=({showDivider:e=!1,variant:t="default",children:n,className:o,...r})=>p.jsx(i0,{$showDivider:e,$variant:t,className:o,...r,children:n}),s0=g.div`
1206
1221
  position: relative;
1207
1222
  display: flex;
1208
1223
  flex-direction: column;
@@ -1215,7 +1230,7 @@
1215
1230
  ${({$showTopDivider:e})=>e&&"border-top: 1px solid var(--color-main-light-borders);"}
1216
1231
 
1217
1232
  ${({$showBottomDivider:e})=>e&&"border-bottom: 1px solid var(--color-main-light-borders);"}
1218
- `,yl=({children:e,padded:t=!0,showTopDivider:n=!1,showBottomDivider:o=!1,className:r,...i})=>p.jsx(s0,{$padded:t,$showTopDivider:n,$showBottomDivider:o,className:r,...i,children:e}),a0=g.div`
1233
+ `,wl=({children:e,padded:t=!0,showTopDivider:n=!1,showBottomDivider:o=!1,className:r,...i})=>p.jsx(s0,{$padded:t,$showTopDivider:n,$showBottomDivider:o,className:r,...i,children:e}),a0=g.div`
1219
1234
  display: flex;
1220
1235
  align-items: center;
1221
1236
  width: 100%;
@@ -1231,7 +1246,7 @@
1231
1246
  bottom: 0;
1232
1247
  background: var(--color-main-white);
1233
1248
  `}
1234
- `,wl=({align:e="end",showDivider:t=!1,gap:n=8,sticky:o=!1,children:r,className:i,...s})=>p.jsx(a0,{$align:e,$showDivider:t,$gap:n,$sticky:o,className:i,...s,children:r}),l0=({isOpen:e,onAccept:t,onCancel:n,title:o,subtitle:r,content:i,bodyFooter:s,confirmationLabel:a="I have read and agree to the Terms and Conditions",acceptLabel:l="Accept",cancelLabel:c="Cancel",size:d="md",fullScreen:u=!1,showCloseButton:h=!0,closeOnBackdropClick:f=!1,containerClassName:v,headerClassName:y,bodyClassName:b,footerClassName:w,initiallyConfirmed:C=!1,onConfirmChange:x})=>{const[P,T]=m.useState(C);m.useEffect(()=>{e||T(C)},[e,C]);const k=V=>{T(V),x?.(V)};return p.jsxs(gl,{isOpen:e,onClose:n,size:d,fullScreen:u,showCloseButton:h,closeOnBackdropClick:f,ariaLabelledBy:"tac-title",ariaDescribedBy:"tac-subtitle",className:`${v} !h-fit !max-w-[60rem]`,children:[p.jsx(vl,{showDivider:!0,className:y,children:p.jsx(jr,{id:"tac-title",size:20,children:o})}),p.jsxs(yl,{padded:!0,showBottomDivider:!0,className:b,children:[r&&p.jsx(Ie,{id:"tac-subtitle",size:16,children:r}),i,s]}),p.jsxs(wl,{showDivider:!0,align:"space-between",className:w,children:[p.jsx(zt,{label:a,checked:P,onChange:V=>k(V.target.checked)}),p.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[p.jsx(ft,{variant:"secondary",onClick:n,children:c}),p.jsx(ft,{variant:"primary",onClick:t,disabled:!P,children:l})]})]})]})},c0=g.keyframes`
1249
+ `,bl=({align:e="end",showDivider:t=!1,gap:n=8,sticky:o=!1,children:r,className:i,...s})=>p.jsx(a0,{$align:e,$showDivider:t,$gap:n,$sticky:o,className:i,...s,children:r}),l0=({isOpen:e,onAccept:t,onCancel:n,title:o,subtitle:r,content:i,bodyFooter:s,confirmationLabel:a="I have read and agree to the Terms and Conditions",acceptLabel:l="Accept",cancelLabel:c="Cancel",size:d="md",fullScreen:u=!1,showCloseButton:h=!0,closeOnBackdropClick:f=!1,containerClassName:v,headerClassName:y,bodyClassName:b,footerClassName:w,initiallyConfirmed:C=!1,onConfirmChange:x})=>{const[P,T]=m.useState(C);m.useEffect(()=>{e||T(C)},[e,C]);const k=V=>{T(V),x?.(V)};return p.jsxs(vl,{isOpen:e,onClose:n,size:d,fullScreen:u,showCloseButton:h,closeOnBackdropClick:f,ariaLabelledBy:"tac-title",ariaDescribedBy:"tac-subtitle",className:`${v} !h-fit !max-w-[60rem]`,children:[p.jsx(yl,{showDivider:!0,className:y,children:p.jsx(Gr,{id:"tac-title",size:20,children:o})}),p.jsxs(wl,{padded:!0,showBottomDivider:!0,className:b,children:[r&&p.jsx(Ie,{id:"tac-subtitle",size:16,children:r}),i,s]}),p.jsxs(bl,{showDivider:!0,align:"space-between",className:w,children:[p.jsx(zt,{label:a,checked:P,onChange:V=>k(V.target.checked)}),p.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[p.jsx(ft,{variant:"secondary",onClick:n,children:c}),p.jsx(ft,{variant:"primary",onClick:t,disabled:!P,children:l})]})]})]})},c0=g.keyframes`
1235
1250
  from {
1236
1251
  opacity: 0;
1237
1252
  }
@@ -1308,13 +1323,13 @@
1308
1323
  background-color: var(--color-dark-600);
1309
1324
 
1310
1325
  ${({$placement:e})=>m0(e)}
1311
- `,bl=({content:e,children:t,placement:n="bottom",trigger:o="hover",className:r="",arrowClassName:i="",delay:s=200,showArrow:a=!0})=>{const[l,c]=m.useState(!1),d=m.useRef(null),u=m.useRef(null),h=m.useRef(null);m.useEffect(()=>{if(o!=="click"||!l)return;const w=C=>{u.current&&!u.current.contains(C.target)&&h.current&&!h.current.contains(C.target)&&c(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[l,o]),m.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]);const b=o==="hover"?{onMouseEnter:()=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>c(!0),s)},onMouseLeave:()=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>c(!1),100)}}:{onClick:()=>{c(w=>!w)}};return p.jsxs(u0,{children:[p.jsx(d0,{ref:h,...b,children:t}),l&&p.jsxs(h0,{ref:u,$placement:n,className:r,role:"tooltip","aria-hidden":!l,children:[e,a&&p.jsx(p0,{$placement:n,className:i})]})]})};bl.displayName="Tooltip";const cr=m.createContext(void 0),xl=({children:e})=>{const[t,n]=m.useState(!0),[o,r]=m.useState(!1);return p.jsx(cr.Provider,{value:{isCollapsed:t,setIsCollapsed:n,isMobileOpen:o,setIsMobileOpen:r},children:e})},ur=()=>{const e=m.useContext(cr);if(!e)throw new Error("useSidebar must be used within a SidebarProvider");return e},dr=(e=[],t=[])=>!t||t.length===0?!1:t.includes("all")?!0:e.map(o=>o.name).some(o=>t.includes(o)),g0=g.css`
1326
+ `,xl=({content:e,children:t,placement:n="bottom",trigger:o="hover",className:r="",arrowClassName:i="",delay:s=200,showArrow:a=!0})=>{const[l,c]=m.useState(!1),d=m.useRef(null),u=m.useRef(null),h=m.useRef(null);m.useEffect(()=>{if(o!=="click"||!l)return;const w=C=>{u.current&&!u.current.contains(C.target)&&h.current&&!h.current.contains(C.target)&&c(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[l,o]),m.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]);const b=o==="hover"?{onMouseEnter:()=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>c(!0),s)},onMouseLeave:()=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>c(!1),100)}}:{onClick:()=>{c(w=>!w)}};return p.jsxs(u0,{children:[p.jsx(d0,{ref:h,...b,children:t}),l&&p.jsxs(h0,{ref:u,$placement:n,className:r,role:"tooltip","aria-hidden":!l,children:[e,a&&p.jsx(p0,{$placement:n,className:i})]})]})};xl.displayName="Tooltip";const cr=m.createContext(void 0),Sl=({children:e})=>{const[t,n]=m.useState(!0),[o,r]=m.useState(!1);return p.jsx(cr.Provider,{value:{isCollapsed:t,setIsCollapsed:n,isMobileOpen:o,setIsMobileOpen:r},children:e})},ur=()=>{const e=m.useContext(cr);if(!e)throw new Error("useSidebar must be used within a SidebarProvider");return e},dr=(e=[],t=[])=>!t||t.length===0?!1:t.includes("all")?!0:e.map(o=>o.name).some(o=>t.includes(o)),g0=g.css`
1312
1327
  display: flex;
1313
1328
  align-items: center;
1314
1329
  justify-content: center;
1315
1330
  flex-shrink: 0;
1316
1331
  user-select: none;
1317
- `,Sl=`
1332
+ `,Cl=`
1318
1333
  width: 100%;
1319
1334
  display: flex;
1320
1335
  align-items: center;
@@ -1332,7 +1347,7 @@
1332
1347
  outline-offset: -2px;
1333
1348
  }
1334
1349
  `,v0=g.button`
1335
- ${Sl}
1350
+ ${Cl}
1336
1351
 
1337
1352
  // Level-based padding
1338
1353
  padding: ${({$level:e})=>e===0?"0.75rem 0.875rem":"0.55rem 0.75rem"};
@@ -1352,7 +1367,7 @@
1352
1367
 
1353
1368
  ${({$collapsed:e})=>e?"justify-content: center;":""}
1354
1369
  `,y0=g.button`
1355
- ${Sl}
1370
+ ${Cl}
1356
1371
 
1357
1372
  // Level-based padding
1358
1373
  padding: ${({$level:e})=>e===0?"0.75rem 0.875rem":"0.55rem 0.75rem"};
@@ -1400,7 +1415,7 @@
1400
1415
  transform: rotate(${({$open:e})=>e?"90deg":"0deg"});
1401
1416
  pointer-events: none;
1402
1417
  transition: transform 0.3s ease-out;
1403
- `,Cl=({item:e,userPermissions:t,level:n=0,activePath:o,onNavigate:r})=>{const[i,s]=m.useState(!1),{isCollapsed:a,setIsMobileOpen:l,setIsCollapsed:c}=ur(),d=m.useMemo(()=>(e.children||[]).filter(x=>dr(t,x.requiredPermissions)),[e.children,t]);if(!m.useMemo(()=>dr(t,e.requiredPermissions),[t,e.requiredPermissions]))return null;const h=d.length>0,f=e.href||e.path||"",v=!!(f&&o&&o.startsWith(f)),y=()=>{a&&c(!1),s(x=>!x)},b=()=>{a&&c(!1),e.href&&r?.(e.href)},w=async()=>{if(a&&c(!1),!e.path)return;const x=e.target||"_blank";try{typeof window<"u"&&(x==="_blank"?window.open(e.path,"_blank","noopener,noreferrer"):window.location.href=e.path),l&&l(!1)}catch(P){console.error("Error al navegar a microservicio:",P)}},C=()=>p.jsxs(p.Fragment,{children:[p.jsxs(w0,{children:[n>0&&!a&&p.jsx(C0,{}),e.icon&&p.jsx(U,{component:e.icon,size:n===0?"md":"sm",color:"var(--color-main-blue-primary)"}),!a&&p.jsx(b0,{$level:n,size:n===0?16:n===1?14:12,color:"var(--color-dark-700, #374151)",children:e.label})]}),!a&&h&&p.jsx(T0,{$disabled:a,$open:i,children:p.jsx(U,{component:Dp,size:"sm",color:"var(--color-main-blue-primary)"})})]});return p.jsxs(S0,{$level:n,children:[e.href&&!e.path&&!h?p.jsx(v0,{type:"button",onClick:b,$level:n,$collapsed:a,$active:v,title:a?e.label:"",children:C()}):p.jsx(y0,{type:"button",onClick:h?y:e.path?w:b,$level:n,$collapsed:a,$active:v,$expanded:i&&h,title:a?e.label:"",children:C()}),p.jsx(Lt,{initial:!1,children:!a&&i&&h&&p.jsx(x0,{$level:n+1,...pl,children:d.map(x=>p.jsx(Cl,{item:x,userPermissions:t,level:n+1,onNavigate:r,activePath:o},x.id))})})]})},Tl=g(De.div)`
1418
+ `,Tl=({item:e,userPermissions:t,level:n=0,activePath:o,onNavigate:r})=>{const[i,s]=m.useState(!1),{isCollapsed:a,setIsMobileOpen:l,setIsCollapsed:c}=ur(),d=m.useMemo(()=>(e.children||[]).filter(x=>dr(t,x.requiredPermissions)),[e.children,t]);if(!m.useMemo(()=>dr(t,e.requiredPermissions),[t,e.requiredPermissions]))return null;const h=d.length>0,f=e.href||e.path||"",v=!!(f&&o&&o.startsWith(f)),y=()=>{a&&c(!1),s(x=>!x)},b=()=>{a&&c(!1),e.href&&r?.(e.href)},w=async()=>{if(a&&c(!1),!e.path)return;const x=e.target||"_blank";try{typeof window<"u"&&(x==="_blank"?window.open(e.path,"_blank","noopener,noreferrer"):window.location.href=e.path),l&&l(!1)}catch(P){console.error("Error al navegar a microservicio:",P)}},C=()=>p.jsxs(p.Fragment,{children:[p.jsxs(w0,{children:[n>0&&!a&&p.jsx(C0,{}),e.icon&&p.jsx(U,{component:e.icon,size:n===0?"md":"sm",color:"var(--color-main-blue-primary)"}),!a&&p.jsx(b0,{$level:n,size:n===0?16:n===1?14:12,color:"var(--color-dark-700, #374151)",children:e.label})]}),!a&&h&&p.jsx(T0,{$disabled:a,$open:i,children:p.jsx(U,{component:Dp,size:"sm",color:"var(--color-main-blue-primary)"})})]});return p.jsxs(S0,{$level:n,children:[e.href&&!e.path&&!h?p.jsx(v0,{type:"button",onClick:b,$level:n,$collapsed:a,$active:v,title:a?e.label:"",children:C()}):p.jsx(y0,{type:"button",onClick:h?y:e.path?w:b,$level:n,$collapsed:a,$active:v,$expanded:i&&h,title:a?e.label:"",children:C()}),p.jsx(Lt,{initial:!1,children:!a&&i&&h&&p.jsx(x0,{$level:n+1,...gl,children:d.map(x=>p.jsx(Tl,{item:x,userPermissions:t,level:n+1,onNavigate:r,activePath:o},x.id))})})]})},$l=g(De.div)`
1404
1419
  position: fixed;
1405
1420
  inset: 0;
1406
1421
  background: rgba(0, 0, 0, 0.5);
@@ -1409,7 +1424,7 @@
1409
1424
  @media (max-width: 767px) {
1410
1425
  display: block;
1411
1426
  }
1412
- `,$l=g.aside`
1427
+ `,Pl=g.aside`
1413
1428
  position: fixed;
1414
1429
  left: 0;
1415
1430
  top: 0;
@@ -1428,7 +1443,7 @@
1428
1443
  @media (min-width: 768px) {
1429
1444
  transform: translateX(0);
1430
1445
  }
1431
- `,Pl=g.div`
1446
+ `,kl=g.div`
1432
1447
  display: flex;
1433
1448
  align-items: center;
1434
1449
  justify-content: space-between;
@@ -1436,11 +1451,11 @@
1436
1451
  padding: 1rem;
1437
1452
 
1438
1453
  ${({$collapsed:e})=>e?"flex-direction: column":""};
1439
- `,kl=g.div`
1454
+ `,Ml=g.div`
1440
1455
  display: flex;
1441
1456
  align-items: center;
1442
1457
  gap: 0.5rem;
1443
- `,Ml=g.nav`
1458
+ `,Vl=g.nav`
1444
1459
  display: flex;
1445
1460
  flex-direction: column;
1446
1461
  justify-content: flex-start;
@@ -1448,7 +1463,7 @@
1448
1463
  flex: 1;
1449
1464
  overflow-y: auto;
1450
1465
  padding: 0.25rem 0;
1451
- `,Vl=g.button`
1466
+ `,El=g.button`
1452
1467
  display: flex;
1453
1468
  align-items: center;
1454
1469
  justify-content: center;
@@ -1474,7 +1489,7 @@
1474
1489
  @media (max-width: 767px) {
1475
1490
  display: none;
1476
1491
  }
1477
- `,El=g.button`
1492
+ `,Dl=g.button`
1478
1493
  position: fixed;
1479
1494
  top: 0.5rem;
1480
1495
  left: 1rem;
@@ -1485,7 +1500,13 @@
1485
1500
  @media (min-width: 768px) {
1486
1501
  display: none;
1487
1502
  }
1488
- `,fr=({navigationConfig:e,activePath:t,logoImgExpanded:n,logoImgCollapsed:o,onNavigate:r=()=>{},userPermissions:i=[]})=>{const{isCollapsed:s,setIsCollapsed:a,isMobileOpen:l,setIsMobileOpen:c}=ur(),d=u=>{r(u),typeof window<"u"&&window.innerWidth<768&&c(!1)};return p.jsxs(p.Fragment,{children:[p.jsx(Lt,{children:l&&p.jsx(Tl,{...lr,onClick:()=>c(!1)})}),p.jsxs($l,{$collapsed:l?!1:s,$open:l,children:[p.jsxs(Pl,{$collapsed:s,children:[p.jsx(kl,{children:s?o:n}),p.jsx(Vl,{onClick:()=>a(!s),"aria-label":"Toggle collapse",children:p.jsx(U,{component:Qa,size:"md",color:"var(--color-main-blue-primary)"})})]}),p.jsx(Ml,{children:e.map(u=>p.jsx(Cl,{item:u,onNavigate:d,activePath:t,userPermissions:i},u.id))})]}),p.jsx(El,{onClick:()=>{c(!0),a(!0)},$hidden:l,children:p.jsx(U,{component:Qa,size:30})})]})};fr.displayName="Sidebar";const Dl={underlined:g.css`
1503
+ `,fr=({navigationConfig:e,activePath:t,logoImgExpanded:n,logoImgCollapsed:o,onNavigate:r=()=>{},userPermissions:i=[]})=>{const{isCollapsed:s,setIsCollapsed:a,isMobileOpen:l,setIsMobileOpen:c}=ur(),d=u=>{r(u),typeof window<"u"&&window.innerWidth<768&&c(!1)};return p.jsxs(p.Fragment,{children:[p.jsx(Lt,{children:l&&p.jsx($l,{...lr,onClick:()=>c(!1)})}),p.jsxs(Pl,{$collapsed:l?!1:s,$open:l,children:[p.jsxs(kl,{$collapsed:s,children:[p.jsx(Ml,{children:s?o:n}),p.jsx(El,{onClick:()=>a(!s),"aria-label":"Toggle collapse",children:p.jsx(U,{component:el,size:"md",color:"var(--color-main-blue-primary)"})})]}),p.jsx(Vl,{children:e.map(u=>p.jsx(Tl,{item:u,onNavigate:d,activePath:t,userPermissions:i},u.id))})]}),p.jsx(Dl,{onClick:()=>{c(!0),a(!0)},$hidden:l,children:p.jsx(U,{component:el,size:30})})]})};fr.displayName="Sidebar";const $0=g.css`
1504
+ &:visited {
1505
+ color: var(--color-main-orange-primary);
1506
+ text-decoration: underline;
1507
+ text-decoration-thickness: 1px;
1508
+ }
1509
+ `,Fl={underlined:g.css`
1489
1510
  color: var(--color-main-grey);
1490
1511
  text-decoration-thickness: 1px;
1491
1512
  text-underline-offset: 2px;
@@ -1499,18 +1520,16 @@
1499
1520
  color: var(--color-main-orange-primary);
1500
1521
  text-decoration: underline;
1501
1522
  transform: translateY(1px);
1523
+
1524
+ @media (preferes-reduced-motion: reduce) {
1525
+ transform: none;
1526
+ }
1502
1527
  }
1503
1528
 
1504
1529
  &:focus-visible {
1505
1530
  outline-color: var(--color-main-blue-primary);
1506
1531
  outline-offset: 2px;
1507
1532
  }
1508
-
1509
- &:visited {
1510
- color: var(--color-main-orange-primary);
1511
- text-decoration: underline;
1512
- text-decoration-thickness: 1px;
1513
- }
1514
1533
  `,plain:g.css`
1515
1534
  color: var(--color-main-grey);
1516
1535
  text-decoration: none;
@@ -1528,20 +1547,17 @@
1528
1547
  text-decoration-thickness: 1px;
1529
1548
  text-underline-offset: 2px;
1530
1549
  transform: translateY(1px);
1550
+
1551
+ @media (preferes-reduced-motion: reduce) {
1552
+ transform: none;
1553
+ }
1531
1554
  }
1532
1555
 
1533
1556
  &:focus-visible {
1534
1557
  outline-color: var(--color-main-blue-primary);
1535
1558
  outline-offset: 2px;
1536
1559
  }
1537
-
1538
- &:visited {
1539
- color: var(--color-main-orange-primary);
1540
- text-decoration: underline;
1541
- text-decoration-thickness: 1px;
1542
- text-underline-offset: 2px;
1543
- }
1544
- `},Fl=g.css`
1560
+ `},Al=g.css`
1545
1561
  color: var(--color-dark-200);
1546
1562
  cursor: not-allowed;
1547
1563
  pointer-events: none;
@@ -1559,7 +1575,10 @@
1559
1575
  text-decoration: none;
1560
1576
  transform: none;
1561
1577
  }
1562
- `,Al={sm:g.css`
1578
+ `,hr={xs:g.css`
1579
+ gap: 0.25rem;
1580
+ ${D[12]}
1581
+ `,sm:g.css`
1563
1582
  gap: 0.25rem;
1564
1583
  ${D[14]}
1565
1584
  `,md:g.css`
@@ -1568,7 +1587,7 @@
1568
1587
  `,lg:g.css`
1569
1588
  gap: 0.75rem;
1570
1589
  ${D[20]}
1571
- `},$0=g.a`
1590
+ `},P0=g.a`
1572
1591
  display: inline-flex;
1573
1592
  align-items: center;
1574
1593
  border-radius: 0.25rem;
@@ -1581,11 +1600,13 @@
1581
1600
  background-color 0.3s ease-in-out;
1582
1601
 
1583
1602
  cursor: pointer;
1603
+ touch-action: manipulation;
1584
1604
 
1585
- ${({$size:e})=>Al[e]}
1586
- ${({$variant:e})=>Dl[e]}
1587
- ${({$disabled:e})=>e&&Fl}
1588
- `,P0=g.styled.span`
1605
+ ${({$size:e})=>e in hr?hr[e]:D[e]||D[16]}
1606
+ ${({$variant:e})=>Fl[e]}
1607
+ ${({$disabled:e})=>e&&Al}
1608
+ ${({$isExternal:e})=>e&&$0}
1609
+ `,k0=g.styled.span`
1589
1610
  flex: 1 1 auto;
1590
1611
  min-width: 0;
1591
1612
  transition:
@@ -1599,10 +1620,10 @@
1599
1620
  text-overflow: ellipsis;
1600
1621
  white-space: nowrap;
1601
1622
  `};
1602
- `,Il=m.forwardRef(({id:e,size:t="md",variant:n="underlined",children:o,href:r,target:i,rel:s,className:a,disabled:l=!1,tabIndex:c,leftIcon:d,rightIcon:u,iconSize:h="tn",truncate:f=!1,"aria-label":v,"aria-describedby":y,onClick:b,...w},C)=>{const x=m.useCallback(T=>{if(l){T.preventDefault();return}b?.(T)},[l,b]),P={href:l?void 0:r,target:i||void 0,rel:s??(i==="_blank"?"noopener noreferrer":void 0),onClick:x,"aria-label":v??o,"aria-describedby":y,tabIndex:l?-1:c??0,...w};return p.jsxs($0,{id:e,$variant:n,$size:t,$disabled:l,className:a,ref:C,...P,children:[d&&p.jsx(U,{component:d,size:h,color:"currentColor"}),p.jsx(P0,{$truncate:f,children:o}),i==="_blank"&&!u&&p.jsx(U,{component:Ap,size:t==="lg"?"sm":h,color:"currentColor"}),u&&p.jsx(U,{component:u,size:h,color:"currentColor"})]})});Il.displayName="Link";function k0(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function He(e,t){return typeof e=="function"?e(t):e}function fe(e,t){return n=>{t.setState(o=>({...o,[e]:He(n,o[e])}))}}function vn(e){return e instanceof Function}function M0(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function V0(e,t){const n=[],o=r=>{r.forEach(i=>{n.push(i);const s=t(i);s!=null&&s.length&&o(s)})};return o(e),n}function R(e,t,n){let o=[],r;return i=>{let s;n.key&&n.debug&&(s=Date.now());const a=e(i);if(!(a.length!==o.length||a.some((d,u)=>o[u]!==d)))return r;o=a;let c;if(n.key&&n.debug&&(c=Date.now()),r=t(...a),n==null||n.onChange==null||n.onChange(r),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-s)*100)/100,u=Math.round((Date.now()-c)*100)/100,h=u/16,f=(v,y)=>{for(v=String(v);v.length<y;)v=" "+v;return v};console.info(`%c⏱ ${f(u,5)} /${f(d,5)} ms`,`
1623
+ `,Il=m.forwardRef(({id:e,size:t="md",variant:n="underlined",children:o,href:r,target:i,rel:s,className:a,disabled:l=!1,tabIndex:c,leftIcon:d,rightIcon:u,iconSize:h="tn",truncate:f=!1,"aria-label":v,"aria-describedby":y,onClick:b,...w},C)=>{const x=m.useCallback(k=>{if(l){k.preventDefault();return}b?.(k)},[l,b]),P={href:l?void 0:r,target:i||void 0,rel:s??(i==="_blank"?"noopener noreferrer":void 0),onClick:x,"aria-label":v??o,"aria-describedby":y,tabIndex:l?-1:c??0,...w},T=i==="_blank"||i==="_top"||i==="_parent";return p.jsxs(P0,{id:e,$variant:n,$size:t,$disabled:l,$isExternal:T,className:a,ref:C,...P,children:[d&&p.jsx(U,{component:d,size:h,color:"currentColor","aria-hidden":"true"}),p.jsx(k0,{$truncate:f,children:o}),i==="_blank"&&!u&&p.jsx(U,{component:Ap,size:t==="lg"?"sm":h,color:"currentColor","aria-hidden":"true"}),u&&p.jsx(U,{component:u,size:h,color:"currentColor"})]})});Il.displayName="Link";function M0(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function He(e,t){return typeof e=="function"?e(t):e}function fe(e,t){return n=>{t.setState(o=>({...o,[e]:He(n,o[e])}))}}function vn(e){return e instanceof Function}function V0(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function E0(e,t){const n=[],o=r=>{r.forEach(i=>{n.push(i);const s=t(i);s!=null&&s.length&&o(s)})};return o(e),n}function R(e,t,n){let o=[],r;return i=>{let s;n.key&&n.debug&&(s=Date.now());const a=e(i);if(!(a.length!==o.length||a.some((d,u)=>o[u]!==d)))return r;o=a;let c;if(n.key&&n.debug&&(c=Date.now()),r=t(...a),n==null||n.onChange==null||n.onChange(r),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-s)*100)/100,u=Math.round((Date.now()-c)*100)/100,h=u/16,f=(v,y)=>{for(v=String(v);v.length<y;)v=" "+v;return v};console.info(`%c⏱ ${f(u,5)} /${f(d,5)} ms`,`
1603
1624
  font-size: .6rem;
1604
1625
  font-weight: bold;
1605
- color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n?.key)}return r}}function _(e,t,n,o){return{debug:()=>{var r;return(r=e?.debugAll)!=null?r:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:o}}function E0(e,t,n,o){const r=()=>{var s;return(s=i.getValue())!=null?s:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(o),renderValue:r,getContext:R(()=>[e,n,t,i],(s,a,l,c)=>({table:s,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),_(e.options,"debugCells","cell.getContext"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(i,n,t,e)},{}),i}function D0(e,t,n,o){var r,i;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(r=(i=a.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?r:typeof a.header=="string"?a.header:void 0,d;if(a.accessorFn?d=a.accessorFn:l&&(l.includes(".")?d=h=>{let f=h;for(const y of l.split(".")){var v;f=(v=f)==null?void 0:v[y],process.env.NODE_ENV!=="production"&&f===void 0&&console.warn(`"${y}" in deeply nested key "${l}" returned undefined.`)}return f}:d=h=>h[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 u={id:`${String(c)}`,accessorFn:d,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:R(()=>[!0],()=>{var h;return[u,...(h=u.columns)==null?void 0:h.flatMap(f=>f.getFlatColumns())]},_(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:R(()=>[e._getOrderColumnsFn()],h=>{var f;if((f=u.columns)!=null&&f.length){let v=u.columns.flatMap(y=>y.getLeafColumns());return h(v)}return[u]},_(e.options,"debugColumns","column.getLeafColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(u,e);return u}const se="debugHeaders";function Ll(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 s=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),s.push(l)};return a(i),s},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(i,e)}),i}const F0={createTable:e=>{e.getHeaderGroups=R(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,r)=>{var i,s;const a=(i=o?.map(u=>n.find(h=>h.id===u)).filter(Boolean))!=null?i:[],l=(s=r?.map(u=>n.find(h=>h.id===u)).filter(Boolean))!=null?s:[],c=n.filter(u=>!(o!=null&&o.includes(u.id))&&!(r!=null&&r.includes(u.id)));return yn(t,[...a,...c,...l],e)},_(e.options,se,"getHeaderGroups")),e.getCenterHeaderGroups=R(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,r)=>(n=n.filter(i=>!(o!=null&&o.includes(i.id))&&!(r!=null&&r.includes(i.id))),yn(t,n,e,"center")),_(e.options,se,"getCenterHeaderGroups")),e.getLeftHeaderGroups=R(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,o)=>{var r;const i=(r=o?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?r:[];return yn(t,i,e,"left")},_(e.options,se,"getLeftHeaderGroups")),e.getRightHeaderGroups=R(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,o)=>{var r;const i=(r=o?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?r:[];return yn(t,i,e,"right")},_(e.options,se,"getRightHeaderGroups")),e.getFooterGroups=R(()=>[e.getHeaderGroups()],t=>[...t].reverse(),_(e.options,se,"getFooterGroups")),e.getLeftFooterGroups=R(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),_(e.options,se,"getLeftFooterGroups")),e.getCenterFooterGroups=R(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),_(e.options,se,"getCenterFooterGroups")),e.getRightFooterGroups=R(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),_(e.options,se,"getRightFooterGroups")),e.getFlatHeaders=R(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),_(e.options,se,"getFlatHeaders")),e.getLeftFlatHeaders=R(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),_(e.options,se,"getLeftFlatHeaders")),e.getCenterFlatHeaders=R(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),_(e.options,se,"getCenterFlatHeaders")),e.getRightFlatHeaders=R(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),_(e.options,se,"getRightFlatHeaders")),e.getCenterLeafHeaders=R(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),_(e.options,se,"getCenterLeafHeaders")),e.getLeftLeafHeaders=R(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),_(e.options,se,"getLeftLeafHeaders")),e.getRightLeafHeaders=R(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),_(e.options,se,"getRightLeafHeaders")),e.getLeafHeaders=R(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,o)=>{var r,i,s,a,l,c;return[...(r=(i=t[0])==null?void 0:i.headers)!=null?r:[],...(s=(a=n[0])==null?void 0:a.headers)!=null?s:[],...(l=(c=o[0])==null?void 0:c.headers)!=null?l:[]].map(d=>d.getLeafHeaders()).flat()},_(e.options,se,"getLeafHeaders"))}};function yn(e,t,n,o){var r,i;let s=0;const a=function(h,f){f===void 0&&(f=1),s=Math.max(s,f),h.filter(v=>v.getIsVisible()).forEach(v=>{var y;(y=v.columns)!=null&&y.length&&a(v.columns,f+1)},0)};a(e);let l=[];const c=(h,f)=>{const v={depth:f,id:[o,`${f}`].filter(Boolean).join("_"),headers:[]},y=[];h.forEach(b=>{const w=[...y].reverse()[0],C=b.column.depth===v.depth;let x,P=!1;if(C&&b.column.parent?x=b.column.parent:(x=b.column,P=!0),w&&w?.column===x)w.subHeaders.push(b);else{const T=Ll(n,x,{id:[o,f,x.id,b?.id].filter(Boolean).join("_"),isPlaceholder:P,placeholderId:P?`${y.filter(k=>k.column===x).length}`:void 0,depth:f,index:y.length});T.subHeaders.push(b),y.push(T)}v.headers.push(b),b.headerGroup=v}),l.push(v),f>0&&c(y,f-1)},d=t.map((h,f)=>Ll(n,h,{depth:s,index:f}));c(d,s-1),l.reverse();const u=h=>h.filter(v=>v.column.getIsVisible()).map(v=>{let y=0,b=0,w=[0];v.subHeaders&&v.subHeaders.length?(w=[],u(v.subHeaders).forEach(x=>{let{colSpan:P,rowSpan:T}=x;y+=P,w.push(T)})):y=1;const C=Math.min(...w);return b=b+C,v.colSpan=y,v.rowSpan=b,{colSpan:y,rowSpan:b}});return u((r=(i=l[0])==null?void 0:i.headers)!=null?r:[]),l}const hr=(e,t,n,o,r,i,s)=>{let a={id:t,index:o,original:n,depth:r,parentId:s,_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:()=>V0(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const d=c.getParentRow();if(!d)break;l.push(d),c=d}return l.reverse()},getAllCells:R(()=>[e.getAllLeafColumns()],l=>l.map(c=>E0(e,a,c,c.id)),_(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:R(()=>[a.getAllCells()],l=>l.reduce((c,d)=>(c[d.column.id]=d,c),{}),_(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},A0={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()}}},Rl=(e,t,n)=>{var o,r;const i=n==null||(o=n.toString())==null?void 0:o.toLowerCase();return!!(!((r=e.getValue(t))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(i))};Rl.autoRemove=e=>Se(e);const _l=(e,t,n)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(n))};_l.autoRemove=e=>Se(e);const Nl=(e,t,n)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===n?.toLowerCase()};Nl.autoRemove=e=>Se(e);const Bl=(e,t,n)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(n)};Bl.autoRemove=e=>Se(e);const zl=(e,t,n)=>!n.some(o=>{var r;return!((r=e.getValue(t))!=null&&r.includes(o))});zl.autoRemove=e=>Se(e)||!(e!=null&&e.length);const Ol=(e,t,n)=>n.some(o=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(o)});Ol.autoRemove=e=>Se(e)||!(e!=null&&e.length);const Hl=(e,t,n)=>e.getValue(t)===n;Hl.autoRemove=e=>Se(e);const jl=(e,t,n)=>e.getValue(t)==n;jl.autoRemove=e=>Se(e);const mr=(e,t,n)=>{let[o,r]=n;const i=e.getValue(t);return i>=o&&i<=r};mr.resolveFilterValue=e=>{let[t,n]=e,o=typeof t!="number"?parseFloat(t):t,r=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(o)?-1/0:o,s=n===null||Number.isNaN(r)?1/0:r;if(i>s){const a=i;i=s,s=a}return[i,s]},mr.autoRemove=e=>Se(e)||Se(e[0])&&Se(e[1]);const Fe={includesString:Rl,includesStringSensitive:_l,equalsString:Nl,arrIncludes:Bl,arrIncludesAll:zl,arrIncludesSome:Ol,equals:Hl,weakEquals:jl,inNumberRange:mr};function Se(e){return e==null||e===""}const I0={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:fe("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=n?.getValue(e.id);return typeof o=="string"?Fe.includesString:typeof o=="number"?Fe.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?Fe.equals:Array.isArray(o)?Fe.arrIncludes:Fe.weakEquals},e.getFilterFn=()=>{var n,o;return vn(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:Fe[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,o,r;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((o=t.options.enableColumnFilters)!=null?o:!0)&&((r=t.options.enableFilters)!=null?r:!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(r=>r.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(o=>{const r=e.getFilterFn(),i=o?.find(d=>d.id===e.id),s=He(n,i?i.value:void 0);if(Gl(r,s,e)){var a;return(a=o?.filter(d=>d.id!==e.id))!=null?a:[]}const l={id:e.id,value:s};if(i){var c;return(c=o?.map(d=>d.id===e.id?l:d))!=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=r=>{var i;return(i=He(t,r))==null?void 0:i.filter(s=>{const a=n.find(l=>l.id===s.id);if(a){const l=a.getFilterFn();if(Gl(l,s.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 Gl(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const pr={sum:(e,t,n)=>n.reduce((o,r)=>{const i=r.getValue(e);return o+(typeof i=="number"?i:0)},0),min:(e,t,n)=>{let o;return n.forEach(r=>{const i=r.getValue(e);i!=null&&(o>i||o===void 0&&i>=i)&&(o=i)}),o},max:(e,t,n)=>{let o;return n.forEach(r=>{const i=r.getValue(e);i!=null&&(o<i||o===void 0&&i>=i)&&(o=i)}),o},extent:(e,t,n)=>{let o,r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(o===void 0?s>=s&&(o=r=s):(o>s&&(o=s),r<s&&(r=s)))}),[o,r]},mean:(e,t)=>{let n=0,o=0;if(t.forEach(r=>{let i=r.getValue(e);i!=null&&(i=+i)>=i&&(++n,o+=i)}),n)return o/n},median:(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!M0(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),r=n.sort((i,s)=>i-s);return n.length%2!==0?r[o]:(r[o-1]+r[o])/2},unique:(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(n=>n.getValue(e))).size,count:(e,t)=>t.length},L0={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:fe("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(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 pr.sum;if(Object.prototype.toString.call(o)==="[object Date]")return pr.extent},e.getAggregationFn=()=>{var n,o;if(!e)throw new Error;return vn(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:pr[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 r;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((r=n.subRows)!=null&&r.length)}}};function R0(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(s=>s.id===i)).filter(Boolean),...o]}const _0={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:fe("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=R(n=>[Ot(t,n)],n=>n.findIndex(o=>o.id===e.id),_(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var o;return((o=Ot(t,n)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=n=>{var o;const r=Ot(t,n);return((o=r[r.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=R(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,o)=>r=>{let i=[];if(!(t!=null&&t.length))i=r;else{const s=[...t],a=[...r];for(;a.length&&s.length;){const l=s.shift(),c=a.findIndex(d=>d.id===l);c>-1&&i.push(a.splice(c,1)[0])}i=[...i,...a]}return R0(i,n,o)},_(e.options,"debugTable","_getOrderColumnsFn"))}},gr=()=>({left:[],right:[]}),N0={getInitialState:e=>({columnPinning:gr(),...e}),getDefaultOptions:e=>({onColumnPinningChange:fe("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const o=e.getLeafColumns().map(r=>r.id).filter(Boolean);t.setColumnPinning(r=>{var i,s;if(n==="right"){var a,l;return{left:((a=r?.left)!=null?a:[]).filter(u=>!(o!=null&&o.includes(u))),right:[...((l=r?.right)!=null?l:[]).filter(u=>!(o!=null&&o.includes(u))),...o]}}if(n==="left"){var c,d;return{left:[...((c=r?.left)!=null?c:[]).filter(u=>!(o!=null&&o.includes(u))),...o],right:((d=r?.right)!=null?d:[]).filter(u=>!(o!=null&&o.includes(u)))}}return{left:((i=r?.left)!=null?i:[]).filter(u=>!(o!=null&&o.includes(u))),right:((s=r?.right)!=null?s:[]).filter(u=>!(o!=null&&o.includes(u)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var r,i,s;return((r=o.columnDef.enablePinning)!=null?r:!0)&&((i=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:o,right:r}=t.getState().columnPinning,i=n.some(a=>o?.includes(a)),s=n.some(a=>r?.includes(a));return i?"left":s?"right":!1},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();return r?(n=(o=t.getState().columnPinning)==null||(o=o[r])==null?void 0:o.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=R(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,o,r)=>{const i=[...o??[],...r??[]];return n.filter(s=>!i.includes(s.column.id))},_(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=R(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,o)=>(o??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),_(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=R(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,o)=>(o??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),_(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?gr():(n=(o=e.initialState)==null?void 0:o.columnPinning)!=null?n:gr())},e.getIsSomeColumnsPinned=t=>{var n;const o=e.getState().columnPinning;if(!t){var r,i;return!!((r=o.left)!=null&&r.length||(i=o.right)!=null&&i.length)}return!!((n=o[t])!=null&&n.length)},e.getLeftLeafColumns=R(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(o=>t.find(r=>r.id===o)).filter(Boolean),_(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=R(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(o=>t.find(r=>r.id===o)).filter(Boolean),_(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=R(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o)=>{const r=[...n??[],...o??[]];return t.filter(i=>!r.includes(i.id))},_(e.options,"debugColumns","getCenterLeafColumns"))}};function B0(e){return e||(typeof document<"u"?document:null)}const wn={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},vr=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),z0={getDefaultColumnDef:()=>wn,getInitialState:e=>({columnSizing:{},columnSizingInfo:vr(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:fe("columnSizing",e),onColumnSizingInfoChange:fe("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,o,r;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:wn.minSize,(o=i??e.columnDef.size)!=null?o:wn.size),(r=e.columnDef.maxSize)!=null?r:wn.maxSize)},e.getStart=R(n=>[n,Ot(t,n),t.getState().columnSizing],(n,o)=>o.slice(0,e.getIndex(n)).reduce((r,i)=>r+i.getSize(),0),_(t.options,"debugColumns","getStart")),e.getAfter=R(n=>[n,Ot(t,n),t.getState().columnSizing],(n,o)=>o.slice(e.getIndex(n)+1).reduce((r,i)=>r+i.getSize(),0),_(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:o,...r}=n;return r})},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=r=>{if(r.subHeaders.length)r.subHeaders.forEach(o);else{var i;n+=(i=r.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),r=o?.getCanResize();return i=>{if(!o||!r||(i.persist==null||i.persist(),yr(i)&&i.touches&&i.touches.length>1))return;const s=e.getSize(),a=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[o.id,o.getSize()]],l=yr(i)?Math.round(i.touches[0].clientX):i.clientX,c={},d=(w,C)=>{typeof C=="number"&&(t.setColumnSizingInfo(x=>{var P,T;const k=t.options.columnResizeDirection==="rtl"?-1:1,V=(C-((P=x?.startOffset)!=null?P:0))*k,$=Math.max(V/((T=x?.startSize)!=null?T:0),-.999999);return x.columnSizingStart.forEach(A=>{let[I,B]=A;c[I]=Math.round(Math.max(B+B*$,0)*100)/100}),{...x,deltaOffset:V,deltaPercentage:$}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(x=>({...x,...c})))},u=w=>d("move",w),h=w=>{d("end",w),t.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f=B0(n),v={moveHandler:w=>u(w.clientX),upHandler:w=>{f?.removeEventListener("mousemove",v.moveHandler),f?.removeEventListener("mouseup",v.upHandler),h(w.clientX)}},y={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),u(w.touches[0].clientX),!1),upHandler:w=>{var C;f?.removeEventListener("touchmove",y.moveHandler),f?.removeEventListener("touchend",y.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),h((C=w.touches[0])==null?void 0:C.clientX)}},b=O0()?{passive:!1}:!1;yr(i)?(f?.addEventListener("touchmove",y.moveHandler,b),f?.addEventListener("touchend",y.upHandler,b)):(f?.addEventListener("mousemove",v.moveHandler,b),f?.addEventListener("mouseup",v.upHandler,b)),t.setColumnSizingInfo(w=>({...w,startOffset:l,startSize:s,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?vr():(n=e.initialState.columnSizingInfo)!=null?n:vr())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,r)=>o+r.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,r)=>o+r.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,r)=>o+r.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,r)=>o+r.getSize(),0))!=null?t:0}}};let bn=null;function O0(){if(typeof bn=="boolean")return bn;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 bn=e,bn}function yr(e){return e.type==="touchstart"}const H0={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:fe("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 r=e.columns;return(n=r.length?r.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=R(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),_(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=R(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,o,r)=>[...n,...o,...r],_(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,o)=>R(()=>[o(),o().filter(r=>r.getIsVisible()).map(r=>r.id).join("_")],r=>r.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),_(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((r,i)=>({...r,[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 Ot(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const j0={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()}}},G0={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:fe("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,r,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=t.options.enableGlobalFilter)!=null?o:!0)&&((r=t.options.enableFilters)!=null?r:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Fe.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:o}=e.options;return vn(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[o])!=null?t:Fe[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},U0={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:fe("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var o,r;if(!t){e._queue(()=>{t=!0});return}if((o=(r=e.options.autoResetAll)!=null?r: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 r,i;e.setExpanded(o?{}:(r=(i=e.initialState)==null?void 0:i.expanded)!=null?r:{})},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(r=>!r.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const s=i.split(".");o=Math.max(o,s.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 r;const i=o===!0?!0:!!(o!=null&&o[e.id]);let s={};if(o===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{s[a]=!0}):s=o,n=(r=n)!=null?r:!i,!i&&n)return{...s,[e.id]:!0};if(i&&!n){const{[e.id]:a,...l}=s;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,r;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((o=t.options.enableExpanding)!=null?o:!0)&&!!((r=e.subRows)!=null&&r.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()}}}},wr=0,br=10,xr=()=>({pageIndex:wr,pageSize:br}),K0={getInitialState:e=>({...e,pagination:{...xr(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:fe("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var o,r;if(!t){e._queue(()=>{t=!0});return}if((o=(r=e.options.autoResetAll)!=null?r:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=o=>{const r=i=>He(o,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(r)},e.resetPagination=o=>{var r;e.setPagination(o?xr():(r=e.initialState.pagination)!=null?r:xr())},e.setPageIndex=o=>{e.setPagination(r=>{let i=He(o,r.pageIndex);const s=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,s)),{...r,pageIndex:i}})},e.resetPageIndex=o=>{var r,i;e.setPageIndex(o?wr:(r=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?r:wr)},e.resetPageSize=o=>{var r,i;e.setPageSize(o?br:(r=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?r:br)},e.setPageSize=o=>{e.setPagination(r=>{const i=Math.max(1,He(o,r.pageSize)),s=r.pageSize*r.pageIndex,a=Math.floor(s/i);return{...r,pageIndex:a,pageSize:i}})},e.setPageCount=o=>e.setPagination(r=>{var i;let s=He(o,(i=e.options.pageCount)!=null?i:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...r,pageCount:s}}),e.getPageOptions=R(()=>[e.getPageCount()],o=>{let r=[];return o&&o>0&&(r=[...new Array(o)].fill(null).map((i,s)=>s)),r},_(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:o}=e.getState().pagination,r=e.getPageCount();return r===-1?!0:r===0?!1:o<r-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}}},Sr=()=>({top:[],bottom:[]}),W0={getInitialState:e=>({rowPinning:Sr(),...e}),getDefaultOptions:e=>({onRowPinningChange:fe("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,o,r)=>{const i=o?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],s=r?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...s,e.id,...i]);t.setRowPinning(l=>{var c,d;if(n==="bottom"){var u,h;return{top:((u=l?.top)!=null?u:[]).filter(y=>!(a!=null&&a.has(y))),bottom:[...((h=l?.bottom)!=null?h:[]).filter(y=>!(a!=null&&a.has(y))),...Array.from(a)]}}if(n==="top"){var f,v;return{top:[...((f=l?.top)!=null?f:[]).filter(y=>!(a!=null&&a.has(y))),...Array.from(a)],bottom:((v=l?.bottom)!=null?v:[]).filter(y=>!(a!=null&&a.has(y)))}}return{top:((c=l?.top)!=null?c:[]).filter(y=>!(a!=null&&a.has(y))),bottom:((d=l?.bottom)!=null?d:[]).filter(y=>!(a!=null&&a.has(y)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:r}=t.options;return typeof o=="function"?o(e):(n=o??r)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:o,bottom:r}=t.getState().rowPinning,i=n.some(a=>o?.includes(a)),s=n.some(a=>r?.includes(a));return i?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();if(!r)return-1;const i=(n=r==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(s=>{let{id:a}=s;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?Sr():(n=(o=e.initialState)==null?void 0:o.rowPinning)!=null?n:Sr())},e.getIsSomeRowsPinned=t=>{var n;const o=e.getState().rowPinning;if(!t){var r,i;return!!((r=o.top)!=null&&r.length||(i=o.bottom)!=null&&i.length)}return!!((n=o[t])!=null&&n.length)},e._getPinnedRows=(t,n,o)=>{var r;return((r=e.options.keepPinnedRows)==null||r?(n??[]).map(s=>{const a=e.getRow(s,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(s=>t.find(a=>a.id===s))).filter(Boolean).map(s=>({...s,position:o}))},e.getTopRows=R(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),_(e.options,"debugRows","getTopRows")),e.getBottomRows=R(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),_(e.options,"debugRows","getBottomRows")),e.getCenterRows=R(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,o)=>{const r=new Set([...n??[],...o??[]]);return t.filter(i=>!r.has(i.id))},_(e.options,"debugRows","getCenterRows"))}},q0={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:fe("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const o={...n},r=e.getPreGroupedRowModel().flatRows;return t?r.forEach(i=>{i.getCanSelect()&&(o[i.id]=!0)}):r.forEach(i=>{delete o[i.id]}),o})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),r={...n};return e.getRowModel().rows.forEach(i=>{Cr(r,i.id,o,!0,e)}),r}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=R(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Tr(e,n):{rows:[],flatRows:[],rowsById:{}},_(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=R(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Tr(e,n):{rows:[],flatRows:[],rowsById:{}},_(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=R(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Tr(e,n):{rows:[],flatRows:[],rowsById:{}},_(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(r=>r.getCanSelect()&&!n[r.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(r=>r.getCanSelect()),{rowSelection:n}=e.getState();let o=!!t.length;return o&&t.some(r=>!n[r.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 r=e.getIsSelected();t.setRowSelection(i=>{var s;if(n=typeof n<"u"?n:!r,e.getCanSelect()&&r===n)return i;const a={...i};return Cr(a,e.id,n,(s=o?.selectChildren)!=null?s:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return $r(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Pr(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Pr(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 r;n&&e.toggleSelected((r=o.target)==null?void 0:r.checked)}}}},Cr=(e,t,n,o,r)=>{var i;const s=r.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),s.getCanSelect()&&(e[t]=!0)):delete e[t],o&&(i=s.subRows)!=null&&i.length&&s.getCanSelectSubRows()&&s.subRows.forEach(a=>Cr(e,a.id,n,o,r))};function Tr(e,t){const n=e.getState().rowSelection,o=[],r={},i=function(s,a){return s.map(l=>{var c;const d=$r(l,n);if(d&&(o.push(l),r[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:i(l.subRows)}),d)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:o,rowsById:r}}function $r(e,t){var n;return(n=t[e.id])!=null?n:!1}function Pr(e,t,n){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let r=!0,i=!1;return e.subRows.forEach(s=>{if(!(i&&!r)&&(s.getCanSelect()&&($r(s,t)?i=!0:r=!1),s.subRows&&s.subRows.length)){const a=Pr(s,t);a==="all"?i=!0:(a==="some"&&(i=!0),r=!1)}}),r?"all":i?"some":!1}const kr=/([0-9]+)/gm,Y0=(e,t,n)=>Ul(je(e.getValue(n)).toLowerCase(),je(t.getValue(n)).toLowerCase()),X0=(e,t,n)=>Ul(je(e.getValue(n)),je(t.getValue(n))),Z0=(e,t,n)=>Mr(je(e.getValue(n)).toLowerCase(),je(t.getValue(n)).toLowerCase()),J0=(e,t,n)=>Mr(je(e.getValue(n)),je(t.getValue(n))),Q0=(e,t,n)=>{const o=e.getValue(n),r=t.getValue(n);return o>r?1:o<r?-1:0},ev=(e,t,n)=>Mr(e.getValue(n),t.getValue(n));function Mr(e,t){return e===t?0:e>t?1:-1}function je(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Ul(e,t){const n=e.split(kr).filter(Boolean),o=t.split(kr).filter(Boolean);for(;n.length&&o.length;){const r=n.shift(),i=o.shift(),s=parseInt(r,10),a=parseInt(i,10),l=[s,a].sort();if(isNaN(l[0])){if(r>i)return 1;if(i>r)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return n.length-o.length}const Ht={alphanumeric:Y0,alphanumericCaseSensitive:X0,text:Z0,textCaseSensitive:J0,datetime:Q0,basic:ev},tv=[F0,H0,_0,N0,A0,I0,j0,G0,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:fe("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const r of n){const i=r?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return Ht.datetime;if(typeof i=="string"&&(o=!0,i.split(kr).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 vn(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 r=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(s=>{const a=s?.find(f=>f.id===e.id),l=s?.findIndex(f=>f.id===e.id);let c=[],d,u=i?n:r==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&o?a?d="toggle":d="add":s!=null&&s.length&&l!==s.length-1?d="replace":a?d="toggle":d="replace",d==="toggle"&&(i||r||(d="remove")),d==="add"){var h;c=[...s,{id:e.id,desc:u}],c.splice(0,c.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else d==="toggle"?c=s.map(f=>f.id===e.id?{...f,desc:u}:f):d==="remove"?c=s.filter(f=>f.id!==e.id):c=[{id:e.id,desc:u}];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,r;const i=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==i&&((o=t.options.enableSortingRemoval)==null||o)&&(!(n&&(r=t.options.enableMultiRemove)!=null)||r)?!1:s==="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(r=>r.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(r=>r.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())}},L0,U0,K0,W0,q0,z0];function nv(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const o=[...tv,...(t=e._features)!=null?t:[]];let r={_features:o};const i=r._features.reduce((h,f)=>Object.assign(h,f.getDefaultOptions==null?void 0:f.getDefaultOptions(r)),{}),s=h=>r.options.mergeOptions?r.options.mergeOptions(i,h):{...i,...h};let l={...{},...(n=e.initialState)!=null?n:{}};r._features.forEach(h=>{var f;l=(f=h.getInitialState==null?void 0:h.getInitialState(l))!=null?f:l});const c=[];let d=!1;const u={_features:o,options:{...i,...e},initialState:l,_queue:h=>{c.push(h),d||(d=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();d=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{r.setState(r.initialState)},setOptions:h=>{const f=He(h,r.options);r.options=s(f)},getState:()=>r.options.state,setState:h=>{r.options.onStateChange==null||r.options.onStateChange(h)},_getRowId:(h,f,v)=>{var y;return(y=r.options.getRowId==null?void 0:r.options.getRowId(h,f,v))!=null?y:`${v?[v.id,f].join("."):f}`},getCoreRowModel:()=>(r._getCoreRowModel||(r._getCoreRowModel=r.options.getCoreRowModel(r)),r._getCoreRowModel()),getRowModel:()=>r.getPaginationRowModel(),getRow:(h,f)=>{let v=(f?r.getPrePaginationRowModel():r.getRowModel()).rowsById[h];if(!v&&(v=r.getCoreRowModel().rowsById[h],!v))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${h}`):new Error;return v},_getDefaultColumnDef:R(()=>[r.options.defaultColumn],h=>{var f;return h=(f=h)!=null?f:{},{header:v=>{const y=v.header.column.columnDef;return y.accessorKey?y.accessorKey:y.accessorFn?y.id:null},cell:v=>{var y,b;return(y=(b=v.renderValue())==null||b.toString==null?void 0:b.toString())!=null?y:null},...r._features.reduce((v,y)=>Object.assign(v,y.getDefaultColumnDef==null?void 0:y.getDefaultColumnDef()),{}),...h}},_(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>r.options.columns,getAllColumns:R(()=>[r._getColumnDefs()],h=>{const f=function(v,y,b){return b===void 0&&(b=0),v.map(w=>{const C=D0(r,w,b,y),x=w;return C.columns=x.columns?f(x.columns,C,b+1):[],C})};return f(h)},_(e,"debugColumns","getAllColumns")),getAllFlatColumns:R(()=>[r.getAllColumns()],h=>h.flatMap(f=>f.getFlatColumns()),_(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:R(()=>[r.getAllFlatColumns()],h=>h.reduce((f,v)=>(f[v.id]=v,f),{}),_(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:R(()=>[r.getAllColumns(),r._getOrderColumnsFn()],(h,f)=>{let v=h.flatMap(y=>y.getLeafColumns());return f(v)},_(e,"debugColumns","getAllLeafColumns")),getColumn:h=>{const f=r._getAllFlatColumnsById()[h];return process.env.NODE_ENV!=="production"&&!f&&console.error(`[Table] Column with id '${h}' does not exist.`),f}};Object.assign(r,u);for(let h=0;h<r._features.length;h++){const f=r._features[h];f==null||f.createTable==null||f.createTable(r)}return r}function ov(){return e=>R(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(r,i,s){i===void 0&&(i=0);const a=[];for(let c=0;c<r.length;c++){const d=hr(e,e._getRowId(r[c],c,s),r[c],c,i,void 0,s?.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,a.push(d),e.options.getSubRows){var l;d.originalSubRows=e.options.getSubRows(r[c],c),(l=d.originalSubRows)!=null&&l.length&&(d.subRows=o(d.originalSubRows,i+1,d))}}return a};return n.rows=o(t),n},_(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function rv(e,t,n){return n.options.filterFromLeafRows?iv(e,t,n):sv(e,t,n)}function iv(e,t,n){var o;const r=[],i={},s=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(l,c){c===void 0&&(c=0);const d=[];for(let h=0;h<l.length;h++){var u;let f=l[h];const v=hr(n,f.id,f.original,f.index,f.depth,void 0,f.parentId);if(v.columnFilters=f.columnFilters,(u=f.subRows)!=null&&u.length&&c<s){if(v.subRows=a(f.subRows,c+1),f=v,t(f)&&!v.subRows.length){d.push(f),i[f.id]=f,r.push(f);continue}if(t(f)||v.subRows.length){d.push(f),i[f.id]=f,r.push(f);continue}}else f=v,t(f)&&(d.push(f),i[f.id]=f,r.push(f))}return d};return{rows:a(e),flatRows:r,rowsById:i}}function sv(e,t,n){var o;const r=[],i={},s=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(l,c){c===void 0&&(c=0);const d=[];for(let h=0;h<l.length;h++){let f=l[h];if(t(f)){var u;if((u=f.subRows)!=null&&u.length&&c<s){const y=hr(n,f.id,f.original,f.index,f.depth,void 0,f.parentId);y.subRows=a(f.subRows,c+1),f=y}d.push(f),r.push(f),i[f.id]=f}}return d};return{rows:a(e),flatRows:r,rowsById:i}}function av(){return e=>R(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,o)=>{if(!t.rows.length||!(n!=null&&n.length)&&!o){for(let h=0;h<t.flatRows.length;h++)t.flatRows[h].columnFilters={},t.flatRows[h].columnFiltersMeta={};return t}const r=[],i=[];(n??[]).forEach(h=>{var f;const v=e.getColumn(h.id);if(!v)return;const y=v.getFilterFn();if(!y){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${v.id}.`);return}r.push({id:h.id,filterFn:y,resolvedValue:(f=y.resolveFilterValue==null?void 0:y.resolveFilterValue(h.value))!=null?f:h.value})});const s=(n??[]).map(h=>h.id),a=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());o&&a&&l.length&&(s.push("__global__"),l.forEach(h=>{var f;i.push({id:h.id,filterFn:a,resolvedValue:(f=a.resolveFilterValue==null?void 0:a.resolveFilterValue(o))!=null?f:o})}));let c,d;for(let h=0;h<t.flatRows.length;h++){const f=t.flatRows[h];if(f.columnFilters={},r.length)for(let v=0;v<r.length;v++){c=r[v];const y=c.id;f.columnFilters[y]=c.filterFn(f,y,c.resolvedValue,b=>{f.columnFiltersMeta[y]=b})}if(i.length){for(let v=0;v<i.length;v++){d=i[v];const y=d.id;if(d.filterFn(f,y,d.resolvedValue,b=>{f.columnFiltersMeta[y]=b})){f.columnFilters.__global__=!0;break}}f.columnFilters.__global__!==!0&&(f.columnFilters.__global__=!1)}}const u=h=>{for(let f=0;f<s.length;f++)if(h.columnFilters[s[f]]===!1)return!1;return!0};return rv(t.rows,u,e)},_(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function lv(){return e=>R(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const o=e.getState().sorting,r=[],i=o.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),s={};i.forEach(l=>{const c=e.getColumn(l.id);c&&(s[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=l=>{const c=l.map(d=>({...d}));return c.sort((d,u)=>{for(let f=0;f<i.length;f+=1){var h;const v=i[f],y=s[v.id],b=y.sortUndefined,w=(h=v?.desc)!=null?h:!1;let C=0;if(b){const x=d.getValue(v.id),P=u.getValue(v.id),T=x===void 0,k=P===void 0;if(T||k){if(b==="first")return T?-1:1;if(b==="last")return T?1:-1;C=T&&k?0:T?b:-b}}if(C===0&&(C=y.sortingFn(d,u,v.id)),C!==0)return w&&(C*=-1),y.invertSorting&&(C*=-1),C}return d.index-u.index}),c.forEach(d=>{var u;r.push(d),(u=d.subRows)!=null&&u.length&&(d.subRows=a(d.subRows))}),c};return{rows:a(n.rows),flatRows:r,rowsById:n.rowsById}},_(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function xn(e,t){return e?cv(e)?Ue.createElement(e,t):e:null}function cv(e){return uv(e)||typeof e=="function"||dv(e)}function uv(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function dv(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function fv(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=Ue.useState(()=>({current:nv(t)})),[o,r]=Ue.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...o,...e.state},onStateChange:s=>{r(s),e.onStateChange==null||e.onStateChange(s)}})),n.current}const hv=g.css`
1626
+ color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n?.key)}return r}}function _(e,t,n,o){return{debug:()=>{var r;return(r=e?.debugAll)!=null?r:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:o}}function D0(e,t,n,o){const r=()=>{var s;return(s=i.getValue())!=null?s:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(o),renderValue:r,getContext:R(()=>[e,n,t,i],(s,a,l,c)=>({table:s,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),_(e.options,"debugCells","cell.getContext"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(i,n,t,e)},{}),i}function F0(e,t,n,o){var r,i;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(r=(i=a.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?r:typeof a.header=="string"?a.header:void 0,d;if(a.accessorFn?d=a.accessorFn:l&&(l.includes(".")?d=h=>{let f=h;for(const y of l.split(".")){var v;f=(v=f)==null?void 0:v[y],process.env.NODE_ENV!=="production"&&f===void 0&&console.warn(`"${y}" in deeply nested key "${l}" returned undefined.`)}return f}:d=h=>h[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 u={id:`${String(c)}`,accessorFn:d,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:R(()=>[!0],()=>{var h;return[u,...(h=u.columns)==null?void 0:h.flatMap(f=>f.getFlatColumns())]},_(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:R(()=>[e._getOrderColumnsFn()],h=>{var f;if((f=u.columns)!=null&&f.length){let v=u.columns.flatMap(y=>y.getLeafColumns());return h(v)}return[u]},_(e.options,"debugColumns","column.getLeafColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(u,e);return u}const se="debugHeaders";function Ll(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 s=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),s.push(l)};return a(i),s},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(i,e)}),i}const A0={createTable:e=>{e.getHeaderGroups=R(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,r)=>{var i,s;const a=(i=o?.map(u=>n.find(h=>h.id===u)).filter(Boolean))!=null?i:[],l=(s=r?.map(u=>n.find(h=>h.id===u)).filter(Boolean))!=null?s:[],c=n.filter(u=>!(o!=null&&o.includes(u.id))&&!(r!=null&&r.includes(u.id)));return yn(t,[...a,...c,...l],e)},_(e.options,se,"getHeaderGroups")),e.getCenterHeaderGroups=R(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,r)=>(n=n.filter(i=>!(o!=null&&o.includes(i.id))&&!(r!=null&&r.includes(i.id))),yn(t,n,e,"center")),_(e.options,se,"getCenterHeaderGroups")),e.getLeftHeaderGroups=R(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,o)=>{var r;const i=(r=o?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?r:[];return yn(t,i,e,"left")},_(e.options,se,"getLeftHeaderGroups")),e.getRightHeaderGroups=R(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,o)=>{var r;const i=(r=o?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?r:[];return yn(t,i,e,"right")},_(e.options,se,"getRightHeaderGroups")),e.getFooterGroups=R(()=>[e.getHeaderGroups()],t=>[...t].reverse(),_(e.options,se,"getFooterGroups")),e.getLeftFooterGroups=R(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),_(e.options,se,"getLeftFooterGroups")),e.getCenterFooterGroups=R(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),_(e.options,se,"getCenterFooterGroups")),e.getRightFooterGroups=R(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),_(e.options,se,"getRightFooterGroups")),e.getFlatHeaders=R(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),_(e.options,se,"getFlatHeaders")),e.getLeftFlatHeaders=R(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),_(e.options,se,"getLeftFlatHeaders")),e.getCenterFlatHeaders=R(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),_(e.options,se,"getCenterFlatHeaders")),e.getRightFlatHeaders=R(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),_(e.options,se,"getRightFlatHeaders")),e.getCenterLeafHeaders=R(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),_(e.options,se,"getCenterLeafHeaders")),e.getLeftLeafHeaders=R(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),_(e.options,se,"getLeftLeafHeaders")),e.getRightLeafHeaders=R(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),_(e.options,se,"getRightLeafHeaders")),e.getLeafHeaders=R(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,o)=>{var r,i,s,a,l,c;return[...(r=(i=t[0])==null?void 0:i.headers)!=null?r:[],...(s=(a=n[0])==null?void 0:a.headers)!=null?s:[],...(l=(c=o[0])==null?void 0:c.headers)!=null?l:[]].map(d=>d.getLeafHeaders()).flat()},_(e.options,se,"getLeafHeaders"))}};function yn(e,t,n,o){var r,i;let s=0;const a=function(h,f){f===void 0&&(f=1),s=Math.max(s,f),h.filter(v=>v.getIsVisible()).forEach(v=>{var y;(y=v.columns)!=null&&y.length&&a(v.columns,f+1)},0)};a(e);let l=[];const c=(h,f)=>{const v={depth:f,id:[o,`${f}`].filter(Boolean).join("_"),headers:[]},y=[];h.forEach(b=>{const w=[...y].reverse()[0],C=b.column.depth===v.depth;let x,P=!1;if(C&&b.column.parent?x=b.column.parent:(x=b.column,P=!0),w&&w?.column===x)w.subHeaders.push(b);else{const T=Ll(n,x,{id:[o,f,x.id,b?.id].filter(Boolean).join("_"),isPlaceholder:P,placeholderId:P?`${y.filter(k=>k.column===x).length}`:void 0,depth:f,index:y.length});T.subHeaders.push(b),y.push(T)}v.headers.push(b),b.headerGroup=v}),l.push(v),f>0&&c(y,f-1)},d=t.map((h,f)=>Ll(n,h,{depth:s,index:f}));c(d,s-1),l.reverse();const u=h=>h.filter(v=>v.column.getIsVisible()).map(v=>{let y=0,b=0,w=[0];v.subHeaders&&v.subHeaders.length?(w=[],u(v.subHeaders).forEach(x=>{let{colSpan:P,rowSpan:T}=x;y+=P,w.push(T)})):y=1;const C=Math.min(...w);return b=b+C,v.colSpan=y,v.rowSpan=b,{colSpan:y,rowSpan:b}});return u((r=(i=l[0])==null?void 0:i.headers)!=null?r:[]),l}const mr=(e,t,n,o,r,i,s)=>{let a={id:t,index:o,original:n,depth:r,parentId:s,_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:()=>E0(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const d=c.getParentRow();if(!d)break;l.push(d),c=d}return l.reverse()},getAllCells:R(()=>[e.getAllLeafColumns()],l=>l.map(c=>D0(e,a,c,c.id)),_(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:R(()=>[a.getAllCells()],l=>l.reduce((c,d)=>(c[d.column.id]=d,c),{}),_(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},I0={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()}}},Rl=(e,t,n)=>{var o,r;const i=n==null||(o=n.toString())==null?void 0:o.toLowerCase();return!!(!((r=e.getValue(t))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(i))};Rl.autoRemove=e=>Se(e);const _l=(e,t,n)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(n))};_l.autoRemove=e=>Se(e);const Nl=(e,t,n)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===n?.toLowerCase()};Nl.autoRemove=e=>Se(e);const Bl=(e,t,n)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(n)};Bl.autoRemove=e=>Se(e);const zl=(e,t,n)=>!n.some(o=>{var r;return!((r=e.getValue(t))!=null&&r.includes(o))});zl.autoRemove=e=>Se(e)||!(e!=null&&e.length);const Ol=(e,t,n)=>n.some(o=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(o)});Ol.autoRemove=e=>Se(e)||!(e!=null&&e.length);const Hl=(e,t,n)=>e.getValue(t)===n;Hl.autoRemove=e=>Se(e);const jl=(e,t,n)=>e.getValue(t)==n;jl.autoRemove=e=>Se(e);const pr=(e,t,n)=>{let[o,r]=n;const i=e.getValue(t);return i>=o&&i<=r};pr.resolveFilterValue=e=>{let[t,n]=e,o=typeof t!="number"?parseFloat(t):t,r=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(o)?-1/0:o,s=n===null||Number.isNaN(r)?1/0:r;if(i>s){const a=i;i=s,s=a}return[i,s]},pr.autoRemove=e=>Se(e)||Se(e[0])&&Se(e[1]);const Fe={includesString:Rl,includesStringSensitive:_l,equalsString:Nl,arrIncludes:Bl,arrIncludesAll:zl,arrIncludesSome:Ol,equals:Hl,weakEquals:jl,inNumberRange:pr};function Se(e){return e==null||e===""}const L0={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:fe("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=n?.getValue(e.id);return typeof o=="string"?Fe.includesString:typeof o=="number"?Fe.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?Fe.equals:Array.isArray(o)?Fe.arrIncludes:Fe.weakEquals},e.getFilterFn=()=>{var n,o;return vn(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:Fe[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,o,r;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((o=t.options.enableColumnFilters)!=null?o:!0)&&((r=t.options.enableFilters)!=null?r:!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(r=>r.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(o=>{const r=e.getFilterFn(),i=o?.find(d=>d.id===e.id),s=He(n,i?i.value:void 0);if(Gl(r,s,e)){var a;return(a=o?.filter(d=>d.id!==e.id))!=null?a:[]}const l={id:e.id,value:s};if(i){var c;return(c=o?.map(d=>d.id===e.id?l:d))!=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=r=>{var i;return(i=He(t,r))==null?void 0:i.filter(s=>{const a=n.find(l=>l.id===s.id);if(a){const l=a.getFilterFn();if(Gl(l,s.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 Gl(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const gr={sum:(e,t,n)=>n.reduce((o,r)=>{const i=r.getValue(e);return o+(typeof i=="number"?i:0)},0),min:(e,t,n)=>{let o;return n.forEach(r=>{const i=r.getValue(e);i!=null&&(o>i||o===void 0&&i>=i)&&(o=i)}),o},max:(e,t,n)=>{let o;return n.forEach(r=>{const i=r.getValue(e);i!=null&&(o<i||o===void 0&&i>=i)&&(o=i)}),o},extent:(e,t,n)=>{let o,r;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(o===void 0?s>=s&&(o=r=s):(o>s&&(o=s),r<s&&(r=s)))}),[o,r]},mean:(e,t)=>{let n=0,o=0;if(t.forEach(r=>{let i=r.getValue(e);i!=null&&(i=+i)>=i&&(++n,o+=i)}),n)return o/n},median:(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!V0(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),r=n.sort((i,s)=>i-s);return n.length%2!==0?r[o]:(r[o-1]+r[o])/2},unique:(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(n=>n.getValue(e))).size,count:(e,t)=>t.length},R0={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:fe("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(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 gr.sum;if(Object.prototype.toString.call(o)==="[object Date]")return gr.extent},e.getAggregationFn=()=>{var n,o;if(!e)throw new Error;return vn(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:gr[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 r;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((r=n.subRows)!=null&&r.length)}}};function _0(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(s=>s.id===i)).filter(Boolean),...o]}const N0={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:fe("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=R(n=>[Ot(t,n)],n=>n.findIndex(o=>o.id===e.id),_(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var o;return((o=Ot(t,n)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=n=>{var o;const r=Ot(t,n);return((o=r[r.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=R(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,o)=>r=>{let i=[];if(!(t!=null&&t.length))i=r;else{const s=[...t],a=[...r];for(;a.length&&s.length;){const l=s.shift(),c=a.findIndex(d=>d.id===l);c>-1&&i.push(a.splice(c,1)[0])}i=[...i,...a]}return _0(i,n,o)},_(e.options,"debugTable","_getOrderColumnsFn"))}},vr=()=>({left:[],right:[]}),B0={getInitialState:e=>({columnPinning:vr(),...e}),getDefaultOptions:e=>({onColumnPinningChange:fe("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const o=e.getLeafColumns().map(r=>r.id).filter(Boolean);t.setColumnPinning(r=>{var i,s;if(n==="right"){var a,l;return{left:((a=r?.left)!=null?a:[]).filter(u=>!(o!=null&&o.includes(u))),right:[...((l=r?.right)!=null?l:[]).filter(u=>!(o!=null&&o.includes(u))),...o]}}if(n==="left"){var c,d;return{left:[...((c=r?.left)!=null?c:[]).filter(u=>!(o!=null&&o.includes(u))),...o],right:((d=r?.right)!=null?d:[]).filter(u=>!(o!=null&&o.includes(u)))}}return{left:((i=r?.left)!=null?i:[]).filter(u=>!(o!=null&&o.includes(u))),right:((s=r?.right)!=null?s:[]).filter(u=>!(o!=null&&o.includes(u)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var r,i,s;return((r=o.columnDef.enablePinning)!=null?r:!0)&&((i=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:o,right:r}=t.getState().columnPinning,i=n.some(a=>o?.includes(a)),s=n.some(a=>r?.includes(a));return i?"left":s?"right":!1},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();return r?(n=(o=t.getState().columnPinning)==null||(o=o[r])==null?void 0:o.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=R(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,o,r)=>{const i=[...o??[],...r??[]];return n.filter(s=>!i.includes(s.column.id))},_(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=R(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,o)=>(o??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),_(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=R(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,o)=>(o??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),_(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?vr():(n=(o=e.initialState)==null?void 0:o.columnPinning)!=null?n:vr())},e.getIsSomeColumnsPinned=t=>{var n;const o=e.getState().columnPinning;if(!t){var r,i;return!!((r=o.left)!=null&&r.length||(i=o.right)!=null&&i.length)}return!!((n=o[t])!=null&&n.length)},e.getLeftLeafColumns=R(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(o=>t.find(r=>r.id===o)).filter(Boolean),_(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=R(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(o=>t.find(r=>r.id===o)).filter(Boolean),_(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=R(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o)=>{const r=[...n??[],...o??[]];return t.filter(i=>!r.includes(i.id))},_(e.options,"debugColumns","getCenterLeafColumns"))}};function z0(e){return e||(typeof document<"u"?document:null)}const wn={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},yr=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),O0={getDefaultColumnDef:()=>wn,getInitialState:e=>({columnSizing:{},columnSizingInfo:yr(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:fe("columnSizing",e),onColumnSizingInfoChange:fe("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,o,r;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:wn.minSize,(o=i??e.columnDef.size)!=null?o:wn.size),(r=e.columnDef.maxSize)!=null?r:wn.maxSize)},e.getStart=R(n=>[n,Ot(t,n),t.getState().columnSizing],(n,o)=>o.slice(0,e.getIndex(n)).reduce((r,i)=>r+i.getSize(),0),_(t.options,"debugColumns","getStart")),e.getAfter=R(n=>[n,Ot(t,n),t.getState().columnSizing],(n,o)=>o.slice(e.getIndex(n)+1).reduce((r,i)=>r+i.getSize(),0),_(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:o,...r}=n;return r})},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=r=>{if(r.subHeaders.length)r.subHeaders.forEach(o);else{var i;n+=(i=r.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),r=o?.getCanResize();return i=>{if(!o||!r||(i.persist==null||i.persist(),wr(i)&&i.touches&&i.touches.length>1))return;const s=e.getSize(),a=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[o.id,o.getSize()]],l=wr(i)?Math.round(i.touches[0].clientX):i.clientX,c={},d=(w,C)=>{typeof C=="number"&&(t.setColumnSizingInfo(x=>{var P,T;const k=t.options.columnResizeDirection==="rtl"?-1:1,V=(C-((P=x?.startOffset)!=null?P:0))*k,$=Math.max(V/((T=x?.startSize)!=null?T:0),-.999999);return x.columnSizingStart.forEach(A=>{let[I,B]=A;c[I]=Math.round(Math.max(B+B*$,0)*100)/100}),{...x,deltaOffset:V,deltaPercentage:$}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(x=>({...x,...c})))},u=w=>d("move",w),h=w=>{d("end",w),t.setColumnSizingInfo(C=>({...C,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f=z0(n),v={moveHandler:w=>u(w.clientX),upHandler:w=>{f?.removeEventListener("mousemove",v.moveHandler),f?.removeEventListener("mouseup",v.upHandler),h(w.clientX)}},y={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),u(w.touches[0].clientX),!1),upHandler:w=>{var C;f?.removeEventListener("touchmove",y.moveHandler),f?.removeEventListener("touchend",y.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),h((C=w.touches[0])==null?void 0:C.clientX)}},b=H0()?{passive:!1}:!1;wr(i)?(f?.addEventListener("touchmove",y.moveHandler,b),f?.addEventListener("touchend",y.upHandler,b)):(f?.addEventListener("mousemove",v.moveHandler,b),f?.addEventListener("mouseup",v.upHandler,b)),t.setColumnSizingInfo(w=>({...w,startOffset:l,startSize:s,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?yr():(n=e.initialState.columnSizingInfo)!=null?n:yr())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,r)=>o+r.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,r)=>o+r.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,r)=>o+r.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,r)=>o+r.getSize(),0))!=null?t:0}}};let bn=null;function H0(){if(typeof bn=="boolean")return bn;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 bn=e,bn}function wr(e){return e.type==="touchstart"}const j0={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:fe("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 r=e.columns;return(n=r.length?r.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=R(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),_(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=R(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,o,r)=>[...n,...o,...r],_(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,o)=>R(()=>[o(),o().filter(r=>r.getIsVisible()).map(r=>r.id).join("_")],r=>r.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),_(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((r,i)=>({...r,[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 Ot(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const G0={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:fe("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,r,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=t.options.enableGlobalFilter)!=null?o:!0)&&((r=t.options.enableFilters)!=null?r:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Fe.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:o}=e.options;return vn(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[o])!=null?t:Fe[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},K0={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:fe("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var o,r;if(!t){e._queue(()=>{t=!0});return}if((o=(r=e.options.autoResetAll)!=null?r: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 r,i;e.setExpanded(o?{}:(r=(i=e.initialState)==null?void 0:i.expanded)!=null?r:{})},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(r=>!r.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const s=i.split(".");o=Math.max(o,s.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 r;const i=o===!0?!0:!!(o!=null&&o[e.id]);let s={};if(o===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{s[a]=!0}):s=o,n=(r=n)!=null?r:!i,!i&&n)return{...s,[e.id]:!0};if(i&&!n){const{[e.id]:a,...l}=s;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,r;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((o=t.options.enableExpanding)!=null?o:!0)&&!!((r=e.subRows)!=null&&r.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()}}}},br=0,xr=10,Sr=()=>({pageIndex:br,pageSize:xr}),W0={getInitialState:e=>({...e,pagination:{...Sr(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:fe("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var o,r;if(!t){e._queue(()=>{t=!0});return}if((o=(r=e.options.autoResetAll)!=null?r:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=o=>{const r=i=>He(o,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(r)},e.resetPagination=o=>{var r;e.setPagination(o?Sr():(r=e.initialState.pagination)!=null?r:Sr())},e.setPageIndex=o=>{e.setPagination(r=>{let i=He(o,r.pageIndex);const s=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,s)),{...r,pageIndex:i}})},e.resetPageIndex=o=>{var r,i;e.setPageIndex(o?br:(r=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?r:br)},e.resetPageSize=o=>{var r,i;e.setPageSize(o?xr:(r=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?r:xr)},e.setPageSize=o=>{e.setPagination(r=>{const i=Math.max(1,He(o,r.pageSize)),s=r.pageSize*r.pageIndex,a=Math.floor(s/i);return{...r,pageIndex:a,pageSize:i}})},e.setPageCount=o=>e.setPagination(r=>{var i;let s=He(o,(i=e.options.pageCount)!=null?i:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...r,pageCount:s}}),e.getPageOptions=R(()=>[e.getPageCount()],o=>{let r=[];return o&&o>0&&(r=[...new Array(o)].fill(null).map((i,s)=>s)),r},_(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:o}=e.getState().pagination,r=e.getPageCount();return r===-1?!0:r===0?!1:o<r-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}}},Cr=()=>({top:[],bottom:[]}),q0={getInitialState:e=>({rowPinning:Cr(),...e}),getDefaultOptions:e=>({onRowPinningChange:fe("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,o,r)=>{const i=o?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],s=r?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...s,e.id,...i]);t.setRowPinning(l=>{var c,d;if(n==="bottom"){var u,h;return{top:((u=l?.top)!=null?u:[]).filter(y=>!(a!=null&&a.has(y))),bottom:[...((h=l?.bottom)!=null?h:[]).filter(y=>!(a!=null&&a.has(y))),...Array.from(a)]}}if(n==="top"){var f,v;return{top:[...((f=l?.top)!=null?f:[]).filter(y=>!(a!=null&&a.has(y))),...Array.from(a)],bottom:((v=l?.bottom)!=null?v:[]).filter(y=>!(a!=null&&a.has(y)))}}return{top:((c=l?.top)!=null?c:[]).filter(y=>!(a!=null&&a.has(y))),bottom:((d=l?.bottom)!=null?d:[]).filter(y=>!(a!=null&&a.has(y)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:r}=t.options;return typeof o=="function"?o(e):(n=o??r)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:o,bottom:r}=t.getState().rowPinning,i=n.some(a=>o?.includes(a)),s=n.some(a=>r?.includes(a));return i?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var n,o;const r=e.getIsPinned();if(!r)return-1;const i=(n=r==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(s=>{let{id:a}=s;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?Cr():(n=(o=e.initialState)==null?void 0:o.rowPinning)!=null?n:Cr())},e.getIsSomeRowsPinned=t=>{var n;const o=e.getState().rowPinning;if(!t){var r,i;return!!((r=o.top)!=null&&r.length||(i=o.bottom)!=null&&i.length)}return!!((n=o[t])!=null&&n.length)},e._getPinnedRows=(t,n,o)=>{var r;return((r=e.options.keepPinnedRows)==null||r?(n??[]).map(s=>{const a=e.getRow(s,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(s=>t.find(a=>a.id===s))).filter(Boolean).map(s=>({...s,position:o}))},e.getTopRows=R(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),_(e.options,"debugRows","getTopRows")),e.getBottomRows=R(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),_(e.options,"debugRows","getBottomRows")),e.getCenterRows=R(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,o)=>{const r=new Set([...n??[],...o??[]]);return t.filter(i=>!r.has(i.id))},_(e.options,"debugRows","getCenterRows"))}},Y0={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:fe("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const o={...n},r=e.getPreGroupedRowModel().flatRows;return t?r.forEach(i=>{i.getCanSelect()&&(o[i.id]=!0)}):r.forEach(i=>{delete o[i.id]}),o})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),r={...n};return e.getRowModel().rows.forEach(i=>{Tr(r,i.id,o,!0,e)}),r}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=R(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?$r(e,n):{rows:[],flatRows:[],rowsById:{}},_(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=R(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?$r(e,n):{rows:[],flatRows:[],rowsById:{}},_(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=R(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?$r(e,n):{rows:[],flatRows:[],rowsById:{}},_(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(r=>r.getCanSelect()&&!n[r.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(r=>r.getCanSelect()),{rowSelection:n}=e.getState();let o=!!t.length;return o&&t.some(r=>!n[r.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 r=e.getIsSelected();t.setRowSelection(i=>{var s;if(n=typeof n<"u"?n:!r,e.getCanSelect()&&r===n)return i;const a={...i};return Tr(a,e.id,n,(s=o?.selectChildren)!=null?s:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Pr(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return kr(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return kr(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 r;n&&e.toggleSelected((r=o.target)==null?void 0:r.checked)}}}},Tr=(e,t,n,o,r)=>{var i;const s=r.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),s.getCanSelect()&&(e[t]=!0)):delete e[t],o&&(i=s.subRows)!=null&&i.length&&s.getCanSelectSubRows()&&s.subRows.forEach(a=>Tr(e,a.id,n,o,r))};function $r(e,t){const n=e.getState().rowSelection,o=[],r={},i=function(s,a){return s.map(l=>{var c;const d=Pr(l,n);if(d&&(o.push(l),r[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:i(l.subRows)}),d)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:o,rowsById:r}}function Pr(e,t){var n;return(n=t[e.id])!=null?n:!1}function kr(e,t,n){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let r=!0,i=!1;return e.subRows.forEach(s=>{if(!(i&&!r)&&(s.getCanSelect()&&(Pr(s,t)?i=!0:r=!1),s.subRows&&s.subRows.length)){const a=kr(s,t);a==="all"?i=!0:(a==="some"&&(i=!0),r=!1)}}),r?"all":i?"some":!1}const Mr=/([0-9]+)/gm,X0=(e,t,n)=>Ul(je(e.getValue(n)).toLowerCase(),je(t.getValue(n)).toLowerCase()),Z0=(e,t,n)=>Ul(je(e.getValue(n)),je(t.getValue(n))),J0=(e,t,n)=>Vr(je(e.getValue(n)).toLowerCase(),je(t.getValue(n)).toLowerCase()),Q0=(e,t,n)=>Vr(je(e.getValue(n)),je(t.getValue(n))),ev=(e,t,n)=>{const o=e.getValue(n),r=t.getValue(n);return o>r?1:o<r?-1:0},tv=(e,t,n)=>Vr(e.getValue(n),t.getValue(n));function Vr(e,t){return e===t?0:e>t?1:-1}function je(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Ul(e,t){const n=e.split(Mr).filter(Boolean),o=t.split(Mr).filter(Boolean);for(;n.length&&o.length;){const r=n.shift(),i=o.shift(),s=parseInt(r,10),a=parseInt(i,10),l=[s,a].sort();if(isNaN(l[0])){if(r>i)return 1;if(i>r)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return n.length-o.length}const Ht={alphanumeric:X0,alphanumericCaseSensitive:Z0,text:J0,textCaseSensitive:Q0,datetime:ev,basic:tv},nv=[A0,j0,N0,B0,I0,L0,G0,U0,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:fe("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const r of n){const i=r?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return Ht.datetime;if(typeof i=="string"&&(o=!0,i.split(Mr).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 vn(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 r=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(s=>{const a=s?.find(f=>f.id===e.id),l=s?.findIndex(f=>f.id===e.id);let c=[],d,u=i?n:r==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&o?a?d="toggle":d="add":s!=null&&s.length&&l!==s.length-1?d="replace":a?d="toggle":d="replace",d==="toggle"&&(i||r||(d="remove")),d==="add"){var h;c=[...s,{id:e.id,desc:u}],c.splice(0,c.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else d==="toggle"?c=s.map(f=>f.id===e.id?{...f,desc:u}:f):d==="remove"?c=s.filter(f=>f.id!==e.id):c=[{id:e.id,desc:u}];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,r;const i=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==i&&((o=t.options.enableSortingRemoval)==null||o)&&(!(n&&(r=t.options.enableMultiRemove)!=null)||r)?!1:s==="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(r=>r.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(r=>r.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())}},R0,K0,W0,q0,Y0,O0];function ov(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const o=[...nv,...(t=e._features)!=null?t:[]];let r={_features:o};const i=r._features.reduce((h,f)=>Object.assign(h,f.getDefaultOptions==null?void 0:f.getDefaultOptions(r)),{}),s=h=>r.options.mergeOptions?r.options.mergeOptions(i,h):{...i,...h};let l={...{},...(n=e.initialState)!=null?n:{}};r._features.forEach(h=>{var f;l=(f=h.getInitialState==null?void 0:h.getInitialState(l))!=null?f:l});const c=[];let d=!1;const u={_features:o,options:{...i,...e},initialState:l,_queue:h=>{c.push(h),d||(d=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();d=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{r.setState(r.initialState)},setOptions:h=>{const f=He(h,r.options);r.options=s(f)},getState:()=>r.options.state,setState:h=>{r.options.onStateChange==null||r.options.onStateChange(h)},_getRowId:(h,f,v)=>{var y;return(y=r.options.getRowId==null?void 0:r.options.getRowId(h,f,v))!=null?y:`${v?[v.id,f].join("."):f}`},getCoreRowModel:()=>(r._getCoreRowModel||(r._getCoreRowModel=r.options.getCoreRowModel(r)),r._getCoreRowModel()),getRowModel:()=>r.getPaginationRowModel(),getRow:(h,f)=>{let v=(f?r.getPrePaginationRowModel():r.getRowModel()).rowsById[h];if(!v&&(v=r.getCoreRowModel().rowsById[h],!v))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${h}`):new Error;return v},_getDefaultColumnDef:R(()=>[r.options.defaultColumn],h=>{var f;return h=(f=h)!=null?f:{},{header:v=>{const y=v.header.column.columnDef;return y.accessorKey?y.accessorKey:y.accessorFn?y.id:null},cell:v=>{var y,b;return(y=(b=v.renderValue())==null||b.toString==null?void 0:b.toString())!=null?y:null},...r._features.reduce((v,y)=>Object.assign(v,y.getDefaultColumnDef==null?void 0:y.getDefaultColumnDef()),{}),...h}},_(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>r.options.columns,getAllColumns:R(()=>[r._getColumnDefs()],h=>{const f=function(v,y,b){return b===void 0&&(b=0),v.map(w=>{const C=F0(r,w,b,y),x=w;return C.columns=x.columns?f(x.columns,C,b+1):[],C})};return f(h)},_(e,"debugColumns","getAllColumns")),getAllFlatColumns:R(()=>[r.getAllColumns()],h=>h.flatMap(f=>f.getFlatColumns()),_(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:R(()=>[r.getAllFlatColumns()],h=>h.reduce((f,v)=>(f[v.id]=v,f),{}),_(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:R(()=>[r.getAllColumns(),r._getOrderColumnsFn()],(h,f)=>{let v=h.flatMap(y=>y.getLeafColumns());return f(v)},_(e,"debugColumns","getAllLeafColumns")),getColumn:h=>{const f=r._getAllFlatColumnsById()[h];return process.env.NODE_ENV!=="production"&&!f&&console.error(`[Table] Column with id '${h}' does not exist.`),f}};Object.assign(r,u);for(let h=0;h<r._features.length;h++){const f=r._features[h];f==null||f.createTable==null||f.createTable(r)}return r}function rv(){return e=>R(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(r,i,s){i===void 0&&(i=0);const a=[];for(let c=0;c<r.length;c++){const d=mr(e,e._getRowId(r[c],c,s),r[c],c,i,void 0,s?.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,a.push(d),e.options.getSubRows){var l;d.originalSubRows=e.options.getSubRows(r[c],c),(l=d.originalSubRows)!=null&&l.length&&(d.subRows=o(d.originalSubRows,i+1,d))}}return a};return n.rows=o(t),n},_(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function iv(e,t,n){return n.options.filterFromLeafRows?sv(e,t,n):av(e,t,n)}function sv(e,t,n){var o;const r=[],i={},s=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(l,c){c===void 0&&(c=0);const d=[];for(let h=0;h<l.length;h++){var u;let f=l[h];const v=mr(n,f.id,f.original,f.index,f.depth,void 0,f.parentId);if(v.columnFilters=f.columnFilters,(u=f.subRows)!=null&&u.length&&c<s){if(v.subRows=a(f.subRows,c+1),f=v,t(f)&&!v.subRows.length){d.push(f),i[f.id]=f,r.push(f);continue}if(t(f)||v.subRows.length){d.push(f),i[f.id]=f,r.push(f);continue}}else f=v,t(f)&&(d.push(f),i[f.id]=f,r.push(f))}return d};return{rows:a(e),flatRows:r,rowsById:i}}function av(e,t,n){var o;const r=[],i={},s=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(l,c){c===void 0&&(c=0);const d=[];for(let h=0;h<l.length;h++){let f=l[h];if(t(f)){var u;if((u=f.subRows)!=null&&u.length&&c<s){const y=mr(n,f.id,f.original,f.index,f.depth,void 0,f.parentId);y.subRows=a(f.subRows,c+1),f=y}d.push(f),r.push(f),i[f.id]=f}}return d};return{rows:a(e),flatRows:r,rowsById:i}}function lv(){return e=>R(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,o)=>{if(!t.rows.length||!(n!=null&&n.length)&&!o){for(let h=0;h<t.flatRows.length;h++)t.flatRows[h].columnFilters={},t.flatRows[h].columnFiltersMeta={};return t}const r=[],i=[];(n??[]).forEach(h=>{var f;const v=e.getColumn(h.id);if(!v)return;const y=v.getFilterFn();if(!y){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${v.id}.`);return}r.push({id:h.id,filterFn:y,resolvedValue:(f=y.resolveFilterValue==null?void 0:y.resolveFilterValue(h.value))!=null?f:h.value})});const s=(n??[]).map(h=>h.id),a=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());o&&a&&l.length&&(s.push("__global__"),l.forEach(h=>{var f;i.push({id:h.id,filterFn:a,resolvedValue:(f=a.resolveFilterValue==null?void 0:a.resolveFilterValue(o))!=null?f:o})}));let c,d;for(let h=0;h<t.flatRows.length;h++){const f=t.flatRows[h];if(f.columnFilters={},r.length)for(let v=0;v<r.length;v++){c=r[v];const y=c.id;f.columnFilters[y]=c.filterFn(f,y,c.resolvedValue,b=>{f.columnFiltersMeta[y]=b})}if(i.length){for(let v=0;v<i.length;v++){d=i[v];const y=d.id;if(d.filterFn(f,y,d.resolvedValue,b=>{f.columnFiltersMeta[y]=b})){f.columnFilters.__global__=!0;break}}f.columnFilters.__global__!==!0&&(f.columnFilters.__global__=!1)}}const u=h=>{for(let f=0;f<s.length;f++)if(h.columnFilters[s[f]]===!1)return!1;return!0};return iv(t.rows,u,e)},_(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function cv(){return e=>R(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const o=e.getState().sorting,r=[],i=o.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),s={};i.forEach(l=>{const c=e.getColumn(l.id);c&&(s[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=l=>{const c=l.map(d=>({...d}));return c.sort((d,u)=>{for(let f=0;f<i.length;f+=1){var h;const v=i[f],y=s[v.id],b=y.sortUndefined,w=(h=v?.desc)!=null?h:!1;let C=0;if(b){const x=d.getValue(v.id),P=u.getValue(v.id),T=x===void 0,k=P===void 0;if(T||k){if(b==="first")return T?-1:1;if(b==="last")return T?1:-1;C=T&&k?0:T?b:-b}}if(C===0&&(C=y.sortingFn(d,u,v.id)),C!==0)return w&&(C*=-1),y.invertSorting&&(C*=-1),C}return d.index-u.index}),c.forEach(d=>{var u;r.push(d),(u=d.subRows)!=null&&u.length&&(d.subRows=a(d.subRows))}),c};return{rows:a(n.rows),flatRows:r,rowsById:n.rowsById}},_(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function xn(e,t){return e?uv(e)?Ue.createElement(e,t):e:null}function uv(e){return dv(e)||typeof e=="function"||fv(e)}function dv(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function fv(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function hv(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=Ue.useState(()=>({current:ov(t)})),[o,r]=Ue.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...o,...e.state},onStateChange:s=>{r(s),e.onStateChange==null||e.onStateChange(s)}})),n.current}const mv=g.css`
1606
1627
  @media (max-width: 768px) {
1607
1628
  font-size: 0.875rem;
1608
1629
 
@@ -1611,7 +1632,7 @@
1611
1632
  padding: 0.5rem 0.75rem;
1612
1633
  }
1613
1634
  }
1614
- `,mv={default:g.css`
1635
+ `,pv={default:g.css`
1615
1636
  thead tr:last-child th:first-child {
1616
1637
  border-top-left-radius: var(--border-radius-article);
1617
1638
  }
@@ -1662,14 +1683,14 @@
1662
1683
  align-items: center;
1663
1684
  gap: 0.5rem;
1664
1685
  width: 100%;
1665
- `,pv=g.div`
1686
+ `,gv=g.div`
1666
1687
  position: relative;
1667
1688
  border-radius: var(--border-radius-article);
1668
1689
  overflow-y: ${({$maxHeight:e})=>e?"auto":"visible"};
1669
1690
  overflow-x: auto;
1670
1691
  max-height: ${({$maxHeight:e})=>e?typeof e=="number"?`${e}px`:e:"none"};
1671
1692
  max-width: 100%;
1672
- `,gv=g.table`
1693
+ `,vv=g.table`
1673
1694
  width: 100%;
1674
1695
  border-collapse: separate;
1675
1696
  border-spacing: 0;
@@ -1677,9 +1698,9 @@
1677
1698
  border-radius: var(--border-radius-article);
1678
1699
  border: 1px solid var(--color-main-light-borders);
1679
1700
 
1680
- ${({$variant:e})=>mv[e]}
1681
- ${hv}
1682
- `,vv=g.thead`
1701
+ ${({$variant:e})=>pv[e]}
1702
+ ${mv}
1703
+ `,yv=g.thead`
1683
1704
  ${({$sticky:e})=>e&&g.css`
1684
1705
  position: sticky;
1685
1706
  top: 0;
@@ -1718,7 +1739,7 @@
1718
1739
  background-color: var(--color-main-light-borders);
1719
1740
  box-shadow: ${e==="left"?"2px 0 4px rgba(0, 0, 0, 0.3)":"-2px 0 4px rgba(0, 0, 0, 0.3)"};
1720
1741
  }
1721
- `:"",yv={sm:g.css`
1742
+ `:"",wv={sm:g.css`
1722
1743
  ${Qe.sm}
1723
1744
  ${D[12]}
1724
1745
  `,md:g.css`
@@ -1727,10 +1748,10 @@
1727
1748
  `,lg:g.css`
1728
1749
  ${Qe.lg}
1729
1750
  ${D[16]}
1730
- `},wv=g.th`
1751
+ `},bv=g.th`
1731
1752
  background-color: var(--color-main-blue-primary);
1732
1753
  color: var(--color-main-white);
1733
- ${({$size:e})=>yv[e]}
1754
+ ${({$size:e})=>wv[e]}
1734
1755
  transition: background-color 0.3s ease-out, box-shadow 0.3s ease-out, border-color 0.3s ease-out;
1735
1756
  min-width: 8rem;
1736
1757
  width: ${({$width:e})=>e?typeof e=="number"?`${e}px`:e:"fit-content"};
@@ -1768,7 +1789,7 @@
1768
1789
  &:focus-visible {
1769
1790
  outline-color: var(--color-main-white);
1770
1791
  }
1771
- `,bv=g.span`
1792
+ `,xv=g.span`
1772
1793
  display: inline-flex;
1773
1794
  align-items: center;
1774
1795
  justify-content: center;
@@ -1783,7 +1804,7 @@
1783
1804
  ${Xl}:hover & {
1784
1805
  opacity: 1;
1785
1806
  }
1786
- `,xv=g.div`
1807
+ `,Sv=g.div`
1787
1808
  display: flex;
1788
1809
  align-items: center;
1789
1810
  padding: 0.5rem 0.75rem;
@@ -1803,7 +1824,7 @@
1803
1824
  input {
1804
1825
  pointer-events: none;
1805
1826
  }
1806
- `,Vr=m.memo(({value:e,label:t,checked:n,onChange:o})=>{const r=()=>{o(e,!n)};return p.jsx(xv,{onClick:r,children:p.jsx(zt,{id:e,name:e,checked:n,onChange:()=>{},size:"sm",checkboxClassName:"filter-option-checkbox",label:t})})});Vr.displayName="FilterOption";function Er(e,t,n){const o=new Set;return e.forEach((r,i)=>{let s;n?s=n(r,i):s=r[t],s!=null&&o.add(String(s))}),Array.from(o).sort((r,i)=>r.localeCompare(i))}function Dr(e,t,n){const o=n;if(!o||o.length===0)return!0;const r=e.getValue(t);return r!=null?o.includes(String(r)):!1}function Zl(e,t){if(!t||t.trim()==="")return e;const n=t.toLowerCase().trim();return e.filter(o=>o.toLowerCase().includes(n))}function Sv(e,t,n){const o={};return e.forEach((r,i)=>{let s;if(n?s=n(r,i):s=r[t],s!=null){const a=String(s);o[a]=(o[a]||0)+1}}),o}function Cv(e,t){const n=e.find(o=>o.id===t);return n?n.value?.length>0:!1}function Jl(e,t){const n=e.find(o=>o.id===t);return n?n.value||[]:[]}function Tv(e){return e.reduce((t,n)=>{const o=n.value;return t+(o?.length||0)},0)}const $v=g.div`
1827
+ `,Er=m.memo(({value:e,label:t,checked:n,onChange:o})=>{const r=()=>{o(e,!n)};return p.jsx(Sv,{onClick:r,children:p.jsx(zt,{id:e,name:e,checked:n,onChange:()=>{},size:"sm",checkboxClassName:"filter-option-checkbox",label:t})})});Er.displayName="FilterOption";function Dr(e,t,n){const o=new Set;return e.forEach((r,i)=>{let s;n?s=n(r,i):s=r[t],s!=null&&o.add(String(s))}),Array.from(o).sort((r,i)=>r.localeCompare(i))}function Fr(e,t,n){const o=n;if(!o||o.length===0)return!0;const r=e.getValue(t);return r!=null?o.includes(String(r)):!1}function Zl(e,t){if(!t||t.trim()==="")return e;const n=t.toLowerCase().trim();return e.filter(o=>o.toLowerCase().includes(n))}function Cv(e,t,n){const o={};return e.forEach((r,i)=>{let s;if(n?s=n(r,i):s=r[t],s!=null){const a=String(s);o[a]=(o[a]||0)+1}}),o}function Tv(e,t){const n=e.find(o=>o.id===t);return n?n.value?.length>0:!1}function Jl(e,t){const n=e.find(o=>o.id===t);return n?n.value||[]:[]}function $v(e){return e.reduce((t,n)=>{const o=n.value;return t+(o?.length||0)},0)}const Pv=g.div`
1807
1828
  position: fixed;
1808
1829
  right: 0;
1809
1830
  margin-top: 0.25rem;
@@ -1819,23 +1840,23 @@
1819
1840
  display: flex;
1820
1841
  flex-direction: column;
1821
1842
  max-height: 400px;
1822
- `,Pv=g.div`
1843
+ `,kv=g.div`
1823
1844
  flex: 1;
1824
1845
  overflow-y: auto;
1825
1846
  padding: 0.5rem;
1826
1847
  max-height: 280px;
1827
- `,kv=g.div`
1848
+ `,Mv=g.div`
1828
1849
  display: flex;
1829
1850
  gap: 0.5rem;
1830
1851
  padding: 0.75rem;
1831
1852
  border-top: 1px solid var(--color-neutral-200);
1832
1853
  background: var(--color-neutral-50);
1833
- `,Mv=g.div`
1854
+ `,Vv=g.div`
1834
1855
  padding: 0.5rem 0.75rem;
1835
1856
  border-bottom: 1px solid var(--color-neutral-200);
1836
1857
  display: flex;
1837
1858
  gap: 0.5rem;
1838
- `,Vv=g.button`
1859
+ `,Ev=g.button`
1839
1860
  flex: 1;
1840
1861
  padding: 0.375rem 0.5rem;
1841
1862
  font-size: 0.75rem;
@@ -1854,10 +1875,10 @@
1854
1875
  &:active {
1855
1876
  transform: scale(0.98);
1856
1877
  }
1857
- `,Fr=({options:e,selectedValues:t,onChange:n,onClose:o,searchPlaceholder:r="Search...",position:i})=>{const[s,a]=m.useState(""),l=m.useMemo(()=>Zl(e,s),[e,s]),c=m.useMemo(()=>l.length===0?!1:l.every(y=>t.includes(y)),[l,t]),d=m.useCallback((y,b)=>{n(b?[...t,y]:t.filter(w=>w!==y))},[t,n]),u=m.useCallback(()=>{const y=[...new Set([...t,...l])];n(y)},[t,l,n]),h=m.useCallback(()=>{const y=t.filter(b=>!l.includes(b));n(y)},[t,l,n]),f=m.useCallback(()=>{n([])},[n]),v=m.useCallback(()=>{o()},[o]);return p.jsx(p.Fragment,{children:p.jsxs($v,{role:"dialog","aria-labelledby":"column-filter-menu-title","aria-describedby":"column-filter-menu-description",onClick:y=>y.stopPropagation(),style:{top:`${i.top}px`,left:`${i.left}px`},children:[p.jsx("div",{className:"p-2",children:p.jsx(tr,{value:s,onSearch:a,placeholder:r,size:"xs"})}),l.length>0&&p.jsx(Mv,{children:p.jsx(Vv,{onClick:c?h:u,type:"button",children:c?"Deselect All":"Select All"})}),p.jsx(Pv,{children:l.length>0?l.map(y=>p.jsx(Vr,{value:y,label:y,checked:t.includes(y),onChange:d},y)):p.jsx(ht,{children:s?"No matching options":"No options available"})}),p.jsxs(kv,{children:[p.jsx(ft,{variant:"outline",size:"sm",onClick:f,disabled:t.length===0,className:"flex-1",children:"Clear"}),p.jsx(ft,{variant:"primary",size:"sm",onClick:v,className:"flex-1",children:"Close"})]})]})})};Fr.displayName="ColumnFilterMenu";function Ev(e,t,n,o=!0){m.useEffect(()=>{if(!o)return;const r=i=>{const s=i.target;e.current&&!e.current.contains(s)&&!t.current?.contains(s)&&n()};return document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[e,t,n,o])}const Dv=g.div`
1878
+ `,Ar=({options:e,selectedValues:t,onChange:n,onClose:o,searchPlaceholder:r="Search...",position:i})=>{const[s,a]=m.useState(""),l=m.useMemo(()=>Zl(e,s),[e,s]),c=m.useMemo(()=>l.length===0?!1:l.every(y=>t.includes(y)),[l,t]),d=m.useCallback((y,b)=>{n(b?[...t,y]:t.filter(w=>w!==y))},[t,n]),u=m.useCallback(()=>{const y=[...new Set([...t,...l])];n(y)},[t,l,n]),h=m.useCallback(()=>{const y=t.filter(b=>!l.includes(b));n(y)},[t,l,n]),f=m.useCallback(()=>{n([])},[n]),v=m.useCallback(()=>{o()},[o]);return p.jsx(p.Fragment,{children:p.jsxs(Pv,{role:"dialog","aria-labelledby":"column-filter-menu-title","aria-describedby":"column-filter-menu-description",onClick:y=>y.stopPropagation(),style:{top:`${i.top}px`,left:`${i.left}px`},children:[p.jsx("div",{className:"p-2",children:p.jsx(tr,{value:s,onSearch:a,placeholder:r,size:"xs"})}),l.length>0&&p.jsx(Vv,{children:p.jsx(Ev,{onClick:c?h:u,type:"button",children:c?"Deselect All":"Select All"})}),p.jsx(kv,{children:l.length>0?l.map(y=>p.jsx(Er,{value:y,label:y,checked:t.includes(y),onChange:d},y)):p.jsx(ht,{children:s?"No matching options":"No options available"})}),p.jsxs(Mv,{children:[p.jsx(ft,{variant:"outline",size:"sm",onClick:f,disabled:t.length===0,className:"flex-1",children:"Clear"}),p.jsx(ft,{variant:"primary",size:"sm",onClick:v,className:"flex-1",children:"Close"})]})]})})};Ar.displayName="ColumnFilterMenu";function Dv(e,t,n,o=!0){m.useEffect(()=>{if(!o)return;const r=i=>{const s=i.target;e.current&&!e.current.contains(s)&&!t.current?.contains(s)&&n()};return document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[e,t,n,o])}const Fv=g.div`
1858
1879
  position: relative;
1859
1880
  display: inline-flex;
1860
- `,Fv=g(ft)`
1881
+ `,Av=g(ft)`
1861
1882
  min-height: auto;
1862
1883
  padding: 0.25rem;
1863
1884
  border: none;
@@ -1880,12 +1901,12 @@
1880
1901
  ${({$isActive:e})=>e&&`
1881
1902
  opacity: 1;
1882
1903
  `}
1883
- `,Sn=({column:e,uniqueValues:t,selectedValues:n,onChange:o})=>{const[r,i]=m.useState(!1),[s,a]=m.useState({top:0,left:0}),l=m.useRef(null),c=m.useRef(null),d=n.length>0,u=()=>{if(l.current){const y=l.current.getBoundingClientRect(),b=200,C=window.innerWidth-y.right<b;a({top:y.bottom+4,left:C?y.left:y.right-b})}},h=()=>{r||u(),i(y=>!y)},f=()=>{i(!1)},v=y=>{o(y)};return m.useEffect(()=>{const y=b=>{b.key==="Escape"&&r&&f()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),Ev(l,c,f,r),p.jsxs(Dv,{ref:l,onClick:y=>y.stopPropagation(),children:[p.jsx(Fv,{size:"sm",onClick:h,"aria-label":`Filter ${e.id}`,"aria-expanded":r,$isActive:d,leftIcon:p.jsx(U,{component:d?Rp:_p,size:16,"aria-hidden":"true",color:"white"})}),r&&Vn.createPortal(p.jsx("div",{ref:c,children:p.jsx(Fr,{options:t,selectedValues:n,onChange:v,onClose:f,searchPlaceholder:`Search ${e.id}...`,position:s})}),document.body)]})};Sn.displayName="ColumnFilter";const Ql=e=>{const{columnFilters:t,setColumnFilters:n}=pt(),o=Jl(t,e),r=m.useCallback(i=>{const s=[...t],a=s.findIndex(l=>l.id===e);i.length>0?a>=0?s[a]={id:e,value:i}:s.push({id:e,value:i}):a>=0&&s.splice(a,1),n(s)},[t,e,n]);return{selectedValues:o,handleChange:r}},ec=g.div`
1904
+ `,Sn=({column:e,uniqueValues:t,selectedValues:n,onChange:o})=>{const[r,i]=m.useState(!1),[s,a]=m.useState({top:0,left:0}),l=m.useRef(null),c=m.useRef(null),d=n.length>0,u=()=>{if(l.current){const y=l.current.getBoundingClientRect(),b=200,C=window.innerWidth-y.right<b;a({top:y.bottom+4,left:C?y.left:y.right-b})}},h=()=>{r||u(),i(y=>!y)},f=()=>{i(!1)},v=y=>{o(y)};return m.useEffect(()=>{const y=b=>{b.key==="Escape"&&r&&f()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),Dv(l,c,f,r),p.jsxs(Fv,{ref:l,onClick:y=>y.stopPropagation(),children:[p.jsx(Av,{size:"sm",onClick:h,"aria-label":`Filter ${e.id}`,"aria-expanded":r,$isActive:d,leftIcon:p.jsx(U,{component:d?Rp:_p,size:16,"aria-hidden":"true",color:"white"})}),r&&Vn.createPortal(p.jsx("div",{ref:c,children:p.jsx(Ar,{options:t,selectedValues:n,onChange:v,onClose:f,searchPlaceholder:`Search ${e.id}...`,position:s})}),document.body)]})};Sn.displayName="ColumnFilter";const Ql=e=>{const{columnFilters:t,setColumnFilters:n}=pt(),o=Jl(t,e),r=m.useCallback(i=>{const s=[...t],a=s.findIndex(l=>l.id===e);i.length>0?a>=0?s[a]={id:e,value:i}:s.push({id:e,value:i}):a>=0&&s.splice(a,1),n(s)},[t,e,n]);return{selectedValues:o,handleChange:r}},ec=g.div`
1884
1905
  display: flex;
1885
1906
  align-items: center;
1886
1907
  gap: 0.25rem;
1887
1908
  width: 100%;
1888
- `,tc=({header:e})=>{const{size:t,getUniqueValues:n}=pt(),{selectedValues:o,handleChange:r}=Ql(e.column.id),i=e.column.columnDef.meta,s=e.column.getCanSort()&&i?.sortable!==!1,a=i?.filterable!==!1&&e.column.getCanFilter(),l=e.column.getIsSorted(),c=l||"none",d=e.column.id,u=a?n(d):[],h=e.column.getIsPinned(),f=h?e.column.getStart(h):0;return p.jsx(wv,{$size:i?.size||t,$active:!!l,colSpan:e.colSpan,$width:e.getSize(),$pinned:h||!1,$pinnedOffset:f,children:s?p.jsxs("section",{className:"flex",onClick:e.column.getToggleSortingHandler(),children:[p.jsx(Xl,{onClick:e.column.getToggleSortingHandler(),type:"button","aria-label":`Sort by ${xn(e.column.columnDef.header,e.getContext())}`,"aria-sort":c==="asc"?"ascending":c==="desc"?"descending":"none",children:p.jsx(Yl,{$align:i?.align,children:p.jsxs(ec,{children:[xn(e.column.columnDef.header,e.getContext()),p.jsx(bv,{$direction:c,children:c==="none"?p.jsx(U,{component:Fp,size:"tn"}):p.jsx(U,{component:Ep,size:"tn"})})]})})}),a&&p.jsx(Sn,{column:e.column,uniqueValues:u,selectedValues:o,onChange:r})]}):p.jsx(Yl,{$align:i?.align,children:p.jsxs(ec,{children:[xn(e.column.columnDef.header,e.getContext()),a&&p.jsx(Sn,{column:e.column,uniqueValues:u,selectedValues:o,onChange:r})]})})})},nc=({headerGroup:e})=>p.jsx(Wl,{children:e.headers.map(t=>p.jsx(tc,{header:t},t.id))}),oc=({headerGroups:e,stickyHeader:t,className:n})=>p.jsx(vv,{$sticky:t,className:n,children:e.map(o=>p.jsx(nc,{headerGroup:o},o.id))}),Av={sm:g.css`
1909
+ `,tc=({header:e})=>{const{size:t,getUniqueValues:n}=pt(),{selectedValues:o,handleChange:r}=Ql(e.column.id),i=e.column.columnDef.meta,s=e.column.getCanSort()&&i?.sortable!==!1,a=i?.filterable!==!1&&e.column.getCanFilter(),l=e.column.getIsSorted(),c=l||"none",d=e.column.id,u=a?n(d):[],h=e.column.getIsPinned(),f=h?e.column.getStart(h):0;return p.jsx(bv,{$size:i?.size||t,$active:!!l,colSpan:e.colSpan,$width:e.getSize(),$pinned:h||!1,$pinnedOffset:f,children:s?p.jsxs("section",{className:"flex",onClick:e.column.getToggleSortingHandler(),children:[p.jsx(Xl,{onClick:e.column.getToggleSortingHandler(),type:"button","aria-label":`Sort by ${xn(e.column.columnDef.header,e.getContext())}`,"aria-sort":c==="asc"?"ascending":c==="desc"?"descending":"none",children:p.jsx(Yl,{$align:i?.align,children:p.jsxs(ec,{children:[xn(e.column.columnDef.header,e.getContext()),p.jsx(xv,{$direction:c,children:c==="none"?p.jsx(U,{component:Fp,size:"tn"}):p.jsx(U,{component:Ep,size:"tn"})})]})})}),a&&p.jsx(Sn,{column:e.column,uniqueValues:u,selectedValues:o,onChange:r})]}):p.jsx(Yl,{$align:i?.align,children:p.jsxs(ec,{children:[xn(e.column.columnDef.header,e.getContext()),a&&p.jsx(Sn,{column:e.column,uniqueValues:u,selectedValues:o,onChange:r})]})})})},nc=({headerGroup:e})=>p.jsx(Wl,{children:e.headers.map(t=>p.jsx(tc,{header:t},t.id))}),oc=({headerGroups:e,stickyHeader:t,className:n})=>p.jsx(yv,{$sticky:t,className:n,children:e.map(o=>p.jsx(nc,{headerGroup:o},o.id))}),Iv={sm:g.css`
1889
1910
  ${Qe.sm}
1890
1911
  ${D[14]}
1891
1912
  `,md:g.css`
@@ -1894,7 +1915,7 @@
1894
1915
  `,lg:g.css`
1895
1916
  ${Qe.lg}
1896
1917
  ${D[16]}
1897
- `},Iv=g.td`
1918
+ `},Lv=g.td`
1898
1919
  ${({$width:e})=>e?g.css`
1899
1920
  min-width: ${typeof e=="number"?`${e}px`:e};
1900
1921
  width: ${typeof e=="number"?`${e}px`:e};
@@ -1906,7 +1927,7 @@
1906
1927
 
1907
1928
  vertical-align: middle;
1908
1929
  color: var(--color-main-blue-primary);
1909
- ${({$size:e})=>Av[e]}
1930
+ ${({$size:e})=>Iv[e]}
1910
1931
  text-align: ${({$align:e})=>e||"left"};
1911
1932
  border-left: 1px solid var(--color-main-light-borders);
1912
1933
  border-top: 1px solid var(--color-main-light-borders);
@@ -1920,12 +1941,12 @@
1920
1941
  background-color: var(--color-main-alternative-secondary);
1921
1942
  }
1922
1943
  `}
1923
- `,Lv=g.section`
1944
+ `,Rv=g.section`
1924
1945
  ${Kl};
1925
1946
  justify-content: ${({$align:e})=>e==="center"?"center":e==="right"?"flex-end":"flex-start"};
1926
1947
 
1927
1948
  width: 100%;
1928
- `,Rv=g.span`
1949
+ `,_v=g.span`
1929
1950
  width: 100%;
1930
1951
  ${({$ellipsis:e})=>e&&g.css`
1931
1952
  min-width: 0;
@@ -1933,14 +1954,14 @@
1933
1954
  text-overflow: ellipsis;
1934
1955
  white-space: nowrap;
1935
1956
  `}
1936
- `,rc=({cell:e,rowClassName:t})=>{const{size:n}=pt(),o=e.column.columnDef.meta,r=e.getValue(),i=typeof r=="string"||typeof r=="number"?String(r):void 0,s=[o?.className||"",t||""].filter(Boolean).join(" "),a=e.column.getIsPinned(),l=a?e.column.getStart(a):0;return p.jsx(Iv,{$size:o?.size||n,$align:o?.align,$width:e.column.getSize(),$pinned:a||!1,$pinnedOffset:l,title:o?.ellipsis&&i?i:void 0,className:s,children:p.jsx(Lv,{$align:o?.align,children:p.jsx(Rv,{$ellipsis:o?.ellipsis,children:xn(e.column.columnDef.cell,e.getContext())})})})};function _v({row:e,className:t,cellClassName:n}){const{onRowClick:o}=pt(),r=!!o;return p.jsx(Wl,{$clickable:r,onClick:()=>r&&o(e.original),role:r?"button":void 0,tabIndex:r?0:void 0,className:t,children:e.getVisibleCells().map(i=>p.jsx(rc,{cell:i,rowClassName:n},i.id))})}const ic=m.memo(_v),Nv=g.keyframes`
1957
+ `,rc=({cell:e,rowClassName:t})=>{const{size:n}=pt(),o=e.column.columnDef.meta,r=e.getValue(),i=typeof r=="string"||typeof r=="number"?String(r):void 0,s=[o?.className||"",t||""].filter(Boolean).join(" "),a=e.column.getIsPinned(),l=a?e.column.getStart(a):0;return p.jsx(Lv,{$size:o?.size||n,$align:o?.align,$width:e.column.getSize(),$pinned:a||!1,$pinnedOffset:l,title:o?.ellipsis&&i?i:void 0,className:s,children:p.jsx(Rv,{$align:o?.align,children:p.jsx(_v,{$ellipsis:o?.ellipsis,children:xn(e.column.columnDef.cell,e.getContext())})})})};function Nv({row:e,className:t,cellClassName:n}){const{onRowClick:o}=pt(),r=!!o;return p.jsx(Wl,{$clickable:r,onClick:()=>r&&o(e.original),role:r?"button":void 0,tabIndex:r?0:void 0,className:t,children:e.getVisibleCells().map(i=>p.jsx(rc,{cell:i,rowClassName:n},i.id))})}const ic=m.memo(Nv),Bv=g.keyframes`
1937
1958
  0% {
1938
1959
  background-position: -1000px 0;
1939
1960
  }
1940
1961
  100% {
1941
1962
  background-position: 1000px 0;
1942
1963
  }
1943
- `,Bv=g.td`
1964
+ `,zv=g.td`
1944
1965
  ${({$size:e="md"})=>Qe[e]}
1945
1966
  background: linear-gradient(
1946
1967
  90deg,
@@ -1949,7 +1970,7 @@
1949
1970
  var(--color-light-200) 100%
1950
1971
  );
1951
1972
  background-size: 1000px 100%;
1952
- animation: ${Nv} 2s ease-in-out infinite;
1973
+ animation: ${Bv} 2s ease-in-out infinite;
1953
1974
  border-bottom: 1px solid var(--color-light-200);
1954
1975
 
1955
1976
  &::before {
@@ -1960,11 +1981,11 @@
1960
1981
  border-radius: var(--border-radius-sm, 4px);
1961
1982
  background-color: var(--color-light-300);
1962
1983
  }
1963
- `,zv=g.tr`
1984
+ `,Ov=g.tr`
1964
1985
  &:hover {
1965
1986
  background-color: transparent;
1966
1987
  }
1967
- `,Ov=e=>{const t=["60%","75%","85%","70%","80%"];return t[e%t.length]},Hv=({columnCount:e,cellWidths:t,size:n="md"})=>p.jsx(zv,{role:"row","aria-busy":"true",children:Array.from({length:e}).map((o,r)=>p.jsx(Bv,{$width:t?.[r]||Ov(r),$size:n},r))}),Cn=({rows:e,className:t,rowClassName:n,cellClassName:o,isLoading:r=!1,rowCount:i=5,columnCount:s=3})=>{const{size:a}=pt();return p.jsx("tbody",{className:t,"aria-busy":r,children:r?Array.from({length:i}).map((l,c)=>p.jsx(Hv,{columnCount:s,size:a},`skeleton-${c}`)):p.jsxs(p.Fragment,{children:[e.map(l=>{const c=typeof n=="function"?n(l):n,d=typeof o=="function"?o(l):o;return p.jsx(ic,{row:l,className:c,cellClassName:d},l.id)}),e.length===0&&p.jsx("tr",{children:p.jsx("td",{colSpan:100,className:"text-main-grey py-4 text-center",children:"No results found"})})]})})},jv=g.section`
1988
+ `,Hv=e=>{const t=["60%","75%","85%","70%","80%"];return t[e%t.length]},jv=({columnCount:e,cellWidths:t,size:n="md"})=>p.jsx(Ov,{role:"row","aria-busy":"true",children:Array.from({length:e}).map((o,r)=>p.jsx(zv,{$width:t?.[r]||Hv(r),$size:n},r))}),Cn=({rows:e,className:t,rowClassName:n,cellClassName:o,isLoading:r=!1,rowCount:i=5,columnCount:s=3})=>{const{size:a}=pt();return p.jsx("tbody",{className:t,"aria-busy":r,children:r?Array.from({length:i}).map((l,c)=>p.jsx(jv,{columnCount:s,size:a},`skeleton-${c}`)):p.jsxs(p.Fragment,{children:[e.map(l=>{const c=typeof n=="function"?n(l):n,d=typeof o=="function"?o(l):o;return p.jsx(ic,{row:l,className:c,cellClassName:d},l.id)}),e.length===0&&p.jsx("tr",{children:p.jsx("td",{colSpan:100,className:"text-main-grey py-4 text-center",children:"No results found"})})]})})},Gv=g.section`
1968
1989
  display: flex;
1969
1990
  align-items: center;
1970
1991
  gap: 0.5rem;
@@ -2019,9 +2040,9 @@
2019
2040
  height: 1rem;
2020
2041
  }
2021
2042
  }
2022
- `,Gv=g(sc)`
2043
+ `,Uv=g(sc)`
2023
2044
  min-width: 2rem;
2024
- `,Uv=g.span`
2045
+ `,Kv=g.span`
2025
2046
  ${D[14]}
2026
2047
  display: flex;
2027
2048
  align-items: center;
@@ -2030,7 +2051,7 @@
2030
2051
  height: 2rem;
2031
2052
  color: var(--color-main-blue-primary);
2032
2053
  user-select: none;
2033
- `,Kv=g.div`
2054
+ `,Wv=g.div`
2034
2055
  display: flex;
2035
2056
  align-items: center;
2036
2057
  gap: 0.5rem;
@@ -2049,7 +2070,7 @@
2049
2070
  justify-content: center;
2050
2071
  order: 10; /* Move to bottom on mobile */
2051
2072
  }
2052
- `,Wv=g(gn)`
2073
+ `,qv=g(gn)`
2053
2074
  button {
2054
2075
  ${D[14]}
2055
2076
  height: 2rem;
@@ -2065,7 +2086,7 @@
2065
2086
  div {
2066
2087
  right: 10%;
2067
2088
  }
2068
- `,qv=({onPageChange:e,onPerPageChange:t,perPage:n=10,page:o=1,totalPages:r,totalRecords:i,rowsPerPageOptions:s})=>{const l=(()=>{const f=[];if(r<=7)for(let y=1;y<=r;y++)f.push(y);else{f.push(1),o>3&&f.push("...");const y=Math.max(2,o-1),b=Math.min(r-1,o+1);for(let w=y;w<=b;w++)f.push(w);o<r-2&&f.push("..."),f.push(r)}return f})(),c=[{value:10,label:"10"},{value:25,label:"25"},{value:50,label:"50"},{value:100,label:"100"}],d=i!==void 0&&i>0,u=d?(o-1)*n+1:0,h=d?Math.min(o*n,i):0;return p.jsxs(jv,{children:[d&&p.jsxs(ht,{size:14,children:["Showing ",u,"-",h," of ",i]}),p.jsxs(ac,{onClick:()=>e(o-1),$disabled:o===1,disabled:o===1,"aria-label":"Previous page",children:[p.jsx(jp,{size:24}),"Previous"]}),l.map((f,v)=>f==="..."?p.jsx(Uv,{children:"..."},`ellipsis-${v}`):p.jsx(Gv,{onClick:()=>e(f),$active:o===f,"aria-label":`Go to page ${f}`,"aria-current":o===f?"page":void 0,children:f},f)),p.jsxs(ac,{onClick:()=>e(o+1),$disabled:o===r,disabled:o===r,"aria-label":"Next page",children:["Next",p.jsx(Gp,{size:24})]}),p.jsxs(Kv,{children:[p.jsx(Wv,{size:"sm",value:n,options:s||c,onOptionSelect:f=>t(Number(f.value))}),p.jsx(ht,{size:12,children:"Rows per page"})]})]})},lc=({sorting:e,defaultSorting:t=[],onSortingChange:n})=>{const[o,r]=m.useState(t),i=e!==void 0,s=i?e:o,a=m.useCallback(c=>{const d=typeof c=="function"?c(s):c;i||r(d),n?.(d)},[i,s,n]),l=m.useCallback(c=>{i||r(c),n?.(c)},[i,n]);return{sortingState:s,handleSortingChange:a,isControlled:i,setSorting:l}},cc=({columnFilters:e,defaultColumnFilters:t=[],onColumnFiltersChange:n})=>{const[o,r]=m.useState(t),i=e!==void 0,s=i?e:o,a=m.useCallback(c=>{const d=typeof c=="function"?c(s):c;i||r(d),n?.(d)},[i,s,n]),l=m.useCallback(c=>{i||r(c),n?.(c)},[i,n]);return{columnFiltersState:s,handleColumnFiltersChange:a,isControlled:i,setColumnFilters:l}},uc=m.createContext(void 0),pt=()=>{const e=m.useContext(uc);if(!e)throw new Error("useTableContext debe usarse dentro de Table");return e},Ar=e=>{if(e.id)return e.id;if("accessorKey"in e&&e.accessorKey)return String(e.accessorKey)},dc=({data:e,columns:t,size:n="md",variant:o="default",stickyHeader:r=!1,maxHeight:i,sorting:s,defaultSorting:a,onSortingChange:l,columnFilters:c,defaultColumnFilters:d,onColumnFiltersChange:u,onRowClick:h,classNames:f,enableSorting:v=!0,manualSorting:y=!1,enableFiltering:b=!0,manualFiltering:w=!1,isLoading:C=!1,getUniqueValues:x})=>{const{sortingState:P,handleSortingChange:T,setSorting:k}=lc({sorting:s,defaultSorting:a,onSortingChange:l}),{columnFiltersState:V,handleColumnFiltersChange:$,setColumnFilters:A}=cc({columnFilters:c,defaultColumnFilters:d,onColumnFiltersChange:u}),I=m.useMemo(()=>{if(x)return null;const z=new Map;return t.forEach(N=>{const L=Ar(N);if(!L)return;const j="accessorFn"in N?N.accessorFn:void 0;z.set(L,Er(e,L,j))}),z},[e,t,x]),B=m.useMemo(()=>x||(z=>I?.get(z)||[]),[I,x]),H=m.useMemo(()=>t.map(z=>{const N=z.meta,L=N?.filterable!==!1,j={...z};return b&&L&&!z.filterFn&&(j.filterFn=Dr),N?.pinned&&(j.enablePinning=!0),j}),[t,b]),M=fv({data:e,columns:H,state:{sorting:P,columnFilters:V,columnPinning:{left:t.filter(z=>z.meta?.pinned==="left").map(z=>Ar(z)).filter(z=>z!==void 0),right:t.filter(z=>z.meta?.pinned==="right").map(z=>Ar(z)).filter(z=>z!==void 0)}},onSortingChange:T,onColumnFiltersChange:$,getCoreRowModel:ov(),getSortedRowModel:y?void 0:lv(),getFilteredRowModel:w?void 0:av(),enableSorting:v,enableSortingRemoval:!0,manualSorting:y,enableColumnFilters:b,manualFiltering:w,filterFns:{multiSelect:Dr},globalFilterFn:"includesString",enableColumnPinning:!0}),F={size:n,variant:o,sorting:P,setSorting:k,columnFilters:V,setColumnFilters:A,getUniqueValues:B,onRowClick:h};return p.jsx(uc.Provider,{value:F,children:p.jsx(pv,{$maxHeight:i,$stickyHeader:r,className:f?.wrapper,children:p.jsxs(gv,{$variant:o,className:f?.table,children:[p.jsx(oc,{headerGroups:M.getHeaderGroups(),stickyHeader:r,className:f?.header}),C?p.jsx(Cn,{rows:[],isLoading:!0,rowCount:5,columnCount:t.length,className:f?.body}):e.length===0?p.jsx(Cn,{rows:[],className:f?.body,rowClassName:f?.row}):p.jsx(Cn,{rows:M.getRowModel().rows,className:f?.body,rowClassName:f?.row,cellClassName:f?.cell})]})})})};dc.displayName="Table";function fc(e){const t={};for(const n of e)t[n.id]=n.desc?"desc":"asc";return t}function Yv(e){return Object.entries(e).map(([t,n])=>({id:t,desc:n==="desc"}))}function hc(e){return e.length===0?"":JSON.stringify(fc(e))}function Xv(e){const t=new URLSearchParams;return e.sorting&&e.sorting.length>0&&t.append("sorts",hc(e.sorting)),e.perPage&&t.append("perPage",e.perPage.toString()),e.genericSearch&&t.append("genericSearch",e.genericSearch),e.filters&&Object.keys(e.filters).length>0&&t.append("filters",JSON.stringify(e.filters)),t}const Zv=({data:e,columns:t,initialPage:n=1,initialPerPage:o=10,initialSorting:r=[],initialColumnFilters:i=[]})=>{const[s,a]=m.useState(n),[l,c]=m.useState(o),[d,u]=m.useState(r),[h,f]=m.useState(i),v=m.useMemo(()=>{const $=new Map;return t.forEach(A=>{const I=A.id??("accessorKey"in A&&A.accessorKey?String(A.accessorKey):void 0);if(!I)return;const B="accessorFn"in A?A.accessorFn:void 0;$.set(I,Er(e,I,B))}),$},[e,t]),y=m.useMemo(()=>$=>v.get($)||[],[v]),b=m.useMemo(()=>h.length===0?e:e.filter($=>h.every(A=>{const I=A.value;if(!I||I.length===0)return!0;const B=$[A.id];return B==null?!1:I.includes(String(B))})),[e,h]),w=m.useMemo(()=>d.length===0?b:[...b].sort(($,A)=>{for(const I of d){const B=$[I.id],H=A[I.id];if(B==null&&H==null)continue;if(B==null)return I.desc?-1:1;if(H==null)return I.desc?1:-1;let M=0;if(typeof B=="string"&&typeof H=="string"?M=B.localeCompare(H):typeof B=="number"&&typeof H=="number"?M=B-H:M=String(B).localeCompare(String(H)),M!==0)return I.desc?-M:M}return 0}),[b,d]),C=m.useMemo(()=>{const $=(s-1)*l,A=$+l;return w.slice($,A)},[w,s,l]),x=e.length,P=w.length,T=Math.max(1,Math.ceil(P/l)),k=m.useCallback($=>{a(Math.min($,T))},[T]),V=m.useCallback($=>{c($),a(1)},[]);return m.useMemo(()=>{s>T&&a(1)},[s,T]),{paginatedData:C,processedData:w,page:s,perPage:l,totalPages:T,totalRecords:x,filteredRecords:P,setPage:k,setPerPage:V,sorting:d,setSorting:u,columnFilters:h,setColumnFilters:f,getUniqueValues:y}};function mc(e){const t={};return e.forEach(n=>{t[n.id]=n.value}),t}function pc(e){return JSON.stringify(mc(e))}function Jv(e,t=","){const n={};return e.forEach(o=>{const r=o.value;r&&r.length>0&&(n[`filter[${o.id}]`]=r.join(t))}),n}function Qv(e){const t={};return e.forEach(n=>{const o=n.value;o&&o.length>0&&(t[`filter[${n.id}]`]=o)}),t}function ey({filters:e,sorts:t,page:n,perPage:o}){const r={};if(n!==void 0&&(r.page=n),o!==void 0&&(r.per_page=o),t&&t.length>0){const i=t.map(a=>a.id).join(","),s=t.map(a=>a.desc?"desc":"asc").join(",");r.sort_by=i,r.sort_order=s}return e&&e.length>0&&(r.filters=pc(e)),r}function ty(e,t=","){const n=typeof e=="string"?new URLSearchParams(e):e,o=[];return n.forEach((r,i)=>{const s=i.match(/^filter\[(.+)\]$/);if(s){const a=s[1],l=r.split(t).filter(Boolean);l.length>0&&o.push({id:a,value:l})}}),o}function ny(e){try{const t=JSON.parse(e);return Object.entries(t).map(([n,o])=>({id:n,value:o}))}catch{return[]}}function oy(...e){const t=new Map;return e.forEach(n=>{n.forEach(o=>{t.set(o.id,o.value)})}),Array.from(t.entries()).map(([n,o])=>({id:n,value:o}))}const ry=g.div`
2089
+ `,Yv=({onPageChange:e,onPerPageChange:t,perPage:n=10,page:o=1,totalPages:r,totalRecords:i,rowsPerPageOptions:s})=>{const l=(()=>{const f=[];if(r<=7)for(let y=1;y<=r;y++)f.push(y);else{f.push(1),o>3&&f.push("...");const y=Math.max(2,o-1),b=Math.min(r-1,o+1);for(let w=y;w<=b;w++)f.push(w);o<r-2&&f.push("..."),f.push(r)}return f})(),c=[{value:10,label:"10"},{value:25,label:"25"},{value:50,label:"50"},{value:100,label:"100"}],d=i!==void 0&&i>0,u=d?(o-1)*n+1:0,h=d?Math.min(o*n,i):0;return p.jsxs(Gv,{children:[d&&p.jsxs(ht,{size:14,children:["Showing ",u,"-",h," of ",i]}),p.jsxs(ac,{onClick:()=>e(o-1),$disabled:o===1,disabled:o===1,"aria-label":"Previous page",children:[p.jsx(jp,{size:24}),"Previous"]}),l.map((f,v)=>f==="..."?p.jsx(Kv,{children:"..."},`ellipsis-${v}`):p.jsx(Uv,{onClick:()=>e(f),$active:o===f,"aria-label":`Go to page ${f}`,"aria-current":o===f?"page":void 0,children:f},f)),p.jsxs(ac,{onClick:()=>e(o+1),$disabled:o===r,disabled:o===r,"aria-label":"Next page",children:["Next",p.jsx(Gp,{size:24})]}),p.jsxs(Wv,{children:[p.jsx(qv,{size:"sm",value:n,options:s||c,onOptionSelect:f=>t(Number(f.value))}),p.jsx(ht,{size:12,children:"Rows per page"})]})]})},lc=({sorting:e,defaultSorting:t=[],onSortingChange:n})=>{const[o,r]=m.useState(t),i=e!==void 0,s=i?e:o,a=m.useCallback(c=>{const d=typeof c=="function"?c(s):c;i||r(d),n?.(d)},[i,s,n]),l=m.useCallback(c=>{i||r(c),n?.(c)},[i,n]);return{sortingState:s,handleSortingChange:a,isControlled:i,setSorting:l}},cc=({columnFilters:e,defaultColumnFilters:t=[],onColumnFiltersChange:n})=>{const[o,r]=m.useState(t),i=e!==void 0,s=i?e:o,a=m.useCallback(c=>{const d=typeof c=="function"?c(s):c;i||r(d),n?.(d)},[i,s,n]),l=m.useCallback(c=>{i||r(c),n?.(c)},[i,n]);return{columnFiltersState:s,handleColumnFiltersChange:a,isControlled:i,setColumnFilters:l}},uc=m.createContext(void 0),pt=()=>{const e=m.useContext(uc);if(!e)throw new Error("useTableContext debe usarse dentro de Table");return e},Ir=e=>{if(e.id)return e.id;if("accessorKey"in e&&e.accessorKey)return String(e.accessorKey)},dc=({data:e,columns:t,size:n="md",variant:o="default",stickyHeader:r=!1,maxHeight:i,sorting:s,defaultSorting:a,onSortingChange:l,columnFilters:c,defaultColumnFilters:d,onColumnFiltersChange:u,onRowClick:h,classNames:f,enableSorting:v=!0,manualSorting:y=!1,enableFiltering:b=!0,manualFiltering:w=!1,isLoading:C=!1,getUniqueValues:x})=>{const{sortingState:P,handleSortingChange:T,setSorting:k}=lc({sorting:s,defaultSorting:a,onSortingChange:l}),{columnFiltersState:V,handleColumnFiltersChange:$,setColumnFilters:A}=cc({columnFilters:c,defaultColumnFilters:d,onColumnFiltersChange:u}),I=m.useMemo(()=>{if(x)return null;const z=new Map;return t.forEach(N=>{const L=Ir(N);if(!L)return;const j="accessorFn"in N?N.accessorFn:void 0;z.set(L,Dr(e,L,j))}),z},[e,t,x]),B=m.useMemo(()=>x||(z=>I?.get(z)||[]),[I,x]),H=m.useMemo(()=>t.map(z=>{const N=z.meta,L=N?.filterable!==!1,j={...z};return b&&L&&!z.filterFn&&(j.filterFn=Fr),N?.pinned&&(j.enablePinning=!0),j}),[t,b]),M=hv({data:e,columns:H,state:{sorting:P,columnFilters:V,columnPinning:{left:t.filter(z=>z.meta?.pinned==="left").map(z=>Ir(z)).filter(z=>z!==void 0),right:t.filter(z=>z.meta?.pinned==="right").map(z=>Ir(z)).filter(z=>z!==void 0)}},onSortingChange:T,onColumnFiltersChange:$,getCoreRowModel:rv(),getSortedRowModel:y?void 0:cv(),getFilteredRowModel:w?void 0:lv(),enableSorting:v,enableSortingRemoval:!0,manualSorting:y,enableColumnFilters:b,manualFiltering:w,filterFns:{multiSelect:Fr},globalFilterFn:"includesString",enableColumnPinning:!0}),F={size:n,variant:o,sorting:P,setSorting:k,columnFilters:V,setColumnFilters:A,getUniqueValues:B,onRowClick:h};return p.jsx(uc.Provider,{value:F,children:p.jsx(gv,{$maxHeight:i,$stickyHeader:r,className:f?.wrapper,children:p.jsxs(vv,{$variant:o,className:f?.table,children:[p.jsx(oc,{headerGroups:M.getHeaderGroups(),stickyHeader:r,className:f?.header}),C?p.jsx(Cn,{rows:[],isLoading:!0,rowCount:5,columnCount:t.length,className:f?.body}):e.length===0?p.jsx(Cn,{rows:[],className:f?.body,rowClassName:f?.row}):p.jsx(Cn,{rows:M.getRowModel().rows,className:f?.body,rowClassName:f?.row,cellClassName:f?.cell})]})})})};dc.displayName="Table";function fc(e){const t={};for(const n of e)t[n.id]=n.desc?"desc":"asc";return t}function Xv(e){return Object.entries(e).map(([t,n])=>({id:t,desc:n==="desc"}))}function hc(e){return e.length===0?"":JSON.stringify(fc(e))}function Zv(e){const t=new URLSearchParams;return e.sorting&&e.sorting.length>0&&t.append("sorts",hc(e.sorting)),e.perPage&&t.append("perPage",e.perPage.toString()),e.genericSearch&&t.append("genericSearch",e.genericSearch),e.filters&&Object.keys(e.filters).length>0&&t.append("filters",JSON.stringify(e.filters)),t}const Jv=({data:e,columns:t,initialPage:n=1,initialPerPage:o=10,initialSorting:r=[],initialColumnFilters:i=[]})=>{const[s,a]=m.useState(n),[l,c]=m.useState(o),[d,u]=m.useState(r),[h,f]=m.useState(i),v=m.useMemo(()=>{const $=new Map;return t.forEach(A=>{const I=A.id??("accessorKey"in A&&A.accessorKey?String(A.accessorKey):void 0);if(!I)return;const B="accessorFn"in A?A.accessorFn:void 0;$.set(I,Dr(e,I,B))}),$},[e,t]),y=m.useMemo(()=>$=>v.get($)||[],[v]),b=m.useMemo(()=>h.length===0?e:e.filter($=>h.every(A=>{const I=A.value;if(!I||I.length===0)return!0;const B=$[A.id];return B==null?!1:I.includes(String(B))})),[e,h]),w=m.useMemo(()=>d.length===0?b:[...b].sort(($,A)=>{for(const I of d){const B=$[I.id],H=A[I.id];if(B==null&&H==null)continue;if(B==null)return I.desc?-1:1;if(H==null)return I.desc?1:-1;let M=0;if(typeof B=="string"&&typeof H=="string"?M=B.localeCompare(H):typeof B=="number"&&typeof H=="number"?M=B-H:M=String(B).localeCompare(String(H)),M!==0)return I.desc?-M:M}return 0}),[b,d]),C=m.useMemo(()=>{const $=(s-1)*l,A=$+l;return w.slice($,A)},[w,s,l]),x=e.length,P=w.length,T=Math.max(1,Math.ceil(P/l)),k=m.useCallback($=>{a(Math.min($,T))},[T]),V=m.useCallback($=>{c($),a(1)},[]);return m.useMemo(()=>{s>T&&a(1)},[s,T]),{paginatedData:C,processedData:w,page:s,perPage:l,totalPages:T,totalRecords:x,filteredRecords:P,setPage:k,setPerPage:V,sorting:d,setSorting:u,columnFilters:h,setColumnFilters:f,getUniqueValues:y}};function mc(e){const t={};return e.forEach(n=>{t[n.id]=n.value}),t}function pc(e){return JSON.stringify(mc(e))}function Qv(e,t=","){const n={};return e.forEach(o=>{const r=o.value;r&&r.length>0&&(n[`filter[${o.id}]`]=r.join(t))}),n}function ey(e){const t={};return e.forEach(n=>{const o=n.value;o&&o.length>0&&(t[`filter[${n.id}]`]=o)}),t}function ty({filters:e,sorts:t,page:n,perPage:o}){const r={};if(n!==void 0&&(r.page=n),o!==void 0&&(r.per_page=o),t&&t.length>0){const i=t.map(a=>a.id).join(","),s=t.map(a=>a.desc?"desc":"asc").join(",");r.sort_by=i,r.sort_order=s}return e&&e.length>0&&(r.filters=pc(e)),r}function ny(e,t=","){const n=typeof e=="string"?new URLSearchParams(e):e,o=[];return n.forEach((r,i)=>{const s=i.match(/^filter\[(.+)\]$/);if(s){const a=s[1],l=r.split(t).filter(Boolean);l.length>0&&o.push({id:a,value:l})}}),o}function oy(e){try{const t=JSON.parse(e);return Object.entries(t).map(([n,o])=>({id:n,value:o}))}catch{return[]}}function ry(...e){const t=new Map;return e.forEach(n=>{n.forEach(o=>{t.set(o.id,o.value)})}),Array.from(t.entries()).map(([n,o])=>({id:n,value:o}))}const iy=g.div`
2069
2090
  position: relative;
2070
2091
  display: flex;
2071
2092
  align-items: center;
@@ -2076,14 +2097,14 @@
2076
2097
  transition: background-color 0.3s ease-out;
2077
2098
 
2078
2099
  &:hover {
2079
- background-color: var(--color-main-light-background);
2100
+ background-color: var(--color-main-light-borders);
2080
2101
  }
2081
2102
 
2082
2103
  &:focus-visible {
2083
2104
  outline: 2px solid var(--color-main-blue-primary);
2084
2105
  outline-offset: 2px;
2085
2106
  }
2086
- `,iy=g.div`
2107
+ `,sy=g.div`
2087
2108
  display: flex;
2088
2109
  flex-direction: column;
2089
2110
  align-items: flex-start;
@@ -2091,7 +2112,7 @@
2091
2112
  @media (max-width: 640px) {
2092
2113
  display: none;
2093
2114
  }
2094
- `,sy=g.div`
2115
+ `,ay=g.div`
2095
2116
  width: 2.25rem;
2096
2117
  height: 2.25rem;
2097
2118
  border-radius: 50%;
@@ -2103,7 +2124,7 @@
2103
2124
  justify-content: center;
2104
2125
  font-size: 1rem;
2105
2126
  user-select: none;
2106
- `,ay=g(De.div)`
2127
+ `,ly=g(De.div)`
2107
2128
  display: flex;
2108
2129
  align-items: center;
2109
2130
  justify-content: center;
@@ -2112,7 +2133,7 @@
2112
2133
  @media (max-width: 640px) {
2113
2134
  display: none;
2114
2135
  }
2115
- `,ly=g(De.div)`
2136
+ `,cy=g(De.div)`
2116
2137
  position: absolute;
2117
2138
  top: 100%;
2118
2139
  right: 0;
@@ -2124,7 +2145,7 @@
2124
2145
  box-shadow: var(--shadow-black-card);
2125
2146
  z-index: 100;
2126
2147
  overflow: hidden;
2127
- `,cy=g.button`
2148
+ `,uy=g.button`
2128
2149
  width: 100%;
2129
2150
  display: flex;
2130
2151
  align-items: center;
@@ -2148,7 +2169,7 @@
2148
2169
  &.danger {
2149
2170
  color: var(--color-main-waringn-state);
2150
2171
  }
2151
- `,Ir=({user:e,onProfileClick:t,onLogout:n,menuItems:o=[]})=>{const[r,i]=m.useState(!1),s=m.useRef(null);m.useEffect(()=>{if(!r)return;const d=u=>{s.current&&!s.current.contains(u.target)&&i(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[r]),m.useEffect(()=>{if(!r)return;const d=u=>{u.key==="Escape"&&i(!1)};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[r]);const a=d=>d.split(" ").map(u=>u[0]).join("").toUpperCase().slice(0,2),c=[...[{id:"profile",label:"Profile",icon:Hp,onClick:()=>{i(!1),t?.()},variant:"default"},{id:"logout",label:"Logout",icon:Np,onClick:()=>{i(!1),n?.()},variant:"danger"}],...o];return p.jsxs("div",{ref:s,children:[p.jsxs(ry,{onClick:()=>i(!r),role:"button",tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i(!r))},children:[p.jsx(sy,{className:"font-semibold!",children:a(e?.name||"")}),p.jsxs(iy,{children:[p.jsx(Ie,{size:14,className:"font-semibold!",children:e?.name||""}),p.jsx(Ie,{size:12,children:e?.roles?.[0]?.name||""})]}),p.jsx(ay,{animate:{rotate:r?-180:0},transition:{duration:.3},children:p.jsx(U,{component:Za,size:"sm",color:"var(--color-main-blue-primary)"})})]}),p.jsx(Lt,{children:r&&p.jsx(ly,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.15},children:c.map(d=>p.jsx(m.Fragment,{children:p.jsxs(cy,{onClick:d.onClick,className:d.variant==="danger"?"danger":"",children:[p.jsx(U,{component:d.icon,size:"sm",color:d.variant==="danger"?"var(--color-main-warning-state)":"var(--color-main-blue-primary)"}),p.jsx(Ie,{size:14,color:`${d.variant==="danger"&&"var(--color-main-warning-state)"}`,children:d.label})]})},d.id))})})]})};Ir.displayName="UserProfile";const gc=({hasNotifications:e=!1,notificationCount:t})=>{const n=(t??0)>0||e,o=t&&t>0?t:void 0,r=o?`${o} notification${o===1?"":"s"}`:n?"New notifications":"No notifications",i=`Notifications: ${r}`;return{effectiveHasNotifications:n,displayCount:o,badgeLabel:r,bellAriaLabel:i}},uy=g.button`
2172
+ `,Lr=({user:e,onProfileClick:t,onLogout:n,menuItems:o=[]})=>{const[r,i]=m.useState(!1),s=m.useRef(null);m.useEffect(()=>{if(!r)return;const d=u=>{s.current&&!s.current.contains(u.target)&&i(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[r]),m.useEffect(()=>{if(!r)return;const d=u=>{u.key==="Escape"&&i(!1)};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[r]);const a=d=>d.split(" ").map(u=>u[0]).join("").toUpperCase().slice(0,2),c=[...[{id:"profile",label:"Profile",icon:Hp,onClick:()=>{i(!1),t?.()},variant:"default"},{id:"logout",label:"Logout",icon:Np,onClick:()=>{i(!1),n?.()},variant:"danger"}],...o];return p.jsxs("div",{ref:s,children:[p.jsxs(iy,{onClick:()=>i(!r),role:"button",tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i(!r))},children:[p.jsxs(sy,{children:[p.jsx(Ie,{size:14,className:"font-semibold!",children:e?.name||""}),p.jsx(Ie,{size:12,children:e?.roles?.[0]?.name||""})]}),p.jsx(ly,{animate:{rotate:r?-180:0},transition:{duration:.3},children:p.jsx(U,{component:Ja,size:"sm",color:"var(--color-main-blue-primary)"})}),p.jsx(ay,{className:"font-semibold!",children:a(e?.name||"")})]}),p.jsx(Lt,{children:r&&p.jsx(cy,{initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.15},children:c.map(d=>p.jsx(m.Fragment,{children:p.jsxs(uy,{onClick:d.onClick,className:d.variant==="danger"?"danger":"",children:[p.jsx(U,{component:d.icon,size:"sm",color:d.variant==="danger"?"var(--color-main-warning-state)":"var(--color-main-blue-primary)"}),p.jsx(Ie,{size:14,color:`${d.variant==="danger"&&"var(--color-main-warning-state)"}`,children:d.label})]})},d.id))})})]})};Lr.displayName="UserProfile";const gc=({hasNotifications:e=!1,notificationCount:t})=>{const n=(t??0)>0||e,o=t&&t>0?t:void 0,r=o?`${o} notification${o===1?"":"s"}`:n?"New notifications":"No notifications",i=`Notifications: ${r}`;return{effectiveHasNotifications:n,displayCount:o,badgeLabel:r,bellAriaLabel:i}},dy=g.button`
2152
2173
  position: relative;
2153
2174
  background: transparent;
2154
2175
  border: none;
@@ -2172,7 +2193,7 @@
2172
2193
  &:active {
2173
2194
  transform: scale(0.92);
2174
2195
  }
2175
- `,dy=g.span`
2196
+ `,fy=g.span`
2176
2197
  position: absolute;
2177
2198
  top: 0.35rem;
2178
2199
  right: 0.35rem;
@@ -2188,7 +2209,7 @@
2188
2209
  min-width: ${({$withCount:e})=>e?"1rem":"0.55rem"};
2189
2210
  height: ${({$withCount:e})=>e?"1rem":"0.55rem"};
2190
2211
  padding: ${({$withCount:e})=>e?"0 0.25rem":"0"};
2191
- `,Lr=({hasNotifications:e=!1,notificationCount:t,onNotificationClick:n})=>{const{effectiveHasNotifications:o,displayCount:r,bellAriaLabel:i}=gc({hasNotifications:e,notificationCount:t});return p.jsxs(uy,{onClick:n,"aria-label":i,title:i,"data-has":o||void 0,children:[p.jsx(U,{component:o?Bp:zp,size:"md",color:"var(--color-main-blue-primary)"}),o&&p.jsx(dy,{$withCount:!!r,"aria-hidden":!!r,children:r&&(r>99?"99+":r)})]})};Lr.displayName="NotificationButton";const fy=g.header`
2212
+ `,Rr=({hasNotifications:e=!1,notificationCount:t,onNotificationClick:n})=>{const{effectiveHasNotifications:o,displayCount:r,bellAriaLabel:i}=gc({hasNotifications:e,notificationCount:t});return p.jsxs(dy,{onClick:n,"aria-label":i,title:i,"data-has":o||void 0,children:[p.jsx(U,{component:o?Bp:zp,size:"md",color:"var(--color-main-blue-primary)"}),o&&p.jsx(fy,{$withCount:!!r,"aria-hidden":!!r,children:r&&(r>99?"99+":r)})]})};Rr.displayName="NotificationButton";const hy=g.header`
2192
2213
  position: fixed;
2193
2214
  top: 0;
2194
2215
  left: 0;
@@ -2208,18 +2229,18 @@
2208
2229
  align-items: center;
2209
2230
  gap: 1rem;
2210
2231
  flex: 1;
2211
- `;const hy=g.div`
2232
+ `;const my=g.div`
2212
2233
  display: flex;
2213
2234
  align-items: center;
2214
2235
  gap: 1rem;
2215
- `,my=g.div`
2236
+ `,py=g.div`
2216
2237
  display: flex;
2217
2238
  align-items: center;
2218
2239
  justify-content: center;
2219
2240
  margin-right: 1rem;
2220
2241
  min-width: 3.125rem; /* Ensure space for logo */
2221
2242
  height: 2.5rem;
2222
- `,Rr=({logo:e,user:t,hasNotifications:n=!1,notificationCount:o,onNotificationClick:r,onUserProfileClick:i,onLogout:s,userMenuItems:a})=>p.jsxs(fy,{children:[p.jsx(my,{children:e}),p.jsxs(hy,{children:[n||o?p.jsx(Lr,{hasNotifications:n,notificationCount:o,onNotificationClick:r}):null,t&&p.jsx(Ir,{user:t,onProfileClick:i,onLogout:s,menuItems:a})]})]});Rr.displayName="Header";const py=g.main`
2243
+ `,_r=({logo:e,user:t,hasNotifications:n=!1,notificationCount:o,onNotificationClick:r,onUserProfileClick:i,onLogout:s,userMenuItems:a,className:l})=>p.jsxs(hy,{className:l,children:[p.jsx(py,{children:e}),p.jsxs(my,{children:[n||o?p.jsx(Rr,{hasNotifications:n,notificationCount:o,onNotificationClick:r}):null,t&&p.jsx(Lr,{user:t,onProfileClick:i,onLogout:s,menuItems:a})]})]});_r.displayName="Header";const gy=g.main`
2223
2244
  flex: 1;
2224
2245
  margin-top: 4rem;
2225
2246
  /* Mobile-first: no lateral offset so content occupies full width */
@@ -2235,20 +2256,20 @@
2235
2256
  @media (min-width: 1200px) {
2236
2257
  margin-left: 5rem;
2237
2258
  }
2238
- `,_r=({children:e,className:t})=>p.jsx(py,{className:t,children:e});_r.displayName="LayoutMainContent";const gy=g.div`
2259
+ `,Nr=({children:e,className:t})=>p.jsx(gy,{className:t,children:e});Nr.displayName="LayoutMainContent";const vy=g.div`
2239
2260
  display: flex;
2240
2261
  flex-direction: column;
2241
2262
  height: 100vh;
2242
2263
  overflow: hidden;
2243
- `,vy=({children:e,navigationConfig:t,userPermissions:n=[],activePath:o,user:r,hasNotifications:i=!1,notificationCount:s,onNotificationClick:a,onUserProfileClick:l,onNavigate:c,onLogout:d,userMenuItems:u=[],contentClassName:h,logoImgCollapsed:f,logoImgExpanded:v})=>p.jsxs(gy,{children:[p.jsx(fr,{navigationConfig:t,userPermissions:n,activePath:o,logoImgCollapsed:f,logoImgExpanded:v,onNavigate:c}),p.jsx(Rr,{user:r,hasNotifications:i,notificationCount:s,onNotificationClick:a,onUserProfileClick:l,onLogout:d,userMenuItems:u}),p.jsx(_r,{className:h,children:e})]}),yy=e=>p.jsx(xl,{children:p.jsx(vy,{...e})});function wy(e,t,n){let o=`${e}=${encodeURIComponent(t)}; path=/; SameSite=Strict; Secure`;if(n){const r=new Date(Date.now()+n*864e5).toUTCString();o+=`; expires=${r}`}document.cookie=o}function by(e){return document.cookie.split("; ").reduce((t,n)=>{const o=n.split("=");return o[0]===e?decodeURIComponent(o[1]):t},"")}function xy(e){document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`}const vc=m.createContext(void 0),Sy=e=>({permissions:e?.permissions?.map(t=>t.name)||[]}),Cy=({children:e,initialAbilities:t,user:n})=>{const[o,r]=m.useState(()=>n?Sy(n):t||{permissions:[]}),i=m.useCallback((c,d="any")=>(c=Array.isArray(c)?c:[c],d==="all"?c.every(u=>o.permissions.includes(u)):c.some(u=>o.permissions.includes(u))),[o.permissions]),s=m.useCallback(c=>{r(c)},[]),a=m.useCallback(()=>{r({permissions:[]})},[]),l={userAbilities:o,can:i,updateAbilities:s,setAbilities:r,clearAbilities:a};return p.jsx(vc.Provider,{value:l,children:e})},Nr=()=>{const e=m.useContext(vc);if(!e)throw new Error("useAbility must be used within an AbilityProvider");return e},Ty=(e,t="any")=>{const{can:n}=Nr();return n(e,t)},$y=m.memo(({requiredPermissions:e,mode:t="any",children:n,fallback:o=null})=>{const{can:r}=Nr();return r(e,t)?p.jsx(p.Fragment,{children:n}):o??null}),jt={sm:{circle:"2rem",fontSize:D[14],line:"2px"},md:{circle:"2.5rem",fontSize:D[18],line:"2px"},lg:{circle:"3.25rem",fontSize:D[20],line:"3px"}},Py=g.div`
2264
+ `,yy=({children:e,navigationConfig:t,userPermissions:n=[],activePath:o,user:r,hasNotifications:i=!1,notificationCount:s,onNotificationClick:a,onUserProfileClick:l,onNavigate:c,onLogout:d,userMenuItems:u=[],contentClassName:h,logoImgCollapsed:f,logoImgExpanded:v})=>p.jsxs(vy,{children:[p.jsx(fr,{navigationConfig:t,userPermissions:n,activePath:o,logoImgCollapsed:f,logoImgExpanded:v,onNavigate:c}),p.jsx(_r,{user:r,hasNotifications:i,notificationCount:s,onNotificationClick:a,onUserProfileClick:l,onLogout:d,userMenuItems:u}),p.jsx(Nr,{className:h,children:e})]}),wy=e=>p.jsx(Sl,{children:p.jsx(yy,{...e})});function by(e,t,n){let o=`${e}=${encodeURIComponent(t)}; path=/; SameSite=Strict; Secure`;if(n){const r=new Date(Date.now()+n*864e5).toUTCString();o+=`; expires=${r}`}document.cookie=o}function xy(e){return document.cookie.split("; ").reduce((t,n)=>{const o=n.split("=");return o[0]===e?decodeURIComponent(o[1]):t},"")}function Sy(e){document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`}const vc=m.createContext(void 0),Cy=e=>({permissions:e?.permissions?.map(t=>t.name)||[]}),Ty=({children:e,initialAbilities:t,user:n})=>{const[o,r]=m.useState(()=>n?Cy(n):t||{permissions:[]}),i=m.useCallback((c,d="any")=>(c=Array.isArray(c)?c:[c],d==="all"?c.every(u=>o.permissions.includes(u)):c.some(u=>o.permissions.includes(u))),[o.permissions]),s=m.useCallback(c=>{r(c)},[]),a=m.useCallback(()=>{r({permissions:[]})},[]),l={userAbilities:o,can:i,updateAbilities:s,setAbilities:r,clearAbilities:a};return p.jsx(vc.Provider,{value:l,children:e})},Br=()=>{const e=m.useContext(vc);if(!e)throw new Error("useAbility must be used within an AbilityProvider");return e},$y=(e,t="any")=>{const{can:n}=Br();return n(e,t)},Py=m.memo(({requiredPermissions:e,mode:t="any",children:n,fallback:o=null})=>{const{can:r}=Br();return r(e,t)?p.jsx(p.Fragment,{children:n}):o??null}),jt={sm:{circle:"2rem",fontSize:D[14],line:"2px"},md:{circle:"2.5rem",fontSize:D[18],line:"2px"},lg:{circle:"3.25rem",fontSize:D[20],line:"3px"}},ky=g.div`
2244
2265
  display: flex;
2245
2266
  width: 100%;
2246
- `,ky=g.div`
2267
+ `,My=g.div`
2247
2268
  display: flex;
2248
2269
  flex-direction: ${({$orientation:e})=>e==="vertical"?"column":"row"};
2249
2270
  align-items: center;
2250
2271
  width: 100%;
2251
- `,My=g.div`
2272
+ `,Vy=g.div`
2252
2273
  display: flex;
2253
2274
  align-items: center;
2254
2275
  justify-content: center;
@@ -2299,7 +2320,7 @@
2299
2320
  box-shadow: var(--shadow-hover-black-button);
2300
2321
  }
2301
2322
  `}
2302
- `,Vy=g.div`
2323
+ `,Ey=g.div`
2303
2324
  background-color: ${({$isCompleted:e})=>e?"var(--color-main-blue-primary)":"var(--color-dark-300)"};
2304
2325
  transition: background-color 0.3s ease;
2305
2326
 
@@ -2311,7 +2332,7 @@
2311
2332
  flex: 1;
2312
2333
  min-width: 2rem;
2313
2334
  `}
2314
- `,Ey=g.span`
2335
+ `,Dy=g.span`
2315
2336
  position: absolute;
2316
2337
  ${D[14]}
2317
2338
  font-weight: 500;
@@ -2344,4 +2365,4 @@
2344
2365
  ${yc}:hover & {
2345
2366
  opacity: 1;
2346
2367
  }
2347
- `,Dy=({steps:e,currentStep:t,orientation:n="horizontal",size:o="md",onStepClick:r,className:i})=>{const s=a=>{r?.(a)};return p.jsx(Py,{$orientation:n,className:i,children:p.jsx(ky,{$orientation:n,children:e.map((a,l)=>{const c=l===t,d=l<t,u=r!=null;return p.jsxs(p.Fragment,{children:[p.jsx(My,{$orientation:n,children:p.jsxs(yc,{$isActive:c,$isCompleted:d,$size:o,$isClickable:u,onClick:()=>u&&s(l),role:u?"button":void 0,tabIndex:u?0:void 0,"aria-current":c?"step":void 0,"aria-label":a.label,onKeyDown:h=>{u&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),s(l))},children:[a.content??l+1,a.label&&n==="vertical"&&p.jsx(Ey,{children:a.label})]})}),l<e.length-1&&p.jsx(Vy,{$isCompleted:d,$orientation:n,$size:o})]},a.id)})})})};S.ALLOWED_INPUT_TYPES=qa,S.AbilityProvider=Cy,S.Aside=$l,S.Badge=Vm,S.BaseInput=Zo,S.BrandLogo=kl,S.Button=ft,S.Can=$y,S.Card=hp,S.CardBody=vp,S.CardFooter=wp,S.CardHeader=pp,S.Checkbox=zt,S.CheckboxInput=nr,S.CheckboxLabel=ll,S.CloseOpenButton=Vl,S.ColumnFilter=Sn,S.ColumnFilterMenu=Fr,S.Dialog=gl,S.DialogBody=yl,S.DialogFooter=wl,S.DialogHeader=vl,S.Divider=Dm,S.ErrorMessage=Xo,S.FileList=al,S.FileUpload=Pg,S.FilterOption=Vr,S.FormField=Zg,S.FullScreenSpinner=wm,S.Header=Rr,S.HeadingBold=jr,S.HeadingRegular=Ec,S.Icon=U,S.IconWrapperStyles=pn,S.InfoLabel=ht,S.Label=hn,S.Layout=yy,S.LayoutMainContent=_r,S.Link=Il,S.LinkDisabledStyles=Fl,S.LinkSizeStyles=Al,S.LinkVariantStyles=Dl,S.MobileOpenBtn=El,S.Nav=Ml,S.NotificationButton=Lr,S.Overlay=Tl,S.PasswordInput=tl,S.PinInput=or,S.PinInputGroup=rr,S.RadioInput=ar,S.RadioInputDot=ir,S.RadioInputLabel=sr,S.SearchInput=tr,S.SectionSpinner=xm,S.SelectInput=gn,S.Sidebar=fr,S.SidebarContext=cr,S.SidebarHeader=Pl,S.SidebarProvider=xl,S.Spinner=dn,S.Stepper=Dy,S.Table=dc,S.TableBody=Cn,S.TableCell=rc,S.TableHeader=oc,S.TableHeaderCell=tc,S.TableHeaderRow=nc,S.TablePagination=qv,S.TableRow=ic,S.TermsAndConditions=l0,S.Text=Ie,S.TextAreaInput=er,S.ToastProvider=ap,S.Tooltip=bl,S.UserProfile=Ir,S.baseFieldStyles=Ze,S.baseInputStyles=mn,S.bodyTextStyles=D,S.columnFiltersToArrayQueryParams=Qv,S.columnFiltersToJsonString=pc,S.columnFiltersToQueryParams=Jv,S.columnFiltersToRecord=mc,S.createBackendParams=Xv,S.createBackendParamsWithFilters=ey,S.createColumnHelper=k0,S.createFieldConfig=Pp,S.createInputRefs=fl,S.deleteCookie=xy,S.disabledStyles=Oe,S.errorStyles=Je,S.flushedStyles=Xa,S.getActiveFilterCount=Tv,S.getActiveFilterValues=Jl,S.getColumnValueCounts=Sv,S.getCookie=by,S.getPropsForInputType=kp,S.getUniqueColumnValues=Er,S.handleDigitChange=cl,S.handleKeyDown=ul,S.handlePaste=dl,S.hasActiveFilters=Cv,S.hasPermission=dr,S.headingBoldStyles=En,S.headingRegularStyles=Hr,S.isAllowedInputType=Ya,S.mergeFilters=oy,S.multiSelectFilter=Dr,S.normalizeFieldTypes=ze,S.normalizeSelectOptions=$p,S.overlayAnimation=lr,S.parseJsonToFilters=ny,S.parseQueryParamsToFilters=ty,S.searchInArray=Zl,S.setCookie=wy,S.sizeStyles=Bt,S.slideAnimation=Jg,S.smartAnimation=ml,S.sortRecordToSortingState=Yv,S.sortingStateToJsonString=hc,S.sortingStateToRecord=fc,S.submenuAnimationTopDown=pl,S.toast=Ym,S.useAbility=Nr,S.useCan=Ty,S.useColumnFilter=Ql,S.useNotifications=gc,S.useSidebar=ur,S.useTableContext=pt,S.useTableData=Zv,S.useTableFiltering=cc,S.useTableSorting=lc,S.validateCode=Ng,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})}));
2368
+ `,Fy=({steps:e,currentStep:t,orientation:n="horizontal",size:o="md",onStepClick:r,className:i})=>{const s=a=>{r?.(a)};return p.jsx(ky,{$orientation:n,className:i,children:p.jsx(My,{$orientation:n,children:e.map((a,l)=>{const c=l===t,d=l<t,u=r!=null;return p.jsxs(p.Fragment,{children:[p.jsx(Vy,{$orientation:n,children:p.jsxs(yc,{$isActive:c,$isCompleted:d,$size:o,$isClickable:u,onClick:()=>u&&s(l),role:u?"button":void 0,tabIndex:u?0:void 0,"aria-current":c?"step":void 0,"aria-label":a.label,onKeyDown:h=>{u&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),s(l))},children:[a.content??l+1,a.label&&n==="vertical"&&p.jsx(Dy,{children:a.label})]})}),l<e.length-1&&p.jsx(Ey,{$isCompleted:d,$orientation:n,$size:o})]},a.id)})})})};S.ALLOWED_INPUT_TYPES=Ya,S.AbilityProvider=Ty,S.Aside=Pl,S.Badge=Vm,S.BaseInput=Zo,S.BrandLogo=Ml,S.Button=ft,S.Can=Py,S.Card=hp,S.CardBody=vp,S.CardFooter=wp,S.CardHeader=pp,S.Checkbox=zt,S.CheckboxInput=nr,S.CheckboxLabel=cl,S.CloseOpenButton=El,S.ColumnFilter=Sn,S.ColumnFilterMenu=Ar,S.Dialog=vl,S.DialogBody=wl,S.DialogFooter=bl,S.DialogHeader=yl,S.Divider=Dm,S.ErrorMessage=Xo,S.FileList=ll,S.FileUpload=Pg,S.FilterOption=Er,S.FormField=Zg,S.FullScreenSpinner=wm,S.Header=_r,S.HeadingBold=Gr,S.HeadingRegular=Ec,S.Icon=U,S.IconWrapperStyles=pn,S.InfoLabel=ht,S.Label=hn,S.Layout=wy,S.LayoutMainContent=Nr,S.Link=Il,S.LinkDisabledStyles=Al,S.LinkSizeStyles=hr,S.LinkVariantStyles=Fl,S.MobileOpenBtn=Dl,S.Nav=Vl,S.NotificationButton=Rr,S.Overlay=$l,S.PasswordInput=nl,S.PinInput=or,S.PinInputGroup=rr,S.RadioInput=ar,S.RadioInputDot=ir,S.RadioInputLabel=sr,S.SearchInput=tr,S.SectionSpinner=xm,S.SelectInput=gn,S.Sidebar=fr,S.SidebarContext=cr,S.SidebarHeader=kl,S.SidebarProvider=Sl,S.Spinner=dn,S.Stepper=Fy,S.Table=dc,S.TableBody=Cn,S.TableCell=rc,S.TableHeader=oc,S.TableHeaderCell=tc,S.TableHeaderRow=nc,S.TablePagination=Yv,S.TableRow=ic,S.TermsAndConditions=l0,S.Text=Ie,S.TextAreaInput=er,S.ToastProvider=ap,S.Tooltip=xl,S.UserProfile=Lr,S.baseFieldStyles=Ze,S.baseInputStyles=mn,S.bodyTextStyles=D,S.columnFiltersToArrayQueryParams=ey,S.columnFiltersToJsonString=pc,S.columnFiltersToQueryParams=Qv,S.columnFiltersToRecord=mc,S.createBackendParams=Zv,S.createBackendParamsWithFilters=ty,S.createColumnHelper=M0,S.createFieldConfig=Pp,S.createInputRefs=hl,S.deleteCookie=Sy,S.disabledStyles=Oe,S.errorStyles=Je,S.flushedStyles=Za,S.getActiveFilterCount=$v,S.getActiveFilterValues=Jl,S.getColumnValueCounts=Cv,S.getCookie=xy,S.getPropsForInputType=kp,S.getUniqueColumnValues=Dr,S.handleDigitChange=ul,S.handleKeyDown=dl,S.handlePaste=fl,S.hasActiveFilters=Tv,S.hasPermission=dr,S.headingBoldStyles=En,S.headingRegularStyles=jr,S.isAllowedInputType=Xa,S.mergeFilters=ry,S.multiSelectFilter=Fr,S.normalizeFieldTypes=ze,S.normalizeSelectOptions=$p,S.overlayAnimation=lr,S.parseJsonToFilters=oy,S.parseQueryParamsToFilters=ny,S.searchInArray=Zl,S.setCookie=by,S.sizeStyles=Bt,S.slideAnimation=Jg,S.smartAnimation=pl,S.sortRecordToSortingState=Xv,S.sortingStateToJsonString=hc,S.sortingStateToRecord=fc,S.submenuAnimationTopDown=gl,S.toast=Ym,S.useAbility=Br,S.useCan=$y,S.useColumnFilter=Ql,S.useNotifications=gc,S.useSidebar=ur,S.useTableContext=pt,S.useTableData=Jv,S.useTableFiltering=cc,S.useTableSorting=lc,S.validateCode=Ng,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})}));