@artemdev04/design-system 0.9.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,64 +1,64 @@
1
- (function(L,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],x):(L=typeof globalThis<"u"?globalThis:L||self,x(L.MyDesignSystem={},L.jsxRuntime,L.React,L.ReactDOM))})(this,(function(L,x,v,zo){"use strict";function $o(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 st=$o(v);function rs(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=rs(t[e]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}function os(){for(var t,e,n=0,s="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=rs(t))&&(s&&(s+=" "),s+=e);return s}const as=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,ls=os,oe=(t,e)=>n=>{var s;if((e==null?void 0:e.variants)==null)return ls(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=e,r=Object.keys(i).map(c=>{const u=n==null?void 0:n[c],d=o==null?void 0:o[c];if(u===null)return null;const f=as(u)||as(d);return i[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(m=>{let[p,g]=m;return Array.isArray(g)?g.includes({...o,...a}[p]):{...o,...a}[p]===g})?[...c,d,f]:c},[]);return ls(t,r,l,n==null?void 0:n.class,n==null?void 0:n.className)},Uo=(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},_o=(t,e)=>({classGroupId:t,validator:e}),cs=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),ae="-",us=[],Wo="arbitrary..",Go=t=>{const e=Ho(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return Ko(r);const a=r.split(ae),l=a[0]===""&&a.length>1?1:0;return ds(a,l,e)},getConflictingClassGroupIds:(r,a)=>{if(a){const l=s[r],c=n[r];return l?c?Uo(c,l):l:c||us}return n[r]||us}}},ds=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const i=t[e],o=n.nextPart.get(i);if(o){const c=ds(t,e+1,o);if(c)return c}const r=n.validators;if(r===null)return;const a=e===0?t.join(ae):t.slice(e).join(ae),l=r.length;for(let c=0;c<l;c++){const u=r[c];if(u.validator(a))return u.classGroupId}},Ko=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?Wo+s:void 0})(),Ho=t=>{const{theme:e,classGroups:n}=t;return Xo(n,e)},Xo=(t,e)=>{const n=cs();for(const s in t){const i=t[s];Ne(i,n,s,e)}return n},Ne=(t,e,n,s)=>{const i=t.length;for(let o=0;o<i;o++){const r=t[o];Yo(r,e,n,s)}},Yo=(t,e,n,s)=>{if(typeof t=="string"){qo(t,e,n);return}if(typeof t=="function"){Zo(t,e,n,s);return}Jo(t,e,n,s)},qo=(t,e,n)=>{const s=t===""?e:fs(e,t);s.classGroupId=n},Zo=(t,e,n,s)=>{if(Qo(t)){Ne(t(s),e,n,s);return}e.validators===null&&(e.validators=[]),e.validators.push(_o(n,t))},Jo=(t,e,n,s)=>{const i=Object.entries(t),o=i.length;for(let r=0;r<o;r++){const[a,l]=i[r];Ne(l,fs(e,a),n,s)}},fs=(t,e)=>{let n=t;const s=e.split(ae),i=s.length;for(let o=0;o<i;o++){const r=s[o];let a=n.nextPart.get(r);a||(a=cs(),n.nextPart.set(r,a)),n=a}return n},Qo=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,ta=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)}}},Fe="!",hs=":",ea=[],ms=(t,e,n,s,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),na=t=>{const{prefix:e,experimentalParseClassName:n}=t;let s=i=>{const o=[];let r=0,a=0,l=0,c;const u=i.length;for(let p=0;p<u;p++){const g=i[p];if(r===0&&a===0){if(g===hs){o.push(i.slice(l,p)),l=p+1;continue}if(g==="/"){c=p;continue}}g==="["?r++:g==="]"?r--:g==="("?a++:g===")"&&a--}const d=o.length===0?i:i.slice(l);let f=d,h=!1;d.endsWith(Fe)?(f=d.slice(0,-1),h=!0):d.startsWith(Fe)&&(f=d.slice(1),h=!0);const m=c&&c>l?c-l:void 0;return ms(o,h,f,m)};if(e){const i=e+hs,o=s;s=r=>r.startsWith(i)?o(r.slice(i.length)):ms(ea,!1,r,void 0,!0)}if(n){const i=s;s=o=>n({className:o,parseClassName:i})}return s},sa=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}},ia=t=>({cache:ta(t.cacheSize),parseClassName:na(t),sortModifiers:sa(t),...Go(t)}),ra=/\s+/,oa=(t,e)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:o}=e,r=[],a=t.trim().split(ra);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let g=!!p,b=s(g?m.substring(0,p):m);if(!b){if(!g){l=u+(l.length>0?" "+l:l);continue}if(b=s(m),!b){l=u+(l.length>0?" "+l:l);continue}g=!1}const T=f.length===0?"":f.length===1?f[0]:o(f).join(":"),w=h?T+Fe:T,M=w+b;if(r.indexOf(M)>-1)continue;r.push(M);const k=i(b,g);for(let V=0;V<k.length;++V){const D=k[V];r.push(w+D)}l=u+(l.length>0?" "+l:l)}return l},aa=(...t)=>{let e=0,n,s,i="";for(;e<t.length;)(n=t[e++])&&(s=ps(n))&&(i&&(i+=" "),i+=s);return i},ps=t=>{if(typeof t=="string")return t;let e,n="";for(let s=0;s<t.length;s++)t[s]&&(e=ps(t[s]))&&(n&&(n+=" "),n+=e);return n},la=(t,...e)=>{let n,s,i,o;const r=l=>{const c=e.reduce((u,d)=>d(u),t());return n=ia(c),s=n.cache.get,i=n.cache.set,o=a,a(l)},a=l=>{const c=s(l);if(c)return c;const u=oa(l,n);return i(l,u),u};return o=r,(...l)=>o(aa(...l))},ca=[],z=t=>{const e=n=>n[t]||ca;return e.isThemeGetter=!0,e},gs=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ys=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ua=/^\d+\/\d+$/,da=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fa=/\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$/,ha=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ma=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pa=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vt=t=>ua.test(t),E=t=>!!t&&!Number.isNaN(Number(t)),mt=t=>!!t&&Number.isInteger(Number(t)),Be=t=>t.endsWith("%")&&E(t.slice(0,-1)),lt=t=>da.test(t),ga=()=>!0,ya=t=>fa.test(t)&&!ha.test(t),bs=()=>!1,ba=t=>ma.test(t),xa=t=>pa.test(t),va=t=>!S(t)&&!C(t),wa=t=>Mt(t,Ss,bs),S=t=>gs.test(t),xt=t=>Mt(t,Cs,ya),Oe=t=>Mt(t,ka,E),xs=t=>Mt(t,ws,bs),Ta=t=>Mt(t,Ts,xa),le=t=>Mt(t,As,ba),C=t=>ys.test(t),Gt=t=>Dt(t,Cs),Sa=t=>Dt(t,Pa),vs=t=>Dt(t,ws),Ca=t=>Dt(t,Ss),Aa=t=>Dt(t,Ts),ce=t=>Dt(t,As,!0),Mt=(t,e,n)=>{const s=gs.exec(t);return s?s[1]?e(s[1]):n(s[2]):!1},Dt=(t,e,n=!1)=>{const s=ys.exec(t);return s?s[1]?e(s[1]):n:!1},ws=t=>t==="position"||t==="percentage",Ts=t=>t==="image"||t==="url",Ss=t=>t==="length"||t==="size"||t==="bg-size",Cs=t=>t==="length",ka=t=>t==="number",Pa=t=>t==="family-name",As=t=>t==="shadow",Va=la(()=>{const t=z("color"),e=z("font"),n=z("text"),s=z("font-weight"),i=z("tracking"),o=z("leading"),r=z("breakpoint"),a=z("container"),l=z("spacing"),c=z("radius"),u=z("shadow"),d=z("inset-shadow"),f=z("text-shadow"),h=z("drop-shadow"),m=z("blur"),p=z("perspective"),g=z("aspect"),b=z("ease"),T=z("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"],k=()=>[...M(),C,S],V=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],y=()=>[C,S,l],N=()=>[Vt,"full","auto",...y()],U=()=>[mt,"none","subgrid",C,S],nt=()=>["auto",{span:["full",mt,C,S]},mt,C,S],Pt=()=>[mt,"auto",C,S],Ve=()=>["auto","min","max","fr",C,S],Wt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ft=()=>["start","end","center","stretch","center-safe","end-safe"],ot=()=>["auto",...y()],F=()=>[Vt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],A=()=>[t,C,S],at=()=>[...M(),vs,xs,{position:[C,S]}],ht=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Me=()=>["auto","cover","contain",Ca,wa,{size:[C,S]}],ss=()=>[Be,Gt,xt],H=()=>["","none","full",c,C,S],Y=()=>["",E,Gt,xt],De=()=>["solid","dashed","dotted","double"],jo=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>[E,Be,vs,xs],Ro=()=>["","none",m,C,S],Ee=()=>["none",E,C,S],Le=()=>["none",E,C,S],is=()=>[E,C,S],Ie=()=>[Vt,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[lt],breakpoint:[lt],color:[ga],container:[lt],"drop-shadow":[lt],ease:["in","out","in-out"],font:[va],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[lt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[lt],shadow:[lt],spacing:["px",E],text:[lt],"text-shadow":[lt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Vt,S,C,g]}],container:["container"],columns:[{columns:[E,S,C,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:k()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[mt,"auto",C,S]}],basis:[{basis:[Vt,"full","auto",a,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[E,Vt,"auto","initial","none",S]}],grow:[{grow:["",E,C,S]}],shrink:[{shrink:["",E,C,S]}],order:[{order:[mt,"first","last","none",C,S]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:nt()}],"col-start":[{"col-start":Pt()}],"col-end":[{"col-end":Pt()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:nt()}],"row-start":[{"row-start":Pt()}],"row-end":[{"row-end":Pt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ve()}],"auto-rows":[{"auto-rows":Ve()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:[...Wt(),"normal"]}],"justify-items":[{"justify-items":[...ft(),"normal"]}],"justify-self":[{"justify-self":["auto",...ft()]}],"align-content":[{content:["normal",...Wt()]}],"align-items":[{items:[...ft(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ft(),{baseline:["","last"]}]}],"place-content":[{"place-content":Wt()}],"place-items":[{"place-items":[...ft(),"baseline"]}],"place-self":[{"place-self":["auto",...ft()]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:ot()}],mx:[{mx:ot()}],my:[{my:ot()}],ms:[{ms:ot()}],me:[{me:ot()}],mt:[{mt:ot()}],mr:[{mr:ot()}],mb:[{mb:ot()}],ml:[{ml:ot()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[a,"screen",...F()]}],"min-w":[{"min-w":[a,"screen","none",...F()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[r]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,Gt,xt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,C,Oe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Be,S]}],"font-family":[{font:[Sa,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,C,S]}],"line-clamp":[{"line-clamp":[E,"none",C,Oe]}],leading:[{leading:[o,...y()]}],"list-image":[{"list-image":["none",C,S]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",C,S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...De(),"wavy"]}],"text-decoration-thickness":[{decoration:[E,"from-font","auto",C,xt]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[E,"auto",C,S]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",C,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",C,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:at()}],"bg-repeat":[{bg:ht()}],"bg-size":[{bg:Me()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mt,C,S],radial:["",C,S],conic:[mt,C,S]},Aa,Ta]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:ss()}],"gradient-via-pos":[{via:ss()}],"gradient-to-pos":[{to:ss()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...De(),"hidden","none"]}],"divide-style":[{divide:[...De(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...De(),"none","hidden"]}],"outline-offset":[{"outline-offset":[E,C,S]}],"outline-w":[{outline:["",E,Gt,xt]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",u,ce,le]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,ce,le]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[E,xt]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",f,ce,le]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[E,C,S]}],"mix-blend":[{"mix-blend":[...jo(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":jo()}],"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":[E]}],"mask-image-linear-from-pos":[{"mask-linear-from":_()}],"mask-image-linear-to-pos":[{"mask-linear-to":_()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":_()}],"mask-image-t-to-pos":[{"mask-t-to":_()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":_()}],"mask-image-r-to-pos":[{"mask-r-to":_()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":_()}],"mask-image-b-to-pos":[{"mask-b-to":_()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":_()}],"mask-image-l-to-pos":[{"mask-l-to":_()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":_()}],"mask-image-x-to-pos":[{"mask-x-to":_()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":_()}],"mask-image-y-to-pos":[{"mask-y-to":_()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[C,S]}],"mask-image-radial-from-pos":[{"mask-radial-from":_()}],"mask-image-radial-to-pos":[{"mask-radial-to":_()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[E]}],"mask-image-conic-from-pos":[{"mask-conic-from":_()}],"mask-image-conic-to-pos":[{"mask-conic-to":_()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:at()}],"mask-repeat":[{mask:ht()}],"mask-size":[{mask:Me()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",C,S]}],filter:[{filter:["","none",C,S]}],blur:[{blur:Ro()}],brightness:[{brightness:[E,C,S]}],contrast:[{contrast:[E,C,S]}],"drop-shadow":[{"drop-shadow":["","none",h,ce,le]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",E,C,S]}],"hue-rotate":[{"hue-rotate":[E,C,S]}],invert:[{invert:["",E,C,S]}],saturate:[{saturate:[E,C,S]}],sepia:[{sepia:["",E,C,S]}],"backdrop-filter":[{"backdrop-filter":["","none",C,S]}],"backdrop-blur":[{"backdrop-blur":Ro()}],"backdrop-brightness":[{"backdrop-brightness":[E,C,S]}],"backdrop-contrast":[{"backdrop-contrast":[E,C,S]}],"backdrop-grayscale":[{"backdrop-grayscale":["",E,C,S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[E,C,S]}],"backdrop-invert":[{"backdrop-invert":["",E,C,S]}],"backdrop-opacity":[{"backdrop-opacity":[E,C,S]}],"backdrop-saturate":[{"backdrop-saturate":[E,C,S]}],"backdrop-sepia":[{"backdrop-sepia":["",E,C,S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",C,S]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[E,"initial",C,S]}],ease:[{ease:["linear","initial",b,C,S]}],delay:[{delay:[E,C,S]}],animate:[{animate:["none",T,C,S]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,C,S]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:Le()}],"scale-x":[{"scale-x":Le()}],"scale-y":[{"scale-y":Le()}],"scale-z":[{"scale-z":Le()}],"scale-3d":["scale-3d"],skew:[{skew:is()}],"skew-x":[{"skew-x":is()}],"skew-y":[{"skew-y":is()}],transform:[{transform:[C,S,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",C,S]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",C,S]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[E,Gt,xt,Oe]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function I(...t){return Va(os(t))}const Ma=oe(["py-2 px-4 rounded border-border cursor-pointer border text-on-primary shadow-md","transition-all duration-150 ease-in-out","hover:scale-[1.10] active:scale-[0.95]","disabled:bg-disabled-surface disabled:border-disabled-border disabled:text-disabled-text disabled:cursor-default disabled:hover:scale-100 disabled:active:scale-100 disabled:cursor-not-allowed"],{variants:{variant:{primary:"bg-primary hover:bg-primary-focus",secondary:"bg-secondary hover:bg-secondary-focus",danger:"border-error-border bg-error dark:bg-transparent dark:border-error dark:border-2 dark:font-bold dark:text-error dark:disabled:text-disabled-text dark:disabled:border-disabled-border",confirm:"bg-success border-success-border",info:"border-info text-info shadow-none disabled:bg-transparent",ghost:"shadow-none border-transparent text-info-text disabled:border-none disabled:bg-transparent hover:bg-info-surface",animated:I("border-transparent rounded-full text-text-surface",{animatedButton:"_animatedButton_10ydq_7"}.animatedButton)}},defaultVariants:{variant:"primary"}}),ks=v.forwardRef(function({className:e,children:n,variant:s,...i},o){return x.jsx("button",{ref:o,className:I(Ma({variant:s}),e),...i,children:n})}),Ps=st.forwardRef(({className:t,...e},n)=>x.jsx("div",{ref:n,className:I("rounded-md border bg-surface border-border shadow-sm ",t),...e}));Ps.displayName="Card";const Vs=st.forwardRef(({className:t,children:e,...n},s)=>x.jsxs("div",{ref:s,className:I("flex flex-col p-4 pb-3 ",t),...n,children:[e,x.jsx("div",{className:"h-[2px] w-full bg-border-strong mt-2"})]}));Vs.displayName="CardHeader";const Ms=st.forwardRef(({className:t,...e},n)=>x.jsx("h3",{ref:n,className:I("font-semibold leading-none tracking-tight text-xl",t),...e}));Ms.displayName="CardTitle";const Ds=st.forwardRef(({className:t,...e},n)=>x.jsx("p",{ref:n,className:I("font-semibold text-text-secondary",t),...e}));Ds.displayName="CardDescription";const Es=st.forwardRef(({className:t,...e},n)=>x.jsx("div",{ref:n,className:I("p-4",t),...e}));Es.displayName="CardContent";const Ls=st.forwardRef(({className:t,children:e,...n},s)=>x.jsxs("div",{ref:s,className:I("flex flex-col gap-2 p-4 pt-0 text-text-secondary text-sm",t),...n,children:[x.jsx("div",{className:"h-[1px] w-full bg-border"}),e]}));Ls.displayName="CardFooter";const Da=oe("m-0 leading-normal transition-colors",{variants:{size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl md:text-3xl","3xl":"text-3xl md:text-4xl","4xl":"text-4xl md:text-5xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},color:{default:"text-text",muted:"text-text-secondary dark:text-slate-400",success:"text-success-text",error:"text-error-text",warning:"text-warning-text",info:"text-info-text"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"},italic:{true:"italic",false:""},unfrtline:{ture:"underline",false:""}},defaultVariants:{size:"base",weight:"normal",color:"default",align:"left",italic:!1}}),Ea=v.forwardRef(function({as:e,className:n,size:s,weight:i,color:o,align:r,italic:a,children:l,...c},u){const d=e||"p";return x.jsx(d,{ref:u,className:I(Da({size:s,weight:i,color:o,align:r,italic:a}),n),...c,children:l})}),je=v.createContext({});function Re(t){const e=v.useRef(null);return e.current===null&&(e.current=t()),e.current}const ze=typeof window<"u",Is=ze?v.useLayoutEffect:v.useEffect,ue=v.createContext(null);function $e(t,e){t.indexOf(e)===-1&&t.push(e)}function Ue(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ct=(t,e,n)=>n>e?e:n<t?t:n;function _e(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Et=()=>{},ut=()=>{};process.env.NODE_ENV!=="production"&&(Et=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(_e(e,n))},ut=(t,e,n)=>{if(!t)throw new Error(_e(e,n))});const dt={},Ns=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Fs(t){return typeof t=="object"&&t!==null}const Bs=t=>/^0[^.\s]+$/u.test(t);function We(t){let e;return()=>(e===void 0&&(e=t()),e)}const q=t=>t,La=(t,e)=>n=>e(t(n)),Kt=(...t)=>t.reduce(La),Ht=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Ge{constructor(){this.subscriptions=[]}add(e){return $e(this.subscriptions,e),()=>Ue(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 Q=t=>t*1e3,Z=t=>t/1e3;function Os(t,e){return e?t*(1e3/e):0}const js=new Set;function Ke(t,e,n){t||js.has(e)||(console.warn(_e(e,n)),js.add(e))}const Rs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ia=1e-7,Na=12;function Fa(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Rs(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Ia&&++a<Na);return r}function Xt(t,e,n,s){if(t===e&&n===s)return q;const i=o=>Fa(o,0,1,t,n);return o=>o===0||o===1?o:Rs(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=Xt(.33,1.53,.69,.99),He=$s(Us),_s=zs(He),Ws=t=>(t*=2)<1?.5*He(t):.5*(2-Math.pow(2,-10*(t-1))),Xe=t=>1-Math.sin(Math.acos(t)),Gs=$s(Xe),Ks=zs(Xe),Ba=Xt(.42,0,1,1),Oa=Xt(0,0,.58,1),Hs=Xt(.42,0,.58,1),ja=t=>Array.isArray(t)&&typeof t[0]!="number",Xs=t=>Array.isArray(t)&&typeof t[0]=="number",Ys={linear:q,easeIn:Ba,easeInOut:Hs,easeOut:Oa,circIn:Xe,circInOut:Ks,circOut:Gs,backIn:He,backInOut:_s,backOut:Us,anticipate:Ws},Ra=t=>typeof t=="string",Ye=t=>{if(Xs(t)){ut(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return Xt(e,n,s,i)}else if(Ra(t))return ut(Ys[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Ys[t];return t},de=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function za(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(u){r.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const m=f&&i?n:s;return d&&r.add(u),m.has(u)||m.add(u),u},cancel:u=>{s.delete(u),r.delete(u)},process:u=>{if(a=u,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,c.process(u))}};return c}const $a=40;function qs(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=de.reduce((w,M)=>(w[M]=za(o),w),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:m}=r,p=()=>{const w=dt.useManualTiming?i.timestamp:performance.now();n=!1,dt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,$a),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),d.process(i),f.process(i),h.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))},g=()=>{n=!0,s=!0,i.isProcessing||t(p)};return{schedule:de.reduce((w,M)=>{const k=r[M];return w[M]=(V,D=!1,y=!1)=>(n||g(),k.schedule(V,D,y)),w},{}),cancel:w=>{for(let M=0;M<de.length;M++)r[de[M]].cancel(w)},state:i,steps:r}}const{schedule:B,cancel:pt,state:W,steps:qe}=qs(typeof requestAnimationFrame<"u"?requestAnimationFrame:q,!0);let fe;function Ua(){fe=void 0}const X={now:()=>(fe===void 0&&X.set(W.isProcessing||dt.useManualTiming?W.timestamp:performance.now()),fe),set:t=>{fe=t,queueMicrotask(Ua)}},Zs=t=>e=>typeof e=="string"&&e.startsWith(t),Js=Zs("--"),_a=Zs("var(--"),Ze=t=>_a(t)?Wa.test(t.split("/*")[0].trim()):!1,Wa=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Lt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Yt={...Lt,transform:t=>ct(0,1,t)},he={...Lt,default:1},qt=t=>Math.round(t*1e5)/1e5,Je=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ga(t){return t==null}const Ka=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qe=(t,e)=>n=>!!(typeof n=="string"&&Ka.test(n)&&n.startsWith(t)||e&&!Ga(n)&&Object.prototype.hasOwnProperty.call(n,e)),Qs=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Je);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Ha=t=>ct(0,255,t),tn={...Lt,transform:t=>Math.round(Ha(t))},vt={test:Qe("rgb","red"),parse:Qs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+tn.transform(t)+", "+tn.transform(e)+", "+tn.transform(n)+", "+qt(Yt.transform(s))+")"};function Xa(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 en={test:Qe("#"),parse:Xa,transform:vt.transform},Zt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),gt=Zt("deg"),it=Zt("%"),P=Zt("px"),Ya=Zt("vh"),qa=Zt("vw"),ti={...it,parse:t=>it.parse(t)/100,transform:t=>it.transform(t*100)},It={test:Qe("hsl","hue"),parse:Qs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+it.transform(qt(e))+", "+it.transform(qt(n))+", "+qt(Yt.transform(s))+")"},R={test:t=>vt.test(t)||en.test(t)||It.test(t),parse:t=>vt.test(t)?vt.parse(t):It.test(t)?It.parse(t):en.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?vt.transform(t):It.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},Za=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ja(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Je))==null?void 0:e.length)||0)+(((n=t.match(Za))==null?void 0:n.length)||0)>0}const ei="number",ni="color",Qa="var",tl="var(",si="${}",el=/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 Jt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(el,l=>(R.test(l)?(s.color.push(o),i.push(ni),n.push(R.parse(l))):l.startsWith(tl)?(s.var.push(o),i.push(Qa),n.push(l)):(s.number.push(o),i.push(ei),n.push(parseFloat(l))),++o,si)).split(si);return{values:n,split:a,indexes:s,types:i}}function ii(t){return Jt(t).values}function ri(t){const{split:e,types:n}=Jt(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===ei?o+=qt(i[r]):a===ni?o+=R.transform(i[r]):o+=i[r]}return o}}const nl=t=>typeof t=="number"?0:R.test(t)?R.getAnimatableNone(t):t;function sl(t){const e=ii(t);return ri(t)(e.map(nl))}const yt={test:Ja,parse:ii,createTransformer:ri,getAnimatableNone:sl};function nn(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 il({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=nn(l,a,t+1/3),o=nn(l,a,t),r=nn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function me(t,e){return n=>n>0?e:t}const O=(t,e,n)=>t+(e-t)*n,sn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},rl=[en,vt,It],ol=t=>rl.find(e=>e.test(t));function oi(t){const e=ol(t);if(Et(!!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===It&&(n=il(n)),n}const ai=(t,e)=>{const n=oi(t),s=oi(e);if(!n||!s)return me(t,e);const i={...n};return o=>(i.red=sn(n.red,s.red,o),i.green=sn(n.green,s.green,o),i.blue=sn(n.blue,s.blue,o),i.alpha=O(n.alpha,s.alpha,o),vt.transform(i))},rn=new Set(["none","hidden"]);function al(t,e){return rn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ll(t,e){return n=>O(t,e,n)}function on(t){return typeof t=="number"?ll:typeof t=="string"?Ze(t)?me:R.test(t)?ai:dl:Array.isArray(t)?li:typeof t=="object"?R.test(t)?ai:cl:me}function li(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>on(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function cl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=on(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function ul(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 dl=(t,e)=>{const n=yt.createTransformer(e),s=Jt(t),i=Jt(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?rn.has(t)&&!i.values.length||rn.has(e)&&!s.values.length?al(t,e):Kt(li(ul(s,i),i.values),n):(Et(!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"),me(t,e))};function ci(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?O(t,e,n):on(t)(t,e)}const fl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>B.update(e,n),stop:()=>pt(e),now:()=>W.isProcessing?W.timestamp:X.now()}},ui=(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)})`},pe=2e4;function an(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<pe;)e+=n,s=t.next(e);return e>=pe?1/0:e}function hl(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(an(s),pe);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:Z(i)}}const ml=5;function di(t,e,n){const s=Math.max(e-ml,0);return Os(n-t(s),e-s)}const j={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},ln=.001;function pl({duration:t=j.duration,bounce:e=j.bounce,velocity:n=j.velocity,mass:s=j.mass}){let i,o;Et(t<=Q(j.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=ct(j.minDamping,j.maxDamping,r),t=ct(j.minDuration,j.maxDuration,Z(t)),r<1?(i=c=>{const u=c*r,d=u*t,f=u-n,h=cn(c,r),m=Math.exp(-d);return ln-f/h*m},o=c=>{const d=c*r*t,f=d*n+n,h=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-d),p=cn(Math.pow(c,2),r);return(-i(c)+ln>0?-1:1)*((f-h)*m)/p}):(i=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-ln+u*d},o=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=yl(i,o,a);if(t=Q(t),isNaN(l))return{stiffness:j.stiffness,damping:j.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const gl=12;function yl(t,e,n){let s=n;for(let i=1;i<gl;i++)s=s-t(s)/e(s);return s}function cn(t,e){return t*Math.sqrt(1-e*e)}const bl=["duration","bounce"],xl=["stiffness","damping","mass"];function fi(t,e){return e.some(n=>t[n]!==void 0)}function vl(t){let e={velocity:j.velocity,stiffness:j.stiffness,damping:j.damping,mass:j.mass,isResolvedFromDuration:!1,...t};if(!fi(t,xl)&&fi(t,bl))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*ct(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:j.mass,stiffness:i,damping:o}}else{const n=pl(t);e={...e,...n,mass:j.mass},e.isResolvedFromDuration=!0}return e}function ge(t=j.visualDuration,e=j.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:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=vl({...n,velocity:-Z(n.velocity||0)}),m=f||0,p=c/(2*Math.sqrt(l*u)),g=r-o,b=Z(Math.sqrt(l/u)),T=Math.abs(g)<5;s||(s=T?j.restSpeed.granular:j.restSpeed.default),i||(i=T?j.restDelta.granular:j.restDelta.default);let w;if(p<1){const k=cn(b,p);w=V=>{const D=Math.exp(-p*b*V);return r-D*((m+p*b*g)/k*Math.sin(k*V)+g*Math.cos(k*V))}}else if(p===1)w=k=>r-Math.exp(-b*k)*(g+(m+b*g)*k);else{const k=b*Math.sqrt(p*p-1);w=V=>{const D=Math.exp(-p*b*V),y=Math.min(k*V,300);return r-D*((m+p*b*g)*Math.sinh(y)+k*g*Math.cosh(y))/k}}const M={calculatedDuration:h&&d||null,next:k=>{const V=w(k);if(h)a.done=k>=d;else{let D=k===0?m:0;p<1&&(D=k===0?Q(m):di(w,k,V));const y=Math.abs(D)<=s,N=Math.abs(r-V)<=i;a.done=y&&N}return a.value=a.done?r:V,a},toString:()=>{const k=Math.min(an(M),pe),V=ui(D=>M.next(k*D).value,k,30);return k+"ms "+V},toTransition:()=>{}};return M}ge.applyToOptions=t=>{const e=hl(t,100,ge);return t.ease=e.ease,t.duration=Q(e.duration),t.type="keyframes",t};function un({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=t[0],f={done:!1,value:d},h=y=>a!==void 0&&y<a||l!==void 0&&y>l,m=y=>a===void 0?l:l===void 0||Math.abs(a-y)<Math.abs(l-y)?a:l;let p=n*e;const g=d+p,b=r===void 0?g:r(g);b!==g&&(p=b-d);const T=y=>-p*Math.exp(-y/s),w=y=>b+T(y),M=y=>{const N=T(y),U=w(y);f.done=Math.abs(N)<=c,f.value=f.done?b:U};let k,V;const D=y=>{h(f.value)&&(k=y,V=ge({keyframes:[f.value,m(f.value)],velocity:di(w,y,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return D(0),{calculatedDuration:null,next:y=>{let N=!1;return!V&&k===void 0&&(N=!0,M(y),D(y)),k!==void 0&&y>=k?V.next(y-k):(!N&&M(y),f)}}}function wl(t,e,n){const s=[],i=n||dt.mix||ci,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]||q:e;a=Kt(l,a)}s.push(a)}return s}function Tl(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(ut(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=wl(e,s,i),l=a.length,c=u=>{if(r&&u<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(u<t[d+1]);d++);const f=Ht(t[d],t[d+1],u);return a[d](f)};return n?u=>c(ct(t[0],t[o-1],u)):c}function Sl(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Ht(0,e,s);t.push(O(n,1,i))}}function Cl(t){const e=[0];return Sl(e,t.length-1),e}function Al(t,e){return t.map(n=>n*e)}function kl(t,e){return t.map(()=>e||Hs).splice(0,t.length-1)}function Nt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=ja(s)?s.map(Ye):Ye(s),o={done:!1,value:e[0]},r=Al(n&&n.length===e.length?n:Cl(e),t),a=Tl(r,e,{ease:Array.isArray(i)?i:kl(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Pl=t=>t!==null;function dn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Pl),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Vl={decay:un,inertia:un,tween:Nt,keyframes:Nt,spring:ge};function hi(t){typeof t.type=="string"&&(t.type=Vl[t.type])}class fn{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 Ml=t=>t/100;class hn extends fn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==X.now()&&this.tick(X.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;hi(e);const{type:n=Nt,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||Nt;process.env.NODE_ENV!=="production"&&l!==Nt&&ut(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Nt&&typeof a[0]!="number"&&(this.mixKeyframes=Kt(Ml,ci(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=an(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}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:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:m,onUpdate:p,finalKeyframe:g}=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 b=this.currentTime-c*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,M=s;if(d){const y=Math.min(this.currentTime,i)/a;let N=Math.floor(y),U=y%1;!U&&y>=1&&(U=1),U===1&&N--,N=Math.min(N,d+1),!!(N%2)&&(f==="reverse"?(U=1-U,h&&(U-=h/a)):f==="mirror"&&(M=r)),w=ct(0,1,U)*a}const k=T?{done:!1,value:u[0]}:M.next(w);o&&(k.value=o(k.value));let{done:V}=k;!T&&l!==null&&(V=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return D&&m!==un&&(k.value=dn(u,this.options,g,this.speed)),p&&p(k.value),D&&this.finish(),k}then(e,n){return this.finished.then(e,n)}get duration(){return Z(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Z(e)}get time(){return Z(this.currentTime)}set time(e){var n;e=Q(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),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(X.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Z(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=fl,startTime:n}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),(o=(i=this.options).onPlay)==null||o.call(i);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(X.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}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){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function Dl(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const wt=t=>t*180/Math.PI,mn=t=>{const e=wt(Math.atan2(t[1],t[0]));return pn(e)},El={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:mn,rotateZ:mn,skewX:t=>wt(Math.atan(t[1])),skewY:t=>wt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},pn=t=>(t=t%360,t<0&&(t+=360),t),mi=mn,pi=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),gi=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ll={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:pi,scaleY:gi,scale:t=>(pi(t)+gi(t))/2,rotateX:t=>pn(wt(Math.atan2(t[6],t[5]))),rotateY:t=>pn(wt(Math.atan2(-t[2],t[0]))),rotateZ:mi,rotate:mi,skewX:t=>wt(Math.atan(t[4])),skewY:t=>wt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function gn(t){return t.includes("scale")?1:0}function yn(t,e){if(!t||t==="none")return gn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Ll,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=El,i=a}if(!i)return gn(e);const o=s[e],r=i[1].split(",").map(Nl);return typeof o=="function"?o(r):r[o]}const Il=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return yn(n,e)};function Nl(t){return parseFloat(t.trim())}const Ft=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Bt=new Set(Ft),yi=t=>t===Lt||t===P,Fl=new Set(["x","y","z"]),Bl=Ft.filter(t=>!Fl.has(t));function Ol(t){const e=[];return Bl.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Tt={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})=>yn(e,"x"),y:(t,{transform:e})=>yn(e,"y")};Tt.translateX=Tt.x,Tt.translateY=Tt.y;const St=new Set;let bn=!1,xn=!1,vn=!1;function bi(){if(xn){const t=Array.from(St).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Ol(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])=>{var a;(a=s.getValue(o))==null||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}xn=!1,bn=!1,St.forEach(t=>t.complete(vn)),St.clear()}function xi(){St.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(xn=!0)})}function jl(){vn=!0,xi(),bi(),vn=!1}class wn{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?(St.add(this),bn||(bn=!0,B.read(xi),B.resolveKeyframes(bi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i==null?void 0: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])}Dl(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),St.delete(this)}cancel(){this.state==="scheduled"&&(St.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Rl=t=>t.startsWith("--");function zl(t,e,n){Rl(e)?t.style.setProperty(e,n):t.style[e]=n}const $l=We(()=>window.ScrollTimeline!==void 0),Ul={};function _l(t,e){const n=We(t);return()=>Ul[e]??n()}const vi=_l(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Qt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,wi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qt([0,.65,.55,1]),circOut:Qt([.55,0,1,.45]),backIn:Qt([.31,.01,.66,-.59]),backOut:Qt([.33,1.53,.69,.99])};function Ti(t,e){if(t)return typeof t=="function"?vi()?ui(t,e):"ease-out":Xs(t)?Qt(t):Array.isArray(t)?t.map(n=>Ti(n,e)||wi.easeOut):wi[t]}function Wl(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const d=Ti(a,i);Array.isArray(d)&&(u.easing=d);const f={delay:s,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function Si(t){return typeof t=="function"&&"applyToOptions"in t}function Gl({type:t,...e}){return Si(t)&&vi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Kl extends fn{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,ut(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Gl(e);this.animation=Wl(n,s,i,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=dn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):zl(n,s,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}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(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return Z(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Z(e)}get time(){return Z(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Q(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}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&$l()?(this.animation.timeline=e,q):n(this)}}const Ci={anticipate:Ws,backInOut:_s,circInOut:Ks};function Hl(t){return t in Ci}function Xl(t){typeof t.ease=="string"&&Hl(t.ease)&&(t.ease=Ci[t.ease])}const Ai=10;class Yl extends Kl{constructor(e){Xl(e),hi(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 hn({...r,autoplay:!1}),l=Q(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Ai).value,a.sample(l).value,Ai),a.stop()}}const ki=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(yt.test(t)||t==="0")&&!t.startsWith("url("));function ql(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 Zl(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=ki(i,e),a=ki(o,e);return Et(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:ql(t)||(n==="spring"||Si(n))&&s}function Tn(t){t.duration=0,t.type="keyframes"}const Jl=new Set(["opacity","clipPath","filter","transform"]),Ql=We(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function tc(t){var u;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(((u=e==null?void 0:e.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return Ql()&&n&&Jl.has(n)&&(n!=="transform"||!c)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const ec=40;class nc extends fn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var m;super(),this.stop=()=>{var p,g;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=X.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:c,element:u,...d},h=(u==null?void 0:u.KeyframeResolver)||wn;this.keyframeResolver=new h(a,(p,g,b)=>this.onKeyframesResolved(p,g,f,!b),l,c,u),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=X.now(),Zl(e,o,r,a)||((dt.instantAnimations||!l)&&(u==null||u(dn(e,s,n))),e[0]=e[e.length-1],Tn(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ec?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},h=!c&&tc(f)?new Yl({...f,element:f.motionValue.owner.current}):new hn(f);h.finished.then(()=>this.notifyFinished()).catch(q),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.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(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const sc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ic(t){const e=sc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const rc=4;function Pi(t,e,n=1){ut(n<=rc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=ic(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Ns(r)?parseFloat(r):r}return Ze(i)?Pi(i,e,n+1):i}function Sn(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const Vi=new Set(["width","height","top","left","right","bottom",...Ft]),oc={test:t=>t==="auto",parse:t=>t},Mi=t=>e=>e.test(t),Di=[Lt,P,it,gt,qa,Ya,oc],Ei=t=>Di.find(Mi(t));function ac(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Bs(t):!0}const lc=new Set(["brightness","contrast","saturate","opacity"]);function cc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Je)||[];if(!s)return t;const i=n.replace(s,"");let o=lc.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const uc=/\b([a-z-]*)\(.*?\)/gu,Cn={...yt,getAnimatableNone:t=>{const e=t.match(uc);return e?e.map(cc).join(" "):t}},Li={...Lt,transform:Math.round},An={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,radius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,backgroundPositionX:P,backgroundPositionY:P,...{rotate:gt,rotateX:gt,rotateY:gt,rotateZ:gt,scale:he,scaleX:he,scaleY:he,scaleZ:he,skew:gt,skewX:gt,skewY:gt,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:Yt,originX:ti,originY:ti,originZ:P},zIndex:Li,fillOpacity:Yt,strokeOpacity:Yt,numOctaves:Li},dc={...An,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:Cn,WebkitFilter:Cn},Ii=t=>dc[t];function Ni(t,e){let n=Ii(t);return n!==Cn&&(n=yt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const fc=new Set(["auto","none","0"]);function hc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!fc.has(o)&&Jt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Ni(n,i)}class mc extends wn{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 c=e[l];if(typeof c=="string"&&(c=c.trim(),Ze(c))){const u=Pi(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Vi.has(s)||e.length!==2)return;const[i,o]=e,r=Ei(i),a=Ei(o);if(r!==a)if(yi(r)&&yi(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else Tt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||ac(e[i]))&&s.push(i);s.length&&hc(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=Tt[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(){var a;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]=Tt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{e.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function pc(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=(n==null?void 0:n[t])??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Fi=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Bi(t){return Fs(t)&&"offsetHeight"in t}const Oi=30,gc=t=>!isNaN(parseFloat(t));class yc{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const i=X.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=X.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=gc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Ke(!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 Ge);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(){var e;(e=this.events.change)==null||e.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=X.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Oi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Oi);return Os(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(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ot(t,e){return new yc(t,e)}const{schedule:kn}=qs(queueMicrotask,!1),tt={x:!1,y:!1};function ji(){return tt.x||tt.y}function bc(t){return t==="x"||t==="y"?tt[t]?null:(tt[t]=!0,()=>{tt[t]=!1}):tt.x||tt.y?null:(tt.x=tt.y=!0,()=>{tt.x=tt.y=!1})}function Ri(t,e){const n=pc(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function zi(t){return!(t.pointerType==="touch"||ji())}function xc(t,e,n={}){const[s,i,o]=Ri(t,n),r=a=>{if(!zi(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=d=>{zi(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const $i=(t,e)=>e?t===e?!0:$i(t,e.parentElement):!1,Pn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,vc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function wc(t){return vc.has(t.tagName)||t.tabIndex!==-1}const ye=new WeakSet;function Ui(t){return e=>{e.key==="Enter"&&t(e)}}function Vn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Tc=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Ui(()=>{if(ye.has(n))return;Vn(n,"down");const i=Ui(()=>{Vn(n,"up")}),o=()=>Vn(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 _i(t){return Pn(t)&&!ji()}function Sc(t,e,n={}){const[s,i,o]=Ri(t,n),r=a=>{const l=a.currentTarget;if(!_i(a))return;ye.add(l);const c=e(l,a),u=(h,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ye.has(l)&&ye.delete(l),_i(h)&&typeof c=="function"&&c(h,{success:m})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||$i(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),Bi(a)&&(a.addEventListener("focus",c=>Tc(c,i)),!wc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Wi(t){return Fs(t)&&"ownerSVGElement"in t}function Cc(t){return Wi(t)&&t.tagName==="svg"}function Ac(t,e){if(t==="first")return 0;{const n=e-1;return t==="last"?n:n/2}}function Gi(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,o)=>{const r=typeof n=="number"?n:Ac(n,o),a=Math.abs(r-i);let l=t*a;if(s){const c=o*t;l=Ye(s)(l/c)*c}return e+l}}const G=t=>!!(t&&t.getVelocity),kc=[...Di,R,yt],Pc=t=>kc.find(Mi(t)),Mn=v.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Ki(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Vc(...t){return e=>{let n=!1;const s=t.map(i=>{const o=Ki(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():Ki(t[i],null)}}}}function Mc(...t){return st.useCallback(Vc(...t),t)}class Dc extends st.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=Bi(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 Ec({children:t,isPresent:e,anchorX:n,root:s}){const i=v.useId(),o=v.useRef(null),r=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=v.useContext(Mn),l=Mc(o,t==null?void 0:t.ref);return v.useInsertionEffect(()=>{const{width:c,height:u,top:d,left:f,right:h}=r.current;if(e||!o.current||!c||!u)return;const m=n==="left"?`left: ${f}`:`right: ${h}`;o.current.dataset.motionPopId=i;const p=document.createElement("style");a&&(p.nonce=a);const g=s??document.head;return g.appendChild(p),p.sheet&&p.sheet.insertRule(`
2
- [data-motion-pop-id="${i}"] {
3
- position: absolute !important;
4
- width: ${c}px !important;
5
- height: ${u}px !important;
6
- ${m}px !important;
7
- top: ${d}px !important;
8
- }
9
- `),()=>{g.contains(p)&&g.removeChild(p)}},[e]),x.jsx(Dc,{isPresent:e,childRef:o,sizeRef:r,children:st.cloneElement(t,{ref:l})})}const Lc=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const c=Re(Ic),u=v.useId();let d=!0,f=v.useMemo(()=>(d=!1,{id:u,initial:e,isPresent:n,custom:i,onExitComplete:h=>{c.set(h,!0);for(const m of c.values())if(!m)return;s&&s()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[n,c,s]);return o&&d&&(f={...f}),v.useMemo(()=>{c.forEach((h,m)=>c.set(m,!1))},[n]),st.useEffect(()=>{!n&&!c.size&&s&&s()},[n]),r==="popLayout"&&(t=x.jsx(Ec,{isPresent:n,anchorX:a,root:l,children:t})),x.jsx(ue.Provider,{value:f,children:t})};function Ic(){return new Map}function Hi(t=!0){const e=v.useContext(ue);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=v.useId();v.useEffect(()=>{if(t)return i(o)},[t]);const r=v.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const be=t=>t.key||"";function Xi(t){const e=[];return v.Children.forEach(t,n=>{v.isValidElement(n)&&e.push(n)}),e}const Yi=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[c,u]=Hi(r),d=v.useMemo(()=>Xi(t),[t]),f=r&&!c?[]:d.map(be),h=v.useRef(!0),m=v.useRef(d),p=Re(()=>new Map),[g,b]=v.useState(d),[T,w]=v.useState(d);Is(()=>{h.current=!1,m.current=d;for(let V=0;V<T.length;V++){const D=be(T[V]);f.includes(D)?p.delete(D):p.get(D)!==!0&&p.set(D,!1)}},[T,f.length,f.join("-")]);const M=[];if(d!==g){let V=[...d];for(let D=0;D<T.length;D++){const y=T[D],N=be(y);f.includes(N)||(V.splice(D,0,y),M.push(y))}return o==="wait"&&M.length&&(V=M),w(Xi(V)),b(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&T.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:k}=v.useContext(je);return x.jsx(x.Fragment,{children:T.map(V=>{const D=be(V),y=r&&!c?!1:d===T||f.includes(D),N=()=>{if(p.has(D))p.set(D,!0);else return;let U=!0;p.forEach(nt=>{nt||(U=!1)}),U&&(k==null||k(),w(m.current),r&&(u==null||u()),s&&s())};return x.jsx(Lc,{isPresent:y,initial:!h.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:y?void 0:N,anchorX:a,children:V},D)})})},qi=v.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"]},jt={};for(const t in Zi)jt[t]={isEnabled:e=>Zi[t].some(n=>!!e[n])};function Nc(t){for(const e in t)jt[e]={...jt[e],...t[e]}}const Fc=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 xe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Fc.has(t)}let Ji=t=>!xe(t);function Bc(t){typeof t=="function"&&(Ji=e=>e.startsWith("on")?!xe(e):t(e))}try{Bc(require("@emotion/is-prop-valid").default)}catch{}function Oc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ji(i)||n===!0&&xe(i)||!e&&!xe(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const ve=v.createContext({});function we(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function te(t){return typeof t=="string"||Array.isArray(t)}const Dn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],En=["initial",...Dn];function Te(t){return we(t.animate)||En.some(e=>te(t[e]))}function Qi(t){return!!(Te(t)||t.variants)}function jc(t,e){if(Te(t)){const{initial:n,animate:s}=t;return{initial:n===!1||te(n)?n:void 0,animate:te(s)?s:void 0}}return t.inherit!==!1?e:{}}function Rc(t){const{initial:e,animate:n}=jc(t,v.useContext(ve));return v.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 ee={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(P.test(t))t=parseFloat(t);else return t;const n=er(t,e.target.x),s=er(t,e.target.y);return`${n}% ${s}%`}},zc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=yt.parse(t);if(i.length>5)return s;const o=yt.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 c=O(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}},Ln={borderRadius:{...ee,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ee,borderTopRightRadius:ee,borderBottomLeftRadius:ee,borderBottomRightRadius:ee,boxShadow:zc};function nr(t,{layout:e,layoutId:n}){return Bt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ln[t]||t==="opacity")}const $c={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Uc=Ft.length;function _c(t,e,n){let s="",i=!0;for(let o=0;o<Uc;o++){const r=Ft[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 c=Fi(a,An[r]);if(!l){i=!1;const u=$c[r]||r;s+=`${u}(${c}) `}n&&(e[r]=c)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function In(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const c=e[l];if(Bt.has(l)){r=!0;continue}else if(Js(l)){i[l]=c;continue}else{const u=Fi(c,An[l]);l.startsWith("origin")?(a=!0,o[l]=u):s[l]=u}}if(e.transform||(r||n?s.transform=_c(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;s.transformOrigin=`${l} ${c} ${u}`}}const Nn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sr(t,e,n){for(const s in e)!G(e[s])&&!nr(s,n)&&(t[s]=e[s])}function Wc({transformTemplate:t},e){return v.useMemo(()=>{const n=Nn();return In(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Gc(t,e){const n=t.style||{},s={};return sr(s,n,t),Object.assign(s,Wc(t,e)),s}function Kc(t,e){const n={},s=Gc(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 Hc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Xc={offset:"strokeDashoffset",array:"strokeDasharray"};function Yc(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Hc:Xc;t[o.offset]=P.transform(-s);const r=P.transform(e),a=P.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,c,u){if(In(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:f}=t;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.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&&Yc(d,i,o,r,!1)}const rr=()=>({...Nn(),attrs:{}}),or=t=>typeof t=="string"&&t.toLowerCase()==="svg";function qc(t,e,n,s){const i=v.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 Zc=["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 Fn(t){return typeof t!="string"||t.includes("-")?!1:!!(Zc.indexOf(t)>-1||/[A-Z]/u.test(t))}function Jc(t,e,n,{latestValues:s},i,o=!1){const a=(Fn(t)?qc:Kc)(e,s,i,t),l=Oc(e,typeof t=="string",o),c=t!==v.Fragment?{...l,...a,ref:n}:{},{children:u}=e,d=v.useMemo(()=>G(u)?u.get():u,[u]);return v.createElement(t,{...c,children:d})}function ar(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Bn(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 Se(t){return G(t)?t.get():t}function Qc({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:tu(n,s,i,t),renderState:e()}}function tu(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Se(o[f]);let{initial:r,animate:a}=t;const l=Te(t),c=Qi(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const d=u?a:r;if(d&&typeof d!="boolean"&&!we(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const m=Bn(t,f[h]);if(m){const{transitionEnd:p,transition:g,...b}=m;for(const T in b){let w=b[T];if(Array.isArray(w)){const M=u?w.length-1:0;w=w[M]}w!==null&&(i[T]=w)}for(const T in p)i[T]=p[T]}}}return i}const lr=t=>(e,n)=>{const s=v.useContext(ve),i=v.useContext(ue),o=()=>Qc(t,e,s,i);return n?o():Re(o)};function On(t,e,n){var o;const{style:s}=t,i={};for(const r in s)(G(s[r])||e.style&&G(e.style[r])||nr(r,t)||((o=n==null?void 0:n.getValue(r))==null?void 0:o.liveStyle)!==void 0)&&(i[r]=s[r]);return i}const eu=lr({scrapeMotionValuesFromProps:On,createRenderState:Nn});function cr(t,e,n){const s=On(t,e,n);for(const i in t)if(G(t[i])||G(e[i])){const o=Ft.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const nu=lr({scrapeMotionValuesFromProps:cr,createRenderState:rr}),su=Symbol.for("motionComponentSymbol");function Rt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function iu(t,e,n){return v.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):Rt(n)&&(n.current=s))},[e])}const jn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ur="data-"+jn("framerAppearId"),dr=v.createContext({});function ru(t,e,n,s,i){var p,g;const{visualElement:o}=v.useContext(ve),r=v.useContext(qi),a=v.useContext(ue),l=v.useContext(Mn).reducedMotion,c=v.useRef(null);s=s||r.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=v.useContext(dr);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&ou(c.current,n,i,d);const f=v.useRef(!1);v.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const h=n[ur],m=v.useRef(!!h&&!((p=window.MotionHandoffIsComplete)!=null&&p.call(window,h))&&((g=window.MotionHasOptimisedAnimation)==null?void 0:g.call(window,h)));return Is(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),m.current&&u.animationState&&u.animationState.animateChanges())}),v.useEffect(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)==null||b.call(window,h)}),m.current=!1),u.enteringChildren=void 0)}),u}function ou(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:fr(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&Rt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:l,layoutRoot:c})}function fr(t){if(t)return t.options.allowProjection!==!1?t.projection:fr(t.parent)}function Rn(t,{forwardMotionProps:e=!1}={},n,s){n&&Nc(n);const i=Fn(t)?nu:eu;function o(a,l){let c;const u={...v.useContext(Mn),...a,layoutId:au(a)},{isStatic:d}=u,f=Rc(a),h=i(a,d);if(!d&&ze){lu(u,n);const m=cu(u);c=m.MeasureLayout,f.visualElement=ru(t,h,u,s,m.ProjectionNode)}return x.jsxs(ve.Provider,{value:f,children:[c&&f.visualElement?x.jsx(c,{visualElement:f.visualElement,...u}):null,Jc(t,a,iu(h,f.visualElement,l),h,d,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=v.forwardRef(o);return r[su]=t,r}function au({layoutId:t}){const e=v.useContext(je).id;return e&&t!==void 0?e+"-"+t:t}function lu(t,e){const n=v.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?Et(!1,s,"lazy-strict-mode"):ut(!1,s,"lazy-strict-mode")}}function cu(t){const{drag:e,layout:n}=jt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function uu(t,e){if(typeof Proxy>"u")return Rn;const n=new Map,s=(o,r)=>Rn(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&Ke(!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,Rn(r,void 0,t,e)),n.get(r))})}function hr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function du({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function fu(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 zn(t){return t===void 0||t===1}function $n({scale:t,scaleX:e,scaleY:n}){return!zn(t)||!zn(e)||!zn(n)}function Ct(t){return $n(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 Ce(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=Ce(t,i,s)),Ce(t,n,s)+e}function Un(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}){Un(t.x,e.translate,e.scale,e.originPoint),Un(t.y,n.translate,n.scale,n.originPoint)}const br=.999999999999,xr=1.0000000000001;function hu(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&&$t(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&&Ct(o.latestValues)&&$t(t,o.latestValues))}e.x<xr&&e.x>br&&(e.x=1),e.y<xr&&e.y>br&&(e.y=1)}function zt(t,e){t.min=t.min+e,t.max=t.max+e}function vr(t,e,n,s,i=.5){const o=O(t.min,t.max,i);Un(t,e,n,o,s)}function $t(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 hr(fu(t.getBoundingClientRect(),e))}function mu(t,e,n){const s=wr(t,n),{scroll:i}=e;return i&&(zt(s.x,i.offset.x),zt(s.y,i.offset.y)),s}const Tr=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ut=()=>({x:Tr(),y:Tr()}),Sr=()=>({min:0,max:0}),$=()=>({x:Sr(),y:Sr()}),_n={current:null},Cr={current:!1};function pu(){if(Cr.current=!0,!!ze)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_n.current=t.matches;t.addEventListener("change",e),e()}else _n.current=!1}const gu=new WeakMap;function yu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(G(i))t.addValue(s,i);else if(G(o))t.addValue(s,Ot(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,Ot(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 bu{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=wn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=X.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,B.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,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=Te(n),this.isVariantNode=Qi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&G(h)&&h.set(l[f])}}mount(e){var n;this.current=e,gu.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((s,i)=>this.bindToMotionValue(i,s)),Cr.current||pu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:_n.current,process.env.NODE_ENV!=="production"&&Ke(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),pt(this.notifyUpdate),pt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.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=Bt.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 jt){const n=jt[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):$()}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=yu(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=Ot(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)||Bs(s))?s=parseFloat(s):!Pc(s)&&yt.test(n)&&(s=Ni(e,n)),this.setBaseTarget(e,G(s)?s.get():s)),G(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=Bn(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!G(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 Ge),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){kn.render(this.render)}}class kr extends bu{constructor(){super(...arguments),this.KeyframeResolver=mc}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;G(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Pr(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i==null||i.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function xu(t){return window.getComputedStyle(t)}class vu extends kr{constructor(){super(...arguments),this.type="html",this.renderInstance=Pr}readValueFromInstance(e,n){var s;if(Bt.has(n))return(s=this.projection)!=null&&s.isProjecting?gn(n):Il(e,n);{const i=xu(e),o=(Js(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return wr(e,n)}build(e,n,s){In(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return On(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 wu(t,e,n,s){Pr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Vr.has(i)?i:jn(i),e.attrs[i])}class Tu extends kr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Bt.has(n)){const s=Ii(n);return s&&s.default||0}return n=Vr.has(n)?n:jn(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){wu(e,n,s,i)}mount(e){this.isSVGTag=or(e.tagName),super.mount(e)}}const Su=(t,e)=>Fn(t)?new Tu(e):new vu(e,{allowProjection:t!==v.Fragment});function _t(t,e,n){const s=t.getProps();return Bn(s,e,n!==void 0?n:s.custom,t)}const Wn=t=>Array.isArray(t);function Cu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ot(n))}function Au(t){return Wn(t)?t[t.length-1]||0:t}function ku(t,e){const n=_t(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Au(o[r]);Cu(t,r,a)}}function Pu(t){return!!(G(t)&&t.add)}function Gn(t,e){const n=t.getValue("willChange");if(Pu(n))return n.add(e);if(!n&&dt.WillChange){const s=new dt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Mr(t){return t.props[ur]}const Vu=t=>t!==null;function Mu(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Vu),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Du={type:"spring",stiffness:500,damping:25,restSpeed:10},Eu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Lu={type:"keyframes",duration:.8},Iu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Nu=(t,{keyframes:e})=>e.length>2?Lu:Bt.has(t)?t.startsWith("scale")?Eu(e[1]):Du:Iu;function Fu({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Kn=(t,e,n,s={},i,o)=>r=>{const a=Sn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-Q(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Fu(a)||Object.assign(u,Nu(t,u)),u.duration&&(u.duration=Q(u.duration)),u.repeatDelay&&(u.repeatDelay=Q(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Tn(u),u.delay===0&&(d=!0)),(dt.instantAnimations||dt.skipAnimations)&&(d=!0,Tn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&e.get()!==void 0){const f=Mu(u.keyframes,a);if(f!==void 0){B.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new hn(u):new nc(u)};function Bu({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Dr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const u in a){const d=t.getValue(u,t.latestValues[u]??null),f=a[u];if(f===void 0||c&&Bu(c,u))continue;const h={delay:n,...Sn(o||{},u)},m=d.get();if(m!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===m&&!h.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const b=Mr(t);if(b){const T=window.MotionHandoffAnimation(b,u,B);T!==null&&(h.startTime=T,p=!0)}}Gn(t,u),d.start(Kn(u,d,f,t.shouldReduceMotion&&Vi.has(u)?{type:!1}:h,t,p));const g=d.animation;g&&l.push(g)}return r&&Promise.all(l).then(()=>{B.update(()=>{r&&ku(t,r)})}),l}function Er(t,e,n,s=0,i=1){const o=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function Hn(t,e,n={}){var l;const s=_t(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Dr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return Ou(t,e,c,u,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[o,r]:[r,o];return c().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function Ou(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(Hn(l,e,{...r,delay:n+(typeof s=="function"?0:s)+Er(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function ju(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Hn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Hn(t,e,n);else{const i=typeof e=="function"?_t(t,e,n.custom):e;s=Promise.all(Dr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Lr(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 Ru=En.length;function Ir(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Ir(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Ru;n++){const s=En[n],i=t.props[s];(te(i)||i===!1)&&(e[s]=i)}return e}const zu=[...Dn].reverse(),$u=Dn.length;function Uu(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ju(t,n,s)))}function _u(t){let e=Uu(t),n=Nr(),s=!0;const i=l=>(c,u)=>{var f;const d=_t(t,u,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:m,...p}=d;c={...c,...p,...m}}return c};function o(l){e=l(t)}function r(l){const{props:c}=t,u=Ir(t.parent)||{},d=[],f=new Set;let h={},m=1/0;for(let g=0;g<$u;g++){const b=zu[g],T=n[b],w=c[b]!==void 0?c[b]:u[b],M=te(w),k=b===l?T.isActive:null;k===!1&&(m=g);let V=w===u[b]&&w!==c[b]&&M;if(V&&s&&t.manuallyAnimateOnMount&&(V=!1),T.protectedKeys={...h},!T.isActive&&k===null||!w&&!T.prevProp||we(w)||typeof w=="boolean")continue;const D=Wu(T.prevProp,w);let y=D||b===l&&T.isActive&&!V&&M||g>m&&M,N=!1;const U=Array.isArray(w)?w:[w];let nt=U.reduce(i(b),{});k===!1&&(nt={});const{prevResolvedValues:Pt={}}=T,Ve={...Pt,...nt},Wt=F=>{y=!0,f.has(F)&&(N=!0,f.delete(F)),T.needsAnimating[F]=!0;const A=t.getValue(F);A&&(A.liveStyle=!1)};for(const F in Ve){const A=nt[F],at=Pt[F];if(h.hasOwnProperty(F))continue;let ht=!1;Wn(A)&&Wn(at)?ht=!Lr(A,at):ht=A!==at,ht?A!=null?Wt(F):f.add(F):A!==void 0&&f.has(F)?Wt(F):T.protectedKeys[F]=!0}T.prevProp=w,T.prevResolvedValues=nt,T.isActive&&(h={...h,...nt}),s&&t.blockInitialAnimation&&(y=!1);const ft=V&&D;y&&(!ft||N)&&d.push(...U.map(F=>{const A={type:b};if(typeof F=="string"&&s&&!ft&&t.manuallyAnimateOnMount&&t.parent){const{parent:at}=t,ht=_t(at,F);if(at.enteringChildren&&ht){const{delayChildren:Me}=ht.transition||{};A.delay=Er(at.enteringChildren,t,Me)}}return{animation:F,options:A}}))}if(f.size){const g={};if(typeof c.initial!="boolean"){const b=_t(t,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(g.transition=b.transition)}f.forEach(b=>{const T=t.getBaseTarget(b),w=t.getValue(b);w&&(w.liveStyle=!0),g[b]=T??null}),d.push({animation:g})}let p=!!d.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,p?e(d):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=t.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;const u=r(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Nr()}}}function Wu(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Lr(e,t):!1}function At(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Nr(){return{animate:At(!0),whileInView:At(),whileHover:At(),whileTap:At(),whileDrag:At(),whileFocus:At(),exit:At()}}class bt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Gu extends bt{constructor(e){super(e),e.animationState||(e.animationState=_u(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();we(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(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let Ku=0;class Hu extends bt{constructor(){super(...arguments),this.id=Ku++}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 Xu={animation:{Feature:Gu},exit:{Feature:Hu}};function ne(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function se(t){return{point:{x:t.pageX,y:t.pageY}}}const Yu=t=>e=>Pn(e)&&t(e,se(e));function ie(t,e,n,s){return ne(t,e,Yu(n),s)}const Fr=1e-4,qu=1-Fr,Zu=1+Fr,Br=.01,Ju=0-Br,Qu=0+Br;function K(t){return t.max-t.min}function td(t,e,n){return Math.abs(t-e)<=n}function Or(t,e,n,s=.5){t.origin=s,t.originPoint=O(e.min,e.max,t.origin),t.scale=K(n)/K(e),t.translate=O(n.min,n.max,t.origin)-t.originPoint,(t.scale>=qu&&t.scale<=Zu||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ju&&t.translate<=Qu||isNaN(t.translate))&&(t.translate=0)}function re(t,e,n,s){Or(t.x,e.x,n.x,s?s.originX:void 0),Or(t.y,e.y,n.y,s?s.originY:void 0)}function jr(t,e,n){t.min=n.min+e.min,t.max=t.min+K(e)}function ed(t,e,n){jr(t.x,e.x,n.x),jr(t.y,e.y,n.y)}function Rr(t,e,n){t.min=e.min-n.min,t.max=t.min+K(e)}function Ae(t,e,n){Rr(t.x,e.x,n.x),Rr(t.y,e.y,n.y)}function J(t){return[t("x"),t("y")]}const zr=({current:t})=>t?t.ownerDocument.defaultView:null,$r=(t,e)=>Math.abs(t-e);function nd(t,e){const n=$r(t.x,e.x),s=$r(t.y,e.y);return Math.sqrt(n**2+s**2)}class Ur{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 f=Yn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=nd(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:p}=f,{timestamp:g}=W;this.history.push({...p,timestamp:g});const{onStart:b,onMove:T}=this.handlers;h||(b&&b(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Xn(h,this.transformPagePoint),B.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:m,onSessionEnd:p,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Yn(f.type==="pointercancel"?this.lastMoveEventInfo:Xn(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,b),p&&p(f,b)},!Pn(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=se(e),l=Xn(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=W;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(e,Yn(l,this.history)),this.removeListeners=Kt(ie(this.contextWindow,"pointermove",this.handlePointerMove),ie(this.contextWindow,"pointerup",this.handlePointerUp),ie(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),pt(this.updatePoint)}}function Xn(t,e){return e?{point:e(t.point)}:t}function _r(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Yn({point:t},e){return{point:t,delta:_r(t,Wr(e)),offset:_r(t,sd(e)),velocity:id(e,.1)}}function sd(t){return t[0]}function Wr(t){return t[t.length-1]}function id(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>Q(e)));)n--;if(!s)return{x:0,y:0};const o=Z(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 rd(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?O(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?O(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 od(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 ad(t,e){return{x:Kr(t.x,e.x),y:Kr(t.y,e.y)}}function ld(t,e){let n=.5;const s=K(t),i=K(e);return i>s?n=Ht(e.min,e.max-s,t.min):s>i&&(n=Ht(t.min,t.max-i,e.min)),ct(0,1,n)}function cd(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 qn=.35;function ud(t=qn){return t===!1?t=0:t===!0&&(t=qn),{x:Hr(t,"left","right"),y:Hr(t,"top","bottom")}}function Hr(t,e,n){return{min:Xr(t,e),max:Xr(t,n)}}function Xr(t,e){return typeof t=="number"?t:t[e]||0}const dd=new WeakMap;class fd{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=$(),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:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(se(d).point)},r=(d,f)=>{const{drag:h,dragPropagation:m,onDragStart:p}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bc(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),J(b=>{let T=this.getAxisMotionValue(b).get()||0;if(it.test(T)){const{projection:w}=this.visualElement;if(w&&w.layout){const M=w.layout.layoutBox[b];M&&(T=K(M)*(parseFloat(T)/100))}}this.originPoint[b]=T}),p&&B.postRender(()=>p(d,f)),Gn(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:p,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=f;if(m&&this.currentDirection===null){this.currentDirection=hd(b),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),g&&g(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>J(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Ur(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:zr(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||!ke(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=rd(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&Rt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=od(s.layoutBox,e):this.constraints=!1,this.elastic=ud(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&J(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=cd(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Rt(e))return!1;const s=e.current;ut(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=mu(s,i.root,this.visualElement.getTransformPagePoint());let r=ad(i.layout.layoutBox,o);if(n){const a=n(du(r));this.hasMutatedConstraints=!!a,a&&(r=hr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=J(u=>{if(!ke(u,n,this.currentDirection))return;let d=l&&l[u]||{};r&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Gn(this.visualElement,e),s.start(Kn(e,s,0,n,this.visualElement,!1))}stopAnimation(){J(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){J(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.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){J(n=>{const{drag:s}=this.getProps();if(!ke(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]-O(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Rt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};J(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=ld({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(),J(r=>{if(!ke(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(O(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;dd.set(this.visualElement,this);const e=this.visualElement.current,n=ie(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();Rt(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=ne(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(J(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].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=qn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function ke(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function hd(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class md extends bt{constructor(e){super(e),this.removeGroupControls=q,this.removeListeners=q,this.controls=new fd(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||q}unmount(){this.removeGroupControls(),this.removeListeners()}}const Yr=t=>(e,n)=>{t&&B.postRender(()=>t(e,n))};class pd extends bt{constructor(){super(...arguments),this.removePointerDownListener=q}onPointerDown(e){this.session=new Ur(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:zr(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Yr(e),onStart:Yr(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&B.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=ie(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 Pe={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Zn=!1;class gd extends v.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),Zn&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Pe.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Zn=!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(),kn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Zn=!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=v.useContext(je);return x.jsx(gd,{...t,layoutGroup:s,switchLayoutGroup:v.useContext(dr),isPresent:e,safeToRemove:n})}function yd(t,e,n){const s=G(t)?t:Ot(t);return s.start(Kn("",s,e,n)),s.animation}const bd=(t,e)=>t.depth-e.depth;class xd{constructor(){this.children=[],this.isDirty=!1}add(e){$e(this.children,e),this.isDirty=!0}remove(e){Ue(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(bd),this.isDirty=!1,this.children.forEach(e)}}function vd(t,e){const n=X.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(pt(s),t(o-e))};return B.setup(s,!0),()=>pt(s)}const Zr=["TopLeft","TopRight","BottomLeft","BottomRight"],wd=Zr.length,Jr=t=>typeof t=="string"?parseFloat(t):t,Qr=t=>typeof t=="number"||P.test(t);function Td(t,e,n,s,i,o){i?(t.opacity=O(0,n.opacity??1,Sd(s)),t.opacityExit=O(e.opacity??1,0,Cd(s))):o&&(t.opacity=O(e.opacity??1,n.opacity??1,s));for(let r=0;r<wd;r++){const a=`border${Zr[r]}Radius`;let l=to(e,a),c=to(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Qr(l)===Qr(c)?(t[a]=Math.max(O(Jr(l),Jr(c),s),0),(it.test(c)||it.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=O(e.rotate||0,n.rotate||0,s))}function to(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Sd=eo(0,.5,Gs),Cd=eo(.5,.95,q);function eo(t,e,n){return s=>s<t?0:s>e?1:n(Ht(t,e,s))}function no(t,e){t.min=e.min,t.max=e.max}function et(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=Ce(t,1/n,s),i!==void 0&&(t=Ce(t,1/i,s)),t}function Ad(t,e=0,n=1,s=.5,i,o=t,r=t){if(it.test(e)&&(e=parseFloat(e),e=O(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=O(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){Ad(t,e[n],e[s],e[i],e.scale,o,r)}const kd=["x","scaleX","originX"],Pd=["y","scaleY","originY"];function oo(t,e,n,s){ro(t.x,e,kd,n?n.x:void 0,s?s.x:void 0),ro(t.y,e,Pd,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 Vd(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 fo(t,e){return uo(t.x,e.x)&&uo(t.y,e.y)}function ho(t){return K(t.x)/K(t.y)}function mo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Md{constructor(){this.members=[]}add(e){$e(this.members,e),e.scheduleRender()}remove(e){if(Ue(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 Dd(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0: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:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),d&&(s+=`rotateX(${d}deg) `),f&&(s+=`rotateY(${f}deg) `),h&&(s+=`skewX(${h}deg) `),m&&(s+=`skewY(${m}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 Jn=["","X","Y","Z"],Ed=1e3;let Ld=0;function Qn(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=Mr(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==null?void 0:e()){this.id=Ld++,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(Fd),this.nodes.forEach(Rd),this.nodes.forEach(zd),this.nodes.forEach(Bd)},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 xd)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Ge),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=Wi(r)&&!Cc(r),this.instance=r;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;B.read(()=>{d=window.innerWidth}),t(r,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=vd(f,250),Pe.hasAnimatedSinceResize&&(Pe.hasAnimatedSinceResize=!1,this.nodes.forEach(xo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||Gd,{onLayoutAnimationStart:p,onLayoutAnimationComplete:g}=c.getProps(),b=!this.targetLayout||!fo(this.targetLayout,h),T=!d&&f;if(this.options.layoutRoot||this.resumeFrom||T||d&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Sn(m,"layout"),onPlay:p,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,T)}else d||xo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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(),pt(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($d),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 u=0;u<this.path.length;u++){const d=this.path[u];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 c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(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(bo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(jd),this.nodes.forEach(Id),this.nodes.forEach(Nd)):this.nodes.forEach(bo),this.clearAllSnapshots();const a=X.now();W.delta=ct(0,1e3/60,a-W.timestamp),W.timestamp=a,W.isProcessing=!0,qe.update.process(W),qe.preRender.process(W),qe.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,kn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Od),this.sharedNodes.forEach(Ud)}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&&!K(this.snapshot.measuredBox.x)&&!K(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=$(),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(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||Ct(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Kd(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:r}=this.options;if(!r)return $();const a=r.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(Hd))){const{scroll:u}=this.root;u&&(zt(a.x,u.offset.x),zt(a.y,u.offset.y))}return a}removeElementScroll(r){var l;const a=$();if(et(a,r),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&et(a,r),zt(a.x,d.offset.x),zt(a.y,d.offset.y))}return a}applyTransform(r,a=!1){const l=$();et(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&$t(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ct(u.latestValues)&&$t(l,u.latestValues)}return Ct(this.latestValues)&&$t(l,this.latestValues),l}removeTransform(r){const a=$();et(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ct(c.latestValues))continue;$n(c.latestValues)&&c.updateSnapshot();const u=$(),d=c.measurePageBox();et(u,d),oo(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ct(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!==W.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var h;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||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=W.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=$(),this.targetWithTransforms=$()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ed(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):et(this.target,this.layout.layoutBox),yr(this.target,this.targetDelta)):et(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||$n(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=$(),this.relativeTargetOrigin=$(),Ae(this.relativeTargetOrigin,a,l),et(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===W.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;et(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;hu(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=$());const{target:h}=r;if(!h){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)),re(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!mo(this.projectionDelta.x,this.prevProjectionDelta.x)||!mo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ut(),this.projectionDelta=Ut(),this.projectionDeltaWithTransform=Ut()}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Ut();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=$(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=h!==m,g=this.getStack(),b=!g||g.members.length<=1,T=!!(p&&!b&&this.options.crossfade===!0&&!this.path.some(Wd));this.animationProgress=0;let w;this.mixTargetDelta=M=>{const k=M/1e3;vo(d.x,r.x,k),vo(d.y,r.y,k),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ae(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_d(this.relativeTarget,this.relativeTargetOrigin,f,k),w&&Vd(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=$()),et(w,this.relativeTarget)),p&&(this.animationValues=u,Td(u,c,this.latestValues,k,T,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(pt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=B.update(()=>{Pe.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ot(0)),this.currentAnimation=yd(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),r.onUpdate&&r.onUpdate(u)},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(Ed),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&Ao(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||$();const d=K(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const f=K(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}et(a,l),$t(a,u),re(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Md),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var a;const{layoutId:r}=this.options;return r?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:r}=this.options;return r?(a=this.getStack())==null?void 0:a.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 c=this.getStack();c&&c.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 c={};l.z&&Qn("z",r,c,this.animationValues);for(let u=0;u<Jn.length;u++)Qn(`rotate${Jn[u]}`,r,c,this.animationValues),Qn(`skew${Jn[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);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=Se(a==null?void 0:a.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Se(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Ct(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=Dd(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),r.transform=d;const{x:f,y:h}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in Ln){if(u[m]===void 0)continue;const{correct:p,applyTo:g,isCSSVariable:b}=Ln[m],T=d==="none"?u[m]:p(u[m],c);if(g){const w=g.length;for(let M=0;M<w;M++)r[g[M]]=T}else b?this.options.visualElement.renderState.vars[m]=T:r[m]=T}this.options.layoutId&&(r.pointerEvents=c===this?Se(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(yo),this.root.sharedNodes.clear()}}}function Id(t){t.updateLayout()}function Nd(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=e.source!==t.layout.source;o==="size"?J(d=>{const f=r?e.measuredBox[d]:e.layoutBox[d],h=K(f);f.min=s[d].min,f.max=f.min+h}):Ao(o,e.layoutBox,s)&&J(d=>{const f=r?e.measuredBox[d]:e.layoutBox[d],h=K(s[d]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+h)});const a=Ut();re(a,s,e.layoutBox);const l=Ut();r?re(l,t.applyTransform(i,!0),e.measuredBox):re(l,s,e.layoutBox);const c=!lo(a);let u=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const m=$();Ae(m,e.layoutBox,f.layoutBox);const p=$();Ae(p,s,h.layoutBox),fo(m,p)||(u=!0),d.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Fd(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 Bd(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Od(t){t.clearSnapshot()}function yo(t){t.clearMeasurements()}function bo(t){t.isLayoutDirty=!1}function jd(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function xo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Rd(t){t.resolveTargetDelta()}function zd(t){t.calcProjection()}function $d(t){t.resetSkewAndRotation()}function Ud(t){t.removeLeadSnapshot()}function vo(t,e,n){t.translate=O(e.translate,0,n),t.scale=O(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function wo(t,e,n,s){t.min=O(e.min,n.min,s),t.max=O(e.max,n.max,s)}function _d(t,e,n,s){wo(t.x,e.x,n.x,s),wo(t.y,e.y,n.y,s)}function Wd(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Gd={duration:.45,ease:[.4,0,.1,1]},To=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),So=To("applewebkit/")&&!To("chrome/")?Math.round:q;function Co(t){t.min=So(t.min),t.max=So(t.max)}function Kd(t){Co(t.x),Co(t.y)}function Ao(t,e,n){return t==="position"||t==="preserve-aspect"&&!td(ho(e),ho(n),.2)}function Hd(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const Xd=go({attachResizeListener:(t,e)=>ne(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ts={current:void 0},ko=go({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ts.current){const t=new Xd({});t.mount(window),t.setOptions({layoutScroll:!0}),ts.current=t}return ts.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Yd={pan:{Feature:pd},drag:{Feature:md,ProjectionNode:ko,MeasureLayout:qr}};function Po(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,se(e)))}class qd extends bt{mount(){const{current:e}=this.node;e&&(this.unmount=xc(e,(n,s)=>(Po(this.node,s,"Start"),i=>Po(this.node,i,"End"))))}unmount(){}}class Zd extends bt{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=Kt(ne(this.node.current,"focus",()=>this.onFocus()),ne(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,se(e)))}class Jd extends bt{mount(){const{current:e}=this.node;e&&(this.unmount=Sc(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 es=new WeakMap,ns=new WeakMap,Qd=t=>{const e=es.get(t.target);e&&e(t)},tf=t=>{t.forEach(Qd)};function ef({root:t,...e}){const n=t||document;ns.has(n)||ns.set(n,{});const s=ns.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(tf,{root:t,...e})),s[i]}function nf(t,e,n){const s=ef(e);return es.set(t,n),s.observe(t),()=>{es.delete(t),s.unobserve(t)}}const sf={some:0,all:1};class rf extends bt{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:sf[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return nf(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(of(e,n))&&this.startObserver()}unmount(){}}function of({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const af={...Xu,...{inView:{Feature:rf},tap:{Feature:Jd},focus:{Feature:Zd},hover:{Feature:qd}},...Yd,...{layout:{ProjectionNode:ko,MeasureLayout:qr}}},rt=uu(af,Su);function lf({className:t,size:e=72,duration:n=2,primaryColor:s,secondaryColor:i,rotationsCount:o=5,thickness:r,ease:a="easeInOut",...l}){return n=n<.25?.25:n,x.jsx("div",{className:I("relative flex items-center justify-center",t),...l,role:"status","aria-label":"Loading",children:x.jsx(rt.div,{className:"relative rounded-full flex items-center justify-center overflow-hidden",style:{width:e,height:e,borderColor:s??"var(--primary)",borderTopColor:i??"var(--secondary)",borderWidth:r||e/6},animate:{rotate:o*360},transition:{ease:a,type:a==="linear"?void 0:"spring",duration:n,repeat:1/0}})})}function cf({className:t,primaryColor:e,primaryDuration:n=1,secondaryColor:s,secondaryDuration:i=.8,size:o=48,...r}){const a=o/2,l=o*.35,c=o*.2;return x.jsxs("div",{className:I("relative flex justify-center items-center",t),...r,style:{width:o,height:o},children:[x.jsx(rt.div,{className:"absolute top-0 left-1/2 rounded-full",style:{width:l,height:l,backgroundColor:e??"var(--primary)",x:"-50%",transformOrigin:`50% ${a}px`},animate:{rotate:360},transition:{duration:n,repeat:1/0,ease:"linear"}}),x.jsx(rt.div,{className:"absolute top-0 left-1/2 rounded-full",style:{width:c,height:c,backgroundColor:s??"var(--secondary)",x:"-50%",transformOrigin:`50% ${a}px`},animate:{rotate:-360},transition:{duration:i,repeat:1/0,ease:"linear"}})]})}function uf({className:t,color:e,dotsCount:n=3,duration:s=.7,gap:i=6,itemStagger:o=.2,jumpHeight:r=15,repeatDuration:a=.5,size:l=10,...c}){const u={animate:{transition:{delayChildren:Gi(o)}}},d={animate:{y:[0,-r,0],transition:{ease:"easeInOut",repeat:1/0,duration:s,repeatDelay:a}}};return x.jsx("div",{className:I("flex items-center justify-center",t),...c,role:"status","aria-label":"Loading",children:x.jsx(rt.div,{className:"flex flex-row w-full h-full",style:{gap:i},variants:u,initial:"initial",animate:"animate",children:Array.from({length:n}).map((f,h)=>x.jsx(rt.div,{variants:d,className:"rounded-full border border-border",style:{height:l,width:l,backgroundColor:e??"var(--primary)"}},h))})})}function df({className:t,barHeight:e,barWidth:n=16,color:s,duration:i,barCount:o=5,itemStagger:r=.15,...a}){const l=Math.max(10,e/4),c={initial:{opacity:0},animate:{opacity:1,transition:{delayChildren:Gi(r)}}},u={initial:{height:l},animate:{height:[l,e,l],transition:{ease:"easeInOut",repeat:1/0,duration:i||o*.3}}},d=Array.from({length:o},(f,h)=>h);return x.jsx("div",{className:I("relative flex items-center justify-center",t),role:"status","aria-label":"Loading",...a,children:x.jsx(rt.ul,{variants:c,initial:"initial",animate:"animate",className:"flex flex-row gap-4 h-full w-full items-center justify-center",style:{height:e},children:d.map(f=>x.jsx(rt.li,{variants:u,style:{backgroundColor:s??"var(--primary)",width:n,borderRadius:n/2}},f))})})}/**
1
+ (function(D,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],g):(D=typeof globalThis<"u"?globalThis:D||self,g(D.MyDesignSystem={},D.jsxRuntime,D.React,D.ReactDOM))})(this,(function(D,g,x,Bo){"use strict";function Oo(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 re=Oo(x);function os(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=os(t[e]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}function as(){for(var t,e,n=0,s="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=os(t))&&(s&&(s+=" "),s+=e);return s}const ls=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,cs=as,oe=(t,e)=>n=>{var s;if((e==null?void 0:e.variants)==null)return cs(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=e,r=Object.keys(i).map(c=>{const u=n==null?void 0:n[c],d=o==null?void 0:o[c];if(u===null)return null;const f=ls(u)||ls(d);return i[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(m=>{let[p,y]=m;return Array.isArray(y)?y.includes({...o,...a}[p]):{...o,...a}[p]===y})?[...c,d,f]:c},[]);return cs(t,r,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
10
2
  * @license lucide-react v0.562.0 - ISC
11
3
  *
12
4
  * This source code is licensed under the ISC license.
13
5
  * See the LICENSE file in the root directory of this source tree.
14
- */const ff=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),hf=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,s)=>s?s.toUpperCase():n.toLowerCase()),Mo=t=>{const e=hf(t);return e.charAt(0).toUpperCase()+e.slice(1)},Do=(...t)=>t.filter((e,n,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===n).join(" ").trim(),mf=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/**
6
+ */const jo=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ro=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,s)=>s?s.toUpperCase():n.toLowerCase()),us=t=>{const e=Ro(t);return e.charAt(0).toUpperCase()+e.slice(1)},ds=(...t)=>t.filter((e,n,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===n).join(" ").trim(),zo=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/**
15
7
  * @license lucide-react v0.562.0 - ISC
16
8
  *
17
9
  * This source code is licensed under the ISC license.
18
10
  * See the LICENSE file in the root directory of this source tree.
19
- */var pf={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"};/**
11
+ */var $o={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"};/**
20
12
  * @license lucide-react v0.562.0 - ISC
21
13
  *
22
14
  * This source code is licensed under the ISC license.
23
15
  * See the LICENSE file in the root directory of this source tree.
24
- */const gf=v.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:i="",children:o,iconNode:r,...a},l)=>v.createElement("svg",{ref:l,...pf,width:e,height:e,stroke:t,strokeWidth:s?Number(n)*24/Number(e):n,className:Do("lucide",i),...!o&&!mf(a)&&{"aria-hidden":"true"},...a},[...r.map(([c,u])=>v.createElement(c,u)),...Array.isArray(o)?o:[o]]));/**
16
+ */const Uo=x.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:i="",children:o,iconNode:r,...a},l)=>x.createElement("svg",{ref:l,...$o,width:e,height:e,stroke:t,strokeWidth:s?Number(n)*24/Number(e):n,className:ds("lucide",i),...!o&&!zo(a)&&{"aria-hidden":"true"},...a},[...r.map(([c,u])=>x.createElement(c,u)),...Array.isArray(o)?o:[o]]));/**
25
17
  * @license lucide-react v0.562.0 - ISC
26
18
  *
27
19
  * This source code is licensed under the ISC license.
28
20
  * See the LICENSE file in the root directory of this source tree.
29
- */const kt=(t,e)=>{const n=v.forwardRef(({className:s,...i},o)=>v.createElement(gf,{ref:o,iconNode:e,className:Do(`lucide-${ff(Mo(t))}`,`lucide-${t}`,s),...i}));return n.displayName=Mo(t),n};/**
21
+ */const bt=(t,e)=>{const n=x.forwardRef(({className:s,...i},o)=>x.createElement(Uo,{ref:o,iconNode:e,className:ds(`lucide-${jo(us(t))}`,`lucide-${t}`,s),...i}));return n.displayName=us(t),n};/**
30
22
  * @license lucide-react v0.562.0 - ISC
31
23
  *
32
24
  * This source code is licensed under the ISC license.
33
25
  * See the LICENSE file in the root directory of this source tree.
34
- */const yf=kt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
26
+ */const fs=bt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
35
27
  * @license lucide-react v0.562.0 - ISC
