@plyaz/ui 0.6.1 → 0.6.3

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.
Files changed (3) hide show
  1. package/dist/ui.cjs.js +9 -9
  2. package/dist/ui.es.js +1957 -4688
  3. package/package.json +1 -1
package/dist/ui.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var ma=Object.defineProperty;var pa=(t,e,n)=>e in t?ma(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var be=(t,e,n)=>pa(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react/jsx-runtime"),er=require("clsx"),ga=require("@radix-ui/react-slot"),k=require("react"),ya=require("@radix-ui/react-select"),Oe=require("lucide-react"),nr=require("next-intl");function xa(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 X=xa(ya),Ut=({children:t,element:e="div",className:n="",...s})=>{const i=e;return P.jsx(i,{className:n,...s,"data-testid":"box",children:t})},zn="-",va=t=>{const e=wa(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:r=>{const a=r.split(zn);return a[0]===""&&a.length!==1&&a.shift(),sr(a,e)||ba(r)},getConflictingClassGroupIds:(r,a)=>{const l=n[r]||[];return a&&s[r]?[...l,...s[r]]:l}}},sr=(t,e)=>{var r;if(t.length===0)return e.classGroupId;const n=t[0],s=e.nextPart.get(n),i=s?sr(t.slice(1),s):void 0;if(i)return i;if(e.validators.length===0)return;const o=t.join(zn);return(r=e.validators.find(({validator:a})=>a(o)))==null?void 0:r.classGroupId},Ms=/^\[(.+)\]$/,ba=t=>{if(Ms.test(t)){const e=Ms.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},wa=t=>{const{theme:e,classGroups:n}=t,s={nextPart:new Map,validators:[]};for(const i in n)mn(n[i],s,i,e);return s},mn=(t,e,n,s)=>{t.forEach(i=>{if(typeof i=="string"){const o=i===""?e:Cs(e,i);o.classGroupId=n;return}if(typeof i=="function"){if(Ta(i)){mn(i(s),e,n,s);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,r])=>{mn(r,Cs(e,o),n,s)})})},Cs=(t,e)=>{let n=t;return e.split(zn).forEach(s=>{n.nextPart.has(s)||n.nextPart.set(s,{nextPart:new Map,validators:[]}),n=n.nextPart.get(s)}),n},Ta=t=>t.isThemeGetter,Sa=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,s=new Map;const i=(o,r)=>{n.set(o,r),e++,e>t&&(e=0,s=n,n=new Map)};return{get(o){let r=n.get(o);if(r!==void 0)return r;if((r=s.get(o))!==void 0)return i(o,r),r},set(o,r){n.has(o)?n.set(o,r):i(o,r)}}},pn="!",gn=":",Pa=gn.length,Aa=t=>{const{prefix:e,experimentalParseClassName:n}=t;let s=i=>{const o=[];let r=0,a=0,l=0,u;for(let m=0;m<i.length;m++){let g=i[m];if(r===0&&a===0){if(g===gn){o.push(i.slice(l,m)),l=m+Pa;continue}if(g==="/"){u=m;continue}}g==="["?r++:g==="]"?r--:g==="("?a++:g===")"&&a--}const c=o.length===0?i:i.substring(l),d=ka(c),f=d!==c,h=u&&u>l?u-l:void 0;return{modifiers:o,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}};if(e){const i=e+gn,o=s;s=r=>r.startsWith(i)?o(r.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:r,maybePostfixModifierPosition:void 0}}if(n){const i=s;s=o=>n({className:o,parseClassName:i})}return s},ka=t=>t.endsWith(pn)?t.substring(0,t.length-1):t.startsWith(pn)?t.substring(1):t,Va=t=>{const e=Object.fromEntries(t.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const i=[];let o=[];return s.forEach(r=>{r[0]==="["||e[r]?(i.push(...o.sort(),r),o=[]):o.push(r)}),i.push(...o.sort()),i}},Ma=t=>({cache:Sa(t.cacheSize),parseClassName:Aa(t),sortModifiers:Va(t),...va(t)}),Ca=/\s+/,Ea=(t,e)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:o}=e,r=[],a=t.trim().split(Ca);let l="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{isExternal:d,modifiers:f,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:g}=n(c);if(d){l=c+(l.length>0?" "+l:l);continue}let x=!!g,y=s(x?m.substring(0,g):m);if(!y){if(!x){l=c+(l.length>0?" "+l:l);continue}if(y=s(m),!y){l=c+(l.length>0?" "+l:l);continue}x=!1}const S=o(f).join(":"),v=h?S+pn:S,M=v+y;if(r.includes(M))continue;r.push(M);const A=i(y,x);for(let E=0;E<A.length;++E){const R=A[E];r.push(v+R)}l=c+(l.length>0?" "+l:l)}return l};function Da(){let t=0,e,n,s="";for(;t<arguments.length;)(e=arguments[t++])&&(n=ir(e))&&(s&&(s+=" "),s+=n);return s}const ir=t=>{if(typeof t=="string")return t;let e,n="";for(let s=0;s<t.length;s++)t[s]&&(e=ir(t[s]))&&(n&&(n+=" "),n+=e);return n};function Ra(t,...e){let n,s,i,o=r;function r(l){const u=e.reduce((c,d)=>d(c),t());return n=Ma(u),s=n.cache.get,i=n.cache.set,o=a,a(l)}function a(l){const u=s(l);if(u)return u;const c=Ea(l,n);return i(l,c),c}return function(){return o(Da.apply(null,arguments))}}const O=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},rr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,or=/^\((?:(\w[\w-]*):)?(.+)\)$/i,La=/^\d+\/\d+$/,Ia=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ja=/\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$/,Fa=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Na=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ba=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dt=t=>La.test(t),C=t=>!!t&&!Number.isNaN(Number(t)),ht=t=>!!t&&Number.isInteger(Number(t)),Xe=t=>t.endsWith("%")&&C(t.slice(0,-1)),dt=t=>Ia.test(t),Oa=()=>!0,za=t=>ja.test(t)&&!Fa.test(t),ar=()=>!1,Wa=t=>Na.test(t),Ua=t=>Ba.test(t),_a=t=>!b(t)&&!w(t),$a=t=>_t(t,ur,ar),b=t=>rr.test(t),bt=t=>_t(t,dr,za),Ye=t=>_t(t,Ya,C),Es=t=>_t(t,lr,ar),Ga=t=>_t(t,cr,Ua),we=t=>_t(t,fr,Wa),w=t=>or.test(t),qt=t=>$t(t,dr),Ka=t=>$t(t,qa),Ds=t=>$t(t,lr),Ha=t=>$t(t,ur),Xa=t=>$t(t,cr),Te=t=>$t(t,fr,!0),_t=(t,e,n)=>{const s=rr.exec(t);return s?s[1]?e(s[1]):n(s[2]):!1},$t=(t,e,n=!1)=>{const s=or.exec(t);return s?s[1]?e(s[1]):n:!1},lr=t=>t==="position"||t==="percentage",cr=t=>t==="image"||t==="url",ur=t=>t==="length"||t==="size"||t==="bg-size",dr=t=>t==="length",Ya=t=>t==="number",qa=t=>t==="family-name",fr=t=>t==="shadow",Za=()=>{const t=O("color"),e=O("font"),n=O("text"),s=O("font-weight"),i=O("tracking"),o=O("leading"),r=O("breakpoint"),a=O("container"),l=O("spacing"),u=O("radius"),c=O("shadow"),d=O("inset-shadow"),f=O("text-shadow"),h=O("drop-shadow"),m=O("blur"),g=O("perspective"),x=O("aspect"),y=O("ease"),S=O("animate"),v=()=>["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(),w,b],E=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],p=()=>[w,b,l],L=()=>[Dt,"full","auto",...p()],G=()=>[ht,"none","subgrid",w,b],ut=()=>["auto",{span:["full",ht,w,b]},ht,w,b],xt=()=>[ht,"auto",w,b],pe=()=>["auto","min","max","fr",w,b],Mt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],vt=()=>["start","end","center","stretch","center-safe","end-safe"],ot=()=>["auto",...p()],I=()=>[Dt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...p()],T=()=>[t,w,b],Ct=()=>[...M(),Ds,Es,{position:[w,b]}],Et=()=>["no-repeat",{repeat:["","x","y","space","round"]}],As=()=>["auto","cover","contain",Ha,$a,{size:[w,b]}],Ke=()=>[Xe,qt,bt],K=()=>["","none","full",u,w,b],Z=()=>["",C,qt,bt],ge=()=>["solid","dashed","dotted","double"],ks=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[C,Xe,Ds,Es],Vs=()=>["","none",m,w,b],ye=()=>["none",C,w,b],xe=()=>["none",C,w,b],He=()=>[C,w,b],ve=()=>[Dt,"full",...p()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[dt],breakpoint:[dt],color:[Oa],container:[dt],"drop-shadow":[dt],ease:["in","out","in-out"],font:[_a],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[dt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[dt],shadow:[dt],spacing:["px",C],text:[dt],"text-shadow":[dt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Dt,b,w,x]}],container:["container"],columns:[{columns:[C,b,w,a]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"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:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[ht,"auto",w,b]}],basis:[{basis:[Dt,"full","auto",a,...p()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[C,Dt,"auto","initial","none",b]}],grow:[{grow:["",C,w,b]}],shrink:[{shrink:["",C,w,b]}],order:[{order:[ht,"first","last","none",w,b]}],"grid-cols":[{"grid-cols":G()}],"col-start-end":[{col:ut()}],"col-start":[{"col-start":xt()}],"col-end":[{"col-end":xt()}],"grid-rows":[{"grid-rows":G()}],"row-start-end":[{row:ut()}],"row-start":[{"row-start":xt()}],"row-end":[{"row-end":xt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":pe()}],"auto-rows":[{"auto-rows":pe()}],gap:[{gap:p()}],"gap-x":[{"gap-x":p()}],"gap-y":[{"gap-y":p()}],"justify-content":[{justify:[...Mt(),"normal"]}],"justify-items":[{"justify-items":[...vt(),"normal"]}],"justify-self":[{"justify-self":["auto",...vt()]}],"align-content":[{content:["normal",...Mt()]}],"align-items":[{items:[...vt(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...vt(),{baseline:["","last"]}]}],"place-content":[{"place-content":Mt()}],"place-items":[{"place-items":[...vt(),"baseline"]}],"place-self":[{"place-self":["auto",...vt()]}],p:[{p:p()}],px:[{px:p()}],py:[{py:p()}],ps:[{ps:p()}],pe:[{pe:p()}],pt:[{pt:p()}],pr:[{pr:p()}],pb:[{pb:p()}],pl:[{pl:p()}],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":p()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":p()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[a,"screen",...I()]}],"min-w":[{"min-w":[a,"screen","none",...I()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[r]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",n,qt,bt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,w,Ye]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xe,b]}],"font-family":[{font:[Ka,b,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,w,b]}],"line-clamp":[{"line-clamp":[C,"none",w,Ye]}],leading:[{leading:[o,...p()]}],"list-image":[{"list-image":["none",w,b]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",w,b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[C,"from-font","auto",w,bt]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[C,"auto",w,b]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:p()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",w,b]}],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",w,b]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Ct()}],"bg-repeat":[{bg:Et()}],"bg-size":[{bg:As()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ht,w,b],radial:["",w,b],conic:[ht,w,b]},Xa,Ga]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:Ke()}],"gradient-via-pos":[{via:Ke()}],"gradient-to-pos":[{to:Ke()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[C,w,b]}],"outline-w":[{outline:["",C,qt,bt]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",c,Te,we]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",d,Te,we]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[C,bt]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",f,Te,we]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[C,w,b]}],"mix-blend":[{"mix-blend":[...ks(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ks()}],"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":[C]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[w,b]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"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":[C]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Ct()}],"mask-repeat":[{mask:Et()}],"mask-size":[{mask:As()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",w,b]}],filter:[{filter:["","none",w,b]}],blur:[{blur:Vs()}],brightness:[{brightness:[C,w,b]}],contrast:[{contrast:[C,w,b]}],"drop-shadow":[{"drop-shadow":["","none",h,Te,we]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",C,w,b]}],"hue-rotate":[{"hue-rotate":[C,w,b]}],invert:[{invert:["",C,w,b]}],saturate:[{saturate:[C,w,b]}],sepia:[{sepia:["",C,w,b]}],"backdrop-filter":[{"backdrop-filter":["","none",w,b]}],"backdrop-blur":[{"backdrop-blur":Vs()}],"backdrop-brightness":[{"backdrop-brightness":[C,w,b]}],"backdrop-contrast":[{"backdrop-contrast":[C,w,b]}],"backdrop-grayscale":[{"backdrop-grayscale":["",C,w,b]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C,w,b]}],"backdrop-invert":[{"backdrop-invert":["",C,w,b]}],"backdrop-opacity":[{"backdrop-opacity":[C,w,b]}],"backdrop-saturate":[{"backdrop-saturate":[C,w,b]}],"backdrop-sepia":[{"backdrop-sepia":["",C,w,b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":p()}],"border-spacing-x":[{"border-spacing-x":p()}],"border-spacing-y":[{"border-spacing-y":p()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",w,b]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[C,"initial",w,b]}],ease:[{ease:["linear","initial",y,w,b]}],delay:[{delay:[C,w,b]}],animate:[{animate:["none",S,w,b]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,w,b]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":["scale-3d"],skew:[{skew:He()}],"skew-x":[{"skew-x":He()}],"skew-y":[{"skew-y":He()}],transform:[{transform:[w,b,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ve()}],"translate-x":[{"translate-x":ve()}],"translate-y":[{"translate-y":ve()}],"translate-z":[{"translate-z":ve()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"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",w,b]}],"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":p()}],"scroll-mx":[{"scroll-mx":p()}],"scroll-my":[{"scroll-my":p()}],"scroll-ms":[{"scroll-ms":p()}],"scroll-me":[{"scroll-me":p()}],"scroll-mt":[{"scroll-mt":p()}],"scroll-mr":[{"scroll-mr":p()}],"scroll-mb":[{"scroll-mb":p()}],"scroll-ml":[{"scroll-ml":p()}],"scroll-p":[{"scroll-p":p()}],"scroll-px":[{"scroll-px":p()}],"scroll-py":[{"scroll-py":p()}],"scroll-ps":[{"scroll-ps":p()}],"scroll-pe":[{"scroll-pe":p()}],"scroll-pt":[{"scroll-pt":p()}],"scroll-pr":[{"scroll-pr":p()}],"scroll-pb":[{"scroll-pb":p()}],"scroll-pl":[{"scroll-pl":p()}],"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",w,b]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[C,qt,bt,Ye]}],stroke:[{stroke:["none",...T()]}],"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"]}},Ja=Ra(Za);function _(...t){return Ja(er.clsx(t))}const Qa=({className:t="",children:e,element:n,...s})=>P.jsx(Ut,{element:n,className:_("mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl",t),...s,children:e}),Rs=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Ls=er.clsx,tl=(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(u=>{const c=n==null?void 0:n[u],d=o==null?void 0:o[u];if(c===null)return null;const f=Rs(c)||Rs(d);return i[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(m=>{let[g,x]=m;return Array.isArray(x)?x.includes({...o,...a}[g]):{...o,...a}[g]===x})?[...u,d,f]:u},[]);return Ls(t,r,l,n==null?void 0:n.class,n==null?void 0:n.className)},hr={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},mr={start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},el={body:"font-sans",heading:"font-sans",caption:"font-sans"},nl={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},sl={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",light:"font-light"},il={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9"},rl={1:"grid-rows-1",2:"grid-rows-2",3:"grid-rows-3",4:"grid-rows-4",5:"grid-rows-5",6:"grid-rows-6",7:"grid-rows-7",8:"grid-rows-8",9:"grid-rows-9"},pr={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",7:"gap-7",8:"gap-8",9:"gap-9"},ol=tl("inline-flex justify-center items-center gap-2 disabled:opacity-50 aria-invalid:border-destructive focus-visible:border-ring rounded-md outline-none aria-invalid:ring-destructive/20 focus-visible:ring-[3px] focus-visible:ring-ring/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 font-medium text-sm whitespace-nowrap transition-all [&_svg]:pointer-events-none disabled:pointer-events-none shrink-0 [&_svg]:shrink-0",{variants:{variant:{default:`
1
+ "use strict";var bo=Object.defineProperty;var To=(t,e,n)=>e in t?bo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Xt=(t,e,n)=>To(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),wo=require("clsx"),So=require("tailwind-merge"),gi=require("class-variance-authority"),Po=require("@radix-ui/react-slot"),b=require("react"),Ao=require("@radix-ui/react-select"),fe=require("lucide-react"),yi=require("next-intl");function Vo(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 O=Vo(Ao),At=({children:t,element:e="div",className:n="",...s})=>{const i=e;return x.jsx(i,{className:n,...s,"data-testid":"box",children:t})};function I(...t){return So.twMerge(wo.clsx(t))}const Mo=({className:t="",children:e,element:n,...s})=>x.jsx(At,{element:n,className:I("mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl",t),...s,children:e}),vi={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},xi={start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},Do={body:"font-sans",heading:"font-sans",caption:"font-sans"},Co={xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},Eo={normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",light:"font-light"},Ro={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9"},Lo={1:"grid-rows-1",2:"grid-rows-2",3:"grid-rows-3",4:"grid-rows-4",5:"grid-rows-5",6:"grid-rows-6",7:"grid-rows-7",8:"grid-rows-8",9:"grid-rows-9"},bi={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",7:"gap-7",8:"gap-8",9:"gap-9"},ko=gi.cva("inline-flex justify-center items-center gap-2 disabled:opacity-50 aria-invalid:border-destructive focus-visible:border-ring rounded-md outline-none aria-invalid:ring-destructive/20 focus-visible:ring-[3px] focus-visible:ring-ring/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 font-medium text-sm whitespace-nowrap transition-all [&_svg]:pointer-events-none disabled:pointer-events-none shrink-0 [&_svg]:shrink-0",{variants:{variant:{default:`
2
2
  bg-primary text-primary-foreground shadow-xs
3
3
  hover:bg-primary/90
4
4
  `,destructive:`
@@ -28,7 +28,7 @@
28
28
  `,lg:`
29
29
  h-10 rounded-md px-6
30
30
  has-[>svg]:px-4
31
- `,icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),al={row:"flex-row",col:"flex-col",row_reverse:"flex-row-reverse",col_reverse:"flex-col-reverse"},ll={wrap:"flex-wrap",nowrap:"flex-nowrap",wrap_reverse:"flex-wrap-reverse"},cl=({children:t,gap:e,direction:n,justify:s,align:i,wrap:o,className:r="",element:a,...l})=>P.jsx(Ut,{element:a,className:_("flex",n&&al[n],s&&hr[s],i&&mr[i],o&&ll[o],e&&pr[e],r),...l,children:t}),ul=({children:t,className:e,cols:n,rows:s,gap:i,justify:o,align:r,element:a,...l})=>P.jsx(Ut,{element:a,className:_("grid",n&&il[n],s&&rl[s],i&&pr[i],o&&hr[o],r&&mr[r],e),...l,children:t}),dl={xs:"xs",sm:"sm",base:"base",lg:"lg",xl:"xl","2xl":"2xl","3xl":"3xl","4xl":"4xl"},fl=({children:t,element:e,className:n,size:s,...i})=>P.jsx(Gt,{className:n,element:e,size:dl[s],variant:"heading",weight:"medium",...i,children:t}),hl=({children:t,className:e,href:n,...s})=>P.jsx("a",{"data-testid":"link",href:n,rel:"noopener noreferrer",target:"_blank",className:_("focus:outline-none text-blue-600 active:text-blue-900 visited:text-purple-600 hover:underline",e),...s,children:t}),ml={xs:"xs",sm:"sm",base:"base",lg:"lg"},pl=({children:t,className:e,size:n,...s})=>P.jsx(Gt,{className:e,element:"p",size:ml[n],variant:"body",weight:"normal",...s,children:t}),gl=({className:t="",children:e,...n})=>P.jsx(Ut,{element:"section",className:t,...n,children:e}),yl=({children:t,direction:e="horizontal",spacing:n="space-x-2",element:s,className:i,...o})=>{const r=e==="vertical"?"flex-col":"flex-row";return P.jsx(Ut,{className:_("flex",r,n,i),element:s,...o,children:t})},Gt=({className:t,children:e,element:n,weight:s,variant:i,size:o,...r})=>{const a=n;return P.jsx(a,{"data-testid":"text",className:_("font-normal text-base",o&&nl[o],s&&sl[s],i&&el[i],t),...r,children:e})};function xl({className:t,variant:e,size:n,asChild:s=!1,...i}){const o=s?ga.Slot:"button";return P.jsx(o,{"data-slot":"button",className:_(ol({variant:e,size:n,className:t})),...i,"data-testid":"button"})}function vl({className:t,type:e,...n}){return P.jsx("input",{type:e,"data-slot":"input",className:_(`
31
+ `,icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});gi.cva("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});const jo={row:"flex-row",col:"flex-col",row_reverse:"flex-row-reverse",col_reverse:"flex-col-reverse"},Io={wrap:"flex-wrap",nowrap:"flex-nowrap",wrap_reverse:"flex-wrap-reverse"},Fo=({children:t,gap:e,direction:n,justify:s,align:i,wrap:o,className:r="",element:a,...l})=>x.jsx(At,{element:a,className:I("flex",n&&jo[n],s&&vi[s],i&&xi[i],o&&Io[o],e&&bi[e],r),...l,children:t}),Bo=({children:t,className:e,cols:n,rows:s,gap:i,justify:o,align:r,element:a,...l})=>x.jsx(At,{element:a,className:I("grid",n&&Ro[n],s&&Lo[s],i&&bi[i],o&&vi[o],r&&xi[r],e),...l,children:t}),No={xs:"xs",sm:"sm",base:"base",lg:"lg",xl:"xl","2xl":"2xl","3xl":"3xl","4xl":"4xl"},Oo=({children:t,element:e,className:n,size:s,...i})=>x.jsx(Vt,{className:n,element:e,size:No[s],variant:"heading",weight:"medium",...i,children:t}),Wo=({children:t,className:e,href:n,...s})=>x.jsx("a",{"data-testid":"link",href:n,rel:"noopener noreferrer",target:"_blank",className:I("focus:outline-none text-blue-600 active:text-blue-900 visited:text-purple-600 hover:underline",e),...s,children:t}),Uo={xs:"xs",sm:"sm",base:"base",lg:"lg"},zo=({children:t,className:e,size:n,...s})=>x.jsx(Vt,{className:e,element:"p",size:Uo[n],variant:"body",weight:"normal",...s,children:t}),_o=({className:t="",children:e,...n})=>x.jsx(At,{element:"section",className:t,...n,children:e}),$o=({children:t,direction:e="horizontal",spacing:n="space-x-2",element:s,className:i,...o})=>{const r=e==="vertical"?"flex-col":"flex-row";return x.jsx(At,{className:I("flex",r,n,i),element:s,...o,children:t})},Vt=({className:t,children:e,element:n,weight:s,variant:i,size:o,...r})=>{const a=n;return x.jsx(a,{"data-testid":"text",className:I("font-normal text-base",o&&Co[o],s&&Eo[s],i&&Do[i],t),...r,children:e})};function Ko({className:t,variant:e,size:n,asChild:s=!1,...i}){const o=s?Po.Slot:"button";return x.jsx(o,{"data-slot":"button",className:I(ko({variant:e,size:n,className:t})),...i,"data-testid":"button"})}function Ho({className:t,type:e,...n}){return x.jsx("input",{type:e,"data-slot":"input",className:I(`
32
32
  flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent
33
33
  px-3 py-1 text-base shadow-xs transition-[color,box-shadow]
34
34
  outline-none
@@ -46,13 +46,13 @@
46
46
  `,`
47
47
  aria-invalid:border-destructive aria-invalid:ring-destructive/20
48
48
  dark:aria-invalid:ring-destructive/40
49
- `,t),...n,"data-testid":"input"})}const gr=k.memo(({children:t,className:e="",colors:n=["#FF0080","#7928CA","#0070F3","#38bdf8"],speed:s=1})=>{const i={backgroundImage:`linear-gradient(135deg, ${n.join(", ")}, ${n[0]})`,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",animationDuration:`${10/s}s`};return P.jsxs("span",{className:`
49
+ `,t),...n,"data-testid":"input"})}const Ti=b.memo(({children:t,className:e="",colors:n=["#FF0080","#7928CA","#0070F3","#38bdf8"],speed:s=1})=>{const i={backgroundImage:`linear-gradient(135deg, ${n.join(", ")}, ${n[0]})`,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",animationDuration:`${10/s}s`};return x.jsxs("span",{className:`
50
50
  relative inline-block
51
51
  ${e}
52
- `,"data-testid":"auroraText",children:[P.jsx("span",{className:"sr-only",children:t}),P.jsx("span",{className:`
52
+ `,"data-testid":"auroraText",children:[x.jsx("span",{className:"sr-only",children:t}),x.jsx("span",{className:`
53
53
  relative animate-aurora bg-clip-text text-transparent
54
54
  bg-[length:200%_auto]
55
- `,style:i,"aria-hidden":"true",children:t})]})});gr.displayName="AuroraText";const yr=k.createContext({});function ze(t){const e=k.useRef(null);return e.current===null&&(e.current=t()),e.current}const Wn=typeof window<"u",Un=Wn?k.useLayoutEffect:k.useEffect,_n=k.createContext(null);function $n(t,e){t.indexOf(e)===-1&&t.push(e)}function Gn(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 yn(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Kt=()=>{},it=()=>{};process.env.NODE_ENV!=="production"&&(Kt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(yn(e,n))},it=(t,e,n)=>{if(!t)throw new Error(yn(e,n))});const ft={},xr=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function vr(t){return typeof t=="object"&&t!==null}const br=t=>/^0[^.\s]+$/u.test(t);function Kn(t){let e;return()=>(e===void 0&&(e=t()),e)}const q=t=>t,bl=(t,e)=>n=>e(t(n)),de=(...t)=>t.reduce(bl),zt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Hn{constructor(){this.subscriptions=[]}add(e){return $n(this.subscriptions,e),()=>Gn(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 st=t=>t*1e3,at=t=>t/1e3;function Xn(t,e){return e?t*(1e3/e):0}const Is=new Set;function We(t,e,n){t||Is.has(e)||(console.warn(yn(e,n)),Is.add(e))}const wr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,wl=1e-7,Tl=12;function Sl(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=wr(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>wl&&++a<Tl);return r}function fe(t,e,n,s){if(t===e&&n===s)return q;const i=o=>Sl(o,0,1,t,n);return o=>o===0||o===1?o:wr(i(o),e,s)}const Tr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Sr=t=>e=>1-t(1-e),Pr=fe(.33,1.53,.69,.99),Yn=Sr(Pr),Ar=Tr(Yn),kr=t=>(t*=2)<1?.5*Yn(t):.5*(2-Math.pow(2,-10*(t-1))),qn=t=>1-Math.sin(Math.acos(t)),Vr=Sr(qn),Mr=Tr(qn),Pl=fe(.42,0,1,1),Al=fe(0,0,.58,1),Cr=fe(.42,0,.58,1),kl=t=>Array.isArray(t)&&typeof t[0]!="number",Er=t=>Array.isArray(t)&&typeof t[0]=="number",js={linear:q,easeIn:Pl,easeInOut:Cr,easeOut:Al,circIn:qn,circInOut:Mr,circOut:Vr,backIn:Yn,backInOut:Ar,backOut:Pr,anticipate:kr},Vl=t=>typeof t=="string",Fs=t=>{if(Er(t)){it(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return fe(e,n,s,i)}else if(Vl(t))return it(js[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),js[t];return t},Se=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ml(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const m=f&&i?n:s;return d&&r.add(c),m.has(c)||m.add(c),c},cancel:c=>{s.delete(c),r.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const Cl=40;function Dr(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Se.reduce((v,M)=>(v[M]=Ml(o),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:m}=r,g=()=>{const v=ft.useManualTiming?i.timestamp:performance.now();n=!1,ft.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(v-i.timestamp,Cl),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),f.process(i),h.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},x=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:Se.reduce((v,M)=>{const A=r[M];return v[M]=(E,R=!1,p=!1)=>(n||x(),A.schedule(E,R,p)),v},{}),cancel:v=>{for(let M=0;M<Se.length;M++)r[Se[M]].cancel(v)},state:i,steps:r}}const{schedule:D,cancel:rt,state:W,steps:qe}=Dr(typeof requestAnimationFrame<"u"?requestAnimationFrame:q,!0);let Ve;function El(){Ve=void 0}const Y={now:()=>(Ve===void 0&&Y.set(W.isProcessing||ft.useManualTiming?W.timestamp:performance.now()),Ve),set:t=>{Ve=t,queueMicrotask(El)}},Rr=t=>e=>typeof e=="string"&&e.startsWith(t),Zn=Rr("--"),Dl=Rr("var(--"),Jn=t=>Dl(t)?Rl.test(t.split("/*")[0].trim()):!1,Rl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ht={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},re={...Ht,transform:t=>ct(0,1,t)},Pe={...Ht,default:1},te=t=>Math.round(t*1e5)/1e5,Qn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ll(t){return t==null}const Il=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ts=(t,e)=>n=>!!(typeof n=="string"&&Il.test(n)&&n.startsWith(t)||e&&!Ll(n)&&Object.prototype.hasOwnProperty.call(n,e)),Lr=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Qn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},jl=t=>ct(0,255,t),Ze={...Ht,transform:t=>Math.round(jl(t))},St={test:ts("rgb","red"),parse:Lr("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Ze.transform(t)+", "+Ze.transform(e)+", "+Ze.transform(n)+", "+te(re.transform(s))+")"};function Fl(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 xn={test:ts("#"),parse:Fl,transform:St.transform},he=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),mt=he("deg"),lt=he("%"),V=he("px"),Nl=he("vh"),Bl=he("vw"),Ns={...lt,parse:t=>lt.parse(t)/100,transform:t=>lt.transform(t*100)},Rt={test:ts("hsl","hue"),parse:Lr("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+lt.transform(te(e))+", "+lt.transform(te(n))+", "+te(re.transform(s))+")"},B={test:t=>St.test(t)||xn.test(t)||Rt.test(t),parse:t=>St.test(t)?St.parse(t):Rt.test(t)?Rt.parse(t):xn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?St.transform(t):Rt.transform(t),getAnimatableNone:t=>{const e=B.parse(t);return e.alpha=0,B.transform(e)}},Ol=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function zl(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Qn))==null?void 0:e.length)||0)+(((n=t.match(Ol))==null?void 0:n.length)||0)>0}const Ir="number",jr="color",Wl="var",Ul="var(",Bs="${}",_l=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function oe(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(_l,l=>(B.test(l)?(s.color.push(o),i.push(jr),n.push(B.parse(l))):l.startsWith(Ul)?(s.var.push(o),i.push(Wl),n.push(l)):(s.number.push(o),i.push(Ir),n.push(parseFloat(l))),++o,Bs)).split(Bs);return{values:n,split:a,indexes:s,types:i}}function Fr(t){return oe(t).values}function Nr(t){const{split:e,types:n}=oe(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===Ir?o+=te(i[r]):a===jr?o+=B.transform(i[r]):o+=i[r]}return o}}const $l=t=>typeof t=="number"?0:B.test(t)?B.getAnimatableNone(t):t;function Gl(t){const e=Fr(t);return Nr(t)(e.map($l))}const gt={test:zl,parse:Fr,createTransformer:Nr,getAnimatableNone:Gl};function Je(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 Kl({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=Je(l,a,t+1/3),o=Je(l,a,t),r=Je(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Le(t,e){return n=>n>0?e:t}const F=(t,e,n)=>t+(e-t)*n,Qe=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Hl=[xn,St,Rt],Xl=t=>Hl.find(e=>e.test(t));function Os(t){const e=Xl(t);if(Kt(!!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===Rt&&(n=Kl(n)),n}const zs=(t,e)=>{const n=Os(t),s=Os(e);if(!n||!s)return Le(t,e);const i={...n};return o=>(i.red=Qe(n.red,s.red,o),i.green=Qe(n.green,s.green,o),i.blue=Qe(n.blue,s.blue,o),i.alpha=F(n.alpha,s.alpha,o),St.transform(i))},vn=new Set(["none","hidden"]);function Yl(t,e){return vn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ql(t,e){return n=>F(t,e,n)}function es(t){return typeof t=="number"?ql:typeof t=="string"?Jn(t)?Le:B.test(t)?zs:Ql:Array.isArray(t)?Br:typeof t=="object"?B.test(t)?zs:Zl:Le}function Br(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>es(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Zl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=es(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Jl(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 Ql=(t,e)=>{const n=gt.createTransformer(e),s=oe(t),i=oe(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?vn.has(t)&&!i.values.length||vn.has(e)&&!s.values.length?Yl(t,e):de(Br(Jl(s,i),i.values),n):(Kt(!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"),Le(t,e))};function Or(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?F(t,e,n):es(t)(t,e)}const tc=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>D.update(e,n),stop:()=>rt(e),now:()=>W.isProcessing?W.timestamp:Y.now()}},zr=(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)})`},Ie=2e4;function ns(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Ie;)e+=n,s=t.next(e);return e>=Ie?1/0:e}function ec(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(ns(s),Ie);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:at(i)}}const nc=5;function Wr(t,e,n){const s=Math.max(e-nc,0);return Xn(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},tn=.001;function sc({duration:t=j.duration,bounce:e=j.bounce,velocity:n=j.velocity,mass:s=j.mass}){let i,o;Kt(t<=st(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,at(t)),r<1?(i=u=>{const c=u*r,d=c*t,f=c-n,h=bn(u,r),m=Math.exp(-d);return tn-f/h*m},o=u=>{const d=u*r*t,f=d*n+n,h=Math.pow(r,2)*Math.pow(u,2)*t,m=Math.exp(-d),g=bn(Math.pow(u,2),r);return(-i(u)+tn>0?-1:1)*((f-h)*m)/g}):(i=u=>{const c=Math.exp(-u*t),d=(u-n)*t+1;return-tn+c*d},o=u=>{const c=Math.exp(-u*t),d=(n-u)*(t*t);return c*d});const a=5/t,l=rc(i,o,a);if(t=st(t),isNaN(l))return{stiffness:j.stiffness,damping:j.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const ic=12;function rc(t,e,n){let s=n;for(let i=1;i<ic;i++)s=s-t(s)/e(s);return s}function bn(t,e){return t*Math.sqrt(1-e*e)}const oc=["duration","bounce"],ac=["stiffness","damping","mass"];function Ws(t,e){return e.some(n=>t[n]!==void 0)}function lc(t){let e={velocity:j.velocity,stiffness:j.stiffness,damping:j.damping,mass:j.mass,isResolvedFromDuration:!1,...t};if(!Ws(t,ac)&&Ws(t,oc))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=sc(t);e={...e,...n,mass:j.mass},e.isResolvedFromDuration=!0}return e}function je(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:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=lc({...n,velocity:-at(n.velocity||0)}),m=f||0,g=u/(2*Math.sqrt(l*c)),x=r-o,y=at(Math.sqrt(l/c)),S=Math.abs(x)<5;s||(s=S?j.restSpeed.granular:j.restSpeed.default),i||(i=S?j.restDelta.granular:j.restDelta.default);let v;if(g<1){const A=bn(y,g);v=E=>{const R=Math.exp(-g*y*E);return r-R*((m+g*y*x)/A*Math.sin(A*E)+x*Math.cos(A*E))}}else if(g===1)v=A=>r-Math.exp(-y*A)*(x+(m+y*x)*A);else{const A=y*Math.sqrt(g*g-1);v=E=>{const R=Math.exp(-g*y*E),p=Math.min(A*E,300);return r-R*((m+g*y*x)*Math.sinh(p)+A*x*Math.cosh(p))/A}}const M={calculatedDuration:h&&d||null,next:A=>{const E=v(A);if(h)a.done=A>=d;else{let R=A===0?m:0;g<1&&(R=A===0?st(m):Wr(v,A,E));const p=Math.abs(R)<=s,L=Math.abs(r-E)<=i;a.done=p&&L}return a.value=a.done?r:E,a},toString:()=>{const A=Math.min(ns(M),Ie),E=zr(R=>M.next(A*R).value,A,30);return A+"ms "+E},toTransition:()=>{}};return M}je.applyToOptions=t=>{const e=ec(t,100,je);return t.ease=e.ease,t.duration=st(e.duration),t.type="keyframes",t};function wn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=t[0],f={done:!1,value:d},h=p=>a!==void 0&&p<a||l!==void 0&&p>l,m=p=>a===void 0?l:l===void 0||Math.abs(a-p)<Math.abs(l-p)?a:l;let g=n*e;const x=d+g,y=r===void 0?x:r(x);y!==x&&(g=y-d);const S=p=>-g*Math.exp(-p/s),v=p=>y+S(p),M=p=>{const L=S(p),G=v(p);f.done=Math.abs(L)<=u,f.value=f.done?y:G};let A,E;const R=p=>{h(f.value)&&(A=p,E=je({keyframes:[f.value,m(f.value)],velocity:Wr(v,p,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return R(0),{calculatedDuration:null,next:p=>{let L=!1;return!E&&A===void 0&&(L=!0,M(p),R(p)),A!==void 0&&p>=A?E.next(p-A):(!L&&M(p),f)}}}function cc(t,e,n){const s=[],i=n||ft.mix||Or,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=de(l,a)}s.push(a)}return s}function ss(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(it(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=cc(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(c<t[d+1]);d++);const f=zt(t[d],t[d+1],c);return a[d](f)};return n?c=>u(ct(t[0],t[o-1],c)):u}function uc(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=zt(0,e,s);t.push(F(n,1,i))}}function Ur(t){const e=[0];return uc(e,t.length-1),e}function dc(t,e){return t.map(n=>n*e)}function fc(t,e){return t.map(()=>e||Cr).splice(0,t.length-1)}function Lt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=kl(s)?s.map(Fs):Fs(s),o={done:!1,value:e[0]},r=dc(n&&n.length===e.length?n:Ur(e),t),a=ss(r,e,{ease:Array.isArray(i)?i:fc(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const hc=t=>t!==null;function is(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(hc),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const mc={decay:wn,inertia:wn,tween:Lt,keyframes:Lt,spring:je};function _r(t){typeof t.type=="string"&&(t.type=mc[t.type])}class rs{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 pc=t=>t/100;class os extends rs{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!==Y.now()&&this.tick(Y.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;_r(e);const{type:n=Lt,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||Lt;process.env.NODE_ENV!=="production"&&l!==Lt&&it(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Lt&&typeof a[0]!="number"&&(this.mixKeyframes=de(pc,Or(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=ns(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:m,onUpdate:g,finalKeyframe:x}=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 y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,M=s;if(d){const p=Math.min(this.currentTime,i)/a;let L=Math.floor(p),G=p%1;!G&&p>=1&&(G=1),G===1&&L--,L=Math.min(L,d+1),!!(L%2)&&(f==="reverse"?(G=1-G,h&&(G-=h/a)):f==="mirror"&&(M=r)),v=ct(0,1,G)*a}const A=S?{done:!1,value:c[0]}:M.next(v);o&&(A.value=o(A.value));let{done:E}=A;!S&&l!==null&&(E=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return R&&m!==wn&&(A.value=is(c,this.options,x,this.speed)),g&&g(A.value),R&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return at(this.calculatedDuration)}get time(){return at(this.currentTime)}set time(e){var n;e=st(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(Y.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=at(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=tc,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(Y.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 gc(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Pt=t=>t*180/Math.PI,Tn=t=>{const e=Pt(Math.atan2(t[1],t[0]));return Sn(e)},yc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Tn,rotateZ:Tn,skewX:t=>Pt(Math.atan(t[1])),skewY:t=>Pt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Sn=t=>(t=t%360,t<0&&(t+=360),t),Us=Tn,_s=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),$s=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),xc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_s,scaleY:$s,scale:t=>(_s(t)+$s(t))/2,rotateX:t=>Sn(Pt(Math.atan2(t[6],t[5]))),rotateY:t=>Sn(Pt(Math.atan2(-t[2],t[0]))),rotateZ:Us,rotate:Us,skewX:t=>Pt(Math.atan(t[4])),skewY:t=>Pt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Pn(t){return t.includes("scale")?1:0}function An(t,e){if(!t||t==="none")return Pn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=xc,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=yc,i=a}if(!i)return Pn(e);const o=s[e],r=i[1].split(",").map(bc);return typeof o=="function"?o(r):r[o]}const vc=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return An(n,e)};function bc(t){return parseFloat(t.trim())}const Xt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yt=new Set(Xt),Gs=t=>t===Ht||t===V,wc=new Set(["x","y","z"]),Tc=Xt.filter(t=>!wc.has(t));function Sc(t){const e=[];return Tc.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const kt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>An(e,"x"),y:(t,{transform:e})=>An(e,"y")};kt.translateX=kt.x;kt.translateY=kt.y;const Vt=new Set;let kn=!1,Vn=!1,Mn=!1;function $r(){if(Vn){const t=Array.from(Vt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Sc(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)})}Vn=!1,kn=!1,Vt.forEach(t=>t.complete(Mn)),Vt.clear()}function Gr(){Vt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Vn=!0)})}function Pc(){Mn=!0,Gr(),$r(),Mn=!1}class as{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?(Vt.add(this),kn||(kn=!0,D.read(Gr),D.resolveKeyframes($r))):(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])}gc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Vt.delete(this)}cancel(){this.state==="scheduled"&&(Vt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ac=t=>t.startsWith("--");function kc(t,e,n){Ac(e)?t.style.setProperty(e,n):t.style[e]=n}const Kr=Kn(()=>window.ScrollTimeline!==void 0),Vc={};function Mc(t,e){const n=Kn(t);return()=>Vc[e]??n()}const Hr=Mc(()=>{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})`,Ks={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 Xr(t,e){if(t)return typeof t=="function"?Hr()?zr(t,e):"ease-out":Er(t)?Qt(t):Array.isArray(t)?t.map(n=>Xr(n,e)||Ks.easeOut):Ks[t]}function Cc(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const d=Xr(a,i);Array.isArray(d)&&(c.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 u&&(f.pseudoElement=u),t.animate(c,f)}function Yr(t){return typeof t=="function"&&"applyToOptions"in t}function Ec({type:t,...e}){return Yr(t)&&Hr()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Dc extends rs{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,it(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Ec(e);this.animation=Cc(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=is(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):kc(n,s,c),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 at(Number(e))}get time(){return at(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=st(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&&Kr()?(this.animation.timeline=e,q):n(this)}}const qr={anticipate:kr,backInOut:Ar,circInOut:Mr};function Rc(t){return t in qr}function Lc(t){typeof t.ease=="string"&&Rc(t.ease)&&(t.ease=qr[t.ease])}const Hs=10;class Ic extends Dc{constructor(e){Lc(e),_r(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 os({...r,autoplay:!1}),l=st(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Hs).value,a.sample(l).value,Hs),a.stop()}}const Xs=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(gt.test(t)||t==="0")&&!t.startsWith("url("));function jc(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 Fc(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=Xs(i,e),a=Xs(o,e);return Kt(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:jc(t)||(n==="spring"||Yr(n))&&s}const Nc=new Set(["opacity","clipPath","filter","transform"]),Bc=Kn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Oc(t){var c;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return Bc()&&n&&Nc.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const zc=40;class Wc extends rs{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var m;super(),this.stop=()=>{var g,x;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Y.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...d},h=(c==null?void 0:c.KeyframeResolver)||as;this.keyframeResolver=new h(a,(g,x,y)=>this.onKeyframesResolved(g,x,f,!y),l,u,c),(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:u,onUpdate:c}=s;this.resolvedAt=Y.now(),Fc(e,o,r,a)||((ft.instantAnimations||!l)&&(c==null||c(is(e,s,n))),e[0]=e[e.length-1],s.duration=0,s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>zc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},h=!u&&Oc(f)?new Ic({...f,element:f.motionValue.owner.current}):new os(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(),Pc()),this._animation}get duration(){return this.animation.duration}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 Uc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _c(t){const e=Uc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const $c=4;function Zr(t,e,n=1){it(n<=$c,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=_c(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return xr(r)?parseFloat(r):r}return Jn(i)?Zr(i,e,n+1):i}function ls(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const Jr=new Set(["width","height","top","left","right","bottom",...Xt]),Gc={test:t=>t==="auto",parse:t=>t},Qr=t=>e=>e.test(t),to=[Ht,V,lt,mt,Bl,Nl,Gc],Ys=t=>to.find(Qr(t));function Kc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||br(t):!0}const Hc=new Set(["brightness","contrast","saturate","opacity"]);function Xc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Qn)||[];if(!s)return t;const i=n.replace(s,"");let o=Hc.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Yc=/\b([a-z-]*)\(.*?\)/gu,Cn={...gt,getAnimatableNone:t=>{const e=t.match(Yc);return e?e.map(Xc).join(" "):t}},qs={...Ht,transform:Math.round},qc={rotate:mt,rotateX:mt,rotateY:mt,rotateZ:mt,scale:Pe,scaleX:Pe,scaleY:Pe,scaleZ:Pe,skew:mt,skewX:mt,skewY:mt,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:re,originX:Ns,originY:Ns,originZ:V},cs={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,radius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,backgroundPositionX:V,backgroundPositionY:V,...qc,zIndex:qs,fillOpacity:re,strokeOpacity:re,numOctaves:qs},Zc={...cs,color:B,backgroundColor:B,outlineColor:B,fill:B,stroke:B,borderColor:B,borderTopColor:B,borderRightColor:B,borderBottomColor:B,borderLeftColor:B,filter:Cn,WebkitFilter:Cn},eo=t=>Zc[t];function no(t,e){let n=eo(t);return n!==Cn&&(n=gt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Jc=new Set(["auto","none","0"]);function Qc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Jc.has(o)&&oe(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=no(n,i)}class tu extends as{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),Jn(u))){const c=Zr(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Jr.has(s)||e.length!==2)return;const[i,o]=e,r=Ys(i),a=Ys(o);if(r!==a)if(Gs(r)&&Gs(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else kt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Kc(e[i]))&&s.push(i);s.length&&Qc(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=kt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){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]=kt[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,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function so(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const io=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ro(t){return vr(t)&&"offsetHeight"in t}const Zs=30,eu=t=>!isNaN(parseFloat(t)),ee={current:void 0};class nu{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{var r,a;const o=Y.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty();i&&((a=this.events.renderRequest)==null||a.notify(this.current))},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Y.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=eu(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&We(!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 Hn);const s=this.events[e].add(n);return e==="change"?()=>{s(),D.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,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}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 ee.current&&ee.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Y.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Zs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Zs);return Xn(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 nt(t,e){return new nu(t,e)}const{schedule:us}=Dr(queueMicrotask,!1),tt={x:!1,y:!1};function oo(){return tt.x||tt.y}function su(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 ao(t,e){const n=so(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Js(t){return!(t.pointerType==="touch"||oo())}function iu(t,e,n={}){const[s,i,o]=ao(t,n),r=a=>{if(!Js(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=d=>{Js(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const lo=(t,e)=>e?t===e?!0:lo(t,e.parentElement):!1,ds=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,ru=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ou(t){return ru.has(t.tagName)||t.tabIndex!==-1}const Me=new WeakSet;function Qs(t){return e=>{e.key==="Enter"&&t(e)}}function en(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const au=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Qs(()=>{if(Me.has(n))return;en(n,"down");const i=Qs(()=>{en(n,"up")}),o=()=>en(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 ti(t){return ds(t)&&!oo()}function lu(t,e,n={}){const[s,i,o]=ao(t,n),r=a=>{const l=a.currentTarget;if(!ti(a))return;Me.add(l);const u=e(l,a),c=(h,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Me.has(l)&&Me.delete(l),ti(h)&&typeof u=="function"&&u(h,{success:m})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||lo(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),ro(a)&&(a.addEventListener("focus",u=>au(u,i)),!ou(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function fs(t){return vr(t)&&"ownerSVGElement"in t}const Ce=new WeakMap;let pt;const co=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:fs(s)&&"getBBox"in s?s.getBBox()[e]:s[n],cu=co("inline","width","offsetWidth"),uu=co("block","height","offsetHeight");function du({target:t,borderBoxSize:e}){var n;(n=Ce.get(t))==null||n.forEach(s=>{s(t,{get width(){return cu(t,e)},get height(){return uu(t,e)}})})}function fu(t){t.forEach(du)}function hu(){typeof ResizeObserver>"u"||(pt=new ResizeObserver(fu))}function mu(t,e){pt||hu();const n=so(t);return n.forEach(s=>{let i=Ce.get(s);i||(i=new Set,Ce.set(s,i)),i.add(e),pt==null||pt.observe(s)}),()=>{n.forEach(s=>{const i=Ce.get(s);i==null||i.delete(e),i!=null&&i.size||pt==null||pt.unobserve(s)})}}const Ee=new Set;let It;function pu(){It=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ee.forEach(e=>e(t))},window.addEventListener("resize",It)}function gu(t){return Ee.add(t),It||pu(),()=>{Ee.delete(t),!Ee.size&&typeof It=="function"&&(window.removeEventListener("resize",It),It=void 0)}}function yu(t,e){return typeof t=="function"?gu(t):mu(t,e)}function uo(t,e){let n;const s=()=>{const{currentTime:i}=e,r=(i===null?0:i.value)/100;n!==r&&t(r),n=r};return D.preUpdate(s,!0),()=>rt(s)}function xu(t){return fs(t)&&t.tagName==="svg"}function vu(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=ss(i,o,r);return e?a(s):a}const $=t=>!!(t&&t.getVelocity),bu=[...to,B,gt],wu=t=>bu.find(Qr(t)),hs=k.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Tu(t=!0){const e=k.useContext(_n);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=k.useId();k.useEffect(()=>{if(t)return i(o)},[t]);const r=k.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const fo=k.createContext({strict:!1}),ei={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"]},Wt={};for(const t in ei)Wt[t]={isEnabled:e=>ei[t].some(n=>!!e[n])};function Su(t){for(const e in t)Wt[e]={...Wt[e],...t[e]}}const Pu=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 Fe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Pu.has(t)}let ho=t=>!Fe(t);function Au(t){typeof t=="function"&&(ho=e=>e.startsWith("on")?!Fe(e):t(e))}try{Au(require("@emotion/is-prop-valid").default)}catch{}function ku(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(ho(i)||n===!0&&Fe(i)||!e&&!Fe(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Ue=k.createContext({});function _e(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function ae(t){return typeof t=="string"||Array.isArray(t)}const ms=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ps=["initial",...ms];function $e(t){return _e(t.animate)||ps.some(e=>ae(t[e]))}function mo(t){return!!($e(t)||t.variants)}function Vu(t,e){if($e(t)){const{initial:n,animate:s}=t;return{initial:n===!1||ae(n)?n:void 0,animate:ae(s)?s:void 0}}return t.inherit!==!1?e:{}}function Mu(t){const{initial:e,animate:n}=Vu(t,k.useContext(Ue));return k.useMemo(()=>({initial:e,animate:n}),[ni(e),ni(n)])}function ni(t){return Array.isArray(t)?t.join(" "):t}const le={};function Cu(t){for(const e in t)le[e]=t[e],Zn(e)&&(le[e].isCSSVariable=!0)}function po(t,{layout:e,layoutId:n}){return Yt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!le[t]||t==="opacity")}const Eu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Du=Xt.length;function Ru(t,e,n){let s="",i=!0;for(let o=0;o<Du;o++){const r=Xt[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=io(a,cs[r]);if(!l){i=!1;const c=Eu[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function gs(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(Yt.has(l)){r=!0;continue}else if(Zn(l)){i[l]=u;continue}else{const c=io(u,cs[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=Ru(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${u} ${c}`}}const ys=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function go(t,e,n){for(const s in e)!$(e[s])&&!po(s,n)&&(t[s]=e[s])}function Lu({transformTemplate:t},e){return k.useMemo(()=>{const n=ys();return gs(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Iu(t,e){const n=t.style||{},s={};return go(s,n,t),Object.assign(s,Lu(t,e)),s}function ju(t,e){const n={},s=Iu(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 Fu={offset:"stroke-dashoffset",array:"stroke-dasharray"},Nu={offset:"strokeDashoffset",array:"strokeDasharray"};function Bu(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Fu:Nu;t[o.offset]=V.transform(-s);const r=V.transform(e),a=V.transform(n);t[o.array]=`${r} ${a}`}function yo(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(gs(t,a,u),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=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&Bu(d,i,o,r,!1)}const xo=()=>({...ys(),attrs:{}}),vo=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Ou(t,e,n,s){const i=k.useMemo(()=>{const o=xo();return yo(o,e,vo(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};go(o,t.style,t),i.style={...o,...i.style}}return i}const zu=["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 xs(t){return typeof t!="string"||t.includes("-")?!1:!!(zu.indexOf(t)>-1||/[A-Z]/u.test(t))}function Wu(t,e,n,{latestValues:s},i,o=!1){const a=(xs(t)?Ou:ju)(e,s,i,t),l=ku(e,typeof t=="string",o),u=t!==k.Fragment?{...l,...a,ref:n}:{},{children:c}=e,d=k.useMemo(()=>$(c)?c.get():c,[c]);return k.createElement(t,{...u,children:d})}function si(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function vs(t,e,n,s){if(typeof e=="function"){const[i,o]=si(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]=si(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function De(t){return $(t)?t.get():t}function Uu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:_u(n,s,i,t),renderState:e()}}function _u(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=De(o[f]);let{initial:r,animate:a}=t;const l=$e(t),u=mo(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const d=c?a:r;if(d&&typeof d!="boolean"&&!_e(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const m=vs(t,f[h]);if(m){const{transitionEnd:g,transition:x,...y}=m;for(const S in y){let v=y[S];if(Array.isArray(v)){const M=c?v.length-1:0;v=v[M]}v!==null&&(i[S]=v)}for(const S in g)i[S]=g[S]}}}return i}const bo=t=>(e,n)=>{const s=k.useContext(Ue),i=k.useContext(_n),o=()=>Uu(t,e,s,i);return n?o():ze(o)};function bs(t,e,n){var o;const{style:s}=t,i={};for(const r in s)($(s[r])||e.style&&$(e.style[r])||po(r,t)||((o=n==null?void 0:n.getValue(r))==null?void 0:o.liveStyle)!==void 0)&&(i[r]=s[r]);return i}const $u=bo({scrapeMotionValuesFromProps:bs,createRenderState:ys});function wo(t,e,n){const s=bs(t,e,n);for(const i in t)if($(t[i])||$(e[i])){const o=Xt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const Gu=bo({scrapeMotionValuesFromProps:wo,createRenderState:xo}),Ku=Symbol.for("motionComponentSymbol");function jt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Hu(t,e,n){return k.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 ws=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xu="framerAppearId",To="data-"+ws(Xu),So=k.createContext({});function Yu(t,e,n,s,i){var g,x;const{visualElement:o}=k.useContext(Ue),r=k.useContext(fo),a=k.useContext(_n),l=k.useContext(hs).reducedMotion,u=k.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=k.useContext(So);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&qu(u.current,n,i,d);const f=k.useRef(!1);k.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const h=n[To],m=k.useRef(!!h&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,h))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,h)));return Un(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),m.current&&c.animationState&&c.animationState.animateChanges())}),k.useEffect(()=>{c&&(!m.current&&c.animationState&&c.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)==null||y.call(window,h)}),m.current=!1))}),c}function qu(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Po(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:c,layoutScroll:l,layoutRoot:u})}function Po(t){if(t)return t.options.allowProjection!==!1?t.projection:Po(t.parent)}function nn(t,{forwardMotionProps:e=!1}={},n,s){n&&Su(n);const i=xs(t)?Gu:$u;function o(a,l){let u;const c={...k.useContext(hs),...a,layoutId:Zu(a)},{isStatic:d}=c,f=Mu(a),h=i(a,d);if(!d&&Wn){Ju(c,n);const m=Qu(c);u=m.MeasureLayout,f.visualElement=Yu(t,h,c,s,m.ProjectionNode)}return P.jsxs(Ue.Provider,{value:f,children:[u&&f.visualElement?P.jsx(u,{visualElement:f.visualElement,...c}):null,Wu(t,a,Hu(h,f.visualElement,l),h,d,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=k.forwardRef(o);return r[Ku]=t,r}function Zu({layoutId:t}){const e=k.useContext(yr).id;return e&&t!==void 0?e+"-"+t:t}function Ju(t,e){const n=k.useContext(fo).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?Kt(!1,s,"lazy-strict-mode"):it(!1,s,"lazy-strict-mode")}}function Qu(t){const{drag:e,layout:n}=Wt;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 td(t,e){if(typeof Proxy>"u")return nn;const n=new Map,s=(o,r)=>nn(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&We(!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,nn(r,void 0,t,e)),n.get(r))})}function Ao({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ed({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function nd(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 sn(t){return t===void 0||t===1}function En({scale:t,scaleX:e,scaleY:n}){return!sn(t)||!sn(e)||!sn(n)}function Tt(t){return En(t)||ko(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function ko(t){return ii(t.x)||ii(t.y)}function ii(t){return t&&t!=="0%"}function Ne(t,e,n){const s=t-n,i=e*s;return n+i}function ri(t,e,n,s,i){return i!==void 0&&(t=Ne(t,i,s)),Ne(t,n,s)+e}function Dn(t,e=0,n=1,s,i){t.min=ri(t.min,e,n,s,i),t.max=ri(t.max,e,n,s,i)}function Vo(t,{x:e,y:n}){Dn(t.x,e.translate,e.scale,e.originPoint),Dn(t.y,n.translate,n.scale,n.originPoint)}const oi=.999999999999,ai=1.0000000000001;function sd(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&&Nt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Vo(t,r)),s&&Tt(o.latestValues)&&Nt(t,o.latestValues))}e.x<ai&&e.x>oi&&(e.x=1),e.y<ai&&e.y>oi&&(e.y=1)}function Ft(t,e){t.min=t.min+e,t.max=t.max+e}function li(t,e,n,s,i=.5){const o=F(t.min,t.max,i);Dn(t,e,n,o,s)}function Nt(t,e){li(t.x,e.x,e.scaleX,e.scale,e.originX),li(t.y,e.y,e.scaleY,e.scale,e.originY)}function Mo(t,e){return Ao(nd(t.getBoundingClientRect(),e))}function id(t,e,n){const s=Mo(t,n),{scroll:i}=e;return i&&(Ft(s.x,i.offset.x),Ft(s.y,i.offset.y)),s}const ci=()=>({translate:0,scale:1,origin:0,originPoint:0}),Bt=()=>({x:ci(),y:ci()}),ui=()=>({min:0,max:0}),N=()=>({x:ui(),y:ui()}),Rn={current:null},Co={current:!1};function rd(){if(Co.current=!0,!!Wn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Rn.current=t.matches;t.addEventListener("change",e),e()}else Rn.current=!1}const od=new WeakMap;function ad(t,e,n){for(const s in e){const i=e[s],o=n[s];if($(i))t.addValue(s,i);else if($(o))t.addValue(s,nt(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,nt(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const di=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ld{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=as,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=Y.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,D.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=$e(n),this.isVariantNode=mo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&$(h)&&h.set(l[f],!1)}}mount(e){this.current=e,od.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Co.current||rd(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Rn.current,process.env.NODE_ENV!=="production"&&We(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),rt(this.notifyUpdate),rt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Yt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&D.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o(),r&&r(),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 Wt){const n=Wt[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):N()}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<di.length;s++){const i=di[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=ad(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=nt(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"&&(xr(s)||br(s))?s=parseFloat(s):!wu(s)&&gt.test(n)&&(s=no(e,n)),this.setBaseTarget(e,$(s)?s.get():s)),$(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=vs(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&&!$(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 Hn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){us.render(this.render)}}class Eo extends ld{constructor(){super(...arguments),this.KeyframeResolver=tu}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;$(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Do(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 cd(t){return window.getComputedStyle(t)}class ud extends Eo{constructor(){super(...arguments),this.type="html",this.renderInstance=Do}readValueFromInstance(e,n){var s;if(Yt.has(n))return(s=this.projection)!=null&&s.isProjecting?Pn(n):vc(e,n);{const i=cd(e),o=(Zn(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Mo(e,n)}build(e,n,s){gs(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return bs(e,n,s)}}const Ro=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 dd(t,e,n,s){Do(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ro.has(i)?i:ws(i),e.attrs[i])}class fd extends Eo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=N}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Yt.has(n)){const s=eo(n);return s&&s.default||0}return n=Ro.has(n)?n:ws(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return wo(e,n,s)}build(e,n,s){yo(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){dd(e,n,s,i)}mount(e){this.isSVGTag=vo(e.tagName),super.mount(e)}}const hd=(t,e)=>xs(t)?new fd(e):new ud(e,{allowProjection:t!==k.Fragment});function ce(t,e,n){const s=t.getProps();return vs(s,e,n!==void 0?n:s.custom,t)}const Ln=t=>Array.isArray(t);function md(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,nt(n))}function pd(t){return Ln(t)?t[t.length-1]||0:t}function gd(t,e){const n=ce(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=pd(o[r]);md(t,r,a)}}function yd(t){return!!($(t)&&t.add)}function In(t,e){const n=t.getValue("willChange");if(yd(n))return n.add(e);if(!n&&ft.WillChange){const s=new ft.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Lo(t){return t.props[To]}const xd=t=>t!==null;function vd(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(xd),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const bd={type:"spring",stiffness:500,damping:25,restSpeed:10},wd=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Td={type:"keyframes",duration:.8},Sd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Pd=(t,{keyframes:e})=>e.length>2?Td:Yt.has(t)?t.startsWith("scale")?wd(e[1]):bd:Sd;function Ad({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Ts=(t,e,n,s={},i,o)=>r=>{const a=ls(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-st(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,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};Ad(a)||Object.assign(c,Pd(t,c)),c.duration&&(c.duration=st(c.duration)),c.repeatDelay&&(c.repeatDelay=st(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),(ft.instantAnimations||ft.skipAnimations)&&(d=!0,c.duration=0,c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!o&&e.get()!==void 0){const f=vd(c.keyframes,a);if(f!==void 0){D.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new os(c):new Wc(c)};function kd({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Io(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const d=t.getValue(c,t.latestValues[c]??null),f=a[c];if(f===void 0||u&&kd(u,c))continue;const h={delay:n,...ls(o||{},c)},m=d.get();if(m!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===m&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const y=Lo(t);if(y){const S=window.MotionHandoffAnimation(y,c,D);S!==null&&(h.startTime=S,g=!0)}}In(t,c),d.start(Ts(c,d,f,t.shouldReduceMotion&&Jr.has(c)?{type:!1}:h,t,g));const x=d.animation;x&&l.push(x)}return r&&Promise.all(l).then(()=>{D.update(()=>{r&&gd(t,r)})}),l}function jn(t,e,n={}){var l;const s=ce(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(Io(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=i;return Vd(t,e,u,c,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[o,r]:[r,o];return u().then(()=>c())}else return Promise.all([o(),r(n.delay)])}function Vd(t,e,n=0,s=0,i=0,o=1,r){const a=[],l=t.variantChildren.size,u=(l-1)*i,c=typeof s=="function",d=c?f=>s(f,l):o===1?(f=0)=>f*i:(f=0)=>u-f*i;return Array.from(t.variantChildren).sort(Md).forEach((f,h)=>{f.notify("AnimationStart",e),a.push(jn(f,e,{...r,delay:n+(c?0:s)+d(h)}).then(()=>f.notify("AnimationComplete",e)))}),Promise.all(a)}function Md(t,e){return t.sortNodePosition(e)}function Cd(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>jn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=jn(t,e,n);else{const i=typeof e=="function"?ce(t,e,n.custom):e;s=Promise.all(Io(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function jo(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 Ed=ps.length;function Fo(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Fo(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Ed;n++){const s=ps[n],i=t.props[s];(ae(i)||i===!1)&&(e[s]=i)}return e}const Dd=[...ms].reverse(),Rd=ms.length;function Ld(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Cd(t,n,s)))}function Id(t){let e=Ld(t),n=fi(),s=!0;const i=l=>(u,c)=>{var f;const d=ce(t,c,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:m,...g}=d;u={...u,...g,...m}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=Fo(t.parent)||{},d=[],f=new Set;let h={},m=1/0;for(let x=0;x<Rd;x++){const y=Dd[x],S=n[y],v=u[y]!==void 0?u[y]:c[y],M=ae(v),A=y===l?S.isActive:null;A===!1&&(m=x);let E=v===c[y]&&v!==u[y]&&M;if(E&&s&&t.manuallyAnimateOnMount&&(E=!1),S.protectedKeys={...h},!S.isActive&&A===null||!v&&!S.prevProp||_e(v)||typeof v=="boolean")continue;const R=jd(S.prevProp,v);let p=R||y===l&&S.isActive&&!E&&M||x>m&&M,L=!1;const G=Array.isArray(v)?v:[v];let ut=G.reduce(i(y),{});A===!1&&(ut={});const{prevResolvedValues:xt={}}=S,pe={...xt,...ut},Mt=I=>{p=!0,f.has(I)&&(L=!0,f.delete(I)),S.needsAnimating[I]=!0;const T=t.getValue(I);T&&(T.liveStyle=!1)};for(const I in pe){const T=ut[I],Ct=xt[I];if(h.hasOwnProperty(I))continue;let Et=!1;Ln(T)&&Ln(Ct)?Et=!jo(T,Ct):Et=T!==Ct,Et?T!=null?Mt(I):f.add(I):T!==void 0&&f.has(I)?Mt(I):S.protectedKeys[I]=!0}S.prevProp=v,S.prevResolvedValues=ut,S.isActive&&(h={...h,...ut}),s&&t.blockInitialAnimation&&(p=!1),p&&(!(E&&R)||L)&&d.push(...G.map(I=>({animation:I,options:{type:y}})))}if(f.size){const x={};if(typeof u.initial!="boolean"){const y=ce(t,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(x.transition=y.transition)}f.forEach(y=>{const S=t.getBaseTarget(y),v=t.getValue(y);v&&(v.liveStyle=!0),x[y]=S??null}),d.push({animation:x})}let g=!!d.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(d):Promise.resolve()}function a(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=t.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const c=r(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=fi(),s=!0}}}function jd(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!jo(e,t):!1}function wt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fi(){return{animate:wt(!0),whileInView:wt(),whileHover:wt(),whileTap:wt(),whileDrag:wt(),whileFocus:wt(),exit:wt()}}class yt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Fd extends yt{constructor(e){super(e),e.animationState||(e.animationState=Id(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();_e(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 Nd=0;class Bd extends yt{constructor(){super(...arguments),this.id=Nd++}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 Od={animation:{Feature:Fd},exit:{Feature:Bd}};function ue(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function me(t){return{point:{x:t.pageX,y:t.pageY}}}const zd=t=>e=>ds(e)&&t(e,me(e));function ne(t,e,n,s){return ue(t,e,zd(n),s)}const No=1e-4,Wd=1-No,Ud=1+No,Bo=.01,_d=0-Bo,$d=0+Bo;function H(t){return t.max-t.min}function Gd(t,e,n){return Math.abs(t-e)<=n}function hi(t,e,n,s=.5){t.origin=s,t.originPoint=F(e.min,e.max,t.origin),t.scale=H(n)/H(e),t.translate=F(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Wd&&t.scale<=Ud||isNaN(t.scale))&&(t.scale=1),(t.translate>=_d&&t.translate<=$d||isNaN(t.translate))&&(t.translate=0)}function se(t,e,n,s){hi(t.x,e.x,n.x,s?s.originX:void 0),hi(t.y,e.y,n.y,s?s.originY:void 0)}function mi(t,e,n){t.min=n.min+e.min,t.max=t.min+H(e)}function Kd(t,e,n){mi(t.x,e.x,n.x),mi(t.y,e.y,n.y)}function pi(t,e,n){t.min=e.min-n.min,t.max=t.min+H(e)}function ie(t,e,n){pi(t.x,e.x,n.x),pi(t.y,e.y,n.y)}function Q(t){return[t("x"),t("y")]}const Oo=({current:t})=>t?t.ownerDocument.defaultView:null,gi=(t,e)=>Math.abs(t-e);function Hd(t,e){const n=gi(t.x,e.x),s=gi(t.y,e.y);return Math.sqrt(n**2+s**2)}class zo{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=on(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=Hd(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:g}=f,{timestamp:x}=W;this.history.push({...g,timestamp:x});const{onStart:y,onMove:S}=this.handlers;h||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=rn(h,this.transformPagePoint),D.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=on(f.type==="pointercancel"?this.lastMoveEventInfo:rn(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,y),g&&g(f,y)},!ds(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=me(e),l=rn(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=W;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(e,on(l,this.history)),this.removeListeners=de(ne(this.contextWindow,"pointermove",this.handlePointerMove),ne(this.contextWindow,"pointerup",this.handlePointerUp),ne(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),rt(this.updatePoint)}}function rn(t,e){return e?{point:e(t.point)}:t}function yi(t,e){return{x:t.x-e.x,y:t.y-e.y}}function on({point:t},e){return{point:t,delta:yi(t,Wo(e)),offset:yi(t,Xd(e)),velocity:Yd(e,.1)}}function Xd(t){return t[0]}function Wo(t){return t[t.length-1]}function Yd(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Wo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>st(e)));)n--;if(!s)return{x:0,y:0};const o=at(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 qd(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?F(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?F(n,t,s.max):Math.min(t,n)),t}function xi(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 Zd(t,{top:e,left:n,bottom:s,right:i}){return{x:xi(t.x,n,i),y:xi(t.y,e,s)}}function vi(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 Jd(t,e){return{x:vi(t.x,e.x),y:vi(t.y,e.y)}}function Qd(t,e){let n=.5;const s=H(t),i=H(e);return i>s?n=zt(e.min,e.max-s,t.min):s>i&&(n=zt(t.min,t.max-i,e.min)),ct(0,1,n)}function tf(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 Fn=.35;function ef(t=Fn){return t===!1?t=0:t===!0&&(t=Fn),{x:bi(t,"left","right"),y:bi(t,"top","bottom")}}function bi(t,e,n){return{min:wi(t,e),max:wi(t,n)}}function wi(t,e){return typeof t=="number"?t:t[e]||0}const nf=new WeakMap;class sf{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=N(),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(me(d).point)},r=(d,f)=>{const{drag:h,dragPropagation:m,onDragStart:g}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=su(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),Q(y=>{let S=this.getAxisMotionValue(y).get()||0;if(lt.test(S)){const{projection:v}=this.visualElement;if(v&&v.layout){const M=v.layout.layoutBox[y];M&&(S=H(M)*(parseFloat(S)/100))}}this.originPoint[y]=S}),g&&D.postRender(()=>g(d,f)),In(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:g,onDrag:x}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:y}=f;if(m&&this.currentDirection===null){this.currentDirection=rf(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),x&&x(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Q(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new zo(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Oo(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&&D.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=qd(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=Zd(s.layoutBox,e):this.constraints=!1,this.elastic=ef(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Q(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=tf(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!jt(e))return!1;const s=e.current;it(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=id(s,i.root,this.visualElement.getTransformPagePoint());let r=Jd(i.layout.layoutBox,o);if(n){const a=n(ed(r));this.hasMutatedConstraints=!!a,a&&(r=Ao(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Q(c=>{if(!Ae(c,n,this.currentDirection))return;let d=l&&l[c]||{};r&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return In(this.visualElement,e),s.start(Ts(e,s,0,n,this.visualElement,!1))}stopAnimation(){Q(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Q(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){Q(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]-F(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};Q(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Qd({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(),Q(r=>{if(!Ae(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(F(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;nf.set(this.visualElement,this);const e=this.visualElement.current,n=ne(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&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()),D.read(s);const r=ue(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Q(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Fn,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 rf(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class of extends yt{constructor(e){super(e),this.removeGroupControls=q,this.removeListeners=q,this.controls=new sf(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 Ti=t=>(e,n)=>{t&&D.postRender(()=>t(e,n))};class af extends yt{constructor(){super(...arguments),this.removePointerDownListener=q}onPointerDown(e){this.session=new zo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Oo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ti(e),onStart:Ti(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&D.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=ne(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 Re={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Si(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Zt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(V.test(t))t=parseFloat(t);else return t;const n=Si(t,e.target.x),s=Si(t,e.target.y);return`${n}% ${s}%`}},lf={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 u=F(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};let Pi=!1;class cf extends k.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Cu(uf),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Pi&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Re.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Pi=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||D.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),us.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;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 Uo(t){const[e,n]=Tu(),s=k.useContext(yr);return P.jsx(cf,{...t,layoutGroup:s,switchLayoutGroup:k.useContext(So),isPresent:e,safeToRemove:n})}const uf={borderRadius:{...Zt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Zt,borderTopRightRadius:Zt,borderBottomLeftRadius:Zt,borderBottomRightRadius:Zt,boxShadow:lf};function df(t,e,n){const s=$(t)?t:nt(t);return s.start(Ts("",s,e,n)),s.animation}const ff=(t,e)=>t.depth-e.depth;class hf{constructor(){this.children=[],this.isDirty=!1}add(e){$n(this.children,e),this.isDirty=!0}remove(e){Gn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ff),this.isDirty=!1,this.children.forEach(e)}}function mf(t,e){const n=Y.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(rt(s),t(o-e))};return D.setup(s,!0),()=>rt(s)}const _o=["TopLeft","TopRight","BottomLeft","BottomRight"],pf=_o.length,Ai=t=>typeof t=="string"?parseFloat(t):t,ki=t=>typeof t=="number"||V.test(t);function gf(t,e,n,s,i,o){i?(t.opacity=F(0,n.opacity??1,yf(s)),t.opacityExit=F(e.opacity??1,0,xf(s))):o&&(t.opacity=F(e.opacity??1,n.opacity??1,s));for(let r=0;r<pf;r++){const a=`border${_o[r]}Radius`;let l=Vi(e,a),u=Vi(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||ki(l)===ki(u)?(t[a]=Math.max(F(Ai(l),Ai(u),s),0),(lt.test(u)||lt.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=F(e.rotate||0,n.rotate||0,s))}function Vi(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const yf=$o(0,.5,Vr),xf=$o(.5,.95,q);function $o(t,e,n){return s=>s<t?0:s>e?1:n(zt(t,e,s))}function Mi(t,e){t.min=e.min,t.max=e.max}function J(t,e){Mi(t.x,e.x),Mi(t.y,e.y)}function Ci(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ei(t,e,n,s,i){return t-=e,t=Ne(t,1/n,s),i!==void 0&&(t=Ne(t,1/i,s)),t}function vf(t,e=0,n=1,s=.5,i,o=t,r=t){if(lt.test(e)&&(e=parseFloat(e),e=F(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=F(o.min,o.max,s);t===o&&(a-=e),t.min=Ei(t.min,e,n,a,i),t.max=Ei(t.max,e,n,a,i)}function Di(t,e,[n,s,i],o,r){vf(t,e[n],e[s],e[i],e.scale,o,r)}const bf=["x","scaleX","originX"],wf=["y","scaleY","originY"];function Ri(t,e,n,s){Di(t.x,e,bf,n?n.x:void 0,s?s.x:void 0),Di(t.y,e,wf,n?n.y:void 0,s?s.y:void 0)}function Li(t){return t.translate===0&&t.scale===1}function Go(t){return Li(t.x)&&Li(t.y)}function Ii(t,e){return t.min===e.min&&t.max===e.max}function Tf(t,e){return Ii(t.x,e.x)&&Ii(t.y,e.y)}function ji(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ko(t,e){return ji(t.x,e.x)&&ji(t.y,e.y)}function Fi(t){return H(t.x)/H(t.y)}function Ni(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Sf{constructor(){this.members=[]}add(e){$n(this.members,e),e.scheduleRender()}remove(e){if(Gn(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 Pf(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:u,rotate:c,rotateX:d,rotateY:f,skewX:h,skewY:m}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}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 an=["","X","Y","Z"],Af=1e3;let kf=0;function ln(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=Lo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",D,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Ho(s)}function Xo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=kf++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Cf),this.nodes.forEach(Lf),this.nodes.forEach(If),this.nodes.forEach(Ef)},this.resolvedRelativeTargetAt=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 hf)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Hn),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=fs(r)&&!xu(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,d=0;const f=()=>this.root.updateBlockedByResize=!1;D.read(()=>{d=window.innerWidth}),t(r,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,c&&c(),c=mf(f,250),Re.hasAnimatedSinceResize&&(Re.hasAnimatedSinceResize=!1,this.nodes.forEach(zi)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||Of,{onLayoutAnimationStart:g,onLayoutAnimationComplete:x}=u.getProps(),y=!this.targetLayout||!Ko(this.targetLayout,h),S=!d&&f;if(this.options.layoutRoot||this.resumeFrom||S||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...ls(m,"layout"),onPlay:g,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,S)}else d||zi(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(),rt(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(jf),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 c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Bi);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Oi);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Rf),this.nodes.forEach(Vf),this.nodes.forEach(Mf)):this.nodes.forEach(Oi),this.clearAllSnapshots();const a=Y.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,us.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Df),this.sharedNodes.forEach(Ff)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,D.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){D.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!H(this.snapshot.measuredBox.x)&&!H(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=N(),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&&!Go(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||Tt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),zf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:r}=this.options;if(!r)return N();const a=r.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Wf))){const{scroll:c}=this.root;c&&(Ft(a.x,c.offset.x),Ft(a.y,c.offset.y))}return a}removeElementScroll(r){var l;const a=N();if(J(a,r),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&J(a,r),Ft(a.x,d.offset.x),Ft(a.y,d.offset.y))}return a}applyTransform(r,a=!1){const l=N();J(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Nt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Tt(c.latestValues)&&Nt(l,c.latestValues)}return Tt(this.latestValues)&&Nt(l,this.latestValues),l}removeTransform(r){const a=N();J(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Tt(u.latestValues))continue;En(u.latestValues)&&u.updateSnapshot();const c=N(),d=u.measurePageBox();J(c,d),Ri(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Tt(this.latestValues)&&Ri(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 f;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||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=W.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=N(),this.relativeTargetOrigin=N(),ie(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),J(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=N(),this.targetWithTransforms=N()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Kd(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):J(this.target,this.layout.layoutBox),Vo(this.target,this.targetDelta)):J(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=N(),this.relativeTargetOrigin=N(),ie(this.relativeTargetOrigin,this.target,h.target),J(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||En(this.parent.latestValues)||ko(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var 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:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;J(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;sd(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=N());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ci(this.prevProjectionDelta.x,this.projectionDelta.x),Ci(this.prevProjectionDelta.y,this.projectionDelta.y)),se(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Ni(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ni(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=Bt(),this.projectionDelta=Bt(),this.projectionDeltaWithTransform=Bt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Bt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=N(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=h!==m,x=this.getStack(),y=!x||x.members.length<=1,S=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(Bf));this.animationProgress=0;let v;this.mixTargetDelta=M=>{const A=M/1e3;Wi(d.x,r.x,A),Wi(d.y,r.y,A),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ie(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Nf(this.relativeTarget,this.relativeTargetOrigin,f,A),v&&Tf(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=N()),J(v,this.relativeTarget)),g&&(this.animationValues=c,gf(c,u,this.latestValues,A,S,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(rt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=D.update(()=>{Re.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=nt(0)),this.currentAnimation=df(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),r.onUpdate&&r.onUpdate(c)},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(Af),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&Yo(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||N();const d=H(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const f=H(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}J(a,l),Nt(a,c),se(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Sf),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){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 u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&ln("z",r,u,this.animationValues);for(let c=0;c<an.length;c++)ln(`rotate${an[c]}`,r,u,this.animationValues),ln(`skew${an[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=De(a==null?void 0:a.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=De(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Tt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=Pf(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),r.transform=d;const{x:f,y:h}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in le){if(c[m]===void 0)continue;const{correct:g,applyTo:x,isCSSVariable:y}=le[m],S=d==="none"?c[m]:g(c[m],u);if(x){const v=x.length;for(let M=0;M<v;M++)r[x[M]]=S}else y?this.options.visualElement.renderState.vars[m]=S:r[m]=S}this.options.layoutId&&(r.pointerEvents=u===this?De(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(Bi),this.root.sharedNodes.clear()}}}function Vf(t){t.updateLayout()}function Mf(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"?Q(d=>{const f=r?e.measuredBox[d]:e.layoutBox[d],h=H(f);f.min=s[d].min,f.max=f.min+h}):Yo(o,e.layoutBox,s)&&Q(d=>{const f=r?e.measuredBox[d]:e.layoutBox[d],h=H(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=Bt();se(a,s,e.layoutBox);const l=Bt();r?se(l,t.applyTransform(i,!0),e.measuredBox):se(l,s,e.layoutBox);const u=!Go(a);let c=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const m=N();ie(m,e.layoutBox,f.layoutBox);const g=N();ie(g,s,h.layoutBox),Ko(m,g)||(c=!0),d.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=m,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Cf(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 Ef(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Df(t){t.clearSnapshot()}function Bi(t){t.clearMeasurements()}function Oi(t){t.isLayoutDirty=!1}function Rf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function zi(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Lf(t){t.resolveTargetDelta()}function If(t){t.calcProjection()}function jf(t){t.resetSkewAndRotation()}function Ff(t){t.removeLeadSnapshot()}function Wi(t,e,n){t.translate=F(e.translate,0,n),t.scale=F(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ui(t,e,n,s){t.min=F(e.min,n.min,s),t.max=F(e.max,n.max,s)}function Nf(t,e,n,s){Ui(t.x,e.x,n.x,s),Ui(t.y,e.y,n.y,s)}function Bf(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Of={duration:.45,ease:[.4,0,.1,1]},_i=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),$i=_i("applewebkit/")&&!_i("chrome/")?Math.round:q;function Gi(t){t.min=$i(t.min),t.max=$i(t.max)}function zf(t){Gi(t.x),Gi(t.y)}function Yo(t,e,n){return t==="position"||t==="preserve-aspect"&&!Gd(Fi(e),Fi(n),.2)}function Wf(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const Uf=Xo({attachResizeListener:(t,e)=>ue(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cn={current:void 0},qo=Xo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!cn.current){const t=new Uf({});t.mount(window),t.setOptions({layoutScroll:!0}),cn.current=t}return cn.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),_f={pan:{Feature:af},drag:{Feature:of,ProjectionNode:qo,MeasureLayout:Uo}};function Ki(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&&D.postRender(()=>o(e,me(e)))}class $f extends yt{mount(){const{current:e}=this.node;e&&(this.unmount=iu(e,(n,s)=>(Ki(this.node,s,"Start"),i=>Ki(this.node,i,"End"))))}unmount(){}}class Gf 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=de(ue(this.node.current,"focus",()=>this.onFocus()),ue(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Hi(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&&D.postRender(()=>o(e,me(e)))}class Kf extends yt{mount(){const{current:e}=this.node;e&&(this.unmount=lu(e,(n,s)=>(Hi(this.node,s,"Start"),(i,{success:o})=>Hi(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Nn=new WeakMap,un=new WeakMap,Hf=t=>{const e=Nn.get(t.target);e&&e(t)},Xf=t=>{t.forEach(Hf)};function Yf({root:t,...e}){const n=t||document;un.has(n)||un.set(n,{});const s=un.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Xf,{root:t,...e})),s[i]}function qf(t,e,n){const s=Yf(e);return Nn.set(t,n),s.observe(t),()=>{Nn.delete(t),s.unobserve(t)}}const Zf={some:0,all:1};class Jf 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:Zf[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return qf(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(Qf(e,n))&&this.startObserver()}unmount(){}}function Qf({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const th={inView:{Feature:Jf},tap:{Feature:Kf},focus:{Feature:Gf},hover:{Feature:$f}},eh={layout:{ProjectionNode:qo,MeasureLayout:Uo}},nh={...Od,...th,..._f,...eh},sh=td(nh,hd),ih=50,Xi=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),rh=()=>({time:0,x:Xi(),y:Xi()}),oh={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Yi(t,e,n,s){const i=n[e],{length:o,position:r}=oh[e],a=i.current,l=n.time;i.current=t[`scroll${r}`],i.scrollLength=t[`scroll${o}`]-t[`client${o}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=zt(0,i.scrollLength,i.current);const u=s-l;i.velocity=u>ih?0:Xn(i.current-a,u)}function ah(t,e,n){Yi(t,"x",e,n),Yi(t,"y",e,n),e.time=n}function lh(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(ro(s))n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if(s.tagName==="svg"){const i=s.getBoundingClientRect();s=s.parentElement;const o=s.getBoundingClientRect();n.x+=i.left-o.left,n.y+=i.top-o.top}else if(s instanceof SVGGraphicsElement){const{x:i,y:o}=s.getBBox();n.x+=i,n.y+=o;let r=null,a=s.parentNode;for(;!r;)a.tagName==="svg"&&(r=a),a=s.parentNode;s=r}else break;return n}const Bn={start:0,center:.5,end:1};function qi(t,e,n=0){let s=0;if(t in Bn&&(t=Bn[t]),typeof t=="string"){const i=parseFloat(t);t.endsWith("px")?s=i:t.endsWith("%")?t=i/100:t.endsWith("vw")?s=i/100*document.documentElement.clientWidth:t.endsWith("vh")?s=i/100*document.documentElement.clientHeight:t=i}return typeof t=="number"&&(s=e*t),n+s}const ch=[0,0];function uh(t,e,n,s){let i=Array.isArray(t)?t:ch,o=0,r=0;return typeof t=="number"?i=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?i=t.split(" "):i=[t,Bn[t]?t:"0"]),o=qi(i[0],n,s),r=qi(i[1],e),o-r}const dh={All:[[0,0],[1,1]]},fh={x:0,y:0};function hh(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function mh(t,e,n){const{offset:s=dh.All}=n,{target:i=t,axis:o="y"}=n,r=o==="y"?"height":"width",a=i!==t?lh(i,t):fh,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:hh(i),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const d=s.length;for(let f=0;f<d;f++){const h=uh(s[f],u[r],l[r],a[o]);!c&&h!==e[o].interpolatorOffsets[f]&&(c=!0),e[o].offset[f]=h}c&&(e[o].interpolate=ss(e[o].offset,Ur(s),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=ct(0,1,e[o].interpolate(e[o].current))}function ph(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight,process.env.NODE_ENV!=="production"&&t&&e&&e!==t&&We(getComputedStyle(t).position!=="static","Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.")}function gh(t,e,n,s={}){return{measure:i=>{ph(t,s.target,n),ah(t,n,i),(s.offset||s.target)&&mh(t,n,s)},notify:()=>e(n)}}const Jt=new WeakMap,Zi=new WeakMap,dn=new WeakMap,Ji=t=>t===document.scrollingElement?window:t;function Zo(t,{container:e=document.scrollingElement,...n}={}){if(!e)return q;let s=dn.get(e);s||(s=new Set,dn.set(e,s));const i=rh(),o=gh(e,t,i,n);if(s.add(o),!Jt.has(e)){const a=()=>{for(const d of s)d.measure(W.timestamp);D.preUpdate(l)},l=()=>{for(const d of s)d.notify()},u=()=>D.read(a);Jt.set(e,u);const c=Ji(e);window.addEventListener("resize",u,{passive:!0}),e!==document.documentElement&&Zi.set(e,yu(e,u)),c.addEventListener("scroll",u,{passive:!0}),u()}const r=Jt.get(e);return D.read(r,!1,!0),()=>{var u;rt(r);const a=dn.get(e);if(!a||(a.delete(o),a.size))return;const l=Jt.get(e);Jt.delete(e),l&&(Ji(e).removeEventListener("scroll",l),(u=Zi.get(e))==null||u(),window.removeEventListener("resize",l))}}const Qi=new Map;function yh(t){const e={value:0},n=Zo(s=>{e.value=s[t.axis].progress*100},t);return{currentTime:e,cancel:n}}function Jo({source:t,container:e,...n}){const{axis:s}=n;t&&(e=t);const i=Qi.get(e)??new Map;Qi.set(e,i);const o=n.target??"self",r=i.get(o)??{},a=s+(n.offset??[]).join(",");return r[a]||(r[a]=!n.target&&Kr()?new ScrollTimeline({source:e,axis:s}):yh({container:e,...n})),r[a]}function xh(t,e){const n=Jo(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:s=>(s.pause(),uo(i=>{s.time=s.duration*i},n))})}function vh(t){return t.length===2}function bh(t,e){return vh(t)?Zo(n=>{t(n[e.axis].progress,n)},e):uo(t,Jo(e))}function wh(t,{axis:e="y",container:n=document.scrollingElement,...s}={}){if(!n)return q;const i={axis:e,container:n,...s};return typeof t=="function"?bh(t,i):xh(t,i)}const Th=()=>({scrollX:nt(0),scrollY:nt(0),scrollXProgress:nt(0),scrollYProgress:nt(0)}),ke=t=>t?!t.current:!1;function Sh({container:t,target:e,...n}={}){const s=ze(Th),i=k.useRef(null),o=k.useRef(!1),r=k.useCallback(()=>(i.current=wh((a,{x:l,y:u})=>{s.scrollX.set(l.current),s.scrollXProgress.set(l.progress),s.scrollY.set(u.current),s.scrollYProgress.set(u.progress)},{...n,container:(t==null?void 0:t.current)||void 0,target:(e==null?void 0:e.current)||void 0}),()=>{var a;(a=i.current)==null||a.call(i)}),[t,e,JSON.stringify(n.offset)]);return Un(()=>{if(o.current=!1,ke(t)||ke(e)){o.current=!0;return}else return r()},[r]),k.useEffect(()=>{if(o.current)return it(!ke(t),"Container ref is defined but not hydrated","use-scroll-ref"),it(!ke(e),"Target ref is defined but not hydrated","use-scroll-ref"),r()},[r]),s}function Ph(t){const e=ze(()=>nt(t)),{isStatic:n}=k.useContext(hs);if(n){const[,s]=k.useState(t);k.useEffect(()=>e.on("change",s),[])}return e}function Qo(t,e){const n=Ph(e()),s=()=>n.set(e());return s(),Un(()=>{const i=()=>D.preRender(s,!1,!0),o=t.map(r=>r.on("change",i));return()=>{o.forEach(r=>r()),rt(s)}}),n}function Ah(t){ee.current=[],t();const e=Qo(ee.current,t);return ee.current=void 0,e}function kh(t,e,n,s){if(typeof t=="function")return Ah(t);const i=typeof e=="function"?e:vu(e,n,s);return Array.isArray(t)?tr(t,i):tr([t],([o])=>i(o))}function tr(t,e){const n=ze(()=>[]);return Qo(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}const Vh=({children:t,className:e})=>{const n=k.useRef(null),{scrollYProgress:s}=Sh({target:n});if(typeof t!="string")throw new Error("TextReveal: children must be a string");const i=t.split(" ");return P.jsx("div",{ref:n,className:_("z-0 relative h-[200vh]",e),children:P.jsx("div",{className:"sticky top-0 mx-auto flex h-[50%] max-w-4xl items-center bg-transparent px-[1rem] py-[5rem]",children:P.jsx("span",{ref:n,className:"flex flex-wrap p-5 text-2xl font-bold text-black/20 dark:text-white/20 md:p-8 md:text-3xl lg:p-10 lg:text-4xl xl:text-5xl",children:i.map((o,r)=>{const a=r/i.length,l=a+1/i.length;return P.jsx(Mh,{progress:s,range:[a,l],children:o},r)})})})})},Mh=({children:t,progress:e,range:n})=>{const s=kh(e,n,[0,1]);return P.jsxs("span",{className:"relative mx-1 lg:mx-1.5",children:[P.jsx("span",{className:"absolute opacity-30",children:t}),P.jsx(sh.span,{style:{opacity:s},className:"text-black dark:text-white",children:t})]})};function ta({...t}){return P.jsx(X.Root,{"data-slot":"select",...t})}function Ch({...t}){return P.jsx(X.Group,{"data-slot":"select-group",...t})}function ea({...t}){return P.jsx(X.Value,{"data-slot":"select-value",...t})}function na({className:t,size:e="default",children:n,...s}){return P.jsxs(X.Trigger,{"data-slot":"select-trigger","data-size":e,className:_(`
55
+ `,style:i,"aria-hidden":"true",children:t})]})});Ti.displayName="AuroraText";const wi=b.createContext({});function de(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}const cn=typeof window<"u",un=cn?b.useLayoutEffect:b.useEffect,hn=b.createContext(null);function fn(t,e){t.indexOf(e)===-1&&t.push(e)}function dn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const tt=(t,e,n)=>n>e?e:n<t?t:n;function Ne(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Mt=()=>{},q=()=>{};process.env.NODE_ENV!=="production"&&(Mt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(Ne(e,n))},q=(t,e,n)=>{if(!t)throw new Error(Ne(e,n))});const nt={},Si=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Pi(t){return typeof t=="object"&&t!==null}const Ai=t=>/^0[^.\s]+$/u.test(t);function mn(t){let e;return()=>(e===void 0&&(e=t()),e)}const z=t=>t,Go=(t,e)=>n=>e(t(n)),Kt=(...t)=>t.reduce(Go),St=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class pn{constructor(){this.subscriptions=[]}add(e){return fn(this.subscriptions,e),()=>dn(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 X=t=>t*1e3,J=t=>t/1e3;function gn(t,e){return e?t*(1e3/e):0}const Xn=new Set;function me(t,e,n){t||Xn.has(e)||(console.warn(Ne(e,n)),Xn.add(e))}const Vi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Yo=1e-7,Xo=12;function qo(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Vi(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Yo&&++a<Xo);return r}function Ht(t,e,n,s){if(t===e&&n===s)return z;const i=o=>qo(o,0,1,t,n);return o=>o===0||o===1?o:Vi(i(o),e,s)}const Mi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Di=t=>e=>1-t(1-e),Ci=Ht(.33,1.53,.69,.99),yn=Di(Ci),Ei=Mi(yn),Ri=t=>(t*=2)<1?.5*yn(t):.5*(2-Math.pow(2,-10*(t-1))),vn=t=>1-Math.sin(Math.acos(t)),Li=Di(vn),ki=Mi(vn),Zo=Ht(.42,0,1,1),Jo=Ht(0,0,.58,1),ji=Ht(.42,0,.58,1),Qo=t=>Array.isArray(t)&&typeof t[0]!="number",Ii=t=>Array.isArray(t)&&typeof t[0]=="number",qn={linear:z,easeIn:Zo,easeInOut:ji,easeOut:Jo,circIn:vn,circInOut:ki,circOut:Li,backIn:yn,backInOut:Ei,backOut:Ci,anticipate:Ri},ta=t=>typeof t=="string",Zn=t=>{if(Ii(t)){q(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(ta(t))return q(qn[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),qn[t];return t},qt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ea(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const m=f&&i?n:s;return h&&r.add(c),m.has(c)||m.add(c),c},cancel:c=>{s.delete(c),r.delete(c)},process:c=>{if(a=c,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,u.process(c))}};return u}const na=40;function Fi(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=qt.reduce((y,A)=>(y[A]=ea(o),y),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:m}=r,g=()=>{const y=nt.useManualTiming?i.timestamp:performance.now();n=!1,nt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(y-i.timestamp,na),1)),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),d.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},v=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:qt.reduce((y,A)=>{const S=r[A];return y[A]=(M,L=!1,P=!1)=>(n||v(),S.schedule(M,L,P)),y},{}),cancel:y=>{for(let A=0;A<qt.length;A++)r[qt[A]].cancel(y)},state:i,steps:r}}const{schedule:V,cancel:Z,state:k,steps:Te}=Fi(typeof requestAnimationFrame<"u"?requestAnimationFrame:z,!0);let te;function sa(){te=void 0}const U={now:()=>(te===void 0&&U.set(k.isProcessing||nt.useManualTiming?k.timestamp:performance.now()),te),set:t=>{te=t,queueMicrotask(sa)}},Bi=t=>e=>typeof e=="string"&&e.startsWith(t),xn=Bi("--"),ia=Bi("var(--"),bn=t=>ia(t)?ra.test(t.split("/*")[0].trim()):!1,ra=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Dt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ot={...Dt,transform:t=>tt(0,1,t)},Zt={...Dt,default:1},jt=t=>Math.round(t*1e5)/1e5,Tn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function oa(t){return t==null}const aa=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,wn=(t,e)=>n=>!!(typeof n=="string"&&aa.test(n)&&n.startsWith(t)||e&&!oa(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ni=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Tn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},la=t=>tt(0,255,t),we={...Dt,transform:t=>Math.round(la(t))},ct={test:wn("rgb","red"),parse:Ni("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+we.transform(t)+", "+we.transform(e)+", "+we.transform(n)+", "+jt(Ot.transform(s))+")"};function ca(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 Oe={test:wn("#"),parse:ca,transform:ct.transform},Gt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),st=Gt("deg"),Q=Gt("%"),w=Gt("px"),ua=Gt("vh"),ha=Gt("vw"),Jn={...Q,parse:t=>Q.parse(t)/100,transform:t=>Q.transform(t*100)},pt={test:wn("hsl","hue"),parse:Ni("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Q.transform(jt(e))+", "+Q.transform(jt(n))+", "+jt(Ot.transform(s))+")"},R={test:t=>ct.test(t)||Oe.test(t)||pt.test(t),parse:t=>ct.test(t)?ct.parse(t):pt.test(t)?pt.parse(t):Oe.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ct.transform(t):pt.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},fa=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function da(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Tn))==null?void 0:e.length)||0)+(((n=t.match(fa))==null?void 0:n.length)||0)>0}const Oi="number",Wi="color",ma="var",pa="var(",Qn="${}",ga=/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 Wt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(ga,l=>(R.test(l)?(s.color.push(o),i.push(Wi),n.push(R.parse(l))):l.startsWith(pa)?(s.var.push(o),i.push(ma),n.push(l)):(s.number.push(o),i.push(Oi),n.push(parseFloat(l))),++o,Qn)).split(Qn);return{values:n,split:a,indexes:s,types:i}}function Ui(t){return Wt(t).values}function zi(t){const{split:e,types:n}=Wt(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===Oi?o+=jt(i[r]):a===Wi?o+=R.transform(i[r]):o+=i[r]}return o}}const ya=t=>typeof t=="number"?0:R.test(t)?R.getAnimatableNone(t):t;function va(t){const e=Ui(t);return zi(t)(e.map(ya))}const rt={test:da,parse:Ui,createTransformer:zi,getAnimatableNone:va};function Se(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 xa({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=Se(l,a,t+1/3),o=Se(l,a,t),r=Se(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function oe(t,e){return n=>n>0?e:t}const C=(t,e,n)=>t+(e-t)*n,Pe=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ba=[Oe,ct,pt],Ta=t=>ba.find(e=>e.test(t));function ts(t){const e=Ta(t);if(Mt(!!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===pt&&(n=xa(n)),n}const es=(t,e)=>{const n=ts(t),s=ts(e);if(!n||!s)return oe(t,e);const i={...n};return o=>(i.red=Pe(n.red,s.red,o),i.green=Pe(n.green,s.green,o),i.blue=Pe(n.blue,s.blue,o),i.alpha=C(n.alpha,s.alpha,o),ct.transform(i))},We=new Set(["none","hidden"]);function wa(t,e){return We.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Sa(t,e){return n=>C(t,e,n)}function Sn(t){return typeof t=="number"?Sa:typeof t=="string"?bn(t)?oe:R.test(t)?es:Va:Array.isArray(t)?_i:typeof t=="object"?R.test(t)?es:Pa:oe}function _i(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>Sn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Pa(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Sn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Aa(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 Va=(t,e)=>{const n=rt.createTransformer(e),s=Wt(t),i=Wt(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?We.has(t)&&!i.values.length||We.has(e)&&!s.values.length?wa(t,e):Kt(_i(Aa(s,i),i.values),n):(Mt(!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"),oe(t,e))};function $i(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?C(t,e,n):Sn(t)(t,e)}const Ma=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>V.update(e,n),stop:()=>Z(e),now:()=>k.isProcessing?k.timestamp:U.now()}},Ki=(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)})`},ae=2e4;function Pn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<ae;)e+=n,s=t.next(e);return e>=ae?1/0:e}function Da(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Pn(s),ae);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:J(i)}}const Ca=5;function Hi(t,e,n){const s=Math.max(e-Ca,0);return gn(n-t(s),e-s)}const D={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},Ae=.001;function Ea({duration:t=D.duration,bounce:e=D.bounce,velocity:n=D.velocity,mass:s=D.mass}){let i,o;Mt(t<=X(D.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=tt(D.minDamping,D.maxDamping,r),t=tt(D.minDuration,D.maxDuration,J(t)),r<1?(i=u=>{const c=u*r,h=c*t,f=c-n,d=Ue(u,r),m=Math.exp(-h);return Ae-f/d*m},o=u=>{const h=u*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(u,2)*t,m=Math.exp(-h),g=Ue(Math.pow(u,2),r);return(-i(u)+Ae>0?-1:1)*((f-d)*m)/g}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-Ae+c*h},o=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=La(i,o,a);if(t=X(t),isNaN(l))return{stiffness:D.stiffness,damping:D.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const Ra=12;function La(t,e,n){let s=n;for(let i=1;i<Ra;i++)s=s-t(s)/e(s);return s}function Ue(t,e){return t*Math.sqrt(1-e*e)}const ka=["duration","bounce"],ja=["stiffness","damping","mass"];function ns(t,e){return e.some(n=>t[n]!==void 0)}function Ia(t){let e={velocity:D.velocity,stiffness:D.stiffness,damping:D.damping,mass:D.mass,isResolvedFromDuration:!1,...t};if(!ns(t,ja)&&ns(t,ka))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*tt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:D.mass,stiffness:i,damping:o}}else{const n=Ea(t);e={...e,...n,mass:D.mass},e.isResolvedFromDuration=!0}return e}function le(t=D.visualDuration,e=D.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=Ia({...n,velocity:-J(n.velocity||0)}),m=f||0,g=u/(2*Math.sqrt(l*c)),v=r-o,p=J(Math.sqrt(l/c)),T=Math.abs(v)<5;s||(s=T?D.restSpeed.granular:D.restSpeed.default),i||(i=T?D.restDelta.granular:D.restDelta.default);let y;if(g<1){const S=Ue(p,g);y=M=>{const L=Math.exp(-g*p*M);return r-L*((m+g*p*v)/S*Math.sin(S*M)+v*Math.cos(S*M))}}else if(g===1)y=S=>r-Math.exp(-p*S)*(v+(m+p*v)*S);else{const S=p*Math.sqrt(g*g-1);y=M=>{const L=Math.exp(-g*p*M),P=Math.min(S*M,300);return r-L*((m+g*p*v)*Math.sinh(P)+S*v*Math.cosh(P))/S}}const A={calculatedDuration:d&&h||null,next:S=>{const M=y(S);if(d)a.done=S>=h;else{let L=S===0?m:0;g<1&&(L=S===0?X(m):Hi(y,S,M));const P=Math.abs(L)<=s,W=Math.abs(r-M)<=i;a.done=P&&W}return a.value=a.done?r:M,a},toString:()=>{const S=Math.min(Pn(A),ae),M=Ki(L=>A.next(S*L).value,S,30);return S+"ms "+M},toTransition:()=>{}};return A}le.applyToOptions=t=>{const e=Da(t,100,le);return t.ease=e.ease,t.duration=X(e.duration),t.type="keyframes",t};function ze({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=P=>a!==void 0&&P<a||l!==void 0&&P>l,m=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let g=n*e;const v=h+g,p=r===void 0?v:r(v);p!==v&&(g=p-h);const T=P=>-g*Math.exp(-P/s),y=P=>p+T(P),A=P=>{const W=T(P),_=y(P);f.done=Math.abs(W)<=u,f.value=f.done?p:_};let S,M;const L=P=>{d(f.value)&&(S=P,M=le({keyframes:[f.value,m(f.value)],velocity:Hi(y,P,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return L(0),{calculatedDuration:null,next:P=>{let W=!1;return!M&&S===void 0&&(W=!0,A(P),L(P)),S!==void 0&&P>=S?M.next(P-S):(!W&&A(P),f)}}}function Fa(t,e,n){const s=[],i=n||nt.mix||$i,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]||z:e;a=Kt(l,a)}s.push(a)}return s}function An(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(q(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=Fa(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=St(t[h],t[h+1],c);return a[h](f)};return n?c=>u(tt(t[0],t[o-1],c)):u}function Ba(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=St(0,e,s);t.push(C(n,1,i))}}function Gi(t){const e=[0];return Ba(e,t.length-1),e}function Na(t,e){return t.map(n=>n*e)}function Oa(t,e){return t.map(()=>e||ji).splice(0,t.length-1)}function gt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Qo(s)?s.map(Zn):Zn(s),o={done:!1,value:e[0]},r=Na(n&&n.length===e.length?n:Gi(e),t),a=An(r,e,{ease:Array.isArray(i)?i:Oa(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Wa=t=>t!==null;function Vn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Wa),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Ua={decay:ze,inertia:ze,tween:gt,keyframes:gt,spring:le};function Yi(t){typeof t.type=="string"&&(t.type=Ua[t.type])}class Mn{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 za=t=>t/100;class Dn extends Mn{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!==U.now()&&this.tick(U.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;Yi(e);const{type:n=gt,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||gt;process.env.NODE_ENV!=="production"&&l!==gt&&q(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==gt&&typeof a[0]!="number"&&(this.mixKeyframes=Kt(za,$i(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Pn(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:g,finalKeyframe:v}=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 p=this.currentTime-u*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let y=this.currentTime,A=s;if(h){const P=Math.min(this.currentTime,i)/a;let W=Math.floor(P),_=P%1;!_&&P>=1&&(_=1),_===1&&W--,W=Math.min(W,h+1),!!(W%2)&&(f==="reverse"?(_=1-_,d&&(_-=d/a)):f==="mirror"&&(A=r)),y=tt(0,1,_)*a}const S=T?{done:!1,value:c[0]}:A.next(y);o&&(S.value=o(S.value));let{done:M}=S;!T&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return L&&m!==ze&&(S.value=Vn(c,this.options,v,this.speed)),g&&g(S.value),L&&this.finish(),S}then(e,n){return this.finished.then(e,n)}get duration(){return J(this.calculatedDuration)}get time(){return J(this.currentTime)}set time(e){var n;e=X(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(U.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=J(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=Ma,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(U.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 _a(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ut=t=>t*180/Math.PI,_e=t=>{const e=ut(Math.atan2(t[1],t[0]));return $e(e)},$a={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:_e,rotateZ:_e,skewX:t=>ut(Math.atan(t[1])),skewY:t=>ut(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},$e=t=>(t=t%360,t<0&&(t+=360),t),ss=_e,is=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),rs=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ka={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:is,scaleY:rs,scale:t=>(is(t)+rs(t))/2,rotateX:t=>$e(ut(Math.atan2(t[6],t[5]))),rotateY:t=>$e(ut(Math.atan2(-t[2],t[0]))),rotateZ:ss,rotate:ss,skewX:t=>ut(Math.atan(t[4])),skewY:t=>ut(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ke(t){return t.includes("scale")?1:0}function He(t,e){if(!t||t==="none")return Ke(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Ka,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=$a,i=a}if(!i)return Ke(e);const o=s[e],r=i[1].split(",").map(Ga);return typeof o=="function"?o(r):r[o]}const Ha=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return He(n,e)};function Ga(t){return parseFloat(t.trim())}const Ct=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Et=new Set(Ct),os=t=>t===Dt||t===w,Ya=new Set(["x","y","z"]),Xa=Ct.filter(t=>!Ya.has(t));function qa(t){const e=[];return Xa.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ft={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})=>He(e,"x"),y:(t,{transform:e})=>He(e,"y")};ft.translateX=ft.x;ft.translateY=ft.y;const dt=new Set;let Ge=!1,Ye=!1,Xe=!1;function Xi(){if(Ye){const t=Array.from(dt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=qa(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)})}Ye=!1,Ge=!1,dt.forEach(t=>t.complete(Xe)),dt.clear()}function qi(){dt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ye=!0)})}function Za(){Xe=!0,qi(),Xi(),Xe=!1}class Cn{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?(dt.add(this),Ge||(Ge=!0,V.read(qi),V.resolveKeyframes(Xi))):(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])}_a(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),dt.delete(this)}cancel(){this.state==="scheduled"&&(dt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ja=t=>t.startsWith("--");function Qa(t,e,n){Ja(e)?t.style.setProperty(e,n):t.style[e]=n}const Zi=mn(()=>window.ScrollTimeline!==void 0),tl={};function el(t,e){const n=mn(t);return()=>tl[e]??n()}const Ji=el(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),kt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,as={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:kt([0,.65,.55,1]),circOut:kt([.55,0,1,.45]),backIn:kt([.31,.01,.66,-.59]),backOut:kt([.33,1.53,.69,.99])};function Qi(t,e){if(t)return typeof t=="function"?Ji()?Ki(t,e):"ease-out":Ii(t)?kt(t):Array.isArray(t)?t.map(n=>Qi(n,e)||as.easeOut):as[t]}function nl(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=Qi(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function tr(t){return typeof t=="function"&&"applyToOptions"in t}function sl({type:t,...e}){return tr(t)&&Ji()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class il extends Mn{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,q(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=sl(e);this.animation=nl(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Vn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Qa(n,s,c),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 J(Number(e))}get time(){return J(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=X(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&&Zi()?(this.animation.timeline=e,z):n(this)}}const er={anticipate:Ri,backInOut:Ei,circInOut:ki};function rl(t){return t in er}function ol(t){typeof t.ease=="string"&&rl(t.ease)&&(t.ease=er[t.ease])}const ls=10;class al extends il{constructor(e){ol(e),Yi(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 Dn({...r,autoplay:!1}),l=X(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ls).value,a.sample(l).value,ls),a.stop()}}const cs=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(rt.test(t)||t==="0")&&!t.startsWith("url("));function ll(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 cl(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=cs(i,e),a=cs(o,e);return Mt(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:ll(t)||(n==="spring"||tr(n))&&s}function qe(t){t.duration=0,t.type}const ul=new Set(["opacity","clipPath","filter","transform"]),hl=mn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function fl(t){var c;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return hl()&&n&&ul.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const dl=40;class ml extends Mn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){var m;super(),this.stop=()=>{var g,v;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=U.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...h},d=(c==null?void 0:c.KeyframeResolver)||Cn;this.keyframeResolver=new d(a,(g,v,p)=>this.onKeyframesResolved(g,v,f,!p),l,u,c),(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:u,onUpdate:c}=s;this.resolvedAt=U.now(),cl(e,o,r,a)||((nt.instantAnimations||!l)&&(c==null||c(Vn(e,s,n))),e[0]=e[e.length-1],qe(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>dl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=!u&&fl(f)?new al({...f,element:f.motionValue.owner.current}):new Dn(f);d.finished.then(()=>this.notifyFinished()).catch(z),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}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(),Za()),this._animation}get duration(){return this.animation.duration}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 pl=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function gl(t){const e=pl.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const yl=4;function nr(t,e,n=1){q(n<=yl,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=gl(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Si(r)?parseFloat(r):r}return bn(i)?nr(i,e,n+1):i}function En(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const sr=new Set(["width","height","top","left","right","bottom",...Ct]),vl={test:t=>t==="auto",parse:t=>t},ir=t=>e=>e.test(t),rr=[Dt,w,Q,st,ha,ua,vl],us=t=>rr.find(ir(t));function xl(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ai(t):!0}const bl=new Set(["brightness","contrast","saturate","opacity"]);function Tl(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Tn)||[];if(!s)return t;const i=n.replace(s,"");let o=bl.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const wl=/\b([a-z-]*)\(.*?\)/gu,Ze={...rt,getAnimatableNone:t=>{const e=t.match(wl);return e?e.map(Tl).join(" "):t}},hs={...Dt,transform:Math.round},Sl={rotate:st,rotateX:st,rotateY:st,rotateZ:st,scale:Zt,scaleX:Zt,scaleY:Zt,scaleZ:Zt,skew:st,skewX:st,skewY:st,distance:w,translateX:w,translateY:w,translateZ:w,x:w,y:w,z:w,perspective:w,transformPerspective:w,opacity:Ot,originX:Jn,originY:Jn,originZ:w},Rn={borderWidth:w,borderTopWidth:w,borderRightWidth:w,borderBottomWidth:w,borderLeftWidth:w,borderRadius:w,radius:w,borderTopLeftRadius:w,borderTopRightRadius:w,borderBottomRightRadius:w,borderBottomLeftRadius:w,width:w,maxWidth:w,height:w,maxHeight:w,top:w,right:w,bottom:w,left:w,padding:w,paddingTop:w,paddingRight:w,paddingBottom:w,paddingLeft:w,margin:w,marginTop:w,marginRight:w,marginBottom:w,marginLeft:w,backgroundPositionX:w,backgroundPositionY:w,...Sl,zIndex:hs,fillOpacity:Ot,strokeOpacity:Ot,numOctaves:hs},Pl={...Rn,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:Ze,WebkitFilter:Ze},or=t=>Pl[t];function ar(t,e){let n=or(t);return n!==Ze&&(n=rt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Al=new Set(["auto","none","0"]);function Vl(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Al.has(o)&&Wt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=ar(n,i)}class Ml extends Cn{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),bn(u))){const c=nr(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!sr.has(s)||e.length!==2)return;const[i,o]=e,r=us(i),a=us(o);if(r!==a)if(os(r)&&os(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else ft[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||xl(e[i]))&&s.push(i);s.length&&Vl(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=ft[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]=ft[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,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function lr(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const cr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ur(t){return Pi(t)&&"offsetHeight"in t}const fs=30,Dl=t=>!isNaN(parseFloat(t)),It={current:void 0};class Cl{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const i=U.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=U.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Dl(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&me(!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 pn);const s=this.events[e].add(n);return e==="change"?()=>{s(),V.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 It.current&&It.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=U.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>fs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,fs);return gn(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 Y(t,e){return new Cl(t,e)}const{schedule:Ln}=Fi(queueMicrotask,!1),H={x:!1,y:!1};function hr(){return H.x||H.y}function El(t){return t==="x"||t==="y"?H[t]?null:(H[t]=!0,()=>{H[t]=!1}):H.x||H.y?null:(H.x=H.y=!0,()=>{H.x=H.y=!1})}function fr(t,e){const n=lr(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function ds(t){return!(t.pointerType==="touch"||hr())}function Rl(t,e,n={}){const[s,i,o]=fr(t,n),r=a=>{if(!ds(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=h=>{ds(h)&&(u(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const dr=(t,e)=>e?t===e?!0:dr(t,e.parentElement):!1,kn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Ll=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function kl(t){return Ll.has(t.tagName)||t.tabIndex!==-1}const ee=new WeakSet;function ms(t){return e=>{e.key==="Enter"&&t(e)}}function Ve(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const jl=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=ms(()=>{if(ee.has(n))return;Ve(n,"down");const i=ms(()=>{Ve(n,"up")}),o=()=>Ve(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 ps(t){return kn(t)&&!hr()}function Il(t,e,n={}){const[s,i,o]=fr(t,n),r=a=>{const l=a.currentTarget;if(!ps(a))return;ee.add(l);const u=e(l,a),c=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),ee.has(l)&&ee.delete(l),ps(d)&&typeof u=="function"&&u(d,{success:m})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||dr(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),ur(a)&&(a.addEventListener("focus",u=>jl(u,i)),!kl(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function jn(t){return Pi(t)&&"ownerSVGElement"in t}const ne=new WeakMap;let it;const mr=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:jn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Fl=mr("inline","width","offsetWidth"),Bl=mr("block","height","offsetHeight");function Nl({target:t,borderBoxSize:e}){var n;(n=ne.get(t))==null||n.forEach(s=>{s(t,{get width(){return Fl(t,e)},get height(){return Bl(t,e)}})})}function Ol(t){t.forEach(Nl)}function Wl(){typeof ResizeObserver>"u"||(it=new ResizeObserver(Ol))}function Ul(t,e){it||Wl();const n=lr(t);return n.forEach(s=>{let i=ne.get(s);i||(i=new Set,ne.set(s,i)),i.add(e),it==null||it.observe(s)}),()=>{n.forEach(s=>{const i=ne.get(s);i==null||i.delete(e),i!=null&&i.size||it==null||it.unobserve(s)})}}const se=new Set;let yt;function zl(){yt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};se.forEach(e=>e(t))},window.addEventListener("resize",yt)}function _l(t){return se.add(t),yt||zl(),()=>{se.delete(t),!se.size&&typeof yt=="function"&&(window.removeEventListener("resize",yt),yt=void 0)}}function $l(t,e){return typeof t=="function"?_l(t):Ul(t,e)}function pr(t,e){let n;const s=()=>{const{currentTime:i}=e,r=(i===null?0:i.value)/100;n!==r&&t(r),n=r};return V.preUpdate(s,!0),()=>Z(s)}function Kl(t){return jn(t)&&t.tagName==="svg"}function Hl(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=An(i,o,r);return e?a(s):a}const F=t=>!!(t&&t.getVelocity),Gl=[...rr,R,rt],Yl=t=>Gl.find(ir(t)),In=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Xl(t=!0){const e=b.useContext(hn);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=b.useId();b.useEffect(()=>{if(t)return i(o)},[t]);const r=b.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const gr=b.createContext({strict:!1}),gs={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"]},Pt={};for(const t in gs)Pt[t]={isEnabled:e=>gs[t].some(n=>!!e[n])};function ql(t){for(const e in t)Pt[e]={...Pt[e],...t[e]}}const Zl=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 ce(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Zl.has(t)}let yr=t=>!ce(t);function Jl(t){typeof t=="function"&&(yr=e=>e.startsWith("on")?!ce(e):t(e))}try{Jl(require("@emotion/is-prop-valid").default)}catch{}function Ql(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(yr(i)||n===!0&&ce(i)||!e&&!ce(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const pe=b.createContext({});function ge(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ut(t){return typeof t=="string"||Array.isArray(t)}const Fn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Bn=["initial",...Fn];function ye(t){return ge(t.animate)||Bn.some(e=>Ut(t[e]))}function vr(t){return!!(ye(t)||t.variants)}function tc(t,e){if(ye(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Ut(n)?n:void 0,animate:Ut(s)?s:void 0}}return t.inherit!==!1?e:{}}function ec(t){const{initial:e,animate:n}=tc(t,b.useContext(pe));return b.useMemo(()=>({initial:e,animate:n}),[ys(e),ys(n)])}function ys(t){return Array.isArray(t)?t.join(" "):t}const zt={};function nc(t){for(const e in t)zt[e]=t[e],xn(e)&&(zt[e].isCSSVariable=!0)}function xr(t,{layout:e,layoutId:n}){return Et.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!zt[t]||t==="opacity")}const sc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ic=Ct.length;function rc(t,e,n){let s="",i=!0;for(let o=0;o<ic;o++){const r=Ct[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=cr(a,Rn[r]);if(!l){i=!1;const c=sc[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}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 u=e[l];if(Et.has(l)){r=!0;continue}else if(xn(l)){i[l]=u;continue}else{const c=cr(u,Rn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=rc(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${u} ${c}`}}const On=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function br(t,e,n){for(const s in e)!F(e[s])&&!xr(s,n)&&(t[s]=e[s])}function oc({transformTemplate:t},e){return b.useMemo(()=>{const n=On();return Nn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function ac(t,e){const n=t.style||{},s={};return br(s,n,t),Object.assign(s,oc(t,e)),s}function lc(t,e){const n={},s=ac(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 cc={offset:"stroke-dashoffset",array:"stroke-dasharray"},uc={offset:"strokeDashoffset",array:"strokeDasharray"};function hc(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?cc:uc;t[o.offset]=w.transform(-s);const r=w.transform(e),a=w.transform(n);t[o.array]=`${r} ${a}`}function Tr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(Nn(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&hc(h,i,o,r,!1)}const wr=()=>({...On(),attrs:{}}),Sr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function fc(t,e,n,s){const i=b.useMemo(()=>{const o=wr();return Tr(o,e,Sr(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};br(o,t.style,t),i.style={...o,...i.style}}return i}const dc=["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 Wn(t){return typeof t!="string"||t.includes("-")?!1:!!(dc.indexOf(t)>-1||/[A-Z]/u.test(t))}function mc(t,e,n,{latestValues:s},i,o=!1){const a=(Wn(t)?fc:lc)(e,s,i,t),l=Ql(e,typeof t=="string",o),u=t!==b.Fragment?{...l,...a,ref:n}:{},{children:c}=e,h=b.useMemo(()=>F(c)?c.get():c,[c]);return b.createElement(t,{...u,children:h})}function vs(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Un(t,e,n,s){if(typeof e=="function"){const[i,o]=vs(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]=vs(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function ie(t){return F(t)?t.get():t}function pc({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:gc(n,s,i,t),renderState:e()}}function gc(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=ie(o[f]);let{initial:r,animate:a}=t;const l=ye(t),u=vr(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const h=c?a:r;if(h&&typeof h!="boolean"&&!ge(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const m=Un(t,f[d]);if(m){const{transitionEnd:g,transition:v,...p}=m;for(const T in p){let y=p[T];if(Array.isArray(y)){const A=c?y.length-1:0;y=y[A]}y!==null&&(i[T]=y)}for(const T in g)i[T]=g[T]}}}return i}const Pr=t=>(e,n)=>{const s=b.useContext(pe),i=b.useContext(hn),o=()=>pc(t,e,s,i);return n?o():de(o)};function zn(t,e,n){var o;const{style:s}=t,i={};for(const r in s)(F(s[r])||e.style&&F(e.style[r])||xr(r,t)||((o=n==null?void 0:n.getValue(r))==null?void 0:o.liveStyle)!==void 0)&&(i[r]=s[r]);return i}const yc=Pr({scrapeMotionValuesFromProps:zn,createRenderState:On});function Ar(t,e,n){const s=zn(t,e,n);for(const i in t)if(F(t[i])||F(e[i])){const o=Ct.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const vc=Pr({scrapeMotionValuesFromProps:Ar,createRenderState:wr}),xc=Symbol.for("motionComponentSymbol");function vt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function bc(t,e,n){return b.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):vt(n)&&(n.current=s))},[e])}const _n=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Tc="framerAppearId",Vr="data-"+_n(Tc),Mr=b.createContext({});function wc(t,e,n,s,i){var g,v;const{visualElement:o}=b.useContext(pe),r=b.useContext(gr),a=b.useContext(hn),l=b.useContext(In).reducedMotion,u=b.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,h=b.useContext(Mr);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&Sc(u.current,n,i,h);const f=b.useRef(!1);b.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const d=n[Vr],m=b.useRef(!!d&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,d))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,d)));return un(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),m.current&&c.animationState&&c.animationState.animateChanges())}),b.useEffect(()=>{c&&(!m.current&&c.animationState&&c.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,d)}),m.current=!1))}),c}function Sc(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Dr(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&vt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function Dr(t){if(t)return t.options.allowProjection!==!1?t.projection:Dr(t.parent)}function Me(t,{forwardMotionProps:e=!1}={},n,s){n&&ql(n);const i=Wn(t)?vc:yc;function o(a,l){let u;const c={...b.useContext(In),...a,layoutId:Pc(a)},{isStatic:h}=c,f=ec(a),d=i(a,h);if(!h&&cn){Ac(c,n);const m=Vc(c);u=m.MeasureLayout,f.visualElement=wc(t,d,c,s,m.ProjectionNode)}return x.jsxs(pe.Provider,{value:f,children:[u&&f.visualElement?x.jsx(u,{visualElement:f.visualElement,...c}):null,mc(t,a,bc(d,f.visualElement,l),d,h,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=b.forwardRef(o);return r[xc]=t,r}function Pc({layoutId:t}){const e=b.useContext(wi).id;return e&&t!==void 0?e+"-"+t:t}function Ac(t,e){const n=b.useContext(gr).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?Mt(!1,s,"lazy-strict-mode"):q(!1,s,"lazy-strict-mode")}}function Vc(t){const{drag:e,layout:n}=Pt;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 Mc(t,e){if(typeof Proxy>"u")return Me;const n=new Map,s=(o,r)=>Me(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&me(!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,Me(r,void 0,t,e)),n.get(r))})}function Cr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Dc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Cc(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 De(t){return t===void 0||t===1}function Je({scale:t,scaleX:e,scaleY:n}){return!De(t)||!De(e)||!De(n)}function lt(t){return Je(t)||Er(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Er(t){return xs(t.x)||xs(t.y)}function xs(t){return t&&t!=="0%"}function ue(t,e,n){const s=t-n,i=e*s;return n+i}function bs(t,e,n,s,i){return i!==void 0&&(t=ue(t,i,s)),ue(t,n,s)+e}function Qe(t,e=0,n=1,s,i){t.min=bs(t.min,e,n,s,i),t.max=bs(t.max,e,n,s,i)}function Rr(t,{x:e,y:n}){Qe(t.x,e.translate,e.scale,e.originPoint),Qe(t.y,n.translate,n.scale,n.originPoint)}const Ts=.999999999999,ws=1.0000000000001;function Ec(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&&bt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Rr(t,r)),s&&lt(o.latestValues)&&bt(t,o.latestValues))}e.x<ws&&e.x>Ts&&(e.x=1),e.y<ws&&e.y>Ts&&(e.y=1)}function xt(t,e){t.min=t.min+e,t.max=t.max+e}function Ss(t,e,n,s,i=.5){const o=C(t.min,t.max,i);Qe(t,e,n,o,s)}function bt(t,e){Ss(t.x,e.x,e.scaleX,e.scale,e.originX),Ss(t.y,e.y,e.scaleY,e.scale,e.originY)}function Lr(t,e){return Cr(Cc(t.getBoundingClientRect(),e))}function Rc(t,e,n){const s=Lr(t,n),{scroll:i}=e;return i&&(xt(s.x,i.offset.x),xt(s.y,i.offset.y)),s}const Ps=()=>({translate:0,scale:1,origin:0,originPoint:0}),Tt=()=>({x:Ps(),y:Ps()}),As=()=>({min:0,max:0}),E=()=>({x:As(),y:As()}),tn={current:null},kr={current:!1};function Lc(){if(kr.current=!0,!!cn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>tn.current=t.matches;t.addEventListener("change",e),e()}else tn.current=!1}const kc=new WeakMap;function jc(t,e,n){for(const s in e){const i=e[s],o=n[s];if(F(i))t.addValue(s,i);else if(F(o))t.addValue(s,Y(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,Y(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Vs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ic{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=Cn,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=U.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,V.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=ye(n),this.isVariantNode=vr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&F(d)&&d.set(l[f])}}mount(e){this.current=e,kc.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),kr.current||Lc(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:tn.current,process.env.NODE_ENV!=="production"&&me(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Z(this.notifyUpdate),Z(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Et.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&V.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 Pt){const n=Pt[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):E()}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<Vs.length;s++){const i=Vs[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=jc(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=Y(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"&&(Si(s)||Ai(s))?s=parseFloat(s):!Yl(s)&&rt.test(n)&&(s=ar(e,n)),this.setBaseTarget(e,F(s)?s.get():s)),F(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=Un(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&&!F(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 pn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Ln.render(this.render)}}class jr extends Ic{constructor(){super(...arguments),this.KeyframeResolver=Ml}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;F(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ir(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 Fc(t){return window.getComputedStyle(t)}class Bc extends jr{constructor(){super(...arguments),this.type="html",this.renderInstance=Ir}readValueFromInstance(e,n){var s;if(Et.has(n))return(s=this.projection)!=null&&s.isProjecting?Ke(n):Ha(e,n);{const i=Fc(e),o=(xn(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Lr(e,n)}build(e,n,s){Nn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return zn(e,n,s)}}const Fr=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 Nc(t,e,n,s){Ir(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Fr.has(i)?i:_n(i),e.attrs[i])}class Oc extends jr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=E}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Et.has(n)){const s=or(n);return s&&s.default||0}return n=Fr.has(n)?n:_n(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Ar(e,n,s)}build(e,n,s){Tr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Nc(e,n,s,i)}mount(e){this.isSVGTag=Sr(e.tagName),super.mount(e)}}const Wc=(t,e)=>Wn(t)?new Oc(e):new Bc(e,{allowProjection:t!==b.Fragment});function _t(t,e,n){const s=t.getProps();return Un(s,e,n!==void 0?n:s.custom,t)}const en=t=>Array.isArray(t);function Uc(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Y(n))}function zc(t){return en(t)?t[t.length-1]||0:t}function _c(t,e){const n=_t(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=zc(o[r]);Uc(t,r,a)}}function $c(t){return!!(F(t)&&t.add)}function nn(t,e){const n=t.getValue("willChange");if($c(n))return n.add(e);if(!n&&nt.WillChange){const s=new nt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Br(t){return t.props[Vr]}const Kc=t=>t!==null;function Hc(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Kc),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Gc={type:"spring",stiffness:500,damping:25,restSpeed:10},Yc=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Xc={type:"keyframes",duration:.8},qc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Zc=(t,{keyframes:e})=>e.length>2?Xc:Et.has(t)?t.startsWith("scale")?Yc(e[1]):Gc:qc;function Jc({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const $n=(t,e,n,s={},i,o)=>r=>{const a=En(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-X(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,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};Jc(a)||Object.assign(c,Zc(t,c)),c.duration&&(c.duration=X(c.duration)),c.repeatDelay&&(c.repeatDelay=X(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(qe(c),c.delay===0&&(h=!0)),(nt.instantAnimations||nt.skipAnimations)&&(h=!0,qe(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const f=Hc(c.keyframes,a);if(f!==void 0){V.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Dn(c):new ml(c)};function Qc({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Nr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const h=t.getValue(c,t.latestValues[c]??null),f=a[c];if(f===void 0||u&&Qc(u,c))continue;const d={delay:n,...En(o||{},c)},m=h.get();if(m!==void 0&&!h.isAnimating&&!Array.isArray(f)&&f===m&&!d.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const p=Br(t);if(p){const T=window.MotionHandoffAnimation(p,c,V);T!==null&&(d.startTime=T,g=!0)}}nn(t,c),h.start($n(c,h,f,t.shouldReduceMotion&&sr.has(c)?{type:!1}:d,t,g));const v=h.animation;v&&l.push(v)}return r&&Promise.all(l).then(()=>{V.update(()=>{r&&_c(t,r)})}),l}function sn(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(Nr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=i;return tu(t,e,u,c,h,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[o,r]:[r,o];return u().then(()=>c())}else return Promise.all([o(),r(n.delay)])}function tu(t,e,n=0,s=0,i=0,o=1,r){const a=[],l=t.variantChildren.size,u=(l-1)*i,c=typeof s=="function",h=c?f=>s(f,l):o===1?(f=0)=>f*i:(f=0)=>u-f*i;return Array.from(t.variantChildren).sort(eu).forEach((f,d)=>{f.notify("AnimationStart",e),a.push(sn(f,e,{...r,delay:n+(c?0:s)+h(d)}).then(()=>f.notify("AnimationComplete",e)))}),Promise.all(a)}function eu(t,e){return t.sortNodePosition(e)}function nu(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>sn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=sn(t,e,n);else{const i=typeof e=="function"?_t(t,e,n.custom):e;s=Promise.all(Nr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Or(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 su=Bn.length;function Wr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Wr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<su;n++){const s=Bn[n],i=t.props[s];(Ut(i)||i===!1)&&(e[s]=i)}return e}const iu=[...Fn].reverse(),ru=Fn.length;function ou(t){return e=>Promise.all(e.map(({animation:n,options:s})=>nu(t,n,s)))}function au(t){let e=ou(t),n=Ms(),s=!0;const i=l=>(u,c)=>{var f;const h=_t(t,c,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:m,...g}=h;u={...u,...g,...m}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=Wr(t.parent)||{},h=[],f=new Set;let d={},m=1/0;for(let v=0;v<ru;v++){const p=iu[v],T=n[p],y=u[p]!==void 0?u[p]:c[p],A=Ut(y),S=p===l?T.isActive:null;S===!1&&(m=v);let M=y===c[p]&&y!==u[p]&&A;if(M&&s&&t.manuallyAnimateOnMount&&(M=!1),T.protectedKeys={...d},!T.isActive&&S===null||!y&&!T.prevProp||ge(y)||typeof y=="boolean")continue;const L=lu(T.prevProp,y);let P=L||p===l&&T.isActive&&!M&&A||v>m&&A,W=!1;const _=Array.isArray(y)?y:[y];let mt=_.reduce(i(p),{});S===!1&&(mt={});const{prevResolvedValues:Gn={}}=T,xo={...Gn,...mt},Yn=B=>{P=!0,f.has(B)&&(W=!0,f.delete(B)),T.needsAnimating[B]=!0;const et=t.getValue(B);et&&(et.liveStyle=!1)};for(const B in xo){const et=mt[B],xe=Gn[B];if(d.hasOwnProperty(B))continue;let be=!1;en(et)&&en(xe)?be=!Or(et,xe):be=et!==xe,be?et!=null?Yn(B):f.add(B):et!==void 0&&f.has(B)?Yn(B):T.protectedKeys[B]=!0}T.prevProp=y,T.prevResolvedValues=mt,T.isActive&&(d={...d,...mt}),s&&t.blockInitialAnimation&&(P=!1),P&&(!(M&&L)||W)&&h.push(..._.map(B=>({animation:B,options:{type:p}})))}if(f.size){const v={};if(typeof u.initial!="boolean"){const p=_t(t,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(v.transition=p.transition)}f.forEach(p=>{const T=t.getBaseTarget(p),y=t.getValue(p);y&&(y.liveStyle=!0),v[p]=T??null}),h.push({animation:v})}let g=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(h):Promise.resolve()}function a(l,u){var h;if(n[l].isActive===u)return Promise.resolve();(h=t.variantChildren)==null||h.forEach(f=>{var d;return(d=f.animationState)==null?void 0:d.setActive(l,u)}),n[l].isActive=u;const c=r(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Ms(),s=!0}}}function lu(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Or(e,t):!1}function at(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ms(){return{animate:at(!0),whileInView:at(),whileHover:at(),whileTap:at(),whileDrag:at(),whileFocus:at(),exit:at()}}class ot{constructor(e){this.isMounted=!1,this.node=e}update(){}}class cu extends ot{constructor(e){super(e),e.animationState||(e.animationState=au(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ge(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 uu=0;class hu extends ot{constructor(){super(...arguments),this.id=uu++}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 fu={animation:{Feature:cu},exit:{Feature:hu}};function $t(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function Yt(t){return{point:{x:t.pageX,y:t.pageY}}}const du=t=>e=>kn(e)&&t(e,Yt(e));function Ft(t,e,n,s){return $t(t,e,du(n),s)}const Ur=1e-4,mu=1-Ur,pu=1+Ur,zr=.01,gu=0-zr,yu=0+zr;function N(t){return t.max-t.min}function vu(t,e,n){return Math.abs(t-e)<=n}function Ds(t,e,n,s=.5){t.origin=s,t.originPoint=C(e.min,e.max,t.origin),t.scale=N(n)/N(e),t.translate=C(n.min,n.max,t.origin)-t.originPoint,(t.scale>=mu&&t.scale<=pu||isNaN(t.scale))&&(t.scale=1),(t.translate>=gu&&t.translate<=yu||isNaN(t.translate))&&(t.translate=0)}function Bt(t,e,n,s){Ds(t.x,e.x,n.x,s?s.originX:void 0),Ds(t.y,e.y,n.y,s?s.originY:void 0)}function Cs(t,e,n){t.min=n.min+e.min,t.max=t.min+N(e)}function xu(t,e,n){Cs(t.x,e.x,n.x),Cs(t.y,e.y,n.y)}function Es(t,e,n){t.min=e.min-n.min,t.max=t.min+N(e)}function Nt(t,e,n){Es(t.x,e.x,n.x),Es(t.y,e.y,n.y)}function K(t){return[t("x"),t("y")]}const _r=({current:t})=>t?t.ownerDocument.defaultView:null,Rs=(t,e)=>Math.abs(t-e);function bu(t,e){const n=Rs(t.x,e.x),s=Rs(t.y,e.y);return Math.sqrt(n**2+s**2)}class $r{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Ee(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,m=bu(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!d&&!m)return;const{point:g}=f,{timestamp:v}=k;this.history.push({...g,timestamp:v});const{onStart:p,onMove:T}=this.handlers;d||(p&&p(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Ce(d,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Ee(f.type==="pointercancel"?this.lastMoveEventInfo:Ce(d,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,p),g&&g(f,p)},!kn(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=Yt(e),l=Ce(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=k;this.history=[{...u,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,Ee(l,this.history)),this.removeListeners=Kt(Ft(this.contextWindow,"pointermove",this.handlePointerMove),Ft(this.contextWindow,"pointerup",this.handlePointerUp),Ft(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Z(this.updatePoint)}}function Ce(t,e){return e?{point:e(t.point)}:t}function Ls(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ee({point:t},e){return{point:t,delta:Ls(t,Kr(e)),offset:Ls(t,Tu(e)),velocity:wu(e,.1)}}function Tu(t){return t[0]}function Kr(t){return t[t.length-1]}function wu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Kr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>X(e)));)n--;if(!s)return{x:0,y:0};const o=J(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 Su(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?C(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?C(n,t,s.max):Math.min(t,n)),t}function ks(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 Pu(t,{top:e,left:n,bottom:s,right:i}){return{x:ks(t.x,n,i),y:ks(t.y,e,s)}}function js(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 Au(t,e){return{x:js(t.x,e.x),y:js(t.y,e.y)}}function Vu(t,e){let n=.5;const s=N(t),i=N(e);return i>s?n=St(e.min,e.max-s,t.min):s>i&&(n=St(t.min,t.max-i,e.min)),tt(0,1,n)}function Mu(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 rn=.35;function Du(t=rn){return t===!1?t=0:t===!0&&(t=rn),{x:Is(t,"left","right"),y:Is(t,"top","bottom")}}function Is(t,e,n){return{min:Fs(t,e),max:Fs(t,n)}}function Fs(t,e){return typeof t=="number"?t:t[e]||0}const Cu=new WeakMap;class Eu{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=E(),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=h=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Yt(h).point)},r=(h,f)=>{const{drag:d,dragPropagation:m,onDragStart:g}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=El(d),!this.openDragLock))return;this.latestPointerEvent=h,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),K(p=>{let T=this.getAxisMotionValue(p).get()||0;if(Q.test(T)){const{projection:y}=this.visualElement;if(y&&y.layout){const A=y.layout.layoutBox[p];A&&(T=N(A)*(parseFloat(T)/100))}}this.originPoint[p]=T}),g&&V.postRender(()=>g(h,f)),nn(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:g,onDrag:v}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:p}=f;if(m&&this.currentDirection===null){this.currentDirection=Ru(p),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,p),this.updateAxis("y",f.point,p),this.visualElement.render(),v&&v(h,f)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>K(h=>{var f;return this.getAnimationState(h)==="paused"&&((f=this.getAxisMotionValue(h).animation)==null?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new $r(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:_r(this.visualElement)})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&V.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||!Jt(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Su(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&&vt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Pu(s.layoutBox,e):this.constraints=!1,this.elastic=Du(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&K(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Mu(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!vt(e))return!1;const s=e.current;q(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=Rc(s,i.root,this.visualElement.getTransformPagePoint());let r=Au(i.layout.layoutBox,o);if(n){const a=n(Dc(r));this.hasMutatedConstraints=!!a,a&&(r=Cr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=K(c=>{if(!Jt(c,n,this.currentDirection))return;let h=l&&l[c]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return nn(this.visualElement,e),s.start($n(e,s,0,n,this.visualElement,!1))}stopAnimation(){K(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){K(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){K(n=>{const{drag:s}=this.getProps();if(!Jt(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]-C(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!vt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};K(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Vu({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(),K(r=>{if(!Jt(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(C(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;Cu.set(this.visualElement,this);const e=this.visualElement.current,n=Ft(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();vt(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()),V.read(s);const r=$t(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(K(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=rn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Jt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Ru(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Lu extends ot{constructor(e){super(e),this.removeGroupControls=z,this.removeListeners=z,this.controls=new Eu(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||z}unmount(){this.removeGroupControls(),this.removeListeners()}}const Bs=t=>(e,n)=>{t&&V.postRender(()=>t(e,n))};class ku extends ot{constructor(){super(...arguments),this.removePointerDownListener=z}onPointerDown(e){this.session=new $r(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_r(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Bs(e),onStart:Bs(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&V.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Ft(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 re={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ns(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Rt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(w.test(t))t=parseFloat(t);else return t;const n=Ns(t,e.target.x),s=Ns(t,e.target.y);return`${n}% ${s}%`}},ju={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=rt.parse(t);if(i.length>5)return s;const o=rt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=C(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};let Os=!1;class Iu extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;nc(Fu),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Os&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),re.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Os=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||V.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Ln.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;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 Hr(t){const[e,n]=Xl(),s=b.useContext(wi);return x.jsx(Iu,{...t,layoutGroup:s,switchLayoutGroup:b.useContext(Mr),isPresent:e,safeToRemove:n})}const Fu={borderRadius:{...Rt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Rt,borderTopRightRadius:Rt,borderBottomLeftRadius:Rt,borderBottomRightRadius:Rt,boxShadow:ju};function Bu(t,e,n){const s=F(t)?t:Y(t);return s.start($n("",s,e,n)),s.animation}const Nu=(t,e)=>t.depth-e.depth;class Ou{constructor(){this.children=[],this.isDirty=!1}add(e){fn(this.children,e),this.isDirty=!0}remove(e){dn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Nu),this.isDirty=!1,this.children.forEach(e)}}function Wu(t,e){const n=U.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Z(s),t(o-e))};return V.setup(s,!0),()=>Z(s)}const Gr=["TopLeft","TopRight","BottomLeft","BottomRight"],Uu=Gr.length,Ws=t=>typeof t=="string"?parseFloat(t):t,Us=t=>typeof t=="number"||w.test(t);function zu(t,e,n,s,i,o){i?(t.opacity=C(0,n.opacity??1,_u(s)),t.opacityExit=C(e.opacity??1,0,$u(s))):o&&(t.opacity=C(e.opacity??1,n.opacity??1,s));for(let r=0;r<Uu;r++){const a=`border${Gr[r]}Radius`;let l=zs(e,a),u=zs(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Us(l)===Us(u)?(t[a]=Math.max(C(Ws(l),Ws(u),s),0),(Q.test(u)||Q.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=C(e.rotate||0,n.rotate||0,s))}function zs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const _u=Yr(0,.5,Li),$u=Yr(.5,.95,z);function Yr(t,e,n){return s=>s<t?0:s>e?1:n(St(t,e,s))}function _s(t,e){t.min=e.min,t.max=e.max}function $(t,e){_s(t.x,e.x),_s(t.y,e.y)}function $s(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ks(t,e,n,s,i){return t-=e,t=ue(t,1/n,s),i!==void 0&&(t=ue(t,1/i,s)),t}function Ku(t,e=0,n=1,s=.5,i,o=t,r=t){if(Q.test(e)&&(e=parseFloat(e),e=C(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=C(o.min,o.max,s);t===o&&(a-=e),t.min=Ks(t.min,e,n,a,i),t.max=Ks(t.max,e,n,a,i)}function Hs(t,e,[n,s,i],o,r){Ku(t,e[n],e[s],e[i],e.scale,o,r)}const Hu=["x","scaleX","originX"],Gu=["y","scaleY","originY"];function Gs(t,e,n,s){Hs(t.x,e,Hu,n?n.x:void 0,s?s.x:void 0),Hs(t.y,e,Gu,n?n.y:void 0,s?s.y:void 0)}function Ys(t){return t.translate===0&&t.scale===1}function Xr(t){return Ys(t.x)&&Ys(t.y)}function Xs(t,e){return t.min===e.min&&t.max===e.max}function Yu(t,e){return Xs(t.x,e.x)&&Xs(t.y,e.y)}function qs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function qr(t,e){return qs(t.x,e.x)&&qs(t.y,e.y)}function Zs(t){return N(t.x)/N(t.y)}function Js(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Xu{constructor(){this.members=[]}add(e){fn(this.members,e),e.scheduleRender()}remove(e){if(dn(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 qu(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:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}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 Re=["","X","Y","Z"],Zu=1e3;let Ju=0;function Le(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Zr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Br(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",V,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Zr(s)}function Jr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Ju++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(eh),this.nodes.forEach(rh),this.nodes.forEach(oh),this.nodes.forEach(nh)},this.resolvedRelativeTargetAt=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 Ou)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new pn),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=jn(r)&&!Kl(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;V.read(()=>{h=window.innerWidth}),t(r,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=Wu(f,250),re.hasAnimatedSinceResize&&(re.hasAnimatedSinceResize=!1,this.nodes.forEach(ei)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||hh,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),p=!this.targetLayout||!qr(this.targetLayout,d),T=!h&&f;if(this.options.layoutRoot||this.resumeFrom||T||h&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...En(m,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,T)}else h||ei(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}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(),Z(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(ah),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&&Zr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Qs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ti);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ih),this.nodes.forEach(Qu),this.nodes.forEach(th)):this.nodes.forEach(ti),this.clearAllSnapshots();const a=U.now();k.delta=tt(0,1e3/60,a-k.timestamp),k.timestamp=a,k.isProcessing=!0,Te.update.process(k),Te.preRender.process(k),Te.render.process(k),k.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ln.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(sh),this.sharedNodes.forEach(lh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,V.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!N(this.snapshot.measuredBox.x)&&!N(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.layoutCorrected=E(),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&&!Xr(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||lt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),fh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:r}=this.options;if(!r)return E();const a=r.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(dh))){const{scroll:c}=this.root;c&&(xt(a.x,c.offset.x),xt(a.y,c.offset.y))}return a}removeElementScroll(r){var l;const a=E();if($(a,r),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:h,options:f}=c;c!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&$(a,r),xt(a.x,h.offset.x),xt(a.y,h.offset.y))}return a}applyTransform(r,a=!1){const l=E();$(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&bt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),lt(c.latestValues)&&bt(l,c.latestValues)}return lt(this.latestValues)&&bt(l,this.latestValues),l}removeTransform(r){const a=E();$(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!lt(u.latestValues))continue;Je(u.latestValues)&&u.updateSnapshot();const c=E(),h=u.measurePageBox();$(c,h),Gs(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return lt(this.latestValues)&&Gs(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==k.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var f;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||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!(!this.layout||!(c||h))){if(this.resolvedRelativeTargetAt=k.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=E(),this.relativeTargetOrigin=E(),Nt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=E(),this.targetWithTransforms=E()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),xu(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$(this.target,this.layout.layoutBox),Rr(this.target,this.targetDelta)):$(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=E(),this.relativeTargetOrigin=E(),Nt(this.relativeTargetOrigin,this.target,d.target),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Je(this.parent.latestValues)||Er(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var 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===k.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;$(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Ec(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=E());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():($s(this.prevProjectionDelta.x,this.projectionDelta.x),$s(this.prevProjectionDelta.y,this.projectionDelta.y)),Bt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Js(this.projectionDelta.x,this.prevProjectionDelta.x)||!Js(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}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=Tt(),this.projectionDelta=Tt(),this.projectionDeltaWithTransform=Tt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=Tt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=E(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=d!==m,v=this.getStack(),p=!v||v.members.length<=1,T=!!(g&&!p&&this.options.crossfade===!0&&!this.path.some(uh));this.animationProgress=0;let y;this.mixTargetDelta=A=>{const S=A/1e3;ni(h.x,r.x,S),ni(h.y,r.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ch(this.relativeTarget,this.relativeTargetOrigin,f,S),y&&Yu(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=E()),$(y,this.relativeTarget)),g&&(this.animationValues=c,zu(c,u,this.latestValues,S,T,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Z(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{re.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Y(0)),this.currentAnimation=Bu(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),r.onUpdate&&r.onUpdate(c)},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(Zu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&Qr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||E();const h=N(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=N(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}$(a,l),bt(a,c),Bt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Xu),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){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 u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Le("z",r,u,this.animationValues);for(let c=0;c<Re.length;c++)Le(`rotate${Re[c]}`,r,u,this.animationValues),Le(`skew${Re[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=ie(a==null?void 0:a.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=ie(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!lt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=qu(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),r.transform=h;const{x:f,y:d}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in zt){if(c[m]===void 0)continue;const{correct:g,applyTo:v,isCSSVariable:p}=zt[m],T=h==="none"?c[m]:g(c[m],u);if(v){const y=v.length;for(let A=0;A<y;A++)r[v[A]]=T}else p?this.options.visualElement.renderState.vars[m]=T:r[m]=T}this.options.layoutId&&(r.pointerEvents=u===this?ie(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(Qs),this.root.sharedNodes.clear()}}}function Qu(t){t.updateLayout()}function th(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"?K(h=>{const f=r?e.measuredBox[h]:e.layoutBox[h],d=N(f);f.min=s[h].min,f.max=f.min+d}):Qr(o,e.layoutBox,s)&&K(h=>{const f=r?e.measuredBox[h]:e.layoutBox[h],d=N(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=Tt();Bt(a,s,e.layoutBox);const l=Tt();r?Bt(l,t.applyTransform(i,!0),e.measuredBox):Bt(l,s,e.layoutBox);const u=!Xr(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=E();Nt(m,e.layoutBox,f.layoutBox);const g=E();Nt(g,s,d.layoutBox),qr(m,g)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function eh(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 nh(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function sh(t){t.clearSnapshot()}function Qs(t){t.clearMeasurements()}function ti(t){t.isLayoutDirty=!1}function ih(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ei(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function rh(t){t.resolveTargetDelta()}function oh(t){t.calcProjection()}function ah(t){t.resetSkewAndRotation()}function lh(t){t.removeLeadSnapshot()}function ni(t,e,n){t.translate=C(e.translate,0,n),t.scale=C(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function si(t,e,n,s){t.min=C(e.min,n.min,s),t.max=C(e.max,n.max,s)}function ch(t,e,n,s){si(t.x,e.x,n.x,s),si(t.y,e.y,n.y,s)}function uh(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const hh={duration:.45,ease:[.4,0,.1,1]},ii=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ri=ii("applewebkit/")&&!ii("chrome/")?Math.round:z;function oi(t){t.min=ri(t.min),t.max=ri(t.max)}function fh(t){oi(t.x),oi(t.y)}function Qr(t,e,n){return t==="position"||t==="preserve-aspect"&&!vu(Zs(e),Zs(n),.2)}function dh(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const mh=Jr({attachResizeListener:(t,e)=>$t(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ke={current:void 0},to=Jr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ke.current){const t=new mh({});t.mount(window),t.setOptions({layoutScroll:!0}),ke.current=t}return ke.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),ph={pan:{Feature:ku},drag:{Feature:Lu,ProjectionNode:to,MeasureLayout:Hr}};function ai(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&&V.postRender(()=>o(e,Yt(e)))}class gh extends ot{mount(){const{current:e}=this.node;e&&(this.unmount=Rl(e,(n,s)=>(ai(this.node,s,"Start"),i=>ai(this.node,i,"End"))))}unmount(){}}class yh extends ot{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($t(this.node.current,"focus",()=>this.onFocus()),$t(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function li(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&&V.postRender(()=>o(e,Yt(e)))}class vh extends ot{mount(){const{current:e}=this.node;e&&(this.unmount=Il(e,(n,s)=>(li(this.node,s,"Start"),(i,{success:o})=>li(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const on=new WeakMap,je=new WeakMap,xh=t=>{const e=on.get(t.target);e&&e(t)},bh=t=>{t.forEach(xh)};function Th({root:t,...e}){const n=t||document;je.has(n)||je.set(n,{});const s=je.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(bh,{root:t,...e})),s[i]}function wh(t,e,n){const s=Th(e);return on.set(t,n),s.observe(t),()=>{on.delete(t),s.unobserve(t)}}const Sh={some:0,all:1};class Ph extends ot{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:Sh[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return wh(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(Ah(e,n))&&this.startObserver()}unmount(){}}function Ah({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Vh={inView:{Feature:Ph},tap:{Feature:vh},focus:{Feature:yh},hover:{Feature:gh}},Mh={layout:{ProjectionNode:to,MeasureLayout:Hr}},Dh={...fu,...Vh,...ph,...Mh},Ch=Mc(Dh,Wc),Eh=50,ci=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),Rh=()=>({time:0,x:ci(),y:ci()}),Lh={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ui(t,e,n,s){const i=n[e],{length:o,position:r}=Lh[e],a=i.current,l=n.time;i.current=t[`scroll${r}`],i.scrollLength=t[`scroll${o}`]-t[`client${o}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=St(0,i.scrollLength,i.current);const u=s-l;i.velocity=u>Eh?0:gn(i.current-a,u)}function kh(t,e,n){ui(t,"x",e,n),ui(t,"y",e,n),e.time=n}function jh(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(ur(s))n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if(s.tagName==="svg"){const i=s.getBoundingClientRect();s=s.parentElement;const o=s.getBoundingClientRect();n.x+=i.left-o.left,n.y+=i.top-o.top}else if(s instanceof SVGGraphicsElement){const{x:i,y:o}=s.getBBox();n.x+=i,n.y+=o;let r=null,a=s.parentNode;for(;!r;)a.tagName==="svg"&&(r=a),a=s.parentNode;s=r}else break;return n}const an={start:0,center:.5,end:1};function hi(t,e,n=0){let s=0;if(t in an&&(t=an[t]),typeof t=="string"){const i=parseFloat(t);t.endsWith("px")?s=i:t.endsWith("%")?t=i/100:t.endsWith("vw")?s=i/100*document.documentElement.clientWidth:t.endsWith("vh")?s=i/100*document.documentElement.clientHeight:t=i}return typeof t=="number"&&(s=e*t),n+s}const Ih=[0,0];function Fh(t,e,n,s){let i=Array.isArray(t)?t:Ih,o=0,r=0;return typeof t=="number"?i=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?i=t.split(" "):i=[t,an[t]?t:"0"]),o=hi(i[0],n,s),r=hi(i[1],e),o-r}const Bh={All:[[0,0],[1,1]]},Nh={x:0,y:0};function Oh(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function Wh(t,e,n){const{offset:s=Bh.All}=n,{target:i=t,axis:o="y"}=n,r=o==="y"?"height":"width",a=i!==t?jh(i,t):Nh,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:Oh(i),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=s.length;for(let f=0;f<h;f++){const d=Fh(s[f],u[r],l[r],a[o]);!c&&d!==e[o].interpolatorOffsets[f]&&(c=!0),e[o].offset[f]=d}c&&(e[o].interpolate=An(e[o].offset,Gi(s),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=tt(0,1,e[o].interpolate(e[o].current))}function Uh(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight,process.env.NODE_ENV!=="production"&&t&&e&&e!==t&&me(getComputedStyle(t).position!=="static","Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.")}function zh(t,e,n,s={}){return{measure:i=>{Uh(t,s.target,n),kh(t,n,i),(s.offset||s.target)&&Wh(t,n,s)},notify:()=>e(n)}}const Lt=new WeakMap,fi=new WeakMap,Ie=new WeakMap,di=t=>t===document.scrollingElement?window:t;function eo(t,{container:e=document.scrollingElement,...n}={}){if(!e)return z;let s=Ie.get(e);s||(s=new Set,Ie.set(e,s));const i=Rh(),o=zh(e,t,i,n);if(s.add(o),!Lt.has(e)){const a=()=>{for(const h of s)h.measure(k.timestamp);V.preUpdate(l)},l=()=>{for(const h of s)h.notify()},u=()=>V.read(a);Lt.set(e,u);const c=di(e);window.addEventListener("resize",u,{passive:!0}),e!==document.documentElement&&fi.set(e,$l(e,u)),c.addEventListener("scroll",u,{passive:!0}),u()}const r=Lt.get(e);return V.read(r,!1,!0),()=>{var u;Z(r);const a=Ie.get(e);if(!a||(a.delete(o),a.size))return;const l=Lt.get(e);Lt.delete(e),l&&(di(e).removeEventListener("scroll",l),(u=fi.get(e))==null||u(),window.removeEventListener("resize",l))}}const mi=new Map;function _h(t){const e={value:0},n=eo(s=>{e.value=s[t.axis].progress*100},t);return{currentTime:e,cancel:n}}function no({source:t,container:e,...n}){const{axis:s}=n;t&&(e=t);const i=mi.get(e)??new Map;mi.set(e,i);const o=n.target??"self",r=i.get(o)??{},a=s+(n.offset??[]).join(",");return r[a]||(r[a]=!n.target&&Zi()?new ScrollTimeline({source:e,axis:s}):_h({container:e,...n})),r[a]}function $h(t,e){const n=no(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:s=>(s.pause(),pr(i=>{s.time=s.duration*i},n))})}function Kh(t){return t.length===2}function Hh(t,e){return Kh(t)?eo(n=>{t(n[e.axis].progress,n)},e):pr(t,no(e))}function Gh(t,{axis:e="y",container:n=document.scrollingElement,...s}={}){if(!n)return z;const i={axis:e,container:n,...s};return typeof t=="function"?Hh(t,i):$h(t,i)}const Yh=()=>({scrollX:Y(0),scrollY:Y(0),scrollXProgress:Y(0),scrollYProgress:Y(0)}),Qt=t=>t?!t.current:!1;function Xh({container:t,target:e,...n}={}){const s=de(Yh),i=b.useRef(null),o=b.useRef(!1),r=b.useCallback(()=>(i.current=Gh((a,{x:l,y:u})=>{s.scrollX.set(l.current),s.scrollXProgress.set(l.progress),s.scrollY.set(u.current),s.scrollYProgress.set(u.progress)},{...n,container:(t==null?void 0:t.current)||void 0,target:(e==null?void 0:e.current)||void 0}),()=>{var a;(a=i.current)==null||a.call(i)}),[t,e,JSON.stringify(n.offset)]);return un(()=>{if(o.current=!1,Qt(t)||Qt(e)){o.current=!0;return}else return r()},[r]),b.useEffect(()=>{if(o.current)return q(!Qt(t),"Container ref is defined but not hydrated","use-scroll-ref"),q(!Qt(e),"Target ref is defined but not hydrated","use-scroll-ref"),r()},[r]),s}function qh(t){const e=de(()=>Y(t)),{isStatic:n}=b.useContext(In);if(n){const[,s]=b.useState(t);b.useEffect(()=>e.on("change",s),[])}return e}function so(t,e){const n=qh(e()),s=()=>n.set(e());return s(),un(()=>{const i=()=>V.preRender(s,!1,!0),o=t.map(r=>r.on("change",i));return()=>{o.forEach(r=>r()),Z(s)}}),n}function Zh(t){It.current=[],t();const e=so(It.current,t);return It.current=void 0,e}function Jh(t,e,n,s){if(typeof t=="function")return Zh(t);const i=typeof e=="function"?e:Hl(e,n,s);return Array.isArray(t)?pi(t,i):pi([t],([o])=>i(o))}function pi(t,e){const n=de(()=>[]);return so(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}const Qh=({children:t,className:e})=>{const n=b.useRef(null),{scrollYProgress:s}=Xh({target:n});if(typeof t!="string")throw new Error("TextReveal: children must be a string");const i=t.split(" ");return x.jsx("div",{ref:n,className:I("z-0 relative h-[200vh]",e),children:x.jsx("div",{className:"sticky top-0 mx-auto flex h-[50%] max-w-4xl items-center bg-transparent px-[1rem] py-[5rem]",children:x.jsx("span",{ref:n,className:"flex flex-wrap p-5 text-2xl font-bold text-black/20 dark:text-white/20 md:p-8 md:text-3xl lg:p-10 lg:text-4xl xl:text-5xl",children:i.map((o,r)=>{const a=r/i.length,l=a+1/i.length;return x.jsx(tf,{progress:s,range:[a,l],children:o},r)})})})})},tf=({children:t,progress:e,range:n})=>{const s=Jh(e,n,[0,1]);return x.jsxs("span",{className:"relative mx-1 lg:mx-1.5",children:[x.jsx("span",{className:"absolute opacity-30",children:t}),x.jsx(Ch.span,{style:{opacity:s},className:"text-black dark:text-white",children:t})]})};function io({...t}){return x.jsx(O.Root,{"data-slot":"select",...t})}function ef({...t}){return x.jsx(O.Group,{"data-slot":"select-group",...t})}function ro({...t}){return x.jsx(O.Value,{"data-slot":"select-value",...t})}function oo({className:t,size:e="default",children:n,...s}){return x.jsxs(O.Trigger,{"data-slot":"select-trigger","data-size":e,className:I(`
56
56
  flex w-fit items-center justify-between gap-2 rounded-md border
57
57
  border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap
58
58
  shadow-xs transition-[color,box-shadow] outline-none
@@ -72,7 +72,7 @@
72
72
  [&_svg]:pointer-events-none [&_svg]:shrink-0
73
73
  [&_svg:not([class*='size-'])]:size-4
74
74
  [&_svg:not([class*='text-'])]:text-muted-foreground
75
- `,t),...s,children:[n,P.jsx(X.Icon,{asChild:!0,children:P.jsx(Oe.ChevronDownIcon,{className:"size-4 opacity-50"})})]})}function sa({className:t,children:e,position:n="popper",...s}){return P.jsx(X.Portal,{"data-testid":"select",children:P.jsxs(X.Content,{"data-slot":"select-content",className:_(`
75
+ `,t),...s,children:[n,x.jsx(O.Icon,{asChild:!0,children:x.jsx(fe.ChevronDownIcon,{className:"size-4 opacity-50"})})]})}function ao({className:t,children:e,position:n="popper",...s}){return x.jsx(O.Portal,{"data-testid":"select",children:x.jsxs(O.Content,{"data-slot":"select-content",className:I(`
76
76
  relative z-50 max-h-(--radix-select-content-available-height)
77
77
  min-w-[8rem] origin-(--radix-select-content-transform-origin)
78
78
  overflow-x-hidden overflow-y-auto rounded-md border bg-popover
@@ -90,10 +90,10 @@
90
90
  data-[side=left]:-translate-x-1
91
91
  data-[side=right]:translate-x-1
92
92
  data-[side=top]:-translate-y-1
93
- `,t),position:n,...s,children:[P.jsx(ra,{}),P.jsx(X.Viewport,{className:_("p-1",n==="popper"&&`
93
+ `,t),position:n,...s,children:[x.jsx(co,{}),x.jsx(O.Viewport,{className:I("p-1",n==="popper"&&`
94
94
  h-[var(--radix-select-trigger-height)] w-full
95
95
  min-w-[var(--radix-select-trigger-width)] scroll-my-1
96
- `),children:e}),P.jsx(oa,{})]})})}function Eh({className:t,...e}){return P.jsx(X.Label,{"data-slot":"select-label",className:_("px-2 py-1.5 text-xs text-muted-foreground",t),...e})}function ia({className:t,children:e,...n}){return P.jsxs(X.Item,{"data-slot":"select-item",className:_(`
96
+ `),children:e}),x.jsx(uo,{})]})})}function nf({className:t,...e}){return x.jsx(O.Label,{"data-slot":"select-label",className:I("px-2 py-1.5 text-xs text-muted-foreground",t),...e})}function lo({className:t,children:e,...n}){return x.jsxs(O.Item,{"data-slot":"select-item",className:I(`
97
97
  relative flex w-full cursor-default items-center gap-2 rounded-sm
98
98
  py-1.5 pr-8 pl-2 text-sm outline-hidden select-none
99
99
  focus:bg-accent focus:text-accent-foreground
@@ -102,4 +102,4 @@
102
102
  [&_svg:not([class*='size-'])]:size-4
103
103
  [&_svg:not([class*='text-'])]:text-muted-foreground
104
104
  *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2
105
- `,t),...n,children:[P.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:P.jsx(X.ItemIndicator,{children:P.jsx(Oe.CheckIcon,{className:"size-4"})})}),P.jsx(X.ItemText,{children:e})]})}function Dh({className:t,...e}){return P.jsx(X.Separator,{"data-slot":"select-separator",className:_("pointer-events-none -mx-1 my-1 h-px bg-border",t),...e})}function ra({className:t,...e}){return P.jsx(X.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:_("flex cursor-default items-center justify-center py-1",t),...e,children:P.jsx(Oe.ChevronUpIcon,{className:"size-4"})})}function oa({className:t,...e}){return P.jsx(X.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:_("flex cursor-default items-center justify-center py-1",t),...e,children:P.jsx(Oe.ChevronDownIcon,{className:"size-4"})})}const Rh=({translationKey:t,translationOptions:e,namespace:n,...s})=>{const o=nr.useTranslations(n)(t,e==null?void 0:e.args);return P.jsx(Gt,{...s,children:o})},Lh=({translationKey:t,translationOptions:e,namespace:n,className:s,tag:i="div"})=>{const r=nr.useTranslations(n)(t,e==null?void 0:e.args);return k.createElement(i,{className:s,"data-testid":"translated-html"},r)};var Ih=Object.defineProperty,U=(t,e)=>Ih(t,"name",{value:e,configurable:!0}),fn=new Map,hn=new Map;function Ss(t,e){return`${t}:${JSON.stringify(e??{})}`}U(Ss,"getFormatterKey");function aa(t){const e=typeof t=="string"||typeof t=="number"?new Date(t):t;return e instanceof Date&&!Number.isNaN(e.getTime())?e:null}U(aa,"parseDate");function la(t,e="en",n){var o;const s=aa(t);if(!s)return"";const i=Ss(e,n);return fn.has(i)||fn.set(i,new Intl.DateTimeFormat(e,n)),((o=fn.get(i))==null?void 0:o.format(s))??""}U(la,"formatDate");function ca(t,e="en",n){var i;if(typeof t!="number"||Number.isNaN(t))return"";const s=Ss(e,n);return hn.has(s)||hn.set(s,new Intl.NumberFormat(e,n)),((i=hn.get(s))==null?void 0:i.format(t))??""}U(ca,"formatNumber");var Ge={defaultLocale:"en",supportedLocales:["en","es","fr","it","pt-BR","pt-PT"],fallbackLocale:"en"};function jh(){return Ge.supportedLocales}U(jh,"getSupportedLanguages");function Fh(){return Ge.defaultLocale}U(Fh,"getDefaultLanguage");function Nh(){return Ge.fallbackLocale}U(Nh,"getFallbackLanguage");function Bh(t){return Ge.supportedLocales.includes(t)}U(Bh,"isSupportedLanguage");var At=new Map;function Oh({value:t,forms:e,lang:n,type:s="cardinal"}){if(!da(t,e))return"";if(t===0&&e.zero)return On(e.zero,t);const o=fa(n,s).select(t),r=ua(e,o)??e.other??Object.values(e)[0];return r?On(r,t):""}U(Oh,"pluralize");function Ps(t,e){return`${t}:${e}`}U(Ps,"getPluralRulesKey");var zh=/{count}|#/g;function ua(t,e){switch(e){case"zero":return t.zero;case"one":return t.one;case"two":return t.two;case"few":return t.few;case"many":return t.many;case"other":return t.other;default:return}}U(ua,"selectTemplate");function da(t,e){return typeof t=="number"&&e&&typeof e=="object"}U(da,"isValidInput");function On(t,e){return t.replaceAll(zh,e.toString())}U(On,"replacePlaceholders");function fa(t,e){const n=Ps(t,e);if(!At.has(n))try{At.set(n,new Intl.PluralRules(t,{type:e}))}catch{return Be(n,e)}return At.get(n)??Be(n,e)}U(fa,"getPluralRules");function Be(t,e){const n=Ps("en",e);At.has(n)||At.set(n,new Intl.PluralRules("en",{type:e}));const s=At.get(n)??Be(n,e);return At.set(t,s),s}U(Be,"getFallbackPluralRules");var et;et=class{constructor(){be(this,"fallbackLocale");this.fallbackLocale="en"}static getInstance(){return et.instance||(et.instance=new et),et.instance}detectLocale(e){return e?this.detectFromRequest(e):this.fallbackLocale}detectFromRequest(e){var o,r,a;const n=(o=e.url.split("?")[1])==null?void 0:o.split("=")[1],s=e.headers.get("accept-language"),i=(a=(r=e.headers.get("cookie"))==null?void 0:r.split("; ").find(l=>l.startsWith("locale=")))==null?void 0:a.split("=")[1];return n??i??this.parseAcceptLanguage(s??"")??this.fallbackLocale}parseAcceptLanguage(e){if(!e)return null;let n=null,s=0;for(const i of e.split(",")){const{lang:o,q:r}=this.parseLangAndQ(i.trim());if(r>s&&(s=r,n=o,r===1))break}return n}parseLangAndQ(e){const n=e.indexOf(";"),s=n===-1?e:e.slice(0,Math.max(0,n));let i=1;if(n!==-1){const o=/q=(?<q>[\d.]+)/.exec(e.slice(n+1));i=o!=null&&o.groups?Number.parseFloat(o.groups.q)||0:1}return{lang:s,q:i}}setFallbackLocale(e){this.fallbackLocale=e}},U(et,"LocaleDetector"),be(et,"instance");var Ot;Ot=class{constructor(e){be(this,"namespaces");this.namespaces=e?new Map(e):new Map}addNamespace(e,n){if(!ha(e))throw new Error("Invalid namespace name");this.namespaces.set(e,n)}getNamespace(e){return this.namespaces.get(e)}getAllNamespaces(){return[...this.namespaces.keys()]}mergeNamespaces(e,n){const s=this.namespaces.get(e)??{},i=this.namespaces.get(n)??{};this.namespaces.set(e,{...s,...i})}validateNamespace(e,n){const s=this.namespaces.get(e);return s?n?Object.entries(n).every(([i,o])=>{var a;const r=(a=Object.getOwnPropertyDescriptor(s,i))==null?void 0:a.value;return r!==void 0&&typeof r===o}):!0:!1}},U(Ot,"NamespaceManager");function ha(t){return/^\w+$/.test(t)}U(ha,"isSafeKey");const Wh=({date:t,formatOptions:e,locale:n,...s})=>{const i=la(t,n,e);return P.jsx(Gt,{...s,children:i})},Uh=({value:t,formatOptions:e,locale:n,...s})=>{const i=ca(t,n,e);return P.jsx(Gt,{...s,children:i})};function _h({locale:t,locales:e,onChange:n,getLabel:s,disabled:i}){return P.jsxs(ta,{value:t,onValueChange:n,disabled:i,children:[P.jsx(na,{children:P.jsx(ea,{placeholder:s(t)})}),P.jsx(sa,{children:e.map(o=>P.jsx(ia,{value:o,children:s(o)},o))})]})}exports.AuroraText=gr;exports.Box=Ut;exports.Button=xl;exports.Container=Qa;exports.ExternalLink=hl;exports.Flex=cl;exports.FormattedDate=Wh;exports.FormattedNumber=Uh;exports.Grid=ul;exports.Heading=fl;exports.Input=vl;exports.LanguageSelector=_h;exports.Paragraph=pl;exports.Section=gl;exports.Select=ta;exports.SelectContent=sa;exports.SelectGroup=Ch;exports.SelectItem=ia;exports.SelectLabel=Eh;exports.SelectScrollDownButton=oa;exports.SelectScrollUpButton=ra;exports.SelectSeparator=Dh;exports.SelectTrigger=na;exports.SelectValue=ea;exports.Stack=yl;exports.Text=Gt;exports.TextReveal=Vh;exports.TranslatedHtml=Lh;exports.TranslatedText=Rh;
105
+ `,t),...n,children:[x.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:x.jsx(O.ItemIndicator,{children:x.jsx(fe.CheckIcon,{className:"size-4"})})}),x.jsx(O.ItemText,{children:e})]})}function sf({className:t,...e}){return x.jsx(O.Separator,{"data-slot":"select-separator",className:I("pointer-events-none -mx-1 my-1 h-px bg-border",t),...e})}function co({className:t,...e}){return x.jsx(O.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:I("flex cursor-default items-center justify-center py-1",t),...e,children:x.jsx(fe.ChevronUpIcon,{className:"size-4"})})}function uo({className:t,...e}){return x.jsx(O.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:I("flex cursor-default items-center justify-center py-1",t),...e,children:x.jsx(fe.ChevronDownIcon,{className:"size-4"})})}const rf=({translationKey:t,translationOptions:e,namespace:n,...s})=>{const o=yi.useTranslations(n)(t,e==null?void 0:e.args);return x.jsx(Vt,{...s,children:o})},of=({translationKey:t,translationOptions:e,namespace:n,className:s,tag:i="div"})=>{const r=yi.useTranslations(n)(t,e==null?void 0:e.args);return b.createElement(i,{className:s,"data-testid":"translated-html"},r)};var af=Object.defineProperty,j=(t,e)=>af(t,"name",{value:e,configurable:!0}),Fe=new Map,Be=new Map;function Kn(t,e){return`${t}:${JSON.stringify(e??{})}`}j(Kn,"getFormatterKey");function ho(t){const e=typeof t=="string"||typeof t=="number"?new Date(t):t;return e instanceof Date&&!Number.isNaN(e.getTime())?e:null}j(ho,"parseDate");function fo(t,e="en",n){var o;const s=ho(t);if(!s)return"";const i=Kn(e,n);return Fe.has(i)||Fe.set(i,new Intl.DateTimeFormat(e,n)),((o=Fe.get(i))==null?void 0:o.format(s))??""}j(fo,"formatDate");function mo(t,e="en",n){var i;if(typeof t!="number"||Number.isNaN(t))return"";const s=Kn(e,n);return Be.has(s)||Be.set(s,new Intl.NumberFormat(e,n)),((i=Be.get(s))==null?void 0:i.format(t))??""}j(mo,"formatNumber");var ve={defaultLocale:"en",supportedLocales:["en","es","fr","it","pt-BR","pt-PT"],fallbackLocale:"en"};function lf(){return ve.supportedLocales}j(lf,"getSupportedLanguages");function cf(){return ve.defaultLocale}j(cf,"getDefaultLanguage");function uf(){return ve.fallbackLocale}j(uf,"getFallbackLanguage");function hf(t){return ve.supportedLocales.includes(t)}j(hf,"isSupportedLanguage");var ht=new Map;function ff({value:t,forms:e,lang:n,type:s="cardinal"}){if(!go(t,e))return"";if(t===0&&e.zero)return ln(e.zero,t);const o=yo(n,s).select(t),r=po(e,o)??e.other??Object.values(e)[0];return r?ln(r,t):""}j(ff,"pluralize");function Hn(t,e){return`${t}:${e}`}j(Hn,"getPluralRulesKey");var df=/{count}|#/g;function po(t,e){switch(e){case"zero":return t.zero;case"one":return t.one;case"two":return t.two;case"few":return t.few;case"many":return t.many;case"other":return t.other;default:return}}j(po,"selectTemplate");function go(t,e){return typeof t=="number"&&e&&typeof e=="object"}j(go,"isValidInput");function ln(t,e){return t.replaceAll(df,e.toString())}j(ln,"replacePlaceholders");function yo(t,e){const n=Hn(t,e);if(!ht.has(n))try{ht.set(n,new Intl.PluralRules(t,{type:e}))}catch{return he(n,e)}return ht.get(n)??he(n,e)}j(yo,"getPluralRules");function he(t,e){const n=Hn("en",e);ht.has(n)||ht.set(n,new Intl.PluralRules("en",{type:e}));const s=ht.get(n)??he(n,e);return ht.set(t,s),s}j(he,"getFallbackPluralRules");var G;G=class{constructor(){Xt(this,"fallbackLocale");this.fallbackLocale="en"}static getInstance(){return G.instance||(G.instance=new G),G.instance}detectLocale(e){return e?this.detectFromRequest(e):this.fallbackLocale}detectFromRequest(e){var o,r,a;const n=(o=e.url.split("?")[1])==null?void 0:o.split("=")[1],s=e.headers.get("accept-language"),i=(a=(r=e.headers.get("cookie"))==null?void 0:r.split("; ").find(l=>l.startsWith("locale=")))==null?void 0:a.split("=")[1];return n??i??this.parseAcceptLanguage(s??"")??this.fallbackLocale}parseAcceptLanguage(e){if(!e)return null;let n=null,s=0;for(const i of e.split(",")){const{lang:o,q:r}=this.parseLangAndQ(i.trim());if(r>s&&(s=r,n=o,r===1))break}return n}parseLangAndQ(e){const n=e.indexOf(";"),s=n===-1?e:e.slice(0,Math.max(0,n));let i=1;if(n!==-1){const o=/q=(?<q>[\d.]+)/.exec(e.slice(n+1));i=o!=null&&o.groups?Number.parseFloat(o.groups.q)||0:1}return{lang:s,q:i}}setFallbackLocale(e){this.fallbackLocale=e}},j(G,"LocaleDetector"),Xt(G,"instance");var wt;wt=class{constructor(e){Xt(this,"namespaces");this.namespaces=e?new Map(e):new Map}addNamespace(e,n){if(!vo(e))throw new Error("Invalid namespace name");this.namespaces.set(e,n)}getNamespace(e){return this.namespaces.get(e)}getAllNamespaces(){return[...this.namespaces.keys()]}mergeNamespaces(e,n){const s=this.namespaces.get(e)??{},i=this.namespaces.get(n)??{};this.namespaces.set(e,{...s,...i})}validateNamespace(e,n){const s=this.namespaces.get(e);return s?n?Object.entries(n).every(([i,o])=>{var a;const r=(a=Object.getOwnPropertyDescriptor(s,i))==null?void 0:a.value;return r!==void 0&&typeof r===o}):!0:!1}},j(wt,"NamespaceManager");function vo(t){return/^\w+$/.test(t)}j(vo,"isSafeKey");const mf=({date:t,formatOptions:e,locale:n,...s})=>{const i=fo(t,n,e);return x.jsx(Vt,{...s,children:i})},pf=({value:t,formatOptions:e,locale:n,...s})=>{const i=mo(t,n,e);return x.jsx(Vt,{...s,children:i})};function gf({locale:t,locales:e,onChange:n,getLabel:s,disabled:i}){return x.jsxs(io,{value:t,onValueChange:n,disabled:i,children:[x.jsx(oo,{children:x.jsx(ro,{placeholder:s(t)})}),x.jsx(ao,{children:e.map(o=>x.jsx(lo,{value:o,children:s(o)},o))})]})}exports.AuroraText=Ti;exports.Box=At;exports.Button=Ko;exports.Container=Mo;exports.ExternalLink=Wo;exports.Flex=Fo;exports.FormattedDate=mf;exports.FormattedNumber=pf;exports.Grid=Bo;exports.Heading=Oo;exports.Input=Ho;exports.LanguageSelector=gf;exports.Paragraph=zo;exports.Section=_o;exports.Select=io;exports.SelectContent=ao;exports.SelectGroup=ef;exports.SelectItem=lo;exports.SelectLabel=nf;exports.SelectScrollDownButton=uo;exports.SelectScrollUpButton=co;exports.SelectSeparator=sf;exports.SelectTrigger=oo;exports.SelectValue=ro;exports.Stack=$o;exports.Text=Vt;exports.TextReveal=Qh;exports.TranslatedHtml=of;exports.TranslatedText=rf;