motion 12.7.4 → 12.7.5-alpha.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 (173) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/debug.js +22 -14
  3. package/dist/cjs/index.js +4113 -3624
  4. package/dist/cjs/mini.js +403 -324
  5. package/dist/cjs/react-client.js +3151 -3245
  6. package/dist/cjs/react-m.js +169 -166
  7. package/dist/cjs/react-mini.js +330 -251
  8. package/dist/es/framer-motion/dist/es/animation/animate/sequence.mjs +1 -1
  9. package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +81 -9
  10. package/dist/es/framer-motion/dist/es/animation/interfaces/motion-value.mjs +11 -30
  11. package/dist/es/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +1 -1
  12. package/dist/es/framer-motion/dist/es/animation/optimized-appear/store-id.mjs +1 -1
  13. package/dist/es/framer-motion/dist/es/animation/sequence/create.mjs +3 -3
  14. package/dist/es/framer-motion/dist/es/animation/sequence/utils/edit.mjs +2 -2
  15. package/dist/es/framer-motion/dist/es/animation/utils/default-transitions.mjs +1 -1
  16. package/dist/es/framer-motion/dist/es/animation/utils/stagger.mjs +1 -1
  17. package/dist/es/framer-motion/dist/es/components/Reorder/utils/check-reorder.mjs +1 -1
  18. package/dist/es/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs +2 -2
  19. package/dist/es/framer-motion/dist/es/gestures/drag/utils/constraints.mjs +2 -2
  20. package/dist/es/framer-motion/dist/es/gestures/focus.mjs +1 -1
  21. package/dist/es/framer-motion/dist/es/gestures/pan/PanSession.mjs +1 -1
  22. package/dist/es/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +1 -1
  23. package/dist/es/framer-motion/dist/es/projection/animation/mix-values.mjs +3 -3
  24. package/dist/es/framer-motion/dist/es/projection/geometry/delta-apply.mjs +1 -1
  25. package/dist/es/framer-motion/dist/es/projection/geometry/delta-calc.mjs +1 -1
  26. package/dist/es/framer-motion/dist/es/projection/geometry/delta-remove.mjs +2 -2
  27. package/dist/es/framer-motion/dist/es/projection/node/create-projection-node.mjs +3 -5
  28. package/dist/es/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +1 -1
  29. package/dist/es/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +2 -2
  30. package/dist/es/framer-motion/dist/es/projection/styles/scale-correction.mjs +1 -1
  31. package/dist/es/framer-motion/dist/es/render/VisualElement.mjs +7 -7
  32. package/dist/es/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +1 -1
  33. package/dist/es/framer-motion/dist/es/render/dom/scroll/attach-animation.mjs +17 -0
  34. package/dist/es/framer-motion/dist/es/render/dom/scroll/attach-function.mjs +23 -0
  35. package/dist/es/framer-motion/dist/es/render/dom/scroll/index.mjs +6 -82
  36. package/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +3 -3
  37. package/dist/es/framer-motion/dist/es/render/dom/scroll/utils/get-timeline.mjs +29 -0
  38. package/dist/es/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +3 -3
  39. package/dist/es/framer-motion/dist/es/render/html/utils/build-styles.mjs +4 -4
  40. package/dist/es/framer-motion/dist/es/render/html/utils/build-transform.mjs +3 -3
  41. package/dist/es/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +2 -2
  42. package/dist/es/framer-motion/dist/es/render/svg/config-motion.mjs +1 -1
  43. package/dist/es/framer-motion/dist/es/render/svg/utils/path.mjs +1 -1
  44. package/dist/es/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +1 -1
  45. package/dist/es/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +1 -1
  46. package/dist/es/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
  47. package/dist/es/framer-motion/dist/es/utils/delay.mjs +1 -1
  48. package/dist/es/framer-motion/dist/es/utils/transform.mjs +1 -1
  49. package/dist/es/framer-motion/dist/es/utils/use-cycle.mjs +1 -1
  50. package/dist/es/framer-motion/dist/es/utils/use-instant-transition.mjs +4 -4
  51. package/dist/es/framer-motion/dist/es/value/use-spring.mjs +2 -2
  52. package/dist/es/framer-motion/dist/es/value/use-will-change/get-will-change-name.mjs +2 -2
  53. package/dist/es/motion/lib/index.mjs +109 -26
  54. package/dist/es/motion/lib/react.mjs +108 -32
  55. package/dist/es/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs +179 -0
  56. package/dist/es/motion-dom/dist/es/animation/GroupAnimation.mjs +6 -15
  57. package/dist/es/{framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs → motion-dom/dist/es/animation/JSAnimation.mjs} +108 -156
  58. package/dist/es/motion-dom/dist/es/animation/NativeAnimation.mjs +64 -67
  59. package/dist/es/motion-dom/dist/es/animation/NativeAnimationExtended.mjs +65 -0
  60. package/dist/es/motion-dom/dist/es/animation/NativeAnimationWrapper.mjs +14 -0
  61. package/dist/es/{framer-motion/dist/es/animation/animators → motion-dom/dist/es/animation}/drivers/driver-frameloop.mjs +2 -2
  62. package/dist/es/{framer-motion → motion-dom}/dist/es/animation/generators/keyframes.mjs +5 -5
  63. package/dist/es/{framer-motion → motion-dom}/dist/es/animation/generators/spring/find.mjs +1 -1
  64. package/dist/es/{framer-motion → motion-dom}/dist/es/animation/generators/spring/index.mjs +5 -6
  65. package/dist/es/{framer-motion/dist/es/render/dom → motion-dom/dist/es/animation/keyframes}/DOMKeyframesResolver.mjs +9 -8
  66. package/dist/es/{framer-motion/dist/es/render/utils → motion-dom/dist/es/animation/keyframes}/KeyframesResolver.mjs +28 -35
  67. package/dist/es/motion-dom/dist/es/animation/keyframes/get-final.mjs +3 -4
  68. package/dist/es/{framer-motion/dist/es/utils → motion-dom/dist/es/animation/keyframes}/offsets/fill.mjs +2 -2
  69. package/dist/es/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs +11 -0
  70. package/dist/es/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs +7 -0
  71. package/dist/es/{framer-motion/dist/es/animation → motion-dom/dist/es/animation/keyframes}/utils/is-none.mjs +1 -1
  72. package/dist/es/{framer-motion/dist/es/render/html → motion-dom/dist/es/animation/keyframes}/utils/make-none-animatable.mjs +1 -1
  73. package/dist/es/{framer-motion/dist/es/render/dom → motion-dom/dist/es/animation/keyframes}/utils/unit-conversion.mjs +2 -2
  74. package/dist/es/motion-dom/dist/es/animation/utils/WithPromise.mjs +28 -0
  75. package/dist/es/motion-dom/dist/es/animation/utils/active-animations.mjs +9 -0
  76. package/dist/es/{framer-motion/dist/es/animation/animators → motion-dom/dist/es/animation}/utils/can-animate.mjs +3 -3
  77. package/dist/es/{framer-motion/dist/es/render/dom → motion-dom/dist/es/animation}/utils/css-variables-conversion.mjs +2 -2
  78. package/dist/es/motion-dom/dist/es/animation/utils/replace-transition-type.mjs +18 -0
  79. package/dist/es/motion-dom/dist/es/animation/waapi/easing/is-supported.mjs +1 -1
  80. package/dist/es/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs +5 -3
  81. package/dist/es/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs +6 -4
  82. package/dist/es/motion-dom/dist/es/animation/waapi/supports/waapi.mjs +39 -0
  83. package/dist/es/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs +2 -1
  84. package/dist/es/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs +20 -0
  85. package/dist/es/motion-dom/dist/es/frameloop/batcher.mjs +2 -1
  86. package/dist/es/motion-dom/dist/es/frameloop/order.mjs +1 -0
  87. package/dist/es/motion-dom/dist/es/render/dom/is-css-var.mjs +3 -0
  88. package/dist/es/motion-dom/dist/es/render/dom/style-computed.mjs +10 -0
  89. package/dist/es/motion-dom/dist/es/render/dom/style-set.mjs +9 -0
  90. package/dist/es/{framer-motion/dist/es/render/html → motion-dom/dist/es/render}/utils/keys-transform.mjs +1 -1
  91. package/dist/es/{framer-motion/dist/es/render/dom → motion-dom/dist/es}/scroll/observe.mjs +1 -1
  92. package/dist/es/motion-dom/dist/es/stats/index.mjs +2 -0
  93. package/dist/es/{framer-motion → motion-dom}/dist/es/utils/interpolate.mjs +4 -3
  94. package/dist/es/{framer-motion → motion-dom}/dist/es/utils/mix/color.mjs +3 -3
  95. package/dist/es/{framer-motion → motion-dom}/dist/es/utils/mix/complex.mjs +5 -5
  96. package/dist/es/motion-dom/dist/es/value/index.mjs +3 -1
  97. package/dist/es/{framer-motion → motion-dom}/dist/es/value/types/color/rgba.mjs +2 -2
  98. package/dist/es/{framer-motion/dist/es/render/dom/value-types → motion-dom/dist/es/value/types}/dimensions.mjs +3 -3
  99. package/dist/es/{framer-motion/dist/es/render/dom/value-types/type-int.mjs → motion-dom/dist/es/value/types/int.mjs} +1 -1
  100. package/dist/es/{framer-motion/dist/es/render/dom/value-types → motion-dom/dist/es/value/types/maps}/defaults.mjs +2 -2
  101. package/dist/es/{framer-motion/dist/es/render/dom/value-types/number-browser.mjs → motion-dom/dist/es/value/types/maps/number.mjs} +13 -3
  102. package/dist/es/{framer-motion/dist/es/render/dom/value-types → motion-dom/dist/es/value/types/maps}/transform.mjs +2 -2
  103. package/dist/es/{framer-motion → motion-dom}/dist/es/value/types/numbers/index.mjs +1 -1
  104. package/dist/es/{framer-motion → motion-dom}/dist/es/value/types/numbers/units.mjs +3 -2
  105. package/dist/es/{framer-motion/dist/es/render/dom/value-types → motion-dom/dist/es/value/types/utils}/animatable-none.mjs +4 -4
  106. package/dist/es/{framer-motion/dist/es/render/dom/value-types → motion-dom/dist/es/value/types/utils}/find.mjs +4 -4
  107. package/dist/es/motion-dom/dist/es/view/index.mjs +64 -0
  108. package/dist/es/motion-dom/dist/es/view/queue.mjs +52 -0
  109. package/dist/es/motion-dom/dist/es/view/start.mjs +155 -0
  110. package/dist/es/motion-dom/dist/es/view/utils/choose-layer-type.mjs +11 -0
  111. package/dist/es/motion-dom/dist/es/view/utils/css.mjs +32 -0
  112. package/dist/es/motion-dom/dist/es/view/utils/get-layer-name.mjs +8 -0
  113. package/dist/es/motion-dom/dist/es/view/utils/get-view-animations.mjs +12 -0
  114. package/dist/es/motion-dom/dist/es/view/utils/has-target.mjs +5 -0
  115. package/dist/es/{framer-motion → motion-utils}/dist/es/easing/cubic-bezier.mjs +1 -1
  116. package/dist/es/{framer-motion → motion-utils}/dist/es/easing/steps.mjs +1 -1
  117. package/dist/es/{framer-motion → motion-utils}/dist/es/easing/utils/get-easing-for-segment.mjs +1 -1
  118. package/dist/es/{framer-motion → motion-utils}/dist/es/easing/utils/map.mjs +7 -4
  119. package/dist/es/motion-utils/dist/es/global-config.mjs +1 -4
  120. package/dist/es/motion-utils/dist/es/warn-once.mjs +4 -1
  121. package/dist/motion.dev.js +4108 -3619
  122. package/dist/motion.js +1 -1
  123. package/package.json +3 -3
  124. package/dist/es/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +0 -324
  125. package/dist/es/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +0 -120
  126. package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +0 -5
  127. package/dist/es/framer-motion/dist/es/render/dom/value-types/number.mjs +0 -18
  128. package/dist/es/framer-motion/dist/es/utils/use-instant-transition-state.mjs +0 -5
  129. package/dist/es/motion-dom/dist/es/animation/keyframes/hydrate.mjs +0 -26
  130. package/dist/es/motion-dom/dist/es/animation/waapi/utils/attach-timeline.mjs +0 -6
  131. package/dist/es/motion-dom/dist/es/render/dom/style.mjs +0 -15
  132. /package/dist/es/{framer-motion → motion-dom}/dist/es/animation/generators/inertia.mjs +0 -0
  133. /package/dist/es/{framer-motion → motion-dom}/dist/es/animation/generators/spring/defaults.mjs +0 -0
  134. /package/dist/es/{framer-motion → motion-dom}/dist/es/animation/generators/utils/velocity.mjs +0 -0
  135. /package/dist/es/{framer-motion/dist/es/utils → motion-dom/dist/es/animation/keyframes}/offsets/default.mjs +0 -0
  136. /package/dist/es/{framer-motion/dist/es/utils → motion-dom/dist/es/animation/keyframes}/offsets/time.mjs +0 -0
  137. /package/dist/es/{framer-motion → motion-dom}/dist/es/animation/utils/is-animatable.mjs +0 -0
  138. /package/dist/es/{framer-motion/dist/es/render/dom → motion-dom/dist/es/animation}/utils/is-css-variable.mjs +0 -0
  139. /package/dist/es/{framer-motion/dist/es/animation/animators → motion-dom/dist/es/animation/waapi}/utils/accelerated-values.mjs +0 -0
  140. /package/dist/es/{framer-motion/dist/es/render/html/utils → motion-dom/dist/es/render/dom}/parse-transform.mjs +0 -0
  141. /package/dist/es/{framer-motion/dist/es/render/html → motion-dom/dist/es/render}/utils/keys-position.mjs +0 -0
  142. /package/dist/es/{framer-motion → motion-dom}/dist/es/utils/mix/immediate.mjs +0 -0
  143. /package/dist/es/{framer-motion → motion-dom}/dist/es/utils/mix/index.mjs +0 -0
  144. /package/dist/es/{framer-motion → motion-dom}/dist/es/utils/mix/number.mjs +0 -0
  145. /package/dist/es/{framer-motion → motion-dom}/dist/es/utils/mix/visibility.mjs +0 -0
  146. /package/dist/es/{framer-motion/dist/es/render/dom/value-types/type-auto.mjs → motion-dom/dist/es/value/types/auto.mjs} +0 -0
  147. /package/dist/es/{framer-motion → motion-dom}/dist/es/value/types/color/hex.mjs +0 -0
  148. /package/dist/es/{framer-motion/dist/es/utils → motion-dom/dist/es/value/types/color}/hsla-to-rgba.mjs +0 -0
  149. /package/dist/es/{framer-motion → motion-dom}/dist/es/value/types/color/hsla.mjs +0 -0
  150. /package/dist/es/{framer-motion → motion-dom}/dist/es/value/types/color/index.mjs +0 -0
  151. /package/dist/es/{framer-motion → motion-dom}/dist/es/value/types/color/utils.mjs +0 -0
  152. /package/dist/es/{framer-motion → motion-dom}/dist/es/value/types/complex/filter.mjs +0 -0
  153. /package/dist/es/{framer-motion → motion-dom}/dist/es/value/types/complex/index.mjs +0 -0
  154. /package/dist/es/{framer-motion/dist/es/render/dom/value-types → motion-dom/dist/es/value/types}/test.mjs +0 -0
  155. /package/dist/es/{framer-motion → motion-dom}/dist/es/value/types/utils/color-regex.mjs +0 -0
  156. /package/dist/es/{framer-motion → motion-dom}/dist/es/value/types/utils/float-regex.mjs +0 -0
  157. /package/dist/es/{framer-motion/dist/es/render/dom/value-types → motion-dom/dist/es/value/types/utils}/get-as-type.mjs +0 -0
  158. /package/dist/es/{framer-motion → motion-dom}/dist/es/value/types/utils/is-nullish.mjs +0 -0
  159. /package/dist/es/{framer-motion → motion-dom}/dist/es/value/types/utils/sanitize.mjs +0 -0
  160. /package/dist/es/{framer-motion → motion-dom}/dist/es/value/types/utils/single-color-regex.mjs +0 -0
  161. /package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/clamp.mjs +0 -0
  162. /package/dist/es/{framer-motion → motion-utils}/dist/es/easing/anticipate.mjs +0 -0
  163. /package/dist/es/{framer-motion → motion-utils}/dist/es/easing/back.mjs +0 -0
  164. /package/dist/es/{framer-motion → motion-utils}/dist/es/easing/circ.mjs +0 -0
  165. /package/dist/es/{framer-motion → motion-utils}/dist/es/easing/ease.mjs +0 -0
  166. /package/dist/es/{framer-motion → motion-utils}/dist/es/easing/modifiers/mirror.mjs +0 -0
  167. /package/dist/es/{framer-motion → motion-utils}/dist/es/easing/modifiers/reverse.mjs +0 -0
  168. /package/dist/es/{motion-dom/dist/es → motion-utils/dist/es/easing}/utils/is-bezier-definition.mjs +0 -0
  169. /package/dist/es/{framer-motion → motion-utils}/dist/es/easing/utils/is-easing-array.mjs +0 -0
  170. /package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/is-numerical-string.mjs +0 -0
  171. /package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/is-zero-value-string.mjs +0 -0
  172. /package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/pipe.mjs +0 -0
  173. /package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/wrap.mjs +0 -0
