briq-ui 0.0.1

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.
@@ -0,0 +1,15 @@
1
+ (function(X,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],T):(X=typeof globalThis<"u"?globalThis:X||self,T(X.BriqUI={},X.React))})(this,(function(X,T){"use strict";function Ro(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const ge=Ro(T);var ye={exports:{}},Zt={};var hs;function jo(){if(hs)return Zt;hs=1;var t=Symbol.for("react.transitional.element"),e=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:t,type:s,key:r,ref:i!==void 0?i:null,props:o}}return Zt.Fragment=e,Zt.jsx=n,Zt.jsxs=n,Zt}var Jt={};var fs;function Lo(){return fs||(fs=1,process.env.NODE_ENV!=="production"&&(function(){function t(m){if(m==null)return null;if(typeof m=="function")return m.$$typeof===Z?null:m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case b:return"Fragment";case P:return"Profiler";case v:return"StrictMode";case E: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 x:return"Portal";case M:return m.displayName||"Context";case w: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 g:return R=m.displayName||null,R!==null?R:t(m.type)||"Memo";case I:R=m._payload,m=m._init;try{return t(m(R))}catch{}}return null}function e(m){return""+m}function n(m){try{e(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),e(m)}}function s(m){if(m===b)return"<>";if(typeof m=="object"&&m!==null&&m.$$typeof===I)return"<...>";try{var R=t(m);return R?"<"+R+">":"<...>"}catch{return"<...>"}}function i(){var m=lt.A;return m===null?null:m.getOwner()}function o(){return Error("react-stack-top-frame")}function r(m){if(Mt.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(){Q||(Q=!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=t(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,mt,Xt){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:mt}),Object.defineProperty(m,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Xt}),Object.freeze&&(Object.freeze(m.props),Object.freeze(m)),m}function c(m,R,L,O,mt,Xt){var N=R.children;if(N!==void 0)if(O)if(wt(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(Mt.call(R,"key")){N=t(m);var pt=Object.keys(R).filter(function(qt){return qt!=="key"});O=0<pt.length?"{key: someKey, "+pt.join(": ..., ")+": ...}":"{key: someKey}",it[N+O]||(pt=0<pt.length?"{"+pt.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,pt,N),it[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 Tt in R)Tt!=="key"&&(L[Tt]=R[Tt])}else L=R;return N&&a(L,typeof m=="function"?m.displayName||m.name||"Unknown":m),u(m,N,L,i(),mt,Xt)}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=T,p=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),M=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),Z=Symbol.for("react.client.reference"),lt=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Mt=Object.prototype.hasOwnProperty,wt=Array.isArray,J=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(m){return m()}};var Q,F={},k=f.react_stack_bottom_frame.bind(f,o)(),tt=J(s(o)),it={};Jt.Fragment=b,Jt.jsx=function(m,R,L){var O=1e4>lt.recentlyCreatedOwnerStacks++;return c(m,R,L,!1,O?Error("react-stack-top-frame"):k,O?J(s(m)):tt)},Jt.jsxs=function(m,R,L){var O=1e4>lt.recentlyCreatedOwnerStacks++;return c(m,R,L,!0,O?Error("react-stack-top-frame"):k,O?J(s(m)):tt)}})()),Jt}var ms;function No(){return ms||(ms=1,process.env.NODE_ENV==="production"?ye.exports=jo():ye.exports=Lo()),ye.exports}var y=No();function ps(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=ps(t[e]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}function Dt(){for(var t,e,n=0,s="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=ps(t))&&(s&&(s+=" "),s+=e);return s}const Oo=(t,e)=>{const n=new Array(t.length+e.length);for(let s=0;s<t.length;s++)n[s]=t[s];for(let s=0;s<e.length;s++)n[t.length+s]=e[s];return n},Io=(t,e)=>({classGroupId:t,validator:e}),gs=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),xe="-",ys=[],Fo="arbitrary..",Bo=t=>{const e=zo(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return _o(r);const a=r.split(xe),l=a[0]===""&&a.length>1?1:0;return xs(a,l,e)},getConflictingClassGroupIds:(r,a)=>{if(a){const l=s[r],u=n[r];return l?u?Oo(u,l):l:u||ys}return n[r]||ys}}},xs=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const i=t[e],o=n.nextPart.get(i);if(o){const u=xs(t,e+1,o);if(u)return u}const r=n.validators;if(r===null)return;const a=e===0?t.join(xe):t.slice(e).join(xe),l=r.length;for(let u=0;u<l;u++){const c=r[u];if(c.validator(a))return c.classGroupId}},_o=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),s=e.slice(0,n);return s?Fo+s:void 0})(),zo=t=>{const{theme:e,classGroups:n}=t;return $o(n,e)},$o=(t,e)=>{const n=gs();for(const s in t){const i=t[s];_e(i,n,s,e)}return n},_e=(t,e,n,s)=>{const i=t.length;for(let o=0;o<i;o++){const r=t[o];Uo(r,e,n,s)}},Uo=(t,e,n,s)=>{if(typeof t=="string"){Wo(t,e,n);return}if(typeof t=="function"){Go(t,e,n,s);return}Ko(t,e,n,s)},Wo=(t,e,n)=>{const s=t===""?e:bs(e,t);s.classGroupId=n},Go=(t,e,n,s)=>{if(Yo(t)){_e(t(s),e,n,s);return}e.validators===null&&(e.validators=[]),e.validators.push(Io(n,t))},Ko=(t,e,n,s)=>{const i=Object.entries(t),o=i.length;for(let r=0;r<o;r++){const[a,l]=i[r];_e(l,bs(e,a),n,s)}},bs=(t,e)=>{let n=t;const s=e.split(xe),i=s.length;for(let o=0;o<i;o++){const r=s[o];let a=n.nextPart.get(r);a||(a=gs(),n.nextPart.set(r,a)),n=a}return n},Yo=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Ho=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),s=Object.create(null);const i=(o,r)=>{n[o]=r,e++,e>t&&(e=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)}}},ze="!",vs=":",Xo=[],ws=(t,e,n,s,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),qo=t=>{const{prefix:e,experimentalParseClassName:n}=t;let s=i=>{const o=[];let r=0,a=0,l=0,u;const c=i.length;for(let x=0;x<c;x++){const b=i[x];if(r===0&&a===0){if(b===vs){o.push(i.slice(l,x)),l=x+1;continue}if(b==="/"){u=x;continue}}b==="["?r++:b==="]"?r--:b==="("?a++:b===")"&&a--}const d=o.length===0?i:i.slice(l);let h=d,f=!1;d.endsWith(ze)?(h=d.slice(0,-1),f=!0):d.startsWith(ze)&&(h=d.slice(1),f=!0);const p=u&&u>l?u-l:void 0;return ws(o,f,h,p)};if(e){const i=e+vs,o=s;s=r=>r.startsWith(i)?o(r.slice(i.length)):ws(Xo,!1,r,void 0,!0)}if(n){const i=s;s=o=>n({className:o,parseClassName:i})}return s},Zo=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,s)=>{e.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=e.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}},Jo=t=>({cache:Ho(t.cacheSize),parseClassName:qo(t),sortModifiers:Zo(t),...Bo(t)}),Qo=/\s+/,ta=(t,e)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:o}=e,r=[],a=t.trim().split(Qo);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:x}=n(c);if(d){l=c+(l.length>0?" "+l:l);continue}let b=!!x,v=s(b?p.substring(0,x):p);if(!v){if(!b){l=c+(l.length>0?" "+l:l);continue}if(v=s(p),!v){l=c+(l.length>0?" "+l:l);continue}b=!1}const P=h.length===0?"":h.length===1?h[0]:o(h).join(":"),w=f?P+ze:P,M=w+v;if(r.indexOf(M)>-1)continue;r.push(M);const C=i(v,b);for(let E=0;E<C.length;++E){const D=C[E];r.push(w+D)}l=c+(l.length>0?" "+l:l)}return l},ea=(...t)=>{let e=0,n,s,i="";for(;e<t.length;)(n=t[e++])&&(s=Ts(n))&&(i&&(i+=" "),i+=s);return i},Ts=t=>{if(typeof t=="string")return t;let e,n="";for(let s=0;s<t.length;s++)t[s]&&(e=Ts(t[s]))&&(n&&(n+=" "),n+=e);return n},na=(t,...e)=>{let n,s,i,o;const r=l=>{const u=e.reduce((c,d)=>d(c),t());return n=Jo(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=ta(l,n);return i(l,c),c};return o=r,(...l)=>o(ea(...l))},sa=[],W=t=>{const e=n=>n[t]||sa;return e.isThemeGetter=!0,e},Ps=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ss=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ia=/^\d+\/\d+$/,ra=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oa=/\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$/,aa=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,la=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ca=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Rt=t=>ia.test(t),j=t=>!!t&&!Number.isNaN(Number(t)),gt=t=>!!t&&Number.isInteger(Number(t)),$e=t=>t.endsWith("%")&&j(t.slice(0,-1)),ut=t=>ra.test(t),ua=()=>!0,da=t=>oa.test(t)&&!aa.test(t),As=()=>!1,ha=t=>la.test(t),fa=t=>ca.test(t),ma=t=>!S(t)&&!A(t),pa=t=>jt(t,Ms,As),S=t=>Ps.test(t),Pt=t=>jt(t,Ds,da),Ue=t=>jt(t,va,j),ks=t=>jt(t,Vs,As),ga=t=>jt(t,Es,fa),be=t=>jt(t,Rs,ha),A=t=>Ss.test(t),Qt=t=>Lt(t,Ds),ya=t=>Lt(t,wa),Cs=t=>Lt(t,Vs),xa=t=>Lt(t,Ms),ba=t=>Lt(t,Es),ve=t=>Lt(t,Rs,!0),jt=(t,e,n)=>{const s=Ps.exec(t);return s?s[1]?e(s[1]):n(s[2]):!1},Lt=(t,e,n=!1)=>{const s=Ss.exec(t);return s?s[1]?e(s[1]):n:!1},Vs=t=>t==="position"||t==="percentage",Es=t=>t==="image"||t==="url",Ms=t=>t==="length"||t==="size"||t==="bg-size",Ds=t=>t==="length",va=t=>t==="number",wa=t=>t==="family-name",Rs=t=>t==="shadow",Nt=na(()=>{const t=W("color"),e=W("font"),n=W("text"),s=W("font-weight"),i=W("tracking"),o=W("leading"),r=W("breakpoint"),a=W("container"),l=W("spacing"),u=W("radius"),c=W("shadow"),d=W("inset-shadow"),h=W("text-shadow"),f=W("drop-shadow"),p=W("blur"),x=W("perspective"),b=W("aspect"),v=W("ease"),P=W("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...M(),A,S],E=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],g=()=>[A,S,l],I=()=>[Rt,"full","auto",...g()],U=()=>[gt,"none","subgrid",A,S],Z=()=>["auto",{span:["full",gt,A,S]},gt,A,S],lt=()=>[gt,"auto",A,S],Mt=()=>["auto","min","max","fr",A,S],wt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],Q=()=>["auto",...g()],F=()=>[Rt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...g()],k=()=>[t,A,S],tt=()=>[...M(),Cs,ks,{position:[A,S]}],it=()=>["no-repeat",{repeat:["","x","y","space","round"]}],m=()=>["auto","cover","contain",xa,pa,{size:[A,S]}],R=()=>[$e,Qt,Pt],L=()=>["","none","full",u,A,S],O=()=>["",j,Qt,Pt],mt=()=>["solid","dashed","dotted","double"],Xt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>[j,$e,Cs,ks],pt=()=>["","none",p,A,S],Tt=()=>["none",j,A,S],qt=()=>["none",j,A,S],ds=()=>[j,A,S],Be=()=>[Rt,"full",...g()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ut],breakpoint:[ut],color:[ua],container:[ut],"drop-shadow":[ut],ease:["in","out","in-out"],font:[ma],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ut],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ut],shadow:[ut],spacing:["px",j],text:[ut],"text-shadow":[ut],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Rt,S,A,b]}],container:["container"],columns:[{columns:[j,S,A,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],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:[gt,"auto",A,S]}],basis:[{basis:[Rt,"full","auto",a,...g()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[j,Rt,"auto","initial","none",S]}],grow:[{grow:["",j,A,S]}],shrink:[{shrink:["",j,A,S]}],order:[{order:[gt,"first","last","none",A,S]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":lt()}],"col-end":[{"col-end":lt()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":lt()}],"row-end":[{"row-end":lt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Mt()}],"auto-rows":[{"auto-rows":Mt()}],gap:[{gap:g()}],"gap-x":[{"gap-x":g()}],"gap-y":[{"gap-y":g()}],"justify-content":[{justify:[...wt(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...wt()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":wt()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:g()}],px:[{px:g()}],py:[{py:g()}],ps:[{ps:g()}],pe:[{pe:g()}],pt:[{pt:g()}],pr:[{pr:g()}],pb:[{pb:g()}],pl:[{pl:g()}],m:[{m:Q()}],mx:[{mx:Q()}],my:[{my:Q()}],ms:[{ms:Q()}],me:[{me:Q()}],mt:[{mt:Q()}],mr:[{mr:Q()}],mb:[{mb:Q()}],ml:[{ml:Q()}],"space-x":[{"space-x":g()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":g()}],"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,Qt,Pt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,A,Ue]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$e,S]}],"font-family":[{font:[ya,S,e]}],"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,A,S]}],"line-clamp":[{"line-clamp":[j,"none",A,Ue]}],leading:[{leading:[o,...g()]}],"list-image":[{"list-image":["none",A,S]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",A,S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...mt(),"wavy"]}],"text-decoration-thickness":[{decoration:[j,"from-font","auto",A,Pt]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[j,"auto",A,S]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:g()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",A,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",A,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:tt()}],"bg-repeat":[{bg:it()}],"bg-size":[{bg:m()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},gt,A,S],radial:["",A,S],conic:[gt,A,S]},ba,ga]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],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:[...mt(),"hidden","none"]}],"divide-style":[{divide:[...mt(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...mt(),"none","hidden"]}],"outline-offset":[{"outline-offset":[j,A,S]}],"outline-w":[{outline:["",j,Qt,Pt]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",c,ve,be]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,ve,be]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[j,Pt]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",h,ve,be]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[j,A,S]}],"mix-blend":[{"mix-blend":[...Xt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Xt()}],"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":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"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":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"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":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"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":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"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":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"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":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"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":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[A,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":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"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":M()}],"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":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:tt()}],"mask-repeat":[{mask:it()}],"mask-size":[{mask:m()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",A,S]}],filter:[{filter:["","none",A,S]}],blur:[{blur:pt()}],brightness:[{brightness:[j,A,S]}],contrast:[{contrast:[j,A,S]}],"drop-shadow":[{"drop-shadow":["","none",f,ve,be]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",j,A,S]}],"hue-rotate":[{"hue-rotate":[j,A,S]}],invert:[{invert:["",j,A,S]}],saturate:[{saturate:[j,A,S]}],sepia:[{sepia:["",j,A,S]}],"backdrop-filter":[{"backdrop-filter":["","none",A,S]}],"backdrop-blur":[{"backdrop-blur":pt()}],"backdrop-brightness":[{"backdrop-brightness":[j,A,S]}],"backdrop-contrast":[{"backdrop-contrast":[j,A,S]}],"backdrop-grayscale":[{"backdrop-grayscale":["",j,A,S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[j,A,S]}],"backdrop-invert":[{"backdrop-invert":["",j,A,S]}],"backdrop-opacity":[{"backdrop-opacity":[j,A,S]}],"backdrop-saturate":[{"backdrop-saturate":[j,A,S]}],"backdrop-sepia":[{"backdrop-sepia":["",j,A,S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":g()}],"border-spacing-x":[{"border-spacing-x":g()}],"border-spacing-y":[{"border-spacing-y":g()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",A,S]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[j,"initial",A,S]}],ease:[{ease:["linear","initial",v,A,S]}],delay:[{delay:[j,A,S]}],animate:[{animate:["none",P,A,S]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,A,S]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Tt()}],"rotate-x":[{"rotate-x":Tt()}],"rotate-y":[{"rotate-y":Tt()}],"rotate-z":[{"rotate-z":Tt()}],scale:[{scale:qt()}],"scale-x":[{"scale-x":qt()}],"scale-y":[{"scale-y":qt()}],"scale-z":[{"scale-z":qt()}],"scale-3d":["scale-3d"],skew:[{skew:ds()}],"skew-x":[{"skew-x":ds()}],"skew-y":[{"skew-y":ds()}],transform:[{transform:[A,S,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Be()}],"translate-x":[{"translate-x":Be()}],"translate-y":[{"translate-y":Be()}],"translate-z":[{"translate-z":Be()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",A,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":g()}],"scroll-mx":[{"scroll-mx":g()}],"scroll-my":[{"scroll-my":g()}],"scroll-ms":[{"scroll-ms":g()}],"scroll-me":[{"scroll-me":g()}],"scroll-mt":[{"scroll-mt":g()}],"scroll-mr":[{"scroll-mr":g()}],"scroll-mb":[{"scroll-mb":g()}],"scroll-ml":[{"scroll-ml":g()}],"scroll-p":[{"scroll-p":g()}],"scroll-px":[{"scroll-px":g()}],"scroll-py":[{"scroll-py":g()}],"scroll-ps":[{"scroll-ps":g()}],"scroll-pe":[{"scroll-pe":g()}],"scroll-pt":[{"scroll-pt":g()}],"scroll-pr":[{"scroll-pr":g()}],"scroll-pb":[{"scroll-pb":g()}],"scroll-pl":[{"scroll-pl":g()}],"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",A,S]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[j,Qt,Pt,Ue]}],stroke:[{stroke:["none",...k()]}],"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 Ta(...t){return Nt(Dt(t))}const Pa=({variant:t="secondary",icon:e,children:n,className:s,...i})=>{const o="px-4 py-2 text-sm font-medium rounded-xl flex items-center justify-center gap-2 transition-all duration-200 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed",r={primary:"text-white bg-[#00333e] hover:bg-[#002a36] shadow-lg shadow-[#00333e]/10",secondary:"text-[#00333e] bg-gray-100 hover:bg-gray-200",ghost:"text-[#00333e] bg-transparent hover:bg-gray-100"};return y.jsxs("button",{className:Ta(o,r[t],s),...i,children:[e&&y.jsx("span",{className:"flex items-center inline-flex",children:e}),n]})};function js(...t){return Nt(Dt(t))}const Sa=({label:t,error:e,icon:n,className:s,containerClassName:i,...o})=>y.jsxs("div",{className:js("space-y-1.5",i),children:[t&&y.jsx("label",{className:"block text-sm text-[#00333e] font-medium ml-1",children:t}),y.jsxs("div",{className:"relative group",children:[n&&y.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-gray-400 group-focus-within:text-[#00333e] transition-colors",children:n}),y.jsx("input",{className:js("w-full text-sm py-2.5 px-4 border border-gray-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-[#00333e] transition-all duration-200 bg-white placeholder:text-gray-400",n&&"pl-11",e&&"border-red-500",s),...o})]}),e&&y.jsx("p",{className:"text-xs text-red-500 font-medium ml-1",children:e})]});function Aa(...t){return Nt(Dt(t))}const ka=({children:t,className:e,title:n,footer:s})=>y.jsxs("div",{className:Aa("bg-white border border-gray-100 rounded-2xl shadow-sm overflow-hidden",e),children:[n&&y.jsx("div",{className:"px-6 py-4 border-b border-gray-50 bg-gray-50/50",children:y.jsx("h3",{className:"text-base font-bold text-[#00333e]",children:n})}),y.jsx("div",{className:"p-6",children:t}),s&&y.jsx("div",{className:"px-6 py-4 border-t border-gray-50 bg-gray-50/50",children:s})]}),We=T.createContext({});function Ge(t){const e=T.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ke=typeof window<"u",Ls=Ke?T.useLayoutEffect:T.useEffect,we=T.createContext(null);function Ye(t,e){t.indexOf(e)===-1&&t.push(e)}function He(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const dt=(t,e,n)=>n>e?e:n<t?t:n;function Xe(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Ot=()=>{},ht=()=>{};process.env.NODE_ENV!=="production"&&(Ot=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(Xe(e,n))},ht=(t,e,n)=>{if(!t)throw new Error(Xe(e,n))});const ft={},Ns=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Os(t){return typeof t=="object"&&t!==null}const Is=t=>/^0[^.\s]+$/u.test(t);function qe(t){let e;return()=>(e===void 0&&(e=t()),e)}const et=t=>t,Ca=(t,e)=>n=>e(t(n)),te=(...t)=>t.reduce(Ca),ee=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Ze{constructor(){this.subscriptions=[]}add(e){return Ye(this.subscriptions,e),()=>He(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const rt=t=>t*1e3,nt=t=>t/1e3;function Fs(t,e){return e?t*(1e3/e):0}const Bs=new Set;function Je(t,e,n){t||Bs.has(e)||(console.warn(Xe(e,n)),Bs.add(e))}const _s=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Va=1e-7,Ea=12;function Ma(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=_s(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Va&&++a<Ea);return r}function ne(t,e,n,s){if(t===e&&n===s)return et;const i=o=>Ma(o,0,1,t,n);return o=>o===0||o===1?o:_s(i(o),e,s)}const zs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,$s=t=>e=>1-t(1-e),Us=ne(.33,1.53,.69,.99),Qe=$s(Us),Ws=zs(Qe),Gs=t=>(t*=2)<1?.5*Qe(t):.5*(2-Math.pow(2,-10*(t-1))),tn=t=>1-Math.sin(Math.acos(t)),Ks=$s(tn),Ys=zs(tn),Da=ne(.42,0,1,1),Ra=ne(0,0,.58,1),Hs=ne(.42,0,.58,1),ja=t=>Array.isArray(t)&&typeof t[0]!="number",Xs=t=>Array.isArray(t)&&typeof t[0]=="number",qs={linear:et,easeIn:Da,easeInOut:Hs,easeOut:Ra,circIn:tn,circInOut:Ys,circOut:Ks,backIn:Qe,backInOut:Ws,backOut:Us,anticipate:Gs},La=t=>typeof t=="string",Zs=t=>{if(Xs(t)){ht(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return ne(e,n,s,i)}else if(La(t))return ht(qs[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),qs[t];return t},Te=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Na(t,e){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),t()),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 Oa=40;function Js(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Te.reduce((w,M)=>(w[M]=Na(o),w),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:f,postRender:p}=r,x=()=>{const w=ft.useManualTiming?i.timestamp:performance.now();n=!1,ft.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,Oa),1)),i.timestamp=w,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&&e&&(s=!1,t(x))},b=()=>{n=!0,s=!0,i.isProcessing||t(x)};return{schedule:Te.reduce((w,M)=>{const C=r[M];return w[M]=(E,D=!1,g=!1)=>(n||b(),C.schedule(E,D,g)),w},{}),cancel:w=>{for(let M=0;M<Te.length;M++)r[Te[M]].cancel(w)},state:i,steps:r}}const{schedule:B,cancel:yt,state:K,steps:en}=Js(typeof requestAnimationFrame<"u"?requestAnimationFrame:et,!0);let Pe;function Ia(){Pe=void 0}const q={now:()=>(Pe===void 0&&q.set(K.isProcessing||ft.useManualTiming?K.timestamp:performance.now()),Pe),set:t=>{Pe=t,queueMicrotask(Ia)}},Qs=t=>e=>typeof e=="string"&&e.startsWith(t),ti=Qs("--"),Fa=Qs("var(--"),nn=t=>Fa(t)?Ba.test(t.split("/*")[0].trim()):!1,Ba=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,It={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},se={...It,transform:t=>dt(0,1,t)},Se={...It,default:1},ie=t=>Math.round(t*1e5)/1e5,sn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _a(t){return t==null}const za=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,rn=(t,e)=>n=>!!(typeof n=="string"&&za.test(n)&&n.startsWith(t)||e&&!_a(n)&&Object.prototype.hasOwnProperty.call(n,e)),ei=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(sn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},$a=t=>dt(0,255,t),on={...It,transform:t=>Math.round($a(t))},St={test:rn("rgb","red"),parse:ei("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+on.transform(t)+", "+on.transform(e)+", "+on.transform(n)+", "+ie(se.transform(s))+")"};function Ua(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const an={test:rn("#"),parse:Ua,transform:St.transform},re=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),xt=re("deg"),ct=re("%"),V=re("px"),Wa=re("vh"),Ga=re("vw"),ni={...ct,parse:t=>ct.parse(t)/100,transform:t=>ct.transform(t*100)},Ft={test:rn("hsl","hue"),parse:ei("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ct.transform(ie(e))+", "+ct.transform(ie(n))+", "+ie(se.transform(s))+")"},$={test:t=>St.test(t)||an.test(t)||Ft.test(t),parse:t=>St.test(t)?St.parse(t):Ft.test(t)?Ft.parse(t):an.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?St.transform(t):Ft.transform(t),getAnimatableNone:t=>{const e=$.parse(t);return e.alpha=0,$.transform(e)}},Ka=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ya(t){return isNaN(t)&&typeof t=="string"&&(t.match(sn)?.length||0)+(t.match(Ka)?.length||0)>0}const si="number",ii="color",Ha="var",Xa="var(",ri="${}",qa=/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 oe(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(qa,l=>($.test(l)?(s.color.push(o),i.push(ii),n.push($.parse(l))):l.startsWith(Xa)?(s.var.push(o),i.push(Ha),n.push(l)):(s.number.push(o),i.push(si),n.push(parseFloat(l))),++o,ri)).split(ri);return{values:n,split:a,indexes:s,types:i}}function oi(t){return oe(t).values}function ai(t){const{split:e,types:n}=oe(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===si?o+=ie(i[r]):a===ii?o+=$.transform(i[r]):o+=i[r]}return o}}const Za=t=>typeof t=="number"?0:$.test(t)?$.getAnimatableNone(t):t;function Ja(t){const e=oi(t);return ai(t)(e.map(Za))}const bt={test:Ya,parse:oi,createTransformer:ai,getAnimatableNone:Ja};function ln(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Qa({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ln(l,a,t+1/3),o=ln(l,a,t),r=ln(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Ae(t,e){return n=>n>0?e:t}const _=(t,e,n)=>t+(e-t)*n,cn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},tl=[an,St,Ft],el=t=>tl.find(e=>e.test(t));function li(t){const e=el(t);if(Ot(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Ft&&(n=Qa(n)),n}const ci=(t,e)=>{const n=li(t),s=li(e);if(!n||!s)return Ae(t,e);const i={...n};return o=>(i.red=cn(n.red,s.red,o),i.green=cn(n.green,s.green,o),i.blue=cn(n.blue,s.blue,o),i.alpha=_(n.alpha,s.alpha,o),St.transform(i))},un=new Set(["none","hidden"]);function nl(t,e){return un.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function sl(t,e){return n=>_(t,e,n)}function dn(t){return typeof t=="number"?sl:typeof t=="string"?nn(t)?Ae:$.test(t)?ci:ol:Array.isArray(t)?ui:typeof t=="object"?$.test(t)?ci:il:Ae}function ui(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>dn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function il(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=dn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function rl(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const ol=(t,e)=>{const n=bt.createTransformer(e),s=oe(t),i=oe(e);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?un.has(t)&&!i.values.length||un.has(e)&&!s.values.length?nl(t,e):te(ui(rl(s,i),i.values),n):(Ot(!0,`Complex values '${t}' and '${e}' 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"),Ae(t,e))};function di(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?_(t,e,n):dn(t)(t,e)}const al=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>B.update(e,n),stop:()=>yt(e),now:()=>K.isProcessing?K.timestamp:q.now()}},hi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},ke=2e4;function hn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<ke;)e+=n,s=t.next(e);return e>=ke?1/0:e}function ll(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(hn(s),ke);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:nt(i)}}const cl=5;function fi(t,e,n){const s=Math.max(e-cl,0);return Fs(n-t(s),e-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},fn=.001;function ul({duration:t=z.duration,bounce:e=z.bounce,velocity:n=z.velocity,mass:s=z.mass}){let i,o;Ot(t<=rt(z.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=dt(z.minDamping,z.maxDamping,r),t=dt(z.minDuration,z.maxDuration,nt(t)),r<1?(i=u=>{const c=u*r,d=c*t,h=c-n,f=mn(u,r),p=Math.exp(-d);return fn-h/f*p},o=u=>{const d=u*r*t,h=d*n+n,f=Math.pow(r,2)*Math.pow(u,2)*t,p=Math.exp(-d),x=mn(Math.pow(u,2),r);return(-i(u)+fn>0?-1:1)*((h-f)*p)/x}):(i=u=>{const c=Math.exp(-u*t),d=(u-n)*t+1;return-fn+c*d},o=u=>{const c=Math.exp(-u*t),d=(n-u)*(t*t);return c*d});const a=5/t,l=hl(i,o,a);if(t=rt(t),isNaN(l))return{stiffness:z.stiffness,damping:z.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const dl=12;function hl(t,e,n){let s=n;for(let i=1;i<dl;i++)s=s-t(s)/e(s);return s}function mn(t,e){return t*Math.sqrt(1-e*e)}const fl=["duration","bounce"],ml=["stiffness","damping","mass"];function mi(t,e){return e.some(n=>t[n]!==void 0)}function pl(t){let e={velocity:z.velocity,stiffness:z.stiffness,damping:z.damping,mass:z.mass,isResolvedFromDuration:!1,...t};if(!mi(t,ml)&&mi(t,fl))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*dt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:z.mass,stiffness:i,damping:o}}else{const n=ul(t);e={...e,...n,mass:z.mass},e.isResolvedFromDuration=!0}return e}function Ce(t=z.visualDuration,e=z.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;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}=pl({...n,velocity:-nt(n.velocity||0)}),p=h||0,x=u/(2*Math.sqrt(l*c)),b=r-o,v=nt(Math.sqrt(l/c)),P=Math.abs(b)<5;s||(s=P?z.restSpeed.granular:z.restSpeed.default),i||(i=P?z.restDelta.granular:z.restDelta.default);let w;if(x<1){const C=mn(v,x);w=E=>{const D=Math.exp(-x*v*E);return r-D*((p+x*v*b)/C*Math.sin(C*E)+b*Math.cos(C*E))}}else if(x===1)w=C=>r-Math.exp(-v*C)*(b+(p+v*b)*C);else{const C=v*Math.sqrt(x*x-1);w=E=>{const D=Math.exp(-x*v*E),g=Math.min(C*E,300);return r-D*((p+x*v*b)*Math.sinh(g)+C*b*Math.cosh(g))/C}}const M={calculatedDuration:f&&d||null,next:C=>{const E=w(C);if(f)a.done=C>=d;else{let D=C===0?p:0;x<1&&(D=C===0?rt(p):fi(w,C,E));const g=Math.abs(D)<=s,I=Math.abs(r-E)<=i;a.done=g&&I}return a.value=a.done?r:E,a},toString:()=>{const C=Math.min(hn(M),ke),E=hi(D=>M.next(C*D).value,C,30);return C+"ms "+E},toTransition:()=>{}};return M}Ce.applyToOptions=t=>{const e=ll(t,100,Ce);return t.ease=e.ease,t.duration=rt(e.duration),t.type="keyframes",t};function pn({keyframes:t,velocity:e=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=t[0],h={done:!1,value:d},f=g=>a!==void 0&&g<a||l!==void 0&&g>l,p=g=>a===void 0?l:l===void 0||Math.abs(a-g)<Math.abs(l-g)?a:l;let x=n*e;const b=d+x,v=r===void 0?b:r(b);v!==b&&(x=v-d);const P=g=>-x*Math.exp(-g/s),w=g=>v+P(g),M=g=>{const I=P(g),U=w(g);h.done=Math.abs(I)<=u,h.value=h.done?v:U};let C,E;const D=g=>{f(h.value)&&(C=g,E=Ce({keyframes:[h.value,p(h.value)],velocity:fi(w,g,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return D(0),{calculatedDuration:null,next:g=>{let I=!1;return!E&&C===void 0&&(I=!0,M(g),D(g)),C!==void 0&&g>=C?E.next(g-C):(!I&&M(g),h)}}}function gl(t,e,n){const s=[],i=n||ft.mix||di,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||et:e;a=te(l,a)}s.push(a)}return s}function yl(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(ht(o===e.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=gl(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(c<t[d+1]);d++);const h=ee(t[d],t[d+1],c);return a[d](h)};return n?c=>u(dt(t[0],t[o-1],c)):u}function xl(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=ee(0,e,s);t.push(_(n,1,i))}}function bl(t){const e=[0];return xl(e,t.length-1),e}function vl(t,e){return t.map(n=>n*e)}function wl(t,e){return t.map(()=>e||Hs).splice(0,t.length-1)}function Bt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=ja(s)?s.map(Zs):Zs(s),o={done:!1,value:e[0]},r=vl(n&&n.length===e.length?n:bl(e),t),a=yl(r,e,{ease:Array.isArray(i)?i:wl(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Tl=t=>t!==null;function gn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Tl),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Pl={decay:pn,inertia:pn,tween:Bt,keyframes:Bt,spring:Ce};function pi(t){typeof t.type=="string"&&(t.type=Pl[t.type])}class yn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Sl=t=>t/100;class xn extends yn{constructor(e){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!==q.now()&&this.tick(q.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;pi(e);const{type:n=Bt,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||Bt;process.env.NODE_ENV!=="production"&&l!==Bt&&ht(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Bt&&typeof a[0]!="number"&&(this.mixKeyframes=te(Sl,di(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=hn(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,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:x,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),P=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,M=s;if(d){const g=Math.min(this.currentTime,i)/a;let I=Math.floor(g),U=g%1;!U&&g>=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"&&(M=r)),w=dt(0,1,U)*a}const C=P?{done:!1,value:c[0]}:M.next(w);o&&(C.value=o(C.value));let{done:E}=C;!P&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return D&&p!==pn&&(C.value=gn(c,this.options,b,this.speed)),x&&x(C.value),D&&this.finish(),C}then(e,n){return this.finished.then(e,n)}get duration(){return nt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+nt(e)}get time(){return nt(this.currentTime)}set time(e){e=rt(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(q.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=nt(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=al,startTime:n}=this.options;this.driver||(this.driver=e(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(q.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(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Al(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const At=t=>t*180/Math.PI,bn=t=>{const e=At(Math.atan2(t[1],t[0]));return vn(e)},kl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:bn,rotateZ:bn,skewX:t=>At(Math.atan(t[1])),skewY:t=>At(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},vn=t=>(t=t%360,t<0&&(t+=360),t),gi=bn,yi=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),xi=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Cl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yi,scaleY:xi,scale:t=>(yi(t)+xi(t))/2,rotateX:t=>vn(At(Math.atan2(t[6],t[5]))),rotateY:t=>vn(At(Math.atan2(-t[2],t[0]))),rotateZ:gi,rotate:gi,skewX:t=>At(Math.atan(t[4])),skewY:t=>At(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function wn(t){return t.includes("scale")?1:0}function Tn(t,e){if(!t||t==="none")return wn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Cl,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=kl,i=a}if(!i)return wn(e);const o=s[e],r=i[1].split(",").map(El);return typeof o=="function"?o(r):r[o]}const Vl=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Tn(n,e)};function El(t){return parseFloat(t.trim())}const _t=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zt=new Set(_t),bi=t=>t===It||t===V,Ml=new Set(["x","y","z"]),Dl=_t.filter(t=>!Ml.has(t));function Rl(t){const e=[];return Dl.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const kt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Tn(e,"x"),y:(t,{transform:e})=>Tn(e,"y")};kt.translateX=kt.x,kt.translateY=kt.y;const Ct=new Set;let Pn=!1,Sn=!1,An=!1;function vi(){if(Sn){const t=Array.from(Ct).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Rl(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Sn=!1,Pn=!1,Ct.forEach(t=>t.complete(An)),Ct.clear()}function wi(){Ct.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Sn=!0)})}function jl(){An=!0,wi(),vi(),An=!1}class kn{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Ct.add(this),Pn||(Pn=!0,B.read(wi),B.resolveKeyframes(vi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Al(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ct.delete(this)}cancel(){this.state==="scheduled"&&(Ct.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ll=t=>t.startsWith("--");function Nl(t,e,n){Ll(e)?t.style.setProperty(e,n):t.style[e]=n}const Ol=qe(()=>window.ScrollTimeline!==void 0),Il={};function Fl(t,e){const n=qe(t);return()=>Il[e]??n()}const Ti=Fl(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ae=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Pi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ae([0,.65,.55,1]),circOut:ae([.55,0,1,.45]),backIn:ae([.31,.01,.66,-.59]),backOut:ae([.33,1.53,.69,.99])};function Si(t,e){if(t)return typeof t=="function"?Ti()?hi(t,e):"ease-out":Xs(t)?ae(t):Array.isArray(t)?t.map(n=>Si(n,e)||Pi.easeOut):Pi[t]}function Bl(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const d=Si(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),t.animate(c,h)}function Ai(t){return typeof t=="function"&&"applyToOptions"in t}function _l({type:t,...e}){return Ai(t)&&Ti()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class zl extends yn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,ht(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=_l(e);this.animation=Bl(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=gn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Nl(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:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return nt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+nt(e)}get time(){return nt(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=rt(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Ol()?(this.animation.timeline=e,et):n(this)}}const ki={anticipate:Gs,backInOut:Ws,circInOut:Ys};function $l(t){return t in ki}function Ul(t){typeof t.ease=="string"&&$l(t.ease)&&(t.ease=ki[t.ease])}const Ci=10;class Wl extends zl{constructor(e){Ul(e),pi(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new xn({...r,autoplay:!1}),l=rt(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Ci).value,a.sample(l).value,Ci),a.stop()}}const Vi=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(bt.test(t)||t==="0")&&!t.startsWith("url("));function Gl(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Kl(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Vi(i,e),a=Vi(o,e);return Ot(r===a,`You are trying to animate ${e} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:Gl(t)||(n==="spring"||Ai(n))&&s}function Cn(t){t.duration=0,t.type="keyframes"}const Yl=new Set(["opacity","clipPath","filter","transform"]),Hl=qe(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Xl(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return Hl()&&n&&Yl.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const ql=40;class Zl extends yn{constructor({autoplay:e=!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=q.now();const h={autoplay:e,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,x,b)=>this.onKeyframesResolved(p,x,h,!b),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=q.now(),Kl(e,o,r,a)||((ft.instantAnimations||!l)&&c?.(gn(e,s,n)),e[0]=e[e.length-1],Cn(s),s.repeat=0);const h={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ql?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},f=!u&&Xl(h)?new Wl({...h,element:h.motionValue.owner.current}):new xn(h);f.finished.then(()=>this.notifyFinished()).catch(et),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(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),jl()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Jl=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ql(t){const e=Jl.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const tc=4;function Ei(t,e,n=1){ht(n<=tc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=Ql(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Ns(r)?parseFloat(r):r}return nn(i)?Ei(i,e,n+1):i}function Vn(t,e){return t?.[e]??t?.default??t}const Mi=new Set(["width","height","top","left","right","bottom",..._t]),ec={test:t=>t==="auto",parse:t=>t},Di=t=>e=>e.test(t),Ri=[It,V,ct,xt,Ga,Wa,ec],ji=t=>Ri.find(Di(t));function nc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Is(t):!0}const sc=new Set(["brightness","contrast","saturate","opacity"]);function ic(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(sn)||[];if(!s)return t;const i=n.replace(s,"");let o=sc.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const rc=/\b([a-z-]*)\(.*?\)/gu,En={...bt,getAnimatableNone:t=>{const e=t.match(rc);return e?e.map(ic).join(" "):t}},Li={...It,transform:Math.round},Mn={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,radius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,backgroundPositionX:V,backgroundPositionY:V,...{rotate:xt,rotateX:xt,rotateY:xt,rotateZ:xt,scale:Se,scaleX:Se,scaleY:Se,scaleZ:Se,skew:xt,skewX:xt,skewY:xt,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:se,originX:ni,originY:ni,originZ:V},zIndex:Li,fillOpacity:se,strokeOpacity:se,numOctaves:Li},oc={...Mn,color:$,backgroundColor:$,outlineColor:$,fill:$,stroke:$,borderColor:$,borderTopColor:$,borderRightColor:$,borderBottomColor:$,borderLeftColor:$,filter:En,WebkitFilter:En},Ni=t=>oc[t];function Oi(t,e){let n=Ni(t);return n!==En&&(n=bt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ac=new Set(["auto","none","0"]);function lc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!ac.has(o)&&oe(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Oi(n,i)}class cc extends kn{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),nn(u))){const c=Ei(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Mi.has(s)||e.length!==2)return;const[i,o]=e,r=ji(i),a=ji(o);if(r!==a)if(bi(r)&&bi(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else kt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||nc(e[i]))&&s.push(i);s.length&&lc(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=kt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=kt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function uc(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Ii=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Fi(t){return Os(t)&&"offsetHeight"in t}const Bi=30,dc=t=>!isNaN(parseFloat(t));class hc{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=q.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(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=q.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=dc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Je(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Ze);const s=this.events[e].add(n);return e==="change"?()=>{s(),B.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Bi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Bi);return Fs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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 $t(t,e){return new hc(t,e)}const{schedule:Dn}=Js(queueMicrotask,!1),ot={x:!1,y:!1};function _i(){return ot.x||ot.y}function fc(t){return t==="x"||t==="y"?ot[t]?null:(ot[t]=!0,()=>{ot[t]=!1}):ot.x||ot.y?null:(ot.x=ot.y=!0,()=>{ot.x=ot.y=!1})}function zi(t,e){const n=uc(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function $i(t){return!(t.pointerType==="touch"||_i())}function mc(t,e,n={}){const[s,i,o]=zi(t,n),r=a=>{if(!$i(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=d=>{$i(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const Ui=(t,e)=>e?t===e?!0:Ui(t,e.parentElement):!1,Rn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,pc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function gc(t){return pc.has(t.tagName)||t.tabIndex!==-1}const Ve=new WeakSet;function Wi(t){return e=>{e.key==="Enter"&&t(e)}}function jn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const yc=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Wi(()=>{if(Ve.has(n))return;jn(n,"down");const i=Wi(()=>{jn(n,"up")}),o=()=>jn(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Gi(t){return Rn(t)&&!_i()}function xc(t,e,n={}){const[s,i,o]=zi(t,n),r=a=>{const l=a.currentTarget;if(!Gi(a))return;Ve.add(l);const u=e(l,a),c=(f,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),Ve.has(l)&&Ve.delete(l),Gi(f)&&typeof u=="function"&&u(f,{success:p})},d=f=>{c(f,l===window||l===document||n.useGlobalTarget||Ui(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),Fi(a)&&(a.addEventListener("focus",u=>yc(u,i)),!gc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Ki(t){return Os(t)&&"ownerSVGElement"in t}function bc(t){return Ki(t)&&t.tagName==="svg"}const Y=t=>!!(t&&t.getVelocity),vc=[...Ri,$,bt],wc=t=>vc.find(Di(t)),Ln=T.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Yi(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Tc(...t){return e=>{let n=!1;const s=t.map(i=>{const o=Yi(i,e);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():Yi(t[i],null)}}}}function Pc(...t){return ge.useCallback(Tc(...t),t)}class Sc extends ge.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=Fi(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 Ac({children:t,isPresent:e,anchorX:n,root:s}){const i=T.useId(),o=T.useRef(null),r=T.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=T.useContext(Ln),l=Pc(o,t?.ref);return T.useInsertionEffect(()=>{const{width:u,height:c,top:d,left:h,right:f}=r.current;if(e||!o.current||!u||!c)return;const p=n==="left"?`left: ${h}`:`right: ${f}`;o.current.dataset.motionPopId=i;const x=document.createElement("style");a&&(x.nonce=a);const b=s??document.head;return b.appendChild(x),x.sheet&&x.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
+ `),()=>{b.contains(x)&&b.removeChild(x)}},[e]),y.jsx(Sc,{isPresent:e,childRef:o,sizeRef:r,children:ge.cloneElement(t,{ref:l})})}const kc=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const u=Ge(Cc),c=T.useId();let d=!0,h=T.useMemo(()=>(d=!1,{id:c,initial:e,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}),T.useMemo(()=>{u.forEach((f,p)=>u.set(p,!1))},[n]),ge.useEffect(()=>{!n&&!u.size&&s&&s()},[n]),r==="popLayout"&&(t=y.jsx(Ac,{isPresent:n,anchorX:a,root:l,children:t})),y.jsx(we.Provider,{value:h,children:t})};function Cc(){return new Map}function Hi(t=!0){const e=T.useContext(we);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=T.useId();T.useEffect(()=>{if(t)return i(o)},[t]);const r=T.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const Ee=t=>t.key||"";function Xi(t){const e=[];return T.Children.forEach(t,n=>{T.isValidElement(n)&&e.push(n)}),e}const Nn=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=Hi(r),d=T.useMemo(()=>Xi(t),[t]),h=r&&!u?[]:d.map(Ee),f=T.useRef(!0),p=T.useRef(d),x=Ge(()=>new Map),[b,v]=T.useState(d),[P,w]=T.useState(d);Ls(()=>{f.current=!1,p.current=d;for(let E=0;E<P.length;E++){const D=Ee(P[E]);h.includes(D)?x.delete(D):x.get(D)!==!0&&x.set(D,!1)}},[P,h.length,h.join("-")]);const M=[];if(d!==b){let E=[...d];for(let D=0;D<P.length;D++){const g=P[D],I=Ee(g);h.includes(I)||(E.splice(D,0,g),M.push(g))}return o==="wait"&&M.length&&(E=M),w(Xi(E)),v(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&P.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}=T.useContext(We);return y.jsx(y.Fragment,{children:P.map(E=>{const D=Ee(E),g=r&&!u?!1:d===P||h.includes(D),I=()=>{if(x.has(D))x.set(D,!0);else return;let U=!0;x.forEach(Z=>{Z||(U=!1)}),U&&(C?.(),w(p.current),r&&c?.(),s&&s())};return y.jsx(kc,{isPresent:g,initial:!f.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:g?void 0:I,anchorX:a,children:E},D)})})},qi=T.createContext({strict:!1}),Zi={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"]},Ut={};for(const t in Zi)Ut[t]={isEnabled:e=>Zi[t].some(n=>!!e[n])};function Vc(t){for(const e in t)Ut[e]={...Ut[e],...t[e]}}const Ec=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 Me(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Ec.has(t)}let Ji=t=>!Me(t);function Mc(t){typeof t=="function"&&(Ji=e=>e.startsWith("on")?!Me(e):t(e))}try{Mc(require("@emotion/is-prop-valid").default)}catch{}function Dc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ji(i)||n===!0&&Me(i)||!e&&!Me(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const De=T.createContext({});function Re(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function le(t){return typeof t=="string"||Array.isArray(t)}const On=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],In=["initial",...On];function je(t){return Re(t.animate)||In.some(e=>le(t[e]))}function Qi(t){return!!(je(t)||t.variants)}function Rc(t,e){if(je(t)){const{initial:n,animate:s}=t;return{initial:n===!1||le(n)?n:void 0,animate:le(s)?s:void 0}}return t.inherit!==!1?e:{}}function jc(t){const{initial:e,animate:n}=Rc(t,T.useContext(De));return T.useMemo(()=>({initial:e,animate:n}),[tr(e),tr(n)])}function tr(t){return Array.isArray(t)?t.join(" "):t}function er(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ce={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(V.test(t))t=parseFloat(t);else return t;const n=er(t,e.target.x),s=er(t,e.target.y);return`${n}% ${s}%`}},Lc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=bt.parse(t);if(i.length>5)return s;const o=bt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=_(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}},Fn={borderRadius:{...ce,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ce,borderTopRightRadius:ce,borderBottomLeftRadius:ce,borderBottomRightRadius:ce,boxShadow:Lc};function nr(t,{layout:e,layoutId:n}){return zt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Fn[t]||t==="opacity")}const Nc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Oc=_t.length;function Ic(t,e,n){let s="",i=!0;for(let o=0;o<Oc;o++){const r=_t[o],a=t[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=Ii(a,Mn[r]);if(!l){i=!1;const c=Nc[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Bn(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(zt.has(l)){r=!0;continue}else if(ti(l)){i[l]=u;continue}else{const c=Ii(u,Mn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=Ic(e,t.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 _n=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sr(t,e,n){for(const s in e)!Y(e[s])&&!nr(s,n)&&(t[s]=e[s])}function Fc({transformTemplate:t},e){return T.useMemo(()=>{const n=_n();return Bn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Bc(t,e){const n=t.style||{},s={};return sr(s,n,t),Object.assign(s,Fc(t,e)),s}function _c(t,e){const n={},s=Bc(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const zc={offset:"stroke-dashoffset",array:"stroke-dasharray"},$c={offset:"strokeDashoffset",array:"strokeDasharray"};function Uc(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?zc:$c;t[o.offset]=V.transform(-s);const r=V.transform(e),a=V.transform(n);t[o.array]=`${r} ${a}`}function ir(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(Bn(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h}=t;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),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&Uc(d,i,o,r,!1)}const rr=()=>({..._n(),attrs:{}}),or=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Wc(t,e,n,s){const i=T.useMemo(()=>{const o=rr();return ir(o,e,or(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};sr(o,t.style,t),i.style={...o,...i.style}}return i}const Gc=["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 zn(t){return typeof t!="string"||t.includes("-")?!1:!!(Gc.indexOf(t)>-1||/[A-Z]/u.test(t))}function Kc(t,e,n,{latestValues:s},i,o=!1){const a=(zn(t)?Wc:_c)(e,s,i,t),l=Dc(e,typeof t=="string",o),u=t!==T.Fragment?{...l,...a,ref:n}:{},{children:c}=e,d=T.useMemo(()=>Y(c)?c.get():c,[c]);return T.createElement(t,{...u,children:d})}function ar(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function $n(t,e,n,s){if(typeof e=="function"){const[i,o]=ar(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=ar(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Le(t){return Y(t)?t.get():t}function Yc({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Hc(n,s,i,t),renderState:e()}}function Hc(t,e,n,s){const i={},o=s(t,{});for(const h in o)i[h]=Le(o[h]);let{initial:r,animate:a}=t;const l=je(t),u=Qi(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const d=c?a:r;if(d&&typeof d!="boolean"&&!Re(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const p=$n(t,h[f]);if(p){const{transitionEnd:x,transition:b,...v}=p;for(const P in v){let w=v[P];if(Array.isArray(w)){const M=c?w.length-1:0;w=w[M]}w!==null&&(i[P]=w)}for(const P in x)i[P]=x[P]}}}return i}const lr=t=>(e,n)=>{const s=T.useContext(De),i=T.useContext(we),o=()=>Yc(t,e,s,i);return n?o():Ge(o)};function Un(t,e,n){const{style:s}=t,i={};for(const o in s)(Y(s[o])||e.style&&Y(e.style[o])||nr(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const Xc=lr({scrapeMotionValuesFromProps:Un,createRenderState:_n});function cr(t,e,n){const s=Un(t,e,n);for(const i in t)if(Y(t[i])||Y(e[i])){const o=_t.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const qc=lr({scrapeMotionValuesFromProps:cr,createRenderState:rr}),Zc=Symbol.for("motionComponentSymbol");function Wt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Jc(t,e,n){return T.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Wt(n)&&(n.current=s))},[e])}const Wn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ur="data-"+Wn("framerAppearId"),dr=T.createContext({});function Qc(t,e,n,s,i){const{visualElement:o}=T.useContext(De),r=T.useContext(qi),a=T.useContext(we),l=T.useContext(Ln).reducedMotion,u=T.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=T.useContext(dr);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&tu(u.current,n,i,d);const h=T.useRef(!1);T.useInsertionEffect(()=>{c&&h.current&&c.update(n,a)});const f=n[ur],p=T.useRef(!!f&&!window.MotionHandoffIsComplete?.(f)&&window.MotionHasOptimisedAnimation?.(f));return Ls(()=>{c&&(h.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),p.current&&c.animationState&&c.animationState.animateChanges())}),T.useEffect(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(f)}),p.current=!1),c.enteringChildren=void 0)}),c}function tu(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:hr(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Wt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function hr(t){if(t)return t.options.allowProjection!==!1?t.projection:hr(t.parent)}function Gn(t,{forwardMotionProps:e=!1}={},n,s){n&&Vc(n);const i=zn(t)?qc:Xc;function o(a,l){let u;const c={...T.useContext(Ln),...a,layoutId:eu(a)},{isStatic:d}=c,h=jc(a),f=i(a,d);if(!d&&Ke){nu(c,n);const p=su(c);u=p.MeasureLayout,h.visualElement=Qc(t,f,c,s,p.ProjectionNode)}return y.jsxs(De.Provider,{value:h,children:[u&&h.visualElement?y.jsx(u,{visualElement:h.visualElement,...c}):null,Kc(t,a,Jc(f,h.visualElement,l),f,d,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=T.forwardRef(o);return r[Zc]=t,r}function eu({layoutId:t}){const e=T.useContext(We).id;return e&&t!==void 0?e+"-"+t:t}function nu(t,e){const n=T.useContext(qi).strict;if(process.env.NODE_ENV!=="production"&&e&&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.";t.ignoreStrict?Ot(!1,s,"lazy-strict-mode"):ht(!1,s,"lazy-strict-mode")}}function su(t){const{drag:e,layout:n}=Ut;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function iu(t,e){if(typeof Proxy>"u")return Gn;const n=new Map,s=(o,r)=>Gn(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&Je(!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,Gn(r,void 0,t,e)),n.get(r))})}function fr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ru({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ou(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Kn(t){return t===void 0||t===1}function Yn({scale:t,scaleX:e,scaleY:n}){return!Kn(t)||!Kn(e)||!Kn(n)}function Vt(t){return Yn(t)||mr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function mr(t){return pr(t.x)||pr(t.y)}function pr(t){return t&&t!=="0%"}function Ne(t,e,n){const s=t-n,i=e*s;return n+i}function gr(t,e,n,s,i){return i!==void 0&&(t=Ne(t,i,s)),Ne(t,n,s)+e}function Hn(t,e=0,n=1,s,i){t.min=gr(t.min,e,n,s,i),t.max=gr(t.max,e,n,s,i)}function yr(t,{x:e,y:n}){Hn(t.x,e.translate,e.scale,e.originPoint),Hn(t.y,n.translate,n.scale,n.originPoint)}const xr=.999999999999,br=1.0000000000001;function au(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.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&&Kt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,yr(t,r)),s&&Vt(o.latestValues)&&Kt(t,o.latestValues))}e.x<br&&e.x>xr&&(e.x=1),e.y<br&&e.y>xr&&(e.y=1)}function Gt(t,e){t.min=t.min+e,t.max=t.max+e}function vr(t,e,n,s,i=.5){const o=_(t.min,t.max,i);Hn(t,e,n,o,s)}function Kt(t,e){vr(t.x,e.x,e.scaleX,e.scale,e.originX),vr(t.y,e.y,e.scaleY,e.scale,e.originY)}function wr(t,e){return fr(ou(t.getBoundingClientRect(),e))}function lu(t,e,n){const s=wr(t,n),{scroll:i}=e;return i&&(Gt(s.x,i.offset.x),Gt(s.y,i.offset.y)),s}const Tr=()=>({translate:0,scale:1,origin:0,originPoint:0}),Yt=()=>({x:Tr(),y:Tr()}),Pr=()=>({min:0,max:0}),G=()=>({x:Pr(),y:Pr()}),Xn={current:null},Sr={current:!1};function cu(){if(Sr.current=!0,!!Ke)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Xn.current=t.matches;t.addEventListener("change",e),e()}else Xn.current=!1}const uu=new WeakMap;function du(t,e,n){for(const s in e){const i=e[s],o=n[s];if(Y(i))t.addValue(s,i);else if(Y(o))t.addValue(s,$t(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,$t(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Ar=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class hu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,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=q.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,B.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=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=je(n),this.isVariantNode=Qi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.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(e){this.current=e,uu.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Sr.current||cu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xn.current,process.env.NODE_ENV!=="production"&&Je(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(),yt(this.notifyUpdate),yt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=zt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&B.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ut){const n=Ut[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];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):G()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Ar.length;s++){const i=Ar[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=du(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=$t(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ns(s)||Is(s))?s=parseFloat(s):!wc(s)&&bt.test(n)&&(s=Oi(e,n)),this.setBaseTarget(e,Y(s)?s.get():s)),Y(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=$n(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!Y(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Ze),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Dn.render(this.render)}}class kr extends hu{constructor(){super(...arguments),this.KeyframeResolver=cc}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Y(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Cr(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function fu(t){return window.getComputedStyle(t)}class mu extends kr{constructor(){super(...arguments),this.type="html",this.renderInstance=Cr}readValueFromInstance(e,n){if(zt.has(n))return this.projection?.isProjecting?wn(n):Vl(e,n);{const s=fu(e),i=(ti(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return wr(e,n)}build(e,n,s){Bn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Un(e,n,s)}}const Vr=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 pu(t,e,n,s){Cr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Vr.has(i)?i:Wn(i),e.attrs[i])}class gu extends kr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=G}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(zt.has(n)){const s=Ni(n);return s&&s.default||0}return n=Vr.has(n)?n:Wn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return cr(e,n,s)}build(e,n,s){ir(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){pu(e,n,s,i)}mount(e){this.isSVGTag=or(e.tagName),super.mount(e)}}const yu=(t,e)=>zn(t)?new gu(e):new mu(e,{allowProjection:t!==T.Fragment});function Ht(t,e,n){const s=t.getProps();return $n(s,e,n!==void 0?n:s.custom,t)}const qn=t=>Array.isArray(t);function xu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,$t(n))}function bu(t){return qn(t)?t[t.length-1]||0:t}function vu(t,e){const n=Ht(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=bu(o[r]);xu(t,r,a)}}function wu(t){return!!(Y(t)&&t.add)}function Zn(t,e){const n=t.getValue("willChange");if(wu(n))return n.add(e);if(!n&&ft.WillChange){const s=new ft.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Er(t){return t.props[ur]}const Tu=t=>t!==null;function Pu(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Tu),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Su={type:"spring",stiffness:500,damping:25,restSpeed:10},Au=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ku={type:"keyframes",duration:.8},Cu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vu=(t,{keyframes:e})=>e.length>2?ku:zt.has(t)?t.startsWith("scale")?Au(e[1]):Su:Cu;function Eu({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Jn=(t,e,n,s={},i,o)=>r=>{const a=Vn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-rt(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Eu(a)||Object.assign(c,Vu(t,c)),c.duration&&(c.duration=rt(c.duration)),c.repeatDelay&&(c.repeatDelay=rt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Cn(c),c.delay===0&&(d=!0)),(ft.instantAnimations||ft.skipAnimations)&&(d=!0,Cn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!o&&e.get()!==void 0){const h=Pu(c.keyframes,a);if(h!==void 0){B.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new xn(c):new Zl(c)};function Mu({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Mr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const d=t.getValue(c,t.latestValues[c]??null),h=a[c];if(h===void 0||u&&Mu(u,c))continue;const f={delay:n,...Vn(o||{},c)},p=d.get();if(p!==void 0&&!d.isAnimating&&!Array.isArray(h)&&h===p&&!f.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const v=Er(t);if(v){const P=window.MotionHandoffAnimation(v,c,B);P!==null&&(f.startTime=P,x=!0)}}Zn(t,c),d.start(Jn(c,d,h,t.shouldReduceMotion&&Mi.has(c)?{type:!1}:f,t,x));const b=d.animation;b&&l.push(b)}return r&&Promise.all(l).then(()=>{B.update(()=>{r&&vu(t,r)})}),l}function Dr(t,e,n,s=0,i=1){const o=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function Qn(t,e,n={}){const s=Ht(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Mr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=i;return Du(t,e,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 Du(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Qn(l,e,{...r,delay:n+(typeof s=="function"?0:s)+Dr(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Ru(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Qn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Qn(t,e,n);else{const i=typeof e=="function"?Ht(t,e,n.custom):e;s=Promise.all(Mr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Rr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const ju=In.length;function jr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?jr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<ju;n++){const s=In[n],i=t.props[s];(le(i)||i===!1)&&(e[s]=i)}return e}const Lu=[...On].reverse(),Nu=On.length;function Ou(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Ru(t,n,s)))}function Iu(t){let e=Ou(t),n=Lr(),s=!0;const i=l=>(u,c)=>{const d=Ht(t,c,l==="exit"?t.presenceContext?.custom:void 0);if(d){const{transition:h,transitionEnd:f,...p}=d;u={...u,...p,...f}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=jr(t.parent)||{},d=[],h=new Set;let f={},p=1/0;for(let b=0;b<Nu;b++){const v=Lu[b],P=n[v],w=u[v]!==void 0?u[v]:c[v],M=le(w),C=v===l?P.isActive:null;C===!1&&(p=b);let E=w===c[v]&&w!==u[v]&&M;if(E&&s&&t.manuallyAnimateOnMount&&(E=!1),P.protectedKeys={...f},!P.isActive&&C===null||!w&&!P.prevProp||Re(w)||typeof w=="boolean")continue;const D=Fu(P.prevProp,w);let g=D||v===l&&P.isActive&&!E&&M||b>p&&M,I=!1;const U=Array.isArray(w)?w:[w];let Z=U.reduce(i(v),{});C===!1&&(Z={});const{prevResolvedValues:lt={}}=P,Mt={...lt,...Z},wt=F=>{g=!0,h.has(F)&&(I=!0,h.delete(F)),P.needsAnimating[F]=!0;const k=t.getValue(F);k&&(k.liveStyle=!1)};for(const F in Mt){const k=Z[F],tt=lt[F];if(f.hasOwnProperty(F))continue;let it=!1;qn(k)&&qn(tt)?it=!Rr(k,tt):it=k!==tt,it?k!=null?wt(F):h.add(F):k!==void 0&&h.has(F)?wt(F):P.protectedKeys[F]=!0}P.prevProp=w,P.prevResolvedValues=Z,P.isActive&&(f={...f,...Z}),s&&t.blockInitialAnimation&&(g=!1);const J=E&&D;g&&(!J||I)&&d.push(...U.map(F=>{const k={type:v};if(typeof F=="string"&&s&&!J&&t.manuallyAnimateOnMount&&t.parent){const{parent:tt}=t,it=Ht(tt,F);if(tt.enteringChildren&&it){const{delayChildren:m}=it.transition||{};k.delay=Dr(tt.enteringChildren,t,m)}}return{animation:F,options:k}}))}if(h.size){const b={};if(typeof u.initial!="boolean"){const v=Ht(t,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(b.transition=v.transition)}h.forEach(v=>{const P=t.getBaseTarget(v),w=t.getValue(v);w&&(w.liveStyle=!0),b[v]=P??null}),d.push({animation:b})}let x=!!d.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(x=!1),s=!1,x?e(d):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();t.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=Lr()}}}function Fu(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Rr(e,t):!1}function Et(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Lr(){return{animate:Et(!0),whileInView:Et(),whileHover:Et(),whileTap:Et(),whileDrag:Et(),whileFocus:Et(),exit:Et()}}class vt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Bu extends vt{constructor(e){super(e),e.animationState||(e.animationState=Iu(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Re(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let _u=0;class zu extends vt{constructor(){super(...arguments),this.id=_u++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const $u={animation:{Feature:Bu},exit:{Feature:zu}};function ue(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function de(t){return{point:{x:t.pageX,y:t.pageY}}}const Uu=t=>e=>Rn(e)&&t(e,de(e));function he(t,e,n,s){return ue(t,e,Uu(n),s)}const Nr=1e-4,Wu=1-Nr,Gu=1+Nr,Or=.01,Ku=0-Or,Yu=0+Or;function H(t){return t.max-t.min}function Hu(t,e,n){return Math.abs(t-e)<=n}function Ir(t,e,n,s=.5){t.origin=s,t.originPoint=_(e.min,e.max,t.origin),t.scale=H(n)/H(e),t.translate=_(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Wu&&t.scale<=Gu||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ku&&t.translate<=Yu||isNaN(t.translate))&&(t.translate=0)}function fe(t,e,n,s){Ir(t.x,e.x,n.x,s?s.originX:void 0),Ir(t.y,e.y,n.y,s?s.originY:void 0)}function Fr(t,e,n){t.min=n.min+e.min,t.max=t.min+H(e)}function Xu(t,e,n){Fr(t.x,e.x,n.x),Fr(t.y,e.y,n.y)}function Br(t,e,n){t.min=e.min-n.min,t.max=t.min+H(e)}function Oe(t,e,n){Br(t.x,e.x,n.x),Br(t.y,e.y,n.y)}function st(t){return[t("x"),t("y")]}const _r=({current:t})=>t?t.ownerDocument.defaultView:null,zr=(t,e)=>Math.abs(t-e);function qu(t,e){const n=zr(t.x,e.x),s=zr(t.y,e.y);return Math.sqrt(n**2+s**2)}class $r{constructor(e,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=es(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=qu(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!f&&!p)return;const{point:x}=h,{timestamp:b}=K;this.history.push({...x,timestamp:b});const{onStart:v,onMove:P}=this.handlers;f||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),P&&P(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ts(f,this.transformPagePoint),B.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:p,onSessionEnd:x,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=es(h.type==="pointercancel"?this.lastMoveEventInfo:ts(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(h,v),x&&x(h,v)},!Rn(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=de(e),l=ts(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=K;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(e,es(l,this.history)),this.removeListeners=te(he(this.contextWindow,"pointermove",this.handlePointerMove),he(this.contextWindow,"pointerup",this.handlePointerUp),he(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),yt(this.updatePoint)}}function ts(t,e){return e?{point:e(t.point)}:t}function Ur(t,e){return{x:t.x-e.x,y:t.y-e.y}}function es({point:t},e){return{point:t,delta:Ur(t,Wr(e)),offset:Ur(t,Zu(e)),velocity:Ju(e,.1)}}function Zu(t){return t[0]}function Wr(t){return t[t.length-1]}function Ju(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Wr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>rt(e)));)n--;if(!s)return{x:0,y:0};const o=nt(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 Qu(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?_(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?_(n,t,s.max):Math.min(t,n)),t}function Gr(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function td(t,{top:e,left:n,bottom:s,right:i}){return{x:Gr(t.x,n,i),y:Gr(t.y,e,s)}}function Kr(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function ed(t,e){return{x:Kr(t.x,e.x),y:Kr(t.y,e.y)}}function nd(t,e){let n=.5;const s=H(t),i=H(e);return i>s?n=ee(e.min,e.max-s,t.min):s>i&&(n=ee(t.min,t.max-i,e.min)),dt(0,1,n)}function sd(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const ns=.35;function id(t=ns){return t===!1?t=0:t===!0&&(t=ns),{x:Yr(t,"left","right"),y:Yr(t,"top","bottom")}}function Yr(t,e,n){return{min:Hr(t,e),max:Hr(t,n)}}function Hr(t,e){return typeof t=="number"?t:t[e]||0}const rd=new WeakMap;class od{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=G(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{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(de(d).point)},r=(d,h)=>{const{drag:f,dragPropagation:p,onDragStart:x}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=fc(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),st(v=>{let P=this.getAxisMotionValue(v).get()||0;if(ct.test(P)){const{projection:w}=this.visualElement;if(w&&w.layout){const M=w.layout.layoutBox[v];M&&(P=H(M)*(parseFloat(P)/100))}}this.originPoint[v]=P}),x&&B.postRender(()=>x(d,h)),Zn(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:x,onDrag:b}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=h;if(p&&this.currentDirection===null){this.currentDirection=ad(v),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),b&&b(d,h)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>st(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new $r(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:_r(this.visualElement)})}stop(e,n){const s=e||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&&B.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.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(e,n,s){const{drag:i}=this.getProps();if(!s||!Ie(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Qu(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&Wt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=td(s.layoutBox,e):this.constraints=!1,this.elastic=id(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&st(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=sd(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Wt(e))return!1;const s=e.current;ht(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=lu(s,i.root,this.visualElement.getTransformPagePoint());let r=ed(i.layout.layoutBox,o);if(n){const a=n(ru(r));this.hasMutatedConstraints=!!a,a&&(r=fr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=st(c=>{if(!Ie(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?e[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(e,n){const s=this.getAxisMotionValue(e);return Zn(this.visualElement,e),s.start(Jn(e,s,0,n,this.visualElement,!1))}stopAnimation(){st(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){st(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){st(n=>{const{drag:s}=this.getProps();if(!Ie(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(e[n]-_(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Wt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};st(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=nd({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(),st(r=>{if(!Ie(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(_(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;rd.set(this.visualElement,this);const e=this.visualElement.current,n=he(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Wt(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()),B.read(s);const r=ue(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(st(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 e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=ns,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Ie(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ad(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class ld extends vt{constructor(e){super(e),this.removeGroupControls=et,this.removeListeners=et,this.controls=new od(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||et}unmount(){this.removeGroupControls(),this.removeListeners()}}const Xr=t=>(e,n)=>{t&&B.postRender(()=>t(e,n))};class cd extends vt{constructor(){super(...arguments),this.removePointerDownListener=et}onPointerDown(e){this.session=new $r(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_r(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Xr(e),onStart:Xr(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&B.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=he(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Fe={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let ss=!1;class ud extends T.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),ss&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Fe.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,ss=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||B.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Dn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;ss=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function qr(t){const[e,n]=Hi(),s=T.useContext(We);return y.jsx(ud,{...t,layoutGroup:s,switchLayoutGroup:T.useContext(dr),isPresent:e,safeToRemove:n})}function dd(t,e,n){const s=Y(t)?t:$t(t);return s.start(Jn("",s,e,n)),s.animation}const hd=(t,e)=>t.depth-e.depth;class fd{constructor(){this.children=[],this.isDirty=!1}add(e){Ye(this.children,e),this.isDirty=!0}remove(e){He(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(hd),this.isDirty=!1,this.children.forEach(e)}}function md(t,e){const n=q.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(yt(s),t(o-e))};return B.setup(s,!0),()=>yt(s)}const Zr=["TopLeft","TopRight","BottomLeft","BottomRight"],pd=Zr.length,Jr=t=>typeof t=="string"?parseFloat(t):t,Qr=t=>typeof t=="number"||V.test(t);function gd(t,e,n,s,i,o){i?(t.opacity=_(0,n.opacity??1,yd(s)),t.opacityExit=_(e.opacity??1,0,xd(s))):o&&(t.opacity=_(e.opacity??1,n.opacity??1,s));for(let r=0;r<pd;r++){const a=`border${Zr[r]}Radius`;let l=to(e,a),u=to(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Qr(l)===Qr(u)?(t[a]=Math.max(_(Jr(l),Jr(u),s),0),(ct.test(u)||ct.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=_(e.rotate||0,n.rotate||0,s))}function to(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const yd=eo(0,.5,Ks),xd=eo(.5,.95,et);function eo(t,e,n){return s=>s<t?0:s>e?1:n(ee(t,e,s))}function no(t,e){t.min=e.min,t.max=e.max}function at(t,e){no(t.x,e.x),no(t.y,e.y)}function so(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function io(t,e,n,s,i){return t-=e,t=Ne(t,1/n,s),i!==void 0&&(t=Ne(t,1/i,s)),t}function bd(t,e=0,n=1,s=.5,i,o=t,r=t){if(ct.test(e)&&(e=parseFloat(e),e=_(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=_(o.min,o.max,s);t===o&&(a-=e),t.min=io(t.min,e,n,a,i),t.max=io(t.max,e,n,a,i)}function ro(t,e,[n,s,i],o,r){bd(t,e[n],e[s],e[i],e.scale,o,r)}const vd=["x","scaleX","originX"],wd=["y","scaleY","originY"];function oo(t,e,n,s){ro(t.x,e,vd,n?n.x:void 0,s?s.x:void 0),ro(t.y,e,wd,n?n.y:void 0,s?s.y:void 0)}function ao(t){return t.translate===0&&t.scale===1}function lo(t){return ao(t.x)&&ao(t.y)}function co(t,e){return t.min===e.min&&t.max===e.max}function Td(t,e){return co(t.x,e.x)&&co(t.y,e.y)}function uo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function ho(t,e){return uo(t.x,e.x)&&uo(t.y,e.y)}function fo(t){return H(t.x)/H(t.y)}function mo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Pd{constructor(){this.members=[]}add(e){Ye(this.members,e),e.scheduleRender()}remove(e){if(He(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===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(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Sd(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.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=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const is=["","X","Y","Z"],Ad=1e3;let kd=0;function rs(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function po(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Er(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",B,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&po(s)}function go({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=kd++,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(Ed),this.nodes.forEach(jd),this.nodes.forEach(Ld),this.nodes.forEach(Md)},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 fd)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Ze),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=Ki(r)&&!bc(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),t){let c,d=0;const h=()=>this.root.updateBlockedByResize=!1;B.read(()=>{d=window.innerWidth}),t(r,()=>{const f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,c&&c(),c=md(h,250),Fe.hasAnimatedSinceResize&&(Fe.hasAnimatedSinceResize=!1,this.nodes.forEach(bo)))})}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()||Bd,{onLayoutAnimationStart:x,onLayoutAnimationComplete:b}=u.getProps(),v=!this.targetLayout||!ho(this.targetLayout,f),P=!d&&h;if(this.options.layoutRoot||this.resumeFrom||P||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Vn(p,"layout"),onPlay:x,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(c,P)}else d||bo(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(),yt(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(Nd),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&&po(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(yo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(xo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Rd),this.nodes.forEach(Cd),this.nodes.forEach(Vd)):this.nodes.forEach(xo),this.clearAllSnapshots();const a=q.now();K.delta=dt(0,1e3/60,a-K.timestamp),K.timestamp=a,K.isProcessing=!0,en.update.process(K),en.preRender.process(K),en.render.process(K),K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Dn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Dd),this.sharedNodes.forEach(Od)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,B.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){B.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!H(this.snapshot.measuredBox.x)&&!H(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=G(),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&&!lo(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Vt(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)),_d(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return G();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(zd))){const{scroll:u}=this.root;u&&(Gt(a.x,u.offset.x),Gt(a.y,u.offset.y))}return a}removeElementScroll(r){const a=G();if(at(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&&at(a,r),Gt(a.x,c.offset.x),Gt(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=G();at(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&&Kt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Vt(c.latestValues)&&Kt(l,c.latestValues)}return Vt(this.latestValues)&&Kt(l,this.latestValues),l}removeTransform(r){const a=G();at(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Vt(u.latestValues))continue;Yn(u.latestValues)&&u.updateSnapshot();const c=G(),d=u.measurePageBox();at(c,d),oo(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Vt(this.latestValues)&&oo(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!==K.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=K.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=G(),this.targetWithTransforms=G()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Xu(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):at(this.target,this.layout.layoutBox),yr(this.target,this.targetDelta)):at(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||Yn(this.parent.latestValues)||mr(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=G(),this.relativeTargetOrigin=G(),Oe(this.relativeTargetOrigin,a,l),at(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===K.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;at(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;au(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=G());const{target:f}=r;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(so(this.prevProjectionDelta.x,this.projectionDelta.x),so(this.prevProjectionDelta.y,this.projectionDelta.y)),fe(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!mo(this.projectionDelta.x,this.prevProjectionDelta.x)||!mo(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=Yt(),this.projectionDelta=Yt(),this.projectionDeltaWithTransform=Yt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Yt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=G(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,x=f!==p,b=this.getStack(),v=!b||b.members.length<=1,P=!!(x&&!v&&this.options.crossfade===!0&&!this.path.some(Fd));this.animationProgress=0;let w;this.mixTargetDelta=M=>{const C=M/1e3;vo(d.x,r.x,C),vo(d.y,r.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Oe(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Id(this.relativeTarget,this.relativeTargetOrigin,h,C),w&&Td(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=G()),at(w,this.relativeTarget)),x&&(this.animationValues=c,gd(c,u,this.latestValues,C,P,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&&(yt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=B.update(()=>{Fe.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=$t(0)),this.currentAnimation=dd(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(Ad),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&&Ao(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||G();const d=H(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const h=H(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+h}at(a,l),Kt(a,c),fe(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Pd),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&&rs("z",r,u,this.animationValues);for(let c=0;c<is.length;c++)rs(`rotate${is[c]}`,r,u,this.animationValues),rs(`skew${is[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=Le(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=Le(a?.pointerEvents)||""),this.hasProjected&&!Vt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=Sd(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 Fn){if(c[p]===void 0)continue;const{correct:x,applyTo:b,isCSSVariable:v}=Fn[p],P=d==="none"?c[p]:x(c[p],u);if(b){const w=b.length;for(let M=0;M<w;M++)r[b[M]]=P}else v?this.options.visualElement.renderState.vars[p]=P:r[p]=P}this.options.layoutId&&(r.pointerEvents=u===this?Le(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(yo),this.root.sharedNodes.clear()}}}function Cd(t){t.updateLayout()}function Vd(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?st(c=>{const d=o?e.measuredBox[c]:e.layoutBox[c],h=H(d);d.min=n[c].min,d.max=d.min+h}):Ao(i,e.layoutBox,n)&&st(c=>{const d=o?e.measuredBox[c]:e.layoutBox[c],h=H(n[c]);d.max=d.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+h)});const r=Yt();fe(r,n,e.layoutBox);const a=Yt();o?fe(a,t.applyTransform(s,!0),e.measuredBox):fe(a,n,e.layoutBox);const l=!lo(r);let u=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:h}=c;if(d&&h){const f=G();Oe(f,e.layoutBox,d.layoutBox);const p=G();Oe(p,n,h.layoutBox),ho(f,p)||(u=!0),c.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=f,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Ed(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Md(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Dd(t){t.clearSnapshot()}function yo(t){t.clearMeasurements()}function xo(t){t.isLayoutDirty=!1}function Rd(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function bo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function jd(t){t.resolveTargetDelta()}function Ld(t){t.calcProjection()}function Nd(t){t.resetSkewAndRotation()}function Od(t){t.removeLeadSnapshot()}function vo(t,e,n){t.translate=_(e.translate,0,n),t.scale=_(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function wo(t,e,n,s){t.min=_(e.min,n.min,s),t.max=_(e.max,n.max,s)}function Id(t,e,n,s){wo(t.x,e.x,n.x,s),wo(t.y,e.y,n.y,s)}function Fd(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Bd={duration:.45,ease:[.4,0,.1,1]},To=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Po=To("applewebkit/")&&!To("chrome/")?Math.round:et;function So(t){t.min=Po(t.min),t.max=Po(t.max)}function _d(t){So(t.x),So(t.y)}function Ao(t,e,n){return t==="position"||t==="preserve-aspect"&&!Hu(fo(e),fo(n),.2)}function zd(t){return t!==t.root&&t.scroll?.wasRoot}const $d=go({attachResizeListener:(t,e)=>ue(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),os={current:void 0},ko=go({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!os.current){const t=new $d({});t.mount(window),t.setOptions({layoutScroll:!0}),os.current=t}return os.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Ud={pan:{Feature:cd},drag:{Feature:ld,ProjectionNode:ko,MeasureLayout:qr}};function Co(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&B.postRender(()=>o(e,de(e)))}class Wd extends vt{mount(){const{current:e}=this.node;e&&(this.unmount=mc(e,(n,s)=>(Co(this.node,s,"Start"),i=>Co(this.node,i,"End"))))}unmount(){}}class Gd extends vt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=te(ue(this.node.current,"focus",()=>this.onFocus()),ue(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Vo(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&B.postRender(()=>o(e,de(e)))}class Kd extends vt{mount(){const{current:e}=this.node;e&&(this.unmount=xc(e,(n,s)=>(Vo(this.node,s,"Start"),(i,{success:o})=>Vo(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const as=new WeakMap,ls=new WeakMap,Yd=t=>{const e=as.get(t.target);e&&e(t)},Hd=t=>{t.forEach(Yd)};function Xd({root:t,...e}){const n=t||document;ls.has(n)||ls.set(n,{});const s=ls.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Hd,{root:t,...e})),s[i]}function qd(t,e,n){const s=Xd(e);return as.set(t,n),s.observe(t),()=>{as.delete(t),s.unobserve(t)}}const Zd={some:0,all:1};class Jd extends vt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Zd[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 qd(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Qd(e,n))&&this.startObserver()}unmount(){}}function Qd({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const th={...$u,...{inView:{Feature:Jd},tap:{Feature:Kd},focus:{Feature:Gd},hover:{Feature:Wd}},...Ud,...{layout:{ProjectionNode:ko,MeasureLayout:qr}}},me=iu(th,yu);const eh=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Eo=(...t)=>t.filter((e,n,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===n).join(" ").trim();var nh={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 sh=T.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:i="",children:o,iconNode:r,...a},l)=>T.createElement("svg",{ref:l,...nh,width:e,height:e,stroke:t,strokeWidth:s?Number(n)*24/Number(e):n,className:Eo("lucide",i),...a},[...r.map(([u,c])=>T.createElement(u,c)),...Array.isArray(o)?o:[o]]));const pe=(t,e)=>{const n=T.forwardRef(({className:s,...i},o)=>T.createElement(sh,{ref:o,iconNode:e,className:Eo(`lucide-${eh(t)}`,s),...i}));return n.displayName=`${t}`,n};const ih=pe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const rh=pe("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const oh=pe("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);const ah=pe("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);const cs=pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),lh=({type:t,message:e,isOpen:n,onClose:s})=>y.jsx(Nn,{children:n&&y.jsx(me.div,{initial:{opacity:0,y:-20,x:"-50%"},animate:{opacity:1,y:0,x:"-50%"},exit:{opacity:0,y:-20,x:"-50%"},className:"fixed top-6 left-1/2 transform z-50 pointer-events-none",children:y.jsx("div",{className:`rounded-xl shadow-2xl p-4 min-w-[320px] pointer-events-auto backdrop-blur-md ${t==="success"?"bg-green-50/90 border border-green-200/50":"bg-red-50/90 border border-red-200/50"}`,children:y.jsxs("div",{className:"flex items-center justify-between space-x-3",children:[t==="success"?y.jsx(rh,{className:"w-5 h-5 text-green-600"}):y.jsx(ih,{className:"w-5 h-5 text-red-600"}),y.jsx("p",{className:`text-sm font-semibold flex-1 ${t==="success"?"text-green-900":"text-red-900"}`,children:e}),y.jsx("button",{onClick:s,className:`p-1.5 rounded-lg transition-colors ${t==="success"?"hover:bg-green-100 text-green-600":"hover:bg-red-100 text-red-600"}`,children:y.jsx(cs,{className:"w-4 h-4"})})]})})})}),ch=({isOpen:t,onClose:e,title:n,children:s,onSubmit:i,submitText:o="Submit",width:r="max-w-lg"})=>y.jsx(Nn,{children:t&&y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[y.jsx(me.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:e,className:"absolute inset-0 bg-[#00333e]/40 backdrop-blur-sm"}),y.jsxs(me.div,{initial:{scale:.95,opacity:0,y:20},animate:{scale:1,opacity:1,y:0},exit:{scale:.95,opacity:0,y:20},className:`relative bg-white border border-gray-100 rounded-2xl shadow-2xl w-full ${r} overflow-hidden`,children:[y.jsxs("div",{className:"flex justify-between items-center px-6 py-4 border-b border-gray-50 bg-gray-50/50",children:[y.jsx("h3",{className:"text-lg font-bold text-[#00333e]",children:n}),y.jsx("button",{onClick:e,className:"p-2 text-gray-400 hover:text-[#00333e] hover:bg-white rounded-xl transition-all",children:y.jsx(cs,{className:"w-5 h-5"})})]}),y.jsx("div",{className:"p-6",children:s}),y.jsxs("div",{className:"flex justify-end gap-3 px-6 py-4 bg-gray-50/50 border-t border-gray-50",children:[y.jsx("button",{onClick:e,className:"px-4 py-2 text-sm font-medium text-[#00333e] bg-white border border-gray-200 rounded-xl hover:bg-gray-50 transition-all",children:"Cancel"}),i&&y.jsx("button",{onClick:i,className:"px-4 py-2 text-sm font-medium bg-[#00333e] text-white rounded-xl hover:bg-[#002a36] shadow-lg shadow-[#00333e]/10 transition-all",children:o})]})]})]})});function Mo(...t){return Nt(Dt(t))}const uh=({items:t,columns:e=3,className:n})=>{const s={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"};return y.jsx("div",{className:Mo("grid gap-6",s[e],n),children:t.map((i,o)=>y.jsx(me.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:o*.1},whileHover:{y:-4},className:"bg-white rounded-2xl p-6 border border-gray-100 shadow-sm hover:shadow-md transition-all group",children:y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsx("div",{className:Mo("p-3 rounded-xl transition-colors",i.color||"bg-gray-50 text-[#00333e] group-hover:bg-[#00333e] group-hover:text-white"),children:y.jsx(i.icon,{className:"w-6 h-6"})}),y.jsxs("div",{children:[y.jsx("p",{className:"text-sm font-medium text-gray-500",children:i.label}),y.jsx("h3",{className:"text-2xl font-bold text-[#00333e] mt-0.5",children:i.value}),i.description&&y.jsx("p",{className:"text-xs text-gray-400 mt-1",children:i.description})]})]})},o))})};function us(...t){return Nt(Dt(t))}const dh=({isOpen:t,onClose:e,navItems:n,currentPath:s,onNavigate:i,logo:o,footer:r,user:a,onLogout:l})=>y.jsxs(y.Fragment,{children:[y.jsx("aside",{className:us("bg-[#00333e] flex flex-col shadow-xl overflow-hidden transition-all duration-300 ease-in-out z-50","fixed md:sticky top-0 left-0 h-screen",t?"w-64 translate-x-0":"w-0 md:w-64 -translate-x-full md:translate-x-0"),children:y.jsxs("div",{className:"flex flex-col h-full py-6",children:[o&&y.jsxs("div",{className:"flex px-6 mb-8 items-center gap-3",children:[y.jsx("img",{src:o.src,alt:o.alt,className:"w-8 h-8"}),y.jsx("h1",{className:"text-xl font-bold text-white tracking-tight",children:o.label}),y.jsx("button",{onClick:e,className:"md:hidden ml-auto p-2 text-gray-400 hover:text-white",children:y.jsx(cs,{className:"w-5 h-5"})})]}),y.jsx("nav",{className:"flex-1 space-y-1 px-3 overflow-y-auto custom-scrollbar",children:n.map(u=>{const c=s===u.to;return y.jsxs("button",{onClick:()=>i(u.to),className:us("w-full flex items-center px-4 py-3 text-sm font-medium rounded-xl transition-all duration-200 group",c?"bg-[#fddf0d] text-[#00333e] shadow-lg shadow-[#fddf0d]/20":"text-gray-300 hover:bg-[#004d5c] hover:text-white"),children:[y.jsx(u.icon,{className:us("w-5 h-5 mr-3 transition-colors flex-shrink-0",c?"text-[#00333e]":"text-gray-400 group-hover:text-white")}),y.jsx("span",{className:"truncate",children:u.label})]},u.to)})}),y.jsxs("div",{className:"mt-auto px-4 pt-6 border-t border-[#004d5c] space-y-4",children:[r,a&&y.jsxs("div",{className:"flex items-center gap-3 p-2.5 rounded-2xl bg-[#002a36] border border-[#004d5c]",children:[y.jsx("img",{src:a.avatarUrl,alt:a.name,className:"w-10 h-10 rounded-full border border-[#004d5c] object-cover"}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("p",{className:"text-sm font-bold text-white truncate",children:a.name}),y.jsx("p",{className:"text-xs text-gray-400 truncate",children:a.email})]}),l&&y.jsx("button",{onClick:l,className:"p-2 text-gray-400 hover:text-red-400 hover:bg-[#004d5c] rounded-xl transition-all","aria-label":"Logout",children:y.jsx(oh,{className:"w-5 h-5"})})]})]})]})}),y.jsx(Nn,{children:t&&y.jsx(me.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:e,className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-40 md:hidden"})})]});function Do(...t){return Nt(Dt(t))}const hh=({children:t,sidebar:e,topActions:n,mobileLogo:s,onMenuClick:i,className:o,contentContainerClassName:r})=>y.jsxs("div",{className:Do("min-h-screen bg-gray-50 flex",o),children:[e,y.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[y.jsxs("div",{className:"sticky top-0 left-0 right-0 bg-[#00333e] text-white px-4 py-3 flex items-center gap-3 z-30 md:hidden shadow-md",children:[y.jsx("button",{onClick:i,className:"p-2 hover:bg-[#004d5c] rounded-xl transition-colors","aria-label":"Toggle menu",children:y.jsx(ah,{className:"w-6 h-6"})}),s&&y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("img",{src:s.src,alt:"Logo",className:"w-6 h-6"}),y.jsx("h1",{className:"text-base font-bold",children:s.label})]}),y.jsx("div",{className:"ml-auto flex items-center gap-2",children:n})]}),y.jsx("main",{className:"flex-1 overflow-y-auto w-full",children:y.jsx("div",{className:Do("max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",r),children:t})})]})]});X.Alert=lh,X.Button=Pa,X.Card=ka,X.Input=Sa,X.Layout=hh,X.Modal=ch,X.Sidebar=dh,X.Stats=uh,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})}));
15
+ //# sourceMappingURL=briq-ui.umd.cjs.map