framer-motion 11.0.11 → 11.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var indexLegacy = require('./index-legacy-af501ce9.js');
5
+ var indexLegacy = require('./index-legacy-4a7bf96d.js');
6
6
 
7
7
 
8
8
 
@@ -3298,7 +3298,7 @@ class MotionValue {
3298
3298
  * This will be replaced by the build step with the latest version number.
3299
3299
  * When MotionValues are provided to motion components, warn if versions are mixed.
3300
3300
  */
3301
- this.version = "11.0.11";
3301
+ this.version = "11.0.12";
3302
3302
  /**
3303
3303
  * Tracks whether this value can output a velocity. Currently this is only true
3304
3304
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -4064,7 +4064,7 @@ function updateMotionValuesFromProps(element, next, prev) {
4064
4064
  * and warn against mismatches.
4065
4065
  */
4066
4066
  if (process.env.NODE_ENV === "development") {
4067
- warnOnce(nextValue.version === "11.0.11", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.0.11 may not work as expected.`);
4067
+ warnOnce(nextValue.version === "11.0.12", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.0.12 may not work as expected.`);
4068
4068
  }
4069
4069
  }
4070
4070
  else if (isMotionValue(prevValue)) {
package/dist/cjs/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var indexLegacy = require('./index-legacy-af501ce9.js');
6
+ var indexLegacy = require('./index-legacy-4a7bf96d.js');
7
7
 
8
8
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
9
 
package/dist/dom.js CHANGED
@@ -1 +1 @@
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,s=!1;class r{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const e=this.order.indexOf(t);-1!==e&&(this.order.splice(e,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}const i=["read","resolveKeyframes","update","preRender","render","postRender"];const{schedule:o,cancel:a,state:l,steps:u}=function(t,e){let n=!1,s=!0;const o={delta:0,timestamp:0,isProcessing:!1},a=i.reduce((t,e)=>(t[e]=function(t){let e=new r,n=new r,s=0,i=!1,o=!1;const a=new WeakSet,l={schedule:(t,r=!1,o=!1)=>{const l=o&&i,u=l?e:n;return r&&a.add(t),u.add(t)&&l&&i&&(s=e.order.length),t},cancel:t=>{n.remove(t),a.delete(t)},process:r=>{if(i)o=!0;else{if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let n=0;n<s;n++){const s=e.order[n];a.has(s)&&(l.schedule(s),t()),s(r)}i=!1,o&&(o=!1,l.process(r))}}};return l}(()=>n=!0),t),{}),l=t=>{a[t].process(o)},u=()=>{const r=performance.now();n=!1,o.delta=s?1e3/60:Math.max(Math.min(r-o.timestamp,40),1),o.timestamp=r,o.isProcessing=!0,i.forEach(l),o.isProcessing=!1,n&&e&&(s=!1,t(u))};return{schedule:i.reduce((e,r)=>{const i=a[r];return e[r]=(e,r=!1,a=!1)=>(n||(n=!0,s=!0,o.isProcessing||t(u)),i.schedule(e,r,a)),e},{}),cancel:t=>i.forEach(e=>a[e].cancel(t)),state:o,steps:a}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e,!0);function c(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class h{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>c(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function d(t,e){return e?t*(1e3/e):0}let p;function f(){p=void 0}const m={now:()=>(void 0===p&&m.set(l.isProcessing||s?l.timestamp:performance.now()),p),set:t=>{p=t,queueMicrotask(f)}};class g{constructor(t,e={}){var n;this.version="11.0.11",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=m.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.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=m.now()}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 h);const n=this.events[t].add(e);return"change"===t?()=>{n(),o.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=m.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return d(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 v(t,e){return new g(t,e)}let y=e,w=e;function b(t,e,n){var s;if("string"==typeof t){let r=document;e&&(w(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 x=new WeakMap;function T(t,e){let n;const s=()=>{const{currentTime:s}=e,r=(null===s?0:s.value)/100;n!==r&&t(r),n=r};return o.update(s,!0),()=>a(s)}function V(t){let e;return()=>(void 0===e&&(e=t()),e)}const S=V(()=>void 0!==window.ScrollTimeline);class M{constructor(t){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(),T(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 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")}stop(){this.runAll("stop")}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"],P=new Set(A),k=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),C="data-"+k("framerAppearId"),E=t=>1e3*t,F=t=>t/1e3,O={type:"spring",stiffness:500,damping:25,restSpeed:10},R={type:"keyframes",duration:.8},B={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},I=(t,{keyframes:e})=>e.length>2?R:P.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:O:B;function L(t,e){return t[e]||t.default||t}const D=!1,W=t=>null!==t;function N(t,{repeat:e,repeatType:n="loop"}){const s=t.filter(W);return s[e&&"loop"!==n&&e%2==1?0:s.length-1]}const j=t=>/^0[^.\s]+$/u.test(t);const z=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),K=t=>e=>"string"==typeof e&&e.startsWith(t),$=K("--"),H=K("var(--"),U=t=>!!H(t)&&Y.test(t.split("/*")[0].trim()),Y=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,q=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function X(t,e,n=1){const[s,r]=function(t){const e=q.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 z(t)?parseFloat(t):t}return U(r)?X(r,e,n+1):r}const Z=(t,e,n)=>n>e?e:n<t?t:n,G={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},_={...G,transform:t=>Z(0,1,t)},J={...G,default:1},Q=t=>Math.round(1e5*t)/1e5,tt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,et=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,nt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function st(t){return"string"==typeof t}const rt=t=>({test:e=>st(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),it=rt("deg"),ot=rt("%"),at=rt("px"),lt=rt("vh"),ut=rt("vw"),ct={...ot,parse:t=>ot.parse(t)/100,transform:t=>ot.transform(100*t)},ht=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),dt=t=>t===G||t===at,pt=(t,e)=>parseFloat(t.split(", ")[e]),ft=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/u);if(r)return pt(r[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?pt(e[1],t):0}},mt=new Set(["x","y","z"]),gt=A.filter(t=>!mt.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:ft(4,13),y:ft(5,14)};vt.translateX=vt.x,vt.translateY=vt.y;const yt=t=>e=>e.test(t),wt=[G,at,ot,it,ut,lt,{test:t=>"auto"===t,parse:t=>t}],bt=t=>wt.find(yt(t)),xt=new Set;let Tt=!1,Vt=!1;function St(){Vt&&(xt.forEach(t=>{t.needsMeasurement&&t.unsetTransforms()}),xt.forEach(t=>{t.needsMeasurement&&t.measureInitialState()}),xt.forEach(t=>{t.needsMeasurement&&t.renderEndStyles()}),xt.forEach(t=>{t.needsMeasurement&&t.measureEndState()})),Vt=!1,Tt=!1,xt.forEach(t=>t.complete()),xt.clear()}function Mt(){xt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Vt=!0)}),o.resolveKeyframes(St)}class At{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?(xt.add(this),Tt||(Tt=!0,o.read(Mt))):(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]}unsetTransforms(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes),xt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,xt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Pt=(t,e)=>n=>Boolean(st(n)&&nt.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),kt=(t,e,n)=>s=>{if(!st(s))return s;const[r,i,o,a]=s.match(tt);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Ct={...G,transform:t=>Math.round((t=>Z(0,255,t))(t))},Et={test:Pt("rgb","red"),parse:kt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Ct.transform(t)+", "+Ct.transform(e)+", "+Ct.transform(n)+", "+Q(_.transform(s))+")"};const Ft={test:Pt("#"),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:Et.transform},Ot={test:Pt("hsl","hue"),parse:kt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ot.transform(Q(e))+", "+ot.transform(Q(n))+", "+Q(_.transform(s))+")"},Rt={test:t=>Et.test(t)||Ft.test(t)||Ot.test(t),parse:t=>Et.test(t)?Et.parse(t):Ot.test(t)?Ot.parse(t):Ft.parse(t),transform:t=>st(t)?t:t.hasOwnProperty("red")?Et.transform(t):Ot.transform(t)};const Bt=/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 It(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(Bt,t=>(Rt.test(t)?(s.color.push(i),r.push("color"),n.push(Rt.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 Lt(t){return It(t).values}function Dt(t){const{split:e,types:n}=It(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?Q(t[i]):"color"===e?Rt.transform(t[i]):t[i]}return r}}const Wt=t=>"number"==typeof t?0:t;const Nt={test:function(t){var e,n;return isNaN(t)&&st(t)&&((null===(e=t.match(tt))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(et))||void 0===n?void 0:n.length)||0)>0},parse:Lt,createTransformer:Dt,getAnimatableNone:function(t){const e=Lt(t);return Dt(t)(e.map(Wt))}},jt=new Set(["brightness","contrast","saturate","opacity"]);function zt(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(tt)||[];if(!s)return t;const r=n.replace(s,"");let i=jt.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const Kt=/\b([a-z-]*)\(.*?\)/gu,$t={...Nt,getAnimatableNone:t=>{const e=t.match(Kt);return e?e.map(zt).join(" "):t}},Ht={...G,transform:Math.round},Ut={borderWidth:at,borderTopWidth:at,borderRightWidth:at,borderBottomWidth:at,borderLeftWidth:at,borderRadius:at,radius:at,borderTopLeftRadius:at,borderTopRightRadius:at,borderBottomRightRadius:at,borderBottomLeftRadius:at,width:at,maxWidth:at,height:at,maxHeight:at,size:at,top:at,right:at,bottom:at,left:at,padding:at,paddingTop:at,paddingRight:at,paddingBottom:at,paddingLeft:at,margin:at,marginTop:at,marginRight:at,marginBottom:at,marginLeft:at,rotate:it,rotateX:it,rotateY:it,rotateZ:it,scale:J,scaleX:J,scaleY:J,scaleZ:J,skew:it,skewX:it,skewY:it,distance:at,translateX:at,translateY:at,translateZ:at,x:at,y:at,z:at,perspective:at,transformPerspective:at,opacity:_,originX:ct,originY:ct,originZ:at,zIndex:Ht,fillOpacity:_,strokeOpacity:_,numOctaves:Ht},Yt={...Ut,color:Rt,backgroundColor:Rt,outlineColor:Rt,fill:Rt,stroke:Rt,borderColor:Rt,borderTopColor:Rt,borderRightColor:Rt,borderBottomColor:Rt,borderLeftColor:Rt,filter:$t,WebkitFilter:$t},qt=t=>Yt[t];function Xt(t,e){let n=qt(t);return n!==$t&&(n=Nt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}class Zt extends At{constructor(t,e,n,s){super(t,e,n,s,null==s?void 0:s.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e.current)return;const s=[];super.readKeyframes();for(let n=0;n<t.length;n++){const i=t[n];if("string"==typeof i&&U(i)){const s=X(i,e.current);void 0!==s&&(t[n]=s)}("number"==typeof(r=t[n])?0===r:null===r||"none"===r||"0"===r||j(r))&&s.push(n)}var r;if(s.length&&function(t,e,n){let s=0,r=void 0;for(;s<t.length&&!r;)"string"==typeof t[s]&&"none"!==t[s]&&"0"!==t[s]&&(r=t[s]),s++;if(r&&n)for(const s of e)t[s]=Xt(n,r)}(t,s,n),!ht.has(n)||2!==t.length)return;const[i,o]=t,a=bt(i),l=bt(o);if(a&&l&&a!==l)if(dt(a)&&dt(l))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}unsetTransforms(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t.current)return;this.removedTransforms=function(t){const e=[];return gt.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t);const s=n[n.length-1];t.getValue(e,s).jump(s,!1)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;t.current&&("height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=vt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin)}renderEndStyles(){this.element.render()}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1),s[s.length-1]=vt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),"height"===n&&void 0!==this.suspendedScrollY&&window.scrollTo(0,this.suspendedScrollY),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)})}}const Gt=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Nt.test(t)&&"0"!==t||t.startsWith("url(")));class _t{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",...o}){this.isStopped=!1,this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:r,repeatType:i,...o},this.updateFinishedPromise()}get resolved(){return this._resolved||(Mt(),St(),a(Mt),a(St)),this._resolved}onKeyframesResolved(t){const{name:e,type:n,velocity:s,delay:r,onComplete:i,onUpdate:o}=this.options;if(!function(t,e,n,s){const r=t[0];if(null===r)return!1;const i=t[t.length-1],o=Gt(r,e),a=Gt(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&&s)}(t,e,n,s)){if(!r){const e=N(t,this.options);return null==o||o(e),null==i||i(),this.resolveFinishedPromise(),void this.updateFinishedPromise()}this.options.duration=0}this._resolved={keyframes:t,...this.initPlayback(t)},this.onPostResolved()}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=()=>{t(),this.updateFinishedPromise()}})}}function Jt(t,e,n){const s=Math.max(e-5,0);return d(n-t(s),e-s)}function Qt({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i;y(t<=E(10));let o=1-e;o=Z(.05,1,o),t=Z(.01,10,F(t)),o<1?(r=e=>{const s=e*o,r=s*t;return.001-(s-n)/te(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=te(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=E(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 te(t,e){return t*Math.sqrt(1-e*e)}const ee=["duration","bounce"],ne=["stiffness","damping","mass"];function se(t,e){return e.some(e=>void 0!==t[e])}function re({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(!se(t,ne)&&se(t,ee)){const n=Qt(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...s,velocity:-F(s.velocity||0)}),p=h||0,f=l/(2*Math.sqrt(a*u)),m=i-r,g=F(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=te(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=p;0!==t&&(r=f<1?Jt(y,t,s):0);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 ie({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=re({keyframes:[d.value,p(d.value)],velocity:Jt(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 oe=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ae(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=oe(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:oe(i(t),n,r)}const le=ae(.42,0,1,1),ue=ae(0,0,.58,1),ce=ae(.42,0,.58,1),he=t=>Array.isArray(t)&&"number"!=typeof t[0],de=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,pe=t=>e=>1-t(1-e),fe=t=>1-Math.sin(Math.acos(t)),me=pe(fe),ge=de(fe),ve=ae(.33,1.53,.69,.99),ye=pe(ve),we=de(ye),be=t=>(t*=2)<1?.5*ye(t):.5*(2-Math.pow(2,-10*(t-1))),xe={linear:e,easeIn:le,easeInOut:ce,easeOut:ue,circIn:fe,circInOut:ge,circOut:me,backIn:ye,backInOut:we,backOut:ve,anticipate:be},Te=t=>{if(Array.isArray(t)){w(4===t.length);const[e,n,s,r]=t;return ae(e,n,s,r)}return"string"==typeof t?xe[t]:t},Ve=(t,e)=>n=>e(t(n)),Se=(...t)=>t.reduce(Ve),Me=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},Ae=(t,e,n)=>t+(e-t)*n;function Pe(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}const ke=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},Ce=[Ft,Et,Ot];function Ee(t){const e=(n=t,Ce.find(t=>t.test(n)));var n;let s=e.parse(t);return e===Ot&&(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=Pe(a,s,t+1/3),i=Pe(a,s,t),o=Pe(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 Fe=(t,e)=>{const n=Ee(t),s=Ee(e),r={...n};return t=>(r.red=ke(n.red,s.red,t),r.green=ke(n.green,s.green,t),r.blue=ke(n.blue,s.blue,t),r.alpha=Ae(n.alpha,s.alpha,t),Et.transform(r))};function Oe(t,e){return n=>n>0?e:t}function Re(t,e){return n=>Ae(t,e,n)}function Be(t){return"number"==typeof t?Re:"string"==typeof t?U(t)?Oe:Rt.test(t)?Fe:De:Array.isArray(t)?Ie:"object"==typeof t?Rt.test(t)?Fe:Le:Oe}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 Le(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=Nt.createTransformer(e),s=It(t),r=It(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?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):Oe(t,e)};function We(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(w(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||We,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=Me(t[n],t[n+1],e);return a[n](s)};return s?e=>u(Z(t[0],t[o-1],e)):u}function je(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=Me(0,e,s);t.push(Ae(n,1,r))}}function ze(t){const e=[0];return je(e,t.length-1),e}function Ke({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=he(s)?s.map(Te):Te(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||ce).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:()=>o.update(e,!0),stop:()=>a(e),now:()=>l.isProcessing?l.timestamp:m.now()}},Ue={decay:ie,inertia:ie,tween:Ke,keyframes:Ke,spring:re},Ye=t=>t/100;class qe extends _t{constructor({KeyframeResolver:t=At,...e}){super(e),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle";const{name:n,motionValue:s,keyframes:r}=this.options,i=t=>this.onKeyframesResolved(t);n&&s&&s.owner?this.resolver=s.owner.resolveKeyframes(r,i,n,s):this.resolver=new t(r,i,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=Ue[e]||Ke;let a,l;o!==Ke&&"number"!=typeof t[0]&&(a=Se(Ye,We(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{generator:n,mirroredGenerator:s,mapPercentToKeyframes:r,keyframes:i,calculatedDuration:o,totalDuration:a,resolvedDuration:l}=this.resolved;if(null===this.startTime)return n.next(0);const{delay:u,repeat:c,repeatType:h,repeatDelay:d,onUpdate:p}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/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 f=this.currentTime-u*(this.speed>=0?1:-1),m=this.speed>=0?f<0:f>a;this.currentTime=Math.max(f,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=a);let g=this.currentTime,v=n;if(c){const t=Math.min(this.currentTime,a)/l;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/l)):"mirror"===h&&(v=s)),g=Z(0,1,n)*l}const y=m?{done:!1,value:i[0]}:v.next(g);r&&(y.value=r(y.value));let{done:w}=y;m||null===o||(w=this.speed>=0?this.currentTime>=a:this.currentTime<=0);const b=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return p&&p(y.value),b&&this.finish(),y}get duration(){return F(this.resolved.calculatedDuration)}get time(){return F(this.currentTime)}set time(t){t=E(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=F(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}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=n),"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"}stop(){if(this.isStopped=!0,"idle"===this.state)return;this.state="idle";const{onStop:t}=this.options;t&&t(),this.teardown()}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()}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=t=>Array.isArray(t)&&"number"==typeof t[0];function Ze(t){return Boolean(!t||"string"==typeof t&&_e[t]||Xe(t)||Array.isArray(t)&&t.every(Ze))}const Ge=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,_e={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ge([0,.65,.55,1]),circOut:Ge([.55,0,1,.45]),backIn:Ge([.31,.01,.66,-.59]),backOut:Ge([.33,1.53,.69,.99])};function Je(t){if(t)return Xe(t)?Ge(t):Array.isArray(t)?t.map(Je):_e[t]}const Qe=V(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),tn=new Set(["opacity","clipPath","filter","transform"]);class en extends _t{constructor(t){super(t);const{name:e,motionValue:n,keyframes:s}=this.options;this.resolver=new Zt(s,t=>this.onKeyframesResolved(t),e,n),this.resolver.scheduleResolve()}initPlayback(t){let e=this.options.duration||300;if("spring"===(n=this.options).type||"backgroundColor"===n.name||!Ze(n.ease)){const{onComplete:n,onUpdate:s,motionValue:r,...i}=this.options,o=function(t,e){const n=new qe({...e,keyframes:t,repeat:0,delay: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,i);t=o.keyframes,e=o.duration,this.options.times=o.times,this.options.ease=o.ease}var n;const{motionValue:s,name:r}=this.options,i=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=Je(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"})}(s.owner.current,r,t,{...this.options,duration:e});return i.startTime=m.now(),this.pendingTimeline?(i.timeline=this.pendingTimeline,this.pendingTimeline=void 0):i.onfinish=()=>{const{onComplete:e}=this.options;s.set(N(t,this.options)),e&&e(),this.cancel(),this.resolveFinishedPromise(),this.updateFinishedPromise()},{animation:i,duration:e,keyframes:t}}get duration(){const{duration:t}=this.resolved;return F(t)}get time(){const{animation:t}=this.resolved;return F(t.currentTime||0)}set time(t){const{animation:e}=this.resolved;e.currentTime=E(t)}get speed(){const{animation:t}=this.resolved;return t.playbackRate}set speed(t){const{animation:e}=this.resolved;e.playbackRate=t}get state(){const{animation:t}=this.resolved;return t.playState}attachTimeline(t){if(this._resolved){const{animation:e}=this.resolved;e.timeline=t,e.onfinish=null}else this.pendingTimeline=t;return e}play(){if(this.isStopped)return;const{animation:t}=this.resolved;t.play()}pause(){const{animation:t}=this.resolved;t.pause()}stop(){this.isStopped=!0;const{animation:t,keyframes:e}=this.resolved;if("idle"!==t.playState&&"finished"!==t.playState){if(this.time){const{motionValue:t,onUpdate:n,onComplete:s,...r}=this.options,i=new qe({...r,keyframes:e});t.setWithVelocity(i.sample(this.time-10).value,i.sample(this.time).value,10)}this.cancel()}}complete(){this.resolved.animation.finish()}cancel(){this.resolved.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t;return Qe()&&n&&tn.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}}const nn=(t,e,s,r={},i,a)=>l=>{const u=L(r,t)||{},c=u.delay||r.delay||0;let{elapsed:h=0}=r;h-=E(c);let d={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:e.getVelocity(),...u,delay:-h,onUpdate:t=>{e.set(t),u.onUpdate&&u.onUpdate(t)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:t,motionValue:e,element:a?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})(u)||(d={...d,...I(t,d)}),d.duration&&(d.duration=E(d.duration)),d.repeatDelay&&(d.repeatDelay=E(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let p=!1;if(!1===d.type&&(d.duration=0,0===d.delay&&(p=!0)),(D||n)&&(p=!0,d.duration=0,d.delay=0),p&&!a&&void 0!==e.get()){const t=N(d.keyframes,u);if(void 0!==t)return void o.update(()=>{d.onUpdate(t),d.onComplete()})}return!a&&en.supports(d)?new en(d):new qe(d)},sn=t=>Boolean(t&&t.getVelocity);function rn(t){return Boolean(sn(t)&&t.add)}const on=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function an(t,e,n,s={},r={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,r)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,r)),e}function ln(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,v(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,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}(t,e);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const e in i){ln(t,e,on(i[e]))}}function cn({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function hn(t,e,{delay:n=0,transitionOverride:s,type:r}={}){var i;let{transition:a=t.getDefaultTransition(),transitionEnd:l,...u}=e;const c=t.getValue("willChange");s&&(a=s);const h=[],d=r&&t.animationState&&t.animationState.getState()[r];for(const e in u){const s=t.getValue(e,null!==(i=t.latestValues[e])&&void 0!==i?i:null),r=u[e];if(void 0===r||d&&cn(d,e))continue;const o={delay:n,elapsed:0,...L(a||{},e)};let l=!1;if(window.HandoffAppearAnimations){const n=t.getProps()[C];if(n){const t=window.HandoffAppearAnimations(n,e);null!==t&&(o.elapsed=t,l=!0)}}s.start(nn(e,s,r,t.shouldReduceMotion&&P.has(e)?{type:!1}:o,t,l));const p=s.animation;p&&(rn(c)&&(c.add(e),p.then(()=>c.remove(e))),h.push(p))}return l&&Promise.all(h).then(()=>{o.update(()=>{l&&un(t,l)})}),h}const dn={};function pn(t,{layout:e,layoutId:n}){return P.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!dn[t]||"opacity"===t)}function fn(t,e){const{style:n}=t,s={};for(const r in n)(sn(n[r])||e.style&&sn(e.style[r])||pn(r,t))&&(s[r]=n[r]);return s}const mn="undefined"!=typeof document,gn={current:null},vn={current:!1};function yn(t){return"string"==typeof t||Array.isArray(t)}const wn=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function bn(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||wn.some(e=>yn(t[e]));var e}const xn={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"]},Tn={};for(const t in xn)Tn[t]={isEnabled:e=>xn[t].some(t=>!!e[t])};const Vn=[...wt,Rt,Nt],Sn=Object.keys(Tn),Mn=Sn.length,An=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Pn=wn.length;class kn extends class{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:r,visualState:i},a={}){this.resolveKeyframes=(t,e,n,s)=>new this.KeyframeResolver(t,e,n,s,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=At,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.scheduleRender=()=>o.render(this.render,!1,!0);const{latestValues:l,renderState:u}=i;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(r),this.isControllingVariants=bn(e),this.isVariantNode=function(t){return Boolean(bn(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{});for(const t in h){const e=h[t];void 0!==l[t]&&sn(e)&&(e.set(l[t],!1),rn(c)&&c.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,x.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)),vn.current||function(){if(vn.current=!0,mn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>gn.current=t.matches;t.addListener(e),e()}else gn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||gn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){x.delete(this.current),this.projection&&this.projection.unmount(),a(this.notifyUpdate),a(this.render),this.valueSubscriptions.forEach(t=>t()),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=P.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&o.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),r()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,r){let i,o;for(let t=0;t<Mn;t++){const n=Sn[t],{isEnabled:s,Feature:r,ProjectionNode:a,MeasureLayout:l}=Tn[n];a&&(i=a),s(e)&&(!this.features[n]&&r&&(this.features[n]=new r(this)),l&&(o=l))}if(("html"===this.type||"svg"===this.type)&&!this.projection&&i){this.projection=new i(this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:o,layoutScroll:l,layoutRoot:u}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||o&&(a=o,a&&"object"==typeof a&&Object.prototype.hasOwnProperty.call(a,"current")),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}var a;return o}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,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<An.length;e++){const n=An[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){const{willChange:s}=e;for(const r in e){const i=e[r],o=n[r];if(sn(i))t.addValue(r,i),rn(s)&&s.add(r);else if(sn(o))t.addValue(r,v(i,{owner:t})),rn(s)&&s.remove(r);else if(o!==i)if(t.hasValue(r)){const e=t.getValue(r);!e.hasAnimated&&e.set(i)}else{const e=t.getStaticValue(r);t.addValue(r,v(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<Pn;t++){const n=wn[t],s=this.props[n];(yn(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(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=v(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&&(z(s)||j(s))?s=parseFloat(s):(r=s,!Vn.find(yt(r))&&Nt.test(e)&&(s=Xt(t,e))),this.setBaseTarget(t,sn(s)?s.get():s)),sn(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e,n;const{initial:s}=this.props,r="string"==typeof s||"object"==typeof s?null===(n=an(this.props,s,null===(e=this.presenceContext)||void 0===e?void 0:e.custom))||void 0===n?void 0:n[t]:void 0;if(s&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||sn(i)?void 0!==this.initialValues[t]&&void 0===r?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new h),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{constructor(){super(...arguments),this.KeyframeResolver=Zt}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 Cn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},En=A.length;const Fn=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function On(t,e,n,s){const{style:r,vars:i,transform:o,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const t in e){const n=e[t];if($(t)){i[t]=n;continue}const s=Ut[t],h=Fn(n,s);if(P.has(t)){if(l=!0,o[t]=h,!c)continue;n!==(s.default||0)&&(c=!1)}else t.startsWith("origin")?(u=!0,a[t]=h):r[t]=h}if(e.transform||(l||s?r.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,r){let i="";for(let e=0;e<En;e++){const n=A[e];if(void 0!==t[n]){i+=`${Cn[n]||n}(${t[n]}) `}}return e&&!t.z&&(i+="translateZ(0)"),i=i.trim(),r?i=r(t,s?"":i):n&&s&&(i="none"),i}(t.transform,n,c,s):r.transform&&(r.transform="none")),u){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;r.transformOrigin=`${t} ${e} ${n}`}}function Rn(t,e,n){return"string"==typeof t?t:at.transform(e+n*t)}const Bn={offset:"stroke-dashoffset",array:"stroke-dasharray"},In={offset:"strokeDashoffset",array:"strokeDasharray"};function Ln(t,{attrX:e,attrY:n,attrScale:s,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h,d){if(On(t,u,c,d),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:f,dimensions:m}=t;p.transform&&(m&&(f.transform=p.transform),delete p.transform),m&&(void 0!==r||void 0!==i||f.transform)&&(f.transformOrigin=function(t,e,n){return`${Rn(e,t.x,t.width)} ${Rn(n,t.y,t.height)}`}(m,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==e&&(p.x=e),void 0!==n&&(p.y=n),void 0!==s&&(p.scale=s),void 0!==o&&function(t,e,n=1,s=0,r=!0){t.pathLength=1;const i=r?Bn:In;t[i.offset]=at.transform(-s);const o=at.transform(e),a=at.transform(n);t[i.array]=`${o} ${a}`}(p,o,a,l,!1)}const Dn=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 Wn(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 Nn extends kn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(P.has(e)){const t=qt(e);return t&&t.default||0}return e=Dn.has(e)?e:k(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return function(t,e){const n=fn(t,e);for(const s in t)if(sn(t[s])||sn(e[s])){n[-1!==A.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return n}(t,e)}build(t,e,n,s){Ln(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Wn(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Dn.has(n)?n:k(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 jn extends kn{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,e){if(P.has(e)){const t=qt(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=($(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,s){On(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return fn(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;sn(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){Wn(t,e,n,s)}}function zn(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 Nn(e,{enableHardwareAcceleration:!1}):new jn(e,{enableHardwareAcceleration:!0});n.mount(t),x.set(t,n)}function Kn(t,e,n){const s=sn(t)?t:v(t);return s.start(nn("",s,e,n)),s.animation}function $n(t,e=100){const n=re({keyframes:[0,e],...t}),s=Math.min($e(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:F(s)}}function Hn(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 Un=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function Yn(t,e){return he(t)?t[Un(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&&(c(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:Yn(n,o)})}function Xn(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Zn(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Gn(t,e){return e[t]||(e[t]=[]),e[t]}function _n(t){return Array.isArray(t)?t:[t]}function Jn(t,e){return t[e]?{...t,...t[e]}:{...t}}const Qn=t=>"number"==typeof t,ts=t=>t.every(Qn);function es(t,e,n,s){const r=b(t,s),i=r.length,o=[];for(let t=0;t<i;t++){const s=r[t];x.has(s)||zn(s);const a=x.get(s),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,i)),o.push(...hn(a,{...e,transition:l},{}))}return new M(o)}function ns(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,Hn(c,i.at,u,l));continue}let[d,p,f={}]=i;void 0!==f.at&&(c=Hn(c,f.at,u,l));let m=0;const g=(t,n,s,i=0,o=0)=>{const a=_n(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){let t=100;if(2===y&&ts(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...p};void 0!==g&&(e.duration=E(g));const n=$n(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&&je(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(sn(d)){g(p,f,Gn("default",Zn(d,o)))}else{const t=b(d,s,a),e=t.length;for(let n=0;n<e;n++){p=p,f=f;const s=Zn(t[n],o);for(const t in p)g(p[t],Jn(f,t),Gn(t,s),n,e)}}u=c,c+=m}return o.forEach((t,s)=>{for(const r in t){const o=t[r];o.sort(Xn);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(Me(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=sn(n)?Kn(n,t.default,e.default):es(n,t,e),s.push(r)}),new M(s)}const ss=t=>function(e,n,s){let r;var i;return i=e,r=Array.isArray(i)&&Array.isArray(i[0])?ns(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?es(e,n,s,t):Kn(e,n,s),t&&t.animations.push(r),r},rs=ss(),is=new WeakMap;let os;function as({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=is.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 ls(t){t.forEach(as)}function us(t,e){os||"undefined"!=typeof ResizeObserver&&(os=new ResizeObserver(ls));const n=b(t);return n.forEach(t=>{let n=is.get(t);n||(n=new Set,is.set(t,n)),n.add(e),null==os||os.observe(t)}),()=>{n.forEach(t=>{const n=is.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==os||os.unobserve(t)})}}const cs=new Set;let hs;function ds(t){return cs.add(t),hs||(hs=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};cs.forEach(t=>t(e))},window.addEventListener("resize",hs)),()=>{cs.delete(t),!cs.size&&hs&&(hs=void 0)}}const ps={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function fs(t,e,n,s){const r=n[e],{length:i,position:o}=ps[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=Me(0,r.scrollLength,r.current);const u=s-l;r.velocity=u>50?0:d(r.current-a,u)}const ms={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},gs={start:0,center:.5,end:1};function vs(t,e,n=0){let s=0;if(void 0!==gs[t]&&(t=gs[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 ys=[0,0];function ws(t,e,n,s){let r=Array.isArray(t)?t:ys,i=0,o=0;return"number"==typeof t?r=[t,t]:"string"==typeof t&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,gs[t]?t:"0"]),i=vs(r[0],n,s),o=vs(r[1],e),i-o}const bs={x:0,y:0};function xs(t,e,n){const{offset:s=ms.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):bs,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=ws(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 Ts(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){fs(t,"x",e,n),fs(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&xs(t,n,s)},notify:()=>e(n)}}const Vs=new WeakMap,Ss=new WeakMap,Ms=new WeakMap,As=t=>t===document.documentElement?window:t;function Ps(t,{container:e=document.documentElement,...n}={}){let s=Ms.get(e);s||(s=new Set,Ms.set(e,s));const r=Ts(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(r),!Vs.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(l.timestamp)},r=()=>{for(const t of s)t.notify()},a=()=>{o.read(t,!1,!0),o.read(n,!1,!0),o.update(r,!1,!0)};Vs.set(e,a);const c=As(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Ss.set(e,(u=a,"function"==typeof(i=e)?ds(i):us(i,u))),c.addEventListener("scroll",a,{passive:!0})}var i,u;const c=Vs.get(e);return o.read(c,!1,!0),()=>{var t;a(c);const n=Ms.get(e);if(!n)return;if(n.delete(r),n.size)return;const s=Vs.get(e);Vs.delete(e),s&&(As(e).removeEventListener("scroll",s),null===(t=Ss.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const ks=new Map;function Cs({source:t=document.documentElement,axis:e="y"}={}){ks.has(t)||ks.set(t,{});const n=ks.get(t);return n[e]||(n[e]=S()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},s=Ps(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:s}}({source:t,axis:e})),n[e]}const Es={some:0,all:1};const Fs=(t,e)=>Math.abs(t-e);const Os=o,Rs=i.reduce((t,e)=>(t[e]=t=>a(t),t),{});t.MotionValue=g,t.animate=rs,t.anticipate=be,t.backIn=ye,t.backInOut=we,t.backOut=ve,t.cancelFrame=a,t.cancelSync=Rs,t.circIn=fe,t.circInOut=ge,t.circOut=me,t.clamp=Z,t.createScopedAnimate=ss,t.cubicBezier=ae,t.delay=function(t,e){const n=m.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(a(s),t(i-e))};return o.read(s,!0),()=>a(s)},t.distance=Fs,t.distance2D=function(t,e){const n=Fs(t.x,e.x),s=Fs(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=le,t.easeInOut=ce,t.easeOut=ue,t.frame=o,t.frameData=l,t.inView=function(t,e,{root:n,margin:s,amount:r="some"}={}){const i=b(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:Es[r]});return i.forEach(t=>a.observe(t)),()=>a.disconnect()},t.interpolate=Ne,t.invariant=w,t.mirrorEasing=de,t.mix=We,t.motionValue=v,t.pipe=Se,t.progress=Me,t.reverseEasing=pe,t.scroll=function(t,e){const n=Cs(e);return"function"==typeof t?T(t,n):t.attachTimeline(n)},t.scrollInfo=Ps,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=Te(s)(l/e)*e}return e+l}},t.steps=u,t.sync=Os,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=y,t.wrap=Un,Object.defineProperty(t,"__esModule",{value:!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,s=!1;class r{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const e=this.order.indexOf(t);-1!==e&&(this.order.splice(e,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}const i=["read","resolveKeyframes","update","preRender","render","postRender"];const{schedule:o,cancel:a,state:l,steps:u}=function(t,e){let n=!1,s=!0;const o={delta:0,timestamp:0,isProcessing:!1},a=i.reduce((t,e)=>(t[e]=function(t){let e=new r,n=new r,s=0,i=!1,o=!1;const a=new WeakSet,l={schedule:(t,r=!1,o=!1)=>{const l=o&&i,u=l?e:n;return r&&a.add(t),u.add(t)&&l&&i&&(s=e.order.length),t},cancel:t=>{n.remove(t),a.delete(t)},process:r=>{if(i)o=!0;else{if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let n=0;n<s;n++){const s=e.order[n];a.has(s)&&(l.schedule(s),t()),s(r)}i=!1,o&&(o=!1,l.process(r))}}};return l}(()=>n=!0),t),{}),l=t=>{a[t].process(o)},u=()=>{const r=performance.now();n=!1,o.delta=s?1e3/60:Math.max(Math.min(r-o.timestamp,40),1),o.timestamp=r,o.isProcessing=!0,i.forEach(l),o.isProcessing=!1,n&&e&&(s=!1,t(u))};return{schedule:i.reduce((e,r)=>{const i=a[r];return e[r]=(e,r=!1,a=!1)=>(n||(n=!0,s=!0,o.isProcessing||t(u)),i.schedule(e,r,a)),e},{}),cancel:t=>i.forEach(e=>a[e].cancel(t)),state:o,steps:a}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e,!0);function c(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class h{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>c(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let r=0;r<s;r++){const s=this.subscriptions[r];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function d(t,e){return e?t*(1e3/e):0}let p;function f(){p=void 0}const m={now:()=>(void 0===p&&m.set(l.isProcessing||s?l.timestamp:performance.now()),p),set:t=>{p=t,queueMicrotask(f)}};class g{constructor(t,e={}){var n;this.version="11.0.12",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=m.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.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=m.now()}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 h);const n=this.events[t].add(e);return"change"===t?()=>{n(),o.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=m.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return d(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 v(t,e){return new g(t,e)}let y=e,w=e;function b(t,e,n){var s;if("string"==typeof t){let r=document;e&&(w(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 x=new WeakMap;function T(t,e){let n;const s=()=>{const{currentTime:s}=e,r=(null===s?0:s.value)/100;n!==r&&t(r),n=r};return o.update(s,!0),()=>a(s)}function V(t){let e;return()=>(void 0===e&&(e=t()),e)}const S=V(()=>void 0!==window.ScrollTimeline);class M{constructor(t){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(),T(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 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")}stop(){this.runAll("stop")}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"],P=new Set(A),k=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),C="data-"+k("framerAppearId"),E=t=>1e3*t,F=t=>t/1e3,O={type:"spring",stiffness:500,damping:25,restSpeed:10},R={type:"keyframes",duration:.8},B={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},I=(t,{keyframes:e})=>e.length>2?R:P.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:O:B;function L(t,e){return t[e]||t.default||t}const D=!1,W=t=>null!==t;function N(t,{repeat:e,repeatType:n="loop"}){const s=t.filter(W);return s[e&&"loop"!==n&&e%2==1?0:s.length-1]}const j=t=>/^0[^.\s]+$/u.test(t);const z=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),K=t=>e=>"string"==typeof e&&e.startsWith(t),$=K("--"),H=K("var(--"),U=t=>!!H(t)&&Y.test(t.split("/*")[0].trim()),Y=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,q=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function X(t,e,n=1){const[s,r]=function(t){const e=q.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 z(t)?parseFloat(t):t}return U(r)?X(r,e,n+1):r}const Z=(t,e,n)=>n>e?e:n<t?t:n,G={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},_={...G,transform:t=>Z(0,1,t)},J={...G,default:1},Q=t=>Math.round(1e5*t)/1e5,tt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,et=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,nt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function st(t){return"string"==typeof t}const rt=t=>({test:e=>st(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),it=rt("deg"),ot=rt("%"),at=rt("px"),lt=rt("vh"),ut=rt("vw"),ct={...ot,parse:t=>ot.parse(t)/100,transform:t=>ot.transform(100*t)},ht=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),dt=t=>t===G||t===at,pt=(t,e)=>parseFloat(t.split(", ")[e]),ft=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const r=s.match(/^matrix3d\((.+)\)$/u);if(r)return pt(r[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?pt(e[1],t):0}},mt=new Set(["x","y","z"]),gt=A.filter(t=>!mt.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:ft(4,13),y:ft(5,14)};vt.translateX=vt.x,vt.translateY=vt.y;const yt=t=>e=>e.test(t),wt=[G,at,ot,it,ut,lt,{test:t=>"auto"===t,parse:t=>t}],bt=t=>wt.find(yt(t)),xt=new Set;let Tt=!1,Vt=!1;function St(){Vt&&(xt.forEach(t=>{t.needsMeasurement&&t.unsetTransforms()}),xt.forEach(t=>{t.needsMeasurement&&t.measureInitialState()}),xt.forEach(t=>{t.needsMeasurement&&t.renderEndStyles()}),xt.forEach(t=>{t.needsMeasurement&&t.measureEndState()})),Vt=!1,Tt=!1,xt.forEach(t=>t.complete()),xt.clear()}function Mt(){xt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Vt=!0)}),o.resolveKeyframes(St)}class At{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?(xt.add(this),Tt||(Tt=!0,o.read(Mt))):(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]}unsetTransforms(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes),xt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,xt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Pt=(t,e)=>n=>Boolean(st(n)&&nt.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),kt=(t,e,n)=>s=>{if(!st(s))return s;const[r,i,o,a]=s.match(tt);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Ct={...G,transform:t=>Math.round((t=>Z(0,255,t))(t))},Et={test:Pt("rgb","red"),parse:kt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Ct.transform(t)+", "+Ct.transform(e)+", "+Ct.transform(n)+", "+Q(_.transform(s))+")"};const Ft={test:Pt("#"),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:Et.transform},Ot={test:Pt("hsl","hue"),parse:kt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ot.transform(Q(e))+", "+ot.transform(Q(n))+", "+Q(_.transform(s))+")"},Rt={test:t=>Et.test(t)||Ft.test(t)||Ot.test(t),parse:t=>Et.test(t)?Et.parse(t):Ot.test(t)?Ot.parse(t):Ft.parse(t),transform:t=>st(t)?t:t.hasOwnProperty("red")?Et.transform(t):Ot.transform(t)};const Bt=/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 It(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(Bt,t=>(Rt.test(t)?(s.color.push(i),r.push("color"),n.push(Rt.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 Lt(t){return It(t).values}function Dt(t){const{split:e,types:n}=It(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?Q(t[i]):"color"===e?Rt.transform(t[i]):t[i]}return r}}const Wt=t=>"number"==typeof t?0:t;const Nt={test:function(t){var e,n;return isNaN(t)&&st(t)&&((null===(e=t.match(tt))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(et))||void 0===n?void 0:n.length)||0)>0},parse:Lt,createTransformer:Dt,getAnimatableNone:function(t){const e=Lt(t);return Dt(t)(e.map(Wt))}},jt=new Set(["brightness","contrast","saturate","opacity"]);function zt(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(tt)||[];if(!s)return t;const r=n.replace(s,"");let i=jt.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const Kt=/\b([a-z-]*)\(.*?\)/gu,$t={...Nt,getAnimatableNone:t=>{const e=t.match(Kt);return e?e.map(zt).join(" "):t}},Ht={...G,transform:Math.round},Ut={borderWidth:at,borderTopWidth:at,borderRightWidth:at,borderBottomWidth:at,borderLeftWidth:at,borderRadius:at,radius:at,borderTopLeftRadius:at,borderTopRightRadius:at,borderBottomRightRadius:at,borderBottomLeftRadius:at,width:at,maxWidth:at,height:at,maxHeight:at,size:at,top:at,right:at,bottom:at,left:at,padding:at,paddingTop:at,paddingRight:at,paddingBottom:at,paddingLeft:at,margin:at,marginTop:at,marginRight:at,marginBottom:at,marginLeft:at,rotate:it,rotateX:it,rotateY:it,rotateZ:it,scale:J,scaleX:J,scaleY:J,scaleZ:J,skew:it,skewX:it,skewY:it,distance:at,translateX:at,translateY:at,translateZ:at,x:at,y:at,z:at,perspective:at,transformPerspective:at,opacity:_,originX:ct,originY:ct,originZ:at,zIndex:Ht,fillOpacity:_,strokeOpacity:_,numOctaves:Ht},Yt={...Ut,color:Rt,backgroundColor:Rt,outlineColor:Rt,fill:Rt,stroke:Rt,borderColor:Rt,borderTopColor:Rt,borderRightColor:Rt,borderBottomColor:Rt,borderLeftColor:Rt,filter:$t,WebkitFilter:$t},qt=t=>Yt[t];function Xt(t,e){let n=qt(t);return n!==$t&&(n=Nt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}class Zt extends At{constructor(t,e,n,s){super(t,e,n,s,null==s?void 0:s.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e.current)return;const s=[];super.readKeyframes();for(let n=0;n<t.length;n++){const i=t[n];if("string"==typeof i&&U(i)){const s=X(i,e.current);void 0!==s&&(t[n]=s)}("number"==typeof(r=t[n])?0===r:null===r||"none"===r||"0"===r||j(r))&&s.push(n)}var r;if(s.length&&function(t,e,n){let s=0,r=void 0;for(;s<t.length&&!r;)"string"==typeof t[s]&&"none"!==t[s]&&"0"!==t[s]&&(r=t[s]),s++;if(r&&n)for(const s of e)t[s]=Xt(n,r)}(t,s,n),!ht.has(n)||2!==t.length)return;const[i,o]=t,a=bt(i),l=bt(o);if(a&&l&&a!==l)if(dt(a)&&dt(l))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}unsetTransforms(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t.current)return;this.removedTransforms=function(t){const e=[];return gt.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t);const s=n[n.length-1];t.getValue(e,s).jump(s,!1)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;t.current&&("height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=vt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin)}renderEndStyles(){this.element.render()}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1),s[s.length-1]=vt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),"height"===n&&void 0!==this.suspendedScrollY&&window.scrollTo(0,this.suspendedScrollY),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)})}}const Gt=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Nt.test(t)&&"0"!==t||t.startsWith("url(")));class _t{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",...o}){this.isStopped=!1,this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:r,repeatType:i,...o},this.updateFinishedPromise()}get resolved(){return this._resolved||(Mt(),St(),a(Mt),a(St)),this._resolved}onKeyframesResolved(t){const{name:e,type:n,velocity:s,delay:r,onComplete:i,onUpdate:o}=this.options;if(!function(t,e,n,s){const r=t[0];if(null===r)return!1;const i=t[t.length-1],o=Gt(r,e),a=Gt(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&&s)}(t,e,n,s)){if(!r){const e=N(t,this.options);return null==o||o(e),null==i||i(),this.resolveFinishedPromise(),void this.updateFinishedPromise()}this.options.duration=0}this._resolved={keyframes:t,...this.initPlayback(t)},this.onPostResolved()}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=()=>{t(),this.updateFinishedPromise()}})}}function Jt(t,e,n){const s=Math.max(e-5,0);return d(n-t(s),e-s)}function Qt({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let r,i;y(t<=E(10));let o=1-e;o=Z(.05,1,o),t=Z(.01,10,F(t)),o<1?(r=e=>{const s=e*o,r=s*t;return.001-(s-n)/te(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=te(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=E(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 te(t,e){return t*Math.sqrt(1-e*e)}const ee=["duration","bounce"],ne=["stiffness","damping","mass"];function se(t,e){return e.some(e=>void 0!==t[e])}function re({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(!se(t,ne)&&se(t,ee)){const n=Qt(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...s,velocity:-F(s.velocity||0)}),p=h||0,f=l/(2*Math.sqrt(a*u)),m=i-r,g=F(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=te(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=p;0!==t&&(r=f<1?Jt(y,t,s):0);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 ie({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=re({keyframes:[d.value,p(d.value)],velocity:Jt(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 oe=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ae(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=oe(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:oe(i(t),n,r)}const le=ae(.42,0,1,1),ue=ae(0,0,.58,1),ce=ae(.42,0,.58,1),he=t=>Array.isArray(t)&&"number"!=typeof t[0],de=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,pe=t=>e=>1-t(1-e),fe=t=>1-Math.sin(Math.acos(t)),me=pe(fe),ge=de(fe),ve=ae(.33,1.53,.69,.99),ye=pe(ve),we=de(ye),be=t=>(t*=2)<1?.5*ye(t):.5*(2-Math.pow(2,-10*(t-1))),xe={linear:e,easeIn:le,easeInOut:ce,easeOut:ue,circIn:fe,circInOut:ge,circOut:me,backIn:ye,backInOut:we,backOut:ve,anticipate:be},Te=t=>{if(Array.isArray(t)){w(4===t.length);const[e,n,s,r]=t;return ae(e,n,s,r)}return"string"==typeof t?xe[t]:t},Ve=(t,e)=>n=>e(t(n)),Se=(...t)=>t.reduce(Ve),Me=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},Ae=(t,e,n)=>t+(e-t)*n;function Pe(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}const ke=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},Ce=[Ft,Et,Ot];function Ee(t){const e=(n=t,Ce.find(t=>t.test(n)));var n;let s=e.parse(t);return e===Ot&&(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=Pe(a,s,t+1/3),i=Pe(a,s,t),o=Pe(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 Fe=(t,e)=>{const n=Ee(t),s=Ee(e),r={...n};return t=>(r.red=ke(n.red,s.red,t),r.green=ke(n.green,s.green,t),r.blue=ke(n.blue,s.blue,t),r.alpha=Ae(n.alpha,s.alpha,t),Et.transform(r))};function Oe(t,e){return n=>n>0?e:t}function Re(t,e){return n=>Ae(t,e,n)}function Be(t){return"number"==typeof t?Re:"string"==typeof t?U(t)?Oe:Rt.test(t)?Fe:De:Array.isArray(t)?Ie:"object"==typeof t?Rt.test(t)?Fe:Le:Oe}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 Le(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=Nt.createTransformer(e),s=It(t),r=It(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?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):Oe(t,e)};function We(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(w(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||We,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=Me(t[n],t[n+1],e);return a[n](s)};return s?e=>u(Z(t[0],t[o-1],e)):u}function je(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=Me(0,e,s);t.push(Ae(n,1,r))}}function ze(t){const e=[0];return je(e,t.length-1),e}function Ke({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=he(s)?s.map(Te):Te(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||ce).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:()=>o.update(e,!0),stop:()=>a(e),now:()=>l.isProcessing?l.timestamp:m.now()}},Ue={decay:ie,inertia:ie,tween:Ke,keyframes:Ke,spring:re},Ye=t=>t/100;class qe extends _t{constructor({KeyframeResolver:t=At,...e}){super(e),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle";const{name:n,motionValue:s,keyframes:r}=this.options,i=t=>this.onKeyframesResolved(t);n&&s&&s.owner?this.resolver=s.owner.resolveKeyframes(r,i,n,s):this.resolver=new t(r,i,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=Ue[e]||Ke;let a,l;o!==Ke&&"number"!=typeof t[0]&&(a=Se(Ye,We(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{generator:n,mirroredGenerator:s,mapPercentToKeyframes:r,keyframes:i,calculatedDuration:o,totalDuration:a,resolvedDuration:l}=this.resolved;if(null===this.startTime)return n.next(0);const{delay:u,repeat:c,repeatType:h,repeatDelay:d,onUpdate:p}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/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 f=this.currentTime-u*(this.speed>=0?1:-1),m=this.speed>=0?f<0:f>a;this.currentTime=Math.max(f,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=a);let g=this.currentTime,v=n;if(c){const t=Math.min(this.currentTime,a)/l;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/l)):"mirror"===h&&(v=s)),g=Z(0,1,n)*l}const y=m?{done:!1,value:i[0]}:v.next(g);r&&(y.value=r(y.value));let{done:w}=y;m||null===o||(w=this.speed>=0?this.currentTime>=a:this.currentTime<=0);const b=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return p&&p(y.value),b&&this.finish(),y}get duration(){return F(this.resolved.calculatedDuration)}get time(){return F(this.currentTime)}set time(t){t=E(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=F(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}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=n),"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"}stop(){if(this.isStopped=!0,"idle"===this.state)return;this.state="idle";const{onStop:t}=this.options;t&&t(),this.teardown()}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()}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=t=>Array.isArray(t)&&"number"==typeof t[0];function Ze(t){return Boolean(!t||"string"==typeof t&&_e[t]||Xe(t)||Array.isArray(t)&&t.every(Ze))}const Ge=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,_e={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ge([0,.65,.55,1]),circOut:Ge([.55,0,1,.45]),backIn:Ge([.31,.01,.66,-.59]),backOut:Ge([.33,1.53,.69,.99])};function Je(t){if(t)return Xe(t)?Ge(t):Array.isArray(t)?t.map(Je):_e[t]}const Qe=V(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),tn=new Set(["opacity","clipPath","filter","transform"]);class en extends _t{constructor(t){super(t);const{name:e,motionValue:n,keyframes:s}=this.options;this.resolver=new Zt(s,t=>this.onKeyframesResolved(t),e,n),this.resolver.scheduleResolve()}initPlayback(t){let e=this.options.duration||300;if("spring"===(n=this.options).type||"backgroundColor"===n.name||!Ze(n.ease)){const{onComplete:n,onUpdate:s,motionValue:r,...i}=this.options,o=function(t,e){const n=new qe({...e,keyframes:t,repeat:0,delay: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,i);t=o.keyframes,e=o.duration,this.options.times=o.times,this.options.ease=o.ease}var n;const{motionValue:s,name:r}=this.options,i=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=Je(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"})}(s.owner.current,r,t,{...this.options,duration:e});return i.startTime=m.now(),this.pendingTimeline?(i.timeline=this.pendingTimeline,this.pendingTimeline=void 0):i.onfinish=()=>{const{onComplete:e}=this.options;s.set(N(t,this.options)),e&&e(),this.cancel(),this.resolveFinishedPromise(),this.updateFinishedPromise()},{animation:i,duration:e,keyframes:t}}get duration(){const{duration:t}=this.resolved;return F(t)}get time(){const{animation:t}=this.resolved;return F(t.currentTime||0)}set time(t){const{animation:e}=this.resolved;e.currentTime=E(t)}get speed(){const{animation:t}=this.resolved;return t.playbackRate}set speed(t){const{animation:e}=this.resolved;e.playbackRate=t}get state(){const{animation:t}=this.resolved;return t.playState}attachTimeline(t){if(this._resolved){const{animation:e}=this.resolved;e.timeline=t,e.onfinish=null}else this.pendingTimeline=t;return e}play(){if(this.isStopped)return;const{animation:t}=this.resolved;t.play()}pause(){const{animation:t}=this.resolved;t.pause()}stop(){this.isStopped=!0;const{animation:t,keyframes:e}=this.resolved;if("idle"!==t.playState&&"finished"!==t.playState){if(this.time){const{motionValue:t,onUpdate:n,onComplete:s,...r}=this.options,i=new qe({...r,keyframes:e});t.setWithVelocity(i.sample(this.time-10).value,i.sample(this.time).value,10)}this.cancel()}}complete(){this.resolved.animation.finish()}cancel(){this.resolved.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t;return Qe()&&n&&tn.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}}const nn=(t,e,s,r={},i,a)=>l=>{const u=L(r,t)||{},c=u.delay||r.delay||0;let{elapsed:h=0}=r;h-=E(c);let d={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:e.getVelocity(),...u,delay:-h,onUpdate:t=>{e.set(t),u.onUpdate&&u.onUpdate(t)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:t,motionValue:e,element:a?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})(u)||(d={...d,...I(t,d)}),d.duration&&(d.duration=E(d.duration)),d.repeatDelay&&(d.repeatDelay=E(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let p=!1;if(!1===d.type&&(d.duration=0,0===d.delay&&(p=!0)),(D||n)&&(p=!0,d.duration=0,d.delay=0),p&&!a&&void 0!==e.get()){const t=N(d.keyframes,u);if(void 0!==t)return void o.update(()=>{d.onUpdate(t),d.onComplete()})}return!a&&en.supports(d)?new en(d):new qe(d)},sn=t=>Boolean(t&&t.getVelocity);function rn(t){return Boolean(sn(t)&&t.add)}const on=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function an(t,e,n,s={},r={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,r)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,r)),e}function ln(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,v(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,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}(t,e);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const e in i){ln(t,e,on(i[e]))}}function cn({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function hn(t,e,{delay:n=0,transitionOverride:s,type:r}={}){var i;let{transition:a=t.getDefaultTransition(),transitionEnd:l,...u}=e;const c=t.getValue("willChange");s&&(a=s);const h=[],d=r&&t.animationState&&t.animationState.getState()[r];for(const e in u){const s=t.getValue(e,null!==(i=t.latestValues[e])&&void 0!==i?i:null),r=u[e];if(void 0===r||d&&cn(d,e))continue;const o={delay:n,elapsed:0,...L(a||{},e)};let l=!1;if(window.HandoffAppearAnimations){const n=t.getProps()[C];if(n){const t=window.HandoffAppearAnimations(n,e);null!==t&&(o.elapsed=t,l=!0)}}s.start(nn(e,s,r,t.shouldReduceMotion&&P.has(e)?{type:!1}:o,t,l));const p=s.animation;p&&(rn(c)&&(c.add(e),p.then(()=>c.remove(e))),h.push(p))}return l&&Promise.all(h).then(()=>{o.update(()=>{l&&un(t,l)})}),h}const dn={};function pn(t,{layout:e,layoutId:n}){return P.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!dn[t]||"opacity"===t)}function fn(t,e){const{style:n}=t,s={};for(const r in n)(sn(n[r])||e.style&&sn(e.style[r])||pn(r,t))&&(s[r]=n[r]);return s}const mn="undefined"!=typeof document,gn={current:null},vn={current:!1};function yn(t){return"string"==typeof t||Array.isArray(t)}const wn=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function bn(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||wn.some(e=>yn(t[e]));var e}const xn={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"]},Tn={};for(const t in xn)Tn[t]={isEnabled:e=>xn[t].some(t=>!!e[t])};const Vn=[...wt,Rt,Nt],Sn=Object.keys(Tn),Mn=Sn.length,An=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Pn=wn.length;class kn extends class{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:r,visualState:i},a={}){this.resolveKeyframes=(t,e,n,s)=>new this.KeyframeResolver(t,e,n,s,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=At,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.scheduleRender=()=>o.render(this.render,!1,!0);const{latestValues:l,renderState:u}=i;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(r),this.isControllingVariants=bn(e),this.isVariantNode=function(t){return Boolean(bn(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{});for(const t in h){const e=h[t];void 0!==l[t]&&sn(e)&&(e.set(l[t],!1),rn(c)&&c.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,x.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)),vn.current||function(){if(vn.current=!0,mn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>gn.current=t.matches;t.addListener(e),e()}else gn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||gn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){x.delete(this.current),this.projection&&this.projection.unmount(),a(this.notifyUpdate),a(this.render),this.valueSubscriptions.forEach(t=>t()),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=P.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&o.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),r()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,r){let i,o;for(let t=0;t<Mn;t++){const n=Sn[t],{isEnabled:s,Feature:r,ProjectionNode:a,MeasureLayout:l}=Tn[n];a&&(i=a),s(e)&&(!this.features[n]&&r&&(this.features[n]=new r(this)),l&&(o=l))}if(("html"===this.type||"svg"===this.type)&&!this.projection&&i){this.projection=new i(this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:o,layoutScroll:l,layoutRoot:u}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||o&&(a=o,a&&"object"==typeof a&&Object.prototype.hasOwnProperty.call(a,"current")),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}var a;return o}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,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<An.length;e++){const n=An[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){const{willChange:s}=e;for(const r in e){const i=e[r],o=n[r];if(sn(i))t.addValue(r,i),rn(s)&&s.add(r);else if(sn(o))t.addValue(r,v(i,{owner:t})),rn(s)&&s.remove(r);else if(o!==i)if(t.hasValue(r)){const e=t.getValue(r);!e.hasAnimated&&e.set(i)}else{const e=t.getStaticValue(r);t.addValue(r,v(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<Pn;t++){const n=wn[t],s=this.props[n];(yn(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(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=v(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&&(z(s)||j(s))?s=parseFloat(s):(r=s,!Vn.find(yt(r))&&Nt.test(e)&&(s=Xt(t,e))),this.setBaseTarget(t,sn(s)?s.get():s)),sn(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e,n;const{initial:s}=this.props,r="string"==typeof s||"object"==typeof s?null===(n=an(this.props,s,null===(e=this.presenceContext)||void 0===e?void 0:e.custom))||void 0===n?void 0:n[t]:void 0;if(s&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||sn(i)?void 0!==this.initialValues[t]&&void 0===r?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new h),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}{constructor(){super(...arguments),this.KeyframeResolver=Zt}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 Cn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},En=A.length;const Fn=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function On(t,e,n,s){const{style:r,vars:i,transform:o,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const t in e){const n=e[t];if($(t)){i[t]=n;continue}const s=Ut[t],h=Fn(n,s);if(P.has(t)){if(l=!0,o[t]=h,!c)continue;n!==(s.default||0)&&(c=!1)}else t.startsWith("origin")?(u=!0,a[t]=h):r[t]=h}if(e.transform||(l||s?r.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,r){let i="";for(let e=0;e<En;e++){const n=A[e];if(void 0!==t[n]){i+=`${Cn[n]||n}(${t[n]}) `}}return e&&!t.z&&(i+="translateZ(0)"),i=i.trim(),r?i=r(t,s?"":i):n&&s&&(i="none"),i}(t.transform,n,c,s):r.transform&&(r.transform="none")),u){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;r.transformOrigin=`${t} ${e} ${n}`}}function Rn(t,e,n){return"string"==typeof t?t:at.transform(e+n*t)}const Bn={offset:"stroke-dashoffset",array:"stroke-dasharray"},In={offset:"strokeDashoffset",array:"strokeDasharray"};function Ln(t,{attrX:e,attrY:n,attrScale:s,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h,d){if(On(t,u,c,d),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:f,dimensions:m}=t;p.transform&&(m&&(f.transform=p.transform),delete p.transform),m&&(void 0!==r||void 0!==i||f.transform)&&(f.transformOrigin=function(t,e,n){return`${Rn(e,t.x,t.width)} ${Rn(n,t.y,t.height)}`}(m,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==e&&(p.x=e),void 0!==n&&(p.y=n),void 0!==s&&(p.scale=s),void 0!==o&&function(t,e,n=1,s=0,r=!0){t.pathLength=1;const i=r?Bn:In;t[i.offset]=at.transform(-s);const o=at.transform(e),a=at.transform(n);t[i.array]=`${o} ${a}`}(p,o,a,l,!1)}const Dn=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 Wn(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 Nn extends kn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(P.has(e)){const t=qt(e);return t&&t.default||0}return e=Dn.has(e)?e:k(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return function(t,e){const n=fn(t,e);for(const s in t)if(sn(t[s])||sn(e[s])){n[-1!==A.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return n}(t,e)}build(t,e,n,s){Ln(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Wn(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Dn.has(n)?n:k(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 jn extends kn{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,e){if(P.has(e)){const t=qt(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),r=($(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,s){On(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return fn(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;sn(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){Wn(t,e,n,s)}}function zn(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 Nn(e,{enableHardwareAcceleration:!1}):new jn(e,{enableHardwareAcceleration:!0});n.mount(t),x.set(t,n)}function Kn(t,e,n){const s=sn(t)?t:v(t);return s.start(nn("",s,e,n)),s.animation}function $n(t,e=100){const n=re({keyframes:[0,e],...t}),s=Math.min($e(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:F(s)}}function Hn(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 Un=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function Yn(t,e){return he(t)?t[Un(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&&(c(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:Yn(n,o)})}function Xn(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Zn(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Gn(t,e){return e[t]||(e[t]=[]),e[t]}function _n(t){return Array.isArray(t)?t:[t]}function Jn(t,e){return t[e]?{...t,...t[e]}:{...t}}const Qn=t=>"number"==typeof t,ts=t=>t.every(Qn);function es(t,e,n,s){const r=b(t,s),i=r.length,o=[];for(let t=0;t<i;t++){const s=r[t];x.has(s)||zn(s);const a=x.get(s),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,i)),o.push(...hn(a,{...e,transition:l},{}))}return new M(o)}function ns(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,Hn(c,i.at,u,l));continue}let[d,p,f={}]=i;void 0!==f.at&&(c=Hn(c,f.at,u,l));let m=0;const g=(t,n,s,i=0,o=0)=>{const a=_n(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){let t=100;if(2===y&&ts(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...p};void 0!==g&&(e.duration=E(g));const n=$n(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&&je(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(sn(d)){g(p,f,Gn("default",Zn(d,o)))}else{const t=b(d,s,a),e=t.length;for(let n=0;n<e;n++){p=p,f=f;const s=Zn(t[n],o);for(const t in p)g(p[t],Jn(f,t),Gn(t,s),n,e)}}u=c,c+=m}return o.forEach((t,s)=>{for(const r in t){const o=t[r];o.sort(Xn);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(Me(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=sn(n)?Kn(n,t.default,e.default):es(n,t,e),s.push(r)}),new M(s)}const ss=t=>function(e,n,s){let r;var i;return i=e,r=Array.isArray(i)&&Array.isArray(i[0])?ns(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?es(e,n,s,t):Kn(e,n,s),t&&t.animations.push(r),r},rs=ss(),is=new WeakMap;let os;function as({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=is.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 ls(t){t.forEach(as)}function us(t,e){os||"undefined"!=typeof ResizeObserver&&(os=new ResizeObserver(ls));const n=b(t);return n.forEach(t=>{let n=is.get(t);n||(n=new Set,is.set(t,n)),n.add(e),null==os||os.observe(t)}),()=>{n.forEach(t=>{const n=is.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==os||os.unobserve(t)})}}const cs=new Set;let hs;function ds(t){return cs.add(t),hs||(hs=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};cs.forEach(t=>t(e))},window.addEventListener("resize",hs)),()=>{cs.delete(t),!cs.size&&hs&&(hs=void 0)}}const ps={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function fs(t,e,n,s){const r=n[e],{length:i,position:o}=ps[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=Me(0,r.scrollLength,r.current);const u=s-l;r.velocity=u>50?0:d(r.current-a,u)}const ms={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},gs={start:0,center:.5,end:1};function vs(t,e,n=0){let s=0;if(void 0!==gs[t]&&(t=gs[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 ys=[0,0];function ws(t,e,n,s){let r=Array.isArray(t)?t:ys,i=0,o=0;return"number"==typeof t?r=[t,t]:"string"==typeof t&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,gs[t]?t:"0"]),i=vs(r[0],n,s),o=vs(r[1],e),i-o}const bs={x:0,y:0};function xs(t,e,n){const{offset:s=ms.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):bs,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=ws(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 Ts(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){fs(t,"x",e,n),fs(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&xs(t,n,s)},notify:()=>e(n)}}const Vs=new WeakMap,Ss=new WeakMap,Ms=new WeakMap,As=t=>t===document.documentElement?window:t;function Ps(t,{container:e=document.documentElement,...n}={}){let s=Ms.get(e);s||(s=new Set,Ms.set(e,s));const r=Ts(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(r),!Vs.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(l.timestamp)},r=()=>{for(const t of s)t.notify()},a=()=>{o.read(t,!1,!0),o.read(n,!1,!0),o.update(r,!1,!0)};Vs.set(e,a);const c=As(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Ss.set(e,(u=a,"function"==typeof(i=e)?ds(i):us(i,u))),c.addEventListener("scroll",a,{passive:!0})}var i,u;const c=Vs.get(e);return o.read(c,!1,!0),()=>{var t;a(c);const n=Ms.get(e);if(!n)return;if(n.delete(r),n.size)return;const s=Vs.get(e);Vs.delete(e),s&&(As(e).removeEventListener("scroll",s),null===(t=Ss.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const ks=new Map;function Cs({source:t=document.documentElement,axis:e="y"}={}){ks.has(t)||ks.set(t,{});const n=ks.get(t);return n[e]||(n[e]=S()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},s=Ps(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:s}}({source:t,axis:e})),n[e]}const Es={some:0,all:1};const Fs=(t,e)=>Math.abs(t-e);const Os=o,Rs=i.reduce((t,e)=>(t[e]=t=>a(t),t),{});t.MotionValue=g,t.animate=rs,t.anticipate=be,t.backIn=ye,t.backInOut=we,t.backOut=ve,t.cancelFrame=a,t.cancelSync=Rs,t.circIn=fe,t.circInOut=ge,t.circOut=me,t.clamp=Z,t.createScopedAnimate=ss,t.cubicBezier=ae,t.delay=function(t,e){const n=m.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(a(s),t(i-e))};return o.read(s,!0),()=>a(s)},t.distance=Fs,t.distance2D=function(t,e){const n=Fs(t.x,e.x),s=Fs(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=le,t.easeInOut=ce,t.easeOut=ue,t.frame=o,t.frameData=l,t.inView=function(t,e,{root:n,margin:s,amount:r="some"}={}){const i=b(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:Es[r]});return i.forEach(t=>a.observe(t)),()=>a.disconnect()},t.interpolate=Ne,t.invariant=w,t.mirrorEasing=de,t.mix=We,t.motionValue=v,t.pipe=Se,t.progress=Me,t.reverseEasing=pe,t.scroll=function(t,e){const n=Cs(e);return"function"==typeof t?T(t,n):t.attachTimeline(n)},t.scrollInfo=Ps,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=Te(s)(l/e)*e}return e+l}},t.steps=u,t.sync=Os,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=y,t.wrap=Un,Object.defineProperty(t,"__esModule",{value:!0})}));
@@ -22,7 +22,7 @@ function updateMotionValuesFromProps(element, next, prev) {
22
22
  * and warn against mismatches.
23
23
  */
24
24
  if (process.env.NODE_ENV === "development") {
25
- warnOnce(nextValue.version === "11.0.11", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.0.11 may not work as expected.`);
25
+ warnOnce(nextValue.version === "11.0.12", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.0.12 may not work as expected.`);
26
26
  }
27
27
  }
28
28
  else if (isMotionValue(prevValue)) {
@@ -34,7 +34,7 @@ class MotionValue {
34
34
  * This will be replaced by the build step with the latest version number.
35
35
  * When MotionValues are provided to motion components, warn if versions are mixed.
36
36
  */
37
- this.version = "11.0.11";
37
+ this.version = "11.0.12";
38
38
  /**
39
39
  * Tracks whether this value can output a velocity. Currently this is only true
40
40
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -4438,7 +4438,7 @@
4438
4438
  * This will be replaced by the build step with the latest version number.
4439
4439
  * When MotionValues are provided to motion components, warn if versions are mixed.
4440
4440
  */
4441
- this.version = "11.0.11";
4441
+ this.version = "11.0.12";
4442
4442
  /**
4443
4443
  * Tracks whether this value can output a velocity. Currently this is only true
4444
4444
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -6875,7 +6875,7 @@
6875
6875
  * and warn against mismatches.
6876
6876
  */
6877
6877
  {
6878
- warnOnce(nextValue.version === "11.0.11", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.0.11 may not work as expected.`);
6878
+ warnOnce(nextValue.version === "11.0.12", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.0.12 may not work as expected.`);
6879
6879
  }
6880
6880
  }
6881
6881
  else if (isMotionValue(prevValue)) {
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function s(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=s(e),o=n(e);const r=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),a=e.createContext({}),l=e.createContext(null),u="undefined"!=typeof document,c=u?e.useLayoutEffect:e.useEffect,h=e.createContext({strict:!1}),d=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),m="data-"+d("framerAppearId"),p={skipAnimations:!1,useManualTiming:!1};class f{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const e=this.order.indexOf(t);-1!==e&&(this.order.splice(e,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}const g=["read","resolveKeyframes","update","preRender","render","postRender"];function y(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=g.reduce((t,e)=>(t[e]=function(t){let e=new f,n=new f,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(t,o=!1,a=!1)=>{const l=a&&i,u=l?e:n;return o&&r.add(t),u.add(t)&&l&&i&&(s=e.order.length),t},cancel:t=>{n.remove(t),r.delete(t)},process:l=>{if(i)o=!0;else{if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let n=0;n<s;n++){const s=e.order[n];r.has(s)&&(a.schedule(s),t()),s(l)}i=!1,o&&(o=!1,a.process(l))}}};return a}(()=>n=!0),t),{}),r=t=>{o[t].process(i)},a=()=>{const o=p.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(o-i.timestamp,40),1),i.timestamp=o,i.isProcessing=!0,g.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))};return{schedule:g.reduce((e,r)=>{const l=o[r];return e[r]=(e,o=!1,r=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(a)),l.schedule(e,o,r)),e},{}),cancel:t=>g.forEach(e=>o[e].cancel(t)),state:i,steps:o}}const{schedule:v,cancel:x}=y(queueMicrotask,!1);function P(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function w(t){return"string"==typeof t||Array.isArray(t)}function T(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const S=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],b=["initial",...S];function E(t){return T(t.animate)||b.some(e=>w(t[e]))}function A(t){return Boolean(E(t)||t.variants)}function C(t){const{initial:n,animate:s}=function(t,e){if(E(t)){const{initial:e,animate:n}=t;return{initial:!1===e||w(e)?e:void 0,animate:w(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(a));return e.useMemo(()=>({initial:n,animate:s}),[V(n),V(s)])}function V(t){return Array.isArray(t)?t.join(" "):t}const M={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"]},R={};for(const t in M)R[t]={isEnabled:e=>M[t].some(t=>!!e[t])};function D(t){for(const e in t)R[e]={...R[e],...t[e]}}const L=e.createContext({}),k=e.createContext({}),B=Symbol.for("motionComponentSymbol");function F({preloadedFeatures:t,createVisualElement:n,useRender:s,useVisualState:o,Component:d}){t&&D(t);const p=e.forwardRef((function(p,f){let g;const y={...e.useContext(r),...p,layoutId:j(p)},{isStatic:x}=y,w=C(p),T=o(p,x);if(!x&&u){w.visualElement=function(t,n,s,i){const{visualElement:o}=e.useContext(a),u=e.useContext(h),d=e.useContext(l),p=e.useContext(r).reducedMotion,f=e.useRef();i=i||u.renderer,!f.current&&i&&(f.current=i(t,{visualState:n,parent:o,props:s,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:p}));const g=f.current;e.useInsertionEffect(()=>{g&&g.update(s,d)});const y=e.useRef(Boolean(s[m]&&!window.HandoffComplete));return c(()=>{g&&(v.postRender(g.render),y.current&&g.animationState&&g.animationState.animateChanges())}),e.useEffect(()=>{g&&(g.updateFeatures(),!y.current&&g.animationState&&g.animationState.animateChanges(),y.current&&(y.current=!1,window.HandoffComplete=!0))}),g}(d,T,y,n);const s=e.useContext(k),i=e.useContext(h).strict;w.visualElement&&(g=w.visualElement.loadFeatures(y,i,t,s))}return i.createElement(a.Provider,{value:w},g&&w.visualElement?i.createElement(g,{visualElement:w.visualElement,...y}):null,s(d,p,function(t,n,s){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),s&&("function"==typeof s?s(e):P(s)&&(s.current=e))},[n])}(T,w.visualElement,f),T,x,w.visualElement))}));return p[B]=d,p}function j({layoutId:t}){const n=e.useContext(L).id;return n&&void 0!==t?n+"-"+t:t}function O(t){function e(e,n={}){return F(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,s)=>(n.has(s)||n.set(s,e(s)),n.get(s))})}const I=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function U(t){return"string"==typeof t&&!t.includes("-")&&!!(I.indexOf(t)>-1||/[A-Z]/u.test(t))}const W={};function N(t){Object.assign(W,t)}const z=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],H=new Set(z);function $(t,{layout:e,layoutId:n}){return H.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!W[t]||"opacity"===t)}const Y=t=>Boolean(t&&t.getVelocity),G={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},X=z.length;function K(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let e=0;e<X;e++){const n=z[e];if(void 0!==t[n]){o+=`${G[n]||n}(${t[n]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const q=t=>e=>"string"==typeof e&&e.startsWith(t),Z=q("--"),_=q("var(--"),J=t=>!!_(t)&&Q.test(t.split("/*")[0].trim()),Q=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,tt=(t,e)=>e&&"number"==typeof t?e.transform(t):t,et=(t,e,n)=>n>e?e:n<t?t:n,nt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},st={...nt,transform:t=>et(0,1,t)},it={...nt,default:1},ot=t=>Math.round(1e5*t)/1e5,rt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,at=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,lt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ut(t){return"string"==typeof t}const ct=t=>({test:e=>ut(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ht=ct("deg"),dt=ct("%"),mt=ct("px"),pt=ct("vh"),ft=ct("vw"),gt={...dt,parse:t=>dt.parse(t)/100,transform:t=>dt.transform(100*t)},yt={...nt,transform:Math.round},vt={borderWidth:mt,borderTopWidth:mt,borderRightWidth:mt,borderBottomWidth:mt,borderLeftWidth:mt,borderRadius:mt,radius:mt,borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomRightRadius:mt,borderBottomLeftRadius:mt,width:mt,maxWidth:mt,height:mt,maxHeight:mt,size:mt,top:mt,right:mt,bottom:mt,left:mt,padding:mt,paddingTop:mt,paddingRight:mt,paddingBottom:mt,paddingLeft:mt,margin:mt,marginTop:mt,marginRight:mt,marginBottom:mt,marginLeft:mt,rotate:ht,rotateX:ht,rotateY:ht,rotateZ:ht,scale:it,scaleX:it,scaleY:it,scaleZ:it,skew:ht,skewX:ht,skewY:ht,distance:mt,translateX:mt,translateY:mt,translateZ:mt,x:mt,y:mt,z:mt,perspective:mt,transformPerspective:mt,opacity:st,originX:gt,originY:gt,originZ:mt,zIndex:yt,fillOpacity:st,strokeOpacity:st,numOctaves:yt};function xt(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const t in e){const n=e[t];if(Z(t)){o[t]=n;continue}const s=vt[t],h=tt(n,s);if(H.has(t)){if(l=!0,r[t]=h,!c)continue;n!==(s.default||0)&&(c=!1)}else t.startsWith("origin")?(u=!0,a[t]=h):i[t]=h}if(e.transform||(l||s?i.transform=K(t.transform,n,c,s):i.transform&&(i.transform="none")),u){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;i.transformOrigin=`${t} ${e} ${n}`}}const Pt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function wt(t,e,n){for(const s in e)Y(e[s])||$(s,n)||(t[s]=e[s])}function Tt(t,n,s){const i={};return wt(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n,s){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return xt(e,n,{enableHardwareAcceleration:!s},t),Object.assign({},e.vars,e.style)},[n])}(t,n,s)),i}function St(t,e,n){const s={},i=Tt(t,e,n);return t.drag&&!1!==t.dragListener&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const bt=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Et(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||bt.has(t)}let At=t=>!Et(t);function Ct(t){t&&(At=e=>e.startsWith("on")?!Et(e):t(e))}try{Ct(require("@emotion/is-prop-valid").default)}catch(t){}function Vt(t,e,n){const s={};for(const i in t)"values"===i&&"object"==typeof t.values||(At(i)||!0===n&&Et(i)||!e&&!Et(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Mt(t,e,n){return"string"==typeof t?t:mt.transform(e+n*t)}const Rt={offset:"stroke-dashoffset",array:"stroke-dasharray"},Dt={offset:"strokeDashoffset",array:"strokeDasharray"};function Lt(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h,d){if(xt(t,u,c,d),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:m,style:p,dimensions:f}=t;m.transform&&(f&&(p.transform=m.transform),delete m.transform),f&&(void 0!==i||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Mt(e,t.x,t.width)} ${Mt(n,t.y,t.height)}`}(f,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==e&&(m.x=e),void 0!==n&&(m.y=n),void 0!==s&&(m.scale=s),void 0!==r&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Rt:Dt;t[o.offset]=mt.transform(-s);const r=mt.transform(e),a=mt.transform(n);t[o.array]=`${r} ${a}`}(m,r,a,l,!1)}const kt=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Bt=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Ft(t,n,s,i){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Lt(e,n,{enableHardwareAcceleration:!1},Bt(i),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};wt(e,t.style,t),o.style={...e,...o.style}}return o}function jt(t=!1){return(n,s,i,{latestValues:o},r)=>{const a=(U(n)?Ft:St)(s,o,r,n),l=Vt(s,"string"==typeof n,t),u=n!==e.Fragment?{...l,...a,ref:i}:{},{children:c}=s,h=e.useMemo(()=>Y(c)?c.get():c,[c]);return e.createElement(n,{...u,children:h})}}function Ot(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const It=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 Ut(t,e,n,s){Ot(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(It.has(n)?n:d(n),e.attrs[n])}function Wt(t,e){const{style:n}=t,s={};for(const i in n)(Y(n[i])||e.style&&Y(e.style[i])||$(i,t))&&(s[i]=n[i]);return s}function Nt(t,e){const n=Wt(t,e);for(const s in t)if(Y(t[s])||Y(e[s])){n[-1!==z.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return n}function zt(t,e,n,s={},i={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),e}function Ht(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const $t=t=>Array.isArray(t);function Yt(t){const e=Y(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const Gt=t=>(n,s)=>{const i=e.useContext(a),o=e.useContext(l),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Xt(s,i,o,t),renderState:e()};return n&&(r.mount=t=>n(s,t,r)),r}(t,n,i,o);return s?r():Ht(r)};function Xt(t,e,n,s){const i={},o=s(t,{});for(const t in o)i[t]=Yt(o[t]);let{initial:r,animate:a}=t;const l=E(t),u=A(t);e&&u&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===r;const h=c?a:r;if(h&&"boolean"!=typeof h&&!T(h)){(Array.isArray(h)?h:[h]).forEach(e=>{const n=zt(t,e);if(!n)return;const{transitionEnd:s,transition:o,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(i[t]=e)}for(const t in s)i[t]=s[t]})}return i}const Kt=t=>t,{schedule:qt,cancel:Zt,state:_t,steps:Jt}=y("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Kt,!0),Qt={useVisualState:Gt({scrapeMotionValuesFromProps:Nt,createRenderState:kt,onMount:(t,e,{renderState:n,latestValues:s})=>{qt.read(()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}}),qt.render(()=>{Lt(n,s,{enableHardwareAcceleration:!1},Bt(e.tagName),t.transformTemplate),Ut(e,n)})}})},te={useVisualState:Gt({scrapeMotionValuesFromProps:Wt,createRenderState:Pt})};function ee(t,{forwardMotionProps:e=!1},n,s){return{...U(t)?Qt:te,preloadedFeatures:n,useRender:jt(e),createVisualElement:s,Component:t}}function ne(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const se=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function ie(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const oe=t=>e=>se(e)&&t(e,ie(e));function re(t,e,n,s){return ne(t,e,oe(n),s)}const ae=(t,e)=>n=>e(t(n)),le=(...t)=>t.reduce(ae);function ue(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const ce=ue("dragHorizontal"),he=ue("dragVertical");function de(t){let e=!1;if("y"===t)e=he();else if("x"===t)e=ce();else{const t=ce(),n=he();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function me(){const t=de(!0);return!t||(t(),!1)}class pe{constructor(t){this.isMounted=!1,this.node=t}update(){}}function fe(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return re(t.current,n,(n,i)=>{if("touch"===n.pointerType||me())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[s]&&o[s](n,i)},{passive:!t.getProps()[s]})}const ge=(t,e)=>!!e&&(t===e||ge(t,e.parentElement));function ye(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,ie(n))}const ve=new WeakMap,xe=new WeakMap,Pe=t=>{const e=ve.get(t.target);e&&e(t)},we=t=>{t.forEach(Pe)};function Te(t,e,n){const s=function({root:t,...e}){const n=t||document;xe.has(n)||xe.set(n,{});const s=xe.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(we,{root:t,...e})),s[i]}(e);return ve.set(t,n),s.observe(t),()=>{ve.delete(t),s.unobserve(t)}}const Se={some:0,all:1};const be={inView:{Feature:class extends pe{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:i}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:Se[s]};return Te(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,i&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),o=e?n:s;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends pe{constructor(){super(...arguments),this.removeStartListeners=Kt,this.removeEndListeners=Kt,this.removeAccessibleListeners=Kt,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),s=re(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s,globalTapTarget:i}=this.node.getProps();i||ge(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)},{passive:!(n.onTap||n.onPointerUp)}),i=re(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=le(s,i),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=ne(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=ne(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&ye("up",(t,e)=>{const{onTap:n}=this.node.getProps();n&&n(t,e)})}),ye("down",(t,e)=>{this.startPress(t,e)})}),e=ne(this.node.current,"blur",()=>{this.isPressing&&ye("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=le(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&n(t,e)}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!me()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&n(t,e)}mount(){const t=this.node.getProps(),e=re(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=ne(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=le(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends pe{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=le(ne(this.node.current,"focus",()=>this.onFocus()),ne(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends pe{mount(){this.unmount=le(fe(this.node,!0),fe(this.node,!1))}unmount(){}}}};function Ee(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function Ae(t,e,n){const s=t.getProps();return zt(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}const Ce=t=>1e3*t,Ve=t=>t/1e3,Me={type:"spring",stiffness:500,damping:25,restSpeed:10},Re={type:"keyframes",duration:.8},De={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Le=(t,{keyframes:e})=>e.length>2?Re:H.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Me:De;function ke(t,e){return t[e]||t.default||t}const Be={current:!1},Fe=t=>null!==t;function je(t,{repeat:e,repeatType:n="loop"}){const s=t.filter(Fe);return s[e&&"loop"!==n&&e%2==1?0:s.length-1]}let Oe;function Ie(){Oe=void 0}const Ue={now:()=>(void 0===Oe&&Ue.set(_t.isProcessing||p.useManualTiming?_t.timestamp:performance.now()),Oe),set:t=>{Oe=t,queueMicrotask(Ie)}},We=t=>/^0[^.\s]+$/u.test(t);let Ne=Kt,ze=Kt;const He=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),$e=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ye(t,e,n=1){ze(n<=4);const[s,i]=function(t){const e=$e.exec(t);if(!e)return[,];const[,n,s,i]=e;return["--"+(null!=n?n:s),i]}(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const t=o.trim();return He(t)?parseFloat(t):t}return J(i)?Ye(i,e,n+1):i}const Ge=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Xe=t=>t===nt||t===mt,Ke=(t,e)=>parseFloat(t.split(", ")[e]),qe=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return Ke(i[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?Ke(e[1],t):0}},Ze=new Set(["x","y","z"]),_e=z.filter(t=>!Ze.has(t));const Je={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:qe(4,13),y:qe(5,14)};Je.translateX=Je.x,Je.translateY=Je.y;const Qe=t=>e=>e.test(t),tn=[nt,mt,dt,ht,ft,pt,{test:t=>"auto"===t,parse:t=>t}],en=t=>tn.find(Qe(t)),nn=new Set;let sn=!1,on=!1;function rn(){on&&(nn.forEach(t=>{t.needsMeasurement&&t.unsetTransforms()}),nn.forEach(t=>{t.needsMeasurement&&t.measureInitialState()}),nn.forEach(t=>{t.needsMeasurement&&t.renderEndStyles()}),nn.forEach(t=>{t.needsMeasurement&&t.measureEndState()})),on=!1,sn=!1,nn.forEach(t=>t.complete()),nn.clear()}function an(){nn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(on=!0)}),qt.resolveKeyframes(rn)}class ln{constructor(t,e,n,s,i,o=!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=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(nn.add(this),sn||(sn=!0,qt.read(an))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let i=0;i<t.length;i++)if(null===t[i])if(0===i){const i=null==s?void 0:s.get(),o=t[t.length-1];if(void 0!==i)t[0]=i;else if(n&&e){const s=n.readValue(e,o);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=o),s&&void 0===i&&s.set(t[0])}else t[i]=t[i-1]}unsetTransforms(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes),nn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,nn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const un=(t,e)=>n=>Boolean(ut(n)&&lt.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),cn=(t,e,n)=>s=>{if(!ut(s))return s;const[i,o,r,a]=s.match(rt);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},hn={...nt,transform:t=>Math.round((t=>et(0,255,t))(t))},dn={test:un("rgb","red"),parse:cn("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+hn.transform(t)+", "+hn.transform(e)+", "+hn.transform(n)+", "+ot(st.transform(s))+")"};const mn={test:un("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:dn.transform},pn={test:un("hsl","hue"),parse:cn("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+dt.transform(ot(e))+", "+dt.transform(ot(n))+", "+ot(st.transform(s))+")"},fn={test:t=>dn.test(t)||mn.test(t)||pn.test(t),parse:t=>dn.test(t)?dn.parse(t):pn.test(t)?pn.parse(t):mn.parse(t),transform:t=>ut(t)?t:t.hasOwnProperty("red")?dn.transform(t):pn.transform(t)};const gn=/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 yn(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const r=e.replace(gn,t=>(fn.test(t)?(s.color.push(o),i.push("color"),n.push(fn.parse(t))):t.startsWith("var(")?(s.var.push(o),i.push("var"),n.push(t)):(s.number.push(o),i.push("number"),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:s,types:i}}function vn(t){return yn(t).values}function xn(t){const{split:e,types:n}=yn(t),s=e.length;return t=>{let i="";for(let o=0;o<s;o++)if(i+=e[o],void 0!==t[o]){const e=n[o];i+="number"===e?ot(t[o]):"color"===e?fn.transform(t[o]):t[o]}return i}}const Pn=t=>"number"==typeof t?0:t;const wn={test:function(t){var e,n;return isNaN(t)&&ut(t)&&((null===(e=t.match(rt))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(at))||void 0===n?void 0:n.length)||0)>0},parse:vn,createTransformer:xn,getAnimatableNone:function(t){const e=vn(t);return xn(t)(e.map(Pn))}},Tn=new Set(["brightness","contrast","saturate","opacity"]);function Sn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(rt)||[];if(!s)return t;const i=n.replace(s,"");let o=Tn.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const bn=/\b([a-z-]*)\(.*?\)/gu,En={...wn,getAnimatableNone:t=>{const e=t.match(bn);return e?e.map(Sn).join(" "):t}},An={...vt,color:fn,backgroundColor:fn,outlineColor:fn,fill:fn,stroke:fn,borderColor:fn,borderTopColor:fn,borderRightColor:fn,borderBottomColor:fn,borderLeftColor:fn,filter:En,WebkitFilter:En},Cn=t=>An[t];function Vn(t,e){let n=Cn(t);return n!==En&&(n=wn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}class Mn extends ln{constructor(t,e,n,s){super(t,e,n,s,null==s?void 0:s.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e.current)return;const s=[];super.readKeyframes();for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o&&J(o)){const s=Ye(o,e.current);void 0!==s&&(t[n]=s)}("number"==typeof(i=t[n])?0===i:null===i||"none"===i||"0"===i||We(i))&&s.push(n)}var i;if(s.length&&function(t,e,n){let s=0,i=void 0;for(;s<t.length&&!i;)"string"==typeof t[s]&&"none"!==t[s]&&"0"!==t[s]&&(i=t[s]),s++;if(i&&n)for(const s of e)t[s]=Vn(n,i)}(t,s,n),!Ge.has(n)||2!==t.length)return;const[o,r]=t,a=en(o),l=en(r);if(a&&l&&a!==l)if(Xe(a)&&Xe(l))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}unsetTransforms(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t.current)return;this.removedTransforms=function(t){const e=[];return _e.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t);const s=n[n.length-1];t.getValue(e,s).jump(s,!1)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;t.current&&("height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Je[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin)}renderEndStyles(){this.element.render()}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1),s[s.length-1]=Je[n](e.measureViewportBox(),window.getComputedStyle(e.current)),"height"===n&&void 0!==this.suspendedScrollY&&window.scrollTo(0,this.suspendedScrollY),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)})}}function Rn(t){let e;return()=>(void 0===e&&(e=t()),e)}const Dn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!wn.test(t)&&"0"!==t||t.startsWith("url(")));class Ln{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...r}){this.isStopped=!1,this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:o,...r},this.updateFinishedPromise()}get resolved(){return this._resolved||(an(),rn(),Zt(an),Zt(rn)),this._resolved}onKeyframesResolved(t){const{name:e,type:n,velocity:s,delay:i,onComplete:o,onUpdate:r}=this.options;if(!function(t,e,n,s){const i=t[0];if(null===i)return!1;const o=t[t.length-1],r=Dn(i,e),a=Dn(o,e);return Ne(r===a),!(!r||!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&&s)}(t,e,n,s)){if(Be.current||!i){const e=je(t,this.options);return null==r||r(e),null==o||o(),this.resolveFinishedPromise(),void this.updateFinishedPromise()}this.options.duration=0}this._resolved={keyframes:t,...this.initPlayback(t)},this.onPostResolved()}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=()=>{t(),this.updateFinishedPromise()}})}}function kn(t,e){return e?t*(1e3/e):0}function Bn(t,e,n){const s=Math.max(e-5,0);return kn(n-t(s),e-s)}function Fn({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;Ne(t<=Ce(10));let r=1-e;r=et(.05,1,r),t=et(.01,10,Ve(t)),r<1?(i=e=>{const s=e*r,i=s*t;return.001-(s-n)/jn(e,r)*Math.exp(-i)},o=e=>{const s=e*r*t,o=s*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=jn(Math.pow(e,2),r);return(.001-i(e)>0?-1:1)*((o-a)*l)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=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}(i,o,5/t);if(t=Ce(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*r*Math.sqrt(s*e),duration:t}}}function jn(t,e){return t*Math.sqrt(1-e*e)}const On=["duration","bounce"],In=["stiffness","damping","mass"];function Un(t,e){return e.some(e=>void 0!==t[e])}function Wn({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{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(!Un(t,In)&&Un(t,On)){const n=Fn(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...s,velocity:-Ve(s.velocity||0)}),m=h||0,p=l/(2*Math.sqrt(a*u)),f=o-i,g=Ve(Math.sqrt(a/u)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),p<1){const t=jn(g,p);v=e=>{const n=Math.exp(-p*g*e);return o-n*((m+p*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===p)v=t=>o-Math.exp(-g*t)*(f+(m+g*f)*t);else{const t=g*Math.sqrt(p*p-1);v=e=>{const n=Math.exp(-p*g*e),s=Math.min(t*e,300);return o-n*((m+p*g*f)*Math.sinh(s)+t*f*Math.cosh(s))/t}}return{calculatedDuration:d&&c||null,next:t=>{const s=v(t);if(d)r.done=t>=c;else{let i=m;0!==t&&(i=p<1?Bn(v,t,s):0);const a=Math.abs(i)<=n,l=Math.abs(o-s)<=e;r.done=a&&l}return r.value=r.done?o:s,r}}}function Nn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},m=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let p=n*e;const f=h+p,g=void 0===r?f:r(f);g!==f&&(p=g-h);const y=t=>-p*Math.exp(-t/s),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let P,w;const T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(P=t,w=Wn({keyframes:[d.value,m(d.value)],velocity:Bn(v,t,d.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==P||(e=!0,x(t),T(t)),void 0!==P&&t>=P?w.next(t-P):(!e&&x(t),d)}}}const zn=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Hn(t,e,n,s){if(t===e&&n===s)return Kt;const i=e=>function(t,e,n,s,i){let o,r,a=0;do{r=e+(n-e)/2,o=zn(r,s,i)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:zn(i(t),e,s)}const $n=Hn(.42,0,1,1),Yn=Hn(0,0,.58,1),Gn=Hn(.42,0,.58,1),Xn=t=>Array.isArray(t)&&"number"!=typeof t[0],Kn=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,qn=t=>e=>1-t(1-e),Zn=t=>1-Math.sin(Math.acos(t)),_n=qn(Zn),Jn=Kn(Zn),Qn=Hn(.33,1.53,.69,.99),ts=qn(Qn),es=Kn(ts),ns=t=>(t*=2)<1?.5*ts(t):.5*(2-Math.pow(2,-10*(t-1))),ss={linear:Kt,easeIn:$n,easeInOut:Gn,easeOut:Yn,circIn:Zn,circInOut:Jn,circOut:_n,backIn:ts,backInOut:es,backOut:Qn,anticipate:ns},is=t=>{if(Array.isArray(t)){ze(4===t.length);const[e,n,s,i]=t;return Hn(e,n,s,i)}return"string"==typeof t?(ze(void 0!==ss[t]),ss[t]):t},os=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},rs=(t,e,n)=>t+(e-t)*n;function as(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}const ls=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},us=[mn,dn,pn];function cs(t){const e=(n=t,us.find(t=>t.test(n)));var n;ze(Boolean(e));let s=e.parse(t);return e===pn&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,o=0,r=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=as(a,s,t+1/3),o=as(a,s,t),r=as(a,s,t-1/3)}else i=o=r=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*r),alpha:s}}(s)),s}const hs=(t,e)=>{const n=cs(t),s=cs(e),i={...n};return t=>(i.red=ls(n.red,s.red,t),i.green=ls(n.green,s.green,t),i.blue=ls(n.blue,s.blue,t),i.alpha=rs(n.alpha,s.alpha,t),dn.transform(i))};function ds(t,e){return n=>n>0?e:t}function ms(t,e){return n=>rs(t,e,n)}function ps(t){return"number"==typeof t?ms:"string"==typeof t?J(t)?ds:fn.test(t)?hs:ys:Array.isArray(t)?fs:"object"==typeof t?fn.test(t)?hs:gs:ds}function fs(t,e){const n=[...t],s=n.length,i=t.map((t,n)=>ps(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}}function gs(t,e){const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=ps(t[i])(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const ys=(t,e)=>{const n=wn.createTransformer(e),s=yn(t),i=yn(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?le(fs(function(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][i[r]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[o]=l,i[r]++}return s}(s,i),i.values),n):(Ne(!0),ds(t,e))};function vs(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return rs(t,e,n);return ps(t)(t,e)}function xs(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(ze(o===e.length),1===o)return()=>e[0];if(2===o&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=function(t,e,n){const s=[],i=n||vs,o=t.length-1;for(let n=0;n<o;n++){let o=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||Kt:e;o=le(t,o)}s.push(o)}return s}(e,s,i),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=os(t[n],t[n+1],e);return r[n](s)};return n?e=>l(et(t[0],t[o-1],e)):l}function Ps(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=os(0,e,s);t.push(rs(n,1,i))}}function ws(t){const e=[0];return Ps(e,t.length-1),e}function Ts({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Xn(s)?s.map(is):is(s),o={done:!1,value:e[0]},r=xs(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:ws(e),t),e,{ease:Array.isArray(i)?i:(a=e,l=i,a.map(()=>l||Gn).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}function Ss(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 bs=t=>{const e=({timestamp:e})=>t(e);return{start:()=>qt.update(e,!0),stop:()=>Zt(e),now:()=>_t.isProcessing?_t.timestamp:Ue.now()}},Es={decay:Nn,inertia:Nn,tween:Ts,keyframes:Ts,spring:Wn},As=t=>t/100;class Cs extends Ln{constructor({KeyframeResolver:t=ln,...e}){super(e),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle";const{name:n,motionValue:s,keyframes:i}=this.options,o=t=>this.onKeyframesResolved(t);n&&s&&s.owner?this.resolver=s.owner.resolveKeyframes(i,o,n,s):this.resolver=new t(i,o,n,s),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,r=Es[e]||Ts;let a,l;r!==Ts&&"number"!=typeof t[0]&&(a=le(As,vs(t[0],t[1])),t=[0,100]);const u=r({...this.options,keyframes:t});"mirror"===i&&(l=r({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=Ss(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{generator:n,mirroredGenerator:s,mapPercentToKeyframes:i,keyframes:o,calculatedDuration:r,totalDuration:a,resolvedDuration:l}=this.resolved;if(null===this.startTime)return n.next(0);const{delay:u,repeat:c,repeatType:h,repeatDelay:d,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/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 p=this.currentTime-u*(this.speed>=0?1:-1),f=this.speed>=0?p<0:p>a;this.currentTime=Math.max(p,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=a);let g=this.currentTime,y=n;if(c){const t=Math.min(this.currentTime,a)/l;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/l)):"mirror"===h&&(y=s)),g=et(0,1,n)*l}const v=f?{done:!1,value:o[0]}:y.next(g);i&&(v.value=i(v.value));let{done:x}=v;f||null===r||(x=this.speed>=0?this.currentTime>=a:this.currentTime<=0);const P=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return m&&m(v.value),P&&this.finish(),v}get duration(){return Ve(this.resolved.calculatedDuration)}get time(){return Ve(this.currentTime)}set time(t){t=Ce(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=Ve(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=bs,onPlay:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=n),"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"}stop(){if(this.isStopped=!0,"idle"===this.state)return;this.state="idle";const{onStop:t}=this.options;t&&t(),this.teardown()}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()}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)}}function Vs(t){return new Cs(t)}const Ms=t=>Array.isArray(t)&&"number"==typeof t[0];function Rs(t){return Boolean(!t||"string"==typeof t&&Ls[t]||Ms(t)||Array.isArray(t)&&t.every(Rs))}const Ds=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ls={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ds([0,.65,.55,1]),circOut:Ds([.55,0,1,.45]),backIn:Ds([.31,.01,.66,-.59]),backOut:Ds([.33,1.53,.69,.99])};function ks(t){if(t)return Ms(t)?Ds(t):Array.isArray(t)?t.map(ks):Ls[t]}function Bs(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=ks(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const Fs=Rn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),js=new Set(["opacity","clipPath","filter","transform"]);class Os extends Ln{constructor(t){super(t);const{name:e,motionValue:n,keyframes:s}=this.options;this.resolver=new Mn(s,t=>this.onKeyframesResolved(t),e,n),this.resolver.scheduleResolve()}initPlayback(t){let e=this.options.duration||300;if("spring"===(n=this.options).type||"backgroundColor"===n.name||!Rs(n.ease)){const{onComplete:n,onUpdate:s,motionValue:i,...o}=this.options,r=function(t,e){const n=new Cs({...e,keyframes:t,repeat:0,delay:0});let s={done:!1,value:t[0]};const i=[];let o=0;for(;!s.done&&o<2e4;)s=n.sample(o),i.push(s.value),o+=10;return{times:void 0,keyframes:i,duration:o-10,ease:"linear"}}(t,o);t=r.keyframes,e=r.duration,this.options.times=r.times,this.options.ease=r.ease}var n;const{motionValue:s,name:i}=this.options,o=Bs(s.owner.current,i,t,{...this.options,duration:e});return o.startTime=Ue.now(),this.pendingTimeline?(o.timeline=this.pendingTimeline,this.pendingTimeline=void 0):o.onfinish=()=>{const{onComplete:e}=this.options;s.set(je(t,this.options)),e&&e(),this.cancel(),this.resolveFinishedPromise(),this.updateFinishedPromise()},{animation:o,duration:e,keyframes:t}}get duration(){const{duration:t}=this.resolved;return Ve(t)}get time(){const{animation:t}=this.resolved;return Ve(t.currentTime||0)}set time(t){const{animation:e}=this.resolved;e.currentTime=Ce(t)}get speed(){const{animation:t}=this.resolved;return t.playbackRate}set speed(t){const{animation:e}=this.resolved;e.playbackRate=t}get state(){const{animation:t}=this.resolved;return t.playState}attachTimeline(t){if(this._resolved){const{animation:e}=this.resolved;e.timeline=t,e.onfinish=null}else this.pendingTimeline=t;return Kt}play(){if(this.isStopped)return;const{animation:t}=this.resolved;t.play()}pause(){const{animation:t}=this.resolved;t.pause()}stop(){this.isStopped=!0;const{animation:t,keyframes:e}=this.resolved;if("idle"!==t.playState&&"finished"!==t.playState){if(this.time){const{motionValue:t,onUpdate:n,onComplete:s,...i}=this.options,o=new Cs({...i,keyframes:e});t.setWithVelocity(o.sample(this.time-10).value,o.sample(this.time).value,10)}this.cancel()}}complete(){this.resolved.animation.finish()}cancel(){this.resolved.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;return Fs()&&n&&js.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!s&&"mirror"!==i&&0!==o&&"inertia"!==r}}const Is=(t,e,n,s={},i,o)=>r=>{const a=ke(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u-=Ce(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(a)||(c={...c,...Le(t,c)}),c.duration&&(c.duration=Ce(c.duration)),c.repeatDelay&&(c.repeatDelay=Ce(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if(!1===c.type&&(c.duration=0,0===c.delay&&(h=!0)),(Be.current||p.skipAnimations)&&(h=!0,c.duration=0,c.delay=0),h&&!o&&void 0!==e.get()){const t=je(c.keyframes,a);if(void 0!==t)return void qt.update(()=>{c.onUpdate(t),c.onComplete()})}return!o&&Os.supports(c)?new Os(c):new Cs(c)};function Us(t){return Boolean(Y(t)&&t.add)}function Ws(t,e){-1===t.indexOf(e)&&t.push(e)}function Ns(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class zs{constructor(){this.subscriptions=[]}add(t){return Ws(this.subscriptions,t),()=>Ns(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Hs={current:void 0};class $s{constructor(t,e={}){var n;this.version="11.0.11",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Ue.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.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=Ue.now()}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 zs);const n=this.events[t].add(e);return"change"===t?()=>{n(),qt.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 Hs.current&&Hs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Ue.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return kn(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 Ys(t,e){return new $s(t,e)}function Gs(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ys(n))}function Xs(t,e){const n=Ae(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const e in o){Gs(t,e,(r=o[e],$t(r)?r[r.length-1]||0:r))}var r}function Ks({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function qs(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;const u=t.getValue("willChange");s&&(r=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const e in l){const s=t.getValue(e,null!==(o=t.latestValues[e])&&void 0!==o?o:null),i=l[e];if(void 0===i||h&&Ks(h,e))continue;const a={delay:n,elapsed:0,...ke(r||{},e)};let d=!1;if(window.HandoffAppearAnimations){const n=t.getProps()[m];if(n){const t=window.HandoffAppearAnimations(n,e);null!==t&&(a.elapsed=t,d=!0)}}s.start(Is(e,s,i,t.shouldReduceMotion&&H.has(e)?{type:!1}:a,t,d));const p=s.animation;p&&(Us(u)&&(u.add(e),p.then(()=>u.remove(e))),c.push(p))}return a&&Promise.all(c).then(()=>{qt.update(()=>{a&&Xs(t,a)})}),c}function Zs(t,e,n={}){var s;const i=Ae(t,e,"exit"===n.type?null===(s=t.presenceContext)||void 0===s?void 0:s.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>Promise.all(qs(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:r,staggerDirection:a}=o;return function(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=1===i?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(_s).forEach((t,s)=>{t.notify("AnimationStart",e),r.push(Zs(t,e,{...o,delay:n+l(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,i+s,r,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[r,a]:[a,r];return t().then(()=>e())}return Promise.all([r(),a(n.delay)])}function _s(t,e){return t.sortNodePosition(e)}function Js(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const i=e.map(e=>Zs(t,e,n));s=Promise.all(i)}else if("string"==typeof e)s=Zs(t,e,n);else{const i="function"==typeof e?Ae(t,e,n.custom):e;s=Promise.all(qs(t,i,n))}return s.then(()=>{qt.postRender(()=>{t.notify("AnimationComplete",e)})})}const Qs=[...S].reverse(),ti=S.length;function ei(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Js(t,e,n)))}(t);const n={animate:si(!0),whileInView:si(),whileHover:si(),whileTap:si(),whileDrag:si(),whileFocus:si(),exit:si()};let s=!0;const i=e=>(n,s)=>{var i;const o=Ae(t,s,"exit"===e?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);if(o){const{transition:t,transitionEnd:e,...s}=o;n={...n,...s,...e}}return n};function o(o){const r=t.getProps(),a=t.getVariantContext(!0)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<ti;e++){const d=Qs[e],m=n[d],p=void 0!==r[d]?r[d]:a[d],f=w(p),g=d===o?m.isActive:null;!1===g&&(h=e);let y=p===a[d]&&p!==r[d]&&f;if(y&&s&&t.manuallyAnimateOnMount&&(y=!1),m.protectedKeys={...c},!m.isActive&&null===g||!p&&!m.prevProp||T(p)||"boolean"==typeof p)continue;let v=ni(m.prevProp,p)||d===o&&m.isActive&&!y&&f||e>h&&f,x=!1;const P=Array.isArray(p)?p:[p];let S=P.reduce(i(d),{});!1===g&&(S={});const{prevResolvedValues:b={}}=m,E={...b,...S},A=t=>{v=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0};for(const t in E){const e=S[t],n=b[t];if(c.hasOwnProperty(t))continue;let s=!1;s=$t(e)&&$t(n)?!Ee(e,n):e!==n,s?null!=e?A(t):u.add(t):void 0!==e&&u.has(t)?A(t):m.protectedKeys[t]=!0}m.prevProp=p,m.prevResolvedValues=S,m.isActive&&(c={...c,...S}),s&&t.blockInitialAnimation&&(v=!1),!v||y&&!x||l.push(...P.map(t=>({animation:t,options:{type:d}})))}if(u.size){const e={};u.forEach(n=>{const s=t.getBaseTarget(n);e[n]=void 0===s?null:s}),l.push({animation:e})}let d=Boolean(l.length);return!s||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),s=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,s){var i;if(n[e].isActive===s)return Promise.resolve();null===(i=t.variantChildren)||void 0===i||i.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,s)}),n[e].isActive=s;const r=o(e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function ni(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Ee(e,t)}function si(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let ii=0;const oi={animation:{Feature:class extends pe{constructor(t){super(t),t.animationState||(t.animationState=ei(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),T(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends pe{constructor(){super(...arguments),this.id=ii++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const s=this.node.animationState.setActive("exit",!t);e&&!t&&s.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},ri=(t,e)=>Math.abs(t-e);function ai(t,e){const n=ri(t.x,e.x),s=ri(t.y,e.y);return Math.sqrt(n**2+s**2)}class li{constructor(t,e,{transformPagePoint:n,contextWindow:s,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=hi(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=ai(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:s}=t,{timestamp:i}=_t;this.history.push({...s,timestamp:i});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=ui(e,this.transformPagePoint),qt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:s,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=hi("pointercancel"===t.type?this.lastMoveEventInfo:ui(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),s&&s(t,o)},!se(t))return;this.dragSnapToOrigin=i,this.handlers=e,this.transformPagePoint=n,this.contextWindow=s||window;const o=ui(ie(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=_t;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,hi(o,this.history)),this.removeListeners=le(re(this.contextWindow,"pointermove",this.handlePointerMove),re(this.contextWindow,"pointerup",this.handlePointerUp),re(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zt(this.updatePoint)}}function ui(t,e){return e?{point:e(t.point)}:t}function ci(t,e){return{x:t.x-e.x,y:t.y-e.y}}function hi({point:t},e){return{point:t,delta:ci(t,mi(e)),offset:ci(t,di(e)),velocity:pi(e,.1)}}function di(t){return t[0]}function mi(t){return t[t.length-1]}function pi(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=mi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>Ce(e)));)n--;if(!s)return{x:0,y:0};const o=Ve(i.timestamp-s.timestamp);if(0===o)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function fi(t){return t.max-t.min}function gi(t,e=0,n=.01){return Math.abs(t-e)<=n}function yi(t,e,n,s=.5){t.origin=s,t.originPoint=rs(e.min,e.max,t.origin),t.scale=fi(n)/fi(e),(gi(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=rs(n.min,n.max,t.origin)-t.originPoint,(gi(t.translate)||isNaN(t.translate))&&(t.translate=0)}function vi(t,e,n,s){yi(t.x,e.x,n.x,s?s.originX:void 0),yi(t.y,e.y,n.y,s?s.originY:void 0)}function xi(t,e,n){t.min=n.min+e.min,t.max=t.min+fi(e)}function Pi(t,e,n){t.min=e.min-n.min,t.max=t.min+fi(e)}function wi(t,e,n){Pi(t.x,e.x,n.x),Pi(t.y,e.y,n.y)}function Ti(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Si(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}const bi=.35;function Ei(t,e,n){return{min:Ai(t,e),max:Ai(t,n)}}function Ai(t,e){return"number"==typeof t?t:t[e]||0}const Ci=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Vi(t){return[t("x"),t("y")]}function Mi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Ri(t){return void 0===t||1===t}function Di({scale:t,scaleX:e,scaleY:n}){return!Ri(t)||!Ri(e)||!Ri(n)}function Li(t){return Di(t)||ki(t)||t.z||t.rotate||t.rotateX||t.rotateY}function ki(t){return Bi(t.x)||Bi(t.y)}function Bi(t){return t&&"0%"!==t}function Fi(t,e,n){return n+e*(t-n)}function ji(t,e,n,s,i){return void 0!==i&&(t=Fi(t,i,s)),Fi(t,n,s)+e}function Oi(t,e=0,n=1,s,i){t.min=ji(t.min,e,n,s,i),t.max=ji(t.max,e,n,s,i)}function Ii(t,{x:e,y:n}){Oi(t.x,e.translate,e.scale,e.originPoint),Oi(t.y,n.translate,n.scale,n.originPoint)}function Ui(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Wi(t,e){t.min=t.min+e,t.max=t.max+e}function Ni(t,e,[n,s,i]){const o=void 0!==e[i]?e[i]:.5,r=rs(t.min,t.max,o);Oi(t,e[n],e[s],r,e.scale)}const zi=["x","scaleX","originX"],Hi=["y","scaleY","originY"];function $i(t,e){Ni(t.x,e,zi),Ni(t.y,e,Hi)}function Yi(t,e){return Mi(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))}const Gi=({current:t})=>t?t.ownerDocument.defaultView:null,Xi=new WeakMap;class Ki{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:s}=this.getProps();this.panSession=new li(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(ie(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:s,onDragStart:i}=this.getProps();if(n&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=de(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Vi(t=>{let e=this.getAxisMotionValue(t).get()||0;if(dt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const s=n.layout.layoutBox[t];if(s){e=fi(s)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),i&&i(t,e);const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:s,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(s&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Vi(t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,contextWindow:Gi(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=e;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&i(t,e)}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:s}=this.getProps();if(!n||!qi(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},s){return void 0!==e&&t<e?t=s?rs(e,t,s.min):Math.max(t,e):void 0!==n&&t>n&&(t=s?rs(n,t,s.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,i=this.constraints;e&&P(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!s)&&function(t,{top:e,left:n,bottom:s,right:i}){return{x:Ti(t.x,n,i),y:Ti(t.y,e,s)}}(s.layoutBox,e),this.elastic=function(t=bi){return!1===t?t=0:!0===t&&(t=bi),{x:Ei(t,"left","right"),y:Ei(t,"top","bottom")}}(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Vi(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(s.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!P(t))return!1;const n=t.current;ze(null!==n);const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=function(t,e,n){const s=Yi(t,n),{scroll:i}=e;return i&&(Wi(s.x,i.offset.x),Wi(s.y,i.offset.y)),s}(n,s.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Si(t.x,e.x),y:Si(t.y,e.y)}}(s.layout.layoutBox,i);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=Mi(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Vi(r=>{if(!qi(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=s?200:1e6,c=s?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(Is(t,n,0,e,this.visualElement))}stopAnimation(){Vi(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Vi(t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()})}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),s=n[e];return s||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Vi(e=>{const{drag:n}=this.getProps();if(!qi(e,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(e);if(s&&s.layout){const{min:n,max:o}=s.layout.layoutBox[e];i.set(t[e]-rs(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!P(e)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Vi(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();s[t]=function(t,e){let n=.5;const s=fi(t),i=fi(e);return i>s?n=os(e.min,e.max-s,t.min):s>i&&(n=os(t.min,t.max-i,e.min)),et(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Vi(e=>{if(!qi(e,t,null))return;const n=this.getAxisMotionValue(e),{min:i,max:o}=this.constraints[e];n.set(rs(i,o,s[e]))})}addListeners(){if(!this.visualElement.current)return;Xi.set(this.visualElement,this);const t=re(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();P(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,s=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const i=ne(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Vi(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{i(),t(),s(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=bi,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:r}}}function qi(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Zi=t=>(e,n)=>{t&&t(e,n)};const _i=["TopLeft","TopRight","BottomLeft","BottomRight"],Ji=_i.length,Qi=t=>"string"==typeof t?parseFloat(t):t,to=t=>"number"==typeof t||mt.test(t);function eo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const no=io(0,.5,_n),so=io(.5,.95,Kt);function io(t,e,n){return s=>s<t?0:s>e?1:n(os(t,e,s))}function oo(t,e){t.min=e.min,t.max=e.max}function ro(t,e){oo(t.x,e.x),oo(t.y,e.y)}function ao(t,e,n,s,i){return t=Fi(t-=e,1/n,s),void 0!==i&&(t=Fi(t,1/i,s)),t}function lo(t,e,[n,s,i],o,r){!function(t,e=0,n=1,s=.5,i,o=t,r=t){if(dt.test(e)){e=parseFloat(e);e=rs(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=rs(o.min,o.max,s);t===o&&(a-=e),t.min=ao(t.min,e,n,a,i),t.max=ao(t.max,e,n,a,i)}(t,e[n],e[s],e[i],e.scale,o,r)}const uo=["x","scaleX","originX"],co=["y","scaleY","originY"];function ho(t,e,n,s){lo(t.x,e,uo,n?n.x:void 0,s?s.x:void 0),lo(t.y,e,co,n?n.y:void 0,s?s.y:void 0)}function mo(t){return 0===t.translate&&1===t.scale}function po(t){return mo(t.x)&&mo(t.y)}function fo(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function go(t){return fi(t.x)/fi(t.y)}class yo{constructor(){this.members=[]}add(t){Ws(this.members,t),t.scheduleRender()}remove(t){if(Ns(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;!1===s&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function vo(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(s=`translate3d(${i}px, ${o}px, 0) `),1===e.x&&1===e.y||(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:i}=n;t&&(s+=`rotate(${t}deg) `),e&&(s+=`rotateX(${e}deg) `),i&&(s+=`rotateY(${i}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(s+=`scale(${r}, ${a})`),s||"none"}const xo=(t,e)=>t.depth-e.depth;class Po{constructor(){this.children=[],this.isDirty=!1}add(t){Ws(this.children,t),this.isDirty=!0}remove(t){Ns(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(xo),this.isDirty=!1,this.children.forEach(t)}}const wo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function To(t,e){const n=Ue.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Zt(s),t(o-e))};return qt.read(s,!0),()=>Zt(s)}function So(t,e,n){var s;if("string"==typeof t){let i=document;e&&(ze(Boolean(e.current)),i=e.current),n?(null!==(s=n[t])&&void 0!==s||(n[t]=i.querySelectorAll(t)),t=n[t]):t=i.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const bo=new WeakMap;function Eo(t,e){let n;const s=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return qt.update(s,!0),()=>Zt(s)}const Ao=Rn(()=>void 0!==window.ScrollTimeline);class Co{constructor(t){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(!Ao()||!e.attachTimeline)return e.pause(),Eo(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 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")}stop(){this.runAll("stop")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Vo(t){return t instanceof SVGElement&&"svg"!==t.tagName}const Mo={current:null},Ro={current:!1};function Do(){if(Ro.current=!0,u)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Mo.current=t.matches;t.addListener(e),e()}else Mo.current=!1}const Lo=[...tn,fn,wn],ko=Object.keys(R),Bo=ko.length,Fo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],jo=b.length;class Oo{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},r={}){this.resolveKeyframes=(t,e,n,s)=>new this.KeyframeResolver(t,e,n,s,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ln,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.scheduleRender=()=>qt.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=r,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=E(e),this.isVariantNode=A(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==a[t]&&Y(e)&&(e.set(a[t],!1),Us(u)&&u.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,bo.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)),Ro.current||Do(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Mo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){bo.delete(this.current),this.projection&&this.projection.unmount(),Zt(this.notifyUpdate),Zt(this.render),this.valueSubscriptions.forEach(t=>t()),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=H.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&qt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),i()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,i){let o,r;for(let t=0;t<Bo;t++){const n=ko[t],{isEnabled:s,Feature:i,ProjectionNode:a,MeasureLayout:l}=R[n];a&&(o=a),s(e)&&(!this.features[n]&&i&&(this.features[n]=new i(this)),l&&(r=l))}if(("html"===this.type||"svg"===this.type)&&!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:r,layoutScroll:a,layoutRoot:l}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||r&&P(r),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:a,layoutRoot:l})}return r}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,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<Fo.length;e++){const n=Fo[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){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(Y(o))t.addValue(i,o),Us(s)&&s.add(i);else if(Y(r))t.addValue(i,Ys(o,{owner:t})),Us(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const e=t.getValue(i);!e.hasAnimated&&e.set(o)}else{const e=t.getStaticValue(i);t.addValue(i,Ys(void 0!==e?e:o,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<jo;t++){const n=b[t],s=this.props[n];(w(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(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=Ys(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 i;return null!=s&&("string"==typeof s&&(He(s)||We(s))?s=parseFloat(s):(i=s,!Lo.find(Qe(i))&&wn.test(e)&&(s=Vn(t,e))),this.setBaseTarget(t,Y(s)?s.get():s)),Y(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e,n;const{initial:s}=this.props,i="string"==typeof s||"object"==typeof s?null===(n=zt(this.props,s,null===(e=this.presenceContext)||void 0===e?void 0:e.custom))||void 0===n?void 0:n[t]:void 0;if(s&&void 0!==i)return i;const o=this.getBaseTargetFromProps(this.props,t);return void 0===o||Y(o)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:o}on(t,e){return this.events[t]||(this.events[t]=new zs),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Io extends Oo{constructor(){super(...arguments),this.KeyframeResolver=Mn}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]}}class Uo extends Io{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(H.has(e)){const t=Cn(e);return t&&t.default||0}return e=It.has(e)?e:d(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return Nt(t,e)}build(t,e,n,s){Lt(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){Ut(t,e,0,s)}mount(t){this.isSVGTag=Bt(t.tagName),super.mount(t)}}class Wo extends Io{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,e){if(H.has(e)){const t=Cn(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),i=(Z(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Yi(t,e)}build(t,e,n,s){xt(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return Wt(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Y(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){Ot(t,e,n,s)}}function No(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Vo(t)?new Uo(e,{enableHardwareAcceleration:!1}):new Wo(e,{enableHardwareAcceleration:!0});n.mount(t),bo.set(t,n)}function zo(t,e,n){const s=Y(t)?t:Ys(t);return s.start(Is("",s,e,n)),s.animation}function Ho(t,e=100){const n=Wn({keyframes:[0,e],...t}),s=Math.min(Ss(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:Ve(s)}}function $o(t,e,n,s){var i;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(i=s.get(e))&&void 0!==i?i:t}const Yo=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function Go(t,e){return Xn(t)?t[Yo(0,t.length,e)]:t}function Xo(t,e,n,s,i,o){!function(t,e,n){for(let s=0;s<t.length;s++){const i=t[s];i.at>e&&i.at<n&&(Ns(t,i),s--)}}(t,i,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:rs(i,o,s[r]),easing:Go(n,r)})}function Ko(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function qo(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Zo(t,e){return e[t]||(e[t]=[]),e[t]}function _o(t){return Array.isArray(t)?t:[t]}function Jo(t,e){return t[e]?{...t,...t[e]}:{...t}}const Qo=t=>"number"==typeof t,tr=t=>t.every(Qo);function er(t,e,n,s){const i=So(t,s),o=i.length;ze(Boolean(o));const r=[];for(let t=0;t<o;t++){const s=i[t];bo.has(s)||No(s);const a=bo.get(s),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,o)),r.push(...qs(a,{...e,transition:l},{}))}return new Co(r)}function nr(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s){const i=e.duration||.3,o=new Map,r=new Map,a={},l=new Map;let u=0,c=0,h=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){l.set(o,c);continue}if(!Array.isArray(o)){l.set(o.name,$o(c,o.at,u,l));continue}let[d,m,p={}]=o;void 0!==p.at&&(c=$o(c,p.at,u,l));let f=0;const g=(t,n,s,o=0,r=0)=>{const a=_o(t),{delay:l=0,times:u=ws(a),type:d="keyframes",...m}=n;let{ease:p=e.ease||"easeOut",duration:g}=n;const y="function"==typeof l?l(o,r):l,v=a.length;if(v<=2&&"spring"===d){let t=100;if(2===v&&tr(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...m};void 0!==g&&(e.duration=Ce(g));const n=Ho(e,t);p=n.ease,g=n.duration}null!=g||(g=i);const x=c+y,P=x+g;1===u.length&&0===u[0]&&(u[1]=1);const w=u.length-a.length;w>0&&Ps(u,w),1===a.length&&a.unshift(null),Xo(s,a,p,u,x,P),f=Math.max(y+g,f),h=Math.max(P,h)};if(Y(d)){g(m,p,Zo("default",qo(d,r)))}else{const t=So(d,s,a),e=t.length;for(let n=0;n<e;n++){m=m,p=p;const s=qo(t[n],r);for(const t in m)g(m[t],Jo(p,t),Zo(t,s),n,e)}}u=c,c+=f}return r.forEach((t,s)=>{for(const i in t){const r=t[i];r.sort(Ko);const a=[],l=[],u=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:s}=r[t];a.push(n),l.push(os(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)),o.has(s)||o.set(s,{keyframes:{},transition:{}});const c=o.get(s);c.keyframes[i]=a,c.transition[i]={...e,duration:h,ease:u,times:l,...n}}}),o}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let i;i=Y(n)?zo(n,t.default,e.default):er(n,t,e),s.push(i)}),new Co(s)}const sr=t=>function(e,n,s){let i;var o;return o=e,i=Array.isArray(o)&&Array.isArray(o[0])?nr(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?er(e,n,s,t):zo(e,n,s),t&&t.animations.push(i),i},ir=sr(),or=new WeakMap;let rr;function ar({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=or.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 lr(t){t.forEach(ar)}function ur(t,e){rr||"undefined"!=typeof ResizeObserver&&(rr=new ResizeObserver(lr));const n=So(t);return n.forEach(t=>{let n=or.get(t);n||(n=new Set,or.set(t,n)),n.add(e),null==rr||rr.observe(t)}),()=>{n.forEach(t=>{const n=or.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==rr||rr.unobserve(t)})}}const cr=new Set;let hr;function dr(t){return cr.add(t),hr||(hr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};cr.forEach(t=>t(e))},window.addEventListener("resize",hr)),()=>{cr.delete(t),!cr.size&&hr&&(hr=void 0)}}const mr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function pr(t,e,n,s){const i=n[e],{length:o,position:r}=mr[e],a=i.current,l=n.time;i.current=t["scroll"+r],i.scrollLength=t["scroll"+o]-t["client"+o],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=os(0,i.scrollLength,i.current);const u=s-l;i.velocity=u>50?0:kn(i.current-a,u)}const fr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},gr={start:0,center:.5,end:1};function yr(t,e,n=0){let s=0;if(void 0!==gr[t]&&(t=gr[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 vr=[0,0];function xr(t,e,n,s){let i=Array.isArray(t)?t:vr,o=0,r=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,gr[t]?t:"0"]),o=yr(i[0],n,s),r=yr(i[1],e),o-r}const Pr={x:0,y:0};function wr(t,e,n){const{offset:s=fr.All}=n,{target:i=t,axis:o="y"}=n,r="y"===o?"height":"width",a=i!==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 i=null,o=s.parentNode;for(;!i;)"svg"===o.tagName&&(i=o),o=s.parentNode;s=i}}return n}(i,t):Pr,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(i),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=xr(s[t],u[r],l[r],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=xs(e[o].offset,ws(s)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function Tr(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){pr(t,"x",e,n),pr(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&wr(t,n,s)},notify:()=>e(n)}}const Sr=new WeakMap,br=new WeakMap,Er=new WeakMap,Ar=t=>t===document.documentElement?window:t;function Cr(t,{container:e=document.documentElement,...n}={}){let s=Er.get(e);s||(s=new Set,Er.set(e,s));const i=Tr(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(i),!Sr.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(_t.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{qt.read(t,!1,!0),qt.read(n,!1,!0),qt.update(i,!1,!0)};Sr.set(e,a);const l=Ar(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&br.set(e,(r=a,"function"==typeof(o=e)?dr(o):ur(o,r))),l.addEventListener("scroll",a,{passive:!0})}var o,r;const a=Sr.get(e);return qt.read(a,!1,!0),()=>{var t;Zt(a);const n=Er.get(e);if(!n)return;if(n.delete(i),n.size)return;const s=Sr.get(e);Sr.delete(e),s&&(Ar(e).removeEventListener("scroll",s),null===(t=br.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const Vr=new Map;function Mr({source:t=document.documentElement,axis:e="y"}={}){Vr.has(t)||Vr.set(t,{});const n=Vr.get(t);return n[e]||(n[e]=Ao()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},s=Cr(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:s}}({source:t,axis:e})),n[e]}const Rr={some:0,all:1};function Dr(t,e,{root:n,margin:s,amount:i="some"}={}){const o=So(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof i?i:Rr[i]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}function Lr(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=xs(i,o,{mixer:(l=o[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...r});var l;return e?a(s):a}const kr=qt,Br=g.reduce((t,e)=>(t[e]=t=>Zt(t),t),{}),Fr=["","X","Y","Z"],jr={visibility:"hidden"};let Or=0;const Ir={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Ur({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=Or++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var t;this.projectionUpdateScheduled=!1,Ir.totalNodes=Ir.resolvedTargetDeltas=Ir.recalculatedProjection=0,this.nodes.forEach(zr),this.nodes.forEach(qr),this.nodes.forEach(Zr),this.nodes.forEach(Hr),t=Ir,window.MotionDebug&&window.MotionDebug.record(t)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Po)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new zs),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Vo(e),this.instance=e;const{layoutId:s,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||s)&&(this.isLayoutDirty=!0),t){let n;const s=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=To(s,250),wo.hasAnimatedSinceResize&&(wo.hasAnimatedSinceResize=!1,this.nodes.forEach(Kr))})}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&o&&(s||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:s})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||o.getDefaultTransition()||na,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!fo(this.targetLayout,s)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...ke(i,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||Kr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Zt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(_r),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Yr);this.isUpdating||this.nodes.forEach(Gr),this.isUpdating=!1,window.HandoffCancelAllAnimations&&window.HandoffCancelAllAnimations(),this.nodes.forEach(Xr),this.nodes.forEach(Wr),this.nodes.forEach(Nr),this.clearAllSnapshots();const t=Ue.now();_t.delta=et(0,1e3/60,t-_t.timestamp),_t.timestamp=t,_t.isProcessing=!0,Jt.update.process(_t),Jt.preRender.process(_t),Jt.render.process(_t),_t.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,v.read(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach($r),this.sharedNodes.forEach(Jr)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,qt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){qt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!po(this.projectionDelta),n=this.getTransformTemplate(),s=n?n(this.latestValues,""):void 0,o=s!==this.prevTransformTemplateValue;t&&(e||Li(this.latestValues)||o)&&(i(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var s;return t&&(n=this.removeTransform(n)),oa((s=n).x),oa(s.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(Wi(e.x,n.offset.x),Wi(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ro(e,t);for(let n=0;n<this.path.length;n++){const s=this.path[n],{scroll:i,options:o}=s;if(s!==this.root&&i&&o.layoutScroll){if(i.isRoot){ro(e,t);const{scroll:n}=this.root;n&&(Wi(e.x,-n.offset.x),Wi(e.y,-n.offset.y))}Wi(e.x,i.offset.x),Wi(e.y,i.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};ro(n,t);for(let t=0;t<this.path.length;t++){const s=this.path[t];!e&&s.options.layoutScroll&&s.scroll&&s!==s.root&&$i(n,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),Li(s.latestValues)&&$i(n,s.latestValues)}return Li(this.latestValues)&&$i(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ro(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Li(n.latestValues))continue;Di(n.latestValues)&&n.updateSnapshot();const s={x:{min:0,max:0},y:{min:0,max:0}};ro(s,n.measurePageBox()),ho(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,s)}return Li(this.latestValues)&&ho(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==_t.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const s=Boolean(this.resumingFrom)||this!==n;if(!(t||s&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=_t.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},wi(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),ro(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,xi(r.x,a.x,l.x),xi(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ro(this.target,this.layout.layoutBox),Ii(this.target,this.targetDelta)):ro(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},wi(this.relativeTargetOrigin,this.target,t.target),ro(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Ir.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Di(this.parent.latestValues)&&!ki(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let s=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(s=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(s=!1),this.resolvedRelativeTargetAt===_t.timestamp&&(s=!1),s)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;ro(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,s=!1){const i=n.length;if(!i)return;let o,r;e.x=e.y=1;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const i=o.instance;i&&i.style&&"contents"===i.style.display||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&$i(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Ii(t,r)),s&&Li(o.latestValues)&&$i(t,o.latestValues))}e.x=Ui(e.x),e.y=Ui(e.y)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=e;if(!l)return void(this.projectionTransform&&(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const u=this.projectionTransform;vi(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=vo(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===r&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Ir.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const n=this.snapshot,s=n?n.latestValues:{},i={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(ea));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,m,p,f,g;Qr(o.x,t.x,n),Qr(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wi(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),m=this.relativeTarget,p=this.relativeTargetOrigin,f=r,g=n,ta(m.x,p.x,f.x,g),ta(m.y,p.y,f.y,g),h&&(l=this.relativeTarget,d=h,l.x.min===d.x.min&&l.x.max===d.x.max&&l.y.min===d.y.min&&l.y.max===d.y.max)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),ro(h,this.relativeTarget)),a&&(this.animationValues=i,function(t,e,n,s,i,o){i?(t.opacity=rs(0,void 0!==n.opacity?n.opacity:1,no(s)),t.opacityExit=rs(void 0!==e.opacity?e.opacity:1,0,so(s))):o&&(t.opacity=rs(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,s));for(let i=0;i<Ji;i++){const o=`border${_i[i]}Radius`;let r=eo(e,o),a=eo(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||to(r)===to(a)?(t[o]=Math.max(rs(Qi(r),Qi(a),s),0),(dt.test(a)||dt.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=rs(e.rotate||0,n.rotate||0,s))}(i,s,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Zt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=qt.update(()=>{wo.hasAnimatedSinceResize=!0,this.currentAnimation=zo(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:s,latestValues:i}=t;if(e&&n&&s){if(this!==t&&this.layout&&s&&ra(this.options.animationType,this.layout.layoutBox,s.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=fi(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const s=fi(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+s}ro(e,n),$i(e,i),vi(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new yo);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const s=this.getStack();s&&s.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const s={};for(let e=0;e<Fr.length;e++){const i="rotate"+Fr[e];n[i]&&(s[i]=n[i],t.setStaticValue(i,0))}t.render();for(const e in s)t.setStaticValue(e,s[e]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return jr;const s={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=Yt(null==t?void 0:t.pointerEvents)||"",s.transform=i?i(this.latestValues,""):"none",s;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Yt(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!Li(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),s.transform=vo(this.projectionDeltaWithTransform,this.treeScale,r),i&&(s.transform=i(r,s.transform));const{x:a,y:l}=this.projectionDelta;s.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?s.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:s.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in W){if(void 0===r[t])continue;const{correct:e,applyTo:n}=W[t],i="none"===s.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)s[n[e]]=i}else s[t]=i}return this.options.layoutId&&(s.pointerEvents=o===this?Yt(null==t?void 0:t.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(Yr),this.root.sharedNodes.clear()}}}function Wr(t){t.updateLayout()}function Nr(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:s}=t.layout,{animationType:i}=t.options,o=n.source!==t.layout.source;"size"===i?Vi(t=>{const s=o?n.measuredBox[t]:n.layoutBox[t],i=fi(s);s.min=e[t].min,s.max=s.min+i}):ra(i,n.layoutBox,e)&&Vi(s=>{const i=o?n.measuredBox[s]:n.layoutBox[s],r=fi(e[s]);i.max=i.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[s].max=t.relativeTarget[s].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};vi(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?vi(a,t.applyTransform(s,!0),n.measuredBox):vi(a,e,n.layoutBox);const l=!po(r);let u=!1;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:i,layout:o}=s;if(i&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};wi(r,n.layoutBox,i.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};wi(a,e,o.layoutBox),fo(r,a)||(u=!0),s.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function zr(t){Ir.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Hr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function $r(t){t.clearSnapshot()}function Yr(t){t.clearMeasurements()}function Gr(t){t.isLayoutDirty=!1}function Xr(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Kr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function qr(t){t.resolveTargetDelta()}function Zr(t){t.calcProjection()}function _r(t){t.resetRotation()}function Jr(t){t.removeLeadSnapshot()}function Qr(t,e,n){t.translate=rs(e.translate,0,n),t.scale=rs(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ta(t,e,n,s){t.min=rs(e.min,n.min,s),t.max=rs(e.max,n.max,s)}function ea(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const na={duration:.45,ease:[.4,0,.1,1]},sa=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ia=sa("applewebkit/")&&!sa("chrome/")?Math.round:Kt;function oa(t){t.min=ia(t.min),t.max=ia(t.max)}function ra(t,e,n){return"position"===t||"preserve-aspect"===t&&!gi(go(e),go(n),.2)}const aa=Ur({attachResizeListener:(t,e)=>ne(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),la={current:void 0},ua=Ur({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!la.current){const t=new aa({});t.mount(window),t.setOptions({layoutScroll:!0}),la.current=t}return la.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),ca=t=>!t.isLayoutDirty&&t.willUpdate(!1);function ha(){const t=new Set,e=new WeakMap,n=()=>t.forEach(ca);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const i=e.get(s);i&&(i(),e.delete(s)),n()},dirty:n}}function da(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ma={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!mt.test(t))return t;t=parseFloat(t)}return`${da(t,e.target.x)}% ${da(t,e.target.y)}%`}},pa={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=wn.parse(t);if(i.length>5)return s;const o=wn.createTransformer(t),r="number"!=typeof i[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=rs(a,l,.5);return"number"==typeof i[2+r]&&(i[2+r]/=u),"number"==typeof i[3+r]&&(i[3+r]/=u),o(i)}};function fa(){const t=e.useContext(l);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,o=e.useId();e.useEffect(()=>i(o),[]);return!n&&s?[!1,()=>s&&s(o)]:[!0]}class ga extends o.default.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=t;N(va),i&&(e.group&&e.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),wo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,s||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||qt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),v.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ya(t){const[n,s]=fa(),i=e.useContext(L);return o.default.createElement(ga,{...t,layoutGroup:i,switchLayoutGroup:e.useContext(k),isPresent:n,safeToRemove:s})}const va={borderRadius:{...ma,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ma,borderTopRightRadius:ma,borderBottomLeftRadius:ma,borderBottomRightRadius:ma,boxShadow:pa},xa={pan:{Feature:class extends pe{constructor(){super(...arguments),this.removePointerDownListener=Kt}onPointerDown(t){this.session=new li(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Gi(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:Zi(t),onStart:Zi(e),onMove:n,onEnd:(t,e)=>{delete this.session,s&&s(t,e)}}}mount(){this.removePointerDownListener=re(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends pe{constructor(t){super(t),this.removeGroupControls=Kt,this.removeListeners=Kt,this.controls=new Ki(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Kt}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ua,MeasureLayout:ya}},Pa=(t,e)=>U(t)?new Uo(e,{enableHardwareAcceleration:!1}):new Wo(e,{enableHardwareAcceleration:!0}),wa={layout:{ProjectionNode:ua,MeasureLayout:ya}},Ta={...oi,...be,...xa,...wa},Sa=O((t,e)=>ee(t,e,Ta,Pa));const ba=O(ee);function Ea(){const t=e.useRef(!1);return c(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Aa(){const t=Ea(),[n,s]=e.useState(0),i=e.useCallback(()=>{t.current&&s(n+1)},[n]);return[e.useCallback(()=>qt.postRender(i),[i]),n]}class Ca extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Va({children:t,isPresent:n}){const s=e.useId(),o=e.useRef(null),a=e.useRef({width:0,height:0,top:0,left:0}),{nonce:l}=e.useContext(r);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:r}=a.current;if(n||!o.current||!t||!e)return;o.current.dataset.motionPopId=s;const u=document.createElement("style");return l&&(u.nonce=l),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${i}px !important;\n left: ${r}px !important;\n }\n `),()=>{document.head.removeChild(u)}},[n]),i.createElement(Ca,{isPresent:n,childRef:o,sizeRef:a},i.cloneElement(t,{ref:o}))}const Ma=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:u})=>{const c=Ht(Ra),h=e.useId(),d=e.useMemo(()=>({id:h,initial:n,isPresent:s,custom:r,onExitComplete:t=>{c.set(t,!0);for(const t of c.values())if(!t)return;o&&o()},register:t=>(c.set(t,!1),()=>c.delete(t))}),a?void 0:[s]);return e.useMemo(()=>{c.forEach((t,e)=>c.set(e,!1))},[s]),i.useEffect(()=>{!s&&!c.size&&o&&o()},[s]),"popLayout"===u&&(t=i.createElement(Va,{isPresent:s},t)),i.createElement(l.Provider,{value:d},t)};function Ra(){return new Map}function Da(t){return e.useEffect(()=>()=>t(),[])}const La=t=>t.key||"";function ka(t){return"function"==typeof t}const Ba=e.createContext(null),Fa=t=>!0===t,ja=({children:t,id:n,inherit:s=!0})=>{const o=e.useContext(L),r=e.useContext(Ba),[a,l]=Aa(),u=e.useRef(null),c=o.id||r;null===u.current&&((t=>Fa(!0===t)||"id"===t)(s)&&c&&(n=n?c+"-"+n:c),u.current={id:n,group:Fa(s)&&o.group||ha()});const h=e.useMemo(()=>({...u.current,forceRender:a}),[l]);return i.createElement(L.Provider,{value:h},t)},Oa=e.createContext(null);function Ia(t){return t.value}function Ua(t,e){return t.layout.min-e.layout.min}function Wa(t){const n=Ht(()=>Ys(t)),{isStatic:s}=e.useContext(r);if(s){const[,s]=e.useState(t);e.useEffect(()=>n.on("change",s),[])}return n}function Na(t,e){const n=Wa(e()),s=()=>n.set(e());return s(),c(()=>{const e=()=>qt.update(s,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),Zt(s)}}),n}function za(t,e,n,s){if("function"==typeof t)return function(t){Hs.current=[],t();const e=Na(Hs.current,t);return Hs.current=void 0,e}(t);const i="function"==typeof e?e:Lr(e,n,s);return Array.isArray(t)?Ha(t,i):Ha([t],([t])=>i(t))}function Ha(t,e){const n=Ht(()=>[]);return Na(t,()=>{n.length=0;const s=t.length;for(let e=0;e<s;e++)n[e]=t[e].get();return e(n)})}function $a(t,e=0){return Y(t)?t:Wa(e)}const Ya={Group:e.forwardRef((function({children:t,as:n="ul",axis:s="y",onReorder:o,values:r,...a},l){const u=Ht(()=>Sa(n)),c=[],h=e.useRef(!1);ze(Boolean(r));const d={axis:s,registerItem:(t,e)=>{const n=c.findIndex(e=>t===e.value);-1!==n?c[n].layout=e[s]:c.push({value:t,layout:e[s]}),c.sort(Ua)},updateOrder:(t,e,n)=>{if(h.current)return;const s=function(t,e,n,s){if(!s)return t;const i=t.findIndex(t=>t.value===e);if(-1===i)return t;const o=s>0?1:-1,r=t[i+o];if(!r)return t;const a=t[i],l=r.layout,u=rs(l.min,l.max,.5);return 1===o&&a.layout.max+n>u||-1===o&&a.layout.min+n<u?function([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const s=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(s,0,i)}return t}(t,i,i+o):t}(c,t,e,n);c!==s&&(h.current=!0,o(s.map(Ia).filter(t=>-1!==r.indexOf(t))))}};return e.useEffect(()=>{h.current=!1}),i.createElement(u,{...a,ref:l,ignoreStrict:!0},i.createElement(Oa.Provider,{value:d},t))})),Item:e.forwardRef((function({children:t,style:n={},value:s,as:o="li",onDrag:r,layout:a=!0,...l},u){const c=Ht(()=>Sa(o)),h=e.useContext(Oa),d={x:$a(n.x),y:$a(n.y)},m=za([d.x,d.y],([t,e])=>t||e?1:"unset");ze(Boolean(h));const{axis:p,registerItem:f,updateOrder:g}=h;return i.createElement(c,{drag:p,...l,dragSnapToOrigin:!0,style:{...n,x:d.x,y:d.y,zIndex:m},layout:a,onDrag:(t,e)=>{const{velocity:n}=e;n[p]&&g(s,d[p].get(),n[p]),r&&r(t,e)},onLayoutMeasure:t=>f(s,t),ref:u,ignoreStrict:!0},t)}))},Ga={renderer:Pa,...oi,...be},Xa={...Ga,...xa,...wa};function Ka(t,n,s){e.useInsertionEffect(()=>t.on(n,s),[t,n,s])}function qa(t,e){Ne(Boolean(!e||e.current))}const Za=()=>({scrollX:Ys(0),scrollY:Ys(0),scrollXProgress:Ys(0),scrollYProgress:Ys(0)});function _a({container:t,target:n,layoutEffect:s=!0,...i}={}){const o=Ht(Za);return(s?c:e.useEffect)(()=>(qa(0,n),qa(0,t),Cr(({x:t,y:e})=>{o.scrollX.set(t.current),o.scrollXProgress.set(t.progress),o.scrollY.set(e.current),o.scrollYProgress.set(e.progress)},{...i,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[t,n,JSON.stringify(i.offset)]),o}function Ja(t){const n=e.useRef(0),{isStatic:s}=e.useContext(r);e.useEffect(()=>{if(s)return;const e=({timestamp:e,delta:s})=>{n.current||(n.current=e),t(e-n.current,s)};return qt.update(e,!0),()=>Zt(e)},[t])}class Qa extends $s{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;H.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||Z(t)||"willChange"===t||(e=d(t)),e&&(Ws(this.members,e),this.update())}remove(t){H.has(t)?(this.transforms.delete(t),this.transforms.size||Ns(this.members,"transform")):Ns(this.members,d(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function tl(){!Ro.current&&Do();const[t]=e.useState(Mo.current);return t}function el(t,e){[...e].reverse().forEach(n=>{const s=t.getVariant(n);s&&Xs(t,s),t.variantChildren&&t.variantChildren.forEach(t=>{el(t,e)})})}function nl(){let t=!1;const e=new Set,n={subscribe:t=>(e.add(t),()=>{e.delete(t)}),start(n,s){ze(t);const i=[];return e.forEach(t=>{i.push(Js(t,n,{transitionOverride:s}))}),Promise.all(i)},set:n=>(ze(t),e.forEach(t=>{!function(t,e){Array.isArray(e)?el(t,e):"string"==typeof e?el(t,[e]):Xs(t,e)}(t,n)})),stop(){e.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>(t=!0,()=>{t=!1,n.stop()})};return n}function sl(){const t=Ht(nl);return c(t.mount,[]),t}const il=sl;class ol{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const rl=()=>new ol;function al(t){return null!==t&&"object"==typeof t&&B in t}function ll(){return ul}function ul(t){la.current&&(la.current.isUpdating=!1,la.current.blockUpdate(),t&&t())}const cl=(t,e)=>`${t}: ${e}`,hl=new Map;let dl,ml,pl;function fl(t,e,n,s){const i=H.has(e)?"transform":e,o=cl(t,i),r=hl.get(o);if(!r)return null;const{animation:a,startTime:l}=r;return null===l||window.HandoffComplete?((()=>{hl.delete(o);try{a.cancel()}catch(t){}})(),null):(void 0===dl&&(dl=performance.now()),dl-l||0)}const gl=()=>({});class yl extends Oo{build(){}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const vl=Gt({scrapeMotionValuesFromProps:gl,createRenderState:gl});const xl=t=>t>.001?1/t:1e5;let Pl=!1;let wl=0;t.AnimatePresence=({children:t,custom:n,initial:s=!0,onExitComplete:o,exitBeforeEnter:r,presenceAffectsLayout:a=!0,mode:l="sync"})=>{ze(!r);const u=e.useContext(L).forceRender||Aa()[0],h=Ea(),d=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let m=d;const p=e.useRef(new Map).current,f=e.useRef(m),g=e.useRef(new Map).current,y=e.useRef(!0);if(c(()=>{y.current=!1,function(t,e){t.forEach(t=>{const n=La(t);e.set(n,t)})}(d,g),f.current=m}),Da(()=>{y.current=!0,g.clear(),p.clear()}),y.current)return i.createElement(i.Fragment,null,m.map(t=>i.createElement(Ma,{key:La(t),isPresent:!0,initial:!!s&&void 0,presenceAffectsLayout:a,mode:l},t)));m=[...m];const v=f.current.map(La),x=d.map(La),P=v.length;for(let t=0;t<P;t++){const e=v[t];-1!==x.indexOf(e)||p.has(e)||p.set(e,void 0)}return"wait"===l&&p.size&&(m=[]),p.forEach((t,e)=>{if(-1!==x.indexOf(e))return;const s=g.get(e);if(!s)return;const r=v.indexOf(e);let c=t;if(!c){const t=()=>{p.delete(e);const t=Array.from(g.keys()).filter(t=>!x.includes(t));if(t.forEach(t=>g.delete(t)),f.current=d.filter(n=>{const s=La(n);return s===e||t.includes(s)}),!p.size){if(!1===h.current)return;u(),o&&o()}};c=i.createElement(Ma,{key:La(s),isPresent:!1,onExitComplete:t,custom:n,presenceAffectsLayout:a,mode:l},s),p.set(e,c)}m.splice(r,0,c)}),m=m.map(t=>{const e=t.key;return p.has(e)?t:i.createElement(Ma,{key:La(t),isPresent:!0,presenceAffectsLayout:a,mode:l},t)}),i.createElement(i.Fragment,null,p.size?m:m.map(t=>e.cloneElement(t)))},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{ze(!1)},[]),i.createElement(ja,{id:Ht(()=>"asl-"+wl++)},t)),t.DeprecatedLayoutGroupContext=Ba,t.DragControls=ol,t.FlatTree=Po,t.LayoutGroup=ja,t.LayoutGroupContext=L,t.LazyMotion=function({children:t,features:n,strict:s=!1}){const[,o]=e.useState(!ka(n)),r=e.useRef(void 0);if(!ka(n)){const{renderer:t,...e}=n;r.current=t,D(e)}return e.useEffect(()=>{ka(n)&&n().then(({renderer:t,...e})=>{D(e),r.current=t,o(!0)})},[]),i.createElement(h.Provider,{value:{renderer:r.current,strict:s}},t)},t.MotionConfig=function({children:t,isValidProp:n,...s}){n&&Ct(n),(s={...e.useContext(r),...s}).isStatic=Ht(()=>s.isStatic);const o=e.useMemo(()=>s,[JSON.stringify(s.transition),s.transformPagePoint,s.reducedMotion]);return i.createElement(r.Provider,{value:o},t)},t.MotionConfigContext=r,t.MotionContext=a,t.MotionGlobalConfig=p,t.MotionValue=$s,t.PresenceContext=l,t.Reorder=Ya,t.SwitchLayoutGroupContext=k,t.VisualElement=Oo,t.addPointerEvent=re,t.addPointerInfo=oe,t.addScaleCorrector=N,t.animate=ir,t.animateValue=Vs,t.animateVisualElement=Js,t.animationControls=nl,t.animations=oi,t.anticipate=ns,t.backIn=ts,t.backInOut=es,t.backOut=Qn,t.buildTransform=K,t.calcLength=fi,t.cancelFrame=Zt,t.cancelSync=Br,t.circIn=Zn,t.circInOut=Jn,t.circOut=_n,t.clamp=et,t.color=fn,t.complex=wn,t.createBox=Ci,t.createDomMotionComponent=function(t){return F(ee(t,{forwardMotionProps:!1},Ta,Pa))},t.createMotionComponent=F,t.createScopedAnimate=sr,t.cubicBezier=Hn,t.delay=To,t.disableInstantTransitions=function(){Be.current=!1},t.distance=ri,t.distance2D=ai,t.domAnimation=Ga,t.domMax=Xa,t.easeIn=$n,t.easeInOut=Gn,t.easeOut=Yn,t.filterProps=Vt,t.frame=qt,t.frameData=_t,t.inView=Dr,t.interpolate=xs,t.invariant=ze,t.isBrowser=u,t.isDragActive=me,t.isMotionComponent=al,t.isMotionValue=Y,t.isValidMotionProp=Et,t.m=ba,t.makeUseVisualState=Gt,t.mirrorEasing=Kn,t.mix=vs,t.motion=Sa,t.motionValue=Ys,t.optimizedAppearDataAttribute=m,t.pipe=le,t.progress=os,t.px=mt,t.resolveMotionValue=Yt,t.reverseEasing=qn,t.scroll=function(t,e){const n=Mr(e);return"function"==typeof t?Eo(t,n):t.attachTimeline(n)},t.scrollInfo=Cr,t.spring=Wn,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,o)=>{const r="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(r-i);let l=t*a;if(s){const e=o*t;l=is(s)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,s,i){if(window.HandoffComplete)return void(window.HandoffAppearAnimations=void 0);const o=t.dataset.framerAppearId;if(!o)return;window.HandoffAppearAnimations=fl;const r=cl(o,e);pl||(pl=Bs(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),hl.set(r,{animation:pl,startTime:null}),window.HandoffCancelAllAnimations||(window.HandoffCancelAllAnimations=()=>{hl.forEach(({animation:t})=>{t.cancel()}),hl.clear(),window.HandoffCancelAllAnimations=void 0}));const a=()=>{pl.cancel();const o=Bs(t,e,n,s);void 0===ml&&(ml=performance.now()),o.startTime=ml,hl.set(r,{animation:o,startTime:ml}),i&&i(o)};pl.ready?pl.ready.then(a).catch(Kt):a()},t.steps=Jt,t.sync=kr,t.transform=Lr,t.unwrapMotionComponent=function(t){if(al(t))return t[B]},t.useAnimate=function(){const t=Ht(()=>({current:null,animations:[]})),e=Ht(()=>sr(t));return Da(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=il,t.useAnimationControls=sl,t.useAnimationFrame=Ja,t.useCycle=function(...t){const n=e.useRef(0),[s,i]=e.useState(t[n.current]);return[s,e.useCallback(e=>{n.current="number"!=typeof e?Yo(0,t.length,n.current+1):e,i(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,s]=e.useState(t),i=vl({},!1),o=Ht(()=>new yl({props:{},visualState:i,presenceContext:null},{initialState:t}));return e.useEffect(()=>(o.mount({}),()=>o.unmount()),[o]),e.useEffect(()=>{o.update({onUpdate:t=>{s({...t})}},null)},[s,o]),[n,Ht(()=>t=>Js(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=Wa(1),s=Wa(1);const{visualElement:i}=e.useContext(a);return ze(!(!t&&!i)),Ne(Pl),Pl=!0,t?(n=t.scaleX||n,s=t.scaleY||s):i&&(n=i.getValue("scaleX",1),s=i.getValue("scaleY",1)),{scaleX:za(n,xl),scaleY:za(s,xl)}},t.useDomEvent=function(t,n,s,i){e.useEffect(()=>{const e=t.current;if(s&&e)return ne(e,n,s,i)},[t,n,s,i])},t.useDragControls=function(){return Ht(rl)},t.useElementScroll=function(t){return _a({container:t})},t.useForceUpdate=Aa,t.useInView=function(t,{root:n,margin:s,amount:i,once:o=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||o&&r)return;const e={root:n&&n.current||void 0,margin:s,amount:i};return Dr(t.current,()=>(a(!0),o?void 0:()=>a(!1)),e)},[n,t,s,o,i]),r},t.useInstantLayoutTransition=ll,t.useInstantTransition=function(){const[t,n]=Aa(),s=ll(),i=e.useRef();return e.useEffect(()=>{qt.postRender(()=>qt.postRender(()=>{n===i.current&&(Be.current=!1)}))},[n]),e=>{s(()=>{Be.current=!0,t(),e(),i.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(l))||t.isPresent;var t},t.useIsomorphicLayoutEffect=c,t.useMotionTemplate=function(t,...e){const n=t.length;return Na(e.filter(Y),(function(){let s="";for(let i=0;i<n;i++){s+=t[i];const n=e[i];n&&(s+=Y(n)?n.get():n)}return s}))},t.useMotionValue=Wa,t.useMotionValueEvent=Ka,t.usePresence=fa,t.useReducedMotion=tl,t.useReducedMotionConfig=function(){const t=tl(),{reducedMotion:n}=e.useContext(r);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return i.useCallback(()=>{const t=la.current;t&&t.resetTree()},[])},t.useScroll=_a,t.useSpring=function(t,n={}){const{isStatic:s}=e.useContext(r),i=e.useRef(null),o=Wa(Y(t)?t.get():t),a=()=>{i.current&&i.current.stop()};return e.useInsertionEffect(()=>o.attach((t,e)=>{if(s)return e(t);const r=i.current;return r&&0===r.time&&r.sample(_t.delta),a(),i.current=Vs({keyframes:[o.get(),t],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:e}),o.get()},a),[JSON.stringify(n)]),c(()=>{if(Y(t))return t.on("change",t=>o.set(parseFloat(t)))},[o]),o},t.useTime=function(){const t=Wa(0);return Ja(e=>t.set(e)),t},t.useTransform=za,t.useUnmountEffect=Da,t.useVelocity=function(t){const e=Wa(t.getVelocity()),n=()=>{const s=t.getVelocity();e.set(s),s&&qt.update(n)};return Ka(t,"change",()=>{qt.update(n,!1,!0)}),e},t.useViewportScroll=function(){return _a()},t.useWillChange=function(){return Ht(()=>new Qa("auto"))},t.visualElementStore=bo,t.warning=Ne,t.wrap=Yo,Object.defineProperty(t,"__esModule",{value:!0})}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function s(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=s(e),o=n(e);const r=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),a=e.createContext({}),l=e.createContext(null),u="undefined"!=typeof document,c=u?e.useLayoutEffect:e.useEffect,h=e.createContext({strict:!1}),d=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),m="data-"+d("framerAppearId"),p={skipAnimations:!1,useManualTiming:!1};class f{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const e=this.order.indexOf(t);-1!==e&&(this.order.splice(e,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}const g=["read","resolveKeyframes","update","preRender","render","postRender"];function y(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=g.reduce((t,e)=>(t[e]=function(t){let e=new f,n=new f,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(t,o=!1,a=!1)=>{const l=a&&i,u=l?e:n;return o&&r.add(t),u.add(t)&&l&&i&&(s=e.order.length),t},cancel:t=>{n.remove(t),r.delete(t)},process:l=>{if(i)o=!0;else{if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let n=0;n<s;n++){const s=e.order[n];r.has(s)&&(a.schedule(s),t()),s(l)}i=!1,o&&(o=!1,a.process(l))}}};return a}(()=>n=!0),t),{}),r=t=>{o[t].process(i)},a=()=>{const o=p.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(o-i.timestamp,40),1),i.timestamp=o,i.isProcessing=!0,g.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))};return{schedule:g.reduce((e,r)=>{const l=o[r];return e[r]=(e,o=!1,r=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(a)),l.schedule(e,o,r)),e},{}),cancel:t=>g.forEach(e=>o[e].cancel(t)),state:i,steps:o}}const{schedule:v,cancel:x}=y(queueMicrotask,!1);function P(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function w(t){return"string"==typeof t||Array.isArray(t)}function T(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const S=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],b=["initial",...S];function E(t){return T(t.animate)||b.some(e=>w(t[e]))}function A(t){return Boolean(E(t)||t.variants)}function C(t){const{initial:n,animate:s}=function(t,e){if(E(t)){const{initial:e,animate:n}=t;return{initial:!1===e||w(e)?e:void 0,animate:w(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(a));return e.useMemo(()=>({initial:n,animate:s}),[V(n),V(s)])}function V(t){return Array.isArray(t)?t.join(" "):t}const M={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"]},R={};for(const t in M)R[t]={isEnabled:e=>M[t].some(t=>!!e[t])};function D(t){for(const e in t)R[e]={...R[e],...t[e]}}const L=e.createContext({}),k=e.createContext({}),B=Symbol.for("motionComponentSymbol");function F({preloadedFeatures:t,createVisualElement:n,useRender:s,useVisualState:o,Component:d}){t&&D(t);const p=e.forwardRef((function(p,f){let g;const y={...e.useContext(r),...p,layoutId:j(p)},{isStatic:x}=y,w=C(p),T=o(p,x);if(!x&&u){w.visualElement=function(t,n,s,i){const{visualElement:o}=e.useContext(a),u=e.useContext(h),d=e.useContext(l),p=e.useContext(r).reducedMotion,f=e.useRef();i=i||u.renderer,!f.current&&i&&(f.current=i(t,{visualState:n,parent:o,props:s,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:p}));const g=f.current;e.useInsertionEffect(()=>{g&&g.update(s,d)});const y=e.useRef(Boolean(s[m]&&!window.HandoffComplete));return c(()=>{g&&(v.postRender(g.render),y.current&&g.animationState&&g.animationState.animateChanges())}),e.useEffect(()=>{g&&(g.updateFeatures(),!y.current&&g.animationState&&g.animationState.animateChanges(),y.current&&(y.current=!1,window.HandoffComplete=!0))}),g}(d,T,y,n);const s=e.useContext(k),i=e.useContext(h).strict;w.visualElement&&(g=w.visualElement.loadFeatures(y,i,t,s))}return i.createElement(a.Provider,{value:w},g&&w.visualElement?i.createElement(g,{visualElement:w.visualElement,...y}):null,s(d,p,function(t,n,s){return e.useCallback(e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),s&&("function"==typeof s?s(e):P(s)&&(s.current=e))},[n])}(T,w.visualElement,f),T,x,w.visualElement))}));return p[B]=d,p}function j({layoutId:t}){const n=e.useContext(L).id;return n&&void 0!==t?n+"-"+t:t}function O(t){function e(e,n={}){return F(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,s)=>(n.has(s)||n.set(s,e(s)),n.get(s))})}const I=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function U(t){return"string"==typeof t&&!t.includes("-")&&!!(I.indexOf(t)>-1||/[A-Z]/u.test(t))}const W={};function N(t){Object.assign(W,t)}const z=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],H=new Set(z);function $(t,{layout:e,layoutId:n}){return H.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!W[t]||"opacity"===t)}const Y=t=>Boolean(t&&t.getVelocity),G={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},X=z.length;function K(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let e=0;e<X;e++){const n=z[e];if(void 0!==t[n]){o+=`${G[n]||n}(${t[n]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const q=t=>e=>"string"==typeof e&&e.startsWith(t),Z=q("--"),_=q("var(--"),J=t=>!!_(t)&&Q.test(t.split("/*")[0].trim()),Q=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,tt=(t,e)=>e&&"number"==typeof t?e.transform(t):t,et=(t,e,n)=>n>e?e:n<t?t:n,nt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},st={...nt,transform:t=>et(0,1,t)},it={...nt,default:1},ot=t=>Math.round(1e5*t)/1e5,rt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,at=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,lt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ut(t){return"string"==typeof t}const ct=t=>({test:e=>ut(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ht=ct("deg"),dt=ct("%"),mt=ct("px"),pt=ct("vh"),ft=ct("vw"),gt={...dt,parse:t=>dt.parse(t)/100,transform:t=>dt.transform(100*t)},yt={...nt,transform:Math.round},vt={borderWidth:mt,borderTopWidth:mt,borderRightWidth:mt,borderBottomWidth:mt,borderLeftWidth:mt,borderRadius:mt,radius:mt,borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomRightRadius:mt,borderBottomLeftRadius:mt,width:mt,maxWidth:mt,height:mt,maxHeight:mt,size:mt,top:mt,right:mt,bottom:mt,left:mt,padding:mt,paddingTop:mt,paddingRight:mt,paddingBottom:mt,paddingLeft:mt,margin:mt,marginTop:mt,marginRight:mt,marginBottom:mt,marginLeft:mt,rotate:ht,rotateX:ht,rotateY:ht,rotateZ:ht,scale:it,scaleX:it,scaleY:it,scaleZ:it,skew:ht,skewX:ht,skewY:ht,distance:mt,translateX:mt,translateY:mt,translateZ:mt,x:mt,y:mt,z:mt,perspective:mt,transformPerspective:mt,opacity:st,originX:gt,originY:gt,originZ:mt,zIndex:yt,fillOpacity:st,strokeOpacity:st,numOctaves:yt};function xt(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const t in e){const n=e[t];if(Z(t)){o[t]=n;continue}const s=vt[t],h=tt(n,s);if(H.has(t)){if(l=!0,r[t]=h,!c)continue;n!==(s.default||0)&&(c=!1)}else t.startsWith("origin")?(u=!0,a[t]=h):i[t]=h}if(e.transform||(l||s?i.transform=K(t.transform,n,c,s):i.transform&&(i.transform="none")),u){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;i.transformOrigin=`${t} ${e} ${n}`}}const Pt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function wt(t,e,n){for(const s in e)Y(e[s])||$(s,n)||(t[s]=e[s])}function Tt(t,n,s){const i={};return wt(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n,s){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return xt(e,n,{enableHardwareAcceleration:!s},t),Object.assign({},e.vars,e.style)},[n])}(t,n,s)),i}function St(t,e,n){const s={},i=Tt(t,e,n);return t.drag&&!1!==t.dragListener&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const bt=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Et(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||bt.has(t)}let At=t=>!Et(t);function Ct(t){t&&(At=e=>e.startsWith("on")?!Et(e):t(e))}try{Ct(require("@emotion/is-prop-valid").default)}catch(t){}function Vt(t,e,n){const s={};for(const i in t)"values"===i&&"object"==typeof t.values||(At(i)||!0===n&&Et(i)||!e&&!Et(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Mt(t,e,n){return"string"==typeof t?t:mt.transform(e+n*t)}const Rt={offset:"stroke-dashoffset",array:"stroke-dasharray"},Dt={offset:"strokeDashoffset",array:"strokeDasharray"};function Lt(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h,d){if(xt(t,u,c,d),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:m,style:p,dimensions:f}=t;m.transform&&(f&&(p.transform=m.transform),delete m.transform),f&&(void 0!==i||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Mt(e,t.x,t.width)} ${Mt(n,t.y,t.height)}`}(f,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==e&&(m.x=e),void 0!==n&&(m.y=n),void 0!==s&&(m.scale=s),void 0!==r&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Rt:Dt;t[o.offset]=mt.transform(-s);const r=mt.transform(e),a=mt.transform(n);t[o.array]=`${r} ${a}`}(m,r,a,l,!1)}const kt=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Bt=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Ft(t,n,s,i){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Lt(e,n,{enableHardwareAcceleration:!1},Bt(i),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};wt(e,t.style,t),o.style={...e,...o.style}}return o}function jt(t=!1){return(n,s,i,{latestValues:o},r)=>{const a=(U(n)?Ft:St)(s,o,r,n),l=Vt(s,"string"==typeof n,t),u=n!==e.Fragment?{...l,...a,ref:i}:{},{children:c}=s,h=e.useMemo(()=>Y(c)?c.get():c,[c]);return e.createElement(n,{...u,children:h})}}function Ot(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const It=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 Ut(t,e,n,s){Ot(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(It.has(n)?n:d(n),e.attrs[n])}function Wt(t,e){const{style:n}=t,s={};for(const i in n)(Y(n[i])||e.style&&Y(e.style[i])||$(i,t))&&(s[i]=n[i]);return s}function Nt(t,e){const n=Wt(t,e);for(const s in t)if(Y(t[s])||Y(e[s])){n[-1!==z.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return n}function zt(t,e,n,s={},i={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),e}function Ht(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const $t=t=>Array.isArray(t);function Yt(t){const e=Y(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const Gt=t=>(n,s)=>{const i=e.useContext(a),o=e.useContext(l),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Xt(s,i,o,t),renderState:e()};return n&&(r.mount=t=>n(s,t,r)),r}(t,n,i,o);return s?r():Ht(r)};function Xt(t,e,n,s){const i={},o=s(t,{});for(const t in o)i[t]=Yt(o[t]);let{initial:r,animate:a}=t;const l=E(t),u=A(t);e&&u&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===r;const h=c?a:r;if(h&&"boolean"!=typeof h&&!T(h)){(Array.isArray(h)?h:[h]).forEach(e=>{const n=zt(t,e);if(!n)return;const{transitionEnd:s,transition:o,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(i[t]=e)}for(const t in s)i[t]=s[t]})}return i}const Kt=t=>t,{schedule:qt,cancel:Zt,state:_t,steps:Jt}=y("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Kt,!0),Qt={useVisualState:Gt({scrapeMotionValuesFromProps:Nt,createRenderState:kt,onMount:(t,e,{renderState:n,latestValues:s})=>{qt.read(()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}}),qt.render(()=>{Lt(n,s,{enableHardwareAcceleration:!1},Bt(e.tagName),t.transformTemplate),Ut(e,n)})}})},te={useVisualState:Gt({scrapeMotionValuesFromProps:Wt,createRenderState:Pt})};function ee(t,{forwardMotionProps:e=!1},n,s){return{...U(t)?Qt:te,preloadedFeatures:n,useRender:jt(e),createVisualElement:s,Component:t}}function ne(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const se=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function ie(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const oe=t=>e=>se(e)&&t(e,ie(e));function re(t,e,n,s){return ne(t,e,oe(n),s)}const ae=(t,e)=>n=>e(t(n)),le=(...t)=>t.reduce(ae);function ue(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const ce=ue("dragHorizontal"),he=ue("dragVertical");function de(t){let e=!1;if("y"===t)e=he();else if("x"===t)e=ce();else{const t=ce(),n=he();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function me(){const t=de(!0);return!t||(t(),!1)}class pe{constructor(t){this.isMounted=!1,this.node=t}update(){}}function fe(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return re(t.current,n,(n,i)=>{if("touch"===n.pointerType||me())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[s]&&o[s](n,i)},{passive:!t.getProps()[s]})}const ge=(t,e)=>!!e&&(t===e||ge(t,e.parentElement));function ye(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,ie(n))}const ve=new WeakMap,xe=new WeakMap,Pe=t=>{const e=ve.get(t.target);e&&e(t)},we=t=>{t.forEach(Pe)};function Te(t,e,n){const s=function({root:t,...e}){const n=t||document;xe.has(n)||xe.set(n,{});const s=xe.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(we,{root:t,...e})),s[i]}(e);return ve.set(t,n),s.observe(t),()=>{ve.delete(t),s.unobserve(t)}}const Se={some:0,all:1};const be={inView:{Feature:class extends pe{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:i}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:Se[s]};return Te(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,i&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),o=e?n:s;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends pe{constructor(){super(...arguments),this.removeStartListeners=Kt,this.removeEndListeners=Kt,this.removeAccessibleListeners=Kt,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),s=re(window,"pointerup",(t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s,globalTapTarget:i}=this.node.getProps();i||ge(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)},{passive:!(n.onTap||n.onPointerUp)}),i=re(window,"pointercancel",(t,e)=>this.cancelPress(t,e),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=le(s,i),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=ne(this.node.current,"keydown",t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=ne(this.node.current,"keyup",t=>{"Enter"===t.key&&this.checkPressEnd()&&ye("up",(t,e)=>{const{onTap:n}=this.node.getProps();n&&n(t,e)})}),ye("down",(t,e)=>{this.startPress(t,e)})}),e=ne(this.node.current,"blur",()=>{this.isPressing&&ye("cancel",(t,e)=>this.cancelPress(t,e))});this.removeAccessibleListeners=le(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&n(t,e)}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!me()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&n(t,e)}mount(){const t=this.node.getProps(),e=re(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=ne(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=le(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends pe{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=le(ne(this.node.current,"focus",()=>this.onFocus()),ne(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends pe{mount(){this.unmount=le(fe(this.node,!0),fe(this.node,!1))}unmount(){}}}};function Ee(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function Ae(t,e,n){const s=t.getProps();return zt(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.values.forEach((t,n)=>e[n]=t.getVelocity()),e}(t))}const Ce=t=>1e3*t,Ve=t=>t/1e3,Me={type:"spring",stiffness:500,damping:25,restSpeed:10},Re={type:"keyframes",duration:.8},De={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Le=(t,{keyframes:e})=>e.length>2?Re:H.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Me:De;function ke(t,e){return t[e]||t.default||t}const Be={current:!1},Fe=t=>null!==t;function je(t,{repeat:e,repeatType:n="loop"}){const s=t.filter(Fe);return s[e&&"loop"!==n&&e%2==1?0:s.length-1]}let Oe;function Ie(){Oe=void 0}const Ue={now:()=>(void 0===Oe&&Ue.set(_t.isProcessing||p.useManualTiming?_t.timestamp:performance.now()),Oe),set:t=>{Oe=t,queueMicrotask(Ie)}},We=t=>/^0[^.\s]+$/u.test(t);let Ne=Kt,ze=Kt;const He=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),$e=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ye(t,e,n=1){ze(n<=4);const[s,i]=function(t){const e=$e.exec(t);if(!e)return[,];const[,n,s,i]=e;return["--"+(null!=n?n:s),i]}(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const t=o.trim();return He(t)?parseFloat(t):t}return J(i)?Ye(i,e,n+1):i}const Ge=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Xe=t=>t===nt||t===mt,Ke=(t,e)=>parseFloat(t.split(", ")[e]),qe=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return Ke(i[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?Ke(e[1],t):0}},Ze=new Set(["x","y","z"]),_e=z.filter(t=>!Ze.has(t));const Je={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:qe(4,13),y:qe(5,14)};Je.translateX=Je.x,Je.translateY=Je.y;const Qe=t=>e=>e.test(t),tn=[nt,mt,dt,ht,ft,pt,{test:t=>"auto"===t,parse:t=>t}],en=t=>tn.find(Qe(t)),nn=new Set;let sn=!1,on=!1;function rn(){on&&(nn.forEach(t=>{t.needsMeasurement&&t.unsetTransforms()}),nn.forEach(t=>{t.needsMeasurement&&t.measureInitialState()}),nn.forEach(t=>{t.needsMeasurement&&t.renderEndStyles()}),nn.forEach(t=>{t.needsMeasurement&&t.measureEndState()})),on=!1,sn=!1,nn.forEach(t=>t.complete()),nn.clear()}function an(){nn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(on=!0)}),qt.resolveKeyframes(rn)}class ln{constructor(t,e,n,s,i,o=!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=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(nn.add(this),sn||(sn=!0,qt.read(an))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let i=0;i<t.length;i++)if(null===t[i])if(0===i){const i=null==s?void 0:s.get(),o=t[t.length-1];if(void 0!==i)t[0]=i;else if(n&&e){const s=n.readValue(e,o);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=o),s&&void 0===i&&s.set(t[0])}else t[i]=t[i-1]}unsetTransforms(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes),nn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,nn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const un=(t,e)=>n=>Boolean(ut(n)&&lt.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),cn=(t,e,n)=>s=>{if(!ut(s))return s;const[i,o,r,a]=s.match(rt);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},hn={...nt,transform:t=>Math.round((t=>et(0,255,t))(t))},dn={test:un("rgb","red"),parse:cn("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+hn.transform(t)+", "+hn.transform(e)+", "+hn.transform(n)+", "+ot(st.transform(s))+")"};const mn={test:un("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:dn.transform},pn={test:un("hsl","hue"),parse:cn("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+dt.transform(ot(e))+", "+dt.transform(ot(n))+", "+ot(st.transform(s))+")"},fn={test:t=>dn.test(t)||mn.test(t)||pn.test(t),parse:t=>dn.test(t)?dn.parse(t):pn.test(t)?pn.parse(t):mn.parse(t),transform:t=>ut(t)?t:t.hasOwnProperty("red")?dn.transform(t):pn.transform(t)};const gn=/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 yn(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const r=e.replace(gn,t=>(fn.test(t)?(s.color.push(o),i.push("color"),n.push(fn.parse(t))):t.startsWith("var(")?(s.var.push(o),i.push("var"),n.push(t)):(s.number.push(o),i.push("number"),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:s,types:i}}function vn(t){return yn(t).values}function xn(t){const{split:e,types:n}=yn(t),s=e.length;return t=>{let i="";for(let o=0;o<s;o++)if(i+=e[o],void 0!==t[o]){const e=n[o];i+="number"===e?ot(t[o]):"color"===e?fn.transform(t[o]):t[o]}return i}}const Pn=t=>"number"==typeof t?0:t;const wn={test:function(t){var e,n;return isNaN(t)&&ut(t)&&((null===(e=t.match(rt))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(at))||void 0===n?void 0:n.length)||0)>0},parse:vn,createTransformer:xn,getAnimatableNone:function(t){const e=vn(t);return xn(t)(e.map(Pn))}},Tn=new Set(["brightness","contrast","saturate","opacity"]);function Sn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(rt)||[];if(!s)return t;const i=n.replace(s,"");let o=Tn.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const bn=/\b([a-z-]*)\(.*?\)/gu,En={...wn,getAnimatableNone:t=>{const e=t.match(bn);return e?e.map(Sn).join(" "):t}},An={...vt,color:fn,backgroundColor:fn,outlineColor:fn,fill:fn,stroke:fn,borderColor:fn,borderTopColor:fn,borderRightColor:fn,borderBottomColor:fn,borderLeftColor:fn,filter:En,WebkitFilter:En},Cn=t=>An[t];function Vn(t,e){let n=Cn(t);return n!==En&&(n=wn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}class Mn extends ln{constructor(t,e,n,s){super(t,e,n,s,null==s?void 0:s.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e.current)return;const s=[];super.readKeyframes();for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o&&J(o)){const s=Ye(o,e.current);void 0!==s&&(t[n]=s)}("number"==typeof(i=t[n])?0===i:null===i||"none"===i||"0"===i||We(i))&&s.push(n)}var i;if(s.length&&function(t,e,n){let s=0,i=void 0;for(;s<t.length&&!i;)"string"==typeof t[s]&&"none"!==t[s]&&"0"!==t[s]&&(i=t[s]),s++;if(i&&n)for(const s of e)t[s]=Vn(n,i)}(t,s,n),!Ge.has(n)||2!==t.length)return;const[o,r]=t,a=en(o),l=en(r);if(a&&l&&a!==l)if(Xe(a)&&Xe(l))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}unsetTransforms(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t.current)return;this.removedTransforms=function(t){const e=[];return _e.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}(t);const s=n[n.length-1];t.getValue(e,s).jump(s,!1)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;t.current&&("height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Je[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin)}renderEndStyles(){this.element.render()}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1),s[s.length-1]=Je[n](e.measureViewportBox(),window.getComputedStyle(e.current)),"height"===n&&void 0!==this.suspendedScrollY&&window.scrollTo(0,this.suspendedScrollY),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)})}}function Rn(t){let e;return()=>(void 0===e&&(e=t()),e)}const Dn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!wn.test(t)&&"0"!==t||t.startsWith("url(")));class Ln{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...r}){this.isStopped=!1,this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:o,...r},this.updateFinishedPromise()}get resolved(){return this._resolved||(an(),rn(),Zt(an),Zt(rn)),this._resolved}onKeyframesResolved(t){const{name:e,type:n,velocity:s,delay:i,onComplete:o,onUpdate:r}=this.options;if(!function(t,e,n,s){const i=t[0];if(null===i)return!1;const o=t[t.length-1],r=Dn(i,e),a=Dn(o,e);return Ne(r===a),!(!r||!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&&s)}(t,e,n,s)){if(Be.current||!i){const e=je(t,this.options);return null==r||r(e),null==o||o(),this.resolveFinishedPromise(),void this.updateFinishedPromise()}this.options.duration=0}this._resolved={keyframes:t,...this.initPlayback(t)},this.onPostResolved()}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=()=>{t(),this.updateFinishedPromise()}})}}function kn(t,e){return e?t*(1e3/e):0}function Bn(t,e,n){const s=Math.max(e-5,0);return kn(n-t(s),e-s)}function Fn({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;Ne(t<=Ce(10));let r=1-e;r=et(.05,1,r),t=et(.01,10,Ve(t)),r<1?(i=e=>{const s=e*r,i=s*t;return.001-(s-n)/jn(e,r)*Math.exp(-i)},o=e=>{const s=e*r*t,o=s*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=jn(Math.pow(e,2),r);return(.001-i(e)>0?-1:1)*((o-a)*l)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=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}(i,o,5/t);if(t=Ce(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*r*Math.sqrt(s*e),duration:t}}}function jn(t,e){return t*Math.sqrt(1-e*e)}const On=["duration","bounce"],In=["stiffness","damping","mass"];function Un(t,e){return e.some(e=>void 0!==t[e])}function Wn({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{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(!Un(t,In)&&Un(t,On)){const n=Fn(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...s,velocity:-Ve(s.velocity||0)}),m=h||0,p=l/(2*Math.sqrt(a*u)),f=o-i,g=Ve(Math.sqrt(a/u)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),p<1){const t=jn(g,p);v=e=>{const n=Math.exp(-p*g*e);return o-n*((m+p*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===p)v=t=>o-Math.exp(-g*t)*(f+(m+g*f)*t);else{const t=g*Math.sqrt(p*p-1);v=e=>{const n=Math.exp(-p*g*e),s=Math.min(t*e,300);return o-n*((m+p*g*f)*Math.sinh(s)+t*f*Math.cosh(s))/t}}return{calculatedDuration:d&&c||null,next:t=>{const s=v(t);if(d)r.done=t>=c;else{let i=m;0!==t&&(i=p<1?Bn(v,t,s):0);const a=Math.abs(i)<=n,l=Math.abs(o-s)<=e;r.done=a&&l}return r.value=r.done?o:s,r}}}function Nn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},m=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let p=n*e;const f=h+p,g=void 0===r?f:r(f);g!==f&&(p=g-h);const y=t=>-p*Math.exp(-t/s),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let P,w;const T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(P=t,w=Wn({keyframes:[d.value,m(d.value)],velocity:Bn(v,t,d.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==P||(e=!0,x(t),T(t)),void 0!==P&&t>=P?w.next(t-P):(!e&&x(t),d)}}}const zn=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Hn(t,e,n,s){if(t===e&&n===s)return Kt;const i=e=>function(t,e,n,s,i){let o,r,a=0;do{r=e+(n-e)/2,o=zn(r,s,i)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:zn(i(t),e,s)}const $n=Hn(.42,0,1,1),Yn=Hn(0,0,.58,1),Gn=Hn(.42,0,.58,1),Xn=t=>Array.isArray(t)&&"number"!=typeof t[0],Kn=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,qn=t=>e=>1-t(1-e),Zn=t=>1-Math.sin(Math.acos(t)),_n=qn(Zn),Jn=Kn(Zn),Qn=Hn(.33,1.53,.69,.99),ts=qn(Qn),es=Kn(ts),ns=t=>(t*=2)<1?.5*ts(t):.5*(2-Math.pow(2,-10*(t-1))),ss={linear:Kt,easeIn:$n,easeInOut:Gn,easeOut:Yn,circIn:Zn,circInOut:Jn,circOut:_n,backIn:ts,backInOut:es,backOut:Qn,anticipate:ns},is=t=>{if(Array.isArray(t)){ze(4===t.length);const[e,n,s,i]=t;return Hn(e,n,s,i)}return"string"==typeof t?(ze(void 0!==ss[t]),ss[t]):t},os=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},rs=(t,e,n)=>t+(e-t)*n;function as(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}const ls=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},us=[mn,dn,pn];function cs(t){const e=(n=t,us.find(t=>t.test(n)));var n;ze(Boolean(e));let s=e.parse(t);return e===pn&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,o=0,r=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=as(a,s,t+1/3),o=as(a,s,t),r=as(a,s,t-1/3)}else i=o=r=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*r),alpha:s}}(s)),s}const hs=(t,e)=>{const n=cs(t),s=cs(e),i={...n};return t=>(i.red=ls(n.red,s.red,t),i.green=ls(n.green,s.green,t),i.blue=ls(n.blue,s.blue,t),i.alpha=rs(n.alpha,s.alpha,t),dn.transform(i))};function ds(t,e){return n=>n>0?e:t}function ms(t,e){return n=>rs(t,e,n)}function ps(t){return"number"==typeof t?ms:"string"==typeof t?J(t)?ds:fn.test(t)?hs:ys:Array.isArray(t)?fs:"object"==typeof t?fn.test(t)?hs:gs:ds}function fs(t,e){const n=[...t],s=n.length,i=t.map((t,n)=>ps(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}}function gs(t,e){const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=ps(t[i])(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const ys=(t,e)=>{const n=wn.createTransformer(e),s=yn(t),i=yn(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?le(fs(function(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][i[r]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[o]=l,i[r]++}return s}(s,i),i.values),n):(Ne(!0),ds(t,e))};function vs(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return rs(t,e,n);return ps(t)(t,e)}function xs(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(ze(o===e.length),1===o)return()=>e[0];if(2===o&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=function(t,e,n){const s=[],i=n||vs,o=t.length-1;for(let n=0;n<o;n++){let o=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||Kt:e;o=le(t,o)}s.push(o)}return s}(e,s,i),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=os(t[n],t[n+1],e);return r[n](s)};return n?e=>l(et(t[0],t[o-1],e)):l}function Ps(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=os(0,e,s);t.push(rs(n,1,i))}}function ws(t){const e=[0];return Ps(e,t.length-1),e}function Ts({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Xn(s)?s.map(is):is(s),o={done:!1,value:e[0]},r=xs(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:ws(e),t),e,{ease:Array.isArray(i)?i:(a=e,l=i,a.map(()=>l||Gn).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}function Ss(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 bs=t=>{const e=({timestamp:e})=>t(e);return{start:()=>qt.update(e,!0),stop:()=>Zt(e),now:()=>_t.isProcessing?_t.timestamp:Ue.now()}},Es={decay:Nn,inertia:Nn,tween:Ts,keyframes:Ts,spring:Wn},As=t=>t/100;class Cs extends Ln{constructor({KeyframeResolver:t=ln,...e}){super(e),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle";const{name:n,motionValue:s,keyframes:i}=this.options,o=t=>this.onKeyframesResolved(t);n&&s&&s.owner?this.resolver=s.owner.resolveKeyframes(i,o,n,s):this.resolver=new t(i,o,n,s),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,r=Es[e]||Ts;let a,l;r!==Ts&&"number"!=typeof t[0]&&(a=le(As,vs(t[0],t[1])),t=[0,100]);const u=r({...this.options,keyframes:t});"mirror"===i&&(l=r({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=Ss(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{generator:n,mirroredGenerator:s,mapPercentToKeyframes:i,keyframes:o,calculatedDuration:r,totalDuration:a,resolvedDuration:l}=this.resolved;if(null===this.startTime)return n.next(0);const{delay:u,repeat:c,repeatType:h,repeatDelay:d,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/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 p=this.currentTime-u*(this.speed>=0?1:-1),f=this.speed>=0?p<0:p>a;this.currentTime=Math.max(p,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=a);let g=this.currentTime,y=n;if(c){const t=Math.min(this.currentTime,a)/l;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===h?(n=1-n,d&&(n-=d/l)):"mirror"===h&&(y=s)),g=et(0,1,n)*l}const v=f?{done:!1,value:o[0]}:y.next(g);i&&(v.value=i(v.value));let{done:x}=v;f||null===r||(x=this.speed>=0?this.currentTime>=a:this.currentTime<=0);const P=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return m&&m(v.value),P&&this.finish(),v}get duration(){return Ve(this.resolved.calculatedDuration)}get time(){return Ve(this.currentTime)}set time(t){t=Ce(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=Ve(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=bs,onPlay:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const n=this.driver.now();null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=n),"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"}stop(){if(this.isStopped=!0,"idle"===this.state)return;this.state="idle";const{onStop:t}=this.options;t&&t(),this.teardown()}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()}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)}}function Vs(t){return new Cs(t)}const Ms=t=>Array.isArray(t)&&"number"==typeof t[0];function Rs(t){return Boolean(!t||"string"==typeof t&&Ls[t]||Ms(t)||Array.isArray(t)&&t.every(Rs))}const Ds=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ls={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ds([0,.65,.55,1]),circOut:Ds([.55,0,1,.45]),backIn:Ds([.31,.01,.66,-.59]),backOut:Ds([.33,1.53,.69,.99])};function ks(t){if(t)return Ms(t)?Ds(t):Array.isArray(t)?t.map(ks):Ls[t]}function Bs(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=ks(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const Fs=Rn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),js=new Set(["opacity","clipPath","filter","transform"]);class Os extends Ln{constructor(t){super(t);const{name:e,motionValue:n,keyframes:s}=this.options;this.resolver=new Mn(s,t=>this.onKeyframesResolved(t),e,n),this.resolver.scheduleResolve()}initPlayback(t){let e=this.options.duration||300;if("spring"===(n=this.options).type||"backgroundColor"===n.name||!Rs(n.ease)){const{onComplete:n,onUpdate:s,motionValue:i,...o}=this.options,r=function(t,e){const n=new Cs({...e,keyframes:t,repeat:0,delay:0});let s={done:!1,value:t[0]};const i=[];let o=0;for(;!s.done&&o<2e4;)s=n.sample(o),i.push(s.value),o+=10;return{times:void 0,keyframes:i,duration:o-10,ease:"linear"}}(t,o);t=r.keyframes,e=r.duration,this.options.times=r.times,this.options.ease=r.ease}var n;const{motionValue:s,name:i}=this.options,o=Bs(s.owner.current,i,t,{...this.options,duration:e});return o.startTime=Ue.now(),this.pendingTimeline?(o.timeline=this.pendingTimeline,this.pendingTimeline=void 0):o.onfinish=()=>{const{onComplete:e}=this.options;s.set(je(t,this.options)),e&&e(),this.cancel(),this.resolveFinishedPromise(),this.updateFinishedPromise()},{animation:o,duration:e,keyframes:t}}get duration(){const{duration:t}=this.resolved;return Ve(t)}get time(){const{animation:t}=this.resolved;return Ve(t.currentTime||0)}set time(t){const{animation:e}=this.resolved;e.currentTime=Ce(t)}get speed(){const{animation:t}=this.resolved;return t.playbackRate}set speed(t){const{animation:e}=this.resolved;e.playbackRate=t}get state(){const{animation:t}=this.resolved;return t.playState}attachTimeline(t){if(this._resolved){const{animation:e}=this.resolved;e.timeline=t,e.onfinish=null}else this.pendingTimeline=t;return Kt}play(){if(this.isStopped)return;const{animation:t}=this.resolved;t.play()}pause(){const{animation:t}=this.resolved;t.pause()}stop(){this.isStopped=!0;const{animation:t,keyframes:e}=this.resolved;if("idle"!==t.playState&&"finished"!==t.playState){if(this.time){const{motionValue:t,onUpdate:n,onComplete:s,...i}=this.options,o=new Cs({...i,keyframes:e});t.setWithVelocity(o.sample(this.time-10).value,o.sample(this.time).value,10)}this.cancel()}}complete(){this.resolved.animation.finish()}cancel(){this.resolved.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;return Fs()&&n&&js.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!s&&"mirror"!==i&&0!==o&&"inertia"!==r}}const Is=(t,e,n,s={},i,o)=>r=>{const a=ke(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u-=Ce(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(a)||(c={...c,...Le(t,c)}),c.duration&&(c.duration=Ce(c.duration)),c.repeatDelay&&(c.repeatDelay=Ce(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if(!1===c.type&&(c.duration=0,0===c.delay&&(h=!0)),(Be.current||p.skipAnimations)&&(h=!0,c.duration=0,c.delay=0),h&&!o&&void 0!==e.get()){const t=je(c.keyframes,a);if(void 0!==t)return void qt.update(()=>{c.onUpdate(t),c.onComplete()})}return!o&&Os.supports(c)?new Os(c):new Cs(c)};function Us(t){return Boolean(Y(t)&&t.add)}function Ws(t,e){-1===t.indexOf(e)&&t.push(e)}function Ns(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class zs{constructor(){this.subscriptions=[]}add(t){return Ws(this.subscriptions,t),()=>Ns(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Hs={current:void 0};class $s{constructor(t,e={}){var n;this.version="11.0.12",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Ue.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.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=Ue.now()}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 zs);const n=this.events[t].add(e);return"change"===t?()=>{n(),qt.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 Hs.current&&Hs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Ue.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return kn(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 Ys(t,e){return new $s(t,e)}function Gs(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ys(n))}function Xs(t,e){const n=Ae(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const e in o){Gs(t,e,(r=o[e],$t(r)?r[r.length-1]||0:r))}var r}function Ks({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function qs(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;const u=t.getValue("willChange");s&&(r=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const e in l){const s=t.getValue(e,null!==(o=t.latestValues[e])&&void 0!==o?o:null),i=l[e];if(void 0===i||h&&Ks(h,e))continue;const a={delay:n,elapsed:0,...ke(r||{},e)};let d=!1;if(window.HandoffAppearAnimations){const n=t.getProps()[m];if(n){const t=window.HandoffAppearAnimations(n,e);null!==t&&(a.elapsed=t,d=!0)}}s.start(Is(e,s,i,t.shouldReduceMotion&&H.has(e)?{type:!1}:a,t,d));const p=s.animation;p&&(Us(u)&&(u.add(e),p.then(()=>u.remove(e))),c.push(p))}return a&&Promise.all(c).then(()=>{qt.update(()=>{a&&Xs(t,a)})}),c}function Zs(t,e,n={}){var s;const i=Ae(t,e,"exit"===n.type?null===(s=t.presenceContext)||void 0===s?void 0:s.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>Promise.all(qs(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:i=0,staggerChildren:r,staggerDirection:a}=o;return function(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=1===i?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort(_s).forEach((t,s)=>{t.notify("AnimationStart",e),r.push(Zs(t,e,{...o,delay:n+l(s)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,i+s,r,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[r,a]:[a,r];return t().then(()=>e())}return Promise.all([r(),a(n.delay)])}function _s(t,e){return t.sortNodePosition(e)}function Js(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const i=e.map(e=>Zs(t,e,n));s=Promise.all(i)}else if("string"==typeof e)s=Zs(t,e,n);else{const i="function"==typeof e?Ae(t,e,n.custom):e;s=Promise.all(qs(t,i,n))}return s.then(()=>{qt.postRender(()=>{t.notify("AnimationComplete",e)})})}const Qs=[...S].reverse(),ti=S.length;function ei(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Js(t,e,n)))}(t);const n={animate:si(!0),whileInView:si(),whileHover:si(),whileTap:si(),whileDrag:si(),whileFocus:si(),exit:si()};let s=!0;const i=e=>(n,s)=>{var i;const o=Ae(t,s,"exit"===e?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);if(o){const{transition:t,transitionEnd:e,...s}=o;n={...n,...s,...e}}return n};function o(o){const r=t.getProps(),a=t.getVariantContext(!0)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<ti;e++){const d=Qs[e],m=n[d],p=void 0!==r[d]?r[d]:a[d],f=w(p),g=d===o?m.isActive:null;!1===g&&(h=e);let y=p===a[d]&&p!==r[d]&&f;if(y&&s&&t.manuallyAnimateOnMount&&(y=!1),m.protectedKeys={...c},!m.isActive&&null===g||!p&&!m.prevProp||T(p)||"boolean"==typeof p)continue;let v=ni(m.prevProp,p)||d===o&&m.isActive&&!y&&f||e>h&&f,x=!1;const P=Array.isArray(p)?p:[p];let S=P.reduce(i(d),{});!1===g&&(S={});const{prevResolvedValues:b={}}=m,E={...b,...S},A=t=>{v=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0};for(const t in E){const e=S[t],n=b[t];if(c.hasOwnProperty(t))continue;let s=!1;s=$t(e)&&$t(n)?!Ee(e,n):e!==n,s?null!=e?A(t):u.add(t):void 0!==e&&u.has(t)?A(t):m.protectedKeys[t]=!0}m.prevProp=p,m.prevResolvedValues=S,m.isActive&&(c={...c,...S}),s&&t.blockInitialAnimation&&(v=!1),!v||y&&!x||l.push(...P.map(t=>({animation:t,options:{type:d}})))}if(u.size){const e={};u.forEach(n=>{const s=t.getBaseTarget(n);e[n]=void 0===s?null:s}),l.push({animation:e})}let d=Boolean(l.length);return!s||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),s=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,s){var i;if(n[e].isActive===s)return Promise.resolve();null===(i=t.variantChildren)||void 0===i||i.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,s)}),n[e].isActive=s;const r=o(e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function ni(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Ee(e,t)}function si(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let ii=0;const oi={animation:{Feature:class extends pe{constructor(t){super(t),t.animationState||(t.animationState=ei(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),T(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends pe{constructor(){super(...arguments),this.id=ii++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const s=this.node.animationState.setActive("exit",!t);e&&!t&&s.then(()=>e(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},ri=(t,e)=>Math.abs(t-e);function ai(t,e){const n=ri(t.x,e.x),s=ri(t.y,e.y);return Math.sqrt(n**2+s**2)}class li{constructor(t,e,{transformPagePoint:n,contextWindow:s,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=hi(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=ai(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:s}=t,{timestamp:i}=_t;this.history.push({...s,timestamp:i});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=ui(e,this.transformPagePoint),qt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:s,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=hi("pointercancel"===t.type?this.lastMoveEventInfo:ui(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),s&&s(t,o)},!se(t))return;this.dragSnapToOrigin=i,this.handlers=e,this.transformPagePoint=n,this.contextWindow=s||window;const o=ui(ie(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=_t;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,hi(o,this.history)),this.removeListeners=le(re(this.contextWindow,"pointermove",this.handlePointerMove),re(this.contextWindow,"pointerup",this.handlePointerUp),re(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zt(this.updatePoint)}}function ui(t,e){return e?{point:e(t.point)}:t}function ci(t,e){return{x:t.x-e.x,y:t.y-e.y}}function hi({point:t},e){return{point:t,delta:ci(t,mi(e)),offset:ci(t,di(e)),velocity:pi(e,.1)}}function di(t){return t[0]}function mi(t){return t[t.length-1]}function pi(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=mi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>Ce(e)));)n--;if(!s)return{x:0,y:0};const o=Ve(i.timestamp-s.timestamp);if(0===o)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function fi(t){return t.max-t.min}function gi(t,e=0,n=.01){return Math.abs(t-e)<=n}function yi(t,e,n,s=.5){t.origin=s,t.originPoint=rs(e.min,e.max,t.origin),t.scale=fi(n)/fi(e),(gi(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=rs(n.min,n.max,t.origin)-t.originPoint,(gi(t.translate)||isNaN(t.translate))&&(t.translate=0)}function vi(t,e,n,s){yi(t.x,e.x,n.x,s?s.originX:void 0),yi(t.y,e.y,n.y,s?s.originY:void 0)}function xi(t,e,n){t.min=n.min+e.min,t.max=t.min+fi(e)}function Pi(t,e,n){t.min=e.min-n.min,t.max=t.min+fi(e)}function wi(t,e,n){Pi(t.x,e.x,n.x),Pi(t.y,e.y,n.y)}function Ti(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Si(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}const bi=.35;function Ei(t,e,n){return{min:Ai(t,e),max:Ai(t,n)}}function Ai(t,e){return"number"==typeof t?t:t[e]||0}const Ci=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Vi(t){return[t("x"),t("y")]}function Mi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Ri(t){return void 0===t||1===t}function Di({scale:t,scaleX:e,scaleY:n}){return!Ri(t)||!Ri(e)||!Ri(n)}function Li(t){return Di(t)||ki(t)||t.z||t.rotate||t.rotateX||t.rotateY}function ki(t){return Bi(t.x)||Bi(t.y)}function Bi(t){return t&&"0%"!==t}function Fi(t,e,n){return n+e*(t-n)}function ji(t,e,n,s,i){return void 0!==i&&(t=Fi(t,i,s)),Fi(t,n,s)+e}function Oi(t,e=0,n=1,s,i){t.min=ji(t.min,e,n,s,i),t.max=ji(t.max,e,n,s,i)}function Ii(t,{x:e,y:n}){Oi(t.x,e.translate,e.scale,e.originPoint),Oi(t.y,n.translate,n.scale,n.originPoint)}function Ui(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Wi(t,e){t.min=t.min+e,t.max=t.max+e}function Ni(t,e,[n,s,i]){const o=void 0!==e[i]?e[i]:.5,r=rs(t.min,t.max,o);Oi(t,e[n],e[s],r,e.scale)}const zi=["x","scaleX","originX"],Hi=["y","scaleY","originY"];function $i(t,e){Ni(t.x,e,zi),Ni(t.y,e,Hi)}function Yi(t,e){return Mi(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))}const Gi=({current:t})=>t?t.ownerDocument.defaultView:null,Xi=new WeakMap;class Ki{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:s}=this.getProps();this.panSession=new li(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(ie(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:s,onDragStart:i}=this.getProps();if(n&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=de(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Vi(t=>{let e=this.getAxisMotionValue(t).get()||0;if(dt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const s=n.layout.layoutBox[t];if(s){e=fi(s)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),i&&i(t,e);const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:s,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(s&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Vi(t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,contextWindow:Gi(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=e;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&i(t,e)}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:s}=this.getProps();if(!n||!qi(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},s){return void 0!==e&&t<e?t=s?rs(e,t,s.min):Math.max(t,e):void 0!==n&&t>n&&(t=s?rs(n,t,s.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,i=this.constraints;e&&P(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!s)&&function(t,{top:e,left:n,bottom:s,right:i}){return{x:Ti(t.x,n,i),y:Ti(t.y,e,s)}}(s.layoutBox,e),this.elastic=function(t=bi){return!1===t?t=0:!0===t&&(t=bi),{x:Ei(t,"left","right"),y:Ei(t,"top","bottom")}}(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Vi(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(s.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!P(t))return!1;const n=t.current;ze(null!==n);const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=function(t,e,n){const s=Yi(t,n),{scroll:i}=e;return i&&(Wi(s.x,i.offset.x),Wi(s.y,i.offset.y)),s}(n,s.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Si(t.x,e.x),y:Si(t.y,e.y)}}(s.layout.layoutBox,i);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=Mi(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Vi(r=>{if(!qi(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=s?200:1e6,c=s?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(Is(t,n,0,e,this.visualElement))}stopAnimation(){Vi(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Vi(t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()})}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),s=n[e];return s||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Vi(e=>{const{drag:n}=this.getProps();if(!qi(e,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(e);if(s&&s.layout){const{min:n,max:o}=s.layout.layoutBox[e];i.set(t[e]-rs(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!P(e)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Vi(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();s[t]=function(t,e){let n=.5;const s=fi(t),i=fi(e);return i>s?n=os(e.min,e.max-s,t.min):s>i&&(n=os(t.min,t.max-i,e.min)),et(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Vi(e=>{if(!qi(e,t,null))return;const n=this.getAxisMotionValue(e),{min:i,max:o}=this.constraints[e];n.set(rs(i,o,s[e]))})}addListeners(){if(!this.visualElement.current)return;Xi.set(this.visualElement,this);const t=re(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();P(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,s=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const i=ne(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Vi(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{i(),t(),s(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=bi,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:r}}}function qi(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Zi=t=>(e,n)=>{t&&t(e,n)};const _i=["TopLeft","TopRight","BottomLeft","BottomRight"],Ji=_i.length,Qi=t=>"string"==typeof t?parseFloat(t):t,to=t=>"number"==typeof t||mt.test(t);function eo(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const no=io(0,.5,_n),so=io(.5,.95,Kt);function io(t,e,n){return s=>s<t?0:s>e?1:n(os(t,e,s))}function oo(t,e){t.min=e.min,t.max=e.max}function ro(t,e){oo(t.x,e.x),oo(t.y,e.y)}function ao(t,e,n,s,i){return t=Fi(t-=e,1/n,s),void 0!==i&&(t=Fi(t,1/i,s)),t}function lo(t,e,[n,s,i],o,r){!function(t,e=0,n=1,s=.5,i,o=t,r=t){if(dt.test(e)){e=parseFloat(e);e=rs(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=rs(o.min,o.max,s);t===o&&(a-=e),t.min=ao(t.min,e,n,a,i),t.max=ao(t.max,e,n,a,i)}(t,e[n],e[s],e[i],e.scale,o,r)}const uo=["x","scaleX","originX"],co=["y","scaleY","originY"];function ho(t,e,n,s){lo(t.x,e,uo,n?n.x:void 0,s?s.x:void 0),lo(t.y,e,co,n?n.y:void 0,s?s.y:void 0)}function mo(t){return 0===t.translate&&1===t.scale}function po(t){return mo(t.x)&&mo(t.y)}function fo(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function go(t){return fi(t.x)/fi(t.y)}class yo{constructor(){this.members=[]}add(t){Ws(this.members,t),t.scheduleRender()}remove(t){if(Ns(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;!1===s&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function vo(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(s=`translate3d(${i}px, ${o}px, 0) `),1===e.x&&1===e.y||(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:i}=n;t&&(s+=`rotate(${t}deg) `),e&&(s+=`rotateX(${e}deg) `),i&&(s+=`rotateY(${i}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(s+=`scale(${r}, ${a})`),s||"none"}const xo=(t,e)=>t.depth-e.depth;class Po{constructor(){this.children=[],this.isDirty=!1}add(t){Ws(this.children,t),this.isDirty=!0}remove(t){Ns(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(xo),this.isDirty=!1,this.children.forEach(t)}}const wo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function To(t,e){const n=Ue.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Zt(s),t(o-e))};return qt.read(s,!0),()=>Zt(s)}function So(t,e,n){var s;if("string"==typeof t){let i=document;e&&(ze(Boolean(e.current)),i=e.current),n?(null!==(s=n[t])&&void 0!==s||(n[t]=i.querySelectorAll(t)),t=n[t]):t=i.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}const bo=new WeakMap;function Eo(t,e){let n;const s=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return qt.update(s,!0),()=>Zt(s)}const Ao=Rn(()=>void 0!==window.ScrollTimeline);class Co{constructor(t){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(!Ao()||!e.attachTimeline)return e.pause(),Eo(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 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")}stop(){this.runAll("stop")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Vo(t){return t instanceof SVGElement&&"svg"!==t.tagName}const Mo={current:null},Ro={current:!1};function Do(){if(Ro.current=!0,u)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Mo.current=t.matches;t.addListener(e),e()}else Mo.current=!1}const Lo=[...tn,fn,wn],ko=Object.keys(R),Bo=ko.length,Fo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],jo=b.length;class Oo{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},r={}){this.resolveKeyframes=(t,e,n,s)=>new this.KeyframeResolver(t,e,n,s,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ln,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.scheduleRender=()=>qt.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=r,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=E(e),this.isVariantNode=A(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==a[t]&&Y(e)&&(e.set(a[t],!1),Us(u)&&u.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,bo.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)),Ro.current||Do(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Mo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){bo.delete(this.current),this.projection&&this.projection.unmount(),Zt(this.notifyUpdate),Zt(this.render),this.valueSubscriptions.forEach(t=>t()),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=H.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&qt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),i()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,i){let o,r;for(let t=0;t<Bo;t++){const n=ko[t],{isEnabled:s,Feature:i,ProjectionNode:a,MeasureLayout:l}=R[n];a&&(o=a),s(e)&&(!this.features[n]&&i&&(this.features[n]=new i(this)),l&&(r=l))}if(("html"===this.type||"svg"===this.type)&&!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:r,layoutScroll:a,layoutRoot:l}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||r&&P(r),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:a,layoutRoot:l})}return r}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,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<Fo.length;e++){const n=Fo[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){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(Y(o))t.addValue(i,o),Us(s)&&s.add(i);else if(Y(r))t.addValue(i,Ys(o,{owner:t})),Us(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const e=t.getValue(i);!e.hasAnimated&&e.set(o)}else{const e=t.getStaticValue(i);t.addValue(i,Ys(void 0!==e?e:o,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<jo;t++){const n=b[t],s=this.props[n];(w(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(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=Ys(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 i;return null!=s&&("string"==typeof s&&(He(s)||We(s))?s=parseFloat(s):(i=s,!Lo.find(Qe(i))&&wn.test(e)&&(s=Vn(t,e))),this.setBaseTarget(t,Y(s)?s.get():s)),Y(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e,n;const{initial:s}=this.props,i="string"==typeof s||"object"==typeof s?null===(n=zt(this.props,s,null===(e=this.presenceContext)||void 0===e?void 0:e.custom))||void 0===n?void 0:n[t]:void 0;if(s&&void 0!==i)return i;const o=this.getBaseTargetFromProps(this.props,t);return void 0===o||Y(o)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:o}on(t,e){return this.events[t]||(this.events[t]=new zs),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Io extends Oo{constructor(){super(...arguments),this.KeyframeResolver=Mn}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]}}class Uo extends Io{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(H.has(e)){const t=Cn(e);return t&&t.default||0}return e=It.has(e)?e:d(e),t.getAttribute(e)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t,e){return Nt(t,e)}build(t,e,n,s){Lt(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){Ut(t,e,0,s)}mount(t){this.isSVGTag=Bt(t.tagName),super.mount(t)}}class Wo extends Io{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,e){if(H.has(e)){const t=Cn(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),i=(Z(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Yi(t,e)}build(t,e,n,s){xt(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return Wt(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Y(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}renderInstance(t,e,n,s){Ot(t,e,n,s)}}function No(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Vo(t)?new Uo(e,{enableHardwareAcceleration:!1}):new Wo(e,{enableHardwareAcceleration:!0});n.mount(t),bo.set(t,n)}function zo(t,e,n){const s=Y(t)?t:Ys(t);return s.start(Is("",s,e,n)),s.animation}function Ho(t,e=100){const n=Wn({keyframes:[0,e],...t}),s=Math.min(Ss(n),2e4);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:Ve(s)}}function $o(t,e,n,s){var i;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(i=s.get(e))&&void 0!==i?i:t}const Yo=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t};function Go(t,e){return Xn(t)?t[Yo(0,t.length,e)]:t}function Xo(t,e,n,s,i,o){!function(t,e,n){for(let s=0;s<t.length;s++){const i=t[s];i.at>e&&i.at<n&&(Ns(t,i),s--)}}(t,i,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:rs(i,o,s[r]),easing:Go(n,r)})}function Ko(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function qo(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Zo(t,e){return e[t]||(e[t]=[]),e[t]}function _o(t){return Array.isArray(t)?t:[t]}function Jo(t,e){return t[e]?{...t,...t[e]}:{...t}}const Qo=t=>"number"==typeof t,tr=t=>t.every(Qo);function er(t,e,n,s){const i=So(t,s),o=i.length;ze(Boolean(o));const r=[];for(let t=0;t<o;t++){const s=i[t];bo.has(s)||No(s);const a=bo.get(s),l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,o)),r.push(...qs(a,{...e,transition:l},{}))}return new Co(r)}function nr(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s){const i=e.duration||.3,o=new Map,r=new Map,a={},l=new Map;let u=0,c=0,h=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){l.set(o,c);continue}if(!Array.isArray(o)){l.set(o.name,$o(c,o.at,u,l));continue}let[d,m,p={}]=o;void 0!==p.at&&(c=$o(c,p.at,u,l));let f=0;const g=(t,n,s,o=0,r=0)=>{const a=_o(t),{delay:l=0,times:u=ws(a),type:d="keyframes",...m}=n;let{ease:p=e.ease||"easeOut",duration:g}=n;const y="function"==typeof l?l(o,r):l,v=a.length;if(v<=2&&"spring"===d){let t=100;if(2===v&&tr(a)){const e=a[1]-a[0];t=Math.abs(e)}const e={...m};void 0!==g&&(e.duration=Ce(g));const n=Ho(e,t);p=n.ease,g=n.duration}null!=g||(g=i);const x=c+y,P=x+g;1===u.length&&0===u[0]&&(u[1]=1);const w=u.length-a.length;w>0&&Ps(u,w),1===a.length&&a.unshift(null),Xo(s,a,p,u,x,P),f=Math.max(y+g,f),h=Math.max(P,h)};if(Y(d)){g(m,p,Zo("default",qo(d,r)))}else{const t=So(d,s,a),e=t.length;for(let n=0;n<e;n++){m=m,p=p;const s=qo(t[n],r);for(const t in m)g(m[t],Jo(p,t),Zo(t,s),n,e)}}u=c,c+=f}return r.forEach((t,s)=>{for(const i in t){const r=t[i];r.sort(Ko);const a=[],l=[],u=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:s}=r[t];a.push(n),l.push(os(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)),o.has(s)||o.set(s,{keyframes:{},transition:{}});const c=o.get(s);c.keyframes[i]=a,c.transition[i]={...e,duration:h,ease:u,times:l,...n}}}),o}(t,e,n).forEach(({keyframes:t,transition:e},n)=>{let i;i=Y(n)?zo(n,t.default,e.default):er(n,t,e),s.push(i)}),new Co(s)}const sr=t=>function(e,n,s){let i;var o;return o=e,i=Array.isArray(o)&&Array.isArray(o[0])?nr(e,n,t):function(t){return"object"==typeof t&&!Array.isArray(t)}(n)?er(e,n,s,t):zo(e,n,s),t&&t.animations.push(i),i},ir=sr(),or=new WeakMap;let rr;function ar({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=or.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 lr(t){t.forEach(ar)}function ur(t,e){rr||"undefined"!=typeof ResizeObserver&&(rr=new ResizeObserver(lr));const n=So(t);return n.forEach(t=>{let n=or.get(t);n||(n=new Set,or.set(t,n)),n.add(e),null==rr||rr.observe(t)}),()=>{n.forEach(t=>{const n=or.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==rr||rr.unobserve(t)})}}const cr=new Set;let hr;function dr(t){return cr.add(t),hr||(hr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};cr.forEach(t=>t(e))},window.addEventListener("resize",hr)),()=>{cr.delete(t),!cr.size&&hr&&(hr=void 0)}}const mr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function pr(t,e,n,s){const i=n[e],{length:o,position:r}=mr[e],a=i.current,l=n.time;i.current=t["scroll"+r],i.scrollLength=t["scroll"+o]-t["client"+o],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=os(0,i.scrollLength,i.current);const u=s-l;i.velocity=u>50?0:kn(i.current-a,u)}const fr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},gr={start:0,center:.5,end:1};function yr(t,e,n=0){let s=0;if(void 0!==gr[t]&&(t=gr[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 vr=[0,0];function xr(t,e,n,s){let i=Array.isArray(t)?t:vr,o=0,r=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,gr[t]?t:"0"]),o=yr(i[0],n,s),r=yr(i[1],e),o-r}const Pr={x:0,y:0};function wr(t,e,n){const{offset:s=fr.All}=n,{target:i=t,axis:o="y"}=n,r="y"===o?"height":"width",a=i!==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 i=null,o=s.parentNode;for(;!i;)"svg"===o.tagName&&(i=o),o=s.parentNode;s=i}}return n}(i,t):Pr,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(i),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=xr(s[t],u[r],l[r],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=xs(e[o].offset,ws(s)),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=e[o].interpolate(e[o].current)}function Tr(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){pr(t,"x",e,n),pr(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&wr(t,n,s)},notify:()=>e(n)}}const Sr=new WeakMap,br=new WeakMap,Er=new WeakMap,Ar=t=>t===document.documentElement?window:t;function Cr(t,{container:e=document.documentElement,...n}={}){let s=Er.get(e);s||(s=new Set,Er.set(e,s));const i=Tr(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(i),!Sr.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(_t.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{qt.read(t,!1,!0),qt.read(n,!1,!0),qt.update(i,!1,!0)};Sr.set(e,a);const l=Ar(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&br.set(e,(r=a,"function"==typeof(o=e)?dr(o):ur(o,r))),l.addEventListener("scroll",a,{passive:!0})}var o,r;const a=Sr.get(e);return qt.read(a,!1,!0),()=>{var t;Zt(a);const n=Er.get(e);if(!n)return;if(n.delete(i),n.size)return;const s=Sr.get(e);Sr.delete(e),s&&(Ar(e).removeEventListener("scroll",s),null===(t=br.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const Vr=new Map;function Mr({source:t=document.documentElement,axis:e="y"}={}){Vr.has(t)||Vr.set(t,{});const n=Vr.get(t);return n[e]||(n[e]=Ao()?new ScrollTimeline({source:t,axis:e}):function({source:t,axis:e="y"}){const n={value:0},s=Cr(t=>{n.value=100*t[e].progress},{container:t,axis:e});return{currentTime:n,cancel:s}}({source:t,axis:e})),n[e]}const Rr={some:0,all:1};function Dr(t,e,{root:n,margin:s,amount:i="some"}={}){const o=So(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof i?i:Rr[i]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}function Lr(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=xs(i,o,{mixer:(l=o[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...r});var l;return e?a(s):a}const kr=qt,Br=g.reduce((t,e)=>(t[e]=t=>Zt(t),t),{}),Fr=["","X","Y","Z"],jr={visibility:"hidden"};let Or=0;const Ir={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Ur({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=Or++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var t;this.projectionUpdateScheduled=!1,Ir.totalNodes=Ir.resolvedTargetDeltas=Ir.recalculatedProjection=0,this.nodes.forEach(zr),this.nodes.forEach(qr),this.nodes.forEach(Zr),this.nodes.forEach(Hr),t=Ir,window.MotionDebug&&window.MotionDebug.record(t)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Po)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new zs),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Vo(e),this.instance=e;const{layoutId:s,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||s)&&(this.isLayoutDirty=!0),t){let n;const s=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=To(s,250),wo.hasAnimatedSinceResize&&(wo.hasAnimatedSinceResize=!1,this.nodes.forEach(Kr))})}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&o&&(s||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:s})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||o.getDefaultTransition()||na,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!fo(this.targetLayout,s)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...ke(i,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||Kr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Zt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(_r),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Yr);this.isUpdating||this.nodes.forEach(Gr),this.isUpdating=!1,window.HandoffCancelAllAnimations&&window.HandoffCancelAllAnimations(),this.nodes.forEach(Xr),this.nodes.forEach(Wr),this.nodes.forEach(Nr),this.clearAllSnapshots();const t=Ue.now();_t.delta=et(0,1e3/60,t-_t.timestamp),_t.timestamp=t,_t.isProcessing=!0,Jt.update.process(_t),Jt.preRender.process(_t),Jt.render.process(_t),_t.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,v.read(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach($r),this.sharedNodes.forEach(Jr)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,qt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){qt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!po(this.projectionDelta),n=this.getTransformTemplate(),s=n?n(this.latestValues,""):void 0,o=s!==this.prevTransformTemplateValue;t&&(e||Li(this.latestValues)||o)&&(i(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var s;return t&&(n=this.removeTransform(n)),oa((s=n).x),oa(s.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(Wi(e.x,n.offset.x),Wi(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ro(e,t);for(let n=0;n<this.path.length;n++){const s=this.path[n],{scroll:i,options:o}=s;if(s!==this.root&&i&&o.layoutScroll){if(i.isRoot){ro(e,t);const{scroll:n}=this.root;n&&(Wi(e.x,-n.offset.x),Wi(e.y,-n.offset.y))}Wi(e.x,i.offset.x),Wi(e.y,i.offset.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};ro(n,t);for(let t=0;t<this.path.length;t++){const s=this.path[t];!e&&s.options.layoutScroll&&s.scroll&&s!==s.root&&$i(n,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),Li(s.latestValues)&&$i(n,s.latestValues)}return Li(this.latestValues)&&$i(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ro(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Li(n.latestValues))continue;Di(n.latestValues)&&n.updateSnapshot();const s={x:{min:0,max:0},y:{min:0,max:0}};ro(s,n.measurePageBox()),ho(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,s)}return Li(this.latestValues)&&ho(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==_t.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const s=Boolean(this.resumingFrom)||this!==n;if(!(t||s&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=_t.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},wi(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),ro(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,xi(r.x,a.x,l.x),xi(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ro(this.target,this.layout.layoutBox),Ii(this.target,this.targetDelta)):ro(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},wi(this.relativeTargetOrigin,this.target,t.target),ro(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Ir.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Di(this.parent.latestValues)&&!ki(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let s=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(s=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(s=!1),this.resolvedRelativeTargetAt===_t.timestamp&&(s=!1),s)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;ro(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,s=!1){const i=n.length;if(!i)return;let o,r;e.x=e.y=1;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const i=o.instance;i&&i.style&&"contents"===i.style.display||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&$i(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Ii(t,r)),s&&Li(o.latestValues)&&$i(t,o.latestValues))}e.x=Ui(e.x),e.y=Ui(e.y)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=e;if(!l)return void(this.projectionTransform&&(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const u=this.projectionTransform;vi(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=vo(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===r&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Ir.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const n=this.snapshot,s=n?n.latestValues:{},i={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(ea));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,m,p,f,g;Qr(o.x,t.x,n),Qr(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wi(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),m=this.relativeTarget,p=this.relativeTargetOrigin,f=r,g=n,ta(m.x,p.x,f.x,g),ta(m.y,p.y,f.y,g),h&&(l=this.relativeTarget,d=h,l.x.min===d.x.min&&l.x.max===d.x.max&&l.y.min===d.y.min&&l.y.max===d.y.max)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),ro(h,this.relativeTarget)),a&&(this.animationValues=i,function(t,e,n,s,i,o){i?(t.opacity=rs(0,void 0!==n.opacity?n.opacity:1,no(s)),t.opacityExit=rs(void 0!==e.opacity?e.opacity:1,0,so(s))):o&&(t.opacity=rs(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,s));for(let i=0;i<Ji;i++){const o=`border${_i[i]}Radius`;let r=eo(e,o),a=eo(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||to(r)===to(a)?(t[o]=Math.max(rs(Qi(r),Qi(a),s),0),(dt.test(a)||dt.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=rs(e.rotate||0,n.rotate||0,s))}(i,s,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Zt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=qt.update(()=>{wo.hasAnimatedSinceResize=!0,this.currentAnimation=zo(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:s,latestValues:i}=t;if(e&&n&&s){if(this!==t&&this.layout&&s&&ra(this.options.animationType,this.layout.layoutBox,s.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=fi(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const s=fi(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+s}ro(e,n),$i(e,i),vi(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new yo);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const s=this.getStack();s&&s.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const s={};for(let e=0;e<Fr.length;e++){const i="rotate"+Fr[e];n[i]&&(s[i]=n[i],t.setStaticValue(i,0))}t.render();for(const e in s)t.setStaticValue(e,s[e]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return jr;const s={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=Yt(null==t?void 0:t.pointerEvents)||"",s.transform=i?i(this.latestValues,""):"none",s;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Yt(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!Li(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),s.transform=vo(this.projectionDeltaWithTransform,this.treeScale,r),i&&(s.transform=i(r,s.transform));const{x:a,y:l}=this.projectionDelta;s.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?s.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:s.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in W){if(void 0===r[t])continue;const{correct:e,applyTo:n}=W[t],i="none"===s.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)s[n[e]]=i}else s[t]=i}return this.options.layoutId&&(s.pointerEvents=o===this?Yt(null==t?void 0:t.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(Yr),this.root.sharedNodes.clear()}}}function Wr(t){t.updateLayout()}function Nr(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:s}=t.layout,{animationType:i}=t.options,o=n.source!==t.layout.source;"size"===i?Vi(t=>{const s=o?n.measuredBox[t]:n.layoutBox[t],i=fi(s);s.min=e[t].min,s.max=s.min+i}):ra(i,n.layoutBox,e)&&Vi(s=>{const i=o?n.measuredBox[s]:n.layoutBox[s],r=fi(e[s]);i.max=i.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[s].max=t.relativeTarget[s].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};vi(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?vi(a,t.applyTransform(s,!0),n.measuredBox):vi(a,e,n.layoutBox);const l=!po(r);let u=!1;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:i,layout:o}=s;if(i&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};wi(r,n.layoutBox,i.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};wi(a,e,o.layoutBox),fo(r,a)||(u=!0),s.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function zr(t){Ir.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Hr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function $r(t){t.clearSnapshot()}function Yr(t){t.clearMeasurements()}function Gr(t){t.isLayoutDirty=!1}function Xr(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Kr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function qr(t){t.resolveTargetDelta()}function Zr(t){t.calcProjection()}function _r(t){t.resetRotation()}function Jr(t){t.removeLeadSnapshot()}function Qr(t,e,n){t.translate=rs(e.translate,0,n),t.scale=rs(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ta(t,e,n,s){t.min=rs(e.min,n.min,s),t.max=rs(e.max,n.max,s)}function ea(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const na={duration:.45,ease:[.4,0,.1,1]},sa=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ia=sa("applewebkit/")&&!sa("chrome/")?Math.round:Kt;function oa(t){t.min=ia(t.min),t.max=ia(t.max)}function ra(t,e,n){return"position"===t||"preserve-aspect"===t&&!gi(go(e),go(n),.2)}const aa=Ur({attachResizeListener:(t,e)=>ne(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),la={current:void 0},ua=Ur({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!la.current){const t=new aa({});t.mount(window),t.setOptions({layoutScroll:!0}),la.current=t}return la.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),ca=t=>!t.isLayoutDirty&&t.willUpdate(!1);function ha(){const t=new Set,e=new WeakMap,n=()=>t.forEach(ca);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const i=e.get(s);i&&(i(),e.delete(s)),n()},dirty:n}}function da(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ma={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!mt.test(t))return t;t=parseFloat(t)}return`${da(t,e.target.x)}% ${da(t,e.target.y)}%`}},pa={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=wn.parse(t);if(i.length>5)return s;const o=wn.createTransformer(t),r="number"!=typeof i[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=rs(a,l,.5);return"number"==typeof i[2+r]&&(i[2+r]/=u),"number"==typeof i[3+r]&&(i[3+r]/=u),o(i)}};function fa(){const t=e.useContext(l);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,o=e.useId();e.useEffect(()=>i(o),[]);return!n&&s?[!1,()=>s&&s(o)]:[!0]}class ga extends o.default.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=t;N(va),i&&(e.group&&e.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),wo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,s||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||qt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),v.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ya(t){const[n,s]=fa(),i=e.useContext(L);return o.default.createElement(ga,{...t,layoutGroup:i,switchLayoutGroup:e.useContext(k),isPresent:n,safeToRemove:s})}const va={borderRadius:{...ma,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ma,borderTopRightRadius:ma,borderBottomLeftRadius:ma,borderBottomRightRadius:ma,boxShadow:pa},xa={pan:{Feature:class extends pe{constructor(){super(...arguments),this.removePointerDownListener=Kt}onPointerDown(t){this.session=new li(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Gi(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:Zi(t),onStart:Zi(e),onMove:n,onEnd:(t,e)=>{delete this.session,s&&s(t,e)}}}mount(){this.removePointerDownListener=re(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends pe{constructor(t){super(t),this.removeGroupControls=Kt,this.removeListeners=Kt,this.controls=new Ki(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Kt}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ua,MeasureLayout:ya}},Pa=(t,e)=>U(t)?new Uo(e,{enableHardwareAcceleration:!1}):new Wo(e,{enableHardwareAcceleration:!0}),wa={layout:{ProjectionNode:ua,MeasureLayout:ya}},Ta={...oi,...be,...xa,...wa},Sa=O((t,e)=>ee(t,e,Ta,Pa));const ba=O(ee);function Ea(){const t=e.useRef(!1);return c(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Aa(){const t=Ea(),[n,s]=e.useState(0),i=e.useCallback(()=>{t.current&&s(n+1)},[n]);return[e.useCallback(()=>qt.postRender(i),[i]),n]}class Ca extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Va({children:t,isPresent:n}){const s=e.useId(),o=e.useRef(null),a=e.useRef({width:0,height:0,top:0,left:0}),{nonce:l}=e.useContext(r);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:r}=a.current;if(n||!o.current||!t||!e)return;o.current.dataset.motionPopId=s;const u=document.createElement("style");return l&&(u.nonce=l),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${i}px !important;\n left: ${r}px !important;\n }\n `),()=>{document.head.removeChild(u)}},[n]),i.createElement(Ca,{isPresent:n,childRef:o,sizeRef:a},i.cloneElement(t,{ref:o}))}const Ma=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:u})=>{const c=Ht(Ra),h=e.useId(),d=e.useMemo(()=>({id:h,initial:n,isPresent:s,custom:r,onExitComplete:t=>{c.set(t,!0);for(const t of c.values())if(!t)return;o&&o()},register:t=>(c.set(t,!1),()=>c.delete(t))}),a?void 0:[s]);return e.useMemo(()=>{c.forEach((t,e)=>c.set(e,!1))},[s]),i.useEffect(()=>{!s&&!c.size&&o&&o()},[s]),"popLayout"===u&&(t=i.createElement(Va,{isPresent:s},t)),i.createElement(l.Provider,{value:d},t)};function Ra(){return new Map}function Da(t){return e.useEffect(()=>()=>t(),[])}const La=t=>t.key||"";function ka(t){return"function"==typeof t}const Ba=e.createContext(null),Fa=t=>!0===t,ja=({children:t,id:n,inherit:s=!0})=>{const o=e.useContext(L),r=e.useContext(Ba),[a,l]=Aa(),u=e.useRef(null),c=o.id||r;null===u.current&&((t=>Fa(!0===t)||"id"===t)(s)&&c&&(n=n?c+"-"+n:c),u.current={id:n,group:Fa(s)&&o.group||ha()});const h=e.useMemo(()=>({...u.current,forceRender:a}),[l]);return i.createElement(L.Provider,{value:h},t)},Oa=e.createContext(null);function Ia(t){return t.value}function Ua(t,e){return t.layout.min-e.layout.min}function Wa(t){const n=Ht(()=>Ys(t)),{isStatic:s}=e.useContext(r);if(s){const[,s]=e.useState(t);e.useEffect(()=>n.on("change",s),[])}return n}function Na(t,e){const n=Wa(e()),s=()=>n.set(e());return s(),c(()=>{const e=()=>qt.update(s,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),Zt(s)}}),n}function za(t,e,n,s){if("function"==typeof t)return function(t){Hs.current=[],t();const e=Na(Hs.current,t);return Hs.current=void 0,e}(t);const i="function"==typeof e?e:Lr(e,n,s);return Array.isArray(t)?Ha(t,i):Ha([t],([t])=>i(t))}function Ha(t,e){const n=Ht(()=>[]);return Na(t,()=>{n.length=0;const s=t.length;for(let e=0;e<s;e++)n[e]=t[e].get();return e(n)})}function $a(t,e=0){return Y(t)?t:Wa(e)}const Ya={Group:e.forwardRef((function({children:t,as:n="ul",axis:s="y",onReorder:o,values:r,...a},l){const u=Ht(()=>Sa(n)),c=[],h=e.useRef(!1);ze(Boolean(r));const d={axis:s,registerItem:(t,e)=>{const n=c.findIndex(e=>t===e.value);-1!==n?c[n].layout=e[s]:c.push({value:t,layout:e[s]}),c.sort(Ua)},updateOrder:(t,e,n)=>{if(h.current)return;const s=function(t,e,n,s){if(!s)return t;const i=t.findIndex(t=>t.value===e);if(-1===i)return t;const o=s>0?1:-1,r=t[i+o];if(!r)return t;const a=t[i],l=r.layout,u=rs(l.min,l.max,.5);return 1===o&&a.layout.max+n>u||-1===o&&a.layout.min+n<u?function([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const s=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(s,0,i)}return t}(t,i,i+o):t}(c,t,e,n);c!==s&&(h.current=!0,o(s.map(Ia).filter(t=>-1!==r.indexOf(t))))}};return e.useEffect(()=>{h.current=!1}),i.createElement(u,{...a,ref:l,ignoreStrict:!0},i.createElement(Oa.Provider,{value:d},t))})),Item:e.forwardRef((function({children:t,style:n={},value:s,as:o="li",onDrag:r,layout:a=!0,...l},u){const c=Ht(()=>Sa(o)),h=e.useContext(Oa),d={x:$a(n.x),y:$a(n.y)},m=za([d.x,d.y],([t,e])=>t||e?1:"unset");ze(Boolean(h));const{axis:p,registerItem:f,updateOrder:g}=h;return i.createElement(c,{drag:p,...l,dragSnapToOrigin:!0,style:{...n,x:d.x,y:d.y,zIndex:m},layout:a,onDrag:(t,e)=>{const{velocity:n}=e;n[p]&&g(s,d[p].get(),n[p]),r&&r(t,e)},onLayoutMeasure:t=>f(s,t),ref:u,ignoreStrict:!0},t)}))},Ga={renderer:Pa,...oi,...be},Xa={...Ga,...xa,...wa};function Ka(t,n,s){e.useInsertionEffect(()=>t.on(n,s),[t,n,s])}function qa(t,e){Ne(Boolean(!e||e.current))}const Za=()=>({scrollX:Ys(0),scrollY:Ys(0),scrollXProgress:Ys(0),scrollYProgress:Ys(0)});function _a({container:t,target:n,layoutEffect:s=!0,...i}={}){const o=Ht(Za);return(s?c:e.useEffect)(()=>(qa(0,n),qa(0,t),Cr(({x:t,y:e})=>{o.scrollX.set(t.current),o.scrollXProgress.set(t.progress),o.scrollY.set(e.current),o.scrollYProgress.set(e.progress)},{...i,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[t,n,JSON.stringify(i.offset)]),o}function Ja(t){const n=e.useRef(0),{isStatic:s}=e.useContext(r);e.useEffect(()=>{if(s)return;const e=({timestamp:e,delta:s})=>{n.current||(n.current=e),t(e-n.current,s)};return qt.update(e,!0),()=>Zt(e)},[t])}class Qa extends $s{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;H.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||Z(t)||"willChange"===t||(e=d(t)),e&&(Ws(this.members,e),this.update())}remove(t){H.has(t)?(this.transforms.delete(t),this.transforms.size||Ns(this.members,"transform")):Ns(this.members,d(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function tl(){!Ro.current&&Do();const[t]=e.useState(Mo.current);return t}function el(t,e){[...e].reverse().forEach(n=>{const s=t.getVariant(n);s&&Xs(t,s),t.variantChildren&&t.variantChildren.forEach(t=>{el(t,e)})})}function nl(){let t=!1;const e=new Set,n={subscribe:t=>(e.add(t),()=>{e.delete(t)}),start(n,s){ze(t);const i=[];return e.forEach(t=>{i.push(Js(t,n,{transitionOverride:s}))}),Promise.all(i)},set:n=>(ze(t),e.forEach(t=>{!function(t,e){Array.isArray(e)?el(t,e):"string"==typeof e?el(t,[e]):Xs(t,e)}(t,n)})),stop(){e.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>(t=!0,()=>{t=!1,n.stop()})};return n}function sl(){const t=Ht(nl);return c(t.mount,[]),t}const il=sl;class ol{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const rl=()=>new ol;function al(t){return null!==t&&"object"==typeof t&&B in t}function ll(){return ul}function ul(t){la.current&&(la.current.isUpdating=!1,la.current.blockUpdate(),t&&t())}const cl=(t,e)=>`${t}: ${e}`,hl=new Map;let dl,ml,pl;function fl(t,e,n,s){const i=H.has(e)?"transform":e,o=cl(t,i),r=hl.get(o);if(!r)return null;const{animation:a,startTime:l}=r;return null===l||window.HandoffComplete?((()=>{hl.delete(o);try{a.cancel()}catch(t){}})(),null):(void 0===dl&&(dl=performance.now()),dl-l||0)}const gl=()=>({});class yl extends Oo{build(){}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const vl=Gt({scrapeMotionValuesFromProps:gl,createRenderState:gl});const xl=t=>t>.001?1/t:1e5;let Pl=!1;let wl=0;t.AnimatePresence=({children:t,custom:n,initial:s=!0,onExitComplete:o,exitBeforeEnter:r,presenceAffectsLayout:a=!0,mode:l="sync"})=>{ze(!r);const u=e.useContext(L).forceRender||Aa()[0],h=Ea(),d=function(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}(t);let m=d;const p=e.useRef(new Map).current,f=e.useRef(m),g=e.useRef(new Map).current,y=e.useRef(!0);if(c(()=>{y.current=!1,function(t,e){t.forEach(t=>{const n=La(t);e.set(n,t)})}(d,g),f.current=m}),Da(()=>{y.current=!0,g.clear(),p.clear()}),y.current)return i.createElement(i.Fragment,null,m.map(t=>i.createElement(Ma,{key:La(t),isPresent:!0,initial:!!s&&void 0,presenceAffectsLayout:a,mode:l},t)));m=[...m];const v=f.current.map(La),x=d.map(La),P=v.length;for(let t=0;t<P;t++){const e=v[t];-1!==x.indexOf(e)||p.has(e)||p.set(e,void 0)}return"wait"===l&&p.size&&(m=[]),p.forEach((t,e)=>{if(-1!==x.indexOf(e))return;const s=g.get(e);if(!s)return;const r=v.indexOf(e);let c=t;if(!c){const t=()=>{p.delete(e);const t=Array.from(g.keys()).filter(t=>!x.includes(t));if(t.forEach(t=>g.delete(t)),f.current=d.filter(n=>{const s=La(n);return s===e||t.includes(s)}),!p.size){if(!1===h.current)return;u(),o&&o()}};c=i.createElement(Ma,{key:La(s),isPresent:!1,onExitComplete:t,custom:n,presenceAffectsLayout:a,mode:l},s),p.set(e,c)}m.splice(r,0,c)}),m=m.map(t=>{const e=t.key;return p.has(e)?t:i.createElement(Ma,{key:La(t),isPresent:!0,presenceAffectsLayout:a,mode:l},t)}),i.createElement(i.Fragment,null,p.size?m:m.map(t=>e.cloneElement(t)))},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{ze(!1)},[]),i.createElement(ja,{id:Ht(()=>"asl-"+wl++)},t)),t.DeprecatedLayoutGroupContext=Ba,t.DragControls=ol,t.FlatTree=Po,t.LayoutGroup=ja,t.LayoutGroupContext=L,t.LazyMotion=function({children:t,features:n,strict:s=!1}){const[,o]=e.useState(!ka(n)),r=e.useRef(void 0);if(!ka(n)){const{renderer:t,...e}=n;r.current=t,D(e)}return e.useEffect(()=>{ka(n)&&n().then(({renderer:t,...e})=>{D(e),r.current=t,o(!0)})},[]),i.createElement(h.Provider,{value:{renderer:r.current,strict:s}},t)},t.MotionConfig=function({children:t,isValidProp:n,...s}){n&&Ct(n),(s={...e.useContext(r),...s}).isStatic=Ht(()=>s.isStatic);const o=e.useMemo(()=>s,[JSON.stringify(s.transition),s.transformPagePoint,s.reducedMotion]);return i.createElement(r.Provider,{value:o},t)},t.MotionConfigContext=r,t.MotionContext=a,t.MotionGlobalConfig=p,t.MotionValue=$s,t.PresenceContext=l,t.Reorder=Ya,t.SwitchLayoutGroupContext=k,t.VisualElement=Oo,t.addPointerEvent=re,t.addPointerInfo=oe,t.addScaleCorrector=N,t.animate=ir,t.animateValue=Vs,t.animateVisualElement=Js,t.animationControls=nl,t.animations=oi,t.anticipate=ns,t.backIn=ts,t.backInOut=es,t.backOut=Qn,t.buildTransform=K,t.calcLength=fi,t.cancelFrame=Zt,t.cancelSync=Br,t.circIn=Zn,t.circInOut=Jn,t.circOut=_n,t.clamp=et,t.color=fn,t.complex=wn,t.createBox=Ci,t.createDomMotionComponent=function(t){return F(ee(t,{forwardMotionProps:!1},Ta,Pa))},t.createMotionComponent=F,t.createScopedAnimate=sr,t.cubicBezier=Hn,t.delay=To,t.disableInstantTransitions=function(){Be.current=!1},t.distance=ri,t.distance2D=ai,t.domAnimation=Ga,t.domMax=Xa,t.easeIn=$n,t.easeInOut=Gn,t.easeOut=Yn,t.filterProps=Vt,t.frame=qt,t.frameData=_t,t.inView=Dr,t.interpolate=xs,t.invariant=ze,t.isBrowser=u,t.isDragActive=me,t.isMotionComponent=al,t.isMotionValue=Y,t.isValidMotionProp=Et,t.m=ba,t.makeUseVisualState=Gt,t.mirrorEasing=Kn,t.mix=vs,t.motion=Sa,t.motionValue=Ys,t.optimizedAppearDataAttribute=m,t.pipe=le,t.progress=os,t.px=mt,t.resolveMotionValue=Yt,t.reverseEasing=qn,t.scroll=function(t,e){const n=Mr(e);return"function"==typeof t?Eo(t,n):t.attachTimeline(n)},t.scrollInfo=Cr,t.spring=Wn,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,o)=>{const r="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(r-i);let l=t*a;if(s){const e=o*t;l=is(s)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,s,i){if(window.HandoffComplete)return void(window.HandoffAppearAnimations=void 0);const o=t.dataset.framerAppearId;if(!o)return;window.HandoffAppearAnimations=fl;const r=cl(o,e);pl||(pl=Bs(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),hl.set(r,{animation:pl,startTime:null}),window.HandoffCancelAllAnimations||(window.HandoffCancelAllAnimations=()=>{hl.forEach(({animation:t})=>{t.cancel()}),hl.clear(),window.HandoffCancelAllAnimations=void 0}));const a=()=>{pl.cancel();const o=Bs(t,e,n,s);void 0===ml&&(ml=performance.now()),o.startTime=ml,hl.set(r,{animation:o,startTime:ml}),i&&i(o)};pl.ready?pl.ready.then(a).catch(Kt):a()},t.steps=Jt,t.sync=kr,t.transform=Lr,t.unwrapMotionComponent=function(t){if(al(t))return t[B]},t.useAnimate=function(){const t=Ht(()=>({current:null,animations:[]})),e=Ht(()=>sr(t));return Da(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=il,t.useAnimationControls=sl,t.useAnimationFrame=Ja,t.useCycle=function(...t){const n=e.useRef(0),[s,i]=e.useState(t[n.current]);return[s,e.useCallback(e=>{n.current="number"!=typeof e?Yo(0,t.length,n.current+1):e,i(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,s]=e.useState(t),i=vl({},!1),o=Ht(()=>new yl({props:{},visualState:i,presenceContext:null},{initialState:t}));return e.useEffect(()=>(o.mount({}),()=>o.unmount()),[o]),e.useEffect(()=>{o.update({onUpdate:t=>{s({...t})}},null)},[s,o]),[n,Ht(()=>t=>Js(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=Wa(1),s=Wa(1);const{visualElement:i}=e.useContext(a);return ze(!(!t&&!i)),Ne(Pl),Pl=!0,t?(n=t.scaleX||n,s=t.scaleY||s):i&&(n=i.getValue("scaleX",1),s=i.getValue("scaleY",1)),{scaleX:za(n,xl),scaleY:za(s,xl)}},t.useDomEvent=function(t,n,s,i){e.useEffect(()=>{const e=t.current;if(s&&e)return ne(e,n,s,i)},[t,n,s,i])},t.useDragControls=function(){return Ht(rl)},t.useElementScroll=function(t){return _a({container:t})},t.useForceUpdate=Aa,t.useInView=function(t,{root:n,margin:s,amount:i,once:o=!1}={}){const[r,a]=e.useState(!1);return e.useEffect(()=>{if(!t.current||o&&r)return;const e={root:n&&n.current||void 0,margin:s,amount:i};return Dr(t.current,()=>(a(!0),o?void 0:()=>a(!1)),e)},[n,t,s,o,i]),r},t.useInstantLayoutTransition=ll,t.useInstantTransition=function(){const[t,n]=Aa(),s=ll(),i=e.useRef();return e.useEffect(()=>{qt.postRender(()=>qt.postRender(()=>{n===i.current&&(Be.current=!1)}))},[n]),e=>{s(()=>{Be.current=!0,t(),e(),i.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(l))||t.isPresent;var t},t.useIsomorphicLayoutEffect=c,t.useMotionTemplate=function(t,...e){const n=t.length;return Na(e.filter(Y),(function(){let s="";for(let i=0;i<n;i++){s+=t[i];const n=e[i];n&&(s+=Y(n)?n.get():n)}return s}))},t.useMotionValue=Wa,t.useMotionValueEvent=Ka,t.usePresence=fa,t.useReducedMotion=tl,t.useReducedMotionConfig=function(){const t=tl(),{reducedMotion:n}=e.useContext(r);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return i.useCallback(()=>{const t=la.current;t&&t.resetTree()},[])},t.useScroll=_a,t.useSpring=function(t,n={}){const{isStatic:s}=e.useContext(r),i=e.useRef(null),o=Wa(Y(t)?t.get():t),a=()=>{i.current&&i.current.stop()};return e.useInsertionEffect(()=>o.attach((t,e)=>{if(s)return e(t);const r=i.current;return r&&0===r.time&&r.sample(_t.delta),a(),i.current=Vs({keyframes:[o.get(),t],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:e}),o.get()},a),[JSON.stringify(n)]),c(()=>{if(Y(t))return t.on("change",t=>o.set(parseFloat(t)))},[o]),o},t.useTime=function(){const t=Wa(0);return Ja(e=>t.set(e)),t},t.useTransform=za,t.useUnmountEffect=Da,t.useVelocity=function(t){const e=Wa(t.getVelocity()),n=()=>{const s=t.getVelocity();e.set(s),s&&qt.update(n)};return Ka(t,"change",()=>{qt.update(n,!1,!0)}),e},t.useViewportScroll=function(){return _a()},t.useWillChange=function(){return Ht(()=>new Qa("auto"))},t.visualElementStore=bo,t.warning=Ne,t.wrap=Yo,Object.defineProperty(t,"__esModule",{value:!0})}));
@@ -1002,7 +1002,7 @@
1002
1002
  * This will be replaced by the build step with the latest version number.
1003
1003
  * When MotionValues are provided to motion components, warn if versions are mixed.
1004
1004
  */
1005
- this.version = "11.0.11";
1005
+ this.version = "11.0.12";
1006
1006
  /**
1007
1007
  * Tracks whether this value can output a velocity. Currently this is only true
1008
1008
  * if the value is numerical, but we might be able to widen the scope here and support
@@ -3869,7 +3869,7 @@
3869
3869
  * and warn against mismatches.
3870
3870
  */
3871
3871
  {
3872
- warnOnce(nextValue.version === "11.0.11", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.0.11 may not work as expected.`);
3872
+ warnOnce(nextValue.version === "11.0.12", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.0.12 may not work as expected.`);
3873
3873
  }
3874
3874
  }
3875
3875
  else if (isMotionValue(prevValue)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "framer-motion",
3
- "version": "11.0.11",
3
+ "version": "11.0.12",
4
4
  "description": "A simple and powerful JavaScript animation library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.mjs",
@@ -69,10 +69,14 @@
69
69
  "tslib": "^2.4.0"
70
70
  },
71
71
  "peerDependencies": {
72
+ "@emotion/is-prop-valid": "*",
72
73
  "react": "^18.0.0",
73
74
  "react-dom": "^18.0.0"
74
75
  },
75
76
  "peerDependenciesMeta": {
77
+ "@emotion/is-prop-valid": {
78
+ "optional": true
79
+ },
76
80
  "react": {
77
81
  "optional": true
78
82
  },
@@ -80,9 +84,6 @@
80
84
  "optional": true
81
85
  }
82
86
  },
83
- "optionalDependencies": {
84
- "@emotion/is-prop-valid": "^0.8.2"
85
- },
86
87
  "bundlesize": [
87
88
  {
88
89
  "path": "./dist/size-rollup-motion.js",
@@ -117,5 +118,5 @@
117
118
  "maxSize": "33 kB"
118
119
  }
119
120
  ],
120
- "gitHead": "c2454f112dae23eedfb555b9afb48b47bfd3d0a3"
121
+ "gitHead": "c2238635241851089f7967862f7eed1fdaab8d7d"
121
122
  }