@harperfast/harper 5.2.7 → 5.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/components/mcp/tools/application.ts +8 -4
  2. package/dist/components/mcp/tools/application.js +7 -4
  3. package/dist/components/mcp/tools/application.js.map +1 -1
  4. package/dist/resources/RocksTransactionLogStore.js +11 -1
  5. package/dist/resources/RocksTransactionLogStore.js.map +1 -1
  6. package/dist/resources/Table.js +2 -1
  7. package/dist/resources/Table.js.map +1 -1
  8. package/dist/resources/auditStore.d.ts +1 -0
  9. package/dist/resources/auditStore.js +1 -0
  10. package/dist/resources/auditStore.js.map +1 -1
  11. package/dist/resources/transactionBroadcast.js +5 -5
  12. package/dist/resources/transactionBroadcast.js.map +1 -1
  13. package/npm-shrinkwrap.json +43 -43
  14. package/package.json +3 -3
  15. package/resources/RocksTransactionLogStore.ts +11 -1
  16. package/resources/Table.ts +2 -1
  17. package/resources/auditStore.ts +3 -1
  18. package/resources/transactionBroadcast.ts +5 -5
  19. package/studio/web/assets/{Chat-etJeJv4a.js → Chat-DDlysEi_.js} +1 -1
  20. package/studio/web/assets/{FloatingChat-BvmHsuVo.js → FloatingChat-DdJ3DZJX.js} +3 -3
  21. package/studio/web/assets/{apiToken-Bl5LC8EH.js → apiToken-CrPb_98N.js} +1 -1
  22. package/studio/web/assets/{applications-Dta6Y0Rg.js → applications-C6Y4nL_X.js} +1 -1
  23. package/studio/web/assets/{cssMode-IAbO_2KK.js → cssMode-D8ceA4av.js} +1 -1
  24. package/studio/web/assets/{editor-CeRXEhRl.js → editor-C-jlLd1G.js} +1 -1
  25. package/studio/web/assets/{html-DOV4s_YT.js → html-BnuKFPjv.js} +1 -1
  26. package/studio/web/assets/{htmlMode-CdqjnAh4.js → htmlMode-DXM6YYUw.js} +1 -1
  27. package/studio/web/assets/{index-CTqasm6g.js → index-BtTvoLf8.js} +5 -5
  28. package/studio/web/assets/{index.lazy-VmcKgiEy.js → index.lazy-PVbC6xQh.js} +1 -1
  29. package/studio/web/assets/{javascript-Dj7yXfx5.js → javascript-CAuAkYxc.js} +1 -1
  30. package/studio/web/assets/{jsonMode-khk65qzx.js → jsonMode-Dny8hrU7.js} +1 -1
  31. package/studio/web/assets/{languageServices-D_06p7dw.js → languageServices-D1uNqC6s.js} +1 -1
  32. package/studio/web/assets/{lspLanguageFeatures-DTA6wyQw.js → lspLanguageFeatures-Bh-bvkyK.js} +1 -1
  33. package/studio/web/assets/{notifications-CBZXgxVc.js → notifications-DPTOF-SX.js} +1 -1
  34. package/studio/web/assets/{notifications-Bah46LXX.js → notifications-DsE0S3zT.js} +1 -1
  35. package/studio/web/assets/{profile-QspOun_j.js → profile-BIeCZr-w.js} +1 -1
  36. package/studio/web/assets/{regions-QdUi7bQ9.js → regions-B5lGduv5.js} +1 -1
  37. package/studio/web/assets/{register-Buvoxmb8.js → register-Cvc1TpmQ.js} +2 -2
  38. package/studio/web/assets/{setComponentFile-BI4E_iDe.js → setComponentFile-D8ZLDWhU.js} +1 -1
  39. package/studio/web/assets/{setup-Cop6LBQN.js → setup-D2az-Ue_.js} +2 -2
  40. package/studio/web/assets/{status-DRu3zRgl.js → status-BJegPrWN.js} +1 -1
  41. package/studio/web/assets/{toggleHighContrast-C0dJLmZ0.js → toggleHighContrast-BdIEw2rK.js} +1 -1
  42. package/studio/web/assets/{tsMode-dbDiapTA.js → tsMode-CulNMwI9.js} +1 -1
  43. package/studio/web/assets/{typescript-CT1826cL.js → typescript-BpRqjmvQ.js} +1 -1
  44. package/studio/web/assets/{useEntityRestURL-D1u1X_gE.js → useEntityRestURL-C7x-Yz9r.js} +1 -1
  45. package/studio/web/assets/{workers-FpR9_D2K.js → workers-B2WpJDK9.js} +1 -1
  46. package/studio/web/assets/{xml-ZjKUMjth.js → xml-CZnimVSX.js} +1 -1
  47. package/studio/web/assets/{yaml-B6gXbZU6.js → yaml-BwNuyZS-.js} +1 -1
  48. package/studio/web/index.html +1 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Chat-etJeJv4a.js","assets/rolldown-runtime-hePW80VL.js","assets/vendor-core-RCcadM3e.js","assets/button-DhiX-njv.js","assets/vendor-datadog-BRv-mOv1.js","assets/vendor-react-Dyj4O3HE.js","assets/vendor-ui-vhu-UHhF.js","assets/vendor-tanstack-BiFWSB3W.js","assets/setSessionStorage-B0bf71m4.js","assets/safeParse-DeaoCCWH.js","assets/createLucideIcon-BKGPfjm2.js","assets/chevron-up-Df2c8uoU.js","assets/setComponentFile-BI4E_iDe.js","assets/index-CTqasm6g.js","assets/authStore-qKmCZcaf.js","assets/dialog-CBf0Mr1d.js","assets/x-B9o9hsep.js","assets/setLocalStorage-D_kflv4U.js","assets/useLocalStorage-Dtj1QS8_.js","assets/errorText-NpBmvk9I.js","assets/index-Cxj2_wsl.css","assets/useEntityRestURL-D1u1X_gE.js","assets/getAnalytics-D4LKGeVy.js","assets/Chat-B-7kW9XZ.css"])))=>i.map(i=>d[i]);