package/dist/motion.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,(function(t){"use strict";function e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}let n=()=>{};const s={skipAnimations:!1,useManualTiming:!1};function r(t){let e;return()=>(void 0===e&&(e=t()),e)}const i=t=>t,o=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};class a{constructor(){this.subscriptions=[]}add(t){var n,s;return n=this.subscriptions,s=t,-1===n.indexOf(s)&&n.push(s),()=>e(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}}const l=t=>1e3*t,u=t=>t/1e3;function c(t,e){return e?t*(1e3/e):0}const h=r((()=>void 0!==window.ScrollTimeline));class d{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map((t=>t.finished)))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;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")}}class p extends d{then(t,e){return this.finished.finally(t).then((()=>{}))}}const f=t=>t.startsWith("--"),m=(t,e,n)=>{f(e)?t.style.setProperty(e,n):t.style[e]=n},g=(t,e)=>f(e)?t.style.getPropertyValue(e):t.style[e],y=t=>null!==t;const v=r((()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0})),w=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","backgroundPositionX","backgroundPositionY"]);const b={value:null,addProjectionMetrics:null},T=t=>Array.isArray(t)&&"number"==typeof t[0],x={};function S(t,e){const n=r(t);return()=>x[e]??n()}const M=S((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),"linearEasing"),A=(t,e,n=10)=>{let s="";const r=Math.max(Math.round(e/n),2);for(let e=0;e<r;e++)s+=t(e/(r-1))+", ";return`linear(${s.substring(0,s.length-2)})`},V=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,k={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])};function P(t,e){return t?"function"==typeof t&&M()?A(t,e):T(t)?V(t):Array.isArray(t)?t.map((t=>P(t,e)||k.easeOut)):k[t]:void 0}function E(t,e,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=P(a,r);Array.isArray(h)&&(c.easing=h);return t.animate(c,{delay:s,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:"reverse"===o?"alternate":"normal",pseudoElement:u})}function C(t){return"function"==typeof t&&"applyToOptions"in t}const F=new WeakMap;class O{constructor(t){if("animation"in t)return void(this.animation=t.animation);const{element:e,name:n,keyframes:s,pseudoElement:r,allowFlatten:i=!1}=t;let{transition:o}=t;this.isPseudoElement=Boolean(r),this.allowFlatten=i;const a=function(t){const e=F.get(t)||new Map;return F.set(t,e),e}(e),l=((t,e)=>`${t}:${e}`)(n,r||""),u=a.get(l);u&&u.stop();const c=function(t,e,n,s){Array.isArray(n)||(n=[n]);for(let r=0;r<n.length;r++)null===n[r]&&(n[r]=0!==r||s?n[r-1]:g(t,e)),"number"==typeof n[r]&&w.has(e)&&(n[r]=n[r]+"px");return!s&&!v()&&n.length<2&&n.unshift(g(t,e)),n}(e,n,s,r);o.type,o=function({type:t,...e}){return C(t)?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(o),this.animation=E(e,n,c,o,r),!1===o.autoplay&&this.animation.pause(),this.removeAnimation=()=>a.delete(l),this.animation.onfinish=()=>{r||(m(e,n,function(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(y),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}(c,o)),this.cancel())},a.set(l,this)}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.finish()}cancel(){try{this.animation.cancel()}catch(t){}this.removeAnimation()}stop(){const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.commitStyles(),this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming().duration||0;return u(Number(t))}get time(){return u(Number(this.animation.currentTime)||0)}set time(t){this.animation.currentTime=l(t)}get speed(){return this.animation.playbackRate}set speed(t){this.animation.playbackRate=t}get state(){return this.animation.playState}get startTime(){return Number(this.animation.startTime)}get finished(){return this.animation.finished}flatten(){this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"})}attachTimeline(t){return this.animation.timeline=t,this.animation.onfinish=null,i}then(t,e){return this.finished.then(t).catch(e)}}function R(t,e){return t?.[e]??t?.default??t}const B=2e4;function L(t){let e=0;let n=t.next(e);for(;!n.done&&e<B;)e+=50,n=t.next(e);return e>=B?1/0:e}function I(t,e=100,n){const s=n({...t,keyframes:[0,e]}),r=Math.min(L(s),B);return{type:"keyframes",ease:t=>s.next(r*t).value/e,duration:u(r)}}function W(t){return Boolean("function"==typeof t&&M()||!t||"string"==typeof t&&(t in k||M())||T(t)||Array.isArray(t)&&t.every(W))}function D(t,e){t.timeline=e,t.onfinish=null}const N=["read","resolveKeyframes","update","preRender","render","postRender"];function K(t,e){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=N.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)&&(c.schedule(e),t()),l++,e(a)}const c={schedule:(t,e=!1,i=!1)=>{const a=i&&r?n:s;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{a=t,r?i=!0:(r=!0,[n,s]=[s,n],n.forEach(u),e&&b.value&&b.value.frameloop[e].push(l),l=0,n.clear(),r=!1,i&&(i=!1,c.process(t)))}};return c}(i,e?n:void 0),t)),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,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),c.process(r),h.process(r),d.process(r),r.isProcessing=!1,n&&e&&(s=!1,t(p))};return{schedule:N.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<N.length;e++)o[N[e]].cancel(t)},state:r,steps:o}}const{schedule:$,cancel:j,state:z,steps:Y}=K("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:i,!0);let U;function X(){U=void 0}const H={now:()=>(void 0===U&&H.set(z.isProcessing||s.useManualTiming?z.timestamp:performance.now()),U),set:t=>{U=t,queueMicrotask(X)}},q=!1;function G(){return q}function Z(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let s=document;e&&(s=e.current);const r=n?.[t]??s.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function _(t,e){const n=Z(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function J(t){return!("touch"===t.pointerType||G())}const Q=(t,e)=>!!e&&(t===e||Q(t,e.parentElement)),tt=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const et=new WeakSet;function nt(t){return e=>{"Enter"===e.key&&t(e)}}function st(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function rt(t){return(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(t)&&!G()}class it{constructor(t,e={}){this.version="12.7.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=H.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=H.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new a);const n=this.events[t].add(e);return"change"===t?()=>{n(),$.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=H.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return c(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 ot(t,e){return new it(t,e)}const at=$,lt=N.reduce(((t,e)=>(t[e]=t=>j(t),t)),{}),ut=(t,e,n)=>n>e?e:n<t?t:n;function ct(t,e,n){const s=Math.max(e-5,0);return c(n-t(s),e-s)}const ht=100,dt=10,pt=1,ft=0,mt=800,gt=.3,yt=.3,vt={granular:.01,default:2},wt={granular:.005,default:.5},bt=.01,Tt=10,xt=.05,St=1,Mt=.001;function At({duration:t=mt,bounce:e=gt,velocity:n=ft,mass:s=pt}){let r,i,o=1-e;o=ut(xt,St,o),t=ut(bt,Tt,u(t)),o<1?(r=e=>{const s=e*o,r=s*t,i=s-n,a=kt(e,o),l=Math.exp(-r);return Mt-i/a*l},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=kt(Math.pow(e,2),o);return(-r(e)+Mt>0?-1:1)*((i-a)*l)/u}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<Vt;n++)s-=t(s)/e(s);return s}(r,i,5/t);if(t=l(t),isNaN(a))return{stiffness:ht,damping:dt,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}const Vt=12;function kt(t,e){return t*Math.sqrt(1-e*e)}const Pt=["duration","bounce"],Et=["stiffness","damping","mass"];function Ct(t,e){return e.some((e=>void 0!==t[e]))}function Ft(t=yt,e=gt){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:r}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:h,mass:d,duration:p,velocity:f,isResolvedFromDuration:m}=function(t){let e={velocity:ft,stiffness:ht,damping:dt,mass:pt,isResolvedFromDuration:!1,...t};if(!Ct(t,Et)&&Ct(t,Pt))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),r=s*s,i=2*ut(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:pt,stiffness:r,damping:i}}else{const n=At(t);e={...e,...n,mass:pt},e.isResolvedFromDuration=!0}return e}({...n,velocity:-u(n.velocity||0)}),g=f||0,y=h/(2*Math.sqrt(c*d)),v=o-i,w=u(Math.sqrt(c/d)),b=Math.abs(v)<5;let T;if(s||(s=b?vt.granular:vt.default),r||(r=b?wt.granular:wt.default),y<1){const t=kt(w,y);T=e=>{const n=Math.exp(-y*w*e);return o-n*((g+y*w*v)/t*Math.sin(t*e)+v*Math.cos(t*e))}}else if(1===y)T=t=>o-Math.exp(-w*t)*(v+(g+w*v)*t);else{const t=w*Math.sqrt(y*y-1);T=e=>{const n=Math.exp(-y*w*e),s=Math.min(t*e,300);return o-n*((g+y*w*v)*Math.sinh(s)+t*v*Math.cosh(s))/t}}const x={calculatedDuration:m&&p||null,next:t=>{const e=T(t);if(m)a.done=t>=p;else{let n=0;y<1&&(n=0===t?l(g):ct(T,t,e));const i=Math.abs(n)<=s,u=Math.abs(o-e)<=r;a.done=i&&u}return a.value=a.done?o:e,a},toString:()=>{const t=Math.min(L(x),B),e=A((e=>x.next(t*e).value),t,30);return t+"ms "+e},toTransition:()=>{}};return x}Ft.applyToOptions=t=>{const e=I(t,100,Ft);return t.ease=M()?e.ease:"easeOut",t.duration=l(e.duration),t.type="keyframes",t};const Ot=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},Rt=t=>Array.isArray(t)&&"number"!=typeof t[0];function Bt(t,e){return Rt(t)?t[Ot(0,t.length,e)]:t}const Lt=(t,e,n)=>t+(e-t)*n;function It(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=o(0,e,s);t.push(Lt(n,1,r))}}function Wt(t){const e=[0];return It(e,t.length-1),e}const Dt=t=>Boolean(t&&t.getVelocity);function Nt(t){return"object"==typeof t&&!Array.isArray(t)}function Kt(t,e,n,s){return"string"==typeof t&&Nt(e)?Z(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function $t(t,e,n){return t*(e+1)}function jt(t,e,n,s){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:s.get(e)??t}function zt(t,n,s,r,i,o){!function(t,n,s){for(let r=0;r<t.length;r++){const i=t[r];i.at>n&&i.at<s&&(e(t,i),r--)}}(t,i,o);for(let e=0;e<n.length;e++)t.push({value:n[e],at:Lt(i,o,r[e]),easing:Bt(s,e)})}function Yt(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Ut(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Xt(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Ht(t,e){return e[t]||(e[t]=[]),e[t]}function qt(t){return Array.isArray(t)?t:[t]}function Gt(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Zt=t=>"number"==typeof t,_t=t=>t.every(Zt),Jt=new WeakMap,Qt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],te=new Set(Qt),ee=new Set(["width","height","top","left","right","bottom",...Qt]),ne=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function se(t){const e=[{},{}];return t?.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function re(t,e,n,s){if("function"==typeof e){const[r,i]=se(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]=se(s);e=e(void 0!==n?n:t.custom,r,i)}return e}function ie(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ot(n))}function oe(t,e){const n=function(t,e,n){const s=t.getProps();return re(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){ie(t,e,ne(i[e]))}}function ae(t,e){const n=t.getValue("willChange");if(r=n,Boolean(Dt(r)&&r.add))return n.add(e);if(!n&&s.WillChange){const n=new s.WillChange("auto");t.addValue("willChange",n),n.add(e)}var r}const le=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ue="data-"+le("framerAppearId");function ce(t){return t.props[ue]}const he=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function de(t,e,n,s){if(t===e&&n===s)return i;const r=e=>function(t,e,n,s,r){let i,o,a=0;do{o=e+(n-e)/2,i=he(o,s,r)-t,i>0?n=o:e=o}while(Math.abs(i)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:he(r(t),e,s)}const pe=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,fe=t=>e=>1-t(1-e),me=de(.33,1.53,.69,.99),ge=fe(me),ye=pe(ge),ve=t=>(t*=2)<1?.5*ge(t):.5*(2-Math.pow(2,-10*(t-1))),we=t=>1-Math.sin(Math.acos(t)),be=fe(we),Te=pe(we),xe=t=>/^0[^.\s]+$/u.test(t);const Se={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Me={...Se,transform:t=>ut(0,1,t)},Ae={...Se,default:1},Ve=t=>Math.round(1e5*t)/1e5,ke=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Pe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ee=(t,e)=>n=>Boolean("string"==typeof n&&Pe.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ce=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[r,i,o,a]=s.match(ke);return{[t]:parseFloat(r),[e]:parseFloat(i),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},Fe={...Se,transform:t=>Math.round((t=>ut(0,255,t))(t))},Oe={test:Ee("rgb","red"),parse:Ce("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Fe.transform(t)+", "+Fe.transform(e)+", "+Fe.transform(n)+", "+Ve(Me.transform(s))+")"};const Re={test:Ee("#"),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:Oe.transform},Be=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Le=Be("deg"),Ie=Be("%"),We=Be("px"),De=Be("vh"),Ne=Be("vw"),Ke={...Ie,parse:t=>Ie.parse(t)/100,transform:t=>Ie.transform(100*t)},$e={test:Ee("hsl","hue"),parse:Ce("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Ie.transform(Ve(e))+", "+Ie.transform(Ve(n))+", "+Ve(Me.transform(s))+")"},je={test:t=>Oe.test(t)||Re.test(t)||$e.test(t),parse:t=>Oe.test(t)?Oe.parse(t):$e.test(t)?$e.parse(t):Re.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Oe.transform(t):$e.transform(t)},ze=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Ye="number",Ue="color",Xe=/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 He(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(Xe,(t=>(je.test(t)?(s.color.push(i),r.push(Ue),n.push(je.parse(t))):t.startsWith("var(")?(s.var.push(i),r.push("var"),n.push(t)):(s.number.push(i),r.push(Ye),n.push(parseFloat(t))),++i,"${}"))).split("${}");return{values:n,split:o,indexes:s,types:r}}function qe(t){return He(t).values}function Ge(t){const{split:e,types:n}=He(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+=e===Ye?Ve(t[i]):e===Ue?je.transform(t[i]):t[i]}return r}}const Ze=t=>"number"==typeof t?0:t;const _e={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(ke)?.length||0)+(t.match(ze)?.length||0)>0},parse:qe,createTransformer:Ge,getAnimatableNone:function(t){const e=qe(t);return Ge(t)(e.map(Ze))}},Je=new Set(["brightness","contrast","saturate","opacity"]);function Qe(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(ke)||[];if(!s)return t;const r=n.replace(s,"");let i=Je.has(e)?1:0;return s!==n&&(i*=100),e+"("+i+r+")"}const tn=/\b([a-z-]*)\(.*?\)/gu,en={..._e,getAnimatableNone:t=>{const e=t.match(tn);return e?e.map(Qe).join(" "):t}},nn={borderWidth:We,borderTopWidth:We,borderRightWidth:We,borderBottomWidth:We,borderLeftWidth:We,borderRadius:We,radius:We,borderTopLeftRadius:We,borderTopRightRadius:We,borderBottomRightRadius:We,borderBottomLeftRadius:We,width:We,maxWidth:We,height:We,maxHeight:We,top:We,right:We,bottom:We,left:We,padding:We,paddingTop:We,paddingRight:We,paddingBottom:We,paddingLeft:We,margin:We,marginTop:We,marginRight:We,marginBottom:We,marginLeft:We,backgroundPositionX:We,backgroundPositionY:We},sn={rotate:Le,rotateX:Le,rotateY:Le,rotateZ:Le,scale:Ae,scaleX:Ae,scaleY:Ae,scaleZ:Ae,skew:Le,skewX:Le,skewY:Le,distance:We,translateX:We,translateY:We,translateZ:We,x:We,y:We,z:We,perspective:We,transformPerspective:We,opacity:Me,originX:Ke,originY:Ke,originZ:We},rn={...Se,transform:Math.round},on={...nn,...sn,zIndex:rn,size:We,fillOpacity:Me,strokeOpacity:Me,numOctaves:rn},an={...on,color:je,backgroundColor:je,outlineColor:je,fill:je,stroke:je,borderColor:je,borderTopColor:je,borderRightColor:je,borderBottomColor:je,borderLeftColor:je,filter:en,WebkitFilter:en},ln=t=>an[t];function un(t,e){let n=ln(t);return n!==en&&(n=_e),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const cn=new Set(["auto","none","0"]);const hn=t=>180*t/Math.PI,dn=t=>{const e=hn(Math.atan2(t[1],t[0]));return fn(e)},pn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:dn,rotateZ:dn,skewX:t=>hn(Math.atan(t[1])),skewY:t=>hn(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},fn=t=>((t%=360)<0&&(t+=360),t),mn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),gn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),yn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:mn,scaleY:gn,scale:t=>(mn(t)+gn(t))/2,rotateX:t=>fn(hn(Math.atan2(t[6],t[5]))),rotateY:t=>fn(hn(Math.atan2(-t[2],t[0]))),rotateZ:dn,rotate:dn,skewX:t=>hn(Math.atan(t[4])),skewY:t=>hn(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function vn(t){return t.includes("scale")?1:0}function wn(t,e){if(!t||"none"===t)return vn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=yn,r=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=pn,r=e}if(!r)return vn(e);const i=s[e],o=r[1].split(",").map(bn);return"function"==typeof i?i(o):o[i]}function bn(t){return parseFloat(t.trim())}const Tn=t=>t===Se||t===We,xn=new Set(["x","y","z"]),Sn=Qt.filter((t=>!xn.has(t)));const Mn={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})=>wn(e,"x"),y:(t,{transform:e})=>wn(e,"y")};Mn.translateX=Mn.x,Mn.translateY=Mn.y;const An=new Set;let Vn=!1,kn=!1;function Pn(){if(kn){const t=Array.from(An).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 Sn.forEach((n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{t.getValue(e)?.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}kn=!1,Vn=!1,An.forEach((t=>t.complete())),An.clear()}function En(){An.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(kn=!0)}))}class Cn{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?(An.add(this),Vn||(Vn=!0,$.read(En),$.resolveKeyframes(Pn))):(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=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),An.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,An.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Fn=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),On=t=>e=>"string"==typeof e&&e.startsWith(t),Rn=On("--"),Bn=On("var(--"),Ln=t=>!!Bn(t)&&In.test(t.split("/*")[0].trim()),In=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Wn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Dn(t,e,n=1){const[s,r]=function(t){const e=Wn.exec(t);if(!e)return[,];const[,n,s,r]=e;return[`--${n??s}`,r]}(t);if(!s)return;const i=window.getComputedStyle(e).getPropertyValue(s);if(i){const t=i.trim();return Fn(t)?parseFloat(t):t}return Ln(r)?Dn(r,e,n+1):r}const Nn=t=>e=>e.test(t),Kn=[Se,We,Ie,Le,Ne,De,{test:t=>"auto"===t,parse:t=>t}],$n=t=>Kn.find(Nn(t));class jn extends Cn{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(),Ln(s))){const r=Dn(s,e.current);void 0!==r&&(t[n]=r),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!ee.has(n)||2!==t.length)return;const[s,r]=t,i=$n(s),o=$n(r);if(i!==o)if(Tn(i)&&Tn(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||xe(s))&&n.push(e);var s;n.length&&function(t,e,n){let s,r=0;for(;r<t.length&&!s;){const e=t[r];"string"==typeof e&&!cn.has(e)&&He(e).values.length&&(s=t[r]),r++}if(s&&n)for(const r of e)t[r]=un(n,s)}(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=Mn[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(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const s=t.getValue(e);s&&s.jump(this.measuredOrigin,!1);const r=n.length-1,i=n[r];n[r]=Mn[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const zn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!_e.test(t)&&"0"!==t||t.startsWith("url(")));function Yn(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=zn(r,e),a=zn(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 Un=t=>null!==t;function Xn(t,{repeat:e,repeatType:n="loop"},s){const r=t.filter(Un),i=e&&"loop"!==n&&e%2==1?0:r.length-1;return i&&void 0!==s?s:r[i]}class Hn{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=H.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||(En(),Pn()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=H.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:r,delay:i,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!Yn(t,n,s,r)){if(!i)return a&&a(Xn(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 qn(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 Zn=(t,e,n)=>{const s=t*t,r=n*(e*e-s)+s;return r<0?0:Math.sqrt(r)},_n=[Re,Oe,$e];function Jn(t){const e=(n=t,_n.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===$e&&(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=qn(a,s,t+1/3),i=qn(a,s,t),o=qn(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 Qn=(t,e)=>{const n=Jn(t),s=Jn(e);if(!n||!s)return Gn(t,e);const r={...n};return t=>(r.red=Zn(n.red,s.red,t),r.green=Zn(n.green,s.green,t),r.blue=Zn(n.blue,s.blue,t),r.alpha=Lt(n.alpha,s.alpha,t),Oe.transform(r))},ts=(t,e)=>n=>e(t(n)),es=(...t)=>t.reduce(ts),ns=new Set(["none","hidden"]);function ss(t,e){return n=>Lt(t,e,n)}function rs(t){return"number"==typeof t?ss:"string"==typeof t?Ln(t)?Gn:je.test(t)?Qn:as:Array.isArray(t)?is:"object"==typeof t?je.test(t)?Qn:os:Gn}function is(t,e){const n=[...t],s=n.length,r=t.map(((t,n)=>rs(t)(t,e[n])));return t=>{for(let e=0;e<s;e++)n[e]=r[e](t);return n}}function os(t,e){const n={...t,...e},s={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(s[r]=rs(t[r])(t[r],e[r]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const as=(t,e)=>{const n=_e.createTransformer(e),s=He(t),r=He(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?ns.has(t)&&!r.values.length||ns.has(e)&&!s.values.length?function(t,e){return ns.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):es(is(function(t,e){const n=[],s={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const i=e.types[r],o=t.indexes[i][s[i]],a=t.values[o]??0;n[r]=a,s[i]++}return n}(s,r),r.values),n):Gn(t,e)};function ls(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Lt(t,e,n);return rs(t)(t,e)}function us({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const y=t=>-f*Math.exp(-t/s),v=t=>g+y(t),w=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,T;const x=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,T=Ft({keyframes:[d.value,p(d.value)],velocity:ct(v,t,d.value),damping:r,stiffness:i,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==b||(e=!0,w(t),x(t)),void 0!==b&&t>=b?T.next(t-b):(!e&&w(t),d)}}}const cs=de(.42,0,1,1),hs=de(0,0,.58,1),ds=de(.42,0,.58,1),ps={linear:i,easeIn:cs,easeInOut:ds,easeOut:hs,circIn:we,circInOut:Te,circOut:be,backIn:ge,backInOut:ye,backOut:me,anticipate:ve},fs=t=>{if(T(t)){t.length;const[e,n,s,r]=t;return de(e,n,s,r)}return"string"==typeof t?ps[t]:t};function ms(t,e,{clamp:n=!0,ease:s,mixer:r}={}){const a=t.length;if(e.length,1===a)return()=>e[0];if(2===a&&e[0]===e[1])return()=>e[1];const l=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const u=function(t,e,n){const s=[],r=n||ls,o=t.length-1;for(let n=0;n<o;n++){let o=r(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||i:e;o=es(t,o)}s.push(o)}return s}(e,s,r),c=u.length,h=n=>{if(l&&n<t[0])return e[0];let s=0;if(c>1)for(;s<t.length-2&&!(n<t[s+1]);s++);const r=o(t[s],t[s+1],n);return u[s](r)};return n?e=>h(ut(t[0],t[a-1],e)):h}function gs({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const r=Rt(s)?s.map(fs):fs(s),i={done:!1,value:e[0]},o=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:Wt(e),t),a=ms(o,e,{ease:Array.isArray(r)?r:(l=e,u=r,l.map((()=>u||ds)).splice(0,l.length-1))});var l,u;return{calculatedDuration:t,next:e=>(i.value=a(e),i.done=e>=t,i)}}const ys=t=>{const e=({timestamp:e})=>t(e);return{start:()=>$.update(e,!0),stop:()=>j(e),now:()=>z.isProcessing?z.timestamp:H.now()}},vs={decay:us,inertia:us,tween:gs,keyframes:gs,spring:Ft},ws=t=>t/100;class bs extends Hn{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=s?.KeyframeResolver||Cn;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:vs[e]||gs;let a,l;o!==gs&&"number"!=typeof t[0]&&(a=es(ws,ls(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=L(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:r,mirroredGenerator:i,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return r.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let v=this.currentTime,w=r;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,f&&(n-=f/c)):"mirror"===p&&(w=i)),v=ut(0,1,n)*c}const b=y?{done:!1,value:a[0]}:w.next(v);o&&(b.value=o(b.value));let{done:T}=b;y||null===l||(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=null===this.holdTime&&("finished"===this.state||"running"===this.state&&T);return x&&void 0!==s&&(b.value=Xn(a,this.options,s)),m&&m(b.value),x&&this.finish(),b}get duration(){const{resolved:t}=this;return t?u(t.calculatedDuration):0}get time(){return u(this.currentTime)}set time(t){t=l(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=u(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=ys,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=n??this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){this._resolved?(this.state="paused",this.holdTime=this.currentTime??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)}get finished(){return this.currentFinishedPromise}}const Ts=new Set(["opacity","clipPath","filter","transform"]),xs=r((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const Ss={anticipate:ve,backInOut:ye,circInOut:Te};class Ms extends Hn{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:r}=this.options;this.resolver=new jn(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&&M()&&r in Ss&&(r=Ss[r]),C((u=this.options).type)||"spring"===u.type||!W(u.ease)){const{onComplete:e,onUpdate:o,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new bs({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const r=[];let i=0;for(;!s.done&&i<2e4;)s=n.sample(i),r.push(s.value),i+=10;return{times:void 0,keyframes:r,duration:i-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),n=c.duration,s=c.times,r=c.ease,i="keyframes"}const c=E(o.owner.current,a,t,{...this.options,duration:n,times:s,ease:r});return c.startTime=l??this.calcStartTime(),this.pendingTimeline?(D(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;o.set(Xn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,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 u(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return u(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=l(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}get finished(){return this.resolved.animation.finished}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:e}=this;if(!e)return i;const{animation:n}=e;D(n,t)}else this.pendingTimeline=t;return i}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:r,ease:i,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:u,...c}=this.options,h=new bs({...c,keyframes:n,duration:s,type:r,ease:i,times:o,isGenerator:!0}),d=l(this.time);t.setWithVelocity(h.sample(d-10).value,h.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return xs()&&n&&Ts.has(n)&&("transform"!==n||!l)&&!a&&!s&&"mirror"!==r&&0!==i&&"inertia"!==o}}const As={type:"spring",stiffness:500,damping:25,restSpeed:10},Vs={type:"keyframes",duration:.8},ks={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ps=(t,{keyframes:e})=>e.length>2?Vs:te.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:As:ks;const Es=(t,e,n,s={},r,i)=>o=>{const a=R(s,t)||{},u=a.delay||s.delay||0;let{elapsed:c=0}=s;c-=l(u);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:i?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(a)||(h={...h,...Ps(t,h)}),h.duration&&(h.duration=l(h.duration)),h.repeatDelay&&(h.repeatDelay=l(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(d=!0)),h.allowFlatten=!a.type&&!a.ease,d&&!i&&void 0!==e.get()){const t=Xn(h.keyframes,a);if(void 0!==t)return $.update((()=>{h.onUpdate(t),h.onComplete()})),new p([])}return!i&&Ms.supports(h)?new Ms(h):new bs(h)};function Cs({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function Fs(t,e,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(i=s);const l=[],u=r&&t.animationState&&t.animationState.getState()[r];for(const e in a){const s=t.getValue(e,t.latestValues[e]??null),r=a[e];if(void 0===r||u&&Cs(u,e))continue;const o={delay:n,...R(i||{},e)};let c=!1;if(window.MotionHandoffAnimation){const n=ce(t);if(n){const t=window.MotionHandoffAnimation(n,e,$);null!==t&&(o.startTime=t,c=!0)}}ae(t,e),s.start(Es(e,s,r,t.shouldReduceMotion&&ee.has(e)?{type:!1}:o,t,c));const h=s.animation;h&&l.push(h)}return o&&Promise.all(l).then((()=>{$.update((()=>{o&&oe(t,o)}))})),l}const Os=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Rs={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"]},Bs={};for(const t in Rs)Bs[t]={isEnabled:e=>Rs[t].some((t=>!!e[t]))};const Ls="undefined"!=typeof window,Is={current:null},Ws={current:!1};const Ds=[...Kn,je,_e];const Ns=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Ks(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||Ns.some((e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e])));var e}const $s=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class js{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=Cn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=H.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,$.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=Ks(e),this.isVariantNode=function(t){return Boolean(Ks(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&Dt(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Jt.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))),Ws.current||function(){if(Ws.current=!0,Ls)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(),j(this.notifyUpdate),j(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=te.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&$.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),r=e.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{s(),r(),i&&i(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Bs){const e=Bs[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<$s.length;e++){const n=$s[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(Dt(r))t.addValue(s,r);else if(Dt(i))t.addValue(s,ot(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,ot(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=ot(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var s;return null!=n&&("string"==typeof n&&(Fn(n)||xe(n))?n=parseFloat(n):(s=n,!Ds.find(Nn(s))&&_e.test(e)&&(n=un(t,e))),this.setBaseTarget(t,Dt(n)?n.get():n)),Dt(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const s=re(this.props,e,this.presenceContext?.custom);s&&(n=s[t])}if(e&&void 0!==n)return n;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||Dt(s)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new a),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class zs extends js{constructor(){super(...arguments),this.KeyframeResolver=jn}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;Dt(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}const Ys=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Us={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Xs=Qt.length;function Hs(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(te.has(t))o=!0;else if(Rn(t))r[t]=n;else{const e=Ys(n,on[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<Xs;i++){const o=Qt[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=Ys(a,on[o]);l||(r=!1,s+=`${Us[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 qs={offset:"stroke-dashoffset",array:"stroke-dasharray"},Gs={offset:"strokeDashoffset",array:"strokeDasharray"};function Zs(t,e,n){return"string"==typeof t?t:We.transform(e+n*t)}function _s(t,{attrX:e,attrY:n,attrScale:s,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Hs(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==r||void 0!==i||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Zs(e,t.x,t.width)} ${Zs(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?qs:Gs;t[i.offset]=We.transform(-s);const o=We.transform(e),a=We.transform(n);t[i.array]=`${o} ${a}`}(d,o,a,l,!1)}const Js=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 Qs(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 tr={};function er(t,{layout:e,layoutId:n}){return te.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!tr[t]||"opacity"===t)}function nr(t,e,n){const{style:s}=t,r={};for(const i in s)(Dt(s[i])||e.style&&Dt(e.style[i])||er(i,t)||void 0!==n?.getValue(i)?.liveStyle)&&(r[i]=s[i]);return r}class sr extends zs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Os,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(te.has(e)){const t=ln(e);return t&&t.default||0}return e=Js.has(e)?e:le(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=nr(t,e,n);for(const n in t)(Dt(t[n])||Dt(e[n]))&&(s[-1!==Qt.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]);return s}(t,e,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&$.postRender(this.updateDimensions)}build(t,e,n){_s(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Qs(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Js.has(n)?n:le(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 rr extends zs{constructor(){super(...arguments),this.type="html",this.renderInstance=Qs}readValueFromInstance(t,e){if(te.has(e))return((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return wn(n,e)})(t,e);{const s=(n=t,window.getComputedStyle(n)),r=(Rn(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){Hs(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return nr(t,e,n)}}class ir extends js{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 or(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 sr(e):new rr(e);n.mount(t),Jt.set(t,n)}function ar(t){const e=new ir({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Jt.set(t,e)}function lr(t,e,n,s){const r=[];if(function(t,e){return Dt(t)||"number"==typeof t||"string"==typeof t&&!Nt(e)}(t,e))r.push(function(t,e,n){const s=Dt(t)?t:ot(t);return s.start(Es("",s,e,n)),s.animation}(t,Nt(e)&&e.default||e,n&&n.default||n));else{const i=Kt(t,e,s),o=i.length;for(let t=0;t<o;t++){const s=i[t],a=s instanceof Element?or:ar;Jt.has(s)||a(s);const l=Jt.get(s),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,o)),r.push(...Fs(l,{...e,transition:u},{}))}}return r}function ur(t,e,n){const s=[],r=function(t,{defaultTransition:e={},...n}={},s,r){const i=e.duration||.3,a=new Map,u=new Map,c={},h=new Map;let d=0,p=0,f=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){h.set(o,p);continue}if(!Array.isArray(o)){h.set(o.name,jt(p,o.at,d,h));continue}let[a,m,g={}]=o;void 0!==g.at&&(p=jt(p,g.at,d,h));let y=0;const v=(t,n,s,o=0,a=0)=>{const u=qt(t),{delay:c=0,times:h=Wt(u),type:d="keyframes",repeat:m,repeatType:g,repeatDelay:v=0,...w}=n;let{ease:b=e.ease||"easeOut",duration:T}=n;const x="function"==typeof c?c(o,a):c,S=u.length,M=C(d)?d:r?.[d];if(S<=2&&M){let t=100;if(2===S&&_t(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...w};void 0!==T&&(e.duration=l(T));const n=I(e,t,M);b=n.ease,T=n.duration}T??(T=i);const A=p+x;1===h.length&&0===h[0]&&(h[1]=1);const V=h.length-u.length;if(V>0&&It(h,V),1===u.length&&u.unshift(null),m){T=$t(T,m);const t=[...u],e=[...h];b=Array.isArray(b)?[...b]:[b];const n=[...b];for(let s=0;s<m;s++){u.push(...t);for(let r=0;r<t.length;r++)h.push(e[r]+(s+1)),b.push(0===r?"linear":Bt(n,r-1))}Yt(h,m)}const k=A+T;zt(s,u,b,h,A,k),y=Math.max(x+T,y),f=Math.max(k,f)};if(Dt(a))v(m,g,Ht("default",Xt(a,u)));else{const t=Kt(a,m,s,c),e=t.length;for(let n=0;n<e;n++){const s=Xt(t[n],u);for(const t in m)v(m[t],Gt(g,t),Ht(t,s),n,e)}}d=p,p+=y}return u.forEach(((t,s)=>{for(const r in t){const i=t[r];i.sort(Ut);const l=[],u=[],c=[];for(let t=0;t<i.length;t++){const{at:e,value:n,easing:s}=i[t];l.push(n),u.push(o(0,f,e)),c.push(s||"easeOut")}0!==u[0]&&(u.unshift(0),l.unshift(l[0]),c.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),l.push(null)),a.has(s)||a.set(s,{keyframes:{},transition:{}});const h=a.get(s);h.keyframes[r]=l,h.transition[r]={...e,duration:f,ease:c,times:u,...n}}})),a}(t,e,n,{spring:Ft});return r.forEach((({keyframes:t,transition:e},n)=>{s.push(...lr(n,t,e))})),s}function cr(t){return function(e,n,s){let r=[];var i;i=e,r=Array.isArray(i)&&i.some(Array.isArray)?ur(e,n,t):lr(e,n,s,t);const o=new p(r);return t&&t.animations.push(o),o}}const hr=cr();const dr=t=>function(e,n,s){return new p(function(t,e,n,s){const r=Z(t,s),i=r.length,o=[];for(let t=0;t<i;t++){const s=r[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,i));for(const t in e){const n=e[t],r={...R(a,t)};r.duration&&(r.duration=l(r.duration)),r.delay&&(r.delay=l(r.delay)),o.push(new O({element:s,name:t,keyframes:n,transition:r,allowFlatten:!a.type&&!a.ease}))}}return o}(e,n,s,t))},pr=dr();function fr(t,e){let n;const s=()=>{const{currentTime:s}=e,r=(null===s?0:s.value)/100;n!==r&&t(r),n=r};return $.update(s,!0),()=>j(s)}const mr=new WeakMap;let gr;function yr({target:t,contentRect:e,borderBoxSize:n}){mr.get(t)?.forEach((s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})}))}function vr(t){t.forEach(yr)}function wr(t,e){gr||"undefined"!=typeof ResizeObserver&&(gr=new ResizeObserver(vr));const n=Z(t);return n.forEach((t=>{let n=mr.get(t);n||(n=new Set,mr.set(t,n)),n.add(e),gr?.observe(t)})),()=>{n.forEach((t=>{const n=mr.get(t);n?.delete(e),n?.size||gr?.unobserve(t)}))}}const br=new Set;let Tr;function xr(t){return br.add(t),Tr||(Tr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};br.forEach((t=>t(e)))},window.addEventListener("resize",Tr)),()=>{br.delete(t),!br.size&&Tr&&(Tr=void 0)}}const Sr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Mr(t,e,n,s){const r=n[e],{length:i,position:a}=Sr[e],l=r.current,u=n.time;r.current=t[`scroll${a}`],r.scrollLength=t[`scroll${i}`]-t[`client${i}`],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=o(0,r.scrollLength,r.current);const h=s-u;r.velocity=h>50?0:c(r.current-l,h)}const Ar={start:0,center:.5,end:1};function Vr(t,e,n=0){let s=0;if(t in Ar&&(t=Ar[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const kr=[0,0];function Pr(t,e,n,s){let r=Array.isArray(t)?t:kr,i=0,o=0;return"number"==typeof t?r=[t,t]:"string"==typeof t&&(r=(t=t.trim()).includes(" ")?t.split(" "):[t,Ar[t]?t:"0"]),i=Vr(r[0],n,s),o=Vr(r[1],e),i-o}const Er={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Cr={x:0,y:0};function Fr(t,e,n){const{offset:s=Er.All}=n,{target:r=t,axis:i="y"}=n,o="y"===i?"height":"width",a=r!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let r=null,i=s.parentNode;for(;!r;)"svg"===i.tagName&&(r=i),i=s.parentNode;s=r}}return n}(r,t):Cr,l=r===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(r),u={width:t.clientWidth,height:t.clientHeight};e[i].offset.length=0;let c=!e[i].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=Pr(s[t],u[o],l[o],a[i]);c||n===e[i].interpolatorOffsets[t]||(c=!0),e[i].offset[t]=n}c&&(e[i].interpolate=ms(e[i].offset,Wt(s),{clamp:!1}),e[i].interpolatorOffsets=[...e[i].offset]),e[i].progress=ut(0,1,e[i].interpolate(e[i].current))}function Or(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){Mr(t,"x",e,n),Mr(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&Fr(t,n,s)},notify:()=>e(n)}}const Rr=new WeakMap,Br=new WeakMap,Lr=new WeakMap,Ir=t=>t===document.documentElement?window:t;function Wr(t,{container:e=document.documentElement,...n}={}){let s=Lr.get(e);s||(s=new Set,Lr.set(e,s));const r=Or(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(r),!Rr.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(z.timestamp)},r=()=>{for(const t of s)t.notify()},a=()=>{$.read(t,!1,!0),$.read(n,!1,!0),$.update(r,!1,!0)};Rr.set(e,a);const l=Ir(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Br.set(e,(o=a,"function"==typeof(i=e)?xr(i):wr(i,o))),l.addEventListener("scroll",a,{passive:!0})}var i,o;const a=Rr.get(e);return $.read(a,!1,!0),()=>{j(a);const t=Lr.get(e);if(!t)return;if(t.delete(r),t.size)return;const n=Rr.get(e);Rr.delete(e),n&&(Ir(e).removeEventListener("scroll",n),Br.get(e)?.(),window.removeEventListener("resize",n))}}const Dr=new Map;function Nr({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),Dr.has(e)||Dr.set(e,{});const s=Dr.get(e);return s[n]||(s[n]=h()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const s={value:0},r=Wr((t=>{s.value=100*t[n].progress}),{container:e,axis:n});return{currentTime:s,cancel:r}}({source:e,axis:n})),s[n]}function Kr(t){return t&&(t.target||t.offset)}const $r={some:0,all:1};const jr=(t,e)=>Math.abs(t-e);t.MotionValue=it,t.animate=hr,t.animateMini=pr,t.anticipate=ve,t.backIn=ge,t.backInOut=ye,t.backOut=me,t.cancelFrame=j,t.cancelSync=lt,t.circIn=we,t.circInOut=Te,t.circOut=be,t.clamp=ut,t.createScopedAnimate=cr,t.cubicBezier=de,t.delay=function(t,e){return function(t,e){const n=H.now(),s=({timestamp:r})=>{const i=r-n;i>=e&&(j(s),t(i-e))};return $.read(s,!0),()=>j(s)}(t,l(e))},t.distance=jr,t.distance2D=function(t,e){const n=jr(t.x,e.x),s=jr(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=cs,t.easeInOut=ds,t.easeOut=hs,t.frame=$,t.frameData=z,t.hover=function(t,e,n={}){const[s,r,i]=_(t,n),o=t=>{if(!J(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const i=t=>{J(t)&&(s(t),n.removeEventListener("pointerleave",i))};n.addEventListener("pointerleave",i,r)};return s.forEach((t=>{t.addEventListener("pointerenter",o,r)})),i},t.inView=function(t,e,{root:n,margin:s,amount:r="some"}={}){const i=Z(t),o=new WeakMap,a=new IntersectionObserver((t=>{t.forEach((t=>{const n=o.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),o.delete(t.target))}))}),{root:n,rootMargin:s,threshold:"number"==typeof r?r:$r[r]});return i.forEach((t=>a.observe(t))),()=>a.disconnect()},t.inertia=us,t.interpolate=ms,t.invariant=n,t.isDragActive=G,t.keyframes=gs,t.mirrorEasing=pe,t.mix=ls,t.motionValue=ot,t.noop=i,t.pipe=es,t.press=function(t,e,n={}){const[s,r,i]=_(t,n),o=t=>{const s=t.currentTarget;if(!rt(t)||et.has(s))return;et.add(s);const i=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),rt(t)&&et.has(s)&&(et.delete(s),"function"==typeof i&&i(t,{success:e}))},a=t=>{o(t,s===window||s===document||n.useGlobalTarget||Q(s,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,r),window.addEventListener("pointercancel",l,r)};return s.forEach((t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,r),t instanceof HTMLElement&&(t.addEventListener("focus",(t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=nt((()=>{if(et.has(n))return;st(n,"down");const t=nt((()=>{st(n,"up")}));n.addEventListener("keyup",t,e),n.addEventListener("blur",(()=>st(n,"cancel")),e)}));n.addEventListener("keydown",s,e),n.addEventListener("blur",(()=>n.removeEventListener("keydown",s)),e)})(t,r))),e=t,tt.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))})),i},t.progress=o,t.reverseEasing=fe,t.scroll=function(t,{axis:e="y",...n}={}){const s={axis:e,...n};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||Kr(e)?Wr((n=>{t(n[e.axis].progress,n)}),e):fr(t,Nr(e))}(t,s):function(t,e){if(t.flatten(),Kr(e))return t.pause(),Wr((n=>{t.time=t.duration*n[e.axis].progress}),e);{const n=Nr(e);return t.attachTimeline?t.attachTimeline(n,(t=>(t.pause(),fr((e=>{t.time=t.duration*e}),n)))):i}}(t,s)},t.scrollInfo=Wr,t.spring=Ft,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(r,i)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,i),a=Math.abs(o-r);let l=t*a;if(s){const e=i*t;l=fs(s)(l/e)*e}return e+l}},t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,r="end"===e?Math.floor(s):Math.ceil(s);return ut(0,1,r/t)}},t.sync=at,t.time=H,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],r=t[1+n],i=t[2+n],o=t[3+n],a=ms(r,i,{mixer:(l=i[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.wrap=Ot}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,(function(t){"use strict";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const s=(t,e,n)=>n>e?e:n<t?t:n;let i=()=>{};const r={},o=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),a=t=>/^0[^.\s]+$/u.test(t);function u(t){let e;return()=>(void 0===e&&(e=t()),e)}const l=t=>t,c=(t,e)=>n=>e(t(n)),h=(...t)=>t.reduce(c),d=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};class p{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>n(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const f=t=>1e3*t,m=t=>t/1e3;function g(t,e){return e?t*(1e3/e):0}const y=new Set;const v=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},w=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function b(t,e,n,s){if(t===e&&n===s)return l;const i=e=>function(t,e,n,s,i){let r,o,a=0;do{o=e+(n-e)/2,r=w(o,s,i)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(e,0,1,t,n);return t=>0===t||1===t?t:w(i(t),e,s)}const T=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,x=t=>e=>1-t(1-e),S=b(.33,1.53,.69,.99),M=x(S),V=T(M),A=t=>(t*=2)<1?.5*M(t):.5*(2-Math.pow(2,-10*(t-1))),E=t=>1-Math.sin(Math.acos(t)),k=x(E),P=T(E),C=b(.42,0,1,1),F=b(0,0,.58,1),O=b(.42,0,.58,1);const R=t=>Array.isArray(t)&&"number"!=typeof t[0];function B(t,e){return R(t)?t[v(0,t.length,e)]:t}const L=t=>Array.isArray(t)&&"number"==typeof t[0],D={linear:l,easeIn:C,easeInOut:O,easeOut:F,circIn:E,circInOut:P,circOut:k,backIn:M,backInOut:V,backOut:S,anticipate:A},I=t=>{if(L(t)){t.length;const[e,n,s,i]=t;return b(e,n,s,i)}return"string"==typeof t?D[t]:t},W=["setup","read","resolveKeyframes","update","preRender","render","postRender"],N={value:null,addProjectionMetrics:null};function j(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=W.reduce(((t,n)=>(t[n]=function(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},u=0;function l(e){o.has(e)&&(c.schedule(e),t()),u++,e(a)}const c={schedule:(t,e=!1,r=!1)=>{const a=r&&i?n:s;return e&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{s.delete(t),o.delete(t)},process:t=>{a=t,i?r=!0:(i=!0,[n,s]=[s,n],n.forEach(l),e&&N.value&&N.value.frameloop[e].push(u),u=0,n.clear(),i=!1,r&&(r=!1,c.process(t)))}};return c}(o,e?n:void 0),t)),{}),{setup:u,read:l,resolveKeyframes:c,update:h,preRender:d,render:p,postRender:f}=a,m=()=>{const o=r.useManualTiming?i.timestamp:performance.now();n=!1,r.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(o-i.timestamp,40),1)),i.timestamp=o,i.isProcessing=!0,u.process(i),l.process(i),c.process(i),h.process(i),d.process(i),p.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))};return{schedule:W.reduce(((e,r)=>{const o=a[r];return e[r]=(e,r=!1,a=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(m)),o.schedule(e,r,a)),e}),{}),cancel:t=>{for(let e=0;e<W.length;e++)a[W[e]].cancel(t)},state:i,steps:a}}const{schedule:K,cancel:$,state:z,steps:U}=j("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:l,!0);let Y;function X(){Y=void 0}const H={now:()=>(void 0===Y&&H.set(z.isProcessing||r.useManualTiming?z.timestamp:performance.now()),Y),set:t=>{Y=t,queueMicrotask(X)}},q={layout:0,mainThread:0,waapi:0},G=t=>e=>"string"==typeof e&&e.startsWith(t),Z=G("--"),_=G("var(--"),J=t=>!!_(t)&&Q.test(t.split("/*")[0].trim()),Q=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,tt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},et={...tt,transform:t=>s(0,1,t)},nt={...tt,default:1},st=t=>Math.round(1e5*t)/1e5,it=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const rt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ot=(t,e)=>n=>Boolean("string"==typeof n&&rt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),at=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[i,r,o,a]=s.match(it);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},ut={...tt,transform:t=>Math.round((t=>s(0,255,t))(t))},lt={test:ot("rgb","red"),parse:at("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ut.transform(t)+", "+ut.transform(e)+", "+ut.transform(n)+", "+st(et.transform(s))+")"};const ct={test:ot("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:lt.transform},ht=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),dt=ht("deg"),pt=ht("%"),ft=ht("px"),mt=ht("vh"),gt=ht("vw"),yt=(()=>({...pt,parse:t=>pt.parse(t)/100,transform:t=>pt.transform(100*t)}))(),vt={test:ot("hsl","hue"),parse:at("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+pt.transform(st(e))+", "+pt.transform(st(n))+", "+st(et.transform(s))+")"},wt={test:t=>lt.test(t)||ct.test(t)||vt.test(t),parse:t=>lt.test(t)?lt.parse(t):vt.test(t)?vt.parse(t):ct.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?lt.transform(t):vt.transform(t)},bt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Tt="number",xt="color",St=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Mt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const o=e.replace(St,(t=>(wt.test(t)?(s.color.push(r),i.push(xt),n.push(wt.parse(t))):t.startsWith("var(")?(s.var.push(r),i.push("var"),n.push(t)):(s.number.push(r),i.push(Tt),n.push(parseFloat(t))),++r,"${}"))).split("${}");return{values:n,split:o,indexes:s,types:i}}function Vt(t){return Mt(t).values}function At(t){const{split:e,types:n}=Mt(t),s=e.length;return t=>{let i="";for(let r=0;r<s;r++)if(i+=e[r],void 0!==t[r]){const e=n[r];i+=e===Tt?st(t[r]):e===xt?wt.transform(t[r]):t[r]}return i}}const Et=t=>"number"==typeof t?0:t;const kt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(it)?.length||0)+(t.match(bt)?.length||0)>0},parse:Vt,createTransformer:At,getAnimatableNone:function(t){const e=Vt(t);return At(t)(e.map(Et))}};function Pt(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 Ct({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,r=0,o=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=Pt(a,s,t+1/3),r=Pt(a,s,t),o=Pt(a,s,t-1/3)}else i=r=o=n;return{red:Math.round(255*i),green:Math.round(255*r),blue:Math.round(255*o),alpha:s}}function Ft(t,e){return n=>n>0?e:t}const Ot=(t,e,n)=>t+(e-t)*n,Rt=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Bt=[ct,lt,vt];function Lt(t){const e=(n=t,Bt.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===vt&&(s=Ct(s)),s}const Dt=(t,e)=>{const n=Lt(t),s=Lt(e);if(!n||!s)return Ft(t,e);const i={...n};return t=>(i.red=Rt(n.red,s.red,t),i.green=Rt(n.green,s.green,t),i.blue=Rt(n.blue,s.blue,t),i.alpha=Ot(n.alpha,s.alpha,t),lt.transform(i))},It=new Set(["none","hidden"]);function Wt(t,e){return It.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Nt(t,e){return n=>Ot(t,e,n)}function jt(t){return"number"==typeof t?Nt:"string"==typeof t?J(t)?Ft:wt.test(t)?Dt:zt:Array.isArray(t)?Kt:"object"==typeof t?wt.test(t)?Dt:$t:Ft}function Kt(t,e){const n=[...t],s=n.length,i=t.map(((t,n)=>jt(t)(t,e[n])));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}}function $t(t,e){const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=jt(t[i])(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const zt=(t,e)=>{const n=kt.createTransformer(e),s=Mt(t),i=Mt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?It.has(t)&&!i.values.length||It.has(e)&&!s.values.length?Wt(t,e):h(Kt(function(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}(s,i),i.values),n):Ft(t,e)};function Ut(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Ot(t,e,n);return jt(t)(t,e)}const Yt=t=>{const e=({timestamp:e})=>t(e);return{start:()=>K.update(e,!0),stop:()=>$(e),now:()=>z.isProcessing?z.timestamp:H.now()}},Xt=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let e=0;e<i;e++)s+=t(e/(i-1))+", ";return`linear(${s.substring(0,s.length-2)})`},Ht=2e4;function qt(t){let e=0;let n=t.next(e);for(;!n.done&&e<Ht;)e+=50,n=t.next(e);return e>=Ht?1/0:e}function Gt(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(qt(s),Ht);return{type:"keyframes",ease:t=>s.next(i*t).value/e,duration:m(i)}}function Zt(t,e,n){const s=Math.max(e-5,0);return g(n-t(s),e-s)}const _t=100,Jt=10,Qt=1,te=0,ee=800,ne=.3,se=.3,ie={granular:.01,default:2},re={granular:.005,default:.5},oe=.01,ae=10,ue=.05,le=1,ce=.001;function he({duration:t=ee,bounce:e=ne,velocity:n=te,mass:i=Qt}){let r,o,a=1-e;a=s(ue,le,a),t=s(oe,ae,m(t)),a<1?(r=e=>{const s=e*a,i=s*t,r=s-n,o=pe(e,a),u=Math.exp(-i);return ce-r/o*u},o=e=>{const s=e*a*t,i=s*n+n,o=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-s),l=pe(Math.pow(e,2),a);return(-r(e)+ce>0?-1:1)*((i-o)*u)/l}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let s=n;for(let n=1;n<de;n++)s-=t(s)/e(s);return s}(r,o,5/t);if(t=f(t),isNaN(u))return{stiffness:_t,damping:Jt,duration:t};{const e=Math.pow(u,2)*i;return{stiffness:e,damping:2*a*Math.sqrt(i*e),duration:t}}}const de=12;function pe(t,e){return t*Math.sqrt(1-e*e)}const fe=["duration","bounce"],me=["stiffness","damping","mass"];function ge(t,e){return e.some((e=>void 0!==t[e]))}function ye(t=se,e=ne){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:r}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:l,damping:c,mass:h,duration:d,velocity:p,isResolvedFromDuration:g}=function(t){let e={velocity:te,stiffness:_t,damping:Jt,mass:Qt,isResolvedFromDuration:!1,...t};if(!ge(t,me)&&ge(t,fe))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),r=i*i,o=2*s(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:Qt,stiffness:r,damping:o}}else{const n=he(t);e={...e,...n,mass:Qt},e.isResolvedFromDuration=!0}return e}({...n,velocity:-m(n.velocity||0)}),y=p||0,v=c/(2*Math.sqrt(l*h)),w=a-o,b=m(Math.sqrt(l/h)),T=Math.abs(w)<5;let x;if(i||(i=T?ie.granular:ie.default),r||(r=T?re.granular:re.default),v<1){const t=pe(b,v);x=e=>{const n=Math.exp(-v*b*e);return a-n*((y+v*b*w)/t*Math.sin(t*e)+w*Math.cos(t*e))}}else if(1===v)x=t=>a-Math.exp(-b*t)*(w+(y+b*w)*t);else{const t=b*Math.sqrt(v*v-1);x=e=>{const n=Math.exp(-v*b*e),s=Math.min(t*e,300);return a-n*((y+v*b*w)*Math.sinh(s)+t*w*Math.cosh(s))/t}}const S={calculatedDuration:g&&d||null,next:t=>{const e=x(t);if(g)u.done=t>=d;else{let n=0;v<1&&(n=0===t?f(y):Zt(x,t,e));const s=Math.abs(n)<=i,o=Math.abs(a-e)<=r;u.done=s&&o}return u.value=u.done?a:e,u},toString:()=>{const t=Math.min(qt(S),Ht),e=Xt((e=>S.next(t*e).value),t,30);return t+"ms "+e},toTransition:()=>{}};return S}function ve({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?u:void 0===u||Math.abs(a-t)<Math.abs(u-t)?a:u;let f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const y=t=>-f*Math.exp(-t/s),v=t=>g+y(t),w=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=l,d.value=d.done?g:n};let b,T;const x=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==u&&e>u)&&(b=t,T=ye({keyframes:[d.value,p(d.value)],velocity:Zt(v,t,d.value),damping:i,stiffness:r,restDelta:l,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==b||(e=!0,w(t),x(t)),void 0!==b&&t>=b?T.next(t-b):(!e&&w(t),d)}}}function we(t,e,{clamp:n=!0,ease:i,mixer:o}={}){const a=t.length;if(e.length,1===a)return()=>e[0];if(2===a&&e[0]===e[1])return()=>e[1];const u=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());const c=function(t,e,n){const s=[],i=n||r.mix||Ut,o=t.length-1;for(let n=0;n<o;n++){let r=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||l:e;r=h(t,r)}s.push(r)}return s}(e,i,o),p=c.length,f=n=>{if(u&&n<t[0])return e[0];let s=0;if(p>1)for(;s<t.length-2&&!(n<t[s+1]);s++);const i=d(t[s],t[s+1],n);return c[s](i)};return n?e=>f(s(t[0],t[a-1],e)):f}function be(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=d(0,e,s);t.push(Ot(n,1,i))}}function Te(t){const e=[0];return be(e,t.length-1),e}function xe(t,e){return t.map((t=>t*e))}function Se(t,e){return t.map((()=>e||O)).splice(0,t.length-1)}function Me({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=R(s)?s.map(I):I(s),r={done:!1,value:e[0]},o=we(xe(n&&n.length===e.length?n:Te(e),t),e,{ease:Array.isArray(i)?i:Se(e,i)});return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}ye.applyToOptions=t=>{const e=Gt(t,100,ye);return t.ease=e.ease,t.duration=f(e.duration),t.type="keyframes",t};const Ve=t=>null!==t;function Ae(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Ve),o=i<0||e&&"loop"!==n&&e%2==1?0:r.length-1;return o&&void 0!==s?s:r[o]}const Ee={decay:ve,inertia:ve,tween:Me,keyframes:Me,spring:ye};function ke(t){"string"==typeof t.type&&(t.type=Ee[t.type])}class Pe{constructor(){this.count=0,this.updateFinished()}get finished(){return this._finished}updateFinished(){this.count++,this._finished=new Promise((t=>{this.resolve=t}))}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Ce=t=>t/100;class Fe extends Pe{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;if(t&&t.updatedAt!==H.now()&&this.tick(H.now()),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()},q.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;ke(t);const{type:e=Me,repeat:n=0,repeatDelay:s=0,repeatType:i,velocity:r=0}=t;let{keyframes:o}=t;const a=e||Me;a!==Me&&"number"!=typeof o[0]&&(this.mixKeyframes=h(Ce,Ut(o[0],o[1])),o=[0,100]);const u=a({...t,keyframes:o});"mirror"===i&&(this.mirroredGenerator=a({...t,keyframes:[...o].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=qt(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=u}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:u}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:h,repeatType:d,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let w=this.currentTime,b=n;if(h){const t=Math.min(this.currentTime,i)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/a)):"mirror"===d&&(b=o)),w=s(0,1,n)*a}const T=v?{done:!1,value:c[0]}:b.next(w);r&&(T.value=r(T.value));let{done:x}=T;v||null===u||(x=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return S&&f!==ve&&(T.value=Ae(c,this.options,g,this.speed)),m&&m(T.value),S&&this.finish(),T}then(t,e){return this.finished.then(t,e)}get duration(){return m(this.calculatedDuration)}get time(){return m(this.currentTime)}set time(t){t=f(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(H.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=m(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Yt,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:"finished"===this.state?(console.log("JSAnimation updateFinished"),this.updateFinished(),this.startTime=s):this.startTime||(this.startTime=n??s),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(H.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,q.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.pause(),this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),t.observe(this)}}function Oe(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Re=t=>180*t/Math.PI,Be=t=>{const e=Re(Math.atan2(t[1],t[0]));return De(e)},Le={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Be,rotateZ:Be,skewX:t=>Re(Math.atan(t[1])),skewY:t=>Re(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},De=t=>((t%=360)<0&&(t+=360),t),Ie=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),We=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ne={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ie,scaleY:We,scale:t=>(Ie(t)+We(t))/2,rotateX:t=>De(Re(Math.atan2(t[6],t[5]))),rotateY:t=>De(Re(Math.atan2(-t[2],t[0]))),rotateZ:Be,rotate:Be,skewX:t=>Re(Math.atan(t[4])),skewY:t=>Re(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 Ke(t,e){if(!t||"none"===t)return je(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Ne,i=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Le,i=e}if(!i)return je(e);const r=s[e],o=i[1].split(",").map(ze);return"function"==typeof r?r(o):o[r]}const $e=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ke(n,e)};function ze(t){return parseFloat(t.trim())}const Ue=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ye=(()=>new Set(Ue))(),Xe=t=>t===tt||t===ft,He=new Set(["x","y","z"]),qe=Ue.filter((t=>!He.has(t)));const Ge={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})=>Ke(e,"x"),y:(t,{transform:e})=>Ke(e,"y")};Ge.translateX=Ge.x,Ge.translateY=Ge.y;const Ze=new Set;let _e=!1,Je=!1,Qe=!1;function tn(){if(Je){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 qe.forEach((n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{t.getValue(e)?.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}Je=!1,_e=!1,Ze.forEach((t=>t.complete(Qe))),Ze.clear()}function en(){Ze.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(Je=!0)}))}function nn(){Qe=!0,en(),tn(),Qe=!1}class sn{constructor(t,e,n,s,i,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=s,this.element=i,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ze.add(this),_e||(_e=!0,K.read(en),K.resolveKeyframes(tn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;if(null===t[0]){const i=s?.get(),r=t[t.length-1];if(void 0!==i)t[0]=i;else if(n&&e){const s=n.readValue(e,r);null!=s&&(t[0]=s)}void 0===t[0]&&(t[0]=r),s&&void 0===i&&s.set(t[0])}Oe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ze.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ze.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const rn=t=>t.startsWith("--");function on(t,e,n){rn(e)?t.style.setProperty(e,n):t.style[e]=n}const an=u((()=>void 0!==window.ScrollTimeline)),un={};function ln(t,e){const n=u(t);return()=>un[e]??n()}const cn=ln((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),"linearEasing"),hn=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,dn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:hn([0,.65,.55,1]),circOut:hn([.55,0,1,.45]),backIn:hn([.31,.01,.66,-.59]),backOut:hn([.33,1.53,.69,.99])};function pn(t,e){return t?"function"==typeof t?cn()?Xt(t,e):"ease-out":L(t)?hn(t):Array.isArray(t)?t.map((t=>pn(t,e)||dn.easeOut)):dn[t]:void 0}function fn(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:u}={},l=void 0){const c={[e]:n};u&&(c.offset=u);const h=pn(a,i);Array.isArray(h)&&(c.easing=h),N.value&&q.waapi++;const d={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"};l&&(d.pseudoElement=l);const p=t.animate(c,d);return N.value&&p.finished.finally((()=>{q.waapi--})),p}function mn(t){return"function"==typeof t&&"applyToOptions"in t}function gn({type:t,...e}){return mn(t)&&cn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class yn extends Pe{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:s,pseudoElement:i,allowFlatten:r=!1,finalKeyframe:o}=t;this.isPseudoElement=Boolean(i),this.allowFlatten=r,this.options=t,t.type;const a=gn(t);this.animation=fn(e,n,s,a,i),!1===a.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const t=Ae(s,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(t):on(e,n,t),this.animation.cancel()}this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return m(Number(t))}get time(){return m(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=f(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,an()?(this.animation.timeline=t,l):e(this)}}const vn={anticipate:A,backInOut:V,circInOut:P};function wn(t){"string"==typeof t.ease&&t.ease in vn&&(t.ease=vn[t.ease])}class bn extends yn{constructor(t){wn(t),ke(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:i,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const o=new Fe({...r,autoplay:!1}),a=f(this.finishedTime??this.time);e.setWithVelocity(o.sample(a-10).value,o.sample(a).value,10),o.stop()}}const Tn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!kt.test(t)&&"0"!==t||t.startsWith("url(")));const xn=new Set(["opacity","clipPath","filter","transform"]),Sn=u((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));function Mn(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:u}=e.owner.getProps();return Sn()&&n&&xn.has(n)&&("transform"!==n||!u)&&!a&&!s&&"mirror"!==i&&0!==r&&"inertia"!==o}class Vn extends Pe{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",keyframes:o,name:a,motionValue:u,element:l,...c}){super(),this.stop=()=>{this._animation?(this._animation.stop(),this.stopTimeline?.()):this.keyframeResolver?.cancel()},this.createdAt=H.now();const h={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:r,name:a,motionValue:u,element:l,...c},d=l?.KeyframeResolver||sn;this.keyframeResolver=new d(o,((t,e,n)=>this.onKeyframesResolved(t,e,h,!n)),a,u,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,n,s){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:u,isHandoff:c,onUpdate:h,onComplete:d}=n;this.resolvedAt=H.now(),function(t,e,n,s){const i=t[0];if(null===i)return!1;if("display"===e||"visibility"===e)return!0;const r=t[t.length-1],o=Tn(i,e),a=Tn(r,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||mn(n))&&s)}(t,i,o,a)||(!r.instantAnimations&&u||h?.(Ae(t,n,e)),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const p={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...n,keyframes:t},f=!c&&Mn(p)?new bn({...p,element:p.motionValue.owner.current}):new Fe(p);f.finished.then((()=>{d?.(),this.notifyFinished()})).catch(l),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then((()=>{}))}get animation(){return this._animation||nn(),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){console.log("async animation complete"),this.animation.complete()}cancel(){this.animation.cancel()}}class An{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map((t=>t.finished)))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map((e=>e.attachTimeline(t)));return()=>{e.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class En extends An{then(t,e){return this.finished.finally(t).then((()=>{}))}}class kn extends yn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Pn=new WeakMap,Cn=(t,e="")=>`${t}:${e}`;function Fn(t){const e=Pn.get(t)||new Map;return Pn.set(t,e),e}const On=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Rn(t){const e=On.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Bn(t,e,n=1){const[s,i]=Rn(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const t=r.trim();return o(t)?parseFloat(t):t}return J(i)?Bn(i,e,n+1):i}function Ln(t,e){return t?.[e]??t?.default??t}const Dn=new Set(["width","height","top","left","right","bottom",...Ue]),In=t=>e=>e.test(t),Wn=[tt,ft,pt,dt,gt,mt,{test:t=>"auto"===t,parse:t=>t}],Nn=t=>Wn.find(In(t));const jn=new Set(["brightness","contrast","saturate","opacity"]);function Kn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(it)||[];if(!s)return t;const i=n.replace(s,"");let r=jn.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const $n=/\b([a-z-]*)\(.*?\)/gu,zn={...kt,getAnimatableNone:t=>{const e=t.match($n);return e?e.map(Kn).join(" "):t}},Un={...tt,transform:Math.round},Yn={rotate:dt,rotateX:dt,rotateY:dt,rotateZ:dt,scale:nt,scaleX:nt,scaleY:nt,scaleZ:nt,skew:dt,skewX:dt,skewY:dt,distance:ft,translateX:ft,translateY:ft,translateZ:ft,x:ft,y:ft,z:ft,perspective:ft,transformPerspective:ft,opacity:et,originX:yt,originY:yt,originZ:ft},Xn={borderWidth:ft,borderTopWidth:ft,borderRightWidth:ft,borderBottomWidth:ft,borderLeftWidth:ft,borderRadius:ft,radius:ft,borderTopLeftRadius:ft,borderTopRightRadius:ft,borderBottomRightRadius:ft,borderBottomLeftRadius:ft,width:ft,maxWidth:ft,height:ft,maxHeight:ft,top:ft,right:ft,bottom:ft,left:ft,padding:ft,paddingTop:ft,paddingRight:ft,paddingBottom:ft,paddingLeft:ft,margin:ft,marginTop:ft,marginRight:ft,marginBottom:ft,marginLeft:ft,backgroundPositionX:ft,backgroundPositionY:ft,...Yn,zIndex:Un,size:ft,fillOpacity:et,strokeOpacity:et,numOctaves:Un},Hn={...Xn,color:wt,backgroundColor:wt,outlineColor:wt,fill:wt,stroke:wt,borderColor:wt,borderTopColor:wt,borderRightColor:wt,borderBottomColor:wt,borderLeftColor:wt,filter:zn,WebkitFilter:zn},qn=t=>Hn[t];function Gn(t,e){let n=qn(t);return n!==zn&&(n=kt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Zn=new Set(["auto","none","0"]);class _n extends sn{constructor(t,e,n,s,i){super(t,e,n,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let s=t[n];if("string"==typeof s&&(s=s.trim(),J(s))){const i=Bn(s,e.current);void 0!==i&&(t[n]=i),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!Dn.has(n)||2!==t.length)return;const[s,i]=t,r=Nn(s),o=Nn(i);if(r!==o)if(Xe(r)&&Xe(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++)(null===t[e]||("number"==typeof(s=t[e])?0===s:null===s||"none"===s||"0"===s||a(s)))&&n.push(e);var s;n.length&&function(t,e,n){let s,i=0;for(;i<t.length&&!s;){const e=t[i];"string"==typeof e&&!Zn.has(e)&&Mt(e).values.length&&(s=t[i]),i++}if(s&&n)for(const i of e)t[i]=Gn(n,s)}(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=Ge[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(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const s=t.getValue(e);s&&s.jump(this.measuredOrigin,!1);const i=n.length-1,r=n[i];n[i]=Ge[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const Jn=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","backgroundPositionX","backgroundPositionY"]);function Qn(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&Jn.has(e)&&(t[n]=t[n]+"px")}const ts=u((()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0})),es=new Set(["opacity","clipPath","filter","transform"]),{schedule:ns,cancel:ss}=j(queueMicrotask,!1),is={x:!1,y:!1};function rs(){return is.x||is.y}function os(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let s=document;e&&(s=e.current);const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function as(t,e){const n=os(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function us(t){return!("touch"===t.pointerType||rs())}const ls=(t,e)=>!!e&&(t===e||ls(t,e.parentElement)),cs=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,hs=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const ds=new WeakSet;function ps(t){return e=>{"Enter"===e.key&&t(e)}}function fs(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function ms(t){return cs(t)&&!rs()}function gs(t,e){const n=window.getComputedStyle(t);return rn(e)?n.getPropertyValue(e):n[e]}function ys(t,e){let n;const s=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return K.update(s,!0),()=>$(s)}function vs(){const{value:t}=N;null!==t?(t.frameloop.rate.push(z.delta),t.animations.mainThread.push(q.mainThread),t.animations.waapi.push(q.waapi),t.animations.layout.push(q.layout)):$(vs)}function ws(t){return t.reduce(((t,e)=>t+e),0)/t.length}function bs(t,e=ws){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const Ts=t=>Math.round(1e3/t);function xs(){N.value=null,N.addProjectionMetrics=null}function Ss(){const{value:t}=N;if(!t)throw new Error("Stats are not being measured");xs(),$(vs);const e={frameloop:{setup:bs(t.frameloop.setup),rate:bs(t.frameloop.rate),read:bs(t.frameloop.read),resolveKeyframes:bs(t.frameloop.resolveKeyframes),update:bs(t.frameloop.update),preRender:bs(t.frameloop.preRender),render:bs(t.frameloop.render),postRender:bs(t.frameloop.postRender)},animations:{mainThread:bs(t.animations.mainThread),waapi:bs(t.animations.waapi),layout:bs(t.animations.layout)},layoutProjection:{nodes:bs(t.layoutProjection.nodes),calculatedTargetDeltas:bs(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:bs(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=Ts(n.min),n.max=Ts(n.max),n.avg=Ts(n.avg),[n.min,n.max]=[n.max,n.min],e}const Ms={current:void 0};class Vs{constructor(t,e={}){this.version="12.7.5-alpha.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=H.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=H.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new p);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){"none"===t&&console.trace(),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 Ms.current&&Ms.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=H.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return g(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 As(t,e){return new Vs(t,e)}const Es=[...Wn,wt,kt],ks=t=>Es.find(In(t)),Ps=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function Cs(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let Fs={},Os=null;const Rs=(t,e)=>{Fs[t]=e},Bs=()=>{Os||(Os=document.createElement("style"),Os.id="motion-view");let t="";for(const e in Fs){const n=Fs[e];t+=`${e} {\n`;for(const[e,s]of Object.entries(n))t+=` ${e}: ${s};\n`;t+="}\n"}Os.textContent=t,document.head.appendChild(Os),Fs={}},Ls=()=>{Os&&Os.parentElement&&Os.parentElement.removeChild(Os)};function Ds(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function Is(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}const Ws=["layout","enter","exit","new","old"];function Ns(t){const{update:e,targets:n,options:s}=t;if(!document.startViewTransition)return new Promise((async t=>{await e(),t(new An([]))}));(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||Rs(":root",{"view-transition-name":"none"}),Rs("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),Bs();const i=document.startViewTransition((async()=>{await e()}));return i.finished.finally((()=>{Ls()})),new Promise((t=>{i.ready.then((()=>{const e=document.getAnimations().filter(Is),i=[];n.forEach(((t,e)=>{for(const n of Ws){if(!t[n])continue;const{keyframes:r,options:o}=t[n];for(let[t,a]of Object.entries(r)){if(!a)continue;const r={...Ln(s,t),...Ln(o,t)},u=Cs(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===u?0:1,a]}"function"==typeof r.delay&&(r.delay=r.delay(0,1)),r.duration&&(r.duration=f(r.duration)),r.delay&&(r.delay=f(r.delay));const l=new yn({...r,element:document.documentElement,name:t,pseudoElement:`::view-transition-${u}(${e})`,keyframes:a});i.push(l)}}}));for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:r}=e;if(!r)continue;const o=Ds(r);if(!o)continue;const a=n.get(o.layer);if(a)js(a,"enter")&&js(a,"exit")&&e.getKeyframes().some((t=>t.mixBlendMode))?i.push(new kn(t)):t.cancel();else{const n="group"===o.type?"layout":"";let r={...Ln(s,n)};r.duration&&(r.duration=f(r.duration)),r=gn(r);const a=pn(r.ease,r.duration);e.updateTiming({delay:f(r.delay??0),duration:r.duration,easing:a}),i.push(new kn(t))}}t(new An(i))}))}))}function js(t,e){return t?.[e]?.keyframes.opacity}let Ks=[],$s=null;function zs(){$s=null;const[t]=Ks;var e;t&&(n(Ks,e=t),$s=e,Ns(e).then((t=>{e.notifyReady(t),t.finished.finally(zs)})))}function Us(){for(let t=Ks.length-1;t>=0;t--){const e=Ks[t],{interrupt:n}=e.options;if("immediate"===n){const n=Ks.slice(0,t+1).map((t=>t.update)),s=Ks.slice(t+1);e.update=()=>{n.forEach((t=>t()))},Ks=[e,...s];break}}$s&&"immediate"!==Ks[0]?.options.interrupt||zs()}class Ys{constructor(t,e={}){var n;this.currentTarget="root",this.targets=new Map,this.notifyReady=l,this.readyPromise=new Promise((t=>{this.notifyReady=t})),this.update=t,this.options={interrupt:"wait",...e},n=this,Ks.push(n),ns.render(Us)}get(t){return this.currentTarget=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentTarget:s,targets:i}=this;i.has(s)||i.set(s,{});i.get(s)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const Xs=K,Hs=W.reduce(((t,e)=>(t[e]=t=>$(t),t)),{}),qs=t=>Boolean(t&&t.getVelocity);function Gs(t){return"object"==typeof t&&!Array.isArray(t)}function Zs(t,e,n,s){return"string"==typeof t&&Gs(e)?os(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function _s(t,e,n){return t*(e+1)}function Js(t,e,n,s){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:s.get(e)??t}function Qs(t,e,s,i,r,o){!function(t,e,s){for(let i=0;i<t.length;i++){const r=t[i];r.at>e&&r.at<s&&(n(t,r),i--)}}(t,r,o);for(let n=0;n<e.length;n++)t.push({value:e[n],at:Ot(r,o,i[n]),easing:B(s,n)})}function ti(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function ei(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function ni(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function si(t,e){return e[t]||(e[t]=[]),e[t]}function ii(t){return Array.isArray(t)?t:[t]}function ri(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const oi=t=>"number"==typeof t,ai=t=>t.every(oi),ui=new WeakMap,li=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function ci(t){const e=[{},{}];return t?.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function hi(t,e,n,s){if("function"==typeof e){const[i,r]=ci(s);e=e(void 0!==n?n:t.custom,i,r)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[i,r]=ci(s);e=e(void 0!==n?n:t.custom,i,r)}return e}function di(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,As(n))}function pi(t,e){const n=function(t,e,n){const s=t.getProps();return hi(s,e,void 0!==n?n:s.custom,t)}(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const e in r){di(t,e,li(r[e]))}}function fi(t,e){const n=t.getValue("willChange");if(s=n,Boolean(qs(s)&&s.add))return n.add(e);if(!n&&r.WillChange){const n=new r.WillChange("auto");t.addValue("willChange",n),n.add(e)}var s}const mi=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),gi="data-"+mi("framerAppearId");function yi(t){return t.props[gi]}const vi=t=>null!==t;const wi={type:"spring",stiffness:500,damping:25,restSpeed:10},bi={type:"keyframes",duration:.8},Ti={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},xi=(t,{keyframes:e})=>e.length>2?bi:Ye.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:wi:Ti;const Si=(t,e,n,s={},i,o)=>a=>{const u=Ln(s,t)||{},l=u.delay||s.delay||0;let{elapsed:c=0}=s;c-=f(l);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...u,delay:-c,onUpdate:t=>{e.set(t),u.onUpdate&&u.onUpdate(t)},onComplete:()=>{a(),u.onComplete&&u.onComplete()},name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:u,elapsed:l,...c}){return!!Object.keys(c).length})(u)||Object.assign(h,xi(t,h)),h.duration&&(h.duration=f(h.duration)),h.repeatDelay&&(h.repeatDelay=f(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(d=!0)),(r.instantAnimations||r.skipAnimations)&&(d=!0,h.duration=0,h.delay=0),h.allowFlatten=!u.type&&!u.ease,d&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(vi),r=e&&"loop"!==n&&e%2==1?0:i.length-1;return r&&void 0!==s?s:i[r]}(h.keyframes,u);if(void 0!==t)return void K.update((()=>{h.onUpdate(t),h.onComplete()}))}return new Vn(h)};function Mi({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function Vi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;s&&(r=s);const u=[],l=i&&t.animationState&&t.animationState.getState()[i];for(const e in a){const s=t.getValue(e,t.latestValues[e]??null),i=a[e];if(void 0===i||l&&Mi(l,e))continue;const o={delay:n,...Ln(r||{},e)};let c=!1;if(window.MotionHandoffAnimation){const n=yi(t);if(n){const t=window.MotionHandoffAnimation(n,e,K);null!==t&&(o.startTime=t,c=!0)}}fi(t,e),s.start(Si(e,s,i,t.shouldReduceMotion&&Dn.has(e)?{type:!1}:o,t,c));const h=s.animation;h&&u.push(h)}return o&&Promise.all(u).then((()=>{K.update((()=>{o&&pi(t,o)}))})),u}const Ai=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Ei={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"]},ki={};for(const t in Ei)ki[t]={isEnabled:e=>Ei[t].some((t=>!!e[t]))};const Pi="undefined"!=typeof window,Ci={current:null},Fi={current:!1};const Oi=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function Ri(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||Oi.some((e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e])));var e}const Bi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Li{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:i,visualState:r},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=sn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=H.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,K.render(this.render,!1,!0))};const{latestValues:a,renderState:u,onUpdate:l}=r;this.onUpdate=l,this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=u,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(i),this.isControllingVariants=Ri(e),this.isVariantNode=function(t){return Boolean(Ri(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&qs(e)&&e.set(a[t],!1)}}mount(t){this.current=t,ui.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))),Fi.current||function(){if(Fi.current=!0,Pi)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ci.current=t.matches;t.addListener(e),e()}else Ci.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Ci.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),$(this.notifyUpdate),$(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=Ye.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)})),i=e.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{s(),i(),r&&r(),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 ki){const e=ki[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<Bi.length;e++){const n=Bi[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 i=e[s],r=n[s];if(qs(i))t.addValue(s,i);else if(qs(r))t.addValue(s,As(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const e=t.getValue(s);!0===e.liveStyle?e.jump(i):e.hasAnimated||e.set(i)}else{const e=t.getStaticValue(s);t.addValue(s,As(void 0!==e?e:i,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),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=As(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(o(n)||a(n))?n=parseFloat(n):!ks(n)&&kt.test(e)&&(n=Gn(t,e)),this.setBaseTarget(t,qs(n)?n.get():n)),qs(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const s=hi(this.props,e,this.presenceContext?.custom);s&&(n=s[t])}if(e&&void 0!==n)return n;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||qs(s)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new p),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Di extends Li{constructor(){super(...arguments),this.KeyframeResolver=_n}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;qs(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}const Ii={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Wi=Ue.length;function Ni(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const t in e){const n=e[t];if(Ye.has(t))o=!0;else if(Z(t))i[t]=n;else{const e=Ps(n,Xn[t]);t.startsWith("origin")?(a=!0,r[t]=e):s[t]=e}}if(e.transform||(o||n?s.transform=function(t,e,n){let s="",i=!0;for(let r=0;r<Wi;r++){const o=Ue[r],a=t[o];if(void 0===a)continue;let u=!0;if(u="number"==typeof a?a===(o.startsWith("scale")?1:0):0===parseFloat(a),!u||n){const t=Ps(a,Xn[o]);u||(i=!1,s+=`${Ii[o]||o}(${t}) `),n&&(e[o]=t)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=r;s.transformOrigin=`${t} ${e} ${n}`}}const ji={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ki={offset:"strokeDashoffset",array:"strokeDasharray"};function $i(t,e,n){return"string"==typeof t?t:ft.transform(e+n*t)}function zi(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:u=0,...l},c,h){if(Ni(t,l,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:f}=t;d.transform&&(f&&(p.transform=d.transform),delete d.transform),f&&(void 0!==i||void 0!==r||p.transform)&&(p.transformOrigin=function(t,e,n){return`${$i(e,t.x,t.width)} ${$i(n,t.y,t.height)}`}(f,void 0!==i?i:.5,void 0!==r?r:.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,i=!0){t.pathLength=1;const r=i?ji:Ki;t[r.offset]=ft.transform(-s);const o=ft.transform(e),a=ft.transform(n);t[r.array]=`${o} ${a}`}(d,o,a,u,!1)}const Ui=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 Yi(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const Xi={};function Hi(t,{layout:e,layoutId:n}){return Ye.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Xi[t]||"opacity"===t)}function qi(t,e,n){const{style:s}=t,i={};for(const r in s)(qs(s[r])||e.style&&qs(e.style[r])||Hi(r,t)||void 0!==n?.getValue(r)?.liveStyle)&&(i[r]=s[r]);return i}class Gi extends Di{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ai,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(Ye.has(e)){const t=qn(e);return t&&t.default||0}return e=Ui.has(e)?e:mi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=qi(t,e,n);for(const n in t)(qs(t[n])||qs(e[n]))&&(s[-1!==Ue.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){zi(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Yi(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Ui.has(n)?n:mi(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 Zi extends Di{constructor(){super(...arguments),this.type="html",this.renderInstance=Yi}readValueFromInstance(t,e){if(Ye.has(e))return $e(t,e);{const s=(n=t,window.getComputedStyle(n)),i=(Z(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return 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){Ni(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return qi(t,e,n)}}class _i extends Li{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 Ji(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 Gi(e):new Zi(e);n.mount(t),ui.set(t,n)}function Qi(t){const e=new _i({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),ui.set(t,e)}function tr(t,e,n,s){const i=[];if(function(t,e){return qs(t)||"number"==typeof t||"string"==typeof t&&!Gs(e)}(t,e))i.push(function(t,e,n){const s=qs(t)?t:As(t);return s.start(Si("",s,e,n)),s.animation}(t,Gs(e)&&e.default||e,n&&n.default||n));else{const r=Zs(t,e,s),o=r.length;for(let t=0;t<o;t++){const s=r[t],a=s instanceof Element?Ji:Qi;ui.has(s)||a(s);const u=ui.get(s),l={...n};"delay"in l&&"function"==typeof l.delay&&(l.delay=l.delay(t,o)),i.push(...Vi(u,{...e,transition:l},{}))}}return i}function er(t,e,n){const s=[],i=function(t,{defaultTransition:e={},...n}={},s,i){const r=e.duration||.3,o=new Map,a=new Map,u={},l=new Map;let c=0,h=0,p=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){l.set(o,h);continue}if(!Array.isArray(o)){l.set(o.name,Js(h,o.at,c,l));continue}let[d,m,g={}]=o;void 0!==g.at&&(h=Js(h,g.at,c,l));let y=0;const v=(t,n,s,o=0,a=0)=>{const u=ii(t),{delay:l=0,times:c=Te(u),type:d="keyframes",repeat:m,repeatType:g,repeatDelay:v=0,...w}=n;let{ease:b=e.ease||"easeOut",duration:T}=n;const x="function"==typeof l?l(o,a):l,S=u.length,M=mn(d)?d:i?.[d];if(S<=2&&M){let t=100;if(2===S&&ai(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...w};void 0!==T&&(e.duration=f(T));const n=Gt(e,t,M);b=n.ease,T=n.duration}T??(T=r);const V=h+x;1===c.length&&0===c[0]&&(c[1]=1);const A=c.length-u.length;if(A>0&&be(c,A),1===u.length&&u.unshift(null),m){T=_s(T,m);const t=[...u],e=[...c];b=Array.isArray(b)?[...b]:[b];const n=[...b];for(let s=0;s<m;s++){u.push(...t);for(let i=0;i<t.length;i++)c.push(e[i]+(s+1)),b.push(0===i?"linear":B(n,i-1))}ti(c,m)}const E=V+T;Qs(s,u,b,c,V,E),y=Math.max(x+T,y),p=Math.max(E,p)};if(qs(d))v(m,g,si("default",ni(d,a)));else{const t=Zs(d,m,s,u),e=t.length;for(let n=0;n<e;n++){const s=ni(t[n],a);for(const t in m)v(m[t],ri(g,t),si(t,s),n,e)}}c=h,h+=y}return a.forEach(((t,s)=>{for(const i in t){const r=t[i];r.sort(ei);const a=[],u=[],l=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:s}=r[t];a.push(n),u.push(d(0,p,e)),l.push(s||"easeOut")}0!==u[0]&&(u.unshift(0),a.unshift(a[0]),l.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),a.push(null)),o.has(s)||o.set(s,{keyframes:{},transition:{}});const c=o.get(s);c.keyframes[i]=a,c.transition[i]={...e,duration:p,ease:l,times:u,...n}}})),o}(t,e,n,{spring:ye});return i.forEach((({keyframes:t,transition:e},n)=>{s.push(...tr(n,t,e))})),s}function nr(t){return function(e,n,s){let i=[];var r;r=e,i=Array.isArray(r)&&r.some(Array.isArray)?er(e,n,t):tr(e,n,s,t);const o=new En(i);return t&&t.animations.push(o),o}}const sr=nr();const ir=t=>function(e,n,s){return new En(function(t,e,n,s){const i=os(t,s),r=i.length,o=[];for(let t=0;t<r;t++){const s=i[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,r));for(const t in e){let n=e[t];Array.isArray(n)||(n=[n]);const i={...Ln(a,t)};i.duration&&(i.duration=f(i.duration)),i.delay&&(i.delay=f(i.delay));const r=Fn(s),u=Cn(t,i.pseudoElement||""),l=r.get(u);l&&l.stop(),o.push({map:r,key:u,unresolvedKeyframes:n,options:{...i,element:s,name:t,allowFlatten:!a.type&&!a.ease}})}}for(let t=0;t<o.length;t++){const{unresolvedKeyframes:e,options:n}=o[t],{element:s,name:i,pseudoElement:r}=n;r||null!==e[0]||(e[0]=gs(s,i)),Oe(e),Qn(e,i),!r&&e.length<2&&e.unshift(gs(s,i)),n.keyframes=e}const a=[];for(let t=0;t<o.length;t++){const{map:e,key:n,options:s}=o[t],i=new yn(s);e.set(n,i),i.finished.finally((()=>e.delete(n))),a.push(i)}return a}(e,n,s,t))},rr=ir(),or=new WeakMap;let ar;function ur({target:t,contentRect:e,borderBoxSize:n}){or.get(t)?.forEach((s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})}))}function lr(t){t.forEach(ur)}function cr(t,e){ar||"undefined"!=typeof ResizeObserver&&(ar=new ResizeObserver(lr));const n=os(t);return n.forEach((t=>{let n=or.get(t);n||(n=new Set,or.set(t,n)),n.add(e),ar?.observe(t)})),()=>{n.forEach((t=>{const n=or.get(t);n?.delete(e),n?.size||ar?.unobserve(t)}))}}const hr=new Set;let dr;function pr(t){return hr.add(t),dr||(dr=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};hr.forEach((t=>t(e)))},window.addEventListener("resize",dr)),()=>{hr.delete(t),!hr.size&&dr&&(dr=void 0)}}const fr={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function mr(t,e,n,s){const i=n[e],{length:r,position:o}=fr[e],a=i.current,u=n.time;i.current=t[`scroll${o}`],i.scrollLength=t[`scroll${r}`]-t[`client${r}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=d(0,i.scrollLength,i.current);const l=s-u;i.velocity=l>50?0:g(i.current-a,l)}const gr={start:0,center:.5,end:1};function yr(t,e,n=0){let s=0;if(t in gr&&(t=gr[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?s=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?s=e/100*document.documentElement.clientWidth:t.endsWith("vh")?s=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(s=e*t),n+s}const vr=[0,0];function wr(t,e,n,s){let i=Array.isArray(t)?t:vr,r=0,o=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,gr[t]?t:"0"]),r=yr(i[0],n,s),o=yr(i[1],e),r-o}const br={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Tr={x:0,y:0};function xr(t,e,n){const{offset:i=br.All}=n,{target:r=t,axis:o="y"}=n,a="y"===o?"height":"width",u=r!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let i=null,r=s.parentNode;for(;!i;)"svg"===r.tagName&&(i=r),r=s.parentNode;s=i}}return n}(r,t):Tr,l=r===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(r),c={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let h=!e[o].interpolate;const d=i.length;for(let t=0;t<d;t++){const n=wr(i[t],c[a],l[a],u[o]);h||n===e[o].interpolatorOffsets[t]||(h=!0),e[o].offset[t]=n}h&&(e[o].interpolate=we(e[o].offset,Te(i),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=s(0,1,e[o].interpolate(e[o].current))}function Sr(t,e,n,s={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,s.target,n),update:e=>{!function(t,e,n){mr(t,"x",e,n),mr(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&xr(t,n,s)},notify:()=>e(n)}}const Mr=new WeakMap,Vr=new WeakMap,Ar=new WeakMap,Er=t=>t===document.documentElement?window:t;function kr(t,{container:e=document.documentElement,...n}={}){let s=Ar.get(e);s||(s=new Set,Ar.set(e,s));const i=Sr(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(s.add(i),!Mr.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(z.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{K.read(t,!1,!0),K.read(n,!1,!0),K.update(i,!1,!0)};Mr.set(e,a);const u=Er(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Vr.set(e,(o=a,"function"==typeof(r=e)?pr(r):cr(r,o))),u.addEventListener("scroll",a,{passive:!0})}var r,o;const a=Mr.get(e);return K.read(a,!1,!0),()=>{$(a);const t=Ar.get(e);if(!t)return;if(t.delete(i),t.size)return;const n=Mr.get(e);Mr.delete(e),n&&(Er(e).removeEventListener("scroll",n),Vr.get(e)?.(),window.removeEventListener("resize",n))}}const Pr=new Map;function Cr({source:t,container:e,...n}){const{axis:s}=n;t&&(e=t),Pr.has(e)||Pr.set(e,{});const i=Pr.get(e);return i[s]||(i[s]=an()?new ScrollTimeline({source:e,axis:s}):function(t){const e={value:0},n=kr((n=>{e.value=100*n[t.axis].progress}),t);return{currentTime:e,cancel:n}}({container:e,...n})),i[s]}const Fr={some:0,all:1};const Or=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=Vn,t.DOMKeyframesResolver=_n,t.GroupAnimation=An,t.GroupAnimationWithThen=En,t.JSAnimation=Fe,t.KeyframeResolver=sn,t.MotionGlobalConfig=r,t.MotionValue=Vs,t.NativeAnimation=yn,t.NativeAnimationExtended=bn,t.NativeAnimationWrapper=kn,t.SubscriptionManager=p,t.ViewTransitionBuilder=Ys,t.acceleratedValues=es,t.activeAnimations=q,t.addUniqueItem=e,t.alpha=et,t.analyseComplexValue=Mt,t.animate=sr,t.animateMini=rr,t.animateValue=function(t){return new Fe(t)},t.animateView=function(t,e={}){return new Ys(t,e)},t.animationMapKey=Cn,t.anticipate=A,t.applyPxDefaults=Qn,t.backIn=M,t.backInOut=V,t.backOut=S,t.calcGeneratorDuration=qt,t.cancelFrame=$,t.cancelMicrotask=ss,t.cancelSync=Hs,t.circIn=E,t.circInOut=P,t.circOut=k,t.clamp=s,t.collectMotionValues=Ms,t.color=wt,t.complex=kt,t.convertOffsetToTimes=xe,t.createGeneratorEasing=Gt,t.createRenderBatcher=j,t.createScopedAnimate=nr,t.cubicBezier=b,t.cubicBezierAsString=hn,t.defaultEasing=Se,t.defaultOffset=Te,t.defaultValueTypes=Hn,t.degrees=dt,t.delay=function(t,e){return function(t,e){const n=H.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&($(s),t(r-e))};return K.setup(s,!0),()=>$(s)}(t,f(e))},t.dimensionValueTypes=Wn,t.distance=Or,t.distance2D=function(t,e){const n=Or(t.x,e.x),s=Or(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=C,t.easeInOut=O,t.easeOut=F,t.easingDefinitionToFunction=I,t.fillOffset=be,t.fillWildcards=Oe,t.findDimensionValueType=Nn,t.findValueType=ks,t.flushKeyframeResolvers=nn,t.frame=K,t.frameData=z,t.frameSteps=U,t.generateLinearEasing=Xt,t.getAnimatableNone=Gn,t.getAnimationMap=Fn,t.getComputedStyle=gs,t.getDefaultValueType=qn,t.getEasingForSegment=B,t.getMixer=jt,t.getValueAsType=Ps,t.getValueTransition=Ln,t.getVariableValue=Bn,t.hasWarned=function(t){return y.has(t)},t.hex=ct,t.hover=function(t,e,n={}){const[s,i,r]=as(t,n),o=t=>{if(!us(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const r=t=>{us(t)&&(s(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,i)};return s.forEach((t=>{t.addEventListener("pointerenter",o,i)})),r},t.hsla=vt,t.hslaToRgba=Ct,t.inView=function(t,e,{root:n,margin:s,amount:i="some"}={}){const r=os(t),o=new WeakMap,a=new IntersectionObserver((t=>{t.forEach((t=>{const n=o.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),o.delete(t.target))}))}),{root:n,rootMargin:s,threshold:"number"==typeof i?i:Fr[i]});return r.forEach((t=>a.observe(t))),()=>a.disconnect()},t.inertia=ve,t.interpolate=we,t.invariant=i,t.invisibleValues=It,t.isBezierDefinition=L,t.isCSSVariableName=Z,t.isCSSVariableToken=J,t.isDragActive=rs,t.isDragging=is,t.isEasingArray=R,t.isGenerator=mn,t.isNodeOrChild=ls,t.isNumericalString=o,t.isPrimaryPointer=cs,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&cn()||!e||"string"==typeof e&&(e in dn||cn())||L(e)||Array.isArray(e)&&e.every(t))},t.isZeroValueString=a,t.keyframes=Me,t.mapEasingToNativeEasing=pn,t.maxGeneratorDuration=Ht,t.memo=u,t.microtask=ns,t.millisecondsToSeconds=m,t.mirrorEasing=T,t.mix=Ut,t.mixArray=Kt,t.mixColor=Dt,t.mixComplex=zt,t.mixImmediate=Ft,t.mixLinearColor=Rt,t.mixNumber=Ot,t.mixObject=$t,t.mixVisibility=Wt,t.motionValue=As,t.moveItem=function([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const s=n<0?t.length+n:n,[i]=t.splice(e,1);t.splice(s,0,i)}return t},t.noop=l,t.number=tt,t.numberValueTypes=Xn,t.observeTimeline=ys,t.parseCSSVariable=Rn,t.parseValueFromTransform=Ke,t.percent=pt,t.pipe=h,t.positionalKeys=Dn,t.press=function(t,e,n={}){const[s,i,r]=as(t,n),o=t=>{const s=t.currentTarget;if(!ms(t)||ds.has(s))return;ds.add(s);const r=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",u),ms(t)&&ds.has(s)&&(ds.delete(s),"function"==typeof r&&r(t,{success:e}))},a=t=>{o(t,s===window||s===document||n.useGlobalTarget||ls(s,t.target))},u=t=>{o(t,!1)};window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",u,i)};return s.forEach((t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,i),t instanceof HTMLElement&&(t.addEventListener("focus",(t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=ps((()=>{if(ds.has(n))return;fs(n,"down");const t=ps((()=>{fs(n,"up")}));n.addEventListener("keyup",t,e),n.addEventListener("blur",(()=>fs(n,"cancel")),e)}));n.addEventListener("keydown",s,e),n.addEventListener("blur",(()=>n.removeEventListener("keydown",s)),e)})(t,i))),e=t,hs.has(e.tagName)||-1!==e.tabIndex||t.hasAttribute("tabindex")||(t.tabIndex=0))})),r},t.progress=d,t.progressPercentage=yt,t.px=ft,t.readTransformValue=$e,t.recordStats=function(){if(N.value)throw xs(),new Error("Stats are already being measured");const t=N;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},K.postRender(vs,!0),Ss},t.removeItem=n,t.resolveElements=os,t.reverseEasing=x,t.rgbUnit=ut,t.rgba=lt,t.scale=nt,t.scroll=function(t,{axis:e="y",container:n=document.documentElement,...s}={}){const i={axis:e,container:n,...s};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?kr((n=>{t(n[e.axis].progress,n)}),e):ys(t,Cr(e))}(t,i):function(t,e){const n=Cr(e);return t.attachTimeline({timeline:n,observe:t=>(t.pause(),ys((e=>{t.time=t.duration*e}),n))})}(t,i)},t.scrollInfo=kr,t.secondsToMilliseconds=f,t.setDragLock=function(t){return"x"===t||"y"===t?is[t]?null:(is[t]=!0,()=>{is[t]=!1}):is.x||is.y?null:(is.x=is.y=!0,()=>{is.x=is.y=!1})},t.setStyle=on,t.spring=ye,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,r)=>{const o="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,r),a=Math.abs(o-i);let u=t*a;if(s){const e=r*t;u=I(s)(u/e)*e}return e+u}},t.startWaapiAnimation=fn,t.statsBuffer=N,t.steps=function(t,e="end"){return n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,r="end"===e?Math.floor(i):Math.ceil(i);return s(0,1,r/t)}},t.supportedWaapiEasing=dn,t.supportsBrowserAnimation=Mn,t.supportsFlags=un,t.supportsLinearEasing=cn,t.supportsPartialKeyframes=ts,t.supportsScrollTimeline=an,t.sync=Xs,t.testValueType=In,t.time=H,t.transform=function(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],r=t[2+n],o=t[3+n],a=we(i,r,{mixer:(u=r[0],(t=>t&&"object"==typeof t&&t.mix)(u)?u.mix:void 0),...o});var u;return e?a(s):a},t.transformPropOrder=Ue,t.transformProps=Ye,t.transformValueTypes=Yn,t.velocityPerSecond=g,t.vh=mt,t.vw=gt,t.warnOnce=function(t,e,n){t||y.has(e)||(console.warn(e),n&&console.warn(n),y.add(e))},t.warning=()=>{},t.wrap=v}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "motion",
3
- "version": "12.7.4",
3
+ "version": "12.7.5-alpha.0",
4
4
  "description": "An animation library for JavaScript and React.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/motion/lib/index.mjs",
@@ -76,7 +76,7 @@
76
76
  "postpublish": "git push --tags"
77
77
  },
78
78
  "dependencies": {
79
- "framer-motion": "^12.7.4",
79
+ "framer-motion": "^12.7.5-alpha.0",
80
80
  "tslib": "^2.4.0"
81
81
  },
82
82
  "peerDependencies": {
@@ -95,5 +95,5 @@
95
95
  "optional": true
96
96
  }
97
97
  },
98
- "gitHead": "2e0e2412223bbaa7442e0ffcefb523bf9657807e"
98
+ "gitHead": "187bd70fe43313377c136d91b04f6aba6cfbd37a"
99
99
  }