framer-motion 12.4.13 → 12.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/client.js +1 -1
  3. package/dist/cjs/{create-DkTZDHiS.js → create-CgwP8YNL.js} +4234 -4792
  4. package/dist/cjs/debug.js +5 -281
  5. package/dist/cjs/dom-mini.js +9 -7
  6. package/dist/cjs/dom.js +81 -639
  7. package/dist/cjs/index.js +1555 -1553
  8. package/dist/cjs/m.js +11 -179
  9. package/dist/cjs/mini.js +8 -0
  10. package/dist/debug.d.ts +2 -35
  11. package/dist/dom-mini.d.ts +1 -181
  12. package/dist/dom-mini.js +1 -1
  13. package/dist/dom.d.ts +3 -242
  14. package/dist/dom.js +1 -1
  15. package/dist/es/animation/animate/single-value.mjs +1 -1
  16. package/dist/es/animation/animators/BaseAnimation.mjs +1 -1
  17. package/dist/es/animation/animators/MainThreadAnimation.mjs +1 -2
  18. package/dist/es/animation/animators/drivers/driver-frameloop.mjs +1 -2
  19. package/dist/es/animation/animators/waapi/index.mjs +1 -3
  20. package/dist/es/animation/generators/utils/velocity.mjs +1 -1
  21. package/dist/es/animation/interfaces/motion-value.mjs +2 -4
  22. package/dist/es/animation/interfaces/visual-element-target.mjs +1 -2
  23. package/dist/es/animation/optimized-appear/start.mjs +3 -3
  24. package/dist/es/animation/sequence/utils/edit.mjs +1 -1
  25. package/dist/es/components/AnimatePresence/index.mjs +1 -1
  26. package/dist/es/components/Reorder/utils/check-reorder.mjs +1 -1
  27. package/dist/es/debug.mjs +1 -1
  28. package/dist/es/dom.mjs +1 -5
  29. package/dist/es/gestures/drag/VisualElementDragControls.mjs +1 -2
  30. package/dist/es/gestures/hover.mjs +1 -2
  31. package/dist/es/gestures/pan/PanSession.mjs +1 -2
  32. package/dist/es/gestures/pan/index.mjs +1 -1
  33. package/dist/es/gestures/press.mjs +1 -2
  34. package/dist/es/index.mjs +14 -19
  35. package/dist/es/motion/features/layout/MeasureLayout.mjs +1 -2
  36. package/dist/es/motion/utils/use-visual-element.mjs +6 -6
  37. package/dist/es/projection/node/create-projection-node.mjs +2 -8
  38. package/dist/es/projection/shared/stack.mjs +1 -1
  39. package/dist/es/projection.mjs +1 -3
  40. package/dist/es/render/VisualElement.mjs +2 -5
  41. package/dist/es/render/components/create-proxy.mjs +1 -1
  42. package/dist/es/render/dom/DOMVisualElement.mjs +1 -1
  43. package/dist/es/render/dom/scroll/info.mjs +1 -2
  44. package/dist/es/render/dom/scroll/observe.mjs +1 -1
  45. package/dist/es/render/dom/scroll/on-scroll-handler.mjs +1 -1
  46. package/dist/es/render/dom/scroll/track.mjs +1 -1
  47. package/dist/es/render/svg/SVGVisualElement.mjs +1 -1
  48. package/dist/es/render/svg/config-motion.mjs +1 -1
  49. package/dist/es/render/utils/KeyframesResolver.mjs +1 -1
  50. package/dist/es/render/utils/flat-tree.mjs +1 -1
  51. package/dist/es/render/utils/motion-values.mjs +3 -3
  52. package/dist/es/render/utils/setters.mjs +1 -1
  53. package/dist/es/utils/delay.mjs +1 -2
  54. package/dist/es/utils/reduced-motion/use-reduced-motion.mjs +1 -1
  55. package/dist/es/utils/use-animation-frame.mjs +1 -1
  56. package/dist/es/utils/use-force-update.mjs +1 -1
  57. package/dist/es/utils/use-instant-transition.mjs +1 -1
  58. package/dist/es/value/scroll/use-element-scroll.mjs +1 -1
  59. package/dist/es/value/scroll/use-viewport-scroll.mjs +1 -1
  60. package/dist/es/value/use-combine-values.mjs +2 -2
  61. package/dist/es/value/use-computed.mjs +1 -1
  62. package/dist/es/value/use-inverted-scale.mjs +3 -3
  63. package/dist/es/value/use-motion-value.mjs +1 -1
  64. package/dist/es/value/use-scroll.mjs +4 -4
  65. package/dist/es/value/use-spring.mjs +1 -1
  66. package/dist/es/value/use-transform.mjs +1 -1
  67. package/dist/es/value/use-velocity.mjs +1 -1
  68. package/dist/es/value/use-will-change/WillChangeMotionValue.mjs +2 -2
  69. package/dist/framer-motion.dev.js +8227 -8251
  70. package/dist/framer-motion.js +1 -1
  71. package/dist/m.d.ts +49 -241
  72. package/dist/size-rollup-animate.js +1 -1
  73. package/dist/size-rollup-dom-animation-assets.js +1 -1
  74. package/dist/size-rollup-dom-animation.js +1 -1
  75. package/dist/size-rollup-dom-max-assets.js +1 -1
  76. package/dist/size-rollup-dom-max.js +1 -1
  77. package/dist/size-rollup-m.js +1 -1
  78. package/dist/size-rollup-motion.js +1 -1
  79. package/dist/size-rollup-scroll.js +1 -1
  80. package/dist/types/client.d.ts +2 -2
  81. package/dist/types/index.d.ts +43 -79
  82. package/dist/{types.d-6pKw1mTI.d.ts → types.d-B50aGbjN.d.ts} +81 -289
  83. package/package.json +4 -6
  84. package/dist/es/frameloop/batcher.mjs +0 -69
  85. package/dist/es/frameloop/frame.mjs +0 -6
  86. package/dist/es/frameloop/index-legacy.mjs +0 -20
  87. package/dist/es/frameloop/microtask.mjs +0 -5
  88. package/dist/es/frameloop/order.mjs +0 -10
  89. package/dist/es/frameloop/render-step.mjs +0 -92
  90. package/dist/es/frameloop/sync-time.mjs +0 -31
  91. package/dist/es/stats/animation-count.mjs +0 -7
  92. package/dist/es/stats/buffer.mjs +0 -6
  93. package/dist/es/stats/index.mjs +0 -113
  94. package/dist/es/utils/GlobalConfig.mjs +0 -6
  95. package/dist/es/utils/array.mjs +0 -21
  96. package/dist/es/utils/subscription-manager.mjs +0 -40
  97. package/dist/es/utils/velocity-per-second.mjs +0 -11
  98. package/dist/es/utils/warn-once.mjs +0 -11
  99. package/dist/es/value/index.mjs +0 -319
  100. package/dist/three.d.ts +0 -2833
