@epic-web/workshop-app 5.22.2 → 5.22.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{_-BDcQ_M2J.js → _-CHaVBRQw.js} +2 -2
- package/build/client/assets/{_-BDcQ_M2J.js.map → _-CHaVBRQw.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber-CG2AFTtQ.js → _exerciseNumber-3uq8PYSd.js} +2 -2
- package/build/client/assets/{_exerciseNumber-CG2AFTtQ.js.map → _exerciseNumber-3uq8PYSd.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber_._stepNumber-COWC332q.js → _exerciseNumber_._stepNumber-D5VDI7vZ.js} +2 -2
- package/build/client/assets/{_exerciseNumber_._stepNumber-COWC332q.js.map → _exerciseNumber_._stepNumber-D5VDI7vZ.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber_.finished-BgGBYU74.js → _exerciseNumber_.finished-3Iv9ikNq.js} +2 -2
- package/build/client/assets/{_exerciseNumber_.finished-BgGBYU74.js.map → _exerciseNumber_.finished-3Iv9ikNq.js.map} +1 -1
- package/build/client/assets/_layout-Brb3LPqZ.js +5 -0
- package/build/client/assets/_layout-Brb3LPqZ.js.map +1 -0
- package/build/client/assets/_layout-CkabS-6c.js +9 -0
- package/build/client/assets/_layout-CkabS-6c.js.map +1 -0
- package/build/client/assets/accordion-BjQ-5Z44.js +2 -0
- package/build/client/assets/accordion-BjQ-5Z44.js.map +1 -0
- package/build/client/assets/{account-BwQvf4AS.js → account-CN4B8rm4.js} +2 -2
- package/build/client/assets/{account-BwQvf4AS.js.map → account-CN4B8rm4.js.map} +1 -1
- package/build/client/assets/app-lUkT_xku.js +2 -0
- package/build/client/assets/{app-XHqxOZfy.js.map → app-lUkT_xku.js.map} +1 -1
- package/build/client/assets/{button-DVPKzWkn.js → button-ChOzbirS.js} +2 -2
- package/build/client/assets/{button-DVPKzWkn.js.map → button-ChOzbirS.js.map} +1 -1
- package/build/client/assets/{diff-C7Zh3uuA.js → diff-CTHVtVGQ.js} +2 -2
- package/build/client/assets/{diff-C7Zh3uuA.js.map → diff-CTHVtVGQ.js.map} +1 -1
- package/build/client/assets/diff-CVrsnWqw.js +2 -0
- package/build/client/assets/{diff-DVOUmaq6.js.map → diff-CVrsnWqw.js.map} +1 -1
- package/build/client/assets/discord-Cl4hiMqz.js +2 -0
- package/build/client/assets/discord-Cl4hiMqz.js.map +1 -0
- package/build/client/assets/{discord-CoBo5eVK.js → discord-gROK6Zn6.js} +2 -2
- package/build/client/assets/{discord-CoBo5eVK.js.map → discord-gROK6Zn6.js.map} +1 -1
- package/build/client/assets/{epic-video-DRZssA4U.js → epic-video-BQtjG_Y0.js} +2 -2
- package/build/client/assets/{epic-video-DRZssA4U.js.map → epic-video-BQtjG_Y0.js.map} +1 -1
- package/build/client/assets/{error-boundary-De7jJlR5.js → error-boundary-CAu3AmhN.js} +2 -2
- package/build/client/assets/{error-boundary-De7jJlR5.js.map → error-boundary-CAu3AmhN.js.map} +1 -1
- package/build/client/assets/{finished-6JNE1a1E.js → finished-9PhQncNF.js} +2 -2
- package/build/client/assets/{finished-6JNE1a1E.js.map → finished-9PhQncNF.js.map} +1 -1
- package/build/client/assets/index-BncqUVfr.js +39 -0
- package/build/client/assets/index-BncqUVfr.js.map +1 -0
- package/build/client/assets/{index-BZWIdOoA.js → index-CMYl882D.js} +2 -2
- package/build/client/assets/{index-BZWIdOoA.js.map → index-CMYl882D.js.map} +1 -1
- package/build/client/assets/index-CSGHuBiw.js +5 -0
- package/build/client/assets/index-CSGHuBiw.js.map +1 -0
- package/build/client/assets/{index-Cnxrq9Ny.js → index-CYZfnGWa.js} +2 -2
- package/build/client/assets/{index-Cnxrq9Ny.js.map → index-CYZfnGWa.js.map} +1 -1
- package/build/client/assets/index-mZJ8sz9i.js +2 -0
- package/build/client/assets/{index-M647UyZv.js.map → index-mZJ8sz9i.js.map} +1 -1
- package/build/client/assets/{index-CyFsiCNp.js → index-qo6WmPUa.js} +2 -2
- package/build/client/assets/{index-CyFsiCNp.js.map → index-qo6WmPUa.js.map} +1 -1
- package/build/client/assets/{loading-ClL22bF9.js → loading-CPEkK5hO.js} +2 -2
- package/build/client/assets/{loading-ClL22bF9.js.map → loading-CPEkK5hO.js.map} +1 -1
- package/build/client/assets/{login-C3I5NCrj.js → login-C9JmYc0v.js} +2 -2
- package/build/client/assets/{login-C3I5NCrj.js.map → login-C9JmYc0v.js.map} +1 -1
- package/build/client/assets/{manifest-6206f67a.js → manifest-4acdd3e2.js} +1 -1
- package/build/client/assets/{mdx-Z4bEoKXn.js → mdx-CnaWQCDw.js} +2 -2
- package/build/client/assets/{mdx-Z4bEoKXn.js.map → mdx-CnaWQCDw.js.map} +1 -1
- package/build/client/assets/{misc-BK2EiKtY.js → misc-CQmANiHr.js} +2 -2
- package/build/client/assets/{misc-BK2EiKtY.js.map → misc-CQmANiHr.js.map} +1 -1
- package/build/client/assets/{nav-chevrons-DVD_0i2a.js → nav-chevrons-DCuva9-Q.js} +2 -2
- package/build/client/assets/{nav-chevrons-DVD_0i2a.js.map → nav-chevrons-DCuva9-Q.js.map} +1 -1
- package/build/client/assets/{onboarding-DjyKxkKx.js → onboarding-DzfDHJg_.js} +2 -2
- package/build/client/assets/{onboarding-DjyKxkKx.js.map → onboarding-DzfDHJg_.js.map} +1 -1
- package/build/client/assets/{online-CHlOuJG-.js → online-BsTX44az.js} +2 -2
- package/build/client/assets/{online-CHlOuJG-.js.map → online-BsTX44az.js.map} +1 -1
- package/build/client/assets/{preferences-BmwlU5EC.js → preferences-BYBJKp8k.js} +2 -2
- package/build/client/assets/{preferences-BmwlU5EC.js.map → preferences-BYBJKp8k.js.map} +1 -1
- package/build/client/assets/{presence-CPOTHCHm.js → presence-D5UF-NOM.js} +2 -2
- package/build/client/assets/{presence-CPOTHCHm.js.map → presence-D5UF-NOM.js.map} +1 -1
- package/build/client/assets/{preview-B2BxDDhi.js → preview-DaTpH6lj.js} +2 -2
- package/build/client/assets/{preview-B2BxDDhi.js.map → preview-DaTpH6lj.js.map} +1 -1
- package/build/client/assets/{product-BkDgAOLQ.js → product-BKhLQKd7.js} +2 -2
- package/build/client/assets/{product-BkDgAOLQ.js.map → product-BKhLQKd7.js.map} +1 -1
- package/build/client/assets/{progress-CnHFlUmF.js → progress-DwE8EkAa.js} +2 -2
- package/build/client/assets/{progress-CnHFlUmF.js.map → progress-DwE8EkAa.js.map} +1 -1
- package/build/client/assets/{progress-bar-Q9l2dtTg.js → progress-bar-ZCHf2Y4W.js} +2 -2
- package/build/client/assets/{progress-bar-Q9l2dtTg.js.map → progress-bar-ZCHf2Y4W.js.map} +1 -1
- package/build/client/assets/{revalidation-ws-CLolY6Iu.js → revalidation-ws-BoJZTvOQ.js} +2 -2
- package/build/client/assets/{revalidation-ws-CLolY6Iu.js.map → revalidation-ws-BoJZTvOQ.js.map} +1 -1
- package/build/client/assets/{root-B7xuuOHl.js → root-4MvCzrFd.js} +3 -3
- package/build/client/assets/root-4MvCzrFd.js.map +1 -0
- package/build/client/assets/{set-playground-ZcPraYj5.js → set-playground-IUJCGVu2.js} +2 -2
- package/build/client/assets/{set-playground-ZcPraYj5.js.map → set-playground-IUJCGVu2.js.map} +1 -1
- package/build/client/assets/test-B8jDo0X4.js +2 -0
- package/build/client/assets/{test-Bt9AuCey.js.map → test-B8jDo0X4.js.map} +1 -1
- package/build/client/assets/{tests-CmjMQrMj.js → tests-y-atkhWB.js} +2 -2
- package/build/client/assets/{tests-CmjMQrMj.js.map → tests-y-atkhWB.js.map} +1 -1
- package/build/client/assets/tooltip-Cd0yJoQb.js +2 -0
- package/build/client/assets/tooltip-Cd0yJoQb.js.map +1 -0
- package/build/server/index.js +6 -4
- package/build/server/index.js.map +1 -1
- package/package.json +3 -3
- package/build/client/assets/_layout-DKC1JUTc.js +0 -2
- package/build/client/assets/_layout-DKC1JUTc.js.map +0 -1
- package/build/client/assets/_layout-DuDUPWax.js +0 -6
- package/build/client/assets/_layout-DuDUPWax.js.map +0 -1
- package/build/client/assets/accordion-BPyhq471.js +0 -2
- package/build/client/assets/accordion-BPyhq471.js.map +0 -1
- package/build/client/assets/app-XHqxOZfy.js +0 -2
- package/build/client/assets/diff-DVOUmaq6.js +0 -2
- package/build/client/assets/discord-CFZUT74L.js +0 -2
- package/build/client/assets/discord-CFZUT74L.js.map +0 -1
- package/build/client/assets/index-6Hu4Lmzn.js +0 -2
- package/build/client/assets/index-6Hu4Lmzn.js.map +0 -1
- package/build/client/assets/index-BE3KRz8n.js +0 -42
- package/build/client/assets/index-BE3KRz8n.js.map +0 -1
- package/build/client/assets/index-M647UyZv.js +0 -2
- package/build/client/assets/root-B7xuuOHl.js.map +0 -1
- package/build/client/assets/test-Bt9AuCey.js +0 -2
- package/build/client/assets/tooltip-leWCE50J.js +0 -2
- package/build/client/assets/tooltip-leWCE50J.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as T,j as U,u as Ts,c as to}from"./index-CGzylDPY.js";import{c as rn}from"./misc-BK2EiKtY.js";import{u as eo}from"./pe-DXT2FOp1.js";import{b as no,c as so,a as io}from"./components-DrvY4pal.js";function oo(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...s)=>t(...s);return new Proxy(n,{get:(s,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}function bt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const he=t=>Array.isArray(t);function bs(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}function St(t){return typeof t=="string"||Array.isArray(t)}function an(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ce(t,e,n,s){if(typeof e=="function"){const[i,r]=an(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=an(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function Wt(t,e,n){const s=t.getProps();return Ce(s,e,n!==void 0?n:s.custom,t)}const De=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Me=["initial",...De],Ct=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Q=new Set(Ct),G=t=>t*1e3,z=t=>t/1e3,ro={type:"spring",stiffness:500,damping:25,restSpeed:10},ao=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),lo={type:"keyframes",duration:.8},uo={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},co=(t,{keyframes:e})=>e.length>2?lo:Q.has(t)?t.startsWith("scale")?ao(e[1]):ro:uo;function Re(t,e){return t[e]||t.default||t}const ho={skipAnimations:!1,useManualTiming:!1},fo=t=>t!==null;function $t(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(fo),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return!r||s===void 0?i[r]:s}const L=t=>t;function po(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){r.has(u)&&(l.schedule(u),t()),u(o)}const l={schedule:(u,c=!1,h=!1)=>{const d=h&&s?e:n;return c&&r.add(u),d.has(u)||d.add(u),u},cancel:u=>{n.delete(u),r.delete(u)},process:u=>{if(o=u,s){i=!0;return}s=!0,[e,n]=[n,e],n.clear(),e.forEach(a),s=!1,i&&(i=!1,l.process(u))}};return l}const Rt=["read","resolveKeyframes","update","preRender","render","postRender"],mo=40;function Ss(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Rt.reduce((g,v)=>(g[v]=po(r),g),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:f}=o,d=()=>{const g=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(g-i.timestamp,mo),1),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(d))},p=()=>{n=!0,s=!0,i.isProcessing||t(d)};return{schedule:Rt.reduce((g,v)=>{const x=o[v];return g[v]=(b,S=!1,D=!1)=>(n||p(),x.schedule(b,S,D)),g},{}),cancel:g=>{for(let v=0;v<Rt.length;v++)o[Rt[v]].cancel(g)},state:i,steps:o}}const{schedule:w,cancel:q,state:M,steps:Zt}=Ss(typeof requestAnimationFrame<"u"?requestAnimationFrame:L,!0),As=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,go=1e-7,yo=12;function vo(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=As(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>go&&++a<yo);return o}function Dt(t,e,n,s){if(t===e&&n===s)return L;const i=r=>vo(r,0,1,t,n);return r=>r===0||r===1?r:As(i(r),e,s)}const ws=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Vs=t=>e=>1-t(1-e),Cs=Dt(.33,1.53,.69,.99),Ee=Vs(Cs),Ds=ws(Ee),Ms=t=>(t*=2)<1?.5*Ee(t):.5*(2-Math.pow(2,-10*(t-1))),Le=t=>1-Math.sin(Math.acos(t)),Rs=Vs(Le),Es=ws(Le),Ls=t=>/^0[^.\s]+$/u.test(t);function xo(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ls(t):!0}let fe=L;const Fs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),ks=t=>e=>typeof e=="string"&&e.startsWith(t),Bs=ks("--"),Po=ks("var(--"),Fe=t=>Po(t)?To.test(t.split("/*")[0].trim()):!1,To=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,bo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function So(t){const e=bo.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function js(t,e,n=1){const[s,i]=So(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Fs(o)?parseFloat(o):o}return Fe(i)?js(i,e,n+1):i}const Z=(t,e,n)=>n>e?e:n<t?t:n,mt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},At={...mt,transform:t=>Z(0,1,t)},Et={...mt,default:1},Mt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Y=Mt("deg"),_=Mt("%"),P=Mt("px"),Ao=Mt("vh"),wo=Mt("vw"),ln={..._,parse:t=>_.parse(t)/100,transform:t=>_.transform(t*100)},Vo=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),un=t=>t===mt||t===P,cn=(t,e)=>parseFloat(t.split(", ")[e]),hn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return cn(i[1],e);{const r=s.match(/^matrix\((.+)\)$/u);return r?cn(r[1],t):0}},Co=new Set(["x","y","z"]),Do=Ct.filter(t=>!Co.has(t));function Mo(t){const e=[];return Do.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:hn(4,13),y:hn(5,14)};ft.translateX=ft.x;ft.translateY=ft.y;const Os=t=>e=>e.test(t),Ro={test:t=>t==="auto",parse:t=>t},Is=[mt,P,_,Y,wo,Ao,Ro],fn=t=>Is.find(Os(t)),ot=new Set;let de=!1,pe=!1;function Ns(){if(pe){const t=Array.from(ot).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Mo(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(([r,o])=>{var a;(a=s.getValue(r))===null||a===void 0||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}pe=!1,de=!1,ot.forEach(t=>t.complete()),ot.clear()}function Us(){ot.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(pe=!0)})}function Eo(){Us(),Ns()}class ke{constructor(e,n,s,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ot.add(this),de||(de=!0,w.read(Us),w.resolveKeyframes(Ns))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let r=0;r<e.length;r++)if(e[r]===null)if(r===0){const o=i==null?void 0:i.get(),a=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&o===void 0&&i.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ot.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ot.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const xt=t=>Math.round(t*1e5)/1e5,Be=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Lo(t){return t==null}const Fo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,je=(t,e)=>n=>!!(typeof n=="string"&&Fo.test(n)&&n.startsWith(t)||e&&!Lo(n)&&Object.prototype.hasOwnProperty.call(n,e)),_s=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(Be);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ko=t=>Z(0,255,t),Jt={...mt,transform:t=>Math.round(ko(t))},it={test:je("rgb","red"),parse:_s("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Jt.transform(t)+", "+Jt.transform(e)+", "+Jt.transform(n)+", "+xt(At.transform(s))+")"};function Bo(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 me={test:je("#"),parse:Bo,transform:it.transform},at={test:je("hsl","hue"),parse:_s("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+_.transform(xt(e))+", "+_.transform(xt(n))+", "+xt(At.transform(s))+")"},R={test:t=>it.test(t)||me.test(t)||at.test(t),parse:t=>it.test(t)?it.parse(t):at.test(t)?at.parse(t):me.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?it.transform(t):at.transform(t)},jo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Oo(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Be))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(jo))===null||n===void 0?void 0:n.length)||0)>0}const Ks="number",Ws="color",Io="var",No="var(",dn="${}",Uo=/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 r=0;const a=e.replace(Uo,l=>(R.test(l)?(s.color.push(r),i.push(Ws),n.push(R.parse(l))):l.startsWith(No)?(s.var.push(r),i.push(Io),n.push(l)):(s.number.push(r),i.push(Ks),n.push(parseFloat(l))),++r,dn)).split(dn);return{values:n,split:a,indexes:s,types:i}}function $s(t){return wt(t).values}function Gs(t){const{split:e,types:n}=wt(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===Ks?r+=xt(i[o]):a===Ws?r+=R.transform(i[o]):r+=i[o]}return r}}const _o=t=>typeof t=="number"?0:t;function Ko(t){const e=$s(t);return Gs(t)(e.map(_o))}const J={test:Oo,parse:$s,createTransformer:Gs,getAnimatableNone:Ko},Wo=new Set(["brightness","contrast","saturate","opacity"]);function $o(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Be)||[];if(!s)return t;const i=n.replace(s,"");let r=Wo.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Go=/\b([a-z-]*)\(.*?\)/gu,ge={...J,getAnimatableNone:t=>{const e=t.match(Go);return e?e.map($o).join(" "):t}},zo={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,radius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,backgroundPositionX:P,backgroundPositionY:P},Ho={rotate:Y,rotateX:Y,rotateY:Y,rotateZ:Y,scale:Et,scaleX:Et,scaleY:Et,scaleZ:Et,skew:Y,skewX:Y,skewY:Y,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:At,originX:ln,originY:ln,originZ:P},pn={...mt,transform:Math.round},Oe={...zo,...Ho,zIndex:pn,size:P,fillOpacity:At,strokeOpacity:At,numOctaves:pn},Xo={...Oe,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:ge,WebkitFilter:ge},Ie=t=>Xo[t];function zs(t,e){let n=Ie(t);return n!==ge&&(n=J),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Yo=new Set(["auto","none","0"]);function qo(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Yo.has(r)&&wt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=zs(n,i)}class Hs extends ke{constructor(e,n,s,i,r){super(e,n,s,i,r,!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(),Fe(u))){const c=js(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Vo.has(s)||e.length!==2)return;const[i,r]=e,o=fn(i),a=fn(r);if(o!==a)if(un(o)&&un(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)xo(e[i])&&s.push(i);s.length&&qo(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 e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const r=n.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=ft[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Ne(t){return typeof t=="function"}let Ft;function Zo(){Ft=void 0}const K={now:()=>(Ft===void 0&&K.set(M.isProcessing||ho.useManualTiming?M.timestamp:performance.now()),Ft),set:t=>{Ft=t,queueMicrotask(Zo)}},mn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(J.test(t)||t==="0")&&!t.startsWith("url("));function Jo(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 Qo(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=mn(i,e),a=mn(r,e);return!o||!a?!1:Jo(t)||(n==="spring"||Ne(n))&&s}const tr=40;class Xs{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=K.now(),this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>tr?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Eo(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=K.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:r,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!Qo(e,s,i,r))if(o)this.options.duration=0;else{l==null||l($t(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const c=this.initPlayback(e,n);c!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function Ys(t,e){return e?t*(1e3/e):0}const er=5;function qs(t,e,n){const s=Math.max(e-er,0);return Ys(n-t(s),e-s)}const Qt=.001,nr=.01,sr=10,ir=.05,or=1;function rr({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,r,o=1-e;o=Z(ir,or,o),t=Z(nr,sr,z(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=ye(u,o),p=Math.exp(-h);return Qt-f/d*p},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,p=Math.exp(-h),m=ye(Math.pow(u,2),o);return(-i(u)+Qt>0?-1:1)*((f-d)*p)/m}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-Qt+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=lr(i,r,a);if(t=G(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const ar=12;function lr(t,e,n){let s=n;for(let i=1;i<ar;i++)s=s-t(s)/e(s);return s}function ye(t,e){return t*Math.sqrt(1-e*e)}const ur=["duration","bounce"],cr=["stiffness","damping","mass"];function gn(t,e){return e.some(n=>t[n]!==void 0)}function hr(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!gn(t,cr)&&gn(t,ur)){const n=rr(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function Zs({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],r=t[t.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:f}=hr({...s,velocity:-z(s.velocity||0)}),d=h||0,p=l/(2*Math.sqrt(a*u)),m=r-i,y=z(Math.sqrt(a/u)),g=Math.abs(m)<5;n||(n=g?.01:2),e||(e=g?.005:.5);let v;if(p<1){const x=ye(y,p);v=b=>{const S=Math.exp(-p*y*b);return r-S*((d+p*y*m)/x*Math.sin(x*b)+m*Math.cos(x*b))}}else if(p===1)v=x=>r-Math.exp(-y*x)*(m+(d+y*m)*x);else{const x=y*Math.sqrt(p*p-1);v=b=>{const S=Math.exp(-p*y*b),D=Math.min(x*b,300);return r-S*((d+p*y*m)*Math.sinh(D)+x*m*Math.cosh(D))/x}}return{calculatedDuration:f&&c||null,next:x=>{const b=v(x);if(f)o.done=x>=c;else{let S=0;p<1&&(S=x===0?G(d):qs(v,x,b));const D=Math.abs(S)<=n,N=Math.abs(r-b)<=e;o.done=D&&N}return o.value=o.done?r:b,o}}}function yn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*e;const y=h+m,g=o===void 0?y:o(y);g!==y&&(m=g-h);const v=A=>-m*Math.exp(-A/s),x=A=>g+v(A),b=A=>{const B=v(A),j=x(A);f.done=Math.abs(B)<=u,f.value=f.done?g:j};let S,D;const N=A=>{d(f.value)&&(S=A,D=Zs({keyframes:[f.value,p(f.value)],velocity:qs(x,A,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return N(0),{calculatedDuration:null,next:A=>{let B=!1;return!D&&S===void 0&&(B=!0,b(A),N(A)),S!==void 0&&A>=S?D.next(A-S):(!B&&b(A),f)}}}const fr=Dt(.42,0,1,1),dr=Dt(0,0,.58,1),Js=Dt(.42,0,.58,1),pr=t=>Array.isArray(t)&&typeof t[0]!="number",vn={linear:L,easeIn:fr,easeInOut:Js,easeOut:dr,circIn:Le,circInOut:Es,circOut:Rs,backIn:Ee,backInOut:Ds,backOut:Cs,anticipate:Ms},xn=t=>{if(Array.isArray(t)){fe(t.length===4);const[e,n,s,i]=t;return Dt(e,n,s,i)}else if(typeof t=="string")return fe(vn[t]!==void 0),vn[t];return t},mr=(t,e)=>n=>e(t(n)),H=(...t)=>t.reduce(mr),dt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},V=(t,e,n)=>t+(e-t)*n;function te(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 gr({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=te(l,a,t+1/3),r=te(l,a,t),o=te(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function jt(t,e){return n=>n>0?e:t}const ee=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},yr=[me,it,at],vr=t=>yr.find(e=>e.test(t));function Pn(t){const e=vr(t);if(!e)return!1;let n=e.parse(t);return e===at&&(n=gr(n)),n}const Tn=(t,e)=>{const n=Pn(t),s=Pn(e);if(!n||!s)return jt(t,e);const i={...n};return r=>(i.red=ee(n.red,s.red,r),i.green=ee(n.green,s.green,r),i.blue=ee(n.blue,s.blue,r),i.alpha=V(n.alpha,s.alpha,r),it.transform(i))},ve=new Set(["none","hidden"]);function xr(t,e){return ve.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Pr(t,e){return n=>V(t,e,n)}function Ue(t){return typeof t=="number"?Pr:typeof t=="string"?Fe(t)?jt:R.test(t)?Tn:Sr:Array.isArray(t)?Qs:typeof t=="object"?R.test(t)?Tn:Tr:jt}function Qs(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>Ue(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Tr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Ue(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function br(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[r]=l,i[o]++}return s}const Sr=(t,e)=>{const n=J.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?ve.has(t)&&!i.values.length||ve.has(e)&&!s.values.length?xr(t,e):H(Qs(br(s,i),i.values),n):jt(t,e)};function ti(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?V(t,e,n):Ue(t)(t,e)}function Ar(t,e,n){const s=[],i=n||ti,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||L:e;a=H(l,a)}s.push(a)}return s}function wr(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(fe(r===e.length),r===1)return()=>e[0];if(r===2&&t[0]===t[1])return()=>e[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=Ar(e,s,i),a=o.length,l=u=>{let c=0;if(a>1)for(;c<t.length-2&&!(u<t[c+1]);c++);const h=dt(t[c],t[c+1],u);return o[c](h)};return n?u=>l(Z(t[0],t[r-1],u)):l}function Vr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=dt(0,e,s);t.push(V(n,1,i))}}function Cr(t){const e=[0];return Vr(e,t.length-1),e}function Dr(t,e){return t.map(n=>n*e)}function Mr(t,e){return t.map(()=>e||Js).splice(0,t.length-1)}function Ot({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=pr(s)?s.map(xn):xn(s),r={done:!1,value:e[0]},o=Dr(n&&n.length===e.length?n:Cr(e),t),a=wr(o,e,{ease:Array.isArray(i)?i:Mr(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const bn=2e4;function Rr(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<bn;)e+=n,s=t.next(e);return e>=bn?1/0:e}const Er=t=>{const e=({timestamp:n})=>t(n);return{start:()=>w.update(e,!0),stop:()=>q(e),now:()=>M.isProcessing?M.timestamp:K.now()}},Lr={decay:yn,inertia:yn,tween:Ot,keyframes:Ot,spring:Zs},Fr=t=>t/100;class _e extends Xs{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:s,element:i,keyframes:r}=this.options,o=(i==null?void 0:i.KeyframeResolver)||ke,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(r,a,n,s,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,a=Ne(n)?n:Lr[n]||Ot;let l,u;a!==Ot&&typeof e[0]!="number"&&(l=H(Fr,ti(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});r==="mirror"&&(u=a({...this.options,keyframes:[...e].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Rr(c));const{calculatedDuration:h}=c,f=h+i,d=f*(s+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:h}=s;if(this.startTime===null)return r.next(0);const{delay:f,repeat:d,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-f*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let x=this.currentTime,b=r;if(d){const A=Math.min(this.currentTime,c)/h;let B=Math.floor(A),j=A%1;!j&&A>=1&&(j=1),j===1&&B--,B=Math.min(B,d+1),!!(B%2)&&(p==="reverse"?(j=1-j,m&&(j-=m/h)):p==="mirror"&&(b=o)),x=Z(0,1,j)*h}const S=v?{done:!1,value:l[0]}:b.next(x);a&&(S.value=a(S.value));let{done:D}=S;!v&&u!==null&&(D=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return N&&i!==void 0&&(S.value=$t(l,this.options,i)),y&&y(S.value),N&&this.finish(),S}get duration(){const{resolved:e}=this;return e?z(e.calculatedDuration):0}get time(){return z(this.currentTime)}set time(e){e=G(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=z(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Er,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const ei=new Set(["opacity","clipPath","filter","transform"]),ni=t=>Array.isArray(t)&&typeof t[0]=="number",kr=10,Br=(t,e)=>{let n="";const s=Math.max(Math.round(e/kr),2);for(let i=0;i<s;i++)n+=t(dt(0,s-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`};function Ke(t){let e;return()=>(e===void 0&&(e=t()),e)}const jr={linearEasing:void 0};function Or(t,e){const n=Ke(t);return()=>{var s;return(s=jr[e])!==null&&s!==void 0?s:n()}}const It=Or(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function si(t){return!!(typeof t=="function"&&It()||!t||typeof t=="string"&&(t in xe||It())||ni(t)||Array.isArray(t)&&t.every(si))}const yt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,xe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yt([0,.65,.55,1]),circOut:yt([.55,0,1,.45]),backIn:yt([.31,.01,.66,-.59]),backOut:yt([.33,1.53,.69,.99])};function ii(t,e){if(t)return typeof t=="function"&&It()?Br(t,e):ni(t)?yt(t):Array.isArray(t)?t.map(n=>ii(n,e)||xe.easeOut):xe[t]}function Ir(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=ii(a,i);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"})}function Sn(t,e){t.timeline=e,t.onfinish=null}const Nr=Ke(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Nt=10,Ur=2e4;function _r(t){return Ne(t.type)||t.type==="spring"||!si(t.ease)}function Kr(t,e){const n=new _e({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<Ur;)s=n.sample(r),i.push(s.value),r+=Nt;return{times:void 0,keyframes:i,duration:r-Nt,ease:"linear"}}const oi={anticipate:Ms,backInOut:Ds,circInOut:Es};function Wr(t){return t in oi}class An extends Xs{constructor(e){super(e);const{name:n,motionValue:s,element:i,keyframes:r}=this.options;this.resolver=new Hs(r,(o,a)=>this.onKeyframesResolved(o,a),n,s,i),this.resolver.scheduleResolve()}initPlayback(e,n){var s;let{duration:i=300,times:r,ease:o,type:a,motionValue:l,name:u,startTime:c}=this.options;if(!(!((s=l.owner)===null||s===void 0)&&s.current))return!1;if(typeof o=="string"&&It()&&Wr(o)&&(o=oi[o]),_r(this.options)){const{onComplete:f,onUpdate:d,motionValue:p,element:m,...y}=this.options,g=Kr(e,y);e=g.keyframes,e.length===1&&(e[1]=e[0]),i=g.duration,r=g.times,o=g.ease,a="keyframes"}const h=Ir(l.owner.current,u,e,{...this.options,duration:i,times:r,ease:o});return h.startTime=c??this.calcStartTime(),this.pendingTimeline?(Sn(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:f}=this.options;l.set($t(e,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:i,times:r,type:a,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return z(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return z(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=G(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return L;const{animation:s}=n;Sn(s,e)}return L}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:r,ease:o,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:h,element:f,...d}=this.options,p=new _e({...d,keyframes:s,duration:i,type:r,ease:o,times:a,isGenerator:!0}),m=G(this.time);u.setWithVelocity(p.sample(m-Nt).value,p.sample(m).value,Nt)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:r,damping:o,type:a}=e;return Nr()&&s&&ei.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}}const $r=Ke(()=>window.ScrollTimeline!==void 0);class Gr{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e,n){const s=this.animations.map(i=>$r()&&i.attachTimeline?i.attachTimeline(e):n(i));return()=>{s.forEach((i,r)=>{i&&i(),this.animations[r].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function zr({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const We=(t,e,n,s={},i,r)=>o=>{const a=Re(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-G(l);let 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:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};zr(a)||(c={...c,...co(t,c)}),c.duration&&(c.duration=G(c.duration)),c.repeatDelay&&(c.repeatDelay=G(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(h=!0)),h&&!r&&e.get()!==void 0){const f=$t(c.keyframes,a);if(f!==void 0)return w.update(()=>{c.onUpdate(f),c.onComplete()}),new Gr([])}return!r&&An.supports(c)?new An(c):new _e(c)},Hr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Xr=t=>he(t)?t[t.length-1]||0:t;function $e(t,e){t.indexOf(e)===-1&&t.push(e)}function Ge(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class ze{constructor(){this.subscriptions=[]}add(e){return $e(this.subscriptions,e),()=>Ge(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 r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const wn=30,Yr=t=>!isNaN(parseFloat(t));class qr{constructor(e,n={}){this.version="11.11.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const r=K.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=K.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Yr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new ze);const s=this.events[e].add(n);return e==="change"?()=>{s(),w.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()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=K.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>wn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,wn);return Ys(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vt(t,e){return new qr(t,e)}function Zr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vt(n))}function Jr(t,e){const n=Wt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Xr(r[o]);Zr(t,o,a)}}const Gt=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Qr="framerAppearId",ri="data-"+Gt(Qr);function ai(t){return t.props[ri]}const E=t=>!!(t&&t.getVelocity);function ta(t){return!!(E(t)&&t.add)}function li(t){if(Q.has(t))return"transform";if(ei.has(t))return Gt(t)}function Pe(t,e){var n;if(!t.applyWillChange)return;const s=t.getValue("willChange");if(ta(s))return s.add(e);!(!((n=t.props.style)===null||n===void 0)&&n.willChange)&&li(e)&&t.setStaticValue("willChange","transform")}function ea({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function ui(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const h in l){const f=t.getValue(h,(r=t.latestValues[h])!==null&&r!==void 0?r:null),d=l[h];if(d===void 0||c&&ea(c,h))continue;const p={delay:n,...Re(o||{},h)};let m=!1;if(window.MotionHandoffAnimation){const g=ai(t);if(g){const v=window.MotionHandoffAnimation(g,h,w);v!==null&&(p.startTime=v,m=!0)}}Pe(t,h),f.start(We(h,f,d,t.shouldReduceMotion&&Q.has(h)?{type:!1}:p,t,m));const y=f.animation;y&&u.push(y)}return a&&Promise.all(u).then(()=>{w.update(()=>{a&&Jr(t,a)})}),u}function Te(t,e,n={}){var s;const i=Wt(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(ui(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=r;return na(t,e,c+u,h,f,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function na(t,e,n=0,s=0,i=1,r){const o=[],a=(t.variantChildren.size-1)*s,l=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(sa).forEach((u,c)=>{u.notify("AnimationStart",e),o.push(Te(u,e,{...r,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(o)}function sa(t,e){return t.sortNodePosition(e)}function ia(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Te(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Te(t,e,n);else{const i=typeof e=="function"?Wt(t,e,n.custom):e;s=Promise.all(ui(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const oa=Me.length;function ci(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?ci(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<oa;n++){const s=Me[n],i=t.props[s];(St(i)||i===!1)&&(e[s]=i)}return e}const ra=[...De].reverse(),aa=De.length;function la(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ia(t,n,s)))}function ua(t){let e=la(t),n=Vn(),s=!0;const i=l=>(u,c)=>{var h;const f=Wt(t,c,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:p,...m}=f;u={...u,...m,...p}}return u};function r(l){e=l(t)}function o(l){const{props:u}=t,c=ci(t.parent)||{},h=[],f=new Set;let d={},p=1/0;for(let y=0;y<aa;y++){const g=ra[y],v=n[g],x=u[g]!==void 0?u[g]:c[g],b=St(x),S=g===l?v.isActive:null;S===!1&&(p=y);let D=x===c[g]&&x!==u[g]&&b;if(D&&s&&t.manuallyAnimateOnMount&&(D=!1),v.protectedKeys={...d},!v.isActive&&S===null||!x&&!v.prevProp||bt(x)||typeof x=="boolean")continue;const N=ca(v.prevProp,x);let A=N||g===l&&v.isActive&&!D&&b||y>p&&b,B=!1;const j=Array.isArray(x)?x:[x];let rt=j.reduce(i(g),{});S===!1&&(rt={});const{prevResolvedValues:sn={}}=v,Qi={...sn,...rt},on=F=>{A=!0,f.has(F)&&(B=!0,f.delete(F)),v.needsAnimating[F]=!0;const W=t.getValue(F);W&&(W.liveStyle=!1)};for(const F in Qi){const W=rt[F],Yt=sn[F];if(d.hasOwnProperty(F))continue;let qt=!1;he(W)&&he(Yt)?qt=!bs(W,Yt):qt=W!==Yt,qt?W!=null?on(F):f.add(F):W!==void 0&&f.has(F)?on(F):v.protectedKeys[F]=!0}v.prevProp=x,v.prevResolvedValues=rt,v.isActive&&(d={...d,...rt}),s&&t.blockInitialAnimation&&(A=!1),A&&(!(D&&N)||B)&&h.push(...j.map(F=>({animation:F,options:{type:g}})))}if(f.size){const y={};f.forEach(g=>{const v=t.getBaseTarget(g),x=t.getValue(g);x&&(x.liveStyle=!0),y[g]=v??null}),h.push({animation:y})}let m=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(h):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=t.variantChildren)===null||c===void 0||c.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,u)}),n[l].isActive=u;const h=o(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=Vn(),s=!0}}}function ca(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!bs(e,t):!1}function et(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Vn(){return{animate:et(!0),whileInView:et(),whileHover:et(),whileTap:et(),whileDrag:et(),whileFocus:et(),exit:et()}}class tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class ha extends tt{constructor(e){super(e),e.animationState||(e.animationState=ua(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();bt(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===void 0||e.call(this)}}let fa=0;class da extends tt{constructor(){super(...arguments),this.id=fa++}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}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const pa={animation:{Feature:ha},exit:{Feature:da}},hi=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function zt(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const ma=t=>e=>hi(e)&&t(e,zt(e));function $(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function X(t,e,n,s){return $(t,e,ma(n),s)}const Cn=(t,e)=>Math.abs(t-e);function ga(t,e){const n=Cn(t.x,e.x),s=Cn(t.y,e.y);return Math.sqrt(n**2+s**2)}class fi{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=se(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=ga(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:p}=h,{timestamp:m}=M;this.history.push({...p,timestamp:m});const{onStart:y,onMove:g}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ne(f,this.transformPagePoint),w.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=se(h.type==="pointercancel"?this.lastMoveEventInfo:ne(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),p&&p(h,y)},!hi(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=zt(e),a=ne(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=M;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(e,se(a,this.history)),this.removeListeners=H(X(this.contextWindow,"pointermove",this.handlePointerMove),X(this.contextWindow,"pointerup",this.handlePointerUp),X(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),q(this.updatePoint)}}function ne(t,e){return e?{point:e(t.point)}:t}function Dn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function se({point:t},e){return{point:t,delta:Dn(t,di(e)),offset:Dn(t,ya(e)),velocity:va(e,.1)}}function ya(t){return t[0]}function di(t){return t[t.length-1]}function va(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=di(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>G(e)));)n--;if(!s)return{x:0,y:0};const r=z(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function pi(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Mn=pi("dragHorizontal"),Rn=pi("dragVertical");function mi(t){let e=!1;if(t==="y")e=Rn();else if(t==="x")e=Mn();else{const n=Mn(),s=Rn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function gi(){const t=mi(!0);return t?(t(),!1):!0}function lt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const yi=1e-4,xa=1-yi,Pa=1+yi,vi=.01,Ta=0-vi,ba=0+vi;function k(t){return t.max-t.min}function Sa(t,e,n){return Math.abs(t-e)<=n}function En(t,e,n,s=.5){t.origin=s,t.originPoint=V(e.min,e.max,t.origin),t.scale=k(n)/k(e),t.translate=V(n.min,n.max,t.origin)-t.originPoint,(t.scale>=xa&&t.scale<=Pa||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ta&&t.translate<=ba||isNaN(t.translate))&&(t.translate=0)}function Pt(t,e,n,s){En(t.x,e.x,n.x,s?s.originX:void 0),En(t.y,e.y,n.y,s?s.originY:void 0)}function Ln(t,e,n){t.min=n.min+e.min,t.max=t.min+k(e)}function Aa(t,e,n){Ln(t.x,e.x,n.x),Ln(t.y,e.y,n.y)}function Fn(t,e,n){t.min=e.min-n.min,t.max=t.min+k(e)}function Tt(t,e,n){Fn(t.x,e.x,n.x),Fn(t.y,e.y,n.y)}function wa(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?V(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?V(n,t,s.max):Math.min(t,n)),t}function kn(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 Va(t,{top:e,left:n,bottom:s,right:i}){return{x:kn(t.x,n,i),y:kn(t.y,e,s)}}function Bn(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 Ca(t,e){return{x:Bn(t.x,e.x),y:Bn(t.y,e.y)}}function Da(t,e){let n=.5;const s=k(t),i=k(e);return i>s?n=dt(e.min,e.max-s,t.min):s>i&&(n=dt(t.min,t.max-i,e.min)),Z(0,1,n)}function Ma(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 be=.35;function Ra(t=be){return t===!1?t=0:t===!0&&(t=be),{x:jn(t,"left","right"),y:jn(t,"top","bottom")}}function jn(t,e,n){return{min:On(t,e),max:On(t,n)}}function On(t,e){return typeof t=="number"?t:t[e]||0}const In=()=>({translate:0,scale:1,origin:0,originPoint:0}),ut=()=>({x:In(),y:In()}),Nn=()=>({min:0,max:0}),C=()=>({x:Nn(),y:Nn()});function I(t){return[t("x"),t("y")]}function xi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Ea({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function La(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 ie(t){return t===void 0||t===1}function Se({scale:t,scaleX:e,scaleY:n}){return!ie(t)||!ie(e)||!ie(n)}function nt(t){return Se(t)||Pi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Pi(t){return Un(t.x)||Un(t.y)}function Un(t){return t&&t!=="0%"}function Ut(t,e,n){const s=t-n,i=e*s;return n+i}function _n(t,e,n,s,i){return i!==void 0&&(t=Ut(t,i,s)),Ut(t,n,s)+e}function Ae(t,e=0,n=1,s,i){t.min=_n(t.min,e,n,s,i),t.max=_n(t.max,e,n,s,i)}function Ti(t,{x:e,y:n}){Ae(t.x,e.translate,e.scale,e.originPoint),Ae(t.y,n.translate,n.scale,n.originPoint)}const Kn=.999999999999,Wn=1.0000000000001;function Fa(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&ht(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Ti(t,o)),s&&nt(r.latestValues)&&ht(t,r.latestValues))}e.x<Wn&&e.x>Kn&&(e.x=1),e.y<Wn&&e.y>Kn&&(e.y=1)}function ct(t,e){t.min=t.min+e,t.max=t.max+e}function $n(t,e,n,s,i=.5){const r=V(t.min,t.max,i);Ae(t,e,n,r,s)}function ht(t,e){$n(t.x,e.x,e.scaleX,e.scale,e.originX),$n(t.y,e.y,e.scaleY,e.scale,e.originY)}function bi(t,e){return xi(La(t.getBoundingClientRect(),e))}function ka(t,e,n){const s=bi(t,n),{scroll:i}=e;return i&&(ct(s.x,i.offset.x),ct(s.y,i.offset.y)),s}const Si=({current:t})=>t?t.ownerDocument.defaultView:null,Ba=new WeakMap;class ja{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=C(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(zt(c,"page").point)},r=(c,h)=>{const{drag:f,dragPropagation:d,onDragStart:p}=this.getProps();if(f&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=mi(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),I(y=>{let g=this.getAxisMotionValue(y).get()||0;if(_.test(g)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[y];x&&(g=k(x)*(parseFloat(g)/100))}}this.originPoint[y]=g}),p&&w.postRender(()=>p(c,h)),Pe(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(c,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:y}=h;if(d&&this.currentDirection===null){this.currentDirection=Oa(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),m&&m(c,h)},a=(c,h)=>this.stop(c,h),l=()=>I(c=>{var h;return this.getAnimationState(c)==="paused"&&((h=this.getAxisMotionValue(c).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new fi(e,{onSessionStart:i,onStart:r,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Si(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&w.postRender(()=>r(e,n))}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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Lt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=wa(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,r=this.constraints;n&<(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Va(i.layoutBox,n):this.constraints=!1,this.elastic=Ra(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&I(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Ma(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!lt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=ka(s,i.root,this.visualElement.getTransformPagePoint());let o=Ca(i.layout.layoutBox,r);if(n){const a=n(Ea(o));this.hasMutatedConstraints=!!a,a&&(o=xi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=I(c=>{if(!Lt(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Pe(this.visualElement,e),s.start(We(e,s,0,n,this.visualElement,!1))}stopAnimation(){I(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){I(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?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){I(n=>{const{drag:s}=this.getProps();if(!Lt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-V(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!lt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};I(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Da({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),I(o=>{if(!Lt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(V(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;Ba.set(this.visualElement,this);const e=this.visualElement.current,n=X(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();lt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),w.read(s);const o=$(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(I(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=be,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Lt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Oa(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Ia extends tt{constructor(e){super(e),this.removeGroupControls=L,this.removeListeners=L,this.controls=new ja(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||L}unmount(){this.removeGroupControls(),this.removeListeners()}}const Gn=t=>(e,n)=>{t&&w.postRender(()=>t(e,n))};class Na extends tt{constructor(){super(...arguments),this.removePointerDownListener=L}onPointerDown(e){this.session=new fi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Si(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Gn(e),onStart:Gn(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&w.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=X(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 He=T.createContext(null);function Ua(){const t=T.useContext(He);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=T.useId();T.useEffect(()=>s(i),[]);const r=T.useCallback(()=>n&&n(i),[i,n]);return!e&&n?[!1,r]:[!0]}const Ai=T.createContext({}),wi=T.createContext({}),kt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function zn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const gt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(P.test(t))t=parseFloat(t);else return t;const n=zn(t,e.target.x),s=zn(t,e.target.y);return`${n}% ${s}%`}},_a={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=J.parse(t);if(i.length>5)return s;const r=J.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=V(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},_t={};function Ka(t){Object.assign(_t,t)}const{schedule:Xe,cancel:Bu}=Ss(queueMicrotask,!1);class Wa extends T.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;Ka($a),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),kt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,o=s.projection;return o&&(o.isPresent=r,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||w.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Xe.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 Vi(t){const[e,n]=Ua(),s=T.useContext(Ai);return U.jsx(Wa,{...t,layoutGroup:s,switchLayoutGroup:T.useContext(wi),isPresent:e,safeToRemove:n})}const $a={borderRadius:{...gt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomLeftRadius:gt,borderBottomRightRadius:gt,boxShadow:_a},Ci=["TopLeft","TopRight","BottomLeft","BottomRight"],Ga=Ci.length,Hn=t=>typeof t=="string"?parseFloat(t):t,Xn=t=>typeof t=="number"||P.test(t);function za(t,e,n,s,i,r){i?(t.opacity=V(0,n.opacity!==void 0?n.opacity:1,Ha(s)),t.opacityExit=V(e.opacity!==void 0?e.opacity:1,0,Xa(s))):r&&(t.opacity=V(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;o<Ga;o++){const a=`border${Ci[o]}Radius`;let l=Yn(e,a),u=Yn(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Xn(l)===Xn(u)?(t[a]=Math.max(V(Hn(l),Hn(u),s),0),(_.test(u)||_.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=V(e.rotate||0,n.rotate||0,s))}function Yn(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Ha=Di(0,.5,Rs),Xa=Di(.5,.95,L);function Di(t,e,n){return s=>s<t?0:s>e?1:n(dt(t,e,s))}function qn(t,e){t.min=e.min,t.max=e.max}function O(t,e){qn(t.x,e.x),qn(t.y,e.y)}function Zn(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Jn(t,e,n,s,i){return t-=e,t=Ut(t,1/n,s),i!==void 0&&(t=Ut(t,1/i,s)),t}function Ya(t,e=0,n=1,s=.5,i,r=t,o=t){if(_.test(e)&&(e=parseFloat(e),e=V(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=V(r.min,r.max,s);t===r&&(a-=e),t.min=Jn(t.min,e,n,a,i),t.max=Jn(t.max,e,n,a,i)}function Qn(t,e,[n,s,i],r,o){Ya(t,e[n],e[s],e[i],e.scale,r,o)}const qa=["x","scaleX","originX"],Za=["y","scaleY","originY"];function ts(t,e,n,s){Qn(t.x,e,qa,n?n.x:void 0,s?s.x:void 0),Qn(t.y,e,Za,n?n.y:void 0,s?s.y:void 0)}function es(t){return t.translate===0&&t.scale===1}function Mi(t){return es(t.x)&&es(t.y)}function ns(t,e){return t.min===e.min&&t.max===e.max}function Ja(t,e){return ns(t.x,e.x)&&ns(t.y,e.y)}function ss(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ri(t,e){return ss(t.x,e.x)&&ss(t.y,e.y)}function is(t){return k(t.x)/k(t.y)}function os(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Qa{constructor(){this.members=[]}add(e){$e(this.members,e),e.scheduleRender()}remove(e){if(Ge(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 r=this.members[i];if(r.isPresent!==!1){s=r;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 tl(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}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:p}=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) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const el=(t,e)=>t.depth-e.depth;class nl{constructor(){this.children=[],this.isDirty=!1}add(e){$e(this.children,e),this.isDirty=!0}remove(e){Ge(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(el),this.isDirty=!1,this.children.forEach(e)}}function Bt(t){const e=E(t)?t.get():t;return Hr(e)?e.toValue():e}function sl(t,e){const n=K.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(q(s),t(r-e))};return w.read(s,!0),()=>q(s)}function il(t){return t instanceof SVGElement&&t.tagName!=="svg"}function ol(t,e,n){const s=E(t)?t:Vt(t);return s.start(We("",s,e,n)),s.animation}const st={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},vt=typeof window<"u"&&window.MotionDebug!==void 0,oe=["","X","Y","Z"],rl={visibility:"hidden"},rs=1e3;let al=0;function re(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Ei(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ai(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",w,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Ei(s)}function Li({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=al++,this.animationId=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,vt&&(st.totalNodes=st.resolvedTargetDeltas=st.recalculatedProjection=0),this.nodes.forEach(cl),this.nodes.forEach(ml),this.nodes.forEach(gl),this.nodes.forEach(hl),vt&&window.MotionDebug.record(st)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,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 nl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ze),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=il(o),this.instance=o;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=sl(f,250),kt.hasAnimatedSinceResize&&(kt.hasAnimatedSinceResize=!1,this.nodes.forEach(ls))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||Tl,{onLayoutAnimationStart:y,onLayoutAnimationComplete:g}=c.getProps(),v=!this.targetLayout||!Ri(this.targetLayout,p)||d,x=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,x);const b={...Re(m,"layout"),onPlay:y,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||ls(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,q(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(yl),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ei(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(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(as);return}this.isUpdating||this.nodes.forEach(dl),this.isUpdating=!1,this.nodes.forEach(pl),this.nodes.forEach(ll),this.nodes.forEach(ul),this.clearAllSnapshots();const a=K.now();M.delta=Z(0,1e3/60,a-M.timestamp),M.timestamp=a,M.isProcessing=!0,Zt.update.process(M),Zt.preRender.process(M),Zt.render.process(M),M.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Xe.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(fl),this.sharedNodes.forEach(vl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,w.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){w.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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 o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=C(),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,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Mi(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&(a||nt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),bl(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return C();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(Sl))){const{scroll:c}=this.root;c&&(ct(l.x,c.offset.x),ct(l.y,c.offset.y))}return l}removeElementScroll(o){var a;const l=C();if(O(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;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&&O(l,o),ct(l.x,h.offset.x),ct(l.y,h.offset.y))}return l}applyTransform(o,a=!1){const l=C();O(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ht(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),nt(c.latestValues)&&ht(l,c.latestValues)}return nt(this.latestValues)&&ht(l,this.latestValues),l}removeTransform(o){const a=C();O(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!nt(u.latestValues))continue;Se(u.latestValues)&&u.updateSnapshot();const c=C(),h=u.measurePageBox();O(c,h),ts(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return nt(this.latestValues)&&ts(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==M.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=M.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),Tt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),O(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=C(),this.targetWithTransforms=C()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Aa(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):O(this.target,this.layout.layoutBox),Ti(this.target,this.targetDelta)):O(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=C(),this.relativeTargetOrigin=C(),Tt(this.relativeTargetOrigin,this.target,d.target),O(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}vt&&st.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Se(this.parent.latestValues)||Pi(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 o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===M.timestamp&&(u=!1),u)return;const{layout:c,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||h))return;O(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;Fa(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=C());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Zn(this.prevProjectionDelta.x,this.projectionDelta.x),Zn(this.prevProjectionDelta.y,this.projectionDelta.y)),Pt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!os(this.projectionDelta.x,this.prevProjectionDelta.x)||!os(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),vt&&st.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ut(),this.projectionDelta=ut(),this.projectionDeltaWithTransform=ut()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=ut();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=C(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,y=this.getStack(),g=!y||y.members.length<=1,v=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(Pl));this.animationProgress=0;let x;this.mixTargetDelta=b=>{const S=b/1e3;us(h.x,o.x,S),us(h.y,o.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),xl(this.relativeTarget,this.relativeTargetOrigin,f,S),x&&Ja(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=C()),O(x,this.relativeTarget)),m&&(this.animationValues=c,za(c,u,this.latestValues,S,v,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(q(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=w.update(()=>{kt.hasAnimatedSinceResize=!0,this.currentAnimation=ol(0,rs,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(rs),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Fi(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||C();const h=k(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=k(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}O(a,l),ht(a,c),Pt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Qa),this.sharedNodes.get(o).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 o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&re("z",o,u,this.animationValues);for(let c=0;c<oe.length;c++)re(`rotate${oe[c]}`,o,u,this.animationValues),re(`skew${oe[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return rl;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Bt(o==null?void 0:o.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Bt(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(m.transform=c?c({},""):"none",this.hasProjected=!1),m}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=tl(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:d,y:p}=this.projectionDelta;u.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,h.animationValues?u.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in _t){if(f[m]===void 0)continue;const{correct:y,applyTo:g}=_t[m],v=u.transform==="none"?f[m]:y(f[m],h);if(g){const x=g.length;for(let b=0;b<x;b++)u[g[b]]=v}else u[m]=v}return this.options.layoutId&&(u.pointerEvents=h===this?Bt(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(as),this.root.sharedNodes.clear()}}}function ll(t){t.updateLayout()}function ul(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?I(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=k(f);f.min=s[h].min,f.max=f.min+d}):Fi(r,n.layoutBox,s)&&I(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=k(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=ut();Pt(a,s,n.layoutBox);const l=ut();o?Pt(l,t.applyTransform(i,!0),n.measuredBox):Pt(l,s,n.layoutBox);const u=!Mi(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 p=C();Tt(p,n.layoutBox,f.layoutBox);const m=C();Tt(m,s,d.layoutBox),Ri(p,m)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function cl(t){vt&&st.totalNodes++,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 hl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function fl(t){t.clearSnapshot()}function as(t){t.clearMeasurements()}function dl(t){t.isLayoutDirty=!1}function pl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ls(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ml(t){t.resolveTargetDelta()}function gl(t){t.calcProjection()}function yl(t){t.resetSkewAndRotation()}function vl(t){t.removeLeadSnapshot()}function us(t,e,n){t.translate=V(e.translate,0,n),t.scale=V(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function cs(t,e,n,s){t.min=V(e.min,n.min,s),t.max=V(e.max,n.max,s)}function xl(t,e,n,s){cs(t.x,e.x,n.x,s),cs(t.y,e.y,n.y,s)}function Pl(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Tl={duration:.45,ease:[.4,0,.1,1]},hs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),fs=hs("applewebkit/")&&!hs("chrome/")?Math.round:L;function ds(t){t.min=fs(t.min),t.max=fs(t.max)}function bl(t){ds(t.x),ds(t.y)}function Fi(t,e,n){return t==="position"||t==="preserve-aspect"&&!Sa(is(e),is(n),.2)}function Sl(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const Al=Li({attachResizeListener:(t,e)=>$(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ae={current:void 0},ki=Li({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ae.current){const t=new Al({});t.mount(window),t.setOptions({layoutScroll:!0}),ae.current=t}return ae.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),wl={pan:{Feature:Na},drag:{Feature:Ia,ProjectionNode:ki,MeasureLayout:Vi}};function ps(t,e){const n=e?"pointerenter":"pointerleave",s=e?"onHoverStart":"onHoverEnd",i=(r,o)=>{if(r.pointerType==="touch"||gi())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[s];l&&w.postRender(()=>l(r,o))};return X(t.current,n,i,{passive:!t.getProps()[s]})}class Vl extends tt{mount(){this.unmount=H(ps(this.node,!0),ps(this.node,!1))}unmount(){}}class Cl extends tt{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=H($(this.node.current,"focus",()=>this.onFocus()),$(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Bi=(t,e)=>e?t===e?!0:Bi(t,e.parentElement):!1;function le(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,zt(n))}class Dl extends tt{constructor(){super(...arguments),this.removeStartListeners=L,this.removeEndListeners=L,this.removeAccessibleListeners=L,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),r=X(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:h}=this.node.getProps(),f=!h&&!Bi(this.node.current,a.target)?c:u;f&&w.update(()=>f(a,l))},{passive:!(s.onTap||s.onPointerUp)}),o=X(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=H(r,o),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=r=>{if(r.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||le("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&w.postRender(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=$(this.node.current,"keyup",o),le("down",(a,l)=>{this.startPress(a,l)})},n=$(this.node.current,"keydown",e),s=()=>{this.isPressing&&le("cancel",(r,o)=>this.cancelPress(r,o))},i=$(this.node.current,"blur",s);this.removeAccessibleListeners=H(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&w.postRender(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!gi()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&w.postRender(()=>s(e,n))}mount(){const e=this.node.getProps(),n=X(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=$(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=H(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const we=new WeakMap,ue=new WeakMap,Ml=t=>{const e=we.get(t.target);e&&e(t)},Rl=t=>{t.forEach(Ml)};function El({root:t,...e}){const n=t||document;ue.has(n)||ue.set(n,{});const s=ue.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Rl,{root:t,...e})),s[i]}function Ll(t,e,n){const s=El(e);return we.set(t,n),s.observe(t),()=>{we.delete(t),s.unobserve(t)}}const Fl={some:0,all:1};class kl extends tt{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:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Fl[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!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 Ll(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Bl(e,n))&&this.startObserver()}unmount(){}}function Bl({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const jl={inView:{Feature:kl},tap:{Feature:Dl},focus:{Feature:Cl},hover:{Feature:Vl}},Ol={layout:{ProjectionNode:ki,MeasureLayout:Vi}},ji=T.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Ht=T.createContext({}),Ye=typeof window<"u",Il=Ye?T.useLayoutEffect:T.useEffect,Oi=T.createContext({strict:!1});function Nl(t,e,n,s,i){var r,o;const{visualElement:a}=T.useContext(Ht),l=T.useContext(Oi),u=T.useContext(He),c=T.useContext(ji).reducedMotion,h=T.useRef();s=s||l.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const f=h.current,d=T.useContext(wi);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&Ul(h.current,n,i,d),T.useInsertionEffect(()=>{f&&f.update(n,u)});const p=n[ri],m=T.useRef(!!p&&!(!((r=window.MotionHandoffIsComplete)===null||r===void 0)&&r.call(window,p))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,p)));return Il(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),Xe.render(f.render),m.current&&f.animationState&&f.animationState.animateChanges())}),T.useEffect(()=>{f&&(!m.current&&f.animationState&&f.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,p)}),m.current=!1))}),f}function Ul(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ii(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&<(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:u})}function Ii(t){if(t)return t.options.allowProjection!==!1?t.projection:Ii(t.parent)}function _l(t,e,n){return T.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):lt(n)&&(n.current=s))},[e])}function Xt(t){return bt(t.animate)||Me.some(e=>St(t[e]))}function Ni(t){return!!(Xt(t)||t.variants)}function Kl(t,e){if(Xt(t)){const{initial:n,animate:s}=t;return{initial:n===!1||St(n)?n:void 0,animate:St(s)?s:void 0}}return t.inherit!==!1?e:{}}function Wl(t){const{initial:e,animate:n}=Kl(t,T.useContext(Ht));return T.useMemo(()=>({initial:e,animate:n}),[ms(e),ms(n)])}function ms(t){return Array.isArray(t)?t.join(" "):t}const 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 $l(t){for(const e in t)pt[e]={...pt[e],...t[e]}}const Gl=Symbol.for("motionComponentSymbol");function zl({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&$l(t);function r(a,l){let u;const c={...T.useContext(ji),...a,layoutId:Hl(a)},{isStatic:h}=c,f=Wl(a),d=s(a,h);if(!h&&Ye){Xl();const p=Yl(c);u=p.MeasureLayout,f.visualElement=Nl(i,d,c,e,p.ProjectionNode)}return U.jsxs(Ht.Provider,{value:f,children:[u&&f.visualElement?U.jsx(u,{visualElement:f.visualElement,...c}):null,n(i,a,_l(d,f.visualElement,l),d,h,f.visualElement)]})}const o=T.forwardRef(r);return o[Gl]=i,o}function Hl({layoutId:t}){const e=T.useContext(Ai).id;return e&&t!==void 0?e+"-"+t:t}function Xl(t,e){T.useContext(Oi).strict}function Yl(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}}const ql=["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 qe(t){return typeof t!="string"||t.includes("-")?!1:!!(ql.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ui(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const r in n)t.style.setProperty(r,n[r])}const _i=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 Ki(t,e,n,s){Ui(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(_i.has(i)?i:Gt(i),e.attrs[i])}function Wi(t,{layout:e,layoutId:n}){return Q.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!_t[t]||t==="opacity")}function Ze(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(E(i[o])||e.style&&E(e.style[o])||Wi(o,t)||((s=n==null?void 0:n.getValue(o))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),r}function $i(t,e,n){const s=Ze(t,e,n);for(const i in t)if(E(t[i])||E(e[i])){const r=Ct.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}function Zl(t){const e=T.useRef(null);return e.current===null&&(e.current=t()),e.current}function Jl({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:s},i,r,o,a){const l={latestValues:Ql(i,r,o,a?!1:t,e),renderState:n()};return s&&(l.mount=u=>s(i,u,l)),l}const Gi=t=>(e,n)=>{const s=T.useContext(Ht),i=T.useContext(He),r=()=>Jl(t,e,s,i,n);return n?r():Zl(r)};function ys(t,e,n){const s=Array.isArray(e)?e:[e];for(let i=0;i<s.length;i++){const r=Ce(t,s[i]);if(r){const{transitionEnd:o,transition:a,...l}=r;n(l,o)}}}function Ql(t,e,n,s,i){var r;const o={};let a=s&&((r=t.style)===null||r===void 0?void 0:r.willChange)===void 0;const l=i(t,{});for(const m in l)o[m]=Bt(l[m]);let{initial:u,animate:c}=t;const h=Xt(t),f=Ni(t);e&&f&&!h&&t.inherit!==!1&&(u===void 0&&(u=e.initial),c===void 0&&(c=e.animate));let d=n?n.initial===!1:!1;d=d||u===!1;const p=d?c:u;return p&&typeof p!="boolean"&&!bt(p)&&ys(t,p,(m,y)=>{for(const g in m){let v=m[g];if(Array.isArray(v)){const x=d?v.length-1:0;v=v[x]}v!==null&&(o[g]=v)}for(const g in y)o[g]=y[g]}),a&&c&&u!==!1&&!bt(c)&&ys(t,c,m=>{for(const y in m)if(li(y)){o.willChange="transform";return}}),o}const Je=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),zi=()=>({...Je(),attrs:{}}),Hi=(t,e)=>e&&typeof t=="number"?e.transform(t):t,tu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eu=Ct.length;function nu(t,e,n){let s="",i=!0;for(let r=0;r<eu;r++){const o=Ct[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=Hi(a,Oe[o]);if(!l){i=!1;const c=tu[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Qe(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(Q.has(l)){o=!0;continue}else if(Bs(l)){i[l]=u;continue}else{const c=Hi(u,Oe[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=nu(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}function vs(t,e,n){return typeof t=="string"?t:P.transform(e+n*t)}function su(t,e,n){const s=vs(e,t.x,t.width),i=vs(n,t.y,t.height);return`${s} ${i}`}const iu={offset:"stroke-dashoffset",array:"stroke-dasharray"},ou={offset:"strokeDashoffset",array:"strokeDasharray"};function ru(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?iu:ou;t[r.offset]=P.transform(-s);const o=P.transform(e),a=P.transform(n);t[r.array]=`${o} ${a}`}function tn(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Qe(t,u,h),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d,dimensions:p}=t;f.transform&&(p&&(d.transform=f.transform),delete f.transform),p&&(i!==void 0||r!==void 0||d.transform)&&(d.transformOrigin=su(p,i!==void 0?i:.5,r!==void 0?r:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),o!==void 0&&ru(f,o,a,l,!1)}const en=t=>typeof t=="string"&&t.toLowerCase()==="svg",au={useVisualState:Gi({scrapeMotionValuesFromProps:$i,createRenderState:zi,onMount:(t,e,{renderState:n,latestValues:s})=>{w.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),w.render(()=>{tn(n,s,en(e.tagName),t.transformTemplate),Ki(e,n)})}})},lu={useVisualState:Gi({applyWillChange:!0,scrapeMotionValuesFromProps:Ze,createRenderState:Je})};function Xi(t,e,n){for(const s in e)!E(e[s])&&!Wi(s,n)&&(t[s]=e[s])}function uu({transformTemplate:t},e){return T.useMemo(()=>{const n=Je();return Qe(n,e,t),Object.assign({},n.vars,n.style)},[e])}function cu(t,e){const n=t.style||{},s={};return Xi(s,n,t),Object.assign(s,uu(t,e)),s}function hu(t,e){const n={},s=cu(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=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 Kt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||fu.has(t)}let Yi=t=>!Kt(t);function du(t){t&&(Yi=e=>e.startsWith("on")?!Kt(e):t(e))}try{du(require("@emotion/is-prop-valid").default)}catch{}function pu(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Yi(i)||n===!0&&Kt(i)||!e&&!Kt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function mu(t,e,n,s){const i=T.useMemo(()=>{const r=zi();return tn(r,e,en(s),t.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Xi(r,t.style,t),i.style={...r,...i.style}}return i}function gu(t=!1){return(n,s,i,{latestValues:r},o)=>{const l=(qe(n)?mu:hu)(s,r,o,n),u=pu(s,typeof n=="string",t),c=n!==T.Fragment?{...u,...l,ref:i}:{},{children:h}=s,f=T.useMemo(()=>E(h)?h.get():h,[h]);return T.createElement(n,{...c,children:f})}}function yu(t,e){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...qe(s)?au:lu,preloadedFeatures:t,useRender:gu(i),createVisualElement:e,Component:s};return zl(o)}}const Ve={current:null},qi={current:!1};function vu(){if(qi.current=!0,!!Ye)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ve.current=t.matches;t.addListener(e),e()}else Ve.current=!1}function xu(t,e,n){for(const s in e){const i=e[s],r=n[s];if(E(i))t.addValue(s,i);else if(E(r))t.addValue(s,Vt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,Vt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const xs=new WeakMap,Pu=[...Is,R,J],Tu=t=>Pu.find(Os(t)),Ps=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class bu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ke,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=K.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,w.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;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=!!r,this.isControllingVariants=Xt(n),this.isVariantNode=Ni(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&&E(d)&&d.set(l[f],!1)}}mount(e){this.current=e,xs.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)),qi.current||vu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ve.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){xs.delete(this.current),this.projection&&this.projection.unmount(),q(this.notifyUpdate),q(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=Q.has(e),i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&w.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r(),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 r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):C()}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<Ps.length;s++){const i=Ps[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=xu(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=Vt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Fs(i)||Ls(i))?i=parseFloat(i):!Tu(i)&&J.test(n)&&(i=zs(e,n)),this.setBaseTarget(e,E(i)?i.get():i)),E(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const o=Ce(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[e])}if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!E(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new ze),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Zi extends bu{constructor(){super(...arguments),this.KeyframeResolver=Hs}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]}}function Su(t){return window.getComputedStyle(t)}class Au extends Zi{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Ui}readValueFromInstance(e,n){if(Q.has(n)){const s=Ie(n);return s&&s.default||0}else{const s=Su(e),i=(Bs(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return bi(e,n)}build(e,n,s){Qe(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ze(e,n,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;E(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class wu extends Zi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=C}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Q.has(n)){const s=Ie(n);return s&&s.default||0}return n=_i.has(n)?n:Gt(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return $i(e,n,s)}build(e,n,s){tn(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,i){Ki(e,n,s,i)}mount(e){this.isSVGTag=en(e.tagName),super.mount(e)}}const Vu=(t,e)=>qe(t)?new wu(e):new Au(e,{allowProjection:t!==T.Fragment}),Cu=yu({...pa,...jl,...wl,...Ol},Vu),ce=oo(Cu);function nn(){const t=no("root"),e=so().find(n=>{var s;return n.formAction==="/progress"&&((s=n.formData)==null?void 0:s.has("complete"))});return!e||!(t!=null&&t.progress)?(t==null?void 0:t.progress)??null:t.progress.map(n=>{var r,o;const s=((r=e.formData)==null?void 0:r.get("complete"))==="true";return((o=e.formData)==null?void 0:o.get("lessonSlug"))===n.epicLessonSlug?{...n,epicCompletedAt:s?Date.now():null}:n})}function Ou(){const t=Ts().pathname,e=nn();if(!e)return null;const n=a=>a.type==="workshop-instructions"?0:a.type==="workshop-finished"?1e4:a.type==="instructions"?a.exerciseNumber*100:a.type==="step"?a.exerciseNumber*100+a.stepNumber:a.type==="finished"?a.exerciseNumber*100+100:a.type==="unknown"?1e5:-1,i=e.sort((a,l)=>n(a)-n(l)).find(a=>!a.epicCompletedAt);if(!i||i.type==="unknown")return null;if(i.type==="workshop-instructions")return"/";if(i.type==="workshop-finished")return"/finished";const r=i.exerciseNumber.toString().padStart(2,"0");if(i.type==="instructions")return`/exercise/${r}`;if(i.type==="finished")return`/exercise/${r}/finished`;const o=i.stepNumber.toString().padStart(2,"0");if(i.type==="step"){const a=`/exercise/${r}/${o}/problem`,l=`/exercise/${r}/${o}/solution`;return t===a||t===l?l:a}return null}const Du={0:"",1:"before:h-[10%]",2:"before:h-[20%]",3:"before:h-[30%]",4:"before:h-[40%]",5:"before:h-[50%]",6:"before:h-[60%]",7:"before:h-[70%]",8:"before:h-[80%]",9:"before:h-[90%]",10:"before:h-[100%]"};function Iu(t){const e=nn();if(!(e!=null&&e.length))return null;const n=e.filter(r=>(r.type==="instructions"||r.type==="step"||r.type==="finished")&&r.exerciseNumber===t);if(!n.length)return null;const s=n.reduce((r,o)=>o.epicCompletedAt?r+1:r,0)/n.length,i=Math[s>.1?"floor":"ceil"](s*10);return`relative ${Du[i]} before:bg-highlight before:absolute before:left-0 before:top-0 before:w-[4px]`}function Nu(t){const e=Ji(t);return e!=null&&e.epicCompletedAt?"relative before:h-[100%] before:bg-highlight before:absolute before:left-0 before:top-0 before:w-[4px]":null}function Ji({exerciseNumber:t,stepNumber:e,type:n}){const s=nn();return s!=null&&s.length?n==="workshop-finished"||n==="workshop-instructions"?s.find(i=>i.type===n)??null:n==="instructions"||n==="finished"?s.find(i=>i.type===n&&i.exerciseNumber===t)??null:n==="step"?s.find(i=>i.type===n&&i.exerciseNumber===t&&i.stepNumber===e)??null:null:null}function Uu({className:t,...e}){var m,y,g,v;const n=io(),s=eo(),i=Ji(e),r=T.useRef(null),o=T.useRef(null),a=(m=n.formData)!=null&&m.has("complete")?n.formData.get("complete")==="true":!!(i!=null&&i.epicCompletedAt),[l,u]=T.useState(!1),c=Ts(),h=to(),f=(g=(y=h.location)==null?void 0:y.state)==null?void 0:g.from,d=(v=h.location)==null?void 0:v.pathname,p=c.pathname;return T.useEffect(()=>{var x;f==="continue next lesson button"&&p===d&&(u(!0),(x=o.current)==null||x.focus())},[c.key,p,d,f]),T.useEffect(()=>{let x=!0;if(l)return new Promise(b=>setTimeout(b,200)).then(async()=>{if(!x||!r.current)return;const b=r.current.getAnimations().map(({finished:S})=>S);return Promise.allSettled(b).then(()=>{x&&u(!1)})}),()=>{x=!1}},[l]),ENV.EPICSHOP_DEPLOYED||!i?null:U.jsxs(n.Form,{method:"POST",action:"/progress",children:[s,U.jsx("input",{type:"hidden",name:"lessonSlug",value:i.epicLessonSlug}),U.jsx("input",{type:"hidden",name:"complete",value:(!a).toString()}),U.jsxs(ce.button,{ref:o,onClick:()=>{u(!a)},type:"submit",className:rn("group relative flex w-full items-center justify-between overflow-hidden transition hover:bg-[hsl(var(--foreground)/0.02)] focus:bg-[hsl(var(--foreground)/0.02)]",t),children:[a?"Mark as incomplete":"Mark as complete",l?U.jsx(ce.div,{ref:r,className:"absolute right-0 h-20 w-20 rounded-full bg-foreground/20",initial:{scale:.5,opacity:0},animate:{scale:[.5,2],opacity:[0,1,0]},transition:{duration:1,ease:"easeInOut"}}):null,U.jsx(ce.div,{"aria-hidden":!0,className:rn("relative flex h-8 w-8 items-center justify-center overflow-hidden rounded-full border transition",{"bg-foreground text-background duration-1000":a,"duration-100 group-hover:bg-background":!a}),children:a?"✓":U.jsx("div",{className:"absolute -translate-y-10 opacity-25 transition group-hover:translate-y-0",children:"✓"})})]})]})}export{Uu as P,nn as a,ia as b,Zl as c,Il as d,Ou as e,Nu as f,ce as m,Jr as s,Iu as u};
|
|
2
|
-
//# sourceMappingURL=progress-
|
|
1
|
+
import{r as T,j as U,u as Ts,c as to}from"./index-CGzylDPY.js";import{c as rn}from"./misc-CQmANiHr.js";import{u as eo}from"./pe-DXT2FOp1.js";import{b as no,c as so,a as io}from"./components-DrvY4pal.js";function oo(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...s)=>t(...s);return new Proxy(n,{get:(s,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}function bt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const he=t=>Array.isArray(t);function bs(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}function St(t){return typeof t=="string"||Array.isArray(t)}function an(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ce(t,e,n,s){if(typeof e=="function"){const[i,r]=an(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=an(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function Wt(t,e,n){const s=t.getProps();return Ce(s,e,n!==void 0?n:s.custom,t)}const De=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Me=["initial",...De],Ct=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Q=new Set(Ct),G=t=>t*1e3,z=t=>t/1e3,ro={type:"spring",stiffness:500,damping:25,restSpeed:10},ao=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),lo={type:"keyframes",duration:.8},uo={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},co=(t,{keyframes:e})=>e.length>2?lo:Q.has(t)?t.startsWith("scale")?ao(e[1]):ro:uo;function Re(t,e){return t[e]||t.default||t}const ho={skipAnimations:!1,useManualTiming:!1},fo=t=>t!==null;function $t(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(fo),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return!r||s===void 0?i[r]:s}const L=t=>t;function po(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){r.has(u)&&(l.schedule(u),t()),u(o)}const l={schedule:(u,c=!1,h=!1)=>{const d=h&&s?e:n;return c&&r.add(u),d.has(u)||d.add(u),u},cancel:u=>{n.delete(u),r.delete(u)},process:u=>{if(o=u,s){i=!0;return}s=!0,[e,n]=[n,e],n.clear(),e.forEach(a),s=!1,i&&(i=!1,l.process(u))}};return l}const Rt=["read","resolveKeyframes","update","preRender","render","postRender"],mo=40;function Ss(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Rt.reduce((g,v)=>(g[v]=po(r),g),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:f}=o,d=()=>{const g=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(g-i.timestamp,mo),1),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(d))},p=()=>{n=!0,s=!0,i.isProcessing||t(d)};return{schedule:Rt.reduce((g,v)=>{const x=o[v];return g[v]=(b,S=!1,D=!1)=>(n||p(),x.schedule(b,S,D)),g},{}),cancel:g=>{for(let v=0;v<Rt.length;v++)o[Rt[v]].cancel(g)},state:i,steps:o}}const{schedule:w,cancel:q,state:M,steps:Zt}=Ss(typeof requestAnimationFrame<"u"?requestAnimationFrame:L,!0),As=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,go=1e-7,yo=12;function vo(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=As(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>go&&++a<yo);return o}function Dt(t,e,n,s){if(t===e&&n===s)return L;const i=r=>vo(r,0,1,t,n);return r=>r===0||r===1?r:As(i(r),e,s)}const ws=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Vs=t=>e=>1-t(1-e),Cs=Dt(.33,1.53,.69,.99),Ee=Vs(Cs),Ds=ws(Ee),Ms=t=>(t*=2)<1?.5*Ee(t):.5*(2-Math.pow(2,-10*(t-1))),Le=t=>1-Math.sin(Math.acos(t)),Rs=Vs(Le),Es=ws(Le),Ls=t=>/^0[^.\s]+$/u.test(t);function xo(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ls(t):!0}let fe=L;const Fs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),ks=t=>e=>typeof e=="string"&&e.startsWith(t),Bs=ks("--"),Po=ks("var(--"),Fe=t=>Po(t)?To.test(t.split("/*")[0].trim()):!1,To=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,bo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function So(t){const e=bo.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function js(t,e,n=1){const[s,i]=So(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Fs(o)?parseFloat(o):o}return Fe(i)?js(i,e,n+1):i}const Z=(t,e,n)=>n>e?e:n<t?t:n,mt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},At={...mt,transform:t=>Z(0,1,t)},Et={...mt,default:1},Mt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Y=Mt("deg"),_=Mt("%"),P=Mt("px"),Ao=Mt("vh"),wo=Mt("vw"),ln={..._,parse:t=>_.parse(t)/100,transform:t=>_.transform(t*100)},Vo=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),un=t=>t===mt||t===P,cn=(t,e)=>parseFloat(t.split(", ")[e]),hn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return cn(i[1],e);{const r=s.match(/^matrix\((.+)\)$/u);return r?cn(r[1],t):0}},Co=new Set(["x","y","z"]),Do=Ct.filter(t=>!Co.has(t));function Mo(t){const e=[];return Do.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:hn(4,13),y:hn(5,14)};ft.translateX=ft.x;ft.translateY=ft.y;const Os=t=>e=>e.test(t),Ro={test:t=>t==="auto",parse:t=>t},Is=[mt,P,_,Y,wo,Ao,Ro],fn=t=>Is.find(Os(t)),ot=new Set;let de=!1,pe=!1;function Ns(){if(pe){const t=Array.from(ot).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Mo(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(([r,o])=>{var a;(a=s.getValue(r))===null||a===void 0||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}pe=!1,de=!1,ot.forEach(t=>t.complete()),ot.clear()}function Us(){ot.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(pe=!0)})}function Eo(){Us(),Ns()}class ke{constructor(e,n,s,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ot.add(this),de||(de=!0,w.read(Us),w.resolveKeyframes(Ns))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let r=0;r<e.length;r++)if(e[r]===null)if(r===0){const o=i==null?void 0:i.get(),a=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&o===void 0&&i.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ot.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ot.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const xt=t=>Math.round(t*1e5)/1e5,Be=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Lo(t){return t==null}const Fo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,je=(t,e)=>n=>!!(typeof n=="string"&&Fo.test(n)&&n.startsWith(t)||e&&!Lo(n)&&Object.prototype.hasOwnProperty.call(n,e)),_s=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(Be);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ko=t=>Z(0,255,t),Jt={...mt,transform:t=>Math.round(ko(t))},it={test:je("rgb","red"),parse:_s("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Jt.transform(t)+", "+Jt.transform(e)+", "+Jt.transform(n)+", "+xt(At.transform(s))+")"};function Bo(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 me={test:je("#"),parse:Bo,transform:it.transform},at={test:je("hsl","hue"),parse:_s("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+_.transform(xt(e))+", "+_.transform(xt(n))+", "+xt(At.transform(s))+")"},R={test:t=>it.test(t)||me.test(t)||at.test(t),parse:t=>it.test(t)?it.parse(t):at.test(t)?at.parse(t):me.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?it.transform(t):at.transform(t)},jo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Oo(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Be))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(jo))===null||n===void 0?void 0:n.length)||0)>0}const Ks="number",Ws="color",Io="var",No="var(",dn="${}",Uo=/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 r=0;const a=e.replace(Uo,l=>(R.test(l)?(s.color.push(r),i.push(Ws),n.push(R.parse(l))):l.startsWith(No)?(s.var.push(r),i.push(Io),n.push(l)):(s.number.push(r),i.push(Ks),n.push(parseFloat(l))),++r,dn)).split(dn);return{values:n,split:a,indexes:s,types:i}}function $s(t){return wt(t).values}function Gs(t){const{split:e,types:n}=wt(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===Ks?r+=xt(i[o]):a===Ws?r+=R.transform(i[o]):r+=i[o]}return r}}const _o=t=>typeof t=="number"?0:t;function Ko(t){const e=$s(t);return Gs(t)(e.map(_o))}const J={test:Oo,parse:$s,createTransformer:Gs,getAnimatableNone:Ko},Wo=new Set(["brightness","contrast","saturate","opacity"]);function $o(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Be)||[];if(!s)return t;const i=n.replace(s,"");let r=Wo.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Go=/\b([a-z-]*)\(.*?\)/gu,ge={...J,getAnimatableNone:t=>{const e=t.match(Go);return e?e.map($o).join(" "):t}},zo={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,radius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,backgroundPositionX:P,backgroundPositionY:P},Ho={rotate:Y,rotateX:Y,rotateY:Y,rotateZ:Y,scale:Et,scaleX:Et,scaleY:Et,scaleZ:Et,skew:Y,skewX:Y,skewY:Y,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:At,originX:ln,originY:ln,originZ:P},pn={...mt,transform:Math.round},Oe={...zo,...Ho,zIndex:pn,size:P,fillOpacity:At,strokeOpacity:At,numOctaves:pn},Xo={...Oe,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:ge,WebkitFilter:ge},Ie=t=>Xo[t];function zs(t,e){let n=Ie(t);return n!==ge&&(n=J),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Yo=new Set(["auto","none","0"]);function qo(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Yo.has(r)&&wt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=zs(n,i)}class Hs extends ke{constructor(e,n,s,i,r){super(e,n,s,i,r,!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(),Fe(u))){const c=js(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Vo.has(s)||e.length!==2)return;const[i,r]=e,o=fn(i),a=fn(r);if(o!==a)if(un(o)&&un(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)xo(e[i])&&s.push(i);s.length&&qo(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 e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const r=n.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=ft[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Ne(t){return typeof t=="function"}let Ft;function Zo(){Ft=void 0}const K={now:()=>(Ft===void 0&&K.set(M.isProcessing||ho.useManualTiming?M.timestamp:performance.now()),Ft),set:t=>{Ft=t,queueMicrotask(Zo)}},mn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(J.test(t)||t==="0")&&!t.startsWith("url("));function Jo(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 Qo(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=mn(i,e),a=mn(r,e);return!o||!a?!1:Jo(t)||(n==="spring"||Ne(n))&&s}const tr=40;class Xs{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=K.now(),this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>tr?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Eo(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=K.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:r,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!Qo(e,s,i,r))if(o)this.options.duration=0;else{l==null||l($t(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const c=this.initPlayback(e,n);c!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function Ys(t,e){return e?t*(1e3/e):0}const er=5;function qs(t,e,n){const s=Math.max(e-er,0);return Ys(n-t(s),e-s)}const Qt=.001,nr=.01,sr=10,ir=.05,or=1;function rr({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,r,o=1-e;o=Z(ir,or,o),t=Z(nr,sr,z(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=ye(u,o),p=Math.exp(-h);return Qt-f/d*p},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,p=Math.exp(-h),m=ye(Math.pow(u,2),o);return(-i(u)+Qt>0?-1:1)*((f-d)*p)/m}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-Qt+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=lr(i,r,a);if(t=G(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const ar=12;function lr(t,e,n){let s=n;for(let i=1;i<ar;i++)s=s-t(s)/e(s);return s}function ye(t,e){return t*Math.sqrt(1-e*e)}const ur=["duration","bounce"],cr=["stiffness","damping","mass"];function gn(t,e){return e.some(n=>t[n]!==void 0)}function hr(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!gn(t,cr)&&gn(t,ur)){const n=rr(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function Zs({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],r=t[t.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:f}=hr({...s,velocity:-z(s.velocity||0)}),d=h||0,p=l/(2*Math.sqrt(a*u)),m=r-i,y=z(Math.sqrt(a/u)),g=Math.abs(m)<5;n||(n=g?.01:2),e||(e=g?.005:.5);let v;if(p<1){const x=ye(y,p);v=b=>{const S=Math.exp(-p*y*b);return r-S*((d+p*y*m)/x*Math.sin(x*b)+m*Math.cos(x*b))}}else if(p===1)v=x=>r-Math.exp(-y*x)*(m+(d+y*m)*x);else{const x=y*Math.sqrt(p*p-1);v=b=>{const S=Math.exp(-p*y*b),D=Math.min(x*b,300);return r-S*((d+p*y*m)*Math.sinh(D)+x*m*Math.cosh(D))/x}}return{calculatedDuration:f&&c||null,next:x=>{const b=v(x);if(f)o.done=x>=c;else{let S=0;p<1&&(S=x===0?G(d):qs(v,x,b));const D=Math.abs(S)<=n,N=Math.abs(r-b)<=e;o.done=D&&N}return o.value=o.done?r:b,o}}}function yn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*e;const y=h+m,g=o===void 0?y:o(y);g!==y&&(m=g-h);const v=A=>-m*Math.exp(-A/s),x=A=>g+v(A),b=A=>{const B=v(A),j=x(A);f.done=Math.abs(B)<=u,f.value=f.done?g:j};let S,D;const N=A=>{d(f.value)&&(S=A,D=Zs({keyframes:[f.value,p(f.value)],velocity:qs(x,A,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return N(0),{calculatedDuration:null,next:A=>{let B=!1;return!D&&S===void 0&&(B=!0,b(A),N(A)),S!==void 0&&A>=S?D.next(A-S):(!B&&b(A),f)}}}const fr=Dt(.42,0,1,1),dr=Dt(0,0,.58,1),Js=Dt(.42,0,.58,1),pr=t=>Array.isArray(t)&&typeof t[0]!="number",vn={linear:L,easeIn:fr,easeInOut:Js,easeOut:dr,circIn:Le,circInOut:Es,circOut:Rs,backIn:Ee,backInOut:Ds,backOut:Cs,anticipate:Ms},xn=t=>{if(Array.isArray(t)){fe(t.length===4);const[e,n,s,i]=t;return Dt(e,n,s,i)}else if(typeof t=="string")return fe(vn[t]!==void 0),vn[t];return t},mr=(t,e)=>n=>e(t(n)),H=(...t)=>t.reduce(mr),dt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},V=(t,e,n)=>t+(e-t)*n;function te(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 gr({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=te(l,a,t+1/3),r=te(l,a,t),o=te(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function jt(t,e){return n=>n>0?e:t}const ee=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},yr=[me,it,at],vr=t=>yr.find(e=>e.test(t));function Pn(t){const e=vr(t);if(!e)return!1;let n=e.parse(t);return e===at&&(n=gr(n)),n}const Tn=(t,e)=>{const n=Pn(t),s=Pn(e);if(!n||!s)return jt(t,e);const i={...n};return r=>(i.red=ee(n.red,s.red,r),i.green=ee(n.green,s.green,r),i.blue=ee(n.blue,s.blue,r),i.alpha=V(n.alpha,s.alpha,r),it.transform(i))},ve=new Set(["none","hidden"]);function xr(t,e){return ve.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Pr(t,e){return n=>V(t,e,n)}function Ue(t){return typeof t=="number"?Pr:typeof t=="string"?Fe(t)?jt:R.test(t)?Tn:Sr:Array.isArray(t)?Qs:typeof t=="object"?R.test(t)?Tn:Tr:jt}function Qs(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>Ue(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Tr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Ue(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function br(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[r]=l,i[o]++}return s}const Sr=(t,e)=>{const n=J.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?ve.has(t)&&!i.values.length||ve.has(e)&&!s.values.length?xr(t,e):H(Qs(br(s,i),i.values),n):jt(t,e)};function ti(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?V(t,e,n):Ue(t)(t,e)}function Ar(t,e,n){const s=[],i=n||ti,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||L:e;a=H(l,a)}s.push(a)}return s}function wr(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(fe(r===e.length),r===1)return()=>e[0];if(r===2&&t[0]===t[1])return()=>e[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=Ar(e,s,i),a=o.length,l=u=>{let c=0;if(a>1)for(;c<t.length-2&&!(u<t[c+1]);c++);const h=dt(t[c],t[c+1],u);return o[c](h)};return n?u=>l(Z(t[0],t[r-1],u)):l}function Vr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=dt(0,e,s);t.push(V(n,1,i))}}function Cr(t){const e=[0];return Vr(e,t.length-1),e}function Dr(t,e){return t.map(n=>n*e)}function Mr(t,e){return t.map(()=>e||Js).splice(0,t.length-1)}function Ot({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=pr(s)?s.map(xn):xn(s),r={done:!1,value:e[0]},o=Dr(n&&n.length===e.length?n:Cr(e),t),a=wr(o,e,{ease:Array.isArray(i)?i:Mr(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const bn=2e4;function Rr(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<bn;)e+=n,s=t.next(e);return e>=bn?1/0:e}const Er=t=>{const e=({timestamp:n})=>t(n);return{start:()=>w.update(e,!0),stop:()=>q(e),now:()=>M.isProcessing?M.timestamp:K.now()}},Lr={decay:yn,inertia:yn,tween:Ot,keyframes:Ot,spring:Zs},Fr=t=>t/100;class _e extends Xs{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:s,element:i,keyframes:r}=this.options,o=(i==null?void 0:i.KeyframeResolver)||ke,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(r,a,n,s,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,a=Ne(n)?n:Lr[n]||Ot;let l,u;a!==Ot&&typeof e[0]!="number"&&(l=H(Fr,ti(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});r==="mirror"&&(u=a({...this.options,keyframes:[...e].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Rr(c));const{calculatedDuration:h}=c,f=h+i,d=f*(s+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:h}=s;if(this.startTime===null)return r.next(0);const{delay:f,repeat:d,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-f*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let x=this.currentTime,b=r;if(d){const A=Math.min(this.currentTime,c)/h;let B=Math.floor(A),j=A%1;!j&&A>=1&&(j=1),j===1&&B--,B=Math.min(B,d+1),!!(B%2)&&(p==="reverse"?(j=1-j,m&&(j-=m/h)):p==="mirror"&&(b=o)),x=Z(0,1,j)*h}const S=v?{done:!1,value:l[0]}:b.next(x);a&&(S.value=a(S.value));let{done:D}=S;!v&&u!==null&&(D=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return N&&i!==void 0&&(S.value=$t(l,this.options,i)),y&&y(S.value),N&&this.finish(),S}get duration(){const{resolved:e}=this;return e?z(e.calculatedDuration):0}get time(){return z(this.currentTime)}set time(e){e=G(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=z(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Er,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const ei=new Set(["opacity","clipPath","filter","transform"]),ni=t=>Array.isArray(t)&&typeof t[0]=="number",kr=10,Br=(t,e)=>{let n="";const s=Math.max(Math.round(e/kr),2);for(let i=0;i<s;i++)n+=t(dt(0,s-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`};function Ke(t){let e;return()=>(e===void 0&&(e=t()),e)}const jr={linearEasing:void 0};function Or(t,e){const n=Ke(t);return()=>{var s;return(s=jr[e])!==null&&s!==void 0?s:n()}}const It=Or(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function si(t){return!!(typeof t=="function"&&It()||!t||typeof t=="string"&&(t in xe||It())||ni(t)||Array.isArray(t)&&t.every(si))}const yt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,xe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yt([0,.65,.55,1]),circOut:yt([.55,0,1,.45]),backIn:yt([.31,.01,.66,-.59]),backOut:yt([.33,1.53,.69,.99])};function ii(t,e){if(t)return typeof t=="function"&&It()?Br(t,e):ni(t)?yt(t):Array.isArray(t)?t.map(n=>ii(n,e)||xe.easeOut):xe[t]}function Ir(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=ii(a,i);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"})}function Sn(t,e){t.timeline=e,t.onfinish=null}const Nr=Ke(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Nt=10,Ur=2e4;function _r(t){return Ne(t.type)||t.type==="spring"||!si(t.ease)}function Kr(t,e){const n=new _e({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<Ur;)s=n.sample(r),i.push(s.value),r+=Nt;return{times:void 0,keyframes:i,duration:r-Nt,ease:"linear"}}const oi={anticipate:Ms,backInOut:Ds,circInOut:Es};function Wr(t){return t in oi}class An extends Xs{constructor(e){super(e);const{name:n,motionValue:s,element:i,keyframes:r}=this.options;this.resolver=new Hs(r,(o,a)=>this.onKeyframesResolved(o,a),n,s,i),this.resolver.scheduleResolve()}initPlayback(e,n){var s;let{duration:i=300,times:r,ease:o,type:a,motionValue:l,name:u,startTime:c}=this.options;if(!(!((s=l.owner)===null||s===void 0)&&s.current))return!1;if(typeof o=="string"&&It()&&Wr(o)&&(o=oi[o]),_r(this.options)){const{onComplete:f,onUpdate:d,motionValue:p,element:m,...y}=this.options,g=Kr(e,y);e=g.keyframes,e.length===1&&(e[1]=e[0]),i=g.duration,r=g.times,o=g.ease,a="keyframes"}const h=Ir(l.owner.current,u,e,{...this.options,duration:i,times:r,ease:o});return h.startTime=c??this.calcStartTime(),this.pendingTimeline?(Sn(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:f}=this.options;l.set($t(e,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:i,times:r,type:a,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return z(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return z(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=G(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return L;const{animation:s}=n;Sn(s,e)}return L}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:r,ease:o,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:h,element:f,...d}=this.options,p=new _e({...d,keyframes:s,duration:i,type:r,ease:o,times:a,isGenerator:!0}),m=G(this.time);u.setWithVelocity(p.sample(m-Nt).value,p.sample(m).value,Nt)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:r,damping:o,type:a}=e;return Nr()&&s&&ei.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}}const $r=Ke(()=>window.ScrollTimeline!==void 0);class Gr{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e,n){const s=this.animations.map(i=>$r()&&i.attachTimeline?i.attachTimeline(e):n(i));return()=>{s.forEach((i,r)=>{i&&i(),this.animations[r].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function zr({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const We=(t,e,n,s={},i,r)=>o=>{const a=Re(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-G(l);let 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:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};zr(a)||(c={...c,...co(t,c)}),c.duration&&(c.duration=G(c.duration)),c.repeatDelay&&(c.repeatDelay=G(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(h=!0)),h&&!r&&e.get()!==void 0){const f=$t(c.keyframes,a);if(f!==void 0)return w.update(()=>{c.onUpdate(f),c.onComplete()}),new Gr([])}return!r&&An.supports(c)?new An(c):new _e(c)},Hr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Xr=t=>he(t)?t[t.length-1]||0:t;function $e(t,e){t.indexOf(e)===-1&&t.push(e)}function Ge(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class ze{constructor(){this.subscriptions=[]}add(e){return $e(this.subscriptions,e),()=>Ge(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 r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const wn=30,Yr=t=>!isNaN(parseFloat(t));class qr{constructor(e,n={}){this.version="11.11.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const r=K.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=K.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Yr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new ze);const s=this.events[e].add(n);return e==="change"?()=>{s(),w.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()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=K.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>wn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,wn);return Ys(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vt(t,e){return new qr(t,e)}function Zr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vt(n))}function Jr(t,e){const n=Wt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Xr(r[o]);Zr(t,o,a)}}const Gt=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Qr="framerAppearId",ri="data-"+Gt(Qr);function ai(t){return t.props[ri]}const E=t=>!!(t&&t.getVelocity);function ta(t){return!!(E(t)&&t.add)}function li(t){if(Q.has(t))return"transform";if(ei.has(t))return Gt(t)}function Pe(t,e){var n;if(!t.applyWillChange)return;const s=t.getValue("willChange");if(ta(s))return s.add(e);!(!((n=t.props.style)===null||n===void 0)&&n.willChange)&&li(e)&&t.setStaticValue("willChange","transform")}function ea({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function ui(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const h in l){const f=t.getValue(h,(r=t.latestValues[h])!==null&&r!==void 0?r:null),d=l[h];if(d===void 0||c&&ea(c,h))continue;const p={delay:n,...Re(o||{},h)};let m=!1;if(window.MotionHandoffAnimation){const g=ai(t);if(g){const v=window.MotionHandoffAnimation(g,h,w);v!==null&&(p.startTime=v,m=!0)}}Pe(t,h),f.start(We(h,f,d,t.shouldReduceMotion&&Q.has(h)?{type:!1}:p,t,m));const y=f.animation;y&&u.push(y)}return a&&Promise.all(u).then(()=>{w.update(()=>{a&&Jr(t,a)})}),u}function Te(t,e,n={}){var s;const i=Wt(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(ui(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=r;return na(t,e,c+u,h,f,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function na(t,e,n=0,s=0,i=1,r){const o=[],a=(t.variantChildren.size-1)*s,l=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(sa).forEach((u,c)=>{u.notify("AnimationStart",e),o.push(Te(u,e,{...r,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(o)}function sa(t,e){return t.sortNodePosition(e)}function ia(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Te(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Te(t,e,n);else{const i=typeof e=="function"?Wt(t,e,n.custom):e;s=Promise.all(ui(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const oa=Me.length;function ci(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?ci(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<oa;n++){const s=Me[n],i=t.props[s];(St(i)||i===!1)&&(e[s]=i)}return e}const ra=[...De].reverse(),aa=De.length;function la(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ia(t,n,s)))}function ua(t){let e=la(t),n=Vn(),s=!0;const i=l=>(u,c)=>{var h;const f=Wt(t,c,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:p,...m}=f;u={...u,...m,...p}}return u};function r(l){e=l(t)}function o(l){const{props:u}=t,c=ci(t.parent)||{},h=[],f=new Set;let d={},p=1/0;for(let y=0;y<aa;y++){const g=ra[y],v=n[g],x=u[g]!==void 0?u[g]:c[g],b=St(x),S=g===l?v.isActive:null;S===!1&&(p=y);let D=x===c[g]&&x!==u[g]&&b;if(D&&s&&t.manuallyAnimateOnMount&&(D=!1),v.protectedKeys={...d},!v.isActive&&S===null||!x&&!v.prevProp||bt(x)||typeof x=="boolean")continue;const N=ca(v.prevProp,x);let A=N||g===l&&v.isActive&&!D&&b||y>p&&b,B=!1;const j=Array.isArray(x)?x:[x];let rt=j.reduce(i(g),{});S===!1&&(rt={});const{prevResolvedValues:sn={}}=v,Qi={...sn,...rt},on=F=>{A=!0,f.has(F)&&(B=!0,f.delete(F)),v.needsAnimating[F]=!0;const W=t.getValue(F);W&&(W.liveStyle=!1)};for(const F in Qi){const W=rt[F],Yt=sn[F];if(d.hasOwnProperty(F))continue;let qt=!1;he(W)&&he(Yt)?qt=!bs(W,Yt):qt=W!==Yt,qt?W!=null?on(F):f.add(F):W!==void 0&&f.has(F)?on(F):v.protectedKeys[F]=!0}v.prevProp=x,v.prevResolvedValues=rt,v.isActive&&(d={...d,...rt}),s&&t.blockInitialAnimation&&(A=!1),A&&(!(D&&N)||B)&&h.push(...j.map(F=>({animation:F,options:{type:g}})))}if(f.size){const y={};f.forEach(g=>{const v=t.getBaseTarget(g),x=t.getValue(g);x&&(x.liveStyle=!0),y[g]=v??null}),h.push({animation:y})}let m=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(h):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=t.variantChildren)===null||c===void 0||c.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,u)}),n[l].isActive=u;const h=o(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=Vn(),s=!0}}}function ca(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!bs(e,t):!1}function et(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Vn(){return{animate:et(!0),whileInView:et(),whileHover:et(),whileTap:et(),whileDrag:et(),whileFocus:et(),exit:et()}}class tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class ha extends tt{constructor(e){super(e),e.animationState||(e.animationState=ua(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();bt(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===void 0||e.call(this)}}let fa=0;class da extends tt{constructor(){super(...arguments),this.id=fa++}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}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const pa={animation:{Feature:ha},exit:{Feature:da}},hi=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function zt(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const ma=t=>e=>hi(e)&&t(e,zt(e));function $(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function X(t,e,n,s){return $(t,e,ma(n),s)}const Cn=(t,e)=>Math.abs(t-e);function ga(t,e){const n=Cn(t.x,e.x),s=Cn(t.y,e.y);return Math.sqrt(n**2+s**2)}class fi{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=se(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=ga(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:p}=h,{timestamp:m}=M;this.history.push({...p,timestamp:m});const{onStart:y,onMove:g}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ne(f,this.transformPagePoint),w.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=se(h.type==="pointercancel"?this.lastMoveEventInfo:ne(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),p&&p(h,y)},!hi(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=zt(e),a=ne(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=M;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(e,se(a,this.history)),this.removeListeners=H(X(this.contextWindow,"pointermove",this.handlePointerMove),X(this.contextWindow,"pointerup",this.handlePointerUp),X(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),q(this.updatePoint)}}function ne(t,e){return e?{point:e(t.point)}:t}function Dn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function se({point:t},e){return{point:t,delta:Dn(t,di(e)),offset:Dn(t,ya(e)),velocity:va(e,.1)}}function ya(t){return t[0]}function di(t){return t[t.length-1]}function va(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=di(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>G(e)));)n--;if(!s)return{x:0,y:0};const r=z(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function pi(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Mn=pi("dragHorizontal"),Rn=pi("dragVertical");function mi(t){let e=!1;if(t==="y")e=Rn();else if(t==="x")e=Mn();else{const n=Mn(),s=Rn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function gi(){const t=mi(!0);return t?(t(),!1):!0}function lt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const yi=1e-4,xa=1-yi,Pa=1+yi,vi=.01,Ta=0-vi,ba=0+vi;function k(t){return t.max-t.min}function Sa(t,e,n){return Math.abs(t-e)<=n}function En(t,e,n,s=.5){t.origin=s,t.originPoint=V(e.min,e.max,t.origin),t.scale=k(n)/k(e),t.translate=V(n.min,n.max,t.origin)-t.originPoint,(t.scale>=xa&&t.scale<=Pa||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ta&&t.translate<=ba||isNaN(t.translate))&&(t.translate=0)}function Pt(t,e,n,s){En(t.x,e.x,n.x,s?s.originX:void 0),En(t.y,e.y,n.y,s?s.originY:void 0)}function Ln(t,e,n){t.min=n.min+e.min,t.max=t.min+k(e)}function Aa(t,e,n){Ln(t.x,e.x,n.x),Ln(t.y,e.y,n.y)}function Fn(t,e,n){t.min=e.min-n.min,t.max=t.min+k(e)}function Tt(t,e,n){Fn(t.x,e.x,n.x),Fn(t.y,e.y,n.y)}function wa(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?V(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?V(n,t,s.max):Math.min(t,n)),t}function kn(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 Va(t,{top:e,left:n,bottom:s,right:i}){return{x:kn(t.x,n,i),y:kn(t.y,e,s)}}function Bn(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 Ca(t,e){return{x:Bn(t.x,e.x),y:Bn(t.y,e.y)}}function Da(t,e){let n=.5;const s=k(t),i=k(e);return i>s?n=dt(e.min,e.max-s,t.min):s>i&&(n=dt(t.min,t.max-i,e.min)),Z(0,1,n)}function Ma(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 be=.35;function Ra(t=be){return t===!1?t=0:t===!0&&(t=be),{x:jn(t,"left","right"),y:jn(t,"top","bottom")}}function jn(t,e,n){return{min:On(t,e),max:On(t,n)}}function On(t,e){return typeof t=="number"?t:t[e]||0}const In=()=>({translate:0,scale:1,origin:0,originPoint:0}),ut=()=>({x:In(),y:In()}),Nn=()=>({min:0,max:0}),C=()=>({x:Nn(),y:Nn()});function I(t){return[t("x"),t("y")]}function xi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Ea({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function La(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 ie(t){return t===void 0||t===1}function Se({scale:t,scaleX:e,scaleY:n}){return!ie(t)||!ie(e)||!ie(n)}function nt(t){return Se(t)||Pi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Pi(t){return Un(t.x)||Un(t.y)}function Un(t){return t&&t!=="0%"}function Ut(t,e,n){const s=t-n,i=e*s;return n+i}function _n(t,e,n,s,i){return i!==void 0&&(t=Ut(t,i,s)),Ut(t,n,s)+e}function Ae(t,e=0,n=1,s,i){t.min=_n(t.min,e,n,s,i),t.max=_n(t.max,e,n,s,i)}function Ti(t,{x:e,y:n}){Ae(t.x,e.translate,e.scale,e.originPoint),Ae(t.y,n.translate,n.scale,n.originPoint)}const Kn=.999999999999,Wn=1.0000000000001;function Fa(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&ht(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Ti(t,o)),s&&nt(r.latestValues)&&ht(t,r.latestValues))}e.x<Wn&&e.x>Kn&&(e.x=1),e.y<Wn&&e.y>Kn&&(e.y=1)}function ct(t,e){t.min=t.min+e,t.max=t.max+e}function $n(t,e,n,s,i=.5){const r=V(t.min,t.max,i);Ae(t,e,n,r,s)}function ht(t,e){$n(t.x,e.x,e.scaleX,e.scale,e.originX),$n(t.y,e.y,e.scaleY,e.scale,e.originY)}function bi(t,e){return xi(La(t.getBoundingClientRect(),e))}function ka(t,e,n){const s=bi(t,n),{scroll:i}=e;return i&&(ct(s.x,i.offset.x),ct(s.y,i.offset.y)),s}const Si=({current:t})=>t?t.ownerDocument.defaultView:null,Ba=new WeakMap;class ja{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=C(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(zt(c,"page").point)},r=(c,h)=>{const{drag:f,dragPropagation:d,onDragStart:p}=this.getProps();if(f&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=mi(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),I(y=>{let g=this.getAxisMotionValue(y).get()||0;if(_.test(g)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[y];x&&(g=k(x)*(parseFloat(g)/100))}}this.originPoint[y]=g}),p&&w.postRender(()=>p(c,h)),Pe(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(c,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:y}=h;if(d&&this.currentDirection===null){this.currentDirection=Oa(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),m&&m(c,h)},a=(c,h)=>this.stop(c,h),l=()=>I(c=>{var h;return this.getAnimationState(c)==="paused"&&((h=this.getAxisMotionValue(c).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new fi(e,{onSessionStart:i,onStart:r,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Si(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&w.postRender(()=>r(e,n))}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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Lt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=wa(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,r=this.constraints;n&<(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Va(i.layoutBox,n):this.constraints=!1,this.elastic=Ra(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&I(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Ma(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!lt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=ka(s,i.root,this.visualElement.getTransformPagePoint());let o=Ca(i.layout.layoutBox,r);if(n){const a=n(Ea(o));this.hasMutatedConstraints=!!a,a&&(o=xi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=I(c=>{if(!Lt(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Pe(this.visualElement,e),s.start(We(e,s,0,n,this.visualElement,!1))}stopAnimation(){I(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){I(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?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){I(n=>{const{drag:s}=this.getProps();if(!Lt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-V(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!lt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};I(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Da({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),I(o=>{if(!Lt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(V(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;Ba.set(this.visualElement,this);const e=this.visualElement.current,n=X(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();lt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),w.read(s);const o=$(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(I(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=be,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Lt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Oa(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Ia extends tt{constructor(e){super(e),this.removeGroupControls=L,this.removeListeners=L,this.controls=new ja(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||L}unmount(){this.removeGroupControls(),this.removeListeners()}}const Gn=t=>(e,n)=>{t&&w.postRender(()=>t(e,n))};class Na extends tt{constructor(){super(...arguments),this.removePointerDownListener=L}onPointerDown(e){this.session=new fi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Si(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Gn(e),onStart:Gn(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&w.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=X(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 He=T.createContext(null);function Ua(){const t=T.useContext(He);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=T.useId();T.useEffect(()=>s(i),[]);const r=T.useCallback(()=>n&&n(i),[i,n]);return!e&&n?[!1,r]:[!0]}const Ai=T.createContext({}),wi=T.createContext({}),kt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function zn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const gt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(P.test(t))t=parseFloat(t);else return t;const n=zn(t,e.target.x),s=zn(t,e.target.y);return`${n}% ${s}%`}},_a={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=J.parse(t);if(i.length>5)return s;const r=J.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=V(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},_t={};function Ka(t){Object.assign(_t,t)}const{schedule:Xe,cancel:Bu}=Ss(queueMicrotask,!1);class Wa extends T.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;Ka($a),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),kt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,o=s.projection;return o&&(o.isPresent=r,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||w.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Xe.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 Vi(t){const[e,n]=Ua(),s=T.useContext(Ai);return U.jsx(Wa,{...t,layoutGroup:s,switchLayoutGroup:T.useContext(wi),isPresent:e,safeToRemove:n})}const $a={borderRadius:{...gt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomLeftRadius:gt,borderBottomRightRadius:gt,boxShadow:_a},Ci=["TopLeft","TopRight","BottomLeft","BottomRight"],Ga=Ci.length,Hn=t=>typeof t=="string"?parseFloat(t):t,Xn=t=>typeof t=="number"||P.test(t);function za(t,e,n,s,i,r){i?(t.opacity=V(0,n.opacity!==void 0?n.opacity:1,Ha(s)),t.opacityExit=V(e.opacity!==void 0?e.opacity:1,0,Xa(s))):r&&(t.opacity=V(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;o<Ga;o++){const a=`border${Ci[o]}Radius`;let l=Yn(e,a),u=Yn(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Xn(l)===Xn(u)?(t[a]=Math.max(V(Hn(l),Hn(u),s),0),(_.test(u)||_.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=V(e.rotate||0,n.rotate||0,s))}function Yn(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Ha=Di(0,.5,Rs),Xa=Di(.5,.95,L);function Di(t,e,n){return s=>s<t?0:s>e?1:n(dt(t,e,s))}function qn(t,e){t.min=e.min,t.max=e.max}function O(t,e){qn(t.x,e.x),qn(t.y,e.y)}function Zn(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Jn(t,e,n,s,i){return t-=e,t=Ut(t,1/n,s),i!==void 0&&(t=Ut(t,1/i,s)),t}function Ya(t,e=0,n=1,s=.5,i,r=t,o=t){if(_.test(e)&&(e=parseFloat(e),e=V(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=V(r.min,r.max,s);t===r&&(a-=e),t.min=Jn(t.min,e,n,a,i),t.max=Jn(t.max,e,n,a,i)}function Qn(t,e,[n,s,i],r,o){Ya(t,e[n],e[s],e[i],e.scale,r,o)}const qa=["x","scaleX","originX"],Za=["y","scaleY","originY"];function ts(t,e,n,s){Qn(t.x,e,qa,n?n.x:void 0,s?s.x:void 0),Qn(t.y,e,Za,n?n.y:void 0,s?s.y:void 0)}function es(t){return t.translate===0&&t.scale===1}function Mi(t){return es(t.x)&&es(t.y)}function ns(t,e){return t.min===e.min&&t.max===e.max}function Ja(t,e){return ns(t.x,e.x)&&ns(t.y,e.y)}function ss(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ri(t,e){return ss(t.x,e.x)&&ss(t.y,e.y)}function is(t){return k(t.x)/k(t.y)}function os(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Qa{constructor(){this.members=[]}add(e){$e(this.members,e),e.scheduleRender()}remove(e){if(Ge(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 r=this.members[i];if(r.isPresent!==!1){s=r;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 tl(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}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:p}=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) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const el=(t,e)=>t.depth-e.depth;class nl{constructor(){this.children=[],this.isDirty=!1}add(e){$e(this.children,e),this.isDirty=!0}remove(e){Ge(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(el),this.isDirty=!1,this.children.forEach(e)}}function Bt(t){const e=E(t)?t.get():t;return Hr(e)?e.toValue():e}function sl(t,e){const n=K.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(q(s),t(r-e))};return w.read(s,!0),()=>q(s)}function il(t){return t instanceof SVGElement&&t.tagName!=="svg"}function ol(t,e,n){const s=E(t)?t:Vt(t);return s.start(We("",s,e,n)),s.animation}const st={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},vt=typeof window<"u"&&window.MotionDebug!==void 0,oe=["","X","Y","Z"],rl={visibility:"hidden"},rs=1e3;let al=0;function re(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Ei(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ai(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",w,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Ei(s)}function Li({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=al++,this.animationId=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,vt&&(st.totalNodes=st.resolvedTargetDeltas=st.recalculatedProjection=0),this.nodes.forEach(cl),this.nodes.forEach(ml),this.nodes.forEach(gl),this.nodes.forEach(hl),vt&&window.MotionDebug.record(st)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,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 nl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ze),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=il(o),this.instance=o;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=sl(f,250),kt.hasAnimatedSinceResize&&(kt.hasAnimatedSinceResize=!1,this.nodes.forEach(ls))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||Tl,{onLayoutAnimationStart:y,onLayoutAnimationComplete:g}=c.getProps(),v=!this.targetLayout||!Ri(this.targetLayout,p)||d,x=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,x);const b={...Re(m,"layout"),onPlay:y,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||ls(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,q(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(yl),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ei(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(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(as);return}this.isUpdating||this.nodes.forEach(dl),this.isUpdating=!1,this.nodes.forEach(pl),this.nodes.forEach(ll),this.nodes.forEach(ul),this.clearAllSnapshots();const a=K.now();M.delta=Z(0,1e3/60,a-M.timestamp),M.timestamp=a,M.isProcessing=!0,Zt.update.process(M),Zt.preRender.process(M),Zt.render.process(M),M.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Xe.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(fl),this.sharedNodes.forEach(vl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,w.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){w.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}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 o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=C(),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,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Mi(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&(a||nt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),bl(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return C();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(Sl))){const{scroll:c}=this.root;c&&(ct(l.x,c.offset.x),ct(l.y,c.offset.y))}return l}removeElementScroll(o){var a;const l=C();if(O(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;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&&O(l,o),ct(l.x,h.offset.x),ct(l.y,h.offset.y))}return l}applyTransform(o,a=!1){const l=C();O(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ht(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),nt(c.latestValues)&&ht(l,c.latestValues)}return nt(this.latestValues)&&ht(l,this.latestValues),l}removeTransform(o){const a=C();O(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!nt(u.latestValues))continue;Se(u.latestValues)&&u.updateSnapshot();const c=C(),h=u.measurePageBox();O(c,h),ts(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return nt(this.latestValues)&&ts(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==M.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=M.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),Tt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),O(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=C(),this.targetWithTransforms=C()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Aa(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):O(this.target,this.layout.layoutBox),Ti(this.target,this.targetDelta)):O(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=C(),this.relativeTargetOrigin=C(),Tt(this.relativeTargetOrigin,this.target,d.target),O(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}vt&&st.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Se(this.parent.latestValues)||Pi(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 o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===M.timestamp&&(u=!1),u)return;const{layout:c,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||h))return;O(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;Fa(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=C());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Zn(this.prevProjectionDelta.x,this.projectionDelta.x),Zn(this.prevProjectionDelta.y,this.projectionDelta.y)),Pt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!os(this.projectionDelta.x,this.prevProjectionDelta.x)||!os(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),vt&&st.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ut(),this.projectionDelta=ut(),this.projectionDeltaWithTransform=ut()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=ut();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=C(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,y=this.getStack(),g=!y||y.members.length<=1,v=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(Pl));this.animationProgress=0;let x;this.mixTargetDelta=b=>{const S=b/1e3;us(h.x,o.x,S),us(h.y,o.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),xl(this.relativeTarget,this.relativeTargetOrigin,f,S),x&&Ja(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=C()),O(x,this.relativeTarget)),m&&(this.animationValues=c,za(c,u,this.latestValues,S,v,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(q(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=w.update(()=>{kt.hasAnimatedSinceResize=!0,this.currentAnimation=ol(0,rs,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(rs),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Fi(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||C();const h=k(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=k(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}O(a,l),ht(a,c),Pt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Qa),this.sharedNodes.get(o).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 o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&re("z",o,u,this.animationValues);for(let c=0;c<oe.length;c++)re(`rotate${oe[c]}`,o,u,this.animationValues),re(`skew${oe[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return rl;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Bt(o==null?void 0:o.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Bt(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(m.transform=c?c({},""):"none",this.hasProjected=!1),m}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=tl(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:d,y:p}=this.projectionDelta;u.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,h.animationValues?u.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in _t){if(f[m]===void 0)continue;const{correct:y,applyTo:g}=_t[m],v=u.transform==="none"?f[m]:y(f[m],h);if(g){const x=g.length;for(let b=0;b<x;b++)u[g[b]]=v}else u[m]=v}return this.options.layoutId&&(u.pointerEvents=h===this?Bt(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(as),this.root.sharedNodes.clear()}}}function ll(t){t.updateLayout()}function ul(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?I(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=k(f);f.min=s[h].min,f.max=f.min+d}):Fi(r,n.layoutBox,s)&&I(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=k(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=ut();Pt(a,s,n.layoutBox);const l=ut();o?Pt(l,t.applyTransform(i,!0),n.measuredBox):Pt(l,s,n.layoutBox);const u=!Mi(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 p=C();Tt(p,n.layoutBox,f.layoutBox);const m=C();Tt(m,s,d.layoutBox),Ri(p,m)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function cl(t){vt&&st.totalNodes++,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 hl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function fl(t){t.clearSnapshot()}function as(t){t.clearMeasurements()}function dl(t){t.isLayoutDirty=!1}function pl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ls(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ml(t){t.resolveTargetDelta()}function gl(t){t.calcProjection()}function yl(t){t.resetSkewAndRotation()}function vl(t){t.removeLeadSnapshot()}function us(t,e,n){t.translate=V(e.translate,0,n),t.scale=V(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function cs(t,e,n,s){t.min=V(e.min,n.min,s),t.max=V(e.max,n.max,s)}function xl(t,e,n,s){cs(t.x,e.x,n.x,s),cs(t.y,e.y,n.y,s)}function Pl(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Tl={duration:.45,ease:[.4,0,.1,1]},hs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),fs=hs("applewebkit/")&&!hs("chrome/")?Math.round:L;function ds(t){t.min=fs(t.min),t.max=fs(t.max)}function bl(t){ds(t.x),ds(t.y)}function Fi(t,e,n){return t==="position"||t==="preserve-aspect"&&!Sa(is(e),is(n),.2)}function Sl(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const Al=Li({attachResizeListener:(t,e)=>$(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ae={current:void 0},ki=Li({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ae.current){const t=new Al({});t.mount(window),t.setOptions({layoutScroll:!0}),ae.current=t}return ae.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),wl={pan:{Feature:Na},drag:{Feature:Ia,ProjectionNode:ki,MeasureLayout:Vi}};function ps(t,e){const n=e?"pointerenter":"pointerleave",s=e?"onHoverStart":"onHoverEnd",i=(r,o)=>{if(r.pointerType==="touch"||gi())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[s];l&&w.postRender(()=>l(r,o))};return X(t.current,n,i,{passive:!t.getProps()[s]})}class Vl extends tt{mount(){this.unmount=H(ps(this.node,!0),ps(this.node,!1))}unmount(){}}class Cl extends tt{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=H($(this.node.current,"focus",()=>this.onFocus()),$(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Bi=(t,e)=>e?t===e?!0:Bi(t,e.parentElement):!1;function le(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,zt(n))}class Dl extends tt{constructor(){super(...arguments),this.removeStartListeners=L,this.removeEndListeners=L,this.removeAccessibleListeners=L,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),r=X(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:h}=this.node.getProps(),f=!h&&!Bi(this.node.current,a.target)?c:u;f&&w.update(()=>f(a,l))},{passive:!(s.onTap||s.onPointerUp)}),o=X(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=H(r,o),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=r=>{if(r.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||le("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&w.postRender(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=$(this.node.current,"keyup",o),le("down",(a,l)=>{this.startPress(a,l)})},n=$(this.node.current,"keydown",e),s=()=>{this.isPressing&&le("cancel",(r,o)=>this.cancelPress(r,o))},i=$(this.node.current,"blur",s);this.removeAccessibleListeners=H(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&w.postRender(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!gi()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&w.postRender(()=>s(e,n))}mount(){const e=this.node.getProps(),n=X(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=$(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=H(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const we=new WeakMap,ue=new WeakMap,Ml=t=>{const e=we.get(t.target);e&&e(t)},Rl=t=>{t.forEach(Ml)};function El({root:t,...e}){const n=t||document;ue.has(n)||ue.set(n,{});const s=ue.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Rl,{root:t,...e})),s[i]}function Ll(t,e,n){const s=El(e);return we.set(t,n),s.observe(t),()=>{we.delete(t),s.unobserve(t)}}const Fl={some:0,all:1};class kl extends tt{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:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Fl[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!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 Ll(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Bl(e,n))&&this.startObserver()}unmount(){}}function Bl({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const jl={inView:{Feature:kl},tap:{Feature:Dl},focus:{Feature:Cl},hover:{Feature:Vl}},Ol={layout:{ProjectionNode:ki,MeasureLayout:Vi}},ji=T.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Ht=T.createContext({}),Ye=typeof window<"u",Il=Ye?T.useLayoutEffect:T.useEffect,Oi=T.createContext({strict:!1});function Nl(t,e,n,s,i){var r,o;const{visualElement:a}=T.useContext(Ht),l=T.useContext(Oi),u=T.useContext(He),c=T.useContext(ji).reducedMotion,h=T.useRef();s=s||l.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const f=h.current,d=T.useContext(wi);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&Ul(h.current,n,i,d),T.useInsertionEffect(()=>{f&&f.update(n,u)});const p=n[ri],m=T.useRef(!!p&&!(!((r=window.MotionHandoffIsComplete)===null||r===void 0)&&r.call(window,p))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,p)));return Il(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),Xe.render(f.render),m.current&&f.animationState&&f.animationState.animateChanges())}),T.useEffect(()=>{f&&(!m.current&&f.animationState&&f.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,p)}),m.current=!1))}),f}function Ul(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ii(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&<(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:u})}function Ii(t){if(t)return t.options.allowProjection!==!1?t.projection:Ii(t.parent)}function _l(t,e,n){return T.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):lt(n)&&(n.current=s))},[e])}function Xt(t){return bt(t.animate)||Me.some(e=>St(t[e]))}function Ni(t){return!!(Xt(t)||t.variants)}function Kl(t,e){if(Xt(t)){const{initial:n,animate:s}=t;return{initial:n===!1||St(n)?n:void 0,animate:St(s)?s:void 0}}return t.inherit!==!1?e:{}}function Wl(t){const{initial:e,animate:n}=Kl(t,T.useContext(Ht));return T.useMemo(()=>({initial:e,animate:n}),[ms(e),ms(n)])}function ms(t){return Array.isArray(t)?t.join(" "):t}const 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 $l(t){for(const e in t)pt[e]={...pt[e],...t[e]}}const Gl=Symbol.for("motionComponentSymbol");function zl({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&$l(t);function r(a,l){let u;const c={...T.useContext(ji),...a,layoutId:Hl(a)},{isStatic:h}=c,f=Wl(a),d=s(a,h);if(!h&&Ye){Xl();const p=Yl(c);u=p.MeasureLayout,f.visualElement=Nl(i,d,c,e,p.ProjectionNode)}return U.jsxs(Ht.Provider,{value:f,children:[u&&f.visualElement?U.jsx(u,{visualElement:f.visualElement,...c}):null,n(i,a,_l(d,f.visualElement,l),d,h,f.visualElement)]})}const o=T.forwardRef(r);return o[Gl]=i,o}function Hl({layoutId:t}){const e=T.useContext(Ai).id;return e&&t!==void 0?e+"-"+t:t}function Xl(t,e){T.useContext(Oi).strict}function Yl(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}}const ql=["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 qe(t){return typeof t!="string"||t.includes("-")?!1:!!(ql.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ui(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const r in n)t.style.setProperty(r,n[r])}const _i=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 Ki(t,e,n,s){Ui(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(_i.has(i)?i:Gt(i),e.attrs[i])}function Wi(t,{layout:e,layoutId:n}){return Q.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!_t[t]||t==="opacity")}function Ze(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(E(i[o])||e.style&&E(e.style[o])||Wi(o,t)||((s=n==null?void 0:n.getValue(o))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),r}function $i(t,e,n){const s=Ze(t,e,n);for(const i in t)if(E(t[i])||E(e[i])){const r=Ct.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}function Zl(t){const e=T.useRef(null);return e.current===null&&(e.current=t()),e.current}function Jl({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:s},i,r,o,a){const l={latestValues:Ql(i,r,o,a?!1:t,e),renderState:n()};return s&&(l.mount=u=>s(i,u,l)),l}const Gi=t=>(e,n)=>{const s=T.useContext(Ht),i=T.useContext(He),r=()=>Jl(t,e,s,i,n);return n?r():Zl(r)};function ys(t,e,n){const s=Array.isArray(e)?e:[e];for(let i=0;i<s.length;i++){const r=Ce(t,s[i]);if(r){const{transitionEnd:o,transition:a,...l}=r;n(l,o)}}}function Ql(t,e,n,s,i){var r;const o={};let a=s&&((r=t.style)===null||r===void 0?void 0:r.willChange)===void 0;const l=i(t,{});for(const m in l)o[m]=Bt(l[m]);let{initial:u,animate:c}=t;const h=Xt(t),f=Ni(t);e&&f&&!h&&t.inherit!==!1&&(u===void 0&&(u=e.initial),c===void 0&&(c=e.animate));let d=n?n.initial===!1:!1;d=d||u===!1;const p=d?c:u;return p&&typeof p!="boolean"&&!bt(p)&&ys(t,p,(m,y)=>{for(const g in m){let v=m[g];if(Array.isArray(v)){const x=d?v.length-1:0;v=v[x]}v!==null&&(o[g]=v)}for(const g in y)o[g]=y[g]}),a&&c&&u!==!1&&!bt(c)&&ys(t,c,m=>{for(const y in m)if(li(y)){o.willChange="transform";return}}),o}const Je=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),zi=()=>({...Je(),attrs:{}}),Hi=(t,e)=>e&&typeof t=="number"?e.transform(t):t,tu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eu=Ct.length;function nu(t,e,n){let s="",i=!0;for(let r=0;r<eu;r++){const o=Ct[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=Hi(a,Oe[o]);if(!l){i=!1;const c=tu[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Qe(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(Q.has(l)){o=!0;continue}else if(Bs(l)){i[l]=u;continue}else{const c=Hi(u,Oe[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=nu(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}function vs(t,e,n){return typeof t=="string"?t:P.transform(e+n*t)}function su(t,e,n){const s=vs(e,t.x,t.width),i=vs(n,t.y,t.height);return`${s} ${i}`}const iu={offset:"stroke-dashoffset",array:"stroke-dasharray"},ou={offset:"strokeDashoffset",array:"strokeDasharray"};function ru(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?iu:ou;t[r.offset]=P.transform(-s);const o=P.transform(e),a=P.transform(n);t[r.array]=`${o} ${a}`}function tn(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Qe(t,u,h),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d,dimensions:p}=t;f.transform&&(p&&(d.transform=f.transform),delete f.transform),p&&(i!==void 0||r!==void 0||d.transform)&&(d.transformOrigin=su(p,i!==void 0?i:.5,r!==void 0?r:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),o!==void 0&&ru(f,o,a,l,!1)}const en=t=>typeof t=="string"&&t.toLowerCase()==="svg",au={useVisualState:Gi({scrapeMotionValuesFromProps:$i,createRenderState:zi,onMount:(t,e,{renderState:n,latestValues:s})=>{w.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),w.render(()=>{tn(n,s,en(e.tagName),t.transformTemplate),Ki(e,n)})}})},lu={useVisualState:Gi({applyWillChange:!0,scrapeMotionValuesFromProps:Ze,createRenderState:Je})};function Xi(t,e,n){for(const s in e)!E(e[s])&&!Wi(s,n)&&(t[s]=e[s])}function uu({transformTemplate:t},e){return T.useMemo(()=>{const n=Je();return Qe(n,e,t),Object.assign({},n.vars,n.style)},[e])}function cu(t,e){const n=t.style||{},s={};return Xi(s,n,t),Object.assign(s,uu(t,e)),s}function hu(t,e){const n={},s=cu(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=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 Kt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||fu.has(t)}let Yi=t=>!Kt(t);function du(t){t&&(Yi=e=>e.startsWith("on")?!Kt(e):t(e))}try{du(require("@emotion/is-prop-valid").default)}catch{}function pu(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Yi(i)||n===!0&&Kt(i)||!e&&!Kt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function mu(t,e,n,s){const i=T.useMemo(()=>{const r=zi();return tn(r,e,en(s),t.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Xi(r,t.style,t),i.style={...r,...i.style}}return i}function gu(t=!1){return(n,s,i,{latestValues:r},o)=>{const l=(qe(n)?mu:hu)(s,r,o,n),u=pu(s,typeof n=="string",t),c=n!==T.Fragment?{...u,...l,ref:i}:{},{children:h}=s,f=T.useMemo(()=>E(h)?h.get():h,[h]);return T.createElement(n,{...c,children:f})}}function yu(t,e){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...qe(s)?au:lu,preloadedFeatures:t,useRender:gu(i),createVisualElement:e,Component:s};return zl(o)}}const Ve={current:null},qi={current:!1};function vu(){if(qi.current=!0,!!Ye)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ve.current=t.matches;t.addListener(e),e()}else Ve.current=!1}function xu(t,e,n){for(const s in e){const i=e[s],r=n[s];if(E(i))t.addValue(s,i);else if(E(r))t.addValue(s,Vt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,Vt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const xs=new WeakMap,Pu=[...Is,R,J],Tu=t=>Pu.find(Os(t)),Ps=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class bu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ke,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=K.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,w.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;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=!!r,this.isControllingVariants=Xt(n),this.isVariantNode=Ni(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&&E(d)&&d.set(l[f],!1)}}mount(e){this.current=e,xs.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)),qi.current||vu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ve.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){xs.delete(this.current),this.projection&&this.projection.unmount(),q(this.notifyUpdate),q(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=Q.has(e),i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&w.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r(),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 r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):C()}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<Ps.length;s++){const i=Ps[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=xu(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=Vt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Fs(i)||Ls(i))?i=parseFloat(i):!Tu(i)&&J.test(n)&&(i=zs(e,n)),this.setBaseTarget(e,E(i)?i.get():i)),E(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const o=Ce(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[e])}if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!E(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new ze),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Zi extends bu{constructor(){super(...arguments),this.KeyframeResolver=Hs}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]}}function Su(t){return window.getComputedStyle(t)}class Au extends Zi{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Ui}readValueFromInstance(e,n){if(Q.has(n)){const s=Ie(n);return s&&s.default||0}else{const s=Su(e),i=(Bs(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return bi(e,n)}build(e,n,s){Qe(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ze(e,n,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;E(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class wu extends Zi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=C}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Q.has(n)){const s=Ie(n);return s&&s.default||0}return n=_i.has(n)?n:Gt(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return $i(e,n,s)}build(e,n,s){tn(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,i){Ki(e,n,s,i)}mount(e){this.isSVGTag=en(e.tagName),super.mount(e)}}const Vu=(t,e)=>qe(t)?new wu(e):new Au(e,{allowProjection:t!==T.Fragment}),Cu=yu({...pa,...jl,...wl,...Ol},Vu),ce=oo(Cu);function nn(){const t=no("root"),e=so().find(n=>{var s;return n.formAction==="/progress"&&((s=n.formData)==null?void 0:s.has("complete"))});return!e||!(t!=null&&t.progress)?(t==null?void 0:t.progress)??null:t.progress.map(n=>{var r,o;const s=((r=e.formData)==null?void 0:r.get("complete"))==="true";return((o=e.formData)==null?void 0:o.get("lessonSlug"))===n.epicLessonSlug?{...n,epicCompletedAt:s?Date.now():null}:n})}function Ou(){const t=Ts().pathname,e=nn();if(!e)return null;const n=a=>a.type==="workshop-instructions"?0:a.type==="workshop-finished"?1e4:a.type==="instructions"?a.exerciseNumber*100:a.type==="step"?a.exerciseNumber*100+a.stepNumber:a.type==="finished"?a.exerciseNumber*100+100:a.type==="unknown"?1e5:-1,i=e.sort((a,l)=>n(a)-n(l)).find(a=>!a.epicCompletedAt);if(!i||i.type==="unknown")return null;if(i.type==="workshop-instructions")return"/";if(i.type==="workshop-finished")return"/finished";const r=i.exerciseNumber.toString().padStart(2,"0");if(i.type==="instructions")return`/exercise/${r}`;if(i.type==="finished")return`/exercise/${r}/finished`;const o=i.stepNumber.toString().padStart(2,"0");if(i.type==="step"){const a=`/exercise/${r}/${o}/problem`,l=`/exercise/${r}/${o}/solution`;return t===a||t===l?l:a}return null}const Du={0:"",1:"before:h-[10%]",2:"before:h-[20%]",3:"before:h-[30%]",4:"before:h-[40%]",5:"before:h-[50%]",6:"before:h-[60%]",7:"before:h-[70%]",8:"before:h-[80%]",9:"before:h-[90%]",10:"before:h-[100%]"};function Iu(t){const e=nn();if(!(e!=null&&e.length))return null;const n=e.filter(r=>(r.type==="instructions"||r.type==="step"||r.type==="finished")&&r.exerciseNumber===t);if(!n.length)return null;const s=n.reduce((r,o)=>o.epicCompletedAt?r+1:r,0)/n.length,i=Math[s>.1?"floor":"ceil"](s*10);return`relative ${Du[i]} before:bg-highlight before:absolute before:left-0 before:top-0 before:w-[4px]`}function Nu(t){const e=Ji(t);return e!=null&&e.epicCompletedAt?"relative before:h-[100%] before:bg-highlight before:absolute before:left-0 before:top-0 before:w-[4px]":null}function Ji({exerciseNumber:t,stepNumber:e,type:n}){const s=nn();return s!=null&&s.length?n==="workshop-finished"||n==="workshop-instructions"?s.find(i=>i.type===n)??null:n==="instructions"||n==="finished"?s.find(i=>i.type===n&&i.exerciseNumber===t)??null:n==="step"?s.find(i=>i.type===n&&i.exerciseNumber===t&&i.stepNumber===e)??null:null:null}function Uu({className:t,...e}){var m,y,g,v;const n=io(),s=eo(),i=Ji(e),r=T.useRef(null),o=T.useRef(null),a=(m=n.formData)!=null&&m.has("complete")?n.formData.get("complete")==="true":!!(i!=null&&i.epicCompletedAt),[l,u]=T.useState(!1),c=Ts(),h=to(),f=(g=(y=h.location)==null?void 0:y.state)==null?void 0:g.from,d=(v=h.location)==null?void 0:v.pathname,p=c.pathname;return T.useEffect(()=>{var x;f==="continue next lesson button"&&p===d&&(u(!0),(x=o.current)==null||x.focus())},[c.key,p,d,f]),T.useEffect(()=>{let x=!0;if(l)return new Promise(b=>setTimeout(b,200)).then(async()=>{if(!x||!r.current)return;const b=r.current.getAnimations().map(({finished:S})=>S);return Promise.allSettled(b).then(()=>{x&&u(!1)})}),()=>{x=!1}},[l]),ENV.EPICSHOP_DEPLOYED||!i?null:U.jsxs(n.Form,{method:"POST",action:"/progress",children:[s,U.jsx("input",{type:"hidden",name:"lessonSlug",value:i.epicLessonSlug}),U.jsx("input",{type:"hidden",name:"complete",value:(!a).toString()}),U.jsxs(ce.button,{ref:o,onClick:()=>{u(!a)},type:"submit",className:rn("group relative flex w-full items-center justify-between overflow-hidden transition hover:bg-[hsl(var(--foreground)/0.02)] focus:bg-[hsl(var(--foreground)/0.02)]",t),children:[a?"Mark as incomplete":"Mark as complete",l?U.jsx(ce.div,{ref:r,className:"absolute right-0 h-20 w-20 rounded-full bg-foreground/20",initial:{scale:.5,opacity:0},animate:{scale:[.5,2],opacity:[0,1,0]},transition:{duration:1,ease:"easeInOut"}}):null,U.jsx(ce.div,{"aria-hidden":!0,className:rn("relative flex h-8 w-8 items-center justify-center overflow-hidden rounded-full border transition",{"bg-foreground text-background duration-1000":a,"duration-100 group-hover:bg-background":!a}),children:a?"✓":U.jsx("div",{className:"absolute -translate-y-10 opacity-25 transition group-hover:translate-y-0",children:"✓"})})]})]})}export{Uu as P,nn as a,ia as b,Zl as c,Il as d,Ou as e,Nu as f,ce as m,Jr as s,Iu as u};
|
|
2
|
+
//# sourceMappingURL=progress-DwE8EkAa.js.map
|