36
28
  *
37
29
  * This source code is licensed under the ISC license.
38
30
  * See the LICENSE file in the root directory of this source tree.
39
- */const bf=kt("circle-alert",[["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"}]]);/**
31
+ */const _o=bt("circle-alert",[["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"}]]);/**
40
32
  * @license lucide-react v0.562.0 - ISC
41
33
  *
42
34
  * This source code is licensed under the ISC license.
43
35
  * See the LICENSE file in the root directory of this source tree.
44
- */const xf=kt("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
36
+ */const Wo=bt("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
45
37
  * @license lucide-react v0.562.0 - ISC
46
38
  *
47
39
  * This source code is licensed under the ISC license.
48
40
  * See the LICENSE file in the root directory of this source tree.
49
- */const vf=kt("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
41
+ */const Ko=bt("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
50
42
  * @license lucide-react v0.562.0 - ISC
51
43
  *
52
44
  * This source code is licensed under the ISC license.
53
45
  * See the LICENSE file in the root directory of this source tree.
54
- */const wf=kt("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
46
+ */const Go=bt("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
55
47
  * @license lucide-react v0.562.0 - ISC
56
48
  *
57
49
  * This source code is licensed under the ISC license.
58
50
  * See the LICENSE file in the root directory of this source tree.
59
- */const Tf=kt("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
51
+ */const Ho=bt("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
60
52
  * @license lucide-react v0.562.0 - ISC
61
53
  *
62
54
  * This source code is licensed under the ISC license.
63
55
  * See the LICENSE file in the root directory of this source tree.
64
- */const Sf=kt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Cf={info:xf,warning:Tf,error:bf,success:yf,noData:wf},Af=oe("relative flex flex-col gap-2 items-start rounded-md border-2 p-4 w-full ",{variants:{variant:{info:"border-info-border bg-info-surface text-info-text",warning:"border-warning-border bg-warning-surface text-warning-text",error:"border-error-border bg-error-surface text-error-text",success:"border-success-border bg-success-surface text-success-text",noData:"border-text-secondary text-text"}},defaultVariants:{variant:"warning"}});function kf({className:t,ref:e,variant:n,children:s,icon:i,showIcon:o=!1,...r}){const a=Cf[n||"warning"];return x.jsxs("div",{className:I(Af({variant:n}),t),role:n==="error"?"alert":"status",ref:e,...r,children:[s,(o||i)&&x.jsx("div",{className:"absolute top-2 right-2",children:i||x.jsx(a,{size:22})})]})}function Pf({className:t,children:e,...n}){return x.jsx("h5",{className:I("font-bold leading-none tracking-tight",t),...n,children:e})}function Vf({className:t,children:e,...n}){return x.jsx("div",{className:I("text-sm opacity-90",t),...n,children:e})}const Eo=v.createContext(null);function Lo(){const t=v.useContext(Eo);if(!t)throw new Error("Dialog components (like DialogTrigger, DialogContent) must be used within a <Dialog> provider.");return t}function Io({children:t,open:e,onOpenChange:n,defaultOpen:s=!1}){const[i,o]=v.useState(s),r=e!==void 0,a=r?e:i,l=v.useCallback(c=>{r?n==null||n(c):o(c)},[r,n]);return x.jsx(Eo.Provider,{value:{open:a,onOpenChange:l},children:t})}function Mf({children:t,ref:e,variant:n,...s}){const{onOpenChange:i}=Lo();return x.jsx(ks,{onClick:()=>i(!0),ref:e,...s,variant:n,children:t})}const Df=oe("absolute flex flex-col bg-surface p-6 z-10 border-2 border-border",{variants:{position:{bottom:"w-full h-3/4 md:h-1/3 rounded-t-lg bottom-0",center:"relative w-[90%] h-[90%] md:w-1/2 md:h-1/3 rounded-lg",left:"w-[85%] md:w-1/3 h-full rounded-r-lg left-0 px-3",right:"w-[85%] md:w-1/3 h-full rounded-l-lg right-0 px-3",top:"w-full h-3/4 md:h-1/3 rounded-b-lg top-0"}},defaultVariants:{position:"center"}}),Ef={center:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:[0,1.05,1]},exit:{opacity:0,scale:.95},transition:{duration:.35,ease:"easeOut"}},bottom:{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{duration:.3,ease:"easeInOut"}},top:{initial:{y:"-100%"},animate:{y:0},exit:{y:"-100%"},transition:{duration:.3,ease:"easeInOut"}},left:{initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"},transition:{duration:.3,ease:"easeInOut"}},right:{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{duration:.3,ease:"easeInOut"}}};function No({className:t,ref:e,children:n,position:s,closeButton:i=!1,...o}){const{open:r,onOpenChange:a}=Lo();v.useEffect(()=>{function c(u){u.key==="Escape"&&a(!1)}return document.body.addEventListener("keydown",c),()=>document.body.removeEventListener("keydown",c)},[a]);const l=Ef[s??"center"];return zo.createPortal(x.jsx(Yi,{children:r&&x.jsxs(rt.div,{transition:{duration:.2},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center",children:[x.jsx("div",{className:"fixed inset-0 bg-black/70",onClick:()=>a(!1)}),x.jsxs(rt.div,{className:I(Df({position:s}),t),onClick:c=>c.stopPropagation(),role:"dialog","aria-modal":"true",...l,ref:e,...o,children:[n,i&&x.jsx("button",{className:"absolute top-4 right-4 hover:scale-105 hover:text-primary transition-all cursor-pointer",onClick:()=>a(!1),"aria-label":"Close dialog",children:x.jsx(Sf,{size:32})})]})]})}),document.body)}function Lf({className:t,children:e,ref:n,title:s,subtitle:i,...o}){return x.jsxs("div",{className:I("flex flex-col gap-1 border-b-2 border-text pb-1 mb-3",t),ref:n,...o,children:[s&&x.jsx("h3",{className:"font-bold text-xl",children:s}),i&&x.jsx("p",{className:"text-text-secondary text-lg",children:i}),e]})}function If({className:t,children:e,ref:n,text:s,...i}){return x.jsxs("div",{className:I("flex border-y-2 border-text p-2 my-2",t),ref:n,...i,children:[s&&x.jsx("p",{className:"w-full text-text italic text-center",children:s}),e]})}function Nf({className:t,children:e,...n}){return x.jsx("div",{className:I("flex-1 overflow-y-auto min-h-0",t),...n,children:e})}function Ff({className:t,children:e,ref:n,...s}){return x.jsx("div",{className:I("w-full flex flex-row justify-end items-center gap-4 bottom-0",t),ref:n,...s,children:e})}const Fo=768;function Bf(){return v.useSyncExternalStore(t=>{const e=window.matchMedia(`(max-width: ${Fo-1}px)`);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},()=>window.matchMedia(`(max-width: ${Fo-1}px)`).matches,()=>!1)}const Bo=v.createContext(null);function Oo(){const t=v.useContext(Bo);if(!t)throw new Error("useSidebar must be used within a <Sidebar> provider.");return t}function Of({children:t,collapsed:e,onCollapsedChange:n,defaultCollapsed:s=!1,mobileOpen:i,onMobileOpenChange:o}){const r=Bf(),[a,l]=v.useState(s),c=e!==void 0,u=c?e:a,[d,f]=v.useState(!1),h=i!==void 0,m=h?i:d,p=v.useCallback(w=>{c?n==null||n(w):l(w)},[c,n]),g=v.useCallback(w=>{h?o==null||o(w):f(w)},[h,o]),b=v.useCallback(()=>{r?g(!m):p(!u)},[r,m,g,u,p]),T=v.useMemo(()=>({collapsed:u,mobileOpen:m,setCollapsed:p,setMobileOpen:g,toggleSidebar:b,isMobile:r}),[u,m,p,g,b,r]);return x.jsx(Bo.Provider,{value:T,children:t})}function jf({children:t,className:e,side:n="left",width:s="16rem",collapsedWidth:i="3.5rem",dialogProps:o,ref:r,style:a,...l}){const{isMobile:c,collapsed:u,mobileOpen:d,setMobileOpen:f}=Oo();return c?x.jsx(Io,{open:d,onOpenChange:f,children:x.jsx(No,{position:n,closeButton:!1,...o,className:I("h-full bg-surface text-text border-border border-r",e,o==null?void 0:o.className),children:x.jsx("div",{className:"group/sidebar h-full flex flex-col","data-collapsed":"false",children:t})})}):x.jsx("aside",{ref:r,"data-collapsed":u,className:I("group/sidebar overflow-hidden inset-y-0 z-30 flex flex-col h-screen bg-surface border-border-strong transition-[width] duration-300 ease-in-out",n==="left"?"border-r left-0":"border-l right-0",e),style:{width:u?i:s,...a},...l,children:t})}function Rf({className:t,children:e,...n}){return x.jsx("div",{className:I("flex flex-col p-2 shrink-0 border-b-2 border-border",t),...n,children:e})}function zf({className:t,ref:e,children:n,...s}){return x.jsx("div",{ref:e,className:I("flex flex-col gap-2 flex-1 p-2",t),...s,children:n})}function $f({className:t,children:e,categoryTitle:n,icon:s,...i}){const o="group-data-[collapsed=true]/sidebar:hidden";return x.jsx("div",{className:I("flex flex-row items-center gap-2 rounded-md p-2 transition-all","justify-start",n?"mt-2":"cursor-pointer hover:bg-info-surface",t),...i,children:n?x.jsxs(x.Fragment,{children:[x.jsx("h4",{className:I("font-bold text-lg whitespace-nowrap overflow-hidden",o),children:e}),x.jsx("div",{className:I("hidden group-data-[collapsed=true]/sidebar:block"),children:s??x.jsx(vf,{strokeWidth:3})})]}):x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"shrink-0 flex items-center justify-center",children:s}),x.jsx("div",{className:I("whitespace-nowrap overflow-hidden transition-opacity duration-200",o),children:e})]})})}function Uf({className:t,children:e,...n}){return x.jsx("div",{className:I("flex flex-col p-2 mt-auto shrink-0 border-t-2 border-border",t),...n,children:e})}function _f({className:t,children:e,...n}){const{toggleSidebar:s}=Oo();return x.jsx("button",{title:"Toggle sidebar",className:I("p-2 rounded border border-border hover:bg-border transition-colors bg-border-subtle",t),onClick:()=>s(),...n,children:e})}function Wf({className:t,icon:e,errorText:n,suffix:s,disabled:i,ref:o,id:r,...a}){const l=v.useId(),u=`${r||l}-error`;return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:I("flex flex-row items-center gap-2 px-2 py-2 rounded-md border transition-all","bg-input-background text-text","focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-1 focus-within:ring-offset-background",i&&"opacity-50 cursor-not-allowed bg-disabled-surface",n&&!i?"border-error focus-within:ring-error":"border-border focus-within:ring-primary-focus",t),children:[e&&x.jsx("div",{className:"text-text flex pr-1 border-r-2 border-text",children:e}),x.jsx("input",{ref:o,"aria-invalid":!!n,"aria-describedby":n?u:void 0,className:`flex-1 w-full h-full bg-transparent outline-none placeholder:text-text-secondary file:bg-transparent file:border-0 file:text-sm file:font-medium ${i&&"cursor-not-allowed"}`,disabled:i,...a}),s&&x.jsx("div",{className:"flex shrink-0 text-text-secondary",children:s})]}),x.jsx(Yi,{mode:"wait",children:n&&x.jsx(rt.p,{id:u,initial:{opacity:0,y:-10,height:0},animate:{opacity:1,y:0,height:"auto"},exit:{opacity:0,y:-10,height:0},className:"mt-1 text-sm text-error-text font-medium ml-1",role:"alert",children:n})})]})}L.Alert=kf,L.AlertMessage=Vf,L.AlertTitle=Pf,L.Button=ks,L.Card=Ps,L.CardContent=Es,L.CardDescription=Ds,L.CardFooter=Ls,L.CardHeader=Vs,L.CardTitle=Ms,L.Dialog=Io,L.DialogBody=Nf,L.DialogButtons=Ff,L.DialogContent=No,L.DialogFooter=If,L.DialogHeader=Lf,L.DialogTrigger=Mf,L.Dots=uf,L.Input=Wf,L.Orbital=cf,L.ScreenLoader=df,L.Sidebar=Of,L.SidebarBody=zf,L.SidebarContent=jf,L.SidebarFooter=Uf,L.SidebarHeader=Rf,L.SidebarItem=$f,L.SidebarTrigger=_f,L.Spinner=lf,L.Text=Ea,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));
56
+ */const Xo=bt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Yo=(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},qo=(t,e)=>({classGroupId:t,validator:e}),hs=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),ae="-",ms=[],Zo="arbitrary..",Jo=t=>{const e=ta(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return Qo(r);const a=r.split(ae),l=a[0]===""&&a.length>1?1:0;return ps(a,l,e)},getConflictingClassGroupIds:(r,a)=>{if(a){const l=s[r],c=n[r];return l?c?Yo(c,l):l:c||ms}return n[r]||ms}}},ps=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const i=t[e],o=n.nextPart.get(i);if(o){const c=ps(t,e+1,o);if(c)return c}const r=n.validators;if(r===null)return;const a=e===0?t.join(ae):t.slice(e).join(ae),l=r.length;for(let c=0;c<l;c++){const u=r[c];if(u.validator(a))return u.classGroupId}},Qo=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?Zo+s:void 0})(),ta=t=>{const{theme:e,classGroups:n}=t;return ea(n,e)},ea=(t,e)=>{const n=hs();for(const s in t){const i=t[s];Ne(i,n,s,e)}return n},Ne=(t,e,n,s)=>{const i=t.length;for(let o=0;o<i;o++){const r=t[o];na(r,e,n,s)}},na=(t,e,n,s)=>{if(typeof t=="string"){sa(t,e,n);return}if(typeof t=="function"){ia(t,e,n,s);return}ra(t,e,n,s)},sa=(t,e,n)=>{const s=t===""?e:gs(e,t);s.classGroupId=n},ia=(t,e,n,s)=>{if(oa(t)){Ne(t(s),e,n,s);return}e.validators===null&&(e.validators=[]),e.validators.push(qo(n,t))},ra=(t,e,n,s)=>{const i=Object.entries(t),o=i.length;for(let r=0;r<o;r++){const[a,l]=i[r];Ne(l,gs(e,a),n,s)}},gs=(t,e)=>{let n=t;const s=e.split(ae),i=s.length;for(let o=0;o<i;o++){const r=s[o];let a=n.nextPart.get(r);a||(a=hs(),n.nextPart.set(r,a)),n=a}return n},oa=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,aa=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)}}},Fe="!",ys=":",la=[],bs=(t,e,n,s,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),ca=t=>{const{prefix:e,experimentalParseClassName:n}=t;let s=i=>{const o=[];let r=0,a=0,l=0,c;const u=i.length;for(let p=0;p<u;p++){const y=i[p];if(r===0&&a===0){if(y===ys){o.push(i.slice(l,p)),l=p+1;continue}if(y==="/"){c=p;continue}}y==="["?r++:y==="]"?r--:y==="("?a++:y===")"&&a--}const d=o.length===0?i:i.slice(l);let f=d,h=!1;d.endsWith(Fe)?(f=d.slice(0,-1),h=!0):d.startsWith(Fe)&&(f=d.slice(1),h=!0);const m=c&&c>l?c-l:void 0;return bs(o,h,f,m)};if(e){const i=e+ys,o=s;s=r=>r.startsWith(i)?o(r.slice(i.length)):bs(la,!1,r,void 0,!0)}if(n){const i=s;s=o=>n({className:o,parseClassName:i})}return s},ua=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}},da=t=>({cache:aa(t.cacheSize),parseClassName:ca(t),sortModifiers:ua(t),...Jo(t)}),fa=/\s+/,ha=(t,e)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:o}=e,r=[],a=t.trim().split(fa);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let y=!!p,v=s(y?m.substring(0,p):m);if(!v){if(!y){l=u+(l.length>0?" "+l:l);continue}if(v=s(m),!v){l=u+(l.length>0?" "+l:l);continue}y=!1}const T=f.length===0?"":f.length===1?f[0]:o(f).join(":"),w=h?T+Fe:T,M=w+v;if(r.indexOf(M)>-1)continue;r.push(M);const A=i(v,y);for(let V=0;V<A.length;++V){const E=A[V];r.push(w+E)}l=u+(l.length>0?" "+l:l)}return l},ma=(...t)=>{let e=0,n,s,i="";for(;e<t.length;)(n=t[e++])&&(s=vs(n))&&(i&&(i+=" "),i+=s);return i},vs=t=>{if(typeof t=="string")return t;let e,n="";for(let s=0;s<t.length;s++)t[s]&&(e=vs(t[s]))&&(n&&(n+=" "),n+=e);return n},pa=(t,...e)=>{let n,s,i,o;const r=l=>{const c=e.reduce((u,d)=>d(u),t());return n=da(c),s=n.cache.get,i=n.cache.set,o=a,a(l)},a=l=>{const c=s(l);if(c)return c;const u=ha(l,n);return i(l,u),u};return o=r,(...l)=>o(ma(...l))},ga=[],z=t=>{const e=n=>n[t]||ga;return e.isThemeGetter=!0,e},xs=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ws=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ya=/^\d+\/\d+$/,ba=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,va=/\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$/,xa=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wa=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ta=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pt=t=>ya.test(t),L=t=>!!t&&!Number.isNaN(Number(t)),ht=t=>!!t&&Number.isInteger(Number(t)),Be=t=>t.endsWith("%")&&L(t.slice(0,-1)),at=t=>ba.test(t),Sa=()=>!0,Ca=t=>va.test(t)&&!xa.test(t),Ts=()=>!1,ka=t=>wa.test(t),Aa=t=>Ta.test(t),Pa=t=>!S(t)&&!C(t),Va=t=>Vt(t,Ps,Ts),S=t=>xs.test(t),vt=t=>Vt(t,Vs,Ca),Oe=t=>Vt(t,Ia,L),Ss=t=>Vt(t,ks,Ts),Ma=t=>Vt(t,As,Aa),le=t=>Vt(t,Ms,ka),C=t=>ws.test(t),Wt=t=>Mt(t,Vs),Da=t=>Mt(t,Na),Cs=t=>Mt(t,ks),Ea=t=>Mt(t,Ps),La=t=>Mt(t,As),ce=t=>Mt(t,Ms,!0),Vt=(t,e,n)=>{const s=xs.exec(t);return s?s[1]?e(s[1]):n(s[2]):!1},Mt=(t,e,n=!1)=>{const s=ws.exec(t);return s?s[1]?e(s[1]):n:!1},ks=t=>t==="position"||t==="percentage",As=t=>t==="image"||t==="url",Ps=t=>t==="length"||t==="size"||t==="bg-size",Vs=t=>t==="length",Ia=t=>t==="number",Na=t=>t==="family-name",Ms=t=>t==="shadow",Fa=pa(()=>{const t=z("color"),e=z("font"),n=z("text"),s=z("font-weight"),i=z("tracking"),o=z("leading"),r=z("breakpoint"),a=z("container"),l=z("spacing"),c=z("radius"),u=z("shadow"),d=z("inset-shadow"),f=z("text-shadow"),h=z("drop-shadow"),m=z("blur"),p=z("perspective"),y=z("aspect"),v=z("ease"),T=z("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"],A=()=>[...M(),C,S],V=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],b=()=>[C,S,l],N=()=>[Pt,"full","auto",...b()],U=()=>[ht,"none","subgrid",C,S],st=()=>["auto",{span:["full",ht,C,S]},ht,C,S],At=()=>[ht,"auto",C,S],Ve=()=>["auto","min","max","fr",C,S],_t=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],dt=()=>["start","end","center","stretch","center-safe","end-safe"],rt=()=>["auto",...b()],F=()=>[Pt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...b()],k=()=>[t,C,S],ot=()=>[...M(),Cs,Ss,{position:[C,S]}],ft=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Me=()=>["auto","cover","contain",Ea,Va,{size:[C,S]}],is=()=>[Be,Wt,vt],H=()=>["","none","full",c,C,S],Y=()=>["",L,Wt,vt],De=()=>["solid","dashed","dotted","double"],No=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>[L,Be,Cs,Ss],Fo=()=>["","none",m,C,S],Ee=()=>["none",L,C,S],Le=()=>["none",L,C,S],rs=()=>[L,C,S],Ie=()=>[Pt,"full",...b()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[at],breakpoint:[at],color:[Sa],container:[at],"drop-shadow":[at],ease:["in","out","in-out"],font:[Pa],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[at],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[at],shadow:[at],spacing:["px",L],text:[at],"text-shadow":[at],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pt,S,C,y]}],container:["container"],columns:[{columns:[L,S,C,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:A()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[ht,"auto",C,S]}],basis:[{basis:[Pt,"full","auto",a,...b()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[L,Pt,"auto","initial","none",S]}],grow:[{grow:["",L,C,S]}],shrink:[{shrink:["",L,C,S]}],order:[{order:[ht,"first","last","none",C,S]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:st()}],"col-start":[{"col-start":At()}],"col-end":[{"col-end":At()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:st()}],"row-start":[{"row-start":At()}],"row-end":[{"row-end":At()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ve()}],"auto-rows":[{"auto-rows":Ve()}],gap:[{gap:b()}],"gap-x":[{"gap-x":b()}],"gap-y":[{"gap-y":b()}],"justify-content":[{justify:[..._t(),"normal"]}],"justify-items":[{"justify-items":[...dt(),"normal"]}],"justify-self":[{"justify-self":["auto",...dt()]}],"align-content":[{content:["normal",..._t()]}],"align-items":[{items:[...dt(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...dt(),{baseline:["","last"]}]}],"place-content":[{"place-content":_t()}],"place-items":[{"place-items":[...dt(),"baseline"]}],"place-self":[{"place-self":["auto",...dt()]}],p:[{p:b()}],px:[{px:b()}],py:[{py:b()}],ps:[{ps:b()}],pe:[{pe:b()}],pt:[{pt:b()}],pr:[{pr:b()}],pb:[{pb:b()}],pl:[{pl:b()}],m:[{m:rt()}],mx:[{mx:rt()}],my:[{my:rt()}],ms:[{ms:rt()}],me:[{me:rt()}],mt:[{mt:rt()}],mr:[{mr:rt()}],mb:[{mb:rt()}],ml:[{ml:rt()}],"space-x":[{"space-x":b()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":b()}],"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,Wt,vt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,C,Oe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Be,S]}],"font-family":[{font:[Da,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,C,S]}],"line-clamp":[{"line-clamp":[L,"none",C,Oe]}],leading:[{leading:[o,...b()]}],"list-image":[{"list-image":["none",C,S]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",C,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:[...De(),"wavy"]}],"text-decoration-thickness":[{decoration:[L,"from-font","auto",C,vt]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[L,"auto",C,S]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",C,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",C,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:ot()}],"bg-repeat":[{bg:ft()}],"bg-size":[{bg:Me()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ht,C,S],radial:["",C,S],conic:[ht,C,S]},La,Ma]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:is()}],"gradient-via-pos":[{via:is()}],"gradient-to-pos":[{to:is()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...De(),"hidden","none"]}],"divide-style":[{divide:[...De(),"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:[...De(),"none","hidden"]}],"outline-offset":[{"outline-offset":[L,C,S]}],"outline-w":[{outline:["",L,Wt,vt]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,ce,le]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,ce,le]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[L,vt]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",f,ce,le]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[L,C,S]}],"mix-blend":[{"mix-blend":[...No(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":No()}],"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":[L]}],"mask-image-linear-from-pos":[{"mask-linear-from":_()}],"mask-image-linear-to-pos":[{"mask-linear-to":_()}],"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":_()}],"mask-image-t-to-pos":[{"mask-t-to":_()}],"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":_()}],"mask-image-r-to-pos":[{"mask-r-to":_()}],"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":_()}],"mask-image-b-to-pos":[{"mask-b-to":_()}],"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":_()}],"mask-image-l-to-pos":[{"mask-l-to":_()}],"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":_()}],"mask-image-x-to-pos":[{"mask-x-to":_()}],"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":_()}],"mask-image-y-to-pos":[{"mask-y-to":_()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[C,S]}],"mask-image-radial-from-pos":[{"mask-radial-from":_()}],"mask-image-radial-to-pos":[{"mask-radial-to":_()}],"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":[L]}],"mask-image-conic-from-pos":[{"mask-conic-from":_()}],"mask-image-conic-to-pos":[{"mask-conic-to":_()}],"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:ot()}],"mask-repeat":[{mask:ft()}],"mask-size":[{mask:Me()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",C,S]}],filter:[{filter:["","none",C,S]}],blur:[{blur:Fo()}],brightness:[{brightness:[L,C,S]}],contrast:[{contrast:[L,C,S]}],"drop-shadow":[{"drop-shadow":["","none",h,ce,le]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",L,C,S]}],"hue-rotate":[{"hue-rotate":[L,C,S]}],invert:[{invert:["",L,C,S]}],saturate:[{saturate:[L,C,S]}],sepia:[{sepia:["",L,C,S]}],"backdrop-filter":[{"backdrop-filter":["","none",C,S]}],"backdrop-blur":[{"backdrop-blur":Fo()}],"backdrop-brightness":[{"backdrop-brightness":[L,C,S]}],"backdrop-contrast":[{"backdrop-contrast":[L,C,S]}],"backdrop-grayscale":[{"backdrop-grayscale":["",L,C,S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[L,C,S]}],"backdrop-invert":[{"backdrop-invert":["",L,C,S]}],"backdrop-opacity":[{"backdrop-opacity":[L,C,S]}],"backdrop-saturate":[{"backdrop-saturate":[L,C,S]}],"backdrop-sepia":[{"backdrop-sepia":["",L,C,S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":b()}],"border-spacing-x":[{"border-spacing-x":b()}],"border-spacing-y":[{"border-spacing-y":b()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",C,S]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[L,"initial",C,S]}],ease:[{ease:["linear","initial",v,C,S]}],delay:[{delay:[L,C,S]}],animate:[{animate:["none",T,C,S]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,C,S]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:Le()}],"scale-x":[{"scale-x":Le()}],"scale-y":[{"scale-y":Le()}],"scale-z":[{"scale-z":Le()}],"scale-3d":["scale-3d"],skew:[{skew:rs()}],"skew-x":[{"skew-x":rs()}],"skew-y":[{"skew-y":rs()}],transform:[{transform:[C,S,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"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",C,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":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"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",C,S]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[L,Wt,vt,Oe]}],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 I(...t){return Fa(as(t))}const Ba={error:_o,info:Wo,noData:Go,success:fs,warning:Ho},Oa=oe("relative flex flex-col gap-2 items-start rounded-md border-2 p-4 w-full ",{defaultVariants:{variant:"warning"},variants:{variant:{error:"border-error-border bg-error-surface text-error-text",info:"border-info-border bg-info-surface text-info-text",noData:"border-text-secondary text-text",success:"border-success-border bg-success-surface text-success-text",warning:"border-warning-border bg-warning-surface text-warning-text"}}});function ja({children:t,className:e,icon:n,ref:s,showIcon:i=!1,variant:o,...r}){const a=Ba[o||"warning"];return g.jsxs("div",{className:I(Oa({variant:o}),e),ref:s,role:o==="error"?"alert":"status",...r,children:[t,(i||n)&&g.jsx("div",{className:"absolute top-2 right-2",children:n||g.jsx(a,{size:22})})]})}function Ra({children:t,className:e,...n}){return g.jsx("h5",{className:I("font-bold leading-none tracking-tight",e),...n,children:t})}function za({children:t,className:e,...n}){return g.jsx("div",{className:I("text-sm opacity-90",e),...n,children:t})}const $a=oe(["py-2 px-4 rounded border-border cursor-pointer border text-on-primary shadow-md","transition-all duration-150 ease-in-out","hover:scale-[1.10] active:scale-[0.95]","disabled:bg-disabled-surface disabled:border-disabled-border disabled:text-disabled-text disabled:cursor-default disabled:hover:scale-100 disabled:active:scale-100 disabled:cursor-not-allowed"],{defaultVariants:{variant:"primary"},variants:{variant:{animated:I("border-transparent rounded-full text-text-surface",{animatedButton:"_animatedButton_10ydq_7"}.animatedButton),confirm:"bg-success border-success-border",danger:"border-error-border bg-error dark:bg-transparent dark:border-error dark:border-2 dark:font-bold dark:text-error dark:disabled:text-disabled-text dark:disabled:border-disabled-border",ghost:"shadow-none border-transparent text-info-text disabled:border-none disabled:bg-transparent hover:bg-info-surface",info:"border-info text-info shadow-none disabled:bg-transparent",primary:"bg-primary hover:bg-primary-focus",secondary:"bg-secondary hover:bg-secondary-focus"}}});function Ds({children:t,className:e,ref:n,variant:s,...i}){return g.jsx("button",{className:I($a({variant:s}),e),ref:n,...i,children:t})}function Ua({children:t,className:e,ref:n,...s}){return g.jsx("div",{className:I("rounded-md border bg-surface border-border shadow-sm ",e),ref:n,...s,children:t})}function _a({children:t,className:e,ref:n,...s}){return g.jsxs("div",{className:I("flex flex-col p-4 pb-3 ",e),ref:n,...s,children:[t,g.jsx("div",{className:"h-[2px] w-full bg-border-strong mt-2"})]})}function Wa({children:t,className:e,ref:n,...s}){return g.jsx("h3",{className:I("font-semibold leading-none tracking-tight text-xl",e),ref:n,...s,children:t})}function Ka({children:t,className:e,ref:n,...s}){return g.jsx("p",{className:I("font-semibold text-text-secondary",e),ref:n,...s,children:t})}function Ga({children:t,className:e,ref:n,...s}){return g.jsx("div",{className:I("p-4",e),ref:n,...s,children:t})}function Ha({children:t,className:e,ref:n,...s}){return g.jsxs("div",{className:I("flex flex-col gap-2 p-4 pt-0 text-text-secondary text-sm",e),ref:n,...s,children:[g.jsx("div",{className:"h-[1px] w-full bg-border"}),t]})}function je({children:t,className:e,disabled:n,error:s,ref:i,...o}){return g.jsx("label",{className:I("text-sm font-medium leading-none select-none cursor-pointer",n&&"cursor-not-allowed opacity-70",s&&"text-error-text",e),ref:i,...o,children:t})}function Xa({boxClassName:t,checked:e,className:n,disabled:s,error:i,icon:o,id:r,label:a,onCheckedChange:l,ref:c,...u}){const d=x.useId(),f=r||d;return g.jsxs("div",{className:I("flex items-center space-x-2 group w-fit",n),children:[g.jsxs("div",{className:"relative flex items-center",children:[g.jsx("input",{checked:e,className:"peer sr-only",disabled:s,id:f,onChange:h=>l(h.target.checked),ref:c,type:"checkbox",...u}),g.jsx("label",{className:I("h-5 w-5 shrink-0 rounded border bg-surface transition-all cursor-pointer","flex items-center justify-center","border-border",!s&&"group-hover:border-primary group-hover:ring-4 group-hover:ring-primary/10","peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-primary-focus peer-focus-visible:outline-none ring-offset-background",e&&"bg-primary border-primary text-on-primary group-hover:ring-primary/20",i&&"border-error-border group-hover:ring-error/10 ",s&&"cursor-not-allowed bg-disabled-surface border-disabled-border opacity-50 group-hover:ring-0",t),htmlFor:f,children:g.jsx("div",{className:I("flex items-center justify-center pointer-events-none text-on-primary",e?"opacity-100":"opacity-0 transition-opacity duration-200"),children:o||g.jsx(fs,{size:14,strokeWidth:3})})})]}),a&&g.jsx(je,{disabled:s,error:i,htmlFor:f,children:a})]})}const Re=x.createContext({});function ze(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const $e=typeof window<"u",Es=$e?x.useLayoutEffect:x.useEffect,ue=x.createContext(null);function Ue(t,e){t.indexOf(e)===-1&&t.push(e)}function _e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const lt=(t,e,n)=>n>e?e:n<t?t:n;function We(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Dt=()=>{},ct=()=>{};process.env.NODE_ENV!=="production"&&(Dt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(We(e,n))},ct=(t,e,n)=>{if(!t)throw new Error(We(e,n))});const ut={},Ls=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Is(t){return typeof t=="object"&&t!==null}const Ns=t=>/^0[^.\s]+$/u.test(t);function Ke(t){let e;return()=>(e===void 0&&(e=t()),e)}const q=t=>t,Ya=(t,e)=>n=>e(t(n)),Kt=(...t)=>t.reduce(Ya),Gt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Ge{constructor(){this.subscriptions=[]}add(e){return Ue(this.subscriptions,e),()=>_e(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 tt=t=>t*1e3,Z=t=>t/1e3;function Fs(t,e){return e?t*(1e3/e):0}const Bs=new Set;function He(t,e,n){t||Bs.has(e)||(console.warn(We(e,n)),Bs.add(e))}const Os=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,qa=1e-7,Za=12;function Ja(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Os(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>qa&&++a<Za);return r}function Ht(t,e,n,s){if(t===e&&n===s)return q;const i=o=>Ja(o,0,1,t,n);return o=>o===0||o===1?o:Os(i(o),e,s)}const js=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Rs=t=>e=>1-t(1-e),zs=Ht(.33,1.53,.69,.99),Xe=Rs(zs),$s=js(Xe),Us=t=>(t*=2)<1?.5*Xe(t):.5*(2-Math.pow(2,-10*(t-1))),Ye=t=>1-Math.sin(Math.acos(t)),_s=Rs(Ye),Ws=js(Ye),Qa=Ht(.42,0,1,1),tl=Ht(0,0,.58,1),Ks=Ht(.42,0,.58,1),el=t=>Array.isArray(t)&&typeof t[0]!="number",Gs=t=>Array.isArray(t)&&typeof t[0]=="number",Hs={linear:q,easeIn:Qa,easeInOut:Ks,easeOut:tl,circIn:Ye,circInOut:Ws,circOut:_s,backIn:Xe,backInOut:$s,backOut:zs,anticipate:Us},nl=t=>typeof t=="string",qe=t=>{if(Gs(t)){ct(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return Ht(e,n,s,i)}else if(nl(t))return ct(Hs[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Hs[t];return t},de=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function sl(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(u){r.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const m=f&&i?n:s;return d&&r.add(u),m.has(u)||m.add(u),u},cancel:u=>{s.delete(u),r.delete(u)},process:u=>{if(a=u,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,c.process(u))}};return c}const il=40;function Xs(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=de.reduce((w,M)=>(w[M]=sl(o),w),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:m}=r,p=()=>{const w=ut.useManualTiming?i.timestamp:performance.now();n=!1,ut.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,il),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),d.process(i),f.process(i),h.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))},y=()=>{n=!0,s=!0,i.isProcessing||t(p)};return{schedule:de.reduce((w,M)=>{const A=r[M];return w[M]=(V,E=!1,b=!1)=>(n||y(),A.schedule(V,E,b)),w},{}),cancel:w=>{for(let M=0;M<de.length;M++)r[de[M]].cancel(w)},state:i,steps:r}}const{schedule:B,cancel:mt,state:W,steps:Ze}=Xs(typeof requestAnimationFrame<"u"?requestAnimationFrame:q,!0);let fe;function rl(){fe=void 0}const X={now:()=>(fe===void 0&&X.set(W.isProcessing||ut.useManualTiming?W.timestamp:performance.now()),fe),set:t=>{fe=t,queueMicrotask(rl)}},Ys=t=>e=>typeof e=="string"&&e.startsWith(t),qs=Ys("--"),ol=Ys("var(--"),Je=t=>ol(t)?al.test(t.split("/*")[0].trim()):!1,al=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Et={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Xt={...Et,transform:t=>lt(0,1,t)},he={...Et,default:1},Yt=t=>Math.round(t*1e5)/1e5,Qe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ll(t){return t==null}const cl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tn=(t,e)=>n=>!!(typeof n=="string"&&cl.test(n)&&n.startsWith(t)||e&&!ll(n)&&Object.prototype.hasOwnProperty.call(n,e)),Zs=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Qe);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},ul=t=>lt(0,255,t),en={...Et,transform:t=>Math.round(ul(t))},xt={test:tn("rgb","red"),parse:Zs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+en.transform(t)+", "+en.transform(e)+", "+en.transform(n)+", "+Yt(Xt.transform(s))+")"};function dl(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 nn={test:tn("#"),parse:dl,transform:xt.transform},qt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),pt=qt("deg"),it=qt("%"),P=qt("px"),fl=qt("vh"),hl=qt("vw"),Js={...it,parse:t=>it.parse(t)/100,transform:t=>it.transform(t*100)},Lt={test:tn("hsl","hue"),parse:Zs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+it.transform(Yt(e))+", "+it.transform(Yt(n))+", "+Yt(Xt.transform(s))+")"},R={test:t=>xt.test(t)||nn.test(t)||Lt.test(t),parse:t=>xt.test(t)?xt.parse(t):Lt.test(t)?Lt.parse(t):nn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?xt.transform(t):Lt.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},ml=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function pl(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Qe))==null?void 0:e.length)||0)+(((n=t.match(ml))==null?void 0:n.length)||0)>0}const Qs="number",ti="color",gl="var",yl="var(",ei="${}",bl=/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 Zt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(bl,l=>(R.test(l)?(s.color.push(o),i.push(ti),n.push(R.parse(l))):l.startsWith(yl)?(s.var.push(o),i.push(gl),n.push(l)):(s.number.push(o),i.push(Qs),n.push(parseFloat(l))),++o,ei)).split(ei);return{values:n,split:a,indexes:s,types:i}}function ni(t){return Zt(t).values}function si(t){const{split:e,types:n}=Zt(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===Qs?o+=Yt(i[r]):a===ti?o+=R.transform(i[r]):o+=i[r]}return o}}const vl=t=>typeof t=="number"?0:R.test(t)?R.getAnimatableNone(t):t;function xl(t){const e=ni(t);return si(t)(e.map(vl))}const gt={test:pl,parse:ni,createTransformer:si,getAnimatableNone:xl};function sn(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 wl({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=sn(l,a,t+1/3),o=sn(l,a,t),r=sn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function me(t,e){return n=>n>0?e:t}const O=(t,e,n)=>t+(e-t)*n,rn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Tl=[nn,xt,Lt],Sl=t=>Tl.find(e=>e.test(t));function ii(t){const e=Sl(t);if(Dt(!!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===Lt&&(n=wl(n)),n}const ri=(t,e)=>{const n=ii(t),s=ii(e);if(!n||!s)return me(t,e);const i={...n};return o=>(i.red=rn(n.red,s.red,o),i.green=rn(n.green,s.green,o),i.blue=rn(n.blue,s.blue,o),i.alpha=O(n.alpha,s.alpha,o),xt.transform(i))},on=new Set(["none","hidden"]);function Cl(t,e){return on.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function kl(t,e){return n=>O(t,e,n)}function an(t){return typeof t=="number"?kl:typeof t=="string"?Je(t)?me:R.test(t)?ri:Vl:Array.isArray(t)?oi:typeof t=="object"?R.test(t)?ri:Al:me}function oi(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>an(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Al(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=an(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Pl(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 Vl=(t,e)=>{const n=gt.createTransformer(e),s=Zt(t),i=Zt(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?on.has(t)&&!i.values.length||on.has(e)&&!s.values.length?Cl(t,e):Kt(oi(Pl(s,i),i.values),n):(Dt(!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"),me(t,e))};function ai(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?O(t,e,n):an(t)(t,e)}const Ml=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>B.update(e,n),stop:()=>mt(e),now:()=>W.isProcessing?W.timestamp:X.now()}},li=(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)})`},pe=2e4;function ln(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<pe;)e+=n,s=t.next(e);return e>=pe?1/0:e}function Dl(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(ln(s),pe);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:Z(i)}}const El=5;function ci(t,e,n){const s=Math.max(e-El,0);return Fs(n-t(s),e-s)}const j={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},cn=.001;function Ll({duration:t=j.duration,bounce:e=j.bounce,velocity:n=j.velocity,mass:s=j.mass}){let i,o;Dt(t<=tt(j.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=lt(j.minDamping,j.maxDamping,r),t=lt(j.minDuration,j.maxDuration,Z(t)),r<1?(i=c=>{const u=c*r,d=u*t,f=u-n,h=un(c,r),m=Math.exp(-d);return cn-f/h*m},o=c=>{const d=c*r*t,f=d*n+n,h=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-d),p=un(Math.pow(c,2),r);return(-i(c)+cn>0?-1:1)*((f-h)*m)/p}):(i=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-cn+u*d},o=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=Nl(i,o,a);if(t=tt(t),isNaN(l))return{stiffness:j.stiffness,damping:j.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const Il=12;function Nl(t,e,n){let s=n;for(let i=1;i<Il;i++)s=s-t(s)/e(s);return s}function un(t,e){return t*Math.sqrt(1-e*e)}const Fl=["duration","bounce"],Bl=["stiffness","damping","mass"];function ui(t,e){return e.some(n=>t[n]!==void 0)}function Ol(t){let e={velocity:j.velocity,stiffness:j.stiffness,damping:j.damping,mass:j.mass,isResolvedFromDuration:!1,...t};if(!ui(t,Bl)&&ui(t,Fl))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*lt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:j.mass,stiffness:i,damping:o}}else{const n=Ll(t);e={...e,...n,mass:j.mass},e.isResolvedFromDuration=!0}return e}function ge(t=j.visualDuration,e=j.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:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=Ol({...n,velocity:-Z(n.velocity||0)}),m=f||0,p=c/(2*Math.sqrt(l*u)),y=r-o,v=Z(Math.sqrt(l/u)),T=Math.abs(y)<5;s||(s=T?j.restSpeed.granular:j.restSpeed.default),i||(i=T?j.restDelta.granular:j.restDelta.default);let w;if(p<1){const A=un(v,p);w=V=>{const E=Math.exp(-p*v*V);return r-E*((m+p*v*y)/A*Math.sin(A*V)+y*Math.cos(A*V))}}else if(p===1)w=A=>r-Math.exp(-v*A)*(y+(m+v*y)*A);else{const A=v*Math.sqrt(p*p-1);w=V=>{const E=Math.exp(-p*v*V),b=Math.min(A*V,300);return r-E*((m+p*v*y)*Math.sinh(b)+A*y*Math.cosh(b))/A}}const M={calculatedDuration:h&&d||null,next:A=>{const V=w(A);if(h)a.done=A>=d;else{let E=A===0?m:0;p<1&&(E=A===0?tt(m):ci(w,A,V));const b=Math.abs(E)<=s,N=Math.abs(r-V)<=i;a.done=b&&N}return a.value=a.done?r:V,a},toString:()=>{const A=Math.min(ln(M),pe),V=li(E=>M.next(A*E).value,A,30);return A+"ms "+V},toTransition:()=>{}};return M}ge.applyToOptions=t=>{const e=Dl(t,100,ge);return t.ease=e.ease,t.duration=tt(e.duration),t.type="keyframes",t};function dn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=t[0],f={done:!1,value:d},h=b=>a!==void 0&&b<a||l!==void 0&&b>l,m=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l;let p=n*e;const y=d+p,v=r===void 0?y:r(y);v!==y&&(p=v-d);const T=b=>-p*Math.exp(-b/s),w=b=>v+T(b),M=b=>{const N=T(b),U=w(b);f.done=Math.abs(N)<=c,f.value=f.done?v:U};let A,V;const E=b=>{h(f.value)&&(A=b,V=ge({keyframes:[f.value,m(f.value)],velocity:ci(w,b,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:b=>{let N=!1;return!V&&A===void 0&&(N=!0,M(b),E(b)),A!==void 0&&b>=A?V.next(b-A):(!N&&M(b),f)}}}function jl(t,e,n){const s=[],i=n||ut.mix||ai,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]||q:e;a=Kt(l,a)}s.push(a)}return s}function Rl(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(ct(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=jl(e,s,i),l=a.length,c=u=>{if(r&&u<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(u<t[d+1]);d++);const f=Gt(t[d],t[d+1],u);return a[d](f)};return n?u=>c(lt(t[0],t[o-1],u)):c}function zl(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Gt(0,e,s);t.push(O(n,1,i))}}function $l(t){const e=[0];return zl(e,t.length-1),e}function Ul(t,e){return t.map(n=>n*e)}function _l(t,e){return t.map(()=>e||Ks).splice(0,t.length-1)}function It({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=el(s)?s.map(qe):qe(s),o={done:!1,value:e[0]},r=Ul(n&&n.length===e.length?n:$l(e),t),a=Rl(r,e,{ease:Array.isArray(i)?i:_l(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Wl=t=>t!==null;function fn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Wl),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Kl={decay:dn,inertia:dn,tween:It,keyframes:It,spring:ge};function di(t){typeof t.type=="string"&&(t.type=Kl[t.type])}class hn{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 Gl=t=>t/100;class mn extends hn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==X.now()&&this.tick(X.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;di(e);const{type:n=It,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||It;process.env.NODE_ENV!=="production"&&l!==It&&ct(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==It&&typeof a[0]!="number"&&(this.mixKeyframes=Kt(Gl,ai(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=ln(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}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:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:m,onUpdate:p,finalKeyframe:y}=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-c*(this.playbackSpeed>=0?1:-1),T=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 b=Math.min(this.currentTime,i)/a;let N=Math.floor(b),U=b%1;!U&&b>=1&&(U=1),U===1&&N--,N=Math.min(N,d+1),!!(N%2)&&(f==="reverse"?(U=1-U,h&&(U-=h/a)):f==="mirror"&&(M=r)),w=lt(0,1,U)*a}const A=T?{done:!1,value:u[0]}:M.next(w);o&&(A.value=o(A.value));let{done:V}=A;!T&&l!==null&&(V=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return E&&m!==dn&&(A.value=fn(u,this.options,y,this.speed)),p&&p(A.value),E&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return Z(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Z(e)}get time(){return Z(this.currentTime)}set time(e){var n;e=tt(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),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(X.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Z(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=Ml,startTime:n}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),(o=(i=this.options).onPlay)==null||o.call(i);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(X.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}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){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function Hl(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const wt=t=>t*180/Math.PI,pn=t=>{const e=wt(Math.atan2(t[1],t[0]));return gn(e)},Xl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:pn,rotateZ:pn,skewX:t=>wt(Math.atan(t[1])),skewY:t=>wt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},gn=t=>(t=t%360,t<0&&(t+=360),t),fi=pn,hi=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),mi=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Yl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hi,scaleY:mi,scale:t=>(hi(t)+mi(t))/2,rotateX:t=>gn(wt(Math.atan2(t[6],t[5]))),rotateY:t=>gn(wt(Math.atan2(-t[2],t[0]))),rotateZ:fi,rotate:fi,skewX:t=>wt(Math.atan(t[4])),skewY:t=>wt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function yn(t){return t.includes("scale")?1:0}function bn(t,e){if(!t||t==="none")return yn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Yl,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Xl,i=a}if(!i)return yn(e);const o=s[e],r=i[1].split(",").map(Zl);return typeof o=="function"?o(r):r[o]}const ql=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return bn(n,e)};function Zl(t){return parseFloat(t.trim())}const Nt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ft=new Set(Nt),pi=t=>t===Et||t===P,Jl=new Set(["x","y","z"]),Ql=Nt.filter(t=>!Jl.has(t));function tc(t){const e=[];return Ql.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Tt={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})=>bn(e,"x"),y:(t,{transform:e})=>bn(e,"y")};Tt.translateX=Tt.x,Tt.translateY=Tt.y;const St=new Set;let vn=!1,xn=!1,wn=!1;function gi(){if(xn){const t=Array.from(St).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=tc(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])=>{var a;(a=s.getValue(o))==null||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}xn=!1,vn=!1,St.forEach(t=>t.complete(wn)),St.clear()}function yi(){St.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(xn=!0)})}function ec(){wn=!0,yi(),gi(),wn=!1}class Tn{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?(St.add(this),vn||(vn=!0,B.read(yi),B.resolveKeyframes(gi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i==null?void 0: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])}Hl(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),St.delete(this)}cancel(){this.state==="scheduled"&&(St.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const nc=t=>t.startsWith("--");function sc(t,e,n){nc(e)?t.style.setProperty(e,n):t.style[e]=n}const ic=Ke(()=>window.ScrollTimeline!==void 0),rc={};function oc(t,e){const n=Ke(t);return()=>rc[e]??n()}const bi=oc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Jt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,vi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Jt([0,.65,.55,1]),circOut:Jt([.55,0,1,.45]),backIn:Jt([.31,.01,.66,-.59]),backOut:Jt([.33,1.53,.69,.99])};function xi(t,e){if(t)return typeof t=="function"?bi()?li(t,e):"ease-out":Gs(t)?Jt(t):Array.isArray(t)?t.map(n=>xi(n,e)||vi.easeOut):vi[t]}function ac(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const d=xi(a,i);Array.isArray(d)&&(u.easing=d);const f={delay:s,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function wi(t){return typeof t=="function"&&"applyToOptions"in t}function lc({type:t,...e}){return wi(t)&&bi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class cc extends hn{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,ct(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=lc(e);this.animation=ac(n,s,i,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=fn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):sc(n,s,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}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(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return Z(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Z(e)}get time(){return Z(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=tt(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}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&ic()?(this.animation.timeline=e,q):n(this)}}const Ti={anticipate:Us,backInOut:$s,circInOut:Ws};function uc(t){return t in Ti}function dc(t){typeof t.ease=="string"&&uc(t.ease)&&(t.ease=Ti[t.ease])}const Si=10;class fc extends cc{constructor(e){dc(e),di(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 mn({...r,autoplay:!1}),l=tt(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Si).value,a.sample(l).value,Si),a.stop()}}const Ci=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(gt.test(t)||t==="0")&&!t.startsWith("url("));function hc(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 mc(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=Ci(i,e),a=Ci(o,e);return Dt(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:hc(t)||(n==="spring"||wi(n))&&s}function Sn(t){t.duration=0,t.type="keyframes"}const pc=new Set(["opacity","clipPath","filter","transform"]),gc=Ke(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function yc(t){var u;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(((u=e==null?void 0:e.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return gc()&&n&&pc.has(n)&&(n!=="transform"||!c)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const bc=40;class vc extends hn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var m;super(),this.stop=()=>{var p,y;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=X.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:c,element:u,...d},h=(u==null?void 0:u.KeyframeResolver)||Tn;this.keyframeResolver=new h(a,(p,y,v)=>this.onKeyframesResolved(p,y,f,!v),l,c,u),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=X.now(),mc(e,o,r,a)||((ut.instantAnimations||!l)&&(u==null||u(fn(e,s,n))),e[0]=e[e.length-1],Sn(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>bc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},h=!c&&yc(f)?new fc({...f,element:f.motionValue.owner.current}):new mn(f);h.finished.then(()=>this.notifyFinished()).catch(q),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),ec()),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(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const xc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wc(t){const e=xc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const Tc=4;function ki(t,e,n=1){ct(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]=wc(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Ls(r)?parseFloat(r):r}return Je(i)?ki(i,e,n+1):i}function Cn(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const Ai=new Set(["width","height","top","left","right","bottom",...Nt]),Sc={test:t=>t==="auto",parse:t=>t},Pi=t=>e=>e.test(t),Vi=[Et,P,it,pt,hl,fl,Sc],Mi=t=>Vi.find(Pi(t));function Cc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ns(t):!0}const kc=new Set(["brightness","contrast","saturate","opacity"]);function Ac(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Qe)||[];if(!s)return t;const i=n.replace(s,"");let o=kc.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Pc=/\b([a-z-]*)\(.*?\)/gu,kn={...gt,getAnimatableNone:t=>{const e=t.match(Pc);return e?e.map(Ac).join(" "):t}},Di={...Et,transform:Math.round},An={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,radius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,backgroundPositionX:P,backgroundPositionY:P,...{rotate:pt,rotateX:pt,rotateY:pt,rotateZ:pt,scale:he,scaleX:he,scaleY:he,scaleZ:he,skew:pt,skewX:pt,skewY:pt,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:Xt,originX:Js,originY:Js,originZ:P},zIndex:Di,fillOpacity:Xt,strokeOpacity:Xt,numOctaves:Di},Vc={...An,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:kn,WebkitFilter:kn},Ei=t=>Vc[t];function Li(t,e){let n=Ei(t);return n!==kn&&(n=gt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Mc=new Set(["auto","none","0"]);function Dc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Mc.has(o)&&Zt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Li(n,i)}class Ec extends Tn{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 c=e[l];if(typeof c=="string"&&(c=c.trim(),Je(c))){const u=ki(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Ai.has(s)||e.length!==2)return;const[i,o]=e,r=Mi(i),a=Mi(o);if(r!==a)if(pi(r)&&pi(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else Tt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Cc(e[i]))&&s.push(i);s.length&&Dc(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=Tt[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(){var a;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]=Tt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{e.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Lc(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=(n==null?void 0: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 Ni(t){return Is(t)&&"offsetHeight"in t}const Fi=30,Ic=t=>!isNaN(parseFloat(t));class Nc{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const i=X.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=X.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ic(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&He(!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 Ge);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(){var e;(e=this.events.change)==null||e.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=X.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Fi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fi);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(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Bt(t,e){return new Nc(t,e)}const{schedule:Pn}=Xs(queueMicrotask,!1),et={x:!1,y:!1};function Bi(){return et.x||et.y}function Fc(t){return t==="x"||t==="y"?et[t]?null:(et[t]=!0,()=>{et[t]=!1}):et.x||et.y?null:(et.x=et.y=!0,()=>{et.x=et.y=!1})}function Oi(t,e){const n=Lc(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function ji(t){return!(t.pointerType==="touch"||Bi())}function Bc(t,e,n={}){const[s,i,o]=Oi(t,n),r=a=>{if(!ji(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=d=>{ji(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const Ri=(t,e)=>e?t===e?!0:Ri(t,e.parentElement):!1,Vn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Oc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function jc(t){return Oc.has(t.tagName)||t.tabIndex!==-1}const ye=new WeakSet;function zi(t){return e=>{e.key==="Enter"&&t(e)}}function Mn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Rc=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=zi(()=>{if(ye.has(n))return;Mn(n,"down");const i=zi(()=>{Mn(n,"up")}),o=()=>Mn(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 $i(t){return Vn(t)&&!Bi()}function zc(t,e,n={}){const[s,i,o]=Oi(t,n),r=a=>{const l=a.currentTarget;if(!$i(a))return;ye.add(l);const c=e(l,a),u=(h,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ye.has(l)&&ye.delete(l),$i(h)&&typeof c=="function"&&c(h,{success:m})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||Ri(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),Ni(a)&&(a.addEventListener("focus",c=>Rc(c,i)),!jc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Ui(t){return Is(t)&&"ownerSVGElement"in t}function $c(t){return Ui(t)&&t.tagName==="svg"}function Uc(t,e){if(t==="first")return 0;{const n=e-1;return t==="last"?n:n/2}}function _i(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,o)=>{const r=typeof n=="number"?n:Uc(n,o),a=Math.abs(r-i);let l=t*a;if(s){const c=o*t;l=qe(s)(l/c)*c}return e+l}}const K=t=>!!(t&&t.getVelocity),_c=[...Vi,R,gt],Wc=t=>_c.find(Pi(t)),Dn=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Wi(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Kc(...t){return e=>{let n=!1;const s=t.map(i=>{const o=Wi(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():Wi(t[i],null)}}}}function Gc(...t){return re.useCallback(Kc(...t),t)}class Hc extends re.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=Ni(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 Xc({children:t,isPresent:e,anchorX:n,root:s}){const i=x.useId(),o=x.useRef(null),r=x.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=x.useContext(Dn),l=Gc(o,t==null?void 0:t.ref);return x.useInsertionEffect(()=>{const{width:c,height:u,top:d,left:f,right:h}=r.current;if(e||!o.current||!c||!u)return;const m=n==="left"?`left: ${f}`:`right: ${h}`;o.current.dataset.motionPopId=i;const p=document.createElement("style");a&&(p.nonce=a);const y=s??document.head;return y.appendChild(p),p.sheet&&p.sheet.insertRule(`
57
+ [data-motion-pop-id="${i}"] {
58
+ position: absolute !important;
59
+ width: ${c}px !important;
60
+ height: ${u}px !important;
61
+ ${m}px !important;
62
+ top: ${d}px !important;
63
+ }
64
+ `),()=>{y.contains(p)&&y.removeChild(p)}},[e]),g.jsx(Hc,{isPresent:e,childRef:o,sizeRef:r,children:re.cloneElement(t,{ref:l})})}const Yc=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const c=ze(qc),u=x.useId();let d=!0,f=x.useMemo(()=>(d=!1,{id:u,initial:e,isPresent:n,custom:i,onExitComplete:h=>{c.set(h,!0);for(const m of c.values())if(!m)return;s&&s()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[n,c,s]);return o&&d&&(f={...f}),x.useMemo(()=>{c.forEach((h,m)=>c.set(m,!1))},[n]),re.useEffect(()=>{!n&&!c.size&&s&&s()},[n]),r==="popLayout"&&(t=g.jsx(Xc,{isPresent:n,anchorX:a,root:l,children:t})),g.jsx(ue.Provider,{value:f,children:t})};function qc(){return new Map}function Ki(t=!0){const e=x.useContext(ue);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=x.useId();x.useEffect(()=>{if(t)return i(o)},[t]);const r=x.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const be=t=>t.key||"";function Gi(t){const e=[];return x.Children.forEach(t,n=>{x.isValidElement(n)&&e.push(n)}),e}const Hi=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[c,u]=Ki(r),d=x.useMemo(()=>Gi(t),[t]),f=r&&!c?[]:d.map(be),h=x.useRef(!0),m=x.useRef(d),p=ze(()=>new Map),[y,v]=x.useState(d),[T,w]=x.useState(d);Es(()=>{h.current=!1,m.current=d;for(let V=0;V<T.length;V++){const E=be(T[V]);f.includes(E)?p.delete(E):p.get(E)!==!0&&p.set(E,!1)}},[T,f.length,f.join("-")]);const M=[];if(d!==y){let V=[...d];for(let E=0;E<T.length;E++){const b=T[E],N=be(b);f.includes(N)||(V.splice(E,0,b),M.push(b))}return o==="wait"&&M.length&&(V=M),w(Gi(V)),v(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&T.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:A}=x.useContext(Re);return g.jsx(g.Fragment,{children:T.map(V=>{const E=be(V),b=r&&!c?!1:d===T||f.includes(E),N=()=>{if(p.has(E))p.set(E,!0);else return;let U=!0;p.forEach(st=>{st||(U=!1)}),U&&(A==null||A(),w(m.current),r&&(u==null||u()),s&&s())};return g.jsx(Yc,{isPresent:b,initial:!h.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:b?void 0:N,anchorX:a,children:V},E)})})},Xi=x.createContext({strict:!1}),Yi={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"]},Ot={};for(const t in Yi)Ot[t]={isEnabled:e=>Yi[t].some(n=>!!e[n])};function Zc(t){for(const e in t)Ot[e]={...Ot[e],...t[e]}}const Jc=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 ve(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Jc.has(t)}let qi=t=>!ve(t);function Qc(t){typeof t=="function"&&(qi=e=>e.startsWith("on")?!ve(e):t(e))}try{Qc(require("@emotion/is-prop-valid").default)}catch{}function tu(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(qi(i)||n===!0&&ve(i)||!e&&!ve(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const xe=x.createContext({});function we(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Qt(t){return typeof t=="string"||Array.isArray(t)}const En=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ln=["initial",...En];function Te(t){return we(t.animate)||Ln.some(e=>Qt(t[e]))}function Zi(t){return!!(Te(t)||t.variants)}function eu(t,e){if(Te(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Qt(n)?n:void 0,animate:Qt(s)?s:void 0}}return t.inherit!==!1?e:{}}function nu(t){const{initial:e,animate:n}=eu(t,x.useContext(xe));return x.useMemo(()=>({initial:e,animate:n}),[Ji(e),Ji(n)])}function Ji(t){return Array.isArray(t)?t.join(" "):t}function Qi(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const te={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(P.test(t))t=parseFloat(t);else return t;const n=Qi(t,e.target.x),s=Qi(t,e.target.y);return`${n}% ${s}%`}},su={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=gt.parse(t);if(i.length>5)return s;const o=gt.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 c=O(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}},In={borderRadius:{...te,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:te,borderTopRightRadius:te,borderBottomLeftRadius:te,borderBottomRightRadius:te,boxShadow:su};function tr(t,{layout:e,layoutId:n}){return Ft.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!In[t]||t==="opacity")}const iu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ru=Nt.length;function ou(t,e,n){let s="",i=!0;for(let o=0;o<ru;o++){const r=Nt[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 c=Ii(a,An[r]);if(!l){i=!1;const u=iu[r]||r;s+=`${u}(${c}) `}n&&(e[r]=c)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Nn(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const c=e[l];if(Ft.has(l)){r=!0;continue}else if(qs(l)){i[l]=c;continue}else{const u=Ii(c,An[l]);l.startsWith("origin")?(a=!0,o[l]=u):s[l]=u}}if(e.transform||(r||n?s.transform=ou(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;s.transformOrigin=`${l} ${c} ${u}`}}const Fn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function er(t,e,n){for(const s in e)!K(e[s])&&!tr(s,n)&&(t[s]=e[s])}function au({transformTemplate:t},e){return x.useMemo(()=>{const n=Fn();return Nn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function lu(t,e){const n=t.style||{},s={};return er(s,n,t),Object.assign(s,au(t,e)),s}function cu(t,e){const n={},s=lu(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 uu={offset:"stroke-dashoffset",array:"stroke-dasharray"},du={offset:"strokeDashoffset",array:"strokeDasharray"};function fu(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?uu:du;t[o.offset]=P.transform(-s);const r=P.transform(e),a=P.transform(n);t[o.array]=`${r} ${a}`}function nr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Nn(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:f}=t;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.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&&fu(d,i,o,r,!1)}const sr=()=>({...Fn(),attrs:{}}),ir=t=>typeof t=="string"&&t.toLowerCase()==="svg";function hu(t,e,n,s){const i=x.useMemo(()=>{const o=sr();return nr(o,e,ir(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};er(o,t.style,t),i.style={...o,...i.style}}return i}const mu=["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 Bn(t){return typeof t!="string"||t.includes("-")?!1:!!(mu.indexOf(t)>-1||/[A-Z]/u.test(t))}function pu(t,e,n,{latestValues:s},i,o=!1){const a=(Bn(t)?hu:cu)(e,s,i,t),l=tu(e,typeof t=="string",o),c=t!==x.Fragment?{...l,...a,ref:n}:{},{children:u}=e,d=x.useMemo(()=>K(u)?u.get():u,[u]);return x.createElement(t,{...c,children:d})}function rr(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function On(t,e,n,s){if(typeof e=="function"){const[i,o]=rr(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]=rr(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Se(t){return K(t)?t.get():t}function gu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:yu(n,s,i,t),renderState:e()}}function yu(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Se(o[f]);let{initial:r,animate:a}=t;const l=Te(t),c=Zi(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const d=u?a:r;if(d&&typeof d!="boolean"&&!we(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const m=On(t,f[h]);if(m){const{transitionEnd:p,transition:y,...v}=m;for(const T in v){let w=v[T];if(Array.isArray(w)){const M=u?w.length-1:0;w=w[M]}w!==null&&(i[T]=w)}for(const T in p)i[T]=p[T]}}}return i}const or=t=>(e,n)=>{const s=x.useContext(xe),i=x.useContext(ue),o=()=>gu(t,e,s,i);return n?o():ze(o)};function jn(t,e,n){var o;const{style:s}=t,i={};for(const r in s)(K(s[r])||e.style&&K(e.style[r])||tr(r,t)||((o=n==null?void 0:n.getValue(r))==null?void 0:o.liveStyle)!==void 0)&&(i[r]=s[r]);return i}const bu=or({scrapeMotionValuesFromProps:jn,createRenderState:Fn});function ar(t,e,n){const s=jn(t,e,n);for(const i in t)if(K(t[i])||K(e[i])){const o=Nt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const vu=or({scrapeMotionValuesFromProps:ar,createRenderState:sr}),xu=Symbol.for("motionComponentSymbol");function jt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function wu(t,e,n){return x.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):jt(n)&&(n.current=s))},[e])}const Rn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),lr="data-"+Rn("framerAppearId"),cr=x.createContext({});function Tu(t,e,n,s,i){var p,y;const{visualElement:o}=x.useContext(xe),r=x.useContext(Xi),a=x.useContext(ue),l=x.useContext(Dn).reducedMotion,c=x.useRef(null);s=s||r.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=x.useContext(cr);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&Su(c.current,n,i,d);const f=x.useRef(!1);x.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const h=n[lr],m=x.useRef(!!h&&!((p=window.MotionHandoffIsComplete)!=null&&p.call(window,h))&&((y=window.MotionHasOptimisedAnimation)==null?void 0:y.call(window,h)));return Es(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),m.current&&u.animationState&&u.animationState.animateChanges())}),x.useEffect(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)==null||v.call(window,h)}),m.current=!1),u.enteringChildren=void 0)}),u}function Su(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:ur(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&jt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:l,layoutRoot:c})}function ur(t){if(t)return t.options.allowProjection!==!1?t.projection:ur(t.parent)}function zn(t,{forwardMotionProps:e=!1}={},n,s){n&&Zc(n);const i=Bn(t)?vu:bu;function o(a,l){let c;const u={...x.useContext(Dn),...a,layoutId:Cu(a)},{isStatic:d}=u,f=nu(a),h=i(a,d);if(!d&&$e){ku(u,n);const m=Au(u);c=m.MeasureLayout,f.visualElement=Tu(t,h,u,s,m.ProjectionNode)}return g.jsxs(xe.Provider,{value:f,children:[c&&f.visualElement?g.jsx(c,{visualElement:f.visualElement,...u}):null,pu(t,a,wu(h,f.visualElement,l),h,d,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=x.forwardRef(o);return r[xu]=t,r}function Cu({layoutId:t}){const e=x.useContext(Re).id;return e&&t!==void 0?e+"-"+t:t}function ku(t,e){const n=x.useContext(Xi).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?Dt(!1,s,"lazy-strict-mode"):ct(!1,s,"lazy-strict-mode")}}function Au(t){const{drag:e,layout:n}=Ot;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Pu(t,e){if(typeof Proxy>"u")return zn;const n=new Map,s=(o,r)=>zn(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&He(!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,zn(r,void 0,t,e)),n.get(r))})}function dr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Vu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Mu(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 $n(t){return t===void 0||t===1}function Un({scale:t,scaleX:e,scaleY:n}){return!$n(t)||!$n(e)||!$n(n)}function Ct(t){return Un(t)||fr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function fr(t){return hr(t.x)||hr(t.y)}function hr(t){return t&&t!=="0%"}function Ce(t,e,n){const s=t-n,i=e*s;return n+i}function mr(t,e,n,s,i){return i!==void 0&&(t=Ce(t,i,s)),Ce(t,n,s)+e}function _n(t,e=0,n=1,s,i){t.min=mr(t.min,e,n,s,i),t.max=mr(t.max,e,n,s,i)}function pr(t,{x:e,y:n}){_n(t.x,e.translate,e.scale,e.originPoint),_n(t.y,n.translate,n.scale,n.originPoint)}const gr=.999999999999,yr=1.0000000000001;function Du(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&&zt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,pr(t,r)),s&&Ct(o.latestValues)&&zt(t,o.latestValues))}e.x<yr&&e.x>gr&&(e.x=1),e.y<yr&&e.y>gr&&(e.y=1)}function Rt(t,e){t.min=t.min+e,t.max=t.max+e}function br(t,e,n,s,i=.5){const o=O(t.min,t.max,i);_n(t,e,n,o,s)}function zt(t,e){br(t.x,e.x,e.scaleX,e.scale,e.originX),br(t.y,e.y,e.scaleY,e.scale,e.originY)}function vr(t,e){return dr(Mu(t.getBoundingClientRect(),e))}function Eu(t,e,n){const s=vr(t,n),{scroll:i}=e;return i&&(Rt(s.x,i.offset.x),Rt(s.y,i.offset.y)),s}const xr=()=>({translate:0,scale:1,origin:0,originPoint:0}),$t=()=>({x:xr(),y:xr()}),wr=()=>({min:0,max:0}),$=()=>({x:wr(),y:wr()}),Wn={current:null},Tr={current:!1};function Lu(){if(Tr.current=!0,!!$e)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Wn.current=t.matches;t.addEventListener("change",e),e()}else Wn.current=!1}const Iu=new WeakMap;function Nu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(K(i))t.addValue(s,i);else if(K(o))t.addValue(s,Bt(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,Bt(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Sr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Fu{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=Tn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=X.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,B.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,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=Te(n),this.isVariantNode=Zi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&K(h)&&h.set(l[f])}}mount(e){var n;this.current=e,Iu.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((s,i)=>this.bindToMotionValue(i,s)),Tr.current||Lu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Wn.current,process.env.NODE_ENV!=="production"&&He(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),mt(this.notifyUpdate),mt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.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=Ft.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 Ot){const n=Ot[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):$()}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<Sr.length;s++){const i=Sr[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=Nu(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=Bt(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"&&(Ls(s)||Ns(s))?s=parseFloat(s):!Wc(s)&&gt.test(n)&&(s=Li(e,n)),this.setBaseTarget(e,K(s)?s.get():s)),K(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=On(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!K(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 Ge),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Pn.render(this.render)}}class Cr extends Fu{constructor(){super(...arguments),this.KeyframeResolver=Ec}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;K(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function kr(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i==null||i.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function Bu(t){return window.getComputedStyle(t)}class Ou extends Cr{constructor(){super(...arguments),this.type="html",this.renderInstance=kr}readValueFromInstance(e,n){var s;if(Ft.has(n))return(s=this.projection)!=null&&s.isProjecting?yn(n):ql(e,n);{const i=Bu(e),o=(qs(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return vr(e,n)}build(e,n,s){Nn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return jn(e,n,s)}}const Ar=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 ju(t,e,n,s){kr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ar.has(i)?i:Rn(i),e.attrs[i])}class Ru extends Cr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ft.has(n)){const s=Ei(n);return s&&s.default||0}return n=Ar.has(n)?n:Rn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return ar(e,n,s)}build(e,n,s){nr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){ju(e,n,s,i)}mount(e){this.isSVGTag=ir(e.tagName),super.mount(e)}}const zu=(t,e)=>Bn(t)?new Ru(e):new Ou(e,{allowProjection:t!==x.Fragment});function Ut(t,e,n){const s=t.getProps();return On(s,e,n!==void 0?n:s.custom,t)}const Kn=t=>Array.isArray(t);function $u(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Bt(n))}function Uu(t){return Kn(t)?t[t.length-1]||0:t}function _u(t,e){const n=Ut(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Uu(o[r]);$u(t,r,a)}}function Wu(t){return!!(K(t)&&t.add)}function Gn(t,e){const n=t.getValue("willChange");if(Wu(n))return n.add(e);if(!n&&ut.WillChange){const s=new ut.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Pr(t){return t.props[lr]}const Ku=t=>t!==null;function Gu(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Ku),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Hu={type:"spring",stiffness:500,damping:25,restSpeed:10},Xu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Yu={type:"keyframes",duration:.8},qu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Zu=(t,{keyframes:e})=>e.length>2?Yu:Ft.has(t)?t.startsWith("scale")?Xu(e[1]):Hu:qu;function Ju({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Hn=(t,e,n,s={},i,o)=>r=>{const a=Cn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-tt(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Ju(a)||Object.assign(u,Zu(t,u)),u.duration&&(u.duration=tt(u.duration)),u.repeatDelay&&(u.repeatDelay=tt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Sn(u),u.delay===0&&(d=!0)),(ut.instantAnimations||ut.skipAnimations)&&(d=!0,Sn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&e.get()!==void 0){const f=Gu(u.keyframes,a);if(f!==void 0){B.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new mn(u):new vc(u)};function Qu({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Vr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const u in a){const d=t.getValue(u,t.latestValues[u]??null),f=a[u];if(f===void 0||c&&Qu(c,u))continue;const h={delay:n,...Cn(o||{},u)},m=d.get();if(m!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===m&&!h.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const v=Pr(t);if(v){const T=window.MotionHandoffAnimation(v,u,B);T!==null&&(h.startTime=T,p=!0)}}Gn(t,u),d.start(Hn(u,d,f,t.shouldReduceMotion&&Ai.has(u)?{type:!1}:h,t,p));const y=d.animation;y&&l.push(y)}return r&&Promise.all(l).then(()=>{B.update(()=>{r&&_u(t,r)})}),l}function Mr(t,e,n,s=0,i=1){const o=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function Xn(t,e,n={}){var l;const s=Ut(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Vr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return td(t,e,c,u,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[o,r]:[r,o];return c().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function td(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(Xn(l,e,{...r,delay:n+(typeof s=="function"?0:s)+Mr(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function ed(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Xn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Xn(t,e,n);else{const i=typeof e=="function"?Ut(t,e,n.custom):e;s=Promise.all(Vr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Dr(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 nd=Ln.length;function Er(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Er(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<nd;n++){const s=Ln[n],i=t.props[s];(Qt(i)||i===!1)&&(e[s]=i)}return e}const sd=[...En].reverse(),id=En.length;function rd(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ed(t,n,s)))}function od(t){let e=rd(t),n=Lr(),s=!0;const i=l=>(c,u)=>{var f;const d=Ut(t,u,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:m,...p}=d;c={...c,...p,...m}}return c};function o(l){e=l(t)}function r(l){const{props:c}=t,u=Er(t.parent)||{},d=[],f=new Set;let h={},m=1/0;for(let y=0;y<id;y++){const v=sd[y],T=n[v],w=c[v]!==void 0?c[v]:u[v],M=Qt(w),A=v===l?T.isActive:null;A===!1&&(m=y);let V=w===u[v]&&w!==c[v]&&M;if(V&&s&&t.manuallyAnimateOnMount&&(V=!1),T.protectedKeys={...h},!T.isActive&&A===null||!w&&!T.prevProp||we(w)||typeof w=="boolean")continue;const E=ad(T.prevProp,w);let b=E||v===l&&T.isActive&&!V&&M||y>m&&M,N=!1;const U=Array.isArray(w)?w:[w];let st=U.reduce(i(v),{});A===!1&&(st={});const{prevResolvedValues:At={}}=T,Ve={...At,...st},_t=F=>{b=!0,f.has(F)&&(N=!0,f.delete(F)),T.needsAnimating[F]=!0;const k=t.getValue(F);k&&(k.liveStyle=!1)};for(const F in Ve){const k=st[F],ot=At[F];if(h.hasOwnProperty(F))continue;let ft=!1;Kn(k)&&Kn(ot)?ft=!Dr(k,ot):ft=k!==ot,ft?k!=null?_t(F):f.add(F):k!==void 0&&f.has(F)?_t(F):T.protectedKeys[F]=!0}T.prevProp=w,T.prevResolvedValues=st,T.isActive&&(h={...h,...st}),s&&t.blockInitialAnimation&&(b=!1);const dt=V&&E;b&&(!dt||N)&&d.push(...U.map(F=>{const k={type:v};if(typeof F=="string"&&s&&!dt&&t.manuallyAnimateOnMount&&t.parent){const{parent:ot}=t,ft=Ut(ot,F);if(ot.enteringChildren&&ft){const{delayChildren:Me}=ft.transition||{};k.delay=Mr(ot.enteringChildren,t,Me)}}return{animation:F,options:k}}))}if(f.size){const y={};if(typeof c.initial!="boolean"){const v=Ut(t,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(y.transition=v.transition)}f.forEach(v=>{const T=t.getBaseTarget(v),w=t.getValue(v);w&&(w.liveStyle=!0),y[v]=T??null}),d.push({animation:y})}let p=!!d.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,p?e(d):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=t.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;const u=r(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Lr()}}}function ad(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Dr(e,t):!1}function kt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Lr(){return{animate:kt(!0),whileInView:kt(),whileHover:kt(),whileTap:kt(),whileDrag:kt(),whileFocus:kt(),exit:kt()}}class yt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class ld extends yt{constructor(e){super(e),e.animationState||(e.animationState=od(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();we(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(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let cd=0;class ud extends yt{constructor(){super(...arguments),this.id=cd++}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 dd={animation:{Feature:ld},exit:{Feature:ud}};function ee(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function ne(t){return{point:{x:t.pageX,y:t.pageY}}}const fd=t=>e=>Vn(e)&&t(e,ne(e));function se(t,e,n,s){return ee(t,e,fd(n),s)}const Ir=1e-4,hd=1-Ir,md=1+Ir,Nr=.01,pd=0-Nr,gd=0+Nr;function G(t){return t.max-t.min}function yd(t,e,n){return Math.abs(t-e)<=n}function Fr(t,e,n,s=.5){t.origin=s,t.originPoint=O(e.min,e.max,t.origin),t.scale=G(n)/G(e),t.translate=O(n.min,n.max,t.origin)-t.originPoint,(t.scale>=hd&&t.scale<=md||isNaN(t.scale))&&(t.scale=1),(t.translate>=pd&&t.translate<=gd||isNaN(t.translate))&&(t.translate=0)}function ie(t,e,n,s){Fr(t.x,e.x,n.x,s?s.originX:void 0),Fr(t.y,e.y,n.y,s?s.originY:void 0)}function Br(t,e,n){t.min=n.min+e.min,t.max=t.min+G(e)}function bd(t,e,n){Br(t.x,e.x,n.x),Br(t.y,e.y,n.y)}function Or(t,e,n){t.min=e.min-n.min,t.max=t.min+G(e)}function ke(t,e,n){Or(t.x,e.x,n.x),Or(t.y,e.y,n.y)}function J(t){return[t("x"),t("y")]}const jr=({current:t})=>t?t.ownerDocument.defaultView:null,Rr=(t,e)=>Math.abs(t-e);function vd(t,e){const n=Rr(t.x,e.x),s=Rr(t.y,e.y);return Math.sqrt(n**2+s**2)}class zr{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 f=qn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=vd(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:p}=f,{timestamp:y}=W;this.history.push({...p,timestamp:y});const{onStart:v,onMove:T}=this.handlers;h||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Yn(h,this.transformPagePoint),B.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:m,onSessionEnd:p,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=qn(f.type==="pointercancel"?this.lastMoveEventInfo:Yn(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,v),p&&p(f,v)},!Vn(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=ne(e),l=Yn(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=W;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(e,qn(l,this.history)),this.removeListeners=Kt(se(this.contextWindow,"pointermove",this.handlePointerMove),se(this.contextWindow,"pointerup",this.handlePointerUp),se(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),mt(this.updatePoint)}}function Yn(t,e){return e?{point:e(t.point)}:t}function $r(t,e){return{x:t.x-e.x,y:t.y-e.y}}function qn({point:t},e){return{point:t,delta:$r(t,Ur(e)),offset:$r(t,xd(e)),velocity:wd(e,.1)}}function xd(t){return t[0]}function Ur(t){return t[t.length-1]}function wd(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Ur(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>tt(e)));)n--;if(!s)return{x:0,y:0};const o=Z(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 Td(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?O(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?O(n,t,s.max):Math.min(t,n)),t}function _r(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 Sd(t,{top:e,left:n,bottom:s,right:i}){return{x:_r(t.x,n,i),y:_r(t.y,e,s)}}function Wr(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 Cd(t,e){return{x:Wr(t.x,e.x),y:Wr(t.y,e.y)}}function kd(t,e){let n=.5;const s=G(t),i=G(e);return i>s?n=Gt(e.min,e.max-s,t.min):s>i&&(n=Gt(t.min,t.max-i,e.min)),lt(0,1,n)}function Ad(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 Zn=.35;function Pd(t=Zn){return t===!1?t=0:t===!0&&(t=Zn),{x:Kr(t,"left","right"),y:Kr(t,"top","bottom")}}function Kr(t,e,n){return{min:Gr(t,e),max:Gr(t,n)}}function Gr(t,e){return typeof t=="number"?t:t[e]||0}const Vd=new WeakMap;class Md{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=$(),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:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ne(d).point)},r=(d,f)=>{const{drag:h,dragPropagation:m,onDragStart:p}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fc(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),J(v=>{let T=this.getAxisMotionValue(v).get()||0;if(it.test(T)){const{projection:w}=this.visualElement;if(w&&w.layout){const M=w.layout.layoutBox[v];M&&(T=G(M)*(parseFloat(T)/100))}}this.originPoint[v]=T}),p&&B.postRender(()=>p(d,f)),Gn(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:p,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=f;if(m&&this.currentDirection===null){this.currentDirection=Dd(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),y&&y(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>J(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new zr(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:jr(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||!Ae(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Td(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&jt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Sd(s.layoutBox,e):this.constraints=!1,this.elastic=Pd(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&J(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Ad(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!jt(e))return!1;const s=e.current;ct(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=Eu(s,i.root,this.visualElement.getTransformPagePoint());let r=Cd(i.layout.layoutBox,o);if(n){const a=n(Vu(r));this.hasMutatedConstraints=!!a,a&&(r=dr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=J(u=>{if(!Ae(u,n,this.currentDirection))return;let d=l&&l[u]||{};r&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Gn(this.visualElement,e),s.start(Hn(e,s,0,n,this.visualElement,!1))}stopAnimation(){J(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){J(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.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){J(n=>{const{drag:s}=this.getProps();if(!Ae(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]-O(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!jt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};J(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=kd({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(),J(r=>{if(!Ae(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(O(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;Vd.set(this.visualElement,this);const e=this.visualElement.current,n=se(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();jt(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=ee(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(J(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].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=Zn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Ae(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Dd(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Ed extends yt{constructor(e){super(e),this.removeGroupControls=q,this.removeListeners=q,this.controls=new Md(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||q}unmount(){this.removeGroupControls(),this.removeListeners()}}const Hr=t=>(e,n)=>{t&&B.postRender(()=>t(e,n))};class Ld extends yt{constructor(){super(...arguments),this.removePointerDownListener=q}onPointerDown(e){this.session=new zr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jr(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Hr(e),onStart:Hr(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&B.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=se(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 Pe={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Jn=!1;class Id extends x.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),Jn&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Pe.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Jn=!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(),Pn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Jn=!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 Xr(t){const[e,n]=Ki(),s=x.useContext(Re);return g.jsx(Id,{...t,layoutGroup:s,switchLayoutGroup:x.useContext(cr),isPresent:e,safeToRemove:n})}function Nd(t,e,n){const s=K(t)?t:Bt(t);return s.start(Hn("",s,e,n)),s.animation}const Fd=(t,e)=>t.depth-e.depth;class Bd{constructor(){this.children=[],this.isDirty=!1}add(e){Ue(this.children,e),this.isDirty=!0}remove(e){_e(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Fd),this.isDirty=!1,this.children.forEach(e)}}function Od(t,e){const n=X.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(mt(s),t(o-e))};return B.setup(s,!0),()=>mt(s)}const Yr=["TopLeft","TopRight","BottomLeft","BottomRight"],jd=Yr.length,qr=t=>typeof t=="string"?parseFloat(t):t,Zr=t=>typeof t=="number"||P.test(t);function Rd(t,e,n,s,i,o){i?(t.opacity=O(0,n.opacity??1,zd(s)),t.opacityExit=O(e.opacity??1,0,$d(s))):o&&(t.opacity=O(e.opacity??1,n.opacity??1,s));for(let r=0;r<jd;r++){const a=`border${Yr[r]}Radius`;let l=Jr(e,a),c=Jr(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Zr(l)===Zr(c)?(t[a]=Math.max(O(qr(l),qr(c),s),0),(it.test(c)||it.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=O(e.rotate||0,n.rotate||0,s))}function Jr(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const zd=Qr(0,.5,_s),$d=Qr(.5,.95,q);function Qr(t,e,n){return s=>s<t?0:s>e?1:n(Gt(t,e,s))}function to(t,e){t.min=e.min,t.max=e.max}function nt(t,e){to(t.x,e.x),to(t.y,e.y)}function eo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function no(t,e,n,s,i){return t-=e,t=Ce(t,1/n,s),i!==void 0&&(t=Ce(t,1/i,s)),t}function Ud(t,e=0,n=1,s=.5,i,o=t,r=t){if(it.test(e)&&(e=parseFloat(e),e=O(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=O(o.min,o.max,s);t===o&&(a-=e),t.min=no(t.min,e,n,a,i),t.max=no(t.max,e,n,a,i)}function so(t,e,[n,s,i],o,r){Ud(t,e[n],e[s],e[i],e.scale,o,r)}const _d=["x","scaleX","originX"],Wd=["y","scaleY","originY"];function io(t,e,n,s){so(t.x,e,_d,n?n.x:void 0,s?s.x:void 0),so(t.y,e,Wd,n?n.y:void 0,s?s.y:void 0)}function ro(t){return t.translate===0&&t.scale===1}function oo(t){return ro(t.x)&&ro(t.y)}function ao(t,e){return t.min===e.min&&t.max===e.max}function Kd(t,e){return ao(t.x,e.x)&&ao(t.y,e.y)}function lo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function co(t,e){return lo(t.x,e.x)&&lo(t.y,e.y)}function uo(t){return G(t.x)/G(t.y)}function fo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Gd{constructor(){this.members=[]}add(e){Ue(this.members,e),e.scheduleRender()}remove(e){if(_e(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 Hd(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0: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:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),d&&(s+=`rotateX(${d}deg) `),f&&(s+=`rotateY(${f}deg) `),h&&(s+=`skewX(${h}deg) `),m&&(s+=`skewY(${m}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 Qn=["","X","Y","Z"],Xd=1e3;let Yd=0;function ts(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function ho(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Pr(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&&ho(s)}function mo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Yd++,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(Jd),this.nodes.forEach(nf),this.nodes.forEach(sf),this.nodes.forEach(Qd)},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 Bd)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Ge),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=Ui(r)&&!$c(r),this.instance=r;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;B.read(()=>{d=window.innerWidth}),t(r,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=Od(f,250),Pe.hasAnimatedSinceResize&&(Pe.hasAnimatedSinceResize=!1,this.nodes.forEach(yo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||cf,{onLayoutAnimationStart:p,onLayoutAnimationComplete:y}=c.getProps(),v=!this.targetLayout||!co(this.targetLayout,h),T=!d&&f;if(this.options.layoutRoot||this.resumeFrom||T||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Cn(m,"layout"),onPlay:p,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,T)}else d||yo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}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(),mt(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(rf),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&&ho(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];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 c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(po);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(go);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ef),this.nodes.forEach(qd),this.nodes.forEach(Zd)):this.nodes.forEach(go),this.clearAllSnapshots();const a=X.now();W.delta=lt(0,1e3/60,a-W.timestamp),W.timestamp=a,W.isProcessing=!0,Ze.update.process(W),Ze.preRender.process(W),Ze.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Pn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tf),this.sharedNodes.forEach(of)}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&&!G(this.snapshot.measuredBox.x)&&!G(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=$(),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&&!oo(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||Ct(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),uf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:r}=this.options;if(!r)return $();const a=r.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(df))){const{scroll:u}=this.root;u&&(Rt(a.x,u.offset.x),Rt(a.y,u.offset.y))}return a}removeElementScroll(r){var l;const a=$();if(nt(a,r),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&nt(a,r),Rt(a.x,d.offset.x),Rt(a.y,d.offset.y))}return a}applyTransform(r,a=!1){const l=$();nt(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&zt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ct(u.latestValues)&&zt(l,u.latestValues)}return Ct(this.latestValues)&&zt(l,this.latestValues),l}removeTransform(r){const a=$();nt(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ct(c.latestValues))continue;Un(c.latestValues)&&c.updateSnapshot();const u=$(),d=c.measurePageBox();nt(u,d),io(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ct(this.latestValues)&&io(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!==W.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var h;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||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=W.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=$(),this.targetWithTransforms=$()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),bd(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):nt(this.target,this.layout.layoutBox),pr(this.target,this.targetDelta)):nt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Un(this.parent.latestValues)||fr(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=$(),this.relativeTargetOrigin=$(),ke(this.relativeTargetOrigin,a,l),nt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===W.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;nt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Du(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=$());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(eo(this.prevProjectionDelta.x,this.projectionDelta.x),eo(this.prevProjectionDelta.y,this.projectionDelta.y)),ie(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!fo(this.projectionDelta.x,this.prevProjectionDelta.x)||!fo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=$t(),this.projectionDelta=$t(),this.projectionDeltaWithTransform=$t()}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=$t();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=$(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=h!==m,y=this.getStack(),v=!y||y.members.length<=1,T=!!(p&&!v&&this.options.crossfade===!0&&!this.path.some(lf));this.animationProgress=0;let w;this.mixTargetDelta=M=>{const A=M/1e3;bo(d.x,r.x,A),bo(d.y,r.y,A),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ke(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),af(this.relativeTarget,this.relativeTargetOrigin,f,A),w&&Kd(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=$()),nt(w,this.relativeTarget)),p&&(this.animationValues=u,Rd(u,c,this.latestValues,A,T,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(mt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=B.update(()=>{Pe.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Bt(0)),this.currentAnimation=Nd(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),r.onUpdate&&r.onUpdate(u)},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(Xd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&So(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||$();const d=G(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const f=G(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}nt(a,l),zt(a,u),ie(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Gd),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var a;const{layoutId:r}=this.options;return r?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:r}=this.options;return r?(a=this.getStack())==null?void 0:a.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 c=this.getStack();c&&c.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 c={};l.z&&ts("z",r,c,this.animationValues);for(let u=0;u<Qn.length;u++)ts(`rotate${Qn[u]}`,r,c,this.animationValues),ts(`skew${Qn[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);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=Se(a==null?void 0:a.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Se(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Ct(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=Hd(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),r.transform=d;const{x:f,y:h}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in In){if(u[m]===void 0)continue;const{correct:p,applyTo:y,isCSSVariable:v}=In[m],T=d==="none"?u[m]:p(u[m],c);if(y){const w=y.length;for(let M=0;M<w;M++)r[y[M]]=T}else v?this.options.visualElement.renderState.vars[m]=T:r[m]=T}this.options.layoutId&&(r.pointerEvents=c===this?Se(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(po),this.root.sharedNodes.clear()}}}function qd(t){t.updateLayout()}function Zd(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=e.source!==t.layout.source;o==="size"?J(d=>{const f=r?e.measuredBox[d]:e.layoutBox[d],h=G(f);f.min=s[d].min,f.max=f.min+h}):So(o,e.layoutBox,s)&&J(d=>{const f=r?e.measuredBox[d]:e.layoutBox[d],h=G(s[d]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+h)});const a=$t();ie(a,s,e.layoutBox);const l=$t();r?ie(l,t.applyTransform(i,!0),e.measuredBox):ie(l,s,e.layoutBox);const c=!oo(a);let u=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const m=$();ke(m,e.layoutBox,f.layoutBox);const p=$();ke(p,s,h.layoutBox),co(m,p)||(u=!0),d.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Jd(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 Qd(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function tf(t){t.clearSnapshot()}function po(t){t.clearMeasurements()}function go(t){t.isLayoutDirty=!1}function ef(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function yo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function nf(t){t.resolveTargetDelta()}function sf(t){t.calcProjection()}function rf(t){t.resetSkewAndRotation()}function of(t){t.removeLeadSnapshot()}function bo(t,e,n){t.translate=O(e.translate,0,n),t.scale=O(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function vo(t,e,n,s){t.min=O(e.min,n.min,s),t.max=O(e.max,n.max,s)}function af(t,e,n,s){vo(t.x,e.x,n.x,s),vo(t.y,e.y,n.y,s)}function lf(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const cf={duration:.45,ease:[.4,0,.1,1]},xo=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),wo=xo("applewebkit/")&&!xo("chrome/")?Math.round:q;function To(t){t.min=wo(t.min),t.max=wo(t.max)}function uf(t){To(t.x),To(t.y)}function So(t,e,n){return t==="position"||t==="preserve-aspect"&&!yd(uo(e),uo(n),.2)}function df(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const ff=mo({attachResizeListener:(t,e)=>ee(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),es={current:void 0},Co=mo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!es.current){const t=new ff({});t.mount(window),t.setOptions({layoutScroll:!0}),es.current=t}return es.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),hf={pan:{Feature:Ld},drag:{Feature:Ed,ProjectionNode:Co,MeasureLayout:Xr}};function ko(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,ne(e)))}class mf extends yt{mount(){const{current:e}=this.node;e&&(this.unmount=Bc(e,(n,s)=>(ko(this.node,s,"Start"),i=>ko(this.node,i,"End"))))}unmount(){}}class pf extends yt{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=Kt(ee(this.node.current,"focus",()=>this.onFocus()),ee(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ao(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,ne(e)))}class gf extends yt{mount(){const{current:e}=this.node;e&&(this.unmount=zc(e,(n,s)=>(Ao(this.node,s,"Start"),(i,{success:o})=>Ao(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ns=new WeakMap,ss=new WeakMap,yf=t=>{const e=ns.get(t.target);e&&e(t)},bf=t=>{t.forEach(yf)};function vf({root:t,...e}){const n=t||document;ss.has(n)||ss.set(n,{});const s=ss.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(bf,{root:t,...e})),s[i]}function xf(t,e,n){const s=vf(e);return ns.set(t,n),s.observe(t),()=>{ns.delete(t),s.unobserve(t)}}const wf={some:0,all:1};class Tf extends yt{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:wf[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return xf(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(Sf(e,n))&&this.startObserver()}unmount(){}}function Sf({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Cf={...dd,...{inView:{Feature:Tf},tap:{Feature:gf},focus:{Feature:pf},hover:{Feature:mf}},...hf,...{layout:{ProjectionNode:Co,MeasureLayout:Xr}}},Q=Pu(Cf,zu),Po=x.createContext(null);function Vo(){const t=x.useContext(Po);if(!t)throw new Error("Dialog components (like DialogTrigger, DialogContent) must be used within a <Dialog> provider.");return t}function Mo({children:t,defaultOpen:e=!1,onOpenChange:n,open:s}){const[i,o]=x.useState(e),r=s!==void 0,a=r?s:i,l=x.useCallback(c=>{r?n==null||n(c):o(c)},[r,n]);return g.jsx(Po.Provider,{value:{onOpenChange:l,open:a},children:t})}function kf({children:t,ref:e,variant:n,...s}){const{onOpenChange:i}=Vo();return g.jsx(Ds,{onClick:()=>i(!0),ref:e,...s,variant:n,children:t})}const Af=oe("absolute flex flex-col bg-surface p-6 z-10 border-2 border-border overflow-hidden",{defaultVariants:{position:"center"},variants:{position:{bottom:"w-full h-3/4 md:h-1/3 rounded-t-lg bottom-0",center:"relative w-[90%] max-h-[95vh] md:w-1/2 md:h-1/3 h-fit rounded-lg",left:"w-[85%] md:w-1/3 h-full rounded-r-lg left-0 px-3",right:"w-[85%] md:w-1/3 h-full rounded-l-lg right-0 px-3",top:"w-full h-3/4 md:h-1/3 rounded-b-lg top-0"}}}),Pf={bottom:{animate:{y:0},exit:{y:"100%"},initial:{y:"100%"},transition:{duration:.3,ease:"easeInOut"}},center:{animate:{opacity:1,scale:[0,1.05,1]},exit:{opacity:0,scale:.95},initial:{opacity:0,scale:.95},transition:{duration:.35,ease:"easeOut"}},left:{animate:{x:0},exit:{x:"-100%"},initial:{x:"-100%"},transition:{duration:.3,ease:"easeInOut"}},right:{animate:{x:0},exit:{x:"100%"},initial:{x:"100%"},transition:{duration:.3,ease:"easeInOut"}},top:{animate:{y:0},exit:{y:"-100%"},initial:{y:"-100%"},transition:{duration:.3,ease:"easeInOut"}}};function Do({children:t,className:e,closeButton:n=!1,position:s,ref:i,...o}){const{onOpenChange:r,open:a}=Vo();x.useEffect(()=>{function c(u){u.key==="Escape"&&r(!1)}return document.body.addEventListener("keydown",c),()=>document.body.removeEventListener("keydown",c)},[r]);const l=Pf[s??"center"];return Bo.createPortal(g.jsx(Hi,{children:a&&g.jsxs(Q.div,{animate:{opacity:1},className:"fixed inset-0 z-50 flex items-center justify-center",exit:{opacity:0},initial:{opacity:0},transition:{duration:.2},children:[g.jsx("div",{"aria-label":"Close overlay",className:"fixed inset-0 bg-black/70",onClick:()=>r(!1),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&r(!1)},role:"button",tabIndex:-1}),g.jsxs(Q.div,{"aria-modal":"true",className:I(Af({position:s}),e),onClick:c=>c.stopPropagation(),role:"dialog",...l,ref:i,...o,children:[t,n&&g.jsx("button",{"aria-label":"Close dialog",className:"absolute top-4 right-4 hover:scale-105 hover:text-primary transition-all cursor-pointer",onClick:()=>r(!1),children:g.jsx(Xo,{size:32})})]})]})}),document.body)}function Vf({children:t,className:e,ref:n,subtitle:s,title:i,...o}){return g.jsxs("div",{className:I("flex flex-col gap-1 border-b-2 border-text pb-1 mb-3",e),ref:n,...o,children:[i&&g.jsx("h3",{className:"font-bold text-xl",children:i}),s&&g.jsx("p",{className:"text-text-secondary text-lg",children:s}),t]})}function Mf({children:t,className:e,ref:n,text:s,...i}){return g.jsxs("div",{className:I("flex border-y-2 border-text p-2 my-2",e),ref:n,...i,children:[s&&g.jsx("p",{className:"w-full text-text italic text-center",children:s}),t]})}function Df({children:t,className:e,...n}){return g.jsx("div",{className:I("flex-1 overflow-y-auto min-h-0",e),...n,children:t})}function Ef({children:t,className:e,ref:n,...s}){return g.jsx("div",{className:I("w-full flex flex-row justify-end items-center gap-4 bottom-0",e),ref:n,...s,children:t})}function Lf({className:t,disabled:e,errorText:n,icon:s,id:i,ref:o,suffix:r,...a}){const l=x.useId(),c=i||l,u=`${c}-error`;return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:I("flex flex-row items-center gap-2 px-2 py-2 rounded-md border transition-all","bg-input-background text-text","focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-1 focus-within:ring-offset-background",e&&"opacity-50 cursor-not-allowed bg-disabled-surface",n&&!e?"border-error focus-within:ring-error":"border-border focus-within:ring-primary-focus",t),children:[s&&g.jsx("div",{className:"text-text flex pr-1 border-r-2 border-text",children:s}),g.jsx("input",{"aria-describedby":n?u:void 0,"aria-invalid":!!n,className:`flex-1 w-full h-full bg-transparent outline-none placeholder:text-text-secondary file:bg-transparent file:border-0 file:text-sm file:font-medium ${e&&"cursor-not-allowed"}`,disabled:e,id:c,ref:o,...a}),r&&g.jsx("div",{className:"flex shrink-0 text-text-secondary",children:r})]}),g.jsx(Hi,{mode:"wait",children:n&&g.jsx(Q.p,{animate:{height:"auto",opacity:1,y:0},className:"mt-1 text-sm text-error-text font-medium ml-1",exit:{height:0,opacity:0,y:-10},id:u,initial:{height:0,opacity:0,y:-10},role:"alert",children:n})})]})}function If({className:t,color:e,dotsCount:n=3,duration:s=.7,gap:i=6,itemStagger:o=.2,jumpHeight:r=15,repeatDuration:a=.5,size:l=10,...c}){const u={animate:{transition:{delayChildren:_i(o)}}},d={animate:{transition:{duration:s,ease:"easeInOut",repeat:1/0,repeatDelay:a},y:[0,-r,0]}};return g.jsx("div",{className:I("flex items-center justify-center",t),...c,"aria-label":"Loading",role:"status",children:g.jsx(Q.div,{animate:"animate",className:"flex flex-row w-full h-full",initial:"initial",style:{gap:i},variants:u,children:Array.from({length:n}).map((f,h)=>g.jsx(Q.div,{className:"rounded-full border border-border",style:{backgroundColor:e??"var(--primary)",height:l,width:l},variants:d},h))})})}function Nf({className:t,primaryColor:e,primaryDuration:n=1,secondaryColor:s,secondaryDuration:i=.8,size:o=48,...r}){const a=o/2,l=o*.35,c=o*.2;return g.jsxs("div",{className:I("relative flex justify-center items-center",t),...r,style:{height:o,width:o},children:[g.jsx(Q.div,{animate:{rotate:360},className:"absolute top-0 left-1/2 rounded-full",style:{backgroundColor:e??"var(--primary)",height:l,transformOrigin:`50% ${a}px`,width:l,x:"-50%"},transition:{duration:n,ease:"linear",repeat:1/0}}),g.jsx(Q.div,{animate:{rotate:-360},className:"absolute top-0 left-1/2 rounded-full",style:{backgroundColor:s??"var(--secondary)",height:c,transformOrigin:`50% ${a}px`,width:c,x:"-50%"},transition:{duration:i,ease:"linear",repeat:1/0}})]})}function Ff({barCount:t=5,barHeight:e,barWidth:n=16,className:s,color:i,duration:o,itemStagger:r=.15,...a}){const l=Math.max(10,e/4),c={animate:{opacity:1,transition:{delayChildren:_i(r)}},initial:{opacity:0}},u={animate:{height:[l,e,l],transition:{duration:o||t*.3,ease:"easeInOut",repeat:1/0}},initial:{height:l}},d=Array.from({length:t},(f,h)=>h);return g.jsx("div",{"aria-label":"Loading",className:I("relative flex items-center justify-center",s),role:"status",...a,children:g.jsx(Q.ul,{animate:"animate",className:"flex flex-row gap-4 h-full w-full items-center justify-center",initial:"initial",style:{height:e},variants:c,children:d.map(f=>g.jsx(Q.li,{style:{backgroundColor:i??"var(--primary)",borderRadius:n/2,width:n},variants:u},f))})})}function Bf({className:t,duration:e=2,ease:n="easeInOut",primaryColor:s,rotationsCount:i=5,secondaryColor:o,size:r=72,thickness:a,...l}){return e=e<.25?.25:e,g.jsx("div",{className:I("relative flex items-center justify-center",t),...l,"aria-label":"Loading",role:"status",children:g.jsx(Q.div,{animate:{rotate:i*360},className:"relative rounded-full flex items-center justify-center overflow-hidden",style:{borderColor:s??"var(--primary)",borderTopColor:o??"var(--secondary)",borderWidth:a||r/6,height:r,width:r},transition:{duration:e,ease:n,repeat:1/0,type:n==="linear"?void 0:"spring"}})})}const Eo=768;function Of(){return x.useSyncExternalStore(t=>{const e=window.matchMedia(`(max-width: ${Eo-1}px)`);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},()=>window.matchMedia(`(max-width: ${Eo-1}px)`).matches,()=>!1)}const Lo=x.createContext(null);function Io(){const t=x.useContext(Lo);if(!t)throw new Error("useSidebar must be used within a <Sidebar> provider.");return t}function jf({children:t,collapsed:e,defaultCollapsed:n=!1,mobileOpen:s,onCollapsedChange:i,onMobileOpenChange:o}){const r=Of(),[a,l]=x.useState(n),c=e!==void 0,u=c?e:a,[d,f]=x.useState(!1),h=s!==void 0,m=h?s:d,p=x.useCallback(w=>{c?i==null||i(w):l(w)},[c,i]),y=x.useCallback(w=>{h?o==null||o(w):f(w)},[h,o]),v=x.useCallback(()=>{r?y(!m):p(!u)},[r,m,y,u,p]),T=x.useMemo(()=>({collapsed:u,isMobile:r,mobileOpen:m,setCollapsed:p,setMobileOpen:y,toggleSidebar:v}),[u,m,p,y,v,r]);return g.jsx(Lo.Provider,{value:T,children:t})}function Rf({children:t,className:e,collapsedWidth:n="3.5rem",dialogProps:s,ref:i,side:o="left",style:r,width:a="16rem",...l}){const{collapsed:c,isMobile:u,mobileOpen:d,setMobileOpen:f}=Io();return u?g.jsx(Mo,{onOpenChange:f,open:d,children:g.jsx(Do,{closeButton:!1,position:o,...s,className:I("h-full bg-surface text-text border-border border-r",e,s==null?void 0:s.className),children:g.jsx("div",{className:"group/sidebar h-full flex flex-col","data-collapsed":"false",children:t})})}):g.jsx("aside",{className:I("group/sidebar overflow-hidden inset-y-0 z-30 flex flex-col h-screen bg-surface border-border-strong transition-[width] duration-300 ease-in-out",o==="left"?"border-r left-0":"border-l right-0",e),"data-collapsed":c,ref:i,style:{width:c?n:a,...r},...l,children:t})}function zf({children:t,className:e,...n}){return g.jsx("div",{className:I("flex flex-col p-2 shrink-0 border-b-2 border-border",e),...n,children:t})}function $f({children:t,className:e,ref:n,...s}){return g.jsx("div",{className:I("flex flex-col gap-2 flex-1 p-2",e),ref:n,...s,children:t})}function Uf({categoryTitle:t,children:e,className:n,icon:s,...i}){const o="group-data-[collapsed=true]/sidebar:hidden";return g.jsx("div",{className:I("flex flex-row items-center gap-2 rounded-md p-2 transition-all","justify-start",t?"mt-2":"cursor-pointer hover:bg-info-surface",n),...i,children:t?g.jsxs(g.Fragment,{children:[g.jsx("h4",{className:I("font-bold text-lg whitespace-nowrap overflow-hidden",o),children:e}),g.jsx("div",{className:I("hidden group-data-[collapsed=true]/sidebar:block"),children:s??g.jsx(Ko,{strokeWidth:3})})]}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"shrink-0 flex items-center justify-center",children:s}),g.jsx("div",{className:I("whitespace-nowrap overflow-hidden transition-opacity duration-200",o),children:e})]})})}function _f({children:t,className:e,...n}){return g.jsx("div",{className:I("flex flex-col p-2 mt-auto shrink-0 border-t-2 border-border",e),...n,children:t})}function Wf({children:t,className:e,...n}){const{toggleSidebar:s}=Io();return g.jsx("button",{className:I("p-2 rounded border border-border hover:bg-border transition-colors bg-border-subtle",e),onClick:()=>s(),title:"Toggle sidebar",...n,children:t})}function Kf({checked:t,className:e,disabled:n,error:s,id:i,label:o,onChange:r,onCheckedChange:a,ref:l,switchIcon:c,...u}){const d=x.useId(),f=i||d,h=m=>{a(m.target.checked),r&&r(m)};return g.jsxs(g.Fragment,{children:[g.jsxs("label",{className:I("flex h-8 w-[60px] cursor-pointer items-center rounded-full p-1 transition-colors duration-300 shadow",t?"bg-primary":"bg-border-strong",n&&"cursor-not-allowed opacity-50",t?"justify-end":"justify-start","has-[:focus-visible]:outline-none has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-primary-focus has-[:focus-visible]:ring-offset-2",e),htmlFor:f,children:[g.jsx("input",{checked:t,className:"peer sr-only",disabled:n,id:f,onChange:h,ref:l,type:"checkbox",...u}),g.jsx(Q.div,{className:I("aspect-square h-full rounded-full bg-white shadow-sm","flex items-center justify-center text-xs"),layout:!0,transition:{damping:30,stiffness:700,type:"spring"},children:c&&g.jsx(Q.div,{animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},initial:{opacity:0,scale:.5},children:c},t?"on":"off")})]}),o&&g.jsx(je,{disabled:n,error:s,htmlFor:f,children:o})]})}const Gf=oe("m-0 leading-normal transition-colors",{defaultVariants:{align:"left",color:"default",italic:!1,size:"base",underline:!1,weight:"normal"},variants:{align:{center:"text-center",justify:"text-justify",left:"text-left",right:"text-right"},color:{default:"text-text",error:"text-error-text",info:"text-info-text",muted:"text-text-secondary dark:text-slate-400",success:"text-success-text",warning:"text-warning-text"},italic:{false:"",true:"italic"},size:{"2xl":"text-2xl md:text-3xl","3xl":"text-3xl md:text-4xl","4xl":"text-4xl md:text-5xl",base:"text-base",lg:"text-lg",sm:"text-sm",xl:"text-xl",xs:"text-xs"},underline:{false:"",true:"underline"},weight:{bold:"font-bold",medium:"font-medium",normal:"font-normal",semibold:"font-semibold"}}});function Hf({align:t,as:e,children:n,className:s,color:i,italic:o,ref:r,size:a,underline:l,weight:c,...u}){const d=e||"p";return g.jsx(d,{className:I(Gf({align:t,color:i,italic:o,size:a,underline:l,weight:c}),s),ref:r,...u,children:n})}D.Alert=ja,D.AlertMessage=za,D.AlertTitle=Ra,D.Button=Ds,D.Card=Ua,D.CardContent=Ga,D.CardDescription=Ka,D.CardFooter=Ha,D.CardHeader=_a,D.CardTitle=Wa,D.Checkbox=Xa,D.Dialog=Mo,D.DialogBody=Df,D.DialogButtons=Ef,D.DialogContent=Do,D.DialogFooter=Mf,D.DialogHeader=Vf,D.DialogTrigger=kf,D.Dots=If,D.Input=Lf,D.Label=je,D.Orbital=Nf,D.ScreenLoader=Ff,D.Sidebar=jf,D.SidebarBody=$f,D.SidebarContent=Rf,D.SidebarFooter=_f,D.SidebarHeader=zf,D.SidebarItem=Uf,D.SidebarTrigger=Wf,D.Spinner=Bf,D.Switch=Kf,D.Text=Hf,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})}));