accessibility-plugin-react 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +15 -0
- package/README.md +77 -45
- package/dist/index.d.mts +114 -0
- package/dist/index.d.ts +114 -1
- package/dist/index.js +1694 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1657 -0
- package/dist/index.mjs.map +1 -0
- package/dist/style.css +593 -0
- package/docs/API.md +89 -0
- package/docs/ARCHITECTURE.md +43 -0
- package/docs/BASELINE.md +48 -0
- package/docs/CUSTOM_FEATURES.md +101 -0
- package/docs/DESIGN.md +39 -0
- package/docs/DEVELOPMENT.md +91 -0
- package/docs/FEATURES.md +49 -0
- package/docs/HANDOVER.md +143 -0
- package/docs/INSTALLATION.md +92 -0
- package/docs/MIGRATION.md +40 -0
- package/docs/PROJECT_STATUS.md +95 -0
- package/docs/RELEASE.md +107 -0
- package/docs/ROADMAP.md +29 -0
- package/docs/TROUBLESHOOTING.md +25 -0
- package/docs/assets/clean-light-desktop.png +0 -0
- package/docs/assets/clean-light-mobile.png +0 -0
- package/docs/assets/movable-desktop.png +0 -0
- package/docs/assets/position-menu.png +0 -0
- package/docs/assets/quick-actions-mobile.png +0 -0
- package/docs/assets/widget-desktop.png +0 -0
- package/docs/assets/widget-mobile.png +0 -0
- package/package.json +86 -48
- package/dist/index.es.js +0 -8354
- package/dist/index.umd.js +0 -14
package/dist/index.umd.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
(function(K,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],w):(K=typeof globalThis<"u"?globalThis:K||self,w(K.AccessibilityPlugin={},K.React))})(this,(function(K,w){"use strict";function Ro(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const gt=Ro(w);var yt={exports:{}},Ze={};var ds;function jo(){if(ds)return Ze;ds=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,i,o){var r=null;if(o!==void 0&&(r=""+o),i.key!==void 0&&(r=""+i.key),"key"in i){o={};for(var a in i)a!=="key"&&(o[a]=i[a])}else o=i;return i=o.ref,{$$typeof:e,type:s,key:r,ref:i!==void 0?i:null,props:o}}return Ze.Fragment=t,Ze.jsx=n,Ze.jsxs=n,Ze}var Je={};var hs;function Lo(){return hs||(hs=1,process.env.NODE_ENV!=="production"&&(function(){function e(m){if(m==null)return null;if(typeof m=="function")return m.$$typeof===J?null:m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case x:return"Fragment";case k:return"Profiler";case v:return"StrictMode";case V:return"Suspense";case D:return"SuspenseList";case U:return"Activity"}if(typeof m=="object")switch(typeof m.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),m.$$typeof){case b:return"Portal";case E:return m.displayName||"Context";case T:return(m._context.displayName||"Context")+".Consumer";case C:var R=m.render;return m=m.displayName,m||(m=R.displayName||R.name||"",m=m!==""?"ForwardRef("+m+")":"ForwardRef"),m;case y:return R=m.displayName||null,R!==null?R:e(m.type)||"Memo";case I:R=m._payload,m=m._init;try{return e(m(R))}catch{}}return null}function t(m){return""+m}function n(m){try{t(m);var R=!1}catch{R=!0}if(R){R=console;var L=R.error,O=typeof Symbol=="function"&&Symbol.toStringTag&&m[Symbol.toStringTag]||m.constructor.name||"Object";return L.call(R,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",O),t(m)}}function s(m){if(m===x)return"<>";if(typeof m=="object"&&m!==null&&m.$$typeof===I)return"<...>";try{var R=e(m);return R?"<"+R+">":"<...>"}catch{return"<...>"}}function i(){var m=ce.A;return m===null?null:m.getOwner()}function o(){return Error("react-stack-top-frame")}function r(m){if(Re.call(m,"key")){var R=Object.getOwnPropertyDescriptor(m,"key").get;if(R&&R.isReactWarning)return!1}return m.key!==void 0}function a(m,R){function L(){ee||(ee=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",R))}L.isReactWarning=!0,Object.defineProperty(m,"key",{get:L,configurable:!0})}function l(){var m=e(this.type);return F[m]||(F[m]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),m=this.props.ref,m!==void 0?m:null}function u(m,R,L,O,ge,Xe){var N=L.ref;return m={$$typeof:p,type:m,key:R,props:L,_owner:O},(N!==void 0?N:null)!==null?Object.defineProperty(m,"ref",{enumerable:!1,get:l}):Object.defineProperty(m,"ref",{enumerable:!1,value:null}),m._store={},Object.defineProperty(m._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(m,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(m,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ge}),Object.defineProperty(m,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Xe}),Object.freeze&&(Object.freeze(m.props),Object.freeze(m)),m}function c(m,R,L,O,ge,Xe){var N=R.children;if(N!==void 0)if(O)if(ke(N)){for(O=0;O<N.length;O++)d(N[O]);Object.freeze&&Object.freeze(N)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(N);if(Re.call(R,"key")){N=e(m);var ye=Object.keys(R).filter(function(qe){return qe!=="key"});O=0<ye.length?"{key: someKey, "+ye.join(": ..., ")+": ...}":"{key: someKey}",re[N+O]||(ye=0<ye.length?"{"+ye.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
|
-
let props = %s;
|
|
3
|
-
<%s {...props} />
|
|
4
|
-
React keys must be passed directly to JSX without using spread:
|
|
5
|
-
let props = %s;
|
|
6
|
-
<%s key={someKey} {...props} />`,O,N,ye,N),re[N+O]=!0)}if(N=null,L!==void 0&&(n(L),N=""+L),r(R)&&(n(R.key),N=""+R.key),"key"in R){L={};for(var Se in R)Se!=="key"&&(L[Se]=R[Se])}else L=R;return N&&a(L,typeof m=="function"?m.displayName||m.name||"Unknown":m),u(m,N,L,i(),ge,Xe)}function d(m){h(m)?m._store&&(m._store.validated=1):typeof m=="object"&&m!==null&&m.$$typeof===I&&(m._payload.status==="fulfilled"?h(m._payload.value)&&m._payload.value._store&&(m._payload.value._store.validated=1):m._store&&(m._store.validated=1))}function h(m){return typeof m=="object"&&m!==null&&m.$$typeof===p}var f=w,p=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),E=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),J=Symbol.for("react.client.reference"),ce=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Re=Object.prototype.hasOwnProperty,ke=Array.isArray,Q=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(m){return m()}};var ee,F={},A=f.react_stack_bottom_frame.bind(f,o)(),te=Q(s(o)),re={};Je.Fragment=x,Je.jsx=function(m,R,L){var O=1e4>ce.recentlyCreatedOwnerStacks++;return c(m,R,L,!1,O?Error("react-stack-top-frame"):A,O?Q(s(m)):te)},Je.jsxs=function(m,R,L){var O=1e4>ce.recentlyCreatedOwnerStacks++;return c(m,R,L,!0,O?Error("react-stack-top-frame"):A,O?Q(s(m)):te)}})()),Je}var fs;function No(){return fs||(fs=1,process.env.NODE_ENV==="production"?yt.exports=jo():yt.exports=Lo()),yt.exports}var g=No();const ms=w.createContext(void 0),ps=({children:e})=>{const[t,n]=w.useState({contrast:"normal",fontSize:1,lineHeight:1,letterSpacing:0,textAlign:"initial",cursor:"normal",hideImages:!1,highlightLinks:!1,isWidgetOpen:!1}),s=()=>{n({contrast:"normal",fontSize:1,lineHeight:1,letterSpacing:0,textAlign:"initial",cursor:"normal",hideImages:!1,highlightLinks:!1,isWidgetOpen:!0})};w.useEffect(()=>{const o=document.documentElement;o.classList.remove("acc-invert","acc-grayscale","acc-low-sat","acc-high-sat","acc-y-on-b","acc-w-on-b","acc-b-on-y"),t.contrast!=="normal"&&o.classList.add(`acc-${t.contrast}`),t.fontSize!==1?o.style.fontSize=`${t.fontSize*100}%`:o.style.fontSize="",t.lineHeight!==1?o.style.lineHeight=`${t.lineHeight}`:o.style.lineHeight="",t.letterSpacing!==0?o.style.letterSpacing=`${t.letterSpacing}em`:o.style.letterSpacing="",t.textAlign!=="initial"?o.style.textAlign=t.textAlign:o.style.textAlign="",t.hideImages?o.classList.add("acc-hide-images"):o.classList.remove("acc-hide-images"),t.highlightLinks?o.classList.add("acc-highlight-links"):o.classList.remove("acc-highlight-links"),o.classList.remove("acc-cursor-big","acc-cursor-guide"),t.cursor==="big"&&o.classList.add("acc-cursor-big"),t.cursor==="reading-guide"&&o.classList.add("acc-cursor-guide")},[t]);const i={...t,setContrast:o=>n(r=>({...r,contrast:o})),setFontSize:o=>n(r=>({...r,fontSize:o})),setLineHeight:o=>n(r=>({...r,lineHeight:o})),setLetterSpacing:o=>n(r=>({...r,letterSpacing:o})),setTextAlign:o=>n(r=>({...r,textAlign:o})),setCursor:o=>n(r=>({...r,cursor:o})),setHideImages:o=>n(r=>({...r,hideImages:o})),setHighlightLinks:o=>n(r=>({...r,highlightLinks:o})),toggleWidget:()=>n(o=>({...o,isWidgetOpen:!o.isWidgetOpen})),reset:s};return g.jsx(ms.Provider,{value:i,children:e})},de=()=>{const e=w.useContext(ms);if(!e)throw new Error("useAccessibility must be used within AccessibilityProvider");return e},Bt=w.createContext({});function zt(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const $t=typeof window<"u",gs=$t?w.useLayoutEffect:w.useEffect,bt=w.createContext(null);function Ut(e,t){e.indexOf(t)===-1&&e.push(t)}function Wt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const he=(e,t,n)=>n>t?t:n<e?e:n;function Gt(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let je=()=>{},fe=()=>{};process.env.NODE_ENV!=="production"&&(je=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Gt(t,n))},fe=(e,t,n)=>{if(!e)throw new Error(Gt(t,n))});const me={},ys=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function bs(e){return typeof e=="object"&&e!==null}const xs=e=>/^0[^.\s]+$/u.test(e);function Ht(e){let t;return()=>(t===void 0&&(t=e()),t)}const ne=e=>e,Oo=(e,t)=>n=>t(e(n)),Qe=(...e)=>e.reduce(Oo),et=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class Kt{constructor(){this.subscriptions=[]}add(t){return Ut(this.subscriptions,t),()=>Wt(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const oe=e=>e*1e3,se=e=>e/1e3;function vs(e,t){return t?e*(1e3/t):0}const ws=new Set;function Yt(e,t,n){e||ws.has(t)||(console.warn(Gt(t,n)),ws.add(t))}const Ts=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Io=1e-7,Fo=12;function _o(e,t,n,s,i){let o,r,a=0;do r=t+(n-t)/2,o=Ts(r,s,i)-e,o>0?n=r:t=r;while(Math.abs(o)>Io&&++a<Fo);return r}function tt(e,t,n,s){if(e===t&&n===s)return ne;const i=o=>_o(o,0,1,e,n);return o=>o===0||o===1?o:Ts(i(o),t,s)}const ks=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ss=e=>t=>1-e(1-t),Ps=tt(.33,1.53,.69,.99),Xt=Ss(Ps),As=ks(Xt),Cs=e=>(e*=2)<1?.5*Xt(e):.5*(2-Math.pow(2,-10*(e-1))),qt=e=>1-Math.sin(Math.acos(e)),Ms=Ss(qt),Vs=ks(qt),Bo=tt(.42,0,1,1),zo=tt(0,0,.58,1),Es=tt(.42,0,.58,1),$o=e=>Array.isArray(e)&&typeof e[0]!="number",Ds=e=>Array.isArray(e)&&typeof e[0]=="number",Rs={linear:ne,easeIn:Bo,easeInOut:Es,easeOut:zo,circIn:qt,circInOut:Vs,circOut:Ms,backIn:Xt,backInOut:As,backOut:Ps,anticipate:Cs},Uo=e=>typeof e=="string",js=e=>{if(Ds(e)){fe(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,i]=e;return tt(t,n,s,i)}else if(Uo(e))return fe(Rs[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Rs[e];return e},xt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Wo(e,t){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,h=!1)=>{const p=h&&i?n:s;return d&&r.add(c),p.has(c)||p.add(c),c},cancel:c=>{s.delete(c),r.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const Go=40;function Ls(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=xt.reduce((T,E)=>(T[E]=Wo(o),T),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:f,postRender:p}=r,b=()=>{const T=me.useManualTiming?i.timestamp:performance.now();n=!1,me.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(T-i.timestamp,Go),1)),i.timestamp=T,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),f.process(i),p.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(b))},x=()=>{n=!0,s=!0,i.isProcessing||e(b)};return{schedule:xt.reduce((T,E)=>{const C=r[E];return T[E]=(V,D=!1,y=!1)=>(n||x(),C.schedule(V,D,y)),T},{}),cancel:T=>{for(let E=0;E<xt.length;E++)r[xt[E]].cancel(T)},state:i,steps:r}}const{schedule:_,cancel:be,state:H,steps:Zt}=Ls(typeof requestAnimationFrame<"u"?requestAnimationFrame:ne,!0);let vt;function Ho(){vt=void 0}const Z={now:()=>(vt===void 0&&Z.set(H.isProcessing||me.useManualTiming?H.timestamp:performance.now()),vt),set:e=>{vt=e,queueMicrotask(Ho)}},Ns=e=>t=>typeof t=="string"&&t.startsWith(e),Jt=Ns("--"),Ko=Ns("var(--"),Qt=e=>Ko(e)?Yo.test(e.split("/*")[0].trim()):!1,Yo=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Le={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},nt={...Le,transform:e=>he(0,1,e)},wt={...Le,default:1},st=e=>Math.round(e*1e5)/1e5,en=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Xo(e){return e==null}const qo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tn=(e,t)=>n=>!!(typeof n=="string"&&qo.test(n)&&n.startsWith(e)||t&&!Xo(n)&&Object.prototype.hasOwnProperty.call(n,t)),Os=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(en);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Zo=e=>he(0,255,e),nn={...Le,transform:e=>Math.round(Zo(e))},Pe={test:tn("rgb","red"),parse:Os("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+nn.transform(e)+", "+nn.transform(t)+", "+nn.transform(n)+", "+st(nt.transform(s))+")"};function Jo(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const sn={test:tn("#"),parse:Jo,transform:Pe.transform},it=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),xe=it("deg"),ue=it("%"),M=it("px"),Qo=it("vh"),ea=it("vw"),Is={...ue,parse:e=>ue.parse(e)/100,transform:e=>ue.transform(e*100)},Ne={test:tn("hsl","hue"),parse:Os("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ue.transform(st(t))+", "+ue.transform(st(n))+", "+st(nt.transform(s))+")"},$={test:e=>Pe.test(e)||sn.test(e)||Ne.test(e),parse:e=>Pe.test(e)?Pe.parse(e):Ne.test(e)?Ne.parse(e):sn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Pe.transform(e):Ne.transform(e),getAnimatableNone:e=>{const t=$.parse(e);return t.alpha=0,$.transform(t)}},ta=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function na(e){return isNaN(e)&&typeof e=="string"&&(e.match(en)?.length||0)+(e.match(ta)?.length||0)>0}const Fs="number",_s="color",sa="var",ia="var(",Bs="${}",ra=/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 rt(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(ra,l=>($.test(l)?(s.color.push(o),i.push(_s),n.push($.parse(l))):l.startsWith(ia)?(s.var.push(o),i.push(sa),n.push(l)):(s.number.push(o),i.push(Fs),n.push(parseFloat(l))),++o,Bs)).split(Bs);return{values:n,split:a,indexes:s,types:i}}function zs(e){return rt(e).values}function $s(e){const{split:t,types:n}=rt(e),s=t.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=t[r],i[r]!==void 0){const a=n[r];a===Fs?o+=st(i[r]):a===_s?o+=$.transform(i[r]):o+=i[r]}return o}}const oa=e=>typeof e=="number"?0:$.test(e)?$.getAnimatableNone(e):e;function aa(e){const t=zs(e);return $s(e)(t.map(oa))}const ve={test:na,parse:zs,createTransformer:$s,getAnimatableNone:aa};function rn(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 la({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let i=0,o=0,r=0;if(!t)i=o=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=rn(l,a,e+1/3),o=rn(l,a,e),r=rn(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Tt(e,t){return n=>n>0?t:e}const B=(e,t,n)=>e+(t-e)*n,on=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},ca=[sn,Pe,Ne],ua=e=>ca.find(t=>t.test(e));function Us(e){const t=ua(e);if(je(!!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===Ne&&(n=la(n)),n}const Ws=(e,t)=>{const n=Us(e),s=Us(t);if(!n||!s)return Tt(e,t);const i={...n};return o=>(i.red=on(n.red,s.red,o),i.green=on(n.green,s.green,o),i.blue=on(n.blue,s.blue,o),i.alpha=B(n.alpha,s.alpha,o),Pe.transform(i))},an=new Set(["none","hidden"]);function da(e,t){return an.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ha(e,t){return n=>B(e,t,n)}function ln(e){return typeof e=="number"?ha:typeof e=="string"?Qt(e)?Tt:$.test(e)?Ws:pa:Array.isArray(e)?Gs:typeof e=="object"?$.test(e)?Ws:fa:Tt}function Gs(e,t){const n=[...e],s=n.length,i=e.map((o,r)=>ln(o)(o,t[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function fa(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=ln(e[i])(e[i],t[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function ma(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],r=e.indexes[o][s[o]],a=e.values[r]??0;n[i]=a,s[o]++}return n}const pa=(e,t)=>{const n=ve.createTransformer(t),s=rt(e),i=rt(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?an.has(e)&&!i.values.length||an.has(t)&&!s.values.length?da(e,t):Qe(Gs(ma(s,i),i.values),n):(je(!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"),Tt(e,t))};function Hs(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?B(e,t,n):ln(e)(e,t)}const ga=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>_.update(t,n),stop:()=>be(t),now:()=>H.isProcessing?H.timestamp:Z.now()}},Ks=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)s+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},kt=2e4;function cn(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<kt;)t+=n,s=e.next(t);return t>=kt?1/0:t}function ya(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(cn(s),kt);return{type:"keyframes",ease:o=>s.next(i*o).value/t,duration:se(i)}}const ba=5;function Ys(e,t,n){const s=Math.max(t-ba,0);return vs(n-e(s),t-s)}const z={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},un=.001;function xa({duration:e=z.duration,bounce:t=z.bounce,velocity:n=z.velocity,mass:s=z.mass}){let i,o;je(e<=oe(z.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=he(z.minDamping,z.maxDamping,r),e=he(z.minDuration,z.maxDuration,se(e)),r<1?(i=u=>{const c=u*r,d=c*e,h=c-n,f=dn(u,r),p=Math.exp(-d);return un-h/f*p},o=u=>{const d=u*r*e,h=d*n+n,f=Math.pow(r,2)*Math.pow(u,2)*e,p=Math.exp(-d),b=dn(Math.pow(u,2),r);return(-i(u)+un>0?-1:1)*((h-f)*p)/b}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-un+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=wa(i,o,a);if(e=oe(e),isNaN(l))return{stiffness:z.stiffness,damping:z.damping,duration:e};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:e}}}const va=12;function wa(e,t,n){let s=n;for(let i=1;i<va;i++)s=s-e(s)/t(s);return s}function dn(e,t){return e*Math.sqrt(1-t*t)}const Ta=["duration","bounce"],ka=["stiffness","damping","mass"];function Xs(e,t){return t.some(n=>e[n]!==void 0)}function Sa(e){let t={velocity:z.velocity,stiffness:z.stiffness,damping:z.damping,mass:z.mass,isResolvedFromDuration:!1,...e};if(!Xs(e,ka)&&Xs(e,Ta))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*he(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:z.mass,stiffness:i,damping:o}}else{const n=xa(e);t={...t,...n,mass:z.mass},t.isResolvedFromDuration=!0}return t}function St(e=z.visualDuration,t=z.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:d,velocity:h,isResolvedFromDuration:f}=Sa({...n,velocity:-se(n.velocity||0)}),p=h||0,b=u/(2*Math.sqrt(l*c)),x=r-o,v=se(Math.sqrt(l/c)),k=Math.abs(x)<5;s||(s=k?z.restSpeed.granular:z.restSpeed.default),i||(i=k?z.restDelta.granular:z.restDelta.default);let T;if(b<1){const C=dn(v,b);T=V=>{const D=Math.exp(-b*v*V);return r-D*((p+b*v*x)/C*Math.sin(C*V)+x*Math.cos(C*V))}}else if(b===1)T=C=>r-Math.exp(-v*C)*(x+(p+v*x)*C);else{const C=v*Math.sqrt(b*b-1);T=V=>{const D=Math.exp(-b*v*V),y=Math.min(C*V,300);return r-D*((p+b*v*x)*Math.sinh(y)+C*x*Math.cosh(y))/C}}const E={calculatedDuration:f&&d||null,next:C=>{const V=T(C);if(f)a.done=C>=d;else{let D=C===0?p:0;b<1&&(D=C===0?oe(p):Ys(T,C,V));const y=Math.abs(D)<=s,I=Math.abs(r-V)<=i;a.done=y&&I}return a.value=a.done?r:V,a},toString:()=>{const C=Math.min(cn(E),kt),V=Ks(D=>E.next(C*D).value,C,30);return C+"ms "+V},toTransition:()=>{}};return E}St.applyToOptions=e=>{const t=ya(e,100,St);return e.ease=t.ease,e.duration=oe(t.duration),e.type="keyframes",e};function hn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],h={done:!1,value:d},f=y=>a!==void 0&&y<a||l!==void 0&&y>l,p=y=>a===void 0?l:l===void 0||Math.abs(a-y)<Math.abs(l-y)?a:l;let b=n*t;const x=d+b,v=r===void 0?x:r(x);v!==x&&(b=v-d);const k=y=>-b*Math.exp(-y/s),T=y=>v+k(y),E=y=>{const I=k(y),U=T(y);h.done=Math.abs(I)<=u,h.value=h.done?v:U};let C,V;const D=y=>{f(h.value)&&(C=y,V=St({keyframes:[h.value,p(h.value)],velocity:Ys(T,y,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return D(0),{calculatedDuration:null,next:y=>{let I=!1;return!V&&C===void 0&&(I=!0,E(y),D(y)),C!==void 0&&y>=C?V.next(y-C):(!I&&E(y),h)}}}function Pa(e,t,n){const s=[],i=n||me.mix||Hs,o=e.length-1;for(let r=0;r<o;r++){let a=i(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||ne:t;a=Qe(l,a)}s.push(a)}return s}function Aa(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const o=e.length;if(fe(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Pa(t,s,i),l=a.length,u=c=>{if(r&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const h=et(e[d],e[d+1],c);return a[d](h)};return n?c=>u(he(e[0],e[o-1],c)):u}function Ca(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=et(0,t,s);e.push(B(n,1,i))}}function Ma(e){const t=[0];return Ca(t,e.length-1),t}function Va(e,t){return e.map(n=>n*t)}function Ea(e,t){return e.map(()=>t||Es).splice(0,e.length-1)}function Oe({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=$o(s)?s.map(js):js(s),o={done:!1,value:t[0]},r=Va(n&&n.length===t.length?n:Ma(t),e),a=Aa(r,t,{ease:Array.isArray(i)?i:Ea(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const Da=e=>e!==null;function fn(e,{repeat:t,repeatType:n="loop"},s,i=1){const o=e.filter(Da),a=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Ra={decay:hn,inertia:hn,tween:Oe,keyframes:Oe,spring:St};function qs(e){typeof e.type=="string"&&(e.type=Ra[e.type])}class mn{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 ja=e=>e/100;class pn extends mn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Z.now()&&this.tick(Z.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;qs(t);const{type:n=Oe,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Oe;process.env.NODE_ENV!=="production"&&l!==Oe&&fe(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Oe&&typeof a[0]!="number"&&(this.mixKeyframes=Qe(ja,Hs(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=cn(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,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:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:h,repeatDelay:f,type:p,onUpdate:b,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,E=s;if(d){const y=Math.min(this.currentTime,i)/a;let I=Math.floor(y),U=y%1;!U&&y>=1&&(U=1),U===1&&I--,I=Math.min(I,d+1),!!(I%2)&&(h==="reverse"?(U=1-U,f&&(U-=f/a)):h==="mirror"&&(E=r)),T=he(0,1,U)*a}const C=k?{done:!1,value:c[0]}:E.next(T);o&&(C.value=o(C.value));let{done:V}=C;!k&&l!==null&&(V=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return D&&p!==hn&&(C.value=fn(c,this.options,x,this.speed)),b&&b(C.value),D&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return se(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+se(t)}get time(){return se(this.currentTime)}set time(t){t=oe(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Z.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=se(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ga,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),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(Z.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function La(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ae=e=>e*180/Math.PI,gn=e=>{const t=Ae(Math.atan2(e[1],e[0]));return yn(t)},Na={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:gn,rotateZ:gn,skewX:e=>Ae(Math.atan(e[1])),skewY:e=>Ae(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},yn=e=>(e=e%360,e<0&&(e+=360),e),Zs=gn,Js=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Qs=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Oa={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Js,scaleY:Qs,scale:e=>(Js(e)+Qs(e))/2,rotateX:e=>yn(Ae(Math.atan2(e[6],e[5]))),rotateY:e=>yn(Ae(Math.atan2(-e[2],e[0]))),rotateZ:Zs,rotate:Zs,skewX:e=>Ae(Math.atan(e[4])),skewY:e=>Ae(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function bn(e){return e.includes("scale")?1:0}function xn(e,t){if(!e||e==="none")return bn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Oa,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Na,i=a}if(!i)return bn(t);const o=s[t],r=i[1].split(",").map(Fa);return typeof o=="function"?o(r):r[o]}const Ia=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return xn(n,t)};function Fa(e){return parseFloat(e.trim())}const Ie=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fe=new Set(Ie),ei=e=>e===Le||e===M,_a=new Set(["x","y","z"]),Ba=Ie.filter(e=>!_a.has(e));function za(e){const t=[];return Ba.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Ce={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})=>xn(t,"x"),y:(e,{transform:t})=>xn(t,"y")};Ce.translateX=Ce.x,Ce.translateY=Ce.y;const Me=new Set;let vn=!1,wn=!1,Tn=!1;function ti(){if(wn){const e=Array.from(Me).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=za(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}wn=!1,vn=!1,Me.forEach(e=>e.complete(Tn)),Me.clear()}function ni(){Me.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wn=!0)})}function $a(){Tn=!0,ni(),ti(),Tn=!1}class kn{constructor(t,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Me.add(this),vn||(vn=!0,_.read(ni),_.resolveKeyframes(ti))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const o=i?.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),i&&o===void 0&&i.set(t[0])}La(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Me.delete(this)}cancel(){this.state==="scheduled"&&(Me.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ua=e=>e.startsWith("--");function Wa(e,t,n){Ua(t)?e.style.setProperty(t,n):e.style[t]=n}const Ga=Ht(()=>window.ScrollTimeline!==void 0),Ha={};function Ka(e,t){const n=Ht(e);return()=>Ha[t]??n()}const si=Ka(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ot=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,ii={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ot([0,.65,.55,1]),circOut:ot([.55,0,1,.45]),backIn:ot([.31,.01,.66,-.59]),backOut:ot([.33,1.53,.69,.99])};function ri(e,t){if(e)return typeof e=="function"?si()?Ks(e,t):"ease-out":Ds(e)?ot(e):Array.isArray(e)?e.map(n=>ri(n,t)||ii.easeOut):ii[e]}function Ya(e,t,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=ri(a,i);Array.isArray(d)&&(c.easing=d);const h={delay:s,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(c,h)}function oi(e){return typeof e=="function"&&"applyToOptions"in e}function Xa({type:e,...t}){return oi(e)&&si()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class qa extends mn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=t,fe(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Xa(t);this.animation=Ya(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=fn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Wa(n,s,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return se(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+se(t)}get time(){return se(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=oe(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Ga()?(this.animation.timeline=t,ne):n(this)}}const ai={anticipate:Cs,backInOut:As,circInOut:Vs};function Za(e){return e in ai}function Ja(e){typeof e.ease=="string"&&Za(e.ease)&&(e.ease=ai[e.ease])}const li=10;class Qa extends qa{constructor(t){Ja(t),qs(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new pn({...r,autoplay:!1}),l=oe(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-li).value,a.sample(l).value,li),a.stop()}}const ci=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ve.test(e)||e==="0")&&!e.startsWith("url("));function el(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 tl(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],r=ci(i,t),a=ci(o,t);return je(r===a,`You are trying to animate ${t} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:el(e)||(n==="spring"||oi(n))&&s}function Sn(e){e.duration=0,e.type="keyframes"}const nl=new Set(["opacity","clipPath","filter","transform"]),sl=Ht(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function il(e){const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return sl()&&n&&nl.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const rl=40;class ol extends mn{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Z.now();const h={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...d},f=c?.KeyframeResolver||kn;this.keyframeResolver=new f(a,(p,b,x)=>this.onKeyframesResolved(p,b,h,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=Z.now(),tl(t,o,r,a)||((me.instantAnimations||!l)&&c?.(fn(t,s,n)),t[0]=t[t.length-1],Sn(s),s.repeat=0);const h={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>rl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},f=!u&&il(h)?new Qa({...h,element:h.motionValue.owner.current}):new pn(h);f.finished.then(()=>this.notifyFinished()).catch(ne),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),$a()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const al=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ll(e){const t=al.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const cl=4;function ui(e,t,n=1){fe(n<=cl,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=ll(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const r=o.trim();return ys(r)?parseFloat(r):r}return Qt(i)?ui(i,t,n+1):i}function Pn(e,t){return e?.[t]??e?.default??e}const di=new Set(["width","height","top","left","right","bottom",...Ie]),ul={test:e=>e==="auto",parse:e=>e},hi=e=>t=>t.test(e),fi=[Le,M,ue,xe,ea,Qo,ul],mi=e=>fi.find(hi(e));function dl(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xs(e):!0}const hl=new Set(["brightness","contrast","saturate","opacity"]);function fl(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(en)||[];if(!s)return e;const i=n.replace(s,"");let o=hl.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+i+")"}const ml=/\b([a-z-]*)\(.*?\)/gu,An={...ve,getAnimatableNone:e=>{const t=e.match(ml);return t?t.map(fl).join(" "):e}},pi={...Le,transform:Math.round},Cn={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,backgroundPositionX:M,backgroundPositionY:M,...{rotate:xe,rotateX:xe,rotateY:xe,rotateZ:xe,scale:wt,scaleX:wt,scaleY:wt,scaleZ:wt,skew:xe,skewX:xe,skewY:xe,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:nt,originX:Is,originY:Is,originZ:M},zIndex:pi,fillOpacity:nt,strokeOpacity:nt,numOctaves:pi},pl={...Cn,color:$,backgroundColor:$,outlineColor:$,fill:$,stroke:$,borderColor:$,borderTopColor:$,borderRightColor:$,borderBottomColor:$,borderLeftColor:$,filter:An,WebkitFilter:An},gi=e=>pl[e];function yi(e,t){let n=gi(e);return n!==An&&(n=ve),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const gl=new Set(["auto","none","0"]);function yl(e,t,n){let s=0,i;for(;s<e.length&&!i;){const o=e[s];typeof o=="string"&&!gl.has(o)&&rt(o).values.length&&(i=e[s]),s++}if(i&&n)for(const o of t)e[o]=yi(n,i)}class bl extends kn{constructor(t,n,s,i,o){super(t,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),Qt(u))){const c=ui(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!di.has(s)||t.length!==2)return;const[i,o]=t,r=mi(i),a=mi(o);if(r!==a)if(ei(r)&&ei(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else Ce[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||dl(t[i]))&&s.push(i);s.length&&yl(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ce[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=Ce[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function xl(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const i=n?.[e]??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const bi=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function xi(e){return bs(e)&&"offsetHeight"in e}const vi=30,vl=e=>!isNaN(parseFloat(e));class wl{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=Z.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Z.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=vl(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Yt(!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 Kt);const s=this.events[t].add(n);return t==="change"?()=>{s(),_.read(()=>{this.events.change.getSize()||this.stop()})}:s}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,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vi);return vs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function _e(e,t){return new wl(e,t)}const{schedule:Mn}=Ls(queueMicrotask,!1),ae={x:!1,y:!1};function wi(){return ae.x||ae.y}function Tl(e){return e==="x"||e==="y"?ae[e]?null:(ae[e]=!0,()=>{ae[e]=!1}):ae.x||ae.y?null:(ae.x=ae.y=!0,()=>{ae.x=ae.y=!1})}function Ti(e,t){const n=xl(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function ki(e){return!(e.pointerType==="touch"||wi())}function kl(e,t,n={}){const[s,i,o]=Ti(e,n),r=a=>{if(!ki(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=d=>{ki(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const Si=(e,t)=>t?e===t?!0:Si(e,t.parentElement):!1,Vn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Sl=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Pl(e){return Sl.has(e.tagName)||e.tabIndex!==-1}const Pt=new WeakSet;function Pi(e){return t=>{t.key==="Enter"&&e(t)}}function En(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Al=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=Pi(()=>{if(Pt.has(n))return;En(n,"down");const i=Pi(()=>{En(n,"up")}),o=()=>En(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function Ai(e){return Vn(e)&&!wi()}function Cl(e,t,n={}){const[s,i,o]=Ti(e,n),r=a=>{const l=a.currentTarget;if(!Ai(a))return;Pt.add(l);const u=t(l,a),c=(f,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),Pt.has(l)&&Pt.delete(l),Ai(f)&&typeof u=="function"&&u(f,{success:p})},d=f=>{c(f,l===window||l===document||n.useGlobalTarget||Si(l,f.target))},h=f=>{c(f,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),xi(a)&&(a.addEventListener("focus",u=>Al(u,i)),!Pl(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Ci(e){return bs(e)&&"ownerSVGElement"in e}function Ml(e){return Ci(e)&&e.tagName==="svg"}const Y=e=>!!(e&&e.getVelocity),Vl=[...fi,$,ve],El=e=>Vl.find(hi(e)),Dn=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Mi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Dl(...e){return t=>{let n=!1;const s=e.map(i=>{const o=Mi(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<s.length;i++){const o=s[i];typeof o=="function"?o():Mi(e[i],null)}}}}function Rl(...e){return gt.useCallback(Dl(...e),e)}class jl extends gt.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=xi(s)&&s.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Ll({children:e,isPresent:t,anchorX:n,root:s}){const i=w.useId(),o=w.useRef(null),r=w.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=w.useContext(Dn),l=Rl(o,e?.ref);return w.useInsertionEffect(()=>{const{width:u,height:c,top:d,left:h,right:f}=r.current;if(t||!o.current||!u||!c)return;const p=n==="left"?`left: ${h}`:`right: ${f}`;o.current.dataset.motionPopId=i;const b=document.createElement("style");a&&(b.nonce=a);const x=s??document.head;return x.appendChild(b),b.sheet&&b.sheet.insertRule(`
|
|
7
|
-
[data-motion-pop-id="${i}"] {
|
|
8
|
-
position: absolute !important;
|
|
9
|
-
width: ${u}px !important;
|
|
10
|
-
height: ${c}px !important;
|
|
11
|
-
${p}px !important;
|
|
12
|
-
top: ${d}px !important;
|
|
13
|
-
}
|
|
14
|
-
`),()=>{x.contains(b)&&x.removeChild(b)}},[t]),g.jsx(jl,{isPresent:t,childRef:o,sizeRef:r,children:gt.cloneElement(e,{ref:l})})}const Nl=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=zt(Ol),c=w.useId();let d=!0,h=w.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:f=>{u.set(f,!0);for(const p of u.values())if(!p)return;s&&s()},register:f=>(u.set(f,!1),()=>u.delete(f))}),[n,u,s]);return o&&d&&(h={...h}),w.useMemo(()=>{u.forEach((f,p)=>u.set(p,!1))},[n]),gt.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(e=g.jsx(Ll,{isPresent:n,anchorX:a,root:l,children:e})),g.jsx(bt.Provider,{value:h,children:e})};function Ol(){return new Map}function Vi(e=!0){const t=w.useContext(bt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,o=w.useId();w.useEffect(()=>{if(e)return i(o)},[e]);const r=w.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,r]:[!0]}const At=e=>e.key||"";function Ei(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const Il=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=Vi(r),d=w.useMemo(()=>Ei(e),[e]),h=r&&!u?[]:d.map(At),f=w.useRef(!0),p=w.useRef(d),b=zt(()=>new Map),[x,v]=w.useState(d),[k,T]=w.useState(d);gs(()=>{f.current=!1,p.current=d;for(let V=0;V<k.length;V++){const D=At(k[V]);h.includes(D)?b.delete(D):b.get(D)!==!0&&b.set(D,!1)}},[k,h.length,h.join("-")]);const E=[];if(d!==x){let V=[...d];for(let D=0;D<k.length;D++){const y=k[D],I=At(y);h.includes(I)||(V.splice(D,0,y),E.push(y))}return o==="wait"&&E.length&&(V=E),T(Ei(V)),v(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&k.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:C}=w.useContext(Bt);return g.jsx(g.Fragment,{children:k.map(V=>{const D=At(V),y=r&&!u?!1:d===k||h.includes(D),I=()=>{if(b.has(D))b.set(D,!0);else return;let U=!0;b.forEach(J=>{J||(U=!1)}),U&&(C?.(),T(p.current),r&&c?.(),s&&s())};return g.jsx(Nl,{isPresent:y,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:y?void 0:I,anchorX:a,children:V},D)})})},Di=w.createContext({strict:!1}),Ri={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"]},Be={};for(const e in Ri)Be[e]={isEnabled:t=>Ri[e].some(n=>!!t[n])};function Fl(e){for(const t in e)Be[t]={...Be[t],...e[t]}}const _l=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 Ct(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||_l.has(e)}let ji=e=>!Ct(e);function Bl(e){typeof e=="function"&&(ji=t=>t.startsWith("on")?!Ct(t):e(t))}try{Bl(require("@emotion/is-prop-valid").default)}catch{}function zl(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(ji(i)||n===!0&&Ct(i)||!t&&!Ct(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const Mt=w.createContext({});function Vt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function at(e){return typeof e=="string"||Array.isArray(e)}const Rn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],jn=["initial",...Rn];function Et(e){return Vt(e.animate)||jn.some(t=>at(e[t]))}function Li(e){return!!(Et(e)||e.variants)}function $l(e,t){if(Et(e)){const{initial:n,animate:s}=e;return{initial:n===!1||at(n)?n:void 0,animate:at(s)?s:void 0}}return e.inherit!==!1?t:{}}function Ul(e){const{initial:t,animate:n}=$l(e,w.useContext(Mt));return w.useMemo(()=>({initial:t,animate:n}),[Ni(t),Ni(n)])}function Ni(e){return Array.isArray(e)?e.join(" "):e}const lt={};function Wl(e){for(const t in e)lt[t]=e[t],Jt(t)&&(lt[t].isCSSVariable=!0)}function Oi(e,{layout:t,layoutId:n}){return Fe.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!lt[e]||e==="opacity")}const Gl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Hl=Ie.length;function Kl(e,t,n){let s="",i=!0;for(let o=0;o<Hl;o++){const r=Ie[o],a=e[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=bi(a,Cn[r]);if(!l){i=!1;const c=Gl[r]||r;s+=`${c}(${u}) `}n&&(t[r]=u)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function Ln(e,t,n){const{style:s,vars:i,transformOrigin:o}=e;let r=!1,a=!1;for(const l in t){const u=t[l];if(Fe.has(l)){r=!0;continue}else if(Jt(l)){i[l]=u;continue}else{const c=bi(u,Cn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(t.transform||(r||n?s.transform=Kl(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${u} ${c}`}}const Nn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ii(e,t,n){for(const s in t)!Y(t[s])&&!Oi(s,n)&&(e[s]=t[s])}function Yl({transformTemplate:e},t){return w.useMemo(()=>{const n=Nn();return Ln(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Xl(e,t){const n=e.style||{},s={};return Ii(s,n,e),Object.assign(s,Yl(e,t)),s}function ql(e,t){const n={},s=Xl(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.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=s,n}const Zl={offset:"stroke-dashoffset",array:"stroke-dasharray"},Jl={offset:"strokeDashoffset",array:"strokeDasharray"};function Ql(e,t,n=1,s=0,i=!0){e.pathLength=1;const o=i?Zl:Jl;e[o.offset]=M.transform(-s);const r=M.transform(t),a=M.transform(n);e[o.array]=`${r} ${a}`}function Fi(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(Ln(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&Ql(d,i,o,r,!1)}const _i=()=>({...Nn(),attrs:{}}),Bi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function ec(e,t,n,s){const i=w.useMemo(()=>{const o=_i();return Fi(o,t,Bi(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Ii(o,e.style,e),i.style={...o,...i.style}}return i}const tc=["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 On(e){return typeof e!="string"||e.includes("-")?!1:!!(tc.indexOf(e)>-1||/[A-Z]/u.test(e))}function nc(e,t,n,{latestValues:s},i,o=!1){const a=(On(e)?ec:ql)(t,s,i,e),l=zl(t,typeof e=="string",o),u=e!==w.Fragment?{...l,...a,ref:n}:{},{children:c}=t,d=w.useMemo(()=>Y(c)?c.get():c,[c]);return w.createElement(e,{...u,children:d})}function zi(e){const t=[{},{}];return e?.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function In(e,t,n,s){if(typeof t=="function"){const[i,o]=zi(s);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=zi(s);t=t(n!==void 0?n:e.custom,i,o)}return t}function Dt(e){return Y(e)?e.get():e}function sc({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:ic(n,s,i,e),renderState:t()}}function ic(e,t,n,s){const i={},o=s(e,{});for(const h in o)i[h]=Dt(o[h]);let{initial:r,animate:a}=e;const l=Et(e),u=Li(e);t&&u&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const d=c?a:r;if(d&&typeof d!="boolean"&&!Vt(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const p=In(e,h[f]);if(p){const{transitionEnd:b,transition:x,...v}=p;for(const k in v){let T=v[k];if(Array.isArray(T)){const E=c?T.length-1:0;T=T[E]}T!==null&&(i[k]=T)}for(const k in b)i[k]=b[k]}}}return i}const $i=e=>(t,n)=>{const s=w.useContext(Mt),i=w.useContext(bt),o=()=>sc(e,t,s,i);return n?o():zt(o)};function Fn(e,t,n){const{style:s}=e,i={};for(const o in s)(Y(s[o])||t.style&&Y(t.style[o])||Oi(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const rc=$i({scrapeMotionValuesFromProps:Fn,createRenderState:Nn});function Ui(e,t,n){const s=Fn(e,t,n);for(const i in e)if(Y(e[i])||Y(t[i])){const o=Ie.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=e[i]}return s}const oc=$i({scrapeMotionValuesFromProps:Ui,createRenderState:_i}),ac=Symbol.for("motionComponentSymbol");function ze(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function lc(e,t,n){return w.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):ze(n)&&(n.current=s))},[t])}const _n=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Wi="data-"+_n("framerAppearId"),Gi=w.createContext({});function cc(e,t,n,s,i){const{visualElement:o}=w.useContext(Mt),r=w.useContext(Di),a=w.useContext(bt),l=w.useContext(Dn).reducedMotion,u=w.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=w.useContext(Gi);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&uc(u.current,n,i,d);const h=w.useRef(!1);w.useInsertionEffect(()=>{c&&h.current&&c.update(n,a)});const f=n[Wi],p=w.useRef(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return gs(()=>{c&&(h.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),p.current&&c.animationState&&c.animationState.animateChanges())}),w.useEffect(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),p.current=!1),c.enteringChildren=void 0)}),c}function uc(e,t,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Hi(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&ze(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function Hi(e){if(e)return e.options.allowProjection!==!1?e.projection:Hi(e.parent)}function Bn(e,{forwardMotionProps:t=!1}={},n,s){n&&Fl(n);const i=On(e)?oc:rc;function o(a,l){let u;const c={...w.useContext(Dn),...a,layoutId:dc(a)},{isStatic:d}=c,h=Ul(a),f=i(a,d);if(!d&&$t){hc(c,n);const p=fc(c);u=p.MeasureLayout,h.visualElement=cc(e,f,c,s,p.ProjectionNode)}return g.jsxs(Mt.Provider,{value:h,children:[u&&h.visualElement?g.jsx(u,{visualElement:h.visualElement,...c}):null,nc(e,a,lc(f,h.visualElement,l),f,d,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=w.forwardRef(o);return r[ac]=e,r}function dc({layoutId:e}){const t=w.useContext(Bt).id;return t&&e!==void 0?t+"-"+e:e}function hc(e,t){const n=w.useContext(Di).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?je(!1,s,"lazy-strict-mode"):fe(!1,s,"lazy-strict-mode")}}function fc(e){const{drag:t,layout:n}=Be;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function mc(e,t){if(typeof Proxy>"u")return Bn;const n=new Map,s=(o,r)=>Bn(o,r,e,t),i=(o,r)=>(process.env.NODE_ENV!=="production"&&Yt(!1,"motion() is deprecated. Use motion.create() instead."),s(o,r));return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,Bn(r,void 0,e,t)),n.get(r))})}function Ki({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function pc({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function gc(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function zn(e){return e===void 0||e===1}function $n({scale:e,scaleX:t,scaleY:n}){return!zn(e)||!zn(t)||!zn(n)}function Ve(e){return $n(e)||Yi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Yi(e){return Xi(e.x)||Xi(e.y)}function Xi(e){return e&&e!=="0%"}function Rt(e,t,n){const s=e-n,i=t*s;return n+i}function qi(e,t,n,s,i){return i!==void 0&&(e=Rt(e,i,s)),Rt(e,n,s)+t}function Un(e,t=0,n=1,s,i){e.min=qi(e.min,t,n,s,i),e.max=qi(e.max,t,n,s,i)}function Zi(e,{x:t,y:n}){Un(e.x,t.translate,t.scale,t.originPoint),Un(e.y,n.translate,n.scale,n.originPoint)}const Ji=.999999999999,Qi=1.0000000000001;function yc(e,t,n,s=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ue(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,Zi(e,r)),s&&Ve(o.latestValues)&&Ue(e,o.latestValues))}t.x<Qi&&t.x>Ji&&(t.x=1),t.y<Qi&&t.y>Ji&&(t.y=1)}function $e(e,t){e.min=e.min+t,e.max=e.max+t}function er(e,t,n,s,i=.5){const o=B(e.min,e.max,i);Un(e,t,n,o,s)}function Ue(e,t){er(e.x,t.x,t.scaleX,t.scale,t.originX),er(e.y,t.y,t.scaleY,t.scale,t.originY)}function tr(e,t){return Ki(gc(e.getBoundingClientRect(),t))}function bc(e,t,n){const s=tr(e,n),{scroll:i}=t;return i&&($e(s.x,i.offset.x),$e(s.y,i.offset.y)),s}const nr=()=>({translate:0,scale:1,origin:0,originPoint:0}),We=()=>({x:nr(),y:nr()}),sr=()=>({min:0,max:0}),W=()=>({x:sr(),y:sr()}),Wn={current:null},ir={current:!1};function xc(){if(ir.current=!0,!!$t)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Wn.current=e.matches;e.addEventListener("change",t),t()}else Wn.current=!1}const vc=new WeakMap;function wc(e,t,n){for(const s in t){const i=t[s],o=n[s];if(Y(i))e.addValue(s,i);else if(Y(o))e.addValue(s,_e(i,{owner:e}));else if(o!==i)if(e.hasValue(s)){const r=e.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=e.getStaticValue(s);e.addValue(s,_e(r!==void 0?r:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const rr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Tc{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=kn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Z.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,_.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Et(n),this.isVariantNode=Li(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const f=d[h];l[h]!==void 0&&Y(f)&&f.set(l[h])}}mount(t){this.current=t,vc.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),ir.current||xc(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Wn.current,process.env.NODE_ENV!=="production"&&Yt(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),be(this.notifyUpdate),be(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=Fe.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&_.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Be){const n=Be[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):W()}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 s=0;s<rr.length;s++){const i=rr[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=t[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=wc(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 s=this.values.get(t);n!==s&&(s&&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 s=this.values.get(t);return s===void 0&&n!==void 0&&(s=_e(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(ys(s)||xs(s))?s=parseFloat(s):!El(s)&&ve.test(n)&&(s=yi(t,n)),this.setBaseTarget(t,Y(s)?s.get():s)),Y(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=In(this.props,n,this.presenceContext?.custom);o&&(s=o[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Y(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Kt),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Mn.render(this.render)}}class or extends Tc{constructor(){super(...arguments),this.KeyframeResolver=bl}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:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Y(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function ar(e,{style:t,vars:n},s,i){const o=e.style;let r;for(r in t)o[r]=t[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function kc(e){return window.getComputedStyle(e)}class Sc extends or{constructor(){super(...arguments),this.type="html",this.renderInstance=ar}readValueFromInstance(t,n){if(Fe.has(n))return this.projection?.isProjecting?bn(n):Ia(t,n);{const s=kc(t),i=(Jt(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return tr(t,n)}build(t,n,s){Ln(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Fn(t,n,s)}}const lr=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 Pc(e,t,n,s){ar(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(lr.has(i)?i:_n(i),t.attrs[i])}class Ac extends or{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=W}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Fe.has(n)){const s=gi(n);return s&&s.default||0}return n=lr.has(n)?n:_n(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Ui(t,n,s)}build(t,n,s){Fi(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){Pc(t,n,s,i)}mount(t){this.isSVGTag=Bi(t.tagName),super.mount(t)}}const Cc=(e,t)=>On(e)?new Ac(t):new Sc(t,{allowProjection:e!==w.Fragment});function Ge(e,t,n){const s=e.getProps();return In(s,t,n!==void 0?n:s.custom,e)}const Gn=e=>Array.isArray(e);function Mc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,_e(n))}function Vc(e){return Gn(e)?e[e.length-1]||0:e}function Ec(e,t){const n=Ge(e,t);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Vc(o[r]);Mc(e,r,a)}}function Dc(e){return!!(Y(e)&&e.add)}function Hn(e,t){const n=e.getValue("willChange");if(Dc(n))return n.add(t);if(!n&&me.WillChange){const s=new me.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function cr(e){return e.props[Wi]}const Rc=e=>e!==null;function jc(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(Rc),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const Lc={type:"spring",stiffness:500,damping:25,restSpeed:10},Nc=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Oc={type:"keyframes",duration:.8},Ic={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Fc=(e,{keyframes:t})=>t.length>2?Oc:Fe.has(e)?e.startsWith("scale")?Nc(t[1]):Lc:Ic;function _c({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Kn=(e,t,n,s={},i,o)=>r=>{const a=Pn(s,e)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-oe(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};_c(a)||Object.assign(c,Fc(e,c)),c.duration&&(c.duration=oe(c.duration)),c.repeatDelay&&(c.repeatDelay=oe(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Sn(c),c.delay===0&&(d=!0)),(me.instantAnimations||me.skipAnimations)&&(d=!0,Sn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const h=jc(c.keyframes,a);if(h!==void 0){_.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new pn(c):new ol(c)};function Bc({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function ur(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:r,...a}=t;s&&(o=s);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const d=e.getValue(c,e.latestValues[c]??null),h=a[c];if(h===void 0||u&&Bc(u,c))continue;const f={delay:n,...Pn(o||{},c)},p=d.get();if(p!==void 0&&!d.isAnimating&&!Array.isArray(h)&&h===p&&!f.velocity)continue;let b=!1;if(window.MotionHandoffAnimation){const v=cr(e);if(v){const k=window.MotionHandoffAnimation(v,c,_);k!==null&&(f.startTime=k,b=!0)}}Hn(e,c),d.start(Kn(c,d,h,e.shouldReduceMotion&&di.has(c)?{type:!1}:f,e,b));const x=d.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{_.update(()=>{r&&Ec(e,r)})}),l}function dr(e,t,n,s=0,i=1){const o=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),r=e.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function Yn(e,t,n={}){const s=Ge(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(ur(e,s,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=i;return zc(e,t,l,u,c,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function zc(e,t,n=0,s=0,i=0,o=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Yn(l,t,{...r,delay:n+(typeof s=="function"?0:s)+dr(e.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function $c(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(o=>Yn(e,o,n));s=Promise.all(i)}else if(typeof t=="string")s=Yn(e,t,n);else{const i=typeof t=="function"?Ge(e,t,n.custom):t;s=Promise.all(ur(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function hr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const Uc=jn.length;function fr(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?fr(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Uc;n++){const s=jn[n],i=e.props[s];(at(i)||i===!1)&&(t[s]=i)}return t}const Wc=[...Rn].reverse(),Gc=Rn.length;function Hc(e){return t=>Promise.all(t.map(({animation:n,options:s})=>$c(e,n,s)))}function Kc(e){let t=Hc(e),n=mr(),s=!0;const i=l=>(u,c)=>{const d=Ge(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:h,transitionEnd:f,...p}=d;u={...u,...p,...f}}return u};function o(l){t=l(e)}function r(l){const{props:u}=e,c=fr(e.parent)||{},d=[],h=new Set;let f={},p=1/0;for(let x=0;x<Gc;x++){const v=Wc[x],k=n[v],T=u[v]!==void 0?u[v]:c[v],E=at(T),C=v===l?k.isActive:null;C===!1&&(p=x);let V=T===c[v]&&T!==u[v]&&E;if(V&&s&&e.manuallyAnimateOnMount&&(V=!1),k.protectedKeys={...f},!k.isActive&&C===null||!T&&!k.prevProp||Vt(T)||typeof T=="boolean")continue;const D=Yc(k.prevProp,T);let y=D||v===l&&k.isActive&&!V&&E||x>p&&E,I=!1;const U=Array.isArray(T)?T:[T];let J=U.reduce(i(v),{});C===!1&&(J={});const{prevResolvedValues:ce={}}=k,Re={...ce,...J},ke=F=>{y=!0,h.has(F)&&(I=!0,h.delete(F)),k.needsAnimating[F]=!0;const A=e.getValue(F);A&&(A.liveStyle=!1)};for(const F in Re){const A=J[F],te=ce[F];if(f.hasOwnProperty(F))continue;let re=!1;Gn(A)&&Gn(te)?re=!hr(A,te):re=A!==te,re?A!=null?ke(F):h.add(F):A!==void 0&&h.has(F)?ke(F):k.protectedKeys[F]=!0}k.prevProp=T,k.prevResolvedValues=J,k.isActive&&(f={...f,...J}),s&&e.blockInitialAnimation&&(y=!1);const Q=V&&D;y&&(!Q||I)&&d.push(...U.map(F=>{const A={type:v};if(typeof F=="string"&&s&&!Q&&e.manuallyAnimateOnMount&&e.parent){const{parent:te}=e,re=Ge(te,F);if(te.enteringChildren&&re){const{delayChildren:m}=re.transition||{};A.delay=dr(te.enteringChildren,e,m)}}return{animation:F,options:A}}))}if(h.size){const x={};if(typeof u.initial!="boolean"){const v=Ge(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(x.transition=v.transition)}h.forEach(v=>{const k=e.getBaseTarget(v),T=e.getValue(v);T&&(T.liveStyle=!0),x[v]=k??null}),d.push({animation:x})}let b=!!d.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(b=!1),s=!1,b?t(d):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=mr()}}}function Yc(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!hr(t,e):!1}function Ee(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mr(){return{animate:Ee(!0),whileInView:Ee(),whileHover:Ee(),whileTap:Ee(),whileDrag:Ee(),whileFocus:Ee(),exit:Ee()}}class we{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Xc extends we{constructor(t){super(t),t.animationState||(t.animationState=Kc(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Vt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let qc=0;class Zc extends we{constructor(){super(...arguments),this.id=qc++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 Jc={animation:{Feature:Xc},exit:{Feature:Zc}};function ct(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function ut(e){return{point:{x:e.pageX,y:e.pageY}}}const Qc=e=>t=>Vn(t)&&e(t,ut(t));function dt(e,t,n,s){return ct(e,t,Qc(n),s)}const pr=1e-4,eu=1-pr,tu=1+pr,gr=.01,nu=0-gr,su=0+gr;function q(e){return e.max-e.min}function iu(e,t,n){return Math.abs(e-t)<=n}function yr(e,t,n,s=.5){e.origin=s,e.originPoint=B(t.min,t.max,e.origin),e.scale=q(n)/q(t),e.translate=B(n.min,n.max,e.origin)-e.originPoint,(e.scale>=eu&&e.scale<=tu||isNaN(e.scale))&&(e.scale=1),(e.translate>=nu&&e.translate<=su||isNaN(e.translate))&&(e.translate=0)}function ht(e,t,n,s){yr(e.x,t.x,n.x,s?s.originX:void 0),yr(e.y,t.y,n.y,s?s.originY:void 0)}function br(e,t,n){e.min=n.min+t.min,e.max=e.min+q(t)}function ru(e,t,n){br(e.x,t.x,n.x),br(e.y,t.y,n.y)}function xr(e,t,n){e.min=t.min-n.min,e.max=e.min+q(t)}function jt(e,t,n){xr(e.x,t.x,n.x),xr(e.y,t.y,n.y)}function ie(e){return[e("x"),e("y")]}const vr=({current:e})=>e?e.ownerDocument.defaultView:null,wr=(e,t)=>Math.abs(e-t);function ou(e,t){const n=wr(e.x,t.x),s=wr(e.y,t.y);return Math.sqrt(n**2+s**2)}class Tr{constructor(t,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=qn(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=ou(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!f&&!p)return;const{point:b}=h,{timestamp:x}=H;this.history.push({...b,timestamp:x});const{onStart:v,onMove:k}=this.handlers;f||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=Xn(f,this.transformPagePoint),_.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:p,onSessionEnd:b,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=qn(h.type==="pointercancel"?this.lastMoveEventInfo:Xn(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(h,v),b&&b(h,v)},!Vn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=ut(t),l=Xn(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=H;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,qn(l,this.history)),this.removeListeners=Qe(dt(this.contextWindow,"pointermove",this.handlePointerMove),dt(this.contextWindow,"pointerup",this.handlePointerUp),dt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),be(this.updatePoint)}}function Xn(e,t){return t?{point:t(e.point)}:e}function kr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function qn({point:e},t){return{point:e,delta:kr(e,Sr(t)),offset:kr(e,au(t)),velocity:lu(t,.1)}}function au(e){return e[0]}function Sr(e){return e[e.length-1]}function lu(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const i=Sr(e);for(;n>=0&&(s=e[n],!(i.timestamp-s.timestamp>oe(t)));)n--;if(!s)return{x:0,y:0};const o=se(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function cu(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?B(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?B(n,e,s.max):Math.min(e,n)),e}function Pr(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 uu(e,{top:t,left:n,bottom:s,right:i}){return{x:Pr(e.x,n,i),y:Pr(e.y,t,s)}}function Ar(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function du(e,t){return{x:Ar(e.x,t.x),y:Ar(e.y,t.y)}}function hu(e,t){let n=.5;const s=q(e),i=q(t);return i>s?n=et(t.min,t.max-s,e.min):s>i&&(n=et(e.min,e.max-i,t.min)),he(0,1,n)}function fu(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 Zn=.35;function mu(e=Zn){return e===!1?e=0:e===!0&&(e=Zn),{x:Cr(e,"left","right"),y:Cr(e,"top","bottom")}}function Cr(e,t,n){return{min:Mr(e,t),max:Mr(e,n)}}function Mr(e,t){return typeof e=="number"?e:e[t]||0}const pu=new WeakMap;class gu{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=W(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ut(d).point)},r=(d,h)=>{const{drag:f,dragPropagation:p,onDragStart:b}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Tl(f),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ie(v=>{let k=this.getAxisMotionValue(v).get()||0;if(ue.test(k)){const{projection:T}=this.visualElement;if(T&&T.layout){const E=T.layout.layoutBox[v];E&&(k=q(E)*(parseFloat(k)/100))}}this.originPoint[v]=k}),b&&_.postRender(()=>b(d,h)),Hn(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:b,onDrag:x}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=h;if(p&&this.currentDirection===null){this.currentDirection=yu(v),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),x&&x(d,h)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>ie(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Tr(t,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:vr(this.visualElement)})}stop(t,n){const s=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&_.postRender(()=>a(s,i))}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:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,s){const{drag:i}=this.getProps();if(!s||!Lt(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let r=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(r=cu(r,this.constraints[t],this.elastic[t])),o.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&ze(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=uu(s.layoutBox,t):this.constraints=!1,this.elastic=mu(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&ie(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=fu(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ze(t))return!1;const s=t.current;fe(s!==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:i}=this.visualElement;if(!i||!i.layout)return!1;const o=bc(s,i.root,this.visualElement.getTransformPagePoint());let r=du(i.layout.layoutBox,o);if(n){const a=n(pc(r));this.hasMutatedConstraints=!!a,a&&(r=Ki(a))}return r}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=ie(c=>{if(!Lt(c,n,this.currentDirection))return;let d=l&&l[c]||{};r&&(d={min:0,max:0});const h=i?200:1e6,f=i?40:1e7,p={type:"inertia",velocity:s?t[c]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Hn(this.visualElement,t),s.start(Kn(t,s,0,n,this.visualElement,!1))}stopAnimation(){ie(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ie(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){ie(n=>{const{drag:s}=this.getProps();if(!Lt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(t[n]-B(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ze(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ie(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=hu({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),ie(r=>{if(!Lt(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(B(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;pu.set(this.visualElement,this);const t=this.visualElement.current,n=dt(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();ze(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),_.read(s);const r=ct(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ie(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Zn,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Lt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yu(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class bu extends we{constructor(t){super(t),this.removeGroupControls=ne,this.removeListeners=ne,this.controls=new gu(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ne}unmount(){this.removeGroupControls(),this.removeListeners()}}const Vr=e=>(t,n)=>{e&&_.postRender(()=>e(t,n))};class xu extends we{constructor(){super(...arguments),this.removePointerDownListener=ne}onPointerDown(t){this.session=new Tr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Vr(t),onStart:Vr(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&_.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=dt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Nt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Er(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ft={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(M.test(e))e=parseFloat(e);else return e;const n=Er(e,t.target.x),s=Er(e,t.target.y);return`${n}% ${s}%`}},vu={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=ve.parse(e);if(i.length>5)return s;const o=ve.createTransformer(e),r=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+r]/=a,i[1+r]/=l;const u=B(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};let Jn=!1;class wu extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=t;Wl(Tu),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Jn&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Nt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Jn=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?r.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?r.promote():r.relegate()||_.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Mn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=t;Jn=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Dr(e){const[t,n]=Vi(),s=w.useContext(Bt);return g.jsx(wu,{...e,layoutGroup:s,switchLayoutGroup:w.useContext(Gi),isPresent:t,safeToRemove:n})}const Tu={borderRadius:{...ft,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ft,borderTopRightRadius:ft,borderBottomLeftRadius:ft,borderBottomRightRadius:ft,boxShadow:vu};function ku(e,t,n){const s=Y(e)?e:_e(e);return s.start(Kn("",s,t,n)),s.animation}const Su=(e,t)=>e.depth-t.depth;class Pu{constructor(){this.children=[],this.isDirty=!1}add(t){Ut(this.children,t),this.isDirty=!0}remove(t){Wt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Su),this.isDirty=!1,this.children.forEach(t)}}function Au(e,t){const n=Z.now(),s=({timestamp:i})=>{const o=i-n;o>=t&&(be(s),e(o-t))};return _.setup(s,!0),()=>be(s)}const Rr=["TopLeft","TopRight","BottomLeft","BottomRight"],Cu=Rr.length,jr=e=>typeof e=="string"?parseFloat(e):e,Lr=e=>typeof e=="number"||M.test(e);function Mu(e,t,n,s,i,o){i?(e.opacity=B(0,n.opacity??1,Vu(s)),e.opacityExit=B(t.opacity??1,0,Eu(s))):o&&(e.opacity=B(t.opacity??1,n.opacity??1,s));for(let r=0;r<Cu;r++){const a=`border${Rr[r]}Radius`;let l=Nr(t,a),u=Nr(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Lr(l)===Lr(u)?(e[a]=Math.max(B(jr(l),jr(u),s),0),(ue.test(u)||ue.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=B(t.rotate||0,n.rotate||0,s))}function Nr(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Vu=Or(0,.5,Ms),Eu=Or(.5,.95,ne);function Or(e,t,n){return s=>s<e?0:s>t?1:n(et(e,t,s))}function Ir(e,t){e.min=t.min,e.max=t.max}function le(e,t){Ir(e.x,t.x),Ir(e.y,t.y)}function Fr(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function _r(e,t,n,s,i){return e-=t,e=Rt(e,1/n,s),i!==void 0&&(e=Rt(e,1/i,s)),e}function Du(e,t=0,n=1,s=.5,i,o=e,r=e){if(ue.test(t)&&(t=parseFloat(t),t=B(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=B(o.min,o.max,s);e===o&&(a-=t),e.min=_r(e.min,t,n,a,i),e.max=_r(e.max,t,n,a,i)}function Br(e,t,[n,s,i],o,r){Du(e,t[n],t[s],t[i],t.scale,o,r)}const Ru=["x","scaleX","originX"],ju=["y","scaleY","originY"];function zr(e,t,n,s){Br(e.x,t,Ru,n?n.x:void 0,s?s.x:void 0),Br(e.y,t,ju,n?n.y:void 0,s?s.y:void 0)}function $r(e){return e.translate===0&&e.scale===1}function Ur(e){return $r(e.x)&&$r(e.y)}function Wr(e,t){return e.min===t.min&&e.max===t.max}function Lu(e,t){return Wr(e.x,t.x)&&Wr(e.y,t.y)}function Gr(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Hr(e,t){return Gr(e.x,t.x)&&Gr(e.y,t.y)}function Kr(e){return q(e.x)/q(e.y)}function Yr(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Nu{constructor(){this.members=[]}add(t){Ut(this.members,t),t.scheduleRender()}remove(t){if(Wt(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(i=>t===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ou(e,t,n){let s="";const i=e.x.translate/t.x,o=e.y.translate/t.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:h,skewX:f,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),d&&(s+=`rotateX(${d}deg) `),h&&(s+=`rotateY(${h}deg) `),f&&(s+=`skewX(${f}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const Qn=["","X","Y","Z"],Iu=1e3;let Fu=0;function es(e,t,n,s){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Xr(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=cr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",_,!(i||o))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&Xr(s)}function qr({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=t?.()){this.id=Fu++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(zu),this.nodes.forEach(Gu),this.nodes.forEach(Hu),this.nodes.forEach($u)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Pu)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Kt),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Ci(r)&&!Ml(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,d=0;const h=()=>this.root.updateBlockedByResize=!1;_.read(()=>{d=window.innerWidth}),e(r,()=>{const f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,c&&c(),c=Au(h,250),Nt.hasAnimatedSinceResize&&(Nt.hasAnimatedSinceResize=!1,this.nodes.forEach(Qr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||Zu,{onLayoutAnimationStart:b,onLayoutAnimationComplete:x}=u.getProps(),v=!this.targetLayout||!Hr(this.targetLayout,f),k=!d&&h;if(this.options.layoutRoot||this.resumeFrom||k||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...Pn(p,"layout"),onPlay:b,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(c,k)}else d||Qr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),be(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(Ku),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Xr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Zr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Jr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Wu),this.nodes.forEach(_u),this.nodes.forEach(Bu)):this.nodes.forEach(Jr),this.clearAllSnapshots();const a=Z.now();H.delta=he(0,1e3/60,a-H.timestamp),H.timestamp=a,H.isProcessing=!0,Zt.update.process(H),Zt.preRender.process(H),Zt.render.process(H),H.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Mn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Uu),this.sharedNodes.forEach(Yu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,_.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){_.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!q(this.snapshot.measuredBox.x)&&!q(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=W(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ur(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Ve(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Ju(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return W();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Qu))){const{scroll:u}=this.root;u&&($e(a.x,u.offset.x),$e(a.y,u.offset.y))}return a}removeElementScroll(r){const a=W();if(le(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:d}=u;u!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&le(a,r),$e(a.x,c.offset.x),$e(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=W();le(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Ue(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Ve(c.latestValues)&&Ue(l,c.latestValues)}return Ve(this.latestValues)&&Ue(l,this.latestValues),l}removeTransform(r){const a=W();le(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Ve(u.latestValues))continue;$n(u.latestValues)&&u.updateSnapshot();const c=W(),d=u.measurePageBox();le(c,d),zr(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Ve(this.latestValues)&&zr(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==H.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!this.layout||!(c||d))return;this.resolvedRelativeTargetAt=H.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=W(),this.targetWithTransforms=W()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ru(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):le(this.target,this.layout.layoutBox),Zi(this.target,this.targetDelta)):le(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||$n(this.parent.latestValues)||Yi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,l){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),jt(this.relativeTargetOrigin,a,l),le(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===H.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;le(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;yc(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=W());const{target:f}=r;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Fr(this.prevProjectionDelta.x,this.projectionDelta.x),Fr(this.prevProjectionDelta.y,this.projectionDelta.y)),ht(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!Yr(this.projectionDelta.x,this.prevProjectionDelta.x)||!Yr(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=We(),this.projectionDelta=We(),this.projectionDeltaWithTransform=We()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=We();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=W(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,b=f!==p,x=this.getStack(),v=!x||x.members.length<=1,k=!!(b&&!v&&this.options.crossfade===!0&&!this.path.some(qu));this.animationProgress=0;let T;this.mixTargetDelta=E=>{const C=E/1e3;eo(d.x,r.x,C),eo(d.y,r.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Xu(this.relativeTarget,this.relativeTargetOrigin,h,C),T&&Lu(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=W()),le(T,this.relativeTarget)),b&&(this.animationValues=c,Mu(c,u,this.latestValues,C,k,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(be(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=_.update(()=>{Nt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=_e(0)),this.currentAnimation=ku(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Iu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&ro(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||W();const d=q(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const h=q(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+h}le(a,l),Ue(a,c),ht(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Nu),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&es("z",r,u,this.animationValues);for(let c=0;c<Qn.length;c++)es(`rotate${Qn[c]}`,r,u,this.animationValues),es(`skew${Qn[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=Dt(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Dt(a?.pointerEvents)||""),this.hasProjected&&!Ve(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=Ou(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),r.transform=d;const{x:h,y:f}=this.projectionDelta;r.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const p in lt){if(c[p]===void 0)continue;const{correct:b,applyTo:x,isCSSVariable:v}=lt[p],k=d==="none"?c[p]:b(c[p],u);if(x){const T=x.length;for(let E=0;E<T;E++)r[x[E]]=k}else v?this.options.visualElement.renderState.vars[p]=k:r[p]=k}this.options.layoutId&&(r.pointerEvents=u===this?Dt(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Zr),this.root.sharedNodes.clear()}}}function _u(e){e.updateLayout()}function Bu(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?ie(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=q(d);d.min=n[c].min,d.max=d.min+h}):ro(i,t.layoutBox,n)&&ie(c=>{const d=o?t.measuredBox[c]:t.layoutBox[c],h=q(n[c]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+h)});const r=We();ht(r,n,t.layoutBox);const a=We();o?ht(a,e.applyTransform(s,!0),t.measuredBox):ht(a,n,t.layoutBox);const l=!Ur(r);let u=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:h}=c;if(d&&h){const f=W();jt(f,t.layoutBox,d.layoutBox);const p=W();jt(p,n,h.layoutBox),Hr(f,p)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=f,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function zu(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 $u(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Uu(e){e.clearSnapshot()}function Zr(e){e.clearMeasurements()}function Jr(e){e.isLayoutDirty=!1}function Wu(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Qr(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Gu(e){e.resolveTargetDelta()}function Hu(e){e.calcProjection()}function Ku(e){e.resetSkewAndRotation()}function Yu(e){e.removeLeadSnapshot()}function eo(e,t,n){e.translate=B(t.translate,0,n),e.scale=B(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function to(e,t,n,s){e.min=B(t.min,n.min,s),e.max=B(t.max,n.max,s)}function Xu(e,t,n,s){to(e.x,t.x,n.x,s),to(e.y,t.y,n.y,s)}function qu(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Zu={duration:.45,ease:[.4,0,.1,1]},no=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),so=no("applewebkit/")&&!no("chrome/")?Math.round:ne;function io(e){e.min=so(e.min),e.max=so(e.max)}function Ju(e){io(e.x),io(e.y)}function ro(e,t,n){return e==="position"||e==="preserve-aspect"&&!iu(Kr(t),Kr(n),.2)}function Qu(e){return e!==e.root&&e.scroll?.wasRoot}const ed=qr({attachResizeListener:(e,t)=>ct(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ts={current:void 0},oo=qr({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ts.current){const e=new ed({});e.mount(window),e.setOptions({layoutScroll:!0}),ts.current=e}return ts.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),td={pan:{Feature:xu},drag:{Feature:bu,ProjectionNode:oo,MeasureLayout:Dr}};function ao(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&_.postRender(()=>o(t,ut(t)))}class nd extends we{mount(){const{current:t}=this.node;t&&(this.unmount=kl(t,(n,s)=>(ao(this.node,s,"Start"),i=>ao(this.node,i,"End"))))}unmount(){}}class sd extends we{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=Qe(ct(this.node.current,"focus",()=>this.onFocus()),ct(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function lo(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&_.postRender(()=>o(t,ut(t)))}class id extends we{mount(){const{current:t}=this.node;t&&(this.unmount=Cl(t,(n,s)=>(lo(this.node,s,"Start"),(i,{success:o})=>lo(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ns=new WeakMap,ss=new WeakMap,rd=e=>{const t=ns.get(e.target);t&&t(e)},od=e=>{e.forEach(rd)};function ad({root:e,...t}){const n=e||document;ss.has(n)||ss.set(n,{});const s=ss.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(od,{root:e,...t})),s[i]}function ld(e,t,n){const s=ad(t);return ns.set(e,n),s.observe(e),()=>{ns.delete(e),s.unobserve(e)}}const cd={some:0,all:1};class ud extends we{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=t,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:cd[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),h=u?c:d;h&&h(l)};return ld(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(dd(t,n))&&this.startObserver()}unmount(){}}function dd({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const hd={...Jc,...{inView:{Feature:ud},tap:{Feature:id},focus:{Feature:sd},hover:{Feature:nd}},...td,...{layout:{ProjectionNode:oo,MeasureLayout:Dr}}},co=mc(hd,Cc);const fd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),md=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,s)=>s?s.toUpperCase():n.toLowerCase()),uo=e=>{const t=md(e);return t.charAt(0).toUpperCase()+t.slice(1)},ho=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim(),pd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var gd={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const yd=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:i="",children:o,iconNode:r,...a},l)=>w.createElement("svg",{ref:l,...gd,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:ho("lucide",i),...!o&&!pd(a)&&{"aria-hidden":"true"},...a},[...r.map(([u,c])=>w.createElement(u,c)),...Array.isArray(o)?o:[o]]));const X=(e,t)=>{const n=w.forwardRef(({className:s,...i},o)=>w.createElement(yd,{ref:o,iconNode:t,className:ho(`lucide-${fd(uo(e))}`,`lucide-${e}`,s),...i}));return n.displayName=uo(e),n};const bd=X("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const xd=X("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);const vd=X("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);const is=X("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const wd=X("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]);const Td=X("move-horizontal",[["path",{d:"m18 8 4 4-4 4",key:"1ak13k"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}]]);const kd=X("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]);const rs=X("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Sd=X("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const Pd=X("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);const Ad=X("text-align-center",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]]);const Cd=X("text-align-end",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]]);const Md=X("text-align-justify",[["path",{d:"M3 5h18",key:"1u36vt"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 19h18",key:"awlh7x"}]]);const fo=X("text-align-start",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]]);const Vd=X("type",[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]);const Ed=X("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Dd=({children:e,trigger:t})=>{const{isWidgetOpen:n,toggleWidget:s,reset:i}=de();return g.jsxs("div",{className:"fixed z-[9999] font-sans text-base",children:[!n&&g.jsxs(co.button,{drag:!0,dragMomentum:!1,dragElastic:.1,initial:{scale:0},animate:{scale:1},whileHover:{scale:1.1},whileDrag:{scale:1.2,cursor:"grabbing"},onClick:s,className:"fixed right-5 bottom-5 p-3 bg-primary text-primary-foreground rounded-full shadow-lg hover:shadow-xl transition-shadow z-[10000] cursor-grab",children:[t||g.jsx(Pd,{className:"w-8 h-8"}),g.jsx("span",{className:"sr-only",children:"Open Accessibility Menu"})]}),g.jsx(Il,{children:n&&g.jsxs(co.div,{initial:{x:"100%",opacity:0},animate:{x:0,opacity:1},exit:{x:"100%",opacity:0},transition:{type:"spring",damping:20},className:"fixed right-0 top-0 h-full w-80 bg-background border-l shadow-2xl overflow-y-auto",children:[g.jsxs("div",{className:"p-4 border-b flex items-center justify-between sticky top-0 bg-background/95 backdrop-blur z-10",children:[g.jsx("h2",{className:"text-lg font-semibold",children:"Accessibility"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{onClick:i,className:"p-2 hover:bg-muted rounded-md",title:"Reset All",children:g.jsx(Sd,{className:"w-5 h-5"})}),g.jsx("button",{onClick:s,className:"p-2 hover:bg-muted rounded-md",title:"Close",children:g.jsx(Ed,{className:"w-5 h-5"})})]})]}),g.jsx("div",{className:"p-4 grid grid-cols-2 gap-4",children:e})]})})]})},Rd=({children:e,trigger:t})=>g.jsx(ps,{children:g.jsx(Dd,{trigger:t,children:e})});function mo(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=mo(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function jd(){for(var e,t,n=0,s="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=mo(e))&&(s&&(s+=" "),s+=t);return s}const Ld=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},Nd=(e,t)=>({classGroupId:e,validator:t}),po=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ot="-",go=[],Od="arbitrary..",Id=e=>{const t=_d(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return Fd(r);const a=r.split(Ot),l=a[0]===""&&a.length>1?1:0;return yo(a,l,t)},getConflictingClassGroupIds:(r,a)=>{if(a){const l=s[r],u=n[r];return l?u?Ld(u,l):l:u||go}return n[r]||go}}},yo=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const u=yo(e,t+1,o);if(u)return u}const r=n.validators;if(r===null)return;const a=t===0?e.join(Ot):e.slice(t).join(Ot),l=r.length;for(let u=0;u<l;u++){const c=r[u];if(c.validator(a))return c.classGroupId}},Fd=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?Od+s:void 0})(),_d=e=>{const{theme:t,classGroups:n}=e;return Bd(n,t)},Bd=(e,t)=>{const n=po();for(const s in e){const i=e[s];os(i,n,s,t)}return n},os=(e,t,n,s)=>{const i=e.length;for(let o=0;o<i;o++){const r=e[o];zd(r,t,n,s)}},zd=(e,t,n,s)=>{if(typeof e=="string"){$d(e,t,n);return}if(typeof e=="function"){Ud(e,t,n,s);return}Wd(e,t,n,s)},$d=(e,t,n)=>{const s=e===""?t:bo(t,e);s.classGroupId=n},Ud=(e,t,n,s)=>{if(Gd(e)){os(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Nd(n,e))},Wd=(e,t,n,s)=>{const i=Object.entries(e),o=i.length;for(let r=0;r<o;r++){const[a,l]=i[r];os(l,bo(t,a),n,s)}},bo=(e,t)=>{let n=e;const s=t.split(Ot),i=s.length;for(let o=0;o<i;o++){const r=s[o];let a=n.nextPart.get(r);a||(a=po(),n.nextPart.set(r,a)),n=a}return n},Gd=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Hd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const i=(o,r)=>{n[o]=r,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(o){let r=n[o];if(r!==void 0)return r;if((r=s[o])!==void 0)return i(o,r),r},set(o,r){o in n?n[o]=r:i(o,r)}}},as="!",xo=":",Kd=[],vo=(e,t,n,s,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),Yd=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=i=>{const o=[];let r=0,a=0,l=0,u;const c=i.length;for(let b=0;b<c;b++){const x=i[b];if(r===0&&a===0){if(x===xo){o.push(i.slice(l,b)),l=b+1;continue}if(x==="/"){u=b;continue}}x==="["?r++:x==="]"?r--:x==="("?a++:x===")"&&a--}const d=o.length===0?i:i.slice(l);let h=d,f=!1;d.endsWith(as)?(h=d.slice(0,-1),f=!0):d.startsWith(as)&&(h=d.slice(1),f=!0);const p=u&&u>l?u-l:void 0;return vo(o,f,h,p)};if(t){const i=t+xo,o=s;s=r=>r.startsWith(i)?o(r.slice(i.length)):vo(Kd,!1,r,void 0,!0)}if(n){const i=s;s=o=>n({className:o,parseClassName:i})}return s},Xd=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let i=[];for(let o=0;o<n.length;o++){const r=n[o],a=r[0]==="[",l=t.has(r);a||l?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(r)):i.push(r)}return i.length>0&&(i.sort(),s.push(...i)),s}},qd=e=>({cache:Hd(e.cacheSize),parseClassName:Yd(e),sortModifiers:Xd(e),...Id(e)}),Zd=/\s+/,Jd=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:o}=t,r=[],a=e.trim().split(Zd);let l="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{isExternal:d,modifiers:h,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:b}=n(c);if(d){l=c+(l.length>0?" "+l:l);continue}let x=!!b,v=s(x?p.substring(0,b):p);if(!v){if(!x){l=c+(l.length>0?" "+l:l);continue}if(v=s(p),!v){l=c+(l.length>0?" "+l:l);continue}x=!1}const k=h.length===0?"":h.length===1?h[0]:o(h).join(":"),T=f?k+as:k,E=T+v;if(r.indexOf(E)>-1)continue;r.push(E);const C=i(v,x);for(let V=0;V<C.length;++V){const D=C[V];r.push(T+D)}l=c+(l.length>0?" "+l:l)}return l},Qd=(...e)=>{let t=0,n,s,i="";for(;t<e.length;)(n=e[t++])&&(s=wo(n))&&(i&&(i+=" "),i+=s);return i},wo=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=wo(e[s]))&&(n&&(n+=" "),n+=t);return n},eh=(e,...t)=>{let n,s,i,o;const r=l=>{const u=t.reduce((c,d)=>d(c),e());return n=qd(u),s=n.cache.get,i=n.cache.set,o=a,a(l)},a=l=>{const u=s(l);if(u)return u;const c=Jd(l,n);return i(l,c),c};return o=r,(...l)=>o(Qd(...l))},th=[],G=e=>{const t=n=>n[e]||th;return t.isThemeGetter=!0,t},To=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ko=/^\((?:(\w[\w-]*):)?(.+)\)$/i,nh=/^\d+\/\d+$/,sh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ih=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,oh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ah=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,He=e=>nh.test(e),j=e=>!!e&&!Number.isNaN(Number(e)),Te=e=>!!e&&Number.isInteger(Number(e)),ls=e=>e.endsWith("%")&&j(e.slice(0,-1)),pe=e=>sh.test(e),lh=()=>!0,ch=e=>ih.test(e)&&!rh.test(e),So=()=>!1,uh=e=>oh.test(e),dh=e=>ah.test(e),hh=e=>!S(e)&&!P(e),fh=e=>Ke(e,Vo,So),S=e=>To.test(e),De=e=>Ke(e,Eo,ch),cs=e=>Ke(e,bh,j),Po=e=>Ke(e,Co,So),mh=e=>Ke(e,Mo,dh),It=e=>Ke(e,Do,uh),P=e=>ko.test(e),mt=e=>Ye(e,Eo),ph=e=>Ye(e,xh),Ao=e=>Ye(e,Co),gh=e=>Ye(e,Vo),yh=e=>Ye(e,Mo),Ft=e=>Ye(e,Do,!0),Ke=(e,t,n)=>{const s=To.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},Ye=(e,t,n=!1)=>{const s=ko.exec(e);return s?s[1]?t(s[1]):n:!1},Co=e=>e==="position"||e==="percentage",Mo=e=>e==="image"||e==="url",Vo=e=>e==="length"||e==="size"||e==="bg-size",Eo=e=>e==="length",bh=e=>e==="number",xh=e=>e==="family-name",Do=e=>e==="shadow",vh=eh(()=>{const e=G("color"),t=G("font"),n=G("text"),s=G("font-weight"),i=G("tracking"),o=G("leading"),r=G("breakpoint"),a=G("container"),l=G("spacing"),u=G("radius"),c=G("shadow"),d=G("inset-shadow"),h=G("text-shadow"),f=G("drop-shadow"),p=G("blur"),b=G("perspective"),x=G("aspect"),v=G("ease"),k=G("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...E(),P,S],V=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],y=()=>[P,S,l],I=()=>[He,"full","auto",...y()],U=()=>[Te,"none","subgrid",P,S],J=()=>["auto",{span:["full",Te,P,S]},Te,P,S],ce=()=>[Te,"auto",P,S],Re=()=>["auto","min","max","fr",P,S],ke=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...y()],F=()=>[He,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],A=()=>[e,P,S],te=()=>[...E(),Ao,Po,{position:[P,S]}],re=()=>["no-repeat",{repeat:["","x","y","space","round"]}],m=()=>["auto","cover","contain",gh,fh,{size:[P,S]}],R=()=>[ls,mt,De],L=()=>["","none","full",u,P,S],O=()=>["",j,mt,De],ge=()=>["solid","dashed","dotted","double"],Xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>[j,ls,Ao,Po],ye=()=>["","none",p,P,S],Se=()=>["none",j,P,S],qe=()=>["none",j,P,S],us=()=>[j,P,S],_t=()=>[He,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pe],breakpoint:[pe],color:[lh],container:[pe],"drop-shadow":[pe],ease:["in","out","in-out"],font:[hh],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pe],shadow:[pe],spacing:["px",j],text:[pe],"text-shadow":[pe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",He,S,P,x]}],container:["container"],columns:[{columns:[j,S,P,a]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Te,"auto",P,S]}],basis:[{basis:[He,"full","auto",a,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[j,He,"auto","initial","none",S]}],grow:[{grow:["",j,P,S]}],shrink:[{shrink:["",j,P,S]}],order:[{order:[Te,"first","last","none",P,S]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:J()}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:J()}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Re()}],"auto-rows":[{"auto-rows":Re()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:[...ke(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...ke()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":ke()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[a,"screen",...F()]}],"min-w":[{"min-w":[a,"screen","none",...F()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[r]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,mt,De]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,P,cs]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ls,S]}],"font-family":[{font:[ph,S,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,P,S]}],"line-clamp":[{"line-clamp":[j,"none",P,cs]}],leading:[{leading:[o,...y()]}],"list-image":[{"list-image":["none",P,S]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",P,S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[j,"from-font","auto",P,De]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[j,"auto",P,S]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",P,S]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",P,S]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:m()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Te,P,S],radial:["",P,S],conic:[Te,P,S]},yh,mh]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:O()}],"border-w-x":[{"border-x":O()}],"border-w-y":[{"border-y":O()}],"border-w-s":[{"border-s":O()}],"border-w-e":[{"border-e":O()}],"border-w-t":[{"border-t":O()}],"border-w-r":[{"border-r":O()}],"border-w-b":[{"border-b":O()}],"border-w-l":[{"border-l":O()}],"divide-x":[{"divide-x":O()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":O()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[j,P,S]}],"outline-w":[{outline:["",j,mt,De]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",c,Ft,It]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,Ft,It]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[j,De]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,Ft,It]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[j,P,S]}],"mix-blend":[{"mix-blend":[...Xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Xe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[j]}],"mask-image-linear-from-pos":[{"mask-linear-from":N()}],"mask-image-linear-to-pos":[{"mask-linear-to":N()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":N()}],"mask-image-t-to-pos":[{"mask-t-to":N()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":N()}],"mask-image-r-to-pos":[{"mask-r-to":N()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":N()}],"mask-image-b-to-pos":[{"mask-b-to":N()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":N()}],"mask-image-l-to-pos":[{"mask-l-to":N()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":N()}],"mask-image-x-to-pos":[{"mask-x-to":N()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":N()}],"mask-image-y-to-pos":[{"mask-y-to":N()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[P,S]}],"mask-image-radial-from-pos":[{"mask-radial-from":N()}],"mask-image-radial-to-pos":[{"mask-radial-to":N()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[j]}],"mask-image-conic-from-pos":[{"mask-conic-from":N()}],"mask-image-conic-to-pos":[{"mask-conic-to":N()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:m()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",P,S]}],filter:[{filter:["","none",P,S]}],blur:[{blur:ye()}],brightness:[{brightness:[j,P,S]}],contrast:[{contrast:[j,P,S]}],"drop-shadow":[{"drop-shadow":["","none",f,Ft,It]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",j,P,S]}],"hue-rotate":[{"hue-rotate":[j,P,S]}],invert:[{invert:["",j,P,S]}],saturate:[{saturate:[j,P,S]}],sepia:[{sepia:["",j,P,S]}],"backdrop-filter":[{"backdrop-filter":["","none",P,S]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[j,P,S]}],"backdrop-contrast":[{"backdrop-contrast":[j,P,S]}],"backdrop-grayscale":[{"backdrop-grayscale":["",j,P,S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[j,P,S]}],"backdrop-invert":[{"backdrop-invert":["",j,P,S]}],"backdrop-opacity":[{"backdrop-opacity":[j,P,S]}],"backdrop-saturate":[{"backdrop-saturate":[j,P,S]}],"backdrop-sepia":[{"backdrop-sepia":["",j,P,S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",P,S]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[j,"initial",P,S]}],ease:[{ease:["linear","initial",v,P,S]}],delay:[{delay:[j,P,S]}],animate:[{animate:["none",k,P,S]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,P,S]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Se()}],"rotate-x":[{"rotate-x":Se()}],"rotate-y":[{"rotate-y":Se()}],"rotate-z":[{"rotate-z":Se()}],scale:[{scale:qe()}],"scale-x":[{"scale-x":qe()}],"scale-y":[{"scale-y":qe()}],"scale-z":[{"scale-z":qe()}],"scale-3d":["scale-3d"],skew:[{skew:us()}],"skew-x":[{"skew-x":us()}],"skew-y":[{"skew-y":us()}],transform:[{transform:[P,S,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_t()}],"translate-x":[{"translate-x":_t()}],"translate-y":[{"translate-y":_t()}],"translate-z":[{"translate-z":_t()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",P,S]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",P,S]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[j,mt,De,cs]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function pt(...e){return vh(jd(e))}const wh=[{mode:"normal",label:"Normal"},{mode:"invert",label:"Invert"},{mode:"grayscale",label:"Grayscale"},{mode:"low-saturation",label:"Low Saturation"},{mode:"high-saturation",label:"High Saturation"},{mode:"yellow-on-black",label:"Yellow on Black"},{mode:"white-on-black",label:"White on Black"},{mode:"blue-on-yellow",label:"Blue on Yellow"}],Th=()=>{const{contrast:e,setContrast:t}=de();return g.jsxs("div",{className:"col-span-2 space-y-2",children:[g.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[g.jsx(kd,{className:"w-4 h-4"}),g.jsx("span",{children:"Contrast & Color"})]}),g.jsx("div",{className:"grid grid-cols-2 gap-2",children:wh.map(n=>g.jsx("button",{onClick:()=>t(n.mode),className:pt("px-3 py-2 text-sm border rounded-md transition-colors text-left",e===n.mode?"bg-primary text-primary-foreground border-primary":"hover:bg-muted"),children:n.label},n.mode))})]})},kh=()=>{const{fontSize:e,setFontSize:t}=de(),n=()=>t(Math.min(e+.1,2)),s=()=>t(Math.max(e-.1,.8));return g.jsxs("div",{className:"col-span-2 space-y-2",children:[g.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[g.jsx(Vd,{className:"w-4 h-4"}),g.jsxs("span",{children:["Font Size (",Math.round(e*100),"%)"]})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:s,className:"p-2 border rounded-md hover:bg-muted",disabled:e<=.8,children:g.jsx(is,{className:"w-4 h-4"})}),g.jsx("div",{className:"flex-1 h-2 bg-secondary rounded-full overflow-hidden",children:g.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${(e-.8)/1.2*100}%`}})}),g.jsx("button",{onClick:n,className:"p-2 border rounded-md hover:bg-muted",disabled:e>=2,children:g.jsx(rs,{className:"w-4 h-4"})})]})]})},Sh=()=>{const{lineHeight:e,setLineHeight:t}=de(),n=()=>t(Math.min(e+.1,3)),s=()=>t(Math.max(e-.1,1));return g.jsxs("div",{className:"col-span-2 space-y-2",children:[g.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[g.jsx(bd,{className:"w-4 h-4"}),g.jsxs("span",{children:["Line Height (",e.toFixed(1),")"]})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:s,className:"p-2 border rounded-md hover:bg-muted",disabled:e<=1,children:g.jsx(is,{className:"w-4 h-4"})}),g.jsx("div",{className:"flex-1 h-2 bg-secondary rounded-full overflow-hidden",children:g.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${(e-1)/2*100}%`}})}),g.jsx("button",{onClick:n,className:"p-2 border rounded-md hover:bg-muted",disabled:e>=3,children:g.jsx(rs,{className:"w-4 h-4"})})]})]})},Ph=()=>{const{letterSpacing:e,setLetterSpacing:t}=de(),n=()=>t(Math.min(e+.05,.5)),s=()=>t(Math.max(e-.05,0));return g.jsxs("div",{className:"col-span-2 space-y-2",children:[g.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[g.jsx(Td,{className:"w-4 h-4"}),g.jsxs("span",{children:["Letter Spacing (",e.toFixed(2),")"]})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:s,className:"p-2 border rounded-md hover:bg-muted",disabled:e<=0,children:g.jsx(is,{className:"w-4 h-4"})}),g.jsx("div",{className:"flex-1 h-2 bg-secondary rounded-full overflow-hidden",children:g.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${e/.5*100}%`}})}),g.jsx("button",{onClick:n,className:"p-2 border rounded-md hover:bg-muted",disabled:e>=.5,children:g.jsx(rs,{className:"w-4 h-4"})})]})]})},Ah=()=>{const{textAlign:e,setTextAlign:t}=de(),n=[{align:"left",icon:g.jsx(fo,{className:"w-4 h-4"})},{align:"center",icon:g.jsx(Ad,{className:"w-4 h-4"})},{align:"right",icon:g.jsx(Cd,{className:"w-4 h-4"})},{align:"initial",icon:g.jsx(Md,{className:"w-4 h-4"})}];return g.jsxs("div",{className:"col-span-2 space-y-2",children:[g.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[g.jsx(fo,{className:"w-4 h-4"}),g.jsx("span",{children:"Text Align"})]}),g.jsx("div",{className:"flex gap-2",children:n.map(s=>g.jsx("button",{onClick:()=>t(s.align),className:pt("p-2 border rounded-md flex-1 flex justify-center hover:bg-muted",e===s.align&&"bg-primary text-primary-foreground border-primary"),title:s.align,children:s.icon},s.align))})]})},Ch=()=>{const{cursor:e,setCursor:t}=de(),n=[{mode:"normal",label:"Normal"},{mode:"big",label:"Big Cursor"},{mode:"reading-guide",label:"Reading Guide"}];return g.jsxs("div",{className:"col-span-2 space-y-2",children:[g.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[g.jsx(wd,{className:"w-4 h-4"}),g.jsx("span",{children:"Cursor"})]}),g.jsx("div",{className:"flex gap-2",children:n.map(s=>g.jsx("button",{onClick:()=>t(s.mode),className:pt("px-3 py-2 text-sm border rounded-md flex-1 hover:bg-muted",e===s.mode&&"bg-primary text-primary-foreground border-primary"),children:s.label},s.mode))})]})},Mh=()=>{const{hideImages:e,setHideImages:t,highlightLinks:n,setHighlightLinks:s}=de();return g.jsxs("div",{className:"col-span-2 grid grid-cols-2 gap-2",children:[g.jsxs("button",{onClick:()=>t(!e),className:pt("p-3 border rounded-md flex flex-col items-center gap-2 hover:bg-muted transition-colors",e&&"bg-primary text-primary-foreground border-primary"),children:[g.jsx(xd,{className:"w-5 h-5"}),g.jsx("span",{className:"text-sm",children:"Hide Images"})]}),g.jsxs("button",{onClick:()=>s(!n),className:pt("p-3 border rounded-md flex flex-col items-center gap-2 hover:bg-muted transition-colors",n&&"bg-primary text-primary-foreground border-primary"),children:[g.jsx(vd,{className:"w-5 h-5"}),g.jsx("span",{className:"text-sm",children:"Highlight Links"})]})]})};K.AccessibilityPlugin=Rd,K.AccessibilityProvider=ps,K.ContrastTool=Th,K.CursorTool=Ch,K.FontSizeTool=kh,K.LetterSpacingTool=Ph,K.LineHeightTool=Sh,K.TextAlignTool=Ah,K.VisualTogglesTool=Mh,K.useAccessibility=de,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})}));
|