2
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,i as n}from"./vendor-datadog-BRv-mOv1.js";import{r}from"./vendor-react-Dyj4O3HE.js";import{t as i}from"./createLucideIcon-BKGPfjm2.js";import{n as a}from"./setLocalStorage-D_kflv4U.js";import{t as o}from"./useLocalStorage-Dtj1QS8_.js";import{Jn as s,Pt as c}from"./index-CTqasm6g.js";var l=i(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),u=e(t(),1),d=(0,u.createContext)({});function f(e){let t=(0,u.useRef)(null);return t.current===null&&(t.current=e()),t.current}var p=typeof window<`u`?u.useLayoutEffect:u.useEffect,m=(0,u.createContext)(null);function h(e,t){e.indexOf(t)===-1&&e.push(t)}function g(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var _=(e,t,n)=>n>t?t:n<e?e:n,v={},y=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),b=e=>typeof e==`object`&&!!e,x=e=>/^0[^.\s]+$/u.test(e);function S(e){let t;return()=>(t===void 0&&(t=e()),t)}var C=e=>e,w=(...e)=>e.reduce((e,t)=>n=>t(e(n))),T=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},E=class{constructor(){this.subscriptions=[]}add(e){return h(this.subscriptions,e),()=>g(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},D=e=>e*1e3,O=e=>e/1e3,ee=(e,t)=>t?1e3/t*e:0,te=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ne=1e-7,re=12;function ie(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=te(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>ne&&++s<re);return o}function ae(e,t,n,r){if(e===t&&n===r)return C;let i=t=>ie(t,0,1,e,n);return e=>e===0||e===1?e:te(i(e),t,r)}var oe=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,se=e=>t=>1-e(1-t),ce=ae(.33,1.53,.69,.99),le=se(ce),ue=oe(le),de=e=>e>=1?1:(e*=2)<1?.5*le(e):.5*(2-2**(-10*(e-1))),fe=e=>1-Math.sin(Math.acos(e)),pe=se(fe),me=oe(fe),he=ae(.42,0,1,1),ge=ae(0,0,.58,1),_e=ae(.42,0,.58,1),ve=e=>Array.isArray(e)&&typeof e[0]!=`number`,ye=e=>Array.isArray(e)&&typeof e[0]==`number`,be={linear:C,easeIn:he,easeInOut:_e,easeOut:ge,circIn:fe,circInOut:me,circOut:pe,backIn:le,backInOut:ue,backOut:ce,anticipate:de},xe=e=>typeof e==`string`,Se=e=>{if(ye(e)){e.length;let[t,n,r,i]=e;return ae(t,n,r,i)}return xe(e)?(be[e],`${e}`,be[e]):e},Ce=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function we(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var Te=40;function Ee(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Ce.reduce((e,t)=>(e[t]=we(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=v.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Te),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Ce.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Ce.length;t++)o[Ce[t]].cancel(e)},state:i,steps:o}}var{schedule:k,cancel:A,state:j,steps:De}=Ee(typeof requestAnimationFrame<`u`?requestAnimationFrame:C,!0),Oe;function ke(){Oe=void 0}var M={now:()=>(Oe===void 0&&M.set(j.isProcessing||v.useManualTiming?j.timestamp:performance.now()),Oe),set:e=>{Oe=e,queueMicrotask(ke)}},Ae=e=>t=>typeof t==`string`&&t.startsWith(e),je=Ae(`--`),Me=Ae(`var(--`),Ne=e=>Me(e)?Pe.test(e.split(`/*`)[0].trim()):!1,Pe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Fe(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var Ie={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Le={...Ie,transform:e=>_(0,1,e)},Re={...Ie,default:1},ze=e=>Math.round(e*1e5)/1e5,Be=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ve(e){return e==null}var He=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ue=(e,t)=>n=>!!(typeof n==`string`&&He.test(n)&&n.startsWith(e)||t&&!Ve(n)&&Object.prototype.hasOwnProperty.call(n,t)),We=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Be);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Ge=e=>_(0,255,e),Ke={...Ie,transform:e=>Math.round(Ge(e))},qe={test:Ue(`rgb`,`red`),parse:We(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Ke.transform(e)+`, `+Ke.transform(t)+`, `+Ke.transform(n)+`, `+ze(Le.transform(r))+`)`};function Je(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Ye={test:Ue(`#`),parse:Je,transform:qe.transform},Xe=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),N=Xe(`deg`),P=Xe(`%`),F=Xe(`px`),Ze=Xe(`vh`),Qe=Xe(`vw`),$e={...P,parse:e=>P.parse(e)/100,transform:e=>P.transform(e*100)},et={test:Ue(`hsl`,`hue`),parse:We(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+P.transform(ze(t))+`, `+P.transform(ze(n))+`, `+ze(Le.transform(r))+`)`},I={test:e=>qe.test(e)||Ye.test(e)||et.test(e),parse:e=>qe.test(e)?qe.parse(e):et.test(e)?et.parse(e):Ye.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?qe.transform(e):et.transform(e),getAnimatableNone:e=>{let t=I.parse(e);return t.alpha=0,I.transform(t)}},tt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function nt(e){return isNaN(e)&&typeof e==`string`&&(e.match(Be)?.length||0)+(e.match(tt)?.length||0)>0}var rt=`number`,it=`color`,at=`var`,ot=`var(`,st="${}",ct=/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 lt(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(ct,e=>(I.test(e)?(r.color.push(a),i.push(it),n.push(I.parse(e))):e.startsWith(ot)?(r.var.push(a),i.push(at),n.push(e)):(r.number.push(a),i.push(rt),n.push(parseFloat(e))),++a,st)).split(st),indexes:r,types:i}}function ut(e){return lt(e).values}function dt({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===rt?ze(r[a]):e===it?I.transform(r[a]):r[a]}return i}}function ft(e){return dt(lt(e))}var pt=e=>typeof e==`number`?0:I.test(e)?I.getAnimatableNone(e):e,mt=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:pt(e);function ht(e){let t=lt(e);return dt(t)(t.values.map((e,n)=>mt(e,t.split[n])))}var L={test:nt,parse:ut,createTransformer:ft,getAnimatableNone:ht};function gt(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function _t({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=gt(s,r,e+1/3),a=gt(s,r,e),o=gt(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function vt(e,t){return n=>n>0?t:e}var R=(e,t,n)=>e+(t-e)*n,yt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},bt=[Ye,qe,et],xt=e=>bt.find(t=>t.test(e));function St(e){let t=xt(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===et&&(n=_t(n)),n}var Ct=(e,t)=>{let n=St(e),r=St(t);if(!n||!r)return vt(e,t);let i={...n};return e=>(i.red=yt(n.red,r.red,e),i.green=yt(n.green,r.green,e),i.blue=yt(n.blue,r.blue,e),i.alpha=R(n.alpha,r.alpha,e),qe.transform(i))},wt=new Set([`none`,`hidden`]);function Tt(e,t){return wt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Et(e,t){return n=>R(e,t,n)}function Dt(e){return typeof e==`number`?Et:typeof e==`string`?Ne(e)?vt:I.test(e)?Ct:jt:Array.isArray(e)?Ot:typeof e==`object`?I.test(e)?Ct:kt:vt}function Ot(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Dt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function kt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Dt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function At(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var jt=(e,t)=>{let n=L.createTransformer(t),r=lt(e),i=lt(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?wt.has(e)&&!i.values.length||wt.has(t)&&!r.values.length?Tt(e,t):w(Ot(At(r,i),i.values),n):(`${e}${t}`,vt(e,t))};function Mt(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?R(e,t,n):Dt(e)(e,t)}var Nt=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>k.update(t,e),stop:()=>A(t),now:()=>j.isProcessing?j.timestamp:M.now()}},Pt=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Ft=2e4;function It(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function Lt(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(It(r),Ft);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:O(i)}}var z={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Rt(e,t){return e*Math.sqrt(1-t*t)}var zt=12;function Bt(e,t,n){let r=n;for(let n=1;n<zt;n++)r-=e(r)/t(r);return r}var Vt=.001;function Ht({duration:e=z.duration,bounce:t=z.bounce,velocity:n=z.velocity,mass:r=z.mass}){let i,a;z.maxDuration;let o=1-t;o=_(z.minDamping,z.maxDamping,o),e=_(z.minDuration,z.maxDuration,O(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Rt(t,o),c=Math.exp(-i);return Vt-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Rt(t**2,o);return(-i(t)+Vt>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Bt(i,a,s);if(e=D(e),isNaN(c))return{stiffness:z.stiffness,damping:z.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Ut=[`duration`,`bounce`],Wt=[`stiffness`,`damping`,`mass`];function Gt(e,t){return t.some(t=>e[t]!==void 0)}function Kt(e){let t={velocity:z.velocity,stiffness:z.stiffness,damping:z.damping,mass:z.mass,isResolvedFromDuration:!1,...e};if(!Gt(e,Wt)&&Gt(e,Ut)){if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*_(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:z.mass,stiffness:i,damping:a}}else{let n=Ht({...e,velocity:0});t={...t,...n,mass:z.mass},t.isResolvedFromDuration=!0}}return t}function qt(e=z.visualDuration,t=z.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Kt({...n,velocity:-O(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=O(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?z.restSpeed.granular:z.restSpeed.default,i||=v?z.restDelta.granular:z.restDelta.default;let y,b,x,S,C,w;if(h<1)x=Rt(_,h),S=(m+h*_*g)/x,y=e=>{let t=Math.exp(-h*_*e);return o-t*(S*Math.sin(x*e)+g*Math.cos(x*e))},C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>D(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=D(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=D(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(It(T),Ft),t=Pt(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}qt.applyToOptions=e=>{let t=Lt(e,100,qt);return e.ease=t.ease,e.duration=D(t.duration),e.type=`keyframes`,e};var Jt=5;function Yt(e,t,n){let r=Math.max(t-Jt,0);return ee(n-e(r),t-r)}function Xt({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=qt({keyframes:[f.value,m(f.value)],velocity:Yt(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function Zt(e,t,n){let r=[],i=n||v.mix||Mt,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=w(Array.isArray(t)?t[n]||C:t,a)),r.push(a)}return r}function Qt(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Zt(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=T(e[r],e[r+1],n);return s[r](i)};return n?t=>l(_(e[0],e[a-1],t)):l}function $t(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=T(0,t,r);e.push(R(n,1,i))}}function en(e){let t=[0];return $t(t,e.length-1),t}function tn(e,t){return e.map(e=>e*t)}function nn(e,t){return e.map(()=>t||_e).splice(0,e.length-1)}function rn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=ve(r)?r.map(Se):Se(r),a={done:!1,value:t[0]},o=Qt(tn(n&&n.length===t.length?n:en(t),e),t,{ease:Array.isArray(i)?i:nn(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var an=e=>e!==null;function on(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(an),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var sn={decay:Xt,inertia:Xt,tween:rn,keyframes:rn,spring:qt};function cn(e){typeof e.type==`string`&&(e.type=sn[e.type])}var ln=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},un=e=>e/100,dn=class extends ln{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==M.now()&&this.tick(M.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;cn(e);let{type:t=rn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||rn;s!==rn&&typeof o[0]!=`number`&&(this.mixKeyframes=w(un,Mt(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=It(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let y=this.currentTime,b=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(b=a)),y=_(0,1,n)*o}let x;v?(this.delayState.value=l[0],x=this.delayState):x=b.next(y),i&&!v&&(x.value=i(x.value));let{done:S}=x;!v&&s!==null&&(S=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let C=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&S);return C&&p!==Xt&&(x.value=on(l,this.options,h,this.speed)),m&&m(x.value),C&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return O(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+O(e)}get time(){return O(this.currentTime)}set time(e){e=D(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return Yt(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(M.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=O(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Nt,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(M.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function fn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var pn=e=>e*180/Math.PI,mn=e=>gn(pn(Math.atan2(e[1],e[0]))),hn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:mn,rotateZ:mn,skewX:e=>pn(Math.atan(e[1])),skewY:e=>pn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},gn=e=>(e%=360,e<0&&(e+=360),e),_n=mn,vn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),yn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),bn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:vn,scaleY:yn,scale:e=>(vn(e)+yn(e))/2,rotateX:e=>gn(pn(Math.atan2(e[6],e[5]))),rotateY:e=>gn(pn(Math.atan2(-e[2],e[0]))),rotateZ:_n,rotate:_n,skewX:e=>pn(Math.atan(e[4])),skewY:e=>pn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function xn(e){return+!!e.includes(`scale`)}function Sn(e,t){if(!e||e===`none`)return xn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=bn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=hn,i=t}if(!i)return xn(t);let a=r[t],o=i[1].split(`,`).map(wn);return typeof a==`function`?a(o):o[a]}var Cn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Sn(n,t)};function wn(e){return parseFloat(e.trim())}var Tn=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],En=new Set([...Tn,`pathRotation`]),Dn=e=>e===Ie||e===F,On=new Set([`x`,`y`,`z`]),kn=Tn.filter(e=>!On.has(e));function An(e){let t=[];return kn.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var B={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Sn(t,`x`),y:(e,{transform:t})=>Sn(t,`y`)};B.translateX=B.x,B.translateY=B.y;var V=new Set,jn=!1,Mn=!1,Nn=!1;function Pn(){if(Mn){let e=Array.from(V).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=An(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Mn=!1,jn=!1,V.forEach(e=>e.complete(Nn)),V.clear()}function Fn(){V.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mn=!0)})}function In(){Nn=!0,Fn(),Pn(),Nn=!1}var Ln=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(V.add(this),jn||(jn=!0,k.read(Fn),k.resolveKeyframes(Pn))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}fn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),V.delete(this)}cancel(){this.state===`scheduled`&&(V.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Rn=e=>e.startsWith(`--`);function zn(e,t,n){Rn(t)?e.style.setProperty(t,n):e.style[t]=n}var Bn={};function Vn(e,t){let n=S(e);return()=>Bn[t]??n()}var Hn=Vn(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Un=Vn(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Wn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Gn={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Wn([0,.65,.55,1]),circOut:Wn([.55,0,1,.45]),backIn:Wn([.31,.01,.66,-.59]),backOut:Wn([.33,1.53,.69,.99])};function Kn(e,t){if(e)return typeof e==`function`?Un()?Pt(e,t):`ease-out`:ye(e)?Wn(e):Array.isArray(e)?e.map(e=>Kn(e,t)||Gn.easeOut):Gn[e]}function qn(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Kn(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function Jn(e){return typeof e==`function`&&`applyToOptions`in e}function Yn({type:e,...t}){return Jn(e)&&Un()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Xn=class extends ln{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Yn(e);this.animation=qn(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=on(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),zn(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return O(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+O(e)}get time(){return O(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=D(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Hn()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),C):r(this)}},Zn={anticipate:de,backInOut:ue,circInOut:me};function Qn(e){return e in Zn}function $n(e){typeof e.ease==`string`&&Qn(e.ease)&&(e.ease=Zn[e.ease])}var er=10,tr=class extends Xn{constructor(e){$n(e),cn(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new dn({...a,autoplay:!1}),s=Math.max(er,M.now()-this.startTime),c=_(0,er,s-er),l=o.sample(s).value,{name:u}=this.options;i&&u&&zn(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},nr=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(L.test(e)||e===`0`)&&!e.startsWith(`url(`));function rr(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function ir(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=nr(i,t),s=nr(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:rr(e)||(n===`spring`||Jn(n))&&r}function ar(e){e.duration=0,e.type=`keyframes`}var or=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),sr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function cr(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&sr.test(e[t]))return!0;return!1}var lr=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),ur=S(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function dr(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e,c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return ur()&&n&&(or.has(n)||lr.has(n)&&cr(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var fr=40,pr=class extends ln{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=M.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||Ln;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=M.now();let u=!0;ir(e,i,a,o)||(u=!1,(v.instantAnimations||!s)&&l?.(on(e,n,t)),e[0]=e[e.length-1],ar(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>fr?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&dr(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new tr({...d,element:p})}catch{m=new dn(d)}else m=new dn(d);m.finished.then(()=>{this.notifyFinished()}).catch(C),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),In()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function mr(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var hr=30,gr=e=>!isNaN(parseFloat(e)),_r={current:void 0},vr=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=M.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=M.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=gr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new E);let n=this.events[e].add(t);return e===`change`?()=>{n(),k.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return _r.current&&_r.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=M.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>hr)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,hr);return ee(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function yr(e,t){return new vr(e,t)}function br(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function xr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:br(n,e)}var Sr={type:`spring`,stiffness:500,damping:25,restSpeed:10},Cr=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),wr={type:`keyframes`,duration:.8},Tr={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Er=(e,{keyframes:t})=>t.length>2?wr:En.has(e)?e.startsWith(`scale`)?Cr(t[1]):Sr:Tr,Dr=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Or(e){for(let t in e)if(!Dr.has(t))return!0;return!1}var kr=(e,t,n,r={},i,a)=>o=>{let s=xr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=D(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Or(s)||Object.assign(u,Er(e,u)),u.duration&&=D(u.duration),u.repeatDelay&&=D(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ar(u),u.delay===0&&(d=!0)),(v.instantAnimations||v.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,ar(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=on(u.keyframes,s);if(e!==void 0){k.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new dn(u):new pr(u)},Ar=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function jr(e){let t=Ar.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Mr(e,t,n=1){`${e}`;let[r,i]=jr(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return y(e)?parseFloat(e):e}return Ne(i)?Mr(i,t,n+1):i}function Nr(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Pr(e,t,n,r){if(typeof t==`function`){let[i,a]=Nr(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Nr(r);t=t(n===void 0?e.custom:n,i,a)}return t}function H(e,t,n){let r=e.getProps();return Pr(r,t,n===void 0?r.custom:n,e)}var Fr=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Tn]),Ir=e=>Array.isArray(e);function Lr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,yr(n))}function Rr(e){return Ir(e)?e[e.length-1]||0:e}function zr(e,t){let{transitionEnd:n={},transition:r={},...i}=H(e,t)||{};i={...i,...n};for(let t in i)Lr(e,t,Rr(i[t]))}var U=e=>!!(e&&e.getVelocity);function Br(e){return!!(U(e)&&e.add)}function Vr(e,t){let n=e.getValue(`willChange`);if(Br(n))return n.add(t);if(!n&&v.WillChange){let n=new v.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Hr(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Ur=`data-`+Hr(`framerAppearId`);function Wr(e){return e.props[Ur]}var Gr=typeof window<`u`;function Kr({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function qr(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?br(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Kr(f,t))continue;let o={delay:n,...xr(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){k.update(()=>r.set(i));continue}let p=!1;if(Gr&&window.MotionHandoffAnimation){let n=Wr(e);if(n){let e=window.MotionHandoffAnimation(n,t,k);e!==null&&(o.startTime=e,p=!0)}}Vr(e,t);let m=l??e.shouldReduceMotion;r.start(kr(t,r,i,m&&Fr.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>k.update(()=>{o&&zr(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Jr(e,t,n={}){let r=H(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(qr(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Yr(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}return Promise.all([a(),o(n.delay)])}function Yr(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Jr(c,t,{...o,delay:n+(typeof r==`function`?0:r)+mr(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Xr(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Jr(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Jr(e,t,n);else{let i=typeof t==`function`?H(e,t,n.custom):t;r=Promise.all(qr(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Zr={test:e=>e===`auto`,parse:e=>e},Qr=e=>t=>t.test(e),$r=[Ie,F,P,N,Qe,Ze,Zr],ei=e=>$r.find(Qr(e));function ti(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||x(e)}var ni=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function ri(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Be)||[];if(!r)return e;let i=n.replace(r,``),a=+!!ni.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var ii=/\b([a-z-]*)\(.*?\)/gu,ai={...L,getAnimatableNone:e=>{let t=e.match(ii);return t?t.map(ri).join(` `):e}},oi={...L,getAnimatableNone:e=>{let t=L.parse(e);return L.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},si={...Ie,transform:Math.round},ci={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,inset:F,insetBlock:F,insetBlockStart:F,insetBlockEnd:F,insetInline:F,insetInlineStart:F,insetInlineEnd:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,paddingBlock:F,paddingBlockStart:F,paddingBlockEnd:F,paddingInline:F,paddingInlineStart:F,paddingInlineEnd:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,marginBlock:F,marginBlockStart:F,marginBlockEnd:F,marginInline:F,marginInlineStart:F,marginInlineEnd:F,fontSize:F,backgroundPositionX:F,backgroundPositionY:F,rotate:N,pathRotation:N,rotateX:N,rotateY:N,rotateZ:N,scale:Re,scaleX:Re,scaleY:Re,scaleZ:Re,skew:N,skewX:N,skewY:N,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:Le,originX:$e,originY:$e,originZ:F,zIndex:si,fillOpacity:Le,strokeOpacity:Le,numOctaves:si},li={...ci,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:ai,WebkitFilter:ai,mask:oi,WebkitMask:oi},ui=e=>li[e],di=new Set([ai,oi]);function fi(e,t){let n=ui(e);return di.has(n)||(n=L),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var pi=new Set([`auto`,`none`,`0`]);function mi(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!pi.has(t)&&lt(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=fi(n,i)}var hi=class extends Ln{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Ne(r))){let i=Mr(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Fr.has(n)||e.length!==2)return;let[r,i]=e,a=ei(r),o=ei(i);if(Fe(r)!==Fe(i)&&B[n]){this.needsMeasurement=!0;return}if(a!==o){if(Dn(a)&&Dn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else B[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||ti(e[t]))&&n.push(t);n.length&&mi(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=B[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=B[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},gi=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function _i(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var vi=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function yi(e){return b(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:bi,cancel:xi}=Ee(queueMicrotask,!1),W={x:!1,y:!1};function Si(){return W.x||W.y}function Ci(e){return e===`x`||e===`y`?W[e]?null:(W[e]=!0,()=>{W[e]=!1}):W.x||W.y?null:(W.x=W.y=!0,()=>{W.x=W.y=!1})}function wi(e,t){let n=_i(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Ti(e){return!(e.pointerType===`touch`||Si())}function Ei(e,t,n={}){let[r,i,a]=wi(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!Ti(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Di=(e,t)=>t?e===t||Di(e,t.parentElement):!1,Oi=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,ki=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Ai(e){return ki.has(e.tagName)||e.isContentEditable===!0}var ji=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Mi(e){return ji.has(e.tagName)||e.isContentEditable===!0}var Ni=new WeakSet;function Pi(e){return t=>{t.key===`Enter`&&e(t)}}function Fi(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Ii=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Pi(()=>{if(Ni.has(n))return;Fi(n,`down`);let e=Pi(()=>{Fi(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Fi(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Li(e){return Oi(e)&&!Si()}var Ri=new WeakSet;function zi(e,t,n={}){let[r,i,a]=wi(e,n),o=e=>{let r=e.currentTarget;if(!Li(e)||Ri.has(e))return;Ni.add(r),n.stopPropagation&&Ri.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),Ni.has(r)&&Ni.delete(r),Li(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||Di(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),yi(e)&&(e.addEventListener(`focus`,e=>Ii(e,i)),!Ai(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Bi(e){return b(e)&&`ownerSVGElement`in e}var Vi=new WeakMap,Hi,Ui=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Bi(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Wi=Ui(`inline`,`width`,`offsetWidth`),Gi=Ui(`block`,`height`,`offsetHeight`);function Ki({target:e,borderBoxSize:t}){Vi.get(e)?.forEach(n=>{n(e,{get width(){return Wi(e,t)},get height(){return Gi(e,t)}})})}function qi(e){e.forEach(Ki)}function Ji(){typeof ResizeObserver>`u`||(Hi=new ResizeObserver(qi))}function Yi(e,t){Hi||Ji();let n=_i(e);return n.forEach(e=>{let n=Vi.get(e);n||(n=new Set,Vi.set(e,n)),n.add(t),Hi?.observe(e)}),()=>{n.forEach(e=>{let n=Vi.get(e);n?.delete(t),n?.size||Hi?.unobserve(e)})}}var Xi=new Set,Zi;function Qi(){Zi=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Xi.forEach(t=>t(e))},window.addEventListener(`resize`,Zi)}function $i(e){return Xi.add(e),Zi||Qi(),()=>{Xi.delete(e),!Xi.size&&typeof Zi==`function`&&(window.removeEventListener(`resize`,Zi),Zi=void 0)}}function ea(e,t){return typeof e==`function`?$i(e):Yi(e,t)}var ta={value:null,addProjectionMetrics:null};function na(e){return Bi(e)&&e.tagName===`svg`}var ra=[...$r,I,L],ia=e=>ra.find(Qr(e)),aa=()=>({translate:0,scale:1,origin:0,originPoint:0}),oa=()=>({x:aa(),y:aa()}),sa=()=>({min:0,max:0}),G=()=>({x:sa(),y:sa()}),ca=new WeakMap;function la(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function ua(e){return typeof e==`string`||Array.isArray(e)}var da=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],fa=[`initial`,...da];function pa(e){return la(e.animate)||fa.some(t=>ua(e[t]))}function ma(e){return!!(pa(e)||e.variants)}function ha(e,t,n){for(let r in t){let i=t[r],a=n[r];if(U(i))e.addValue(r,i);else if(U(a))e.addValue(r,yr(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,yr(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var ga={current:null},_a={current:!1},va=typeof window<`u`;function ya(){if(_a.current=!0,va){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>ga.current=e.matches;e.addEventListener(`change`,t),t()}else ga.current=!1}}var ba=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],xa={};function Sa(e){xa=e}function Ca(){return xa}var wa=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Ln,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=()=>{let e=M.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,k.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=pa(t),this.isVariantNode=ma(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&U(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,ca.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((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(_a.current||ya(),this.shouldReduceMotion=ga.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),A(this.notifyUpdate),A(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&or.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Xn({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:D(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=En.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&k.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}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 xa){let t=xa[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):G()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ba.length;t++){let n=ba[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=ha(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){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=yr(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(y(n)||x(n))?n=parseFloat(n):!ia(n)&&L.test(t)&&(n=fi(e,t)),this.setBaseTarget(e,U(n)?n.get():n)),U(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Pr(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!U(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new E),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){bi.render(this.render)}},Ta=class extends wa{constructor(){super(...arguments),this.KeyframeResolver=hi}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;U(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},K=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Ea({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Da({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Oa(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ka(e){return e===void 0||e===1}function Aa({scale:e,scaleX:t,scaleY:n}){return!ka(e)||!ka(t)||!ka(n)}function q(e){return Aa(e)||ja(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ja(e){return Ma(e.x)||Ma(e.y)}function Ma(e){return e&&e!==`0%`}function Na(e,t,n){return n+t*(e-n)}function Pa(e,t,n,r,i){return i!==void 0&&(e=Na(e,i,r)),Na(e,n,r)+t}function Fa(e,t=0,n=1,r,i){e.min=Pa(e.min,t,n,r,i),e.max=Pa(e.max,t,n,r,i)}function Ia(e,{x:t,y:n}){Fa(e.x,t.translate,t.scale,t.originPoint),Fa(e.y,n.translate,n.scale,n.originPoint)}var La=.999999999999,Ra=1.0000000000001;function za(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(J(e.x,-a.scroll.offset.x),J(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Ia(e,o)),r&&q(a.latestValues)&&Ha(e,a.latestValues,a.layout?.layoutBox))}t.x<Ra&&t.x>La&&(t.x=1),t.y<Ra&&t.y>La&&(t.y=1)}function J(e,t){e.min+=t,e.max+=t}function Ba(e,t,n,r,i=.5){Fa(e,t,n,R(e.min,e.max,i),r)}function Va(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Ha(e,t,n){let r=n??e;Ba(e.x,Va(t.x,r.x),t.scaleX,t.scale,t.originX),Ba(e.y,Va(t.y,r.y),t.scaleY,t.scale,t.originY)}function Ua(e,t){return Ea(Oa(e.getBoundingClientRect(),t))}function Wa(e,t,n){let r=Ua(e,n),{scroll:i}=t;return i&&(J(r.x,i.offset.x),J(r.y,i.offset.y)),r}var Ga={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Ka=Tn.length;function qa(e,t,n){let r=``,i=!0;for(let a=0;a<Ka;a++){let o=Tn[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=vi(s,ci[o]);if(!c){i=!1;let t=Ga[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${vi(a,ci.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Ja(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(En.has(e)){o=!0;continue}if(je(e)){i[e]=n;continue}{let t=vi(n,ci[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=qa(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function Ya(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Xa(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Za={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(F.test(e))e=parseFloat(e);else return e}return`${Xa(e,t.target.x)}% ${Xa(e,t.target.y)}%`}},Qa={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=L.parse(e);if(i.length>5)return r;let a=L.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=R(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},$a={borderRadius:{...Za,applyTo:[...gi]},borderTopLeftRadius:Za,borderTopRightRadius:Za,borderBottomLeftRadius:Za,borderBottomRightRadius:Za,boxShadow:Qa};function eo(e,{layout:t,layoutId:n}){return En.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!$a[e]||e===`opacity`)}function to(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(U(r[t])||i&&U(i[t])||eo(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function no(e){return window.getComputedStyle(e)}var ro=class extends Ta{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Ya}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(En.has(t))return this.projection?.isProjecting?xn(t):Cn(e,t);{let n=no(e),r=(je(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ua(e,t)}build(e,t,n){Ja(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return to(e,t,n)}},io={offset:`stroke-dashoffset`,array:`stroke-dasharray`},ao={offset:`strokeDashoffset`,array:`strokeDasharray`};function oo(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?io:ao;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var so=[`transform`,`opacity`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function co(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Ja(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of so)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&oo(d,i,a,o,!1)}var lo=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`]),uo=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function fo(e,t,n,r){Ya(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(lo.has(n)?n:Hr(n),t.attrs[n])}function po(e,t,n){let r=to(e,t,n);for(let n in e)if(U(e[n])||U(t[n])){let t=Tn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var mo=class extends Ta{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=G}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(En.has(t)){let e=ui(t);return e&&e.default||0}if(so.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=lo.has(t)?t:Hr(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return po(e,t,n)}build(e,t,n){co(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){fo(e,t,n,r)}mount(e){this.isSVGTag=uo(e.tagName),super.mount(e)}},ho=fa.length;function go(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&go(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<ho;n++){let r=fa[n],i=e.props[r];(ua(i)||i===!1)&&(t[r]=i)}return t}function _o(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var vo=[...da].reverse(),yo=da.length;function bo(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Xr(e,t,n)))}function xo(e){let t=bo(e),n=Co(),r=!0,i=!1,a=t=>(n,r)=>{let i=H(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=go(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<yo;t++){let p=vo[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=ua(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||la(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=So(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Ir(t)&&Ir(n)?!_o(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=H(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=mr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=H(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Co(),i=!0}}}function So(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!_o(t,e):!1}function Y(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Co(){return{animate:Y(!0),whileInView:Y(),whileHover:Y(),whileTap:Y(),whileDrag:Y(),whileFocus:Y(),exit:Y()}}function wo(e,t){e.min=t.min,e.max=t.max}function X(e,t){wo(e.x,t.x),wo(e.y,t.y)}function To(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Eo=.9999,Do=1.0001,Oo=-.01,ko=.01;function Z(e){return e.max-e.min}function Ao(e,t,n){return Math.abs(e-t)<=n}function jo(e,t,n,r=.5){e.origin=r,e.originPoint=R(t.min,t.max,e.origin),e.scale=Z(n)/Z(t),e.translate=R(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Eo&&e.scale<=Do||isNaN(e.scale))&&(e.scale=1),(e.translate>=Oo&&e.translate<=ko||isNaN(e.translate))&&(e.translate=0)}function Mo(e,t,n,r){jo(e.x,t.x,n.x,r?r.originX:void 0),jo(e.y,t.y,n.y,r?r.originY:void 0)}function No(e,t,n,r=0){e.min=(r?R(n.min,n.max,r):n.min)+t.min,e.max=e.min+Z(t)}function Po(e,t,n,r){No(e.x,t.x,n.x,r?.x),No(e.y,t.y,n.y,r?.y)}function Fo(e,t,n,r=0){let i=r?R(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Z(t)}function Io(e,t,n,r){Fo(e.x,t.x,n.x,r?.x),Fo(e.y,t.y,n.y,r?.y)}function Lo(e,t,n,r,i){return e-=t,e=Na(e,1/n,r),i!==void 0&&(e=Na(e,1/i,r)),e}function Ro(e,t=0,n=1,r=.5,i,a=e,o=e){if(P.test(t)&&(t=parseFloat(t),t=R(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=R(a.min,a.max,r);e===a&&(s-=t),e.min=Lo(e.min,t,n,s,i),e.max=Lo(e.max,t,n,s,i)}function zo(e,t,[n,r,i],a,o){Ro(e,t[n],t[r],t[i],t.scale,a,o)}var Bo=[`x`,`scaleX`,`originX`],Vo=[`y`,`scaleY`,`originY`];function Ho(e,t,n,r){zo(e.x,t,Bo,n?n.x:void 0,r?r.x:void 0),zo(e.y,t,Vo,n?n.y:void 0,r?r.y:void 0)}function Uo(e){return e.translate===0&&e.scale===1}function Wo(e){return Uo(e.x)&&Uo(e.y)}function Go(e,t){return e.min===t.min&&e.max===t.max}function Ko(e,t){return Go(e.x,t.x)&&Go(e.y,t.y)}function qo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Jo(e,t){return qo(e.x,t.x)&&qo(e.y,t.y)}function Yo(e){return Z(e.x)/Z(e.y)}function Xo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Q(e){return[e(`x`),e(`y`)]}function Zo(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Qo=gi.length,$o=e=>typeof e==`string`?parseFloat(e):e,es=e=>typeof e==`number`||F.test(e);function ts(e,t,n,r,i,a){i?(e.opacity=R(0,n.opacity??1,rs(r)),e.opacityExit=R(t.opacity??1,0,is(r))):a&&(e.opacity=R(t.opacity??1,n.opacity??1,r));for(let i=0;i<Qo;i++){let a=gi[i],o=ns(t,a),s=ns(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||es(o)===es(s)?(e[a]=Math.max(R($o(o),$o(s),r),0),(P.test(s)||P.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=R(t.rotate||0,n.rotate||0,r))}function ns(e,t){return e[t]===void 0?e.borderRadius:e[t]}var rs=as(0,.5,pe),is=as(.5,.95,C);function as(e,t,n){return r=>r<e?0:r>t?1:n(T(e,t,r))}function os(e,t,n){let r=U(e)?e:yr(e);return r.start(kr(``,r,t,n)),r.animation}function ss(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var cs=(e,t)=>e.depth-t.depth,ls=class{constructor(){this.children=[],this.isDirty=!1}add(e){h(this.children,e),this.isDirty=!0}remove(e){g(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(cs),this.isDirty=!1,this.children.forEach(e)}};function us(e,t){let n=M.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(A(r),e(a-t))};return k.setup(r,!0),()=>A(r)}function ds(e){return U(e)?e.get():e}var fs=class{constructor(){this.members=[]}add(e){h(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(g(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(g(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},ps={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ms={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},hs=[``,`X`,`Y`,`Z`],gs=1e3,_s=0;function vs(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ys(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Wr(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,k,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ys(r)}function bs({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=_s++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ta.value&&(ms.nodes=ms.calculatedTargetDeltas=ms.calculatedProjections=0),this.nodes.forEach(Cs),this.nodes.forEach(Ms),this.nodes.forEach(Ns),this.nodes.forEach(ws),ta.addProjectionMetrics&&ta.addProjectionMetrics(ms)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new ls)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new E),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Bi(t)&&!na(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;k.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=us(i,250),ps.hasAnimatedSinceResize&&(ps.hasAnimatedSinceResize=!1,this.nodes.forEach(js)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Bs,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Jo(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...xr(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||js(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),A(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(Ps),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ys(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Ds),this.nodes.forEach(Es);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Os);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ks),this.nodes.forEach(As),this.nodes.forEach(xs),this.nodes.forEach(Ss)):this.nodes.forEach(Os),this.clearAllSnapshots();let e=M.now();j.delta=_(0,1e3/60,e-j.timestamp),j.timestamp=e,j.isProcessing=!0,De.update.process(j),De.preRender.process(j),De.render.process(j),j.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,bi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ts),this.sharedNodes.forEach(Fs)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,k.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){k.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Z(this.snapshot.measuredBox.x)&&!Z(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=G(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Wo(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||q(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Ws(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return G();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ks))){let{scroll:e}=this.root;e&&(J(t.x,e.offset.x),J(t.y,e.offset.y))}return t}removeElementScroll(e){let t=G();if(X(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&X(t,e),J(t.x,i.offset.x),J(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||G();X(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(J(r.x,-n.scroll.offset.x),J(r.y,-n.scroll.offset.y)),q(n.latestValues)&&Ha(r,n.latestValues,n.layout?.layoutBox)}return q(this.latestValues)&&Ha(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=G();X(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!q(n.latestValues))continue;let r;n.instance&&(Aa(n.latestValues)&&n.updateSnapshot(),r=G(),X(r,n.measurePageBox())),Ho(t,n.latestValues,n.snapshot?.layoutBox,r)}return q(this.latestValues)&&Ho(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}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!==j.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=j.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=G(),this.targetWithTransforms=G()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Po(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):X(this.target,this.layout.layoutBox),Ia(this.target,this.targetDelta)):X(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),ta.value&&ms.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Aa(this.parent.latestValues)||ja(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=G(),this.relativeTargetOrigin=G(),Io(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),X(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===j.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;X(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;za(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=G());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(To(this.prevProjectionDelta.x,this.projectionDelta.x),To(this.prevProjectionDelta.y,this.projectionDelta.y)),Mo(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Xo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Xo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),ta.value&&ms.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=oa(),this.projectionDelta=oa(),this.projectionDeltaWithTransform=oa()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=oa();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=G(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(c&&!u&&this.options.crossfade===!0&&!this.path.some(zs));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=R(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=R(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(Is(o.x,e.x,n),Is(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Io(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Rs(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Ko(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=G(),X(f,this.relativeTarget)),c&&(this.animationValues=a,ts(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(A(this.pendingAnimation),void 0),this.pendingAnimation=k.update(()=>{ps.hasAnimatedSinceResize=!0,this.motionValue||=yr(0),this.motionValue.jump(0,!1),this.currentAnimation=os(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.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);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(gs),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&Gs(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||G();let t=Z(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Z(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}X(t,n),Ha(t,i),Mo(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new fs),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&vs(`z`,e,r,this.animationValues);for(let t=0;t<hs.length;t++)vs(`rotate${hs[t]}`,e,r,this.animationValues),vs(`skew${hs[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=ds(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=ds(t?.pointerEvents)||``),this.hasProjected&&!q(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Zo(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in $a){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=$a[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?ds(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Es),this.root.sharedNodes.clear()}}}function xs(e){e.updateLayout()}function Ss(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)Q(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Z(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;wo(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else Gs(i,t.layoutBox,n)&&Q(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Z(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=oa();Mo(o,n,t.layoutBox);let s=oa();a?Mo(s,e.applyTransform(r,!0),t.measuredBox):Mo(s,n,t.layoutBox);let c=!Wo(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=G();Io(s,t.layoutBox,i.layoutBox,o);let c=G();Io(c,n,a.layoutBox,o),Jo(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Cs(e){ta.value&&ms.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function ws(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ts(e){e.clearSnapshot()}function Es(e){e.clearMeasurements()}function Ds(e){e.isLayoutDirty=!0,e.updateLayout()}function Os(e){e.isLayoutDirty=!1}function ks(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function As(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function js(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ms(e){e.resolveTargetDelta()}function Ns(e){e.calcProjection()}function Ps(e){e.resetSkewAndRotation()}function Fs(e){e.removeLeadSnapshot()}function Is(e,t,n){e.translate=R(t.translate,0,n),e.scale=R(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ls(e,t,n,r){e.min=R(t.min,n.min,r),e.max=R(t.max,n.max,r)}function Rs(e,t,n,r){Ls(e.x,t.x,n.x,r),Ls(e.y,t.y,n.y,r)}function zs(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Bs={duration:.45,ease:[.4,0,.1,1]},Vs=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Hs=Vs(`applewebkit/`)&&!Vs(`chrome/`)?Math.round:C;function Us(e){e.min=Hs(e.min),e.max=Hs(e.max)}function Ws(e){Us(e.x),Us(e.y)}function Gs(e,t,n){return e===`position`||e===`preserve-aspect`&&!Ao(Yo(t),Yo(n),.2)}function Ks(e){return e!==e.root&&e.scroll?.wasRoot}var qs=bs({attachResizeListener:(e,t)=>ss(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Js={current:void 0},Ys=bs({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Js.current){let e=new qs({});e.mount(window),e.setOptions({layoutScroll:!0}),Js.current=e}return Js.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Xs=(0,u.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Zs(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Qs(...e){return t=>{let n=!1,r=e.map(e=>{let r=Zs(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Zs(e[t],null)}}}}function $s(...e){return u.useCallback(Qs(...e),e)}var $=r(),ec=class extends u.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(yi(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=yi(e)&&e.offsetWidth||0,r=yi(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function tc({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,u.useId)(),s=(0,u.useRef)(null),c=(0,u.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,u.useContext)(Xs),d=$s(s,a===!1?void 0:e.props?.ref??e?.ref);return(0,u.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Chat-DDlysEi_.js","assets/rolldown-runtime-hePW80VL.js","assets/vendor-core-RCcadM3e.js","assets/button-DhiX-njv.js","assets/vendor-datadog-BRv-mOv1.js","assets/vendor-react-Dyj4O3HE.js","assets/vendor-ui-vhu-UHhF.js","assets/vendor-tanstack-BiFWSB3W.js","assets/setSessionStorage-B0bf71m4.js","assets/safeParse-DeaoCCWH.js","assets/createLucideIcon-BKGPfjm2.js","assets/chevron-up-Df2c8uoU.js","assets/setComponentFile-D8ZLDWhU.js","assets/index-BtTvoLf8.js","assets/authStore-qKmCZcaf.js","assets/dialog-CBf0Mr1d.js","assets/x-B9o9hsep.js","assets/setLocalStorage-D_kflv4U.js","assets/useLocalStorage-Dtj1QS8_.js","assets/errorText-NpBmvk9I.js","assets/index-Cxj2_wsl.css","assets/useEntityRestURL-C7x-Yz9r.js","assets/getAnalytics-D4LKGeVy.js","assets/Chat-B-7kW9XZ.css"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,i as n}from"./vendor-datadog-BRv-mOv1.js";import{r}from"./vendor-react-Dyj4O3HE.js";import{t as i}from"./createLucideIcon-BKGPfjm2.js";import{n as a}from"./setLocalStorage-D_kflv4U.js";import{t as o}from"./useLocalStorage-Dtj1QS8_.js";import{Jn as s,Pt as c}from"./index-BtTvoLf8.js";var l=i(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),u=e(t(),1),d=(0,u.createContext)({});function f(e){let t=(0,u.useRef)(null);return t.current===null&&(t.current=e()),t.current}var p=typeof window<`u`?u.useLayoutEffect:u.useEffect,m=(0,u.createContext)(null);function h(e,t){e.indexOf(t)===-1&&e.push(t)}function g(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var _=(e,t,n)=>n>t?t:n<e?e:n,v={},y=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),b=e=>typeof e==`object`&&!!e,x=e=>/^0[^.\s]+$/u.test(e);function S(e){let t;return()=>(t===void 0&&(t=e()),t)}var C=e=>e,w=(...e)=>e.reduce((e,t)=>n=>t(e(n))),T=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},E=class{constructor(){this.subscriptions=[]}add(e){return h(this.subscriptions,e),()=>g(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},D=e=>e*1e3,O=e=>e/1e3,ee=(e,t)=>t?1e3/t*e:0,te=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ne=1e-7,re=12;function ie(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=te(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>ne&&++s<re);return o}function ae(e,t,n,r){if(e===t&&n===r)return C;let i=t=>ie(t,0,1,e,n);return e=>e===0||e===1?e:te(i(e),t,r)}var oe=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,se=e=>t=>1-e(1-t),ce=ae(.33,1.53,.69,.99),le=se(ce),ue=oe(le),de=e=>e>=1?1:(e*=2)<1?.5*le(e):.5*(2-2**(-10*(e-1))),fe=e=>1-Math.sin(Math.acos(e)),pe=se(fe),me=oe(fe),he=ae(.42,0,1,1),ge=ae(0,0,.58,1),_e=ae(.42,0,.58,1),ve=e=>Array.isArray(e)&&typeof e[0]!=`number`,ye=e=>Array.isArray(e)&&typeof e[0]==`number`,be={linear:C,easeIn:he,easeInOut:_e,easeOut:ge,circIn:fe,circInOut:me,circOut:pe,backIn:le,backInOut:ue,backOut:ce,anticipate:de},xe=e=>typeof e==`string`,Se=e=>{if(ye(e)){e.length;let[t,n,r,i]=e;return ae(t,n,r,i)}return xe(e)?(be[e],`${e}`,be[e]):e},Ce=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function we(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var Te=40;function Ee(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Ce.reduce((e,t)=>(e[t]=we(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=v.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Te),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Ce.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Ce.length;t++)o[Ce[t]].cancel(e)},state:i,steps:o}}var{schedule:k,cancel:A,state:j,steps:De}=Ee(typeof requestAnimationFrame<`u`?requestAnimationFrame:C,!0),Oe;function ke(){Oe=void 0}var M={now:()=>(Oe===void 0&&M.set(j.isProcessing||v.useManualTiming?j.timestamp:performance.now()),Oe),set:e=>{Oe=e,queueMicrotask(ke)}},Ae=e=>t=>typeof t==`string`&&t.startsWith(e),je=Ae(`--`),Me=Ae(`var(--`),Ne=e=>Me(e)?Pe.test(e.split(`/*`)[0].trim()):!1,Pe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Fe(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var Ie={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Le={...Ie,transform:e=>_(0,1,e)},Re={...Ie,default:1},ze=e=>Math.round(e*1e5)/1e5,Be=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ve(e){return e==null}var He=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ue=(e,t)=>n=>!!(typeof n==`string`&&He.test(n)&&n.startsWith(e)||t&&!Ve(n)&&Object.prototype.hasOwnProperty.call(n,t)),We=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Be);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Ge=e=>_(0,255,e),Ke={...Ie,transform:e=>Math.round(Ge(e))},qe={test:Ue(`rgb`,`red`),parse:We(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Ke.transform(e)+`, `+Ke.transform(t)+`, `+Ke.transform(n)+`, `+ze(Le.transform(r))+`)`};function Je(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Ye={test:Ue(`#`),parse:Je,transform:qe.transform},Xe=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),N=Xe(`deg`),P=Xe(`%`),F=Xe(`px`),Ze=Xe(`vh`),Qe=Xe(`vw`),$e={...P,parse:e=>P.parse(e)/100,transform:e=>P.transform(e*100)},et={test:Ue(`hsl`,`hue`),parse:We(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+P.transform(ze(t))+`, `+P.transform(ze(n))+`, `+ze(Le.transform(r))+`)`},I={test:e=>qe.test(e)||Ye.test(e)||et.test(e),parse:e=>qe.test(e)?qe.parse(e):et.test(e)?et.parse(e):Ye.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?qe.transform(e):et.transform(e),getAnimatableNone:e=>{let t=I.parse(e);return t.alpha=0,I.transform(t)}},tt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function nt(e){return isNaN(e)&&typeof e==`string`&&(e.match(Be)?.length||0)+(e.match(tt)?.length||0)>0}var rt=`number`,it=`color`,at=`var`,ot=`var(`,st="${}",ct=/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 lt(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(ct,e=>(I.test(e)?(r.color.push(a),i.push(it),n.push(I.parse(e))):e.startsWith(ot)?(r.var.push(a),i.push(at),n.push(e)):(r.number.push(a),i.push(rt),n.push(parseFloat(e))),++a,st)).split(st),indexes:r,types:i}}function ut(e){return lt(e).values}function dt({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===rt?ze(r[a]):e===it?I.transform(r[a]):r[a]}return i}}function ft(e){return dt(lt(e))}var pt=e=>typeof e==`number`?0:I.test(e)?I.getAnimatableNone(e):e,mt=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:pt(e);function ht(e){let t=lt(e);return dt(t)(t.values.map((e,n)=>mt(e,t.split[n])))}var L={test:nt,parse:ut,createTransformer:ft,getAnimatableNone:ht};function gt(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function _t({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=gt(s,r,e+1/3),a=gt(s,r,e),o=gt(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function vt(e,t){return n=>n>0?t:e}var R=(e,t,n)=>e+(t-e)*n,yt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},bt=[Ye,qe,et],xt=e=>bt.find(t=>t.test(e));function St(e){let t=xt(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===et&&(n=_t(n)),n}var Ct=(e,t)=>{let n=St(e),r=St(t);if(!n||!r)return vt(e,t);let i={...n};return e=>(i.red=yt(n.red,r.red,e),i.green=yt(n.green,r.green,e),i.blue=yt(n.blue,r.blue,e),i.alpha=R(n.alpha,r.alpha,e),qe.transform(i))},wt=new Set([`none`,`hidden`]);function Tt(e,t){return wt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Et(e,t){return n=>R(e,t,n)}function Dt(e){return typeof e==`number`?Et:typeof e==`string`?Ne(e)?vt:I.test(e)?Ct:jt:Array.isArray(e)?Ot:typeof e==`object`?I.test(e)?Ct:kt:vt}function Ot(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Dt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function kt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Dt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function At(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var jt=(e,t)=>{let n=L.createTransformer(t),r=lt(e),i=lt(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?wt.has(e)&&!i.values.length||wt.has(t)&&!r.values.length?Tt(e,t):w(Ot(At(r,i),i.values),n):(`${e}${t}`,vt(e,t))};function Mt(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?R(e,t,n):Dt(e)(e,t)}var Nt=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>k.update(t,e),stop:()=>A(t),now:()=>j.isProcessing?j.timestamp:M.now()}},Pt=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Ft=2e4;function It(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function Lt(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(It(r),Ft);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:O(i)}}var z={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Rt(e,t){return e*Math.sqrt(1-t*t)}var zt=12;function Bt(e,t,n){let r=n;for(let n=1;n<zt;n++)r-=e(r)/t(r);return r}var Vt=.001;function Ht({duration:e=z.duration,bounce:t=z.bounce,velocity:n=z.velocity,mass:r=z.mass}){let i,a;z.maxDuration;let o=1-t;o=_(z.minDamping,z.maxDamping,o),e=_(z.minDuration,z.maxDuration,O(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Rt(t,o),c=Math.exp(-i);return Vt-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Rt(t**2,o);return(-i(t)+Vt>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Bt(i,a,s);if(e=D(e),isNaN(c))return{stiffness:z.stiffness,damping:z.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Ut=[`duration`,`bounce`],Wt=[`stiffness`,`damping`,`mass`];function Gt(e,t){return t.some(t=>e[t]!==void 0)}function Kt(e){let t={velocity:z.velocity,stiffness:z.stiffness,damping:z.damping,mass:z.mass,isResolvedFromDuration:!1,...e};if(!Gt(e,Wt)&&Gt(e,Ut)){if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*_(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:z.mass,stiffness:i,damping:a}}else{let n=Ht({...e,velocity:0});t={...t,...n,mass:z.mass},t.isResolvedFromDuration=!0}}return t}function qt(e=z.visualDuration,t=z.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Kt({...n,velocity:-O(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=O(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?z.restSpeed.granular:z.restSpeed.default,i||=v?z.restDelta.granular:z.restDelta.default;let y,b,x,S,C,w;if(h<1)x=Rt(_,h),S=(m+h*_*g)/x,y=e=>{let t=Math.exp(-h*_*e);return o-t*(S*Math.sin(x*e)+g*Math.cos(x*e))},C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>D(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=D(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=D(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(It(T),Ft),t=Pt(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}qt.applyToOptions=e=>{let t=Lt(e,100,qt);return e.ease=t.ease,e.duration=D(t.duration),e.type=`keyframes`,e};var Jt=5;function Yt(e,t,n){let r=Math.max(t-Jt,0);return ee(n-e(r),t-r)}function Xt({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=qt({keyframes:[f.value,m(f.value)],velocity:Yt(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function Zt(e,t,n){let r=[],i=n||v.mix||Mt,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=w(Array.isArray(t)?t[n]||C:t,a)),r.push(a)}return r}function Qt(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Zt(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=T(e[r],e[r+1],n);return s[r](i)};return n?t=>l(_(e[0],e[a-1],t)):l}function $t(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=T(0,t,r);e.push(R(n,1,i))}}function en(e){let t=[0];return $t(t,e.length-1),t}function tn(e,t){return e.map(e=>e*t)}function nn(e,t){return e.map(()=>t||_e).splice(0,e.length-1)}function rn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=ve(r)?r.map(Se):Se(r),a={done:!1,value:t[0]},o=Qt(tn(n&&n.length===t.length?n:en(t),e),t,{ease:Array.isArray(i)?i:nn(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var an=e=>e!==null;function on(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(an),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var sn={decay:Xt,inertia:Xt,tween:rn,keyframes:rn,spring:qt};function cn(e){typeof e.type==`string`&&(e.type=sn[e.type])}var ln=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},un=e=>e/100,dn=class extends ln{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==M.now()&&this.tick(M.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;cn(e);let{type:t=rn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||rn;s!==rn&&typeof o[0]!=`number`&&(this.mixKeyframes=w(un,Mt(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=It(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let y=this.currentTime,b=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(b=a)),y=_(0,1,n)*o}let x;v?(this.delayState.value=l[0],x=this.delayState):x=b.next(y),i&&!v&&(x.value=i(x.value));let{done:S}=x;!v&&s!==null&&(S=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let C=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&S);return C&&p!==Xt&&(x.value=on(l,this.options,h,this.speed)),m&&m(x.value),C&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return O(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+O(e)}get time(){return O(this.currentTime)}set time(e){e=D(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return Yt(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(M.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=O(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Nt,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(M.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function fn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var pn=e=>e*180/Math.PI,mn=e=>gn(pn(Math.atan2(e[1],e[0]))),hn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:mn,rotateZ:mn,skewX:e=>pn(Math.atan(e[1])),skewY:e=>pn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},gn=e=>(e%=360,e<0&&(e+=360),e),_n=mn,vn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),yn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),bn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:vn,scaleY:yn,scale:e=>(vn(e)+yn(e))/2,rotateX:e=>gn(pn(Math.atan2(e[6],e[5]))),rotateY:e=>gn(pn(Math.atan2(-e[2],e[0]))),rotateZ:_n,rotate:_n,skewX:e=>pn(Math.atan(e[4])),skewY:e=>pn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function xn(e){return+!!e.includes(`scale`)}function Sn(e,t){if(!e||e===`none`)return xn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=bn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=hn,i=t}if(!i)return xn(t);let a=r[t],o=i[1].split(`,`).map(wn);return typeof a==`function`?a(o):o[a]}var Cn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Sn(n,t)};function wn(e){return parseFloat(e.trim())}var Tn=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],En=new Set([...Tn,`pathRotation`]),Dn=e=>e===Ie||e===F,On=new Set([`x`,`y`,`z`]),kn=Tn.filter(e=>!On.has(e));function An(e){let t=[];return kn.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var B={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Sn(t,`x`),y:(e,{transform:t})=>Sn(t,`y`)};B.translateX=B.x,B.translateY=B.y;var V=new Set,jn=!1,Mn=!1,Nn=!1;function Pn(){if(Mn){let e=Array.from(V).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=An(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Mn=!1,jn=!1,V.forEach(e=>e.complete(Nn)),V.clear()}function Fn(){V.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mn=!0)})}function In(){Nn=!0,Fn(),Pn(),Nn=!1}var Ln=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(V.add(this),jn||(jn=!0,k.read(Fn),k.resolveKeyframes(Pn))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}fn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),V.delete(this)}cancel(){this.state===`scheduled`&&(V.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Rn=e=>e.startsWith(`--`);function zn(e,t,n){Rn(t)?e.style.setProperty(t,n):e.style[t]=n}var Bn={};function Vn(e,t){let n=S(e);return()=>Bn[t]??n()}var Hn=Vn(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Un=Vn(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Wn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Gn={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Wn([0,.65,.55,1]),circOut:Wn([.55,0,1,.45]),backIn:Wn([.31,.01,.66,-.59]),backOut:Wn([.33,1.53,.69,.99])};function Kn(e,t){if(e)return typeof e==`function`?Un()?Pt(e,t):`ease-out`:ye(e)?Wn(e):Array.isArray(e)?e.map(e=>Kn(e,t)||Gn.easeOut):Gn[e]}function qn(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Kn(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function Jn(e){return typeof e==`function`&&`applyToOptions`in e}function Yn({type:e,...t}){return Jn(e)&&Un()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Xn=class extends ln{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Yn(e);this.animation=qn(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=on(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),zn(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return O(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+O(e)}get time(){return O(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=D(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Hn()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),C):r(this)}},Zn={anticipate:de,backInOut:ue,circInOut:me};function Qn(e){return e in Zn}function $n(e){typeof e.ease==`string`&&Qn(e.ease)&&(e.ease=Zn[e.ease])}var er=10,tr=class extends Xn{constructor(e){$n(e),cn(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new dn({...a,autoplay:!1}),s=Math.max(er,M.now()-this.startTime),c=_(0,er,s-er),l=o.sample(s).value,{name:u}=this.options;i&&u&&zn(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},nr=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(L.test(e)||e===`0`)&&!e.startsWith(`url(`));function rr(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function ir(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=nr(i,t),s=nr(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:rr(e)||(n===`spring`||Jn(n))&&r}function ar(e){e.duration=0,e.type=`keyframes`}var or=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),sr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function cr(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&sr.test(e[t]))return!0;return!1}var lr=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),ur=S(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function dr(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e,c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return ur()&&n&&(or.has(n)||lr.has(n)&&cr(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var fr=40,pr=class extends ln{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=M.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||Ln;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=M.now();let u=!0;ir(e,i,a,o)||(u=!1,(v.instantAnimations||!s)&&l?.(on(e,n,t)),e[0]=e[e.length-1],ar(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>fr?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&dr(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new tr({...d,element:p})}catch{m=new dn(d)}else m=new dn(d);m.finished.then(()=>{this.notifyFinished()}).catch(C),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),In()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function mr(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var hr=30,gr=e=>!isNaN(parseFloat(e)),_r={current:void 0},vr=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=M.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=M.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=gr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new E);let n=this.events[e].add(t);return e===`change`?()=>{n(),k.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return _r.current&&_r.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=M.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>hr)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,hr);return ee(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function yr(e,t){return new vr(e,t)}function br(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function xr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:br(n,e)}var Sr={type:`spring`,stiffness:500,damping:25,restSpeed:10},Cr=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),wr={type:`keyframes`,duration:.8},Tr={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Er=(e,{keyframes:t})=>t.length>2?wr:En.has(e)?e.startsWith(`scale`)?Cr(t[1]):Sr:Tr,Dr=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Or(e){for(let t in e)if(!Dr.has(t))return!0;return!1}var kr=(e,t,n,r={},i,a)=>o=>{let s=xr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=D(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Or(s)||Object.assign(u,Er(e,u)),u.duration&&=D(u.duration),u.repeatDelay&&=D(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ar(u),u.delay===0&&(d=!0)),(v.instantAnimations||v.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,ar(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=on(u.keyframes,s);if(e!==void 0){k.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new dn(u):new pr(u)},Ar=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function jr(e){let t=Ar.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Mr(e,t,n=1){`${e}`;let[r,i]=jr(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return y(e)?parseFloat(e):e}return Ne(i)?Mr(i,t,n+1):i}function Nr(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Pr(e,t,n,r){if(typeof t==`function`){let[i,a]=Nr(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Nr(r);t=t(n===void 0?e.custom:n,i,a)}return t}function H(e,t,n){let r=e.getProps();return Pr(r,t,n===void 0?r.custom:n,e)}var Fr=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Tn]),Ir=e=>Array.isArray(e);function Lr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,yr(n))}function Rr(e){return Ir(e)?e[e.length-1]||0:e}function zr(e,t){let{transitionEnd:n={},transition:r={},...i}=H(e,t)||{};i={...i,...n};for(let t in i)Lr(e,t,Rr(i[t]))}var U=e=>!!(e&&e.getVelocity);function Br(e){return!!(U(e)&&e.add)}function Vr(e,t){let n=e.getValue(`willChange`);if(Br(n))return n.add(t);if(!n&&v.WillChange){let n=new v.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Hr(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Ur=`data-`+Hr(`framerAppearId`);function Wr(e){return e.props[Ur]}var Gr=typeof window<`u`;function Kr({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function qr(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?br(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Kr(f,t))continue;let o={delay:n,...xr(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){k.update(()=>r.set(i));continue}let p=!1;if(Gr&&window.MotionHandoffAnimation){let n=Wr(e);if(n){let e=window.MotionHandoffAnimation(n,t,k);e!==null&&(o.startTime=e,p=!0)}}Vr(e,t);let m=l??e.shouldReduceMotion;r.start(kr(t,r,i,m&&Fr.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>k.update(()=>{o&&zr(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Jr(e,t,n={}){let r=H(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(qr(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Yr(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}return Promise.all([a(),o(n.delay)])}function Yr(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Jr(c,t,{...o,delay:n+(typeof r==`function`?0:r)+mr(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Xr(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Jr(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Jr(e,t,n);else{let i=typeof t==`function`?H(e,t,n.custom):t;r=Promise.all(qr(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Zr={test:e=>e===`auto`,parse:e=>e},Qr=e=>t=>t.test(e),$r=[Ie,F,P,N,Qe,Ze,Zr],ei=e=>$r.find(Qr(e));function ti(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||x(e)}var ni=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function ri(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Be)||[];if(!r)return e;let i=n.replace(r,``),a=+!!ni.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var ii=/\b([a-z-]*)\(.*?\)/gu,ai={...L,getAnimatableNone:e=>{let t=e.match(ii);return t?t.map(ri).join(` `):e}},oi={...L,getAnimatableNone:e=>{let t=L.parse(e);return L.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},si={...Ie,transform:Math.round},ci={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,inset:F,insetBlock:F,insetBlockStart:F,insetBlockEnd:F,insetInline:F,insetInlineStart:F,insetInlineEnd:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,paddingBlock:F,paddingBlockStart:F,paddingBlockEnd:F,paddingInline:F,paddingInlineStart:F,paddingInlineEnd:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,marginBlock:F,marginBlockStart:F,marginBlockEnd:F,marginInline:F,marginInlineStart:F,marginInlineEnd:F,fontSize:F,backgroundPositionX:F,backgroundPositionY:F,rotate:N,pathRotation:N,rotateX:N,rotateY:N,rotateZ:N,scale:Re,scaleX:Re,scaleY:Re,scaleZ:Re,skew:N,skewX:N,skewY:N,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:Le,originX:$e,originY:$e,originZ:F,zIndex:si,fillOpacity:Le,strokeOpacity:Le,numOctaves:si},li={...ci,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:ai,WebkitFilter:ai,mask:oi,WebkitMask:oi},ui=e=>li[e],di=new Set([ai,oi]);function fi(e,t){let n=ui(e);return di.has(n)||(n=L),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var pi=new Set([`auto`,`none`,`0`]);function mi(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!pi.has(t)&&lt(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=fi(n,i)}var hi=class extends Ln{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Ne(r))){let i=Mr(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Fr.has(n)||e.length!==2)return;let[r,i]=e,a=ei(r),o=ei(i);if(Fe(r)!==Fe(i)&&B[n]){this.needsMeasurement=!0;return}if(a!==o){if(Dn(a)&&Dn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else B[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||ti(e[t]))&&n.push(t);n.length&&mi(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=B[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=B[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},gi=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function _i(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var vi=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function yi(e){return b(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:bi,cancel:xi}=Ee(queueMicrotask,!1),W={x:!1,y:!1};function Si(){return W.x||W.y}function Ci(e){return e===`x`||e===`y`?W[e]?null:(W[e]=!0,()=>{W[e]=!1}):W.x||W.y?null:(W.x=W.y=!0,()=>{W.x=W.y=!1})}function wi(e,t){let n=_i(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Ti(e){return!(e.pointerType===`touch`||Si())}function Ei(e,t,n={}){let[r,i,a]=wi(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!Ti(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Di=(e,t)=>t?e===t||Di(e,t.parentElement):!1,Oi=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,ki=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Ai(e){return ki.has(e.tagName)||e.isContentEditable===!0}var ji=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Mi(e){return ji.has(e.tagName)||e.isContentEditable===!0}var Ni=new WeakSet;function Pi(e){return t=>{t.key===`Enter`&&e(t)}}function Fi(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Ii=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Pi(()=>{if(Ni.has(n))return;Fi(n,`down`);let e=Pi(()=>{Fi(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Fi(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Li(e){return Oi(e)&&!Si()}var Ri=new WeakSet;function zi(e,t,n={}){let[r,i,a]=wi(e,n),o=e=>{let r=e.currentTarget;if(!Li(e)||Ri.has(e))return;Ni.add(r),n.stopPropagation&&Ri.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),Ni.has(r)&&Ni.delete(r),Li(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||Di(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),yi(e)&&(e.addEventListener(`focus`,e=>Ii(e,i)),!Ai(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Bi(e){return b(e)&&`ownerSVGElement`in e}var Vi=new WeakMap,Hi,Ui=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Bi(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Wi=Ui(`inline`,`width`,`offsetWidth`),Gi=Ui(`block`,`height`,`offsetHeight`);function Ki({target:e,borderBoxSize:t}){Vi.get(e)?.forEach(n=>{n(e,{get width(){return Wi(e,t)},get height(){return Gi(e,t)}})})}function qi(e){e.forEach(Ki)}function Ji(){typeof ResizeObserver>`u`||(Hi=new ResizeObserver(qi))}function Yi(e,t){Hi||Ji();let n=_i(e);return n.forEach(e=>{let n=Vi.get(e);n||(n=new Set,Vi.set(e,n)),n.add(t),Hi?.observe(e)}),()=>{n.forEach(e=>{let n=Vi.get(e);n?.delete(t),n?.size||Hi?.unobserve(e)})}}var Xi=new Set,Zi;function Qi(){Zi=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Xi.forEach(t=>t(e))},window.addEventListener(`resize`,Zi)}function $i(e){return Xi.add(e),Zi||Qi(),()=>{Xi.delete(e),!Xi.size&&typeof Zi==`function`&&(window.removeEventListener(`resize`,Zi),Zi=void 0)}}function ea(e,t){return typeof e==`function`?$i(e):Yi(e,t)}var ta={value:null,addProjectionMetrics:null};function na(e){return Bi(e)&&e.tagName===`svg`}var ra=[...$r,I,L],ia=e=>ra.find(Qr(e)),aa=()=>({translate:0,scale:1,origin:0,originPoint:0}),oa=()=>({x:aa(),y:aa()}),sa=()=>({min:0,max:0}),G=()=>({x:sa(),y:sa()}),ca=new WeakMap;function la(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function ua(e){return typeof e==`string`||Array.isArray(e)}var da=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],fa=[`initial`,...da];function pa(e){return la(e.animate)||fa.some(t=>ua(e[t]))}function ma(e){return!!(pa(e)||e.variants)}function ha(e,t,n){for(let r in t){let i=t[r],a=n[r];if(U(i))e.addValue(r,i);else if(U(a))e.addValue(r,yr(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,yr(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var ga={current:null},_a={current:!1},va=typeof window<`u`;function ya(){if(_a.current=!0,va){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>ga.current=e.matches;e.addEventListener(`change`,t),t()}else ga.current=!1}}var ba=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],xa={};function Sa(e){xa=e}function Ca(){return xa}var wa=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Ln,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=()=>{let e=M.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,k.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=pa(t),this.isVariantNode=ma(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&U(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,ca.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((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(_a.current||ya(),this.shouldReduceMotion=ga.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),A(this.notifyUpdate),A(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&or.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Xn({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:D(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=En.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&k.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}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 xa){let t=xa[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):G()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ba.length;t++){let n=ba[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=ha(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){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=yr(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(y(n)||x(n))?n=parseFloat(n):!ia(n)&&L.test(t)&&(n=fi(e,t)),this.setBaseTarget(e,U(n)?n.get():n)),U(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Pr(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!U(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new E),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){bi.render(this.render)}},Ta=class extends wa{constructor(){super(...arguments),this.KeyframeResolver=hi}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;U(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},K=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Ea({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Da({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Oa(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ka(e){return e===void 0||e===1}function Aa({scale:e,scaleX:t,scaleY:n}){return!ka(e)||!ka(t)||!ka(n)}function q(e){return Aa(e)||ja(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ja(e){return Ma(e.x)||Ma(e.y)}function Ma(e){return e&&e!==`0%`}function Na(e,t,n){return n+t*(e-n)}function Pa(e,t,n,r,i){return i!==void 0&&(e=Na(e,i,r)),Na(e,n,r)+t}function Fa(e,t=0,n=1,r,i){e.min=Pa(e.min,t,n,r,i),e.max=Pa(e.max,t,n,r,i)}function Ia(e,{x:t,y:n}){Fa(e.x,t.translate,t.scale,t.originPoint),Fa(e.y,n.translate,n.scale,n.originPoint)}var La=.999999999999,Ra=1.0000000000001;function za(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(J(e.x,-a.scroll.offset.x),J(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Ia(e,o)),r&&q(a.latestValues)&&Ha(e,a.latestValues,a.layout?.layoutBox))}t.x<Ra&&t.x>La&&(t.x=1),t.y<Ra&&t.y>La&&(t.y=1)}function J(e,t){e.min+=t,e.max+=t}function Ba(e,t,n,r,i=.5){Fa(e,t,n,R(e.min,e.max,i),r)}function Va(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Ha(e,t,n){let r=n??e;Ba(e.x,Va(t.x,r.x),t.scaleX,t.scale,t.originX),Ba(e.y,Va(t.y,r.y),t.scaleY,t.scale,t.originY)}function Ua(e,t){return Ea(Oa(e.getBoundingClientRect(),t))}function Wa(e,t,n){let r=Ua(e,n),{scroll:i}=t;return i&&(J(r.x,i.offset.x),J(r.y,i.offset.y)),r}var Ga={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Ka=Tn.length;function qa(e,t,n){let r=``,i=!0;for(let a=0;a<Ka;a++){let o=Tn[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=vi(s,ci[o]);if(!c){i=!1;let t=Ga[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${vi(a,ci.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Ja(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(En.has(e)){o=!0;continue}if(je(e)){i[e]=n;continue}{let t=vi(n,ci[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=qa(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function Ya(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Xa(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Za={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(F.test(e))e=parseFloat(e);else return e}return`${Xa(e,t.target.x)}% ${Xa(e,t.target.y)}%`}},Qa={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=L.parse(e);if(i.length>5)return r;let a=L.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=R(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},$a={borderRadius:{...Za,applyTo:[...gi]},borderTopLeftRadius:Za,borderTopRightRadius:Za,borderBottomLeftRadius:Za,borderBottomRightRadius:Za,boxShadow:Qa};function eo(e,{layout:t,layoutId:n}){return En.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!$a[e]||e===`opacity`)}function to(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(U(r[t])||i&&U(i[t])||eo(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function no(e){return window.getComputedStyle(e)}var ro=class extends Ta{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Ya}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(En.has(t))return this.projection?.isProjecting?xn(t):Cn(e,t);{let n=no(e),r=(je(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ua(e,t)}build(e,t,n){Ja(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return to(e,t,n)}},io={offset:`stroke-dashoffset`,array:`stroke-dasharray`},ao={offset:`strokeDashoffset`,array:`strokeDasharray`};function oo(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?io:ao;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var so=[`transform`,`opacity`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function co(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Ja(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of so)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&oo(d,i,a,o,!1)}var lo=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`]),uo=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function fo(e,t,n,r){Ya(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(lo.has(n)?n:Hr(n),t.attrs[n])}function po(e,t,n){let r=to(e,t,n);for(let n in e)if(U(e[n])||U(t[n])){let t=Tn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var mo=class extends Ta{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=G}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(En.has(t)){let e=ui(t);return e&&e.default||0}if(so.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=lo.has(t)?t:Hr(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return po(e,t,n)}build(e,t,n){co(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){fo(e,t,n,r)}mount(e){this.isSVGTag=uo(e.tagName),super.mount(e)}},ho=fa.length;function go(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&go(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<ho;n++){let r=fa[n],i=e.props[r];(ua(i)||i===!1)&&(t[r]=i)}return t}function _o(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var vo=[...da].reverse(),yo=da.length;function bo(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Xr(e,t,n)))}function xo(e){let t=bo(e),n=Co(),r=!0,i=!1,a=t=>(n,r)=>{let i=H(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=go(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<yo;t++){let p=vo[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=ua(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||la(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=So(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Ir(t)&&Ir(n)?!_o(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=H(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=mr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=H(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Co(),i=!0}}}function So(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!_o(t,e):!1}function Y(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Co(){return{animate:Y(!0),whileInView:Y(),whileHover:Y(),whileTap:Y(),whileDrag:Y(),whileFocus:Y(),exit:Y()}}function wo(e,t){e.min=t.min,e.max=t.max}function X(e,t){wo(e.x,t.x),wo(e.y,t.y)}function To(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Eo=.9999,Do=1.0001,Oo=-.01,ko=.01;function Z(e){return e.max-e.min}function Ao(e,t,n){return Math.abs(e-t)<=n}function jo(e,t,n,r=.5){e.origin=r,e.originPoint=R(t.min,t.max,e.origin),e.scale=Z(n)/Z(t),e.translate=R(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Eo&&e.scale<=Do||isNaN(e.scale))&&(e.scale=1),(e.translate>=Oo&&e.translate<=ko||isNaN(e.translate))&&(e.translate=0)}function Mo(e,t,n,r){jo(e.x,t.x,n.x,r?r.originX:void 0),jo(e.y,t.y,n.y,r?r.originY:void 0)}function No(e,t,n,r=0){e.min=(r?R(n.min,n.max,r):n.min)+t.min,e.max=e.min+Z(t)}function Po(e,t,n,r){No(e.x,t.x,n.x,r?.x),No(e.y,t.y,n.y,r?.y)}function Fo(e,t,n,r=0){let i=r?R(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Z(t)}function Io(e,t,n,r){Fo(e.x,t.x,n.x,r?.x),Fo(e.y,t.y,n.y,r?.y)}function Lo(e,t,n,r,i){return e-=t,e=Na(e,1/n,r),i!==void 0&&(e=Na(e,1/i,r)),e}function Ro(e,t=0,n=1,r=.5,i,a=e,o=e){if(P.test(t)&&(t=parseFloat(t),t=R(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=R(a.min,a.max,r);e===a&&(s-=t),e.min=Lo(e.min,t,n,s,i),e.max=Lo(e.max,t,n,s,i)}function zo(e,t,[n,r,i],a,o){Ro(e,t[n],t[r],t[i],t.scale,a,o)}var Bo=[`x`,`scaleX`,`originX`],Vo=[`y`,`scaleY`,`originY`];function Ho(e,t,n,r){zo(e.x,t,Bo,n?n.x:void 0,r?r.x:void 0),zo(e.y,t,Vo,n?n.y:void 0,r?r.y:void 0)}function Uo(e){return e.translate===0&&e.scale===1}function Wo(e){return Uo(e.x)&&Uo(e.y)}function Go(e,t){return e.min===t.min&&e.max===t.max}function Ko(e,t){return Go(e.x,t.x)&&Go(e.y,t.y)}function qo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Jo(e,t){return qo(e.x,t.x)&&qo(e.y,t.y)}function Yo(e){return Z(e.x)/Z(e.y)}function Xo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Q(e){return[e(`x`),e(`y`)]}function Zo(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Qo=gi.length,$o=e=>typeof e==`string`?parseFloat(e):e,es=e=>typeof e==`number`||F.test(e);function ts(e,t,n,r,i,a){i?(e.opacity=R(0,n.opacity??1,rs(r)),e.opacityExit=R(t.opacity??1,0,is(r))):a&&(e.opacity=R(t.opacity??1,n.opacity??1,r));for(let i=0;i<Qo;i++){let a=gi[i],o=ns(t,a),s=ns(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||es(o)===es(s)?(e[a]=Math.max(R($o(o),$o(s),r),0),(P.test(s)||P.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=R(t.rotate||0,n.rotate||0,r))}function ns(e,t){return e[t]===void 0?e.borderRadius:e[t]}var rs=as(0,.5,pe),is=as(.5,.95,C);function as(e,t,n){return r=>r<e?0:r>t?1:n(T(e,t,r))}function os(e,t,n){let r=U(e)?e:yr(e);return r.start(kr(``,r,t,n)),r.animation}function ss(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var cs=(e,t)=>e.depth-t.depth,ls=class{constructor(){this.children=[],this.isDirty=!1}add(e){h(this.children,e),this.isDirty=!0}remove(e){g(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(cs),this.isDirty=!1,this.children.forEach(e)}};function us(e,t){let n=M.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(A(r),e(a-t))};return k.setup(r,!0),()=>A(r)}function ds(e){return U(e)?e.get():e}var fs=class{constructor(){this.members=[]}add(e){h(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(g(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(g(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},ps={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ms={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},hs=[``,`X`,`Y`,`Z`],gs=1e3,_s=0;function vs(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ys(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Wr(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,k,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ys(r)}function bs({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=_s++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ta.value&&(ms.nodes=ms.calculatedTargetDeltas=ms.calculatedProjections=0),this.nodes.forEach(Cs),this.nodes.forEach(Ms),this.nodes.forEach(Ns),this.nodes.forEach(ws),ta.addProjectionMetrics&&ta.addProjectionMetrics(ms)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new ls)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new E),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Bi(t)&&!na(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;k.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=us(i,250),ps.hasAnimatedSinceResize&&(ps.hasAnimatedSinceResize=!1,this.nodes.forEach(js)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Bs,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Jo(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...xr(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||js(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),A(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(Ps),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ys(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Ds),this.nodes.forEach(Es);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Os);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ks),this.nodes.forEach(As),this.nodes.forEach(xs),this.nodes.forEach(Ss)):this.nodes.forEach(Os),this.clearAllSnapshots();let e=M.now();j.delta=_(0,1e3/60,e-j.timestamp),j.timestamp=e,j.isProcessing=!0,De.update.process(j),De.preRender.process(j),De.render.process(j),j.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,bi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ts),this.sharedNodes.forEach(Fs)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,k.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){k.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Z(this.snapshot.measuredBox.x)&&!Z(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=G(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Wo(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||q(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Ws(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return G();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ks))){let{scroll:e}=this.root;e&&(J(t.x,e.offset.x),J(t.y,e.offset.y))}return t}removeElementScroll(e){let t=G();if(X(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&X(t,e),J(t.x,i.offset.x),J(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||G();X(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(J(r.x,-n.scroll.offset.x),J(r.y,-n.scroll.offset.y)),q(n.latestValues)&&Ha(r,n.latestValues,n.layout?.layoutBox)}return q(this.latestValues)&&Ha(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=G();X(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!q(n.latestValues))continue;let r;n.instance&&(Aa(n.latestValues)&&n.updateSnapshot(),r=G(),X(r,n.measurePageBox())),Ho(t,n.latestValues,n.snapshot?.layoutBox,r)}return q(this.latestValues)&&Ho(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}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!==j.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=j.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=G(),this.targetWithTransforms=G()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Po(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):X(this.target,this.layout.layoutBox),Ia(this.target,this.targetDelta)):X(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),ta.value&&ms.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Aa(this.parent.latestValues)||ja(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=G(),this.relativeTargetOrigin=G(),Io(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),X(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===j.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;X(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;za(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=G());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(To(this.prevProjectionDelta.x,this.projectionDelta.x),To(this.prevProjectionDelta.y,this.projectionDelta.y)),Mo(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Xo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Xo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),ta.value&&ms.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=oa(),this.projectionDelta=oa(),this.projectionDeltaWithTransform=oa()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=oa();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=G(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(c&&!u&&this.options.crossfade===!0&&!this.path.some(zs));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=R(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=R(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(Is(o.x,e.x,n),Is(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Io(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Rs(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Ko(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=G(),X(f,this.relativeTarget)),c&&(this.animationValues=a,ts(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(A(this.pendingAnimation),void 0),this.pendingAnimation=k.update(()=>{ps.hasAnimatedSinceResize=!0,this.motionValue||=yr(0),this.motionValue.jump(0,!1),this.currentAnimation=os(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.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);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(gs),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&Gs(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||G();let t=Z(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Z(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}X(t,n),Ha(t,i),Mo(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new fs),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&vs(`z`,e,r,this.animationValues);for(let t=0;t<hs.length;t++)vs(`rotate${hs[t]}`,e,r,this.animationValues),vs(`skew${hs[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=ds(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=ds(t?.pointerEvents)||``),this.hasProjected&&!q(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Zo(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in $a){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=$a[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?ds(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Es),this.root.sharedNodes.clear()}}}function xs(e){e.updateLayout()}function Ss(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)Q(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Z(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;wo(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else Gs(i,t.layoutBox,n)&&Q(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Z(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=oa();Mo(o,n,t.layoutBox);let s=oa();a?Mo(s,e.applyTransform(r,!0),t.measuredBox):Mo(s,n,t.layoutBox);let c=!Wo(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=G();Io(s,t.layoutBox,i.layoutBox,o);let c=G();Io(c,n,a.layoutBox,o),Jo(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Cs(e){ta.value&&ms.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function ws(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ts(e){e.clearSnapshot()}function Es(e){e.clearMeasurements()}function Ds(e){e.isLayoutDirty=!0,e.updateLayout()}function Os(e){e.isLayoutDirty=!1}function ks(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function As(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function js(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ms(e){e.resolveTargetDelta()}function Ns(e){e.calcProjection()}function Ps(e){e.resetSkewAndRotation()}function Fs(e){e.removeLeadSnapshot()}function Is(e,t,n){e.translate=R(t.translate,0,n),e.scale=R(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ls(e,t,n,r){e.min=R(t.min,n.min,r),e.max=R(t.max,n.max,r)}function Rs(e,t,n,r){Ls(e.x,t.x,n.x,r),Ls(e.y,t.y,n.y,r)}function zs(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Bs={duration:.45,ease:[.4,0,.1,1]},Vs=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Hs=Vs(`applewebkit/`)&&!Vs(`chrome/`)?Math.round:C;function Us(e){e.min=Hs(e.min),e.max=Hs(e.max)}function Ws(e){Us(e.x),Us(e.y)}function Gs(e,t,n){return e===`position`||e===`preserve-aspect`&&!Ao(Yo(t),Yo(n),.2)}function Ks(e){return e!==e.root&&e.scroll?.wasRoot}var qs=bs({attachResizeListener:(e,t)=>ss(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Js={current:void 0},Ys=bs({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Js.current){let e=new qs({});e.mount(window),e.setOptions({layoutScroll:!0}),Js.current=e}return Js.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Xs=(0,u.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Zs(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Qs(...e){return t=>{let n=!1,r=e.map(e=>{let r=Zs(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Zs(e[t],null)}}}}function $s(...e){return u.useCallback(Qs(...e),e)}var $=r(),ec=class extends u.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(yi(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=yi(e)&&e.offsetWidth||0,r=yi(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function tc({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,u.useId)(),s=(0,u.useRef)(null),c=(0,u.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,u.useContext)(Xs),d=$s(s,a===!1?void 0:e.props?.ref??e?.ref);return(0,u.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
3
3
  [data-motion-pop-id="${o}"] {
4
4
  position: absolute !important;
5
5
  width: ${e}px !important;
@@ -7,7 +7,7 @@ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,i as n}from"./v
7
7
  ${_}px !important;
8
8
  ${v}px !important;
9
9
  }
10
- `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,$.jsx)(ec,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:u.cloneElement(e,{ref:d})})}var nc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let d=f(rc),h=(0,u.useId)(),g=(0,u.useRef)(n),_=(0,u.useRef)(r);p(()=>{g.current=n,_.current=r});let v=!0,y=(0,u.useMemo)(()=>(v=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:e=>{d.set(e,!0);for(let e of d.values())if(!e)return;r&&r()},register:e=>(d.set(e,!1),()=>{d.delete(e),!g.current&&!d.size&&_.current?.()})}),[n,d,r]);return a&&v&&(y={...y}),(0,u.useMemo)(()=>{d.forEach((e,t)=>d.set(t,!1))},[n]),u.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=(0,$.jsx)(tc,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,$.jsx)(m.Provider,{value:y,children:e})};function rc(){return new Map}function ic(e=!0){let t=(0,u.useContext)(m);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,u.useId)();(0,u.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,u.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var ac=e=>e.key||``;function oc(e){let t=[];return u.Children.forEach(e,e=>{(0,u.isValidElement)(e)&&t.push(e)}),t}var sc=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[m,h]=ic(o),g=(0,u.useMemo)(()=>oc(e),[e]),_=o&&!m?[]:g.map(ac),v=(0,u.useRef)(!0),y=(0,u.useRef)(g),b=f(()=>new Map),x=(0,u.useRef)(new Set),[S,C]=(0,u.useState)(g),[w,T]=(0,u.useState)(g);p(()=>{o&&!m&&!w.length&&h?.()},[m,o,w.length,h]),p(()=>{v.current=!1,y.current=g;for(let e=0;e<w.length;e++){let t=ac(w[e]);_.includes(t)?(b.delete(t),x.current.delete(t)):b.get(t)!==!0&&b.set(t,!1)}},[w,_.length,_.join(`-`)]);let E=[];if(g!==S){let e=[...g],t=0;for(let n of w){let r=_.indexOf(ac(n));r===-1?(e.splice(t++,0,n),E.push(n)):t=r+E.length+1}return a===`wait`&&E.length&&(e=E),T(oc(e)),C(g),null}let{forceRender:D}=(0,u.useContext)(d);return(0,$.jsx)($.Fragment,{children:w.map(e=>{let u=ac(e),d=o&&!m?!1:g===w||_.includes(u);return(0,$.jsx)(nc,{isPresent:d,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:d?void 0:()=>{if(x.current.has(u))return;if(b.has(u))x.current.add(u),b.set(u,!0);else return;let e=!0;b.forEach(t=>{t||(e=!1)}),e&&(D?.(),T(y.current),o&&h?.(),r&&r())},anchorX:s,anchorY:c,children:e},u)})})},cc=(0,u.createContext)({strict:!1}),lc={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`]},uc=!1;function dc(){if(uc)return;let e={};for(let t in lc)e[t]={isEnabled:e=>lc[t].some(t=>!!e[t])};Sa(e),uc=!0}function fc(){return dc(),Ca()}function pc(e){let t=fc();for(let n in e)t[n]={...t[n],...e[n]};Sa(t)}var mc=(0,u.createContext)({});function hc(e,t){if(pa(e)){let{initial:t,animate:n}=e;return{initial:t===!1||ua(t)?t:void 0,animate:ua(n)?n:void 0}}return e.inherit===!1?{}:t}function gc(e){let{initial:t,animate:n}=hc(e,(0,u.useContext)(mc));return(0,u.useMemo)(()=>({initial:t,animate:n}),[_c(t),_c(n)])}function _c(e){return Array.isArray(e)?e.join(` `):e}var vc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yc(e,t,n){for(let r in t)!U(t[r])&&!eo(r,n)&&(e[r]=t[r])}function bc({transformTemplate:e},t){return(0,u.useMemo)(()=>{let n=vc();return Ja(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xc(e,t){let n=e.style||{},r={};return yc(r,n,e),Object.assign(r,bc(e,t)),r}function Sc(e,t){let n={},r=xc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Cc=()=>({...vc(),attrs:{}});function wc(e,t,n,r){let i=(0,u.useMemo)(()=>{let n=Cc();return co(n,t,uo(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};yc(t,e.style,e),i.style={...t,...i.style}}return i}var Tc=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.propagate.ignoreStrict.viewport`.split(`.`));function Ec(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Tc.has(e)}function Dc(e,t){return e.startsWith(`on`)?!Ec(e):t?.(e)??!Ec(e)}function Oc(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(U(e[a])||(Dc(a,r)||n===!0&&Ec(a)||!t&&!Ec(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var kc=[`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 Ac(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(kc.indexOf(e)>-1||/[A-Z]/u.test(e))}function jc(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??Ac(e)?wc:Sc)(t,r,i,e),l=Oc(t,typeof e==`string`,a,s),d=e===u.Fragment?{}:{...l,...c,ref:n},{children:f}=t,p=(0,u.useMemo)(()=>U(f)?f.get():f,[f]);return(0,u.createElement)(e,{...d,children:p})}function Mc({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Nc(n,r,i,e),renderState:t()}}function Nc(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=ds(a[e]);let{initial:o,animate:s}=e,c=pa(e),l=ma(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!la(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Pr(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Pc=e=>(t,n)=>{let r=(0,u.useContext)(mc),i=(0,u.useContext)(m),a=()=>Mc(e,t,r,i);return n?a():f(a)},Fc=Pc({scrapeMotionValuesFromProps:to,createRenderState:vc}),Ic=Pc({scrapeMotionValuesFromProps:po,createRenderState:Cc}),Lc=Symbol.for(`motionComponentSymbol`);function Rc(e,t,n){let r=(0,u.useRef)(n);(0,u.useInsertionEffect)(()=>{r.current=n});let i=(0,u.useRef)(null);return(0,u.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var zc=(0,u.createContext)({});function Bc(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Vc(e,t,n,r,i,a){let{visualElement:o}=(0,u.useContext)(mc),s=(0,u.useContext)(cc),c=(0,u.useContext)(m),l=(0,u.useContext)(Xs),d=l.reducedMotion,f=l.skipAnimations,h=(0,u.useRef)(null),g=(0,u.useRef)(!1);r||=s.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:a}),g.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let _=h.current,v=(0,u.useContext)(zc);_&&!_.projection&&i&&(_.type===`html`||_.type===`svg`)&&Hc(h.current,n,i,v);let y=(0,u.useRef)(!1);(0,u.useInsertionEffect)(()=>{_&&y.current&&_.update(n,c)});let b=n[Ur],x=(0,u.useRef)(!!b&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return p(()=>{g.current=!0,_&&(y.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),_.scheduleRenderMicrotask(),x.current&&_.animationState&&_.animationState.animateChanges())}),(0,u.useEffect)(()=>{_&&(!x.current&&_.animationState&&_.animationState.animateChanges(),x.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),!1),_.enteringChildren=void 0)}),_}function Hc(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Uc(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Bc(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Uc(e){if(e)return e.options.allowProjection===!1?Uc(e.parent):e.projection}function Wc(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&pc(r);let a=n?n===`svg`:Ac(e),o=a?Ic:Fc;function s(n,s){let c,l={...(0,u.useContext)(Xs),...n,layoutId:Gc(n)},{isStatic:d,isValidProp:f}=l,p=gc(n),m=o(n,d);if(!d&&typeof window<`u`){Kc(l,r);let t=qc(l);c=t.MeasureLayout,p.visualElement=Vc(e,m,l,i,t.ProjectionNode,a)}return(0,$.jsxs)(mc.Provider,{value:p,children:[c&&p.visualElement?(0,$.jsx)(c,{visualElement:p.visualElement,...l}):null,jc(e,n,Rc(m,p.visualElement,s),m,d,t,a,f)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,u.forwardRef)(s);return c[Lc]=e,c}function Gc({layoutId:e}){let t=(0,u.useContext)(d).id;return t&&e!==void 0?t+`-`+e:e}function Kc(e,t){(0,u.useContext)(cc).strict}function qc(e){let{drag:t,layout:n}=fc();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Jc(e,t){if(typeof Proxy>`u`)return Wc;let n=new Map,r=(n,r)=>Wc(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Wc(a,void 0,e,t)),n.get(a))})}var Yc=(e,t)=>t.isSVG??Ac(e)?new mo(t):new ro(t,{allowProjection:e!==u.Fragment}),Xc=class extends K{constructor(e){super(e),e.animationState||=xo(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();la(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Zc=0,Qc={animation:{Feature:Xc},exit:{Feature:class extends K{constructor(){super(...arguments),this.id=Zc++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=H(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function $c(e){return{point:{x:e.pageX,y:e.pageY}}}var el=e=>t=>Oi(t)&&e(t,$c(t));function tl(e,t,n,r){return ss(e,t,el(n),r)}var nl=({current:e})=>e?e.ownerDocument.defaultView:null,rl=(e,t)=>Math.abs(e-t);function il(e,t){let n=rl(e.x,t.x),r=rl(e.y,t.y);return Math.sqrt(n**2+r**2)}var al=new Set([`auto`,`scroll`]),ol=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=sl(this.lastRawMoveEventInfo,this.transformPagePoint));let e=ll(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=il(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=j;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=sl(t,this.transformPagePoint),k.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=ll(e.type===`pointercancel`?this.lastMoveEventInfo:sl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Oi(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=sl($c(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=j;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,ll(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=w(tl(this.contextWindow,`pointermove`,this.handlePointerMove,d),tl(this.contextWindow,`pointerup`,this.handlePointerUp,d),tl(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(al.has(e.overflowX)||al.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),k.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),A(this.updatePoint)}};function sl(e,t){return t?{point:t(e.point)}:e}function cl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ll({point:e},t){return{point:e,delta:cl(e,dl(t)),offset:cl(e,ul(t)),velocity:fl(t,.1)}}function ul(e){return e[0]}function dl(e){return e[e.length-1]}function fl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=dl(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>D(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>D(t)*2&&(r=e[1]);let a=O(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function pl(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?R(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?R(n,e,r.max):Math.min(e,n)),e}function ml(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function hl(e,{top:t,left:n,bottom:r,right:i}){return{x:ml(e.x,n,i),y:ml(e.y,t,r)}}function gl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function _l(e,t){return{x:gl(e.x,t.x),y:gl(e.y,t.y)}}function vl(e,t){let n=.5,r=Z(e),i=Z(t);return i>r?n=T(t.min,t.max-r,e.min):r>i&&(n=T(e.min,e.max-i,t.min)),_(0,1,n)}function yl(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var bl=.35;function xl(e=bl){return e===!1?e=0:e===!0&&(e=bl),{x:Sl(e,`left`,`right`),y:Sl(e,`top`,`bottom`)}}function Sl(e,t,n){return{min:Cl(e,t),max:Cl(e,n)}}function Cl(e,t){return typeof e==`number`?e:e[t]||0}var wl=new WeakMap,Tl=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=G(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor($c(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ci(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Q(e=>{let t=this.getAxisMotionValue(e).get()||0;if(P.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Z(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&k.update(()=>i(e,t),!1,!0),Vr(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=kl(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&k.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new ol(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:nl(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&k.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Ol(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=pl(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Bc(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?hl(n.layoutBox,e):!1,this.elastic=xl(t),r!==this.constraints&&!Bc(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Q(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=yl(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Bc(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=Wa(n,r.root,this.visualElement.getTransformPagePoint()),a=_l(r.layout.layoutBox,i);if(t){let e=t(Da(a));this.hasMutatedConstraints=!!e,e&&(a=Ea(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Q(o=>{if(!Ol(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Vr(this.visualElement,e),n.start(kr(e,n,0,t,this.visualElement,!1))}stopAnimation(){Q(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){Q(t=>{let{drag:n}=this.getProps();if(!Ol(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-R(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Bc(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Q(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=vl({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Q(t=>{if(!Ol(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(R(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;wl.set(this.visualElement,this);let e=this.visualElement.current,t=tl(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Mi(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Bc(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Dl(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),k.read(r);let o=ss(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Q(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=bl,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function El(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Dl(e,t,n){let r=ea(e,El(n)),i=ea(t,El(n));return()=>{r(),i()}}function Ol(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function kl(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Al=class extends K{constructor(e){super(e),this.removeGroupControls=C,this.removeListeners=C,this.controls=new Tl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||C}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},jl=e=>(t,n)=>{e&&k.update(()=>e(t,n),!1,!0)},Ml=class extends K{constructor(){super(...arguments),this.removePointerDownListener=C}onPointerDown(e){this.session=new ol(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:nl(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:jl(e),onStart:jl(t),onMove:jl(n),onEnd:(e,t)=>{delete this.session,r&&k.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=tl(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Nl=!1,Pl=class extends u.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Nl&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ps.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Nl=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||k.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),bi.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Nl=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Fl(e){let[t,n]=ic(),r=(0,u.useContext)(d);return(0,$.jsx)(Pl,{...e,layoutGroup:r,switchLayoutGroup:(0,u.useContext)(zc),isPresent:t,safeToRemove:n})}var Il={pan:{Feature:Ml},drag:{Feature:Al,ProjectionNode:Ys,MeasureLayout:Fl}};function Ll(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&k.postRender(()=>i(t,$c(t)))}var Rl=class extends K{mount(){let{current:e}=this.node;e&&(this.unmount=Ei(e,(e,t)=>(Ll(this.node,t,`Start`),e=>Ll(this.node,e,`End`))))}unmount(){}},zl=class extends K{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=w(ss(this.node.current,`focus`,()=>this.onFocus()),ss(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Bl(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&k.postRender(()=>i(t,$c(t)))}var Vl=class extends K{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=zi(e,(e,t)=>(Bl(this.node,t,`Start`),(e,{success:t})=>Bl(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Hl=new WeakMap,Ul=new WeakMap,Wl=e=>{let t=Hl.get(e.target);t&&t(e)},Gl=e=>{e.forEach(Wl)};function Kl({root:e,...t}){let n=e||document;Ul.has(n)||Ul.set(n,{});let r=Ul.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Gl,{root:e,...t})),r[i]}function ql(e,t,n){let r=Kl(t);return Hl.set(e,n),r.observe(e),()=>{Hl.delete(e),r.unobserve(e)}}var Jl={some:0,all:1},Yl=class extends K{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Jl[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=ql(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Xl(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Xl({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Zl={inView:{Feature:Yl},tap:{Feature:Vl},focus:{Feature:zl},hover:{Feature:Rl}},Ql={layout:{ProjectionNode:Ys,MeasureLayout:Fl}},$l=Jc({...Qc,...Zl,...Il,...Ql},Yc),eu=(0,u.lazy)(()=>n(()=>import(`./Chat-etJeJv4a.js`).then(e=>({default:e.Chat})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]))),tu=56,nu=24;function ru(){let[e,t]=(0,u.useState)(!1),[n,r]=(0,u.useState)(!1),[i,d]=(0,u.useState)(!1),[f,p]=c(`ApplicationChatOpen`,!1),[m,h]=o(a.ApplicationChatPosition,{x:-40,y:-40}),[g,_]=o(a.ApplicationChatWidth,600),v=(0,u.useRef)(null);(0,u.useEffect)(()=>{let e=()=>{let e=window.innerWidth<768;t(e),!e&&g>window.innerWidth&&_(window.innerWidth)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[g,_]);let y=(0,u.useCallback)(e=>{e.preventDefault(),d(!0)},[]);(0,u.useEffect)(()=>{if(!i)return;let e=e=>{let t=window.innerWidth-e.clientX,n=Math.min(Math.max(t,300),window.innerWidth);_(n)},t=()=>{d(!1)};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t)}},[i,_]);let b=(0,u.useCallback)(()=>{n||p(e=>!e)},[n]),x=(0,u.useCallback)(()=>{p(!1)},[]);return(0,u.useEffect)(()=>{if(f){let e=e=>{e.key===`Escape`&&x()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)}},[f,x]),(0,$.jsxs)(`div`,{className:`fixed inset-0 pointer-events-none z-50`,ref:v,children:[(0,$.jsx)(sc,{children:f&&(0,$.jsxs)($l.div,{initial:e?{opacity:0,y:`100%`}:{opacity:0,x:`100%`},animate:e?{opacity:1,y:0}:{opacity:1,x:0},exit:e?{opacity:0,y:`100%`}:{opacity:0,x:`100%`},transition:{type:`spring`,damping:25,stiffness:200},style:e?{}:{top:0,bottom:0,right:0,width:g,maxWidth:`100vw`},className:`
10
+ `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,$.jsx)(ec,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:u.cloneElement(e,{ref:d})})}var nc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let d=f(rc),h=(0,u.useId)(),g=(0,u.useRef)(n),_=(0,u.useRef)(r);p(()=>{g.current=n,_.current=r});let v=!0,y=(0,u.useMemo)(()=>(v=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:e=>{d.set(e,!0);for(let e of d.values())if(!e)return;r&&r()},register:e=>(d.set(e,!1),()=>{d.delete(e),!g.current&&!d.size&&_.current?.()})}),[n,d,r]);return a&&v&&(y={...y}),(0,u.useMemo)(()=>{d.forEach((e,t)=>d.set(t,!1))},[n]),u.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=(0,$.jsx)(tc,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,$.jsx)(m.Provider,{value:y,children:e})};function rc(){return new Map}function ic(e=!0){let t=(0,u.useContext)(m);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,u.useId)();(0,u.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,u.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var ac=e=>e.key||``;function oc(e){let t=[];return u.Children.forEach(e,e=>{(0,u.isValidElement)(e)&&t.push(e)}),t}var sc=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[m,h]=ic(o),g=(0,u.useMemo)(()=>oc(e),[e]),_=o&&!m?[]:g.map(ac),v=(0,u.useRef)(!0),y=(0,u.useRef)(g),b=f(()=>new Map),x=(0,u.useRef)(new Set),[S,C]=(0,u.useState)(g),[w,T]=(0,u.useState)(g);p(()=>{o&&!m&&!w.length&&h?.()},[m,o,w.length,h]),p(()=>{v.current=!1,y.current=g;for(let e=0;e<w.length;e++){let t=ac(w[e]);_.includes(t)?(b.delete(t),x.current.delete(t)):b.get(t)!==!0&&b.set(t,!1)}},[w,_.length,_.join(`-`)]);let E=[];if(g!==S){let e=[...g],t=0;for(let n of w){let r=_.indexOf(ac(n));r===-1?(e.splice(t++,0,n),E.push(n)):t=r+E.length+1}return a===`wait`&&E.length&&(e=E),T(oc(e)),C(g),null}let{forceRender:D}=(0,u.useContext)(d);return(0,$.jsx)($.Fragment,{children:w.map(e=>{let u=ac(e),d=o&&!m?!1:g===w||_.includes(u);return(0,$.jsx)(nc,{isPresent:d,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:d?void 0:()=>{if(x.current.has(u))return;if(b.has(u))x.current.add(u),b.set(u,!0);else return;let e=!0;b.forEach(t=>{t||(e=!1)}),e&&(D?.(),T(y.current),o&&h?.(),r&&r())},anchorX:s,anchorY:c,children:e},u)})})},cc=(0,u.createContext)({strict:!1}),lc={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`]},uc=!1;function dc(){if(uc)return;let e={};for(let t in lc)e[t]={isEnabled:e=>lc[t].some(t=>!!e[t])};Sa(e),uc=!0}function fc(){return dc(),Ca()}function pc(e){let t=fc();for(let n in e)t[n]={...t[n],...e[n]};Sa(t)}var mc=(0,u.createContext)({});function hc(e,t){if(pa(e)){let{initial:t,animate:n}=e;return{initial:t===!1||ua(t)?t:void 0,animate:ua(n)?n:void 0}}return e.inherit===!1?{}:t}function gc(e){let{initial:t,animate:n}=hc(e,(0,u.useContext)(mc));return(0,u.useMemo)(()=>({initial:t,animate:n}),[_c(t),_c(n)])}function _c(e){return Array.isArray(e)?e.join(` `):e}var vc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yc(e,t,n){for(let r in t)!U(t[r])&&!eo(r,n)&&(e[r]=t[r])}function bc({transformTemplate:e},t){return(0,u.useMemo)(()=>{let n=vc();return Ja(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xc(e,t){let n=e.style||{},r={};return yc(r,n,e),Object.assign(r,bc(e,t)),r}function Sc(e,t){let n={},r=xc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Cc=()=>({...vc(),attrs:{}});function wc(e,t,n,r){let i=(0,u.useMemo)(()=>{let n=Cc();return co(n,t,uo(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};yc(t,e.style,e),i.style={...t,...i.style}}return i}var Tc=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.propagate.ignoreStrict.viewport`.split(`.`));function Ec(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Tc.has(e)}function Dc(e,t){return e.startsWith(`on`)?!Ec(e):t?.(e)??!Ec(e)}function Oc(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(U(e[a])||(Dc(a,r)||n===!0&&Ec(a)||!t&&!Ec(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var kc=[`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 Ac(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(kc.indexOf(e)>-1||/[A-Z]/u.test(e))}function jc(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??Ac(e)?wc:Sc)(t,r,i,e),l=Oc(t,typeof e==`string`,a,s),d=e===u.Fragment?{}:{...l,...c,ref:n},{children:f}=t,p=(0,u.useMemo)(()=>U(f)?f.get():f,[f]);return(0,u.createElement)(e,{...d,children:p})}function Mc({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Nc(n,r,i,e),renderState:t()}}function Nc(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=ds(a[e]);let{initial:o,animate:s}=e,c=pa(e),l=ma(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!la(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Pr(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Pc=e=>(t,n)=>{let r=(0,u.useContext)(mc),i=(0,u.useContext)(m),a=()=>Mc(e,t,r,i);return n?a():f(a)},Fc=Pc({scrapeMotionValuesFromProps:to,createRenderState:vc}),Ic=Pc({scrapeMotionValuesFromProps:po,createRenderState:Cc}),Lc=Symbol.for(`motionComponentSymbol`);function Rc(e,t,n){let r=(0,u.useRef)(n);(0,u.useInsertionEffect)(()=>{r.current=n});let i=(0,u.useRef)(null);return(0,u.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var zc=(0,u.createContext)({});function Bc(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Vc(e,t,n,r,i,a){let{visualElement:o}=(0,u.useContext)(mc),s=(0,u.useContext)(cc),c=(0,u.useContext)(m),l=(0,u.useContext)(Xs),d=l.reducedMotion,f=l.skipAnimations,h=(0,u.useRef)(null),g=(0,u.useRef)(!1);r||=s.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:a}),g.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let _=h.current,v=(0,u.useContext)(zc);_&&!_.projection&&i&&(_.type===`html`||_.type===`svg`)&&Hc(h.current,n,i,v);let y=(0,u.useRef)(!1);(0,u.useInsertionEffect)(()=>{_&&y.current&&_.update(n,c)});let b=n[Ur],x=(0,u.useRef)(!!b&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return p(()=>{g.current=!0,_&&(y.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),_.scheduleRenderMicrotask(),x.current&&_.animationState&&_.animationState.animateChanges())}),(0,u.useEffect)(()=>{_&&(!x.current&&_.animationState&&_.animationState.animateChanges(),x.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),!1),_.enteringChildren=void 0)}),_}function Hc(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Uc(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Bc(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Uc(e){if(e)return e.options.allowProjection===!1?Uc(e.parent):e.projection}function Wc(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&pc(r);let a=n?n===`svg`:Ac(e),o=a?Ic:Fc;function s(n,s){let c,l={...(0,u.useContext)(Xs),...n,layoutId:Gc(n)},{isStatic:d,isValidProp:f}=l,p=gc(n),m=o(n,d);if(!d&&typeof window<`u`){Kc(l,r);let t=qc(l);c=t.MeasureLayout,p.visualElement=Vc(e,m,l,i,t.ProjectionNode,a)}return(0,$.jsxs)(mc.Provider,{value:p,children:[c&&p.visualElement?(0,$.jsx)(c,{visualElement:p.visualElement,...l}):null,jc(e,n,Rc(m,p.visualElement,s),m,d,t,a,f)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,u.forwardRef)(s);return c[Lc]=e,c}function Gc({layoutId:e}){let t=(0,u.useContext)(d).id;return t&&e!==void 0?t+`-`+e:e}function Kc(e,t){(0,u.useContext)(cc).strict}function qc(e){let{drag:t,layout:n}=fc();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Jc(e,t){if(typeof Proxy>`u`)return Wc;let n=new Map,r=(n,r)=>Wc(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Wc(a,void 0,e,t)),n.get(a))})}var Yc=(e,t)=>t.isSVG??Ac(e)?new mo(t):new ro(t,{allowProjection:e!==u.Fragment}),Xc=class extends K{constructor(e){super(e),e.animationState||=xo(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();la(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Zc=0,Qc={animation:{Feature:Xc},exit:{Feature:class extends K{constructor(){super(...arguments),this.id=Zc++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=H(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function $c(e){return{point:{x:e.pageX,y:e.pageY}}}var el=e=>t=>Oi(t)&&e(t,$c(t));function tl(e,t,n,r){return ss(e,t,el(n),r)}var nl=({current:e})=>e?e.ownerDocument.defaultView:null,rl=(e,t)=>Math.abs(e-t);function il(e,t){let n=rl(e.x,t.x),r=rl(e.y,t.y);return Math.sqrt(n**2+r**2)}var al=new Set([`auto`,`scroll`]),ol=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=sl(this.lastRawMoveEventInfo,this.transformPagePoint));let e=ll(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=il(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=j;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=sl(t,this.transformPagePoint),k.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=ll(e.type===`pointercancel`?this.lastMoveEventInfo:sl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Oi(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=sl($c(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=j;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,ll(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=w(tl(this.contextWindow,`pointermove`,this.handlePointerMove,d),tl(this.contextWindow,`pointerup`,this.handlePointerUp,d),tl(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(al.has(e.overflowX)||al.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),k.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),A(this.updatePoint)}};function sl(e,t){return t?{point:t(e.point)}:e}function cl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ll({point:e},t){return{point:e,delta:cl(e,dl(t)),offset:cl(e,ul(t)),velocity:fl(t,.1)}}function ul(e){return e[0]}function dl(e){return e[e.length-1]}function fl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=dl(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>D(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>D(t)*2&&(r=e[1]);let a=O(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function pl(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?R(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?R(n,e,r.max):Math.min(e,n)),e}function ml(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function hl(e,{top:t,left:n,bottom:r,right:i}){return{x:ml(e.x,n,i),y:ml(e.y,t,r)}}function gl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function _l(e,t){return{x:gl(e.x,t.x),y:gl(e.y,t.y)}}function vl(e,t){let n=.5,r=Z(e),i=Z(t);return i>r?n=T(t.min,t.max-r,e.min):r>i&&(n=T(e.min,e.max-i,t.min)),_(0,1,n)}function yl(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var bl=.35;function xl(e=bl){return e===!1?e=0:e===!0&&(e=bl),{x:Sl(e,`left`,`right`),y:Sl(e,`top`,`bottom`)}}function Sl(e,t,n){return{min:Cl(e,t),max:Cl(e,n)}}function Cl(e,t){return typeof e==`number`?e:e[t]||0}var wl=new WeakMap,Tl=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=G(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor($c(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ci(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Q(e=>{let t=this.getAxisMotionValue(e).get()||0;if(P.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Z(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&k.update(()=>i(e,t),!1,!0),Vr(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=kl(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&k.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new ol(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:nl(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&k.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Ol(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=pl(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Bc(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?hl(n.layoutBox,e):!1,this.elastic=xl(t),r!==this.constraints&&!Bc(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Q(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=yl(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Bc(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=Wa(n,r.root,this.visualElement.getTransformPagePoint()),a=_l(r.layout.layoutBox,i);if(t){let e=t(Da(a));this.hasMutatedConstraints=!!e,e&&(a=Ea(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Q(o=>{if(!Ol(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Vr(this.visualElement,e),n.start(kr(e,n,0,t,this.visualElement,!1))}stopAnimation(){Q(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){Q(t=>{let{drag:n}=this.getProps();if(!Ol(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-R(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Bc(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Q(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=vl({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Q(t=>{if(!Ol(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(R(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;wl.set(this.visualElement,this);let e=this.visualElement.current,t=tl(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Mi(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Bc(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Dl(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),k.read(r);let o=ss(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Q(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=bl,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function El(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Dl(e,t,n){let r=ea(e,El(n)),i=ea(t,El(n));return()=>{r(),i()}}function Ol(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function kl(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Al=class extends K{constructor(e){super(e),this.removeGroupControls=C,this.removeListeners=C,this.controls=new Tl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||C}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},jl=e=>(t,n)=>{e&&k.update(()=>e(t,n),!1,!0)},Ml=class extends K{constructor(){super(...arguments),this.removePointerDownListener=C}onPointerDown(e){this.session=new ol(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:nl(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:jl(e),onStart:jl(t),onMove:jl(n),onEnd:(e,t)=>{delete this.session,r&&k.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=tl(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Nl=!1,Pl=class extends u.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Nl&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ps.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Nl=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||k.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),bi.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Nl=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Fl(e){let[t,n]=ic(),r=(0,u.useContext)(d);return(0,$.jsx)(Pl,{...e,layoutGroup:r,switchLayoutGroup:(0,u.useContext)(zc),isPresent:t,safeToRemove:n})}var Il={pan:{Feature:Ml},drag:{Feature:Al,ProjectionNode:Ys,MeasureLayout:Fl}};function Ll(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&k.postRender(()=>i(t,$c(t)))}var Rl=class extends K{mount(){let{current:e}=this.node;e&&(this.unmount=Ei(e,(e,t)=>(Ll(this.node,t,`Start`),e=>Ll(this.node,e,`End`))))}unmount(){}},zl=class extends K{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=w(ss(this.node.current,`focus`,()=>this.onFocus()),ss(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Bl(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&k.postRender(()=>i(t,$c(t)))}var Vl=class extends K{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=zi(e,(e,t)=>(Bl(this.node,t,`Start`),(e,{success:t})=>Bl(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Hl=new WeakMap,Ul=new WeakMap,Wl=e=>{let t=Hl.get(e.target);t&&t(e)},Gl=e=>{e.forEach(Wl)};function Kl({root:e,...t}){let n=e||document;Ul.has(n)||Ul.set(n,{});let r=Ul.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Gl,{root:e,...t})),r[i]}function ql(e,t,n){let r=Kl(t);return Hl.set(e,n),r.observe(e),()=>{Hl.delete(e),r.unobserve(e)}}var Jl={some:0,all:1},Yl=class extends K{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Jl[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=ql(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Xl(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Xl({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Zl={inView:{Feature:Yl},tap:{Feature:Vl},focus:{Feature:zl},hover:{Feature:Rl}},Ql={layout:{ProjectionNode:Ys,MeasureLayout:Fl}},$l=Jc({...Qc,...Zl,...Il,...Ql},Yc),eu=(0,u.lazy)(()=>n(()=>import(`./Chat-DDlysEi_.js`).then(e=>({default:e.Chat})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]))),tu=56,nu=24;function ru(){let[e,t]=(0,u.useState)(!1),[n,r]=(0,u.useState)(!1),[i,d]=(0,u.useState)(!1),[f,p]=c(`ApplicationChatOpen`,!1),[m,h]=o(a.ApplicationChatPosition,{x:-40,y:-40}),[g,_]=o(a.ApplicationChatWidth,600),v=(0,u.useRef)(null);(0,u.useEffect)(()=>{let e=()=>{let e=window.innerWidth<768;t(e),!e&&g>window.innerWidth&&_(window.innerWidth)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[g,_]);let y=(0,u.useCallback)(e=>{e.preventDefault(),d(!0)},[]);(0,u.useEffect)(()=>{if(!i)return;let e=e=>{let t=window.innerWidth-e.clientX,n=Math.min(Math.max(t,300),window.innerWidth);_(n)},t=()=>{d(!1)};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t)}},[i,_]);let b=(0,u.useCallback)(()=>{n||p(e=>!e)},[n]),x=(0,u.useCallback)(()=>{p(!1)},[]);return(0,u.useEffect)(()=>{if(f){let e=e=>{e.key===`Escape`&&x()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)}},[f,x]),(0,$.jsxs)(`div`,{className:`fixed inset-0 pointer-events-none z-50`,ref:v,children:[(0,$.jsx)(sc,{children:f&&(0,$.jsxs)($l.div,{initial:e?{opacity:0,y:`100%`}:{opacity:0,x:`100%`},animate:e?{opacity:1,y:0}:{opacity:1,x:0},exit:e?{opacity:0,y:`100%`}:{opacity:0,x:`100%`},transition:{type:`spring`,damping:25,stiffness:200},style:e?{}:{top:0,bottom:0,right:0,width:g,maxWidth:`100vw`},className:`
11
11
  pointer-events-auto
12
12
  fixed bg-background shadow-2xl border-l border-border overflow-visible
13
13
  ${e?`inset-0 w-full h-full rounded-none`:`h-full`}