@@ -1 +1 @@
1
- const t=t=>t;let e=t;function n(t){let e;return()=>(void 0===e&&(e=t()),e)}const s=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},r=t=>1e3*t,i=t=>t/1e3,o=n(()=>void 0!==window.ScrollTimeline);class a extends class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}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,e){const n=this.animations.map(n=>o()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0);return()=>{n.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}{then(t,e){return Promise.all(this.animations).then(t).catch(e)}}function l(t,e){return t?t[e]||t.default||t:void 0}function u(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}function h(t,e=100,n){const s=n({...t,keyframes:[0,e]}),r=Math.min(u(s),2e4);return{type:"keyframes",ease:t=>s.next(r*t).value/e,duration:i(r)}}function c(t){return"function"==typeof t}function d(t,e){t.timeline=e,t.onfinish=null}const p=t=>Array.isArray(t)&&"number"==typeof t[0],f={linearEasing:void 0};function m(t,e){const s=n(t);return()=>{var t;return null!==(t=f[e])&&void 0!==t?t:s()}}const v=m(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),y=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let e=0;e<i;e++)r+=t(s(0,i-1,e))+", ";return`linear(${r.substring(0,r.length-2)})`};function g(t){return Boolean("function"==typeof t&&v()||!t||"string"==typeof t&&(t in w||v())||p(t)||Array.isArray(t)&&t.every(g))}const b=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,w={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:b([0,.65,.55,1]),circOut:b([.55,0,1,.45]),backIn:b([.31,.01,.66,-.59]),backOut:b([.33,1.53,.69,.99])};const T=(t,e,n)=>n>e?e:n<t?t:n;function S(t,e){return e?t*(1e3/e):0}function V(t,e,n){const s=Math.max(e-5,0);return S(n-t(s),e-s)}const M=100,A=10,x=1,P=0,k=800,C=.3,F=.3,R={granular:.01,default:2},E={granular:.005,default:.5},I=.01,O=10,B=.05,D=1;function K({duration:t=k,bounce:e=C,velocity:n=P,mass:s=x}){let o,a,l=1-e;l=T(B,D,l),t=T(I,O,i(t)),l<1?(o=e=>{const s=e*l,r=s*t;return.001-(s-n)/N(e,l)*Math.exp(-r)},a=e=>{const s=e*l*t,r=s*n+n,i=Math.pow(l,2)*Math.pow(e,2)*t,a=Math.exp(-s),u=N(Math.pow(e,2),l);return(.001-o(e)>0?-1:1)*((r-i)*a)/u}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,a=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(o,a,5/t);if(t=r(t),isNaN(u))return{stiffness:M,damping:A,duration:t};{const e=Math.pow(u,2)*s;return{stiffness:e,damping:2*l*Math.sqrt(s*e),duration:t}}}function N(t,e){return t*Math.sqrt(1-e*e)}const j=["duration","bounce"],Y=["stiffness","damping","mass"];function $(t,e){return e.some(e=>void 0!==t[e])}function U(t=F,e=C){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:o}=n;const a=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],h={done:!1,value:a},{stiffness:c,damping:d,mass:p,duration:f,velocity:m,isResolvedFromDuration:v}=function(t){let e={velocity:P,stiffness:M,damping:A,mass:x,isResolvedFromDuration:!1,...t};if(!$(t,Y)&&$(t,j))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),r=s*s,i=2*T(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:x,stiffness:r,damping:i}}else{const n=K(t);e={...e,...n,mass:x},e.isResolvedFromDuration=!0}return e}({...n,velocity:-i(n.velocity||0)}),g=m||0,b=d/(2*Math.sqrt(c*p)),w=l-a,S=i(Math.sqrt(c/p)),k=Math.abs(w)<5;let I;if(s||(s=k?R.granular:R.default),o||(o=k?E.granular:E.default),b<1){const t=N(S,b);I=e=>{const n=Math.exp(-b*S*e);return l-n*((g+b*S*w)/t*Math.sin(t*e)+w*Math.cos(t*e))}}else if(1===b)I=t=>l-Math.exp(-S*t)*(w+(g+S*w)*t);else{const t=S*Math.sqrt(b*b-1);I=e=>{const n=Math.exp(-b*S*e),s=Math.min(t*e,300);return l-n*((g+b*S*w)*Math.sinh(s)+t*w*Math.cosh(s))/t}}const O={calculatedDuration:v&&f||null,next:t=>{const e=I(t);if(v)h.done=t>=f;else{let n=0;b<1&&(n=0===t?r(g):V(I,t,e));const i=Math.abs(n)<=s,a=Math.abs(l-e)<=o;h.done=i&&a}return h.value=h.done?l:e,h},toString:()=>{const t=Math.min(u(O),2e4),e=y(e=>O.next(t*e).value,t,30);return t+"ms "+e}};return O}const L=t=>Array.isArray(t)&&"number"!=typeof t[0];function W(t,e){return L(t)?t[((t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t})(0,t.length,e)]:t}const X=(t,e,n)=>t+(e-t)*n;function q(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=s(0,e,r);t.push(X(n,1,i))}}function z(t){const e=[0];return q(e,t.length-1),e}const Z=t=>Boolean(t&&t.getVelocity);function H(t){return"object"==typeof t&&!Array.isArray(t)}function G(t,e,n,s){return"string"==typeof t&&H(e)?function(t,e,n){var s;if(t instanceof EventTarget)return[t];if("string"==typeof t){let r=document;e&&(r=e.current);const i=null!==(s=null==n?void 0:n[t])&&void 0!==s?s:r.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function _(t,e,n){return t*(e+1)}function J(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}function Q(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function tt(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&&(Q(t,r),s--)}}(t,r,i);for(let o=0;o<e.length;o++)t.push({value:e[o],at:X(r,i,s[o]),easing:W(n,o)})}function et(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function nt(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function st(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function rt(t,e){return e[t]||(e[t]=[]),e[t]}function it(t){return Array.isArray(t)?t:[t]}function ot(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const at=t=>"number"==typeof t,lt=t=>t.every(at),ut=new WeakMap,ht=!1,ct=["read","resolveKeyframes","update","preRender","render","postRender"],dt={value:null,addProjectionMetrics:null};const{schedule:pt,cancel:ft,state:mt,steps:vt}=function(t,e){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=ct.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,s=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){o.has(e)&&(h.schedule(e),t()),l++,e(a)}const h={schedule:(t,e=!1,i=!1)=>{const a=i&&r?n:s;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{a=t,r?i=!0:(r=!0,[n,s]=[s,n],n.forEach(u),e&&dt.value&&dt.value.frameloop[e].push(l),l=0,n.clear(),r=!1,i&&(i=!1,h.process(t)))}};return h}(i,e?n:void 0),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:h,render:c,postRender:d}=o,p=()=>{const i=performance.now();n=!1,r.delta=s?1e3/60:Math.max(Math.min(i-r.timestamp,40),1),r.timestamp=i,r.isProcessing=!0,a.process(r),l.process(r),u.process(r),h.process(r),c.process(r),d.process(r),r.isProcessing=!1,n&&e&&(s=!1,t(p))};return{schedule:ct.reduce((e,i)=>{const a=o[i];return e[i]=(e,i=!1,o=!1)=>(n||(n=!0,s=!0,r.isProcessing||t(p)),a.schedule(e,i,o)),e},{}),cancel:t=>{for(let e=0;e<ct.length;e++)o[ct[e]].cancel(t)},state:r,steps:o}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:t,!0),yt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],gt=new Set(yt),bt=new Set(["width","height","top","left","right","bottom",...yt]),wt=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;let Tt;function St(){Tt=void 0}const Vt={now:()=>(void 0===Tt&&Vt.set(mt.isProcessing||ht?mt.timestamp:performance.now()),Tt),set:t=>{Tt=t,queueMicrotask(St)}};class Mt{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>Q(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}}class At{constructor(t,e={}){this.version="12.4.13",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Vt.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Vt.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Mt);const n=this.events[t].add(e);return"change"===t?()=>{n(),pt.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=Vt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return S(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 xt(t,e){return new At(t,e)}function Pt(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function kt(t,e,n,s){if("function"==typeof e){const[r,i]=Pt(s);e=e(void 0!==n?n:t.custom,r,i)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,i]=Pt(s);e=e(void 0!==n?n:t.custom,r,i)}return e}function Ct(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,xt(n))}function Ft(t,e){const n=function(t,e,n){const s=t.getProps();return kt(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const e in i){Ct(t,e,wt(i[e]))}}function Rt(t,e){const n=t.getValue("willChange");if(s=n,Boolean(Z(s)&&s.add))return n.add(e);var s}const Et=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),It="data-"+Et("framerAppearId");function Ot(t){return t.props[It]}const Bt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Dt(e,n,s,r){if(e===n&&s===r)return t;const i=t=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=Bt(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(t,0,1,e,s);return t=>0===t||1===t?t:Bt(i(t),n,r)}const Kt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Nt=t=>e=>1-t(1-e),jt=Dt(.33,1.53,.69,.99),Yt=Nt(jt),$t=Kt(Yt),Ut=t=>(t*=2)<1?.5*Yt(t):.5*(2-Math.pow(2,-10*(t-1))),Lt=t=>1-Math.sin(Math.acos(t)),Wt=Nt(Lt),Xt=Kt(Lt),qt=t=>/^0[^.\s]+$/u.test(t);const zt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Zt={...zt,transform:t=>T(0,1,t)},Ht={...zt,default:1},Gt=t=>Math.round(1e5*t)/1e5,_t=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Jt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qt=(t,e)=>n=>Boolean("string"==typeof n&&Jt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),te=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[r,i,o,a]=s.match(_t);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},ee={...zt,transform:t=>Math.round((t=>T(0,255,t))(t))},ne={test:Qt("rgb","red"),parse:te("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ee.transform(t)+", "+ee.transform(e)+", "+ee.transform(n)+", "+Gt(Zt.transform(s))+")"};const se={test:Qt("#"),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:ne.transform},re=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ie=re("deg"),oe=re("%"),ae=re("px"),le=re("vh"),ue=re("vw"),he={...oe,parse:t=>oe.parse(t)/100,transform:t=>oe.transform(100*t)},ce={test:Qt("hsl","hue"),parse:te("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+oe.transform(Gt(e))+", "+oe.transform(Gt(n))+", "+Gt(Zt.transform(s))+")"},de={test:t=>ne.test(t)||se.test(t)||ce.test(t),parse:t=>ne.test(t)?ne.parse(t):ce.test(t)?ce.parse(t):se.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ne.transform(t):ce.transform(t)},pe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const fe=/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 me(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(fe,t=>(de.test(t)?(s.color.push(i),r.push("color"),n.push(de.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 ve(t){return me(t).values}function ye(t){const{split:e,types:n}=me(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?Gt(t[i]):"color"===e?de.transform(t[i]):t[i]}return r}}const ge=t=>"number"==typeof t?0:t;const be={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(_t))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(pe))||void 0===n?void 0:n.length)||0)>0},parse:ve,createTransformer:ye,getAnimatableNone:function(t){const e=ve(t);return ye(t)(e.map(ge))}},we=new Set(["brightness","contrast","saturate","opacity"]);function Te(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(_t)||[];if(!s)return t;const r=n.replace(s,"");let i=we.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const Se=/\b([a-z-]*)\(.*?\)/gu,Ve={...be,getAnimatableNone:t=>{const e=t.match(Se);return e?e.map(Te).join(" "):t}},Me={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,radius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,top:ae,right:ae,bottom:ae,left:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,backgroundPositionX:ae,backgroundPositionY:ae},Ae={rotate:ie,rotateX:ie,rotateY:ie,rotateZ:ie,scale:Ht,scaleX:Ht,scaleY:Ht,scaleZ:Ht,skew:ie,skewX:ie,skewY:ie,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:Zt,originX:he,originY:he,originZ:ae},xe={...zt,transform:Math.round},Pe={...Me,...Ae,zIndex:xe,size:ae,fillOpacity:Zt,strokeOpacity:Zt,numOctaves:xe},ke={...Pe,color:de,backgroundColor:de,outlineColor:de,fill:de,stroke:de,borderColor:de,borderTopColor:de,borderRightColor:de,borderBottomColor:de,borderLeftColor:de,filter:Ve,WebkitFilter:Ve},Ce=t=>ke[t];function Fe(t,e){let n=Ce(t);return n!==Ve&&(n=be),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Re=new Set(["auto","none","0"]);const Ee=t=>180*t/Math.PI,Ie=t=>{const e=Ee(Math.atan2(t[1],t[0]));return Be(e)},Oe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ie,rotateZ:Ie,skewX:t=>Ee(Math.atan(t[1])),skewY:t=>Ee(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Be=t=>((t%=360)<0&&(t+=360),t),De=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ke=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ne={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:De,scaleY:Ke,scale:t=>(De(t)+Ke(t))/2,rotateX:t=>Be(Ee(Math.atan2(t[6],t[5]))),rotateY:t=>Be(Ee(Math.atan2(-t[2],t[0]))),rotateZ:Ie,rotate:Ie,skewX:t=>Ee(Math.atan(t[4])),skewY:t=>Ee(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function je(t){return t.includes("scale")?1:0}function Ye(t,e){if(!t||"none"===t)return je(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=Ne,r=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Oe,r=e}if(!r)return je(e);const i=s[e],o=r[1].split(",").map($e);return"function"==typeof i?i(o):o[i]}function $e(t){return parseFloat(t.trim())}const Ue=t=>t===zt||t===ae,Le=new Set(["x","y","z"]),We=yt.filter(t=>!Le.has(t));const Xe={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Ye(e,"x"),y:(t,{transform:e})=>Ye(e,"y")};Xe.translateX=Xe.x,Xe.translateY=Xe.y;const qe=new Set;let ze=!1,Ze=!1;function He(){if(Ze){const t=Array.from(qe).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return We.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{var s;null===(s=t.getValue(e))||void 0===s||s.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Ze=!1,ze=!1,qe.forEach(t=>t.complete()),qe.clear()}function Ge(){qe.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ze=!0)})}class _e{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?(qe.add(this),ze||(ze=!0,pt.read(Ge),pt.resolveKeyframes(He))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let r=0;r<t.length;r++)if(null===t[r])if(0===r){const r=null==s?void 0:s.get(),i=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const s=n.readValue(e,i);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=i),s&&void 0===r&&s.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),qe.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,qe.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Je=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Qe=t=>e=>"string"==typeof e&&e.startsWith(t),tn=Qe("--"),en=Qe("var(--"),nn=t=>!!en(t)&&sn.test(t.split("/*")[0].trim()),sn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,rn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function on(t,e,n=1){const[s,r]=function(t){const e=rn.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 Je(t)?parseFloat(t):t}return nn(r)?on(r,e,n+1):r}const an=t=>e=>e.test(t),ln=[zt,ae,oe,ie,ue,le,{test:t=>"auto"===t,parse:t=>t}],un=t=>ln.find(an(t));class hn extends _e{constructor(t,e,n,s,r){super(t,e,n,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),nn(s))){const r=on(s,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!bt.has(n)||2!==t.length)return;const[s,r]=t,i=un(s),o=un(r);if(i!==o)if(Ue(i)&&Ue(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||qt(s))&&n.push(e);var s;n.length&&function(t,e,n){let s=0,r=void 0;for(;s<t.length&&!r;){const e=t[s];"string"==typeof e&&!Re.has(e)&&me(e).values.length&&(r=t[s]),s++}if(r&&n)for(const s of e)t[s]=Fe(n,r)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Xe[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1);const i=s.length-1,o=s[i];s[i]=Xe[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const cn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!be.test(t)&&"0"!==t||t.startsWith("url(")));function dn(t,e,n,s){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const i=t[t.length-1],o=cn(r,e),a=cn(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||c(n))&&s)}const pn=t=>null!==t;function fn(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(pn),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}class mn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Vt.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:r,repeatType:i,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Ge(),He()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=Vt.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:r,delay:i,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!dn(t,n,s,r)){if(!i)return a&&a(fn(t,this.options,e)),o&&o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function vn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function yn(t,e){return n=>n>0?e:t}const gn=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},bn=[se,ne,ce];function wn(t){const e=(n=t,bn.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===ce&&(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=vn(a,s,t+1/3),i=vn(a,s,t),o=vn(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 Tn=(t,e)=>{const n=wn(t),s=wn(e);if(!n||!s)return yn(t,e);const r={...n};return t=>(r.red=gn(n.red,s.red,t),r.green=gn(n.green,s.green,t),r.blue=gn(n.blue,s.blue,t),r.alpha=X(n.alpha,s.alpha,t),ne.transform(r))},Sn=(t,e)=>n=>e(t(n)),Vn=(...t)=>t.reduce(Sn),Mn=new Set(["none","hidden"]);function An(t,e){return n=>X(t,e,n)}function xn(t){return"number"==typeof t?An:"string"==typeof t?nn(t)?yn:de.test(t)?Tn:Cn:Array.isArray(t)?Pn:"object"==typeof t?de.test(t)?Tn:kn:yn}function Pn(t,e){const n=[...t],s=n.length,r=t.map((t,n)=>xn(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}}function kn(t,e){const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=xn(t[r])(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const Cn=(t,e)=>{const n=be.createTransformer(e),s=me(t),r=me(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?Mn.has(t)&&!r.values.length||Mn.has(e)&&!s.values.length?function(t,e){return Mn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Vn(Pn(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):yn(t,e)};function Fn(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return X(t,e,n);return xn(t)(t,e)}function Rn({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:h}){const c=t[0],d={done:!1,value:c},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=c+f,v=void 0===o?m:o(m);v!==m&&(f=v-c);const y=t=>-f*Math.exp(-t/s),g=t=>v+y(t),b=t=>{const e=y(t),n=g(t);d.done=Math.abs(e)<=u,d.value=d.done?v:n};let w,T;const S=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,T=U({keyframes:[d.value,p(d.value)],velocity:V(g,t,d.value),damping:r,stiffness:i,restDelta:u,restSpeed:h}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==w||(e=!0,b(t),S(t)),void 0!==w&&t>=w?T.next(t-w):(!e&&b(t),d)}}}const En=Dt(.42,0,1,1),In=Dt(0,0,.58,1),On=Dt(.42,0,.58,1),Bn={linear:t,easeIn:En,easeInOut:On,easeOut:In,circIn:Lt,circInOut:Xt,circOut:Wt,backIn:Yt,backInOut:$t,backOut:jt,anticipate:Ut},Dn=t=>{if(p(t)){e(4===t.length);const[n,s,r,i]=t;return Dt(n,s,r,i)}return"string"==typeof t?Bn[t]:t};function Kn(n,r,{clamp:i=!0,ease:o,mixer:a}={}){const l=n.length;if(e(l===r.length),1===l)return()=>r[0];if(2===l&&r[0]===r[1])return()=>r[1];const u=n[0]===n[1];n[0]>n[l-1]&&(n=[...n].reverse(),r=[...r].reverse());const h=function(e,n,s){const r=[],i=s||Fn,o=e.length-1;for(let s=0;s<o;s++){let o=i(e[s],e[s+1]);if(n){const e=Array.isArray(n)?n[s]||t:n;o=Vn(e,o)}r.push(o)}return r}(r,o,a),c=h.length,d=t=>{if(u&&t<n[0])return r[0];let e=0;if(c>1)for(;e<n.length-2&&!(t<n[e+1]);e++);const i=s(n[e],n[e+1],t);return h[e](i)};return i?t=>d(T(n[0],n[l-1],t)):d}function Nn({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=L(s)?s.map(Dn):Dn(s),i={done:!1,value:e[0]},o=Kn(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:z(e),t),e,{ease:Array.isArray(r)?r:(a=e,l=r,a.map(()=>l||On).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(i.value=o(e),i.done=e>=t,i)}}const jn=t=>{const e=({timestamp:e})=>t(e);return{start:()=>pt.update(e,!0),stop:()=>ft(e),now:()=>mt.isProcessing?mt.timestamp:Vt.now()}},Yn={decay:Rn,inertia:Rn,tween:Nn,keyframes:Nn,spring:U},$n=t=>t/100;class Un extends mn{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:r}=this.options,i=(null==s?void 0:s.KeyframeResolver)||_e;this.resolver=new i(r,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:i=0}=this.options,o=c(e)?e:Yn[e]||Nn;let a,l;o!==Nn&&"number"!=typeof t[0]&&(a=Vn($n,Fn(t[0],t[1])),t=[0,100]);const h=o({...this.options,keyframes:t});"mirror"===r&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-i})),null===h.calculatedDuration&&(h.calculatedDuration=u(h));const{calculatedDuration:d}=h,p=d+s;return{generator:h,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:d,resolvedDuration:p,totalDuration:p*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:r,mirroredGenerator:i,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:h}=n;if(null===this.startTime)return r.next(0);const{delay:c,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-c*(this.speed>=0?1:-1),y=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let g=this.currentTime,b=r;if(d){const t=Math.min(this.currentTime,u)/h;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/h)):"mirror"===p&&(b=i)),g=T(0,1,n)*h}const w=y?{done:!1,value:a[0]}:b.next(g);o&&(w.value=o(w.value));let{done:S}=w;y||null===l||(S=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const V=null===this.holdTime&&("finished"===this.state||"running"===this.state&&S);return V&&void 0!==s&&(w.value=fn(a,this.options,s)),m&&m(w.value),V&&this.finish(),w}get duration(){const{resolved:t}=this;return t?i(t.calculatedDuration):0}get time(){return i(this.currentTime)}set time(t){t=r(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=i(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=jn,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Ln=new Set(["opacity","clipPath","filter","transform"]);function Wn(t,e,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const h=function t(e,n){return e?"function"==typeof e&&v()?y(e,n):p(e)?b(e):Array.isArray(e)?e.map(e=>t(e,n)||w.easeOut):w[e]:void 0}(a,r);Array.isArray(h)&&(u.easing=h);return t.animate(u,{delay:s,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}const Xn=n(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const qn={anticipate:Ut,backInOut:$t,circInOut:Xt};class zn extends mn{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:r}=this.options;this.resolver=new hn(r,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:n=300,times:s,ease:r,type:i,motionValue:o,name:a,startTime:l}=this.options;if(!o.owner||!o.owner.current)return!1;var u;if("string"==typeof r&&v()&&r in qn&&(r=qn[r]),c((u=this.options).type)||"spring"===u.type||!g(u.ease)){const{onComplete:e,onUpdate:o,motionValue:a,element:l,...u}=this.options,h=function(t,e){const n=new Un({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const r=[];let i=0;for(;!s.done&&i<2e4;)s=n.sample(i),r.push(s.value),i+=10;return{times:void 0,keyframes:r,duration:i-10,ease:"linear"}}(t,u);1===(t=h.keyframes).length&&(t[1]=t[0]),n=h.duration,s=h.times,r=h.ease,i="keyframes"}const h=Wn(o.owner.current,a,t,{...this.options,duration:n,times:s,ease:r});return h.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(d(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:n}=this.options;o.set(fn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:n,times:s,type:i,ease:r,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return i(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return i(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=r(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(e){if(this._resolved){const{resolved:n}=this;if(!n)return t;const{animation:s}=n;d(s,e)}else this.pendingTimeline=e;return t}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:i,ease:o,times:a}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:l,element:u,...h}=this.options,c=new Un({...h,keyframes:n,duration:s,type:i,ease:o,times:a,isGenerator:!0}),d=r(this.time);t.setWithVelocity(c.sample(d-10).value,c.sample(d).value,10)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return Xn()&&n&&Ln.has(n)&&!a&&!l&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}}const Zn={type:"spring",stiffness:500,damping:25,restSpeed:10},Hn={type:"keyframes",duration:.8},Gn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_n=(t,{keyframes:e})=>e.length>2?Hn:gt.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Zn:Gn;const Jn=(t,e,n,s={},i,o)=>u=>{const h=l(s,t)||{},c=h.delay||s.delay||0;let{elapsed:d=0}=s;d-=r(c);let p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...h,delay:-d,onUpdate:t=>{e.set(t),h.onUpdate&&h.onUpdate(t)},onComplete:()=>{u(),h.onComplete&&h.onComplete()},name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...h}){return!!Object.keys(h).length})(h)||(p={...p,..._n(t,p)}),p.duration&&(p.duration=r(p.duration)),p.repeatDelay&&(p.repeatDelay=r(p.repeatDelay)),void 0!==p.from&&(p.keyframes[0]=p.from);let f=!1;if((!1===p.type||0===p.duration&&!p.repeatDelay)&&(p.duration=0,0===p.delay&&(f=!0)),p.allowFlatten=!h.type&&!h.ease,f&&!o&&void 0!==e.get()){const t=fn(p.keyframes,h);if(void 0!==t)return pt.update(()=>{p.onUpdate(t),p.onComplete()}),new a([])}return!o&&zn.supports(p)?new zn(p):new Un(p)};function Qn({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function ts(t,e,{delay:n=0,transitionOverride:s,type:r}={}){var i;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...u}=e;s&&(o=s);const h=[],c=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||c&&Qn(c,e))continue;const a={delay:n,...l(o||{},e)};let d=!1;if(window.MotionHandoffAnimation){const n=Ot(t);if(n){const t=window.MotionHandoffAnimation(n,e,pt);null!==t&&(a.startTime=t,d=!0)}}Rt(t,e),s.start(Jn(e,s,r,t.shouldReduceMotion&&bt.has(e)?{type:!1}:a,t,d));const p=s.animation;p&&h.push(p)}return a&&Promise.all(h).then(()=>{pt.update(()=>{a&&Ft(t,a)})}),h}const es=()=>({x:{min:0,max:0},y:{min:0,max:0}}),ns={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"]},ss={};for(const t in ns)ss[t]={isEnabled:e=>ns[t].some(t=>!!e[t])};const rs="undefined"!=typeof window,is={current:null},os={current:!1};const as=[...ln,de,be];const ls=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function us(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||ls.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const hs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class cs{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=_e,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=Vt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,pt.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:u}=i;this.onUpdate=u,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=o,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=us(e),this.isVariantNode=function(t){return Boolean(us(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:h,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==a[t]&&Z(e)&&e.set(a[t],!1)}}mount(t){this.current=t,ut.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)),os.current||function(){if(os.current=!0,rs)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>is.current=t.matches;t.addListener(e),e()}else is.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||is.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ft(this.notifyUpdate),ft(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=gt.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&pt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),r(),i&&i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in ss){const e=ss[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<hs.length;e++){const n=hs[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){for(const s in e){const r=e[s],i=n[s];if(Z(r))t.addValue(s,r);else if(Z(i))t.addValue(s,xt(r,{owner:t}));else if(i!==r)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(s);t.addValue(s,xt(void 0!==e?e:r,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=xt(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&&(Je(s)||qt(s))?s=parseFloat(s):(r=s,!as.find(an(r))&&be.test(e)&&(s=Fe(t,e))),this.setBaseTarget(t,Z(s)?s.get():s)),Z(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let s;if("string"==typeof n||"object"==typeof n){const r=kt(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);r&&(s=r[t])}if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||Z(r)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new Mt),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class ds extends cs{constructor(){super(...arguments),this.KeyframeResolver=hn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Z(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}const ps=(t,e)=>e&&"number"==typeof t?e.transform(t):t,fs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ms=yt.length;function vs(t,e,n){const{style:s,vars:r,transformOrigin:i}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(gt.has(t))o=!0;else if(tn(t))r[t]=n;else{const e=ps(n,Pe[t]);t.startsWith("origin")?(a=!0,i[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",r=!0;for(let i=0;i<ms;i++){const o=yt[i],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=ps(a,Pe[o]);if(!l){r=!1;s+=`${fs[o]||o}(${t}) `}n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,r?"":s):r&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=i;s.transformOrigin=`${t} ${e} ${n}`}}const ys={offset:"stroke-dashoffset",array:"stroke-dasharray"},gs={offset:"strokeDashoffset",array:"strokeDasharray"};function bs(t,e,n){return"string"==typeof t?t:ae.transform(e+n*t)}function ws(t,{attrX:e,attrY:n,attrScale:s,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},h,c){if(vs(t,u,c),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==r||void 0!==i||p.transform)&&(p.transformOrigin=function(t,e,n){return`${bs(e,t.x,t.width)} ${bs(n,t.y,t.height)}`}(f,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,r=!0){t.pathLength=1;const i=r?ys:gs;t[i.offset]=ae.transform(-s);const o=ae.transform(e),a=ae.transform(n);t[i.array]=`${o} ${a}`}(d,o,a,l,!1)}const Ts=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 Ss(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])}const Vs={};function Ms(t,{layout:e,layoutId:n}){return gt.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Vs[t]||"opacity"===t)}function As(t,e,n){var s;const{style:r}=t,i={};for(const o in r)(Z(r[o])||e.style&&Z(e.style[o])||Ms(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(i[o]=r[o]);return i}class xs extends ds{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=es,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&function(t,e){try{e.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}}(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(gt.has(e)){const t=Ce(e);return t&&t.default||0}return e=Ts.has(e)?e:Et(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=As(t,e,n);for(const n in t)if(Z(t[n])||Z(e[n])){s[-1!==yt.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return s}(t,e,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&pt.postRender(this.updateDimensions)}build(t,e,n){ws(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Ss(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Ts.has(n)?n:Et(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 Ps extends ds{constructor(){super(...arguments),this.type="html",this.renderInstance=Ss}readValueFromInstance(t,e){if(gt.has(e))return((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ye(n,e)})(t,e);{const s=(n=t,window.getComputedStyle(n)),r=(tn(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){vs(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return As(t,e,n)}}class ks extends cs{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}function Cs(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 xs(e):new Ps(e);n.mount(t),ut.set(t,n)}function Fs(t){const e=new ks({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),ut.set(t,e)}function Rs(t,e,n,s){const r=[];if(function(t,e){return Z(t)||"number"==typeof t||"string"==typeof t&&!H(e)}(t,e))r.push(function(t,e,n){const s=Z(t)?t:xt(t);return s.start(Jn("",s,e,n)),s.animation}(t,H(e)&&e.default||e,n&&n.default||n));else{const i=G(t,e,s),o=i.length;for(let t=0;t<o;t++){const s=i[t],a=s instanceof Element?Cs:Fs;ut.has(s)||a(s);const l=ut.get(s),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,o)),r.push(...ts(l,{...e,transition:u},{}))}}return r}function Es(t,e,n){const i=[];return function(t,{defaultTransition:e={},...n}={},i,o){const a=e.duration||.3,l=new Map,u=new Map,d={},p=new Map;let f=0,m=0,v=0;for(let n=0;n<t.length;n++){const s=t[n];if("string"==typeof s){p.set(s,m);continue}if(!Array.isArray(s)){p.set(s.name,J(m,s.at,f,p));continue}let[l,y,g={}]=s;void 0!==g.at&&(m=J(m,g.at,f,p));let b=0;const w=(t,n,s,i=0,l=0)=>{const u=it(t),{delay:d=0,times:p=z(u),type:f="keyframes",repeat:y,repeatType:g,repeatDelay:w=0,...T}=n;let{ease:S=e.ease||"easeOut",duration:V}=n;const M="function"==typeof d?d(i,l):d,A=u.length,x=c(f)?f:null==o?void 0:o[f];if(A<=2&&x){let t=100;if(2===A&&lt(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...T};void 0!==V&&(e.duration=r(V));const n=h(e,t,x);S=n.ease,V=n.duration}null!=V||(V=a);const P=m+M;1===p.length&&0===p[0]&&(p[1]=1);const k=p.length-u.length;if(k>0&&q(p,k),1===u.length&&u.unshift(null),y){V=_(V,y);const t=[...u],e=[...p];S=Array.isArray(S)?[...S]:[S];const n=[...S];for(let s=0;s<y;s++){u.push(...t);for(let r=0;r<t.length;r++)p.push(e[r]+(s+1)),S.push(0===r?"linear":W(n,r-1))}et(p,y)}const C=P+V;tt(s,u,S,p,P,C),b=Math.max(M+V,b),v=Math.max(C,v)};if(Z(l)){w(y,g,rt("default",st(l,u)))}else{const t=G(l,y,i,d),e=t.length;for(let n=0;n<e;n++){y=y,g=g;const s=st(t[n],u);for(const t in y)w(y[t],ot(g,t),rt(t,s),n,e)}}f=m,m+=b}return u.forEach((t,r)=>{for(const i in t){const o=t[i];o.sort(nt);const a=[],u=[],h=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:r}=o[t];a.push(n),u.push(s(0,v,e)),h.push(r||"easeOut")}0!==u[0]&&(u.unshift(0),a.unshift(a[0]),h.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),a.push(null)),l.has(r)||l.set(r,{keyframes:{},transition:{}});const c=l.get(r);c.keyframes[i]=a,c.transition[i]={...e,duration:v,ease:h,times:u,...n}}}),l}(t,e,n,{spring:U}).forEach(({keyframes:t,transition:e},n)=>{i.push(...Rs(n,t,e))}),i}function Is(t){return function(e,n,s){let r=[];var i;i=e,r=Array.isArray(i)&&i.some(Array.isArray)?Es(e,n,t):Rs(e,n,s,t);const o=new a(r);return t&&t.animations.push(o),o}}const Os=Is();export{Os as animate,Is as createScopedAnimate};
1
+ function t(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const e=t=>t;let n=e;const s=!1;function r(t){let e;return()=>(void 0===e&&(e=t()),e)}const i=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};class o{constructor(){this.subscriptions=[]}add(e){var n,s;return n=this.subscriptions,s=e,-1===n.indexOf(s)&&n.push(s),()=>t(this.subscriptions,e)}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}}const a=t=>1e3*t,l=t=>t/1e3;function u(t,e){return e?t*(1e3/e):0}const h=r(()=>void 0!==window.ScrollTimeline);class c extends class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}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,e){const n=this.animations.map(n=>h()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0);return()=>{n.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}{then(t,e){return Promise.all(this.animations).then(t).catch(e)}}function d(t,e){return t?t[e]||t.default||t:void 0}function p(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}function f(t,e=100,n){const s=n({...t,keyframes:[0,e]}),r=Math.min(p(s),2e4);return{type:"keyframes",ease:t=>s.next(r*t).value/e,duration:l(r)}}function m(t){return"function"==typeof t}function v(t,e){t.timeline=e,t.onfinish=null}const y=t=>Array.isArray(t)&&"number"==typeof t[0],g={linearEasing:void 0};function b(t,e){const n=r(t);return()=>{var t;return null!==(t=g[e])&&void 0!==t?t:n()}}const w=b(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),T=(t,e,n=10)=>{let s="";const r=Math.max(Math.round(e/n),2);for(let e=0;e<r;e++)s+=t(i(0,r-1,e))+", ";return`linear(${s.substring(0,s.length-2)})`};function S(t){return Boolean("function"==typeof t&&w()||!t||"string"==typeof t&&(t in M||w())||y(t)||Array.isArray(t)&&t.every(S))}const V=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,M={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:V([0,.65,.55,1]),circOut:V([.55,0,1,.45]),backIn:V([.31,.01,.66,-.59]),backOut:V([.33,1.53,.69,.99])};const A=["read","resolveKeyframes","update","preRender","render","postRender"],x={value:null,addProjectionMetrics:null};function P(t,e){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=A.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,s=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){o.has(e)&&(h.schedule(e),t()),l++,e(a)}const h={schedule:(t,e=!1,i=!1)=>{const a=i&&r?n:s;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{a=t,r?i=!0:(r=!0,[n,s]=[s,n],n.forEach(u),e&&x.value&&x.value.frameloop[e].push(l),l=0,n.clear(),r=!1,i&&(i=!1,h.process(t)))}};return h}(i,e?n:void 0),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:h,render:c,postRender:d}=o,p=()=>{const i=performance.now();n=!1,r.delta=s?1e3/60:Math.max(Math.min(i-r.timestamp,40),1),r.timestamp=i,r.isProcessing=!0,a.process(r),l.process(r),u.process(r),h.process(r),c.process(r),d.process(r),r.isProcessing=!1,n&&e&&(s=!1,t(p))};return{schedule:A.reduce((e,i)=>{const a=o[i];return e[i]=(e,i=!1,o=!1)=>(n||(n=!0,s=!0,r.isProcessing||t(p)),a.schedule(e,i,o)),e},{}),cancel:t=>{for(let e=0;e<A.length;e++)o[A[e]].cancel(t)},state:r,steps:o}}const{schedule:k,cancel:C,state:F,steps:R}=P("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e,!0);let E;function I(){E=void 0}const O={now:()=>(void 0===E&&O.set(F.isProcessing||s?F.timestamp:performance.now()),E),set:t=>{E=t,queueMicrotask(I)}};class B{constructor(t,e={}){this.version="12.6.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=O.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=O.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new o);const n=this.events[t].add(e);return"change"===t?()=>{n(),k.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=O.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return u(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 D(t,e){return new B(t,e)}const K=(t,e,n)=>n>e?e:n<t?t:n;function N(t,e,n){const s=Math.max(e-5,0);return u(n-t(s),e-s)}const j=100,Y=10,$=1,U=0,L=800,W=.3,X=.3,q={granular:.01,default:2},z={granular:.005,default:.5},Z=.01,H=10,G=.05,_=1;function J({duration:t=L,bounce:e=W,velocity:n=U,mass:s=$}){let r,i,o=1-e;o=K(G,_,o),t=K(Z,H,l(t)),o<1?(r=e=>{const s=e*o,r=s*t;return.001-(s-n)/Q(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=Q(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 u=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=a(t),isNaN(u))return{stiffness:j,damping:Y,duration:t};{const e=Math.pow(u,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}function Q(t,e){return t*Math.sqrt(1-e*e)}const tt=["duration","bounce"],et=["stiffness","damping","mass"];function nt(t,e){return e.some(e=>void 0!==t[e])}function st(t=X,e=W){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:r}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],u={done:!1,value:i},{stiffness:h,damping:c,mass:d,duration:f,velocity:m,isResolvedFromDuration:v}=function(t){let e={velocity:U,stiffness:j,damping:Y,mass:$,isResolvedFromDuration:!1,...t};if(!nt(t,et)&&nt(t,tt))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),r=s*s,i=2*K(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:$,stiffness:r,damping:i}}else{const n=J(t);e={...e,...n,mass:$},e.isResolvedFromDuration=!0}return e}({...n,velocity:-l(n.velocity||0)}),y=m||0,g=c/(2*Math.sqrt(h*d)),b=o-i,w=l(Math.sqrt(h/d)),S=Math.abs(b)<5;let V;if(s||(s=S?q.granular:q.default),r||(r=S?z.granular:z.default),g<1){const t=Q(w,g);V=e=>{const n=Math.exp(-g*w*e);return o-n*((y+g*w*b)/t*Math.sin(t*e)+b*Math.cos(t*e))}}else if(1===g)V=t=>o-Math.exp(-w*t)*(b+(y+w*b)*t);else{const t=w*Math.sqrt(g*g-1);V=e=>{const n=Math.exp(-g*w*e),s=Math.min(t*e,300);return o-n*((y+g*w*b)*Math.sinh(s)+t*b*Math.cosh(s))/t}}const M={calculatedDuration:v&&f||null,next:t=>{const e=V(t);if(v)u.done=t>=f;else{let n=0;g<1&&(n=0===t?a(y):N(V,t,e));const i=Math.abs(n)<=s,l=Math.abs(o-e)<=r;u.done=i&&l}return u.value=u.done?o:e,u},toString:()=>{const t=Math.min(p(M),2e4),e=T(e=>M.next(t*e).value,t,30);return t+"ms "+e}};return M}const rt=t=>Array.isArray(t)&&"number"!=typeof t[0];function it(t,e){return rt(t)?t[((t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t})(0,t.length,e)]:t}const ot=(t,e,n)=>t+(e-t)*n;function at(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=i(0,e,s);t.push(ot(n,1,r))}}function lt(t){const e=[0];return at(e,t.length-1),e}const ut=t=>Boolean(t&&t.getVelocity);function ht(t){return"object"==typeof t&&!Array.isArray(t)}function ct(t,e,n,s){return"string"==typeof t&&ht(e)?function(t,e,n){var s;if(t instanceof EventTarget)return[t];if("string"==typeof t){let r=document;e&&(r=e.current);const i=null!==(s=null==n?void 0:n[t])&&void 0!==s?s:r.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function dt(t,e,n){return t*(e+1)}function pt(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}function ft(e,n,s,r,i,o){!function(e,n,s){for(let r=0;r<e.length;r++){const i=e[r];i.at>n&&i.at<s&&(t(e,i),r--)}}(e,i,o);for(let t=0;t<n.length;t++)e.push({value:n[t],at:ot(i,o,r[t]),easing:it(s,t)})}function mt(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function vt(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function yt(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function gt(t,e){return e[t]||(e[t]=[]),e[t]}function bt(t){return Array.isArray(t)?t:[t]}function wt(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Tt=t=>"number"==typeof t,St=t=>t.every(Tt),Vt=new WeakMap,Mt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],At=new Set(Mt),xt=new Set(["width","height","top","left","right","bottom",...Mt]),Pt=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function kt(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Ct(t,e,n,s){if("function"==typeof e){const[r,i]=kt(s);e=e(void 0!==n?n:t.custom,r,i)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,i]=kt(s);e=e(void 0!==n?n:t.custom,r,i)}return e}function Ft(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,D(n))}function Rt(t,e){const n=function(t,e,n){const s=t.getProps();return Ct(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const e in i){Ft(t,e,Pt(i[e]))}}function Et(t,e){const n=t.getValue("willChange");if(s=n,Boolean(ut(s)&&s.add))return n.add(e);var s}const It=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ot="data-"+It("framerAppearId");function Bt(t){return t.props[Ot]}const Dt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Kt(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=Dt(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:Dt(i(t),n,r)}const Nt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,jt=t=>e=>1-t(1-e),Yt=Kt(.33,1.53,.69,.99),$t=jt(Yt),Ut=Nt($t),Lt=t=>(t*=2)<1?.5*$t(t):.5*(2-Math.pow(2,-10*(t-1))),Wt=t=>1-Math.sin(Math.acos(t)),Xt=jt(Wt),qt=Nt(Wt),zt=t=>/^0[^.\s]+$/u.test(t);const Zt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Ht={...Zt,transform:t=>K(0,1,t)},Gt={...Zt,default:1},_t=t=>Math.round(1e5*t)/1e5,Jt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Qt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,te=(t,e)=>n=>Boolean("string"==typeof n&&Qt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),ee=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[r,i,o,a]=s.match(Jt);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},ne={...Zt,transform:t=>Math.round((t=>K(0,255,t))(t))},se={test:te("rgb","red"),parse:ee("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ne.transform(t)+", "+ne.transform(e)+", "+ne.transform(n)+", "+_t(Ht.transform(s))+")"};const re={test:te("#"),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:se.transform},ie=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),oe=ie("deg"),ae=ie("%"),le=ie("px"),ue=ie("vh"),he=ie("vw"),ce={...ae,parse:t=>ae.parse(t)/100,transform:t=>ae.transform(100*t)},de={test:te("hsl","hue"),parse:ee("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ae.transform(_t(e))+", "+ae.transform(_t(n))+", "+_t(Ht.transform(s))+")"},pe={test:t=>se.test(t)||re.test(t)||de.test(t),parse:t=>se.test(t)?se.parse(t):de.test(t)?de.parse(t):re.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?se.transform(t):de.transform(t)},fe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const me=/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 ve(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(me,t=>(pe.test(t)?(s.color.push(i),r.push("color"),n.push(pe.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 ye(t){return ve(t).values}function ge(t){const{split:e,types:n}=ve(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?_t(t[i]):"color"===e?pe.transform(t[i]):t[i]}return r}}const be=t=>"number"==typeof t?0:t;const we={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(Jt))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(fe))||void 0===n?void 0:n.length)||0)>0},parse:ye,createTransformer:ge,getAnimatableNone:function(t){const e=ye(t);return ge(t)(e.map(be))}},Te=new Set(["brightness","contrast","saturate","opacity"]);function Se(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(Jt)||[];if(!s)return t;const r=n.replace(s,"");let i=Te.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const Ve=/\b([a-z-]*)\(.*?\)/gu,Me={...we,getAnimatableNone:t=>{const e=t.match(Ve);return e?e.map(Se).join(" "):t}},Ae={borderWidth:le,borderTopWidth:le,borderRightWidth:le,borderBottomWidth:le,borderLeftWidth:le,borderRadius:le,radius:le,borderTopLeftRadius:le,borderTopRightRadius:le,borderBottomRightRadius:le,borderBottomLeftRadius:le,width:le,maxWidth:le,height:le,maxHeight:le,top:le,right:le,bottom:le,left:le,padding:le,paddingTop:le,paddingRight:le,paddingBottom:le,paddingLeft:le,margin:le,marginTop:le,marginRight:le,marginBottom:le,marginLeft:le,backgroundPositionX:le,backgroundPositionY:le},xe={rotate:oe,rotateX:oe,rotateY:oe,rotateZ:oe,scale:Gt,scaleX:Gt,scaleY:Gt,scaleZ:Gt,skew:oe,skewX:oe,skewY:oe,distance:le,translateX:le,translateY:le,translateZ:le,x:le,y:le,z:le,perspective:le,transformPerspective:le,opacity:Ht,originX:ce,originY:ce,originZ:le},Pe={...Zt,transform:Math.round},ke={...Ae,...xe,zIndex:Pe,size:le,fillOpacity:Ht,strokeOpacity:Ht,numOctaves:Pe},Ce={...ke,color:pe,backgroundColor:pe,outlineColor:pe,fill:pe,stroke:pe,borderColor:pe,borderTopColor:pe,borderRightColor:pe,borderBottomColor:pe,borderLeftColor:pe,filter:Me,WebkitFilter:Me},Fe=t=>Ce[t];function Re(t,e){let n=Fe(t);return n!==Me&&(n=we),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ee=new Set(["auto","none","0"]);const Ie=t=>180*t/Math.PI,Oe=t=>{const e=Ie(Math.atan2(t[1],t[0]));return De(e)},Be={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Oe,rotateZ:Oe,skewX:t=>Ie(Math.atan(t[1])),skewY:t=>Ie(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},De=t=>((t%=360)<0&&(t+=360),t),Ke=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ne=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),je={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ke,scaleY:Ne,scale:t=>(Ke(t)+Ne(t))/2,rotateX:t=>De(Ie(Math.atan2(t[6],t[5]))),rotateY:t=>De(Ie(Math.atan2(-t[2],t[0]))),rotateZ:Oe,rotate:Oe,skewX:t=>Ie(Math.atan(t[4])),skewY:t=>Ie(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ye(t){return t.includes("scale")?1:0}function $e(t,e){if(!t||"none"===t)return Ye(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=je,r=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Be,r=e}if(!r)return Ye(e);const i=s[e],o=r[1].split(",").map(Ue);return"function"==typeof i?i(o):o[i]}function Ue(t){return parseFloat(t.trim())}const Le=t=>t===Zt||t===le,We=new Set(["x","y","z"]),Xe=Mt.filter(t=>!We.has(t));const qe={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>$e(e,"x"),y:(t,{transform:e})=>$e(e,"y")};qe.translateX=qe.x,qe.translateY=qe.y;const ze=new Set;let Ze=!1,He=!1;function Ge(){if(He){const t=Array.from(ze).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Xe.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{var s;null===(s=t.getValue(e))||void 0===s||s.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}He=!1,Ze=!1,ze.forEach(t=>t.complete()),ze.clear()}function _e(){ze.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(He=!0)})}class Je{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?(ze.add(this),Ze||(Ze=!0,k.read(_e),k.resolveKeyframes(Ge))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let r=0;r<t.length;r++)if(null===t[r])if(0===r){const r=null==s?void 0:s.get(),i=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const s=n.readValue(e,i);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=i),s&&void 0===r&&s.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ze.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ze.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Qe=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),tn=t=>e=>"string"==typeof e&&e.startsWith(t),en=tn("--"),nn=tn("var(--"),sn=t=>!!nn(t)&&rn.test(t.split("/*")[0].trim()),rn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,on=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function an(t,e,n=1){const[s,r]=function(t){const e=on.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 Qe(t)?parseFloat(t):t}return sn(r)?an(r,e,n+1):r}const ln=t=>e=>e.test(t),un=[Zt,le,ae,oe,he,ue,{test:t=>"auto"===t,parse:t=>t}],hn=t=>un.find(ln(t));class cn extends Je{constructor(t,e,n,s,r){super(t,e,n,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),sn(s))){const r=an(s,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!xt.has(n)||2!==t.length)return;const[s,r]=t,i=hn(s),o=hn(r);if(i!==o)if(Le(i)&&Le(o))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||zt(s))&&n.push(e);var s;n.length&&function(t,e,n){let s=0,r=void 0;for(;s<t.length&&!r;){const e=t[s];"string"==typeof e&&!Ee.has(e)&&ve(e).values.length&&(r=t[s]),s++}if(r&&n)for(const s of e)t[s]=Re(n,r)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=qe[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1);const i=s.length-1,o=s[i];s[i]=qe[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const dn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!we.test(t)&&"0"!==t||t.startsWith("url(")));function pn(t,e,n,s){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const i=t[t.length-1],o=dn(r,e),a=dn(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||m(n))&&s)}const fn=t=>null!==t;function mn(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(fn),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}class vn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:i="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=O.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:r,repeatType:i,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(_e(),Ge()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=O.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:r,delay:i,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!pn(t,n,s,r)){if(!i)return a&&a(mn(t,this.options,e)),o&&o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function yn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function gn(t,e){return n=>n>0?e:t}const bn=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},wn=[re,se,de];function Tn(t){const e=(n=t,wn.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===de&&(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=yn(a,s,t+1/3),i=yn(a,s,t),o=yn(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 Sn=(t,e)=>{const n=Tn(t),s=Tn(e);if(!n||!s)return gn(t,e);const r={...n};return t=>(r.red=bn(n.red,s.red,t),r.green=bn(n.green,s.green,t),r.blue=bn(n.blue,s.blue,t),r.alpha=ot(n.alpha,s.alpha,t),se.transform(r))},Vn=(t,e)=>n=>e(t(n)),Mn=(...t)=>t.reduce(Vn),An=new Set(["none","hidden"]);function xn(t,e){return n=>ot(t,e,n)}function Pn(t){return"number"==typeof t?xn:"string"==typeof t?sn(t)?gn:pe.test(t)?Sn:Fn:Array.isArray(t)?kn:"object"==typeof t?pe.test(t)?Sn:Cn:gn}function kn(t,e){const n=[...t],s=n.length,r=t.map((t,n)=>Pn(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}}function Cn(t,e){const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=Pn(t[r])(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const Fn=(t,e)=>{const n=we.createTransformer(e),s=ve(t),r=ve(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?An.has(t)&&!r.values.length||An.has(e)&&!s.values.length?function(t,e){return An.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Mn(kn(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):gn(t,e)};function Rn(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return ot(t,e,n);return Pn(t)(t,e)}function En({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:h}){const c=t[0],d={done:!1,value:c},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=c+f,v=void 0===o?m:o(m);v!==m&&(f=v-c);const y=t=>-f*Math.exp(-t/s),g=t=>v+y(t),b=t=>{const e=y(t),n=g(t);d.done=Math.abs(e)<=u,d.value=d.done?v:n};let w,T;const S=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,T=st({keyframes:[d.value,p(d.value)],velocity:N(g,t,d.value),damping:r,stiffness:i,restDelta:u,restSpeed:h}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==w||(e=!0,b(t),S(t)),void 0!==w&&t>=w?T.next(t-w):(!e&&b(t),d)}}}const In=Kt(.42,0,1,1),On=Kt(0,0,.58,1),Bn=Kt(.42,0,.58,1),Dn={linear:e,easeIn:In,easeInOut:Bn,easeOut:On,circIn:Wt,circInOut:qt,circOut:Xt,backIn:$t,backInOut:Ut,backOut:Yt,anticipate:Lt},Kn=t=>{if(y(t)){n(4===t.length);const[e,s,r,i]=t;return Kt(e,s,r,i)}return"string"==typeof t?Dn[t]:t};function Nn(t,s,{clamp:r=!0,ease:o,mixer:a}={}){const l=t.length;if(n(l===s.length),1===l)return()=>s[0];if(2===l&&s[0]===s[1])return()=>s[1];const u=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),s=[...s].reverse());const h=function(t,n,s){const r=[],i=s||Rn,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=Mn(t,o)}r.push(o)}return r}(s,o,a),c=h.length,d=e=>{if(u&&e<t[0])return s[0];let n=0;if(c>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const r=i(t[n],t[n+1],e);return h[n](r)};return r?e=>d(K(t[0],t[l-1],e)):d}function jn({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=rt(s)?s.map(Kn):Kn(s),i={done:!1,value:e[0]},o=Nn(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:lt(e),t),e,{ease:Array.isArray(r)?r:(a=e,l=r,a.map(()=>l||Bn).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(i.value=o(e),i.done=e>=t,i)}}const Yn=t=>{const e=({timestamp:e})=>t(e);return{start:()=>k.update(e,!0),stop:()=>C(e),now:()=>F.isProcessing?F.timestamp:O.now()}},$n={decay:En,inertia:En,tween:jn,keyframes:jn,spring:st},Un=t=>t/100;class Ln extends vn{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:s,keyframes:r}=this.options,i=(null==s?void 0:s.KeyframeResolver)||Je;this.resolver=new i(r,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:r,velocity:i=0}=this.options,o=m(e)?e:$n[e]||jn;let a,l;o!==jn&&"number"!=typeof t[0]&&(a=Mn(Un,Rn(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=p(u));const{calculatedDuration:h}=u,c=h+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:h,resolvedDuration:c,totalDuration:c*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:r,mirroredGenerator:i,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:h}=n;if(null===this.startTime)return r.next(0);const{delay:c,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-c*(this.speed>=0?1:-1),y=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let g=this.currentTime,b=r;if(d){const t=Math.min(this.currentTime,u)/h;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/h)):"mirror"===p&&(b=i)),g=K(0,1,n)*h}const w=y?{done:!1,value:a[0]}:b.next(g);o&&(w.value=o(w.value));let{done:T}=w;y||null===l||(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return S&&void 0!==s&&(w.value=mn(a,this.options,s)),m&&m(w.value),S&&this.finish(),w}get duration(){const{resolved:t}=this;return t?l(t.calculatedDuration):0}get time(){return l(this.currentTime)}set time(t){t=a(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=l(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=Yn,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Wn=new Set(["opacity","clipPath","filter","transform"]);function Xn(t,e,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const h=function t(e,n){return e?"function"==typeof e&&w()?T(e,n):y(e)?V(e):Array.isArray(e)?e.map(e=>t(e,n)||M.easeOut):M[e]:void 0}(a,r);Array.isArray(h)&&(u.easing=h);return t.animate(u,{delay:s,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal"})}const qn=r(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const zn={anticipate:Lt,backInOut:Ut,circInOut:qt};class Zn extends vn{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:r}=this.options;this.resolver=new cn(r,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:n=300,times:s,ease:r,type:i,motionValue:o,name:a,startTime:l}=this.options;if(!o.owner||!o.owner.current)return!1;var u;if("string"==typeof r&&w()&&r in zn&&(r=zn[r]),m((u=this.options).type)||"spring"===u.type||!S(u.ease)){const{onComplete:e,onUpdate:o,motionValue:a,element:l,...u}=this.options,h=function(t,e){const n=new Ln({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const r=[];let i=0;for(;!s.done&&i<2e4;)s=n.sample(i),r.push(s.value),i+=10;return{times:void 0,keyframes:r,duration:i-10,ease:"linear"}}(t,u);1===(t=h.keyframes).length&&(t[1]=t[0]),n=h.duration,s=h.times,r=h.ease,i="keyframes"}const h=Xn(o.owner.current,a,t,{...this.options,duration:n,times:s,ease:r});return h.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(v(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:n}=this.options;o.set(mn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:n,times:s,type:i,ease:r,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return l(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return l(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=a(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:n}=this;if(!n)return e;const{animation:s}=n;v(s,t)}else this.pendingTimeline=t;return e}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:r,ease:i,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:l,element:u,...h}=this.options,c=new Ln({...h,keyframes:n,duration:s,type:r,ease:i,times:o,isGenerator:!0}),d=a(this.time);t.setWithVelocity(c.sample(d-10).value,c.sample(d).value,10)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return qn()&&n&&Wn.has(n)&&!a&&!l&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}}const Hn={type:"spring",stiffness:500,damping:25,restSpeed:10},Gn={type:"keyframes",duration:.8},_n={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jn=(t,{keyframes:e})=>e.length>2?Gn:At.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Hn:_n;const Qn=(t,e,n,s={},r,i)=>o=>{const l=d(s,t)||{},u=l.delay||s.delay||0;let{elapsed:h=0}=s;h-=a(u);let p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-h,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:i?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...h}){return!!Object.keys(h).length})(l)||(p={...p,...Jn(t,p)}),p.duration&&(p.duration=a(p.duration)),p.repeatDelay&&(p.repeatDelay=a(p.repeatDelay)),void 0!==p.from&&(p.keyframes[0]=p.from);let f=!1;if((!1===p.type||0===p.duration&&!p.repeatDelay)&&(p.duration=0,0===p.delay&&(f=!0)),p.allowFlatten=!l.type&&!l.ease,f&&!i&&void 0!==e.get()){const t=mn(p.keyframes,l);if(void 0!==t)return k.update(()=>{p.onUpdate(t),p.onComplete()}),new c([])}return!i&&Zn.supports(p)?new Zn(p):new Ln(p)};function ts({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function es(t,e,{delay:n=0,transitionOverride:s,type:r}={}){var i;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const u=[],h=r&&t.animationState&&t.animationState.getState()[r];for(const e in l){const s=t.getValue(e,null!==(i=t.latestValues[e])&&void 0!==i?i:null),r=l[e];if(void 0===r||h&&ts(h,e))continue;const a={delay:n,...d(o||{},e)};let c=!1;if(window.MotionHandoffAnimation){const n=Bt(t);if(n){const t=window.MotionHandoffAnimation(n,e,k);null!==t&&(a.startTime=t,c=!0)}}Et(t,e),s.start(Qn(e,s,r,t.shouldReduceMotion&&xt.has(e)?{type:!1}:a,t,c));const p=s.animation;p&&u.push(p)}return a&&Promise.all(u).then(()=>{k.update(()=>{a&&Rt(t,a)})}),u}const ns=()=>({x:{min:0,max:0},y:{min:0,max:0}}),ss={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"]},rs={};for(const t in ss)rs[t]={isEnabled:e=>ss[t].some(t=>!!e[t])};const is="undefined"!=typeof window,os={current:null},as={current:!1};const ls=[...un,pe,we];const us=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function hs(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||us.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const cs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ds{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Je,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=O.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,k.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:u}=i;this.onUpdate=u,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=o,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=hs(e),this.isVariantNode=function(t){return Boolean(hs(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:h,...c}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in c){const e=c[t];void 0!==a[t]&&ut(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Vt.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)),as.current||function(){if(as.current=!0,is)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>os.current=t.matches;t.addListener(e),e()}else os.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||os.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),C(this.notifyUpdate),C(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=At.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&k.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{s(),r(),i&&i(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in rs){const e=rs[t];if(!e)continue;const{isEnabled:n,Feature:s}=e;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<cs.length;e++){const n=cs[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){for(const s in e){const r=e[s],i=n[s];if(ut(r))t.addValue(s,r);else if(ut(i))t.addValue(s,D(r,{owner:t}));else if(i!==r)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(s);t.addValue(s,D(void 0!==e?e:r,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=D(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&&(Qe(s)||zt(s))?s=parseFloat(s):(r=s,!ls.find(ln(r))&&we.test(e)&&(s=Re(t,e))),this.setBaseTarget(t,ut(s)?s.get():s)),ut(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let s;if("string"==typeof n||"object"==typeof n){const r=Ct(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);r&&(s=r[t])}if(n&&void 0!==s)return s;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||ut(r)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new o),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class ps extends ds{constructor(){super(...arguments),this.KeyframeResolver=cn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ut(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}const fs=(t,e)=>e&&"number"==typeof t?e.transform(t):t,ms={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},vs=Mt.length;function ys(t,e,n){const{style:s,vars:r,transformOrigin:i}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(At.has(t))o=!0;else if(en(t))r[t]=n;else{const e=fs(n,ke[t]);t.startsWith("origin")?(a=!0,i[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",r=!0;for(let i=0;i<vs;i++){const o=Mt[i],a=t[o];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=fs(a,ke[o]);if(!l){r=!1;s+=`${ms[o]||o}(${t}) `}n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,r?"":s):r&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=i;s.transformOrigin=`${t} ${e} ${n}`}}const gs={offset:"stroke-dashoffset",array:"stroke-dasharray"},bs={offset:"strokeDashoffset",array:"strokeDasharray"};function ws(t,e,n){return"string"==typeof t?t:le.transform(e+n*t)}function Ts(t,{attrX:e,attrY:n,attrScale:s,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},h,c){if(ys(t,u,c),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==r||void 0!==i||p.transform)&&(p.transformOrigin=function(t,e,n){return`${ws(e,t.x,t.width)} ${ws(n,t.y,t.height)}`}(f,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==s&&(d.scale=s),void 0!==o&&function(t,e,n=1,s=0,r=!0){t.pathLength=1;const i=r?gs:bs;t[i.offset]=le.transform(-s);const o=le.transform(e),a=le.transform(n);t[i.array]=`${o} ${a}`}(d,o,a,l,!1)}const Ss=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 Vs(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])}const Ms={};function As(t,{layout:e,layoutId:n}){return At.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Ms[t]||"opacity"===t)}function xs(t,e,n){var s;const{style:r}=t,i={};for(const o in r)(ut(r[o])||e.style&&ut(e.style[o])||As(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(i[o]=r[o]);return i}class Ps extends ps{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ns,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&function(t,e){try{e.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}}(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(At.has(e)){const t=Fe(e);return t&&t.default||0}return e=Ss.has(e)?e:It(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=xs(t,e,n);for(const n in t)if(ut(t[n])||ut(e[n])){s[-1!==Mt.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return s}(t,e,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&k.postRender(this.updateDimensions)}build(t,e,n){Ts(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Vs(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Ss.has(n)?n:It(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 ks extends ps{constructor(){super(...arguments),this.type="html",this.renderInstance=Vs}readValueFromInstance(t,e){if(At.has(e))return((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return $e(n,e)})(t,e);{const s=(n=t,window.getComputedStyle(n)),r=(en(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){ys(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return xs(t,e,n)}}class Cs extends ds{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}function Fs(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 Ps(e):new ks(e);n.mount(t),Vt.set(t,n)}function Rs(t){const e=new Cs({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Vt.set(t,e)}function Es(t,e,n,s){const r=[];if(function(t,e){return ut(t)||"number"==typeof t||"string"==typeof t&&!ht(e)}(t,e))r.push(function(t,e,n){const s=ut(t)?t:D(t);return s.start(Qn("",s,e,n)),s.animation}(t,ht(e)&&e.default||e,n&&n.default||n));else{const i=ct(t,e,s),o=i.length;for(let t=0;t<o;t++){const s=i[t],a=s instanceof Element?Fs:Rs;Vt.has(s)||a(s);const l=Vt.get(s),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,o)),r.push(...es(l,{...e,transition:u},{}))}}return r}function Is(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s,r){const o=e.duration||.3,l=new Map,u=new Map,h={},c=new Map;let d=0,p=0,v=0;for(let n=0;n<t.length;n++){const i=t[n];if("string"==typeof i){c.set(i,p);continue}if(!Array.isArray(i)){c.set(i.name,pt(p,i.at,d,c));continue}let[l,y,g={}]=i;void 0!==g.at&&(p=pt(p,g.at,d,c));let b=0;const w=(t,n,s,i=0,l=0)=>{const u=bt(t),{delay:h=0,times:c=lt(u),type:d="keyframes",repeat:y,repeatType:g,repeatDelay:w=0,...T}=n;let{ease:S=e.ease||"easeOut",duration:V}=n;const M="function"==typeof h?h(i,l):h,A=u.length,x=m(d)?d:null==r?void 0:r[d];if(A<=2&&x){let t=100;if(2===A&&St(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...T};void 0!==V&&(e.duration=a(V));const n=f(e,t,x);S=n.ease,V=n.duration}null!=V||(V=o);const P=p+M;1===c.length&&0===c[0]&&(c[1]=1);const k=c.length-u.length;if(k>0&&at(c,k),1===u.length&&u.unshift(null),y){V=dt(V,y);const t=[...u],e=[...c];S=Array.isArray(S)?[...S]:[S];const n=[...S];for(let s=0;s<y;s++){u.push(...t);for(let r=0;r<t.length;r++)c.push(e[r]+(s+1)),S.push(0===r?"linear":it(n,r-1))}mt(c,y)}const C=P+V;ft(s,u,S,c,P,C),b=Math.max(M+V,b),v=Math.max(C,v)};if(ut(l)){w(y,g,gt("default",yt(l,u)))}else{const t=ct(l,y,s,h),e=t.length;for(let n=0;n<e;n++){y=y,g=g;const s=yt(t[n],u);for(const t in y)w(y[t],wt(g,t),gt(t,s),n,e)}}d=p,p+=b}return u.forEach((t,s)=>{for(const r in t){const o=t[r];o.sort(vt);const a=[],u=[],h=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:s}=o[t];a.push(n),u.push(i(0,v,e)),h.push(s||"easeOut")}0!==u[0]&&(u.unshift(0),a.unshift(a[0]),h.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),a.push(null)),l.has(s)||l.set(s,{keyframes:{},transition:{}});const c=l.get(s);c.keyframes[r]=a,c.transition[r]={...e,duration:v,ease:h,times:u,...n}}}),l}(t,e,n,{spring:st}).forEach(({keyframes:t,transition:e},n)=>{s.push(...Es(n,t,e))}),s}function Os(t){return function(e,n,s){let r=[];var i;i=e,r=Array.isArray(i)&&i.some(Array.isArray)?Is(e,n,t):Es(e,n,s,t);const o=new c(r);return t&&t.animations.push(o),o}}const Bs=Os();export{Bs as animate,Os as createScopedAnimate};
@@ -1 +1 @@
1
- const t=t=>t;function e(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function s(t){return"string"==typeof t||Array.isArray(t)}const r=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],n=["initial",...r];function a(t){return e(t.animate)||n.some(e=>s(t[e]))}function o(t){return Boolean(a(t)||t.variants)}const i="undefined"!=typeof window,c={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"]},l={};for(const t in c)l[t]={isEnabled:e=>c[t].some(t=>!!e[t])};const f=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),d="data-"+f("framerAppearId"),u=["read","resolveKeyframes","update","preRender","render","postRender"],p={value:null,addProjectionMetrics:null};function m(t,e){let s=!1,r=!0;const n={delta:0,timestamp:0,isProcessing:!1},a=()=>s=!0,o=u.reduce((t,s)=>(t[s]=function(t,e){let s=new Set,r=new Set,n=!1,a=!1;const o=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1},c=0;function l(e){o.has(e)&&(f.schedule(e),t()),c++,e(i)}const f={schedule:(t,e=!1,a=!1)=>{const i=a&&n?s:r;return e&&o.add(t),i.has(t)||i.add(t),t},cancel:t=>{r.delete(t),o.delete(t)},process:t=>{i=t,n?a=!0:(n=!0,[s,r]=[r,s],s.forEach(l),e&&p.value&&p.value.frameloop[e].push(c),c=0,s.clear(),n=!1,a&&(a=!1,f.process(t)))}};return f}(a,e?s:void 0),t),{}),{read:i,resolveKeyframes:c,update:l,preRender:f,render:d,postRender:m}=o,g=()=>{const a=performance.now();s=!1,n.delta=r?1e3/60:Math.max(Math.min(a-n.timestamp,40),1),n.timestamp=a,n.isProcessing=!0,i.process(n),c.process(n),l.process(n),f.process(n),d.process(n),m.process(n),n.isProcessing=!1,s&&e&&(r=!1,t(g))};return{schedule:u.reduce((e,a)=>{const i=o[a];return e[a]=(e,a=!1,o=!1)=>(s||(s=!0,r=!0,n.isProcessing||t(g)),i.schedule(e,a,o)),e},{}),cancel:t=>{for(let e=0;e<u.length;e++)o[u[e]].cancel(t)},state:n,steps:o}}const g=t=>e=>"string"==typeof e&&e.startsWith(t),h=g("--"),y=g("var(--"),v=t=>!!y(t)&&w.test(t.split("/*")[0].trim()),w=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,x={},b=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],k=new Set(b);function B(t,{layout:e,layoutId:s}){return k.has(t)||t.startsWith("origin")||(e||void 0!==s)&&(!!x[t]||"opacity"===t)}const P=t=>Boolean(t&&t.getVelocity),R=(t,e)=>e&&"number"==typeof t?e.transform(t):t,S=(t,e,s)=>s>e?e:s<t?t:s,X={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Y={...X,transform:t=>S(0,1,t)},A={...X,default:1},L=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),$=L("deg"),O=L("%"),T=L("px"),W=L("vh"),V=L("vw"),C={...O,parse:t=>O.parse(t)/100,transform:t=>O.transform(100*t)},F={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,radius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,backgroundPositionX:T,backgroundPositionY:T},Z={rotate:$,rotateX:$,rotateY:$,rotateZ:$,scale:A,scaleX:A,scaleY:A,scaleZ:A,skew:$,skewX:$,skewY:$,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Y,originX:C,originY:C,originZ:T},E={...X,transform:Math.round},H={...F,...Z,zIndex:E,size:T,fillOpacity:Y,strokeOpacity:Y,numOctaves:E},I={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},j=b.length;function z(t,e,s){const{style:r,vars:n,transformOrigin:a}=t;let o=!1,i=!1;for(const t in e){const s=e[t];if(k.has(t))o=!0;else if(h(t))n[t]=s;else{const e=R(s,H[t]);t.startsWith("origin")?(i=!0,a[t]=e):r[t]=e}}if(e.transform||(o||s?r.transform=function(t,e,s){let r="",n=!0;for(let a=0;a<j;a++){const o=b[a],i=t[o];if(void 0===i)continue;let c=!0;if(c="number"==typeof i?i===(o.startsWith("scale")?1:0):0===parseFloat(i),!c||s){const t=R(i,H[o]);if(!c){n=!1;r+=`${I[o]||o}(${t}) `}s&&(e[o]=t)}}return r=r.trim(),s?r=s(e,n?"":r):n&&(r="none"),r}(e,t.transform,s):r.transform&&(r.transform="none")),i){const{originX:t="50%",originY:e="50%",originZ:s=0}=a;r.transformOrigin=`${t} ${e} ${s}`}}const D=["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 M(t){return"string"==typeof t&&!t.includes("-")&&!!(D.indexOf(t)>-1||/[A-Z]/u.test(t))}const q={offset:"stroke-dashoffset",array:"stroke-dasharray"},K={offset:"strokeDashoffset",array:"strokeDasharray"};function U(t,e,s){return"string"==typeof t?t:T.transform(e+s*t)}function G(t,{attrX:e,attrY:s,attrScale:r,originX:n,originY:a,pathLength:o,pathSpacing:i=1,pathOffset:c=0,...l},f,d){if(z(t,l,d),f)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:p,dimensions:m}=t;u.transform&&(m&&(p.transform=u.transform),delete u.transform),m&&(void 0!==n||void 0!==a||p.transform)&&(p.transformOrigin=function(t,e,s){return`${U(e,t.x,t.width)} ${U(s,t.y,t.height)}`}(m,void 0!==n?n:.5,void 0!==a?a:.5)),void 0!==e&&(u.x=e),void 0!==s&&(u.y=s),void 0!==r&&(u.scale=r),void 0!==o&&function(t,e,s=1,r=0,n=!0){t.pathLength=1;const a=n?q:K;t[a.offset]=T.transform(-r);const o=T.transform(e),i=T.transform(s);t[a.array]=`${o} ${i}`}(u,o,i,c,!1)}const J=t=>"string"==typeof t&&"svg"===t.toLowerCase();function N(t){const e=[{},{}];return null==t||t.values.forEach((t,s)=>{e[0][s]=t.get(),e[1][s]=t.getVelocity()}),e}function Q(t,e,s,r){if("function"==typeof e){const[n,a]=N(r);e=e(void 0!==s?s:t.custom,n,a)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[n,a]=N(r);e=e(void 0!==s?s:t.custom,n,a)}return e}const _=t=>Array.isArray(t),tt=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),et=t=>_(t)?t[t.length-1]||0:t;function st(t,e,s){var r;const{style:n}=t,a={};for(const o in n)(P(n[o])||e.style&&P(e.style[o])||B(o,t)||void 0!==(null===(r=null==s?void 0:s.getValue(o))||void 0===r?void 0:r.liveStyle))&&(a[o]=n[o]);return a}const{schedule:rt,cancel:nt,state:at,steps:ot}=m("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:t,!0);function it(t,e){try{e.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}}function ct(t,{style:e,vars:s},r,n){Object.assign(t.style,e,n&&n.getProjectionStyles(r));for(const e in s)t.style.setProperty(e,s[e])}const lt=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 ft(t,e,s,r){ct(t,e,void 0,r);for(const s in e.attrs)t.setAttribute(lt.has(s)?s:f(s),e.attrs[s])}function dt(t,e,s){const r=st(t,e,s);for(const s in t)if(P(t[s])||P(e[s])){r[-1!==b.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return r}export{X as A,Y as B,S as C,O as D,H as E,T as F,v as G,$ as H,V as I,W as J,nt as K,n as L,_ as M,r as N,ct as O,h as P,lt as Q,f as R,s as a,i as b,m as c,P as d,B as e,l as f,z as g,G as h,a as i,J as j,M as k,tt as l,o as m,e as n,d as o,dt as p,rt as q,Q as r,st as s,k as t,it as u,ft as v,t as w,b as x,at as y,et as z};
1
+ const t=t=>t;function e(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function s(t){return"string"==typeof t||Array.isArray(t)}const r=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],n=["initial",...r];function a(t){return e(t.animate)||n.some(e=>s(t[e]))}function o(t){return Boolean(a(t)||t.variants)}const i="undefined"!=typeof window,c={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"]},l={};for(const t in c)l[t]={isEnabled:e=>c[t].some(t=>!!e[t])};const f=["read","resolveKeyframes","update","preRender","render","postRender"],d={value:null,addProjectionMetrics:null};function u(t,e){let s=!1,r=!0;const n={delta:0,timestamp:0,isProcessing:!1},a=()=>s=!0,o=f.reduce((t,s)=>(t[s]=function(t,e){let s=new Set,r=new Set,n=!1,a=!1;const o=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1},c=0;function l(e){o.has(e)&&(f.schedule(e),t()),c++,e(i)}const f={schedule:(t,e=!1,a=!1)=>{const i=a&&n?s:r;return e&&o.add(t),i.has(t)||i.add(t),t},cancel:t=>{r.delete(t),o.delete(t)},process:t=>{i=t,n?a=!0:(n=!0,[s,r]=[r,s],s.forEach(l),e&&d.value&&d.value.frameloop[e].push(c),c=0,s.clear(),n=!1,a&&(a=!1,f.process(t)))}};return f}(a,e?s:void 0),t),{}),{read:i,resolveKeyframes:c,update:l,preRender:u,render:p,postRender:m}=o,g=()=>{const a=performance.now();s=!1,n.delta=r?1e3/60:Math.max(Math.min(a-n.timestamp,40),1),n.timestamp=a,n.isProcessing=!0,i.process(n),c.process(n),l.process(n),u.process(n),p.process(n),m.process(n),n.isProcessing=!1,s&&e&&(r=!1,t(g))};return{schedule:f.reduce((e,a)=>{const i=o[a];return e[a]=(e,a=!1,o=!1)=>(s||(s=!0,r=!0,n.isProcessing||t(g)),i.schedule(e,a,o)),e},{}),cancel:t=>{for(let e=0;e<f.length;e++)o[f[e]].cancel(t)},state:n,steps:o}}const{schedule:p,cancel:m,state:g,steps:h}=u("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:t,!0),y=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),v="data-"+y("framerAppearId"),w=t=>e=>"string"==typeof e&&e.startsWith(t),x=w("--"),b=w("var(--"),k=t=>!!b(t)&&B.test(t.split("/*")[0].trim()),B=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,P={},R=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],S=new Set(R);function X(t,{layout:e,layoutId:s}){return S.has(t)||t.startsWith("origin")||(e||void 0!==s)&&(!!P[t]||"opacity"===t)}const Y=t=>Boolean(t&&t.getVelocity),A=(t,e)=>e&&"number"==typeof t?e.transform(t):t,L=(t,e,s)=>s>e?e:s<t?t:s,$={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},O={...$,transform:t=>L(0,1,t)},T={...$,default:1},W=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),V=W("deg"),C=W("%"),F=W("px"),Z=W("vh"),E=W("vw"),H={...C,parse:t=>C.parse(t)/100,transform:t=>C.transform(100*t)},I={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,radius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,backgroundPositionX:F,backgroundPositionY:F},j={rotate:V,rotateX:V,rotateY:V,rotateZ:V,scale:T,scaleX:T,scaleY:T,scaleZ:T,skew:V,skewX:V,skewY:V,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:O,originX:H,originY:H,originZ:F},z={...$,transform:Math.round},D={...I,...j,zIndex:z,size:F,fillOpacity:O,strokeOpacity:O,numOctaves:z},M={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},q=R.length;function K(t,e,s){const{style:r,vars:n,transformOrigin:a}=t;let o=!1,i=!1;for(const t in e){const s=e[t];if(S.has(t))o=!0;else if(x(t))n[t]=s;else{const e=A(s,D[t]);t.startsWith("origin")?(i=!0,a[t]=e):r[t]=e}}if(e.transform||(o||s?r.transform=function(t,e,s){let r="",n=!0;for(let a=0;a<q;a++){const o=R[a],i=t[o];if(void 0===i)continue;let c=!0;if(c="number"==typeof i?i===(o.startsWith("scale")?1:0):0===parseFloat(i),!c||s){const t=A(i,D[o]);if(!c){n=!1;r+=`${M[o]||o}(${t}) `}s&&(e[o]=t)}}return r=r.trim(),s?r=s(e,n?"":r):n&&(r="none"),r}(e,t.transform,s):r.transform&&(r.transform="none")),i){const{originX:t="50%",originY:e="50%",originZ:s=0}=a;r.transformOrigin=`${t} ${e} ${s}`}}const U=["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 G(t){return"string"==typeof t&&!t.includes("-")&&!!(U.indexOf(t)>-1||/[A-Z]/u.test(t))}const J={offset:"stroke-dashoffset",array:"stroke-dasharray"},N={offset:"strokeDashoffset",array:"strokeDasharray"};function Q(t,e,s){return"string"==typeof t?t:F.transform(e+s*t)}function _(t,{attrX:e,attrY:s,attrScale:r,originX:n,originY:a,pathLength:o,pathSpacing:i=1,pathOffset:c=0,...l},f,d){if(K(t,l,d),f)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:u,style:p,dimensions:m}=t;u.transform&&(m&&(p.transform=u.transform),delete u.transform),m&&(void 0!==n||void 0!==a||p.transform)&&(p.transformOrigin=function(t,e,s){return`${Q(e,t.x,t.width)} ${Q(s,t.y,t.height)}`}(m,void 0!==n?n:.5,void 0!==a?a:.5)),void 0!==e&&(u.x=e),void 0!==s&&(u.y=s),void 0!==r&&(u.scale=r),void 0!==o&&function(t,e,s=1,r=0,n=!0){t.pathLength=1;const a=n?J:N;t[a.offset]=F.transform(-r);const o=F.transform(e),i=F.transform(s);t[a.array]=`${o} ${i}`}(u,o,i,c,!1)}const tt=t=>"string"==typeof t&&"svg"===t.toLowerCase();function et(t){const e=[{},{}];return null==t||t.values.forEach((t,s)=>{e[0][s]=t.get(),e[1][s]=t.getVelocity()}),e}function st(t,e,s,r){if("function"==typeof e){const[n,a]=et(r);e=e(void 0!==s?s:t.custom,n,a)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[n,a]=et(r);e=e(void 0!==s?s:t.custom,n,a)}return e}const rt=t=>Array.isArray(t),nt=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),at=t=>rt(t)?t[t.length-1]||0:t;function ot(t,e,s){var r;const{style:n}=t,a={};for(const o in n)(Y(n[o])||e.style&&Y(e.style[o])||X(o,t)||void 0!==(null===(r=null==s?void 0:s.getValue(o))||void 0===r?void 0:r.liveStyle))&&(a[o]=n[o]);return a}function it(t,e){try{e.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}}function ct(t,{style:e,vars:s},r,n){Object.assign(t.style,e,n&&n.getProjectionStyles(r));for(const e in s)t.style.setProperty(e,s[e])}const lt=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 ft(t,e,s,r){ct(t,e,void 0,r);for(const s in e.attrs)t.setAttribute(lt.has(s)?s:y(s),e.attrs[s])}function dt(t,e,s){const r=ot(t,e,s);for(const s in t)if(Y(t[s])||Y(e[s])){r[-1!==R.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return r}export{$ as A,O as B,L as C,C as D,D as E,F,k as G,V as H,E as I,Z as J,m as K,n as L,rt as M,r as N,ct as O,x as P,lt as Q,y as R,s as a,i as b,u as c,Y as d,X as e,l as f,K as g,_ as h,a as i,tt as j,G as k,nt as l,o as m,e as n,v as o,dt as p,p as q,st as r,ot as s,S as t,it as u,ft as v,t as w,g as x,R as y,at as z};