@frontify/fondue
Version:
Design system of Frontify
1 lines • 598 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),W=require("@frontify/fondue-icons"),p8=require("@react-aria/accordion"),L1=require("@react-aria/focus"),_1=require("@react-aria/utils"),b4=require("@react-stately/collections"),m8=require("@react-stately/tree"),h=require("react"),S2=require("@react-aria/button"),N3=require("@react-aria/menu"),q3=require("@react-aria/overlays"),VL=require("@react-stately/menu"),RL=require("@react-aria/link"),I3=require("react-popper"),Q4=require("react-dom"),t6=require("@react-aria/breadcrumbs"),FL=require("@ctrl/tinycolor"),N5=require("@floating-ui/dom"),I5=require("date-fns"),V5=require("react-datepicker"),L6=require("@react-aria/checkbox"),OL=require("@react-stately/toggle"),BL=require("@react-stately/checkbox"),_L=require("react-textarea-autosize"),X=require("@dnd-kit/core"),WL=require("@dnd-kit/modifiers"),B2=require("@dnd-kit/sortable"),w8=require("immer"),C2=require("lodash-es"),HL=require("react-is"),$L=require("react-fast-compare"),UL=require("@dnd-kit/utilities");function zL(t){const L=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(L,e,n.get?n:{enumerable:!0,get:()=>t[e]})}}return L.default=t,Object.freeze(L)}const V3=zL(h),e6=h.createContext({});function n6(t){const L=h.useRef(null);return L.current===null&&(L.current=t()),L.current}const GL=typeof window<"u",x8=GL?h.useLayoutEffect:h.useEffect,R3=h.createContext(null);function r6(t,L){t.indexOf(L)===-1&&t.push(L)}function m3(t,L){const e=t.indexOf(L);e>-1&&t.splice(e,1)}const N1=(t,L,e)=>e>L?L:e<t?t:e;function C4(t,L){return L?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${L}`:t}let T2=()=>{},O1=()=>{};var h8;typeof process<"u"&&((h8=process.env)==null?void 0:h8.NODE_ENV)!=="production"&&(T2=(t,L,e)=>{!t&&typeof console<"u"&&console.warn(C4(L,e))},O1=(t,L,e)=>{if(!t)throw new Error(C4(L,e))});const Y1={},g8=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function b8(t){return typeof t=="object"&&t!==null}const C8=t=>/^0[^.\s]+$/u.test(t);function y8(t){let L;return()=>(L===void 0&&(L=t()),L)}const j1=t=>t,KL=(t,L)=>e=>L(t(e)),X2=(...t)=>t.reduce(KL),_2=(t,L,e)=>{const n=L-t;return n===0?1:(e-t)/n};class s6{constructor(){this.subscriptions=[]}add(L){return r6(this.subscriptions,L),()=>m3(this.subscriptions,L)}notify(L,e,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](L,e,n);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(L,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const x1=t=>t*1e3,v1=t=>t/1e3;function v8(t,L){return L?t*(1e3/L):0}const R5=new Set;function o6(t,L,e){t||R5.has(L)||(console.warn(C4(L,e)),R5.add(L))}const M8=(t,L,e)=>(((1-3*e+3*L)*t+(3*e-6*L))*t+3*L)*t,XL=1e-7,YL=12;function qL(t,L,e,n,s){let o,i,a=0;do i=L+(e-L)/2,o=M8(i,n,s)-t,o>0?e=i:L=i;while(Math.abs(o)>XL&&++a<YL);return i}function Y2(t,L,e,n){if(t===L&&e===n)return j1;const s=o=>qL(o,0,1,t,e);return o=>o===0||o===1?o:M8(s(o),L,n)}const j8=t=>L=>L<=.5?t(2*L)/2:(2-t(2*(1-L)))/2,S8=t=>L=>1-t(1-L),T8=Y2(.33,1.53,.69,.99),i6=S8(T8),Z8=j8(i6),E8=t=>t>=1?1:(t*=2)<1?.5*i6(t):.5*(2-Math.pow(2,-10*(t-1))),a6=t=>1-Math.sin(Math.acos(t)),D8=S8(a6),k8=j8(a6),JL=Y2(.42,0,1,1),QL=Y2(0,0,.58,1),P8=Y2(.42,0,.58,1),te=t=>Array.isArray(t)&&typeof t[0]!="number",A8=t=>Array.isArray(t)&&typeof t[0]=="number",F5={linear:j1,easeIn:JL,easeInOut:P8,easeOut:QL,circIn:a6,circInOut:k8,circOut:D8,backIn:i6,backInOut:Z8,backOut:T8,anticipate:E8},Le=t=>typeof t=="string",O5=t=>{if(A8(t)){O1(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[L,e,n,s]=t;return Y2(L,e,n,s)}else if(Le(t))return O1(F5[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),F5[t];return t},e3=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ee(t,L){let e=new Set,n=new Set,s=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){i.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const m=f&&s?e:n;return d&&i.add(c),m.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(a=c,s){o=!0;return}s=!0;const d=e;e=n,n=d,e.forEach(l),e.clear(),s=!1,o&&(o=!1,u.process(c))}};return u}const ne=40;function N8(t,L){let e=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>e=!0,i=e3.reduce((b,v)=>(b[v]=ee(o),b),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:p,postRender:m}=i,x=()=>{const b=Y1.useManualTiming,v=b?s.timestamp:performance.now();e=!1,b||(s.delta=n?1e3/60:Math.max(Math.min(v-s.timestamp,ne),1)),s.timestamp=v,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),d.process(s),f.process(s),p.process(s),m.process(s),s.isProcessing=!1,e&&L&&(n=!1,t(x))},g=()=>{e=!0,n=!0,s.isProcessing||t(x)};return{schedule:e3.reduce((b,v)=>{const M=i[v];return b[v]=(k,S=!1,T=!1)=>(e||g(),M.schedule(k,S,T)),b},{}),cancel:b=>{for(let v=0;v<e3.length;v++)i[e3[v]].cancel(b)},state:s,steps:i}}const{schedule:q,cancel:q1,state:c1,steps:J3}=N8(typeof requestAnimationFrame<"u"?requestAnimationFrame:j1,!0);let a3;function re(){a3=void 0}const p1={now:()=>(a3===void 0&&p1.set(c1.isProcessing||Y1.useManualTiming?c1.timestamp:performance.now()),a3),set:t=>{a3=t,queueMicrotask(re)}},I8=t=>L=>typeof L=="string"&&L.startsWith(t),V8=I8("--"),se=I8("var(--"),l6=t=>se(t)?oe.test(t.split("/*")[0].trim()):!1,oe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function B5(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Z2={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},W2={...Z2,transform:t=>N1(0,1,t)},n3={...Z2,default:1},I2=t=>Math.round(t*1e5)/1e5,c6=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ie(t){return t==null}const ae=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,u6=(t,L)=>e=>!!(typeof e=="string"&&ae.test(e)&&e.startsWith(t)||L&&!ie(e)&&Object.prototype.hasOwnProperty.call(e,L)),R8=(t,L,e)=>n=>{if(typeof n!="string")return n;const[s,o,i,a]=n.match(c6);return{[t]:parseFloat(s),[L]:parseFloat(o),[e]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},le=t=>N1(0,255,t),Q3={...Z2,transform:t=>Math.round(le(t))},n2={test:u6("rgb","red"),parse:R8("red","green","blue"),transform:({red:t,green:L,blue:e,alpha:n=1})=>"rgba("+Q3.transform(t)+", "+Q3.transform(L)+", "+Q3.transform(e)+", "+I2(W2.transform(n))+")"};function ce(t){let L="",e="",n="",s="";return t.length>5?(L=t.substring(1,3),e=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(L=t.substring(1,2),e=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),L+=L,e+=e,n+=n,s+=s),{red:parseInt(L,16),green:parseInt(e,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const y4={test:u6("#"),parse:ce,transform:n2.transform},q2=t=>({test:L=>typeof L=="string"&&L.endsWith(t)&&L.split(" ").length===1,parse:parseFloat,transform:L=>`${L}${t}`}),U1=q2("deg"),A1=q2("%"),A=q2("px"),ue=q2("vh"),de=q2("vw"),_5={...A1,parse:t=>A1.parse(t)/100,transform:t=>A1.transform(t*100)},f2={test:u6("hsl","hue"),parse:R8("hue","saturation","lightness"),transform:({hue:t,saturation:L,lightness:e,alpha:n=1})=>"hsla("+Math.round(t)+", "+A1.transform(I2(L))+", "+A1.transform(I2(e))+", "+I2(W2.transform(n))+")"},s1={test:t=>n2.test(t)||y4.test(t)||f2.test(t),parse:t=>n2.test(t)?n2.parse(t):f2.test(t)?f2.parse(t):y4.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?n2.transform(t):f2.transform(t),getAnimatableNone:t=>{const L=s1.parse(t);return L.alpha=0,s1.transform(L)}},fe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function he(t){var L,e;return isNaN(t)&&typeof t=="string"&&(((L=t.match(c6))==null?void 0:L.length)||0)+(((e=t.match(fe))==null?void 0:e.length)||0)>0}const F8="number",O8="color",pe="var",me="var(",W5="${}",we=/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 y2(t){const L=t.toString(),e=[],n={color:[],number:[],var:[]},s=[];let o=0;const a=L.replace(we,l=>(s1.test(l)?(n.color.push(o),s.push(O8),e.push(s1.parse(l))):l.startsWith(me)?(n.var.push(o),s.push(pe),e.push(l)):(n.number.push(o),s.push(F8),e.push(parseFloat(l))),++o,W5)).split(W5);return{values:e,split:a,indexes:n,types:s}}function xe(t){return y2(t).values}function B8({split:t,types:L}){const e=t.length;return n=>{let s="";for(let o=0;o<e;o++)if(s+=t[o],n[o]!==void 0){const i=L[o];i===F8?s+=I2(n[o]):i===O8?s+=s1.transform(n[o]):s+=n[o]}return s}}function ge(t){return B8(y2(t))}const be=t=>typeof t=="number"?0:s1.test(t)?s1.getAnimatableNone(t):t,Ce=(t,L)=>typeof t=="number"?L!=null&&L.trim().endsWith("/")?t:0:be(t);function ye(t){const L=y2(t);return B8(L)(L.values.map((n,s)=>Ce(n,L.split[s])))}const Z1={test:he,parse:xe,createTransformer:ge,getAnimatableNone:ye};function t4(t,L,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+(L-t)*6*e:e<1/2?L:e<2/3?t+(L-t)*(2/3-e)*6:t}function ve({hue:t,saturation:L,lightness:e,alpha:n}){t/=360,L/=100,e/=100;let s=0,o=0,i=0;if(!L)s=o=i=e;else{const a=e<.5?e*(1+L):e+L-e*L,l=2*e-a;s=t4(l,a,t+1/3),o=t4(l,a,t),i=t4(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:n}}function w3(t,L){return e=>e>0?L:t}const t1=(t,L,e)=>t+(L-t)*e,L4=(t,L,e)=>{const n=t*t,s=e*(L*L-n)+n;return s<0?0:Math.sqrt(s)},Me=[y4,n2,f2],je=t=>Me.find(L=>L.test(t));function H5(t){const L=je(t);if(T2(!!L,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!L)return!1;let e=L.parse(t);return L===f2&&(e=ve(e)),e}const $5=(t,L)=>{const e=H5(t),n=H5(L);if(!e||!n)return w3(t,L);const s={...e};return o=>(s.red=L4(e.red,n.red,o),s.green=L4(e.green,n.green,o),s.blue=L4(e.blue,n.blue,o),s.alpha=t1(e.alpha,n.alpha,o),n2.transform(s))},v4=new Set(["none","hidden"]);function Se(t,L){return v4.has(t)?e=>e<=0?t:L:e=>e>=1?L:t}function Te(t,L){return e=>t1(t,L,e)}function d6(t){return typeof t=="number"?Te:typeof t=="string"?l6(t)?w3:s1.test(t)?$5:De:Array.isArray(t)?_8:typeof t=="object"?s1.test(t)?$5:Ze:w3}function _8(t,L){const e=[...t],n=e.length,s=t.map((o,i)=>d6(o)(o,L[i]));return o=>{for(let i=0;i<n;i++)e[i]=s[i](o);return e}}function Ze(t,L){const e={...t,...L},n={};for(const s in e)t[s]!==void 0&&L[s]!==void 0&&(n[s]=d6(t[s])(t[s],L[s]));return s=>{for(const o in n)e[o]=n[o](s);return e}}function Ee(t,L){const e=[],n={color:0,var:0,number:0};for(let s=0;s<L.values.length;s++){const o=L.types[s],i=t.indexes[o][n[o]],a=t.values[i]??0;e[s]=a,n[o]++}return e}const De=(t,L)=>{const e=Z1.createTransformer(L),n=y2(t),s=y2(L);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?v4.has(t)&&!s.values.length||v4.has(L)&&!n.values.length?Se(t,L):X2(_8(Ee(n,s),s.values),e):(T2(!0,`Complex values '${t}' and '${L}' 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"),w3(t,L))};function W8(t,L,e){return typeof t=="number"&&typeof L=="number"&&typeof e=="number"?t1(t,L,e):d6(t)(t,L)}const ke=t=>{const L=({timestamp:e})=>t(e);return{start:(e=!0)=>q.update(L,e),stop:()=>q1(L),now:()=>c1.isProcessing?c1.timestamp:p1.now()}},H8=(t,L,e=10)=>{let n="";const s=Math.max(Math.round(L/e),2);for(let o=0;o<s;o++)n+=Math.round(t(o/(s-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},x3=2e4;function f6(t){let L=0;const e=50;let n=t.next(L);for(;!n.done&&L<x3;)L+=e,n=t.next(L);return L>=x3?1/0:L}function Pe(t,L=100,e){const n=e({...t,keyframes:[0,L]}),s=Math.min(f6(n),x3);return{type:"keyframes",ease:o=>n.next(s*o).value/L,duration:v1(s)}}const r1={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};function M4(t,L){return t*Math.sqrt(1-L*L)}const Ae=12;function Ne(t,L,e){let n=e;for(let s=1;s<Ae;s++)n=n-t(n)/L(n);return n}const e4=.001;function Ie({duration:t=r1.duration,bounce:L=r1.bounce,velocity:e=r1.velocity,mass:n=r1.mass}){let s,o;T2(t<=x1(r1.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-L;i=N1(r1.minDamping,r1.maxDamping,i),t=N1(r1.minDuration,r1.maxDuration,v1(t)),i<1?(s=u=>{const c=u*i,d=c*t,f=c-e,p=M4(u,i),m=Math.exp(-d);return e4-f/p*m},o=u=>{const d=u*i*t,f=d*e+e,p=Math.pow(i,2)*Math.pow(u,2)*t,m=Math.exp(-d),x=M4(Math.pow(u,2),i);return(-s(u)+e4>0?-1:1)*((f-p)*m)/x}):(s=u=>{const c=Math.exp(-u*t),d=(u-e)*t+1;return-e4+c*d},o=u=>{const c=Math.exp(-u*t),d=(e-u)*(t*t);return c*d});const a=5/t,l=Ne(s,o,a);if(t=x1(t),isNaN(l))return{stiffness:r1.stiffness,damping:r1.damping,duration:t};{const u=Math.pow(l,2)*n;return{stiffness:u,damping:i*2*Math.sqrt(n*u),duration:t}}}const Ve=["duration","bounce"],Re=["stiffness","damping","mass"];function U5(t,L){return L.some(e=>t[e]!==void 0)}function Fe(t){let L={velocity:r1.velocity,stiffness:r1.stiffness,damping:r1.damping,mass:r1.mass,isResolvedFromDuration:!1,...t};if(!U5(t,Re)&&U5(t,Ve))if(L.velocity=0,t.visualDuration){const e=t.visualDuration,n=2*Math.PI/(e*1.2),s=n*n,o=2*N1(.05,1,1-(t.bounce||0))*Math.sqrt(s);L={...L,mass:r1.mass,stiffness:s,damping:o}}else{const e=Ie({...t,velocity:0});L={...L,...e,mass:r1.mass},L.isResolvedFromDuration=!0}return L}function g3(t=r1.visualDuration,L=r1.bounce){const e=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:L}:t;let{restSpeed:n,restDelta:s}=e;const o=e.keyframes[0],i=e.keyframes[e.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:p}=Fe({...e,velocity:-v1(e.velocity||0)}),m=f||0,x=u/(2*Math.sqrt(l*c)),g=i-o,w=v1(Math.sqrt(l/c)),C=Math.abs(g)<5;n||(n=C?r1.restSpeed.granular:r1.restSpeed.default),s||(s=C?r1.restDelta.granular:r1.restDelta.default);let b,v,M,k,S,T;if(x<1)M=M4(w,x),k=(m+x*w*g)/M,b=j=>{const E=Math.exp(-x*w*j);return i-E*(k*Math.sin(M*j)+g*Math.cos(M*j))},S=x*w*k+g*M,T=x*w*g-k*M,v=j=>Math.exp(-x*w*j)*(S*Math.sin(M*j)+T*Math.cos(M*j));else if(x===1){b=E=>i-Math.exp(-w*E)*(g+(m+w*g)*E);const j=m+w*g;v=E=>Math.exp(-w*E)*(w*j*E-m)}else{const j=w*Math.sqrt(x*x-1);b=$=>{const P=Math.exp(-x*w*$),_=Math.min(j*$,300);return i-P*((m+x*w*g)*Math.sinh(_)+j*g*Math.cosh(_))/j};const E=(m+x*w*g)/j,F=x*w*E-g*j,O=x*w*g-E*j;v=$=>{const P=Math.exp(-x*w*$),_=Math.min(j*$,300);return P*(F*Math.sinh(_)+O*Math.cosh(_))}}const Z={calculatedDuration:p&&d||null,velocity:j=>x1(v(j)),next:j=>{if(!p&&x<1){const F=Math.exp(-x*w*j),O=Math.sin(M*j),$=Math.cos(M*j),P=i-F*(k*O+g*$),_=x1(F*(S*O+T*$));return a.done=Math.abs(_)<=n&&Math.abs(i-P)<=s,a.value=a.done?i:P,a}const E=b(j);if(p)a.done=j>=d;else{const F=x1(v(j));a.done=Math.abs(F)<=n&&Math.abs(i-E)<=s}return a.value=a.done?i:E,a},toString:()=>{const j=Math.min(f6(Z),x3),E=H8(F=>Z.next(j*F).value,j,30);return j+"ms "+E},toTransition:()=>{}};return Z}g3.applyToOptions=t=>{const L=Pe(t,100,g3);return t.ease=L.ease,t.duration=x1(L.duration),t.type="keyframes",t};const Oe=5;function $8(t,L,e){const n=Math.max(L-Oe,0);return v8(e-t(n),L-n)}function j4({keyframes:t,velocity:L=0,power:e=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=t[0],f={done:!1,value:d},p=T=>a!==void 0&&T<a||l!==void 0&&T>l,m=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let x=e*L;const g=d+x,w=i===void 0?g:i(g);w!==g&&(x=w-d);const C=T=>-x*Math.exp(-T/n),b=T=>w+C(T),v=T=>{const Z=C(T),j=b(T);f.done=Math.abs(Z)<=u,f.value=f.done?w:j};let M,k;const S=T=>{p(f.value)&&(M=T,k=g3({keyframes:[f.value,m(f.value)],velocity:$8(b,T,f.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:T=>{let Z=!1;return!k&&M===void 0&&(Z=!0,v(T),S(T)),M!==void 0&&T>=M?k.next(T-M):(!Z&&v(T),f)}}}function Be(t,L,e){const n=[],s=e||Y1.mix||W8,o=t.length-1;for(let i=0;i<o;i++){let a=s(t[i],t[i+1]);if(L){const l=Array.isArray(L)?L[i]||j1:L;a=X2(l,a)}n.push(a)}return n}function _e(t,L,{clamp:e=!0,ease:n,mixer:s}={}){const o=t.length;if(O1(o===L.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>L[0];if(o===2&&L[0]===L[1])return()=>L[1];const i=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),L=[...L].reverse());const a=Be(L,n,s),l=a.length,u=c=>{if(i&&c<t[0])return L[0];let d=0;if(l>1)for(;d<t.length-2&&!(c<t[d+1]);d++);const f=_2(t[d],t[d+1],c);return a[d](f)};return e?c=>u(N1(t[0],t[o-1],c)):u}function We(t,L){const e=t[t.length-1];for(let n=1;n<=L;n++){const s=_2(0,L,n);t.push(t1(e,1,s))}}function He(t){const L=[0];return We(L,t.length-1),L}function $e(t,L){return t.map(e=>e*L)}function Ue(t,L){return t.map(()=>L||P8).splice(0,t.length-1)}function h2({duration:t=300,keyframes:L,times:e,ease:n="easeInOut"}){const s=te(n)?n.map(O5):O5(n),o={done:!1,value:L[0]},i=$e(e&&e.length===L.length?e:He(L),t),a=_e(i,L,{ease:Array.isArray(s)?s:Ue(L,s)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const ze=t=>t!==null;function F3(t,{repeat:L,repeatType:e="loop"},n,s=1){const o=t.filter(ze),a=s<0||L&&e!=="loop"&&L%2===1?0:o.length-1;return!a||n===void 0?o[a]:n}const Ge={decay:j4,inertia:j4,tween:h2,keyframes:h2,spring:g3};function U8(t){typeof t.type=="string"&&(t.type=Ge[t.type])}class h6{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(L=>{this.resolve=L})}notifyFinished(){this.resolve()}then(L,e){return this.finished.then(L,e)}}const Ke=t=>t/100;class b3 extends h6{constructor(L){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var n,s;const{motionValue:e}=this.options;e&&e.updatedAt!==p1.now()&&this.tick(p1.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(n=this.options).onStop)==null||s.call(n))},this.options=L,this.initAnimation(),this.play(),L.autoplay===!1&&this.pause()}initAnimation(){const{options:L}=this;U8(L);const{type:e=h2,repeat:n=0,repeatDelay:s=0,repeatType:o,velocity:i=0}=L;let{keyframes:a}=L;const l=e||h2;process.env.NODE_ENV!=="production"&&l!==h2&&O1(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==h2&&typeof a[0]!="number"&&(this.mixKeyframes=X2(Ke,W8(a[0],a[1])),a=[0,100]);const u=l({...L,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...L,keyframes:[...a].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=f6(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=u}updateTime(L){const e=Math.round(L-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=e}tick(L,e=!1){const{generator:n,totalDuration:s,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:p,type:m,onUpdate:x,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,L):this.speed<0&&(this.startTime=Math.min(L-s/this.speed,this.startTime)),e?this.currentTime=L:this.updateTime(L);const w=this.currentTime-u*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?w<0:w>s;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let b=this.currentTime,v=n;if(d){const T=Math.min(this.currentTime,s)/a;let Z=Math.floor(T),j=T%1;!j&&T>=1&&(j=1),j===1&&Z--,Z=Math.min(Z,d+1),!!(Z%2)&&(f==="reverse"?(j=1-j,p&&(j-=p/a)):f==="mirror"&&(v=i)),b=N1(0,1,j)*a}let M;C?(this.delayState.value=c[0],M=this.delayState):M=v.next(b),o&&!C&&(M.value=o(M.value));let{done:k}=M;!C&&l!==null&&(k=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return S&&m!==j4&&(M.value=F3(c,this.options,g,this.speed)),x&&x(M.value),S&&this.finish(),M}then(L,e){return this.finished.then(L,e)}get duration(){return v1(this.calculatedDuration)}get iterationDuration(){const{delay:L=0}=this.options||{};return this.duration+v1(L)}get time(){return v1(this.currentTime)}set time(L){L=x1(L),this.currentTime=L,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=L:this.driver&&(this.startTime=this.driver.now()-L/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=L,this.tick(L))}getGeneratorVelocity(){const L=this.currentTime;if(L<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(L);const e=this.generator.next(L).value;return $8(n=>this.generator.next(n).value,L,e)}get speed(){return this.playbackSpeed}set speed(L){const e=this.playbackSpeed!==L;e&&this.driver&&this.updateTime(p1.now()),this.playbackSpeed=L,e&&this.driver&&(this.time=v1(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:L=ke,startTime:e}=this.options;this.driver||(this.driver=L(i=>this.tick(i))),(o=(s=this.options).onPlay)==null||o.call(s);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),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(p1.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var L,e;this.notifyFinished(),this.teardown(),this.state="finished",(e=(L=this.options).onComplete)==null||e.call(L)}cancel(){var L,e;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(e=(L=this.options).onCancel)==null||e.call(L)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(L){return this.startTime=0,this.tick(L,!0)}attachTimeline(L){var e;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(e=this.driver)==null||e.stop(),L.observe(this)}}function Xe(t){for(let L=1;L<t.length;L++)t[L]??(t[L]=t[L-1])}const r2=t=>t*180/Math.PI,S4=t=>{const L=r2(Math.atan2(t[1],t[0]));return T4(L)},Ye={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:S4,rotateZ:S4,skewX:t=>r2(Math.atan(t[1])),skewY:t=>r2(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},T4=t=>(t=t%360,t<0&&(t+=360),t),z5=S4,G5=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),K5=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),qe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:G5,scaleY:K5,scale:t=>(G5(t)+K5(t))/2,rotateX:t=>T4(r2(Math.atan2(t[6],t[5]))),rotateY:t=>T4(r2(Math.atan2(-t[2],t[0]))),rotateZ:z5,rotate:z5,skewX:t=>r2(Math.atan(t[4])),skewY:t=>r2(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Z4(t){return t.includes("scale")?1:0}function E4(t,L){if(!t||t==="none")return Z4(L);const e=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,s;if(e)n=qe,s=e;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Ye,s=a}if(!s)return Z4(L);const o=n[L],i=s[1].split(",").map(Qe);return typeof o=="function"?o(i):i[o]}const Je=(t,L)=>{const{transform:e="none"}=getComputedStyle(t);return E4(e,L)};function Qe(t){return parseFloat(t.trim())}const E2=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],D2=new Set(E2),X5=t=>t===Z2||t===A,t0=new Set(["x","y","z"]),L0=E2.filter(t=>!t0.has(t));function e0(t){const L=[];return L0.forEach(e=>{const n=t.getValue(e);n!==void 0&&(L.push([e,n.get()]),n.set(e.startsWith("scale")?1:0))}),L}const G1={width:({x:t},{paddingLeft:L="0",paddingRight:e="0",boxSizing:n})=>{const s=t.max-t.min;return n==="border-box"?s:s-parseFloat(L)-parseFloat(e)},height:({y:t},{paddingTop:L="0",paddingBottom:e="0",boxSizing:n})=>{const s=t.max-t.min;return n==="border-box"?s:s-parseFloat(L)-parseFloat(e)},top:(t,{top:L})=>parseFloat(L),left:(t,{left:L})=>parseFloat(L),bottom:({y:t},{top:L})=>parseFloat(L)+(t.max-t.min),right:({x:t},{left:L})=>parseFloat(L)+(t.max-t.min),x:(t,{transform:L})=>E4(L,"x"),y:(t,{transform:L})=>E4(L,"y")};G1.translateX=G1.x;G1.translateY=G1.y;const s2=new Set;let D4=!1,k4=!1,P4=!1;function z8(){if(k4){const t=Array.from(s2).filter(n=>n.needsMeasurement),L=new Set(t.map(n=>n.element)),e=new Map;L.forEach(n=>{const s=e0(n);s.length&&(e.set(n,s),n.render())}),t.forEach(n=>n.measureInitialState()),L.forEach(n=>{n.render();const s=e.get(n);s&&s.forEach(([o,i])=>{var a;(a=n.getValue(o))==null||a.set(i)})}),t.forEach(n=>n.measureEndState()),t.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}k4=!1,D4=!1,s2.forEach(t=>t.complete(P4)),s2.clear()}function G8(){s2.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(k4=!0)})}function n0(){P4=!0,G8(),z8(),P4=!1}class p6{constructor(L,e,n,s,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...L],this.onComplete=e,this.name=n,this.motionValue=s,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(s2.add(this),D4||(D4=!0,q.read(G8),q.resolveKeyframes(z8))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:L,name:e,element:n,motionValue:s}=this;if(L[0]===null){const o=s==null?void 0:s.get(),i=L[L.length-1];if(o!==void 0)L[0]=o;else if(n&&e){const a=n.readValue(e,i);a!=null&&(L[0]=a)}L[0]===void 0&&(L[0]=i),s&&o===void 0&&s.set(L[0])}Xe(L)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(L=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,L),s2.delete(this)}cancel(){this.state==="scheduled"&&(s2.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const r0=t=>t.startsWith("--");function K8(t,L,e){r0(L)?t.style.setProperty(L,e):t.style[L]=e}const s0={};function X8(t,L){const e=y8(t);return()=>s0[L]??e()}const o0=X8(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Y8=X8(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),A2=([t,L,e,n])=>`cubic-bezier(${t}, ${L}, ${e}, ${n})`,Y5={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:A2([0,.65,.55,1]),circOut:A2([.55,0,1,.45]),backIn:A2([.31,.01,.66,-.59]),backOut:A2([.33,1.53,.69,.99])};function q8(t,L){if(t)return typeof t=="function"?Y8()?H8(t,L):"ease-out":A8(t)?A2(t):Array.isArray(t)?t.map(e=>q8(e,L)||Y5.easeOut):Y5[t]}function i0(t,L,e,{delay:n=0,duration:s=300,repeat:o=0,repeatType:i="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[L]:e};l&&(c.offset=l);const d=q8(a,s);Array.isArray(d)&&(c.easing=d);const f={delay:n,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function J8(t){return typeof t=="function"&&"applyToOptions"in t}function a0({type:t,...L}){return J8(t)&&Y8()?t.applyToOptions(L):(L.duration??(L.duration=300),L.ease??(L.ease="easeOut"),L)}class Q8 extends h6{constructor(L){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!L)return;const{element:e,name:n,keyframes:s,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:l}=L;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=L,O1(typeof L.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=a0(L);this.animation=i0(e,n,s,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=F3(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),K8(e,n,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var L,e;(e=(L=this.animation).finish)==null||e.call(L)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:L}=this;L==="idle"||L==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n,s;const L=(e=this.options)==null?void 0:e.element;!this.isPseudoElement&&(L!=null&&L.isConnected)&&((s=(n=this.animation).commitStyles)==null||s.call(n))}get duration(){var e,n;const L=((n=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:n.call(e).duration)||0;return v1(Number(L))}get iterationDuration(){const{delay:L=0}=this.options||{};return this.duration+v1(L)}get time(){return v1(Number(this.animation.currentTime)||0)}set time(L){const e=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=x1(L),e&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(L){L<0&&(this.finishedTime=null),this.animation.playbackRate=L}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(L){this.manualStartTime=this.animation.startTime=L}attachTimeline({timeline:L,rangeStart:e,rangeEnd:n,observe:s}){var o;return this.allowFlatten&&((o=this.animation.effect)==null||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,L&&o0()?(this.animation.timeline=L,e&&(this.animation.rangeStart=e),n&&(this.animation.rangeEnd=n),j1):s(this)}}const t9={anticipate:E8,backInOut:Z8,circInOut:k8};function l0(t){return t in t9}function c0(t){typeof t.ease=="string"&&l0(t.ease)&&(t.ease=t9[t.ease])}const n4=10;class u0 extends Q8{constructor(L){c0(L),U8(L),super(L),L.startTime!==void 0&&L.autoplay!==!1&&(this.startTime=L.startTime),this.options=L}updateMotionValue(L){const{motionValue:e,onUpdate:n,onComplete:s,element:o,...i}=this.options;if(!e)return;if(L!==void 0){e.set(L);return}const a=new b3({...i,autoplay:!1}),l=Math.max(n4,p1.now()-this.startTime),u=N1(0,n4,l-n4),c=a.sample(l).value,{name:d}=this.options;o&&d&&K8(o,d,c),e.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const q5=(t,L)=>L==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Z1.test(t)||t==="0")&&!t.startsWith("url("));function d0(t){const L=t[0];if(t.length===1)return!0;for(let e=0;e<t.length;e++)if(t[e]!==L)return!0}function f0(t,L,e,n){const s=t[0];if(s===null)return!1;if(L==="display"||L==="visibility")return!0;const o=t[t.length-1],i=q5(s,L),a=q5(o,L);return T2(i===a,`You are trying to animate ${L} from "${s}" to "${o}". "${i?o:s}" is not an animatable value.`,"value-not-animatable"),!i||!a?!1:d0(t)||(e==="spring"||J8(e))&&n}function A4(t){t.duration=0,t.type="keyframes"}const L9=new Set(["opacity","clipPath","filter","transform"]),h0=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function p0(t){for(let L=0;L<t.length;L++)if(typeof t[L]=="string"&&h0.test(t[L]))return!0;return!1}const m0=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),w0=y8(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function x0(t){var d;const{motionValue:L,name:e,repeatDelay:n,repeatType:s,damping:o,type:i,keyframes:a}=t;if(!(((d=L==null?void 0:L.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=L.owner.getProps();return w0()&&e&&(L9.has(e)||m0.has(e)&&p0(a))&&(e!=="transform"||!c)&&!u&&!n&&s!=="mirror"&&o!==0&&i!=="inertia"}const g0=40;class b0 extends h6{constructor({autoplay:L=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var m;super(),this.stop=()=>{var x,g;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=p1.now();const f={autoplay:L,delay:e,type:n,repeat:s,repeatDelay:o,repeatType:i,name:l,motionValue:u,element:c,...d},p=(c==null?void 0:c.KeyframeResolver)||p6;this.keyframeResolver=new p(a,(x,g,w)=>this.onKeyframesResolved(x,g,f,!w),l,u,c),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(L,e,n,s){var w,C;this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:l,isHandoff:u,onUpdate:c}=n;this.resolvedAt=p1.now();let d=!0;f0(L,o,i,a)||(d=!1,(Y1.instantAnimations||!l)&&(c==null||c(F3(L,n,e))),L[0]=L[L.length-1],A4(n),n.repeat=0);const p={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>g0?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:L},m=d&&!u&&x0(p),x=(C=(w=p.motionValue)==null?void 0:w.owner)==null?void 0:C.current;let g;if(m)try{g=new u0({...p,element:x})}catch{g=new b3(p)}else g=new b3(p);g.finished.then(()=>{this.notifyFinished()}).catch(j1),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(L,e){return this.finished.finally(L).then(()=>{})}get animation(){var L;return this._animation||((L=this.keyframeResolver)==null||L.resume(),n0()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(L){this.animation.time=L}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(L){this.animation.speed=L}get startTime(){return this.animation.startTime}attachTimeline(L){return this._animation?this.stopTimeline=this.animation.attachTimeline(L):this.pendingTimeline=L,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var L;this._animation&&this.animation.cancel(),(L=this.keyframeResolver)==null||L.cancel()}}function e9(t,L,e,n=0,s=1){const o=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(L),i=t.size,a=(i-1)*n;return typeof e=="function"?e(o,i):s===1?o*n:a-o*n}const C0=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function y0(t){const L=C0.exec(t);if(!L)return[,];const[,e,n,s]=L;return[`--${e??n}`,s]}const v0=4;function n9(t,L,e=1){O1(e<=v0,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,s]=y0(t);if(!n)return;const o=window.getComputedStyle(L).getPropertyValue(n);if(o){const i=o.trim();return g8(i)?parseFloat(i):i}return l6(s)?n9(s,L,e+1):s}const M0={type:"spring",stiffness:500,damping:25,restSpeed:10},j0=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),S0={type:"keyframes",duration:.8},T0={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Z0=(t,{keyframes:L})=>L.length>2?S0:D2.has(t)?t.startsWith("scale")?j0(L[1]):M0:T0;function r9(t,L){if(t!=null&&t.inherit&&L){const{inherit:e,...n}=t;return{...L,...n}}return t}function m6(t,L){const e=(t==null?void 0:t[L])??(t==null?void 0:t.default)??t;return e!==t?r9(e,t):e}const E0=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function D0(t){for(const L in t)if(!E0.has(L))return!0;return!1}const w6=(t,L,e,n={},s,o)=>i=>{const a=m6(n,t)||{},l=a.delay||n.delay||0;let{elapsed:u=0}=n;u=u-x1(l);const c={keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:L.getVelocity(),...a,delay:-u,onUpdate:f=>{L.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:t,motionValue:L,element:o?void 0:s};D0(a)||Object.assign(c,Z0(t,c)),c.duration&&(c.duration=x1(c.duration)),c.repeatDelay&&(c.repeatDelay=x1(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(A4(c),c.delay===0&&(d=!0)),(Y1.instantAnimations||Y1.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(d=!0,A4(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!o&&L.get()!==void 0){const f=F3(c.keyframes,a);if(f!==void 0){q.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new b3(c):new b0(c)};function J5(t){const L=[{},{}];return t==null||t.values.forEach((e,n)=>{L[0][n]=e.get(),L[1][n]=e.getVelocity()}),L}function x6(t,L,e,n){if(typeof L=="function"){const[s,o]=J5(n);L=L(e!==void 0?e:t.custom,s,o)}if(typeof L=="string"&&(L=t.variants&&t.variants[L]),typeof L=="function"){const[s,o]=J5(n);L=L(e!==void 0?e:t.custom,s,o)}return L}function o2(t,L,e){const n=t.getProps();return x6(n,L,e!==void 0?e:n.custom,t)}const s9=new Set(["width","height","top","left","right","bottom",...E2]),Q5=30,k0=t=>!isNaN(parseFloat(t));class P0{constructor(L,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var o;const s=p1.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(L),this.owner=e.owner}setCurrent(L){this.current=L,this.updatedAt=p1.now(),this.canTrackVelocity===null&&L!==void 0&&(this.canTrackVelocity=k0(this.current))}setPrevFrameValue(L=this.current){this.prevFrameValue=L,this.prevUpdatedAt=this.updatedAt}onChange(L){return process.env.NODE_ENV!=="production"&&o6(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",L)}on(L,e){this.events[L]||(this.events[L]=new s6);const n=this.events[L].add(e);return L==="change"?()=>{n(),q.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const L in this.events)this.events[L].clear()}attach(L,e){this.passiveEffect=L,this.stopPassiveEffect=e}set(L){this.passiveEffect?this.passiveEffect(L,this.updateAndNotify):this.updateAndNotify(L)}setWithVelocity(L,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=L,this.prevUpdatedAt=this.updatedAt-n}jump(L,e=!0){this.updateAndNotify(L),this.prev=L,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var L;(L=this.events.change)==null||L.notify(this.current)}addDependent(L){this.dependents||(this.dependents=new Set),this.dependents.add(L)}removeDependent(L){this.dependents&&this.dependents.delete(L)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const L=p1.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||L-this.updatedAt>Q5)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,Q5);return v8(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(L){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=L(e),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 L,e;(L=this.dependents)==null||L.clear(),(e=this.events.destroy)==null||e.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function v2(t,L){return new P0(t,L)}const N4=t=>Array.isArray(t);function A0(t,L,e){t.hasValue(L)?t.getValue(L).set(e):t.addValue(L,v2(e))}function N0(t){return N4(t)?t[t.length-1]||0:t}function I0(t,L){const e=o2(t,L);let{transitionEnd:n={},transition:s={},...o}=e||{};o={...o,...n};for(const i in o){const a=N0(o[i]);A0(t,i,a)}}const u1=t=>!!(t&&t.getVelocity);function V0(t){return!!(u1(t)&&t.add)}function I4(t,L){const e=t.getValue("willChange");if(V0(e))return e.add(L);if(!e&&Y1.WillChange){const n=new Y1.WillChange("auto");t.addValue("willChange",n),n.add(L)}}function g6(t){return t.replace(/([A-Z])/g,L=>`-${L.toLowerCase()}`)}const R0="framerAppearId",o9="data-"+g6(R0);function i9(t){return t.props[o9]}function F0({protectedKeys:t,needsAnimating:L},e){const n=t.hasOwnProperty(e)&&L[e]!==!0;return L[e]=!1,n}function a9(t,L,{delay:e=0,transitionOverride:n,type:s}={}){let{transition:o,transitionEnd:i,...a}=L;const l=t.getDefaultTransition();o=o?r9(o,l):l;const u=o==null?void 0:o.reduceMotion;n&&(o=n);const c=[],d=s&&t.animationState&&t.animationState.getState()[s];for(const f in a){const p=t.getValue(f,t.latestValues[f]??null),m=a[f];if(m===void 0||d&&F0(d,f))continue;const x={delay:e,...m6(o||{},f)},g=p.get();if(g!==void 0&&!p.isAnimating()&&!Array.isArray(m)&&m===g&&!x.velocity){q.update(()=>p.set(m));continue}let w=!1;if(window.MotionHandoffAnimation){const v=i9(t);if(v){const M=window.MotionHandoffAnimation(v,f,q);M!==null&&(x.startTime=M,w=!0)}}I4(t,f);const C=u??t.shouldReduceMotion;p.start(w6(f,p,m,C&&s9.has(f)?{type:!1}:x,t,w));const b=p.animation;b&&c.push(b)}if(i){const f=()=>q.update(()=>{i&&I0(t,i)});c.length?Promise.all(c).then(f):f()}return c}function V4(t,L,e={}){var l;const n=o2(t,L,e.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=n||{};e.transitionOverride&&(s=e.transitionOverride);const o=n?()=>Promise.all(a9(t,n,e)):()=>Promise.resolve(),i=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=s;return O0(t,L,u,c,d,f,e)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,c]=a==="beforeChildren"?[o,i]:[i,o];return u().then(()=>c())}else return Promise.all([o(),i(e.delay)])}function O0(t,L,e=0,n=0,s=0,o=1,i){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",L),a.push(V4(l,L,{...i,delay:e+(typeof n=="function"?0:n)+e9(t.variantChildren,l,n,s,o)}).then(()=>l.notify("AnimationComplete",L)));return Promise.all(a)}function B0(t,L,e={}){t.notify("AnimationStart",L);let n;if(Array.isArray(L)){const s=L.map(o=>V4(t,o,e));n=Promise.all(s)}else if(typeof L=="string")n=V4(t,L,e);else{const s=typeof L=="function"?o2(t,L,e.custom):L;n=Promise.all(a9(t,s,e))}return n.then(()=>{t.notify("AnimationComplete",L)})}const _0={test:t=>t==="auto",parse:t=>t},l9=t=>L=>L.test(t),c9=[Z2,A,A1,U1,de,ue,_0],t7=t=>c9.find(l9(t));function W0(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||C8(t):!0}const H0=new Set(["brightness","contrast","saturate","opacity"]);function $0(t){const[L,e]=t.slice(0,-1).split("(");if(L==="drop-shadow")return t;const[n]=e.match(c6)||[];if(!n)return t;const s=e.replace(n,"");let o=H0.has(L)?1:0;return n!==e&&(o*=100),L+"("+o+s+")"}const U0=/\b([a-z-]*)\(.*?\)/gu,R4={...Z1,getAnimatableNone:t=>{const L=t.match(U0);return L?L.map($0).join(" "):t}},F4={...Z1,getAnimatableNone:t=>{const L=Z1.parse(t);return Z1.createTransformer(t)(L.map(n=>typeof n=="number"?0:typeof n=="object"?{...n,alpha:1}:n))}},L7={...Z2,transform:Math.round},z0={rotate:U1,rotateX:U1,rotateY:U1,rotateZ:U1,scale:n3,scaleX:n3,scaleY:n3,scaleZ:n3,skew:U1,skewX:U1,skewY:U1,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:W2,originX:_5,originY:_5,originZ:A},b6={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,top:A,right:A,bottom:A,left:A,inset:A,insetBlock:A,insetBlockStart:A,insetBlockEnd:A,insetInline:A,insetInlineStart:A,insetInlineEnd:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,paddingBlock:A,paddingBlockStart:A,paddingBlockEnd:A,paddingInline:A,paddingInlineStart:A,paddingInlineEnd:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,marginBlock:A,marginBlockStart:A,marginBlockEnd:A,marginInline:A,marginInlineStart:A,marginInlineEnd:A,fontSize:A,backgroundPositionX:A,backgroundPositionY:A,...z0,zIndex:L7,fillOpacity:W2,strokeOpacity:W2,numOctaves:L7},G0={...b6,color:s1,backgroundColor:s1,outlineColor:s1,fill:s1,stroke:s1,borderColor:s1,borderTopColor:s1,borderRightColor:s1,borderBottomColor:s1,borderLeftColor:s1,filter:R4,WebkitFilter:R4,mask:F4,WebkitMask:F4},u9=t=>G0[t],K0=new Set([R4,F4]);function d9(t,L){let e=u9(t);return K0.has(e)||(e=Z1),e.getAnimatableNone?e.getAnimatableNone(L):void 0}const X0=new Set(["auto","none","0"]);function Y0(t,L,e){let n=0,s;for(;n<t.length&&!s;){const o=t[n];typeof o=="string"&&!X0.has(o)&&y2(o).values.length&&(s=t[n]),n++}if(s&&e)for(const o of L)t[o]=d9(e,s)}class q0 extends p6{constructor(L,e,n,s,o){super(L,e,n,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:L,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let c=0;c<L.length;c++){let d=L[c];if(typeof d=="string"&&(d=d.trim(),l6(d))){const f=n9(d,e.current);f!==void 0&&(L[c]=f),c===L.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!s9.has(n)||L.length!==2)return;const[s,o]=L,i=t7(s),a=t7(o),l=B5(s),u=B5(o);if(l!==u&&G1[n]){this.needsMeasurement=!0;return}if(i!==a)if(X5(i)&&X5(a))for(let c=0;c<L.length;c++){const d=L[c];typeof d=="string"&&(L[c]=parseFloat(d))}else G1[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:L,name:e}=this,n=[];for(let s=0;s<L.length;s++)(L[s]===null||W0(L[s]))&&n.push(s);n.length&&Y0(L,n,e)}measureInitialState(){const{element:L,unresolvedKeyframes:e,name:n}=this;if(!L||!L.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=G1[n](L.measureViewportBox(),window.getComputedStyle(L.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];s!==void 0&&L.getValue(n,s).jump(s,!1)}measureEndState(){var a;const{element:L,name:e,unresolvedKeyframes:n}=this;if(!L||!L.current)return;const s=L.getValue(e);s&&s.jump(this.measuredOrigin,!1);const o=n.length-1,i=n[o];n[o]=G1[e](L.measureViewportBox(),window.getComputedStyle(L.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{L.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function f9(t,L,e){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let n=document;const s=(e==null?void 0:e[t])??n.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(n=>n!=null)}const h9=(t,L)=>L&&typeof t=="number"?L.transform(t):t;function l3(t){return b8(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:C6}=N8(queueMicrotask,!1),T1={x:!1,y:!1};function p9(){return T1.x||T1.y}function J0(t){return t==="x"||t==="y"?T1[t]?null:(T1[t]=!0,()=>{T1[t]=!1}):T1.x||T1.y?null:(T1.x=T1.y=!0,()=>{T1.x=T1.y=!1})}function m9(t,L){const e=f9(t),n=new AbortController,s={passive:!0,...L,signal:n.signal};return[e,s,()=>n.abort()]}function Q0(t){return!(t.pointerType==="touch"||p9())}function tn(t,L,e={}){const[n,s,o]=m9(t,e);return n.forEach(i=>{let a=!1,l=!1,u;const c=()=>{i.removeEventListener("pointerleave",m)},d=g=>{u&&(u(g),u=void 0),c()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(g))},p=()=>{a=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},m=g=>{if(g.pointerType!=="touch"){if(a){l=!0;return}d(g)}},x=g=>{if(!Q0(g))return;l=!1;const w=L(i,g);typeof w=="function"&&(u=w,i.addEventListener("pointerleave",m,s))};i.addEventListener("pointerenter",x,s),i.addEventListener("pointerdown",p,s)}),o}const w9=(t,L)=>L?t===L?!0:w9(t,L.parentElement):!1,y6=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Ln=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function en(t){return Ln.has(t.tagName)||t.isContentEditable===!0}const nn=new Set(["INPUT","SELECT","TEXTAREA"]);function rn(t){return nn.has(t.tagName)||t.isContentEditable===!0}const c3=new WeakSet;function e7(t){return L=>{L.key==="Enter"&&t(L)}}function r4(t,L){t.dispatchEvent(new PointerEvent("pointer"+L,{isPrimary:!0,bubbles:!0}))}const sn=(t,L)=>{const e=t.currentTarget;if(!e)return;const n=e7(()=>{if(c3.has(e))return;r4(e,"down");const s=e7(()=>{r4(e,"up")}),o=()=>r4(e,"cancel");e.addEventListener("keyup",s,L),e.addEventListener("blur",o,L)});e.addEventListener("keydown",n,L),e.addEventListener("blur",()=>e.removeEventListener("keydown",n),L)};function n7(t){return y6(t)&&!p9()}const r7=new WeakSet;function on(t,L,e={}){const[n,s,o]=m9(t,e),i=a=>{const l=a.currentTarget;if(!n7(a)||r7.has(a))return;c3.add(l),e.stopPropagation&&r7.add(a);const u=L(l,a),c=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),c3.has(l)&&c3.delete(l),n7(p)&&typeof u=="function"&&u(p,{success:m})},d=p=>{c(p,l===window||l===document||e.useGlobalTarget||w9(l,p.target))},f=p=>{c(p,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return n.forEach(a=>{(e.useGlobalTarget?window:a).addEventListener("pointerdown",i,s),l3(a)&&(a.addEventListener("focus",u=>sn(u,s)),!en(a)