@plyaz/ui 0.7.7 → 0.7.9

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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),S=require("react"),T=require("./Skeleton-BTwJmyVc.cjs"),Wi=require("react-dom"),wt=require("@radix-ui/react-slot"),Te=require("lucide-react");require("clsx");require("@radix-ui/react-select");require("next-intl");function gf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const h=gf(S),Ox=gf(Wi),vf=S.createContext({});function ba(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const zi=typeof window<"u",Hi=zi?S.useLayoutEffect:S.useEffect,Yi=S.createContext(null);function Ui(e,t){e.indexOf(t)===-1&&e.push(t)}function Gi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Yt=(e,t,n)=>n>t?t:n<e?e:n;function qs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ur=()=>{},At=()=>{};process.env.NODE_ENV!=="production"&&(ur=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(qs(t,n))},At=(e,t,n)=>{if(!e)throw new Error(qs(t,n))});const en={},bf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function yf(e){return typeof e=="object"&&e!==null}const xf=e=>/^0[^.\s]+$/u.test(e);function Ki(e){let t;return()=>(t===void 0&&(t=e()),t)}const ut=e=>e,kx=(e,t)=>n=>t(e(n)),Jr=(...e)=>e.reduce(kx),rr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class qi{constructor(){this.subscriptions=[]}add(t){return Ui(this.subscriptions,t),()=>Gi(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let a=0;a<o;a++){const s=this.subscriptions[a];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Dt=e=>e*1e3,yt=e=>e/1e3;function Xi(e,t){return t?e*(1e3/t):0}const Yl=new Set;function ya(e,t,n){e||Yl.has(t)||(console.warn(qs(t,n)),Yl.add(t))}const wf=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Nx=1e-7,_x=12;function Ix(e,t,n,r,o){let a,s,i=0;do s=t+(n-t)/2,a=wf(s,r,o)-e,a>0?n=s:t=s;while(Math.abs(a)>Nx&&++i<_x);return s}function eo(e,t,n,r){if(e===t&&n===r)return ut;const o=a=>Ix(a,0,1,e,n);return a=>a===0||a===1?a:wf(o(a),t,r)}const Sf=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Cf=e=>t=>1-e(1-t),Mf=eo(.33,1.53,.69,.99),Zi=Cf(Mf),Ef=Sf(Zi),Tf=e=>(e*=2)<1?.5*Zi(e):.5*(2-Math.pow(2,-10*(e-1))),Qi=e=>1-Math.sin(Math.acos(e)),Pf=Cf(Qi),Df=Sf(Qi),jx=eo(.42,0,1,1),Lx=eo(0,0,.58,1),Rf=eo(.42,0,.58,1),$x=e=>Array.isArray(e)&&typeof e[0]!="number",Af=e=>Array.isArray(e)&&typeof e[0]=="number",Ul={linear:ut,easeIn:jx,easeInOut:Rf,easeOut:Lx,circIn:Qi,circInOut:Df,circOut:Pf,backIn:Zi,backInOut:Ef,backOut:Mf,anticipate:Tf},Fx=e=>typeof e=="string",Gl=e=>{if(Af(e)){At(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return eo(t,n,r,o)}else if(Fx(e))return At(Ul[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ul[e];return e},Do=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Bx(e,t){let n=new Set,r=new Set,o=!1,a=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function c(d){s.has(d)&&(u.schedule(d),e()),d(i)}const u={schedule:(d,l=!1,f=!1)=>{const g=f&&o?n:r;return l&&s.add(d),g.has(d)||g.add(d),d},cancel:d=>{r.delete(d),s.delete(d)},process:d=>{if(i=d,o){a=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),n.clear(),o=!1,a&&(a=!1,u.process(d))}};return u}const Vx=40;function Of(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,s=Do.reduce((w,M)=>(w[M]=Bx(a),w),{}),{setup:i,read:c,resolveKeyframes:u,preUpdate:d,update:l,preRender:f,render:p,postRender:g}=s,b=()=>{const w=en.useManualTiming?o.timestamp:performance.now();n=!1,en.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(w-o.timestamp,Vx),1)),o.timestamp=w,o.isProcessing=!0,i.process(o),c.process(o),u.process(o),d.process(o),l.process(o),f.process(o),p.process(o),g.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(b))},y=()=>{n=!0,r=!0,o.isProcessing||e(b)};return{schedule:Do.reduce((w,M)=>{const C=s[M];return w[M]=(P,E=!1,D=!1)=>(n||y(),C.schedule(P,E,D)),w},{}),cancel:w=>{for(let M=0;M<Do.length;M++)s[Do[M]].cancel(w)},state:o,steps:s}}const{schedule:Ce,cancel:Ot,state:qe,steps:is}=Of(typeof requestAnimationFrame<"u"?requestAnimationFrame:ut,!0);let zo;function Wx(){zo=void 0}const lt={now:()=>(zo===void 0&&lt.set(qe.isProcessing||en.useManualTiming?qe.timestamp:performance.now()),zo),set:e=>{zo=e,queueMicrotask(Wx)}},kf=e=>t=>typeof t=="string"&&t.startsWith(e),Ji=kf("--"),zx=kf("var(--"),ec=e=>zx(e)?Hx.test(e.split("/*")[0].trim()):!1,Hx=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,dr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$r={...dr,transform:e=>Yt(0,1,e)},Ro={...dr,default:1},kr=e=>Math.round(e*1e5)/1e5,tc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Yx(e){return e==null}const Ux=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,nc=(e,t)=>n=>!!(typeof n=="string"&&Ux.test(n)&&n.startsWith(e)||t&&!Yx(n)&&Object.prototype.hasOwnProperty.call(n,t)),Nf=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,a,s,i]=r.match(tc);return{[e]:parseFloat(o),[t]:parseFloat(a),[n]:parseFloat(s),alpha:i!==void 0?parseFloat(i):1}},Gx=e=>Yt(0,255,e),cs={...dr,transform:e=>Math.round(Gx(e))},Dn={test:nc("rgb","red"),parse:Nf("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+cs.transform(e)+", "+cs.transform(t)+", "+cs.transform(n)+", "+kr($r.transform(r))+")"};function Kx(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Xs={test:nc("#"),parse:Kx,transform:Dn.transform},to=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),an=to("deg"),zt=to("%"),ie=to("px"),qx=to("vh"),Xx=to("vw"),Kl={...zt,parse:e=>zt.parse(e)/100,transform:e=>zt.transform(e*100)},Un={test:nc("hsl","hue"),parse:Nf("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+zt.transform(kr(t))+", "+zt.transform(kr(n))+", "+kr($r.transform(r))+")"},Ve={test:e=>Dn.test(e)||Xs.test(e)||Un.test(e),parse:e=>Dn.test(e)?Dn.parse(e):Un.test(e)?Un.parse(e):Xs.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Dn.transform(e):Un.transform(e),getAnimatableNone:e=>{const t=Ve.parse(e);return t.alpha=0,Ve.transform(t)}},Zx=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Qx(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(tc))==null?void 0:t.length)||0)+(((n=e.match(Zx))==null?void 0:n.length)||0)>0}const _f="number",If="color",Jx="var",ew="var(",ql="${}",tw=/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 Fr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let a=0;const i=t.replace(tw,c=>(Ve.test(c)?(r.color.push(a),o.push(If),n.push(Ve.parse(c))):c.startsWith(ew)?(r.var.push(a),o.push(Jx),n.push(c)):(r.number.push(a),o.push(_f),n.push(parseFloat(c))),++a,ql)).split(ql);return{values:n,split:i,indexes:r,types:o}}function jf(e){return Fr(e).values}function Lf(e){const{split:t,types:n}=Fr(e),r=t.length;return o=>{let a="";for(let s=0;s<r;s++)if(a+=t[s],o[s]!==void 0){const i=n[s];i===_f?a+=kr(o[s]):i===If?a+=Ve.transform(o[s]):a+=o[s]}return a}}const nw=e=>typeof e=="number"?0:Ve.test(e)?Ve.getAnimatableNone(e):e;function rw(e){const t=jf(e);return Lf(e)(t.map(nw))}const un={test:Qx,parse:jf,createTransformer:Lf,getAnimatableNone:rw};function ls(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 ow({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,a=0,s=0;if(!t)o=a=s=n;else{const i=n<.5?n*(1+t):n+t-n*t,c=2*n-i;o=ls(c,i,e+1/3),a=ls(c,i,e),s=ls(c,i,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:r}}function Qo(e,t){return n=>n>0?t:e}const Oe=(e,t,n)=>e+(t-e)*n,us=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},aw=[Xs,Dn,Un],sw=e=>aw.find(t=>t.test(e));function Xl(e){const t=sw(e);if(ur(!!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===Un&&(n=ow(n)),n}const Zl=(e,t)=>{const n=Xl(e),r=Xl(t);if(!n||!r)return Qo(e,t);const o={...n};return a=>(o.red=us(n.red,r.red,a),o.green=us(n.green,r.green,a),o.blue=us(n.blue,r.blue,a),o.alpha=Oe(n.alpha,r.alpha,a),Dn.transform(o))},Zs=new Set(["none","hidden"]);function iw(e,t){return Zs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function cw(e,t){return n=>Oe(e,t,n)}function rc(e){return typeof e=="number"?cw:typeof e=="string"?ec(e)?Qo:Ve.test(e)?Zl:dw:Array.isArray(e)?$f:typeof e=="object"?Ve.test(e)?Zl:lw:Qo}function $f(e,t){const n=[...e],r=n.length,o=e.map((a,s)=>rc(a)(a,t[s]));return a=>{for(let s=0;s<r;s++)n[s]=o[s](a);return n}}function lw(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=rc(e[o])(e[o],t[o]));return o=>{for(const a in r)n[a]=r[a](o);return n}}function uw(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],s=e.indexes[a][r[a]],i=e.values[s]??0;n[o]=i,r[a]++}return n}const dw=(e,t)=>{const n=un.createTransformer(t),r=Fr(e),o=Fr(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Zs.has(e)&&!o.values.length||Zs.has(t)&&!r.values.length?iw(e,t):Jr($f(uw(r,o),o.values),n):(ur(!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"),Qo(e,t))};function Ff(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Oe(e,t,n):rc(e)(e,t)}const fw=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Ce.update(t,n),stop:()=>Ot(t),now:()=>qe.isProcessing?qe.timestamp:lt.now()}},Bf=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let a=0;a<o;a++)r+=Math.round(e(a/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Jo=2e4;function oc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Jo;)t+=n,r=e.next(t);return t>=Jo?1/0:t}function hw(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(oc(r),Jo);return{type:"keyframes",ease:a=>r.next(o*a).value/t,duration:yt(o)}}const mw=5;function Vf(e,t,n){const r=Math.max(t-mw,0);return Xi(n-e(r),t-r)}const Re={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},ds=.001;function pw({duration:e=Re.duration,bounce:t=Re.bounce,velocity:n=Re.velocity,mass:r=Re.mass}){let o,a;ur(e<=Dt(Re.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=Yt(Re.minDamping,Re.maxDamping,s),e=Yt(Re.minDuration,Re.maxDuration,yt(e)),s<1?(o=u=>{const d=u*s,l=d*e,f=d-n,p=Qs(u,s),g=Math.exp(-l);return ds-f/p*g},a=u=>{const l=u*s*e,f=l*n+n,p=Math.pow(s,2)*Math.pow(u,2)*e,g=Math.exp(-l),b=Qs(Math.pow(u,2),s);return(-o(u)+ds>0?-1:1)*((f-p)*g)/b}):(o=u=>{const d=Math.exp(-u*e),l=(u-n)*e+1;return-ds+d*l},a=u=>{const d=Math.exp(-u*e),l=(n-u)*(e*e);return d*l});const i=5/e,c=vw(o,a,i);if(e=Dt(e),isNaN(c))return{stiffness:Re.stiffness,damping:Re.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const gw=12;function vw(e,t,n){let r=n;for(let o=1;o<gw;o++)r=r-e(r)/t(r);return r}function Qs(e,t){return e*Math.sqrt(1-t*t)}const bw=["duration","bounce"],yw=["stiffness","damping","mass"];function Ql(e,t){return t.some(n=>e[n]!==void 0)}function xw(e){let t={velocity:Re.velocity,stiffness:Re.stiffness,damping:Re.damping,mass:Re.mass,isResolvedFromDuration:!1,...e};if(!Ql(e,yw)&&Ql(e,bw))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,a=2*Yt(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Re.mass,stiffness:o,damping:a}}else{const n=pw(e);t={...t,...n,mass:Re.mass},t.isResolvedFromDuration=!0}return t}function ea(e=Re.visualDuration,t=Re.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const a=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],i={done:!1,value:a},{stiffness:c,damping:u,mass:d,duration:l,velocity:f,isResolvedFromDuration:p}=xw({...n,velocity:-yt(n.velocity||0)}),g=f||0,b=u/(2*Math.sqrt(c*d)),y=s-a,v=yt(Math.sqrt(c/d)),x=Math.abs(y)<5;r||(r=x?Re.restSpeed.granular:Re.restSpeed.default),o||(o=x?Re.restDelta.granular:Re.restDelta.default);let w;if(b<1){const C=Qs(v,b);w=P=>{const E=Math.exp(-b*v*P);return s-E*((g+b*v*y)/C*Math.sin(C*P)+y*Math.cos(C*P))}}else if(b===1)w=C=>s-Math.exp(-v*C)*(y+(g+v*y)*C);else{const C=v*Math.sqrt(b*b-1);w=P=>{const E=Math.exp(-b*v*P),D=Math.min(C*P,300);return s-E*((g+b*v*y)*Math.sinh(D)+C*y*Math.cosh(D))/C}}const M={calculatedDuration:p&&l||null,next:C=>{const P=w(C);if(p)i.done=C>=l;else{let E=C===0?g:0;b<1&&(E=C===0?Dt(g):Vf(w,C,P));const D=Math.abs(E)<=r,R=Math.abs(s-P)<=o;i.done=D&&R}return i.value=i.done?s:P,i},toString:()=>{const C=Math.min(oc(M),Jo),P=Bf(E=>M.next(C*E).value,C,30);return C+"ms "+P},toTransition:()=>{}};return M}ea.applyToOptions=e=>{const t=hw(e,100,ea);return e.ease=t.ease,e.duration=Dt(t.duration),e.type="keyframes",e};function Js({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:s,min:i,max:c,restDelta:u=.5,restSpeed:d}){const l=e[0],f={done:!1,value:l},p=D=>i!==void 0&&D<i||c!==void 0&&D>c,g=D=>i===void 0?c:c===void 0||Math.abs(i-D)<Math.abs(c-D)?i:c;let b=n*t;const y=l+b,v=s===void 0?y:s(y);v!==y&&(b=v-l);const x=D=>-b*Math.exp(-D/r),w=D=>v+x(D),M=D=>{const R=x(D),A=w(D);f.done=Math.abs(R)<=u,f.value=f.done?v:A};let C,P;const E=D=>{p(f.value)&&(C=D,P=ea({keyframes:[f.value,g(f.value)],velocity:Vf(w,D,f.value),damping:o,stiffness:a,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:D=>{let R=!1;return!P&&C===void 0&&(R=!0,M(D),E(D)),C!==void 0&&D>=C?P.next(D-C):(!R&&M(D),f)}}}function ww(e,t,n){const r=[],o=n||en.mix||Ff,a=e.length-1;for(let s=0;s<a;s++){let i=o(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||ut:t;i=Jr(c,i)}r.push(i)}return r}function ac(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const a=e.length;if(At(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=ww(t,r,o),c=i.length,u=d=>{if(s&&d<e[0])return t[0];let l=0;if(c>1)for(;l<e.length-2&&!(d<e[l+1]);l++);const f=rr(e[l],e[l+1],d);return i[l](f)};return n?d=>u(Yt(e[0],e[a-1],d)):u}function Sw(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=rr(0,t,r);e.push(Oe(n,1,o))}}function Wf(e){const t=[0];return Sw(t,e.length-1),t}function Cw(e,t){return e.map(n=>n*t)}function Mw(e,t){return e.map(()=>t||Rf).splice(0,e.length-1)}function Gn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=$x(r)?r.map(Gl):Gl(r),a={done:!1,value:t[0]},s=Cw(n&&n.length===t.length?n:Wf(t),e),i=ac(s,t,{ease:Array.isArray(o)?o:Mw(t,o)});return{calculatedDuration:e,next:c=>(a.value=i(c),a.done=c>=e,a)}}const Ew=e=>e!==null;function sc(e,{repeat:t,repeatType:n="loop"},r,o=1){const a=e.filter(Ew),i=o<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!i||r===void 0?a[i]:r}const Tw={decay:Js,inertia:Js,tween:Gn,keyframes:Gn,spring:ea};function zf(e){typeof e.type=="string"&&(e.type=Tw[e.type])}class ic{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 Pw=e=>e/100;class cc extends ic{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,o;const{motionValue:n}=this.options;n&&n.updatedAt!==lt.now()&&this.tick(lt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;zf(t);const{type:n=Gn,repeat:r=0,repeatDelay:o=0,repeatType:a,velocity:s=0}=t;let{keyframes:i}=t;const c=n||Gn;process.env.NODE_ENV!=="production"&&c!==Gn&&At(i.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${i}`,"spring-two-frames"),c!==Gn&&typeof i[0]!="number"&&(this.mixKeyframes=Jr(Pw,Ff(i[0],i[1])),i=[0,100]);const u=c({...t,keyframes:i});a==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...i].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=oc(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:i,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:l,repeatType:f,repeatDelay:p,type:g,onUpdate:b,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let w=this.currentTime,M=r;if(l){const D=Math.min(this.currentTime,o)/i;let R=Math.floor(D),A=D%1;!A&&D>=1&&(A=1),A===1&&R--,R=Math.min(R,l+1),!!(R%2)&&(f==="reverse"?(A=1-A,p&&(A-=p/i)):f==="mirror"&&(M=s)),w=Yt(0,1,A)*i}const C=x?{done:!1,value:d[0]}:M.next(w);a&&(C.value=a(C.value));let{done:P}=C;!x&&c!==null&&(P=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return E&&g!==Js&&(C.value=sc(d,this.options,y,this.speed)),b&&b(C.value),E&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return yt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+yt(t)}get time(){return yt(this.currentTime)}set time(t){var n;t=Dt(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),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(lt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=yt(this.currentTime))}play(){var o,a;if(this.isStopped)return;const{driver:t=fw,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(a=(o=this.options).onPlay)==null||a.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),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(lt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}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){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Dw(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Rn=e=>e*180/Math.PI,ei=e=>{const t=Rn(Math.atan2(e[1],e[0]));return ti(t)},Rw={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ei,rotateZ:ei,skewX:e=>Rn(Math.atan(e[1])),skewY:e=>Rn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ti=e=>(e=e%360,e<0&&(e+=360),e),Jl=ei,eu=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),tu=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Aw={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:eu,scaleY:tu,scale:e=>(eu(e)+tu(e))/2,rotateX:e=>ti(Rn(Math.atan2(e[6],e[5]))),rotateY:e=>ti(Rn(Math.atan2(-e[2],e[0]))),rotateZ:Jl,rotate:Jl,skewX:e=>Rn(Math.atan(e[4])),skewY:e=>Rn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ni(e){return e.includes("scale")?1:0}function ri(e,t){if(!e||e==="none")return ni(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Aw,o=n;else{const i=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Rw,o=i}if(!o)return ni(t);const a=r[t],s=o[1].split(",").map(kw);return typeof a=="function"?a(s):s[a]}const Ow=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ri(n,t)};function kw(e){return parseFloat(e.trim())}const fr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hr=new Set(fr),nu=e=>e===dr||e===ie,Nw=new Set(["x","y","z"]),_w=fr.filter(e=>!Nw.has(e));function Iw(e){const t=[];return _w.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const On={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})=>ri(t,"x"),y:(e,{transform:t})=>ri(t,"y")};On.translateX=On.x;On.translateY=On.y;const kn=new Set;let oi=!1,ai=!1,si=!1;function Hf(){if(ai){const e=Array.from(kn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Iw(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([a,s])=>{var i;(i=r.getValue(a))==null||i.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ai=!1,oi=!1,kn.forEach(e=>e.complete(si)),kn.clear()}function Yf(){kn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ai=!0)})}function jw(){si=!0,Yf(),Hf(),si=!1}class lc{constructor(t,n,r,o,a,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=a,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(kn.add(this),oi||(oi=!0,Ce.read(Yf),Ce.resolveKeyframes(Hf))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const a=o==null?void 0:o.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const i=r.readValue(n,s);i!=null&&(t[0]=i)}t[0]===void 0&&(t[0]=s),o&&a===void 0&&o.set(t[0])}Dw(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),kn.delete(this)}cancel(){this.state==="scheduled"&&(kn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Lw=e=>e.startsWith("--");function $w(e,t,n){Lw(t)?e.style.setProperty(t,n):e.style[t]=n}const Uf=Ki(()=>window.ScrollTimeline!==void 0),Fw={};function Bw(e,t){const n=Ki(e);return()=>Fw[t]??n()}const Gf=Bw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Dr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ru={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dr([0,.65,.55,1]),circOut:Dr([.55,0,1,.45]),backIn:Dr([.31,.01,.66,-.59]),backOut:Dr([.33,1.53,.69,.99])};function Kf(e,t){if(e)return typeof e=="function"?Gf()?Bf(e,t):"ease-out":Af(e)?Dr(e):Array.isArray(e)?e.map(n=>Kf(n,t)||ru.easeOut):ru[e]}function Vw(e,t,n,{delay:r=0,duration:o=300,repeat:a=0,repeatType:s="loop",ease:i="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const l=Kf(i,o);Array.isArray(l)&&(d.easing=l);const f={delay:r,duration:o,easing:Array.isArray(l)?"linear":l,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(d,f)}function qf(e){return typeof e=="function"&&"applyToOptions"in e}function Ww({type:e,...t}){return qf(e)&&Gf()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class zw extends ic{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:a,allowFlatten:s=!1,finalKeyframe:i,onComplete:c}=t;this.isPseudoElement=!!a,this.allowFlatten=s,this.options=t,At(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Ww(t);this.animation=Vw(n,r,o,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const d=sc(o,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(d):$w(n,r,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}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(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return yt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+yt(t)}get time(){return yt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Dt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Uf()?(this.animation.timeline=t,ut):n(this)}}const Xf={anticipate:Tf,backInOut:Ef,circInOut:Df};function Hw(e){return e in Xf}function Yw(e){typeof e.ease=="string"&&Hw(e.ease)&&(e.ease=Xf[e.ease])}const ou=10;class Uw extends zw{constructor(t){Yw(t),zf(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:a,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const i=new cc({...s,autoplay:!1}),c=Dt(this.finishedTime??this.time);n.setWithVelocity(i.sample(c-ou).value,i.sample(c).value,ou),i.stop()}}const au=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(un.test(e)||e==="0")&&!e.startsWith("url("));function Gw(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 Kw(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],s=au(o,t),i=au(a,t);return ur(s===i,`You are trying to animate ${t} from "${o}" to "${a}". "${s?a:o}" is not an animatable value.`,"value-not-animatable"),!s||!i?!1:Gw(e)||(n==="spring"||qf(n))&&r}function ii(e){e.duration=0,e.type="keyframes"}const qw=new Set(["opacity","clipPath","filter","transform"]),Xw=Ki(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Zw(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:a,type:s}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return Xw()&&n&&qw.has(n)&&(n!=="transform"||!u)&&!c&&!r&&o!=="mirror"&&a!==0&&s!=="inertia"}const Qw=40;class Jw extends ic{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:s="loop",keyframes:i,name:c,motionValue:u,element:d,...l}){var g;super(),this.stop=()=>{var b,y;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=lt.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:a,repeatType:s,name:c,motionValue:u,element:d,...l},p=(d==null?void 0:d.KeyframeResolver)||lc;this.keyframeResolver=new p(i,(b,y,v)=>this.onKeyframesResolved(b,y,f,!v),c,u,d),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:a,type:s,velocity:i,delay:c,isHandoff:u,onUpdate:d}=r;this.resolvedAt=lt.now(),Kw(t,a,s,i)||((en.instantAnimations||!c)&&(d==null||d(sc(t,r,n))),t[0]=t[t.length-1],ii(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Qw?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!u&&Zw(f)?new Uw({...f,element:f.motionValue.owner.current}):new cc(f);p.finished.then(()=>this.notifyFinished()).catch(ut),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),jw()),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(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const e0=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function t0(e){const t=e0.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const n0=4;function Zf(e,t,n=1){At(n<=n0,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=t0(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const s=a.trim();return bf(s)?parseFloat(s):s}return ec(o)?Zf(o,t,n+1):o}function uc(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Qf=new Set(["width","height","top","left","right","bottom",...fr]),r0={test:e=>e==="auto",parse:e=>e},Jf=e=>t=>t.test(e),eh=[dr,ie,zt,an,Xx,qx,r0],su=e=>eh.find(Jf(e));function o0(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xf(e):!0}const a0=new Set(["brightness","contrast","saturate","opacity"]);function s0(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(tc)||[];if(!r)return e;const o=n.replace(r,"");let a=a0.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+o+")"}const i0=/\b([a-z-]*)\(.*?\)/gu,ci={...un,getAnimatableNone:e=>{const t=e.match(i0);return t?t.map(s0).join(" "):e}},iu={...dr,transform:Math.round},c0={rotate:an,rotateX:an,rotateY:an,rotateZ:an,scale:Ro,scaleX:Ro,scaleY:Ro,scaleZ:Ro,skew:an,skewX:an,skewY:an,distance:ie,translateX:ie,translateY:ie,translateZ:ie,x:ie,y:ie,z:ie,perspective:ie,transformPerspective:ie,opacity:$r,originX:Kl,originY:Kl,originZ:ie},dc={borderWidth:ie,borderTopWidth:ie,borderRightWidth:ie,borderBottomWidth:ie,borderLeftWidth:ie,borderRadius:ie,radius:ie,borderTopLeftRadius:ie,borderTopRightRadius:ie,borderBottomRightRadius:ie,borderBottomLeftRadius:ie,width:ie,maxWidth:ie,height:ie,maxHeight:ie,top:ie,right:ie,bottom:ie,left:ie,padding:ie,paddingTop:ie,paddingRight:ie,paddingBottom:ie,paddingLeft:ie,margin:ie,marginTop:ie,marginRight:ie,marginBottom:ie,marginLeft:ie,backgroundPositionX:ie,backgroundPositionY:ie,...c0,zIndex:iu,fillOpacity:$r,strokeOpacity:$r,numOctaves:iu},l0={...dc,color:Ve,backgroundColor:Ve,outlineColor:Ve,fill:Ve,stroke:Ve,borderColor:Ve,borderTopColor:Ve,borderRightColor:Ve,borderBottomColor:Ve,borderLeftColor:Ve,filter:ci,WebkitFilter:ci},th=e=>l0[e];function nh(e,t){let n=th(e);return n!==ci&&(n=un),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const u0=new Set(["auto","none","0"]);function d0(e,t,n){let r=0,o;for(;r<e.length&&!o;){const a=e[r];typeof a=="string"&&!u0.has(a)&&Fr(a).values.length&&(o=e[r]),r++}if(o&&n)for(const a of t)e[a]=nh(n,o)}class f0 extends lc{constructor(t,n,r,o,a){super(t,n,r,o,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),ec(u))){const d=Zf(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Qf.has(r)||t.length!==2)return;const[o,a]=t,s=su(o),i=su(a);if(s!==i)if(nu(s)&&nu(i))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else On[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||o0(t[o]))&&r.push(o);r.length&&d0(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=On[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var i;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const a=r.length-1,s=r[a];r[a]=On[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(i=this.removedTransforms)!=null&&i.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function rh(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const o=document.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const oh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ah(e){return yf(e)&&"offsetHeight"in e}const cu=30,h0=e=>!isNaN(parseFloat(e)),Nr={current:void 0};class m0{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var a;const o=lt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=lt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=h0(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ya(!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 qi);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ce.read(()=>{this.events.change.getSize()||this.stop()})}:r}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,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.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 Nr.current&&Nr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=lt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>cu)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,cu);return Xi(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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Tt(e,t){return new m0(e,t)}const{schedule:fc}=Of(queueMicrotask,!1),Et={x:!1,y:!1};function sh(){return Et.x||Et.y}function p0(e){return e==="x"||e==="y"?Et[e]?null:(Et[e]=!0,()=>{Et[e]=!1}):Et.x||Et.y?null:(Et.x=Et.y=!0,()=>{Et.x=Et.y=!1})}function ih(e,t){const n=rh(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function lu(e){return!(e.pointerType==="touch"||sh())}function g0(e,t,n={}){const[r,o,a]=ih(e,n),s=i=>{if(!lu(i))return;const{target:c}=i,u=t(c,i);if(typeof u!="function"||!c)return;const d=l=>{lu(l)&&(u(l),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,o)};return r.forEach(i=>{i.addEventListener("pointerenter",s,o)}),a}const ch=(e,t)=>t?e===t?!0:ch(e,t.parentElement):!1,hc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,v0=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function b0(e){return v0.has(e.tagName)||e.tabIndex!==-1}const Ho=new WeakSet;function uu(e){return t=>{t.key==="Enter"&&e(t)}}function fs(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const y0=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=uu(()=>{if(Ho.has(n))return;fs(n,"down");const o=uu(()=>{fs(n,"up")}),a=()=>fs(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function du(e){return hc(e)&&!sh()}function x0(e,t,n={}){const[r,o,a]=ih(e,n),s=i=>{const c=i.currentTarget;if(!du(i))return;Ho.add(c);const u=t(c,i),d=(p,g)=>{window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",f),Ho.has(c)&&Ho.delete(c),du(p)&&typeof u=="function"&&u(p,{success:g})},l=p=>{d(p,c===window||c===document||n.useGlobalTarget||ch(c,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",l,o),window.addEventListener("pointercancel",f,o)};return r.forEach(i=>{(n.useGlobalTarget?window:i).addEventListener("pointerdown",s,o),ah(i)&&(i.addEventListener("focus",u=>y0(u,o)),!b0(i)&&!i.hasAttribute("tabindex")&&(i.tabIndex=0))}),a}function mc(e){return yf(e)&&"ownerSVGElement"in e}const Yo=new WeakMap;let sn;const lh=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:mc(r)&&"getBBox"in r?r.getBBox()[t]:r[n],w0=lh("inline","width","offsetWidth"),S0=lh("block","height","offsetHeight");function C0({target:e,borderBoxSize:t}){var n;(n=Yo.get(e))==null||n.forEach(r=>{r(e,{get width(){return w0(e,t)},get height(){return S0(e,t)}})})}function M0(e){e.forEach(C0)}function E0(){typeof ResizeObserver>"u"||(sn=new ResizeObserver(M0))}function T0(e,t){sn||E0();const n=rh(e);return n.forEach(r=>{let o=Yo.get(r);o||(o=new Set,Yo.set(r,o)),o.add(t),sn==null||sn.observe(r)}),()=>{n.forEach(r=>{const o=Yo.get(r);o==null||o.delete(t),o!=null&&o.size||sn==null||sn.unobserve(r)})}}const Uo=new Set;let Kn;function P0(){Kn=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Uo.forEach(t=>t(e))},window.addEventListener("resize",Kn)}function D0(e){return Uo.add(e),Kn||P0(),()=>{Uo.delete(e),!Uo.size&&typeof Kn=="function"&&(window.removeEventListener("resize",Kn),Kn=void 0)}}function R0(e,t){return typeof e=="function"?D0(e):T0(e,t)}function uh(e,t){let n;const r=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;n!==s&&e(s),n=s};return Ce.preUpdate(r,!0),()=>Ot(r)}function A0(e){return mc(e)&&e.tagName==="svg"}function O0(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],a=e[2+n],s=e[3+n],i=ac(o,a,s);return t?i(r):i}const et=e=>!!(e&&e.getVelocity),k0=[...eh,Ve,un],N0=e=>k0.find(Jf(e)),pc=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function _0(e=!0){const t=S.useContext(Yi);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,a=S.useId();S.useEffect(()=>{if(e)return o(a)},[e]);const s=S.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,s]:[!0]}const dh=S.createContext({strict:!1}),fu={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"]},or={};for(const e in fu)or[e]={isEnabled:t=>fu[e].some(n=>!!t[n])};function I0(e){for(const t in e)or[t]={...or[t],...e[t]}}const j0=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 ta(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||j0.has(e)}let fh=e=>!ta(e);function L0(e){typeof e=="function"&&(fh=t=>t.startsWith("on")?!ta(t):e(t))}try{L0(require("@emotion/is-prop-valid").default)}catch{}function $0(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(fh(o)||n===!0&&ta(o)||!t&&!ta(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const xa=S.createContext({});function wa(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Br(e){return typeof e=="string"||Array.isArray(e)}const gc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vc=["initial",...gc];function Sa(e){return wa(e.animate)||vc.some(t=>Br(e[t]))}function hh(e){return!!(Sa(e)||e.variants)}function F0(e,t){if(Sa(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Br(n)?n:void 0,animate:Br(r)?r:void 0}}return e.inherit!==!1?t:{}}function B0(e){const{initial:t,animate:n}=F0(e,S.useContext(xa));return S.useMemo(()=>({initial:t,animate:n}),[hu(t),hu(n)])}function hu(e){return Array.isArray(e)?e.join(" "):e}const Vr={};function V0(e){for(const t in e)Vr[t]=e[t],Ji(t)&&(Vr[t].isCSSVariable=!0)}function mh(e,{layout:t,layoutId:n}){return hr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Vr[e]||e==="opacity")}const W0={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},z0=fr.length;function H0(e,t,n){let r="",o=!0;for(let a=0;a<z0;a++){const s=fr[a],i=e[s];if(i===void 0)continue;let c=!0;if(typeof i=="number"?c=i===(s.startsWith("scale")?1:0):c=parseFloat(i)===0,!c||n){const u=oh(i,dc[s]);if(!c){o=!1;const d=W0[s]||s;r+=`${d}(${u}) `}n&&(t[s]=u)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function bc(e,t,n){const{style:r,vars:o,transformOrigin:a}=e;let s=!1,i=!1;for(const c in t){const u=t[c];if(hr.has(c)){s=!0;continue}else if(Ji(c)){o[c]=u;continue}else{const d=oh(u,dc[c]);c.startsWith("origin")?(i=!0,a[c]=d):r[c]=d}}if(t.transform||(s||n?r.transform=H0(t,e.transform,n):r.transform&&(r.transform="none")),i){const{originX:c="50%",originY:u="50%",originZ:d=0}=a;r.transformOrigin=`${c} ${u} ${d}`}}const yc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ph(e,t,n){for(const r in t)!et(t[r])&&!mh(r,n)&&(e[r]=t[r])}function Y0({transformTemplate:e},t){return S.useMemo(()=>{const n=yc();return bc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function U0(e,t){const n=e.style||{},r={};return ph(r,n,e),Object.assign(r,Y0(e,t)),r}function G0(e,t){const n={},r=U0(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const K0={offset:"stroke-dashoffset",array:"stroke-dasharray"},q0={offset:"strokeDashoffset",array:"strokeDasharray"};function X0(e,t,n=1,r=0,o=!0){e.pathLength=1;const a=o?K0:q0;e[a.offset]=ie.transform(-r);const s=ie.transform(t),i=ie.transform(n);e[a.array]=`${s} ${i}`}function gh(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...i},c,u,d){if(bc(e,i,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:l,style:f}=e;l.transform&&(f.transform=l.transform,delete l.transform),(f.transform||l.transformOrigin)&&(f.transformOrigin=l.transformOrigin??"50% 50%",delete l.transformOrigin),f.transform&&(f.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete l.transformBox),t!==void 0&&(l.x=t),n!==void 0&&(l.y=n),r!==void 0&&(l.scale=r),o!==void 0&&X0(l,o,a,s,!1)}const vh=()=>({...yc(),attrs:{}}),bh=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Z0(e,t,n,r){const o=S.useMemo(()=>{const a=vh();return gh(a,t,bh(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};ph(a,e.style,e),o.style={...a,...o.style}}return o}const Q0=["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 xc(e){return typeof e!="string"||e.includes("-")?!1:!!(Q0.indexOf(e)>-1||/[A-Z]/u.test(e))}function J0(e,t,n,{latestValues:r},o,a=!1){const i=(xc(e)?Z0:G0)(t,r,o,e),c=$0(t,typeof e=="string",a),u=e!==S.Fragment?{...c,...i,ref:n}:{},{children:d}=t,l=S.useMemo(()=>et(d)?d.get():d,[d]);return S.createElement(e,{...u,children:l})}function mu(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function wc(e,t,n,r){if(typeof t=="function"){const[o,a]=mu(r);t=t(n!==void 0?n:e.custom,o,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,a]=mu(r);t=t(n!==void 0?n:e.custom,o,a)}return t}function Go(e){return et(e)?e.get():e}function eS({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:tS(n,r,o,e),renderState:t()}}function tS(e,t,n,r){const o={},a=r(e,{});for(const f in a)o[f]=Go(a[f]);let{initial:s,animate:i}=e;const c=Sa(e),u=hh(e);t&&u&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),i===void 0&&(i=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const l=d?i:s;if(l&&typeof l!="boolean"&&!wa(l)){const f=Array.isArray(l)?l:[l];for(let p=0;p<f.length;p++){const g=wc(e,f[p]);if(g){const{transitionEnd:b,transition:y,...v}=g;for(const x in v){let w=v[x];if(Array.isArray(w)){const M=d?w.length-1:0;w=w[M]}w!==null&&(o[x]=w)}for(const x in b)o[x]=b[x]}}}return o}const yh=e=>(t,n)=>{const r=S.useContext(xa),o=S.useContext(Yi),a=()=>eS(e,t,r,o);return n?a():ba(a)};function Sc(e,t,n){var a;const{style:r}=e,o={};for(const s in r)(et(r[s])||t.style&&et(t.style[s])||mh(s,e)||((a=n==null?void 0:n.getValue(s))==null?void 0:a.liveStyle)!==void 0)&&(o[s]=r[s]);return o}const nS=yh({scrapeMotionValuesFromProps:Sc,createRenderState:yc});function xh(e,t,n){const r=Sc(e,t,n);for(const o in e)if(et(e[o])||et(t[o])){const a=fr.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[a]=e[o]}return r}const rS=yh({scrapeMotionValuesFromProps:xh,createRenderState:vh}),oS=Symbol.for("motionComponentSymbol");function qn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function aS(e,t,n){return S.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):qn(n)&&(n.current=r))},[t])}const Cc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),sS="framerAppearId",wh="data-"+Cc(sS),Sh=S.createContext({});function iS(e,t,n,r,o){var b,y;const{visualElement:a}=S.useContext(xa),s=S.useContext(dh),i=S.useContext(Yi),c=S.useContext(pc).reducedMotion,u=S.useRef(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceContext:i,blockInitialAnimation:i?i.initial===!1:!1,reducedMotionConfig:c}));const d=u.current,l=S.useContext(Sh);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&cS(u.current,n,o,l);const f=S.useRef(!1);S.useInsertionEffect(()=>{d&&f.current&&d.update(n,i)});const p=n[wh],g=S.useRef(!!p&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,p))&&((y=window.MotionHasOptimisedAnimation)==null?void 0:y.call(window,p)));return Hi(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),g.current&&d.animationState&&d.animationState.animateChanges())}),S.useEffect(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)==null||v.call(window,p)}),g.current=!1),d.enteringChildren=void 0)}),d}function cS(e,t,n,r){const{layoutId:o,layout:a,drag:s,dragConstraints:i,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ch(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:!!s||i&&qn(i),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function Ch(e){if(e)return e.options.allowProjection!==!1?e.projection:Ch(e.parent)}function hs(e,{forwardMotionProps:t=!1}={},n,r){n&&I0(n);const o=xc(e)?rS:nS;function a(i,c){let u;const d={...S.useContext(pc),...i,layoutId:lS(i)},{isStatic:l}=d,f=B0(i),p=o(i,l);if(!l&&zi){uS(d,n);const g=dS(d);u=g.MeasureLayout,f.visualElement=iS(e,p,d,r,g.ProjectionNode)}return m.jsxs(xa.Provider,{value:f,children:[u&&f.visualElement?m.jsx(u,{visualElement:f.visualElement,...d}):null,J0(e,i,aS(p,f.visualElement,c),p,l,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const s=S.forwardRef(a);return s[oS]=e,s}function lS({layoutId:e}){const t=S.useContext(vf).id;return t&&e!==void 0?t+"-"+e:e}function uS(e,t){const n=S.useContext(dh).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ur(!1,r,"lazy-strict-mode"):At(!1,r,"lazy-strict-mode")}}function dS(e){const{drag:t,layout:n}=or;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function fS(e,t){if(typeof Proxy>"u")return hs;const n=new Map,r=(a,s)=>hs(a,s,e,t),o=(a,s)=>(process.env.NODE_ENV!=="production"&&ya(!1,"motion() is deprecated. Use motion.create() instead."),r(a,s));return new Proxy(o,{get:(a,s)=>s==="create"?r:(n.has(s)||n.set(s,hs(s,void 0,e,t)),n.get(s))})}function Mh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hS({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mS(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ms(e){return e===void 0||e===1}function li({scale:e,scaleX:t,scaleY:n}){return!ms(e)||!ms(t)||!ms(n)}function Tn(e){return li(e)||Eh(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Eh(e){return pu(e.x)||pu(e.y)}function pu(e){return e&&e!=="0%"}function na(e,t,n){const r=e-n,o=t*r;return n+o}function gu(e,t,n,r,o){return o!==void 0&&(e=na(e,o,r)),na(e,n,r)+t}function ui(e,t=0,n=1,r,o){e.min=gu(e.min,t,n,r,o),e.max=gu(e.max,t,n,r,o)}function Th(e,{x:t,y:n}){ui(e.x,t.translate,t.scale,t.originPoint),ui(e.y,n.translate,n.scale,n.originPoint)}const vu=.999999999999,bu=1.0000000000001;function pS(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let a,s;for(let i=0;i<o;i++){a=n[i],s=a.projectionDelta;const{visualElement:c}=a.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Zn(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Th(e,s)),r&&Tn(a.latestValues)&&Zn(e,a.latestValues))}t.x<bu&&t.x>vu&&(t.x=1),t.y<bu&&t.y>vu&&(t.y=1)}function Xn(e,t){e.min=e.min+t,e.max=e.max+t}function yu(e,t,n,r,o=.5){const a=Oe(e.min,e.max,o);ui(e,t,n,a,r)}function Zn(e,t){yu(e.x,t.x,t.scaleX,t.scale,t.originX),yu(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ph(e,t){return Mh(mS(e.getBoundingClientRect(),t))}function gS(e,t,n){const r=Ph(e,n),{scroll:o}=t;return o&&(Xn(r.x,o.offset.x),Xn(r.y,o.offset.y)),r}const xu=()=>({translate:0,scale:1,origin:0,originPoint:0}),Qn=()=>({x:xu(),y:xu()}),wu=()=>({min:0,max:0}),je=()=>({x:wu(),y:wu()}),di={current:null},Dh={current:!1};function vS(){if(Dh.current=!0,!!zi)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>di.current=e.matches;e.addEventListener("change",t),t()}else di.current=!1}const bS=new WeakMap;function yS(e,t,n){for(const r in t){const o=t[r],a=n[r];if(et(o))e.addValue(r,o);else if(et(a))e.addValue(r,Tt(o,{owner:e}));else if(a!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,Tt(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Su=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class xS{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:a,visualState:s},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=lc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=lt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Ce.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=s;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=i,this.blockInitialAnimation=!!a,this.isControllingVariants=Sa(n),this.isVariantNode=hh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...l}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in l){const p=l[f];c[f]!==void 0&&et(p)&&p.set(c[f])}}mount(t){var n;this.current=t,bS.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((r,o)=>this.bindToMotionValue(o,r)),Dh.current||vS(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:di.current,process.env.NODE_ENV!=="production"&&ya(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Ot(this.notifyUpdate),Ot(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.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 r=hr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Ce.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),a&&a(),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 or){const n=or[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):je()}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 r=0;r<Su.length;r++){const o=Su[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const a="on"+o,s=t[a];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=yS(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 r=this.values.get(t);n!==r&&(r&&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 r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Tt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(bf(r)||xf(r))?r=parseFloat(r):!N0(r)&&un.test(n)&&(r=nh(t,n)),this.setBaseTarget(t,et(r)?r.get():r)),et(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var a;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=wc(this.props,n,(a=this.presenceContext)==null?void 0:a.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!et(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new qi),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){fc.render(this.render)}}class Rh extends xS{constructor(){super(...arguments),this.KeyframeResolver=f0}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;et(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ah(e,{style:t,vars:n},r,o){const a=e.style;let s;for(s in t)a[s]=t[s];o==null||o.applyProjectionStyles(a,r);for(s in n)a.setProperty(s,n[s])}function wS(e){return window.getComputedStyle(e)}class SS extends Rh{constructor(){super(...arguments),this.type="html",this.renderInstance=Ah}readValueFromInstance(t,n){var r;if(hr.has(n))return(r=this.projection)!=null&&r.isProjecting?ni(n):Ow(t,n);{const o=wS(t),a=(Ji(n)?o.getPropertyValue(n):o[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ph(t,n)}build(t,n,r){bc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Sc(t,n,r)}}const Oh=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function CS(e,t,n,r){Ah(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Oh.has(o)?o:Cc(o),t.attrs[o])}class MS extends Rh{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=je}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(hr.has(n)){const r=th(n);return r&&r.default||0}return n=Oh.has(n)?n:Cc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return xh(t,n,r)}build(t,n,r){gh(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){CS(t,n,r,o)}mount(t){this.isSVGTag=bh(t.tagName),super.mount(t)}}const ES=(e,t)=>xc(e)?new MS(t):new SS(t,{allowProjection:e!==S.Fragment});function Jn(e,t,n){const r=e.getProps();return wc(r,t,n!==void 0?n:r.custom,e)}const fi=e=>Array.isArray(e);function TS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Tt(n))}function PS(e){return fi(e)?e[e.length-1]||0:e}function DS(e,t){const n=Jn(e,t);let{transitionEnd:r={},transition:o={},...a}=n||{};a={...a,...r};for(const s in a){const i=PS(a[s]);TS(e,s,i)}}function RS(e){return!!(et(e)&&e.add)}function hi(e,t){const n=e.getValue("willChange");if(RS(n))return n.add(t);if(!n&&en.WillChange){const r=new en.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function kh(e){return e.props[wh]}const AS=e=>e!==null;function OS(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(AS),a=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[a]}const kS={type:"spring",stiffness:500,damping:25,restSpeed:10},NS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_S={type:"keyframes",duration:.8},IS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jS=(e,{keyframes:t})=>t.length>2?_S:hr.has(e)?e.startsWith("scale")?NS(t[1]):kS:IS;function LS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:a,repeatType:s,repeatDelay:i,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const Mc=(e,t,n,r={},o,a)=>s=>{const i=uc(r,e)||{},c=i.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Dt(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...i,delay:-u,onUpdate:f=>{t.set(f),i.onUpdate&&i.onUpdate(f)},onComplete:()=>{s(),i.onComplete&&i.onComplete()},name:e,motionValue:t,element:a?void 0:o};LS(i)||Object.assign(d,jS(e,d)),d.duration&&(d.duration=Dt(d.duration)),d.repeatDelay&&(d.repeatDelay=Dt(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let l=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(ii(d),d.delay===0&&(l=!0)),(en.instantAnimations||en.skipAnimations)&&(l=!0,ii(d),d.delay=0),d.allowFlatten=!i.type&&!i.ease,l&&!a&&t.get()!==void 0){const f=OS(d.keyframes,i);if(f!==void 0){Ce.update(()=>{d.onUpdate(f),d.onComplete()});return}}return i.isSync?new cc(d):new Jw(d)};function $S({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Nh(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:s,...i}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in i){const l=e.getValue(d,e.latestValues[d]??null),f=i[d];if(f===void 0||u&&$S(u,d))continue;const p={delay:n,...uc(a||{},d)},g=l.get();if(g!==void 0&&!l.isAnimating&&!Array.isArray(f)&&f===g&&!p.velocity)continue;let b=!1;if(window.MotionHandoffAnimation){const v=kh(e);if(v){const x=window.MotionHandoffAnimation(v,d,Ce);x!==null&&(p.startTime=x,b=!0)}}hi(e,d),l.start(Mc(d,l,f,e.shouldReduceMotion&&Qf.has(d)?{type:!1}:p,e,b));const y=l.animation;y&&c.push(y)}return s&&Promise.all(c).then(()=>{Ce.update(()=>{s&&DS(e,s)})}),c}function _h(e,t,n,r=0,o=1){const a=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),s=e.size,i=(s-1)*r;return typeof n=="function"?n(a,s):o===1?a*r:i-a*r}function mi(e,t,n={}){var c;const r=Jn(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const a=r?()=>Promise.all(Nh(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:l,staggerDirection:f}=o;return FS(e,t,u,d,l,f,n)}:()=>Promise.resolve(),{when:i}=o;if(i){const[u,d]=i==="beforeChildren"?[a,s]:[s,a];return u().then(()=>d())}else return Promise.all([a(),s(n.delay)])}function FS(e,t,n=0,r=0,o=0,a=1,s){const i=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),i.push(mi(c,t,{...s,delay:n+(typeof r=="function"?0:r)+_h(e.variantChildren,c,r,o,a)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(i)}function BS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(a=>mi(e,a,n));r=Promise.all(o)}else if(typeof t=="string")r=mi(e,t,n);else{const o=typeof t=="function"?Jn(e,t,n.custom):t;r=Promise.all(Nh(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Ih(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const VS=vc.length;function jh(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?jh(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<VS;n++){const r=vc[n],o=e.props[r];(Br(o)||o===!1)&&(t[r]=o)}return t}const WS=[...gc].reverse(),zS=gc.length;function HS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>BS(e,n,r)))}function YS(e){let t=HS(e),n=Cu(),r=!0;const o=c=>(u,d)=>{var f;const l=Jn(e,d,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(l){const{transition:p,transitionEnd:g,...b}=l;u={...u,...b,...g}}return u};function a(c){t=c(e)}function s(c){const{props:u}=e,d=jh(e.parent)||{},l=[],f=new Set;let p={},g=1/0;for(let y=0;y<zS;y++){const v=WS[y],x=n[v],w=u[v]!==void 0?u[v]:d[v],M=Br(w),C=v===c?x.isActive:null;C===!1&&(g=y);let P=w===d[v]&&w!==u[v]&&M;if(P&&r&&e.manuallyAnimateOnMount&&(P=!1),x.protectedKeys={...p},!x.isActive&&C===null||!w&&!x.prevProp||wa(w)||typeof w=="boolean")continue;const E=US(x.prevProp,w);let D=E||v===c&&x.isActive&&!P&&M||y>g&&M,R=!1;const A=Array.isArray(w)?w:[w];let N=A.reduce(o(v),{});C===!1&&(N={});const{prevResolvedValues:z={}}=x,O={...z,...N},U=$=>{D=!0,f.has($)&&(R=!0,f.delete($)),x.needsAnimating[$]=!0;const j=e.getValue($);j&&(j.liveStyle=!1)};for(const $ in O){const j=N[$],_=z[$];if(p.hasOwnProperty($))continue;let Z=!1;fi(j)&&fi(_)?Z=!Ih(j,_):Z=j!==_,Z?j!=null?U($):f.add($):j!==void 0&&f.has($)?U($):x.protectedKeys[$]=!0}x.prevProp=w,x.prevResolvedValues=N,x.isActive&&(p={...p,...N}),r&&e.blockInitialAnimation&&(D=!1);const K=P&&E;D&&(!K||R)&&l.push(...A.map($=>{const j={type:v};if(typeof $=="string"&&r&&!K&&e.manuallyAnimateOnMount&&e.parent){const{parent:_}=e,Z=Jn(_,$);if(_.enteringChildren&&Z){const{delayChildren:ae}=Z.transition||{};j.delay=_h(_.enteringChildren,e,ae)}}return{animation:$,options:j}}))}if(f.size){const y={};if(typeof u.initial!="boolean"){const v=Jn(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(y.transition=v.transition)}f.forEach(v=>{const x=e.getBaseTarget(v),w=e.getValue(v);w&&(w.liveStyle=!0),y[v]=x??null}),l.push({animation:y})}let b=!!l.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(l):Promise.resolve()}function i(c,u){var l;if(n[c].isActive===u)return Promise.resolve();(l=e.variantChildren)==null||l.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(c,u)}),n[c].isActive=u;const d=s(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:s,setActive:i,setAnimateFunction:a,getState:()=>n,reset:()=>{n=Cu()}}}function US(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ih(t,e):!1}function Mn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cu(){return{animate:Mn(!0),whileInView:Mn(),whileHover:Mn(),whileTap:Mn(),whileDrag:Mn(),whileFocus:Mn(),exit:Mn()}}class pn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class GS extends pn{constructor(t){super(t),t.animationState||(t.animationState=YS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();wa(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(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let KS=0;class qS extends pn{constructor(){super(...arguments),this.id=KS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const XS={animation:{Feature:GS},exit:{Feature:qS}};function Wr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function no(e){return{point:{x:e.pageX,y:e.pageY}}}const ZS=e=>t=>hc(t)&&e(t,no(t));function _r(e,t,n,r){return Wr(e,t,ZS(n),r)}const Lh=1e-4,QS=1-Lh,JS=1+Lh,$h=.01,eC=0-$h,tC=0+$h;function ot(e){return e.max-e.min}function nC(e,t,n){return Math.abs(e-t)<=n}function Mu(e,t,n,r=.5){e.origin=r,e.originPoint=Oe(t.min,t.max,e.origin),e.scale=ot(n)/ot(t),e.translate=Oe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=QS&&e.scale<=JS||isNaN(e.scale))&&(e.scale=1),(e.translate>=eC&&e.translate<=tC||isNaN(e.translate))&&(e.translate=0)}function Ir(e,t,n,r){Mu(e.x,t.x,n.x,r?r.originX:void 0),Mu(e.y,t.y,n.y,r?r.originY:void 0)}function Eu(e,t,n){e.min=n.min+t.min,e.max=e.min+ot(t)}function rC(e,t,n){Eu(e.x,t.x,n.x),Eu(e.y,t.y,n.y)}function Tu(e,t,n){e.min=t.min-n.min,e.max=e.min+ot(t)}function jr(e,t,n){Tu(e.x,t.x,n.x),Tu(e.y,t.y,n.y)}function bt(e){return[e("x"),e("y")]}const Fh=({current:e})=>e?e.ownerDocument.defaultView:null,Pu=(e,t)=>Math.abs(e-t);function oC(e,t){const n=Pu(e.x,t.x),r=Pu(e.y,t.y);return Math.sqrt(n**2+r**2)}class Bh{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:a=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=gs(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=oC(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!g)return;const{point:b}=f,{timestamp:y}=qe;this.history.push({...b,timestamp:y});const{onStart:v,onMove:x}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ps(p,this.transformPagePoint),Ce.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:g,onSessionEnd:b,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=gs(f.type==="pointercancel"?this.lastMoveEventInfo:ps(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,v),b&&b(f,v)},!hc(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=o||window;const i=no(t),c=ps(i,this.transformPagePoint),{point:u}=c,{timestamp:d}=qe;this.history=[{...u,timestamp:d}];const{onSessionStart:l}=n;l&&l(t,gs(c,this.history)),this.removeListeners=Jr(_r(this.contextWindow,"pointermove",this.handlePointerMove),_r(this.contextWindow,"pointerup",this.handlePointerUp),_r(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ot(this.updatePoint)}}function ps(e,t){return t?{point:t(e.point)}:e}function Du(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gs({point:e},t){return{point:e,delta:Du(e,Vh(t)),offset:Du(e,aC(t)),velocity:sC(t,.1)}}function aC(e){return e[0]}function Vh(e){return e[e.length-1]}function sC(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Vh(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Dt(t)));)n--;if(!r)return{x:0,y:0};const a=yt(o.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const s={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function iC(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Oe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Oe(n,e,r.max):Math.min(e,n)),e}function Ru(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 cC(e,{top:t,left:n,bottom:r,right:o}){return{x:Ru(e.x,n,o),y:Ru(e.y,t,r)}}function Au(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function lC(e,t){return{x:Au(e.x,t.x),y:Au(e.y,t.y)}}function uC(e,t){let n=.5;const r=ot(e),o=ot(t);return o>r?n=rr(t.min,t.max-r,e.min):r>o&&(n=rr(e.min,e.max-o,t.min)),Yt(0,1,n)}function dC(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 pi=.35;function fC(e=pi){return e===!1?e=0:e===!0&&(e=pi),{x:Ou(e,"left","right"),y:Ou(e,"top","bottom")}}function Ou(e,t,n){return{min:ku(e,t),max:ku(e,n)}}function ku(e,t){return typeof e=="number"?e:e[t]||0}const hC=new WeakMap;class mC{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=je(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const a=l=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(no(l).point)},s=(l,f)=>{const{drag:p,dragPropagation:g,onDragStart:b}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=p0(p),!this.openDragLock))return;this.latestPointerEvent=l,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),bt(v=>{let x=this.getAxisMotionValue(v).get()||0;if(zt.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const M=w.layout.layoutBox[v];M&&(x=ot(M)*(parseFloat(x)/100))}}this.originPoint[v]=x}),b&&Ce.postRender(()=>b(l,f)),hi(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},i=(l,f)=>{this.latestPointerEvent=l,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:b,onDrag:y}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:v}=f;if(g&&this.currentDirection===null){this.currentDirection=pC(v),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),y&&y(l,f)},c=(l,f)=>{this.latestPointerEvent=l,this.latestPanInfo=f,this.stop(l,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>bt(l=>{var f;return this.getAnimationState(l)==="paused"&&((f=this.getAxisMotionValue(l).animation)==null?void 0:f.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new Bh(t,{onSessionStart:a,onStart:s,onMove:i,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Fh(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!o||!r)return;const{velocity:s}=o;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Ce.postRender(()=>i(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ao(t,o,this.currentDirection))return;const a=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=iC(s,this.constraints[t],this.elastic[t])),a.set(s)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,o=this.constraints;t&&qn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=cC(r.layoutBox,t):this.constraints=!1,this.elastic=fC(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&bt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=dC(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!qn(t))return!1;const r=t.current;At(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const a=gS(r,o.root,this.visualElement.getTransformPagePoint());let s=lC(o.layout.layoutBox,a);if(n){const i=n(hS(s));this.hasMutatedConstraints=!!i,i&&(s=Mh(i))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:a,dragSnapToOrigin:s,onDragTransitionEnd:i}=this.getProps(),c=this.constraints||{},u=bt(d=>{if(!Ao(d,n,this.currentDirection))return;let l=c&&c[d]||{};s&&(l={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,g={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(i)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return hi(this.visualElement,t),r.start(Mc(t,r,0,n,this.visualElement,!1))}stopAnimation(){bt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){bt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){bt(n=>{const{drag:r}=this.getProps();if(!Ao(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,a=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:i}=o.layout.layoutBox[n];a.set(t[n]-Oe(s,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!qn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};bt(s=>{const i=this.getAxisMotionValue(s);if(i&&this.constraints!==!1){const c=i.get();o[s]=uC({min:c,max:c},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),bt(s=>{if(!Ao(s,t,null))return;const i=this.getAxisMotionValue(s),{min:c,max:u}=this.constraints[s];i.set(Oe(c,u,o[s]))})}addListeners(){if(!this.visualElement.current)return;hC.set(this.visualElement,this);const t=this.visualElement.current,n=_r(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();qn(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ce.read(r);const s=Wr(window,"resize",()=>this.scalePositionWithinConstraints()),i=o.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(bt(d=>{const l=this.getAxisMotionValue(d);l&&(this.originPoint[d]+=c[d].translate,l.set(l.get()+c[d].translate))}),this.visualElement.render())}));return()=>{s(),n(),a(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:a=!1,dragElastic:s=pi,dragMomentum:i=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:a,dragElastic:s,dragMomentum:i}}}function Ao(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function pC(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class gC extends pn{constructor(t){super(t),this.removeGroupControls=ut,this.removeListeners=ut,this.controls=new mC(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const Nu=e=>(t,n)=>{e&&Ce.postRender(()=>e(t,n))};class vC extends pn{constructor(){super(...arguments),this.removePointerDownListener=ut}onPointerDown(t){this.session=new Bh(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Fh(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Nu(t),onStart:Nu(n),onMove:r,onEnd:(a,s)=>{delete this.session,o&&Ce.postRender(()=>o(a,s))}}}mount(){this.removePointerDownListener=_r(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ko={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function _u(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ie.test(e))e=parseFloat(e);else return e;const n=_u(e,t.target.x),r=_u(e,t.target.y);return`${n}% ${r}%`}},bC={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=un.parse(e);if(o.length>5)return r;const a=un.createTransformer(e),s=typeof o[0]!="number"?1:0,i=n.x.scale*t.x,c=n.y.scale*t.y;o[0+s]/=i,o[1+s]/=c;const u=Oe(i,c,.5);return typeof o[2+s]=="number"&&(o[2+s]/=u),typeof o[3+s]=="number"&&(o[3+s]/=u),a(o)}};let vs=!1;class yC extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:a}=t;V0(xC),a&&(n.group&&n.group.add(a),r&&r.register&&o&&r.register(a),vs&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Ko.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:a}=this.props,{projection:s}=r;return s&&(s.isPresent=a,vs=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==a?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||Ce.postRender(()=>{const i=s.getStack();(!i||!i.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),fc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;vs=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Wh(e){const[t,n]=_0(),r=S.useContext(vf);return m.jsx(yC,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Sh),isPresent:t,safeToRemove:n})}const xC={borderRadius:{...xr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xr,borderTopRightRadius:xr,borderBottomLeftRadius:xr,borderBottomRightRadius:xr,boxShadow:bC};function wC(e,t,n){const r=et(e)?e:Tt(e);return r.start(Mc("",r,t,n)),r.animation}const SC=(e,t)=>e.depth-t.depth;class CC{constructor(){this.children=[],this.isDirty=!1}add(t){Ui(this.children,t),this.isDirty=!0}remove(t){Gi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(SC),this.isDirty=!1,this.children.forEach(t)}}function MC(e,t){const n=lt.now(),r=({timestamp:o})=>{const a=o-n;a>=t&&(Ot(r),e(a-t))};return Ce.setup(r,!0),()=>Ot(r)}const zh=["TopLeft","TopRight","BottomLeft","BottomRight"],EC=zh.length,Iu=e=>typeof e=="string"?parseFloat(e):e,ju=e=>typeof e=="number"||ie.test(e);function TC(e,t,n,r,o,a){o?(e.opacity=Oe(0,n.opacity??1,PC(r)),e.opacityExit=Oe(t.opacity??1,0,DC(r))):a&&(e.opacity=Oe(t.opacity??1,n.opacity??1,r));for(let s=0;s<EC;s++){const i=`border${zh[s]}Radius`;let c=Lu(t,i),u=Lu(n,i);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||ju(c)===ju(u)?(e[i]=Math.max(Oe(Iu(c),Iu(u),r),0),(zt.test(u)||zt.test(c))&&(e[i]+="%")):e[i]=u}(t.rotate||n.rotate)&&(e.rotate=Oe(t.rotate||0,n.rotate||0,r))}function Lu(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const PC=Hh(0,.5,Pf),DC=Hh(.5,.95,ut);function Hh(e,t,n){return r=>r<e?0:r>t?1:n(rr(e,t,r))}function $u(e,t){e.min=t.min,e.max=t.max}function vt(e,t){$u(e.x,t.x),$u(e.y,t.y)}function Fu(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Bu(e,t,n,r,o){return e-=t,e=na(e,1/n,r),o!==void 0&&(e=na(e,1/o,r)),e}function RC(e,t=0,n=1,r=.5,o,a=e,s=e){if(zt.test(t)&&(t=parseFloat(t),t=Oe(s.min,s.max,t/100)-s.min),typeof t!="number")return;let i=Oe(a.min,a.max,r);e===a&&(i-=t),e.min=Bu(e.min,t,n,i,o),e.max=Bu(e.max,t,n,i,o)}function Vu(e,t,[n,r,o],a,s){RC(e,t[n],t[r],t[o],t.scale,a,s)}const AC=["x","scaleX","originX"],OC=["y","scaleY","originY"];function Wu(e,t,n,r){Vu(e.x,t,AC,n?n.x:void 0,r?r.x:void 0),Vu(e.y,t,OC,n?n.y:void 0,r?r.y:void 0)}function zu(e){return e.translate===0&&e.scale===1}function Yh(e){return zu(e.x)&&zu(e.y)}function Hu(e,t){return e.min===t.min&&e.max===t.max}function kC(e,t){return Hu(e.x,t.x)&&Hu(e.y,t.y)}function Yu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Uh(e,t){return Yu(e.x,t.x)&&Yu(e.y,t.y)}function Uu(e){return ot(e.x)/ot(e.y)}function Gu(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class NC{constructor(){this.members=[]}add(t){Ui(this.members,t),t.scheduleRender()}remove(t){if(Gi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const a=this.members[o];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function _C(e,t,n){let r="";const o=e.x.translate/t.x,a=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((o||a||s)&&(r=`translate3d(${o}px, ${a}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:l,rotateY:f,skewX:p,skewY:g}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),l&&(r+=`rotateX(${l}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),g&&(r+=`skewY(${g}deg) `)}const i=e.x.scale*t.x,c=e.y.scale*t.y;return(i!==1||c!==1)&&(r+=`scale(${i}, ${c})`),r||"none"}const bs=["","X","Y","Z"],IC=1e3;let jC=0;function ys(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Gh(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=kh(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ce,!(o||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Gh(r)}function Kh({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},i=t==null?void 0:t()){this.id=jC++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(FC),this.nodes.forEach(zC),this.nodes.forEach(HC),this.nodes.forEach(BC)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new CC)}addEventListener(s,i){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new qi),this.eventHandlers.get(s).add(i)}notifyListeners(s,...i){const c=this.eventHandlers.get(s);c&&c.notify(...i)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=mc(s)&&!A0(s),this.instance=s;const{layoutId:i,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||i)&&(this.isLayoutDirty=!0),e){let d,l=0;const f=()=>this.root.updateBlockedByResize=!1;Ce.read(()=>{l=window.innerWidth}),e(s,()=>{const p=window.innerWidth;p!==l&&(l=p,this.root.updateBlockedByResize=!0,d&&d(),d=MC(f,250),Ko.hasAnimatedSinceResize&&(Ko.hasAnimatedSinceResize=!1,this.nodes.forEach(Xu)))})}i&&this.root.registerSharedNode(i,this),this.options.animate!==!1&&u&&(i||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:l,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||qC,{onLayoutAnimationStart:b,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!Uh(this.targetLayout,p),x=!l&&f;if(this.options.layoutRoot||this.resumeFrom||x||l&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...uc(g,"layout"),onPlay:b,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(d,x)}else l||Xu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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(),Ot(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(YC),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&&Gh(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const l=this.path[d];l.shouldResetTransform=!0,l.updateScroll("snapshot"),l.options.layoutRoot&&l.willUpdate(!1)}const{layoutId:i,layout:c}=this.options;if(i===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ku);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(qu);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(WC),this.nodes.forEach(LC),this.nodes.forEach($C)):this.nodes.forEach(qu),this.clearAllSnapshots();const i=lt.now();qe.delta=Yt(0,1e3/60,i-qe.timestamp),qe.timestamp=i,qe.isProcessing=!0,is.update.process(qe),is.preRender.process(qe),is.render.process(qe),qe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,fc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(VC),this.sharedNodes.forEach(UC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ce.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ce.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ot(this.snapshot.measuredBox.x)&&!ot(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=je(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:i}=this.options;i&&i.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let i=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(i=!1),i&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,i=this.projectionDelta&&!Yh(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;s&&this.instance&&(i||Tn(this.latestValues)||d)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const i=this.measurePageBox();let c=this.removeElementScroll(i);return s&&(c=this.removeTransform(c)),XC(c),{animationId:this.root.animationId,measuredBox:i,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:s}=this.options;if(!s)return je();const i=s.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(ZC))){const{scroll:d}=this.root;d&&(Xn(i.x,d.offset.x),Xn(i.y,d.offset.y))}return i}removeElementScroll(s){var c;const i=je();if(vt(i,s),(c=this.scroll)!=null&&c.wasRoot)return i;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:l,options:f}=d;d!==this.root&&l&&f.layoutScroll&&(l.wasRoot&&vt(i,s),Xn(i.x,l.offset.x),Xn(i.y,l.offset.y))}return i}applyTransform(s,i=!1){const c=je();vt(c,s);for(let u=0;u<this.path.length;u++){const d=this.path[u];!i&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Zn(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Tn(d.latestValues)&&Zn(c,d.latestValues)}return Tn(this.latestValues)&&Zn(c,this.latestValues),c}removeTransform(s){const i=je();vt(i,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Tn(u.latestValues))continue;li(u.latestValues)&&u.updateSnapshot();const d=je(),l=u.measurePageBox();vt(d,l),Wu(i,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Tn(this.latestValues)&&Wu(i,this.latestValues),i}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!==qe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var f;const i=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=i.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=i.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=i.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==i;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:l}=this.options;if(!(!this.layout||!(d||l))){if(this.resolvedRelativeTargetAt=qe.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=je(),this.relativeTargetOrigin=je(),jr(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=je(),this.targetWithTransforms=je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rC(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):vt(this.target,this.layout.layoutBox),Th(this.target,this.targetDelta)):vt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=je(),this.relativeTargetOrigin=je(),jr(this.relativeTargetOrigin,this.target,p.target),vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||li(this.parent.latestValues)||Eh(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var g;const s=this.getLead(),i=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(c=!1),i&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===qe.timestamp&&(c=!1),c)return;const{layout:u,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||!(u||d))return;vt(this.layoutCorrected,this.layout.layoutBox);const l=this.treeScale.x,f=this.treeScale.y;pS(this.layoutCorrected,this.treeScale,this.path,i),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=je());const{target:p}=s;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Fu(this.prevProjectionDelta.x,this.projectionDelta.x),Fu(this.prevProjectionDelta.y,this.projectionDelta.y)),Ir(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==l||this.treeScale.y!==f||!Gu(this.projectionDelta.x,this.prevProjectionDelta.x)||!Gu(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var i;if((i=this.options.visualElement)==null||i.scheduleRender(),s){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Qn(),this.projectionDelta=Qn(),this.projectionDeltaWithTransform=Qn()}setAnimationOrigin(s,i=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},l=Qn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;const f=je(),p=c?c.source:void 0,g=this.layout?this.layout.source:void 0,b=p!==g,y=this.getStack(),v=!y||y.members.length<=1,x=!!(b&&!v&&this.options.crossfade===!0&&!this.path.some(KC));this.animationProgress=0;let w;this.mixTargetDelta=M=>{const C=M/1e3;Zu(l.x,s.x,C),Zu(l.y,s.y,C),this.setTargetDelta(l),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jr(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),GC(this.relativeTarget,this.relativeTargetOrigin,f,C),w&&kC(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=je()),vt(w,this.relativeTarget)),b&&(this.animationValues=d,TC(d,u,this.latestValues,C,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var i,c,u;this.notifyListeners("animationStart"),(i=this.currentAnimation)==null||i.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Ot(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ce.update(()=>{Ko.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Tt(0)),this.currentAnimation=wC(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),s.onUpdate&&s.onUpdate(d)},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(IC),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:i,target:c,layout:u,latestValues:d}=s;if(!(!i||!c||!u)){if(this!==s&&this.layout&&u&&qh(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||je();const l=ot(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+l;const f=ot(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+f}vt(i,c),Zn(i,d),Ir(this.projectionDeltaWithTransform,this.layoutCorrected,i,d)}}registerSharedNode(s,i){this.sharedNodes.has(s)||this.sharedNodes.set(s,new NC),this.sharedNodes.get(s).add(i);const u=i.options.initialPromotionConfig;i.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(i):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var i;const{layoutId:s}=this.options;return s?((i=this.getStack())==null?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:s}=this.options;return s?(i=this.getStack())==null?void 0:i.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:i,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let i=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(i=!0),!i)return;const u={};c.z&&ys("z",s,u,this.animationValues);for(let d=0;d<bs.length;d++)ys(`rotate${bs[d]}`,s,u,this.animationValues),ys(`skew${bs[d]}`,s,u,this.animationValues);s.render();for(const d in u)s.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);s.scheduleRender()}applyProjectionStyles(s,i){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Go(i==null?void 0:i.pointerEvents)||"",s.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Go(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Tn(this.latestValues)&&(s.transform=c?c({},""):"none",this.hasProjected=!1);return}s.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let l=_C(this.projectionDeltaWithTransform,this.treeScale,d);c&&(l=c(d,l)),s.transform=l;const{x:f,y:p}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?s.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:s.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in Vr){if(d[g]===void 0)continue;const{correct:b,applyTo:y,isCSSVariable:v}=Vr[g],x=l==="none"?d[g]:b(d[g],u);if(y){const w=y.length;for(let M=0;M<w;M++)s[y[M]]=x}else v?this.options.visualElement.renderState.vars[g]=x:s[g]=x}this.options.layoutId&&(s.pointerEvents=u===this?Go(i==null?void 0:i.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var i;return(i=s.currentAnimation)==null?void 0:i.stop()}),this.root.nodes.forEach(Ku),this.root.sharedNodes.clear()}}}function LC(e){e.updateLayout()}function $C(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:a}=e.options,s=t.source!==e.layout.source;a==="size"?bt(l=>{const f=s?t.measuredBox[l]:t.layoutBox[l],p=ot(f);f.min=r[l].min,f.max=f.min+p}):qh(a,t.layoutBox,r)&&bt(l=>{const f=s?t.measuredBox[l]:t.layoutBox[l],p=ot(r[l]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[l].max=e.relativeTarget[l].min+p)});const i=Qn();Ir(i,r,t.layoutBox);const c=Qn();s?Ir(c,e.applyTransform(o,!0),t.measuredBox):Ir(c,r,t.layoutBox);const u=!Yh(i);let d=!1;if(!e.resumeFrom){const l=e.getClosestProjectingParent();if(l&&!l.resumeFrom){const{snapshot:f,layout:p}=l;if(f&&p){const g=je();jr(g,t.layoutBox,f.layoutBox);const b=je();jr(b,r,p.layoutBox),Uh(g,b)||(d=!0),l.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=g,e.relativeParent=l)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:i,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function FC(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 BC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function VC(e){e.clearSnapshot()}function Ku(e){e.clearMeasurements()}function qu(e){e.isLayoutDirty=!1}function WC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Xu(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function zC(e){e.resolveTargetDelta()}function HC(e){e.calcProjection()}function YC(e){e.resetSkewAndRotation()}function UC(e){e.removeLeadSnapshot()}function Zu(e,t,n){e.translate=Oe(t.translate,0,n),e.scale=Oe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Qu(e,t,n,r){e.min=Oe(t.min,n.min,r),e.max=Oe(t.max,n.max,r)}function GC(e,t,n,r){Qu(e.x,t.x,n.x,r),Qu(e.y,t.y,n.y,r)}function KC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const qC={duration:.45,ease:[.4,0,.1,1]},Ju=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ed=Ju("applewebkit/")&&!Ju("chrome/")?Math.round:ut;function td(e){e.min=ed(e.min),e.max=ed(e.max)}function XC(e){td(e.x),td(e.y)}function qh(e,t,n){return e==="position"||e==="preserve-aspect"&&!nC(Uu(t),Uu(n),.2)}function ZC(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const QC=Kh({attachResizeListener:(e,t)=>Wr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),xs={current:void 0},Xh=Kh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!xs.current){const e=new QC({});e.mount(window),e.setOptions({layoutScroll:!0}),xs.current=e}return xs.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),JC={pan:{Feature:vC},drag:{Feature:gC,ProjectionNode:Xh,MeasureLayout:Wh}};function nd(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,a=r[o];a&&Ce.postRender(()=>a(t,no(t)))}class eM extends pn{mount(){const{current:t}=this.node;t&&(this.unmount=g0(t,(n,r)=>(nd(this.node,r,"Start"),o=>nd(this.node,o,"End"))))}unmount(){}}class tM extends pn{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=Jr(Wr(this.node.current,"focus",()=>this.onFocus()),Wr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function rd(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),a=r[o];a&&Ce.postRender(()=>a(t,no(t)))}class nM extends pn{mount(){const{current:t}=this.node;t&&(this.unmount=x0(t,(n,r)=>(rd(this.node,r,"Start"),(o,{success:a})=>rd(this.node,o,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const gi=new WeakMap,ws=new WeakMap,rM=e=>{const t=gi.get(e.target);t&&t(e)},oM=e=>{e.forEach(rM)};function aM({root:e,...t}){const n=e||document;ws.has(n)||ws.set(n,{});const r=ws.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(oM,{root:e,...t})),r[o]}function sM(e,t,n){const r=aM(t);return gi.set(e,n),r.observe(e),()=>{gi.delete(e),r.unobserve(e)}}const iM={some:0,all:1};class cM extends pn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:a}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:iM[o]},i=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:l}=this.node.getProps(),f=u?d:l;f&&f(c)};return sM(this.node.current,s,i)}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 uM={inView:{Feature:cM},tap:{Feature:nM},focus:{Feature:tM},hover:{Feature:eM}},dM={layout:{ProjectionNode:Xh,MeasureLayout:Wh}},fM={...XS,...uM,...JC,...dM},hM=fS(fM,ES),mM=50,od=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),pM=()=>({time:0,x:od(),y:od()}),gM={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ad(e,t,n,r){const o=n[t],{length:a,position:s}=gM[t],i=o.current,c=n.time;o.current=e[`scroll${s}`],o.scrollLength=e[`scroll${a}`]-e[`client${a}`],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=rr(0,o.scrollLength,o.current);const u=r-c;o.velocity=u>mM?0:Xi(o.current-i,u)}function vM(e,t,n){ad(e,"x",t,n),ad(e,"y",t,n),t.time=n}function bM(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(ah(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const o=r.getBoundingClientRect();r=r.parentElement;const a=r.getBoundingClientRect();n.x+=o.left-a.left,n.y+=o.top-a.top}else if(r instanceof SVGGraphicsElement){const{x:o,y:a}=r.getBBox();n.x+=o,n.y+=a;let s=null,i=r.parentNode;for(;!s;)i.tagName==="svg"&&(s=i),i=r.parentNode;r=s}else break;return n}const vi={start:0,center:.5,end:1};function sd(e,t,n=0){let r=0;if(e in vi&&(e=vi[e]),typeof e=="string"){const o=parseFloat(e);e.endsWith("px")?r=o:e.endsWith("%")?e=o/100:e.endsWith("vw")?r=o/100*document.documentElement.clientWidth:e.endsWith("vh")?r=o/100*document.documentElement.clientHeight:e=o}return typeof e=="number"&&(r=t*e),n+r}const yM=[0,0];function xM(e,t,n,r){let o=Array.isArray(e)?e:yM,a=0,s=0;return typeof e=="number"?o=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?o=e.split(" "):o=[e,vi[e]?e:"0"]),a=sd(o[0],n,r),s=sd(o[1],t),a-s}const wM={All:[[0,0],[1,1]]},SM={x:0,y:0};function CM(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function MM(e,t,n){const{offset:r=wM.All}=n,{target:o=e,axis:a="y"}=n,s=a==="y"?"height":"width",i=o!==e?bM(o,e):SM,c=o===e?{width:e.scrollWidth,height:e.scrollHeight}:CM(o),u={width:e.clientWidth,height:e.clientHeight};t[a].offset.length=0;let d=!t[a].interpolate;const l=r.length;for(let f=0;f<l;f++){const p=xM(r[f],u[s],c[s],i[a]);!d&&p!==t[a].interpolatorOffsets[f]&&(d=!0),t[a].offset[f]=p}d&&(t[a].interpolate=ac(t[a].offset,Wf(r),{clamp:!1}),t[a].interpolatorOffsets=[...t[a].offset]),t[a].progress=Yt(0,1,t[a].interpolate(t[a].current))}function EM(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight,process.env.NODE_ENV!=="production"&&e&&t&&t!==e&&ya(getComputedStyle(e).position!=="static","Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.")}function TM(e,t,n,r={}){return{measure:o=>{EM(e,r.target,n),vM(e,n,o),(r.offset||r.target)&&MM(e,n,r)},notify:()=>t(n)}}const wr=new WeakMap,id=new WeakMap,Ss=new WeakMap,cd=e=>e===document.scrollingElement?window:e;function Zh(e,{container:t=document.scrollingElement,...n}={}){if(!t)return ut;let r=Ss.get(t);r||(r=new Set,Ss.set(t,r));const o=pM(),a=TM(t,e,o,n);if(r.add(a),!wr.has(t)){const i=()=>{for(const l of r)l.measure(qe.timestamp);Ce.preUpdate(c)},c=()=>{for(const l of r)l.notify()},u=()=>Ce.read(i);wr.set(t,u);const d=cd(t);window.addEventListener("resize",u,{passive:!0}),t!==document.documentElement&&id.set(t,R0(t,u)),d.addEventListener("scroll",u,{passive:!0}),u()}const s=wr.get(t);return Ce.read(s,!1,!0),()=>{var u;Ot(s);const i=Ss.get(t);if(!i||(i.delete(a),i.size))return;const c=wr.get(t);wr.delete(t),c&&(cd(t).removeEventListener("scroll",c),(u=id.get(t))==null||u(),window.removeEventListener("resize",c))}}const ld=new Map;function PM(e){const t={value:0},n=Zh(r=>{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:n}}function Qh({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);const o=ld.get(t)??new Map;ld.set(t,o);const a=n.target??"self",s=o.get(a)??{},i=r+(n.offset??[]).join(",");return s[i]||(s[i]=!n.target&&Uf()?new ScrollTimeline({source:t,axis:r}):PM({container:t,...n})),s[i]}function DM(e,t){const n=Qh(t);return e.attachTimeline({timeline:t.target?void 0:n,observe:r=>(r.pause(),uh(o=>{r.time=r.iterationDuration*o},n))})}function RM(e){return e.length===2}function AM(e,t){return RM(e)?Zh(n=>{e(n[t.axis].progress,n)},t):uh(e,Qh(t))}function OM(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return ut;const o={axis:t,container:n,...r};return typeof e=="function"?AM(e,o):DM(e,o)}const kM=()=>({scrollX:Tt(0),scrollY:Tt(0),scrollXProgress:Tt(0),scrollYProgress:Tt(0)}),Oo=e=>e?!e.current:!1;function NM({container:e,target:t,...n}={}){const r=ba(kM),o=S.useRef(null),a=S.useRef(!1),s=S.useCallback(()=>(o.current=OM((i,{x:c,y:u})=>{r.scrollX.set(c.current),r.scrollXProgress.set(c.progress),r.scrollY.set(u.current),r.scrollYProgress.set(u.progress)},{...n,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}),()=>{var i;(i=o.current)==null||i.call(o)}),[e,t,JSON.stringify(n.offset)]);return Hi(()=>{if(a.current=!1,Oo(e)||Oo(t)){a.current=!0;return}else return s()},[s]),S.useEffect(()=>{if(a.current)return At(!Oo(e),"Container ref is defined but not hydrated","use-scroll-ref"),At(!Oo(t),"Target ref is defined but not hydrated","use-scroll-ref"),s()},[s]),r}function _M(e){const t=ba(()=>Tt(e)),{isStatic:n}=S.useContext(pc);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function Jh(e,t){const n=_M(t()),r=()=>n.set(t());return r(),Hi(()=>{const o=()=>Ce.preRender(r,!1,!0),a=e.map(s=>s.on("change",o));return()=>{a.forEach(s=>s()),Ot(r)}}),n}function IM(e){Nr.current=[],e();const t=Jh(Nr.current,e);return Nr.current=void 0,t}function jM(e,t,n,r){if(typeof e=="function")return IM(e);const o=typeof t=="function"?t:O0(t,n,r);return Array.isArray(e)?ud(e,o):ud([e],([a])=>o(a))}function ud(e,t){const n=ba(()=>[]);return Jh(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}const LM=({children:e,className:t})=>{const n=S.useRef(null),{scrollYProgress:r}=NM({target:n});if(typeof e!="string")throw new Error("TextReveal: children must be a string");const o=e.split(" ");return m.jsx("div",{ref:n,className:T.cn("z-0 relative h-[200vh]",t),children:m.jsx("div",{className:"sticky top-0 mx-auto flex h-[50%] max-w-4xl items-center bg-transparent px-[1rem] py-[5rem]",children:m.jsx("span",{ref:n,className:"flex flex-wrap p-5 text-2xl font-bold text-black/20 dark:text-white/20 md:p-8 md:text-3xl lg:p-10 lg:text-4xl xl:text-5xl",children:o.map((a,s)=>{const i=s/o.length,c=i+1/o.length;return m.jsx($M,{progress:r,range:[i,c],children:a},s)})})})})},$M=({children:e,progress:t,range:n})=>{const r=jM(t,n,[0,1]);return m.jsxs("span",{className:"relative mx-1 lg:mx-1.5",children:[m.jsx("span",{className:"absolute opacity-30",children:e}),m.jsx(hM.span,{style:{opacity:r},className:"text-black dark:text-white",children:e})]})};function FM(e,t){const n=h.createContext(t),r=a=>{const{children:s,...i}=a,c=h.useMemo(()=>i,Object.values(i));return m.jsx(n.Provider,{value:c,children:s})};r.displayName=e+"Provider";function o(a){const s=h.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Ne(e,t=[]){let n=[];function r(a,s){const i=h.createContext(s),c=n.length;n=[...n,s];const u=l=>{var v;const{scope:f,children:p,...g}=l,b=((v=f==null?void 0:f[e])==null?void 0:v[c])||i,y=h.useMemo(()=>g,Object.values(g));return m.jsx(b.Provider,{value:y,children:p})};u.displayName=a+"Provider";function d(l,f){var b;const p=((b=f==null?void 0:f[e])==null?void 0:b[c])||i,g=h.useContext(p);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${l}\` must be used within \`${a}\``)}return[u,d]}const o=()=>{const a=n.map(s=>h.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return h.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,BM(o,...t)]}function BM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:c,scopeName:u})=>{const l=c(a)[`__scope${u}`];return{...i,...l}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function dd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function dn(...e){return t=>{let n=!1;const r=e.map(o=>{const a=dd(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():dd(e[o],null)}}}}function ce(...e){return h.useCallback(dn(...e),e)}function F(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var mt=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},VM=h[" useId ".trim().toString()]||(()=>{}),WM=0;function _e(e){const[t,n]=h.useState(VM());return mt(()=>{n(r=>r??String(WM++))},[e]),t?`radix-${t}`:""}var zM=h[" useInsertionEffect ".trim().toString()]||mt;function Ge({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=HM({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:o;{const d=h.useRef(e!==void 0);h.useEffect(()=>{const l=d.current;l!==i&&console.warn(`${r} is changing from ${l?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=i},[i,r])}const u=h.useCallback(d=>{var l;if(i){const f=YM(d)?d(e):d;f!==e&&((l=s.current)==null||l.call(s,f))}else a(d)},[i,e,a,s]);return[c,u]}function HM({defaultProp:e,onChange:t}){const[n,r]=h.useState(e),o=h.useRef(n),a=h.useRef(t);return zM(()=>{a.current=t},[t]),h.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function YM(e){return typeof e=="function"}function Ue(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function UM(e,t=globalThis==null?void 0:globalThis.document){const n=Ue(e);h.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var GM="DismissableLayer",bi="dismissableLayer.update",KM="dismissableLayer.pointerDownOutside",qM="dismissableLayer.focusOutside",fd,em=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mr=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,u=h.useContext(em),[d,l]=h.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=h.useState({}),g=ce(t,E=>l(E)),b=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=b.indexOf(y),x=d?b.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,M=x>=v,C=QM(E=>{const D=E.target,R=[...u.branches].some(A=>A.contains(D));!M||R||(o==null||o(E),s==null||s(E),E.defaultPrevented||i==null||i())},f),P=JM(E=>{const D=E.target;[...u.branches].some(A=>A.contains(D))||(a==null||a(E),s==null||s(E),E.defaultPrevented||i==null||i())},f);return UM(E=>{x===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},f),h.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(fd=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),hd(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=fd)}},[d,f,n,u]),h.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),hd())},[d,u]),h.useEffect(()=>{const E=()=>p({});return document.addEventListener(bi,E),()=>document.removeEventListener(bi,E)},[]),m.jsx(T.Primitive.div,{...c,ref:g,style:{pointerEvents:w?M?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,P.onFocusCapture),onBlurCapture:F(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,C.onPointerDownCapture)})});mr.displayName=GM;var XM="DismissableLayerBranch",ZM=h.forwardRef((e,t)=>{const n=h.useContext(em),r=h.useRef(null),o=ce(t,r);return h.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),m.jsx(T.Primitive.div,{...e,ref:o})});ZM.displayName=XM;function QM(e,t=globalThis==null?void 0:globalThis.document){const n=Ue(e),r=h.useRef(!1),o=h.useRef(()=>{});return h.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let c=function(){tm(KM,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function JM(e,t=globalThis==null?void 0:globalThis.document){const n=Ue(e),r=h.useRef(!1);return h.useEffect(()=>{const o=a=>{a.target&&!r.current&&tm(qM,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function hd(){const e=new CustomEvent(bi);document.dispatchEvent(e)}function tm(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?T.dispatchDiscreteCustomEvent(o,a):o.dispatchEvent(a)}var Cs="focusScope.autoFocusOnMount",Ms="focusScope.autoFocusOnUnmount",md={bubbles:!1,cancelable:!0},eE="FocusScope",Ca=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=h.useState(null),u=Ue(o),d=Ue(a),l=h.useRef(null),f=ce(t,b=>c(b)),p=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let b=function(w){if(p.paused||!i)return;const M=w.target;i.contains(M)?l.current=M:cn(l.current,{select:!0})},y=function(w){if(p.paused||!i)return;const M=w.relatedTarget;M!==null&&(i.contains(M)||cn(l.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&cn(i)};document.addEventListener("focusin",b),document.addEventListener("focusout",y);const x=new MutationObserver(v);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",y),x.disconnect()}}},[r,i,p.paused]),h.useEffect(()=>{if(i){gd.add(p);const b=document.activeElement;if(!i.contains(b)){const v=new CustomEvent(Cs,md);i.addEventListener(Cs,u),i.dispatchEvent(v),v.defaultPrevented||(tE(sE(nm(i)),{select:!0}),document.activeElement===b&&cn(i))}return()=>{i.removeEventListener(Cs,u),setTimeout(()=>{const v=new CustomEvent(Ms,md);i.addEventListener(Ms,d),i.dispatchEvent(v),v.defaultPrevented||cn(b??document.body,{select:!0}),i.removeEventListener(Ms,d),gd.remove(p)},0)}}},[i,u,d,p]);const g=h.useCallback(b=>{if(!n&&!r||p.paused)return;const y=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,v=document.activeElement;if(y&&v){const x=b.currentTarget,[w,M]=nE(x);w&&M?!b.shiftKey&&v===M?(b.preventDefault(),n&&cn(w,{select:!0})):b.shiftKey&&v===w&&(b.preventDefault(),n&&cn(M,{select:!0})):v===x&&b.preventDefault()}},[n,r,p.paused]);return m.jsx(T.Primitive.div,{tabIndex:-1,...s,ref:f,onKeyDown:g})});Ca.displayName=eE;function tE(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(cn(r,{select:t}),document.activeElement!==n)return}function nE(e){const t=nm(e),n=pd(t,e),r=pd(t.reverse(),e);return[n,r]}function nm(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pd(e,t){for(const n of e)if(!rE(n,{upTo:t}))return n}function rE(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function oE(e){return e instanceof HTMLInputElement&&"select"in e}function cn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&oE(e)&&t&&e.select()}}var gd=aE();function aE(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=vd(e,t),e.unshift(t)},remove(t){var n;e=vd(e,t),(n=e[0])==null||n.resume()}}}function vd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function sE(e){return e.filter(t=>t.tagName!=="A")}var iE="Portal",pr=h.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=h.useState(!1);mt(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Wi.createPortal(m.jsx(T.Primitive.div,{...r,ref:t}),s):null});pr.displayName=iE;function cE(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var Ie=e=>{const{present:t,children:n}=e,r=lE(t),o=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),a=ce(r.ref,uE(o));return typeof n=="function"||r.isPresent?h.cloneElement(o,{ref:a}):null};Ie.displayName="Presence";function lE(e){const[t,n]=h.useState(),r=h.useRef(null),o=h.useRef(e),a=h.useRef("none"),s=e?"mounted":"unmounted",[i,c]=cE(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const u=ko(r.current);a.current=i==="mounted"?u:"none"},[i]),mt(()=>{const u=r.current,d=o.current;if(d!==e){const f=a.current,p=ko(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),mt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,l=p=>{const b=ko(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&b&&(c("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},f=p=>{p.target===t&&(a.current=ko(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:h.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function ko(e){return(e==null?void 0:e.animationName)||"none"}function uE(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Es=0;function Ec(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??bd()),document.body.insertAdjacentElement("beforeend",e[1]??bd()),Es++,()=>{Es===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Es--}},[])}function bd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Bt=function(){return Bt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Bt.apply(this,arguments)};function rm(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function dE(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var qo="right-scroll-bar-position",Xo="width-before-scroll-bar",fE="with-scroll-bars-hidden",hE="--removed-body-scroll-bar-size";function Ts(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function mE(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var pE=typeof window<"u"?h.useLayoutEffect:h.useEffect,yd=new WeakMap;function gE(e,t){var n=mE(null,function(r){return e.forEach(function(o){return Ts(o,r)})});return pE(function(){var r=yd.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||Ts(i,null)}),a.forEach(function(i){o.has(i)||Ts(i,s)})}yd.set(n,e)},[e]),n}function vE(e){return e}function bE(e,t){t===void 0&&(t=vE);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var c=function(){var d=s;s=[],d.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return o}function yE(e){e===void 0&&(e={});var t=bE(null);return t.options=Bt({async:!0,ssr:!1},e),t}var om=function(e){var t=e.sideCar,n=rm(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return h.createElement(r,Bt({},n))};om.isSideCarExport=!0;function xE(e,t){return e.useMedium(t),om}var am=yE(),Ps=function(){},Ma=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:Ps,onWheelCapture:Ps,onTouchMoveCapture:Ps}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,l=e.shards,f=e.sideCar,p=e.noRelative,g=e.noIsolation,b=e.inert,y=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,w=e.gapMode,M=rm(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,P=gE([n,t]),E=Bt(Bt({},M),o);return h.createElement(h.Fragment,null,d&&h.createElement(C,{sideCar:am,removeScrollBar:u,shards:l,noRelative:p,noIsolation:g,inert:b,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:w}),s?h.cloneElement(h.Children.only(i),Bt(Bt({},E),{ref:P})):h.createElement(x,Bt({},E,{className:c,ref:P}),i))});Ma.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ma.classNames={fullWidth:Xo,zeroRight:qo};var wE=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function SE(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=wE();return t&&e.setAttribute("nonce",t),e}function CE(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ME(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var EE=function(){var e=0,t=null;return{add:function(n){e==0&&(t=SE())&&(CE(t,n),ME(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},TE=function(){var e=EE();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},sm=function(){var e=TE(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},PE={left:0,top:0,right:0,gap:0},Ds=function(e){return parseInt(e||"",10)||0},DE=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ds(n),Ds(r),Ds(o)]},RE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return PE;var t=DE(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},AE=sm(),er="data-scroll-locked",OE=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),S=require("react"),T=require("./Skeleton-Bn2Kdinb.cjs"),Wi=require("react-dom"),wt=require("@radix-ui/react-slot"),Te=require("lucide-react");require("clsx");require("@radix-ui/react-select");require("next-intl");function gf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const h=gf(S),Ox=gf(Wi),vf=S.createContext({});function ba(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const zi=typeof window<"u",Hi=zi?S.useLayoutEffect:S.useEffect,Yi=S.createContext(null);function Ui(e,t){e.indexOf(t)===-1&&e.push(t)}function Gi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Yt=(e,t,n)=>n>t?t:n<e?e:n;function qs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ur=()=>{},At=()=>{};process.env.NODE_ENV!=="production"&&(ur=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(qs(t,n))},At=(e,t,n)=>{if(!e)throw new Error(qs(t,n))});const en={},bf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function yf(e){return typeof e=="object"&&e!==null}const xf=e=>/^0[^.\s]+$/u.test(e);function Ki(e){let t;return()=>(t===void 0&&(t=e()),t)}const ut=e=>e,kx=(e,t)=>n=>t(e(n)),Jr=(...e)=>e.reduce(kx),rr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class qi{constructor(){this.subscriptions=[]}add(t){return Ui(this.subscriptions,t),()=>Gi(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let a=0;a<o;a++){const s=this.subscriptions[a];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Dt=e=>e*1e3,yt=e=>e/1e3;function Xi(e,t){return t?e*(1e3/t):0}const Yl=new Set;function ya(e,t,n){e||Yl.has(t)||(console.warn(qs(t,n)),Yl.add(t))}const wf=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Nx=1e-7,_x=12;function Ix(e,t,n,r,o){let a,s,i=0;do s=t+(n-t)/2,a=wf(s,r,o)-e,a>0?n=s:t=s;while(Math.abs(a)>Nx&&++i<_x);return s}function eo(e,t,n,r){if(e===t&&n===r)return ut;const o=a=>Ix(a,0,1,e,n);return a=>a===0||a===1?a:wf(o(a),t,r)}const Sf=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Cf=e=>t=>1-e(1-t),Mf=eo(.33,1.53,.69,.99),Zi=Cf(Mf),Ef=Sf(Zi),Tf=e=>(e*=2)<1?.5*Zi(e):.5*(2-Math.pow(2,-10*(e-1))),Qi=e=>1-Math.sin(Math.acos(e)),Pf=Cf(Qi),Df=Sf(Qi),jx=eo(.42,0,1,1),Lx=eo(0,0,.58,1),Rf=eo(.42,0,.58,1),$x=e=>Array.isArray(e)&&typeof e[0]!="number",Af=e=>Array.isArray(e)&&typeof e[0]=="number",Ul={linear:ut,easeIn:jx,easeInOut:Rf,easeOut:Lx,circIn:Qi,circInOut:Df,circOut:Pf,backIn:Zi,backInOut:Ef,backOut:Mf,anticipate:Tf},Fx=e=>typeof e=="string",Gl=e=>{if(Af(e)){At(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return eo(t,n,r,o)}else if(Fx(e))return At(Ul[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ul[e];return e},Do=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Bx(e,t){let n=new Set,r=new Set,o=!1,a=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function c(d){s.has(d)&&(u.schedule(d),e()),d(i)}const u={schedule:(d,l=!1,f=!1)=>{const g=f&&o?n:r;return l&&s.add(d),g.has(d)||g.add(d),d},cancel:d=>{r.delete(d),s.delete(d)},process:d=>{if(i=d,o){a=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),n.clear(),o=!1,a&&(a=!1,u.process(d))}};return u}const Vx=40;function Of(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,s=Do.reduce((w,M)=>(w[M]=Bx(a),w),{}),{setup:i,read:c,resolveKeyframes:u,preUpdate:d,update:l,preRender:f,render:p,postRender:g}=s,b=()=>{const w=en.useManualTiming?o.timestamp:performance.now();n=!1,en.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(w-o.timestamp,Vx),1)),o.timestamp=w,o.isProcessing=!0,i.process(o),c.process(o),u.process(o),d.process(o),l.process(o),f.process(o),p.process(o),g.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(b))},y=()=>{n=!0,r=!0,o.isProcessing||e(b)};return{schedule:Do.reduce((w,M)=>{const C=s[M];return w[M]=(P,E=!1,D=!1)=>(n||y(),C.schedule(P,E,D)),w},{}),cancel:w=>{for(let M=0;M<Do.length;M++)s[Do[M]].cancel(w)},state:o,steps:s}}const{schedule:Ce,cancel:Ot,state:qe,steps:is}=Of(typeof requestAnimationFrame<"u"?requestAnimationFrame:ut,!0);let zo;function Wx(){zo=void 0}const lt={now:()=>(zo===void 0&&lt.set(qe.isProcessing||en.useManualTiming?qe.timestamp:performance.now()),zo),set:e=>{zo=e,queueMicrotask(Wx)}},kf=e=>t=>typeof t=="string"&&t.startsWith(e),Ji=kf("--"),zx=kf("var(--"),ec=e=>zx(e)?Hx.test(e.split("/*")[0].trim()):!1,Hx=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,dr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$r={...dr,transform:e=>Yt(0,1,e)},Ro={...dr,default:1},kr=e=>Math.round(e*1e5)/1e5,tc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Yx(e){return e==null}const Ux=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,nc=(e,t)=>n=>!!(typeof n=="string"&&Ux.test(n)&&n.startsWith(e)||t&&!Yx(n)&&Object.prototype.hasOwnProperty.call(n,t)),Nf=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,a,s,i]=r.match(tc);return{[e]:parseFloat(o),[t]:parseFloat(a),[n]:parseFloat(s),alpha:i!==void 0?parseFloat(i):1}},Gx=e=>Yt(0,255,e),cs={...dr,transform:e=>Math.round(Gx(e))},Dn={test:nc("rgb","red"),parse:Nf("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+cs.transform(e)+", "+cs.transform(t)+", "+cs.transform(n)+", "+kr($r.transform(r))+")"};function Kx(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Xs={test:nc("#"),parse:Kx,transform:Dn.transform},to=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),an=to("deg"),zt=to("%"),ie=to("px"),qx=to("vh"),Xx=to("vw"),Kl={...zt,parse:e=>zt.parse(e)/100,transform:e=>zt.transform(e*100)},Un={test:nc("hsl","hue"),parse:Nf("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+zt.transform(kr(t))+", "+zt.transform(kr(n))+", "+kr($r.transform(r))+")"},Ve={test:e=>Dn.test(e)||Xs.test(e)||Un.test(e),parse:e=>Dn.test(e)?Dn.parse(e):Un.test(e)?Un.parse(e):Xs.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Dn.transform(e):Un.transform(e),getAnimatableNone:e=>{const t=Ve.parse(e);return t.alpha=0,Ve.transform(t)}},Zx=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Qx(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(tc))==null?void 0:t.length)||0)+(((n=e.match(Zx))==null?void 0:n.length)||0)>0}const _f="number",If="color",Jx="var",ew="var(",ql="${}",tw=/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 Fr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let a=0;const i=t.replace(tw,c=>(Ve.test(c)?(r.color.push(a),o.push(If),n.push(Ve.parse(c))):c.startsWith(ew)?(r.var.push(a),o.push(Jx),n.push(c)):(r.number.push(a),o.push(_f),n.push(parseFloat(c))),++a,ql)).split(ql);return{values:n,split:i,indexes:r,types:o}}function jf(e){return Fr(e).values}function Lf(e){const{split:t,types:n}=Fr(e),r=t.length;return o=>{let a="";for(let s=0;s<r;s++)if(a+=t[s],o[s]!==void 0){const i=n[s];i===_f?a+=kr(o[s]):i===If?a+=Ve.transform(o[s]):a+=o[s]}return a}}const nw=e=>typeof e=="number"?0:Ve.test(e)?Ve.getAnimatableNone(e):e;function rw(e){const t=jf(e);return Lf(e)(t.map(nw))}const un={test:Qx,parse:jf,createTransformer:Lf,getAnimatableNone:rw};function ls(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 ow({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,a=0,s=0;if(!t)o=a=s=n;else{const i=n<.5?n*(1+t):n+t-n*t,c=2*n-i;o=ls(c,i,e+1/3),a=ls(c,i,e),s=ls(c,i,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:r}}function Qo(e,t){return n=>n>0?t:e}const Oe=(e,t,n)=>e+(t-e)*n,us=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},aw=[Xs,Dn,Un],sw=e=>aw.find(t=>t.test(e));function Xl(e){const t=sw(e);if(ur(!!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===Un&&(n=ow(n)),n}const Zl=(e,t)=>{const n=Xl(e),r=Xl(t);if(!n||!r)return Qo(e,t);const o={...n};return a=>(o.red=us(n.red,r.red,a),o.green=us(n.green,r.green,a),o.blue=us(n.blue,r.blue,a),o.alpha=Oe(n.alpha,r.alpha,a),Dn.transform(o))},Zs=new Set(["none","hidden"]);function iw(e,t){return Zs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function cw(e,t){return n=>Oe(e,t,n)}function rc(e){return typeof e=="number"?cw:typeof e=="string"?ec(e)?Qo:Ve.test(e)?Zl:dw:Array.isArray(e)?$f:typeof e=="object"?Ve.test(e)?Zl:lw:Qo}function $f(e,t){const n=[...e],r=n.length,o=e.map((a,s)=>rc(a)(a,t[s]));return a=>{for(let s=0;s<r;s++)n[s]=o[s](a);return n}}function lw(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=rc(e[o])(e[o],t[o]));return o=>{for(const a in r)n[a]=r[a](o);return n}}function uw(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],s=e.indexes[a][r[a]],i=e.values[s]??0;n[o]=i,r[a]++}return n}const dw=(e,t)=>{const n=un.createTransformer(t),r=Fr(e),o=Fr(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Zs.has(e)&&!o.values.length||Zs.has(t)&&!r.values.length?iw(e,t):Jr($f(uw(r,o),o.values),n):(ur(!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"),Qo(e,t))};function Ff(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Oe(e,t,n):rc(e)(e,t)}const fw=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Ce.update(t,n),stop:()=>Ot(t),now:()=>qe.isProcessing?qe.timestamp:lt.now()}},Bf=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let a=0;a<o;a++)r+=Math.round(e(a/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Jo=2e4;function oc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Jo;)t+=n,r=e.next(t);return t>=Jo?1/0:t}function hw(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(oc(r),Jo);return{type:"keyframes",ease:a=>r.next(o*a).value/t,duration:yt(o)}}const mw=5;function Vf(e,t,n){const r=Math.max(t-mw,0);return Xi(n-e(r),t-r)}const Re={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},ds=.001;function pw({duration:e=Re.duration,bounce:t=Re.bounce,velocity:n=Re.velocity,mass:r=Re.mass}){let o,a;ur(e<=Dt(Re.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=Yt(Re.minDamping,Re.maxDamping,s),e=Yt(Re.minDuration,Re.maxDuration,yt(e)),s<1?(o=u=>{const d=u*s,l=d*e,f=d-n,p=Qs(u,s),g=Math.exp(-l);return ds-f/p*g},a=u=>{const l=u*s*e,f=l*n+n,p=Math.pow(s,2)*Math.pow(u,2)*e,g=Math.exp(-l),b=Qs(Math.pow(u,2),s);return(-o(u)+ds>0?-1:1)*((f-p)*g)/b}):(o=u=>{const d=Math.exp(-u*e),l=(u-n)*e+1;return-ds+d*l},a=u=>{const d=Math.exp(-u*e),l=(n-u)*(e*e);return d*l});const i=5/e,c=vw(o,a,i);if(e=Dt(e),isNaN(c))return{stiffness:Re.stiffness,damping:Re.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const gw=12;function vw(e,t,n){let r=n;for(let o=1;o<gw;o++)r=r-e(r)/t(r);return r}function Qs(e,t){return e*Math.sqrt(1-t*t)}const bw=["duration","bounce"],yw=["stiffness","damping","mass"];function Ql(e,t){return t.some(n=>e[n]!==void 0)}function xw(e){let t={velocity:Re.velocity,stiffness:Re.stiffness,damping:Re.damping,mass:Re.mass,isResolvedFromDuration:!1,...e};if(!Ql(e,yw)&&Ql(e,bw))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,a=2*Yt(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Re.mass,stiffness:o,damping:a}}else{const n=pw(e);t={...t,...n,mass:Re.mass},t.isResolvedFromDuration=!0}return t}function ea(e=Re.visualDuration,t=Re.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const a=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],i={done:!1,value:a},{stiffness:c,damping:u,mass:d,duration:l,velocity:f,isResolvedFromDuration:p}=xw({...n,velocity:-yt(n.velocity||0)}),g=f||0,b=u/(2*Math.sqrt(c*d)),y=s-a,v=yt(Math.sqrt(c/d)),x=Math.abs(y)<5;r||(r=x?Re.restSpeed.granular:Re.restSpeed.default),o||(o=x?Re.restDelta.granular:Re.restDelta.default);let w;if(b<1){const C=Qs(v,b);w=P=>{const E=Math.exp(-b*v*P);return s-E*((g+b*v*y)/C*Math.sin(C*P)+y*Math.cos(C*P))}}else if(b===1)w=C=>s-Math.exp(-v*C)*(y+(g+v*y)*C);else{const C=v*Math.sqrt(b*b-1);w=P=>{const E=Math.exp(-b*v*P),D=Math.min(C*P,300);return s-E*((g+b*v*y)*Math.sinh(D)+C*y*Math.cosh(D))/C}}const M={calculatedDuration:p&&l||null,next:C=>{const P=w(C);if(p)i.done=C>=l;else{let E=C===0?g:0;b<1&&(E=C===0?Dt(g):Vf(w,C,P));const D=Math.abs(E)<=r,R=Math.abs(s-P)<=o;i.done=D&&R}return i.value=i.done?s:P,i},toString:()=>{const C=Math.min(oc(M),Jo),P=Bf(E=>M.next(C*E).value,C,30);return C+"ms "+P},toTransition:()=>{}};return M}ea.applyToOptions=e=>{const t=hw(e,100,ea);return e.ease=t.ease,e.duration=Dt(t.duration),e.type="keyframes",e};function Js({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:s,min:i,max:c,restDelta:u=.5,restSpeed:d}){const l=e[0],f={done:!1,value:l},p=D=>i!==void 0&&D<i||c!==void 0&&D>c,g=D=>i===void 0?c:c===void 0||Math.abs(i-D)<Math.abs(c-D)?i:c;let b=n*t;const y=l+b,v=s===void 0?y:s(y);v!==y&&(b=v-l);const x=D=>-b*Math.exp(-D/r),w=D=>v+x(D),M=D=>{const R=x(D),A=w(D);f.done=Math.abs(R)<=u,f.value=f.done?v:A};let C,P;const E=D=>{p(f.value)&&(C=D,P=ea({keyframes:[f.value,g(f.value)],velocity:Vf(w,D,f.value),damping:o,stiffness:a,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:D=>{let R=!1;return!P&&C===void 0&&(R=!0,M(D),E(D)),C!==void 0&&D>=C?P.next(D-C):(!R&&M(D),f)}}}function ww(e,t,n){const r=[],o=n||en.mix||Ff,a=e.length-1;for(let s=0;s<a;s++){let i=o(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||ut:t;i=Jr(c,i)}r.push(i)}return r}function ac(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const a=e.length;if(At(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=ww(t,r,o),c=i.length,u=d=>{if(s&&d<e[0])return t[0];let l=0;if(c>1)for(;l<e.length-2&&!(d<e[l+1]);l++);const f=rr(e[l],e[l+1],d);return i[l](f)};return n?d=>u(Yt(e[0],e[a-1],d)):u}function Sw(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=rr(0,t,r);e.push(Oe(n,1,o))}}function Wf(e){const t=[0];return Sw(t,e.length-1),t}function Cw(e,t){return e.map(n=>n*t)}function Mw(e,t){return e.map(()=>t||Rf).splice(0,e.length-1)}function Gn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=$x(r)?r.map(Gl):Gl(r),a={done:!1,value:t[0]},s=Cw(n&&n.length===t.length?n:Wf(t),e),i=ac(s,t,{ease:Array.isArray(o)?o:Mw(t,o)});return{calculatedDuration:e,next:c=>(a.value=i(c),a.done=c>=e,a)}}const Ew=e=>e!==null;function sc(e,{repeat:t,repeatType:n="loop"},r,o=1){const a=e.filter(Ew),i=o<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!i||r===void 0?a[i]:r}const Tw={decay:Js,inertia:Js,tween:Gn,keyframes:Gn,spring:ea};function zf(e){typeof e.type=="string"&&(e.type=Tw[e.type])}class ic{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 Pw=e=>e/100;class cc extends ic{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,o;const{motionValue:n}=this.options;n&&n.updatedAt!==lt.now()&&this.tick(lt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;zf(t);const{type:n=Gn,repeat:r=0,repeatDelay:o=0,repeatType:a,velocity:s=0}=t;let{keyframes:i}=t;const c=n||Gn;process.env.NODE_ENV!=="production"&&c!==Gn&&At(i.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${i}`,"spring-two-frames"),c!==Gn&&typeof i[0]!="number"&&(this.mixKeyframes=Jr(Pw,Ff(i[0],i[1])),i=[0,100]);const u=c({...t,keyframes:i});a==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...i].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=oc(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:i,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:l,repeatType:f,repeatDelay:p,type:g,onUpdate:b,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let w=this.currentTime,M=r;if(l){const D=Math.min(this.currentTime,o)/i;let R=Math.floor(D),A=D%1;!A&&D>=1&&(A=1),A===1&&R--,R=Math.min(R,l+1),!!(R%2)&&(f==="reverse"?(A=1-A,p&&(A-=p/i)):f==="mirror"&&(M=s)),w=Yt(0,1,A)*i}const C=x?{done:!1,value:d[0]}:M.next(w);a&&(C.value=a(C.value));let{done:P}=C;!x&&c!==null&&(P=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return E&&g!==Js&&(C.value=sc(d,this.options,y,this.speed)),b&&b(C.value),E&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return yt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+yt(t)}get time(){return yt(this.currentTime)}set time(t){var n;t=Dt(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),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(lt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=yt(this.currentTime))}play(){var o,a;if(this.isStopped)return;const{driver:t=fw,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(a=(o=this.options).onPlay)==null||a.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),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(lt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}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){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function Dw(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Rn=e=>e*180/Math.PI,ei=e=>{const t=Rn(Math.atan2(e[1],e[0]));return ti(t)},Rw={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ei,rotateZ:ei,skewX:e=>Rn(Math.atan(e[1])),skewY:e=>Rn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ti=e=>(e=e%360,e<0&&(e+=360),e),Jl=ei,eu=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),tu=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Aw={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:eu,scaleY:tu,scale:e=>(eu(e)+tu(e))/2,rotateX:e=>ti(Rn(Math.atan2(e[6],e[5]))),rotateY:e=>ti(Rn(Math.atan2(-e[2],e[0]))),rotateZ:Jl,rotate:Jl,skewX:e=>Rn(Math.atan(e[4])),skewY:e=>Rn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ni(e){return e.includes("scale")?1:0}function ri(e,t){if(!e||e==="none")return ni(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Aw,o=n;else{const i=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Rw,o=i}if(!o)return ni(t);const a=r[t],s=o[1].split(",").map(kw);return typeof a=="function"?a(s):s[a]}const Ow=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ri(n,t)};function kw(e){return parseFloat(e.trim())}const fr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hr=new Set(fr),nu=e=>e===dr||e===ie,Nw=new Set(["x","y","z"]),_w=fr.filter(e=>!Nw.has(e));function Iw(e){const t=[];return _w.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const On={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})=>ri(t,"x"),y:(e,{transform:t})=>ri(t,"y")};On.translateX=On.x;On.translateY=On.y;const kn=new Set;let oi=!1,ai=!1,si=!1;function Hf(){if(ai){const e=Array.from(kn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Iw(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([a,s])=>{var i;(i=r.getValue(a))==null||i.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ai=!1,oi=!1,kn.forEach(e=>e.complete(si)),kn.clear()}function Yf(){kn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ai=!0)})}function jw(){si=!0,Yf(),Hf(),si=!1}class lc{constructor(t,n,r,o,a,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=a,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(kn.add(this),oi||(oi=!0,Ce.read(Yf),Ce.resolveKeyframes(Hf))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const a=o==null?void 0:o.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const i=r.readValue(n,s);i!=null&&(t[0]=i)}t[0]===void 0&&(t[0]=s),o&&a===void 0&&o.set(t[0])}Dw(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),kn.delete(this)}cancel(){this.state==="scheduled"&&(kn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Lw=e=>e.startsWith("--");function $w(e,t,n){Lw(t)?e.style.setProperty(t,n):e.style[t]=n}const Uf=Ki(()=>window.ScrollTimeline!==void 0),Fw={};function Bw(e,t){const n=Ki(e);return()=>Fw[t]??n()}const Gf=Bw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Dr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ru={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dr([0,.65,.55,1]),circOut:Dr([.55,0,1,.45]),backIn:Dr([.31,.01,.66,-.59]),backOut:Dr([.33,1.53,.69,.99])};function Kf(e,t){if(e)return typeof e=="function"?Gf()?Bf(e,t):"ease-out":Af(e)?Dr(e):Array.isArray(e)?e.map(n=>Kf(n,t)||ru.easeOut):ru[e]}function Vw(e,t,n,{delay:r=0,duration:o=300,repeat:a=0,repeatType:s="loop",ease:i="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const l=Kf(i,o);Array.isArray(l)&&(d.easing=l);const f={delay:r,duration:o,easing:Array.isArray(l)?"linear":l,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(d,f)}function qf(e){return typeof e=="function"&&"applyToOptions"in e}function Ww({type:e,...t}){return qf(e)&&Gf()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class zw extends ic{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:a,allowFlatten:s=!1,finalKeyframe:i,onComplete:c}=t;this.isPseudoElement=!!a,this.allowFlatten=s,this.options=t,At(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Ww(t);this.animation=Vw(n,r,o,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const d=sc(o,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(d):$w(n,r,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}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(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return yt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+yt(t)}get time(){return yt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Dt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Uf()?(this.animation.timeline=t,ut):n(this)}}const Xf={anticipate:Tf,backInOut:Ef,circInOut:Df};function Hw(e){return e in Xf}function Yw(e){typeof e.ease=="string"&&Hw(e.ease)&&(e.ease=Xf[e.ease])}const ou=10;class Uw extends zw{constructor(t){Yw(t),zf(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:a,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const i=new cc({...s,autoplay:!1}),c=Dt(this.finishedTime??this.time);n.setWithVelocity(i.sample(c-ou).value,i.sample(c).value,ou),i.stop()}}const au=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(un.test(e)||e==="0")&&!e.startsWith("url("));function Gw(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 Kw(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],s=au(o,t),i=au(a,t);return ur(s===i,`You are trying to animate ${t} from "${o}" to "${a}". "${s?a:o}" is not an animatable value.`,"value-not-animatable"),!s||!i?!1:Gw(e)||(n==="spring"||qf(n))&&r}function ii(e){e.duration=0,e.type="keyframes"}const qw=new Set(["opacity","clipPath","filter","transform"]),Xw=Ki(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Zw(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:a,type:s}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return Xw()&&n&&qw.has(n)&&(n!=="transform"||!u)&&!c&&!r&&o!=="mirror"&&a!==0&&s!=="inertia"}const Qw=40;class Jw extends ic{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:s="loop",keyframes:i,name:c,motionValue:u,element:d,...l}){var g;super(),this.stop=()=>{var b,y;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=lt.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:a,repeatType:s,name:c,motionValue:u,element:d,...l},p=(d==null?void 0:d.KeyframeResolver)||lc;this.keyframeResolver=new p(i,(b,y,v)=>this.onKeyframesResolved(b,y,f,!v),c,u,d),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:a,type:s,velocity:i,delay:c,isHandoff:u,onUpdate:d}=r;this.resolvedAt=lt.now(),Kw(t,a,s,i)||((en.instantAnimations||!c)&&(d==null||d(sc(t,r,n))),t[0]=t[t.length-1],ii(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Qw?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!u&&Zw(f)?new Uw({...f,element:f.motionValue.owner.current}):new cc(f);p.finished.then(()=>this.notifyFinished()).catch(ut),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),jw()),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(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const e0=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function t0(e){const t=e0.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const n0=4;function Zf(e,t,n=1){At(n<=n0,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=t0(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const s=a.trim();return bf(s)?parseFloat(s):s}return ec(o)?Zf(o,t,n+1):o}function uc(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Qf=new Set(["width","height","top","left","right","bottom",...fr]),r0={test:e=>e==="auto",parse:e=>e},Jf=e=>t=>t.test(e),eh=[dr,ie,zt,an,Xx,qx,r0],su=e=>eh.find(Jf(e));function o0(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xf(e):!0}const a0=new Set(["brightness","contrast","saturate","opacity"]);function s0(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(tc)||[];if(!r)return e;const o=n.replace(r,"");let a=a0.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+o+")"}const i0=/\b([a-z-]*)\(.*?\)/gu,ci={...un,getAnimatableNone:e=>{const t=e.match(i0);return t?t.map(s0).join(" "):e}},iu={...dr,transform:Math.round},c0={rotate:an,rotateX:an,rotateY:an,rotateZ:an,scale:Ro,scaleX:Ro,scaleY:Ro,scaleZ:Ro,skew:an,skewX:an,skewY:an,distance:ie,translateX:ie,translateY:ie,translateZ:ie,x:ie,y:ie,z:ie,perspective:ie,transformPerspective:ie,opacity:$r,originX:Kl,originY:Kl,originZ:ie},dc={borderWidth:ie,borderTopWidth:ie,borderRightWidth:ie,borderBottomWidth:ie,borderLeftWidth:ie,borderRadius:ie,radius:ie,borderTopLeftRadius:ie,borderTopRightRadius:ie,borderBottomRightRadius:ie,borderBottomLeftRadius:ie,width:ie,maxWidth:ie,height:ie,maxHeight:ie,top:ie,right:ie,bottom:ie,left:ie,padding:ie,paddingTop:ie,paddingRight:ie,paddingBottom:ie,paddingLeft:ie,margin:ie,marginTop:ie,marginRight:ie,marginBottom:ie,marginLeft:ie,backgroundPositionX:ie,backgroundPositionY:ie,...c0,zIndex:iu,fillOpacity:$r,strokeOpacity:$r,numOctaves:iu},l0={...dc,color:Ve,backgroundColor:Ve,outlineColor:Ve,fill:Ve,stroke:Ve,borderColor:Ve,borderTopColor:Ve,borderRightColor:Ve,borderBottomColor:Ve,borderLeftColor:Ve,filter:ci,WebkitFilter:ci},th=e=>l0[e];function nh(e,t){let n=th(e);return n!==ci&&(n=un),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const u0=new Set(["auto","none","0"]);function d0(e,t,n){let r=0,o;for(;r<e.length&&!o;){const a=e[r];typeof a=="string"&&!u0.has(a)&&Fr(a).values.length&&(o=e[r]),r++}if(o&&n)for(const a of t)e[a]=nh(n,o)}class f0 extends lc{constructor(t,n,r,o,a){super(t,n,r,o,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),ec(u))){const d=Zf(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Qf.has(r)||t.length!==2)return;const[o,a]=t,s=su(o),i=su(a);if(s!==i)if(nu(s)&&nu(i))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else On[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||o0(t[o]))&&r.push(o);r.length&&d0(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=On[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var i;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const a=r.length-1,s=r[a];r[a]=On[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(i=this.removedTransforms)!=null&&i.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function rh(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const o=document.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const oh=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ah(e){return yf(e)&&"offsetHeight"in e}const cu=30,h0=e=>!isNaN(parseFloat(e)),Nr={current:void 0};class m0{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var a;const o=lt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=lt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=h0(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ya(!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 qi);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ce.read(()=>{this.events.change.getSize()||this.stop()})}:r}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,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.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 Nr.current&&Nr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=lt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>cu)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,cu);return Xi(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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Tt(e,t){return new m0(e,t)}const{schedule:fc}=Of(queueMicrotask,!1),Et={x:!1,y:!1};function sh(){return Et.x||Et.y}function p0(e){return e==="x"||e==="y"?Et[e]?null:(Et[e]=!0,()=>{Et[e]=!1}):Et.x||Et.y?null:(Et.x=Et.y=!0,()=>{Et.x=Et.y=!1})}function ih(e,t){const n=rh(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function lu(e){return!(e.pointerType==="touch"||sh())}function g0(e,t,n={}){const[r,o,a]=ih(e,n),s=i=>{if(!lu(i))return;const{target:c}=i,u=t(c,i);if(typeof u!="function"||!c)return;const d=l=>{lu(l)&&(u(l),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,o)};return r.forEach(i=>{i.addEventListener("pointerenter",s,o)}),a}const ch=(e,t)=>t?e===t?!0:ch(e,t.parentElement):!1,hc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,v0=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function b0(e){return v0.has(e.tagName)||e.tabIndex!==-1}const Ho=new WeakSet;function uu(e){return t=>{t.key==="Enter"&&e(t)}}function fs(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const y0=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=uu(()=>{if(Ho.has(n))return;fs(n,"down");const o=uu(()=>{fs(n,"up")}),a=()=>fs(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function du(e){return hc(e)&&!sh()}function x0(e,t,n={}){const[r,o,a]=ih(e,n),s=i=>{const c=i.currentTarget;if(!du(i))return;Ho.add(c);const u=t(c,i),d=(p,g)=>{window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",f),Ho.has(c)&&Ho.delete(c),du(p)&&typeof u=="function"&&u(p,{success:g})},l=p=>{d(p,c===window||c===document||n.useGlobalTarget||ch(c,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",l,o),window.addEventListener("pointercancel",f,o)};return r.forEach(i=>{(n.useGlobalTarget?window:i).addEventListener("pointerdown",s,o),ah(i)&&(i.addEventListener("focus",u=>y0(u,o)),!b0(i)&&!i.hasAttribute("tabindex")&&(i.tabIndex=0))}),a}function mc(e){return yf(e)&&"ownerSVGElement"in e}const Yo=new WeakMap;let sn;const lh=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:mc(r)&&"getBBox"in r?r.getBBox()[t]:r[n],w0=lh("inline","width","offsetWidth"),S0=lh("block","height","offsetHeight");function C0({target:e,borderBoxSize:t}){var n;(n=Yo.get(e))==null||n.forEach(r=>{r(e,{get width(){return w0(e,t)},get height(){return S0(e,t)}})})}function M0(e){e.forEach(C0)}function E0(){typeof ResizeObserver>"u"||(sn=new ResizeObserver(M0))}function T0(e,t){sn||E0();const n=rh(e);return n.forEach(r=>{let o=Yo.get(r);o||(o=new Set,Yo.set(r,o)),o.add(t),sn==null||sn.observe(r)}),()=>{n.forEach(r=>{const o=Yo.get(r);o==null||o.delete(t),o!=null&&o.size||sn==null||sn.unobserve(r)})}}const Uo=new Set;let Kn;function P0(){Kn=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Uo.forEach(t=>t(e))},window.addEventListener("resize",Kn)}function D0(e){return Uo.add(e),Kn||P0(),()=>{Uo.delete(e),!Uo.size&&typeof Kn=="function"&&(window.removeEventListener("resize",Kn),Kn=void 0)}}function R0(e,t){return typeof e=="function"?D0(e):T0(e,t)}function uh(e,t){let n;const r=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;n!==s&&e(s),n=s};return Ce.preUpdate(r,!0),()=>Ot(r)}function A0(e){return mc(e)&&e.tagName==="svg"}function O0(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],a=e[2+n],s=e[3+n],i=ac(o,a,s);return t?i(r):i}const et=e=>!!(e&&e.getVelocity),k0=[...eh,Ve,un],N0=e=>k0.find(Jf(e)),pc=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function _0(e=!0){const t=S.useContext(Yi);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,a=S.useId();S.useEffect(()=>{if(e)return o(a)},[e]);const s=S.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,s]:[!0]}const dh=S.createContext({strict:!1}),fu={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"]},or={};for(const e in fu)or[e]={isEnabled:t=>fu[e].some(n=>!!t[n])};function I0(e){for(const t in e)or[t]={...or[t],...e[t]}}const j0=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 ta(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||j0.has(e)}let fh=e=>!ta(e);function L0(e){typeof e=="function"&&(fh=t=>t.startsWith("on")?!ta(t):e(t))}try{L0(require("@emotion/is-prop-valid").default)}catch{}function $0(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(fh(o)||n===!0&&ta(o)||!t&&!ta(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const xa=S.createContext({});function wa(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Br(e){return typeof e=="string"||Array.isArray(e)}const gc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vc=["initial",...gc];function Sa(e){return wa(e.animate)||vc.some(t=>Br(e[t]))}function hh(e){return!!(Sa(e)||e.variants)}function F0(e,t){if(Sa(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Br(n)?n:void 0,animate:Br(r)?r:void 0}}return e.inherit!==!1?t:{}}function B0(e){const{initial:t,animate:n}=F0(e,S.useContext(xa));return S.useMemo(()=>({initial:t,animate:n}),[hu(t),hu(n)])}function hu(e){return Array.isArray(e)?e.join(" "):e}const Vr={};function V0(e){for(const t in e)Vr[t]=e[t],Ji(t)&&(Vr[t].isCSSVariable=!0)}function mh(e,{layout:t,layoutId:n}){return hr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Vr[e]||e==="opacity")}const W0={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},z0=fr.length;function H0(e,t,n){let r="",o=!0;for(let a=0;a<z0;a++){const s=fr[a],i=e[s];if(i===void 0)continue;let c=!0;if(typeof i=="number"?c=i===(s.startsWith("scale")?1:0):c=parseFloat(i)===0,!c||n){const u=oh(i,dc[s]);if(!c){o=!1;const d=W0[s]||s;r+=`${d}(${u}) `}n&&(t[s]=u)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function bc(e,t,n){const{style:r,vars:o,transformOrigin:a}=e;let s=!1,i=!1;for(const c in t){const u=t[c];if(hr.has(c)){s=!0;continue}else if(Ji(c)){o[c]=u;continue}else{const d=oh(u,dc[c]);c.startsWith("origin")?(i=!0,a[c]=d):r[c]=d}}if(t.transform||(s||n?r.transform=H0(t,e.transform,n):r.transform&&(r.transform="none")),i){const{originX:c="50%",originY:u="50%",originZ:d=0}=a;r.transformOrigin=`${c} ${u} ${d}`}}const yc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ph(e,t,n){for(const r in t)!et(t[r])&&!mh(r,n)&&(e[r]=t[r])}function Y0({transformTemplate:e},t){return S.useMemo(()=>{const n=yc();return bc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function U0(e,t){const n=e.style||{},r={};return ph(r,n,e),Object.assign(r,Y0(e,t)),r}function G0(e,t){const n={},r=U0(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const K0={offset:"stroke-dashoffset",array:"stroke-dasharray"},q0={offset:"strokeDashoffset",array:"strokeDasharray"};function X0(e,t,n=1,r=0,o=!0){e.pathLength=1;const a=o?K0:q0;e[a.offset]=ie.transform(-r);const s=ie.transform(t),i=ie.transform(n);e[a.array]=`${s} ${i}`}function gh(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...i},c,u,d){if(bc(e,i,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:l,style:f}=e;l.transform&&(f.transform=l.transform,delete l.transform),(f.transform||l.transformOrigin)&&(f.transformOrigin=l.transformOrigin??"50% 50%",delete l.transformOrigin),f.transform&&(f.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete l.transformBox),t!==void 0&&(l.x=t),n!==void 0&&(l.y=n),r!==void 0&&(l.scale=r),o!==void 0&&X0(l,o,a,s,!1)}const vh=()=>({...yc(),attrs:{}}),bh=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Z0(e,t,n,r){const o=S.useMemo(()=>{const a=vh();return gh(a,t,bh(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};ph(a,e.style,e),o.style={...a,...o.style}}return o}const Q0=["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 xc(e){return typeof e!="string"||e.includes("-")?!1:!!(Q0.indexOf(e)>-1||/[A-Z]/u.test(e))}function J0(e,t,n,{latestValues:r},o,a=!1){const i=(xc(e)?Z0:G0)(t,r,o,e),c=$0(t,typeof e=="string",a),u=e!==S.Fragment?{...c,...i,ref:n}:{},{children:d}=t,l=S.useMemo(()=>et(d)?d.get():d,[d]);return S.createElement(e,{...u,children:l})}function mu(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function wc(e,t,n,r){if(typeof t=="function"){const[o,a]=mu(r);t=t(n!==void 0?n:e.custom,o,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,a]=mu(r);t=t(n!==void 0?n:e.custom,o,a)}return t}function Go(e){return et(e)?e.get():e}function eS({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:tS(n,r,o,e),renderState:t()}}function tS(e,t,n,r){const o={},a=r(e,{});for(const f in a)o[f]=Go(a[f]);let{initial:s,animate:i}=e;const c=Sa(e),u=hh(e);t&&u&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),i===void 0&&(i=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const l=d?i:s;if(l&&typeof l!="boolean"&&!wa(l)){const f=Array.isArray(l)?l:[l];for(let p=0;p<f.length;p++){const g=wc(e,f[p]);if(g){const{transitionEnd:b,transition:y,...v}=g;for(const x in v){let w=v[x];if(Array.isArray(w)){const M=d?w.length-1:0;w=w[M]}w!==null&&(o[x]=w)}for(const x in b)o[x]=b[x]}}}return o}const yh=e=>(t,n)=>{const r=S.useContext(xa),o=S.useContext(Yi),a=()=>eS(e,t,r,o);return n?a():ba(a)};function Sc(e,t,n){var a;const{style:r}=e,o={};for(const s in r)(et(r[s])||t.style&&et(t.style[s])||mh(s,e)||((a=n==null?void 0:n.getValue(s))==null?void 0:a.liveStyle)!==void 0)&&(o[s]=r[s]);return o}const nS=yh({scrapeMotionValuesFromProps:Sc,createRenderState:yc});function xh(e,t,n){const r=Sc(e,t,n);for(const o in e)if(et(e[o])||et(t[o])){const a=fr.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[a]=e[o]}return r}const rS=yh({scrapeMotionValuesFromProps:xh,createRenderState:vh}),oS=Symbol.for("motionComponentSymbol");function qn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function aS(e,t,n){return S.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):qn(n)&&(n.current=r))},[t])}const Cc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),sS="framerAppearId",wh="data-"+Cc(sS),Sh=S.createContext({});function iS(e,t,n,r,o){var b,y;const{visualElement:a}=S.useContext(xa),s=S.useContext(dh),i=S.useContext(Yi),c=S.useContext(pc).reducedMotion,u=S.useRef(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceContext:i,blockInitialAnimation:i?i.initial===!1:!1,reducedMotionConfig:c}));const d=u.current,l=S.useContext(Sh);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&cS(u.current,n,o,l);const f=S.useRef(!1);S.useInsertionEffect(()=>{d&&f.current&&d.update(n,i)});const p=n[wh],g=S.useRef(!!p&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,p))&&((y=window.MotionHasOptimisedAnimation)==null?void 0:y.call(window,p)));return Hi(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),g.current&&d.animationState&&d.animationState.animateChanges())}),S.useEffect(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)==null||v.call(window,p)}),g.current=!1),d.enteringChildren=void 0)}),d}function cS(e,t,n,r){const{layoutId:o,layout:a,drag:s,dragConstraints:i,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ch(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:!!s||i&&qn(i),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function Ch(e){if(e)return e.options.allowProjection!==!1?e.projection:Ch(e.parent)}function hs(e,{forwardMotionProps:t=!1}={},n,r){n&&I0(n);const o=xc(e)?rS:nS;function a(i,c){let u;const d={...S.useContext(pc),...i,layoutId:lS(i)},{isStatic:l}=d,f=B0(i),p=o(i,l);if(!l&&zi){uS(d,n);const g=dS(d);u=g.MeasureLayout,f.visualElement=iS(e,p,d,r,g.ProjectionNode)}return m.jsxs(xa.Provider,{value:f,children:[u&&f.visualElement?m.jsx(u,{visualElement:f.visualElement,...d}):null,J0(e,i,aS(p,f.visualElement,c),p,l,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const s=S.forwardRef(a);return s[oS]=e,s}function lS({layoutId:e}){const t=S.useContext(vf).id;return t&&e!==void 0?t+"-"+e:e}function uS(e,t){const n=S.useContext(dh).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ur(!1,r,"lazy-strict-mode"):At(!1,r,"lazy-strict-mode")}}function dS(e){const{drag:t,layout:n}=or;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function fS(e,t){if(typeof Proxy>"u")return hs;const n=new Map,r=(a,s)=>hs(a,s,e,t),o=(a,s)=>(process.env.NODE_ENV!=="production"&&ya(!1,"motion() is deprecated. Use motion.create() instead."),r(a,s));return new Proxy(o,{get:(a,s)=>s==="create"?r:(n.has(s)||n.set(s,hs(s,void 0,e,t)),n.get(s))})}function Mh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hS({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mS(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ms(e){return e===void 0||e===1}function li({scale:e,scaleX:t,scaleY:n}){return!ms(e)||!ms(t)||!ms(n)}function Tn(e){return li(e)||Eh(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Eh(e){return pu(e.x)||pu(e.y)}function pu(e){return e&&e!=="0%"}function na(e,t,n){const r=e-n,o=t*r;return n+o}function gu(e,t,n,r,o){return o!==void 0&&(e=na(e,o,r)),na(e,n,r)+t}function ui(e,t=0,n=1,r,o){e.min=gu(e.min,t,n,r,o),e.max=gu(e.max,t,n,r,o)}function Th(e,{x:t,y:n}){ui(e.x,t.translate,t.scale,t.originPoint),ui(e.y,n.translate,n.scale,n.originPoint)}const vu=.999999999999,bu=1.0000000000001;function pS(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let a,s;for(let i=0;i<o;i++){a=n[i],s=a.projectionDelta;const{visualElement:c}=a.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Zn(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Th(e,s)),r&&Tn(a.latestValues)&&Zn(e,a.latestValues))}t.x<bu&&t.x>vu&&(t.x=1),t.y<bu&&t.y>vu&&(t.y=1)}function Xn(e,t){e.min=e.min+t,e.max=e.max+t}function yu(e,t,n,r,o=.5){const a=Oe(e.min,e.max,o);ui(e,t,n,a,r)}function Zn(e,t){yu(e.x,t.x,t.scaleX,t.scale,t.originX),yu(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ph(e,t){return Mh(mS(e.getBoundingClientRect(),t))}function gS(e,t,n){const r=Ph(e,n),{scroll:o}=t;return o&&(Xn(r.x,o.offset.x),Xn(r.y,o.offset.y)),r}const xu=()=>({translate:0,scale:1,origin:0,originPoint:0}),Qn=()=>({x:xu(),y:xu()}),wu=()=>({min:0,max:0}),je=()=>({x:wu(),y:wu()}),di={current:null},Dh={current:!1};function vS(){if(Dh.current=!0,!!zi)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>di.current=e.matches;e.addEventListener("change",t),t()}else di.current=!1}const bS=new WeakMap;function yS(e,t,n){for(const r in t){const o=t[r],a=n[r];if(et(o))e.addValue(r,o);else if(et(a))e.addValue(r,Tt(o,{owner:e}));else if(a!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,Tt(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Su=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class xS{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:a,visualState:s},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=lc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=lt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Ce.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=s;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=i,this.blockInitialAnimation=!!a,this.isControllingVariants=Sa(n),this.isVariantNode=hh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...l}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in l){const p=l[f];c[f]!==void 0&&et(p)&&p.set(c[f])}}mount(t){var n;this.current=t,bS.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((r,o)=>this.bindToMotionValue(o,r)),Dh.current||vS(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:di.current,process.env.NODE_ENV!=="production"&&ya(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Ot(this.notifyUpdate),Ot(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.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 r=hr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Ce.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),a&&a(),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 or){const n=or[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):je()}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 r=0;r<Su.length;r++){const o=Su[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const a="on"+o,s=t[a];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=yS(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 r=this.values.get(t);n!==r&&(r&&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 r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Tt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(bf(r)||xf(r))?r=parseFloat(r):!N0(r)&&un.test(n)&&(r=nh(t,n)),this.setBaseTarget(t,et(r)?r.get():r)),et(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var a;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=wc(this.props,n,(a=this.presenceContext)==null?void 0:a.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!et(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new qi),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){fc.render(this.render)}}class Rh extends xS{constructor(){super(...arguments),this.KeyframeResolver=f0}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;et(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ah(e,{style:t,vars:n},r,o){const a=e.style;let s;for(s in t)a[s]=t[s];o==null||o.applyProjectionStyles(a,r);for(s in n)a.setProperty(s,n[s])}function wS(e){return window.getComputedStyle(e)}class SS extends Rh{constructor(){super(...arguments),this.type="html",this.renderInstance=Ah}readValueFromInstance(t,n){var r;if(hr.has(n))return(r=this.projection)!=null&&r.isProjecting?ni(n):Ow(t,n);{const o=wS(t),a=(Ji(n)?o.getPropertyValue(n):o[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ph(t,n)}build(t,n,r){bc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Sc(t,n,r)}}const Oh=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function CS(e,t,n,r){Ah(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Oh.has(o)?o:Cc(o),t.attrs[o])}class MS extends Rh{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=je}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(hr.has(n)){const r=th(n);return r&&r.default||0}return n=Oh.has(n)?n:Cc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return xh(t,n,r)}build(t,n,r){gh(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){CS(t,n,r,o)}mount(t){this.isSVGTag=bh(t.tagName),super.mount(t)}}const ES=(e,t)=>xc(e)?new MS(t):new SS(t,{allowProjection:e!==S.Fragment});function Jn(e,t,n){const r=e.getProps();return wc(r,t,n!==void 0?n:r.custom,e)}const fi=e=>Array.isArray(e);function TS(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Tt(n))}function PS(e){return fi(e)?e[e.length-1]||0:e}function DS(e,t){const n=Jn(e,t);let{transitionEnd:r={},transition:o={},...a}=n||{};a={...a,...r};for(const s in a){const i=PS(a[s]);TS(e,s,i)}}function RS(e){return!!(et(e)&&e.add)}function hi(e,t){const n=e.getValue("willChange");if(RS(n))return n.add(t);if(!n&&en.WillChange){const r=new en.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function kh(e){return e.props[wh]}const AS=e=>e!==null;function OS(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(AS),a=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[a]}const kS={type:"spring",stiffness:500,damping:25,restSpeed:10},NS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_S={type:"keyframes",duration:.8},IS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jS=(e,{keyframes:t})=>t.length>2?_S:hr.has(e)?e.startsWith("scale")?NS(t[1]):kS:IS;function LS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:a,repeatType:s,repeatDelay:i,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const Mc=(e,t,n,r={},o,a)=>s=>{const i=uc(r,e)||{},c=i.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Dt(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...i,delay:-u,onUpdate:f=>{t.set(f),i.onUpdate&&i.onUpdate(f)},onComplete:()=>{s(),i.onComplete&&i.onComplete()},name:e,motionValue:t,element:a?void 0:o};LS(i)||Object.assign(d,jS(e,d)),d.duration&&(d.duration=Dt(d.duration)),d.repeatDelay&&(d.repeatDelay=Dt(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let l=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(ii(d),d.delay===0&&(l=!0)),(en.instantAnimations||en.skipAnimations)&&(l=!0,ii(d),d.delay=0),d.allowFlatten=!i.type&&!i.ease,l&&!a&&t.get()!==void 0){const f=OS(d.keyframes,i);if(f!==void 0){Ce.update(()=>{d.onUpdate(f),d.onComplete()});return}}return i.isSync?new cc(d):new Jw(d)};function $S({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Nh(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:s,...i}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in i){const l=e.getValue(d,e.latestValues[d]??null),f=i[d];if(f===void 0||u&&$S(u,d))continue;const p={delay:n,...uc(a||{},d)},g=l.get();if(g!==void 0&&!l.isAnimating&&!Array.isArray(f)&&f===g&&!p.velocity)continue;let b=!1;if(window.MotionHandoffAnimation){const v=kh(e);if(v){const x=window.MotionHandoffAnimation(v,d,Ce);x!==null&&(p.startTime=x,b=!0)}}hi(e,d),l.start(Mc(d,l,f,e.shouldReduceMotion&&Qf.has(d)?{type:!1}:p,e,b));const y=l.animation;y&&c.push(y)}return s&&Promise.all(c).then(()=>{Ce.update(()=>{s&&DS(e,s)})}),c}function _h(e,t,n,r=0,o=1){const a=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),s=e.size,i=(s-1)*r;return typeof n=="function"?n(a,s):o===1?a*r:i-a*r}function mi(e,t,n={}){var c;const r=Jn(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const a=r?()=>Promise.all(Nh(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:l,staggerDirection:f}=o;return FS(e,t,u,d,l,f,n)}:()=>Promise.resolve(),{when:i}=o;if(i){const[u,d]=i==="beforeChildren"?[a,s]:[s,a];return u().then(()=>d())}else return Promise.all([a(),s(n.delay)])}function FS(e,t,n=0,r=0,o=0,a=1,s){const i=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),i.push(mi(c,t,{...s,delay:n+(typeof r=="function"?0:r)+_h(e.variantChildren,c,r,o,a)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(i)}function BS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(a=>mi(e,a,n));r=Promise.all(o)}else if(typeof t=="string")r=mi(e,t,n);else{const o=typeof t=="function"?Jn(e,t,n.custom):t;r=Promise.all(Nh(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Ih(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const VS=vc.length;function jh(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?jh(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<VS;n++){const r=vc[n],o=e.props[r];(Br(o)||o===!1)&&(t[r]=o)}return t}const WS=[...gc].reverse(),zS=gc.length;function HS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>BS(e,n,r)))}function YS(e){let t=HS(e),n=Cu(),r=!0;const o=c=>(u,d)=>{var f;const l=Jn(e,d,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(l){const{transition:p,transitionEnd:g,...b}=l;u={...u,...b,...g}}return u};function a(c){t=c(e)}function s(c){const{props:u}=e,d=jh(e.parent)||{},l=[],f=new Set;let p={},g=1/0;for(let y=0;y<zS;y++){const v=WS[y],x=n[v],w=u[v]!==void 0?u[v]:d[v],M=Br(w),C=v===c?x.isActive:null;C===!1&&(g=y);let P=w===d[v]&&w!==u[v]&&M;if(P&&r&&e.manuallyAnimateOnMount&&(P=!1),x.protectedKeys={...p},!x.isActive&&C===null||!w&&!x.prevProp||wa(w)||typeof w=="boolean")continue;const E=US(x.prevProp,w);let D=E||v===c&&x.isActive&&!P&&M||y>g&&M,R=!1;const A=Array.isArray(w)?w:[w];let N=A.reduce(o(v),{});C===!1&&(N={});const{prevResolvedValues:z={}}=x,O={...z,...N},U=$=>{D=!0,f.has($)&&(R=!0,f.delete($)),x.needsAnimating[$]=!0;const j=e.getValue($);j&&(j.liveStyle=!1)};for(const $ in O){const j=N[$],_=z[$];if(p.hasOwnProperty($))continue;let Z=!1;fi(j)&&fi(_)?Z=!Ih(j,_):Z=j!==_,Z?j!=null?U($):f.add($):j!==void 0&&f.has($)?U($):x.protectedKeys[$]=!0}x.prevProp=w,x.prevResolvedValues=N,x.isActive&&(p={...p,...N}),r&&e.blockInitialAnimation&&(D=!1);const K=P&&E;D&&(!K||R)&&l.push(...A.map($=>{const j={type:v};if(typeof $=="string"&&r&&!K&&e.manuallyAnimateOnMount&&e.parent){const{parent:_}=e,Z=Jn(_,$);if(_.enteringChildren&&Z){const{delayChildren:ae}=Z.transition||{};j.delay=_h(_.enteringChildren,e,ae)}}return{animation:$,options:j}}))}if(f.size){const y={};if(typeof u.initial!="boolean"){const v=Jn(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(y.transition=v.transition)}f.forEach(v=>{const x=e.getBaseTarget(v),w=e.getValue(v);w&&(w.liveStyle=!0),y[v]=x??null}),l.push({animation:y})}let b=!!l.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(l):Promise.resolve()}function i(c,u){var l;if(n[c].isActive===u)return Promise.resolve();(l=e.variantChildren)==null||l.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(c,u)}),n[c].isActive=u;const d=s(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:s,setActive:i,setAnimateFunction:a,getState:()=>n,reset:()=>{n=Cu()}}}function US(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ih(t,e):!1}function Mn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cu(){return{animate:Mn(!0),whileInView:Mn(),whileHover:Mn(),whileTap:Mn(),whileDrag:Mn(),whileFocus:Mn(),exit:Mn()}}class pn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class GS extends pn{constructor(t){super(t),t.animationState||(t.animationState=YS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();wa(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(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let KS=0;class qS extends pn{constructor(){super(...arguments),this.id=KS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const XS={animation:{Feature:GS},exit:{Feature:qS}};function Wr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function no(e){return{point:{x:e.pageX,y:e.pageY}}}const ZS=e=>t=>hc(t)&&e(t,no(t));function _r(e,t,n,r){return Wr(e,t,ZS(n),r)}const Lh=1e-4,QS=1-Lh,JS=1+Lh,$h=.01,eC=0-$h,tC=0+$h;function ot(e){return e.max-e.min}function nC(e,t,n){return Math.abs(e-t)<=n}function Mu(e,t,n,r=.5){e.origin=r,e.originPoint=Oe(t.min,t.max,e.origin),e.scale=ot(n)/ot(t),e.translate=Oe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=QS&&e.scale<=JS||isNaN(e.scale))&&(e.scale=1),(e.translate>=eC&&e.translate<=tC||isNaN(e.translate))&&(e.translate=0)}function Ir(e,t,n,r){Mu(e.x,t.x,n.x,r?r.originX:void 0),Mu(e.y,t.y,n.y,r?r.originY:void 0)}function Eu(e,t,n){e.min=n.min+t.min,e.max=e.min+ot(t)}function rC(e,t,n){Eu(e.x,t.x,n.x),Eu(e.y,t.y,n.y)}function Tu(e,t,n){e.min=t.min-n.min,e.max=e.min+ot(t)}function jr(e,t,n){Tu(e.x,t.x,n.x),Tu(e.y,t.y,n.y)}function bt(e){return[e("x"),e("y")]}const Fh=({current:e})=>e?e.ownerDocument.defaultView:null,Pu=(e,t)=>Math.abs(e-t);function oC(e,t){const n=Pu(e.x,t.x),r=Pu(e.y,t.y);return Math.sqrt(n**2+r**2)}class Bh{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:a=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=gs(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=oC(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!g)return;const{point:b}=f,{timestamp:y}=qe;this.history.push({...b,timestamp:y});const{onStart:v,onMove:x}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ps(p,this.transformPagePoint),Ce.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:g,onSessionEnd:b,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=gs(f.type==="pointercancel"?this.lastMoveEventInfo:ps(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,v),b&&b(f,v)},!hc(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=o||window;const i=no(t),c=ps(i,this.transformPagePoint),{point:u}=c,{timestamp:d}=qe;this.history=[{...u,timestamp:d}];const{onSessionStart:l}=n;l&&l(t,gs(c,this.history)),this.removeListeners=Jr(_r(this.contextWindow,"pointermove",this.handlePointerMove),_r(this.contextWindow,"pointerup",this.handlePointerUp),_r(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ot(this.updatePoint)}}function ps(e,t){return t?{point:t(e.point)}:e}function Du(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gs({point:e},t){return{point:e,delta:Du(e,Vh(t)),offset:Du(e,aC(t)),velocity:sC(t,.1)}}function aC(e){return e[0]}function Vh(e){return e[e.length-1]}function sC(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Vh(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Dt(t)));)n--;if(!r)return{x:0,y:0};const a=yt(o.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const s={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function iC(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Oe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Oe(n,e,r.max):Math.min(e,n)),e}function Ru(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 cC(e,{top:t,left:n,bottom:r,right:o}){return{x:Ru(e.x,n,o),y:Ru(e.y,t,r)}}function Au(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function lC(e,t){return{x:Au(e.x,t.x),y:Au(e.y,t.y)}}function uC(e,t){let n=.5;const r=ot(e),o=ot(t);return o>r?n=rr(t.min,t.max-r,e.min):r>o&&(n=rr(e.min,e.max-o,t.min)),Yt(0,1,n)}function dC(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 pi=.35;function fC(e=pi){return e===!1?e=0:e===!0&&(e=pi),{x:Ou(e,"left","right"),y:Ou(e,"top","bottom")}}function Ou(e,t,n){return{min:ku(e,t),max:ku(e,n)}}function ku(e,t){return typeof e=="number"?e:e[t]||0}const hC=new WeakMap;class mC{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=je(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const a=l=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(no(l).point)},s=(l,f)=>{const{drag:p,dragPropagation:g,onDragStart:b}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=p0(p),!this.openDragLock))return;this.latestPointerEvent=l,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),bt(v=>{let x=this.getAxisMotionValue(v).get()||0;if(zt.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const M=w.layout.layoutBox[v];M&&(x=ot(M)*(parseFloat(x)/100))}}this.originPoint[v]=x}),b&&Ce.postRender(()=>b(l,f)),hi(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},i=(l,f)=>{this.latestPointerEvent=l,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:b,onDrag:y}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:v}=f;if(g&&this.currentDirection===null){this.currentDirection=pC(v),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),y&&y(l,f)},c=(l,f)=>{this.latestPointerEvent=l,this.latestPanInfo=f,this.stop(l,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>bt(l=>{var f;return this.getAnimationState(l)==="paused"&&((f=this.getAxisMotionValue(l).animation)==null?void 0:f.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new Bh(t,{onSessionStart:a,onStart:s,onMove:i,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Fh(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!o||!r)return;const{velocity:s}=o;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Ce.postRender(()=>i(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ao(t,o,this.currentDirection))return;const a=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=iC(s,this.constraints[t],this.elastic[t])),a.set(s)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,o=this.constraints;t&&qn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=cC(r.layoutBox,t):this.constraints=!1,this.elastic=fC(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&bt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=dC(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!qn(t))return!1;const r=t.current;At(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const a=gS(r,o.root,this.visualElement.getTransformPagePoint());let s=lC(o.layout.layoutBox,a);if(n){const i=n(hS(s));this.hasMutatedConstraints=!!i,i&&(s=Mh(i))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:a,dragSnapToOrigin:s,onDragTransitionEnd:i}=this.getProps(),c=this.constraints||{},u=bt(d=>{if(!Ao(d,n,this.currentDirection))return;let l=c&&c[d]||{};s&&(l={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,g={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(i)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return hi(this.visualElement,t),r.start(Mc(t,r,0,n,this.visualElement,!1))}stopAnimation(){bt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){bt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){bt(n=>{const{drag:r}=this.getProps();if(!Ao(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,a=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:i}=o.layout.layoutBox[n];a.set(t[n]-Oe(s,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!qn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};bt(s=>{const i=this.getAxisMotionValue(s);if(i&&this.constraints!==!1){const c=i.get();o[s]=uC({min:c,max:c},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),bt(s=>{if(!Ao(s,t,null))return;const i=this.getAxisMotionValue(s),{min:c,max:u}=this.constraints[s];i.set(Oe(c,u,o[s]))})}addListeners(){if(!this.visualElement.current)return;hC.set(this.visualElement,this);const t=this.visualElement.current,n=_r(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();qn(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ce.read(r);const s=Wr(window,"resize",()=>this.scalePositionWithinConstraints()),i=o.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(bt(d=>{const l=this.getAxisMotionValue(d);l&&(this.originPoint[d]+=c[d].translate,l.set(l.get()+c[d].translate))}),this.visualElement.render())}));return()=>{s(),n(),a(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:a=!1,dragElastic:s=pi,dragMomentum:i=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:a,dragElastic:s,dragMomentum:i}}}function Ao(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function pC(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class gC extends pn{constructor(t){super(t),this.removeGroupControls=ut,this.removeListeners=ut,this.controls=new mC(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const Nu=e=>(t,n)=>{e&&Ce.postRender(()=>e(t,n))};class vC extends pn{constructor(){super(...arguments),this.removePointerDownListener=ut}onPointerDown(t){this.session=new Bh(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Fh(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Nu(t),onStart:Nu(n),onMove:r,onEnd:(a,s)=>{delete this.session,o&&Ce.postRender(()=>o(a,s))}}}mount(){this.removePointerDownListener=_r(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ko={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function _u(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ie.test(e))e=parseFloat(e);else return e;const n=_u(e,t.target.x),r=_u(e,t.target.y);return`${n}% ${r}%`}},bC={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=un.parse(e);if(o.length>5)return r;const a=un.createTransformer(e),s=typeof o[0]!="number"?1:0,i=n.x.scale*t.x,c=n.y.scale*t.y;o[0+s]/=i,o[1+s]/=c;const u=Oe(i,c,.5);return typeof o[2+s]=="number"&&(o[2+s]/=u),typeof o[3+s]=="number"&&(o[3+s]/=u),a(o)}};let vs=!1;class yC extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:a}=t;V0(xC),a&&(n.group&&n.group.add(a),r&&r.register&&o&&r.register(a),vs&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Ko.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:a}=this.props,{projection:s}=r;return s&&(s.isPresent=a,vs=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==a?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||Ce.postRender(()=>{const i=s.getStack();(!i||!i.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),fc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;vs=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Wh(e){const[t,n]=_0(),r=S.useContext(vf);return m.jsx(yC,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Sh),isPresent:t,safeToRemove:n})}const xC={borderRadius:{...xr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xr,borderTopRightRadius:xr,borderBottomLeftRadius:xr,borderBottomRightRadius:xr,boxShadow:bC};function wC(e,t,n){const r=et(e)?e:Tt(e);return r.start(Mc("",r,t,n)),r.animation}const SC=(e,t)=>e.depth-t.depth;class CC{constructor(){this.children=[],this.isDirty=!1}add(t){Ui(this.children,t),this.isDirty=!0}remove(t){Gi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(SC),this.isDirty=!1,this.children.forEach(t)}}function MC(e,t){const n=lt.now(),r=({timestamp:o})=>{const a=o-n;a>=t&&(Ot(r),e(a-t))};return Ce.setup(r,!0),()=>Ot(r)}const zh=["TopLeft","TopRight","BottomLeft","BottomRight"],EC=zh.length,Iu=e=>typeof e=="string"?parseFloat(e):e,ju=e=>typeof e=="number"||ie.test(e);function TC(e,t,n,r,o,a){o?(e.opacity=Oe(0,n.opacity??1,PC(r)),e.opacityExit=Oe(t.opacity??1,0,DC(r))):a&&(e.opacity=Oe(t.opacity??1,n.opacity??1,r));for(let s=0;s<EC;s++){const i=`border${zh[s]}Radius`;let c=Lu(t,i),u=Lu(n,i);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||ju(c)===ju(u)?(e[i]=Math.max(Oe(Iu(c),Iu(u),r),0),(zt.test(u)||zt.test(c))&&(e[i]+="%")):e[i]=u}(t.rotate||n.rotate)&&(e.rotate=Oe(t.rotate||0,n.rotate||0,r))}function Lu(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const PC=Hh(0,.5,Pf),DC=Hh(.5,.95,ut);function Hh(e,t,n){return r=>r<e?0:r>t?1:n(rr(e,t,r))}function $u(e,t){e.min=t.min,e.max=t.max}function vt(e,t){$u(e.x,t.x),$u(e.y,t.y)}function Fu(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Bu(e,t,n,r,o){return e-=t,e=na(e,1/n,r),o!==void 0&&(e=na(e,1/o,r)),e}function RC(e,t=0,n=1,r=.5,o,a=e,s=e){if(zt.test(t)&&(t=parseFloat(t),t=Oe(s.min,s.max,t/100)-s.min),typeof t!="number")return;let i=Oe(a.min,a.max,r);e===a&&(i-=t),e.min=Bu(e.min,t,n,i,o),e.max=Bu(e.max,t,n,i,o)}function Vu(e,t,[n,r,o],a,s){RC(e,t[n],t[r],t[o],t.scale,a,s)}const AC=["x","scaleX","originX"],OC=["y","scaleY","originY"];function Wu(e,t,n,r){Vu(e.x,t,AC,n?n.x:void 0,r?r.x:void 0),Vu(e.y,t,OC,n?n.y:void 0,r?r.y:void 0)}function zu(e){return e.translate===0&&e.scale===1}function Yh(e){return zu(e.x)&&zu(e.y)}function Hu(e,t){return e.min===t.min&&e.max===t.max}function kC(e,t){return Hu(e.x,t.x)&&Hu(e.y,t.y)}function Yu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Uh(e,t){return Yu(e.x,t.x)&&Yu(e.y,t.y)}function Uu(e){return ot(e.x)/ot(e.y)}function Gu(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class NC{constructor(){this.members=[]}add(t){Ui(this.members,t),t.scheduleRender()}remove(t){if(Gi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const a=this.members[o];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function _C(e,t,n){let r="";const o=e.x.translate/t.x,a=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((o||a||s)&&(r=`translate3d(${o}px, ${a}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:l,rotateY:f,skewX:p,skewY:g}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),l&&(r+=`rotateX(${l}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),g&&(r+=`skewY(${g}deg) `)}const i=e.x.scale*t.x,c=e.y.scale*t.y;return(i!==1||c!==1)&&(r+=`scale(${i}, ${c})`),r||"none"}const bs=["","X","Y","Z"],IC=1e3;let jC=0;function ys(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Gh(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=kh(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ce,!(o||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Gh(r)}function Kh({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},i=t==null?void 0:t()){this.id=jC++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(FC),this.nodes.forEach(zC),this.nodes.forEach(HC),this.nodes.forEach(BC)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new CC)}addEventListener(s,i){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new qi),this.eventHandlers.get(s).add(i)}notifyListeners(s,...i){const c=this.eventHandlers.get(s);c&&c.notify(...i)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=mc(s)&&!A0(s),this.instance=s;const{layoutId:i,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||i)&&(this.isLayoutDirty=!0),e){let d,l=0;const f=()=>this.root.updateBlockedByResize=!1;Ce.read(()=>{l=window.innerWidth}),e(s,()=>{const p=window.innerWidth;p!==l&&(l=p,this.root.updateBlockedByResize=!0,d&&d(),d=MC(f,250),Ko.hasAnimatedSinceResize&&(Ko.hasAnimatedSinceResize=!1,this.nodes.forEach(Xu)))})}i&&this.root.registerSharedNode(i,this),this.options.animate!==!1&&u&&(i||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:l,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||qC,{onLayoutAnimationStart:b,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!Uh(this.targetLayout,p),x=!l&&f;if(this.options.layoutRoot||this.resumeFrom||x||l&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...uc(g,"layout"),onPlay:b,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(d,x)}else l||Xu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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(),Ot(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(YC),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&&Gh(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const l=this.path[d];l.shouldResetTransform=!0,l.updateScroll("snapshot"),l.options.layoutRoot&&l.willUpdate(!1)}const{layoutId:i,layout:c}=this.options;if(i===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ku);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(qu);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(WC),this.nodes.forEach(LC),this.nodes.forEach($C)):this.nodes.forEach(qu),this.clearAllSnapshots();const i=lt.now();qe.delta=Yt(0,1e3/60,i-qe.timestamp),qe.timestamp=i,qe.isProcessing=!0,is.update.process(qe),is.preRender.process(qe),is.render.process(qe),qe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,fc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(VC),this.sharedNodes.forEach(UC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ce.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ce.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ot(this.snapshot.measuredBox.x)&&!ot(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=je(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:i}=this.options;i&&i.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let i=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(i=!1),i&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,i=this.projectionDelta&&!Yh(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;s&&this.instance&&(i||Tn(this.latestValues)||d)&&(o(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const i=this.measurePageBox();let c=this.removeElementScroll(i);return s&&(c=this.removeTransform(c)),XC(c),{animationId:this.root.animationId,measuredBox:i,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:s}=this.options;if(!s)return je();const i=s.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(ZC))){const{scroll:d}=this.root;d&&(Xn(i.x,d.offset.x),Xn(i.y,d.offset.y))}return i}removeElementScroll(s){var c;const i=je();if(vt(i,s),(c=this.scroll)!=null&&c.wasRoot)return i;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:l,options:f}=d;d!==this.root&&l&&f.layoutScroll&&(l.wasRoot&&vt(i,s),Xn(i.x,l.offset.x),Xn(i.y,l.offset.y))}return i}applyTransform(s,i=!1){const c=je();vt(c,s);for(let u=0;u<this.path.length;u++){const d=this.path[u];!i&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Zn(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Tn(d.latestValues)&&Zn(c,d.latestValues)}return Tn(this.latestValues)&&Zn(c,this.latestValues),c}removeTransform(s){const i=je();vt(i,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Tn(u.latestValues))continue;li(u.latestValues)&&u.updateSnapshot();const d=je(),l=u.measurePageBox();vt(d,l),Wu(i,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Tn(this.latestValues)&&Wu(i,this.latestValues),i}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!==qe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var f;const i=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=i.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=i.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=i.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==i;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:l}=this.options;if(!(!this.layout||!(d||l))){if(this.resolvedRelativeTargetAt=qe.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=je(),this.relativeTargetOrigin=je(),jr(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=je(),this.targetWithTransforms=je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rC(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):vt(this.target,this.layout.layoutBox),Th(this.target,this.targetDelta)):vt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=je(),this.relativeTargetOrigin=je(),jr(this.relativeTargetOrigin,this.target,p.target),vt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||li(this.parent.latestValues)||Eh(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var g;const s=this.getLead(),i=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(c=!1),i&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===qe.timestamp&&(c=!1),c)return;const{layout:u,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||!(u||d))return;vt(this.layoutCorrected,this.layout.layoutBox);const l=this.treeScale.x,f=this.treeScale.y;pS(this.layoutCorrected,this.treeScale,this.path,i),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=je());const{target:p}=s;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Fu(this.prevProjectionDelta.x,this.projectionDelta.x),Fu(this.prevProjectionDelta.y,this.projectionDelta.y)),Ir(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==l||this.treeScale.y!==f||!Gu(this.projectionDelta.x,this.prevProjectionDelta.x)||!Gu(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var i;if((i=this.options.visualElement)==null||i.scheduleRender(),s){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Qn(),this.projectionDelta=Qn(),this.projectionDeltaWithTransform=Qn()}setAnimationOrigin(s,i=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},l=Qn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;const f=je(),p=c?c.source:void 0,g=this.layout?this.layout.source:void 0,b=p!==g,y=this.getStack(),v=!y||y.members.length<=1,x=!!(b&&!v&&this.options.crossfade===!0&&!this.path.some(KC));this.animationProgress=0;let w;this.mixTargetDelta=M=>{const C=M/1e3;Zu(l.x,s.x,C),Zu(l.y,s.y,C),this.setTargetDelta(l),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jr(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),GC(this.relativeTarget,this.relativeTargetOrigin,f,C),w&&kC(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=je()),vt(w,this.relativeTarget)),b&&(this.animationValues=d,TC(d,u,this.latestValues,C,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var i,c,u;this.notifyListeners("animationStart"),(i=this.currentAnimation)==null||i.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Ot(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ce.update(()=>{Ko.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Tt(0)),this.currentAnimation=wC(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),s.onUpdate&&s.onUpdate(d)},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(IC),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:i,target:c,layout:u,latestValues:d}=s;if(!(!i||!c||!u)){if(this!==s&&this.layout&&u&&qh(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||je();const l=ot(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+l;const f=ot(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+f}vt(i,c),Zn(i,d),Ir(this.projectionDeltaWithTransform,this.layoutCorrected,i,d)}}registerSharedNode(s,i){this.sharedNodes.has(s)||this.sharedNodes.set(s,new NC),this.sharedNodes.get(s).add(i);const u=i.options.initialPromotionConfig;i.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(i):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var i;const{layoutId:s}=this.options;return s?((i=this.getStack())==null?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:s}=this.options;return s?(i=this.getStack())==null?void 0:i.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:i,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let i=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(i=!0),!i)return;const u={};c.z&&ys("z",s,u,this.animationValues);for(let d=0;d<bs.length;d++)ys(`rotate${bs[d]}`,s,u,this.animationValues),ys(`skew${bs[d]}`,s,u,this.animationValues);s.render();for(const d in u)s.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);s.scheduleRender()}applyProjectionStyles(s,i){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Go(i==null?void 0:i.pointerEvents)||"",s.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Go(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Tn(this.latestValues)&&(s.transform=c?c({},""):"none",this.hasProjected=!1);return}s.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let l=_C(this.projectionDeltaWithTransform,this.treeScale,d);c&&(l=c(d,l)),s.transform=l;const{x:f,y:p}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?s.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:s.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in Vr){if(d[g]===void 0)continue;const{correct:b,applyTo:y,isCSSVariable:v}=Vr[g],x=l==="none"?d[g]:b(d[g],u);if(y){const w=y.length;for(let M=0;M<w;M++)s[y[M]]=x}else v?this.options.visualElement.renderState.vars[g]=x:s[g]=x}this.options.layoutId&&(s.pointerEvents=u===this?Go(i==null?void 0:i.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var i;return(i=s.currentAnimation)==null?void 0:i.stop()}),this.root.nodes.forEach(Ku),this.root.sharedNodes.clear()}}}function LC(e){e.updateLayout()}function $C(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:a}=e.options,s=t.source!==e.layout.source;a==="size"?bt(l=>{const f=s?t.measuredBox[l]:t.layoutBox[l],p=ot(f);f.min=r[l].min,f.max=f.min+p}):qh(a,t.layoutBox,r)&&bt(l=>{const f=s?t.measuredBox[l]:t.layoutBox[l],p=ot(r[l]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[l].max=e.relativeTarget[l].min+p)});const i=Qn();Ir(i,r,t.layoutBox);const c=Qn();s?Ir(c,e.applyTransform(o,!0),t.measuredBox):Ir(c,r,t.layoutBox);const u=!Yh(i);let d=!1;if(!e.resumeFrom){const l=e.getClosestProjectingParent();if(l&&!l.resumeFrom){const{snapshot:f,layout:p}=l;if(f&&p){const g=je();jr(g,t.layoutBox,f.layoutBox);const b=je();jr(b,r,p.layoutBox),Uh(g,b)||(d=!0),l.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=g,e.relativeParent=l)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:i,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function FC(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 BC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function VC(e){e.clearSnapshot()}function Ku(e){e.clearMeasurements()}function qu(e){e.isLayoutDirty=!1}function WC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Xu(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function zC(e){e.resolveTargetDelta()}function HC(e){e.calcProjection()}function YC(e){e.resetSkewAndRotation()}function UC(e){e.removeLeadSnapshot()}function Zu(e,t,n){e.translate=Oe(t.translate,0,n),e.scale=Oe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Qu(e,t,n,r){e.min=Oe(t.min,n.min,r),e.max=Oe(t.max,n.max,r)}function GC(e,t,n,r){Qu(e.x,t.x,n.x,r),Qu(e.y,t.y,n.y,r)}function KC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const qC={duration:.45,ease:[.4,0,.1,1]},Ju=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ed=Ju("applewebkit/")&&!Ju("chrome/")?Math.round:ut;function td(e){e.min=ed(e.min),e.max=ed(e.max)}function XC(e){td(e.x),td(e.y)}function qh(e,t,n){return e==="position"||e==="preserve-aspect"&&!nC(Uu(t),Uu(n),.2)}function ZC(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const QC=Kh({attachResizeListener:(e,t)=>Wr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),xs={current:void 0},Xh=Kh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!xs.current){const e=new QC({});e.mount(window),e.setOptions({layoutScroll:!0}),xs.current=e}return xs.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),JC={pan:{Feature:vC},drag:{Feature:gC,ProjectionNode:Xh,MeasureLayout:Wh}};function nd(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,a=r[o];a&&Ce.postRender(()=>a(t,no(t)))}class eM extends pn{mount(){const{current:t}=this.node;t&&(this.unmount=g0(t,(n,r)=>(nd(this.node,r,"Start"),o=>nd(this.node,o,"End"))))}unmount(){}}class tM extends pn{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=Jr(Wr(this.node.current,"focus",()=>this.onFocus()),Wr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function rd(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),a=r[o];a&&Ce.postRender(()=>a(t,no(t)))}class nM extends pn{mount(){const{current:t}=this.node;t&&(this.unmount=x0(t,(n,r)=>(rd(this.node,r,"Start"),(o,{success:a})=>rd(this.node,o,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const gi=new WeakMap,ws=new WeakMap,rM=e=>{const t=gi.get(e.target);t&&t(e)},oM=e=>{e.forEach(rM)};function aM({root:e,...t}){const n=e||document;ws.has(n)||ws.set(n,{});const r=ws.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(oM,{root:e,...t})),r[o]}function sM(e,t,n){const r=aM(t);return gi.set(e,n),r.observe(e),()=>{gi.delete(e),r.unobserve(e)}}const iM={some:0,all:1};class cM extends pn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:a}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:iM[o]},i=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:l}=this.node.getProps(),f=u?d:l;f&&f(c)};return sM(this.node.current,s,i)}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 uM={inView:{Feature:cM},tap:{Feature:nM},focus:{Feature:tM},hover:{Feature:eM}},dM={layout:{ProjectionNode:Xh,MeasureLayout:Wh}},fM={...XS,...uM,...JC,...dM},hM=fS(fM,ES),mM=50,od=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),pM=()=>({time:0,x:od(),y:od()}),gM={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ad(e,t,n,r){const o=n[t],{length:a,position:s}=gM[t],i=o.current,c=n.time;o.current=e[`scroll${s}`],o.scrollLength=e[`scroll${a}`]-e[`client${a}`],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=rr(0,o.scrollLength,o.current);const u=r-c;o.velocity=u>mM?0:Xi(o.current-i,u)}function vM(e,t,n){ad(e,"x",t,n),ad(e,"y",t,n),t.time=n}function bM(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(ah(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const o=r.getBoundingClientRect();r=r.parentElement;const a=r.getBoundingClientRect();n.x+=o.left-a.left,n.y+=o.top-a.top}else if(r instanceof SVGGraphicsElement){const{x:o,y:a}=r.getBBox();n.x+=o,n.y+=a;let s=null,i=r.parentNode;for(;!s;)i.tagName==="svg"&&(s=i),i=r.parentNode;r=s}else break;return n}const vi={start:0,center:.5,end:1};function sd(e,t,n=0){let r=0;if(e in vi&&(e=vi[e]),typeof e=="string"){const o=parseFloat(e);e.endsWith("px")?r=o:e.endsWith("%")?e=o/100:e.endsWith("vw")?r=o/100*document.documentElement.clientWidth:e.endsWith("vh")?r=o/100*document.documentElement.clientHeight:e=o}return typeof e=="number"&&(r=t*e),n+r}const yM=[0,0];function xM(e,t,n,r){let o=Array.isArray(e)?e:yM,a=0,s=0;return typeof e=="number"?o=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?o=e.split(" "):o=[e,vi[e]?e:"0"]),a=sd(o[0],n,r),s=sd(o[1],t),a-s}const wM={All:[[0,0],[1,1]]},SM={x:0,y:0};function CM(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function MM(e,t,n){const{offset:r=wM.All}=n,{target:o=e,axis:a="y"}=n,s=a==="y"?"height":"width",i=o!==e?bM(o,e):SM,c=o===e?{width:e.scrollWidth,height:e.scrollHeight}:CM(o),u={width:e.clientWidth,height:e.clientHeight};t[a].offset.length=0;let d=!t[a].interpolate;const l=r.length;for(let f=0;f<l;f++){const p=xM(r[f],u[s],c[s],i[a]);!d&&p!==t[a].interpolatorOffsets[f]&&(d=!0),t[a].offset[f]=p}d&&(t[a].interpolate=ac(t[a].offset,Wf(r),{clamp:!1}),t[a].interpolatorOffsets=[...t[a].offset]),t[a].progress=Yt(0,1,t[a].interpolate(t[a].current))}function EM(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight,process.env.NODE_ENV!=="production"&&e&&t&&t!==e&&ya(getComputedStyle(e).position!=="static","Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.")}function TM(e,t,n,r={}){return{measure:o=>{EM(e,r.target,n),vM(e,n,o),(r.offset||r.target)&&MM(e,n,r)},notify:()=>t(n)}}const wr=new WeakMap,id=new WeakMap,Ss=new WeakMap,cd=e=>e===document.scrollingElement?window:e;function Zh(e,{container:t=document.scrollingElement,...n}={}){if(!t)return ut;let r=Ss.get(t);r||(r=new Set,Ss.set(t,r));const o=pM(),a=TM(t,e,o,n);if(r.add(a),!wr.has(t)){const i=()=>{for(const l of r)l.measure(qe.timestamp);Ce.preUpdate(c)},c=()=>{for(const l of r)l.notify()},u=()=>Ce.read(i);wr.set(t,u);const d=cd(t);window.addEventListener("resize",u,{passive:!0}),t!==document.documentElement&&id.set(t,R0(t,u)),d.addEventListener("scroll",u,{passive:!0}),u()}const s=wr.get(t);return Ce.read(s,!1,!0),()=>{var u;Ot(s);const i=Ss.get(t);if(!i||(i.delete(a),i.size))return;const c=wr.get(t);wr.delete(t),c&&(cd(t).removeEventListener("scroll",c),(u=id.get(t))==null||u(),window.removeEventListener("resize",c))}}const ld=new Map;function PM(e){const t={value:0},n=Zh(r=>{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:n}}function Qh({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);const o=ld.get(t)??new Map;ld.set(t,o);const a=n.target??"self",s=o.get(a)??{},i=r+(n.offset??[]).join(",");return s[i]||(s[i]=!n.target&&Uf()?new ScrollTimeline({source:t,axis:r}):PM({container:t,...n})),s[i]}function DM(e,t){const n=Qh(t);return e.attachTimeline({timeline:t.target?void 0:n,observe:r=>(r.pause(),uh(o=>{r.time=r.iterationDuration*o},n))})}function RM(e){return e.length===2}function AM(e,t){return RM(e)?Zh(n=>{e(n[t.axis].progress,n)},t):uh(e,Qh(t))}function OM(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return ut;const o={axis:t,container:n,...r};return typeof e=="function"?AM(e,o):DM(e,o)}const kM=()=>({scrollX:Tt(0),scrollY:Tt(0),scrollXProgress:Tt(0),scrollYProgress:Tt(0)}),Oo=e=>e?!e.current:!1;function NM({container:e,target:t,...n}={}){const r=ba(kM),o=S.useRef(null),a=S.useRef(!1),s=S.useCallback(()=>(o.current=OM((i,{x:c,y:u})=>{r.scrollX.set(c.current),r.scrollXProgress.set(c.progress),r.scrollY.set(u.current),r.scrollYProgress.set(u.progress)},{...n,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}),()=>{var i;(i=o.current)==null||i.call(o)}),[e,t,JSON.stringify(n.offset)]);return Hi(()=>{if(a.current=!1,Oo(e)||Oo(t)){a.current=!0;return}else return s()},[s]),S.useEffect(()=>{if(a.current)return At(!Oo(e),"Container ref is defined but not hydrated","use-scroll-ref"),At(!Oo(t),"Target ref is defined but not hydrated","use-scroll-ref"),s()},[s]),r}function _M(e){const t=ba(()=>Tt(e)),{isStatic:n}=S.useContext(pc);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function Jh(e,t){const n=_M(t()),r=()=>n.set(t());return r(),Hi(()=>{const o=()=>Ce.preRender(r,!1,!0),a=e.map(s=>s.on("change",o));return()=>{a.forEach(s=>s()),Ot(r)}}),n}function IM(e){Nr.current=[],e();const t=Jh(Nr.current,e);return Nr.current=void 0,t}function jM(e,t,n,r){if(typeof e=="function")return IM(e);const o=typeof t=="function"?t:O0(t,n,r);return Array.isArray(e)?ud(e,o):ud([e],([a])=>o(a))}function ud(e,t){const n=ba(()=>[]);return Jh(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}const LM=({children:e,className:t})=>{const n=S.useRef(null),{scrollYProgress:r}=NM({target:n});if(typeof e!="string")throw new Error("TextReveal: children must be a string");const o=e.split(" ");return m.jsx("div",{ref:n,className:T.cn("z-0 relative h-[200vh]",t),children:m.jsx("div",{className:"sticky top-0 mx-auto flex h-[50%] max-w-4xl items-center bg-transparent px-[1rem] py-[5rem]",children:m.jsx("span",{ref:n,className:"flex flex-wrap p-5 text-2xl font-bold text-black/20 dark:text-white/20 md:p-8 md:text-3xl lg:p-10 lg:text-4xl xl:text-5xl",children:o.map((a,s)=>{const i=s/o.length,c=i+1/o.length;return m.jsx($M,{progress:r,range:[i,c],children:a},s)})})})})},$M=({children:e,progress:t,range:n})=>{const r=jM(t,n,[0,1]);return m.jsxs("span",{className:"relative mx-1 lg:mx-1.5",children:[m.jsx("span",{className:"absolute opacity-30",children:e}),m.jsx(hM.span,{style:{opacity:r},className:"text-black dark:text-white",children:e})]})};function FM(e,t){const n=h.createContext(t),r=a=>{const{children:s,...i}=a,c=h.useMemo(()=>i,Object.values(i));return m.jsx(n.Provider,{value:c,children:s})};r.displayName=e+"Provider";function o(a){const s=h.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Ne(e,t=[]){let n=[];function r(a,s){const i=h.createContext(s),c=n.length;n=[...n,s];const u=l=>{var v;const{scope:f,children:p,...g}=l,b=((v=f==null?void 0:f[e])==null?void 0:v[c])||i,y=h.useMemo(()=>g,Object.values(g));return m.jsx(b.Provider,{value:y,children:p})};u.displayName=a+"Provider";function d(l,f){var b;const p=((b=f==null?void 0:f[e])==null?void 0:b[c])||i,g=h.useContext(p);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${l}\` must be used within \`${a}\``)}return[u,d]}const o=()=>{const a=n.map(s=>h.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return h.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,BM(o,...t)]}function BM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:c,scopeName:u})=>{const l=c(a)[`__scope${u}`];return{...i,...l}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function dd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function dn(...e){return t=>{let n=!1;const r=e.map(o=>{const a=dd(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():dd(e[o],null)}}}}function ce(...e){return h.useCallback(dn(...e),e)}function F(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var mt=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},VM=h[" useId ".trim().toString()]||(()=>{}),WM=0;function _e(e){const[t,n]=h.useState(VM());return mt(()=>{n(r=>r??String(WM++))},[e]),t?`radix-${t}`:""}var zM=h[" useInsertionEffect ".trim().toString()]||mt;function Ge({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=HM({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:o;{const d=h.useRef(e!==void 0);h.useEffect(()=>{const l=d.current;l!==i&&console.warn(`${r} is changing from ${l?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=i},[i,r])}const u=h.useCallback(d=>{var l;if(i){const f=YM(d)?d(e):d;f!==e&&((l=s.current)==null||l.call(s,f))}else a(d)},[i,e,a,s]);return[c,u]}function HM({defaultProp:e,onChange:t}){const[n,r]=h.useState(e),o=h.useRef(n),a=h.useRef(t);return zM(()=>{a.current=t},[t]),h.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function YM(e){return typeof e=="function"}function Ue(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function UM(e,t=globalThis==null?void 0:globalThis.document){const n=Ue(e);h.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var GM="DismissableLayer",bi="dismissableLayer.update",KM="dismissableLayer.pointerDownOutside",qM="dismissableLayer.focusOutside",fd,em=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mr=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,u=h.useContext(em),[d,l]=h.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=h.useState({}),g=ce(t,E=>l(E)),b=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=b.indexOf(y),x=d?b.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,M=x>=v,C=QM(E=>{const D=E.target,R=[...u.branches].some(A=>A.contains(D));!M||R||(o==null||o(E),s==null||s(E),E.defaultPrevented||i==null||i())},f),P=JM(E=>{const D=E.target;[...u.branches].some(A=>A.contains(D))||(a==null||a(E),s==null||s(E),E.defaultPrevented||i==null||i())},f);return UM(E=>{x===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},f),h.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(fd=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),hd(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=fd)}},[d,f,n,u]),h.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),hd())},[d,u]),h.useEffect(()=>{const E=()=>p({});return document.addEventListener(bi,E),()=>document.removeEventListener(bi,E)},[]),m.jsx(T.Primitive.div,{...c,ref:g,style:{pointerEvents:w?M?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,P.onFocusCapture),onBlurCapture:F(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,C.onPointerDownCapture)})});mr.displayName=GM;var XM="DismissableLayerBranch",ZM=h.forwardRef((e,t)=>{const n=h.useContext(em),r=h.useRef(null),o=ce(t,r);return h.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),m.jsx(T.Primitive.div,{...e,ref:o})});ZM.displayName=XM;function QM(e,t=globalThis==null?void 0:globalThis.document){const n=Ue(e),r=h.useRef(!1),o=h.useRef(()=>{});return h.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let c=function(){tm(KM,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function JM(e,t=globalThis==null?void 0:globalThis.document){const n=Ue(e),r=h.useRef(!1);return h.useEffect(()=>{const o=a=>{a.target&&!r.current&&tm(qM,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function hd(){const e=new CustomEvent(bi);document.dispatchEvent(e)}function tm(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?T.dispatchDiscreteCustomEvent(o,a):o.dispatchEvent(a)}var Cs="focusScope.autoFocusOnMount",Ms="focusScope.autoFocusOnUnmount",md={bubbles:!1,cancelable:!0},eE="FocusScope",Ca=h.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=h.useState(null),u=Ue(o),d=Ue(a),l=h.useRef(null),f=ce(t,b=>c(b)),p=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(r){let b=function(w){if(p.paused||!i)return;const M=w.target;i.contains(M)?l.current=M:cn(l.current,{select:!0})},y=function(w){if(p.paused||!i)return;const M=w.relatedTarget;M!==null&&(i.contains(M)||cn(l.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&cn(i)};document.addEventListener("focusin",b),document.addEventListener("focusout",y);const x=new MutationObserver(v);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",y),x.disconnect()}}},[r,i,p.paused]),h.useEffect(()=>{if(i){gd.add(p);const b=document.activeElement;if(!i.contains(b)){const v=new CustomEvent(Cs,md);i.addEventListener(Cs,u),i.dispatchEvent(v),v.defaultPrevented||(tE(sE(nm(i)),{select:!0}),document.activeElement===b&&cn(i))}return()=>{i.removeEventListener(Cs,u),setTimeout(()=>{const v=new CustomEvent(Ms,md);i.addEventListener(Ms,d),i.dispatchEvent(v),v.defaultPrevented||cn(b??document.body,{select:!0}),i.removeEventListener(Ms,d),gd.remove(p)},0)}}},[i,u,d,p]);const g=h.useCallback(b=>{if(!n&&!r||p.paused)return;const y=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,v=document.activeElement;if(y&&v){const x=b.currentTarget,[w,M]=nE(x);w&&M?!b.shiftKey&&v===M?(b.preventDefault(),n&&cn(w,{select:!0})):b.shiftKey&&v===w&&(b.preventDefault(),n&&cn(M,{select:!0})):v===x&&b.preventDefault()}},[n,r,p.paused]);return m.jsx(T.Primitive.div,{tabIndex:-1,...s,ref:f,onKeyDown:g})});Ca.displayName=eE;function tE(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(cn(r,{select:t}),document.activeElement!==n)return}function nE(e){const t=nm(e),n=pd(t,e),r=pd(t.reverse(),e);return[n,r]}function nm(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pd(e,t){for(const n of e)if(!rE(n,{upTo:t}))return n}function rE(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function oE(e){return e instanceof HTMLInputElement&&"select"in e}function cn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&oE(e)&&t&&e.select()}}var gd=aE();function aE(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=vd(e,t),e.unshift(t)},remove(t){var n;e=vd(e,t),(n=e[0])==null||n.resume()}}}function vd(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function sE(e){return e.filter(t=>t.tagName!=="A")}var iE="Portal",pr=h.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=h.useState(!1);mt(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Wi.createPortal(m.jsx(T.Primitive.div,{...r,ref:t}),s):null});pr.displayName=iE;function cE(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var Ie=e=>{const{present:t,children:n}=e,r=lE(t),o=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),a=ce(r.ref,uE(o));return typeof n=="function"||r.isPresent?h.cloneElement(o,{ref:a}):null};Ie.displayName="Presence";function lE(e){const[t,n]=h.useState(),r=h.useRef(null),o=h.useRef(e),a=h.useRef("none"),s=e?"mounted":"unmounted",[i,c]=cE(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const u=ko(r.current);a.current=i==="mounted"?u:"none"},[i]),mt(()=>{const u=r.current,d=o.current;if(d!==e){const f=a.current,p=ko(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),mt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,l=p=>{const b=ko(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&b&&(c("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},f=p=>{p.target===t&&(a.current=ko(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:h.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function ko(e){return(e==null?void 0:e.animationName)||"none"}function uE(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Es=0;function Ec(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??bd()),document.body.insertAdjacentElement("beforeend",e[1]??bd()),Es++,()=>{Es===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Es--}},[])}function bd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Bt=function(){return Bt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Bt.apply(this,arguments)};function rm(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function dE(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var qo="right-scroll-bar-position",Xo="width-before-scroll-bar",fE="with-scroll-bars-hidden",hE="--removed-body-scroll-bar-size";function Ts(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function mE(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var pE=typeof window<"u"?h.useLayoutEffect:h.useEffect,yd=new WeakMap;function gE(e,t){var n=mE(null,function(r){return e.forEach(function(o){return Ts(o,r)})});return pE(function(){var r=yd.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||Ts(i,null)}),a.forEach(function(i){o.has(i)||Ts(i,s)})}yd.set(n,e)},[e]),n}function vE(e){return e}function bE(e,t){t===void 0&&(t=vE);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var c=function(){var d=s;s=[],d.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return o}function yE(e){e===void 0&&(e={});var t=bE(null);return t.options=Bt({async:!0,ssr:!1},e),t}var om=function(e){var t=e.sideCar,n=rm(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return h.createElement(r,Bt({},n))};om.isSideCarExport=!0;function xE(e,t){return e.useMedium(t),om}var am=yE(),Ps=function(){},Ma=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:Ps,onWheelCapture:Ps,onTouchMoveCapture:Ps}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,l=e.shards,f=e.sideCar,p=e.noRelative,g=e.noIsolation,b=e.inert,y=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,w=e.gapMode,M=rm(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,P=gE([n,t]),E=Bt(Bt({},M),o);return h.createElement(h.Fragment,null,d&&h.createElement(C,{sideCar:am,removeScrollBar:u,shards:l,noRelative:p,noIsolation:g,inert:b,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:w}),s?h.cloneElement(h.Children.only(i),Bt(Bt({},E),{ref:P})):h.createElement(x,Bt({},E,{className:c,ref:P}),i))});Ma.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ma.classNames={fullWidth:Xo,zeroRight:qo};var wE=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function SE(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=wE();return t&&e.setAttribute("nonce",t),e}function CE(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ME(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var EE=function(){var e=0,t=null;return{add:function(n){e==0&&(t=SE())&&(CE(t,n),ME(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},TE=function(){var e=EE();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},sm=function(){var e=TE(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},PE={left:0,top:0,right:0,gap:0},Ds=function(e){return parseInt(e||"",10)||0},DE=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ds(n),Ds(r),Ds(o)]},RE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return PE;var t=DE(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},AE=sm(),er="data-scroll-locked",OE=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
2
2
  .`.concat(fE,` {
3
3
  overflow: hidden `).concat(r,`;
4
4
  padding-right: `).concat(i,"px ").concat(r,`;
@@ -88,6 +88,6 @@ Defaulting to \`null\`.`}var xk=Vg,wk=zg;const Sk=100;function Ck({className:e,v
88
88
  *
89
89
  * This source code is licensed under the MIT license found in the
90
90
  * LICENSE file in the root directory of this source tree.
91
- */var of;function qk(){return of||(of=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function t(p,g){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var b=g();if(!l){var y=g();a(b,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}y=s({inst:{value:b,getSnapshot:g}});var v=y[0].inst,x=y[1];return c(function(){v.value=b,v.getSnapshot=g,n(v)&&x({inst:v})},[p,b,g]),i(function(){return n(v)&&x({inst:v}),p(function(){n(v)&&x({inst:v})})},[p]),u(b),b}function n(p){var g=p.getSnapshot;p=p.value;try{var b=g();return!a(p,b)}catch{return!0}}function r(p,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,a=typeof Object.is=="function"?Object.is:e,s=o.useState,i=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,d=!1,l=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Vs.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Vs}var af;function Xk(){return af||(af=1,process.env.NODE_ENV==="production"?$o.exports=Kk():$o.exports=qk()),$o.exports}var Zk=Xk();function Qk(){return Zk.useSyncExternalStore(Jk,()=>!0,()=>!1)}function Jk(){return()=>{}}var al="Avatar",[eN]=Ne(al),[tN,iv]=eN(al),cv=h.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=h.useState("idle");return m.jsx(tN,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:m.jsx(T.Primitive.span,{...r,ref:t})})});cv.displayName=al;var lv="AvatarImage",uv=h.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=iv(lv,n),i=nN(r,a),c=Ue(u=>{o(u),s.onImageLoadingStatusChange(u)});return mt(()=>{i!=="idle"&&c(i)},[i,c]),i==="loaded"?m.jsx(T.Primitive.img,{...a,ref:t,src:r}):null});uv.displayName=lv;var dv="AvatarFallback",fv=h.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=iv(dv,n),[s,i]=h.useState(r===void 0);return h.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(c)}},[r]),s&&a.imageLoadingStatus!=="loaded"?m.jsx(T.Primitive.span,{...o,ref:t}):null});fv.displayName=dv;function sf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function nN(e,{referrerPolicy:t,crossOrigin:n}){const r=Qk(),o=h.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,i]=h.useState(()=>sf(a,e));return mt(()=>{i(sf(a,e))},[a,e]),mt(()=>{const c=l=>()=>{i(l)};if(!a)return;const u=c("loaded"),d=c("error");return a.addEventListener("load",u),a.addEventListener("error",d),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",u),a.removeEventListener("error",d)}},[a,n,t]),s}var rN=cv,oN=uv,aN=fv;function sN({className:e,...t}){return m.jsx(rN,{"data-slot":"avatar",className:T.cn("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function iN({className:e,...t}){return m.jsx(oN,{"data-slot":"avatar-image",className:T.cn("aspect-square size-full",e),...t})}function cN({className:e,...t}){return m.jsx(aN,{"data-slot":"avatar-fallback",className:T.cn("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}var Ua="Checkbox",[lN]=Ne(Ua),[uN,sl]=lN(Ua);function dN(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:s,name:i,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:l}=e,[f,p]=Ge({prop:n,defaultProp:o??!1,onChange:c,caller:Ua}),[g,b]=h.useState(null),[y,v]=h.useState(null),x=h.useRef(!1),w=g?!!s||!!g.closest("form"):!0,M={checked:f,disabled:a,setChecked:p,control:g,setControl:b,name:i,form:s,value:d,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:ln(o)?!1:o,isFormControl:w,bubbleInput:y,setBubbleInput:v};return m.jsx(uN,{scope:t,...M,children:fN(l)?l(M):r})}var hv="CheckboxTrigger",mv=h.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:s,disabled:i,checked:c,required:u,setControl:d,setChecked:l,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:g}=sl(hv,e),b=ce(o,d),y=h.useRef(c);return h.useEffect(()=>{const v=a==null?void 0:a.form;if(v){const x=()=>l(y.current);return v.addEventListener("reset",x),()=>v.removeEventListener("reset",x)}},[a,l]),m.jsx(T.Primitive.button,{type:"button",role:"checkbox","aria-checked":ln(c)?"mixed":c,"aria-required":u,"data-state":xv(c),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:b,onKeyDown:F(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:F(n,v=>{l(x=>ln(x)?!0:!x),g&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});mv.displayName=hv;var pv=h.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:c,onCheckedChange:u,form:d,...l}=e;return m.jsx(dN,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:r,form:d,value:c,internal_do_not_use_render:({isFormControl:f})=>m.jsxs(m.Fragment,{children:[m.jsx(mv,{...l,ref:t,__scopeCheckbox:n}),f&&m.jsx(yv,{__scopeCheckbox:n})]})})});pv.displayName=Ua;var gv="CheckboxIndicator",vv=h.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=sl(gv,n);return m.jsx(Ie,{present:r||ln(a.checked)||a.checked===!0,children:m.jsx(T.Primitive.span,{"data-state":xv(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});vv.displayName=gv;var bv="CheckboxBubbleInput",yv=h.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:i,disabled:c,name:u,value:d,form:l,bubbleInput:f,setBubbleInput:p}=sl(bv,e),g=ce(n,p),b=Va(a),y=mo(r);h.useEffect(()=>{const x=f;if(!x)return;const w=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(w,"checked").set,P=!o.current;if(b!==a&&C){const E=new Event("click",{bubbles:P});x.indeterminate=ln(a),C.call(x,ln(a)?!1:a),x.dispatchEvent(E)}},[f,b,a,o]);const v=h.useRef(ln(a)?!1:a);return m.jsx(T.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??v.current,required:i,disabled:c,name:u,value:d,form:l,...t,tabIndex:-1,ref:g,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});yv.displayName=bv;function fN(e){return typeof e=="function"}function ln(e){return e==="indeterminate"}function xv(e){return ln(e)?"indeterminate":e?"checked":"unchecked"}function hN({className:e,...t}){return m.jsx(pv,{"data-slot":"checkbox",className:T.cn("peer data-[state=checked]:bg-secondary data-[state=checked]:text-icon-accent-marketing data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border border-subtle transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:border-subtle disabled:data-[state=checked]:opacity-50",e),...t,children:m.jsx(vv,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:m.jsx(Te.CheckIcon,{className:"size-3.5"})})})}var Ws="rovingFocusGroup.onEntryFocus",mN={bubbles:!1,cancelable:!0},yo="RovingFocusGroup",[ki,wv,pN]=bo(yo),[gN,yn]=Ne(yo,[pN]),[vN,bN]=gN(yo),Sv=h.forwardRef((e,t)=>m.jsx(ki.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(ki.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(yN,{...e,ref:t})})}));Sv.displayName=yo;var yN=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...l}=e,f=h.useRef(null),p=ce(t,f),g=bn(a),[b,y]=Ge({prop:s,defaultProp:i??null,onChange:c,caller:yo}),[v,x]=h.useState(!1),w=Ue(u),M=wv(n),C=h.useRef(!1),[P,E]=h.useState(0);return h.useEffect(()=>{const D=f.current;if(D)return D.addEventListener(Ws,w),()=>D.removeEventListener(Ws,w)},[w]),m.jsx(vN,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:b,onItemFocus:h.useCallback(D=>y(D),[y]),onItemShiftTab:h.useCallback(()=>x(!0),[]),onFocusableItemAdd:h.useCallback(()=>E(D=>D+1),[]),onFocusableItemRemove:h.useCallback(()=>E(D=>D-1),[]),children:m.jsx(T.Primitive.div,{tabIndex:v||P===0?-1:0,"data-orientation":r,...l,ref:p,style:{outline:"none",...e.style},onMouseDown:F(e.onMouseDown,()=>{C.current=!0}),onFocus:F(e.onFocus,D=>{const R=!C.current;if(D.target===D.currentTarget&&R&&!v){const A=new CustomEvent(Ws,mN);if(D.currentTarget.dispatchEvent(A),!A.defaultPrevented){const N=M().filter(B=>B.focusable),z=N.find(B=>B.active),O=N.find(B=>B.id===b),K=[z,O,...N].filter(Boolean).map(B=>B.ref.current);Ev(K,d)}}C.current=!1}),onBlur:F(e.onBlur,()=>x(!1))})})}),Cv="RovingFocusGroupItem",Mv=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,c=_e(),u=a||c,d=bN(Cv,n),l=d.currentTabStopId===u,f=wv(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:b}=d;return h.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),m.jsx(ki.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:m.jsx(T.Primitive.span,{tabIndex:l?0:-1,"data-orientation":d.orientation,...i,ref:t,onMouseDown:F(e.onMouseDown,y=>{r?d.onItemFocus(u):y.preventDefault()}),onFocus:F(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:F(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){d.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const v=SN(y,d.orientation,d.dir);if(v!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let w=f().filter(M=>M.focusable).map(M=>M.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const M=w.indexOf(y.currentTarget);w=d.loop?CN(w,M+1):w.slice(M+1)}setTimeout(()=>Ev(w))}}),children:typeof s=="function"?s({isCurrentTabStop:l,hasTabStop:b!=null}):s})})});Mv.displayName=Cv;var xN={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wN(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function SN(e,t,n){const r=wN(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return xN[r]}function Ev(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function CN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ga=Sv,Ka=Mv,Ni=["Enter"," "],MN=["ArrowDown","PageUp","Home"],Tv=["ArrowUp","PageDown","End"],EN=[...MN,...Tv],TN={ltr:[...Ni,"ArrowRight"],rtl:[...Ni,"ArrowLeft"]},PN={ltr:["ArrowLeft"],rtl:["ArrowRight"]},xo="Menu",[Xr,DN,RN]=bo(xo),[Fn,wo]=Ne(xo,[RN,gn,yn]),So=gn(),Pv=yn(),[Dv,xn]=Fn(xo),[AN,Co]=Fn(xo),Rv=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=So(t),[c,u]=h.useState(null),d=h.useRef(!1),l=Ue(a),f=bn(o);return h.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),m.jsx(po,{...i,children:m.jsx(Dv,{scope:t,open:n,onOpenChange:l,content:c,onContentChange:u,children:m.jsx(AN,{scope:t,onClose:h.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:d,dir:f,modal:s,children:r})})})};Rv.displayName=xo;var ON="MenuAnchor",il=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=So(n);return m.jsx(go,{...o,...r,ref:t})});il.displayName=ON;var cl="MenuPortal",[kN,Av]=Fn(cl,{forceMount:void 0}),Ov=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=xn(cl,t);return m.jsx(kN,{scope:t,forceMount:n,children:m.jsx(Ie,{present:n||a.open,children:m.jsx(pr,{asChild:!0,container:o,children:r})})})};Ov.displayName=cl;var xt="MenuContent",[NN,ll]=Fn(xt),kv=h.forwardRef((e,t)=>{const n=Av(xt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=xn(xt,e.__scopeMenu),s=Co(xt,e.__scopeMenu);return m.jsx(Xr.Provider,{scope:e.__scopeMenu,children:m.jsx(Ie,{present:r||a.open,children:m.jsx(Xr.Slot,{scope:e.__scopeMenu,children:s.modal?m.jsx(_N,{...o,ref:t}):m.jsx(IN,{...o,ref:t})})})})}),_N=h.forwardRef((e,t)=>{const n=xn(xt,e.__scopeMenu),r=h.useRef(null),o=ce(t,r);return h.useEffect(()=>{const a=r.current;if(a)return Tc(a)},[]),m.jsx(ul,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:F(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),IN=h.forwardRef((e,t)=>{const n=xn(xt,e.__scopeMenu);return m.jsx(ul,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),jN=wt.createSlot("MenuContent.ScrollLock"),ul=h.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:f,onDismiss:p,disableOutsideScroll:g,...b}=e,y=xn(xt,n),v=Co(xt,n),x=So(n),w=Pv(n),M=DN(n),[C,P]=h.useState(null),E=h.useRef(null),D=ce(t,E,y.onContentChange),R=h.useRef(0),A=h.useRef(""),N=h.useRef(0),z=h.useRef(null),O=h.useRef("right"),U=h.useRef(0),K=g?Ea:h.Fragment,B=g?{as:jN,allowPinchZoom:!0}:void 0,$=_=>{var J,X;const Z=A.current+_,ae=M().filter(re=>!re.disabled),k=document.activeElement,L=(J=ae.find(re=>re.ref.current===k))==null?void 0:J.textValue,Y=ae.map(re=>re.textValue),V=KN(Y,Z,L),Q=(X=ae.find(re=>re.textValue===V))==null?void 0:X.ref.current;(function re(he){A.current=he,window.clearTimeout(R.current),he!==""&&(R.current=window.setTimeout(()=>re(""),1e3))})(Z),Q&&setTimeout(()=>Q.focus())};h.useEffect(()=>()=>window.clearTimeout(R.current),[]),Ec();const j=h.useCallback(_=>{var ae,k;return O.current===((ae=z.current)==null?void 0:ae.side)&&XN(_,(k=z.current)==null?void 0:k.area)},[]);return m.jsx(NN,{scope:n,searchRef:A,onItemEnter:h.useCallback(_=>{j(_)&&_.preventDefault()},[j]),onItemLeave:h.useCallback(_=>{var Z;j(_)||((Z=E.current)==null||Z.focus(),P(null))},[j]),onTriggerLeave:h.useCallback(_=>{j(_)&&_.preventDefault()},[j]),pointerGraceTimerRef:N,onPointerGraceIntentChange:h.useCallback(_=>{z.current=_},[]),children:m.jsx(K,{...B,children:m.jsx(Ca,{asChild:!0,trapped:o,onMountAutoFocus:F(a,_=>{var Z;_.preventDefault(),(Z=E.current)==null||Z.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:m.jsx(mr,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:f,onDismiss:p,children:m.jsx(Ga,{asChild:!0,...w,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:P,onEntryFocus:F(c,_=>{v.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx($a,{role:"menu","aria-orientation":"vertical","data-state":qv(y.open),"data-radix-menu-content":"",dir:v.dir,...x,...b,ref:D,style:{outline:"none",...b.style},onKeyDown:F(b.onKeyDown,_=>{const ae=_.target.closest("[data-radix-menu-content]")===_.currentTarget,k=_.ctrlKey||_.altKey||_.metaKey,L=_.key.length===1;ae&&(_.key==="Tab"&&_.preventDefault(),!k&&L&&$(_.key));const Y=E.current;if(_.target!==Y||!EN.includes(_.key))return;_.preventDefault();const Q=M().filter(J=>!J.disabled).map(J=>J.ref.current);Tv.includes(_.key)&&Q.reverse(),UN(Q)}),onBlur:F(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(R.current),A.current="")}),onPointerMove:F(e.onPointerMove,Zr(_=>{const Z=_.target,ae=U.current!==_.clientX;if(_.currentTarget.contains(Z)&&ae){const k=_.clientX>U.current?"right":"left";O.current=k,U.current=_.clientX}}))})})})})})})});kv.displayName=xt;var LN="MenuGroup",dl=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(T.Primitive.div,{role:"group",...r,ref:t})});dl.displayName=LN;var $N="MenuLabel",Nv=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(T.Primitive.div,{...r,ref:t})});Nv.displayName=$N;var fa="MenuItem",cf="menu.itemSelect",qa=h.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=h.useRef(null),s=Co(fa,e.__scopeMenu),i=ll(fa,e.__scopeMenu),c=ce(t,a),u=h.useRef(!1),d=()=>{const l=a.current;if(!n&&l){const f=new CustomEvent(cf,{bubbles:!0,cancelable:!0});l.addEventListener(cf,p=>r==null?void 0:r(p),{once:!0}),T.dispatchDiscreteCustomEvent(l,f),f.defaultPrevented?u.current=!1:s.onClose()}};return m.jsx(_v,{...o,ref:c,disabled:n,onClick:F(e.onClick,d),onPointerDown:l=>{var f;(f=e.onPointerDown)==null||f.call(e,l),u.current=!0},onPointerUp:F(e.onPointerUp,l=>{var f;u.current||(f=l.currentTarget)==null||f.click()}),onKeyDown:F(e.onKeyDown,l=>{const f=i.searchRef.current!=="";n||f&&l.key===" "||Ni.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});qa.displayName=fa;var _v=h.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=ll(fa,n),i=Pv(n),c=h.useRef(null),u=ce(t,c),[d,l]=h.useState(!1),[f,p]=h.useState("");return h.useEffect(()=>{const g=c.current;g&&p((g.textContent??"").trim())},[a.children]),m.jsx(Xr.ItemSlot,{scope:n,disabled:r,textValue:o??f,children:m.jsx(Ka,{asChild:!0,...i,focusable:!r,children:m.jsx(T.Primitive.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:F(e.onPointerMove,Zr(g=>{r?s.onItemLeave(g):(s.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:F(e.onPointerLeave,Zr(g=>s.onItemLeave(g))),onFocus:F(e.onFocus,()=>l(!0)),onBlur:F(e.onBlur,()=>l(!1))})})})}),FN="MenuCheckboxItem",Iv=h.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.jsx(Bv,{scope:e.__scopeMenu,checked:n,children:m.jsx(qa,{role:"menuitemcheckbox","aria-checked":ha(n)?"mixed":n,...o,ref:t,"data-state":ml(n),onSelect:F(o.onSelect,()=>r==null?void 0:r(ha(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Iv.displayName=FN;var jv="MenuRadioGroup",[BN,VN]=Fn(jv,{value:void 0,onValueChange:()=>{}}),Lv=h.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Ue(r);return m.jsx(BN,{scope:e.__scopeMenu,value:n,onValueChange:a,children:m.jsx(dl,{...o,ref:t})})});Lv.displayName=jv;var $v="MenuRadioItem",Fv=h.forwardRef((e,t)=>{const{value:n,...r}=e,o=VN($v,e.__scopeMenu),a=n===o.value;return m.jsx(Bv,{scope:e.__scopeMenu,checked:a,children:m.jsx(qa,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":ml(a),onSelect:F(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Fv.displayName=$v;var fl="MenuItemIndicator",[Bv,WN]=Fn(fl,{checked:!1}),Vv=h.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=WN(fl,n);return m.jsx(Ie,{present:r||ha(a.checked)||a.checked===!0,children:m.jsx(T.Primitive.span,{...o,ref:t,"data-state":ml(a.checked)})})});Vv.displayName=fl;var zN="MenuSeparator",Wv=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(T.Primitive.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Wv.displayName=zN;var HN="MenuArrow",zv=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=So(n);return m.jsx(Fa,{...o,...r,ref:t})});zv.displayName=HN;var hl="MenuSub",[YN,Hv]=Fn(hl),Yv=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=xn(hl,t),s=So(t),[i,c]=h.useState(null),[u,d]=h.useState(null),l=Ue(o);return h.useEffect(()=>(a.open===!1&&l(!1),()=>l(!1)),[a.open,l]),m.jsx(po,{...s,children:m.jsx(Dv,{scope:t,open:r,onOpenChange:l,content:u,onContentChange:d,children:m.jsx(YN,{scope:t,contentId:_e(),triggerId:_e(),trigger:i,onTriggerChange:c,children:n})})})};Yv.displayName=hl;var Or="MenuSubTrigger",Uv=h.forwardRef((e,t)=>{const n=xn(Or,e.__scopeMenu),r=Co(Or,e.__scopeMenu),o=Hv(Or,e.__scopeMenu),a=ll(Or,e.__scopeMenu),s=h.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},d=h.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return h.useEffect(()=>d,[d]),h.useEffect(()=>{const l=i.current;return()=>{window.clearTimeout(l),c(null)}},[i,c]),m.jsx(il,{asChild:!0,...u,children:m.jsx(_v,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":qv(n.open),...e,ref:dn(t,o.onTriggerChange),onClick:l=>{var f;(f=e.onClick)==null||f.call(e,l),!(e.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:F(e.onPointerMove,Zr(l=>{a.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:F(e.onPointerLeave,Zr(l=>{var p,g;d();const f=(p=n.content)==null?void 0:p.getBoundingClientRect();if(f){const b=(g=n.content)==null?void 0:g.dataset.side,y=b==="right",v=y?-5:5,x=f[y?"left":"right"],w=f[y?"right":"left"];a.onPointerGraceIntentChange({area:[{x:l.clientX+v,y:l.clientY},{x,y:f.top},{x:w,y:f.top},{x:w,y:f.bottom},{x,y:f.bottom}],side:b}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(l),l.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:F(e.onKeyDown,l=>{var p;const f=a.searchRef.current!=="";e.disabled||f&&l.key===" "||TN[r.dir].includes(l.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),l.preventDefault())})})})});Uv.displayName=Or;var Gv="MenuSubContent",Kv=h.forwardRef((e,t)=>{const n=Av(xt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=xn(xt,e.__scopeMenu),s=Co(xt,e.__scopeMenu),i=Hv(Gv,e.__scopeMenu),c=h.useRef(null),u=ce(t,c);return m.jsx(Xr.Provider,{scope:e.__scopeMenu,children:m.jsx(Ie,{present:r||a.open,children:m.jsx(Xr.Slot,{scope:e.__scopeMenu,children:m.jsx(ul,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var l;s.isUsingKeyboardRef.current&&((l=c.current)==null||l.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:F(e.onFocusOutside,d=>{d.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:F(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:F(e.onKeyDown,d=>{var p;const l=d.currentTarget.contains(d.target),f=PN[s.dir].includes(d.key);l&&f&&(a.onOpenChange(!1),(p=i.trigger)==null||p.focus(),d.preventDefault())})})})})})});Kv.displayName=Gv;function qv(e){return e?"open":"closed"}function ha(e){return e==="indeterminate"}function ml(e){return ha(e)?"indeterminate":e?"checked":"unchecked"}function UN(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function GN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function KN(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=GN(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const c=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function qN(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],c=t[s],u=i.x,d=i.y,l=c.x,f=c.y;d>r!=f>r&&n<(l-u)*(r-d)/(f-d)+u&&(o=!o)}return o}function XN(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return qN(n,t)}function Zr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var pl=Rv,gl=il,vl=Ov,bl=kv,yl=dl,xl=Nv,wl=qa,Sl=Iv,Cl=Lv,Ml=Fv,El=Vv,Tl=Wv,Pl=zv,Dl=Yv,Rl=Uv,Al=Kv,Ol="ContextMenu",[ZN]=Ne(Ol,[wo]),tt=wo(),[QN,Xv]=ZN(Ol),Zv=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:a=!0}=e,[s,i]=h.useState(!1),c=tt(t),u=Ue(r),d=h.useCallback(l=>{i(l),u(l)},[u]);return m.jsx(QN,{scope:t,open:s,onOpenChange:d,modal:a,children:m.jsx(pl,{...c,dir:o,open:s,onOpenChange:d,modal:a,children:n})})};Zv.displayName=Ol;var Qv="ContextMenuTrigger",Jv=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,a=Xv(Qv,n),s=tt(n),i=h.useRef({x:0,y:0}),c=h.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...i.current})}),u=h.useRef(0),d=h.useCallback(()=>window.clearTimeout(u.current),[]),l=f=>{i.current={x:f.clientX,y:f.clientY},a.onOpenChange(!0)};return h.useEffect(()=>d,[d]),h.useEffect(()=>void(r&&d()),[r,d]),m.jsxs(m.Fragment,{children:[m.jsx(gl,{...s,virtualRef:c}),m.jsx(T.Primitive.span,{"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:F(e.onContextMenu,f=>{d(),l(f),f.preventDefault()}),onPointerDown:r?e.onPointerDown:F(e.onPointerDown,Fo(f=>{d(),u.current=window.setTimeout(()=>l(f),700)})),onPointerMove:r?e.onPointerMove:F(e.onPointerMove,Fo(d)),onPointerCancel:r?e.onPointerCancel:F(e.onPointerCancel,Fo(d)),onPointerUp:r?e.onPointerUp:F(e.onPointerUp,Fo(d))})]})});Jv.displayName=Qv;var JN="ContextMenuPortal",eb=e=>{const{__scopeContextMenu:t,...n}=e,r=tt(t);return m.jsx(vl,{...r,...n})};eb.displayName=JN;var tb="ContextMenuContent",nb=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Xv(tb,n),a=tt(n),s=h.useRef(!1);return m.jsx(bl,{...a,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:i=>{var c;(c=e.onCloseAutoFocus)==null||c.call(e,i),!i.defaultPrevented&&s.current&&i.preventDefault(),s.current=!1},onInteractOutside:i=>{var c;(c=e.onInteractOutside)==null||c.call(e,i),!i.defaultPrevented&&!o.modal&&(s.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});nb.displayName=tb;var e_="ContextMenuGroup",rb=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(yl,{...o,...r,ref:t})});rb.displayName=e_;var t_="ContextMenuLabel",ob=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(xl,{...o,...r,ref:t})});ob.displayName=t_;var n_="ContextMenuItem",ab=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(wl,{...o,...r,ref:t})});ab.displayName=n_;var r_="ContextMenuCheckboxItem",sb=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Sl,{...o,...r,ref:t})});sb.displayName=r_;var o_="ContextMenuRadioGroup",ib=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Cl,{...o,...r,ref:t})});ib.displayName=o_;var a_="ContextMenuRadioItem",cb=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Ml,{...o,...r,ref:t})});cb.displayName=a_;var s_="ContextMenuItemIndicator",lb=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(El,{...o,...r,ref:t})});lb.displayName=s_;var i_="ContextMenuSeparator",ub=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Tl,{...o,...r,ref:t})});ub.displayName=i_;var c_="ContextMenuArrow",l_=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Pl,{...o,...r,ref:t})});l_.displayName=c_;var db="ContextMenuSub",fb=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,defaultOpen:a}=e,s=tt(t),[i,c]=Ge({prop:o,defaultProp:a??!1,onChange:r,caller:db});return m.jsx(Dl,{...s,open:i,onOpenChange:c,children:n})};fb.displayName=db;var u_="ContextMenuSubTrigger",hb=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Rl,{...o,...r,ref:t})});hb.displayName=u_;var d_="ContextMenuSubContent",mb=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Al,{...o,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mb.displayName=d_;function Fo(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var f_=Zv,h_=Jv,pb=eb,m_=nb,p_=rb,g_=ob,v_=ab,b_=sb,y_=ib,x_=cb,gb=lb,w_=ub,S_=fb,C_=hb,M_=mb;function E_({...e}){return m.jsx(f_,{"data-slot":"context-menu",...e})}function T_({...e}){return m.jsx(h_,{"data-slot":"context-menu-trigger",...e})}function P_({...e}){return m.jsx(p_,{"data-slot":"context-menu-group",...e})}function D_({...e}){return m.jsx(pb,{"data-slot":"context-menu-portal",...e})}function R_({...e}){return m.jsx(S_,{"data-slot":"context-menu-sub",...e})}function A_({...e}){return m.jsx(y_,{"data-slot":"context-menu-radio-group",...e})}function O_({className:e,inset:t,children:n,...r}){return m.jsxs(C_,{"data-slot":"context-menu-sub-trigger","data-inset":t,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,m.jsx(Te.ChevronRightIcon,{className:"ml-auto"})]})}function k_({className:e,...t}){return m.jsx(M_,{"data-slot":"context-menu-sub-content",className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}function N_({className:e,...t}){return m.jsx(pb,{children:m.jsx(m_,{"data-slot":"context-menu-content",className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...t})})}function __({className:e,inset:t,variant:n="default",...r}){return m.jsx(v_,{"data-slot":"context-menu-item","data-inset":t,"data-variant":n,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function I_({className:e,children:t,checked:n,...r}){return m.jsxs(b_,{"data-slot":"context-menu-checkbox-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(gb,{children:m.jsx(Te.CheckIcon,{className:"size-4"})})}),t]})}function j_({className:e,children:t,...n}){return m.jsxs(x_,{"data-slot":"context-menu-radio-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(gb,{children:m.jsx(Te.CircleIcon,{className:"size-2 fill-current"})})}),t]})}function L_({className:e,inset:t,...n}){return m.jsx(g_,{"data-slot":"context-menu-label","data-inset":t,className:T.cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function $_({className:e,...t}){return m.jsx(w_,{"data-slot":"context-menu-separator",className:T.cn("bg-border -mx-1 my-1 h-px",e),...t})}function F_({className:e,...t}){return m.jsx("span",{"data-slot":"context-menu-shortcut",className:T.cn("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}var Xa="DropdownMenu",[B_]=Ne(Xa,[wo]),nt=wo(),[V_,vb]=B_(Xa),bb=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,c=nt(t),u=h.useRef(null),[d,l]=Ge({prop:o,defaultProp:a??!1,onChange:s,caller:Xa});return m.jsx(V_,{scope:t,triggerId:_e(),triggerRef:u,contentId:_e(),open:d,onOpenChange:l,onOpenToggle:h.useCallback(()=>l(f=>!f),[l]),modal:i,children:m.jsx(pl,{...c,open:d,onOpenChange:l,dir:r,modal:i,children:n})})};bb.displayName=Xa;var yb="DropdownMenuTrigger",xb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=vb(yb,n),s=nt(n);return m.jsx(gl,{asChild:!0,...s,children:m.jsx(T.Primitive.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:dn(t,a.triggerRef),onPointerDown:F(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:F(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});xb.displayName=yb;var W_="DropdownMenuPortal",wb=e=>{const{__scopeDropdownMenu:t,...n}=e,r=nt(t);return m.jsx(vl,{...r,...n})};wb.displayName=W_;var Sb="DropdownMenuContent",Cb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vb(Sb,n),a=nt(n),s=h.useRef(!1);return m.jsx(bl,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:F(e.onCloseAutoFocus,i=>{var c;s.current||(c=o.triggerRef.current)==null||c.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:F(e.onInteractOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!o.modal||d)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cb.displayName=Sb;var z_="DropdownMenuGroup",Mb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(yl,{...o,...r,ref:t})});Mb.displayName=z_;var H_="DropdownMenuLabel",Eb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(xl,{...o,...r,ref:t})});Eb.displayName=H_;var Y_="DropdownMenuItem",Tb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(wl,{...o,...r,ref:t})});Tb.displayName=Y_;var U_="DropdownMenuCheckboxItem",Pb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Sl,{...o,...r,ref:t})});Pb.displayName=U_;var G_="DropdownMenuRadioGroup",Db=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Cl,{...o,...r,ref:t})});Db.displayName=G_;var K_="DropdownMenuRadioItem",Rb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Ml,{...o,...r,ref:t})});Rb.displayName=K_;var q_="DropdownMenuItemIndicator",Ab=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(El,{...o,...r,ref:t})});Ab.displayName=q_;var X_="DropdownMenuSeparator",Ob=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Tl,{...o,...r,ref:t})});Ob.displayName=X_;var Z_="DropdownMenuArrow",Q_=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Pl,{...o,...r,ref:t})});Q_.displayName=Z_;var J_=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=nt(t),[i,c]=Ge({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return m.jsx(Dl,{...s,open:i,onOpenChange:c,children:n})},eI="DropdownMenuSubTrigger",kb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Rl,{...o,...r,ref:t})});kb.displayName=eI;var tI="DropdownMenuSubContent",Nb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Al,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Nb.displayName=tI;var nI=bb,rI=xb,_b=wb,oI=Cb,aI=Mb,sI=Eb,iI=Tb,cI=Pb,lI=Db,uI=Rb,Ib=Ab,dI=Ob,fI=J_,hI=kb,mI=Nb;function pI({...e}){return m.jsx(nI,{"data-slot":"dropdown-menu",...e})}function gI({...e}){return m.jsx(_b,{"data-slot":"dropdown-menu-portal",...e})}function vI({...e}){return m.jsx(rI,{"data-slot":"dropdown-menu-trigger",...e})}function bI({className:e,sideOffset:t=4,...n}){return m.jsx(_b,{children:m.jsx(oI,{"data-slot":"dropdown-menu-content",sideOffset:t,className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function yI({...e}){return m.jsx(aI,{"data-slot":"dropdown-menu-group",...e})}function xI({className:e,inset:t,variant:n="default",...r}){return m.jsx(iI,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function wI({className:e,children:t,checked:n,...r}){return m.jsxs(cI,{"data-slot":"dropdown-menu-checkbox-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(Ib,{children:m.jsx(Te.CheckIcon,{className:"size-4"})})}),t]})}function SI({...e}){return m.jsx(lI,{"data-slot":"dropdown-menu-radio-group",...e})}function CI({className:e,children:t,...n}){return m.jsxs(uI,{"data-slot":"dropdown-menu-radio-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(Ib,{children:m.jsx(Te.CircleIcon,{className:"size-2 fill-current"})})}),t]})}function MI({className:e,inset:t,...n}){return m.jsx(sI,{"data-slot":"dropdown-menu-label","data-inset":t,className:T.cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function EI({className:e,...t}){return m.jsx(dI,{"data-slot":"dropdown-menu-separator",className:T.cn("bg-border -mx-1 my-1 h-px",e),...t})}function TI({className:e,...t}){return m.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:T.cn("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function PI({...e}){return m.jsx(fI,{"data-slot":"dropdown-menu-sub",...e})}function DI({className:e,inset:t,children:n,...r}){return m.jsxs(hI,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...r,children:[n,m.jsx(Te.ChevronRightIcon,{className:"ml-auto size-4"})]})}function RI({className:e,...t}){return m.jsx(mI,{"data-slot":"dropdown-menu-sub-content",className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}var zs,Za="HoverCard",[jb]=Ne(Za,[gn]),Qa=gn(),[AI,Ja]=jb(Za),Lb=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:a,openDelay:s=700,closeDelay:i=300}=e,c=Qa(t),u=h.useRef(0),d=h.useRef(0),l=h.useRef(!1),f=h.useRef(!1),[p,g]=Ge({prop:r,defaultProp:o??!1,onChange:a,caller:Za}),b=h.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>g(!0),s)},[s,g]),y=h.useCallback(()=>{clearTimeout(u.current),!l.current&&!f.current&&(d.current=window.setTimeout(()=>g(!1),i))},[i,g]),v=h.useCallback(()=>g(!1),[g]);return h.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),m.jsx(AI,{scope:t,open:p,onOpenChange:g,onOpen:b,onClose:y,onDismiss:v,hasSelectionRef:l,isPointerDownOnContentRef:f,children:m.jsx(po,{...c,children:n})})};Lb.displayName=Za;var $b="HoverCardTrigger",Fb=h.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Ja($b,n),a=Qa(n);return m.jsx(go,{asChild:!0,...a,children:m.jsx(T.Primitive.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:F(e.onPointerEnter,pa(o.onOpen)),onPointerLeave:F(e.onPointerLeave,pa(o.onClose)),onFocus:F(e.onFocus,o.onOpen),onBlur:F(e.onBlur,o.onClose),onTouchStart:F(e.onTouchStart,s=>s.preventDefault())})})});Fb.displayName=$b;var kl="HoverCardPortal",[OI,kI]=jb(kl,{forceMount:void 0}),Bb=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,a=Ja(kl,t);return m.jsx(OI,{scope:t,forceMount:n,children:m.jsx(Ie,{present:n||a.open,children:m.jsx(pr,{asChild:!0,container:o,children:r})})})};Bb.displayName=kl;var ma="HoverCardContent",Vb=h.forwardRef((e,t)=>{const n=kI(ma,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=Ja(ma,e.__scopeHoverCard);return m.jsx(Ie,{present:r||a.open,children:m.jsx(NI,{"data-state":a.open?"open":"closed",...o,onPointerEnter:F(e.onPointerEnter,pa(a.onOpen)),onPointerLeave:F(e.onPointerLeave,pa(a.onClose)),ref:t})})});Vb.displayName=ma;var NI=h.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,...i}=e,c=Ja(ma,n),u=Qa(n),d=h.useRef(null),l=ce(t,d),[f,p]=h.useState(!1);return h.useEffect(()=>{if(f){const g=document.body;return zs=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=zs,g.style.webkitUserSelect=zs}}},[f]),h.useEffect(()=>{if(d.current){const g=()=>{p(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),h.useEffect(()=>{d.current&&jI(d.current).forEach(b=>b.setAttribute("tabindex","-1"))}),m.jsx(mr,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:F(a,g=>{g.preventDefault()}),onDismiss:c.onDismiss,children:m.jsx($a,{...u,...i,onPointerDown:F(i.onPointerDown,g=>{g.currentTarget.contains(g.target)&&p(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:l,style:{...i.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),_I="HoverCardArrow",II=h.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Qa(n);return m.jsx(Fa,{...o,...r,ref:t})});II.displayName=_I;function pa(e){return t=>t.pointerType==="touch"?void 0:e()}function jI(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var LI=Lb,$I=Fb,FI=Bb,BI=Vb;function VI({...e}){return m.jsx(LI,{"data-slot":"hover-card",...e})}function WI({...e}){return m.jsx($I,{"data-slot":"hover-card-trigger",...e})}function zI({className:e,align:t="center",sideOffset:n=4,...r}){return m.jsx(FI,{"data-slot":"hover-card-portal",children:m.jsx(BI,{"data-slot":"hover-card-content",align:t,sideOffset:n,className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}var Nl="Radio",[HI,Wb]=Ne(Nl),[YI,UI]=HI(Nl),zb=h.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:c,form:u,...d}=e,[l,f]=h.useState(null),p=ce(t,y=>f(y)),g=h.useRef(!1),b=l?u||!!l.closest("form"):!0;return m.jsxs(YI,{scope:n,checked:o,disabled:s,children:[m.jsx(T.Primitive.button,{type:"button",role:"radio","aria-checked":o,"data-state":Gb(o),"data-disabled":s?"":void 0,disabled:s,value:i,...d,ref:p,onClick:F(e.onClick,y=>{o||c==null||c(),b&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})}),b&&m.jsx(Ub,{control:l,bubbles:!g.current,name:r,value:i,checked:o,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});zb.displayName=Nl;var Hb="RadioIndicator",Yb=h.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=UI(Hb,n);return m.jsx(Ie,{present:r||a.checked,children:m.jsx(T.Primitive.span,{"data-state":Gb(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Yb.displayName=Hb;var GI="RadioBubbleInput",Ub=h.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=h.useRef(null),i=ce(s,a),c=Va(n),u=mo(t);return h.useEffect(()=>{const d=s.current;if(!d)return;const l=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(l,"checked").set;if(c!==n&&p){const g=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(g)}},[c,n,r]),m.jsx(T.Primitive.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ub.displayName=GI;function Gb(e){return e?"checked":"unchecked"}var KI=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],es="RadioGroup",[qI]=Ne(es,[yn,Wb]),Kb=yn(),qb=Wb(),[XI,ZI]=qI(es),Xb=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:c,dir:u,loop:d=!0,onValueChange:l,...f}=e,p=Kb(n),g=bn(u),[b,y]=Ge({prop:a,defaultProp:o??null,onChange:l,caller:es});return m.jsx(XI,{scope:n,name:r,required:s,disabled:i,value:b,onValueChange:y,children:m.jsx(Ga,{asChild:!0,...p,orientation:c,dir:g,loop:d,children:m.jsx(T.Primitive.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":i?"":void 0,dir:g,...f,ref:t})})})});Xb.displayName=es;var Zb="RadioGroupItem",Qb=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=ZI(Zb,n),s=a.disabled||r,i=Kb(n),c=qb(n),u=h.useRef(null),d=ce(t,u),l=a.value===o.value,f=h.useRef(!1);return h.useEffect(()=>{const p=b=>{KI.includes(b.key)&&(f.current=!0)},g=()=>f.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",g)}},[]),m.jsx(Ka,{asChild:!0,...i,focusable:!s,active:l,children:m.jsx(zb,{disabled:s,required:a.required,checked:l,...c,...o,name:a.name,ref:d,onCheck:()=>a.onValueChange(o.value),onKeyDown:F(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:F(o.onFocus,()=>{var p;f.current&&((p=u.current)==null||p.click())})})})});Qb.displayName=Zb;var QI="RadioGroupIndicator",Jb=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=qb(n);return m.jsx(Yb,{...o,...r,ref:t})});Jb.displayName=QI;var JI=Xb,ej=Qb,tj=Jb;function nj({className:e,...t}){return m.jsx(JI,{"data-slot":"radio-group",className:T.cn("grid gap-3",e),...t})}function rj({className:e,...t}){return m.jsx(ej,{"data-slot":"radio-group-item",className:T.cn("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:m.jsx(tj,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:m.jsx(Te.CircleIcon,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function oj(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var _l="ScrollArea",[ey]=Ne(_l),[aj,St]=ey(_l),ty=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...s}=e,[i,c]=h.useState(null),[u,d]=h.useState(null),[l,f]=h.useState(null),[p,g]=h.useState(null),[b,y]=h.useState(null),[v,x]=h.useState(0),[w,M]=h.useState(0),[C,P]=h.useState(!1),[E,D]=h.useState(!1),R=ce(t,N=>c(N)),A=bn(o);return m.jsx(aj,{scope:n,type:r,dir:A,scrollHideDelay:a,scrollArea:i,viewport:u,onViewportChange:d,content:l,onContentChange:f,scrollbarX:p,onScrollbarXChange:g,scrollbarXEnabled:C,onScrollbarXEnabledChange:P,scrollbarY:b,onScrollbarYChange:y,scrollbarYEnabled:E,onScrollbarYEnabledChange:D,onCornerWidthChange:x,onCornerHeightChange:M,children:m.jsx(T.Primitive.div,{dir:A,...s,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});ty.displayName=_l;var ny="ScrollAreaViewport",ry=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,s=St(ny,n),i=h.useRef(null),c=ce(t,i,s.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),m.jsx(T.Primitive.div,{"data-radix-scroll-area-viewport":"",...a,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});ry.displayName=ny;var qt="ScrollAreaScrollbar",oy=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=St(qt,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=o,i=e.orientation==="horizontal";return h.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),o.type==="hover"?m.jsx(sj,{...r,ref:t,forceMount:n}):o.type==="scroll"?m.jsx(ij,{...r,ref:t,forceMount:n}):o.type==="auto"?m.jsx(ay,{...r,ref:t,forceMount:n}):o.type==="always"?m.jsx(Il,{...r,ref:t}):null});oy.displayName=qt;var sj=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=St(qt,e.__scopeScrollArea),[a,s]=h.useState(!1);return h.useEffect(()=>{const i=o.scrollArea;let c=0;if(i){const u=()=>{window.clearTimeout(c),s(!0)},d=()=>{c=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),m.jsx(Ie,{present:n||a,children:m.jsx(ay,{"data-state":a?"visible":"hidden",...r,ref:t})})}),ij=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=St(qt,e.__scopeScrollArea),a=e.orientation==="horizontal",s=ns(()=>c("SCROLL_END"),100),[i,c]=oj("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return h.useEffect(()=>{if(i==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,o.scrollHideDelay,c]),h.useEffect(()=>{const u=o.viewport,d=a?"scrollLeft":"scrollTop";if(u){let l=u[d];const f=()=>{const p=u[d];l!==p&&(c("SCROLL"),s()),l=p};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[o.viewport,a,c,s]),m.jsx(Ie,{present:n||i!=="hidden",children:m.jsx(Il,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:F(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:F(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),ay=h.forwardRef((e,t)=>{const n=St(qt,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,s]=h.useState(!1),i=e.orientation==="horizontal",c=ns(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;s(i?u:d)}},10);return cr(n.viewport,c),cr(n.content,c),m.jsx(Ie,{present:r||a,children:m.jsx(Il,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Il=h.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=St(qt,e.__scopeScrollArea),a=h.useRef(null),s=h.useRef(0),[i,c]=h.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=uy(i.viewport,i.content),d={...r,sizes:i,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>a.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function l(f,p){return hj(f,s.current,i,p)}return n==="horizontal"?m.jsx(cj,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const f=o.viewport.scrollLeft,p=lf(f,i,o.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=l(f,o.dir))}}):n==="vertical"?m.jsx(lj,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const f=o.viewport.scrollTop,p=lf(f,i);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=l(f))}}):null}),cj=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=St(qt,e.__scopeScrollArea),[s,i]=h.useState(),c=h.useRef(null),u=ce(t,c,a.onScrollbarXChange);return h.useEffect(()=>{c.current&&i(getComputedStyle(c.current))},[c]),m.jsx(iy,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ts(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,l)=>{if(a.viewport){const f=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(f),fy(f,l)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:va(s.paddingLeft),paddingEnd:va(s.paddingRight)}})}})}),lj=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=St(qt,e.__scopeScrollArea),[s,i]=h.useState(),c=h.useRef(null),u=ce(t,c,a.onScrollbarYChange);return h.useEffect(()=>{c.current&&i(getComputedStyle(c.current))},[c]),m.jsx(iy,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ts(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,l)=>{if(a.viewport){const f=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(f),fy(f,l)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:va(s.paddingTop),paddingEnd:va(s.paddingBottom)}})}})}),[uj,sy]=ey(qt),iy=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:l,...f}=e,p=St(qt,n),[g,b]=h.useState(null),y=ce(t,R=>b(R)),v=h.useRef(null),x=h.useRef(""),w=p.viewport,M=r.content-r.viewport,C=Ue(d),P=Ue(c),E=ns(l,10);function D(R){if(v.current){const A=R.clientX-v.current.left,N=R.clientY-v.current.top;u({x:A,y:N})}}return h.useEffect(()=>{const R=A=>{const N=A.target;(g==null?void 0:g.contains(N))&&C(A,M)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[w,g,M,C]),h.useEffect(P,[r,P]),cr(g,E),cr(p.content,E),m.jsx(uj,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:Ue(a),onThumbPointerUp:Ue(s),onThumbPositionChange:P,onThumbPointerDown:Ue(i),children:m.jsx(T.Primitive.div,{...f,ref:y,style:{position:"absolute",...f.style},onPointerDown:F(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),v.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),D(R))}),onPointerMove:F(e.onPointerMove,D),onPointerUp:F(e.onPointerUp,R=>{const A=R.target;A.hasPointerCapture(R.pointerId)&&A.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=x.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),ga="ScrollAreaThumb",cy=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=sy(ga,e.__scopeScrollArea);return m.jsx(Ie,{present:n||o.hasThumb,children:m.jsx(dj,{ref:t,...r})})}),dj=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=St(ga,n),s=sy(ga,n),{onThumbPositionChange:i}=s,c=ce(t,l=>s.onThumbChange(l)),u=h.useRef(void 0),d=ns(()=>{u.current&&(u.current(),u.current=void 0)},100);return h.useEffect(()=>{const l=a.viewport;if(l){const f=()=>{if(d(),!u.current){const p=mj(l,i);u.current=p,i()}};return i(),l.addEventListener("scroll",f),()=>l.removeEventListener("scroll",f)}},[a.viewport,d,i]),m.jsx(T.Primitive.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:F(e.onPointerDownCapture,l=>{const p=l.target.getBoundingClientRect(),g=l.clientX-p.left,b=l.clientY-p.top;s.onThumbPointerDown({x:g,y:b})}),onPointerUp:F(e.onPointerUp,s.onThumbPointerUp)})});cy.displayName=ga;var jl="ScrollAreaCorner",ly=h.forwardRef((e,t)=>{const n=St(jl,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?m.jsx(fj,{...e,ref:t}):null});ly.displayName=jl;var fj=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=St(jl,n),[a,s]=h.useState(0),[i,c]=h.useState(0),u=!!(a&&i);return cr(o.scrollbarX,()=>{var l;const d=((l=o.scrollbarX)==null?void 0:l.offsetHeight)||0;o.onCornerHeightChange(d),c(d)}),cr(o.scrollbarY,()=>{var l;const d=((l=o.scrollbarY)==null?void 0:l.offsetWidth)||0;o.onCornerWidthChange(d),s(d)}),u?m.jsx(T.Primitive.div,{...r,ref:t,style:{width:a,height:i,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function va(e){return e?parseInt(e,10):0}function uy(e,t){const n=e/t;return isNaN(n)?0:n}function ts(e){const t=uy(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function hj(e,t,n,r="ltr"){const o=ts(n),a=o/2,s=t||a,i=o-s,c=n.scrollbar.paddingStart+s,u=n.scrollbar.size-n.scrollbar.paddingEnd-i,d=n.content-n.viewport,l=r==="ltr"?[0,d]:[d*-1,0];return dy([c,u],l)(e)}function lf(e,t,n="ltr"){const r=ts(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,s=t.content-t.viewport,i=a-r,c=n==="ltr"?[0,s]:[s*-1,0],u=qc(e,c);return dy([0,s],[0,i])(u)}function dy(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function fy(e,t){return e>0&&e<t}var mj=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const a={left:e.scrollLeft,top:e.scrollTop},s=n.left!==a.left,i=n.top!==a.top;(s||i)&&t(),n=a,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function ns(e,t){const n=Ue(e),r=h.useRef(0);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),h.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function cr(e,t){const n=Ue(t);mt(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var pj=ty,gj=ry,vj=ly;function bj({className:e,children:t,...n}){return m.jsxs(pj,{"data-slot":"scroll-area",className:T.cn("relative",e),...n,children:[m.jsx(gj,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),m.jsx(hy,{}),m.jsx(vj,{})]})}function hy({className:e,orientation:t="vertical",...n}){return m.jsx(oy,{"data-slot":"scroll-area-scrollbar",orientation:t,className:T.cn("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:m.jsx(cy,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var rs="Switch",[yj]=Ne(rs),[xj,wj]=yj(rs),my=h.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:c="on",onCheckedChange:u,form:d,...l}=e,[f,p]=h.useState(null),g=ce(t,w=>p(w)),b=h.useRef(!1),y=f?d||!!f.closest("form"):!0,[v,x]=Ge({prop:o,defaultProp:a??!1,onChange:u,caller:rs});return m.jsxs(xj,{scope:n,checked:v,disabled:i,children:[m.jsx(T.Primitive.button,{type:"button",role:"switch","aria-checked":v,"aria-required":s,"data-state":by(v),"data-disabled":i?"":void 0,disabled:i,value:c,...l,ref:g,onClick:F(e.onClick,w=>{x(M=>!M),y&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})}),y&&m.jsx(vy,{control:f,bubbles:!b.current,name:r,value:c,checked:v,required:s,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});my.displayName=rs;var py="SwitchThumb",gy=h.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=wj(py,n);return m.jsx(T.Primitive.span,{"data-state":by(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});gy.displayName=py;var Sj="SwitchBubbleInput",vy=h.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=h.useRef(null),i=ce(s,a),c=Va(n),u=mo(t);return h.useEffect(()=>{const d=s.current;if(!d)return;const l=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(l,"checked").set;if(c!==n&&p){const g=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(g)}},[c,n,r]),m.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});vy.displayName=Sj;function by(e){return e?"checked":"unchecked"}var Cj=my,Mj=gy;function Ej({className:e,...t}){return m.jsx(Cj,{"data-slot":"switch",className:T.cn("peer data-[state=checked]:bg-secondary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:m.jsx(Mj,{"data-slot":"switch-thumb",className:T.cn("bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}var os="Tabs",[Tj]=Ne(os,[yn]),yy=yn(),[Pj,Ll]=Tj(os),xy=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:c="automatic",...u}=e,d=bn(i),[l,f]=Ge({prop:r,onChange:o,defaultProp:a??"",caller:os});return m.jsx(Pj,{scope:n,baseId:_e(),value:l,onValueChange:f,orientation:s,dir:d,activationMode:c,children:m.jsx(T.Primitive.div,{dir:d,"data-orientation":s,...u,ref:t})})});xy.displayName=os;var wy="TabsList",Sy=h.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Ll(wy,n),s=yy(n);return m.jsx(Ga,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:m.jsx(T.Primitive.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Sy.displayName=wy;var Cy="TabsTrigger",My=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Ll(Cy,n),i=yy(n),c=Py(s.baseId,r),u=Dy(s.baseId,r),d=r===s.value;return m.jsx(Ka,{asChild:!0,...i,focusable:!o,active:d,children:m.jsx(T.Primitive.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:F(e.onMouseDown,l=>{!o&&l.button===0&&l.ctrlKey===!1?s.onValueChange(r):l.preventDefault()}),onKeyDown:F(e.onKeyDown,l=>{[" ","Enter"].includes(l.key)&&s.onValueChange(r)}),onFocus:F(e.onFocus,()=>{const l=s.activationMode!=="manual";!d&&!o&&l&&s.onValueChange(r)})})})});My.displayName=Cy;var Ey="TabsContent",Ty=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=Ll(Ey,n),c=Py(i.baseId,r),u=Dy(i.baseId,r),d=r===i.value,l=h.useRef(d);return h.useEffect(()=>{const f=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(f)},[]),m.jsx(Ie,{present:o||d,children:({present:f})=>m.jsx(T.Primitive.div,{"data-state":d?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:l.current?"0s":void 0},children:f&&a})})});Ty.displayName=Ey;function Py(e,t){return`${e}-trigger-${t}`}function Dy(e,t){return`${e}-content-${t}`}var Dj=xy,Rj=Sy,Aj=My,Oj=Ty;function kj({className:e,...t}){return m.jsx(Dj,{"data-slot":"tabs",className:T.cn("flex flex-col gap-2",e),...t})}function Nj({className:e,...t}){return m.jsx(Rj,{"data-slot":"tabs-list",className:T.cn("bg-primary text-secondary-foreground inline-flex h-10 w-fit items-center justify-center rounded-md p-1 gap-2",e),...t})}function _j({className:e,...t}){return m.jsx(Aj,{"data-slot":"tabs-trigger",className:T.cn("data-[state=active]:bg-background data-[state=active]:text-secondary data-[state=active]:rounded-xs focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-secondary-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-xs border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Ij({className:e,...t}){return m.jsx(Oj,{"data-slot":"tabs-content",className:T.cn("flex-1 outline-none",e),...t})}var jj=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Lj="VisuallyHidden",Ry=h.forwardRef((e,t)=>m.jsx(T.Primitive.span,{...e,ref:t,style:{...jj,...e.style}}));Ry.displayName=Lj;var $j=Ry,[as]=Ne("Tooltip",[gn]),ss=gn(),Ay="TooltipProvider",Fj=700,_i="tooltip.open",[Bj,$l]=as(Ay),Oy=e=>{const{__scopeTooltip:t,delayDuration:n=Fj,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=h.useRef(!0),i=h.useRef(!1),c=h.useRef(0);return h.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),m.jsx(Bj,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:h.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:h.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:h.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:a})};Oy.displayName=Ay;var Qr="Tooltip",[Vj,Mo]=as(Qr),ky=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,c=$l(Qr,e.__scopeTooltip),u=ss(t),[d,l]=h.useState(null),f=_e(),p=h.useRef(0),g=s??c.disableHoverableContent,b=i??c.delayDuration,y=h.useRef(!1),[v,x]=Ge({prop:r,defaultProp:o??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(_i))):c.onClose(),a==null||a(E)},caller:Qr}),w=h.useMemo(()=>v?y.current?"delayed-open":"instant-open":"closed",[v]),M=h.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y.current=!1,x(!0)},[x]),C=h.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),P=h.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{y.current=!0,x(!0),p.current=0},b)},[b,x]);return h.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),m.jsx(po,{...u,children:m.jsx(Vj,{scope:t,contentId:f,open:v,stateAttribute:w,trigger:d,onTriggerChange:l,onTriggerEnter:h.useCallback(()=>{c.isOpenDelayedRef.current?P():M()},[c.isOpenDelayedRef,P,M]),onTriggerLeave:h.useCallback(()=>{g?C():(window.clearTimeout(p.current),p.current=0)},[C,g]),onOpen:M,onClose:C,disableHoverableContent:g,children:n})})};ky.displayName=Qr;var Ii="TooltipTrigger",Ny=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Mo(Ii,n),a=$l(Ii,n),s=ss(n),i=h.useRef(null),c=ce(t,i,o.onTriggerChange),u=h.useRef(!1),d=h.useRef(!1),l=h.useCallback(()=>u.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",l),[l]),m.jsx(go,{asChild:!0,...s,children:m.jsx(T.Primitive.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:F(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:F(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:F(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",l,{once:!0})}),onFocus:F(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:F(e.onBlur,o.onClose),onClick:F(e.onClick,o.onClose)})})});Ny.displayName=Ii;var Fl="TooltipPortal",[Wj,zj]=as(Fl,{forceMount:void 0}),_y=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Mo(Fl,t);return m.jsx(Wj,{scope:t,forceMount:n,children:m.jsx(Ie,{present:n||a.open,children:m.jsx(pr,{asChild:!0,container:o,children:r})})})};_y.displayName=Fl;var lr="TooltipContent",Iy=h.forwardRef((e,t)=>{const n=zj(lr,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Mo(lr,e.__scopeTooltip);return m.jsx(Ie,{present:r||s.open,children:s.disableHoverableContent?m.jsx(jy,{side:o,...a,ref:t}):m.jsx(Hj,{side:o,...a,ref:t})})}),Hj=h.forwardRef((e,t)=>{const n=Mo(lr,e.__scopeTooltip),r=$l(lr,e.__scopeTooltip),o=h.useRef(null),a=ce(t,o),[s,i]=h.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:l}=r,f=h.useCallback(()=>{i(null),l(!1)},[l]),p=h.useCallback((g,b)=>{const y=g.currentTarget,v={x:g.clientX,y:g.clientY},x=Kj(v,y.getBoundingClientRect()),w=qj(v,x),M=Xj(b.getBoundingClientRect()),C=Qj([...w,...M]);i(C),l(!0)},[l]);return h.useEffect(()=>()=>f(),[f]),h.useEffect(()=>{if(c&&d){const g=y=>p(y,d),b=y=>p(y,c);return c.addEventListener("pointerleave",g),d.addEventListener("pointerleave",b),()=>{c.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",b)}}},[c,d,p,f]),h.useEffect(()=>{if(s){const g=b=>{const y=b.target,v={x:b.clientX,y:b.clientY},x=(c==null?void 0:c.contains(y))||(d==null?void 0:d.contains(y)),w=!Zj(v,s);x?f():w&&(f(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,d,s,u,f]),m.jsx(jy,{...e,ref:a})}),[Yj,Uj]=as(Qr,{isInside:!1}),Gj=wt.createSlottable("TooltipContent"),jy=h.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,c=Mo(lr,n),u=ss(n),{onClose:d}=c;return h.useEffect(()=>(document.addEventListener(_i,d),()=>document.removeEventListener(_i,d)),[d]),h.useEffect(()=>{if(c.trigger){const l=f=>{const p=f.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",l,{capture:!0}),()=>window.removeEventListener("scroll",l,{capture:!0})}},[c.trigger,d]),m.jsx(mr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:l=>l.preventDefault(),onDismiss:d,children:m.jsxs($a,{"data-state":c.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(Gj,{children:r}),m.jsx(Yj,{scope:n,isInside:!0,children:m.jsx($j,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Iy.displayName=lr;var Ly="TooltipArrow",$y=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ss(n);return Uj(Ly,n).isInside?null:m.jsx(Fa,{...o,...r,ref:t})});$y.displayName=Ly;function Kj(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function qj(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Xj(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Zj(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],c=t[s],u=i.x,d=i.y,l=c.x,f=c.y;d>r!=f>r&&n<(l-u)*(r-d)/(f-d)+u&&(o=!o)}return o}function Qj(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Jj(t)}function Jj(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var eL=Oy,tL=ky,nL=Ny,rL=_y,oL=Iy,aL=$y;function Bl({delayDuration:e=0,...t}){return m.jsx(eL,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Fy({...e}){return m.jsx(Bl,{children:m.jsx(tL,{"data-slot":"tooltip",...e})})}function By({...e}){return m.jsx(nL,{"data-slot":"tooltip-trigger",...e})}function Vy({className:e,sideOffset:t=0,children:n,...r}){return m.jsx(rL,{children:m.jsxs(oL,{"data-slot":"tooltip-content",sideOffset:t,className:T.cn("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,m.jsx(aL,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function sL(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 Wy=S.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Eo=()=>{const e=S.useContext(Wy);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};sL(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
91
+ */var of;function qk(){return of||(of=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function t(p,g){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var b=g();if(!l){var y=g();a(b,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}y=s({inst:{value:b,getSnapshot:g}});var v=y[0].inst,x=y[1];return c(function(){v.value=b,v.getSnapshot=g,n(v)&&x({inst:v})},[p,b,g]),i(function(){return n(v)&&x({inst:v}),p(function(){n(v)&&x({inst:v})})},[p]),u(b),b}function n(p){var g=p.getSnapshot;p=p.value;try{var b=g();return!a(p,b)}catch{return!0}}function r(p,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,a=typeof Object.is=="function"?Object.is:e,s=o.useState,i=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,d=!1,l=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Vs.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Vs}var af;function Xk(){return af||(af=1,process.env.NODE_ENV==="production"?$o.exports=Kk():$o.exports=qk()),$o.exports}var Zk=Xk();function Qk(){return Zk.useSyncExternalStore(Jk,()=>!0,()=>!1)}function Jk(){return()=>{}}var al="Avatar",[eN]=Ne(al),[tN,iv]=eN(al),cv=h.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=h.useState("idle");return m.jsx(tN,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:m.jsx(T.Primitive.span,{...r,ref:t})})});cv.displayName=al;var lv="AvatarImage",uv=h.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=iv(lv,n),i=nN(r,a),c=Ue(u=>{o(u),s.onImageLoadingStatusChange(u)});return mt(()=>{i!=="idle"&&c(i)},[i,c]),i==="loaded"?m.jsx(T.Primitive.img,{...a,ref:t,src:r}):null});uv.displayName=lv;var dv="AvatarFallback",fv=h.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=iv(dv,n),[s,i]=h.useState(r===void 0);return h.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(c)}},[r]),s&&a.imageLoadingStatus!=="loaded"?m.jsx(T.Primitive.span,{...o,ref:t}):null});fv.displayName=dv;function sf(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function nN(e,{referrerPolicy:t,crossOrigin:n}){const r=Qk(),o=h.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,i]=h.useState(()=>sf(a,e));return mt(()=>{i(sf(a,e))},[a,e]),mt(()=>{const c=l=>()=>{i(l)};if(!a)return;const u=c("loaded"),d=c("error");return a.addEventListener("load",u),a.addEventListener("error",d),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",u),a.removeEventListener("error",d)}},[a,n,t]),s}var rN=cv,oN=uv,aN=fv;function sN({className:e,...t}){return m.jsx(rN,{"data-slot":"avatar",className:T.cn("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function iN({className:e,...t}){return m.jsx(oN,{"data-slot":"avatar-image",className:T.cn("aspect-square size-full",e),...t})}function cN({className:e,...t}){return m.jsx(aN,{"data-slot":"avatar-fallback",className:T.cn("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}var Ua="Checkbox",[lN]=Ne(Ua),[uN,sl]=lN(Ua);function dN(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:s,name:i,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:l}=e,[f,p]=Ge({prop:n,defaultProp:o??!1,onChange:c,caller:Ua}),[g,b]=h.useState(null),[y,v]=h.useState(null),x=h.useRef(!1),w=g?!!s||!!g.closest("form"):!0,M={checked:f,disabled:a,setChecked:p,control:g,setControl:b,name:i,form:s,value:d,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:ln(o)?!1:o,isFormControl:w,bubbleInput:y,setBubbleInput:v};return m.jsx(uN,{scope:t,...M,children:fN(l)?l(M):r})}var hv="CheckboxTrigger",mv=h.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:s,disabled:i,checked:c,required:u,setControl:d,setChecked:l,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:g}=sl(hv,e),b=ce(o,d),y=h.useRef(c);return h.useEffect(()=>{const v=a==null?void 0:a.form;if(v){const x=()=>l(y.current);return v.addEventListener("reset",x),()=>v.removeEventListener("reset",x)}},[a,l]),m.jsx(T.Primitive.button,{type:"button",role:"checkbox","aria-checked":ln(c)?"mixed":c,"aria-required":u,"data-state":xv(c),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:b,onKeyDown:F(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:F(n,v=>{l(x=>ln(x)?!0:!x),g&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});mv.displayName=hv;var pv=h.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:c,onCheckedChange:u,form:d,...l}=e;return m.jsx(dN,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:r,form:d,value:c,internal_do_not_use_render:({isFormControl:f})=>m.jsxs(m.Fragment,{children:[m.jsx(mv,{...l,ref:t,__scopeCheckbox:n}),f&&m.jsx(yv,{__scopeCheckbox:n})]})})});pv.displayName=Ua;var gv="CheckboxIndicator",vv=h.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=sl(gv,n);return m.jsx(Ie,{present:r||ln(a.checked)||a.checked===!0,children:m.jsx(T.Primitive.span,{"data-state":xv(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});vv.displayName=gv;var bv="CheckboxBubbleInput",yv=h.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:i,disabled:c,name:u,value:d,form:l,bubbleInput:f,setBubbleInput:p}=sl(bv,e),g=ce(n,p),b=Va(a),y=mo(r);h.useEffect(()=>{const x=f;if(!x)return;const w=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(w,"checked").set,P=!o.current;if(b!==a&&C){const E=new Event("click",{bubbles:P});x.indeterminate=ln(a),C.call(x,ln(a)?!1:a),x.dispatchEvent(E)}},[f,b,a,o]);const v=h.useRef(ln(a)?!1:a);return m.jsx(T.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??v.current,required:i,disabled:c,name:u,value:d,form:l,...t,tabIndex:-1,ref:g,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});yv.displayName=bv;function fN(e){return typeof e=="function"}function ln(e){return e==="indeterminate"}function xv(e){return ln(e)?"indeterminate":e?"checked":"unchecked"}function hN({className:e,...t}){return m.jsx(pv,{"data-slot":"checkbox",className:T.cn("peer data-[state=checked]:bg-secondary data-[state=checked]:text-icon-accent-marketing data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border border-subtle transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:border-subtle disabled:data-[state=checked]:opacity-50",e),...t,children:m.jsx(vv,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:m.jsx(Te.CheckIcon,{className:"size-3.5"})})})}var Ws="rovingFocusGroup.onEntryFocus",mN={bubbles:!1,cancelable:!0},yo="RovingFocusGroup",[ki,wv,pN]=bo(yo),[gN,yn]=Ne(yo,[pN]),[vN,bN]=gN(yo),Sv=h.forwardRef((e,t)=>m.jsx(ki.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(ki.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(yN,{...e,ref:t})})}));Sv.displayName=yo;var yN=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...l}=e,f=h.useRef(null),p=ce(t,f),g=bn(a),[b,y]=Ge({prop:s,defaultProp:i??null,onChange:c,caller:yo}),[v,x]=h.useState(!1),w=Ue(u),M=wv(n),C=h.useRef(!1),[P,E]=h.useState(0);return h.useEffect(()=>{const D=f.current;if(D)return D.addEventListener(Ws,w),()=>D.removeEventListener(Ws,w)},[w]),m.jsx(vN,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:b,onItemFocus:h.useCallback(D=>y(D),[y]),onItemShiftTab:h.useCallback(()=>x(!0),[]),onFocusableItemAdd:h.useCallback(()=>E(D=>D+1),[]),onFocusableItemRemove:h.useCallback(()=>E(D=>D-1),[]),children:m.jsx(T.Primitive.div,{tabIndex:v||P===0?-1:0,"data-orientation":r,...l,ref:p,style:{outline:"none",...e.style},onMouseDown:F(e.onMouseDown,()=>{C.current=!0}),onFocus:F(e.onFocus,D=>{const R=!C.current;if(D.target===D.currentTarget&&R&&!v){const A=new CustomEvent(Ws,mN);if(D.currentTarget.dispatchEvent(A),!A.defaultPrevented){const N=M().filter(B=>B.focusable),z=N.find(B=>B.active),O=N.find(B=>B.id===b),K=[z,O,...N].filter(Boolean).map(B=>B.ref.current);Ev(K,d)}}C.current=!1}),onBlur:F(e.onBlur,()=>x(!1))})})}),Cv="RovingFocusGroupItem",Mv=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,c=_e(),u=a||c,d=bN(Cv,n),l=d.currentTabStopId===u,f=wv(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:b}=d;return h.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),m.jsx(ki.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:m.jsx(T.Primitive.span,{tabIndex:l?0:-1,"data-orientation":d.orientation,...i,ref:t,onMouseDown:F(e.onMouseDown,y=>{r?d.onItemFocus(u):y.preventDefault()}),onFocus:F(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:F(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){d.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const v=SN(y,d.orientation,d.dir);if(v!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let w=f().filter(M=>M.focusable).map(M=>M.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const M=w.indexOf(y.currentTarget);w=d.loop?CN(w,M+1):w.slice(M+1)}setTimeout(()=>Ev(w))}}),children:typeof s=="function"?s({isCurrentTabStop:l,hasTabStop:b!=null}):s})})});Mv.displayName=Cv;var xN={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wN(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function SN(e,t,n){const r=wN(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return xN[r]}function Ev(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function CN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ga=Sv,Ka=Mv,Ni=["Enter"," "],MN=["ArrowDown","PageUp","Home"],Tv=["ArrowUp","PageDown","End"],EN=[...MN,...Tv],TN={ltr:[...Ni,"ArrowRight"],rtl:[...Ni,"ArrowLeft"]},PN={ltr:["ArrowLeft"],rtl:["ArrowRight"]},xo="Menu",[Xr,DN,RN]=bo(xo),[Fn,wo]=Ne(xo,[RN,gn,yn]),So=gn(),Pv=yn(),[Dv,xn]=Fn(xo),[AN,Co]=Fn(xo),Rv=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=So(t),[c,u]=h.useState(null),d=h.useRef(!1),l=Ue(a),f=bn(o);return h.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),m.jsx(po,{...i,children:m.jsx(Dv,{scope:t,open:n,onOpenChange:l,content:c,onContentChange:u,children:m.jsx(AN,{scope:t,onClose:h.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:d,dir:f,modal:s,children:r})})})};Rv.displayName=xo;var ON="MenuAnchor",il=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=So(n);return m.jsx(go,{...o,...r,ref:t})});il.displayName=ON;var cl="MenuPortal",[kN,Av]=Fn(cl,{forceMount:void 0}),Ov=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=xn(cl,t);return m.jsx(kN,{scope:t,forceMount:n,children:m.jsx(Ie,{present:n||a.open,children:m.jsx(pr,{asChild:!0,container:o,children:r})})})};Ov.displayName=cl;var xt="MenuContent",[NN,ll]=Fn(xt),kv=h.forwardRef((e,t)=>{const n=Av(xt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=xn(xt,e.__scopeMenu),s=Co(xt,e.__scopeMenu);return m.jsx(Xr.Provider,{scope:e.__scopeMenu,children:m.jsx(Ie,{present:r||a.open,children:m.jsx(Xr.Slot,{scope:e.__scopeMenu,children:s.modal?m.jsx(_N,{...o,ref:t}):m.jsx(IN,{...o,ref:t})})})})}),_N=h.forwardRef((e,t)=>{const n=xn(xt,e.__scopeMenu),r=h.useRef(null),o=ce(t,r);return h.useEffect(()=>{const a=r.current;if(a)return Tc(a)},[]),m.jsx(ul,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:F(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),IN=h.forwardRef((e,t)=>{const n=xn(xt,e.__scopeMenu);return m.jsx(ul,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),jN=wt.createSlot("MenuContent.ScrollLock"),ul=h.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:f,onDismiss:p,disableOutsideScroll:g,...b}=e,y=xn(xt,n),v=Co(xt,n),x=So(n),w=Pv(n),M=DN(n),[C,P]=h.useState(null),E=h.useRef(null),D=ce(t,E,y.onContentChange),R=h.useRef(0),A=h.useRef(""),N=h.useRef(0),z=h.useRef(null),O=h.useRef("right"),U=h.useRef(0),K=g?Ea:h.Fragment,B=g?{as:jN,allowPinchZoom:!0}:void 0,$=_=>{var J,X;const Z=A.current+_,ae=M().filter(re=>!re.disabled),k=document.activeElement,L=(J=ae.find(re=>re.ref.current===k))==null?void 0:J.textValue,Y=ae.map(re=>re.textValue),V=KN(Y,Z,L),Q=(X=ae.find(re=>re.textValue===V))==null?void 0:X.ref.current;(function re(he){A.current=he,window.clearTimeout(R.current),he!==""&&(R.current=window.setTimeout(()=>re(""),1e3))})(Z),Q&&setTimeout(()=>Q.focus())};h.useEffect(()=>()=>window.clearTimeout(R.current),[]),Ec();const j=h.useCallback(_=>{var ae,k;return O.current===((ae=z.current)==null?void 0:ae.side)&&XN(_,(k=z.current)==null?void 0:k.area)},[]);return m.jsx(NN,{scope:n,searchRef:A,onItemEnter:h.useCallback(_=>{j(_)&&_.preventDefault()},[j]),onItemLeave:h.useCallback(_=>{var Z;j(_)||((Z=E.current)==null||Z.focus(),P(null))},[j]),onTriggerLeave:h.useCallback(_=>{j(_)&&_.preventDefault()},[j]),pointerGraceTimerRef:N,onPointerGraceIntentChange:h.useCallback(_=>{z.current=_},[]),children:m.jsx(K,{...B,children:m.jsx(Ca,{asChild:!0,trapped:o,onMountAutoFocus:F(a,_=>{var Z;_.preventDefault(),(Z=E.current)==null||Z.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:m.jsx(mr,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:f,onDismiss:p,children:m.jsx(Ga,{asChild:!0,...w,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:P,onEntryFocus:F(c,_=>{v.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx($a,{role:"menu","aria-orientation":"vertical","data-state":qv(y.open),"data-radix-menu-content":"",dir:v.dir,...x,...b,ref:D,style:{outline:"none",...b.style},onKeyDown:F(b.onKeyDown,_=>{const ae=_.target.closest("[data-radix-menu-content]")===_.currentTarget,k=_.ctrlKey||_.altKey||_.metaKey,L=_.key.length===1;ae&&(_.key==="Tab"&&_.preventDefault(),!k&&L&&$(_.key));const Y=E.current;if(_.target!==Y||!EN.includes(_.key))return;_.preventDefault();const Q=M().filter(J=>!J.disabled).map(J=>J.ref.current);Tv.includes(_.key)&&Q.reverse(),UN(Q)}),onBlur:F(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(R.current),A.current="")}),onPointerMove:F(e.onPointerMove,Zr(_=>{const Z=_.target,ae=U.current!==_.clientX;if(_.currentTarget.contains(Z)&&ae){const k=_.clientX>U.current?"right":"left";O.current=k,U.current=_.clientX}}))})})})})})})});kv.displayName=xt;var LN="MenuGroup",dl=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(T.Primitive.div,{role:"group",...r,ref:t})});dl.displayName=LN;var $N="MenuLabel",Nv=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(T.Primitive.div,{...r,ref:t})});Nv.displayName=$N;var fa="MenuItem",cf="menu.itemSelect",qa=h.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=h.useRef(null),s=Co(fa,e.__scopeMenu),i=ll(fa,e.__scopeMenu),c=ce(t,a),u=h.useRef(!1),d=()=>{const l=a.current;if(!n&&l){const f=new CustomEvent(cf,{bubbles:!0,cancelable:!0});l.addEventListener(cf,p=>r==null?void 0:r(p),{once:!0}),T.dispatchDiscreteCustomEvent(l,f),f.defaultPrevented?u.current=!1:s.onClose()}};return m.jsx(_v,{...o,ref:c,disabled:n,onClick:F(e.onClick,d),onPointerDown:l=>{var f;(f=e.onPointerDown)==null||f.call(e,l),u.current=!0},onPointerUp:F(e.onPointerUp,l=>{var f;u.current||(f=l.currentTarget)==null||f.click()}),onKeyDown:F(e.onKeyDown,l=>{const f=i.searchRef.current!=="";n||f&&l.key===" "||Ni.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});qa.displayName=fa;var _v=h.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=ll(fa,n),i=Pv(n),c=h.useRef(null),u=ce(t,c),[d,l]=h.useState(!1),[f,p]=h.useState("");return h.useEffect(()=>{const g=c.current;g&&p((g.textContent??"").trim())},[a.children]),m.jsx(Xr.ItemSlot,{scope:n,disabled:r,textValue:o??f,children:m.jsx(Ka,{asChild:!0,...i,focusable:!r,children:m.jsx(T.Primitive.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:F(e.onPointerMove,Zr(g=>{r?s.onItemLeave(g):(s.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:F(e.onPointerLeave,Zr(g=>s.onItemLeave(g))),onFocus:F(e.onFocus,()=>l(!0)),onBlur:F(e.onBlur,()=>l(!1))})})})}),FN="MenuCheckboxItem",Iv=h.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.jsx(Bv,{scope:e.__scopeMenu,checked:n,children:m.jsx(qa,{role:"menuitemcheckbox","aria-checked":ha(n)?"mixed":n,...o,ref:t,"data-state":ml(n),onSelect:F(o.onSelect,()=>r==null?void 0:r(ha(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Iv.displayName=FN;var jv="MenuRadioGroup",[BN,VN]=Fn(jv,{value:void 0,onValueChange:()=>{}}),Lv=h.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Ue(r);return m.jsx(BN,{scope:e.__scopeMenu,value:n,onValueChange:a,children:m.jsx(dl,{...o,ref:t})})});Lv.displayName=jv;var $v="MenuRadioItem",Fv=h.forwardRef((e,t)=>{const{value:n,...r}=e,o=VN($v,e.__scopeMenu),a=n===o.value;return m.jsx(Bv,{scope:e.__scopeMenu,checked:a,children:m.jsx(qa,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":ml(a),onSelect:F(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});Fv.displayName=$v;var fl="MenuItemIndicator",[Bv,WN]=Fn(fl,{checked:!1}),Vv=h.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=WN(fl,n);return m.jsx(Ie,{present:r||ha(a.checked)||a.checked===!0,children:m.jsx(T.Primitive.span,{...o,ref:t,"data-state":ml(a.checked)})})});Vv.displayName=fl;var zN="MenuSeparator",Wv=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(T.Primitive.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Wv.displayName=zN;var HN="MenuArrow",zv=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=So(n);return m.jsx(Fa,{...o,...r,ref:t})});zv.displayName=HN;var hl="MenuSub",[YN,Hv]=Fn(hl),Yv=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=xn(hl,t),s=So(t),[i,c]=h.useState(null),[u,d]=h.useState(null),l=Ue(o);return h.useEffect(()=>(a.open===!1&&l(!1),()=>l(!1)),[a.open,l]),m.jsx(po,{...s,children:m.jsx(Dv,{scope:t,open:r,onOpenChange:l,content:u,onContentChange:d,children:m.jsx(YN,{scope:t,contentId:_e(),triggerId:_e(),trigger:i,onTriggerChange:c,children:n})})})};Yv.displayName=hl;var Or="MenuSubTrigger",Uv=h.forwardRef((e,t)=>{const n=xn(Or,e.__scopeMenu),r=Co(Or,e.__scopeMenu),o=Hv(Or,e.__scopeMenu),a=ll(Or,e.__scopeMenu),s=h.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},d=h.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return h.useEffect(()=>d,[d]),h.useEffect(()=>{const l=i.current;return()=>{window.clearTimeout(l),c(null)}},[i,c]),m.jsx(il,{asChild:!0,...u,children:m.jsx(_v,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":qv(n.open),...e,ref:dn(t,o.onTriggerChange),onClick:l=>{var f;(f=e.onClick)==null||f.call(e,l),!(e.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:F(e.onPointerMove,Zr(l=>{a.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:F(e.onPointerLeave,Zr(l=>{var p,g;d();const f=(p=n.content)==null?void 0:p.getBoundingClientRect();if(f){const b=(g=n.content)==null?void 0:g.dataset.side,y=b==="right",v=y?-5:5,x=f[y?"left":"right"],w=f[y?"right":"left"];a.onPointerGraceIntentChange({area:[{x:l.clientX+v,y:l.clientY},{x,y:f.top},{x:w,y:f.top},{x:w,y:f.bottom},{x,y:f.bottom}],side:b}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(l),l.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:F(e.onKeyDown,l=>{var p;const f=a.searchRef.current!=="";e.disabled||f&&l.key===" "||TN[r.dir].includes(l.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),l.preventDefault())})})})});Uv.displayName=Or;var Gv="MenuSubContent",Kv=h.forwardRef((e,t)=>{const n=Av(xt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=xn(xt,e.__scopeMenu),s=Co(xt,e.__scopeMenu),i=Hv(Gv,e.__scopeMenu),c=h.useRef(null),u=ce(t,c);return m.jsx(Xr.Provider,{scope:e.__scopeMenu,children:m.jsx(Ie,{present:r||a.open,children:m.jsx(Xr.Slot,{scope:e.__scopeMenu,children:m.jsx(ul,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var l;s.isUsingKeyboardRef.current&&((l=c.current)==null||l.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:F(e.onFocusOutside,d=>{d.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:F(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:F(e.onKeyDown,d=>{var p;const l=d.currentTarget.contains(d.target),f=PN[s.dir].includes(d.key);l&&f&&(a.onOpenChange(!1),(p=i.trigger)==null||p.focus(),d.preventDefault())})})})})})});Kv.displayName=Gv;function qv(e){return e?"open":"closed"}function ha(e){return e==="indeterminate"}function ml(e){return ha(e)?"indeterminate":e?"checked":"unchecked"}function UN(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function GN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function KN(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=GN(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const c=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function qN(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],c=t[s],u=i.x,d=i.y,l=c.x,f=c.y;d>r!=f>r&&n<(l-u)*(r-d)/(f-d)+u&&(o=!o)}return o}function XN(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return qN(n,t)}function Zr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var pl=Rv,gl=il,vl=Ov,bl=kv,yl=dl,xl=Nv,wl=qa,Sl=Iv,Cl=Lv,Ml=Fv,El=Vv,Tl=Wv,Pl=zv,Dl=Yv,Rl=Uv,Al=Kv,Ol="ContextMenu",[ZN]=Ne(Ol,[wo]),tt=wo(),[QN,Xv]=ZN(Ol),Zv=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:a=!0}=e,[s,i]=h.useState(!1),c=tt(t),u=Ue(r),d=h.useCallback(l=>{i(l),u(l)},[u]);return m.jsx(QN,{scope:t,open:s,onOpenChange:d,modal:a,children:m.jsx(pl,{...c,dir:o,open:s,onOpenChange:d,modal:a,children:n})})};Zv.displayName=Ol;var Qv="ContextMenuTrigger",Jv=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,a=Xv(Qv,n),s=tt(n),i=h.useRef({x:0,y:0}),c=h.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...i.current})}),u=h.useRef(0),d=h.useCallback(()=>window.clearTimeout(u.current),[]),l=f=>{i.current={x:f.clientX,y:f.clientY},a.onOpenChange(!0)};return h.useEffect(()=>d,[d]),h.useEffect(()=>void(r&&d()),[r,d]),m.jsxs(m.Fragment,{children:[m.jsx(gl,{...s,virtualRef:c}),m.jsx(T.Primitive.span,{"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:F(e.onContextMenu,f=>{d(),l(f),f.preventDefault()}),onPointerDown:r?e.onPointerDown:F(e.onPointerDown,Fo(f=>{d(),u.current=window.setTimeout(()=>l(f),700)})),onPointerMove:r?e.onPointerMove:F(e.onPointerMove,Fo(d)),onPointerCancel:r?e.onPointerCancel:F(e.onPointerCancel,Fo(d)),onPointerUp:r?e.onPointerUp:F(e.onPointerUp,Fo(d))})]})});Jv.displayName=Qv;var JN="ContextMenuPortal",eb=e=>{const{__scopeContextMenu:t,...n}=e,r=tt(t);return m.jsx(vl,{...r,...n})};eb.displayName=JN;var tb="ContextMenuContent",nb=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Xv(tb,n),a=tt(n),s=h.useRef(!1);return m.jsx(bl,{...a,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:i=>{var c;(c=e.onCloseAutoFocus)==null||c.call(e,i),!i.defaultPrevented&&s.current&&i.preventDefault(),s.current=!1},onInteractOutside:i=>{var c;(c=e.onInteractOutside)==null||c.call(e,i),!i.defaultPrevented&&!o.modal&&(s.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});nb.displayName=tb;var e_="ContextMenuGroup",rb=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(yl,{...o,...r,ref:t})});rb.displayName=e_;var t_="ContextMenuLabel",ob=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(xl,{...o,...r,ref:t})});ob.displayName=t_;var n_="ContextMenuItem",ab=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(wl,{...o,...r,ref:t})});ab.displayName=n_;var r_="ContextMenuCheckboxItem",sb=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Sl,{...o,...r,ref:t})});sb.displayName=r_;var o_="ContextMenuRadioGroup",ib=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Cl,{...o,...r,ref:t})});ib.displayName=o_;var a_="ContextMenuRadioItem",cb=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Ml,{...o,...r,ref:t})});cb.displayName=a_;var s_="ContextMenuItemIndicator",lb=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(El,{...o,...r,ref:t})});lb.displayName=s_;var i_="ContextMenuSeparator",ub=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Tl,{...o,...r,ref:t})});ub.displayName=i_;var c_="ContextMenuArrow",l_=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Pl,{...o,...r,ref:t})});l_.displayName=c_;var db="ContextMenuSub",fb=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,defaultOpen:a}=e,s=tt(t),[i,c]=Ge({prop:o,defaultProp:a??!1,onChange:r,caller:db});return m.jsx(Dl,{...s,open:i,onOpenChange:c,children:n})};fb.displayName=db;var u_="ContextMenuSubTrigger",hb=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Rl,{...o,...r,ref:t})});hb.displayName=u_;var d_="ContextMenuSubContent",mb=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=tt(n);return m.jsx(Al,{...o,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mb.displayName=d_;function Fo(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var f_=Zv,h_=Jv,pb=eb,m_=nb,p_=rb,g_=ob,v_=ab,b_=sb,y_=ib,x_=cb,gb=lb,w_=ub,S_=fb,C_=hb,M_=mb;function E_({...e}){return m.jsx(f_,{"data-slot":"context-menu",...e})}function T_({...e}){return m.jsx(h_,{"data-slot":"context-menu-trigger",...e})}function P_({...e}){return m.jsx(p_,{"data-slot":"context-menu-group",...e})}function D_({...e}){return m.jsx(pb,{"data-slot":"context-menu-portal",...e})}function R_({...e}){return m.jsx(S_,{"data-slot":"context-menu-sub",...e})}function A_({...e}){return m.jsx(y_,{"data-slot":"context-menu-radio-group",...e})}function O_({className:e,inset:t,children:n,...r}){return m.jsxs(C_,{"data-slot":"context-menu-sub-trigger","data-inset":t,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,m.jsx(Te.ChevronRightIcon,{className:"ml-auto"})]})}function k_({className:e,...t}){return m.jsx(M_,{"data-slot":"context-menu-sub-content",className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}function N_({className:e,...t}){return m.jsx(pb,{children:m.jsx(m_,{"data-slot":"context-menu-content",className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...t})})}function __({className:e,inset:t,variant:n="default",...r}){return m.jsx(v_,{"data-slot":"context-menu-item","data-inset":t,"data-variant":n,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function I_({className:e,children:t,checked:n,...r}){return m.jsxs(b_,{"data-slot":"context-menu-checkbox-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(gb,{children:m.jsx(Te.CheckIcon,{className:"size-4"})})}),t]})}function j_({className:e,children:t,...n}){return m.jsxs(x_,{"data-slot":"context-menu-radio-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(gb,{children:m.jsx(Te.CircleIcon,{className:"size-2 fill-current"})})}),t]})}function L_({className:e,inset:t,...n}){return m.jsx(g_,{"data-slot":"context-menu-label","data-inset":t,className:T.cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function $_({className:e,...t}){return m.jsx(w_,{"data-slot":"context-menu-separator",className:T.cn("bg-border -mx-1 my-1 h-px",e),...t})}function F_({className:e,...t}){return m.jsx("span",{"data-slot":"context-menu-shortcut",className:T.cn("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}var Xa="DropdownMenu",[B_]=Ne(Xa,[wo]),nt=wo(),[V_,vb]=B_(Xa),bb=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,c=nt(t),u=h.useRef(null),[d,l]=Ge({prop:o,defaultProp:a??!1,onChange:s,caller:Xa});return m.jsx(V_,{scope:t,triggerId:_e(),triggerRef:u,contentId:_e(),open:d,onOpenChange:l,onOpenToggle:h.useCallback(()=>l(f=>!f),[l]),modal:i,children:m.jsx(pl,{...c,open:d,onOpenChange:l,dir:r,modal:i,children:n})})};bb.displayName=Xa;var yb="DropdownMenuTrigger",xb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=vb(yb,n),s=nt(n);return m.jsx(gl,{asChild:!0,...s,children:m.jsx(T.Primitive.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:dn(t,a.triggerRef),onPointerDown:F(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:F(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});xb.displayName=yb;var W_="DropdownMenuPortal",wb=e=>{const{__scopeDropdownMenu:t,...n}=e,r=nt(t);return m.jsx(vl,{...r,...n})};wb.displayName=W_;var Sb="DropdownMenuContent",Cb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vb(Sb,n),a=nt(n),s=h.useRef(!1);return m.jsx(bl,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:F(e.onCloseAutoFocus,i=>{var c;s.current||(c=o.triggerRef.current)==null||c.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:F(e.onInteractOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!o.modal||d)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cb.displayName=Sb;var z_="DropdownMenuGroup",Mb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(yl,{...o,...r,ref:t})});Mb.displayName=z_;var H_="DropdownMenuLabel",Eb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(xl,{...o,...r,ref:t})});Eb.displayName=H_;var Y_="DropdownMenuItem",Tb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(wl,{...o,...r,ref:t})});Tb.displayName=Y_;var U_="DropdownMenuCheckboxItem",Pb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Sl,{...o,...r,ref:t})});Pb.displayName=U_;var G_="DropdownMenuRadioGroup",Db=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Cl,{...o,...r,ref:t})});Db.displayName=G_;var K_="DropdownMenuRadioItem",Rb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Ml,{...o,...r,ref:t})});Rb.displayName=K_;var q_="DropdownMenuItemIndicator",Ab=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(El,{...o,...r,ref:t})});Ab.displayName=q_;var X_="DropdownMenuSeparator",Ob=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Tl,{...o,...r,ref:t})});Ob.displayName=X_;var Z_="DropdownMenuArrow",Q_=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Pl,{...o,...r,ref:t})});Q_.displayName=Z_;var J_=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=nt(t),[i,c]=Ge({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return m.jsx(Dl,{...s,open:i,onOpenChange:c,children:n})},eI="DropdownMenuSubTrigger",kb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Rl,{...o,...r,ref:t})});kb.displayName=eI;var tI="DropdownMenuSubContent",Nb=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nt(n);return m.jsx(Al,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Nb.displayName=tI;var nI=bb,rI=xb,_b=wb,oI=Cb,aI=Mb,sI=Eb,iI=Tb,cI=Pb,lI=Db,uI=Rb,Ib=Ab,dI=Ob,fI=J_,hI=kb,mI=Nb;function pI({...e}){return m.jsx(nI,{"data-slot":"dropdown-menu",...e})}function gI({...e}){return m.jsx(_b,{"data-slot":"dropdown-menu-portal",...e})}function vI({...e}){return m.jsx(rI,{"data-slot":"dropdown-menu-trigger",...e})}function bI({className:e,sideOffset:t=4,...n}){return m.jsx(_b,{children:m.jsx(oI,{"data-slot":"dropdown-menu-content",sideOffset:t,className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function yI({...e}){return m.jsx(aI,{"data-slot":"dropdown-menu-group",...e})}function xI({className:e,inset:t,variant:n="default",...r}){return m.jsx(iI,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function wI({className:e,children:t,checked:n,...r}){return m.jsxs(cI,{"data-slot":"dropdown-menu-checkbox-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(Ib,{children:m.jsx(Te.CheckIcon,{className:"size-4"})})}),t]})}function SI({...e}){return m.jsx(lI,{"data-slot":"dropdown-menu-radio-group",...e})}function CI({className:e,children:t,...n}){return m.jsxs(uI,{"data-slot":"dropdown-menu-radio-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(Ib,{children:m.jsx(Te.CircleIcon,{className:"size-2 fill-current"})})}),t]})}function MI({className:e,inset:t,...n}){return m.jsx(sI,{"data-slot":"dropdown-menu-label","data-inset":t,className:T.cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function EI({className:e,...t}){return m.jsx(dI,{"data-slot":"dropdown-menu-separator",className:T.cn("bg-border -mx-1 my-1 h-px",e),...t})}function TI({className:e,...t}){return m.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:T.cn("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function PI({...e}){return m.jsx(fI,{"data-slot":"dropdown-menu-sub",...e})}function DI({className:e,inset:t,children:n,...r}){return m.jsxs(hI,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...r,children:[n,m.jsx(Te.ChevronRightIcon,{className:"ml-auto size-4"})]})}function RI({className:e,...t}){return m.jsx(mI,{"data-slot":"dropdown-menu-sub-content",className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}var zs,Za="HoverCard",[jb]=Ne(Za,[gn]),Qa=gn(),[AI,Ja]=jb(Za),Lb=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:a,openDelay:s=700,closeDelay:i=300}=e,c=Qa(t),u=h.useRef(0),d=h.useRef(0),l=h.useRef(!1),f=h.useRef(!1),[p,g]=Ge({prop:r,defaultProp:o??!1,onChange:a,caller:Za}),b=h.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>g(!0),s)},[s,g]),y=h.useCallback(()=>{clearTimeout(u.current),!l.current&&!f.current&&(d.current=window.setTimeout(()=>g(!1),i))},[i,g]),v=h.useCallback(()=>g(!1),[g]);return h.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),m.jsx(AI,{scope:t,open:p,onOpenChange:g,onOpen:b,onClose:y,onDismiss:v,hasSelectionRef:l,isPointerDownOnContentRef:f,children:m.jsx(po,{...c,children:n})})};Lb.displayName=Za;var $b="HoverCardTrigger",Fb=h.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Ja($b,n),a=Qa(n);return m.jsx(go,{asChild:!0,...a,children:m.jsx(T.Primitive.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:F(e.onPointerEnter,pa(o.onOpen)),onPointerLeave:F(e.onPointerLeave,pa(o.onClose)),onFocus:F(e.onFocus,o.onOpen),onBlur:F(e.onBlur,o.onClose),onTouchStart:F(e.onTouchStart,s=>s.preventDefault())})})});Fb.displayName=$b;var kl="HoverCardPortal",[OI,kI]=jb(kl,{forceMount:void 0}),Bb=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,a=Ja(kl,t);return m.jsx(OI,{scope:t,forceMount:n,children:m.jsx(Ie,{present:n||a.open,children:m.jsx(pr,{asChild:!0,container:o,children:r})})})};Bb.displayName=kl;var ma="HoverCardContent",Vb=h.forwardRef((e,t)=>{const n=kI(ma,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=Ja(ma,e.__scopeHoverCard);return m.jsx(Ie,{present:r||a.open,children:m.jsx(NI,{"data-state":a.open?"open":"closed",...o,onPointerEnter:F(e.onPointerEnter,pa(a.onOpen)),onPointerLeave:F(e.onPointerLeave,pa(a.onClose)),ref:t})})});Vb.displayName=ma;var NI=h.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,...i}=e,c=Ja(ma,n),u=Qa(n),d=h.useRef(null),l=ce(t,d),[f,p]=h.useState(!1);return h.useEffect(()=>{if(f){const g=document.body;return zs=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=zs,g.style.webkitUserSelect=zs}}},[f]),h.useEffect(()=>{if(d.current){const g=()=>{p(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),h.useEffect(()=>{d.current&&jI(d.current).forEach(b=>b.setAttribute("tabindex","-1"))}),m.jsx(mr,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:F(a,g=>{g.preventDefault()}),onDismiss:c.onDismiss,children:m.jsx($a,{...u,...i,onPointerDown:F(i.onPointerDown,g=>{g.currentTarget.contains(g.target)&&p(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:l,style:{...i.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),_I="HoverCardArrow",II=h.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Qa(n);return m.jsx(Fa,{...o,...r,ref:t})});II.displayName=_I;function pa(e){return t=>t.pointerType==="touch"?void 0:e()}function jI(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var LI=Lb,$I=Fb,FI=Bb,BI=Vb;function VI({...e}){return m.jsx(LI,{"data-slot":"hover-card",...e})}function WI({...e}){return m.jsx($I,{"data-slot":"hover-card-trigger",...e})}function zI({className:e,align:t="center",sideOffset:n=4,...r}){return m.jsx(FI,{"data-slot":"hover-card-portal",children:m.jsx(BI,{"data-slot":"hover-card-content",align:t,sideOffset:n,className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}var Nl="Radio",[HI,Wb]=Ne(Nl),[YI,UI]=HI(Nl),zb=h.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:c,form:u,...d}=e,[l,f]=h.useState(null),p=ce(t,y=>f(y)),g=h.useRef(!1),b=l?u||!!l.closest("form"):!0;return m.jsxs(YI,{scope:n,checked:o,disabled:s,children:[m.jsx(T.Primitive.button,{type:"button",role:"radio","aria-checked":o,"data-state":Gb(o),"data-disabled":s?"":void 0,disabled:s,value:i,...d,ref:p,onClick:F(e.onClick,y=>{o||c==null||c(),b&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})}),b&&m.jsx(Ub,{control:l,bubbles:!g.current,name:r,value:i,checked:o,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});zb.displayName=Nl;var Hb="RadioIndicator",Yb=h.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=UI(Hb,n);return m.jsx(Ie,{present:r||a.checked,children:m.jsx(T.Primitive.span,{"data-state":Gb(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Yb.displayName=Hb;var GI="RadioBubbleInput",Ub=h.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=h.useRef(null),i=ce(s,a),c=Va(n),u=mo(t);return h.useEffect(()=>{const d=s.current;if(!d)return;const l=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(l,"checked").set;if(c!==n&&p){const g=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(g)}},[c,n,r]),m.jsx(T.Primitive.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ub.displayName=GI;function Gb(e){return e?"checked":"unchecked"}var KI=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],es="RadioGroup",[qI]=Ne(es,[yn,Wb]),Kb=yn(),qb=Wb(),[XI,ZI]=qI(es),Xb=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:c,dir:u,loop:d=!0,onValueChange:l,...f}=e,p=Kb(n),g=bn(u),[b,y]=Ge({prop:a,defaultProp:o??null,onChange:l,caller:es});return m.jsx(XI,{scope:n,name:r,required:s,disabled:i,value:b,onValueChange:y,children:m.jsx(Ga,{asChild:!0,...p,orientation:c,dir:g,loop:d,children:m.jsx(T.Primitive.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":i?"":void 0,dir:g,...f,ref:t})})})});Xb.displayName=es;var Zb="RadioGroupItem",Qb=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=ZI(Zb,n),s=a.disabled||r,i=Kb(n),c=qb(n),u=h.useRef(null),d=ce(t,u),l=a.value===o.value,f=h.useRef(!1);return h.useEffect(()=>{const p=b=>{KI.includes(b.key)&&(f.current=!0)},g=()=>f.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",g)}},[]),m.jsx(Ka,{asChild:!0,...i,focusable:!s,active:l,children:m.jsx(zb,{disabled:s,required:a.required,checked:l,...c,...o,name:a.name,ref:d,onCheck:()=>a.onValueChange(o.value),onKeyDown:F(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:F(o.onFocus,()=>{var p;f.current&&((p=u.current)==null||p.click())})})})});Qb.displayName=Zb;var QI="RadioGroupIndicator",Jb=h.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=qb(n);return m.jsx(Yb,{...o,...r,ref:t})});Jb.displayName=QI;var JI=Xb,ej=Qb,tj=Jb;function nj({className:e,...t}){return m.jsx(JI,{"data-slot":"radio-group",className:T.cn("grid gap-3",e),...t})}function rj({className:e,...t}){return m.jsx(ej,{"data-slot":"radio-group-item",className:T.cn("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:m.jsx(tj,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:m.jsx(Te.CircleIcon,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function oj(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var _l="ScrollArea",[ey]=Ne(_l),[aj,St]=ey(_l),ty=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...s}=e,[i,c]=h.useState(null),[u,d]=h.useState(null),[l,f]=h.useState(null),[p,g]=h.useState(null),[b,y]=h.useState(null),[v,x]=h.useState(0),[w,M]=h.useState(0),[C,P]=h.useState(!1),[E,D]=h.useState(!1),R=ce(t,N=>c(N)),A=bn(o);return m.jsx(aj,{scope:n,type:r,dir:A,scrollHideDelay:a,scrollArea:i,viewport:u,onViewportChange:d,content:l,onContentChange:f,scrollbarX:p,onScrollbarXChange:g,scrollbarXEnabled:C,onScrollbarXEnabledChange:P,scrollbarY:b,onScrollbarYChange:y,scrollbarYEnabled:E,onScrollbarYEnabledChange:D,onCornerWidthChange:x,onCornerHeightChange:M,children:m.jsx(T.Primitive.div,{dir:A,...s,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});ty.displayName=_l;var ny="ScrollAreaViewport",ry=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,s=St(ny,n),i=h.useRef(null),c=ce(t,i,s.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),m.jsx(T.Primitive.div,{"data-radix-scroll-area-viewport":"",...a,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});ry.displayName=ny;var qt="ScrollAreaScrollbar",oy=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=St(qt,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=o,i=e.orientation==="horizontal";return h.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),o.type==="hover"?m.jsx(sj,{...r,ref:t,forceMount:n}):o.type==="scroll"?m.jsx(ij,{...r,ref:t,forceMount:n}):o.type==="auto"?m.jsx(ay,{...r,ref:t,forceMount:n}):o.type==="always"?m.jsx(Il,{...r,ref:t}):null});oy.displayName=qt;var sj=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=St(qt,e.__scopeScrollArea),[a,s]=h.useState(!1);return h.useEffect(()=>{const i=o.scrollArea;let c=0;if(i){const u=()=>{window.clearTimeout(c),s(!0)},d=()=>{c=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),m.jsx(Ie,{present:n||a,children:m.jsx(ay,{"data-state":a?"visible":"hidden",...r,ref:t})})}),ij=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=St(qt,e.__scopeScrollArea),a=e.orientation==="horizontal",s=ns(()=>c("SCROLL_END"),100),[i,c]=oj("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return h.useEffect(()=>{if(i==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,o.scrollHideDelay,c]),h.useEffect(()=>{const u=o.viewport,d=a?"scrollLeft":"scrollTop";if(u){let l=u[d];const f=()=>{const p=u[d];l!==p&&(c("SCROLL"),s()),l=p};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[o.viewport,a,c,s]),m.jsx(Ie,{present:n||i!=="hidden",children:m.jsx(Il,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:F(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:F(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),ay=h.forwardRef((e,t)=>{const n=St(qt,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,s]=h.useState(!1),i=e.orientation==="horizontal",c=ns(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;s(i?u:d)}},10);return cr(n.viewport,c),cr(n.content,c),m.jsx(Ie,{present:r||a,children:m.jsx(Il,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Il=h.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=St(qt,e.__scopeScrollArea),a=h.useRef(null),s=h.useRef(0),[i,c]=h.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=uy(i.viewport,i.content),d={...r,sizes:i,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>a.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function l(f,p){return hj(f,s.current,i,p)}return n==="horizontal"?m.jsx(cj,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const f=o.viewport.scrollLeft,p=lf(f,i,o.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=l(f,o.dir))}}):n==="vertical"?m.jsx(lj,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const f=o.viewport.scrollTop,p=lf(f,i);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=l(f))}}):null}),cj=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=St(qt,e.__scopeScrollArea),[s,i]=h.useState(),c=h.useRef(null),u=ce(t,c,a.onScrollbarXChange);return h.useEffect(()=>{c.current&&i(getComputedStyle(c.current))},[c]),m.jsx(iy,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ts(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,l)=>{if(a.viewport){const f=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(f),fy(f,l)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:va(s.paddingLeft),paddingEnd:va(s.paddingRight)}})}})}),lj=h.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=St(qt,e.__scopeScrollArea),[s,i]=h.useState(),c=h.useRef(null),u=ce(t,c,a.onScrollbarYChange);return h.useEffect(()=>{c.current&&i(getComputedStyle(c.current))},[c]),m.jsx(iy,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ts(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,l)=>{if(a.viewport){const f=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(f),fy(f,l)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:va(s.paddingTop),paddingEnd:va(s.paddingBottom)}})}})}),[uj,sy]=ey(qt),iy=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:l,...f}=e,p=St(qt,n),[g,b]=h.useState(null),y=ce(t,R=>b(R)),v=h.useRef(null),x=h.useRef(""),w=p.viewport,M=r.content-r.viewport,C=Ue(d),P=Ue(c),E=ns(l,10);function D(R){if(v.current){const A=R.clientX-v.current.left,N=R.clientY-v.current.top;u({x:A,y:N})}}return h.useEffect(()=>{const R=A=>{const N=A.target;(g==null?void 0:g.contains(N))&&C(A,M)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[w,g,M,C]),h.useEffect(P,[r,P]),cr(g,E),cr(p.content,E),m.jsx(uj,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:Ue(a),onThumbPointerUp:Ue(s),onThumbPositionChange:P,onThumbPointerDown:Ue(i),children:m.jsx(T.Primitive.div,{...f,ref:y,style:{position:"absolute",...f.style},onPointerDown:F(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),v.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),D(R))}),onPointerMove:F(e.onPointerMove,D),onPointerUp:F(e.onPointerUp,R=>{const A=R.target;A.hasPointerCapture(R.pointerId)&&A.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=x.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),ga="ScrollAreaThumb",cy=h.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=sy(ga,e.__scopeScrollArea);return m.jsx(Ie,{present:n||o.hasThumb,children:m.jsx(dj,{ref:t,...r})})}),dj=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=St(ga,n),s=sy(ga,n),{onThumbPositionChange:i}=s,c=ce(t,l=>s.onThumbChange(l)),u=h.useRef(void 0),d=ns(()=>{u.current&&(u.current(),u.current=void 0)},100);return h.useEffect(()=>{const l=a.viewport;if(l){const f=()=>{if(d(),!u.current){const p=mj(l,i);u.current=p,i()}};return i(),l.addEventListener("scroll",f),()=>l.removeEventListener("scroll",f)}},[a.viewport,d,i]),m.jsx(T.Primitive.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:F(e.onPointerDownCapture,l=>{const p=l.target.getBoundingClientRect(),g=l.clientX-p.left,b=l.clientY-p.top;s.onThumbPointerDown({x:g,y:b})}),onPointerUp:F(e.onPointerUp,s.onThumbPointerUp)})});cy.displayName=ga;var jl="ScrollAreaCorner",ly=h.forwardRef((e,t)=>{const n=St(jl,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?m.jsx(fj,{...e,ref:t}):null});ly.displayName=jl;var fj=h.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=St(jl,n),[a,s]=h.useState(0),[i,c]=h.useState(0),u=!!(a&&i);return cr(o.scrollbarX,()=>{var l;const d=((l=o.scrollbarX)==null?void 0:l.offsetHeight)||0;o.onCornerHeightChange(d),c(d)}),cr(o.scrollbarY,()=>{var l;const d=((l=o.scrollbarY)==null?void 0:l.offsetWidth)||0;o.onCornerWidthChange(d),s(d)}),u?m.jsx(T.Primitive.div,{...r,ref:t,style:{width:a,height:i,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function va(e){return e?parseInt(e,10):0}function uy(e,t){const n=e/t;return isNaN(n)?0:n}function ts(e){const t=uy(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function hj(e,t,n,r="ltr"){const o=ts(n),a=o/2,s=t||a,i=o-s,c=n.scrollbar.paddingStart+s,u=n.scrollbar.size-n.scrollbar.paddingEnd-i,d=n.content-n.viewport,l=r==="ltr"?[0,d]:[d*-1,0];return dy([c,u],l)(e)}function lf(e,t,n="ltr"){const r=ts(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,s=t.content-t.viewport,i=a-r,c=n==="ltr"?[0,s]:[s*-1,0],u=qc(e,c);return dy([0,s],[0,i])(u)}function dy(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function fy(e,t){return e>0&&e<t}var mj=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const a={left:e.scrollLeft,top:e.scrollTop},s=n.left!==a.left,i=n.top!==a.top;(s||i)&&t(),n=a,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function ns(e,t){const n=Ue(e),r=h.useRef(0);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),h.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function cr(e,t){const n=Ue(t);mt(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var pj=ty,gj=ry,vj=ly;function bj({className:e,children:t,...n}){return m.jsxs(pj,{"data-slot":"scroll-area",className:T.cn("relative",e),...n,children:[m.jsx(gj,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),m.jsx(hy,{}),m.jsx(vj,{})]})}function hy({className:e,orientation:t="vertical",...n}){return m.jsx(oy,{"data-slot":"scroll-area-scrollbar",orientation:t,className:T.cn("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:m.jsx(cy,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var rs="Switch",[yj]=Ne(rs),[xj,wj]=yj(rs),my=h.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:c="on",onCheckedChange:u,form:d,...l}=e,[f,p]=h.useState(null),g=ce(t,w=>p(w)),b=h.useRef(!1),y=f?d||!!f.closest("form"):!0,[v,x]=Ge({prop:o,defaultProp:a??!1,onChange:u,caller:rs});return m.jsxs(xj,{scope:n,checked:v,disabled:i,children:[m.jsx(T.Primitive.button,{type:"button",role:"switch","aria-checked":v,"aria-required":s,"data-state":by(v),"data-disabled":i?"":void 0,disabled:i,value:c,...l,ref:g,onClick:F(e.onClick,w=>{x(M=>!M),y&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})}),y&&m.jsx(vy,{control:f,bubbles:!b.current,name:r,value:c,checked:v,required:s,disabled:i,form:d,style:{transform:"translateX(-100%)"}})]})});my.displayName=rs;var py="SwitchThumb",gy=h.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=wj(py,n);return m.jsx(T.Primitive.span,{"data-state":by(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});gy.displayName=py;var Sj="SwitchBubbleInput",vy=h.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=h.useRef(null),i=ce(s,a),c=Va(n),u=mo(t);return h.useEffect(()=>{const d=s.current;if(!d)return;const l=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(l,"checked").set;if(c!==n&&p){const g=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(g)}},[c,n,r]),m.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});vy.displayName=Sj;function by(e){return e?"checked":"unchecked"}var Cj=my,Mj=gy;function Ej({className:e,...t}){return m.jsx(Cj,{"data-slot":"switch",className:T.cn("peer data-[state=checked]:bg-secondary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:m.jsx(Mj,{"data-slot":"switch-thumb",className:T.cn("bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}var os="Tabs",[Tj]=Ne(os,[yn]),yy=yn(),[Pj,Ll]=Tj(os),xy=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:c="automatic",...u}=e,d=bn(i),[l,f]=Ge({prop:r,onChange:o,defaultProp:a??"",caller:os});return m.jsx(Pj,{scope:n,baseId:_e(),value:l,onValueChange:f,orientation:s,dir:d,activationMode:c,children:m.jsx(T.Primitive.div,{dir:d,"data-orientation":s,...u,ref:t})})});xy.displayName=os;var wy="TabsList",Sy=h.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Ll(wy,n),s=yy(n);return m.jsx(Ga,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:m.jsx(T.Primitive.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Sy.displayName=wy;var Cy="TabsTrigger",My=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Ll(Cy,n),i=yy(n),c=Py(s.baseId,r),u=Dy(s.baseId,r),d=r===s.value;return m.jsx(Ka,{asChild:!0,...i,focusable:!o,active:d,children:m.jsx(T.Primitive.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:F(e.onMouseDown,l=>{!o&&l.button===0&&l.ctrlKey===!1?s.onValueChange(r):l.preventDefault()}),onKeyDown:F(e.onKeyDown,l=>{[" ","Enter"].includes(l.key)&&s.onValueChange(r)}),onFocus:F(e.onFocus,()=>{const l=s.activationMode!=="manual";!d&&!o&&l&&s.onValueChange(r)})})})});My.displayName=Cy;var Ey="TabsContent",Ty=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=Ll(Ey,n),c=Py(i.baseId,r),u=Dy(i.baseId,r),d=r===i.value,l=h.useRef(d);return h.useEffect(()=>{const f=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(f)},[]),m.jsx(Ie,{present:o||d,children:({present:f})=>m.jsx(T.Primitive.div,{"data-state":d?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:l.current?"0s":void 0},children:f&&a})})});Ty.displayName=Ey;function Py(e,t){return`${e}-trigger-${t}`}function Dy(e,t){return`${e}-content-${t}`}var Dj=xy,Rj=Sy,Aj=My,Oj=Ty;function kj({className:e,...t}){return m.jsx(Dj,{"data-slot":"tabs",className:T.cn("flex flex-col gap-2",e),...t})}function Nj({className:e,...t}){return m.jsx(Rj,{"data-slot":"tabs-list",className:T.cn("bg-primary text-secondary-foreground inline-flex h-10 w-fit items-center justify-center rounded-md p-1 gap-2",e),...t})}function _j({className:e,...t}){return m.jsx(Aj,{"data-slot":"tabs-trigger",className:T.cn("cursor-pointer data-[state=active]:bg-background data-[state=active]:text-secondary data-[state=active]:rounded-xs focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-secondary-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-xs border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Ij({className:e,...t}){return m.jsx(Oj,{"data-slot":"tabs-content",className:T.cn("flex-1 outline-none",e),...t})}var jj=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Lj="VisuallyHidden",Ry=h.forwardRef((e,t)=>m.jsx(T.Primitive.span,{...e,ref:t,style:{...jj,...e.style}}));Ry.displayName=Lj;var $j=Ry,[as]=Ne("Tooltip",[gn]),ss=gn(),Ay="TooltipProvider",Fj=700,_i="tooltip.open",[Bj,$l]=as(Ay),Oy=e=>{const{__scopeTooltip:t,delayDuration:n=Fj,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=h.useRef(!0),i=h.useRef(!1),c=h.useRef(0);return h.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),m.jsx(Bj,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:h.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:h.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:h.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:a})};Oy.displayName=Ay;var Qr="Tooltip",[Vj,Mo]=as(Qr),ky=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,c=$l(Qr,e.__scopeTooltip),u=ss(t),[d,l]=h.useState(null),f=_e(),p=h.useRef(0),g=s??c.disableHoverableContent,b=i??c.delayDuration,y=h.useRef(!1),[v,x]=Ge({prop:r,defaultProp:o??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(_i))):c.onClose(),a==null||a(E)},caller:Qr}),w=h.useMemo(()=>v?y.current?"delayed-open":"instant-open":"closed",[v]),M=h.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y.current=!1,x(!0)},[x]),C=h.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),P=h.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{y.current=!0,x(!0),p.current=0},b)},[b,x]);return h.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),m.jsx(po,{...u,children:m.jsx(Vj,{scope:t,contentId:f,open:v,stateAttribute:w,trigger:d,onTriggerChange:l,onTriggerEnter:h.useCallback(()=>{c.isOpenDelayedRef.current?P():M()},[c.isOpenDelayedRef,P,M]),onTriggerLeave:h.useCallback(()=>{g?C():(window.clearTimeout(p.current),p.current=0)},[C,g]),onOpen:M,onClose:C,disableHoverableContent:g,children:n})})};ky.displayName=Qr;var Ii="TooltipTrigger",Ny=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Mo(Ii,n),a=$l(Ii,n),s=ss(n),i=h.useRef(null),c=ce(t,i,o.onTriggerChange),u=h.useRef(!1),d=h.useRef(!1),l=h.useCallback(()=>u.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",l),[l]),m.jsx(go,{asChild:!0,...s,children:m.jsx(T.Primitive.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:F(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:F(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:F(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",l,{once:!0})}),onFocus:F(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:F(e.onBlur,o.onClose),onClick:F(e.onClick,o.onClose)})})});Ny.displayName=Ii;var Fl="TooltipPortal",[Wj,zj]=as(Fl,{forceMount:void 0}),_y=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=Mo(Fl,t);return m.jsx(Wj,{scope:t,forceMount:n,children:m.jsx(Ie,{present:n||a.open,children:m.jsx(pr,{asChild:!0,container:o,children:r})})})};_y.displayName=Fl;var lr="TooltipContent",Iy=h.forwardRef((e,t)=>{const n=zj(lr,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=Mo(lr,e.__scopeTooltip);return m.jsx(Ie,{present:r||s.open,children:s.disableHoverableContent?m.jsx(jy,{side:o,...a,ref:t}):m.jsx(Hj,{side:o,...a,ref:t})})}),Hj=h.forwardRef((e,t)=>{const n=Mo(lr,e.__scopeTooltip),r=$l(lr,e.__scopeTooltip),o=h.useRef(null),a=ce(t,o),[s,i]=h.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:l}=r,f=h.useCallback(()=>{i(null),l(!1)},[l]),p=h.useCallback((g,b)=>{const y=g.currentTarget,v={x:g.clientX,y:g.clientY},x=Kj(v,y.getBoundingClientRect()),w=qj(v,x),M=Xj(b.getBoundingClientRect()),C=Qj([...w,...M]);i(C),l(!0)},[l]);return h.useEffect(()=>()=>f(),[f]),h.useEffect(()=>{if(c&&d){const g=y=>p(y,d),b=y=>p(y,c);return c.addEventListener("pointerleave",g),d.addEventListener("pointerleave",b),()=>{c.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",b)}}},[c,d,p,f]),h.useEffect(()=>{if(s){const g=b=>{const y=b.target,v={x:b.clientX,y:b.clientY},x=(c==null?void 0:c.contains(y))||(d==null?void 0:d.contains(y)),w=!Zj(v,s);x?f():w&&(f(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,d,s,u,f]),m.jsx(jy,{...e,ref:a})}),[Yj,Uj]=as(Qr,{isInside:!1}),Gj=wt.createSlottable("TooltipContent"),jy=h.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,c=Mo(lr,n),u=ss(n),{onClose:d}=c;return h.useEffect(()=>(document.addEventListener(_i,d),()=>document.removeEventListener(_i,d)),[d]),h.useEffect(()=>{if(c.trigger){const l=f=>{const p=f.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",l,{capture:!0}),()=>window.removeEventListener("scroll",l,{capture:!0})}},[c.trigger,d]),m.jsx(mr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:l=>l.preventDefault(),onDismiss:d,children:m.jsxs($a,{"data-state":c.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(Gj,{children:r}),m.jsx(Yj,{scope:n,isInside:!0,children:m.jsx($j,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Iy.displayName=lr;var Ly="TooltipArrow",$y=h.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ss(n);return Uj(Ly,n).isInside?null:m.jsx(Fa,{...o,...r,ref:t})});$y.displayName=Ly;function Kj(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function qj(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Xj(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Zj(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],c=t[s],u=i.x,d=i.y,l=c.x,f=c.y;d>r!=f>r&&n<(l-u)*(r-d)/(f-d)+u&&(o=!o)}return o}function Qj(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Jj(t)}function Jj(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var eL=Oy,tL=ky,nL=Ny,rL=_y,oL=Iy,aL=$y;function Bl({delayDuration:e=0,...t}){return m.jsx(eL,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Fy({...e}){return m.jsx(Bl,{children:m.jsx(tL,{"data-slot":"tooltip",...e})})}function By({...e}){return m.jsx(nL,{"data-slot":"tooltip-trigger",...e})}function Vy({className:e,sideOffset:t=0,children:n,...r}){return m.jsx(rL,{children:m.jsxs(oL,{"data-slot":"tooltip-content",sideOffset:t,className:T.cn("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,m.jsx(aL,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function sL(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 Wy=S.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Eo=()=>{const e=S.useContext(Wy);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};sL(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
92
92
  [data-state=closed]
93
93
  ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function iL(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function cL(){return Vl(/^Mac/)}function lL(){return Vl(/^iPhone/)}function uf(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function uL(){return Vl(/^iPad/)||cL()&&navigator.maxTouchPoints>1}function zy(){return lL()||uL()}function Vl(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const dL=24,fL=typeof window<"u"?S.useLayoutEffect:S.useEffect;function df(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Hs=typeof document<"u"&&window.visualViewport;function ff(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Hy(e){for(ff(e)&&(e=e.parentElement);e&&!ff(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const hL=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Bo=0,Ys;function mL(e={}){let{isDisabled:t}=e;fL(()=>{if(!t)return Bo++,Bo===1&&zy()&&(Ys=pL()),()=>{Bo--,Bo===0&&(Ys==null||Ys())}},[t])}function pL(){let e,t=0,n=l=>{e=Hy(l.target),!(e===document.documentElement&&e===document.body)&&(t=l.changedTouches[0].pageY)},r=l=>{if(!e||e===document.documentElement||e===document.body){l.preventDefault();return}let f=l.changedTouches[0].pageY,p=e.scrollTop,g=e.scrollHeight-e.clientHeight;g!==0&&((p<=0&&f>t||p>=g&&f<t)&&l.preventDefault(),t=f)},o=l=>{let f=l.target;ji(f)&&f!==document.activeElement&&(l.preventDefault(),f.style.transform="translateY(-2000px)",f.focus(),requestAnimationFrame(()=>{f.style.transform=""}))},a=l=>{let f=l.target;ji(f)&&(f.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{f.style.transform="",Hs&&(Hs.height<window.innerHeight?requestAnimationFrame(()=>{hf(f)}):Hs.addEventListener("resize",()=>hf(f),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},i=window.pageXOffset,c=window.pageYOffset,u=df(gL(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let d=df(Tr(document,"touchstart",n,{passive:!1,capture:!0}),Tr(document,"touchmove",r,{passive:!1,capture:!0}),Tr(document,"touchend",o,{passive:!1,capture:!0}),Tr(document,"focus",a,!0),Tr(window,"scroll",s));return()=>{u(),d(),window.scrollTo(i,c)}}function gL(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Tr(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function hf(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=Hy(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,a=e.getBoundingClientRect().bottom;const s=n.getBoundingClientRect().bottom+dL;a>s&&(n.scrollTop+=o-r)}e=n.parentElement}}function ji(e){return e instanceof HTMLInputElement&&!hL.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function vL(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function bL(...e){return t=>e.forEach(n=>vL(n,t))}function Yy(...e){return h.useCallback(bL(...e),e)}const Uy=new WeakMap;function Ye(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([o,a])=>{if(o.startsWith("--")){e.style.setProperty(o,a);return}r[o]=e.style[o],e.style[o]=a}),!n&&Uy.set(e,r)}function yL(e,t){if(!e||!(e instanceof HTMLElement))return;let n=Uy.get(e);n&&(e.style[t]=n[t])}const Be=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Vo(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Be(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Be(t)?5:4]):null)}function xL(e){return 8*(Math.log(e+1)-2)}function Us(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function wL(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const De={DURATION:.5,EASE:[.32,.72,0,1]},Gy=.4,SL=.25,CL=100,Ky=8,En=16,Li=26,Gs="vaul-dragging";function qy(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function ML({defaultProp:e,onChange:t}){const n=S.useState(e),[r]=n,o=S.useRef(r),a=qy(t);return S.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}function Xy({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=ML({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=qy(n),c=S.useCallback(u=>{if(a){const l=typeof u=="function"?u(e):u;l!==e&&i(l)}else o(u)},[a,e,o,i]);return[s,c]}function EL({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:s,direction:i="bottom",container:c,snapToSequentialPoint:u}){const[d,l]=Xy({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),[f,p]=S.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);S.useEffect(()=>{function E(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);const g=S.useMemo(()=>d===(n==null?void 0:n[n.length-1])||null,[n,d]),b=S.useMemo(()=>{var E;return(E=n==null?void 0:n.findIndex(D=>D===d))!=null?E:null},[n,d]),y=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===d||!n,v=S.useMemo(()=>{const E=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var D;return(D=n==null?void 0:n.map(R=>{const A=typeof R=="string";let N=0;if(A&&(N=parseInt(R,10)),Be(i)){const O=A?N:f?R*E.height:0;return f?i==="bottom"?E.height-O:-E.height+O:O}const z=A?N:f?R*E.width:0;return f?i==="right"?E.width-z:-E.width+z:z}))!=null?D:[]},[n,f,c]),x=S.useMemo(()=>b!==null?v==null?void 0:v[b]:null,[v,b]),w=S.useCallback(E=>{var D;const R=(D=v==null?void 0:v.findIndex(A=>A===E))!=null?D:null;s(R),Ye(r.current,{transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,transform:Be(i)?`translate3d(0, ${E}px, 0)`:`translate3d(${E}px, 0, 0)`}),v&&R!==v.length-1&&a!==void 0&&R!==a&&R<a?Ye(o.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,opacity:"0"}):Ye(o.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,opacity:"1"}),l(n==null?void 0:n[Math.max(R,0)])},[r.current,n,v,a,o,l]);S.useEffect(()=>{if(d||e){var E;const D=(E=n==null?void 0:n.findIndex(R=>R===e||R===d))!=null?E:-1;v&&D!==-1&&typeof v[D]=="number"&&w(v[D])}},[d,e,n,v,w]);function M({draggedDistance:E,closeDrawer:D,velocity:R,dismissible:A}){if(a===void 0)return;const N=i==="bottom"||i==="right"?(x??0)-E:(x??0)+E,z=b===a-1,O=b===0,U=E>0;if(z&&Ye(o.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`}),!u&&R>2&&!U){A?D():w(v[0]);return}if(!u&&R>2&&U&&v&&n){w(v[n.length-1]);return}const K=v==null?void 0:v.reduce(($,j)=>typeof $!="number"||typeof j!="number"?$:Math.abs(j-N)<Math.abs($-N)?j:$),B=Be(i)?window.innerHeight:window.innerWidth;if(R>Gy&&Math.abs(E)<B*.4){const $=U?1:-1;if($>0&&g&&n){w(v[n.length-1]);return}if(O&&$<0&&A&&D(),b===null)return;w(v[b+$]);return}w(K)}function C({draggedDistance:E}){if(x===null)return;const D=i==="bottom"||i==="right"?x-E:x+E;(i==="bottom"||i==="right")&&D<v[v.length-1]||(i==="top"||i==="left")&&D>v[v.length-1]||Ye(r.current,{transform:Be(i)?`translate3d(0, ${D}px, 0)`:`translate3d(${D}px, 0, 0)`})}function P(E,D){if(!n||typeof b!="number"||!v||a===void 0)return null;const R=b===a-1;if(b>=a&&D)return 0;if(R&&!D)return 1;if(!y&&!R)return null;const N=R?b+1:b-1,z=R?v[N]-v[N-1]:v[N+1]-v[N],O=E/Math.abs(z);return R?1-O:O}return{isLastSnapPoint:g,activeSnapPoint:d,shouldFade:y,getPercentageDragged:P,setActiveSnapPoint:l,activeSnapPointIndex:b,onRelease:M,onDrag:C,snapPointsOffset:v}}const TL=()=>()=>{};function PL(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=Eo(),a=S.useRef(null),s=S.useMemo(()=>document.body.style.backgroundColor,[]);function i(){return(window.innerWidth-Li)/window.innerWidth}S.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;wL(r&&!o?Us(document.body,{background:"black"}):TL,Us(c,{transformOrigin:Be(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${De.DURATION}s`,transitionTimingFunction:`cubic-bezier(${De.EASE.join(",")})`}));const u=Us(c,{borderRadius:`${Ky}px`,overflow:"hidden",...Be(e)?{transform:`scale(${i()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${i()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),a.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},De.DURATION*1e3)}}},[t,n,s])}let Pr=null;function DL({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[s,i]=S.useState(()=>typeof window<"u"?window.location.href:""),c=S.useRef(0),u=S.useCallback(()=>{if(uf()&&Pr===null&&e&&!a){Pr={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:l,innerHeight:f}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-l}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const p=f-window.innerHeight;p&&c.current>=f&&(document.body.style.top=`${-(c.current+p)}px`)}),300)}},[e]),d=S.useCallback(()=>{if(uf()&&Pr!==null&&!a){const l=-parseInt(document.body.style.top,10),f=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Pr),window.requestAnimationFrame(()=>{if(o&&s!==window.location.href){i(window.location.href);return}window.scrollTo(f,l)}),Pr=null}},[s]);return S.useEffect(()=>{function l(){c.current=window.scrollY}return l(),window.addEventListener("scroll",l),()=>{window.removeEventListener("scroll",l)}},[]),S.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||d()}},[t,d]),S.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{d()},500)):d())},[e,r,s,t,n,u,d]),{restorePositionSetting:d}}function RL({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:s=!1,setBackgroundColorOnScale:i=!0,closeThreshold:c=SL,scrollLockTimeout:u=CL,dismissible:d=!0,handleOnly:l=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:g,fixed:b,modal:y=!0,onClose:v,nested:x,noBodyStyles:w=!1,direction:M="bottom",defaultOpen:C=!1,disablePreventScroll:P=!0,snapToSequentialPoint:E=!1,preventScrollRestoration:D=!1,repositionInputs:R=!0,onAnimationEnd:A,container:N,autoFocus:z=!1}){var O,U;const[K=!1,B]=Xy({defaultProp:C,prop:e,onChange:W=>{t==null||t(W),!W&&!x&&Ze(),setTimeout(()=>{A==null||A(W)},De.DURATION*1e3),W&&!y&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),W||(document.body.style.pointerEvents="auto")}}),[$,j]=S.useState(!1),[_,Z]=S.useState(!1),[ae,k]=S.useState(!1),L=S.useRef(null),Y=S.useRef(null),V=S.useRef(null),Q=S.useRef(null),J=S.useRef(null),X=S.useRef(!1),re=S.useRef(null),he=S.useRef(0),le=S.useRef(!1),G=S.useRef(!C),ue=S.useRef(0),I=S.useRef(null),te=S.useRef(((O=I.current)==null?void 0:O.getBoundingClientRect().height)||0),me=S.useRef(((U=I.current)==null?void 0:U.getBoundingClientRect().width)||0),pe=S.useRef(0),xe=S.useCallback(W=>{a&&W===Me.length-1&&(Y.current=new Date)},[]),{activeSnapPoint:se,activeSnapPointIndex:ve,setActiveSnapPoint:Xe,onRelease:ge,snapPointsOffset:Me,onDrag:Le,shouldFade:Ke,getPercentageDragged:ze}=EL({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:g,drawerRef:I,fadeFromIndex:f,overlayRef:L,onSnapPointChange:xe,direction:M,container:N,snapToSequentialPoint:E});mL({isDisabled:!K||_||!y||ae||!$||!R||!P});const{restorePositionSetting:Ze}=DL({isOpen:K,modal:y,nested:x??!1,hasBeenOpened:$,preventScrollRestoration:D,noBodyStyles:w});function at(){return(window.innerWidth-Li)/window.innerWidth}function st(W){var ne,q;!d&&!a||I.current&&!I.current.contains(W.target)||(te.current=((ne=I.current)==null?void 0:ne.getBoundingClientRect().height)||0,me.current=((q=I.current)==null?void 0:q.getBoundingClientRect().width)||0,Z(!0),V.current=new Date,zy()&&window.addEventListener("touchend",()=>X.current=!1,{once:!0}),W.target.setPointerCapture(W.pointerId),he.current=Be(M)?W.pageY:W.pageX)}function $e(W,ne){var q;let ee=W;const de=(q=window.getSelection())==null?void 0:q.toString(),H=I.current?Vo(I.current,M):null,fe=new Date;if(ee.tagName==="SELECT"||ee.hasAttribute("data-vaul-no-drag")||ee.closest("[data-vaul-no-drag]"))return!1;if(M==="right"||M==="left")return!0;if(Y.current&&fe.getTime()-Y.current.getTime()<500)return!1;if(H!==null&&(M==="bottom"?H>0:H<0))return!0;if(de&&de.length>0)return!1;if(J.current&&fe.getTime()-J.current.getTime()<u&&H===0||ne)return J.current=fe,!1;for(;ee;){if(ee.scrollHeight>ee.clientHeight){if(ee.scrollTop!==0)return J.current=new Date,!1;if(ee.getAttribute("role")==="dialog")return!0}ee=ee.parentNode}return!0}function gt(W){if(I.current&&_){const ne=M==="bottom"||M==="right"?1:-1,q=(he.current-(Be(M)?W.pageY:W.pageX))*ne,ee=q>0,de=a&&!d&&!ee;if(de&&ve===0)return;const H=Math.abs(q),fe=document.querySelector("[data-vaul-drawer-wrapper]"),be=M==="bottom"||M==="top"?te.current:me.current;let we=H/be;const Qe=ze(H,ee);if(Qe!==null&&(we=Qe),de&&we>=1||!X.current&&!$e(W.target,ee))return;if(I.current.classList.add(Gs),X.current=!0,Ye(I.current,{transition:"none"}),Ye(L.current,{transition:"none"}),a&&Le({draggedDistance:q}),ee&&!a){const Pe=xL(q),Zt=Math.min(Pe*-1,0)*ne;Ye(I.current,{transform:Be(M)?`translate3d(0, ${Zt}px, 0)`:`translate3d(${Zt}px, 0, 0)`});return}const ye=1-we;if((Ke||f&&ve===f-1)&&(r==null||r(W,we),Ye(L.current,{opacity:`${ye}`,transition:"none"},!0)),fe&&L.current&&s){const Pe=Math.min(at()+we*(1-at()),1),Zt=8-we*8,it=Math.max(0,14-we*14);Ye(fe,{borderRadius:`${Zt}px`,transform:Be(M)?`scale(${Pe}) translate3d(0, ${it}px, 0)`:`scale(${Pe}) translate3d(${it}px, 0, 0)`,transition:"none"},!0)}if(!a){const Pe=H*ne;Ye(I.current,{transform:Be(M)?`translate3d(0, ${Pe}px, 0)`:`translate3d(${Pe}px, 0, 0)`})}}}S.useEffect(()=>{window.requestAnimationFrame(()=>{G.current=!0})},[]),S.useEffect(()=>{var W;function ne(){if(!I.current||!R)return;const q=document.activeElement;if(ji(q)||le.current){var ee;const de=((ee=window.visualViewport)==null?void 0:ee.height)||0,H=window.innerHeight;let fe=H-de;const be=I.current.getBoundingClientRect().height||0,we=be>H*.8;pe.current||(pe.current=be);const Qe=I.current.getBoundingClientRect().top;if(Math.abs(ue.current-fe)>60&&(le.current=!le.current),a&&a.length>0&&Me&&ve){const ye=Me[ve]||0;fe+=ye}if(ue.current=fe,be>de||le.current){const ye=I.current.getBoundingClientRect().height;let Pe=ye;ye>de&&(Pe=de-(we?Qe:Li)),b?I.current.style.height=`${ye-Math.max(fe,0)}px`:I.current.style.height=`${Math.max(Pe,de-Qe)}px`}else iL()||(I.current.style.height=`${pe.current}px`);a&&a.length>0&&!le.current?I.current.style.bottom="0px":I.current.style.bottom=`${Math.max(fe,0)}px`}}return(W=window.visualViewport)==null||W.addEventListener("resize",ne),()=>{var q;return(q=window.visualViewport)==null?void 0:q.removeEventListener("resize",ne)}},[ve,a,Me]);function Fe(W){Ct(),v==null||v(),W||B(!1),setTimeout(()=>{a&&Xe(a[0])},De.DURATION*1e3)}function He(){if(!I.current)return;const W=document.querySelector("[data-vaul-drawer-wrapper]"),ne=Vo(I.current,M);Ye(I.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`}),Ye(L.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,opacity:"1"}),s&&ne&&ne>0&&K&&Ye(W,{borderRadius:`${Ky}px`,overflow:"hidden",...Be(M)?{transform:`scale(${at()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${at()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${De.DURATION}s`,transitionTimingFunction:`cubic-bezier(${De.EASE.join(",")})`},!0)}function Ct(){!_||!I.current||(I.current.classList.remove(Gs),X.current=!1,Z(!1),Q.current=new Date)}function jt(W){if(!_||!I.current)return;I.current.classList.remove(Gs),X.current=!1,Z(!1),Q.current=new Date;const ne=Vo(I.current,M);if(!W||!$e(W.target,!1)||!ne||Number.isNaN(ne)||V.current===null)return;const q=Q.current.getTime()-V.current.getTime(),ee=he.current-(Be(M)?W.pageY:W.pageX),de=Math.abs(ee)/q;if(de>.05&&(k(!0),setTimeout(()=>{k(!1)},200)),a){ge({draggedDistance:ee*(M==="bottom"||M==="right"?1:-1),closeDrawer:Fe,velocity:de,dismissible:d}),o==null||o(W,!0);return}if(M==="bottom"||M==="right"?ee>0:ee<0){He(),o==null||o(W,!0);return}if(de>Gy){Fe(),o==null||o(W,!1);return}var H;const fe=Math.min((H=I.current.getBoundingClientRect().height)!=null?H:0,window.innerHeight);var be;const we=Math.min((be=I.current.getBoundingClientRect().width)!=null?be:0,window.innerWidth),Qe=M==="left"||M==="right";if(Math.abs(ne)>=(Qe?we:fe)*c){Fe(),o==null||o(W,!1);return}o==null||o(W,!0),He()}S.useEffect(()=>(K&&(Ye(document.documentElement,{scrollBehavior:"auto"}),Y.current=new Date),()=>{yL(document.documentElement,"scrollBehavior")}),[K]);function Xt(W){const ne=W?(window.innerWidth-En)/window.innerWidth:1,q=W?-En:0;re.current&&window.clearTimeout(re.current),Ye(I.current,{transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,transform:Be(M)?`scale(${ne}) translate3d(0, ${q}px, 0)`:`scale(${ne}) translate3d(${q}px, 0, 0)`}),!W&&I.current&&(re.current=setTimeout(()=>{const ee=Vo(I.current,M);Ye(I.current,{transition:"none",transform:Be(M)?`translate3d(0, ${ee}px, 0)`:`translate3d(${ee}px, 0, 0)`})},500))}function Sn(W,ne){if(ne<0)return;const q=(window.innerWidth-En)/window.innerWidth,ee=q+ne*(1-q),de=-En+ne*En;Ye(I.current,{transform:Be(M)?`scale(${ee}) translate3d(0, ${de}px, 0)`:`scale(${ee}) translate3d(${de}px, 0, 0)`,transition:"none"})}function Lt(W,ne){const q=Be(M)?window.innerHeight:window.innerWidth,ee=ne?(q-En)/q:1,de=ne?-En:0;ne&&Ye(I.current,{transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,transform:Be(M)?`scale(${ee}) translate3d(0, ${de}px, 0)`:`scale(${ee}) translate3d(${de}px, 0, 0)`})}return S.useEffect(()=>{y||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[y]),S.createElement(ro,{defaultOpen:C,onOpenChange:W=>{!d&&!W||(W?j(!0):Fe(!0),B(W))},open:K},S.createElement(Wy.Provider,{value:{activeSnapPoint:se,snapPoints:a,setActiveSnapPoint:Xe,drawerRef:I,overlayRef:L,onOpenChange:t,onPress:st,onRelease:jt,onDrag:gt,dismissible:d,shouldAnimate:G,handleOnly:l,isOpen:K,isDragging:_,shouldFade:Ke,closeDrawer:Fe,onNestedDrag:Sn,onNestedOpenChange:Xt,onNestedRelease:Lt,keyboardIsOpen:le,modal:y,snapPointsOffset:Me,activeSnapPointIndex:ve,direction:M,shouldScaleBackground:s,setBackgroundColorOnScale:i,noBodyStyles:w,container:N,autoFocus:z}},n))}const Zy=S.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:s,modal:i,shouldAnimate:c}=Eo(),u=Yy(t,n),d=r&&r.length>0;if(!i)return null;const l=S.useCallback(f=>o(f),[o]);return S.createElement(ao,{onMouseUp:l,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":s&&d?"true":"false","data-vaul-snap-points-overlay":s&&a?"true":"false","data-vaul-animate":c!=null&&c.current?"true":"false",...e})});Zy.displayName="Drawer.Overlay";const Qy=S.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:s,onRelease:i,onDrag:c,keyboardIsOpen:u,snapPointsOffset:d,activeSnapPointIndex:l,modal:f,isOpen:p,direction:g,snapPoints:b,container:y,handleOnly:v,shouldAnimate:x,autoFocus:w}=Eo(),[M,C]=S.useState(!1),P=Yy(o,a),E=S.useRef(null),D=S.useRef(null),R=S.useRef(!1),A=b&&b.length>0;PL();const N=(O,U,K=0)=>{if(R.current)return!0;const B=Math.abs(O.y),$=Math.abs(O.x),j=$>B,_=["bottom","right"].includes(U)?1:-1;if(U==="left"||U==="right"){if(!(O.x*_<0)&&$>=0&&$<=K)return j}else if(!(O.y*_<0)&&B>=0&&B<=K)return!j;return R.current=!0,!0};S.useEffect(()=>{A&&window.requestAnimationFrame(()=>{C(!0)})},[]);function z(O){E.current=null,R.current=!1,i(O)}return S.createElement(so,{"data-vaul-drawer-direction":g,"data-vaul-drawer":"","data-vaul-delayed-snap-points":M?"true":"false","data-vaul-snap-points":p&&A?"true":"false","data-vaul-custom-container":y?"true":"false","data-vaul-animate":x!=null&&x.current?"true":"false",...r,ref:P,style:d&&d.length>0?{"--snap-point-height":`${d[l??0]}px`,...t}:t,onPointerDown:O=>{v||(r.onPointerDown==null||r.onPointerDown.call(r,O),E.current={x:O.pageX,y:O.pageY},s(O))},onOpenAutoFocus:O=>{n==null||n(O),w||O.preventDefault()},onPointerDownOutside:O=>{if(e==null||e(O),!f||O.defaultPrevented){O.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:O=>{if(!f){O.preventDefault();return}},onPointerMove:O=>{if(D.current=O,v||(r.onPointerMove==null||r.onPointerMove.call(r,O),!E.current))return;const U=O.pageY-E.current.y,K=O.pageX-E.current.x,B=O.pointerType==="touch"?10:2;N({x:K,y:U},g,B)?c(O):(Math.abs(K)>B||Math.abs(U)>B)&&(E.current=null)},onPointerUp:O=>{r.onPointerUp==null||r.onPointerUp.call(r,O),E.current=null,R.current=!1,i(O)},onPointerOut:O=>{r.onPointerOut==null||r.onPointerOut.call(r,O),z(D.current)},onContextMenu:O=>{r.onContextMenu==null||r.onContextMenu.call(r,O),D.current&&z(D.current)}})});Qy.displayName="Drawer.Content";const AL=250,OL=120,kL=S.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:s,activeSnapPoint:i,setActiveSnapPoint:c,dismissible:u,handleOnly:d,isOpen:l,onPress:f,onDrag:p}=Eo(),g=S.useRef(null),b=S.useRef(!1);function y(){if(b.current){w();return}window.setTimeout(()=>{v()},OL)}function v(){if(a||e||b.current){w();return}if(w(),!s||s.length===0){u||o();return}if(i===s[s.length-1]&&u){o();return}const C=s.findIndex(E=>E===i);if(C===-1)return;const P=s[C+1];c(P)}function x(){g.current=window.setTimeout(()=>{b.current=!0},AL)}function w(){g.current&&window.clearTimeout(g.current),b.current=!1}return S.createElement("div",{onClick:y,onPointerCancel:w,onPointerDown:M=>{d&&f(M),x()},onPointerMove:M=>{d&&p(M)},ref:r,"data-vaul-drawer-visible":l?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},S.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});kL.displayName="Drawer.Handle";function NL(e){const t=Eo(),{container:n=t.container,...r}=e;return S.createElement(oo,{container:n,...r})}const wn={Root:RL,Content:Qy,Overlay:Zy,Trigger:Pa,Portal:NL,Close:Ln,Title:Da,Description:Ra};function _L({...e}){return m.jsx(wn.Root,{"data-slot":"drawer",...e})}function IL({...e}){return m.jsx(wn.Trigger,{"data-slot":"drawer-trigger",...e})}function Jy({...e}){return m.jsx(wn.Portal,{"data-slot":"drawer-portal",...e})}function jL({...e}){return m.jsx(wn.Close,{"data-slot":"drawer-close",...e})}function ex({className:e,...t}){return m.jsx(wn.Overlay,{"data-slot":"drawer-overlay",className:T.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function LL({className:e,children:t,...n}){return m.jsxs(Jy,{"data-slot":"drawer-portal",children:[m.jsx(ex,{}),m.jsxs(wn.Content,{"data-slot":"drawer-content",className:T.cn("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",e),...n,children:[m.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),t]})]})}function $L({className:e,...t}){return m.jsx("div",{"data-slot":"drawer-header",className:T.cn("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",e),...t})}function FL({className:e,...t}){return m.jsx("div",{"data-slot":"drawer-footer",className:T.cn("mt-auto flex flex-col gap-2 p-4",e),...t})}function BL({className:e,...t}){return m.jsx(wn.Title,{"data-slot":"drawer-title",className:T.cn("text-foreground font-semibold",e),...t})}function VL({className:e,...t}){return m.jsx(wn.Description,{"data-slot":"drawer-description",className:T.cn("text-muted-foreground text-sm",e),...t})}function tx({...e}){return m.jsx(ro,{"data-slot":"sheet",...e})}function WL({...e}){return m.jsx(Pa,{"data-slot":"sheet-trigger",...e})}function zL({...e}){return m.jsx(Ln,{"data-slot":"sheet-close",...e})}function HL({...e}){return m.jsx(oo,{"data-slot":"sheet-portal",...e})}function YL({className:e,...t}){return m.jsx(ao,{"data-slot":"sheet-overlay",className:T.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function nx({className:e,children:t,side:n="right",...r}){return m.jsxs(HL,{children:[m.jsx(YL,{}),m.jsxs(so,{"data-slot":"sheet-content",className:T.cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,m.jsxs(Ln,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[m.jsx(Te.XIcon,{className:"size-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function rx({className:e,...t}){return m.jsx("div",{"data-slot":"sheet-header",className:T.cn("flex flex-col gap-1.5 p-4",e),...t})}function UL({className:e,...t}){return m.jsx("div",{"data-slot":"sheet-footer",className:T.cn("mt-auto flex flex-col gap-2 p-4",e),...t})}function ox({className:e,...t}){return m.jsx(Da,{"data-slot":"sheet-title",className:T.cn("text-foreground font-semibold",e),...t})}function ax({className:e,...t}){return m.jsx(Ra,{"data-slot":"sheet-description",className:T.cn("text-muted-foreground text-sm",e),...t})}var GL=(e,t,n,r,o,a,s,i)=>{let c=document.documentElement,u=["light","dark"];function d(p){(Array.isArray(e)?e:[e]).forEach(g=>{let b=g==="class",y=b&&a?o.map(v=>a[v]||v):o;b?(c.classList.remove(...y),c.classList.add(a&&a[p]?a[p]:p)):c.setAttribute(g,p)}),l(p)}function l(p){i&&u.includes(p)&&(c.style.colorScheme=p)}function f(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)d(r);else try{let p=localStorage.getItem(t)||n,g=s&&p==="system"?f():p;d(g)}catch{}},KL=h.createContext(void 0),qL={setTheme:e=>{},themes:[]},XL=()=>{var e;return(e=h.useContext(KL))!=null?e:qL};h.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:a,value:s,themes:i,nonce:c,scriptProps:u})=>{let d=JSON.stringify([n,t,a,e,i,s,r,o]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${GL.toString()})(${d})`}})});function ZL(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 QL=e=>{switch(e){case"success":return t$;case"info":return r$;case"warning":return n$;case"error":return o$;default:return null}},JL=Array(12).fill(0),e$=({visible:e,className:t})=>S.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},S.createElement("div",{className:"sonner-spinner"},JL.map((n,r)=>S.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),t$=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.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"})),n$=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},S.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"})),r$=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.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"})),o$=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.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"})),a$=S.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"},S.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),s$=()=>{const[e,t]=S.useState(document.hidden);return S.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let $i=1;class i${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:r,...o}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:$i++,s=this.toasts.find(c=>c.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(c=>c.id===a?(this.publish({...c,...t,id:a,title:r}),{...c,...t,id:a,dismissible:i,title:r}):c):this.addToast({title:r,...o,dismissible:i,id:a}),a},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(r=>r({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 r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=o.then(async u=>{if(s=["resolve",u],S.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(l$(u)&&!u.ok){a=!1;const l=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,g=typeof l=="object"&&!S.isValidElement(l)?l:{message:l};this.create({id:r,type:"error",description:f,...g})}else if(u instanceof Error){a=!1;const l=typeof n.error=="function"?await n.error(u):n.error,f=typeof n.description=="function"?await n.description(u):n.description,g=typeof l=="object"&&!S.isValidElement(l)?l:{message:l};this.create({id:r,type:"error",description:f,...g})}else if(n.success!==void 0){a=!1;const l=typeof n.success=="function"?await n.success(u):n.success,f=typeof n.description=="function"?await n.description(u):n.description,g=typeof l=="object"&&!S.isValidElement(l)?l:{message:l};this.create({id:r,type:"success",description:f,...g})}}).catch(async u=>{if(s=["reject",u],n.error!==void 0){a=!1;const d=typeof n.error=="function"?await n.error(u):n.error,l=typeof n.description=="function"?await n.description(u):n.description,p=typeof d=="object"&&!S.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:l,...p})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((u,d)=>i.then(()=>s[0]==="reject"?d(s[1]):u(s[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||$i++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ct=new i$,c$=(e,t)=>{const n=(t==null?void 0:t.id)||$i++;return ct.addToast({title:e,...t,id:n}),n},l$=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",u$=c$,d$=()=>ct.toasts,f$=()=>ct.getActiveToasts();Object.assign(u$,{success:ct.success,info:ct.info,warning:ct.warning,error:ct.error,custom:ct.custom,message:ct.message,promise:ct.promise,dismiss:ct.dismiss,loading:ct.loading},{getHistory:d$,getToasts:f$});ZL("[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 Wo(e){return e.label!==void 0}const h$=3,m$="24px",p$="16px",mf=4e3,g$=356,v$=14,b$=45,y$=200;function $t(...e){return e.filter(Boolean).join(" ")}function x$(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const w$=e=>{var t,n,r,o,a,s,i,c,u;const{invert:d,toast:l,unstyled:f,interacting:p,setHeights:g,visibleToasts:b,heights:y,index:v,toasts:x,expanded:w,removeToast:M,defaultRichColors:C,closeButton:P,style:E,cancelButtonStyle:D,actionButtonStyle:R,className:A="",descriptionClassName:N="",duration:z,position:O,gap:U,expandByDefault:K,classNames:B,icons:$,closeButtonAriaLabel:j="Close toast"}=e,[_,Z]=S.useState(null),[ae,k]=S.useState(null),[L,Y]=S.useState(!1),[V,Q]=S.useState(!1),[J,X]=S.useState(!1),[re,he]=S.useState(!1),[le,G]=S.useState(!1),[ue,I]=S.useState(0),[te,me]=S.useState(0),pe=S.useRef(l.duration||z||mf),xe=S.useRef(null),se=S.useRef(null),ve=v===0,Xe=v+1<=b,ge=l.type,Me=l.dismissible!==!1,Le=l.className||"",Ke=l.descriptionClassName||"",ze=S.useMemo(()=>y.findIndex(H=>H.toastId===l.id)||0,[y,l.id]),Ze=S.useMemo(()=>{var H;return(H=l.closeButton)!=null?H:P},[l.closeButton,P]),at=S.useMemo(()=>l.duration||z||mf,[l.duration,z]),st=S.useRef(0),$e=S.useRef(0),gt=S.useRef(0),Fe=S.useRef(null),[He,Ct]=O.split("-"),jt=S.useMemo(()=>y.reduce((H,fe,be)=>be>=ze?H:H+fe.height,0),[y,ze]),Xt=s$(),Sn=l.invert||d,Lt=ge==="loading";$e.current=S.useMemo(()=>ze*U+jt,[ze,jt]),S.useEffect(()=>{pe.current=at},[at]),S.useEffect(()=>{Y(!0)},[]),S.useEffect(()=>{const H=se.current;if(H){const fe=H.getBoundingClientRect().height;return me(fe),g(be=>[{toastId:l.id,height:fe,position:l.position},...be]),()=>g(be=>be.filter(we=>we.toastId!==l.id))}},[g,l.id]),S.useLayoutEffect(()=>{if(!L)return;const H=se.current,fe=H.style.height;H.style.height="auto";const be=H.getBoundingClientRect().height;H.style.height=fe,me(be),g(we=>we.find(ye=>ye.toastId===l.id)?we.map(ye=>ye.toastId===l.id?{...ye,height:be}:ye):[{toastId:l.id,height:be,position:l.position},...we])},[L,l.title,l.description,g,l.id,l.jsx,l.action,l.cancel]);const W=S.useCallback(()=>{Q(!0),I($e.current),g(H=>H.filter(fe=>fe.toastId!==l.id)),setTimeout(()=>{M(l)},y$)},[l,M,g,$e]);S.useEffect(()=>{if(l.promise&&ge==="loading"||l.duration===1/0||l.type==="loading")return;let H;return w||p||Xt?(()=>{if(gt.current<st.current){const we=new Date().getTime()-st.current;pe.current=pe.current-we}gt.current=new Date().getTime()})():(()=>{pe.current!==1/0&&(st.current=new Date().getTime(),H=setTimeout(()=>{l.onAutoClose==null||l.onAutoClose.call(l,l),W()},pe.current))})(),()=>clearTimeout(H)},[w,p,l,ge,Xt,W]),S.useEffect(()=>{l.delete&&(W(),l.onDismiss==null||l.onDismiss.call(l,l))},[W,l.delete]);function ne(){var H;if($!=null&&$.loading){var fe;return S.createElement("div",{className:$t(B==null?void 0:B.loader,l==null||(fe=l.classNames)==null?void 0:fe.loader,"sonner-loader"),"data-visible":ge==="loading"},$.loading)}return S.createElement(e$,{className:$t(B==null?void 0:B.loader,l==null||(H=l.classNames)==null?void 0:H.loader),visible:ge==="loading"})}const q=l.icon||($==null?void 0:$[ge])||QL(ge);var ee,de;return S.createElement("li",{tabIndex:0,ref:se,className:$t(A,Le,B==null?void 0:B.toast,l==null||(t=l.classNames)==null?void 0:t.toast,B==null?void 0:B.default,B==null?void 0:B[ge],l==null||(n=l.classNames)==null?void 0:n[ge]),"data-sonner-toast":"","data-rich-colors":(ee=l.richColors)!=null?ee:C,"data-styled":!(l.jsx||l.unstyled||f),"data-mounted":L,"data-promise":!!l.promise,"data-swiped":le,"data-removed":V,"data-visible":Xe,"data-y-position":He,"data-x-position":Ct,"data-index":v,"data-front":ve,"data-swiping":J,"data-dismissible":Me,"data-type":ge,"data-invert":Sn,"data-swipe-out":re,"data-swipe-direction":ae,"data-expanded":!!(w||K&&L),"data-testid":l.testId,style:{"--index":v,"--toasts-before":v,"--z-index":x.length-v,"--offset":`${V?ue:$e.current}px`,"--initial-height":K?"auto":`${te}px`,...E,...l.style},onDragEnd:()=>{X(!1),Z(null),Fe.current=null},onPointerDown:H=>{H.button!==2&&(Lt||!Me||(xe.current=new Date,I($e.current),H.target.setPointerCapture(H.pointerId),H.target.tagName!=="BUTTON"&&(X(!0),Fe.current={x:H.clientX,y:H.clientY})))},onPointerUp:()=>{var H,fe,be;if(re||!Me)return;Fe.current=null;const we=Number(((H=se.current)==null?void 0:H.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Qe=Number(((fe=se.current)==null?void 0:fe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ye=new Date().getTime()-((be=xe.current)==null?void 0:be.getTime()),Pe=_==="x"?we:Qe,Zt=Math.abs(Pe)/ye;if(Math.abs(Pe)>=b$||Zt>.11){I($e.current),l.onDismiss==null||l.onDismiss.call(l,l),k(_==="x"?we>0?"right":"left":Qe>0?"down":"up"),W(),he(!0);return}else{var it,Mt;(it=se.current)==null||it.style.setProperty("--swipe-amount-x","0px"),(Mt=se.current)==null||Mt.style.setProperty("--swipe-amount-y","0px")}G(!1),X(!1),Z(null)},onPointerMove:H=>{var fe,be,we;if(!Fe.current||!Me||((fe=window.getSelection())==null?void 0:fe.toString().length)>0)return;const ye=H.clientY-Fe.current.y,Pe=H.clientX-Fe.current.x;var Zt;const it=(Zt=e.swipeDirections)!=null?Zt:x$(O);!_&&(Math.abs(Pe)>1||Math.abs(ye)>1)&&Z(Math.abs(Pe)>Math.abs(ye)?"x":"y");let Mt={x:0,y:0};const Hl=Cn=>1/(1.5+Math.abs(Cn)/20);if(_==="y"){if(it.includes("top")||it.includes("bottom"))if(it.includes("top")&&ye<0||it.includes("bottom")&&ye>0)Mt.y=ye;else{const Cn=ye*Hl(ye);Mt.y=Math.abs(Cn)<Math.abs(ye)?Cn:ye}}else if(_==="x"&&(it.includes("left")||it.includes("right")))if(it.includes("left")&&Pe<0||it.includes("right")&&Pe>0)Mt.x=Pe;else{const Cn=Pe*Hl(Pe);Mt.x=Math.abs(Cn)<Math.abs(Pe)?Cn:Pe}(Math.abs(Mt.x)>0||Math.abs(Mt.y)>0)&&G(!0),(be=se.current)==null||be.style.setProperty("--swipe-amount-x",`${Mt.x}px`),(we=se.current)==null||we.style.setProperty("--swipe-amount-y",`${Mt.y}px`)}},Ze&&!l.jsx&&ge!=="loading"?S.createElement("button",{"aria-label":j,"data-disabled":Lt,"data-close-button":!0,onClick:Lt||!Me?()=>{}:()=>{W(),l.onDismiss==null||l.onDismiss.call(l,l)},className:$t(B==null?void 0:B.closeButton,l==null||(r=l.classNames)==null?void 0:r.closeButton)},(de=$==null?void 0:$.close)!=null?de:a$):null,(ge||l.icon||l.promise)&&l.icon!==null&&(($==null?void 0:$[ge])!==null||l.icon)?S.createElement("div",{"data-icon":"",className:$t(B==null?void 0:B.icon,l==null||(o=l.classNames)==null?void 0:o.icon)},l.promise||l.type==="loading"&&!l.icon?l.icon||ne():null,l.type!=="loading"?q:null):null,S.createElement("div",{"data-content":"",className:$t(B==null?void 0:B.content,l==null||(a=l.classNames)==null?void 0:a.content)},S.createElement("div",{"data-title":"",className:$t(B==null?void 0:B.title,l==null||(s=l.classNames)==null?void 0:s.title)},l.jsx?l.jsx:typeof l.title=="function"?l.title():l.title),l.description?S.createElement("div",{"data-description":"",className:$t(N,Ke,B==null?void 0:B.description,l==null||(i=l.classNames)==null?void 0:i.description)},typeof l.description=="function"?l.description():l.description):null),S.isValidElement(l.cancel)?l.cancel:l.cancel&&Wo(l.cancel)?S.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||D,onClick:H=>{Wo(l.cancel)&&Me&&(l.cancel.onClick==null||l.cancel.onClick.call(l.cancel,H),W())},className:$t(B==null?void 0:B.cancelButton,l==null||(c=l.classNames)==null?void 0:c.cancelButton)},l.cancel.label):null,S.isValidElement(l.action)?l.action:l.action&&Wo(l.action)?S.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||R,onClick:H=>{Wo(l.action)&&(l.action.onClick==null||l.action.onClick.call(l.action,H),!H.defaultPrevented&&W())},className:$t(B==null?void 0:B.actionButton,l==null||(u=l.classNames)==null?void 0:u.actionButton)},l.action.label):null)};function pf(){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 S$(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?p$:m$;function c(u){["top","right","bottom","left"].forEach(d=>{n[`${s}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=i:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(i)}),n}const C$=S.forwardRef(function(t,n){const{id:r,invert:o,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:c,className:u,offset:d,mobileOffset:l,theme:f="light",richColors:p,duration:g,style:b,visibleToasts:y=h$,toastOptions:v,dir:x=pf(),gap:w=v$,icons:M,containerAriaLabel:C="Notifications"}=t,[P,E]=S.useState([]),D=S.useMemo(()=>r?P.filter(L=>L.toasterId===r):P.filter(L=>!L.toasterId),[P,r]),R=S.useMemo(()=>Array.from(new Set([a].concat(D.filter(L=>L.position).map(L=>L.position)))),[D,a]),[A,N]=S.useState([]),[z,O]=S.useState(!1),[U,K]=S.useState(!1),[B,$]=S.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=S.useRef(null),_=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),Z=S.useRef(null),ae=S.useRef(!1),k=S.useCallback(L=>{E(Y=>{var V;return(V=Y.find(Q=>Q.id===L.id))!=null&&V.delete||ct.dismiss(L.id),Y.filter(({id:Q})=>Q!==L.id)})},[]);return S.useEffect(()=>ct.subscribe(L=>{if(L.dismiss){requestAnimationFrame(()=>{E(Y=>Y.map(V=>V.id===L.id?{...V,delete:!0}:V))});return}setTimeout(()=>{Wi.flushSync(()=>{E(Y=>{const V=Y.findIndex(Q=>Q.id===L.id);return V!==-1?[...Y.slice(0,V),{...Y[V],...L},...Y.slice(V+1)]:[L,...Y]})})})}),[P]),S.useEffect(()=>{if(f!=="system"){$(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const L=window.matchMedia("(prefers-color-scheme: dark)");try{L.addEventListener("change",({matches:Y})=>{$(Y?"dark":"light")})}catch{L.addListener(({matches:V})=>{try{$(V?"dark":"light")}catch(Q){console.error(Q)}})}},[f]),S.useEffect(()=>{P.length<=1&&O(!1)},[P]),S.useEffect(()=>{const L=Y=>{var V;if(s.every(X=>Y[X]||Y.code===X)){var J;O(!0),(J=j.current)==null||J.focus()}Y.code==="Escape"&&(document.activeElement===j.current||(V=j.current)!=null&&V.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[s]),S.useEffect(()=>{if(j.current)return()=>{Z.current&&(Z.current.focus({preventScroll:!0}),Z.current=null,ae.current=!1)}},[j.current]),S.createElement("section",{ref:n,"aria-label":`${C} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((L,Y)=>{var V;const[Q,J]=L.split("-");return D.length?S.createElement("ol",{key:L,dir:x==="auto"?pf():x,tabIndex:-1,ref:j,className:u,"data-sonner-toaster":!0,"data-sonner-theme":B,"data-y-position":Q,"data-x-position":J,style:{"--front-toast-height":`${((V=A[0])==null?void 0:V.height)||0}px`,"--width":`${g$}px`,"--gap":`${w}px`,...b,...S$(d,l)},onBlur:X=>{ae.current&&!X.currentTarget.contains(X.relatedTarget)&&(ae.current=!1,Z.current&&(Z.current.focus({preventScroll:!0}),Z.current=null))},onFocus:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||ae.current||(ae.current=!0,Z.current=X.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{U||O(!1)},onDragEnd:()=>O(!1),onPointerDown:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},D.filter(X=>!X.position&&Y===0||X.position===L).map((X,re)=>{var he,le;return S.createElement(w$,{key:X.id,icons:M,index:re,toast:X,defaultRichColors:p,duration:(he=v==null?void 0:v.duration)!=null?he:g,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:o,visibleToasts:y,closeButton:(le=v==null?void 0:v.closeButton)!=null?le:c,interacting:U,position:L,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:k,toasts:D.filter(G=>G.position==X.position),heights:A.filter(G=>G.position==X.position),setHeights:N,expandByDefault:i,gap:w,expanded:z,swipeDirections:t.swipeDirections})})):null}))}),M$=({...e})=>{const{theme:t="system"}=XL();return m.jsx(C$,{theme:t,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})};var sx="Toggle",ix=h.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...a}=e,[s,i]=Ge({prop:n,onChange:o,defaultProp:r??!1,caller:sx});return m.jsx(T.Primitive.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:F(e.onClick,()=>{e.disabled||i(!s)})})});ix.displayName=sx;var E$=ix;const T$=T.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function P$({className:e,variant:t,size:n,...r}){return m.jsx(E$,{"data-slot":"toggle",className:T.cn(T$({variant:t,size:n,className:e})),...r})}var To="Menubar",[Fi,D$,R$]=bo(To),[cx]=Ne(To,[R$,yn]),rt=wo(),lx=yn(),[A$,Wl]=cx(To),ux=h.forwardRef((e,t)=>{const{__scopeMenubar:n,value:r,onValueChange:o,defaultValue:a,loop:s=!0,dir:i,...c}=e,u=bn(i),d=lx(n),[l,f]=Ge({prop:r,onChange:o,defaultProp:a??"",caller:To}),[p,g]=h.useState(null);return m.jsx(A$,{scope:n,value:l,onMenuOpen:h.useCallback(b=>{f(b),g(b)},[f]),onMenuClose:h.useCallback(()=>f(""),[f]),onMenuToggle:h.useCallback(b=>{f(y=>y?"":b),g(b)},[f]),dir:u,loop:s,children:m.jsx(Fi.Provider,{scope:n,children:m.jsx(Fi.Slot,{scope:n,children:m.jsx(Ga,{asChild:!0,...d,orientation:"horizontal",loop:s,dir:u,currentTabStopId:p,onCurrentTabStopIdChange:g,children:m.jsx(T.Primitive.div,{role:"menubar",...c,ref:t})})})})})});ux.displayName=To;var zl="MenubarMenu",[O$,dx]=cx(zl),fx=e=>{const{__scopeMenubar:t,value:n,...r}=e,o=_e(),a=n||o||"LEGACY_REACT_AUTO_VALUE",s=Wl(zl,t),i=rt(t),c=h.useRef(null),u=h.useRef(!1),d=s.value===a;return h.useEffect(()=>{d||(u.current=!1)},[d]),m.jsx(O$,{scope:t,value:a,triggerId:_e(),triggerRef:c,contentId:_e(),wasKeyboardTriggerOpenRef:u,children:m.jsx(pl,{...i,open:d,onOpenChange:l=>{l||s.onMenuClose()},modal:!1,dir:s.dir,...r})})};fx.displayName=zl;var Bi="MenubarTrigger",hx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,disabled:r=!1,...o}=e,a=lx(n),s=rt(n),i=Wl(Bi,n),c=dx(Bi,n),u=h.useRef(null),d=ce(t,u,c.triggerRef),[l,f]=h.useState(!1),p=i.value===c.value;return m.jsx(Fi.ItemSlot,{scope:n,value:c.value,disabled:r,children:m.jsx(Ka,{asChild:!0,...a,focusable:!r,tabStopId:c.value,children:m.jsx(gl,{asChild:!0,...s,children:m.jsx(T.Primitive.button,{type:"button",role:"menuitem",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?c.contentId:void 0,"data-highlighted":l?"":void 0,"data-state":p?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:d,onPointerDown:F(e.onPointerDown,g=>{!r&&g.button===0&&g.ctrlKey===!1&&(i.onMenuOpen(c.value),p||g.preventDefault())}),onPointerEnter:F(e.onPointerEnter,()=>{var b;!!i.value&&!p&&(i.onMenuOpen(c.value),(b=u.current)==null||b.focus())}),onKeyDown:F(e.onKeyDown,g=>{r||(["Enter"," "].includes(g.key)&&i.onMenuToggle(c.value),g.key==="ArrowDown"&&i.onMenuOpen(c.value),["Enter"," ","ArrowDown"].includes(g.key)&&(c.wasKeyboardTriggerOpenRef.current=!0,g.preventDefault()))}),onFocus:F(e.onFocus,()=>f(!0)),onBlur:F(e.onBlur,()=>f(!1))})})})})});hx.displayName=Bi;var k$="MenubarPortal",mx=e=>{const{__scopeMenubar:t,...n}=e,r=rt(t);return m.jsx(vl,{...r,...n})};mx.displayName=k$;var Vi="MenubarContent",px=h.forwardRef((e,t)=>{const{__scopeMenubar:n,align:r="start",...o}=e,a=rt(n),s=Wl(Vi,n),i=dx(Vi,n),c=D$(n),u=h.useRef(!1);return m.jsx(bl,{id:i.contentId,"aria-labelledby":i.triggerId,"data-radix-menubar-content":"",...a,...o,ref:t,align:r,onCloseAutoFocus:F(e.onCloseAutoFocus,d=>{var f;!!!s.value&&!u.current&&((f=i.triggerRef.current)==null||f.focus()),u.current=!1,d.preventDefault()}),onFocusOutside:F(e.onFocusOutside,d=>{const l=d.target;c().some(p=>{var g;return(g=p.ref.current)==null?void 0:g.contains(l)})&&d.preventDefault()}),onInteractOutside:F(e.onInteractOutside,()=>{u.current=!0}),onEntryFocus:d=>{i.wasKeyboardTriggerOpenRef.current||d.preventDefault()},onKeyDown:F(e.onKeyDown,d=>{if(["ArrowRight","ArrowLeft"].includes(d.key)){const l=d.target,f=l.hasAttribute("data-radix-menubar-subtrigger"),p=l.closest("[data-radix-menubar-content]")!==d.currentTarget,b=(s.dir==="rtl"?"ArrowRight":"ArrowLeft")===d.key;if(!b&&f||p&&b)return;let x=c().filter(C=>!C.disabled).map(C=>C.value);b&&x.reverse();const w=x.indexOf(i.value);x=s.loop?Y$(x,w+1):x.slice(w+1);const[M]=x;M&&s.onMenuOpen(M)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});px.displayName=Vi;var N$="MenubarGroup",gx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(yl,{...o,...r,ref:t})});gx.displayName=N$;var _$="MenubarLabel",vx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(xl,{...o,...r,ref:t})});vx.displayName=_$;var I$="MenubarItem",bx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(wl,{...o,...r,ref:t})});bx.displayName=I$;var j$="MenubarCheckboxItem",yx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(Sl,{...o,...r,ref:t})});yx.displayName=j$;var L$="MenubarRadioGroup",xx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(Cl,{...o,...r,ref:t})});xx.displayName=L$;var $$="MenubarRadioItem",wx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(Ml,{...o,...r,ref:t})});wx.displayName=$$;var F$="MenubarItemIndicator",Sx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(El,{...o,...r,ref:t})});Sx.displayName=F$;var B$="MenubarSeparator",Cx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(Tl,{...o,...r,ref:t})});Cx.displayName=B$;var V$="MenubarArrow",W$=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(Pl,{...o,...r,ref:t})});W$.displayName=V$;var Mx="MenubarSub",Ex=e=>{const{__scopeMenubar:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=rt(t),[i,c]=Ge({prop:r,defaultProp:a??!1,onChange:o,caller:Mx});return m.jsx(Dl,{...s,open:i,onOpenChange:c,children:n})};Ex.displayName=Mx;var z$="MenubarSubTrigger",Tx=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(Rl,{"data-radix-menubar-subtrigger":"",...o,...r,ref:t})});Tx.displayName=z$;var H$="MenubarSubContent",Px=h.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=rt(n);return m.jsx(Al,{...o,"data-radix-menubar-content":"",...r,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});Px.displayName=H$;function Y$(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var U$=ux,G$=fx,K$=hx,q$=mx,X$=px,Z$=gx,Q$=vx,J$=bx,eF=yx,tF=xx,nF=wx,Dx=Sx,rF=Cx,oF=Ex,aF=Tx,sF=Px;function iF({className:e,...t}){return m.jsx(U$,{"data-slot":"menubar",className:T.cn("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",e),...t})}function cF({...e}){return m.jsx(G$,{"data-slot":"menubar-menu",...e})}function lF({...e}){return m.jsx(Z$,{"data-slot":"menubar-group",...e})}function Rx({...e}){return m.jsx(q$,{"data-slot":"menubar-portal",...e})}function uF({...e}){return m.jsx(tF,{"data-slot":"menubar-radio-group",...e})}function dF({className:e,...t}){return m.jsx(K$,{"data-slot":"menubar-trigger",className:T.cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",e),...t})}function fF({className:e,align:t="start",alignOffset:n=-4,sideOffset:r=8,...o}){return m.jsx(Rx,{children:m.jsx(X$,{"data-slot":"menubar-content",align:t,alignOffset:n,sideOffset:r,className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",e),...o})})}function hF({className:e,inset:t,variant:n="default",...r}){return m.jsx(J$,{"data-slot":"menubar-item","data-inset":t,"data-variant":n,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function mF({className:e,children:t,checked:n,...r}){return m.jsxs(eF,{"data-slot":"menubar-checkbox-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(Dx,{children:m.jsx(Te.CheckIcon,{className:"size-4"})})}),t]})}function pF({className:e,children:t,...n}){return m.jsxs(nF,{"data-slot":"menubar-radio-item",className:T.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(Dx,{children:m.jsx(Te.CircleIcon,{className:"size-2 fill-current"})})}),t]})}function gF({className:e,inset:t,...n}){return m.jsx(Q$,{"data-slot":"menubar-label","data-inset":t,className:T.cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function vF({className:e,...t}){return m.jsx(rF,{"data-slot":"menubar-separator",className:T.cn("bg-border -mx-1 my-1 h-px",e),...t})}function bF({className:e,...t}){return m.jsx("span",{"data-slot":"menubar-shortcut",className:T.cn("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}function yF({...e}){return m.jsx(oF,{"data-slot":"menubar-sub",...e})}function xF({className:e,inset:t,children:n,...r}){return m.jsxs(aF,{"data-slot":"menubar-sub-trigger","data-inset":t,className:T.cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",e),...r,children:[n,m.jsx(Te.ChevronRightIcon,{className:"ml-auto h-4 w-4"})]})}function wF({className:e,...t}){return m.jsx(sF,{"data-slot":"menubar-sub-content",className:T.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}var SF={WEEK:6048e5};const Ks=768;function CF(){const[e,t]=h.useState(void 0);return h.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Ks-1}px)`),r=()=>{t(window.innerWidth<Ks)};return n.addEventListener("change",r),t(window.innerWidth<Ks),()=>n.removeEventListener("change",r)},[]),!!e}const MF="sidebar_state",EF=SF.WEEK,TF="16rem",PF="18rem",DF="3rem",RF="b",Ax=h.createContext(null);function Po(){const e=h.useContext(Ax);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function AF({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:a,...s}){const i=CF(),[c,u]=h.useState(!1),[d,l]=h.useState(e),f=t??d,p=h.useCallback(v=>{const x=typeof v=="function"?v(f):v;n?n(x):l(x),document.cookie=`${MF}=${x}; path=/; max-age=${EF}`},[n,f]),g=h.useCallback(()=>i?u(v=>!v):p(v=>!v),[i,p,u]);h.useEffect(()=>{const v=x=>{x.key===RF&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),g())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[g]);const b=f?"expanded":"collapsed",y=h.useMemo(()=>({state:b,open:f,setOpen:p,isMobile:i,openMobile:c,setOpenMobile:u,toggleSidebar:g}),[b,f,p,i,c,u,g]);return m.jsx(Ax.Provider,{value:y,children:m.jsx(Bl,{delayDuration:0,children:m.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":TF,"--sidebar-width-icon":DF,...o},className:T.cn("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),...s,children:a})})})}function OF({side:e,openMobile:t,setOpenMobile:n,children:r,...o}){return m.jsx(tx,{open:t,onOpenChange:n,...o,children:m.jsxs(nx,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":PF},side:e,children:[m.jsxs(rx,{className:"sr-only",children:[m.jsx(ox,{children:"Sidebar"}),m.jsx(ax,{children:"Displays the mobile sidebar."})]}),m.jsx("div",{className:"flex h-full w-full flex-col",children:r})]})})}function kF({side:e,variant:t,collapsible:n,state:r,className:o,children:a,...s}){return m.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":r,"data-collapsible":r==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[m.jsx("div",{"data-slot":"sidebar-gap",className:T.cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),m.jsx("div",{"data-slot":"sidebar-container",className:T.cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...s,children:m.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:a})})]})}function NF({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...a}){const{isMobile:s,state:i,openMobile:c,setOpenMobile:u}=Po();return n==="none"?m.jsx("div",{"data-slot":"sidebar",className:T.cn("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...a,children:o}):s?m.jsx(OF,{side:e,openMobile:c,setOpenMobile:u,...a,children:o}):m.jsx(kF,{side:e,variant:t,collapsible:n,state:i,className:r,...a,children:o})}function _F({className:e,onClick:t,...n}){const{toggleSidebar:r}=Po();return m.jsxs(T.Button,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:T.cn("size-7",e),onClick:o=>{t==null||t(o),r()},...n,children:[m.jsx(Te.PanelLeftIcon,{}),m.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function IF({className:e,...t}){const{toggleSidebar:n}=Po();return m.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:T.cn("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}function jF({className:e,...t}){return m.jsx("main",{"data-slot":"sidebar-inset",className:T.cn("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function LF({className:e,...t}){return m.jsx(T.Input,{"data-slot":"sidebar-input","data-sidebar":"input",className:T.cn("bg-background h-10 w-full shadow-none",e),...t})}function $F({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:T.cn("flex flex-col gap-3 p-2",e),...t})}function FF({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:T.cn("flex flex-col gap-3 p-2",e),...t})}function BF({className:e,...t}){return m.jsx(T.Separator,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:T.cn("bg-sidebar-border mx-2 w-auto",e),...t})}function VF({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:T.cn("flex min-h-0 flex-1 flex-col gap-3 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function WF({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:T.cn("relative flex w-full min-w-0 flex-col p-2",e),...t})}function zF({className:e,asChild:t=!1,...n}){const r=t?wt.Slot:"div";return m.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:T.cn("text-sidebar-foreground/70 ring-sidebar-ring flex h-10 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})}function HF({className:e,asChild:t=!1,...n}){const r=t?wt.Slot:"button";return m.jsx(r,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:T.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",e),...n})}function YF({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:T.cn("w-full text-sm",e),...t})}function UF({className:e,...t}){return m.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:T.cn("flex w-full min-w-0 flex-col gap-1",e),...t})}function GF({className:e,...t}){return m.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:T.cn("group/menu-item relative",e),...t})}const KF=T.cva("peer/menu-button flex w-full items-center gap-3 overflow-hidden rounded-md p-2 text-left text-sm font-medium outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground",{variants:{variant:{default:"hover:bg-background hover:text-sidebar-accent-foreground data-[active=true]:bg-background data-[active=true]:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-10 text-base",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function qF({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:a,...s}){const i=e?wt.Slot:"button",{isMobile:c,state:u}=Po(),d=m.jsx(i,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:T.cn(KF({variant:n,size:r}),a),...s});return o?(typeof o=="string"&&(o={children:o}),m.jsxs(Fy,{children:[m.jsx(By,{asChild:!0,children:d}),m.jsx(Vy,{side:"right",align:"center",hidden:u!=="collapsed"||c,...o})]})):d}function XF({className:e,asChild:t=!1,showOnHover:n=!1,...r}){const o=t?wt.Slot:"button";return m.jsx(o,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:T.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",e),...r})}function ZF({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:T.cn("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t})}const QF=50,JF=40;function e2({className:e,showIcon:t=!1,...n}){const r=h.useMemo(()=>`${Math.floor(Math.random()*JF)+QF}%`,[]);return m.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:T.cn("flex h-10 items-center gap-3 rounded-md px-2",e),...n,children:[t&&m.jsx(T.Skeleton,{className:"size-6 rounded-md","data-sidebar":"menu-skeleton-icon"}),m.jsx(T.Skeleton,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})}function t2({className:e,...t}){return m.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:T.cn("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t})}function n2({className:e,...t}){return m.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:T.cn("group/menu-sub-item relative",e),...t})}function r2({asChild:e=!1,size:t="md",isActive:n=!1,className:r,...o}){const a=e?wt.Slot:"a";return m.jsx(a,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:T.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-tertiary-foreground flex h-7 min-w-0 -translate-x-px items-center gap-3 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-6 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}exports.Accordion=Hk;exports.AccordionContent=Gk;exports.AccordionItem=Yk;exports.AccordionTrigger=Uk;exports.AlertDialog=MT;exports.AlertDialogAction=OT;exports.AlertDialogCancel=kT;exports.AlertDialogContent=TT;exports.AlertDialogDescription=AT;exports.AlertDialogFooter=DT;exports.AlertDialogHeader=PT;exports.AlertDialogOverlay=Wm;exports.AlertDialogPortal=Vm;exports.AlertDialogTitle=RT;exports.AlertDialogTrigger=ET;exports.Avatar=sN;exports.AvatarFallback=cN;exports.AvatarImage=iN;exports.Calendar=_R;exports.CalendarDayButton=gp;exports.Carousel=p1;exports.CarouselContent=g1;exports.CarouselItem=v1;exports.CarouselNext=y1;exports.CarouselPrevious=b1;exports.Checkbox=hN;exports.Combobox=RO;exports.Command=Fc;exports.CommandDialog=G1;exports.CommandEmpty=$p;exports.CommandGroup=Fp;exports.CommandInput=jp;exports.CommandItem=Bp;exports.CommandList=Lp;exports.CommandSeparator=K1;exports.CommandShortcut=q1;exports.ContextMenu=E_;exports.ContextMenuCheckboxItem=I_;exports.ContextMenuContent=N_;exports.ContextMenuGroup=P_;exports.ContextMenuItem=__;exports.ContextMenuLabel=L_;exports.ContextMenuPortal=D_;exports.ContextMenuRadioGroup=A_;exports.ContextMenuRadioItem=j_;exports.ContextMenuSeparator=$_;exports.ContextMenuShortcut=F_;exports.ContextMenuSub=R_;exports.ContextMenuSubContent=k_;exports.ContextMenuSubTrigger=O_;exports.ContextMenuTrigger=T_;exports.Dialog=Rp;exports.DialogClose=Y1;exports.DialogContent=kp;exports.DialogDescription=Ip;exports.DialogFooter=U1;exports.DialogHeader=Np;exports.DialogOverlay=Op;exports.DialogPortal=Ap;exports.DialogTitle=_p;exports.DialogTrigger=H1;exports.Drawer=_L;exports.DrawerClose=jL;exports.DrawerContent=LL;exports.DrawerDescription=VL;exports.DrawerFooter=FL;exports.DrawerHeader=$L;exports.DrawerOverlay=ex;exports.DrawerPortal=Jy;exports.DrawerTitle=BL;exports.DrawerTrigger=IL;exports.DropdownMenu=pI;exports.DropdownMenuCheckboxItem=wI;exports.DropdownMenuContent=bI;exports.DropdownMenuGroup=yI;exports.DropdownMenuItem=xI;exports.DropdownMenuLabel=MI;exports.DropdownMenuPortal=gI;exports.DropdownMenuRadioGroup=SI;exports.DropdownMenuRadioItem=CI;exports.DropdownMenuSeparator=EI;exports.DropdownMenuShortcut=TI;exports.DropdownMenuSub=PI;exports.DropdownMenuSubContent=RI;exports.DropdownMenuSubTrigger=DI;exports.DropdownMenuTrigger=vI;exports.HoverCard=VI;exports.HoverCardContent=zI;exports.HoverCardTrigger=WI;exports.InputOTP=zO;exports.InputOTPGroup=HO;exports.InputOTPSeparator=UO;exports.InputOTPSlot=YO;exports.Menubar=iF;exports.MenubarCheckboxItem=mF;exports.MenubarContent=fF;exports.MenubarGroup=lF;exports.MenubarItem=hF;exports.MenubarLabel=gF;exports.MenubarMenu=cF;exports.MenubarPortal=Rx;exports.MenubarRadioGroup=uF;exports.MenubarRadioItem=pF;exports.MenubarSeparator=vF;exports.MenubarShortcut=bF;exports.MenubarSub=yF;exports.MenubarSubContent=wF;exports.MenubarSubTrigger=xF;exports.MenubarTrigger=dF;exports.Popover=yg;exports.PopoverAnchor=DO;exports.PopoverContent=wg;exports.PopoverTrigger=xg;exports.Progress=Ck;exports.RadioGroup=nj;exports.RadioGroupItem=rj;exports.ScrollArea=bj;exports.ScrollBar=hy;exports.Sheet=tx;exports.SheetClose=zL;exports.SheetContent=nx;exports.SheetDescription=ax;exports.SheetFooter=UL;exports.SheetHeader=rx;exports.SheetTitle=ox;exports.SheetTrigger=WL;exports.Sidebar=NF;exports.SidebarContent=VF;exports.SidebarFooter=FF;exports.SidebarGroup=WF;exports.SidebarGroupAction=HF;exports.SidebarGroupContent=YF;exports.SidebarGroupLabel=zF;exports.SidebarHeader=$F;exports.SidebarInput=LF;exports.SidebarInset=jF;exports.SidebarMenu=UF;exports.SidebarMenuAction=XF;exports.SidebarMenuBadge=ZF;exports.SidebarMenuButton=qF;exports.SidebarMenuItem=GF;exports.SidebarMenuSkeleton=e2;exports.SidebarMenuSub=t2;exports.SidebarMenuSubButton=r2;exports.SidebarMenuSubItem=n2;exports.SidebarProvider=AF;exports.SidebarRail=IF;exports.SidebarSeparator=BF;exports.SidebarTrigger=_F;exports.Slider=hk;exports.Switch=Ej;exports.Tabs=kj;exports.TabsContent=Ij;exports.TabsList=Nj;exports.TabsTrigger=_j;exports.TextReveal=LM;exports.Toaster=M$;exports.Toggle=P$;exports.Tooltip=Fy;exports.TooltipContent=Vy;exports.TooltipProvider=Bl;exports.TooltipTrigger=By;exports.useSidebar=Po;