From d21e6c4274d6b9cbc0ddce6dc1c8104672c0913a Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Tue, 29 Jul 2025 00:39:49 +0200 Subject: [PATCH] chore: Bump motion version, p=#9677, c=vendor --- src/zen/common/ZenUIManager.mjs | 10 +++++++--- src/zen/vendor/motion.dep | 2 +- src/zen/vendor/motion.min.mjs | 8 +------- src/zen/workspaces/ZenGradientGenerator.mjs | 7 ++++--- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/zen/common/ZenUIManager.mjs b/src/zen/common/ZenUIManager.mjs index 820765a11..4863aefce 100644 --- a/src/zen/common/ZenUIManager.mjs +++ b/src/zen/common/ZenUIManager.mjs @@ -37,9 +37,13 @@ var gZenUIManager = { document.addEventListener('mousedown', this.handleMouseDown.bind(this), true); ChromeUtils.defineLazyGetter(this, 'motion', () => { - return ChromeUtils.importESModule('chrome://browser/content/zen-vendor/motion.min.mjs', { - global: 'current', - }); + Services.scriptloader.loadSubScript( + 'chrome://browser/content/zen-vendor/motion.min.mjs', + window + ); + const motion = window.Motion; + delete window.Motion; + return motion; }); ChromeUtils.defineLazyGetter(this, '_toastContainer', () => { diff --git a/src/zen/vendor/motion.dep b/src/zen/vendor/motion.dep index 8076c8bf8..736dd1fa2 100644 --- a/src/zen/vendor/motion.dep +++ b/src/zen/vendor/motion.dep @@ -1,2 +1,2 @@ // Ignore license in this file -https://cdn.jsdelivr.net/npm/motion@latest/+esm: v12.16.0 \ No newline at end of file +https://cdn.jsdelivr.net/npm/motion@latest/dist/motion.js: v12.23.11 \ No newline at end of file diff --git a/src/zen/vendor/motion.min.mjs b/src/zen/vendor/motion.min.mjs index ad062da89..4eaff2b48 100644 --- a/src/zen/vendor/motion.min.mjs +++ b/src/zen/vendor/motion.min.mjs @@ -1,7 +1 @@ -/** - * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0. - * Original file: /npm/motion@12.16.0/dist/es/motion/lib/index.mjs - * - * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files - */ -function t(t){return"object"==typeof t&&!Array.isArray(t)}function e(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let s=document;e&&(s=e.current);const r=n?.[t]??s.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function n(n,s,r,i){return"string"==typeof n&&t(s)?e(n,r,i):n instanceof NodeList?Array.from(n):Array.isArray(n)?n:[n]}function s(t,e,n){return t*(e+1)}function r(t,e,n,s){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:s.get(e)??t}const i=(t,e,n)=>t+(e-t)*n,o=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},a=t=>Array.isArray(t)&&"number"!=typeof t[0];function u(t,e){return a(t)?t[o(0,t.length,e)]:t}function l(t,e){-1===t.indexOf(e)&&t.push(e)}function c(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function h([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&se&&r.atBoolean(t&&t.getVelocity),g=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};function y(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=g(0,e,s);t.push(i(n,1,r))}}function v(t){const e=[0];return y(e,t.length-1),e}function w(t){return"function"==typeof t&&"applyToOptions"in t}const b=2e4;function T(t){let e=0;let n=t.next(e);for(;!n.done&&e=b?1/0:e}const x=t=>1e3*t,M=t=>t/1e3;function A(t,e=100,n){const s=n({...t,keyframes:[0,e]}),r=Math.min(T(s),b);return{type:"keyframes",ease:t=>s.next(r*t).value/e,duration:M(r)}}let S=()=>{},V=()=>{};function k(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function E(t,e){return e[t]||(e[t]=[]),e[t]}function P(t){return Array.isArray(t)?t:[t]}function C(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const O=t=>"number"==typeof t,F=t=>t.every(O),R=new WeakMap;function B(t){const e=[{},{}];return t?.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function L(t,e,n,s){if("function"==typeof e){const[r,i]=B(s);e=e(void 0!==n?n:t.custom,r,i)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,i]=B(s);e=e(void 0!==n?n:t.custom,r,i)}return e}const D=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],W={value:null,addProjectionMetrics:null};const I={};function j(t,e){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=D.reduce(((t,n)=>(t[n]=function(t,e){let n=new Set,s=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},u=0;function l(e){o.has(e)&&(c.schedule(e),t()),u++,e(a)}const c={schedule:(t,e=!1,i=!1)=>{const a=i&&r?n:s;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{a=t,r?i=!0:(r=!0,[n,s]=[s,n],n.forEach(l),e&&W.value&&W.value.frameloop[e].push(u),u=0,n.clear(),r=!1,i&&(i=!1,c.process(t)))}};return c}(i,e?n:void 0),t)),{}),{setup:a,read:u,resolveKeyframes:l,preUpdate:c,update:h,preRender:d,render:p,postRender:f}=o,m=()=>{const i=I.useManualTiming?r.timestamp:performance.now();n=!1,I.useManualTiming||(r.delta=s?1e3/60:Math.max(Math.min(i-r.timestamp,40),1)),r.timestamp=i,r.isProcessing=!0,a.process(r),u.process(r),l.process(r),c.process(r),h.process(r),d.process(r),p.process(r),f.process(r),r.isProcessing=!1,n&&e&&(s=!1,t(m))};return{schedule:D.reduce(((e,i)=>{const a=o[i];return e[i]=(e,i=!1,o=!1)=>(n||(n=!0,s=!0,r.isProcessing||t(m)),a.schedule(e,i,o)),e}),{}),cancel:t=>{for(let e=0;et,{schedule:$,cancel:K,state:U,steps:Y}=j("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:N,!0);let X;function z(){X=void 0}const H={now:()=>(void 0===X&&H.set(U.isProcessing||I.useManualTiming?U.timestamp:performance.now()),X),set:t=>{X=t,queueMicrotask(z)}},q=new Set;function Z(t){return q.has(t)}function _(t,e,n){t||q.has(e)||(console.warn(e),n&&console.warn(n),q.add(e))}class G{constructor(){this.subscriptions=[]}add(t){return l(this.subscriptions,t),()=>c(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r{const n=H.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty();e&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=H.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new G);const n=this.events[t].add(e);return"change"===t?()=>{n(),$.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Q.current&&Q.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=H.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return J(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),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 et(t,e){return new tt(t,e)}function nt(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,et(n))}function st(t){return(t=>Array.isArray(t))(t)?t[t.length-1]||0:t}function rt(t,e){const n=function(t,e,n){const s=t.getProps();return L(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const e in i){nt(t,e,st(i[e]))}}function it(t,e){const n=t.getValue("willChange");if(s=n,Boolean(m(s)&&s.add))return n.add(e);if(!n&&I.WillChange){const n=new I.WillChange("auto");t.addValue("willChange",n),n.add(e)}var s}const ot=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),at="data-"+ot("framerAppearId");function ut(t){return t.props[at]}const lt=t=>null!==t;const ct=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ht=(()=>new Set(ct))(),dt={type:"spring",stiffness:500,damping:25,restSpeed:10},pt={type:"keyframes",duration:.8},ft={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},mt=(t,{keyframes:e})=>e.length>2?pt:ht.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:dt:ft;function gt(t,e){return t?.[e]??t?.default??t}const yt={layout:0,mainThread:0,waapi:0},vt=t=>e=>"string"==typeof e&&e.startsWith(t),wt=vt("--"),bt=vt("var(--"),Tt=t=>!!bt(t)&&xt.test(t.split("/*")[0].trim()),xt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Mt=(t,e,n)=>n>e?e:n"number"==typeof t,parse:parseFloat,transform:t=>t},St={...At,transform:t=>Mt(0,1,t)},Vt={...At,default:1},kt=t=>Math.round(1e5*t)/1e5,Et=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Pt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ct=(t,e)=>n=>Boolean("string"==typeof n&&Pt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ot=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[r,i,o,a]=s.match(Et);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Ft={...At,transform:t=>Math.round((t=>Mt(0,255,t))(t))},Rt={test:Ct("rgb","red"),parse:Ot("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Ft.transform(t)+", "+Ft.transform(e)+", "+Ft.transform(n)+", "+kt(St.transform(s))+")"};const Bt={test:Ct("#"),parse:function(t){let e="",n="",s="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,s+=s,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}},transform:Rt.transform},Lt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Dt=Lt("deg"),Wt=Lt("%"),It=Lt("px"),jt=Lt("vh"),Nt=Lt("vw"),$t=(()=>({...Wt,parse:t=>Wt.parse(t)/100,transform:t=>Wt.transform(100*t)}))(),Kt={test:Ct("hsl","hue"),parse:Ot("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Wt.transform(kt(e))+", "+Wt.transform(kt(n))+", "+kt(St.transform(s))+")"},Ut={test:t=>Rt.test(t)||Bt.test(t)||Kt.test(t),parse:t=>Rt.test(t)?Rt.parse(t):Kt.test(t)?Kt.parse(t):Bt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Rt.transform(t):Kt.transform(t)},Yt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Xt="number",zt="color",Ht=/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 qt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(Ht,(t=>(Ut.test(t)?(s.color.push(i),r.push(zt),n.push(Ut.parse(t))):t.startsWith("var(")?(s.var.push(i),r.push("var"),n.push(t)):(s.number.push(i),r.push(Xt),n.push(parseFloat(t))),++i,"${}"))).split("${}");return{values:n,split:o,indexes:s,types:r}}function Zt(t){return qt(t).values}function _t(t){const{split:e,types:n}=qt(t),s=e.length;return t=>{let r="";for(let i=0;i"number"==typeof t?0:t;const Jt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(Et)?.length||0)+(t.match(Yt)?.length||0)>0},parse:Zt,createTransformer:_t,getAnimatableNone:function(t){const e=Zt(t);return _t(t)(e.map(Gt))}};function Qt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function te({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let r=0,i=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;r=Qt(a,s,t+1/3),i=Qt(a,s,t),o=Qt(a,s,t-1/3)}else r=i=o=n;return{red:Math.round(255*r),green:Math.round(255*i),blue:Math.round(255*o),alpha:s}}function ee(t,e){return n=>n>0?e:t}const ne=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},se=[Bt,Rt,Kt];function re(t){const e=(n=t,se.find((t=>t.test(n))));var n;if(!e)return!1;let s=e.parse(t);return e===Kt&&(s=te(s)),s}const ie=(t,e)=>{const n=re(t),s=re(e);if(!n||!s)return ee(t,e);const r={...n};return t=>(r.red=ne(n.red,s.red,t),r.green=ne(n.green,s.green,t),r.blue=ne(n.blue,s.blue,t),r.alpha=i(n.alpha,s.alpha,t),Rt.transform(r))},oe=new Set(["none","hidden"]);function ae(t,e){return oe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}const ue=(t,e)=>n=>e(t(n)),le=(...t)=>t.reduce(ue);function ce(t,e){return n=>i(t,e,n)}function he(t){return"number"==typeof t?ce:"string"==typeof t?Tt(t)?ee:Ut.test(t)?ie:fe:Array.isArray(t)?de:"object"==typeof t?Ut.test(t)?ie:pe:ee}function de(t,e){const n=[...t],s=n.length,r=t.map(((t,n)=>he(t)(t,e[n])));return t=>{for(let e=0;e{for(const e in s)n[e]=s[e](t);return n}}const fe=(t,e)=>{const n=Jt.createTransformer(e),s=qt(t),r=qt(e);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?oe.has(t)&&!r.values.length||oe.has(e)&&!s.values.length?ae(t,e):le(de(function(t,e){const n=[],s={color:0,var:0,number:0};for(let r=0;r{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>$.update(e,t),stop:()=>K(e),now:()=>U.isProcessing?U.timestamp:H.now()}},ye=(t,e,n=10)=>{let s="";const r=Math.max(Math.round(e/n),2);for(let e=0;e{const s=e*o,r=s*t,i=s-n,a=Le(e,o),u=Math.exp(-r);return Fe-i/a*u},i=e=>{const s=e*o*t,i=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,u=Math.exp(-s),l=Le(Math.pow(e,2),o);return(-r(e)+Fe>0?-1:1)*((i-a)*u)/l}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;nvoid 0!==t[e]))}function je(t=Se,e=Ae){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:r}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:u,damping:l,mass:c,duration:h,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:xe,stiffness:we,damping:be,mass:Te,isResolvedFromDuration:!1,...t};if(!Ie(t,We)&&Ie(t,De))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),r=s*s,i=2*Mt(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:Te,stiffness:r,damping:i}}else{const n=Re(t);e={...e,...n,mass:Te},e.isResolvedFromDuration=!0}return e}({...n,velocity:-M(n.velocity||0)}),f=d||0,m=l/(2*Math.sqrt(u*c)),g=o-i,y=M(Math.sqrt(u/c)),v=Math.abs(g)<5;let w;if(s||(s=v?Ve.granular:Ve.default),r||(r=v?ke.granular:ke.default),m<1){const t=Le(y,m);w=e=>{const n=Math.exp(-m*y*e);return o-n*((f+m*y*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===m)w=t=>o-Math.exp(-y*t)*(g+(f+y*g)*t);else{const t=y*Math.sqrt(m*m-1);w=e=>{const n=Math.exp(-m*y*e),s=Math.min(t*e,300);return o-n*((f+m*y*g)*Math.sinh(s)+t*g*Math.cosh(s))/t}}const A={calculatedDuration:p&&h||null,next:t=>{const e=w(t);if(p)a.done=t>=h;else{let n=0===t?f:0;m<1&&(n=0===t?x(f):ve(w,t,e));const i=Math.abs(n)<=s,u=Math.abs(o-e)<=r;a.done=i&&u}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(T(A),b),e=ye((e=>A.next(t*e).value),t,30);return t+"ms "+e},toTransition:()=>{}};return A}function Ne({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?u:void 0===u||Math.abs(a-t)-f*Math.exp(-t/s),v=t=>g+y(t),w=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=l,d.value=d.done?g:n};let b,T;const x=t=>{var e;(e=d.value,void 0!==a&&eu)&&(b=t,T=je({keyframes:[d.value,p(d.value)],velocity:ve(v,t,d.value),damping:r,stiffness:i,restDelta:l,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==b||(e=!0,w(t),x(t)),void 0!==b&&t>=b?T.next(t-b):(!e&&w(t),d)}}}function $e(t,e,{clamp:n=!0,ease:s,mixer:r}={}){const i=t.length;if(e.length,1===i)return()=>e[0];if(2===i&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const s=[],r=n||I.mix||me,i=t.length-1;for(let n=0;n{if(o&&n1)for(;sl(Mt(t[0],t[i-1],e)):l}function Ke(t,e){return t.map((t=>t*e))}je.applyToOptions=t=>{const e=A(t,100,je);return t.ease=e.ease,t.duration=x(e.duration),t.type="keyframes",t};const Ue=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Ye(t,e,n,s){if(t===e&&n===s)return N;const r=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=Ue(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:Ue(r(t),e,s)}const Xe=Ye(.42,0,1,1),ze=Ye(0,0,.58,1),He=Ye(.42,0,.58,1),qe=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ze=t=>e=>1-t(1-e),_e=Ye(.33,1.53,.69,.99),Ge=Ze(_e),Je=qe(Ge),Qe=t=>(t*=2)<1?.5*Ge(t):.5*(2-Math.pow(2,-10*(t-1))),tn=t=>1-Math.sin(Math.acos(t)),en=Ze(tn),nn=qe(tn),sn=t=>Array.isArray(t)&&"number"==typeof t[0],rn={linear:N,easeIn:Xe,easeInOut:He,easeOut:ze,circIn:tn,circInOut:nn,circOut:en,backIn:Ge,backInOut:Je,backOut:_e,anticipate:Qe},on=t=>{if(sn(t)){t.length;const[e,n,s,r]=t;return Ye(e,n,s,r)}return"string"==typeof t?rn[t]:t};function an(t,e){return t.map((()=>e||He)).splice(0,t.length-1)}function un({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=a(s)?s.map(on):on(s),i={done:!1,value:e[0]},o=$e(Ke(n&&n.length===e.length?n:v(e),t),e,{ease:Array.isArray(r)?r:an(e,r)});return{calculatedDuration:t,next:e=>(i.value=o(e),i.done=e>=t,i)}}const ln=t=>null!==t;function cn(t,{repeat:e,repeatType:n="loop"},s,r=1){const i=t.filter(ln),o=r<0||e&&"loop"!==n&&e%2==1?0:i.length-1;return o&&void 0!==s?s:i[o]}const hn={decay:Ne,inertia:Ne,tween:un,keyframes:un,spring:je};function dn(t){"string"==typeof t.type&&(t.type=hn[t.type])}class pn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise((t=>{this.resolve=t}))}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const fn=t=>t/100;class mn extends pn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==H.now()&&this.tick(H.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},yt.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;dn(t);const{type:e=un,repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:i=0}=t;let{keyframes:o}=t;const a=e||un;a!==un&&"number"!=typeof o[0]&&(this.mixKeyframes=le(fn,me(o[0],o[1])),o=[0,100]);const u=a({...t,keyframes:o});"mirror"===r&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-i})),null===u.calculatedDuration&&(u.calculatedDuration=T(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=u}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:s,mixKeyframes:r,mirroredGenerator:i,resolvedDuration:o,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:u=0,keyframes:l,repeat:c,repeatType:h,repeatDelay:d,type:p,onUpdate:f,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let v=this.currentTime,w=n;if(c){const t=Math.min(this.currentTime,s)/o;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/o)):"mirror"===h&&(w=i)),v=Mt(0,1,n)*o}const b=y?{done:!1,value:l[0]}:w.next(v);r&&(b.value=r(b.value));let{done:T}=b;y||null===a||(T=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return x&&p!==Ne&&(b.value=cn(l,this.options,m,this.speed)),f&&f(b.value),x&&this.finish(),b}then(t,e){return this.finished.then(t,e)}get duration(){return M(this.calculatedDuration)}get time(){return M(this.currentTime)}set time(t){t=x(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(H.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=M(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ge,startTime:e}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(H.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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,yt.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function gn(t){return new mn(t)}function yn(t){for(let e=1;e180*t/Math.PI,wn=t=>{const e=vn(Math.atan2(t[1],t[0]));return Tn(e)},bn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:wn,rotateZ:wn,skewX:t=>vn(Math.atan(t[1])),skewY:t=>vn(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Tn=t=>((t%=360)<0&&(t+=360),t),xn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Mn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),An={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:xn,scaleY:Mn,scale:t=>(xn(t)+Mn(t))/2,rotateX:t=>Tn(vn(Math.atan2(t[6],t[5]))),rotateY:t=>Tn(vn(Math.atan2(-t[2],t[0]))),rotateZ:wn,rotate:wn,skewX:t=>vn(Math.atan(t[4])),skewY:t=>vn(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Sn(t){return t.includes("scale")?1:0}function Vn(t,e){if(!t||"none"===t)return Sn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=An,r=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=bn,r=e}if(!r)return Sn(e);const i=s[e],o=r[1].split(",").map(En);return"function"==typeof i?i(o):o[i]}const kn=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Vn(n,e)};function En(t){return parseFloat(t.trim())}const Pn=t=>t===At||t===It,Cn=new Set(["x","y","z"]),On=ct.filter((t=>!Cn.has(t)));const Fn={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Vn(e,"x"),y:(t,{transform:e})=>Vn(e,"y")};Fn.translateX=Fn.x,Fn.translateY=Fn.y;const Rn=new Set;let Bn=!1,Ln=!1,Dn=!1;function Wn(){if(Ln){const t=Array.from(Rn).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return On.forEach((n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{t.getValue(e)?.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}Ln=!1,Bn=!1,Rn.forEach((t=>t.complete(Dn))),Rn.clear()}function In(){Rn.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(Ln=!0)}))}function jn(){Dn=!0,In(),Wn(),Dn=!1}class Nn{constructor(t,e,n,s,r,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=r,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(Rn.add(this),Bn||(Bn=!0,$.read(In),$.resolveKeyframes(Wn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;if(null===t[0]){const r=s?.get(),i=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const s=n.readValue(e,i);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=i),s&&void 0===r&&s.set(t[0])}yn(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Rn.delete(this)}cancel(){"scheduled"===this.state&&(Rn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const $n=t=>t.startsWith("--");function Kn(t,e,n){$n(e)?t.style.setProperty(e,n):t.style[e]=n}function Un(t){let e;return()=>(void 0===e&&(e=t()),e)}const Yn=Un((()=>void 0!==window.ScrollTimeline)),Xn={};function zn(t,e){const n=Un(t);return()=>Xn[e]??n()}const Hn=zn((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),"linearEasing"),qn=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Zn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:qn([0,.65,.55,1]),circOut:qn([.55,0,1,.45]),backIn:qn([.31,.01,.66,-.59]),backOut:qn([.33,1.53,.69,.99])};function _n(t,e){return t?"function"==typeof t?Hn()?ye(t,e):"ease-out":sn(t)?qn(t):Array.isArray(t)?t.map((t=>_n(t,e)||Zn.easeOut)):Zn[t]:void 0}function Gn(t,e,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:u}={},l=void 0){const c={[e]:n};u&&(c.offset=u);const h=_n(a,r);Array.isArray(h)&&(c.easing=h),W.value&&yt.waapi++;const d={delay:s,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"};l&&(d.pseudoElement=l);const p=t.animate(c,d);return W.value&&p.finished.finally((()=>{yt.waapi--})),p}function Jn({type:t,...e}){return w(t)&&Hn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Qn extends pn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:s,pseudoElement:r,allowFlatten:i=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=Boolean(r),this.allowFlatten=i,this.options=t,t.type;const u=Jn(t);this.animation=Gn(e,n,s,u,r),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const t=cn(s,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):Kn(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return M(Number(t))}get time(){return M(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=x(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Yn()?(this.animation.timeline=t,N):e(this)}}const ts={anticipate:Qe,backInOut:Je,circInOut:nn};function es(t){"string"==typeof t.ease&&t.ease in ts&&(t.ease=ts[t.ease])}class ns extends Qn{constructor(t){es(t),dn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:r,...i}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const o=new mn({...i,autoplay:!1}),a=x(this.finishedTime??this.time);e.setWithVelocity(o.sample(a-10).value,o.sample(a).value,10),o.stop()}}const ss=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Jt.test(t)&&"0"!==t||t.startsWith("url(")));function rs(t){return"object"==typeof t&&null!==t}function is(t){return rs(t)&&"offsetHeight"in t}const os=new Set(["opacity","clipPath","filter","transform"]),as=Un((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));function us(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t;if(!is(e?.owner?.current))return!1;const{onUpdate:a,transformTemplate:u}=e.owner.getProps();return as()&&n&&os.has(n)&&("transform"!==n||!u)&&!a&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}class ls extends pn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",keyframes:o,name:a,motionValue:u,element:l,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=H.now();const h={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:r,repeatType:i,name:a,motionValue:u,element:l,...c},d=l?.KeyframeResolver||Nn;this.keyframeResolver=new d(o,((t,e,n)=>this.onKeyframesResolved(t,e,h,!n)),a,u,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,s){this.keyframeResolver=void 0;const{name:r,type:i,velocity:o,delay:a,isHandoff:u,onUpdate:l}=n;this.resolvedAt=H.now(),function(t,e,n,s){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const i=t[t.length-1],o=ss(r,e),a=ss(i,e);return!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},h=!u&&us(c)?new ns({...c,element:c.motionValue.owner.current}):new mn(c);h.finished.then((()=>this.notifyFinished())).catch(N),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then((()=>{}))}get animation(){return this._animation||(this.keyframeResolver?.resume(),jn()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const cs=(t,e,n,s={},r,i)=>o=>{const a=gt(s,t)||{},u=a.delay||s.delay||0;let{elapsed:l=0}=s;l-=x(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:i?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:u,elapsed:l,...c}){return!!Object.keys(c).length})(a)||Object.assign(c,mt(t,c)),c.duration&&(c.duration=x(c.duration)),c.repeatDelay&&(c.repeatDelay=x(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(c.duration=0,0===c.delay&&(h=!0)),(I.instantAnimations||I.skipAnimations)&&(h=!0,c.duration=0,c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!i&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(lt),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}(c.keyframes,a);if(void 0!==t)return void $.update((()=>{c.onUpdate(t),c.onComplete()}))}return a.isSync?new mn(c):new ls(c)},hs=new Set(["width","height","top","left","right","bottom",...ct]);function ds({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function ps(t,e,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(i=s);const u=[],l=r&&t.animationState&&t.animationState.getState()[r];for(const e in a){const s=t.getValue(e,t.latestValues[e]??null),r=a[e];if(void 0===r||l&&ds(l,e))continue;const o={delay:n,...gt(i||{},e)},c=s.get();if(void 0!==c&&!s.isAnimating&&!Array.isArray(r)&&r===c&&!o.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const n=ut(t);if(n){const t=window.MotionHandoffAnimation(n,e,$);null!==t&&(o.startTime=t,h=!0)}}it(t,e),s.start(cs(e,s,r,t.shouldReduceMotion&&hs.has(e)?{type:!1}:o,t,h));const d=s.animation;d&&u.push(d)}return o&&Promise.all(u).then((()=>{$.update((()=>{o&&rt(t,o)}))})),u}const fs={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"]},ms={};for(const t in fs)ms[t]={isEnabled:e=>fs[t].some((t=>!!e[t]))};const gs=()=>({x:{min:0,max:0},y:{min:0,max:0}}),ys="undefined"!=typeof window,vs={current:null},ws={current:!1};const bs=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Ts(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||bs.some((e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e])));var e}const xs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ms=t=>/^0[^.\s]+$/u.test(t),As=t=>e=>e.test(t),Ss=[At,It,Wt,Dt,Nt,jt,{test:t=>"auto"===t,parse:t=>t}],Vs=t=>Ss.find(As(t)),ks=[...Ss,Ut,Jt],Es=t=>ks.find(As(t)),Ps=new Set(["brightness","contrast","saturate","opacity"]);function Cs(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(Et)||[];if(!s)return t;const r=n.replace(s,"");let i=Ps.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const Os=/\b([a-z-]*)\(.*?\)/gu,Fs={...Jt,getAnimatableNone:t=>{const e=t.match(Os);return e?e.map(Cs).join(" "):t}},Rs={...At,transform:Math.round},Bs={rotate:Dt,rotateX:Dt,rotateY:Dt,rotateZ:Dt,scale:Vt,scaleX:Vt,scaleY:Vt,scaleZ:Vt,skew:Dt,skewX:Dt,skewY:Dt,distance:It,translateX:It,translateY:It,translateZ:It,x:It,y:It,z:It,perspective:It,transformPerspective:It,opacity:St,originX:$t,originY:$t,originZ:It},Ls={borderWidth:It,borderTopWidth:It,borderRightWidth:It,borderBottomWidth:It,borderLeftWidth:It,borderRadius:It,radius:It,borderTopLeftRadius:It,borderTopRightRadius:It,borderBottomRightRadius:It,borderBottomLeftRadius:It,width:It,maxWidth:It,height:It,maxHeight:It,top:It,right:It,bottom:It,left:It,padding:It,paddingTop:It,paddingRight:It,paddingBottom:It,paddingLeft:It,margin:It,marginTop:It,marginRight:It,marginBottom:It,marginLeft:It,backgroundPositionX:It,backgroundPositionY:It,...Bs,zIndex:Rs,fillOpacity:St,strokeOpacity:St,numOctaves:Rs},Ds={...Ls,color:Ut,backgroundColor:Ut,outlineColor:Ut,fill:Ut,stroke:Ut,borderColor:Ut,borderTopColor:Ut,borderRightColor:Ut,borderBottomColor:Ut,borderLeftColor:Ut,filter:Fs,WebkitFilter:Fs},Ws=t=>Ds[t];function Is(t,e){let n=Ws(t);return n!==Fs&&(n=Jt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const js=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ns{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Nn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=H.now();this.renderScheduledAtthis.bindToMotionValue(e,t))),ws.current||function(){if(ws.current=!0,ys)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>vs.current=t.matches;t.addListener(e),e()}else vs.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||vs.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),K(this.notifyUpdate),K(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=ht.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&$.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),r=e.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{s(),r(),i&&i(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in ms){const e=ms[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=et(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(xs(n)||Ms(n))?n=parseFloat(n):!Es(n)&&Jt.test(e)&&(n=Is(t,e)),this.setBaseTarget(t,m(n)?n.get():n)),m(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const s=L(this.props,e,this.presenceContext?.custom);s&&(n=s[t])}if(e&&void 0!==n)return n;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||m(s)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new G),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}const $s=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ks(t){const e=$s.exec(t);if(!e)return[,];const[,n,s,r]=e;return[`--${n??s}`,r]}function Us(t,e,n=1){const[s,r]=Ks(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);if(i){const t=i.trim();return xs(t)?parseFloat(t):t}return Tt(r)?Us(r,e,n+1):r}const Ys=new Set(["auto","none","0"]);class Xs extends Nn{constructor(t,e,n,s,r){super(t,e,n,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}class zs extends Ns{constructor(){super(...arguments),this.KeyframeResolver=Xs}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;m(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}const Hs=(t,e)=>e&&"number"==typeof t?e.transform(t):t,qs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Zs=ct.length;function _s(t,e,n){const{style:s,vars:r,transformOrigin:i}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(ht.has(t))o=!0;else if(wt(t))r[t]=n;else{const e=Hs(n,Ls[t]);t.startsWith("origin")?(a=!0,i[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",r=!0;for(let i=0;i{const c=P(t),{delay:h=0,times:f=v(c),type:m="keyframes",repeat:g,repeatType:b,repeatDelay:T=0,...M}=n;let{ease:k=e.ease||"easeOut",duration:E}=n;const C="function"==typeof h?h(i,o):h,O=c.length,B=w(m)?m:a?.[m];if(O<=2&&B){let t=100;if(2===O&&F(c)){const e=c[1]-c[0];t=Math.abs(e)}const e={...M};void 0!==E&&(e.duration=x(E));const n=A(e,t,B);k=n.ease,E=n.duration}E??(E=l);const L=S+C;1===f.length&&0===f[0]&&(f[1]=1);const D=f.length-c.length;if(D>0&&y(f,D),1===c.length&&c.unshift(null),g){E=s(E,g);const t=[...c],e=[...f];k=Array.isArray(k)?[...k]:[k];const n=[...k];for(let s=0;s{for(const s in t){const r=t[s];r.sort(f);const o=[],a=[],u=[];for(let t=0;t{o.push(...dr(n,t,e))})),o}class fr{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map((t=>t.finished)))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;ne.attachTimeline(t)));return()=>{e.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;ee[t]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class mr extends fr{then(t,e){return this.finished.finally(t).then((()=>{}))}}function gr(t){return function(e,n,s){let r=[];var i;i=e,r=Array.isArray(i)&&i.some(Array.isArray)?pr(e,n,t):dr(e,n,s,t);const o=new mr(r);return t&&t.animations.push(o),o}}const yr=gr(),vr=new WeakMap,wr=(t,e="")=>`${t}:${e}`;function br(t){const e=vr.get(t)||new Map;return vr.set(t,e),e}function Tr(t,e){const n=window.getComputedStyle(t);return $n(e)?n.getPropertyValue(e):n[e]}const xr=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","backgroundPositionX","backgroundPositionY"]);function Mr(t,e){for(let n=0;nfunction(n,s,r){return new mr(function(t,n,s,r){const i=e(t,r),o=i.length,a=[];for(let t=0;te.delete(n))),u.push(r)}return u}(n,s,r,t))},Sr=Ar(),Vr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function kr(t,e,n,s){const r=n[e],{length:i,position:o}=Vr[e],a=r.current,u=n.time;r.current=t[`scroll${o}`],r.scrollLength=t[`scroll${i}`]-t[`client${i}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=g(0,r.scrollLength,r.current);const l=s-u;r.velocity=l>50?0:J(r.current-a,l)}const Er={start:0,center:.5,end:1};function Pr(t,e,n=0){let s=0;if(t in Er&&(t=Er[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const Cr=[0,0];function Or(t,e,n,s){let r=Array.isArray(t)?t:Cr,i=0,o=0;return"number"==typeof t?r=[t,t]:"string"==typeof t&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,Er[t]?t:"0"]),i=Pr(r[0],n,s),o=Pr(r[1],e),i-o}const Fr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Rr={x:0,y:0};function Br(t,e,n){const{offset:s=Fr.All}=n,{target:r=t,axis:i="y"}=n,o="y"===i?"height":"width",a=r!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(is(s))n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let r=null,i=s.parentNode;for(;!r;)"svg"===i.tagName&&(r=i),i=s.parentNode;s=r}}return n}(r,t):Rr,u=r===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(r),l={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let c=!e[i].interpolate;const h=s.length;for(let t=0;t{!function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),function(t,e,n){kr(t,"x",e,n),kr(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&Br(t,n,s)},notify:()=>e(n)}}const Dr=new WeakMap;let Wr;const Ir=(t,e,n)=>(s,r)=>r&&r[0]?r[0][t+"Size"]:ur(s)&&"getBBox"in s?s.getBBox()[e]:s[n],jr=Ir("inline","width","offsetWidth"),Nr=Ir("block","height","offsetHeight");function $r({target:t,borderBoxSize:e}){Dr.get(t)?.forEach((n=>{n(t,{get width(){return jr(t,e)},get height(){return Nr(t,e)}})}))}function Kr(t){t.forEach($r)}function Ur(t,n){Wr||"undefined"!=typeof ResizeObserver&&(Wr=new ResizeObserver(Kr));const s=e(t);return s.forEach((t=>{let e=Dr.get(t);e||(e=new Set,Dr.set(t,e)),e.add(n),Wr?.observe(t)})),()=>{s.forEach((t=>{const e=Dr.get(t);e?.delete(n),e?.size||Wr?.unobserve(t)}))}}const Yr=new Set;let Xr;function zr(t){return Yr.add(t),Xr||(Xr=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Yr.forEach((e=>e(t)))},window.addEventListener("resize",Xr)),()=>{Yr.delete(t),Yr.size||"function"!=typeof Xr||(window.removeEventListener("resize",Xr),Xr=void 0)}}function Hr(t,e){return"function"==typeof t?zr(t):Ur(t,e)}const qr=new WeakMap,Zr=new WeakMap,_r=new WeakMap,Gr=t=>t===document.scrollingElement?window:t;function Jr(t,{container:e=document.scrollingElement,...n}={}){if(!e)return N;let s=_r.get(e);s||(s=new Set,_r.set(e,s));const r=Lr(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(r),!qr.has(e)){const t=()=>{for(const t of s)t.measure(U.timestamp);$.preUpdate(n)},n=()=>{for(const t of s)t.notify()},r=()=>$.read(t);qr.set(e,r);const i=Gr(e);window.addEventListener("resize",r,{passive:!0}),e!==document.documentElement&&Zr.set(e,Hr(e,r)),i.addEventListener("scroll",r,{passive:!0}),r()}const i=qr.get(e);return $.read(i,!1,!0),()=>{K(i);const t=_r.get(e);if(!t)return;if(t.delete(r),t.size)return;const n=qr.get(e);qr.delete(e),n&&(Gr(e).removeEventListener("scroll",n),Zr.get(e)?.(),window.removeEventListener("resize",n))}}const Qr=new Map;function ti({source:t,container:e,...n}){const{axis:s}=n;t&&(e=t);const r=Qr.get(e)??new Map;Qr.set(e,r);const i=n.target??"self",o=r.get(i)??{},a=s+(n.offset??[]).join(",");return o[a]||(o[a]=!n.target&&Yn()?new ScrollTimeline({source:e,axis:s}):function(t){const e={value:0},n=Jr((n=>{e.value=100*n[t.axis].progress}),t);return{currentTime:e,cancel:n}}({container:e,...n})),o[a]}function ei(t,e){let n;const s=()=>{const{currentTime:s}=e,r=(null===s?0:s.value)/100;n!==r&&t(r),n=r};return $.preUpdate(s,!0),()=>K(s)}function ni(t,{axis:e="y",container:n=document.scrollingElement,...s}={}){if(!n)return N;const r={axis:e,container:n,...s};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?Jr((n=>{t(n[e.axis].progress,n)}),e):ei(t,ti(e))}(t,r):function(t,e){const n=ti(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:t=>(t.pause(),ei((e=>{t.time=t.duration*e}),n))})}(t,r)}const si={some:0,all:1};function ri(t,n,{root:s,margin:r,amount:i="some"}={}){const o=e(t),a=new WeakMap,u=new IntersectionObserver((t=>{t.forEach((t=>{const e=a.get(t.target);if(t.isIntersecting!==Boolean(e))if(t.isIntersecting){const e=n(t.target,t);"function"==typeof e?a.set(t.target,e):u.unobserve(t.target)}else"function"==typeof e&&(e(t),a.delete(t.target))}))}),{root:s,rootMargin:r,threshold:"number"==typeof i?i:si[i]});return o.forEach((t=>u.observe(t))),()=>u.disconnect()}function ii(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(r,i)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,i),a=Math.abs(o-r);let u=t*a;if(s){const e=i*t;u=on(s)(u/e)*e}return e+u}}function oi(t,e){return function(t,e){const n=H.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(K(s),t(i-e))};return $.setup(s,!0),()=>K(s)}(t,x(e))}const ai=(t,e)=>Math.abs(t-e);function ui(t,e){const n=ai(t.x,e.x),s=ai(t.y,e.y);return Math.sqrt(n**2+s**2)}class li extends Qn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}function ci(t){return Boolean("function"==typeof t&&Hn()||!t||"string"==typeof t&&(t in Zn||Hn())||sn(t)||Array.isArray(t)&&t.every(ci))}const hi=Un((()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0})),di=new Set(["opacity","clipPath","filter","transform"]);function pi(t){return(n,s)=>{const r=e(n),i=[];for(const e of r){const n=t(e,s);i.push(n)}return()=>{for(const t of i)t()}}}class fi{constructor(){this.latest={},this.values=new Map}set(t,e,n,s,r=!0){const i=this.values.get(t);i&&i.onRemove();const o=()=>{const s=e.get();this.latest[t]=r?Hs(s,Ls[t]):s,n&&$.render(n)};o();const a=e.on("change",o);s&&e.addDependent(s);const u=()=>{a(),n&&K(n),this.values.delete(t),s&&e.removeDependent(s)};return this.values.set(t,{value:e,onRemove:u}),u}get(t){return this.values.get(t)?.value}destroy(){for(const t of this.values.values())t.onRemove()}}function mi(t){const e=new WeakMap,n=[];return(s,r)=>{const i=e.get(s)??new fi;e.set(s,i);for(const e in r){const o=r[e],a=t(s,i,e,o);n.push(a)}return()=>{for(const t of n)t()}}}const gi=(t,e,n,s)=>{const r=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),i=r?n:n.startsWith("data")||n.startsWith("aria")?n.replace(/([A-Z])/g,(t=>`-${t.toLowerCase()}`)):n;const o=r?()=>{t[i]=e.latest[n]}:()=>{const s=e.latest[n];null==s?t.removeAttribute(i):t.setAttribute(i,String(s))};return e.set(n,s,o)},yi=pi(mi(gi)),vi=mi(((t,e,n,s)=>e.set(n,s,(()=>{t[n]=e.latest[n]}),void 0,!1))),wi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const bi=new Set(["originX","originY","originZ"]),Ti=(t,e,n,s)=>{let r,i;return ht.has(n)?(e.get("transform")||(is(t)||e.get("transformBox")||Ti(t,e,"transformBox",new tt("fill-box")),e.set("transform",new tt("none"),(()=>{t.style.transform=function(t){let e="",n=!0;for(let s=0;s{const n=e.latest.originX??"50%",s=e.latest.originY??"50%",r=e.latest.originZ??0;t.style.transformOrigin=`${n} ${s} ${r}`})),i=e.get("transformOrigin")):r=$n(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,s,r,i)},xi=pi(mi(Ti)),Mi=It.transform;const Ai=pi(mi(((t,e,n,s)=>{if(n.startsWith("path"))return function(t,e,n,s){return $.render((()=>t.setAttribute("pathLength","1"))),"pathOffset"===n?e.set(n,s,(()=>t.setAttribute("stroke-dashoffset",Mi(-e.latest[n])))):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new tt("1 1"),(()=>{const{pathLength:n=1,pathSpacing:s}=e.latest;t.setAttribute("stroke-dasharray",`${Mi(n)} ${Mi(s??1-Number(n))}`)})),e.set(n,s,void 0,e.get("stroke-dasharray")))}(t,e,n,s);if(n.startsWith("attr"))return gi(t,e,function(t){return t.replace(/^attr([A-Z])/,((t,e)=>e.toLowerCase()))}(n),s);return(n in t.style?Ti:gi)(t,e,n,s)})));const{schedule:Si,cancel:Vi}=j(queueMicrotask,!1),ki={x:!1,y:!1};function Ei(){return ki.x||ki.y}function Pi(t){return"x"===t||"y"===t?ki[t]?null:(ki[t]=!0,()=>{ki[t]=!1}):ki.x||ki.y?null:(ki.x=ki.y=!0,()=>{ki.x=ki.y=!1})}function Ci(t,n){const s=e(t),r=new AbortController;return[s,{passive:!0,...n,signal:r.signal},()=>r.abort()]}function Oi(t){return!("touch"===t.pointerType||Ei())}function Fi(t,e,n={}){const[s,r,i]=Ci(t,n),o=t=>{if(!Oi(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const i=t=>{Oi(t)&&(s(t),n.removeEventListener("pointerleave",i))};n.addEventListener("pointerleave",i,r)};return s.forEach((t=>{t.addEventListener("pointerenter",o,r)})),i}const Ri=(t,e)=>!!e&&(t===e||Ri(t,e.parentElement)),Bi=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Li=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Di=new WeakSet;function Wi(t){return e=>{"Enter"===e.key&&t(e)}}function Ii(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function ji(t){return Bi(t)&&!Ei()}function Ni(t,e,n={}){const[s,r,i]=Ci(t,n),o=t=>{const s=t.currentTarget;if(!ji(t))return;Di.add(s);const i=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",u),Di.has(s)&&Di.delete(s),ji(t)&&"function"==typeof i&&i(t,{success:e})},a=t=>{o(t,s===window||s===document||n.useGlobalTarget||Ri(s,t.target))},u=t=>{o(t,!1)};window.addEventListener("pointerup",a,r),window.addEventListener("pointercancel",u,r)};return s.forEach((t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,r),is(t)&&(t.addEventListener("focus",(t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=Wi((()=>{if(Di.has(n))return;Ii(n,"down");const t=Wi((()=>{Ii(n,"up")}));n.addEventListener("keyup",t,e),n.addEventListener("blur",(()=>Ii(n,"cancel")),e)}));n.addEventListener("keydown",s,e),n.addEventListener("blur",(()=>n.removeEventListener("keydown",s)),e)})(t,r))),e=t,Li.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))})),i}function $i(){const{value:t}=W;null!==t?(t.frameloop.rate.push(U.delta),t.animations.mainThread.push(yt.mainThread),t.animations.waapi.push(yt.waapi),t.animations.layout.push(yt.layout)):K($i)}function Ki(t){return t.reduce(((t,e)=>t+e),0)/t.length}function Ui(t,e=Ki){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const Yi=t=>Math.round(1e3/t);function Xi(){W.value=null,W.addProjectionMetrics=null}function zi(){const{value:t}=W;if(!t)throw new Error("Stats are not being measured");Xi(),K($i);const e={frameloop:{setup:Ui(t.frameloop.setup),rate:Ui(t.frameloop.rate),read:Ui(t.frameloop.read),resolveKeyframes:Ui(t.frameloop.resolveKeyframes),preUpdate:Ui(t.frameloop.preUpdate),update:Ui(t.frameloop.update),preRender:Ui(t.frameloop.preRender),render:Ui(t.frameloop.render),postRender:Ui(t.frameloop.postRender)},animations:{mainThread:Ui(t.animations.mainThread),waapi:Ui(t.animations.waapi),layout:Ui(t.animations.layout)},layoutProjection:{nodes:Ui(t.layoutProjection.nodes),calculatedTargetDeltas:Ui(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:Ui(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=Yi(n.min),n.max=Yi(n.max),n.avg=Yi(n.avg),[n.min,n.max]=[n.max,n.min],e}function Hi(){if(W.value)throw Xi(),new Error("Stats are already being measured");const t=W;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},$.postRender($i,!0),zi}function qi(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],r=$e(t[1+n],t[2+n],t[3+n]);return e?r(s):r}function Zi(t){const e=[];Q.current=e;const n=t();Q.current=void 0;const s=et(n);return function(t,e,n){const s=()=>e.set(n()),r=()=>$.preRender(s,!1,!0),i=t.map((t=>t.on("change",r)));e.on("destroy",(()=>{i.forEach((t=>t())),K(s)}))}(e,s,t),s}function _i(t,e,n,s){const r=qi(e,n,s);return Zi((()=>r(t.get())))}function Gi(t,e){const n=et(m(t)?t.get():t);return Ji(n,t,e),n}function Ji(t,e,n){const s=t.get();let r,i=null,o=s;const a="string"==typeof s?s.replace(/[\d.-]/g,""):void 0,u=()=>{i&&(i.stop(),i=null)},l=()=>{u(),i=new mn({keyframes:[to(t.get()),to(o)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:r})};let c;return t.attach(((e,n)=>(o=e,r=t=>n(Qi(t,a)),$.postRender(l),t.get())),u),m(e)&&(c=e.on("change",(e=>t.set(Qi(e,a)))),t.on("destroy",c)),c}function Qi(t,e){return e?t+e:t}function to(t){return"number"==typeof t?t:parseFloat(t)}function eo(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let no={},so=null;const ro=(t,e)=>{no[t]=e},io=()=>{so||(so=document.createElement("style"),so.id="motion-view");let t="";for(const e in no){const n=no[e];t+=`${e} {\n`;for(const[e,s]of Object.entries(n))t+=` ${e}: ${s};\n`;t+="}\n"}so.textContent=t,document.head.appendChild(so),no={}},oo=()=>{so&&so.parentElement&&so.parentElement.removeChild(so)};function ao(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function uo(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}const lo=["layout","enter","exit","new","old"];function co(t){const{update:e,targets:n,options:s}=t;if(!document.startViewTransition)return new Promise((async t=>{await e(),t(new fr([]))}));(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||ro(":root",{"view-transition-name":"none"}),ro("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),io();const r=document.startViewTransition((async()=>{await e()}));return r.finished.finally((()=>{oo()})),new Promise((t=>{r.ready.then((()=>{const e=document.getAnimations().filter(uo),r=[];n.forEach(((t,e)=>{for(const n of lo){if(!t[n])continue;const{keyframes:i,options:o}=t[n];for(let[t,a]of Object.entries(i)){if(!a)continue;const i={...gt(s,t),...gt(o,t)},u=eo(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===u?0:1,a]}"function"==typeof i.delay&&(i.delay=i.delay(0,1)),i.duration&&(i.duration=x(i.duration)),i.delay&&(i.delay=x(i.delay));const l=new Qn({...i,element:document.documentElement,name:t,pseudoElement:`::view-transition-${u}(${e})`,keyframes:a});r.push(l)}}}));for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:i}=e;if(!i)continue;const o=ao(i);if(!o)continue;const a=n.get(o.layer);if(a)ho(a,"enter")&&ho(a,"exit")&&e.getKeyframes().some((t=>t.mixBlendMode))?r.push(new li(t)):t.cancel();else{const n="group"===o.type?"layout":"";let i={...gt(s,n)};i.duration&&(i.duration=x(i.duration)),i=Jn(i);const a=_n(i.ease,i.duration);e.updateTiming({delay:x(i.delay??0),duration:i.duration,easing:a}),r.push(new li(t))}}t(new fr(r))}))}))}function ho(t,e){return t?.[e]?.keyframes.opacity}let po=[],fo=null;function mo(){fo=null;const[t]=po;var e;t&&(c(po,e=t),fo=e,co(e).then((t=>{e.notifyReady(t),t.finished.finally(mo)})))}function go(){for(let t=po.length-1;t>=0;t--){const e=po[t],{interrupt:n}=e.options;if("immediate"===n){const n=po.slice(0,t+1).map((t=>t.update)),s=po.slice(t+1);e.update=()=>{n.forEach((t=>t()))},po=[e,...s];break}}fo&&"immediate"!==po[0]?.options.interrupt||mo()}class yo{constructor(t,e={}){var n;this.currentTarget="root",this.targets=new Map,this.notifyReady=N,this.readyPromise=new Promise((t=>{this.notifyReady=t})),this.update=t,this.options={interrupt:"wait",...e},n=this,po.push(n),Si.render(go)}get(t){return this.currentTarget=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentTarget:s,targets:r}=this;r.has(s)||r.set(s,{});r.get(s)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}function vo(t,e={}){return new yo(t,e)}const wo=$,bo=D.reduce(((t,e)=>(t[e]=t=>K(t),t)),{});function To(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,r="end"===e?Math.floor(s):Math.ceil(s);return Mt(0,1,r/t)}}export{ls as AsyncMotionValueAnimation,Xs as DOMKeyframesResolver,fr as GroupAnimation,mr as GroupAnimationWithThen,mn as JSAnimation,Nn as KeyframeResolver,I as MotionGlobalConfig,tt as MotionValue,Qn as NativeAnimation,ns as NativeAnimationExtended,li as NativeAnimationWrapper,G as SubscriptionManager,yo as ViewTransitionBuilder,di as acceleratedValues,yt as activeAnimations,gi as addAttrValue,Ti as addStyleValue,l as addUniqueItem,St as alpha,qt as analyseComplexValue,yr as animate,Sr as animateMini,gn as animateValue,vo as animateView,wr as animationMapKey,Qe as anticipate,Mr as applyPxDefaults,Ji as attachSpring,yi as attrEffect,Ge as backIn,Je as backInOut,_e as backOut,T as calcGeneratorDuration,K as cancelFrame,Vi as cancelMicrotask,bo as cancelSync,tn as circIn,nn as circInOut,en as circOut,Mt as clamp,Q as collectMotionValues,Ut as color,Jt as complex,Ke as convertOffsetToTimes,A as createGeneratorEasing,j as createRenderBatcher,gr as createScopedAnimate,Ye as cubicBezier,qn as cubicBezierAsString,an as defaultEasing,v as defaultOffset,Sn as defaultTransformValue,Ds as defaultValueTypes,Dt as degrees,oi as delay,Ss as dimensionValueTypes,ai as distance,ui as distance2D,Xe as easeIn,He as easeInOut,ze as easeOut,on as easingDefinitionToFunction,y as fillOffset,yn as fillWildcards,Vs as findDimensionValueType,Es as findValueType,jn as flushKeyframeResolvers,$ as frame,U as frameData,Y as frameSteps,ye as generateLinearEasing,Is as getAnimatableNone,br as getAnimationMap,Tr as getComputedStyle,Ws as getDefaultValueType,u as getEasingForSegment,he as getMixer,Hs as getValueAsType,gt as getValueTransition,Us as getVariableValue,Z as hasWarned,Bt as hex,Fi as hover,Kt as hsla,te as hslaToRgba,ri as inView,Ne as inertia,$e as interpolate,V as invariant,oe as invisibleValues,sn as isBezierDefinition,wt as isCSSVariableName,Tt as isCSSVariableToken,Ei as isDragActive,ki as isDragging,a as isEasingArray,w as isGenerator,is as isHTMLElement,m as isMotionValue,Ri as isNodeOrChild,xs as isNumericalString,rs as isObject,Bi as isPrimaryPointer,ur as isSVGElement,lr as isSVGSVGElement,ci as isWaapiSupportedEasing,Ms as isZeroValueString,un as keyframes,_n as mapEasingToNativeEasing,_i as mapValue,b as maxGeneratorDuration,Un as memo,Si as microtask,M as millisecondsToSeconds,qe as mirrorEasing,me as mix,de as mixArray,ie as mixColor,fe as mixComplex,ee as mixImmediate,ne as mixLinearColor,i as mixNumber,pe as mixObject,ae as mixVisibility,et as motionValue,h as moveItem,N as noop,At as number,Ls as numberValueTypes,ei as observeTimeline,Ks as parseCSSVariable,Vn as parseValueFromTransform,Wt as percent,le as pipe,hs as positionalKeys,Ni as press,g as progress,$t as progressPercentage,vi as propEffect,It as px,kn as readTransformValue,Hi as recordStats,c as removeItem,Hr as resize,e as resolveElements,Ze as reverseEasing,Ft as rgbUnit,Rt as rgba,Vt as scale,ni as scroll,Jr as scrollInfo,x as secondsToMilliseconds,Pi as setDragLock,Kn as setStyle,je as spring,Gi as springValue,ii as stagger,Gn as startWaapiAnimation,W as statsBuffer,To as steps,xi as styleEffect,Zn as supportedWaapiEasing,us as supportsBrowserAnimation,Xn as supportsFlags,Hn as supportsLinearEasing,hi as supportsPartialKeyframes,Yn as supportsScrollTimeline,Ai as svgEffect,wo as sync,As as testValueType,H as time,qi as transform,ct as transformPropOrder,ht as transformProps,Zi as transformValue,Bs as transformValueTypes,J as velocityPerSecond,jt as vh,Nt as vw,_ as warnOnce,S as warning,o as wrap};export default null; \ No newline at end of file +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,function(t){"use strict";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const s=(t,e,n)=>n>e?e:n{};const r={},o=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function a(t){return"object"==typeof t&&null!==t}const l=t=>/^0[^.\s]+$/u.test(t);function u(t){let e;return()=>(void 0===e&&(e=t()),e)}const c=t=>t,h=(t,e)=>n=>e(t(n)),d=(...t)=>t.reduce(h),p=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};class f{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>n(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i1e3*t,g=t=>t/1e3;function y(t,e){return e?t*(1e3/e):0}const v=new Set;const w=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},b=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function T(t,e,n,s){if(t===e&&n===s)return c;const i=e=>function(t,e,n,s,i){let r,o,a=0;do{o=e+(n-e)/2,r=b(o,s,i)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:b(i(t),e,s)}const x=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,M=t=>e=>1-t(1-e),S=T(.33,1.53,.69,.99),V=M(S),A=x(V),k=t=>(t*=2)<1?.5*V(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),P=M(E),C=x(E),O=T(.42,0,1,1),F=T(0,0,.58,1),R=T(.42,0,.58,1);const B=t=>Array.isArray(t)&&"number"!=typeof t[0];function L(t,e){return B(t)?t[w(0,t.length,e)]:t}const D=t=>Array.isArray(t)&&"number"==typeof t[0],W={linear:c,easeIn:O,easeInOut:R,easeOut:F,circIn:E,circInOut:C,circOut:P,backIn:V,backInOut:A,backOut:S,anticipate:k},I=t=>{if(D(t)){t.length;const[e,n,s,i]=t;return T(e,n,s,i)}return"string"==typeof t?W[t]:t},j=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],N={value:null,addProjectionMetrics:null};function K(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=j.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){o.has(e)&&(c.schedule(e),t()),l++,e(a)}const c={schedule:(t,e=!1,r=!1)=>{const a=r&&i?n:s;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{a=t,i?r=!0:(i=!0,[n,s]=[s,n],n.forEach(u),e&&N.value&&N.value.frameloop[e].push(l),l=0,n.clear(),i=!1,r&&(r=!1,c.process(t)))}};return c}(o,e?n:void 0),t),{}),{setup:l,read:u,resolveKeyframes:c,preUpdate:h,update:d,preRender:p,render:f,postRender:m}=a,g=()=>{const o=r.useManualTiming?i.timestamp:performance.now();n=!1,r.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(o-i.timestamp,40),1)),i.timestamp=o,i.isProcessing=!0,l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),p.process(i),f.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))};return{schedule:j.reduce((e,r)=>{const o=a[r];return e[r]=(e,r=!1,a=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(g)),o.schedule(e,r,a)),e},{}),cancel:t=>{for(let e=0;e(void 0===X&&G.set(Y.isProcessing||r.useManualTiming?Y.timestamp:performance.now()),X),set:t=>{X=t,queueMicrotask(H)}},Z={layout:0,mainThread:0,waapi:0},q=t=>e=>"string"==typeof e&&e.startsWith(t),_=q("--"),J=q("var(--"),Q=t=>!!J(t)&&tt.test(t.split("/*")[0].trim()),tt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,et={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},nt={...et,transform:t=>s(0,1,t)},st={...et,default:1},it=t=>Math.round(1e5*t)/1e5,rt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const ot=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,at=(t,e)=>n=>Boolean("string"==typeof n&&ot.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),lt=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[i,r,o,a]=s.match(rt);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},ut={...et,transform:t=>Math.round((t=>s(0,255,t))(t))},ct={test:at("rgb","red"),parse:lt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ut.transform(t)+", "+ut.transform(e)+", "+ut.transform(n)+", "+it(nt.transform(s))+")"};const ht={test:at("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:ct.transform},dt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),pt=dt("deg"),ft=dt("%"),mt=dt("px"),gt=dt("vh"),yt=dt("vw"),vt=(()=>({...ft,parse:t=>ft.parse(t)/100,transform:t=>ft.transform(100*t)}))(),wt={test:at("hsl","hue"),parse:lt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ft.transform(it(e))+", "+ft.transform(it(n))+", "+it(nt.transform(s))+")"},bt={test:t=>ct.test(t)||ht.test(t)||wt.test(t),parse:t=>ct.test(t)?ct.parse(t):wt.test(t)?wt.parse(t):ht.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ct.transform(t):wt.transform(t),getAnimatableNone:t=>{const e=bt.parse(t);return e.alpha=0,bt.transform(e)}},Tt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const xt="number",Mt="color",St=/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 Vt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const o=e.replace(St,t=>(bt.test(t)?(s.color.push(r),i.push(Mt),n.push(bt.parse(t))):t.startsWith("var(")?(s.var.push(r),i.push("var"),n.push(t)):(s.number.push(r),i.push(xt),n.push(parseFloat(t))),++r,"${}")).split("${}");return{values:n,split:o,indexes:s,types:i}}function At(t){return Vt(t).values}function kt(t){const{split:e,types:n}=Vt(t),s=e.length;return t=>{let i="";for(let r=0;r"number"==typeof t?0:bt.test(t)?bt.getAnimatableNone(t):t;const Pt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(rt)?.length||0)+(t.match(Tt)?.length||0)>0},parse:At,createTransformer:kt,getAnimatableNone:function(t){const e=At(t);return kt(t)(e.map(Et))}};function Ct(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ot({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,r=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=Ct(a,s,t+1/3),r=Ct(a,s,t),o=Ct(a,s,t-1/3)}else i=r=o=n;return{red:Math.round(255*i),green:Math.round(255*r),blue:Math.round(255*o),alpha:s}}function Ft(t,e){return n=>n>0?e:t}const Rt=(t,e,n)=>t+(e-t)*n,Bt=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Lt=[ht,ct,wt];function Dt(t){const e=(n=t,Lt.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===wt&&(s=Ot(s)),s}const Wt=(t,e)=>{const n=Dt(t),s=Dt(e);if(!n||!s)return Ft(t,e);const i={...n};return t=>(i.red=Bt(n.red,s.red,t),i.green=Bt(n.green,s.green,t),i.blue=Bt(n.blue,s.blue,t),i.alpha=Rt(n.alpha,s.alpha,t),ct.transform(i))},It=new Set(["none","hidden"]);function jt(t,e){return It.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Nt(t,e){return n=>Rt(t,e,n)}function Kt(t){return"number"==typeof t?Nt:"string"==typeof t?Q(t)?Ft:bt.test(t)?Wt:Yt:Array.isArray(t)?$t:"object"==typeof t?bt.test(t)?Wt:Ut:Ft}function $t(t,e){const n=[...t],s=n.length,i=t.map((t,n)=>Kt(t)(t,e[n]));return t=>{for(let e=0;e{for(const e in s)n[e]=s[e](t);return n}}const Yt=(t,e)=>{const n=Pt.createTransformer(e),s=Vt(t),i=Vt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?It.has(t)&&!i.values.length||It.has(e)&&!s.values.length?jt(t,e):d($t(function(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>$.update(e,t),stop:()=>U(e),now:()=>Y.isProcessing?Y.timestamp:G.now()}},Ht=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let e=0;e=Gt?1/0:e}function qt(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Zt(s),Gt);return{type:"keyframes",ease:t=>s.next(i*t).value/e,duration:g(i)}}function _t(t,e,n){const s=Math.max(e-5,0);return y(n-t(s),e-s)}const Jt=100,Qt=10,te=1,ee=0,ne=800,se=.3,ie=.3,re={granular:.01,default:2},oe={granular:.005,default:.5},ae=.01,le=10,ue=.05,ce=1,he=.001;function de({duration:t=ne,bounce:e=se,velocity:n=ee,mass:i=te}){let r,o,a=1-e;a=s(ue,ce,a),t=s(ae,le,g(t)),a<1?(r=e=>{const s=e*a,i=s*t,r=s-n,o=fe(e,a),l=Math.exp(-i);return he-r/o*l},o=e=>{const s=e*a*t,i=s*n+n,o=Math.pow(a,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=fe(Math.pow(e,2),a);return(-r(e)+he>0?-1:1)*((i-o)*l)/u}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const l=function(t,e,n){let s=n;for(let n=1;nvoid 0!==t[e])}function ve(t=ie,e=se){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:r}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:o},{stiffness:u,damping:c,mass:h,duration:d,velocity:p,isResolvedFromDuration:f}=function(t){let e={velocity:ee,stiffness:Jt,damping:Qt,mass:te,isResolvedFromDuration:!1,...t};if(!ye(t,ge)&&ye(t,me))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),r=i*i,o=2*s(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:te,stiffness:r,damping:o}}else{const n=de(t);e={...e,...n,mass:te},e.isResolvedFromDuration=!0}return e}({...n,velocity:-g(n.velocity||0)}),y=p||0,v=c/(2*Math.sqrt(u*h)),w=a-o,b=g(Math.sqrt(u/h)),T=Math.abs(w)<5;let x;if(i||(i=T?re.granular:re.default),r||(r=T?oe.granular:oe.default),v<1){const t=fe(b,v);x=e=>{const n=Math.exp(-v*b*e);return a-n*((y+v*b*w)/t*Math.sin(t*e)+w*Math.cos(t*e))}}else if(1===v)x=t=>a-Math.exp(-b*t)*(w+(y+b*w)*t);else{const t=b*Math.sqrt(v*v-1);x=e=>{const n=Math.exp(-v*b*e),s=Math.min(t*e,300);return a-n*((y+v*b*w)*Math.sinh(s)+t*w*Math.cosh(s))/t}}const M={calculatedDuration:f&&d||null,next:t=>{const e=x(t);if(f)l.done=t>=d;else{let n=0===t?y:0;v<1&&(n=0===t?m(y):_t(x,t,e));const s=Math.abs(n)<=i,o=Math.abs(a-e)<=r;l.done=s&&o}return l.value=l.done?a:e,l},toString:()=>{const t=Math.min(Zt(M),Gt),e=Ht(e=>M.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return M}function we({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)-f*Math.exp(-t/s),v=t=>g+y(t),w=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,T;const x=t=>{var e;(e=d.value,void 0!==a&&el)&&(b=t,T=ve({keyframes:[d.value,p(d.value)],velocity:_t(v,t,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==b||(e=!0,w(t),x(t)),void 0!==b&&t>=b?T.next(t-b):(!e&&w(t),d)}}}function be(t,e,{clamp:n=!0,ease:i,mixer:o}={}){const a=t.length;if(e.length,1===a)return()=>e[0];if(2===a&&e[0]===e[1])return()=>e[1];const l=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const u=function(t,e,n){const s=[],i=n||r.mix||zt,o=t.length-1;for(let n=0;n{if(l&&n1)for(;sf(s(t[0],t[a-1],e)):f}function Te(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=p(0,e,s);t.push(Rt(n,1,i))}}function xe(t){const e=[0];return Te(e,t.length-1),e}function Me(t,e){return t.map(t=>t*e)}function Se(t,e){return t.map(()=>e||R).splice(0,t.length-1)}function Ve({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=B(s)?s.map(I):I(s),r={done:!1,value:e[0]},o=be(Me(n&&n.length===e.length?n:xe(e),t),e,{ease:Array.isArray(i)?i:Se(e,i)});return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}ve.applyToOptions=t=>{const e=qt(t,100,ve);return t.ease=e.ease,t.duration=m(e.duration),t.type="keyframes",t};const Ae=t=>null!==t;function ke(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Ae),o=i<0||e&&"loop"!==n&&e%2==1?0:r.length-1;return o&&void 0!==s?s:r[o]}const Ee={decay:we,inertia:we,tween:Ve,keyframes:Ve,spring:ve};function Pe(t){"string"==typeof t.type&&(t.type=Ee[t.type])}class Ce{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Oe=t=>t/100;class Fe extends Ce{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==G.now()&&this.tick(G.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},Z.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Pe(t);const{type:e=Ve,repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=t;let{keyframes:o}=t;const a=e||Ve;a!==Ve&&"number"!=typeof o[0]&&(this.mixKeyframes=d(Oe,zt(o[0],o[1])),o=[0,100]);const l=a({...t,keyframes:o});"mirror"===i&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===l.calculatedDuration&&(l.calculatedDuration=Zt(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return n.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:d,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let w=this.currentTime,b=n;if(h){const t=Math.min(this.currentTime,i)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/a)):"mirror"===d&&(b=o)),w=s(0,1,n)*a}const T=v?{done:!1,value:c[0]}:b.next(w);r&&(T.value=r(T.value));let{done:x}=T;v||null===l||(x=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const M=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return M&&f!==we&&(T.value=ke(c,this.options,g,this.speed)),m&&m(T.value),M&&this.finish(),T}then(t,e){return this.finished.then(t,e)}get duration(){return g(this.calculatedDuration)}get time(){return g(this.currentTime)}set time(t){t=m(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(G.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=g(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Xt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(G.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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,Z.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Re(t){for(let e=1;e180*t/Math.PI,Le=t=>{const e=Be(Math.atan2(t[1],t[0]));return We(e)},De={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Le,rotateZ:Le,skewX:t=>Be(Math.atan(t[1])),skewY:t=>Be(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},We=t=>((t%=360)<0&&(t+=360),t),Ie=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),je=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ne={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ie,scaleY:je,scale:t=>(Ie(t)+je(t))/2,rotateX:t=>We(Be(Math.atan2(t[6],t[5]))),rotateY:t=>We(Be(Math.atan2(-t[2],t[0]))),rotateZ:Le,rotate:Le,skewX:t=>Be(Math.atan(t[4])),skewY:t=>Be(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ke(t){return t.includes("scale")?1:0}function $e(t,e){if(!t||"none"===t)return Ke(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Ne,i=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=De,i=e}if(!i)return Ke(e);const r=s[e],o=i[1].split(",").map(Ye);return"function"==typeof r?r(o):o[r]}const Ue=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return $e(n,e)};function Ye(t){return parseFloat(t.trim())}const ze=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xe=(()=>new Set(ze))(),He=t=>t===et||t===mt,Ge=new Set(["x","y","z"]),Ze=ze.filter(t=>!Ge.has(t));const qe={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>$e(e,"x"),y:(t,{transform:e})=>$e(e,"y")};qe.translateX=qe.x,qe.translateY=qe.y;const _e=new Set;let Je=!1,Qe=!1,tn=!1;function en(){if(Qe){const t=Array.from(_e).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Ze.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Qe=!1,Je=!1,_e.forEach(t=>t.complete(tn)),_e.clear()}function nn(){_e.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Qe=!0)})}function sn(){tn=!0,nn(),en(),tn=!1}class rn{constructor(t,e,n,s,i,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(_e.add(this),Je||(Je=!0,$.read(nn),$.resolveKeyframes(en))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;if(null===t[0]){const i=s?.get(),r=t[t.length-1];if(void 0!==i)t[0]=i;else if(n&&e){const s=n.readValue(e,r);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=r),s&&void 0===i&&s.set(t[0])}Re(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),_e.delete(this)}cancel(){"scheduled"===this.state&&(_e.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const on=t=>t.startsWith("--");function an(t,e,n){on(e)?t.style.setProperty(e,n):t.style[e]=n}const ln=u(()=>void 0!==window.ScrollTimeline),un={};function cn(t,e){const n=u(t);return()=>un[e]??n()}const hn=cn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),dn=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,pn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:dn([0,.65,.55,1]),circOut:dn([.55,0,1,.45]),backIn:dn([.31,.01,.66,-.59]),backOut:dn([.33,1.53,.69,.99])};function fn(t,e){return t?"function"==typeof t?hn()?Ht(t,e):"ease-out":D(t)?dn(t):Array.isArray(t)?t.map(t=>fn(t,e)||pn.easeOut):pn[t]:void 0}function mn(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=fn(a,i);Array.isArray(h)&&(c.easing=h),N.value&&Z.waapi++;const d={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"};u&&(d.pseudoElement=u);const p=t.animate(c,d);return N.value&&p.finished.finally(()=>{Z.waapi--}),p}function gn(t){return"function"==typeof t&&"applyToOptions"in t}function yn({type:t,...e}){return gn(t)&&hn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class vn extends Ce{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:s,pseudoElement:i,allowFlatten:r=!1,finalKeyframe:o,onComplete:a}=t;this.isPseudoElement=Boolean(i),this.allowFlatten=r,this.options=t,t.type;const l=yn(t);this.animation=mn(e,n,s,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const t=ke(s,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):an(e,n,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return g(Number(t))}get time(){return g(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=m(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ln()?(this.animation.timeline=t,c):e(this)}}const wn={anticipate:k,backInOut:A,circInOut:C};function bn(t){"string"==typeof t.ease&&t.ease in wn&&(t.ease=wn[t.ease])}class Tn extends vn{constructor(t){bn(t),Pe(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:i,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const o=new Fe({...r,autoplay:!1}),a=m(this.finishedTime??this.time);e.setWithVelocity(o.sample(a-10).value,o.sample(a).value,10),o.stop()}}const xn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Pt.test(t)&&"0"!==t||t.startsWith("url(")));function Mn(t){t.duration=0,t.type}const Sn=new Set(["opacity","clipPath","filter","transform"]),Vn=u(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function An(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return Vn()&&n&&Sn.has(n)&&("transform"!==n||!u)&&!l&&!s&&"mirror"!==i&&0!==r&&"inertia"!==o}class kn extends Ce{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",keyframes:o,name:a,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=G.now();const h={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:r,name:a,motionValue:l,element:u,...c},d=u?.KeyframeResolver||rn;this.keyframeResolver=new d(o,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,s){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:h}=n;this.resolvedAt=G.now(),function(t,e,n,s){const i=t[0];if(null===i)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=xn(i,e),a=xn(r,e);return!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},p=!u&&An(d)?new Tn({...d,element:d.motionValue.owner.current}):new Fe(d);p.finished.then(()=>this.notifyFinished()).catch(c),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),sn()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class En{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;ne.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;ee[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Pn extends En{then(t,e){return this.finished.finally(t).then(()=>{})}}class Cn extends vn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const On=new WeakMap,Fn=(t,e="")=>`${t}:${e}`;function Rn(t){const e=On.get(t)||new Map;return On.set(t,e),e}const Bn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ln(t){const e=Bn.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Dn(t,e,n=1){const[s,i]=Ln(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const t=r.trim();return o(t)?parseFloat(t):t}return Q(i)?Dn(i,e,n+1):i}function Wn(t,e){return t?.[e]??t?.default??t}const In=new Set(["width","height","top","left","right","bottom",...ze]),jn=t=>e=>e.test(t),Nn=[et,mt,ft,pt,yt,gt,{test:t=>"auto"===t,parse:t=>t}],Kn=t=>Nn.find(jn(t));function $n(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const Un=new Set(["brightness","contrast","saturate","opacity"]);function Yn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(rt)||[];if(!s)return t;const i=n.replace(s,"");let r=Un.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const zn=/\b([a-z-]*)\(.*?\)/gu,Xn={...Pt,getAnimatableNone:t=>{const e=t.match(zn);return e?e.map(Yn).join(" "):t}},Hn={...et,transform:Math.round},Gn={rotate:pt,rotateX:pt,rotateY:pt,rotateZ:pt,scale:st,scaleX:st,scaleY:st,scaleZ:st,skew:pt,skewX:pt,skewY:pt,distance:mt,translateX:mt,translateY:mt,translateZ:mt,x:mt,y:mt,z:mt,perspective:mt,transformPerspective:mt,opacity:nt,originX:vt,originY:vt,originZ:mt},Zn={borderWidth:mt,borderTopWidth:mt,borderRightWidth:mt,borderBottomWidth:mt,borderLeftWidth:mt,borderRadius:mt,radius:mt,borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomRightRadius:mt,borderBottomLeftRadius:mt,width:mt,maxWidth:mt,height:mt,maxHeight:mt,top:mt,right:mt,bottom:mt,left:mt,padding:mt,paddingTop:mt,paddingRight:mt,paddingBottom:mt,paddingLeft:mt,margin:mt,marginTop:mt,marginRight:mt,marginBottom:mt,marginLeft:mt,backgroundPositionX:mt,backgroundPositionY:mt,...Gn,zIndex:Hn,fillOpacity:nt,strokeOpacity:nt,numOctaves:Hn},qn={...Zn,color:bt,backgroundColor:bt,outlineColor:bt,fill:bt,stroke:bt,borderColor:bt,borderTopColor:bt,borderRightColor:bt,borderBottomColor:bt,borderLeftColor:bt,filter:Xn,WebkitFilter:Xn},_n=t=>qn[t];function Jn(t,e){let n=_n(t);return n!==Xn&&(n=Pt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Qn=new Set(["auto","none","0"]);class ts extends rn{constructor(t,e,n,s,i){super(t,e,n,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const es=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","backgroundPositionX","backgroundPositionY"]);function ns(t,e){for(let n=0;n{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),is=new Set(["opacity","clipPath","filter","transform"]);function rs(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let s=document;e&&(s=e.current);const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function os(t){return(e,n)=>{const s=rs(e),i=[];for(const e of s){const s=t(e,n);i.push(s)}return()=>{for(const t of i)t()}}}const as=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class ls{constructor(){this.latest={},this.values=new Map}set(t,e,n,s,i=!0){const r=this.values.get(t);r&&r.onRemove();const o=()=>{const s=e.get();this.latest[t]=i?as(s,Zn[t]):s,n&&$.render(n)};o();const a=e.on("change",o);s&&e.addDependent(s);const l=()=>{a(),n&&U(n),this.values.delete(t),s&&e.removeDependent(s)};return this.values.set(t,{value:e,onRemove:l}),l}get(t){return this.values.get(t)?.value}destroy(){for(const t of this.values.values())t.onRemove()}}function us(t){const e=new WeakMap,n=[];return(s,i)=>{const r=e.get(s)??new ls;e.set(s,r);for(const e in i){const o=i[e],a=t(s,r,e,o);n.push(a)}return()=>{for(const t of n)t()}}}const cs=(t,e,n,s)=>{const i=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),r=i?n:n.startsWith("data")||n.startsWith("aria")?n.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`):n;const o=i?()=>{t[r]=e.latest[n]}:()=>{const s=e.latest[n];null==s?t.removeAttribute(r):t.setAttribute(r,String(s))};return e.set(n,s,o)},hs=os(us(cs)),ds=us((t,e,n,s)=>e.set(n,s,()=>{t[n]=e.latest[n]},void 0,!1));function ps(t){return a(t)&&"offsetHeight"in t}const fs={current:void 0};class ms{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=G.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=G.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new f);const n=this.events[t].add(e);return"change"===t?()=>{n(),$.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return fs.current&&fs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=G.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return y(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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 gs(t,e){return new ms(t,e)}const ys={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const vs=new Set(["originX","originY","originZ"]),ws=(t,e,n,s)=>{let i,r;return Xe.has(n)?(e.get("transform")||(ps(t)||e.get("transformBox")||ws(t,e,"transformBox",new ms("fill-box")),e.set("transform",new ms("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let s=0;s{const n=e.latest.originX??"50%",s=e.latest.originY??"50%",i=e.latest.originZ??0;t.style.transformOrigin=`${n} ${s} ${i}`}),r=e.get("transformOrigin")):i=on(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,s,i,r)},bs=os(us(ws)),Ts=mt.transform;const xs=os(us((t,e,n,s)=>{if(n.startsWith("path"))return function(t,e,n,s){return $.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,s,()=>t.setAttribute("stroke-dashoffset",Ts(-e.latest[n]))):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new ms("1 1"),()=>{const{pathLength:n=1,pathSpacing:s}=e.latest;t.setAttribute("stroke-dasharray",`${Ts(n)} ${Ts(s??1-Number(n))}`)}),e.set(n,s,void 0,e.get("stroke-dasharray")))}(t,e,n,s);if(n.startsWith("attr"))return cs(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),s);return(n in t.style?ws:cs)(t,e,n,s)}));const{schedule:Ms,cancel:Ss}=K(queueMicrotask,!1),Vs={x:!1,y:!1};function As(){return Vs.x||Vs.y}function ks(t,e){const n=rs(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function Es(t){return!("touch"===t.pointerType||As())}const Ps=(t,e)=>!!e&&(t===e||Ps(t,e.parentElement)),Cs=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Os=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Fs=new WeakSet;function Rs(t){return e=>{"Enter"===e.key&&t(e)}}function Bs(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Ls(t){return Cs(t)&&!As()}function Ds(t,e){const n=window.getComputedStyle(t);return on(e)?n.getPropertyValue(e):n[e]}function Ws(t){return a(t)&&"ownerSVGElement"in t}const Is=new WeakMap;let js;const Ns=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:Ws(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Ks=Ns("inline","width","offsetWidth"),$s=Ns("block","height","offsetHeight");function Us({target:t,borderBoxSize:e}){Is.get(t)?.forEach(n=>{n(t,{get width(){return Ks(t,e)},get height(){return $s(t,e)}})})}function Ys(t){t.forEach(Us)}function zs(t,e){js||"undefined"!=typeof ResizeObserver&&(js=new ResizeObserver(Ys));const n=rs(t);return n.forEach(t=>{let n=Is.get(t);n||(n=new Set,Is.set(t,n)),n.add(e),js?.observe(t)}),()=>{n.forEach(t=>{const n=Is.get(t);n?.delete(e),n?.size||js?.unobserve(t)})}}const Xs=new Set;let Hs;function Gs(t){return Xs.add(t),Hs||(Hs=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Xs.forEach(e=>e(t))},window.addEventListener("resize",Hs)),()=>{Xs.delete(t),Xs.size||"function"!=typeof Hs||(window.removeEventListener("resize",Hs),Hs=void 0)}}function Zs(t,e){return"function"==typeof t?Gs(t):zs(t,e)}function qs(t,e){let n;const s=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return $.preUpdate(s,!0),()=>U(s)}function _s(){const{value:t}=N;null!==t?(t.frameloop.rate.push(Y.delta),t.animations.mainThread.push(Z.mainThread),t.animations.waapi.push(Z.waapi),t.animations.layout.push(Z.layout)):U(_s)}function Js(t){return t.reduce((t,e)=>t+e,0)/t.length}function Qs(t,e=Js){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const ti=t=>Math.round(1e3/t);function ei(){N.value=null,N.addProjectionMetrics=null}function ni(){const{value:t}=N;if(!t)throw new Error("Stats are not being measured");ei(),U(_s);const e={frameloop:{setup:Qs(t.frameloop.setup),rate:Qs(t.frameloop.rate),read:Qs(t.frameloop.read),resolveKeyframes:Qs(t.frameloop.resolveKeyframes),preUpdate:Qs(t.frameloop.preUpdate),update:Qs(t.frameloop.update),preRender:Qs(t.frameloop.preRender),render:Qs(t.frameloop.render),postRender:Qs(t.frameloop.postRender)},animations:{mainThread:Qs(t.animations.mainThread),waapi:Qs(t.animations.waapi),layout:Qs(t.animations.layout)},layoutProjection:{nodes:Qs(t.layoutProjection.nodes),calculatedTargetDeltas:Qs(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:Qs(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=ti(n.min),n.max=ti(n.max),n.avg=ti(n.avg),[n.min,n.max]=[n.max,n.min],e}function si(t){return Ws(t)&&"svg"===t.tagName}function ii(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function ri(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=be(t[1+n],t[2+n],t[3+n]);return e?i(s):i}function oi(t){const e=[];fs.current=e;const n=t();fs.current=void 0;const s=gs(n);return function(t,e,n){const s=()=>e.set(n()),i=()=>$.preRender(s,!1,!0),r=t.map(t=>t.on("change",i));e.on("destroy",()=>{r.forEach(t=>t()),U(s)})}(e,s,t),s}const ai=t=>Boolean(t&&t.getVelocity);function li(t,e,n){const s=t.get();let i,r=null,o=s;const a="string"==typeof s?s.replace(/[\d.-]/g,""):void 0,l=()=>{r&&(r.stop(),r=null)},u=()=>{l(),r=new Fe({keyframes:[ci(t.get()),ci(o)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:i})};if(t.attach((e,n)=>(o=e,i=t=>n(ui(t,a)),$.postRender(u),t.get()),l),ai(e)){const n=e.on("change",e=>t.set(ui(e,a))),s=t.on("destroy",n);return()=>{n(),s()}}return l}function ui(t,e){return e?t+e:t}function ci(t){return"number"==typeof t?t:parseFloat(t)}const hi=[...Nn,bt,Pt],di=t=>hi.find(jn(t));function pi(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let fi={},mi=null;const gi=(t,e)=>{fi[t]=e},yi=()=>{mi||(mi=document.createElement("style"),mi.id="motion-view");let t="";for(const e in fi){const n=fi[e];t+=`${e} {\n`;for(const[e,s]of Object.entries(n))t+=` ${e}: ${s};\n`;t+="}\n"}mi.textContent=t,document.head.appendChild(mi),fi={}},vi=()=>{mi&&mi.parentElement&&mi.parentElement.removeChild(mi)};function wi(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function bi(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}const Ti=["layout","enter","exit","new","old"];function xi(t){const{update:e,targets:n,options:s}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new En([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||gi(":root",{"view-transition-name":"none"}),gi("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),yi();const i=document.startViewTransition(async()=>{await e()});return i.finished.finally(()=>{vi()}),new Promise(t=>{i.ready.then(()=>{const e=document.getAnimations().filter(bi),i=[];n.forEach((t,e)=>{for(const n of Ti){if(!t[n])continue;const{keyframes:r,options:o}=t[n];for(let[t,a]of Object.entries(r)){if(!a)continue;const r={...Wn(s,t),...Wn(o,t)},l=pi(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===l?0:1,a]}"function"==typeof r.delay&&(r.delay=r.delay(0,1)),r.duration&&(r.duration=m(r.duration)),r.delay&&(r.delay=m(r.delay));const u=new vn({...r,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});i.push(u)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:r}=e;if(!r)continue;const o=wi(r);if(!o)continue;const a=n.get(o.layer);if(a)Mi(a,"enter")&&Mi(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?i.push(new Cn(t)):t.cancel();else{const n="group"===o.type?"layout":"";let r={...Wn(s,n)};r.duration&&(r.duration=m(r.duration)),r=yn(r);const a=fn(r.ease,r.duration);e.updateTiming({delay:m(r.delay??0),duration:r.duration,easing:a}),i.push(new Cn(t))}}t(new En(i))})})}function Mi(t,e){return t?.[e]?.keyframes.opacity}let Si=[],Vi=null;function Ai(){Vi=null;const[t]=Si;var e;t&&(n(Si,e=t),Vi=e,xi(e).then(t=>{e.notifyReady(t),t.finished.finally(Ai)}))}function ki(){for(let t=Si.length-1;t>=0;t--){const e=Si[t],{interrupt:n}=e.options;if("immediate"===n){const n=Si.slice(0,t+1).map(t=>t.update),s=Si.slice(t+1);e.update=()=>{n.forEach(t=>t())},Si=[e,...s];break}}Vi&&"immediate"!==Si[0]?.options.interrupt||Ai()}class Ei{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=c,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,Si.push(n),Ms.render(ki)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:s,targets:i}=this;i.has(s)||i.set(s,{});i.get(s)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Pi=$,Ci=j.reduce((t,e)=>(t[e]=t=>U(t),t),{});function Oi(t){return"object"==typeof t&&!Array.isArray(t)}function Fi(t,e,n,s){return"string"==typeof t&&Oi(e)?rs(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Ri(t,e,n){return t*(e+1)}function Bi(t,e,n,s){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):s.get(e)??t}function Li(t,e,s,i,r,o){!function(t,e,s){for(let i=0;ie&&r.at"number"==typeof t,Ui=t=>t.every($i),Yi=new WeakMap;function zi(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Xi(t,e,n,s){if("function"==typeof e){const[i,r]=zi(s);e=e(void 0!==n?n:t.custom,i,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,r]=zi(s);e=e(void 0!==n?n:t.custom,i,r)}return e}function Hi(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,gs(n))}function Gi(t){return(t=>Array.isArray(t))(t)?t[t.length-1]||0:t}function Zi(t,e){const n=function(t,e,n){const s=t.getProps();return Xi(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const e in r){Hi(t,e,Gi(r[e]))}}function qi(t,e){const n=t.getValue("willChange");if(s=n,Boolean(ai(s)&&s.add))return n.add(e);if(!n&&r.WillChange){const n=new r.WillChange("auto");t.addValue("willChange",n),n.add(e)}var s}const _i=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ji="data-"+_i("framerAppearId");function Qi(t){return t.props[Ji]}const tr=t=>null!==t;const er={type:"spring",stiffness:500,damping:25,restSpeed:10},nr={type:"keyframes",duration:.8},sr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ir=(t,{keyframes:e})=>e.length>2?nr:Xe.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:er:sr;const rr=(t,e,n,s={},i,o)=>a=>{const l=Wn(s,t)||{},u=l.delay||s.delay||0;let{elapsed:c=0}=s;c-=m(u);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(l)||Object.assign(h,ir(t,h)),h.duration&&(h.duration=m(h.duration)),h.repeatDelay&&(h.repeatDelay=m(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(Mn(h),0===h.delay&&(d=!0)),(r.instantAnimations||r.skipAnimations)&&(d=!0,Mn(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(tr),r=e&&"loop"!==n&&e%2==1?0:i.length-1;return r&&void 0!==s?s:i[r]}(h.keyframes,l);if(void 0!==t)return void $.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Fe(h):new kn(h)};function or({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function ar(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(r=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const e in a){const s=t.getValue(e,t.latestValues[e]??null),i=a[e];if(void 0===i||u&&or(u,e))continue;const o={delay:n,...Wn(r||{},e)},c=s.get();if(void 0!==c&&!s.isAnimating&&!Array.isArray(i)&&i===c&&!o.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const n=Qi(t);if(n){const t=window.MotionHandoffAnimation(n,e,$);null!==t&&(o.startTime=t,h=!0)}}qi(t,e),s.start(rr(e,s,i,t.shouldReduceMotion&&In.has(e)?{type:!1}:o,t,h));const d=s.animation;d&&l.push(d)}return o&&Promise.all(l).then(()=>{$.update(()=>{o&&Zi(t,o)})}),l}const lr={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"]},ur={};for(const t in lr)ur[t]={isEnabled:e=>lr[t].some(t=>!!e[t])};const cr=()=>({x:{min:0,max:0},y:{min:0,max:0}}),hr="undefined"!=typeof window,dr={current:null},pr={current:!1};const fr=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function mr(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||fr.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const gr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class yr{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=rn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=G.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),pr.current||function(){if(pr.current=!0,hr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>dr.current=t.matches;t.addEventListener("change",e),e()}else dr.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||dr.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),U(this.notifyUpdate),U(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Xe.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&$.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in ur){const e=ur[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=gs(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(o(n)||l(n))?n=parseFloat(n):!di(n)&&Pt.test(e)&&(n=Jn(t,e)),this.setBaseTarget(t,ai(n)?n.get():n)),ai(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const s=Xi(this.props,e,this.presenceContext?.custom);s&&(n=s[t])}if(e&&void 0!==n)return n;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||ai(s)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new f),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Ms.render(this.render)}}class vr extends yr{constructor(){super(...arguments),this.KeyframeResolver=ts}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ai(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}const wr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},br=ze.length;function Tr(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(Xe.has(t))o=!0;else if(_(t))i[t]=n;else{const e=as(n,Zn[t]);t.startsWith("origin")?(a=!0,r[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",i=!0;for(let r=0;r{const l=Ni(t),{delay:u=0,times:c=xe(l),type:p="keyframes",repeat:f,repeatType:g,repeatDelay:v=0,...w}=n;let{ease:b=e.ease||"easeOut",duration:T}=n;const x="function"==typeof u?u(o,a):u,M=l.length,S=gn(p)?p:i?.[p||"keyframes"];if(M<=2&&S){let t=100;if(2===M&&Ui(l)){const e=l[1]-l[0];t=Math.abs(e)}const e={...w};void 0!==T&&(e.duration=m(T));const n=qt(e,t,S);b=n.ease,T=n.duration}T??(T=r);const V=h+x;1===c.length&&0===c[0]&&(c[1]=1);const A=c.length-l.length;if(A>0&&Te(c,A),1===l.length&&l.unshift(null),f){T=Ri(T,f);const t=[...l],e=[...c];b=Array.isArray(b)?[...b]:[b];const n=[...b];for(let s=0;s{for(const i in t){const r=t[i];r.sort(Wi);const a=[],l=[],u=[];for(let t=0;t{s.push(...Lr(n,t,e))}),s}function Wr(t){return function(e,s,i){let r=[];var o;o=e,r=Array.isArray(o)&&o.some(Array.isArray)?Dr(e,s,t):Lr(e,s,i,t);const a=new Pn(r);return t&&(t.animations.push(a),a.finished.then(()=>{n(t.animations,a)})),a}}const Ir=Wr();const jr=t=>function(e,n,s){return new Pn(function(t,e,n,s){const i=rs(t,s),r=i.length,o=[];for(let t=0;te.delete(n)),a.push(i)}return a}(e,n,s,t))},Nr=jr(),Kr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function $r(t,e,n,s){const i=n[e],{length:r,position:o}=Kr[e],a=i.current,l=n.time;i.current=t[`scroll${o}`],i.scrollLength=t[`scroll${r}`]-t[`client${r}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=p(0,i.scrollLength,i.current);const u=s-l;i.velocity=u>50?0:y(i.current-a,u)}const Ur={start:0,center:.5,end:1};function Yr(t,e,n=0){let s=0;if(t in Ur&&(t=Ur[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const zr=[0,0];function Xr(t,e,n,s){let i=Array.isArray(t)?t:zr,r=0,o=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,Ur[t]?t:"0"]),r=Yr(i[0],n,s),o=Yr(i[1],e),r-o}const Hr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Gr={x:0,y:0};function Zr(t,e,n){const{offset:i=Hr.All}=n,{target:r=t,axis:o="y"}=n,a="y"===o?"height":"width",l=r!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(ps(s))n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let i=null,r=s.parentNode;for(;!i;)"svg"===r.tagName&&(i=r),r=s.parentNode;s=i}}return n}(r,t):Gr,u=r===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(r),c={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let h=!e[o].interpolate;const d=i.length;for(let t=0;t{!function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),function(t,e,n){$r(t,"x",e,n),$r(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&Zr(t,n,s)},notify:()=>e(n)}}const _r=new WeakMap,Jr=new WeakMap,Qr=new WeakMap,to=t=>t===document.scrollingElement?window:t;function eo(t,{container:e=document.scrollingElement,...n}={}){if(!e)return c;let s=Qr.get(e);s||(s=new Set,Qr.set(e,s));const i=qr(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(i),!_r.has(e)){const t=()=>{for(const t of s)t.measure(Y.timestamp);$.preUpdate(n)},n=()=>{for(const t of s)t.notify()},i=()=>$.read(t);_r.set(e,i);const r=to(e);window.addEventListener("resize",i,{passive:!0}),e!==document.documentElement&&Jr.set(e,Zs(e,i)),r.addEventListener("scroll",i,{passive:!0}),i()}const r=_r.get(e);return $.read(r,!1,!0),()=>{U(r);const t=Qr.get(e);if(!t)return;if(t.delete(i),t.size)return;const n=_r.get(e);_r.delete(e),n&&(to(e).removeEventListener("scroll",n),Jr.get(e)?.(),window.removeEventListener("resize",n))}}const no=new Map;function so({source:t,container:e,...n}){const{axis:s}=n;t&&(e=t);const i=no.get(e)??new Map;no.set(e,i);const r=n.target??"self",o=i.get(r)??{},a=s+(n.offset??[]).join(",");return o[a]||(o[a]=!n.target&&ln()?new ScrollTimeline({source:e,axis:s}):function(t){const e={value:0},n=eo(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}({container:e,...n})),o[a]}const io={some:0,all:1};const ro=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=kn,t.DOMKeyframesResolver=ts,t.GroupAnimation=En,t.GroupAnimationWithThen=Pn,t.JSAnimation=Fe,t.KeyframeResolver=rn,t.MotionGlobalConfig=r,t.MotionValue=ms,t.NativeAnimation=vn,t.NativeAnimationExtended=Tn,t.NativeAnimationWrapper=Cn,t.SubscriptionManager=f,t.ViewTransitionBuilder=Ei,t.acceleratedValues=is,t.activeAnimations=Z,t.addAttrValue=cs,t.addStyleValue=ws,t.addUniqueItem=e,t.alpha=nt,t.analyseComplexValue=Vt,t.animate=Ir,t.animateMini=Nr,t.animateValue=function(t){return new Fe(t)},t.animateView=function(t,e={}){return new Ei(t,e)},t.animationMapKey=Fn,t.anticipate=k,t.applyPxDefaults=ns,t.attachSpring=li,t.attrEffect=hs,t.backIn=V,t.backInOut=A,t.backOut=S,t.calcGeneratorDuration=Zt,t.cancelFrame=U,t.cancelMicrotask=Ss,t.cancelSync=Ci,t.circIn=E,t.circInOut=C,t.circOut=P,t.clamp=s,t.collectMotionValues=fs,t.color=bt,t.complex=Pt,t.convertOffsetToTimes=Me,t.createGeneratorEasing=qt,t.createRenderBatcher=K,t.createScopedAnimate=Wr,t.cubicBezier=T,t.cubicBezierAsString=dn,t.defaultEasing=Se,t.defaultOffset=xe,t.defaultTransformValue=Ke,t.defaultValueTypes=qn,t.degrees=pt,t.delay=function(t,e){return function(t,e){const n=G.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(U(s),t(r-e))};return $.setup(s,!0),()=>U(s)}(t,m(e))},t.dimensionValueTypes=Nn,t.distance=ro,t.distance2D=function(t,e){const n=ro(t.x,e.x),s=ro(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=O,t.easeInOut=R,t.easeOut=F,t.easingDefinitionToFunction=I,t.fillOffset=Te,t.fillWildcards=Re,t.findDimensionValueType=Kn,t.findValueType=di,t.flushKeyframeResolvers=sn,t.frame=$,t.frameData=Y,t.frameSteps=z,t.generateLinearEasing=Ht,t.getAnimatableNone=Jn,t.getAnimationMap=Rn,t.getComputedStyle=Ds,t.getDefaultValueType=_n,t.getEasingForSegment=L,t.getMixer=Kt,t.getOriginIndex=ii,t.getValueAsType=as,t.getValueTransition=Wn,t.getVariableValue=Dn,t.hasWarned=function(t){return v.has(t)},t.hex=ht,t.hover=function(t,e,n={}){const[s,i,r]=ks(t,n),o=t=>{if(!Es(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const r=t=>{Es(t)&&(s(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,i)};return s.forEach(t=>{t.addEventListener("pointerenter",o,i)}),r},t.hsla=wt,t.hslaToRgba=Ot,t.inView=function(t,e,{root:n,margin:s,amount:i="some"}={}){const r=rs(t),o=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=o.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),o.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof i?i:io[i]});return r.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=we,t.interpolate=be,t.invariant=i,t.invisibleValues=It,t.isBezierDefinition=D,t.isCSSVariableName=_,t.isCSSVariableToken=Q,t.isDragActive=As,t.isDragging=Vs,t.isEasingArray=B,t.isGenerator=gn,t.isHTMLElement=ps,t.isMotionValue=ai,t.isNodeOrChild=Ps,t.isNumericalString=o,t.isObject=a,t.isPrimaryPointer=Cs,t.isSVGElement=Ws,t.isSVGSVGElement=si,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&hn()||!e||"string"==typeof e&&(e in pn||hn())||D(e)||Array.isArray(e)&&e.every(t))},t.isZeroValueString=l,t.keyframes=Ve,t.makeAnimationInstant=Mn,t.mapEasingToNativeEasing=fn,t.mapValue=function(t,e,n,s){const i=ri(e,n,s);return oi(()=>i(t.get()))},t.maxGeneratorDuration=Gt,t.memo=u,t.microtask=Ms,t.millisecondsToSeconds=g,t.mirrorEasing=x,t.mix=zt,t.mixArray=$t,t.mixColor=Wt,t.mixComplex=Yt,t.mixImmediate=Ft,t.mixLinearColor=Bt,t.mixNumber=Rt,t.mixObject=Ut,t.mixVisibility=jt,t.motionValue=gs,t.moveItem=function([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s{const s=t.currentTarget;if(!Ls(t))return;Fs.add(s);const r=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Fs.has(s)&&Fs.delete(s),Ls(t)&&"function"==typeof r&&r(t,{success:e})},a=t=>{o(t,s===window||s===document||n.useGlobalTarget||Ps(s,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",l,i)};return s.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,i),ps(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=Rs(()=>{if(Fs.has(n))return;Bs(n,"down");const t=Rs(()=>{Bs(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Bs(n,"cancel"),e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)})(t,i)),e=t,Os.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))}),r},t.progress=p,t.progressPercentage=vt,t.propEffect=ds,t.px=mt,t.readTransformValue=Ue,t.recordStats=function(){if(N.value)throw ei(),new Error("Stats are already being measured");const t=N;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},$.postRender(_s,!0),ni},t.removeItem=n,t.resize=Zs,t.resolveElements=rs,t.reverseEasing=M,t.rgbUnit=ut,t.rgba=ct,t.scale=st,t.scroll=function(t,{axis:e="y",container:n=document.scrollingElement,...s}={}){if(!n)return c;const i={axis:e,container:n,...s};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?eo(n=>{t(n[e.axis].progress,n)},e):qs(t,so(e))}(t,i):function(t,e){const n=so(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:t=>(t.pause(),qs(e=>{t.time=t.duration*e},n))})}(t,i)},t.scrollInfo=eo,t.secondsToMilliseconds=m,t.setDragLock=function(t){return"x"===t||"y"===t?Vs[t]?null:(Vs[t]=!0,()=>{Vs[t]=!1}):Vs.x||Vs.y?null:(Vs.x=Vs.y=!0,()=>{Vs.x=Vs.y=!1})},t.setStyle=an,t.spring=ve,t.springValue=function(t,e){const n=gs(ai(t)?t.get():t);return li(n,t,e),n},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,r)=>{const o="number"==typeof n?n:ii(n,r),a=Math.abs(o-i);let l=t*a;if(s){const e=r*t;l=I(s)(l/e)*e}return e+l}},t.startWaapiAnimation=mn,t.statsBuffer=N,t.steps=function(t,e="end"){return n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,r="end"===e?Math.floor(i):Math.ceil(i);return s(0,1,r/t)}},t.styleEffect=bs,t.supportedWaapiEasing=pn,t.supportsBrowserAnimation=An,t.supportsFlags=un,t.supportsLinearEasing=hn,t.supportsPartialKeyframes=ss,t.supportsScrollTimeline=ln,t.svgEffect=xs,t.sync=Pi,t.testValueType=jn,t.time=G,t.transform=ri,t.transformPropOrder=ze,t.transformProps=Xe,t.transformValue=oi,t.transformValueTypes=Gn,t.velocityPerSecond=y,t.vh=gt,t.vw=yt,t.warnOnce=function(t,e,n){t||v.has(e)||(console.warn(function(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}(e,n)),v.add(e))},t.warning=()=>{},t.wrap=w}); \ No newline at end of file diff --git a/src/zen/workspaces/ZenGradientGenerator.mjs b/src/zen/workspaces/ZenGradientGenerator.mjs index 8af5ffd50..091824b51 100644 --- a/src/zen/workspaces/ZenGradientGenerator.mjs +++ b/src/zen/workspaces/ZenGradientGenerator.mjs @@ -1346,9 +1346,10 @@ { let opacity = browser.gZenThemePicker.currentOpacity; const svg = browser.gZenThemePicker.sliderWavePath; - const [secondStop, thirdStop] = document - .querySelectorAll('#PanelUI-zen-gradient-generator-slider-wave-gradient stop') - .slice(1, 3); + /* eslint-disable no-unused-vars */ + const [_, secondStop, thirdStop] = document.querySelectorAll( + '#PanelUI-zen-gradient-generator-slider-wave-gradient stop' + ); // Opacity can only be between MIN_OPACITY to MAX_OPACITY. Make opacity relative to that range if (opacity < MIN_OPACITY) { opacity = 0;