Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

framer-motion

Package Overview
Dependencies
Maintainers
46
Versions
1162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

framer-motion - npm Package Compare versions

Comparing version 11.7.0 to 11.8.0

dist/es/animation/animators/waapi/utils/linear.mjs

2

dist/dom.js

@@ -1,1 +0,1 @@

!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";const e=t=>t,n=!1;const s=["read","resolveKeyframes","update","preRender","render","postRender"];const{schedule:r,cancel:i,state:o,steps:a}=function(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=s.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,s=!1,r=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(e){i.has(e)&&(l.schedule(e),t()),e(o)}const l={schedule:(t,r=!1,o=!1)=>{const a=o&&s?e:n;return r&&i.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),i.delete(t)},process:t=>{o=t,s?r=!0:(s=!0,[e,n]=[n,e],n.clear(),e.forEach(a),s=!1,r&&(r=!1,l.process(t)))}};return l}(o),t),{}),{read:l,resolveKeyframes:u,update:c,preRender:h,render:d,postRender:p}=a,f=()=>{const s=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(s-i.timestamp,40),1),i.timestamp=s,i.isProcessing=!0,l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(f))};return{schedule:s.reduce((e,s)=>{const o=a[s];return e[s]=(e,s=!1,a=!1)=>(n||(n=!0,r=!0,i.isProcessing||t(f)),o.schedule(e,s,a)),e},{}),cancel:t=>{for(let e=0;e<s.length;e++)a[s[e]].cancel(t)},state:i,steps:a}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e,!0);function l(t,e){-1===t.indexOf(e)&&t.push(e)}function u(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class c{constructor(){this.subscriptions=[]}add(t){return l(this.subscriptions,t),()=>u(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<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function h(t,e){return e?t*(1e3/e):0}let d;function p(){d=void 0}const f={now:()=>(void 0===d&&f.set(o.isProcessing||n?o.timestamp:performance.now()),d),set:t=>{d=t,queueMicrotask(p)}};class m{constructor(t,e={}){this.version="11.7.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=f.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&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=f.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 c);const n=this.events[t].add(e);return"change"===t?()=>{n(),r.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()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=f.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return h(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function g(t,e){return new m(t,e)}let v=e,y=e;function w(t,e,n){var s;if("string"==typeof t){let r=document;e&&(y(Boolean(e.current)),r=e.current),n?(null!==(s=n[t])&&void 0!==s||(n[t]=r.querySelectorAll(t)),t=n[t]):t=r.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const b=new WeakMap;function x(t,e){let n;const s=()=>{const{currentTime:s}=e,r=(null===s?0:s.value)/100;n!==r&&t(r),n=r};return r.update(s,!0),()=>i(s)}function T(t){let e;return()=>(void 0===e&&(e=t()),e)}const S=T(()=>void 0!==window.ScrollTimeline);class V{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>{if(!S()||!e.attachTimeline)return e.pause(),x(t=>{e.time=e.duration*t},t);e.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 startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const A=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],M=new Set(A),k=t=>1e3*t,P=t=>t/1e3,C={type:"spring",stiffness:500,damping:25,restSpeed:10},F={type:"keyframes",duration:.8},E={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},O=(t,{keyframes:e})=>e.length>2?F:M.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:C:E;function R(t,e){return t[e]||t.default||t}const B=t=>null!==t;function I(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(B),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}const W=t=>/^0[^.\s]+$/u.test(t);const D=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),L=t=>e=>"string"==typeof e&&e.startsWith(t),N=L("--"),K=L("var(--"),z=t=>!!K(t)&&j.test(t.split("/*")[0].trim()),j=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function H(t,e,n=1){const[s,r]=function(t){const e=$.exec(t);if(!e)return[,];const[,n,s,r]=e;return["--"+(null!=n?n:s),r]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);if(i){const t=i.trim();return D(t)?parseFloat(t):t}return z(r)?H(r,e,n+1):r}const U=(t,e,n)=>n>e?e:n<t?t:n,Y={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},q={...Y,transform:t=>U(0,1,t)},X={...Y,default:1},G=t=>Math.round(1e5*t)/1e5,Z=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,J=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Q(t){return"string"==typeof t}const tt=t=>({test:e=>Q(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),et=tt("deg"),nt=tt("%"),st=tt("px"),rt=tt("vh"),it=tt("vw"),ot={...nt,parse:t=>nt.parse(t)/100,transform:t=>nt.transform(100*t)},at=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),lt=t=>t===Y||t===st,ut=(t,e)=>parseFloat(t.split(", ")[e]),ct=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/u);if(r)return ut(r[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?ut(e[1],t):0}},ht=new Set(["x","y","z"]),dt=A.filter(t=>!ht.has(t));const pt={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:ct(4,13),y:ct(5,14)};pt.translateX=pt.x,pt.translateY=pt.y;const ft=t=>e=>e.test(t),mt=[Y,st,nt,et,it,rt,{test:t=>"auto"===t,parse:t=>t}],gt=t=>mt.find(ft(t)),vt=new Set;let yt=!1,wt=!1;function bt(){if(wt){const t=Array.from(vt).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 dt.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])=>{var s;null===(s=t.getValue(e))||void 0===s||s.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}wt=!1,yt=!1,vt.forEach(t=>t.complete()),vt.clear()}function xt(){vt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(wt=!0)})}class Tt{constructor(t,e,n,s,r,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=r,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(vt.add(this),yt||(yt=!0,r.read(xt),r.resolveKeyframes(bt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let r=0;r<t.length;r++)if(null===t[r])if(0===r){const r=null==s?void 0: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])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),vt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,vt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const St=(t,e)=>n=>Boolean(Q(n)&&J.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Vt=(t,e,n)=>s=>{if(!Q(s))return s;const[r,i,o,a]=s.match(Z);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},At={...Y,transform:t=>Math.round((t=>U(0,255,t))(t))},Mt={test:St("rgb","red"),parse:Vt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+At.transform(t)+", "+At.transform(e)+", "+At.transform(n)+", "+G(q.transform(s))+")"};const kt={test:St("#"),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:Mt.transform},Pt={test:St("hsl","hue"),parse:Vt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+nt.transform(G(e))+", "+nt.transform(G(n))+", "+G(q.transform(s))+")"},Ct={test:t=>Mt.test(t)||kt.test(t)||Pt.test(t),parse:t=>Mt.test(t)?Mt.parse(t):Pt.test(t)?Pt.parse(t):kt.parse(t),transform:t=>Q(t)?t:t.hasOwnProperty("red")?Mt.transform(t):Pt.transform(t)};const Ft=/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 Et(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(Ft,t=>(Ct.test(t)?(s.color.push(i),r.push("color"),n.push(Ct.parse(t))):t.startsWith("var(")?(s.var.push(i),r.push("var"),n.push(t)):(s.number.push(i),r.push("number"),n.push(parseFloat(t))),++i,"${}")).split("${}");return{values:n,split:o,indexes:s,types:r}}function Ot(t){return Et(t).values}function Rt(t){const{split:e,types:n}=Et(t),s=e.length;return t=>{let r="";for(let i=0;i<s;i++)if(r+=e[i],void 0!==t[i]){const e=n[i];r+="number"===e?G(t[i]):"color"===e?Ct.transform(t[i]):t[i]}return r}}const Bt=t=>"number"==typeof t?0:t;const It={test:function(t){var e,n;return isNaN(t)&&Q(t)&&((null===(e=t.match(Z))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(_))||void 0===n?void 0:n.length)||0)>0},parse:Ot,createTransformer:Rt,getAnimatableNone:function(t){const e=Ot(t);return Rt(t)(e.map(Bt))}},Wt=new Set(["brightness","contrast","saturate","opacity"]);function Dt(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(Z)||[];if(!s)return t;const r=n.replace(s,"");let i=Wt.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const Lt=/\b([a-z-]*)\(.*?\)/gu,Nt={...It,getAnimatableNone:t=>{const e=t.match(Lt);return e?e.map(Dt).join(" "):t}},Kt={...Y,transform:Math.round},zt={borderWidth:st,borderTopWidth:st,borderRightWidth:st,borderBottomWidth:st,borderLeftWidth:st,borderRadius:st,radius:st,borderTopLeftRadius:st,borderTopRightRadius:st,borderBottomRightRadius:st,borderBottomLeftRadius:st,width:st,maxWidth:st,height:st,maxHeight:st,size:st,top:st,right:st,bottom:st,left:st,padding:st,paddingTop:st,paddingRight:st,paddingBottom:st,paddingLeft:st,margin:st,marginTop:st,marginRight:st,marginBottom:st,marginLeft:st,rotate:et,rotateX:et,rotateY:et,rotateZ:et,scale:X,scaleX:X,scaleY:X,scaleZ:X,skew:et,skewX:et,skewY:et,distance:st,translateX:st,translateY:st,translateZ:st,x:st,y:st,z:st,perspective:st,transformPerspective:st,opacity:q,originX:ot,originY:ot,originZ:st,zIndex:Kt,backgroundPositionX:st,backgroundPositionY:st,fillOpacity:q,strokeOpacity:q,numOctaves:Kt},jt={...zt,color:Ct,backgroundColor:Ct,outlineColor:Ct,fill:Ct,stroke:Ct,borderColor:Ct,borderTopColor:Ct,borderRightColor:Ct,borderBottomColor:Ct,borderLeftColor:Ct,filter:Nt,WebkitFilter:Nt},$t=t=>jt[t];function Ht(t,e){let n=$t(t);return n!==Nt&&(n=It),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ut=new Set(["auto","none","0"]);class Yt extends Tt{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.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),z(s))){const r=H(s,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!at.has(n)||2!==t.length)return;const[s,r]=t,i=gt(s),o=gt(r);if(i!==o)if(lt(i)&&lt(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||W(s))&&n.push(e);var s;n.length&&function(t,e,n){let s=0,r=void 0;for(;s<t.length&&!r;){const e=t[s];"string"==typeof e&&!Ut.has(e)&&Et(e).values.length&&(r=t[s]),s++}if(r&&n)for(const s of e)t[s]=Ht(n,r)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=pt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1);const i=s.length-1,o=s[i];s[i]=pt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}function qt(t){return"function"==typeof t}const Xt=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!It.test(t)&&"0"!==t||t.startsWith("url(")));function Gt(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=Xt(r,e),a=Xt(i,e);return!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||qt(n))&&s)}class Zt{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=f.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:r,repeatType:i,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(xt(),bt()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=f.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:r,delay:i,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!Gt(t,n,s,r)){if(!i)return null==a||a(I(t,this.options,e)),null==o||o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function _t(t,e,n){const s=Math.max(e-5,0);return h(n-t(s),e-s)}function Jt({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i,o=1-e;o=U(.05,1,o),t=U(.01,10,P(t)),o<1?(r=e=>{const s=e*o,r=s*t;return.001-(s-n)/Qt(e,o)*Math.exp(-r)},i=e=>{const s=e*o*t,i=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=Qt(Math.pow(e,2),o);return(.001-r(e)>0?-1:1)*((i-a)*l)/u}):(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;n<12;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t=k(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}function Qt(t,e){return t*Math.sqrt(1-e*e)}const te=["duration","bounce"],ee=["stiffness","damping","mass"];function ne(t,e){return e.some(e=>void 0!==t[e])}function se({keyframes:t,restDelta:e,restSpeed:n,...s}){const r=t[0],i=t[t.length-1],o={done:!1,value:r},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ne(t,ee)&&ne(t,te)){const n=Jt(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...s,velocity:-P(s.velocity||0)}),p=h||0,f=l/(2*Math.sqrt(a*u)),m=i-r,g=P(Math.sqrt(a/u)),v=Math.abs(m)<5;let y;if(n||(n=v?.01:2),e||(e=v?.005:.5),f<1){const t=Qt(g,f);y=e=>{const n=Math.exp(-f*g*e);return i-n*((p+f*g*m)/t*Math.sin(t*e)+m*Math.cos(t*e))}}else if(1===f)y=t=>i-Math.exp(-g*t)*(m+(p+g*m)*t);else{const t=g*Math.sqrt(f*f-1);y=e=>{const n=Math.exp(-f*g*e),s=Math.min(t*e,300);return i-n*((p+f*g*m)*Math.sinh(s)+t*m*Math.cosh(s))/t}}return{calculatedDuration:d&&c||null,next:t=>{const s=y(t);if(d)o.done=t>=c;else{let r=0;f<1&&(r=0===t?k(p):_t(y,t,s));const a=Math.abs(r)<=n,l=Math.abs(i-s)<=e;o.done=a&&l}return o.value=o.done?i:s,o}}}function re({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=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)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const v=t=>-f*Math.exp(-t/s),y=t=>g+v(t),w=t=>{const e=v(t),n=y(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,x;const T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,x=se({keyframes:[d.value,p(d.value)],velocity:_t(y,t,d.value),damping:r,stiffness:i,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return x||void 0!==b||(e=!0,w(t),T(t)),void 0!==b&&t>=b?x.next(t-b):(!e&&w(t),d)}}}const ie=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function oe(t,n,s,r){if(t===n&&s===r)return e;const i=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=ie(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,s);return t=>0===t||1===t?t:ie(i(t),n,r)}const ae=oe(.42,0,1,1),le=oe(0,0,.58,1),ue=oe(.42,0,.58,1),ce=t=>Array.isArray(t)&&"number"!=typeof t[0],he=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,de=t=>e=>1-t(1-e),pe=t=>1-Math.sin(Math.acos(t)),fe=de(pe),me=he(pe),ge=oe(.33,1.53,.69,.99),ve=de(ge),ye=he(ve),we=t=>(t*=2)<1?.5*ve(t):.5*(2-Math.pow(2,-10*(t-1))),be={linear:e,easeIn:ae,easeInOut:ue,easeOut:le,circIn:pe,circInOut:me,circOut:fe,backIn:ve,backInOut:ye,backOut:ge,anticipate:we},xe=t=>{if(Array.isArray(t)){y(4===t.length);const[e,n,s,r]=t;return oe(e,n,s,r)}return"string"==typeof t?be[t]:t},Te=(t,e)=>n=>e(t(n)),Se=(...t)=>t.reduce(Te),Ve=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},Ae=(t,e,n)=>t+(e-t)*n;function Me(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 ke(t,e){return n=>n>0?e:t}const Pe=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},Ce=[kt,Mt,Pt];function Fe(t){const e=(n=t,Ce.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===Pt&&(s=function({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=Me(a,s,t+1/3),i=Me(a,s,t),o=Me(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}}(s)),s}const Ee=(t,e)=>{const n=Fe(t),s=Fe(e);if(!n||!s)return ke(t,e);const r={...n};return t=>(r.red=Pe(n.red,s.red,t),r.green=Pe(n.green,s.green,t),r.blue=Pe(n.blue,s.blue,t),r.alpha=Ae(n.alpha,s.alpha,t),Mt.transform(r))},Oe=new Set(["none","hidden"]);function Re(t,e){return n=>Ae(t,e,n)}function Be(t){return"number"==typeof t?Re:"string"==typeof t?z(t)?ke:Ct.test(t)?Ee:De:Array.isArray(t)?Ie:"object"==typeof t?Ct.test(t)?Ee:We:ke}function Ie(t,e){const n=[...t],s=n.length,r=t.map((t,n)=>Be(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}}function We(t,e){const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=Be(t[r])(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const De=(t,e)=>{const n=It.createTransformer(e),s=Et(t),r=Et(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?function(t,e){return Oe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Se(Ie(function(t,e){var n;const s=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],a=t.indexes[o][r[o]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[i]=l,r[o]++}return s}(s,r),r.values),n):ke(t,e)};function Le(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Ae(t,e,n);return Be(t)(t,e)}function Ne(t,n,{clamp:s=!0,ease:r,mixer:i}={}){const o=t.length;if(y(o===n.length),1===o)return()=>n[0];if(2===o&&t[0]===t[1])return()=>n[1];t[0]>t[o-1]&&(t=[...t].reverse(),n=[...n].reverse());const a=function(t,n,s){const r=[],i=s||Le,o=t.length-1;for(let s=0;s<o;s++){let o=i(t[s],t[s+1]);if(n){const t=Array.isArray(n)?n[s]||e:n;o=Se(t,o)}r.push(o)}return r}(n,r,i),l=a.length,u=e=>{let n=0;if(l>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=Ve(t[n],t[n+1],e);return a[n](s)};return s?e=>u(U(t[0],t[o-1],e)):u}function Ke(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=Ve(0,e,s);t.push(Ae(n,1,r))}}function ze(t){const e=[0];return Ke(e,t.length-1),e}function je({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=ce(s)?s.map(xe):xe(s),i={done:!1,value:e[0]},o=Ne(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:ze(e),t),e,{ease:Array.isArray(r)?r:(a=e,l=r,a.map(()=>l||ue).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(i.value=o(e),i.done=e>=t,i)}}function $e(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}const He=t=>{const e=({timestamp:e})=>t(e);return{start:()=>r.update(e,!0),stop:()=>i(e),now:()=>o.isProcessing?o.timestamp:f.now()}},Ue={decay:re,inertia:re,tween:je,keyframes:je,spring:se},Ye=t=>t/100;class qe extends Zt{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:r}=this.options,i=(null==s?void 0:s.KeyframeResolver)||Tt;this.resolver=new i(r,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:i=0}=this.options,o=qt(e)?e:Ue[e]||je;let a,l;o!==je&&"number"!=typeof t[0]&&(a=Se(Ye,Le(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===r&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-i})),null===u.calculatedDuration&&(u.calculatedDuration=$e(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:r,mirroredGenerator:i,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return r.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,w=r;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(w=i)),y=U(0,1,n)*c}const b=v?{done:!1,value:a[0]}:w.next(y);o&&(b.value=o(b.value));let{done:x}=b;v||null===l||(x=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return T&&void 0!==s&&(b.value=I(a,this.options,s)),m&&m(b.value),T&&this.finish(),b}get duration(){const{resolved:t}=this;return t?P(t.calculatedDuration):0}get time(){return P(this.currentTime)}set time(t){t=k(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=P(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=He,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Xe=new Set(["opacity","clipPath","filter","transform"]),Ge=t=>Array.isArray(t)&&"number"==typeof t[0];function Ze(t){return Boolean(!t||"string"==typeof t&&t in Je||Ge(t)||Array.isArray(t)&&t.every(Ze))}const _e=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Je={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_e([0,.65,.55,1]),circOut:_e([.55,0,1,.45]),backIn:_e([.31,.01,.66,-.59]),backOut:_e([.33,1.53,.69,.99])};function Qe(t){return tn(t)||Je.easeOut}function tn(t){return t?Ge(t)?_e(t):Array.isArray(t)?t.map(Qe):Je[t]:void 0}const en=T(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class nn extends Zt{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:r}=this.options;this.resolver=new Yt(r,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:s=300,times:r,ease:i,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;if(qt((c=this.options).type)||"spring"===c.type||!Ze(c.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new qe({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const r=[];let i=0;for(;!s.done&&i<2e4;)s=n.sample(i),r.push(s.value),i+=10;return{times:void 0,keyframes:r,duration:i-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),s=c.duration,r=c.times,i=c.ease,o="keyframes"}var c;const h=function(t,e,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=tn(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:r,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}(a.owner.current,l,t,{...this.options,duration:s,times:r,ease:i});return h.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(h.timeline=this.pendingTimeline,this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:n}=this.options;a.set(I(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:s,times:r,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return P(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return P(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=k(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:n}=this;if(!n)return e;const{animation:s}=n;s.timeline=t,s.onfinish=null}else this.pendingTimeline=t;return e}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:r,ease:i,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...u}=this.options,c=new qe({...u,keyframes:n,duration:s,type:r,ease:i,times:o,isGenerator:!0}),h=k(this.time);t.setWithVelocity(c.sample(h-10).value,c.sample(h).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t;return en()&&n&&Xe.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}}const sn=(t,e,n,s={},i,o)=>a=>{const l=R(s,t)||{},u=l.delay||s.delay||0;let{elapsed:c=0}=s;c-=k(u);let 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:r,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(l)||(h={...h,...O(t,h)}),h.duration&&(h.duration=k(h.duration)),h.repeatDelay&&(h.repeatDelay=k(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(d=!0)),d&&!o&&void 0!==e.get()){const t=I(h.keyframes,l);if(void 0!==t)return r.update(()=>{h.onUpdate(t),h.onComplete()}),new V([])}return!o&&nn.supports(h)?new nn(h):new qe(h)},rn=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function on(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function an(t,e,n,s){if("function"==typeof e){const[r,i]=on(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]=on(s);e=e(void 0!==n?n:t.custom,r,i)}return e}function ln(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,g(n))}function un(t,e){const n=function(t,e,n){const s=t.getProps();return an(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){ln(t,e,rn(i[e]))}}const cn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hn="data-"+cn("framerAppearId");function dn(t){return t.props[hn]}class pn extends m{constructor(){super(...arguments),this.values=[]}add(t){const e=function(t){return M.has(t)?"transform":Xe.has(t)?cn(t):void 0}(t);e&&(l(this.values,e),this.update())}update(){this.set(this.values.length?this.values.join(", "):"auto")}}const fn=t=>Boolean(t&&t.getVelocity);function mn(t,e){var n;if(!t.applyWillChange)return;let s=t.getValue("willChange");return s||(null===(n=t.props.style)||void 0===n?void 0:n.willChange)||(s=new pn("auto"),t.addValue("willChange",s)),r=s,Boolean(fn(r)&&r.add)?s.add(e):void 0;var r}function gn({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function vn(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:a=t.getDefaultTransition(),transitionEnd:l,...u}=e;s&&(a=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const e in u){const s=t.getValue(e,null!==(o=t.latestValues[e])&&void 0!==o?o:null),i=u[e];if(void 0===i||h&&gn(h,e))continue;const l={delay:n,...R(a||{},e)};let d=!1;if(window.MotionHandoffAnimation){const n=dn(t);if(n){const t=window.MotionHandoffAnimation(n,e,r);null!==t&&(l.startTime=t,d=!0)}}mn(t,e),s.start(sn(e,s,i,t.shouldReduceMotion&&M.has(e)?{type:!1}:l,t,d));const p=s.animation;p&&c.push(p)}return l&&Promise.all(c).then(()=>{r.update(()=>{l&&un(t,l)})}),c}const yn={};function wn(t,{layout:e,layoutId:n}){return M.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!yn[t]||"opacity"===t)}function bn(t,e,n){var s;const{style:r}=t,i={};for(const o in r)(fn(r[o])||e.style&&fn(e.style[o])||wn(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(i[o]=r[o]);return n&&r&&"string"==typeof r.willChange&&(n.applyWillChange=!1),i}const xn="undefined"!=typeof window,Tn={current:null},Sn={current:!1};const Vn=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function An(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||Vn.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const Mn={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"]},kn={};for(const t in Mn)kn[t]={isEnabled:e=>Mn[t].some(t=>!!e[t])};const Pn=[...mt,Ct,It],Cn=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Fn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class En extends class{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Tt,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=f.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,r.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=An(e),this.isVariantNode=function(t){return Boolean(An(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&fn(e)&&e.set(l[t],!1)}}mount(t){this.current=t,b.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Sn.current||function(){if(Sn.current=!0,xn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Tn.current=t.matches;t.addListener(e),e()}else Tn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Tn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){b.delete(this.current),this.projection&&this.projection.unmount(),i(this.notifyUpdate),i(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=M.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&r.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i(),o&&o(),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 kn){const e=kn[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;e<Fn.length;e++){const n=Fn[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){for(const s in e){const r=e[s],i=n[s];if(fn(r))t.addValue(s,r);else if(fn(i))t.addValue(s,g(r,{owner:t}));else if(i!==r)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(s);t.addValue(s,g(void 0!==e?e:r,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.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=g(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let s=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var r;return null!=s&&("string"==typeof s&&(D(s)||W(s))?s=parseFloat(s):(r=s,!Pn.find(ft(r))&&It.test(e)&&(s=Ht(t,e))),this.setBaseTarget(t,fn(s)?s.get():s)),fn(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let s;if("string"==typeof n||"object"==typeof n){const r=an(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);r&&(s=r[t])}if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||fn(r)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new c),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{constructor(){super(...arguments),this.KeyframeResolver=Yt}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]}}const On=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Rn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Bn=A.length;function In(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(M.has(t))o=!0;else if(N(t))r[t]=n;else{const e=On(n,zt[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<Bn;i++){const o=A[i],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=On(a,zt[o]);if(!l){r=!1;s+=`${Rn[o]||o}(${t}) `}n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,r?"":s):r&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=i;s.transformOrigin=`${t} ${e} ${n}`}}function Wn(t,e,n){return"string"==typeof t?t:st.transform(e+n*t)}const Dn={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ln={offset:"strokeDashoffset",array:"strokeDasharray"};function Nn(t,{attrX:e,attrY:n,attrScale:s,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(In(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==r||void 0!==i||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Wn(e,t.x,t.width)} ${Wn(n,t.y,t.height)}`}(f,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,r=!0){t.pathLength=1;const i=r?Dn:Ln;t[i.offset]=st.transform(-s);const o=st.transform(e),a=st.transform(n);t[i.array]=`${o} ${a}`}(d,o,a,l,!1)}const Kn=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function zn(t,{style:e,vars:n},s,r){Object.assign(t.style,e,r&&r.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}class jn extends En{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Cn}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(M.has(e)){const t=$t(e);return t&&t.default||0}return e=Kn.has(e)?e:cn(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=bn(t,e,n);for(const n in t)if(fn(t[n])||fn(e[n])){s[-1!==A.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return s}(t,e,n)}build(t,e,n){Nn(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){zn(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Kn.has(n)?n:cn(n),e.attrs[n])}(t,e,0,s)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}class $n extends En{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=zn}readValueFromInstance(t,e){if(M.has(e)){const t=$t(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=(N(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){In(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return bn(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;fn(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}function Hn(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=function(t){return t instanceof SVGElement&&"svg"!==t.tagName}(t)?new jn(e):new $n(e);n.mount(t),b.set(t,n)}function Un(t,e,n){const s=fn(t)?t:g(t);return s.start(sn("",s,e,n)),s.animation}function Yn(t,e=100){const n=se({keyframes:[0,e],...t}),s=Math.min($e(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:P(s)}}function qn(t,e,n,s){var r;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(r=s.get(e))&&void 0!==r?r:t}const Xn=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function Gn(t,e){return ce(t)?t[Xn(0,t.length,e)]:t}function Zn(t,e,n,s,r,i){!function(t,e,n){for(let s=0;s<t.length;s++){const r=t[s];r.at>e&&r.at<n&&(u(t,r),s--)}}(t,r,i);for(let o=0;o<e.length;o++)t.push({value:e[o],at:Ae(r,i,s[o]),easing:Gn(n,o)})}function _n(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Jn(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Qn(t,e){return e[t]||(e[t]=[]),e[t]}function ts(t){return Array.isArray(t)?t:[t]}function es(t,e){return t[e]?{...t,...t[e]}:{...t}}const ns=t=>"number"==typeof t,ss=t=>t.every(ns);function rs(t,e,n,s){const r=w(t,s),i=r.length,o=[];for(let t=0;t<i;t++){const s=r[t];b.has(s)||Hn(s);const a=b.get(s),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,i)),o.push(...vn(a,{...e,transition:l},{}))}return new V(o)}function is(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s){const r=e.duration||.3,i=new Map,o=new Map,a={},l=new Map;let u=0,c=0,h=0;for(let n=0;n<t.length;n++){const i=t[n];if("string"==typeof i){l.set(i,c);continue}if(!Array.isArray(i)){l.set(i.name,qn(c,i.at,u,l));continue}let[d,p,f={}]=i;void 0!==f.at&&(c=qn(c,f.at,u,l));let m=0;const g=(t,n,s,i=0,o=0)=>{const a=ts(t),{delay:l=0,times:u=ze(a),type:d="keyframes",...p}=n;let{ease:f=e.ease||"easeOut",duration:g}=n;const v="function"==typeof l?l(i,o):l,y=a.length;if(y<=2&&"spring"===d||qt(d)){let t=100;if(2===y&&ss(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...p};void 0!==g&&(e.duration=k(g));const n=Yn(e,t);f=n.ease,g=n.duration}null!=g||(g=r);const w=c+v,b=w+g;1===u.length&&0===u[0]&&(u[1]=1);const x=u.length-a.length;x>0&&Ke(u,x),1===a.length&&a.unshift(null),Zn(s,a,f,u,w,b),m=Math.max(v+g,m),h=Math.max(b,h)};if(fn(d)){g(p,f,Qn("default",Jn(d,o)))}else{const t=w(d,s,a),e=t.length;for(let n=0;n<e;n++){p=p,f=f;const s=Jn(t[n],o);for(const t in p)g(p[t],es(f,t),Qn(t,s),n,e)}}u=c,c+=m}return o.forEach((t,s)=>{for(const r in t){const o=t[r];o.sort(_n);const a=[],l=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:s}=o[t];a.push(n),l.push(Ve(0,h,e)),u.push(s||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),i.has(s)||i.set(s,{keyframes:{},transition:{}});const c=i.get(s);c.keyframes[r]=a,c.transition[r]={...e,duration:h,ease:u,times:l,...n}}}),i}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let r;r=fn(n)?Un(n,t.default,e.default):rs(n,t,e),s.push(r)}),new V(s)}const os=t=>function(e,n,s){let r;var i;return i=e,r=Array.isArray(i)&&Array.isArray(i[0])?is(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?rs(e,n,s,t):Un(e,n,s),t&&t.animations.push(r),r},as=os(),ls=new WeakMap;let us;function cs({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=ls.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function hs(t){t.forEach(cs)}function ds(t,e){us||"undefined"!=typeof ResizeObserver&&(us=new ResizeObserver(hs));const n=w(t);return n.forEach(t=>{let n=ls.get(t);n||(n=new Set,ls.set(t,n)),n.add(e),null==us||us.observe(t)}),()=>{n.forEach(t=>{const n=ls.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==us||us.unobserve(t)})}}const ps=new Set;let fs;function ms(t){return ps.add(t),fs||(fs=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};ps.forEach(t=>t(e))},window.addEventListener("resize",fs)),()=>{ps.delete(t),!ps.size&&fs&&(fs=void 0)}}const gs={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function vs(t,e,n,s){const r=n[e],{length:i,position:o}=gs[e],a=r.current,l=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=Ve(0,r.scrollLength,r.current);const u=s-l;r.velocity=u>50?0:h(r.current-a,u)}const ys={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ws={start:0,center:.5,end:1};function bs(t,e,n=0){let s=0;if(t in ws&&(t=ws[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 xs=[0,0];function Ts(t,e,n,s){let r=Array.isArray(t)?t:xs,i=0,o=0;return"number"==typeof t?r=[t,t]:"string"==typeof t&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,ws[t]?t:"0"]),i=bs(r[0],n,s),o=bs(r[1],e),i-o}const Ss={x:0,y:0};function Vs(t,e,n){const{offset:s=ys.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(s instanceof HTMLElement)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):Ss,l=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),u={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<h;t++){const n=Ts(s[t],u[o],l[o],a[i]);c||n===e[i].interpolatorOffsets[t]||(c=!0),e[i].offset[t]=n}c&&(e[i].interpolate=Ne(e[i].offset,ze(s)),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=e[i].interpolate(e[i].current)}function As(t,e,n,s={}){return{measure:()=>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),update:e=>{!function(t,e,n){vs(t,"x",e,n),vs(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&Vs(t,n,s)},notify:()=>e(n)}}const Ms=new WeakMap,ks=new WeakMap,Ps=new WeakMap,Cs=t=>t===document.documentElement?window:t;function Fs(t,{container:e=document.documentElement,...n}={}){let s=Ps.get(e);s||(s=new Set,Ps.set(e,s));const a=As(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(a),!Ms.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(o.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{r.read(t,!1,!0),r.read(n,!1,!0),r.update(i,!1,!0)};Ms.set(e,a);const c=Cs(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&ks.set(e,(u=a,"function"==typeof(l=e)?ms(l):ds(l,u))),c.addEventListener("scroll",a,{passive:!0})}var l,u;const c=Ms.get(e);return r.read(c,!1,!0),()=>{var t;i(c);const n=Ps.get(e);if(!n)return;if(n.delete(a),n.size)return;const s=Ms.get(e);Ms.delete(e),s&&(Cs(e).removeEventListener("scroll",s),null===(t=ks.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const Es=new Map;function Os({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),Es.has(e)||Es.set(e,{});const s=Es.get(e);return s[n]||(s[n]=S()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const s={value:0},r=Fs(t=>{s.value=100*t[n].progress},{container:e,axis:n});return{currentTime:s,cancel:r}}({source:e,axis:n})),s[n]}function Rs(t){return t&&(t.target||t.offset)}const Bs={some:0,all:1};const Is=(t,e)=>Math.abs(t-e);const Ws=r,Ds=s.reduce((t,e)=>(t[e]=t=>i(t),t),{});t.MotionValue=m,t.animate=as,t.anticipate=we,t.backIn=ve,t.backInOut=ye,t.backOut=ge,t.cancelFrame=i,t.cancelSync=Ds,t.circIn=pe,t.circInOut=me,t.circOut=fe,t.clamp=U,t.createScopedAnimate=os,t.cubicBezier=oe,t.delay=function(t,e){const n=f.now(),s=({timestamp:r})=>{const o=r-n;o>=e&&(i(s),t(o-e))};return r.read(s,!0),()=>i(s)},t.distance=Is,t.distance2D=function(t,e){const n=Is(t.x,e.x),s=Is(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=ae,t.easeInOut=ue,t.easeOut=le,t.frame=r,t.frameData=o,t.frameSteps=a,t.inView=function(t,e,{root:n,margin:s,amount:r="some"}={}){const i=w(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);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),o.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof r?r:Bs[r]});return i.forEach(t=>a.observe(t)),()=>a.disconnect()},t.interpolate=Ne,t.invariant=y,t.mirrorEasing=he,t.mix=Le,t.motionValue=g,t.pipe=Se,t.progress=Ve,t.reverseEasing=de,t.scroll=function(t,e){const n=(null==e?void 0:e.axis)||"y";return"function"==typeof t?function(t){return 2===t.length}(t)||Rs(e)?Fs(e=>{t(e[n].progress,e)},e):x(t,Os(e)):Rs(e)?(t.pause(),Fs(e=>{t.time=t.duration*e[n].progress},e)):t.attachTimeline(Os(e))},t.scrollInfo=Fs,t.stagger=function(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 l=t*a;if(s){const e=i*t;l=xe(s)(l/e)*e}return e+l}},t.steps=function(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 U(0,1,r/t)}},t.sync=Ws,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],r=t[1+n],i=t[2+n],o=t[3+n],a=Ne(r,i,{mixer:(l=i[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.warning=v,t.wrap=Xn}));
!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";const e=t=>t,n=!1;const s=["read","resolveKeyframes","update","preRender","render","postRender"];const{schedule:r,cancel:i,state:o,steps:a}=function(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=s.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,s=!1,r=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(e){i.has(e)&&(l.schedule(e),t()),e(o)}const l={schedule:(t,r=!1,o=!1)=>{const a=o&&s?e:n;return r&&i.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),i.delete(t)},process:t=>{o=t,s?r=!0:(s=!0,[e,n]=[n,e],n.clear(),e.forEach(a),s=!1,r&&(r=!1,l.process(t)))}};return l}(o),t),{}),{read:l,resolveKeyframes:u,update:c,preRender:h,render:d,postRender:p}=a,f=()=>{const s=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(s-i.timestamp,40),1),i.timestamp=s,i.isProcessing=!0,l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(f))};return{schedule:s.reduce((e,s)=>{const o=a[s];return e[s]=(e,s=!1,a=!1)=>(n||(n=!0,r=!0,i.isProcessing||t(f)),o.schedule(e,s,a)),e},{}),cancel:t=>{for(let e=0;e<s.length;e++)a[s[e]].cancel(t)},state:i,steps:a}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e,!0);function l(t,e){-1===t.indexOf(e)&&t.push(e)}function u(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class c{constructor(){this.subscriptions=[]}add(t){return l(this.subscriptions,t),()=>u(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<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function h(t,e){return e?t*(1e3/e):0}let d;function p(){d=void 0}const f={now:()=>(void 0===d&&f.set(o.isProcessing||n?o.timestamp:performance.now()),d),set:t=>{d=t,queueMicrotask(p)}};class m{constructor(t,e={}){this.version="11.8.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=f.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&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=f.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 c);const n=this.events[t].add(e);return"change"===t?()=>{n(),r.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()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=f.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return h(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function g(t,e){return new m(t,e)}let v=e,y=e;function w(t,e,n){var s;if("string"==typeof t){let r=document;e&&(y(Boolean(e.current)),r=e.current),n?(null!==(s=n[t])&&void 0!==s||(n[t]=r.querySelectorAll(t)),t=n[t]):t=r.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const b=new WeakMap;function x(t,e){let n;const s=()=>{const{currentTime:s}=e,r=(null===s?0:s.value)/100;n!==r&&t(r),n=r};return r.update(s,!0),()=>i(s)}function T(t){let e;return()=>(void 0===e&&(e=t()),e)}const S=T(()=>void 0!==window.ScrollTimeline);class V{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>{if(!S()||!e.attachTimeline)return e.pause(),x(t=>{e.time=e.duration*t},t);e.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 startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const A=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],M=new Set(A),k=t=>1e3*t,P=t=>t/1e3,C={type:"spring",stiffness:500,damping:25,restSpeed:10},F={type:"keyframes",duration:.8},E={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},O=(t,{keyframes:e})=>e.length>2?F:M.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:C:E;function R(t,e){return t[e]||t.default||t}const B=t=>null!==t;function I(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(B),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}const W=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function D(t,n,s,r){if(t===n&&s===r)return e;const i=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=W(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,s);return t=>0===t||1===t?t:W(i(t),n,r)}const L=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,N=t=>e=>1-t(1-e),K=D(.33,1.53,.69,.99),z=N(K),j=L(z),$=t=>(t*=2)<1?.5*z(t):.5*(2-Math.pow(2,-10*(t-1))),H=t=>1-Math.sin(Math.acos(t)),U=N(H),Y=L(H),q=t=>/^0[^.\s]+$/u.test(t);const X=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),G=t=>e=>"string"==typeof e&&e.startsWith(t),Z=G("--"),_=G("var(--"),J=t=>!!_(t)&&Q.test(t.split("/*")[0].trim()),Q=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,tt=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function et(t,e,n=1){const[s,r]=function(t){const e=tt.exec(t);if(!e)return[,];const[,n,s,r]=e;return["--"+(null!=n?n:s),r]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);if(i){const t=i.trim();return X(t)?parseFloat(t):t}return J(r)?et(r,e,n+1):r}const nt=(t,e,n)=>n>e?e:n<t?t:n,st={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},rt={...st,transform:t=>nt(0,1,t)},it={...st,default:1},ot=t=>Math.round(1e5*t)/1e5,at=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,lt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,ut=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ct(t){return"string"==typeof t}const ht=t=>({test:e=>ct(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),dt=ht("deg"),pt=ht("%"),ft=ht("px"),mt=ht("vh"),gt=ht("vw"),vt={...pt,parse:t=>pt.parse(t)/100,transform:t=>pt.transform(100*t)},yt=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),wt=t=>t===st||t===ft,bt=(t,e)=>parseFloat(t.split(", ")[e]),xt=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/u);if(r)return bt(r[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?bt(e[1],t):0}},Tt=new Set(["x","y","z"]),St=A.filter(t=>!Tt.has(t));const Vt={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:xt(4,13),y:xt(5,14)};Vt.translateX=Vt.x,Vt.translateY=Vt.y;const At=t=>e=>e.test(t),Mt=[st,ft,pt,dt,gt,mt,{test:t=>"auto"===t,parse:t=>t}],kt=t=>Mt.find(At(t)),Pt=new Set;let Ct=!1,Ft=!1;function Et(){if(Ft){const t=Array.from(Pt).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 St.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])=>{var s;null===(s=t.getValue(e))||void 0===s||s.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Ft=!1,Ct=!1,Pt.forEach(t=>t.complete()),Pt.clear()}function Ot(){Pt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ft=!0)})}class Rt{constructor(t,e,n,s,r,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=r,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Pt.add(this),Ct||(Ct=!0,r.read(Ot),r.resolveKeyframes(Et))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let r=0;r<t.length;r++)if(null===t[r])if(0===r){const r=null==s?void 0: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])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Pt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Pt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Bt=(t,e)=>n=>Boolean(ct(n)&&ut.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),It=(t,e,n)=>s=>{if(!ct(s))return s;const[r,i,o,a]=s.match(at);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Wt={...st,transform:t=>Math.round((t=>nt(0,255,t))(t))},Dt={test:Bt("rgb","red"),parse:It("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Wt.transform(t)+", "+Wt.transform(e)+", "+Wt.transform(n)+", "+ot(rt.transform(s))+")"};const Lt={test:Bt("#"),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:Dt.transform},Nt={test:Bt("hsl","hue"),parse:It("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+pt.transform(ot(e))+", "+pt.transform(ot(n))+", "+ot(rt.transform(s))+")"},Kt={test:t=>Dt.test(t)||Lt.test(t)||Nt.test(t),parse:t=>Dt.test(t)?Dt.parse(t):Nt.test(t)?Nt.parse(t):Lt.parse(t),transform:t=>ct(t)?t:t.hasOwnProperty("red")?Dt.transform(t):Nt.transform(t)};const zt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function jt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(zt,t=>(Kt.test(t)?(s.color.push(i),r.push("color"),n.push(Kt.parse(t))):t.startsWith("var(")?(s.var.push(i),r.push("var"),n.push(t)):(s.number.push(i),r.push("number"),n.push(parseFloat(t))),++i,"${}")).split("${}");return{values:n,split:o,indexes:s,types:r}}function $t(t){return jt(t).values}function Ht(t){const{split:e,types:n}=jt(t),s=e.length;return t=>{let r="";for(let i=0;i<s;i++)if(r+=e[i],void 0!==t[i]){const e=n[i];r+="number"===e?ot(t[i]):"color"===e?Kt.transform(t[i]):t[i]}return r}}const Ut=t=>"number"==typeof t?0:t;const Yt={test:function(t){var e,n;return isNaN(t)&&ct(t)&&((null===(e=t.match(at))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(lt))||void 0===n?void 0:n.length)||0)>0},parse:$t,createTransformer:Ht,getAnimatableNone:function(t){const e=$t(t);return Ht(t)(e.map(Ut))}},qt=new Set(["brightness","contrast","saturate","opacity"]);function Xt(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(at)||[];if(!s)return t;const r=n.replace(s,"");let i=qt.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const Gt=/\b([a-z-]*)\(.*?\)/gu,Zt={...Yt,getAnimatableNone:t=>{const e=t.match(Gt);return e?e.map(Xt).join(" "):t}},_t={...st,transform:Math.round},Jt={borderWidth:ft,borderTopWidth:ft,borderRightWidth:ft,borderBottomWidth:ft,borderLeftWidth:ft,borderRadius:ft,radius:ft,borderTopLeftRadius:ft,borderTopRightRadius:ft,borderBottomRightRadius:ft,borderBottomLeftRadius:ft,width:ft,maxWidth:ft,height:ft,maxHeight:ft,size:ft,top:ft,right:ft,bottom:ft,left:ft,padding:ft,paddingTop:ft,paddingRight:ft,paddingBottom:ft,paddingLeft:ft,margin:ft,marginTop:ft,marginRight:ft,marginBottom:ft,marginLeft:ft,rotate:dt,rotateX:dt,rotateY:dt,rotateZ:dt,scale:it,scaleX:it,scaleY:it,scaleZ:it,skew:dt,skewX:dt,skewY:dt,distance:ft,translateX:ft,translateY:ft,translateZ:ft,x:ft,y:ft,z:ft,perspective:ft,transformPerspective:ft,opacity:rt,originX:vt,originY:vt,originZ:ft,zIndex:_t,backgroundPositionX:ft,backgroundPositionY:ft,fillOpacity:rt,strokeOpacity:rt,numOctaves:_t},Qt={...Jt,color:Kt,backgroundColor:Kt,outlineColor:Kt,fill:Kt,stroke:Kt,borderColor:Kt,borderTopColor:Kt,borderRightColor:Kt,borderBottomColor:Kt,borderLeftColor:Kt,filter:Zt,WebkitFilter:Zt},te=t=>Qt[t];function ee(t,e){let n=te(t);return n!==Zt&&(n=Yt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ne=new Set(["auto","none","0"]);class se extends Rt{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.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),J(s))){const r=et(s,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!yt.has(n)||2!==t.length)return;const[s,r]=t,i=kt(s),o=kt(r);if(i!==o)if(wt(i)&&wt(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||q(s))&&n.push(e);var s;n.length&&function(t,e,n){let s=0,r=void 0;for(;s<t.length&&!r;){const e=t[s];"string"==typeof e&&!ne.has(e)&&jt(e).values.length&&(r=t[s]),s++}if(r&&n)for(const s of e)t[s]=ee(n,r)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Vt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1);const i=s.length-1,o=s[i];s[i]=Vt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}function re(t){return"function"==typeof t}const ie=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Yt.test(t)&&"0"!==t||t.startsWith("url(")));function oe(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=ie(r,e),a=ie(i,e);return!(!o||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||re(n))&&s)}class ae{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=f.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:r,repeatType:i,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Ot(),Et()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=f.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:r,delay:i,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!oe(t,n,s,r)){if(!i)return null==a||a(I(t,this.options,e)),null==o||o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function le(t,e,n){const s=Math.max(e-5,0);return h(n-t(s),e-s)}function ue({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i,o=1-e;o=nt(.05,1,o),t=nt(.01,10,P(t)),o<1?(r=e=>{const s=e*o,r=s*t;return.001-(s-n)/ce(e,o)*Math.exp(-r)},i=e=>{const s=e*o*t,i=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=ce(Math.pow(e,2),o);return(.001-r(e)>0?-1:1)*((i-a)*l)/u}):(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;n<12;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t=k(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}function ce(t,e){return t*Math.sqrt(1-e*e)}const he=["duration","bounce"],de=["stiffness","damping","mass"];function pe(t,e){return e.some(e=>void 0!==t[e])}function fe({keyframes:t,restDelta:e,restSpeed:n,...s}){const r=t[0],i=t[t.length-1],o={done:!1,value:r},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!pe(t,de)&&pe(t,he)){const n=ue(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...s,velocity:-P(s.velocity||0)}),p=h||0,f=l/(2*Math.sqrt(a*u)),m=i-r,g=P(Math.sqrt(a/u)),v=Math.abs(m)<5;let y;if(n||(n=v?.01:2),e||(e=v?.005:.5),f<1){const t=ce(g,f);y=e=>{const n=Math.exp(-f*g*e);return i-n*((p+f*g*m)/t*Math.sin(t*e)+m*Math.cos(t*e))}}else if(1===f)y=t=>i-Math.exp(-g*t)*(m+(p+g*m)*t);else{const t=g*Math.sqrt(f*f-1);y=e=>{const n=Math.exp(-f*g*e),s=Math.min(t*e,300);return i-n*((p+f*g*m)*Math.sinh(s)+t*m*Math.cosh(s))/t}}return{calculatedDuration:d&&c||null,next:t=>{const s=y(t);if(d)o.done=t>=c;else{let r=0;f<1&&(r=0===t?k(p):le(y,t,s));const a=Math.abs(r)<=n,l=Math.abs(i-s)<=e;o.done=a&&l}return o.value=o.done?i:s,o}}}function me({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=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)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const v=t=>-f*Math.exp(-t/s),y=t=>g+v(t),w=t=>{const e=v(t),n=y(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,x;const T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,x=fe({keyframes:[d.value,p(d.value)],velocity:le(y,t,d.value),damping:r,stiffness:i,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return x||void 0!==b||(e=!0,w(t),T(t)),void 0!==b&&t>=b?x.next(t-b):(!e&&w(t),d)}}}const ge=D(.42,0,1,1),ve=D(0,0,.58,1),ye=D(.42,0,.58,1),we=t=>Array.isArray(t)&&"number"!=typeof t[0],be={linear:e,easeIn:ge,easeInOut:ye,easeOut:ve,circIn:H,circInOut:Y,circOut:U,backIn:z,backInOut:j,backOut:K,anticipate:$},xe=t=>{if(Array.isArray(t)){y(4===t.length);const[e,n,s,r]=t;return D(e,n,s,r)}return"string"==typeof t?be[t]:t},Te=(t,e)=>n=>e(t(n)),Se=(...t)=>t.reduce(Te),Ve=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},Ae=(t,e,n)=>t+(e-t)*n;function Me(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 ke(t,e){return n=>n>0?e:t}const Pe=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},Ce=[Lt,Dt,Nt];function Fe(t){const e=(n=t,Ce.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===Nt&&(s=function({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=Me(a,s,t+1/3),i=Me(a,s,t),o=Me(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}}(s)),s}const Ee=(t,e)=>{const n=Fe(t),s=Fe(e);if(!n||!s)return ke(t,e);const r={...n};return t=>(r.red=Pe(n.red,s.red,t),r.green=Pe(n.green,s.green,t),r.blue=Pe(n.blue,s.blue,t),r.alpha=Ae(n.alpha,s.alpha,t),Dt.transform(r))},Oe=new Set(["none","hidden"]);function Re(t,e){return n=>Ae(t,e,n)}function Be(t){return"number"==typeof t?Re:"string"==typeof t?J(t)?ke:Kt.test(t)?Ee:De:Array.isArray(t)?Ie:"object"==typeof t?Kt.test(t)?Ee:We:ke}function Ie(t,e){const n=[...t],s=n.length,r=t.map((t,n)=>Be(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}}function We(t,e){const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=Be(t[r])(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const De=(t,e)=>{const n=Yt.createTransformer(e),s=jt(t),r=jt(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?function(t,e){return Oe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Se(Ie(function(t,e){var n;const s=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],a=t.indexes[o][r[o]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[i]=l,r[o]++}return s}(s,r),r.values),n):ke(t,e)};function Le(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Ae(t,e,n);return Be(t)(t,e)}function Ne(t,n,{clamp:s=!0,ease:r,mixer:i}={}){const o=t.length;if(y(o===n.length),1===o)return()=>n[0];if(2===o&&t[0]===t[1])return()=>n[1];t[0]>t[o-1]&&(t=[...t].reverse(),n=[...n].reverse());const a=function(t,n,s){const r=[],i=s||Le,o=t.length-1;for(let s=0;s<o;s++){let o=i(t[s],t[s+1]);if(n){const t=Array.isArray(n)?n[s]||e:n;o=Se(t,o)}r.push(o)}return r}(n,r,i),l=a.length,u=e=>{let n=0;if(l>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=Ve(t[n],t[n+1],e);return a[n](s)};return s?e=>u(nt(t[0],t[o-1],e)):u}function Ke(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=Ve(0,e,s);t.push(Ae(n,1,r))}}function ze(t){const e=[0];return Ke(e,t.length-1),e}function je({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=we(s)?s.map(xe):xe(s),i={done:!1,value:e[0]},o=Ne(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:ze(e),t),e,{ease:Array.isArray(r)?r:(a=e,l=r,a.map(()=>l||ye).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(i.value=o(e),i.done=e>=t,i)}}function $e(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}const He=t=>{const e=({timestamp:e})=>t(e);return{start:()=>r.update(e,!0),stop:()=>i(e),now:()=>o.isProcessing?o.timestamp:f.now()}},Ue={decay:me,inertia:me,tween:je,keyframes:je,spring:fe},Ye=t=>t/100;class qe extends ae{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:r}=this.options,i=(null==s?void 0:s.KeyframeResolver)||Rt;this.resolver=new i(r,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:i=0}=this.options,o=re(e)?e:Ue[e]||je;let a,l;o!==je&&"number"!=typeof t[0]&&(a=Se(Ye,Le(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===r&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-i})),null===u.calculatedDuration&&(u.calculatedDuration=$e(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:r,mirroredGenerator:i,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return r.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,w=r;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(w=i)),y=nt(0,1,n)*c}const b=v?{done:!1,value:a[0]}:w.next(y);o&&(b.value=o(b.value));let{done:x}=b;v||null===l||(x=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return T&&void 0!==s&&(b.value=I(a,this.options,s)),m&&m(b.value),T&&this.finish(),b}get duration(){const{resolved:t}=this;return t?P(t.calculatedDuration):0}get time(){return P(this.currentTime)}set time(t){t=k(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=P(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=He,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Xe=new Set(["opacity","clipPath","filter","transform"]),Ge=t=>Array.isArray(t)&&"number"==typeof t[0],Ze={linearEasing:void 0};function _e(t,e){const n=T(t);return()=>{var t;return null!==(t=Ze[e])&&void 0!==t?t:n()}}const Je=_e(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing");function Qe(t){return Boolean("function"==typeof t&&Je()||!t||"string"==typeof t&&(t in en||Je())||Ge(t)||Array.isArray(t)&&t.every(Qe))}const tn=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,en={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:tn([0,.65,.55,1]),circOut:tn([.55,0,1,.45]),backIn:tn([.31,.01,.66,-.59]),backOut:tn([.33,1.53,.69,.99])};function nn(t,e){return t?"function"==typeof t&&Je()?((t,e)=>{let n="";const s=Math.max(Math.round(e/10),2);for(let e=0;e<s;e++)n+=t(Ve(0,s-1,e))+", ";return`linear(${n.substring(0,n.length-2)})`})(t,e):Ge(t)?tn(t):Array.isArray(t)?t.map(t=>nn(t,e)||en.easeOut):en[t]:void 0}const sn=T(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const rn={anticipate:$,backInOut:j,circInOut:Y};class on extends ae{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:r}=this.options;this.resolver=new se(r,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:s=300,times:r,ease:i,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;var c;if("string"==typeof i&&Je()&&i in rn&&(i=rn[i]),re((c=this.options).type)||"spring"===c.type||!Qe(c.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new qe({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const r=[];let i=0;for(;!s.done&&i<2e4;)s=n.sample(i),r.push(s.value),i+=10;return{times:void 0,keyframes:r,duration:i-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),s=c.duration,r=c.times,i=c.ease,o="keyframes"}const h=function(t,e,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=nn(a,r);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:r,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}(a.owner.current,l,t,{...this.options,duration:s,times:r,ease:i});return h.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(h.timeline=this.pendingTimeline,this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:n}=this.options;a.set(I(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:s,times:r,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return P(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return P(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=k(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:n}=this;if(!n)return e;const{animation:s}=n;s.timeline=t,s.onfinish=null}else this.pendingTimeline=t;return e}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:r,ease:i,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...u}=this.options,c=new qe({...u,keyframes:n,duration:s,type:r,ease:i,times:o,isGenerator:!0}),h=k(this.time);t.setWithVelocity(c.sample(h-10).value,c.sample(h).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t;return sn()&&n&&Xe.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}}const an=(t,e,n,s={},i,o)=>a=>{const l=R(s,t)||{},u=l.delay||s.delay||0;let{elapsed:c=0}=s;c-=k(u);let 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:r,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(l)||(h={...h,...O(t,h)}),h.duration&&(h.duration=k(h.duration)),h.repeatDelay&&(h.repeatDelay=k(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(d=!0)),d&&!o&&void 0!==e.get()){const t=I(h.keyframes,l);if(void 0!==t)return r.update(()=>{h.onUpdate(t),h.onComplete()}),new V([])}return!o&&on.supports(h)?new on(h):new qe(h)},ln=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function un(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function cn(t,e,n,s){if("function"==typeof e){const[r,i]=un(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]=un(s);e=e(void 0!==n?n:t.custom,r,i)}return e}function hn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,g(n))}function dn(t,e){const n=function(t,e,n){const s=t.getProps();return cn(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){hn(t,e,ln(i[e]))}}const pn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),fn="data-"+pn("framerAppearId");function mn(t){return t.props[fn]}class gn extends m{constructor(){super(...arguments),this.values=[]}add(t){const e=function(t){return M.has(t)?"transform":Xe.has(t)?pn(t):void 0}(t);e&&(l(this.values,e),this.update())}update(){this.set(this.values.length?this.values.join(", "):"auto")}}const vn=t=>Boolean(t&&t.getVelocity);function yn(t,e){var n;if(!t.applyWillChange)return;let s=t.getValue("willChange");return s||(null===(n=t.props.style)||void 0===n?void 0:n.willChange)||(s=new gn("auto"),t.addValue("willChange",s)),r=s,Boolean(vn(r)&&r.add)?s.add(e):void 0;var r}function wn({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function bn(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:a=t.getDefaultTransition(),transitionEnd:l,...u}=e;s&&(a=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const e in u){const s=t.getValue(e,null!==(o=t.latestValues[e])&&void 0!==o?o:null),i=u[e];if(void 0===i||h&&wn(h,e))continue;const l={delay:n,...R(a||{},e)};let d=!1;if(window.MotionHandoffAnimation){const n=mn(t);if(n){const t=window.MotionHandoffAnimation(n,e,r);null!==t&&(l.startTime=t,d=!0)}}yn(t,e),s.start(an(e,s,i,t.shouldReduceMotion&&M.has(e)?{type:!1}:l,t,d));const p=s.animation;p&&c.push(p)}return l&&Promise.all(c).then(()=>{r.update(()=>{l&&dn(t,l)})}),c}const xn={};function Tn(t,{layout:e,layoutId:n}){return M.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!xn[t]||"opacity"===t)}function Sn(t,e,n){var s;const{style:r}=t,i={};for(const o in r)(vn(r[o])||e.style&&vn(e.style[o])||Tn(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(i[o]=r[o]);return n&&r&&"string"==typeof r.willChange&&(n.applyWillChange=!1),i}const Vn="undefined"!=typeof window,An={current:null},Mn={current:!1};const kn=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Pn(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||kn.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const Cn={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"]},Fn={};for(const t in Cn)Fn[t]={isEnabled:e=>Cn[t].some(t=>!!e[t])};const En=[...Mt,Kt,Yt],On=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Rn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Bn extends class{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Rt,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=f.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,r.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Pn(e),this.isVariantNode=function(t){return Boolean(Pn(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&vn(e)&&e.set(l[t],!1)}}mount(t){this.current=t,b.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),Mn.current||function(){if(Mn.current=!0,Vn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>An.current=t.matches;t.addListener(e),e()}else An.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||An.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){b.delete(this.current),this.projection&&this.projection.unmount(),i(this.notifyUpdate),i(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=M.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&r.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),i(),o&&o(),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 Fn){const e=Fn[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;e<Rn.length;e++){const n=Rn[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){for(const s in e){const r=e[s],i=n[s];if(vn(r))t.addValue(s,r);else if(vn(i))t.addValue(s,g(r,{owner:t}));else if(i!==r)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(s);t.addValue(s,g(void 0!==e?e:r,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.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=g(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let s=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var r;return null!=s&&("string"==typeof s&&(X(s)||q(s))?s=parseFloat(s):(r=s,!En.find(At(r))&&Yt.test(e)&&(s=ee(t,e))),this.setBaseTarget(t,vn(s)?s.get():s)),vn(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let s;if("string"==typeof n||"object"==typeof n){const r=cn(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);r&&(s=r[t])}if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||vn(r)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new c),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{constructor(){super(...arguments),this.KeyframeResolver=se}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]}}const In=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Wn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Dn=A.length;function Ln(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(M.has(t))o=!0;else if(Z(t))r[t]=n;else{const e=In(n,Jt[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<Dn;i++){const o=A[i],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=In(a,Jt[o]);if(!l){r=!1;s+=`${Wn[o]||o}(${t}) `}n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,r?"":s):r&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=i;s.transformOrigin=`${t} ${e} ${n}`}}function Nn(t,e,n){return"string"==typeof t?t:ft.transform(e+n*t)}const Kn={offset:"stroke-dashoffset",array:"stroke-dasharray"},zn={offset:"strokeDashoffset",array:"strokeDasharray"};function jn(t,{attrX:e,attrY:n,attrScale:s,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Ln(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==r||void 0!==i||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Nn(e,t.x,t.width)} ${Nn(n,t.y,t.height)}`}(f,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,r=!0){t.pathLength=1;const i=r?Kn:zn;t[i.offset]=ft.transform(-s);const o=ft.transform(e),a=ft.transform(n);t[i.array]=`${o} ${a}`}(d,o,a,l,!1)}const $n=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Hn(t,{style:e,vars:n},s,r){Object.assign(t.style,e,r&&r.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}class Un extends Bn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=On}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(M.has(e)){const t=te(e);return t&&t.default||0}return e=$n.has(e)?e:pn(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=Sn(t,e,n);for(const n in t)if(vn(t[n])||vn(e[n])){s[-1!==A.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return s}(t,e,n)}build(t,e,n){jn(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Hn(t,e,void 0,s);for(const n in e.attrs)t.setAttribute($n.has(n)?n:pn(n),e.attrs[n])}(t,e,0,s)}mount(t){var e;this.isSVGTag="string"==typeof(e=t.tagName)&&"svg"===e.toLowerCase(),super.mount(t)}}class Yn extends Bn{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Hn}readValueFromInstance(t,e){if(M.has(e)){const t=te(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=(Z(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return function(t,e){return function({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}(t,e)}build(t,e,n){Ln(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Sn(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;vn(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}function qn(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=function(t){return t instanceof SVGElement&&"svg"!==t.tagName}(t)?new Un(e):new Yn(e);n.mount(t),b.set(t,n)}function Xn(t,e,n){const s=vn(t)?t:g(t);return s.start(an("",s,e,n)),s.animation}function Gn(t,e=100){const n=fe({keyframes:[0,e],...t}),s=Math.min($e(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:P(s)}}function Zn(t,e,n,s){var r;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(r=s.get(e))&&void 0!==r?r:t}const _n=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function Jn(t,e){return we(t)?t[_n(0,t.length,e)]:t}function Qn(t,e,n,s,r,i){!function(t,e,n){for(let s=0;s<t.length;s++){const r=t[s];r.at>e&&r.at<n&&(u(t,r),s--)}}(t,r,i);for(let o=0;o<e.length;o++)t.push({value:e[o],at:Ae(r,i,s[o]),easing:Jn(n,o)})}function ts(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function es(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function ns(t,e){return e[t]||(e[t]=[]),e[t]}function ss(t){return Array.isArray(t)?t:[t]}function rs(t,e){return t[e]?{...t,...t[e]}:{...t}}const is=t=>"number"==typeof t,os=t=>t.every(is);function as(t,e,n,s){const r=w(t,s),i=r.length,o=[];for(let t=0;t<i;t++){const s=r[t];b.has(s)||qn(s);const a=b.get(s),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,i)),o.push(...bn(a,{...e,transition:l},{}))}return new V(o)}function ls(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s){const r=e.duration||.3,i=new Map,o=new Map,a={},l=new Map;let u=0,c=0,h=0;for(let n=0;n<t.length;n++){const i=t[n];if("string"==typeof i){l.set(i,c);continue}if(!Array.isArray(i)){l.set(i.name,Zn(c,i.at,u,l));continue}let[d,p,f={}]=i;void 0!==f.at&&(c=Zn(c,f.at,u,l));let m=0;const g=(t,n,s,i=0,o=0)=>{const a=ss(t),{delay:l=0,times:u=ze(a),type:d="keyframes",...p}=n;let{ease:f=e.ease||"easeOut",duration:g}=n;const v="function"==typeof l?l(i,o):l,y=a.length;if(y<=2&&"spring"===d||re(d)){let t=100;if(2===y&&os(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...p};void 0!==g&&(e.duration=k(g));const n=Gn(e,t);f=n.ease,g=n.duration}null!=g||(g=r);const w=c+v,b=w+g;1===u.length&&0===u[0]&&(u[1]=1);const x=u.length-a.length;x>0&&Ke(u,x),1===a.length&&a.unshift(null),Qn(s,a,f,u,w,b),m=Math.max(v+g,m),h=Math.max(b,h)};if(vn(d)){g(p,f,ns("default",es(d,o)))}else{const t=w(d,s,a),e=t.length;for(let n=0;n<e;n++){p=p,f=f;const s=es(t[n],o);for(const t in p)g(p[t],rs(f,t),ns(t,s),n,e)}}u=c,c+=m}return o.forEach((t,s)=>{for(const r in t){const o=t[r];o.sort(ts);const a=[],l=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:s}=o[t];a.push(n),l.push(Ve(0,h,e)),u.push(s||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),i.has(s)||i.set(s,{keyframes:{},transition:{}});const c=i.get(s);c.keyframes[r]=a,c.transition[r]={...e,duration:h,ease:u,times:l,...n}}}),i}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let r;r=vn(n)?Xn(n,t.default,e.default):as(n,t,e),s.push(r)}),new V(s)}const us=t=>function(e,n,s){let r;var i;return i=e,r=Array.isArray(i)&&Array.isArray(i[0])?ls(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?as(e,n,s,t):Xn(e,n,s),t&&t.animations.push(r),r},cs=us(),hs=new WeakMap;let ds;function ps({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=hs.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function fs(t){t.forEach(ps)}function ms(t,e){ds||"undefined"!=typeof ResizeObserver&&(ds=new ResizeObserver(fs));const n=w(t);return n.forEach(t=>{let n=hs.get(t);n||(n=new Set,hs.set(t,n)),n.add(e),null==ds||ds.observe(t)}),()=>{n.forEach(t=>{const n=hs.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==ds||ds.unobserve(t)})}}const gs=new Set;let vs;function ys(t){return gs.add(t),vs||(vs=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};gs.forEach(t=>t(e))},window.addEventListener("resize",vs)),()=>{gs.delete(t),!gs.size&&vs&&(vs=void 0)}}const ws={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function bs(t,e,n,s){const r=n[e],{length:i,position:o}=ws[e],a=r.current,l=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=Ve(0,r.scrollLength,r.current);const u=s-l;r.velocity=u>50?0:h(r.current-a,u)}const xs={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Ts={start:0,center:.5,end:1};function Ss(t,e,n=0){let s=0;if(t in Ts&&(t=Ts[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 Vs=[0,0];function As(t,e,n,s){let r=Array.isArray(t)?t:Vs,i=0,o=0;return"number"==typeof t?r=[t,t]:"string"==typeof t&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,Ts[t]?t:"0"]),i=Ss(r[0],n,s),o=Ss(r[1],e),i-o}const Ms={x:0,y:0};function ks(t,e,n){const{offset:s=xs.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(s instanceof HTMLElement)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):Ms,l=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),u={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<h;t++){const n=As(s[t],u[o],l[o],a[i]);c||n===e[i].interpolatorOffsets[t]||(c=!0),e[i].offset[t]=n}c&&(e[i].interpolate=Ne(e[i].offset,ze(s)),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=e[i].interpolate(e[i].current)}function Ps(t,e,n,s={}){return{measure:()=>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),update:e=>{!function(t,e,n){bs(t,"x",e,n),bs(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&ks(t,n,s)},notify:()=>e(n)}}const Cs=new WeakMap,Fs=new WeakMap,Es=new WeakMap,Os=t=>t===document.documentElement?window:t;function Rs(t,{container:e=document.documentElement,...n}={}){let s=Es.get(e);s||(s=new Set,Es.set(e,s));const a=Ps(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(a),!Cs.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(o.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{r.read(t,!1,!0),r.read(n,!1,!0),r.update(i,!1,!0)};Cs.set(e,a);const c=Os(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Fs.set(e,(u=a,"function"==typeof(l=e)?ys(l):ms(l,u))),c.addEventListener("scroll",a,{passive:!0})}var l,u;const c=Cs.get(e);return r.read(c,!1,!0),()=>{var t;i(c);const n=Es.get(e);if(!n)return;if(n.delete(a),n.size)return;const s=Cs.get(e);Cs.delete(e),s&&(Os(e).removeEventListener("scroll",s),null===(t=Fs.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const Bs=new Map;function Is({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),Bs.has(e)||Bs.set(e,{});const s=Bs.get(e);return s[n]||(s[n]=S()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const s={value:0},r=Rs(t=>{s.value=100*t[n].progress},{container:e,axis:n});return{currentTime:s,cancel:r}}({source:e,axis:n})),s[n]}function Ws(t){return t&&(t.target||t.offset)}const Ds={some:0,all:1};const Ls=(t,e)=>Math.abs(t-e);const Ns=r,Ks=s.reduce((t,e)=>(t[e]=t=>i(t),t),{});t.MotionValue=m,t.animate=cs,t.anticipate=$,t.backIn=z,t.backInOut=j,t.backOut=K,t.cancelFrame=i,t.cancelSync=Ks,t.circIn=H,t.circInOut=Y,t.circOut=U,t.clamp=nt,t.createScopedAnimate=us,t.cubicBezier=D,t.delay=function(t,e){const n=f.now(),s=({timestamp:r})=>{const o=r-n;o>=e&&(i(s),t(o-e))};return r.read(s,!0),()=>i(s)},t.distance=Ls,t.distance2D=function(t,e){const n=Ls(t.x,e.x),s=Ls(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=ge,t.easeInOut=ye,t.easeOut=ve,t.frame=r,t.frameData=o,t.frameSteps=a,t.inView=function(t,e,{root:n,margin:s,amount:r="some"}={}){const i=w(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);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),o.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof r?r:Ds[r]});return i.forEach(t=>a.observe(t)),()=>a.disconnect()},t.interpolate=Ne,t.invariant=y,t.mirrorEasing=L,t.mix=Le,t.motionValue=g,t.pipe=Se,t.progress=Ve,t.reverseEasing=N,t.scroll=function(t,e){const n=(null==e?void 0:e.axis)||"y";return"function"==typeof t?function(t){return 2===t.length}(t)||Ws(e)?Rs(e=>{t(e[n].progress,e)},e):x(t,Is(e)):Ws(e)?(t.pause(),Rs(e=>{t.time=t.duration*e[n].progress},e)):t.attachTimeline(Is(e))},t.scrollInfo=Rs,t.stagger=function(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 l=t*a;if(s){const e=i*t;l=xe(s)(l/e)*e}return e+l}},t.steps=function(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 nt(0,1,r/t)}},t.sync=Ns,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],r=t[1+n],i=t[2+n],o=t[3+n],a=Ne(r,i,{mixer:(l=i[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.warning=v,t.wrap=_n}));
{
"name": "framer-motion",
"version": "11.7.0",
"version": "11.8.0",
"description": "A simple and powerful JavaScript animation library",

@@ -101,3 +101,3 @@ "main": "dist/cjs/index.js",

"path": "./dist/size-rollup-motion.js",
"maxSize": "33.85 kB"
"maxSize": "34.1 kB"
},

@@ -110,11 +110,11 @@ {

"path": "./dist/size-rollup-dom-animation.js",
"maxSize": "16.9 kB"
"maxSize": "17.1 kB"
},
{
"path": "./dist/size-rollup-dom-max.js",
"maxSize": "29 kB"
"maxSize": "29.1 kB"
},
{
"path": "./dist/size-rollup-animate.js",
"maxSize": "17.7 kB"
"maxSize": "17.9 kB"
},

@@ -126,3 +126,3 @@ {

],
"gitHead": "bc91591aada42708b4ab80379fc5320f7e1dfcd2"
"gitHead": "b544cce137f3ae21176771bf3225293f6b22579b"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc