motion 12.0.0-alpha.2 → 12.0.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 (157) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +7 -24
  3. package/dist/cjs/index.js +2792 -2446
  4. package/dist/cjs/mini.js +629 -193
  5. package/dist/cjs/react-client.js +3624 -3434
  6. package/dist/cjs/react-m.js +397 -351
  7. package/dist/cjs/react-mini.js +225 -191
  8. package/dist/es/framer-motion/dist/es/animation/animate/index.mjs +3 -2
  9. package/dist/es/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +2 -1
  10. package/dist/es/framer-motion/dist/es/animation/animate/single-value.mjs +1 -1
  11. package/dist/es/framer-motion/dist/es/animation/animate/subject.mjs +1 -1
  12. package/dist/es/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +16 -12
  13. package/dist/es/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +3 -2
  14. package/dist/es/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +10 -10
  15. package/dist/es/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +2 -2
  16. package/dist/es/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +30 -89
  17. package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +4 -4
  18. package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-sequence.mjs +14 -0
  19. package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +2 -1
  20. package/dist/es/framer-motion/dist/es/animation/animators/waapi/index.mjs +2 -1
  21. package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs +2 -1
  22. package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +2 -1
  23. package/dist/es/framer-motion/dist/es/animation/generators/spring/defaults.mjs +27 -0
  24. package/dist/es/framer-motion/dist/es/animation/generators/spring/find.mjs +10 -13
  25. package/dist/es/framer-motion/dist/es/animation/generators/spring/index.mjs +57 -18
  26. package/dist/es/framer-motion/dist/es/animation/hooks/animation-controls.mjs +1 -1
  27. package/dist/es/framer-motion/dist/es/animation/interfaces/motion-value.mjs +7 -6
  28. package/dist/es/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +6 -5
  29. package/dist/es/framer-motion/dist/es/animation/optimized-appear/start.mjs +2 -1
  30. package/dist/es/framer-motion/dist/es/animation/optimized-appear/store-id.mjs +1 -1
  31. package/dist/es/framer-motion/dist/es/animation/sequence/create.mjs +32 -6
  32. package/dist/es/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +5 -0
  33. package/dist/es/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +13 -0
  34. package/dist/es/framer-motion/dist/es/animation/utils/default-transitions.mjs +1 -1
  35. package/dist/es/framer-motion/dist/es/components/AnimatePresence/index.mjs +10 -7
  36. package/dist/es/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs +6 -3
  37. package/dist/es/framer-motion/dist/es/components/AnimateSharedLayout.mjs +1 -1
  38. package/dist/es/framer-motion/dist/es/components/Reorder/Group.mjs +1 -1
  39. package/dist/es/framer-motion/dist/es/components/Reorder/Item.mjs +1 -1
  40. package/dist/es/framer-motion/dist/es/easing/cubic-bezier.mjs +2 -1
  41. package/dist/es/framer-motion/dist/es/easing/utils/map.mjs +6 -6
  42. package/dist/es/framer-motion/dist/es/events/event-info.mjs +5 -4
  43. package/dist/es/framer-motion/dist/es/frameloop/frame.mjs +2 -1
  44. package/dist/es/framer-motion/dist/es/frameloop/render-step.mjs +3 -2
  45. package/dist/es/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs +12 -15
  46. package/dist/es/framer-motion/dist/es/gestures/drag/index.mjs +2 -1
  47. package/dist/es/framer-motion/dist/es/gestures/drag/utils/constraints.mjs +2 -1
  48. package/dist/es/framer-motion/dist/es/gestures/hover.mjs +20 -22
  49. package/dist/es/framer-motion/dist/es/gestures/pan/PanSession.mjs +6 -5
  50. package/dist/es/framer-motion/dist/es/gestures/pan/index.mjs +2 -1
  51. package/dist/es/framer-motion/dist/es/gestures/press.mjs +20 -119
  52. package/dist/es/framer-motion/dist/es/motion/index.mjs +11 -7
  53. package/dist/es/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +1 -1
  54. package/dist/es/framer-motion/dist/es/motion/utils/use-motion-ref.mjs +3 -1
  55. package/dist/es/framer-motion/dist/es/motion/utils/use-visual-element.mjs +1 -1
  56. package/dist/es/framer-motion/dist/es/motion/utils/use-visual-state.mjs +11 -5
  57. package/dist/es/framer-motion/dist/es/projection/animation/mix-values.mjs +3 -2
  58. package/dist/es/framer-motion/dist/es/projection/node/create-projection-node.mjs +15 -14
  59. package/dist/es/framer-motion/dist/es/render/VisualElement.mjs +15 -13
  60. package/dist/es/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +4 -3
  61. package/dist/es/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +15 -0
  62. package/dist/es/framer-motion/dist/es/render/dom/resize/handle-element.mjs +2 -1
  63. package/dist/es/framer-motion/dist/es/render/dom/scroll/index.mjs +4 -4
  64. package/dist/es/framer-motion/dist/es/render/dom/scroll/info.mjs +2 -1
  65. package/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +6 -5
  66. package/dist/es/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +1 -1
  67. package/dist/es/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +2 -14
  68. package/dist/es/framer-motion/dist/es/render/dom/viewport/index.mjs +4 -3
  69. package/dist/es/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +6 -20
  70. package/dist/es/framer-motion/dist/es/render/html/utils/build-styles.mjs +2 -2
  71. package/dist/es/framer-motion/dist/es/render/html/utils/build-transform.mjs +1 -1
  72. package/dist/es/framer-motion/dist/es/render/html/utils/keys-position.mjs +13 -0
  73. package/dist/es/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +6 -6
  74. package/dist/es/framer-motion/dist/es/render/svg/config-motion.mjs +57 -24
  75. package/dist/es/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +1 -1
  76. package/dist/es/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +1 -1
  77. package/dist/es/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
  78. package/dist/es/framer-motion/dist/es/utils/delay.mjs +2 -1
  79. package/dist/es/framer-motion/dist/es/utils/get-context-window.mjs +1 -1
  80. package/dist/es/framer-motion/dist/es/utils/interpolate.mjs +8 -5
  81. package/dist/es/framer-motion/dist/es/utils/mix/color.mjs +1 -1
  82. package/dist/es/framer-motion/dist/es/utils/mix/complex.mjs +1 -1
  83. package/dist/es/framer-motion/dist/es/utils/offsets/fill.mjs +2 -1
  84. package/dist/es/framer-motion/dist/es/utils/use-instant-transition.mjs +1 -1
  85. package/dist/es/framer-motion/dist/es/value/index.mjs +2 -2
  86. package/dist/es/framer-motion/dist/es/value/use-inverted-scale.mjs +1 -1
  87. package/dist/es/framer-motion/dist/es/value/use-scroll.mjs +1 -1
  88. package/dist/es/framer-motion/dist/es/value/use-spring.mjs +3 -3
  89. package/dist/es/framer-motion/dist/es/value/use-will-change/get-will-change-name.mjs +1 -1
  90. package/dist/es/motion/lib/index.mjs +12 -7
  91. package/dist/es/motion/lib/mini.mjs +1 -0
  92. package/dist/es/motion/lib/react.mjs +41 -37
  93. package/dist/es/{framer-motion/dist/es/animation/GroupPlaybackControls.mjs → motion-dom/dist/es/animation/controls/BaseGroup.mjs} +7 -6
  94. package/dist/es/motion-dom/dist/es/animation/controls/Group.mjs +13 -0
  95. package/dist/es/{framer-motion/dist/es/easing → motion-dom/dist/es/animation/generators}/utils/create-generator-easing.mjs +6 -3
  96. package/dist/es/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs +85 -0
  97. package/dist/es/{framer-motion/dist/es/animation/animators/waapi → motion-dom/dist/es/animation/waapi/utils}/easing.mjs +3 -3
  98. package/dist/es/{framer-motion/dist/es/animation/animators → motion-dom/dist/es/animation}/waapi/utils/linear.mjs +4 -4
  99. package/dist/es/motion-dom/dist/es/gestures/drag/state/is-active.mjs +9 -0
  100. package/dist/es/motion-dom/dist/es/gestures/drag/state/set-active.mjs +28 -0
  101. package/dist/es/motion-dom/dist/es/gestures/hover.mjs +37 -0
  102. package/dist/es/motion-dom/dist/es/gestures/press/index.mjs +76 -0
  103. package/dist/es/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +13 -0
  104. package/dist/es/motion-dom/dist/es/gestures/press/utils/keyboard.mjs +38 -0
  105. package/dist/es/motion-dom/dist/es/gestures/press/utils/state.mjs +3 -0
  106. package/dist/es/motion-dom/dist/es/gestures/utils/setup.mjs +15 -0
  107. package/dist/es/motion-dom/dist/es/utils/resolve-elements.mjs +22 -0
  108. package/dist/es/{framer-motion/dist/es/animation/animators/waapi/utils/supports-linear-easing.mjs → motion-dom/dist/es/utils/supports/linear-easing.mjs} +1 -1
  109. package/dist/es/{framer-motion/dist/es/animation/animators/waapi/utils/memo-supports.mjs → motion-dom/dist/es/utils/supports/memo.mjs} +3 -2
  110. package/dist/es/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +6 -0
  111. package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/memo.mjs +1 -0
  112. package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/noop.mjs +1 -0
  113. package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/progress.mjs +1 -0
  114. package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/time-conversion.mjs +2 -0
  115. package/dist/motion.dev.js +2792 -2446
  116. package/dist/motion.js +1 -1
  117. package/package.json +6 -6
  118. package/.turbo/turbo-build.log +0 -47
  119. package/dist/es/framer-motion/dist/es/gestures/drag/utils/lock.mjs +0 -53
  120. package/dist/es/framer-motion/dist/es/render/dom/scroll/supports.mjs +0 -5
  121. package/dist/es/framer-motion/dist/es/render/dom/utils/resolve-element.mjs +0 -28
  122. package/lib/index.js +0 -2
  123. package/lib/index.js.map +0 -1
  124. package/lib/mini.js +0 -2
  125. package/lib/mini.js.map +0 -1
  126. package/lib/react-client.js +0 -3
  127. package/lib/react-client.js.map +0 -1
  128. package/lib/react-m.js +0 -3
  129. package/lib/react-m.js.map +0 -1
  130. package/lib/react-mini.js +0 -3
  131. package/lib/react-mini.js.map +0 -1
  132. package/lib/react.js +0 -3
  133. package/lib/react.js.map +0 -1
  134. package/rollup.config.mjs +0 -210
  135. package/src/index.ts +0 -1
  136. package/src/mini.ts +0 -1
  137. package/src/react-client.ts +0 -3
  138. package/src/react-m.ts +0 -3
  139. package/src/react-mini.ts +0 -3
  140. package/src/react.ts +0 -3
  141. package/tsconfig.json +0 -25
  142. package/types/index.d.ts +0 -1
  143. package/types/mini.d.ts +0 -1
  144. package/types/react-client.d.ts +0 -1
  145. package/types/react-m.d.ts +0 -1
  146. package/types/react-mini.d.ts +0 -1
  147. package/types/react.d.ts +0 -1
  148. /package/dist/es/framer-motion/dist/es/render/html/utils/{transform.mjs → keys-transform.mjs} +0 -0
  149. /package/dist/es/{framer-motion → motion-dom}/dist/es/animation/generators/utils/calc-duration.mjs +0 -0
  150. /package/dist/es/{framer-motion → motion-dom}/dist/es/animation/generators/utils/is-generator.mjs +0 -0
  151. /package/dist/es/{framer-motion → motion-dom}/dist/es/animation/utils/get-value-transition.mjs +0 -0
  152. /package/dist/es/{framer-motion/dist/es/animation/animators → motion-dom/dist/es/animation}/waapi/utils/attach-timeline.mjs +0 -0
  153. /package/dist/es/{framer-motion → motion-dom}/dist/es/gestures/utils/is-node-or-child.mjs +0 -0
  154. /package/dist/es/{framer-motion/dist/es/events → motion-dom/dist/es/gestures}/utils/is-primary-pointer.mjs +0 -0
  155. /package/dist/es/{framer-motion/dist/es/easing → motion-dom/dist/es}/utils/is-bezier-definition.mjs +0 -0
  156. /package/dist/es/{framer-motion/dist/es/animation/animators/waapi/utils/supports-flags.mjs → motion-dom/dist/es/utils/supports/flags.mjs} +0 -0
  157. /package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/errors.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)}class n{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 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}}function s(t,e){return e?t*(1e3/e):0}const i=!1,r=t=>t;const o=["read","resolveKeyframes","update","preRender","render","postRender"];const{schedule:a,cancel:l,state:u,steps:c}=function(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=o.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(e){r.has(e)&&(l.schedule(e),t()),e(o)}const l={schedule:(t,i=!1,o=!1)=>{const a=o&&s?e:n;return i&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),r.delete(t)},process:t=>{o=t,s?i=!0:(s=!0,[e,n]=[n,e],n.clear(),e.forEach(a),s=!1,i&&(i=!1,l.process(t)))}};return l}(r),t),{}),{read:l,resolveKeyframes:u,update:c,preRender:h,render:d,postRender:p}=a,f=()=>{const r=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(r-i.timestamp,40),1),i.timestamp=r,i.isProcessing=!0,l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(f))};return{schedule:o.reduce((e,r)=>{const o=a[r];return e[r]=(e,r=!1,a=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(f)),o.schedule(e,r,a)),e},{}),cancel:t=>{for(let e=0;e<o.length;e++)a[o[e]].cancel(t)},state:i,steps:a}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:r,!0);let h;function d(){h=void 0}const p={now:()=>(void 0===h&&p.set(u.isProcessing||i?u.timestamp:performance.now()),h),set:t=>{h=t,queueMicrotask(d)}};class f{constructor(t,e={}){this.version="12.0.0-alpha.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=p.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=p.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 n);const s=this.events[t].add(e);return"change"===t?()=>{s(),a.read(()=>{this.events.change.getSize()||this.stop()})}:s}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=p.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return s(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function m(t,e){return new f(t,e)}function g(t){let e;return()=>(void 0===e&&(e=t()),e)}const y=g(()=>void 0!==window.ScrollTimeline);class v{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map(n=>y()&&n.attachTimeline?n.attachTimeline(t):e(n));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")}}const w=t=>1e3*t,b=t=>t/1e3;function T(t,e,n){const i=Math.max(e-5,0);return s(n-t(i),e-i)}let x=r,S=r;const V=(t,e,n)=>n>e?e:n<t?t:n;function A({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,r,o=1-e;o=V(.05,1,o),t=V(.01,10,b(t)),o<1?(i=e=>{const s=e*o,i=s*t;return.001-(s-n)/M(e,o)*Math.exp(-i)},r=e=>{const s=e*o*t,r=s*n+n,a=Math.pow(o,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=M(Math.pow(e,2),o);return(.001-i(e)>0?-1:1)*((r-a)*l)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(i,r,5/t);if(t=w(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:t}}}function M(t,e){return t*Math.sqrt(1-e*e)}const P=["duration","bounce"],k=["stiffness","damping","mass"];function F(t,e){return e.some(e=>void 0!==t[e])}function C({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],r=t[t.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!F(t,k)&&F(t,P)){const n=A(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...s,velocity:-b(s.velocity||0)}),p=h||0,f=l/(2*Math.sqrt(a*u)),m=r-i,g=b(Math.sqrt(a/u)),y=Math.abs(m)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),f<1){const t=M(g,f);v=e=>{const n=Math.exp(-f*g*e);return r-n*((p+f*g*m)/t*Math.sin(t*e)+m*Math.cos(t*e))}}else if(1===f)v=t=>r-Math.exp(-g*t)*(m+(p+g*m)*t);else{const t=g*Math.sqrt(f*f-1);v=e=>{const n=Math.exp(-f*g*e),s=Math.min(t*e,300);return r-n*((p+f*g*m)*Math.sinh(s)+t*m*Math.cosh(s))/t}}return{calculatedDuration:d&&c||null,next:t=>{const s=v(t);if(d)o.done=t>=c;else{let i=0;f<1&&(i=0===t?w(p):T(v,t,s));const a=Math.abs(i)<=n,l=Math.abs(r-s)<=e;o.done=a&&l}return o.value=o.done?r:s,o}}}function E(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}function O(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(E(s),2e4);return{type:"keyframes",ease:t=>s.next(i*t).value/e,duration:b(i)}}const I=(t,e,n)=>t+(e-t)*n,R=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s};function B(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=R(0,e,s);t.push(I(n,1,i))}}function L(t){const e=[0];return B(e,t.length-1),e}const W=t=>Boolean(t&&t.getVelocity);function D(t,e,n){var s;if("string"==typeof t){let i=document;e&&(S(Boolean(e.current)),i=e.current),n?(null!==(s=n[t])&&void 0!==s||(n[t]=i.querySelectorAll(t)),t=n[t]):t=i.querySelectorAll(t)}else t instanceof Element&&(t=[t]);return Array.from(t||[])}function N(t){return"object"==typeof t&&!Array.isArray(t)}function K(t,e,n,s){return"string"==typeof t&&N(e)?D(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function j(t){return"function"==typeof t}function z(t,e,n,s){var i;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(i=s.get(e))&&void 0!==i?i:t}const $=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},H=t=>Array.isArray(t)&&"number"!=typeof t[0];function U(t,e){return H(t)?t[$(0,t.length,e)]:t}function Y(t,n,s,i,r,o){!function(t,n,s){for(let i=0;i<t.length;i++){const r=t[i];r.at>n&&r.at<s&&(e(t,r),i--)}}(t,r,o);for(let e=0;e<n.length;e++)t.push({value:n[e],at:I(r,o,i[e]),easing:U(s,e)})}function q(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function X(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function G(t,e){return e[t]||(e[t]=[]),e[t]}function Z(t){return Array.isArray(t)?t:[t]}function _(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const J=t=>"number"==typeof t,Q=t=>t.every(J),tt=new WeakMap,et=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],nt=new Set(et),st={type:"spring",stiffness:500,damping:25,restSpeed:10},it={type:"keyframes",duration:.8},rt={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ot=(t,{keyframes:e})=>e.length>2?it:nt.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:st:rt;function at(t,e){return t?t[e]||t.default||t:void 0}const lt=t=>null!==t;function ut(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(lt),r=e&&"loop"!==n&&e%2==1?0:i.length-1;return r&&void 0!==s?s:i[r]}const ct=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function ht(t,e,n,s){if(t===e&&n===s)return r;const i=e=>function(t,e,n,s,i){let r,o,a=0;do{o=e+(n-e)/2,r=ct(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:ct(i(t),e,s)}const dt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,pt=t=>e=>1-t(1-e),ft=ht(.33,1.53,.69,.99),mt=pt(ft),gt=dt(mt),yt=t=>(t*=2)<1?.5*mt(t):.5*(2-Math.pow(2,-10*(t-1))),vt=t=>1-Math.sin(Math.acos(t)),wt=pt(vt),bt=dt(vt),Tt=t=>/^0[^.\s]+$/u.test(t);const xt=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),St=t=>e=>"string"==typeof e&&e.startsWith(t),Vt=St("--"),At=St("var(--"),Mt=t=>!!At(t)&&Pt.test(t.split("/*")[0].trim()),Pt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,kt=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ft(t,e,n=1){const[s,i]=function(t){const e=kt.exec(t);if(!e)return[,];const[,n,s,i]=e;return["--"+(null!=n?n:s),i]}(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const t=r.trim();return xt(t)?parseFloat(t):t}return Mt(i)?Ft(i,e,n+1):i}const Ct={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Et={...Ct,transform:t=>V(0,1,t)},Ot={...Ct,default:1},It=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),Rt=It("deg"),Bt=It("%"),Lt=It("px"),Wt=It("vh"),Dt=It("vw"),Nt={...Bt,parse:t=>Bt.parse(t)/100,transform:t=>Bt.transform(100*t)},Kt=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),jt=t=>t===Ct||t===Lt,zt=(t,e)=>parseFloat(t.split(", ")[e]),$t=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return zt(i[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?zt(e[1],t):0}},Ht=new Set(["x","y","z"]),Ut=et.filter(t=>!Ht.has(t));const Yt={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(4,13),y:$t(5,14)};Yt.translateX=Yt.x,Yt.translateY=Yt.y;const qt=t=>e=>e.test(t),Xt=[Ct,Lt,Bt,Rt,Dt,Wt,{test:t=>"auto"===t,parse:t=>t}],Gt=t=>Xt.find(qt(t)),Zt=new Set;let _t=!1,Jt=!1;function Qt(){if(Jt){const t=Array.from(Zt).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 Ut.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{var s;null===(s=t.getValue(e))||void 0===s||s.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Jt=!1,_t=!1,Zt.forEach(t=>t.complete()),Zt.clear()}function te(){Zt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Jt=!0)})}class ee{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?(Zt.add(this),_t||(_t=!0,a.read(te),a.resolveKeyframes(Qt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let i=0;i<t.length;i++)if(null===t[i])if(0===i){const i=null==s?void 0:s.get(),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])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Zt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Zt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ne=t=>Math.round(1e5*t)/1e5,se=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const ie=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,re=(t,e)=>n=>Boolean("string"==typeof n&&ie.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),oe=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[i,r,o,a]=s.match(se);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},ae={...Ct,transform:t=>Math.round((t=>V(0,255,t))(t))},le={test:re("rgb","red"),parse:oe("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ae.transform(t)+", "+ae.transform(e)+", "+ae.transform(n)+", "+ne(Et.transform(s))+")"};const ue={test:re("#"),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:le.transform},ce={test:re("hsl","hue"),parse:oe("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Bt.transform(ne(e))+", "+Bt.transform(ne(n))+", "+ne(Et.transform(s))+")"},he={test:t=>le.test(t)||ue.test(t)||ce.test(t),parse:t=>le.test(t)?le.parse(t):ce.test(t)?ce.parse(t):ue.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?le.transform(t):ce.transform(t)},de=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const pe=/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 fe(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const o=e.replace(pe,t=>(he.test(t)?(s.color.push(r),i.push("color"),n.push(he.parse(t))):t.startsWith("var(")?(s.var.push(r),i.push("var"),n.push(t)):(s.number.push(r),i.push("number"),n.push(parseFloat(t))),++r,"${}")).split("${}");return{values:n,split:o,indexes:s,types:i}}function me(t){return fe(t).values}function ge(t){const{split:e,types:n}=fe(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+="number"===e?ne(t[r]):"color"===e?he.transform(t[r]):t[r]}return i}}const ye=t=>"number"==typeof t?0:t;const ve={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(se))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(de))||void 0===n?void 0:n.length)||0)>0},parse:me,createTransformer:ge,getAnimatableNone:function(t){const e=me(t);return ge(t)(e.map(ye))}},we=new Set(["brightness","contrast","saturate","opacity"]);function be(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(se)||[];if(!s)return t;const i=n.replace(s,"");let r=we.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Te=/\b([a-z-]*)\(.*?\)/gu,xe={...ve,getAnimatableNone:t=>{const e=t.match(Te);return e?e.map(be).join(" "):t}},Se={borderWidth:Lt,borderTopWidth:Lt,borderRightWidth:Lt,borderBottomWidth:Lt,borderLeftWidth:Lt,borderRadius:Lt,radius:Lt,borderTopLeftRadius:Lt,borderTopRightRadius:Lt,borderBottomRightRadius:Lt,borderBottomLeftRadius:Lt,width:Lt,maxWidth:Lt,height:Lt,maxHeight:Lt,top:Lt,right:Lt,bottom:Lt,left:Lt,padding:Lt,paddingTop:Lt,paddingRight:Lt,paddingBottom:Lt,paddingLeft:Lt,margin:Lt,marginTop:Lt,marginRight:Lt,marginBottom:Lt,marginLeft:Lt,backgroundPositionX:Lt,backgroundPositionY:Lt},Ve={rotate:Rt,rotateX:Rt,rotateY:Rt,rotateZ:Rt,scale:Ot,scaleX:Ot,scaleY:Ot,scaleZ:Ot,skew:Rt,skewX:Rt,skewY:Rt,distance:Lt,translateX:Lt,translateY:Lt,translateZ:Lt,x:Lt,y:Lt,z:Lt,perspective:Lt,transformPerspective:Lt,opacity:Et,originX:Nt,originY:Nt,originZ:Lt},Ae={...Ct,transform:Math.round},Me={...Se,...Ve,zIndex:Ae,size:Lt,fillOpacity:Et,strokeOpacity:Et,numOctaves:Ae},Pe={...Me,color:he,backgroundColor:he,outlineColor:he,fill:he,stroke:he,borderColor:he,borderTopColor:he,borderRightColor:he,borderBottomColor:he,borderLeftColor:he,filter:xe,WebkitFilter:xe},ke=t=>Pe[t];function Fe(t,e){let n=ke(t);return n!==xe&&(n=ve),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ce=new Set(["auto","none","0"]);class Ee extends ee{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(),Mt(s))){const i=Ft(s,e.current);void 0!==i&&(t[n]=i),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!Kt.has(n)||2!==t.length)return;const[s,i]=t,r=Gt(s),o=Gt(i);if(r!==o)if(jt(r)&&jt(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||Tt(s))&&n.push(e);var s;n.length&&function(t,e,n){let s=0,i=void 0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Ce.has(e)&&fe(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=Fe(n,i)}(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=Yt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=Yt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const Oe=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!ve.test(t)&&"0"!==t||t.startsWith("url(")));function Ie(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=Oe(i,e),a=Oe(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||j(n))&&s)}class Re{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=p.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:r,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(te(),Qt()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=p.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:i,delay:r,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!Ie(t,n,s,i)){if(!r)return null==a||a(ut(t,this.options,e)),null==o||o(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Be({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<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,x;const S=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,x=C({keyframes:[d.value,p(d.value)],velocity:T(v,t,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return x||void 0!==b||(e=!0,w(t),S(t)),void 0!==b&&t>=b?x.next(t-b):(!e&&w(t),d)}}}const Le=ht(.42,0,1,1),We=ht(0,0,.58,1),De=ht(.42,0,.58,1),Ne=t=>Array.isArray(t)&&"number"==typeof t[0],Ke={linear:r,easeIn:Le,easeInOut:De,easeOut:We,circIn:vt,circInOut:bt,circOut:wt,backIn:mt,backInOut:gt,backOut:ft,anticipate:yt},je=t=>{if(Ne(t)){S(4===t.length);const[e,n,s,i]=t;return ht(e,n,s,i)}return"string"==typeof t?Ke[t]:t},ze=(t,e)=>n=>e(t(n)),$e=(...t)=>t.reduce(ze);function He(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 Ue(t,e){return n=>n>0?e:t}const Ye=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},qe=[ue,le,ce];function Xe(t){const e=(n=t,qe.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===ce&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let 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=He(a,s,t+1/3),r=He(a,s,t),o=He(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}}(s)),s}const Ge=(t,e)=>{const n=Xe(t),s=Xe(e);if(!n||!s)return Ue(t,e);const i={...n};return t=>(i.red=Ye(n.red,s.red,t),i.green=Ye(n.green,s.green,t),i.blue=Ye(n.blue,s.blue,t),i.alpha=I(n.alpha,s.alpha,t),le.transform(i))},Ze=new Set(["none","hidden"]);function _e(t,e){return n=>I(t,e,n)}function Je(t){return"number"==typeof t?_e:"string"==typeof t?Mt(t)?Ue:he.test(t)?Ge:en:Array.isArray(t)?Qe:"object"==typeof t?he.test(t)?Ge:tn:Ue}function Qe(t,e){const n=[...t],s=n.length,i=t.map((t,n)=>Je(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}}function tn(t,e){const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=Je(t[i])(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const en=(t,e)=>{const n=ve.createTransformer(e),s=fe(t),i=fe(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?Ze.has(t)&&!i.values.length||Ze.has(e)&&!s.values.length?function(t,e){return Ze.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):$e(Qe(function(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[r]=l,i[o]++}return s}(s,i),i.values),n):Ue(t,e)};function nn(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return I(t,e,n);return Je(t)(t,e)}function sn(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(S(o===e.length),1===o)return()=>e[0];if(2===o&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const s=[],i=n||nn,o=t.length-1;for(let n=0;n<o;n++){let o=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||r:e;o=$e(t,o)}s.push(o)}return s}(e,s,i),l=a.length,u=e=>{let n=0;if(l>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=R(t[n],t[n+1],e);return a[n](s)};return n?e=>u(V(t[0],t[o-1],e)):u}function rn({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=H(s)?s.map(je):je(s),r={done:!1,value:e[0]},o=sn(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:L(e),t),e,{ease:Array.isArray(i)?i:(a=e,l=i,a.map(()=>l||De).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}const on=t=>{const e=({timestamp:e})=>t(e);return{start:()=>a.update(e,!0),stop:()=>l(e),now:()=>u.isProcessing?u.timestamp:p.now()}},an={decay:Be,inertia:Be,tween:rn,keyframes:rn,spring:C},ln=t=>t/100;class un extends Re{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=()=>{const{onStop:t}=this.options;t&&t(),this.resolver.cancel(),this.isStopped=!0,"idle"!==this.state&&this.teardown()};const{name:e,motionValue:n,element:s,keyframes:i}=this.options,r=(null==s?void 0:s.KeyframeResolver)||ee;this.resolver=new r(i,(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:i,velocity:r=0}=this.options,o=j(e)?e:an[e]||rn;let a,l;o!==rn&&"number"!=typeof t[0]&&(a=$e(ln,nn(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===i&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=E(u));const{calculatedDuration:c}=u,h=c+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:r,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.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=i;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=r)),v=V(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=ut(a,this.options,s)),m&&m(b.value),x&&this.finish(),b}get duration(){const{resolved:t}=this;return t?b(t.calculatedDuration):0}get time(){return b(this.currentTime)}set time(t){t=w(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=b(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=on,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const cn=new Set(["opacity","clipPath","filter","transform"]),hn={linearEasing:void 0};function dn(t,e){const n=g(t);return()=>{var t;return null!==(t=hn[e])&&void 0!==t?t:n()}}const pn=dn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing");function fn(t){return Boolean("function"==typeof t&&pn()||!t||"string"==typeof t&&(t in gn||pn())||Ne(t)||Array.isArray(t)&&t.every(fn))}const mn=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,gn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mn([0,.65,.55,1]),circOut:mn([.55,0,1,.45]),backIn:mn([.31,.01,.66,-.59]),backOut:mn([.33,1.53,.69,.99])};function yn(t,e){return t?"function"==typeof t&&pn()?((t,e)=>{let n="";const s=Math.max(Math.round(e/10),2);for(let e=0;e<s;e++)n+=t(R(0,s-1,e))+", ";return`linear(${n.substring(0,n.length-2)})`})(t,e):Ne(t)?mn(t):Array.isArray(t)?t.map(t=>yn(t,e)||gn.easeOut):gn[t]:void 0}function vn(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=yn(a,i);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"})}function wn(t,e){t.timeline=e,t.onfinish=null}const bn=g(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const Tn={anticipate:yt,backInOut:gt,circInOut:bt};class xn extends Re{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:i}=this.options;this.resolver=new Ee(i,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:s=300,times:i,ease:r,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;var c;if("string"==typeof r&&pn()&&r in Tn&&(r=Tn[r]),j((c=this.options).type)||"spring"===c.type||!fn(c.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new un({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<2e4;)s=n.sample(r),i.push(s.value),r+=10;return{times:void 0,keyframes:i,duration:r-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),s=c.duration,i=c.times,r=c.ease,o="keyframes"}const h=vn(a.owner.current,l,t,{...this.options,duration:s,times:i,ease:r});return h.startTime=null!=u?u:this.calcStartTime(),this.pendingTimeline?(wn(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:n}=this.options;a.set(ut(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:s,times:i,type:o,ease:r,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return b(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return b(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=w(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return r;const{animation:n}=e;wn(n,t)}else this.pendingTimeline=t;return r}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:i,ease:r,times:o}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...u}=this.options,c=new un({...u,keyframes:n,duration:s,type:i,ease:r,times:o,isGenerator:!0}),h=w(this.time);t.setWithVelocity(c.sample(h-10).value,c.sample(h).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;return bn()&&n&&cn.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!s&&"mirror"!==i&&0!==r&&"inertia"!==o}}const Sn=(t,e,n,s={},i,r)=>o=>{const l=at(s,t)||{},u=l.delay||s.delay||0;let{elapsed:c=0}=s;c-=w(u);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(l)||(h={...h,...ot(t,h)}),h.duration&&(h.duration=w(h.duration)),h.repeatDelay&&(h.repeatDelay=w(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(h.duration=0,0===h.delay&&(d=!0)),d&&!r&&void 0!==e.get()){const t=ut(h.keyframes,l);if(void 0!==t)return a.update(()=>{h.onUpdate(t),h.onComplete()}),new v([])}return!r&&xn.supports(h)?new xn(h):new un(h)},Vn=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t;function An(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Mn(t,e,n,s){if("function"==typeof e){const[i,r]=An(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]=An(s);e=e(void 0!==n?n:t.custom,i,r)}return e}function Pn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,m(n))}function kn(t,e){const n=function(t,e,n){const s=t.getProps();return Mn(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){Pn(t,e,Vn(r[e]))}}const Fn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Cn="data-"+Fn("framerAppearId");function En(t){return t.props[Cn]}function On(t,e){const n=t.getValue("willChange");if(s=n,Boolean(W(s)&&s.add))return n.add(e);var s}function In({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function Rn(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:l,...u}=e;s&&(o=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const e in u){const s=t.getValue(e,null!==(r=t.latestValues[e])&&void 0!==r?r:null),i=u[e];if(void 0===i||h&&In(h,e))continue;const l={delay:n,...at(o||{},e)};let d=!1;if(window.MotionHandoffAnimation){const n=En(t);if(n){const t=window.MotionHandoffAnimation(n,e,a);null!==t&&(l.startTime=t,d=!0)}}On(t,e),s.start(Sn(e,s,i,t.shouldReduceMotion&&nt.has(e)?{type:!1}:l,t,d));const p=s.animation;p&&c.push(p)}return l&&Promise.all(c).then(()=>{a.update(()=>{l&&kn(t,l)})}),c}const Bn={};function Ln(t,{layout:e,layoutId:n}){return nt.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Bn[t]||"opacity"===t)}function Wn(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(W(i[o])||e.style&&W(e.style[o])||Ln(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(r[o]=i[o]);return r}const Dn="undefined"!=typeof window,Nn={current:null},Kn={current:!1};const jn=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function zn(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||jn.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const $n={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"]},Hn={};for(const t in $n)Hn[t]={isEnabled:e=>$n[t].some(t=>!!e[t])};const Un=[...Xt,he,ve],Yn=()=>({x:{min:0,max:0},y:{min:0,max:0}}),qn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Xn{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=ee,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=p.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,a.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=zn(e),this.isVariantNode=function(t){return Boolean(zn(t)||t.variants)}(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==l[t]&&W(e)&&e.set(l[t],!1)}}mount(t){this.current=t,tt.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)),Kn.current||function(){if(Kn.current=!0,Dn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Nn.current=t.matches;t.addListener(e),e()}else Nn.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Nn.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){tt.delete(this.current),this.projection&&this.projection.unmount(),l(this.notifyUpdate),l(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=nt.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&a.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 Hn){const e=Hn[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<qn.length;e++){const n=qn[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(W(i))t.addValue(s,i);else if(W(r))t.addValue(s,m(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,m(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()}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=m(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let s=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=s&&("string"==typeof s&&(xt(s)||Tt(s))?s=parseFloat(s):(i=s,!Un.find(qt(i))&&ve.test(e)&&(s=Fe(t,e))),this.setBaseTarget(t,W(s)?s.get():s)),W(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let s;if("string"==typeof n||"object"==typeof n){const i=Mn(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);i&&(s=i[t])}if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||W(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new n),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Gn extends Xn{constructor(){super(...arguments),this.KeyframeResolver=Ee}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}}const Zn=(t,e)=>e&&"number"==typeof t?e.transform(t):t,_n={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Jn=et.length;function Qn(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(nt.has(t))o=!0;else if(Vt(t))i[t]=n;else{const e=Zn(n,Me[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<Jn;r++){const o=et[r],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=Zn(a,Me[o]);if(!l){i=!1;s+=`${_n[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}`}}function ts(t,e,n){return"string"==typeof t?t:Lt.transform(e+n*t)}const es={offset:"stroke-dashoffset",array:"stroke-dasharray"},ns={offset:"strokeDashoffset",array:"strokeDasharray"};function ss(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Qn(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!==i||void 0!==r||p.transform)&&(p.transformOrigin=function(t,e,n){return`${ts(e,t.x,t.width)} ${ts(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?es:ns;t[r.offset]=Lt.transform(-s);const o=Lt.transform(e),a=Lt.transform(n);t[r.array]=`${o} ${a}`}(d,o,a,l,!1)}const is=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 rs(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])}class os extends Gn{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Yn}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(nt.has(e)){const t=ke(e);return t&&t.default||0}return e=is.has(e)?e:Fn(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=Wn(t,e,n);for(const n in t)if(W(t[n])||W(e[n])){s[-1!==et.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return s}(t,e,n)}build(t,e,n){ss(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){rs(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(is.has(n)?n:Fn(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 as extends Gn{constructor(){super(...arguments),this.type="html",this.renderInstance=rs}readValueFromInstance(t,e){if(nt.has(e)){const t=ke(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),i=(Vt(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){Qn(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Wn(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;W(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}class ls extends Xn{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 us(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 os(e):new as(e);n.mount(t),tt.set(t,n)}function cs(t){const e=new ls({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),tt.set(t,e)}function hs(t,e,n,s){const i=[];if(function(t,e){return W(t)||"number"==typeof t||"string"==typeof t&&!N(e)}(t,e))i.push(function(t,e,n){const s=W(t)?t:m(t);return s.start(Sn("",s,e,n)),s.animation}(t,N(e)&&e.default||e,n&&n.default||n));else{const r=K(t,e,s),o=r.length;for(let t=0;t<o;t++){const s=r[t],a=s instanceof Element?us:cs;tt.has(s)||a(s);const l=tt.get(s),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,o)),i.push(...Rn(l,{...e,transition:u},{}))}}return i}function ds(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s,i){const r=e.duration||.3,o=new Map,a=new Map,l={},u=new Map;let c=0,h=0,d=0;for(let n=0;n<t.length;n++){const o=t[n];if("string"==typeof o){u.set(o,h);continue}if(!Array.isArray(o)){u.set(o.name,z(h,o.at,c,u));continue}let[p,f,m={}]=o;void 0!==m.at&&(h=z(h,m.at,c,u));let g=0;const y=(t,n,s,o=0,a=0)=>{const l=Z(t),{delay:u=0,times:c=L(l),type:p="keyframes",...f}=n;let{ease:m=e.ease||"easeOut",duration:y}=n;const v="function"==typeof u?u(o,a):u,b=l.length,T=j(p)?p:null==i?void 0:i[p];if(b<=2&&T){let t=100;if(2===b&&Q(l)){const e=l[1]-l[0];t=Math.abs(e)}const e={...f};void 0!==y&&(e.duration=w(y));const n=O(e,t,T);m=n.ease,y=n.duration}null!=y||(y=r);const x=h+v,S=x+y;1===c.length&&0===c[0]&&(c[1]=1);const V=c.length-l.length;V>0&&B(c,V),1===l.length&&l.unshift(null),Y(s,l,m,c,x,S),g=Math.max(v+y,g),d=Math.max(S,d)};if(W(p)){y(f,m,G("default",X(p,a)))}else{const t=K(p,f,s,l),e=t.length;for(let n=0;n<e;n++){f=f,m=m;const s=X(t[n],a);for(const t in f)y(f[t],_(m,t),G(t,s),n,e)}}c=h,h+=g}return a.forEach((t,s)=>{for(const i in t){const r=t[i];r.sort(q);const a=[],l=[],u=[];for(let t=0;t<r.length;t++){const{at:e,value:n,easing:s}=r[t];a.push(n),l.push(R(0,d,e)),u.push(s||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),o.has(s)||o.set(s,{keyframes:{},transition:{}});const c=o.get(s);c.keyframes[i]=a,c.transition[i]={...e,duration:d,ease:u,times:l,...n}}}),o}(t,e,n,{spring:C}).forEach(({keyframes:t,transition:e},n)=>{s.push(...hs(n,t,e))}),s}function ps(t){return function(e,n,s){let i=[];var r;r=e,i=Array.isArray(r)&&Array.isArray(r[0])?ds(e,n,t):hs(e,n,s,t);const o=new v(i);return t&&t.animations.push(o),o}}const fs=ps();function ms(t,e,n){t.style.setProperty("--"+e,n)}function gs(t,e,n){t.style[e]=n}const ys=g(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),vs=new WeakMap;function ws(t){const e=vs.get(t)||new Map;return vs.set(t,e),vs.get(t)}class bs{constructor(t,e,n,s){const i=e.startsWith("--");this.setValue=i?ms:gs,this.options=s,this.updateFinishedPromise(),S("string"!=typeof s.type);const r=ws(t).get(e);r&&r.stop();if(Array.isArray(n)||(n=[n]),function(t,e,n){for(let s=0;s<e.length;s++)null===e[s]&&(e[s]=0===s?n():e[s-1]),"number"==typeof e[s]&&Se[t]&&(e[s]=Se[t].transform(e[s]));!ys()&&e.length<2&&e.unshift(n())}(e,n,()=>e.startsWith("--")?t.style.getPropertyValue(e):window.getComputedStyle(t)[e]),j(s.type)){const t=O(s,100,s.type);s.ease=pn()?t.ease:"easeOut",s.duration=w(t.duration),s.type="keyframes"}else s.ease=s.ease||"easeOut";this.removeAnimation=()=>{var n;return null===(n=vs.get(t))||void 0===n?void 0:n.delete(e)};const o=()=>{this.setValue(t,e,ut(n,this.options)),this.cancel(),this.resolveFinishedPromise()};bn()?(this.animation=vn(t,e,n,s),!1===s.autoplay&&this.animation.pause(),this.animation.onfinish=o,this.pendingTimeline&&wn(this.animation,this.pendingTimeline),ws(t).set(e,this)):o()}get duration(){return b(this.options.duration||300)}get time(){var t;return this.animation?b((null===(t=this.animation)||void 0===t?void 0:t.currentTime)||0):0}set time(t){this.animation&&(this.animation.currentTime=w(t))}get speed(){return this.animation?this.animation.playbackRate:1}set speed(t){this.animation&&(this.animation.playbackRate=t)}get state(){return this.animation?this.animation.playState:"finished"}get startTime(){return this.animation?this.animation.startTime:null}flatten(){var t;this.animation&&(null===(t=this.animation.effect)||void 0===t||t.updateTiming({easing:"linear"}))}play(){"finished"===this.state&&this.updateFinishedPromise(),this.animation&&this.animation.play()}pause(){this.animation&&this.animation.pause()}stop(){this.animation&&"idle"!==this.state&&"finished"!==this.state&&(this.animation.commitStyles&&this.animation.commitStyles(),this.cancel())}complete(){this.animation&&this.animation.finish()}cancel(){this.removeAnimation();try{this.animation&&this.animation.cancel()}catch(t){}}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}attachTimeline(t){return this.animation?wn(this.animation,t):this.pendingTimeline=t,r}}const Ts=(t=>function(e,n,s){return new v(function(t,e,n,s){const i=D(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){const n=e[t],i={...at(a,t)};i.duration=i.duration?w(i.duration):i.duration,i.delay=w(i.delay||0),o.push(new bs(s,t,n,i))}}return o}(e,n,s,t))})(),xs=new WeakMap;let Ss;function Vs({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=xs.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function As(t){t.forEach(Vs)}function Ms(t,e){Ss||"undefined"!=typeof ResizeObserver&&(Ss=new ResizeObserver(As));const n=D(t);return n.forEach(t=>{let n=xs.get(t);n||(n=new Set,xs.set(t,n)),n.add(e),null==Ss||Ss.observe(t)}),()=>{n.forEach(t=>{const n=xs.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Ss||Ss.unobserve(t)})}}const Ps=new Set;let ks;function Fs(t){return Ps.add(t),ks||(ks=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Ps.forEach(t=>t(e))},window.addEventListener("resize",ks)),()=>{Ps.delete(t),!Ps.size&&ks&&(ks=void 0)}}const Cs={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Es(t,e,n,i){const r=n[e],{length:o,position:a}=Cs[e],l=r.current,u=n.time;r.current=t["scroll"+a],r.scrollLength=t["scroll"+o]-t["client"+o],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=R(0,r.scrollLength,r.current);const c=i-u;r.velocity=c>50?0:s(r.current-l,c)}const Os={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Is={start:0,center:.5,end:1};function Rs(t,e,n=0){let s=0;if(t in Is&&(t=Is[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 Bs=[0,0];function Ls(t,e,n,s){let i=Array.isArray(t)?t:Bs,r=0,o=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,Is[t]?t:"0"]),r=Rs(i[0],n,s),o=Rs(i[1],e),r-o}const Ws={x:0,y:0};function Ds(t,e,n){const{offset:s=Os.All}=n,{target:i=t,axis:r="y"}=n,o="y"===r?"height":"width",a=i!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let i=null,r=s.parentNode;for(;!i;)"svg"===r.tagName&&(i=r),r=s.parentNode;s=i}}return n}(i,t):Ws,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(i),u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let c=!e[r].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=Ls(s[t],u[o],l[o],a[r]);c||n===e[r].interpolatorOffsets[t]||(c=!0),e[r].offset[t]=n}c&&(e[r].interpolate=sn(e[r].offset,L(s)),e[r].interpolatorOffsets=[...e[r].offset]),e[r].progress=e[r].interpolate(e[r].current)}function Ns(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){Es(t,"x",e,n),Es(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&Ds(t,n,s)},notify:()=>e(n)}}const Ks=new WeakMap,js=new WeakMap,zs=new WeakMap,$s=t=>t===document.documentElement?window:t;function Hs(t,{container:e=document.documentElement,...n}={}){let s=zs.get(e);s||(s=new Set,zs.set(e,s));const i=Ns(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),!Ks.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(u.timestamp)},i=()=>{for(const t of s)t.notify()},l=()=>{a.read(t,!1,!0),a.read(n,!1,!0),a.update(i,!1,!0)};Ks.set(e,l);const c=$s(e);window.addEventListener("resize",l,{passive:!0}),e!==document.documentElement&&js.set(e,(o=l,"function"==typeof(r=e)?Fs(r):Ms(r,o))),c.addEventListener("scroll",l,{passive:!0})}var r,o;const c=Ks.get(e);return a.read(c,!1,!0),()=>{var t;l(c);const n=zs.get(e);if(!n)return;if(n.delete(i),n.size)return;const s=Ks.get(e);Ks.delete(e),s&&($s(e).removeEventListener("scroll",s),null===(t=js.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}function Us(t,e){let n;const s=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return a.update(s,!0),()=>l(s)}const Ys=new Map;function qs({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),Ys.has(e)||Ys.set(e,{});const s=Ys.get(e);return s[n]||(s[n]=y()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const s={value:0},i=Hs(t=>{s.value=100*t[n].progress},{container:e,axis:n});return{currentTime:s,cancel:i}}({source:e,axis:n})),s[n]}function Xs(t){return 2===t.length}function Gs(t){return t&&(t.target||t.offset)}const Zs={some:0,all:1};const _s=(t,e)=>Math.abs(t-e);const Js=a,Qs=o.reduce((t,e)=>(t[e]=t=>l(t),t),{});t.MotionValue=f,t.animate=fs,t.animateMini=Ts,t.anticipate=yt,t.backIn=mt,t.backInOut=gt,t.backOut=ft,t.cancelFrame=l,t.cancelSync=Qs,t.circIn=vt,t.circInOut=bt,t.circOut=wt,t.clamp=V,t.createScopedAnimate=ps,t.cubicBezier=ht,t.delay=function(t,e){return function(t,e){const n=p.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(l(s),t(r-e))};return a.read(s,!0),()=>l(s)}(t,w(e))},t.distance=_s,t.distance2D=function(t,e){const n=_s(t.x,e.x),s=_s(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=Le,t.easeInOut=De,t.easeOut=We,t.frame=a,t.frameData=u,t.frameSteps=c,t.inView=function(t,e,{root:n,margin:s,amount:i="some"}={}){const r=D(t),o=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=o.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);"function"==typeof n?o.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),o.delete(t.target))})},{root:n,rootMargin:s,threshold:"number"==typeof i?i:Zs[i]});return r.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=Be,t.interpolate=sn,t.invariant=S,t.keyframes=rn,t.mirrorEasing=dt,t.mix=nn,t.motionValue=m,t.pipe=$e,t.progress=R,t.reverseEasing=pt,t.scroll=function(t,{axis:e="y",...n}={}){const s={axis:e,...n};return"function"==typeof t?function(t,e){return Xs(t)||Gs(e)?(console.log(Xs(t),Gs(e)),Hs(n=>{t(n[e.axis].progress,n)},e)):Us(t,qs(e))}(t,s):function(t,e){if(t.flatten(),Gs(e))return t.pause(),Hs(n=>{t.time=t.duration*n[e.axis].progress},e);{const n=qs(e);return t.attachTimeline?t.attachTimeline(n,t=>(t.pause(),Us(e=>{t.time=t.duration*e},n))):r}}(t,s)},t.scrollInfo=Hs,t.spring=C,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 l=t*a;if(s){const e=r*t;l=je(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,i="end"===e?Math.floor(s):Math.ceil(s);return V(0,1,i/t)}},t.sync=Js,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=sn(i,r,{mixer:(l=r[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.warning=x,t.wrap=$}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,(function(t){"use strict";const e=t=>t;let n=e;function s(t){let e;return()=>(void 0===e&&(e=t()),e)}const i=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},r=t=>1e3*t,o=t=>t/1e3,a=s(()=>void 0!==window.ScrollTimeline);class l extends class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map(n=>a()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0);return()=>{n.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}{then(t,e){return Promise.all(this.animations).then(t).catch(e)}}function u(t,e){return t?t[e]||t.default||t:void 0}function c(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}function h(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(c(s),2e4);return{type:"keyframes",ease:t=>s.next(i*t).value/e,duration:o(i)}}function d(t){return"function"==typeof t}function p(t,e){t.timeline=e,t.onfinish=null}const f=t=>Array.isArray(t)&&"number"==typeof t[0],m={linearEasing:void 0};function g(t,e){const n=s(t);return()=>{var t;return null!==(t=m[e])&&void 0!==t?t:n()}}const v=g(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),y=(t,e,n=10)=>{let s="";const r=Math.max(Math.round(e/n),2);for(let e=0;e<r;e++)s+=t(i(0,r-1,e))+", ";return`linear(${s.substring(0,s.length-2)})`};function w(t){return Boolean("function"==typeof t&&v()||!t||"string"==typeof t&&(t in T||v())||f(t)||Array.isArray(t)&&t.every(w))}const b=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,T={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:b([0,.65,.55,1]),circOut:b([.55,0,1,.45]),backIn:b([.31,.01,.66,-.59]),backOut:b([.33,1.53,.69,.99])};const x=!1,S=!1;function A(){return x||S}function V(t,e,n){var s;if(t instanceof Element)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const r=null!==(s=null==n?void 0:n[t])&&void 0!==s?s:i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function M(t,e){const n=V(t),s=new AbortController;return[n,{passive:!0,...e,signal:s.signal},()=>s.abort()]}function P(t){return!("touch"===t.pointerType||A())}const k=(t,e)=>!!e&&(t===e||k(t,e.parentElement)),E=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const C=new WeakSet;function F(t){return e=>{"Enter"===e.key&&t(e)}}function O(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function I(t){return(t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary)(t)&&!A()}const L=(t,e,n)=>n>e?e:n<t?t:n;function R(t,e){return e?t*(1e3/e):0}function B(t,e,n){const s=Math.max(e-5,0);return R(n-t(s),e-s)}const D=100,W=10,N=1,K=0,j=800,z=.3,U=.3,$={granular:.01,default:2},H={granular:.005,default:.5},Y=.01,q=10,X=.05,G=1;function Z({duration:t=j,bounce:e=z,velocity:n=K,mass:s=N}){let i,a,l=1-e;l=L(X,G,l),t=L(Y,q,o(t)),l<1?(i=e=>{const s=e*l,i=s*t;return.001-(s-n)/_(e,l)*Math.exp(-i)},a=e=>{const s=e*l*t,r=s*n+n,o=Math.pow(l,2)*Math.pow(e,2)*t,a=Math.exp(-s),u=_(Math.pow(e,2),l);return(.001-i(e)>0?-1:1)*((r-o)*a)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,a=e=>Math.exp(-e*t)*(t*t*(n-e)));const u=function(t,e,n){let s=n;for(let n=1;n<12;n++)s-=t(s)/e(s);return s}(i,a,5/t);if(t=r(t),isNaN(u))return{stiffness:D,damping:W,duration:t};{const e=Math.pow(u,2)*s;return{stiffness:e,damping:2*l*Math.sqrt(s*e),duration:t}}}function _(t,e){return t*Math.sqrt(1-e*e)}const J=["duration","bounce"],Q=["stiffness","damping","mass"];function tt(t,e){return e.some(e=>void 0!==t[e])}function et(t=U,e=z){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const a=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:a},{stiffness:h,damping:d,mass:p,duration:f,velocity:m,isResolvedFromDuration:g}=function(t){let e={velocity:K,stiffness:D,damping:W,mass:N,isResolvedFromDuration:!1,...t};if(!tt(t,Q)&&tt(t,J))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),i=s*s,r=2*L(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:N,stiffness:i,damping:r}}else{const n=Z(t);e={...e,...n,mass:N},e.isResolvedFromDuration=!0}return e}({...n,velocity:-o(n.velocity||0)}),v=m||0,w=d/(2*Math.sqrt(h*p)),b=l-a,T=o(Math.sqrt(h/p)),x=Math.abs(b)<5;let S;if(s||(s=x?$.granular:$.default),i||(i=x?H.granular:H.default),w<1){const t=_(T,w);S=e=>{const n=Math.exp(-w*T*e);return l-n*((v+w*T*b)/t*Math.sin(t*e)+b*Math.cos(t*e))}}else if(1===w)S=t=>l-Math.exp(-T*t)*(b+(v+T*b)*t);else{const t=T*Math.sqrt(w*w-1);S=e=>{const n=Math.exp(-w*T*e),s=Math.min(t*e,300);return l-n*((v+w*T*b)*Math.sinh(s)+t*b*Math.cosh(s))/t}}const A={calculatedDuration:g&&f||null,next:t=>{const e=S(t);if(g)u.done=t>=f;else{let n=0;w<1&&(n=0===t?r(v):B(S,t,e));const o=Math.abs(n)<=s,a=Math.abs(l-e)<=i;u.done=o&&a}return u.value=u.done?l:e,u},toString:()=>{const t=Math.min(c(A),2e4),e=y(e=>A.next(t*e).value,t,30);return t+"ms "+e}};return A}const nt=(t,e,n)=>{const s=e-t;return((n-t)%s+s)%s+t},st=t=>Array.isArray(t)&&"number"!=typeof t[0];function it(t,e){return st(t)?t[nt(0,t.length,e)]:t}const rt=(t,e,n)=>t+(e-t)*n;function ot(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const r=i(0,e,s);t.push(rt(n,1,r))}}function at(t){const e=[0];return ot(e,t.length-1),e}const lt=t=>Boolean(t&&t.getVelocity);function ut(t){return"object"==typeof t&&!Array.isArray(t)}function ct(t,e,n,s){return"string"==typeof t&&ut(e)?V(t,n,s):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function ht(t,e,n){return t*(e+1)}function dt(t,e,n,s){var i;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(i=s.get(e))&&void 0!==i?i:t}function pt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function ft(t,e,n,s,i,r){!function(t,e,n){for(let s=0;s<t.length;s++){const i=t[s];i.at>e&&i.at<n&&(pt(t,i),s--)}}(t,i,r);for(let o=0;o<e.length;o++)t.push({value:e[o],at:rt(i,r,s[o]),easing:it(n,o)})}function mt(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function gt(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function vt(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function yt(t,e){return e[t]||(e[t]=[]),e[t]}function wt(t){return Array.isArray(t)?t:[t]}function bt(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Tt=t=>"number"==typeof t,xt=t=>t.every(Tt),St=new WeakMap,At=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vt=new Set(At),Mt=new Set(["width","height","top","left","right","bottom",...At]),Pt=t=>(t=>Array.isArray(t))(t)?t[t.length-1]||0:t,kt=!1;const Et=["read","resolveKeyframes","update","preRender","render","postRender"];const{schedule:Ct,cancel:Ft,state:Ot,steps:It}=function(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Et.reduce((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(e){r.has(e)&&(l.schedule(e),t()),e(o)}const l={schedule:(t,i=!1,o=!1)=>{const a=o&&s?e:n;return i&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),r.delete(t)},process:t=>{o=t,s?i=!0:(s=!0,[e,n]=[n,e],e.forEach(a),e.clear(),s=!1,i&&(i=!1,l.process(t)))}};return l}(r),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=o,p=()=>{const r=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(r-i.timestamp,40),1),i.timestamp=r,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),d.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))};return{schedule:Et.reduce((e,r)=>{const a=o[r];return e[r]=(e,r=!1,o=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(p)),a.schedule(e,r,o)),e},{}),cancel:t=>{for(let e=0;e<Et.length;e++)o[Et[e]].cancel(t)},state:i,steps:o}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e,!0);let Lt;function Rt(){Lt=void 0}const Bt={now:()=>(void 0===Lt&&Bt.set(Ot.isProcessing||kt?Ot.timestamp:performance.now()),Lt),set:t=>{Lt=t,queueMicrotask(Rt)}};class Dt{constructor(){this.subscriptions=[]}add(t){var e,n;return e=this.subscriptions,n=t,-1===e.indexOf(n)&&e.push(n),()=>pt(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}}class Wt{constructor(t,e={}){this.version="12.0.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Bt.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=Bt.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 Dt);const n=this.events[t].add(e);return"change"===t?()=>{n(),Ct.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=Bt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return R(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 Nt(t,e){return new Wt(t,e)}function Kt(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function jt(t,e,n,s){if("function"==typeof e){const[i,r]=Kt(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]=Kt(s);e=e(void 0!==n?n:t.custom,i,r)}return e}function zt(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Nt(n))}function Ut(t,e){const n=function(t,e,n){const s=t.getProps();return jt(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){zt(t,e,Pt(r[e]))}}function $t(t,e){const n=t.getValue("willChange");if(s=n,Boolean(lt(s)&&s.add))return n.add(e);var s}const Ht=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Yt="data-"+Ht("framerAppearId");function qt(t){return t.props[Yt]}const Xt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Gt(t,n,s,i){if(t===n&&s===i)return e;const r=e=>function(t,e,n,s,i){let r,o,a=0;do{o=e+(n-e)/2,r=Xt(o,s,i)-t,r>0?n=o:e=o}while(Math.abs(r)>1e-7&&++a<12);return o}(e,0,1,t,s);return t=>0===t||1===t?t:Xt(r(t),n,i)}const Zt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,_t=t=>e=>1-t(1-e),Jt=Gt(.33,1.53,.69,.99),Qt=_t(Jt),te=Zt(Qt),ee=t=>(t*=2)<1?.5*Qt(t):.5*(2-Math.pow(2,-10*(t-1))),ne=t=>1-Math.sin(Math.acos(t)),se=_t(ne),ie=Zt(ne),re=t=>/^0[^.\s]+$/u.test(t);const oe={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},ae={...oe,transform:t=>L(0,1,t)},le={...oe,default:1},ue=t=>Math.round(1e5*t)/1e5,ce=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const he=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,de=(t,e)=>n=>Boolean("string"==typeof n&&he.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),pe=(t,e,n)=>s=>{if("string"!=typeof s)return s;const[i,r,o,a]=s.match(ce);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:void 0!==a?parseFloat(a):1}},fe={...oe,transform:t=>Math.round((t=>L(0,255,t))(t))},me={test:de("rgb","red"),parse:pe("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+fe.transform(t)+", "+fe.transform(e)+", "+fe.transform(n)+", "+ue(ae.transform(s))+")"};const ge={test:de("#"),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:me.transform},ve=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ye=ve("deg"),we=ve("%"),be=ve("px"),Te=ve("vh"),xe=ve("vw"),Se={...we,parse:t=>we.parse(t)/100,transform:t=>we.transform(100*t)},Ae={test:de("hsl","hue"),parse:pe("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+we.transform(ue(e))+", "+we.transform(ue(n))+", "+ue(ae.transform(s))+")"},Ve={test:t=>me.test(t)||ge.test(t)||Ae.test(t),parse:t=>me.test(t)?me.parse(t):Ae.test(t)?Ae.parse(t):ge.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?me.transform(t):Ae.transform(t)},Me=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Pe=/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 ke(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const o=e.replace(Pe,t=>(Ve.test(t)?(s.color.push(r),i.push("color"),n.push(Ve.parse(t))):t.startsWith("var(")?(s.var.push(r),i.push("var"),n.push(t)):(s.number.push(r),i.push("number"),n.push(parseFloat(t))),++r,"${}")).split("${}");return{values:n,split:o,indexes:s,types:i}}function Ee(t){return ke(t).values}function Ce(t){const{split:e,types:n}=ke(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+="number"===e?ue(t[r]):"color"===e?Ve.transform(t[r]):t[r]}return i}}const Fe=t=>"number"==typeof t?0:t;const Oe={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(ce))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Me))||void 0===n?void 0:n.length)||0)>0},parse:Ee,createTransformer:Ce,getAnimatableNone:function(t){const e=Ee(t);return Ce(t)(e.map(Fe))}},Ie=new Set(["brightness","contrast","saturate","opacity"]);function Le(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(ce)||[];if(!s)return t;const i=n.replace(s,"");let r=Ie.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Re=/\b([a-z-]*)\(.*?\)/gu,Be={...Oe,getAnimatableNone:t=>{const e=t.match(Re);return e?e.map(Le).join(" "):t}},De={borderWidth:be,borderTopWidth:be,borderRightWidth:be,borderBottomWidth:be,borderLeftWidth:be,borderRadius:be,radius:be,borderTopLeftRadius:be,borderTopRightRadius:be,borderBottomRightRadius:be,borderBottomLeftRadius:be,width:be,maxWidth:be,height:be,maxHeight:be,top:be,right:be,bottom:be,left:be,padding:be,paddingTop:be,paddingRight:be,paddingBottom:be,paddingLeft:be,margin:be,marginTop:be,marginRight:be,marginBottom:be,marginLeft:be,backgroundPositionX:be,backgroundPositionY:be},We={rotate:ye,rotateX:ye,rotateY:ye,rotateZ:ye,scale:le,scaleX:le,scaleY:le,scaleZ:le,skew:ye,skewX:ye,skewY:ye,distance:be,translateX:be,translateY:be,translateZ:be,x:be,y:be,z:be,perspective:be,transformPerspective:be,opacity:ae,originX:Se,originY:Se,originZ:be},Ne={...oe,transform:Math.round},Ke={...De,...We,zIndex:Ne,size:be,fillOpacity:ae,strokeOpacity:ae,numOctaves:Ne},je={...Ke,color:Ve,backgroundColor:Ve,outlineColor:Ve,fill:Ve,stroke:Ve,borderColor:Ve,borderTopColor:Ve,borderRightColor:Ve,borderBottomColor:Ve,borderLeftColor:Ve,filter:Be,WebkitFilter:Be},ze=t=>je[t];function Ue(t,e){let n=ze(t);return n!==Be&&(n=Oe),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const $e=new Set(["auto","none","0"]);const He=t=>t===oe||t===be,Ye=(t,e)=>parseFloat(t.split(", ")[e]),qe=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return Ye(i[1],e);{const e=s.match(/^matrix\((.+)\)$/u);return e?Ye(e[1],t):0}},Xe=new Set(["x","y","z"]),Ge=At.filter(t=>!Xe.has(t));const Ze={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:qe(4,13),y:qe(5,14)};Ze.translateX=Ze.x,Ze.translateY=Ze.y;const _e=new Set;let Je=!1,Qe=!1;function tn(){if(Qe){const t=Array.from(_e).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Ge.forEach(n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{var s;null===(s=t.getValue(e))||void 0===s||s.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Qe=!1,Je=!1,_e.forEach(t=>t.complete()),_e.clear()}function en(){_e.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Qe=!0)})}class nn{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?(_e.add(this),Je||(Je=!0,Ct.read(en),Ct.resolveKeyframes(tn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:s}=this;for(let i=0;i<t.length;i++)if(null===t[i])if(0===i){const i=null==s?void 0:s.get(),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])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),_e.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,_e.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const sn=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),rn=t=>e=>"string"==typeof e&&e.startsWith(t),on=rn("--"),an=rn("var(--"),ln=t=>!!an(t)&&un.test(t.split("/*")[0].trim()),un=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,cn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function hn(t,e,n=1){const[s,i]=function(t){const e=cn.exec(t);if(!e)return[,];const[,n,s,i]=e;return["--"+(null!=n?n:s),i]}(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const t=r.trim();return sn(t)?parseFloat(t):t}return ln(i)?hn(i,e,n+1):i}const dn=t=>e=>e.test(t),pn=[oe,be,we,ye,xe,Te,{test:t=>"auto"===t,parse:t=>t}],fn=t=>pn.find(dn(t));class mn extends nn{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(),ln(s))){const i=hn(s,e.current);void 0!==i&&(t[n]=i),n===t.length-1&&(this.finalKeyframe=s)}}if(this.resolveNoneKeyframes(),!Mt.has(n)||2!==t.length)return;const[s,i]=t,r=fn(s),o=fn(i);if(r!==o)if(He(r)&&He(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||re(s))&&n.push(e);var s;n.length&&function(t,e,n){let s=0,i=void 0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!$e.has(e)&&ke(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=Ue(n,i)}(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=Ze[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const s=e[e.length-1];void 0!==s&&t.getValue(n,s).jump(s,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=Ze[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const gn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Oe.test(t)&&"0"!==t||t.startsWith("url(")));function vn(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=gn(i,e),a=gn(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||d(n))&&s)}const yn=t=>null!==t;function wn(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(yn),r=e&&"loop"!==n&&e%2==1?0:i.length-1;return r&&void 0!==s?s:i[r]}class bn{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Bt.now(),this.options={autoplay:t,delay:e,type:n,repeat:s,repeatDelay:i,repeatType:r,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(en(),tn()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=Bt.now(),this.hasAttemptedResolve=!0;const{name:n,type:s,velocity:i,delay:r,onComplete:o,onUpdate:a,isGenerator:l}=this.options;if(!l&&!vn(t,n,s,i)){if(!r)return a&&a(wn(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.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Tn(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 xn(t,e){return n=>n>0?e:t}const Sn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},An=[ge,me,Ae];function Vn(t){const e=(n=t,An.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===Ae&&(s=function({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=Tn(a,s,t+1/3),r=Tn(a,s,t),o=Tn(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}}(s)),s}const Mn=(t,e)=>{const n=Vn(t),s=Vn(e);if(!n||!s)return xn(t,e);const i={...n};return t=>(i.red=Sn(n.red,s.red,t),i.green=Sn(n.green,s.green,t),i.blue=Sn(n.blue,s.blue,t),i.alpha=rt(n.alpha,s.alpha,t),me.transform(i))},Pn=(t,e)=>n=>e(t(n)),kn=(...t)=>t.reduce(Pn),En=new Set(["none","hidden"]);function Cn(t,e){return n=>rt(t,e,n)}function Fn(t){return"number"==typeof t?Cn:"string"==typeof t?ln(t)?xn:Ve.test(t)?Mn:Ln:Array.isArray(t)?On:"object"==typeof t?Ve.test(t)?Mn:In:xn}function On(t,e){const n=[...t],s=n.length,i=t.map((t,n)=>Fn(t)(t,e[n]));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}}function In(t,e){const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=Fn(t[i])(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const Ln=(t,e)=>{const n=Oe.createTransformer(e),s=ke(t),i=ke(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?En.has(t)&&!i.values.length||En.has(e)&&!s.values.length?function(t,e){return En.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):kn(On(function(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[r]=l,i[o]++}return s}(s,i),i.values),n):xn(t,e)};function Rn(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return rt(t,e,n);return Fn(t)(t,e)}function Bn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let f=n*e;const m=h+f,g=void 0===o?m:o(m);g!==m&&(f=g-h);const v=t=>-f*Math.exp(-t/s),y=t=>g+v(t),w=t=>{const e=v(t),n=y(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,T;const x=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,T=et({keyframes:[d.value,p(d.value)],velocity:B(y,t,d.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return x(0),{calculatedDuration:null,next:t=>{let e=!1;return T||void 0!==b||(e=!0,w(t),x(t)),void 0!==b&&t>=b?T.next(t-b):(!e&&w(t),d)}}}const Dn=Gt(.42,0,1,1),Wn=Gt(0,0,.58,1),Nn=Gt(.42,0,.58,1),Kn={linear:e,easeIn:Dn,easeInOut:Nn,easeOut:Wn,circIn:ne,circInOut:ie,circOut:se,backIn:Qt,backInOut:te,backOut:Jt,anticipate:ee},jn=t=>{if(f(t)){n(4===t.length);const[e,s,i,r]=t;return Gt(e,s,i,r)}return"string"==typeof t?Kn[t]:t};function zn(t,s,{clamp:r=!0,ease:o,mixer:a}={}){const l=t.length;if(n(l===s.length),1===l)return()=>s[0];if(2===l&&s[0]===s[1])return()=>s[1];const u=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),s=[...s].reverse());const c=function(t,n,s){const i=[],r=s||Rn,o=t.length-1;for(let s=0;s<o;s++){let o=r(t[s],t[s+1]);if(n){const t=Array.isArray(n)?n[s]||e:n;o=kn(t,o)}i.push(o)}return i}(s,o,a),h=c.length,d=e=>{if(u&&e<t[0])return s[0];let n=0;if(h>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const r=i(t[n],t[n+1],e);return c[n](r)};return r?e=>d(L(t[0],t[l-1],e)):d}function Un({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=st(s)?s.map(jn):jn(s),r={done:!1,value:e[0]},o=zn(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:at(e),t),e,{ease:Array.isArray(i)?i:(a=e,l=i,a.map(()=>l||Nn).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(r.value=o(e),r.done=e>=t,r)}}const $n=t=>{const e=({timestamp:e})=>t(e);return{start:()=>Ct.update(e,!0),stop:()=>Ft(e),now:()=>Ot.isProcessing?Ot.timestamp:Bt.now()}},Hn={decay:Bn,inertia:Bn,tween:Un,keyframes:Un,spring:et},Yn=t=>t/100;class qn extends bn{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:i}=this.options,r=(null==s?void 0:s.KeyframeResolver)||nn;this.resolver=new r(i,(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:i,velocity:r=0}=this.options,o=d(e)?e:Hn[e]||Un;let a,l;o!==Un&&"number"!=typeof t[0]&&(a=kn(Yn,Rn(t[0],t[1])),t=[0,100]);const u=o({...this.options,keyframes:t});"mirror"===i&&(l=o({...this.options,keyframes:[...t].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=c(u));const{calculatedDuration:h}=u,p=h+s;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:h,resolvedDuration:p,totalDuration:p*(n+1)-s}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:r,mapPercentToKeyframes:o,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return i.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:f,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let y=this.currentTime,w=i;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=r)),y=L(0,1,n)*c}const b=v?{done:!1,value:a[0]}:w.next(y);o&&(b.value=o(b.value));let{done:T}=b;v||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=wn(a,this.options,s)),m&&m(b.value),x&&this.finish(),b}get duration(){const{resolved:t}=this;return t?o(t.calculatedDuration):0}get time(){return o(this.currentTime)}set time(t){t=r(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=o(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=$n,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const s=this.driver.now();null!==this.holdTime?this.startTime=s-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=s):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Xn=new Set(["opacity","clipPath","filter","transform"]);function Gn(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=function t(e,n){return e?"function"==typeof e&&v()?y(e,n):f(e)?b(e):Array.isArray(e)?e.map(e=>t(e,n)||T.easeOut):T[e]:void 0}(a,i);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:"reverse"===o?"alternate":"normal"})}const Zn=s(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const _n={anticipate:ee,backInOut:te,circInOut:ie};class Jn extends bn{constructor(t){super(t);const{name:e,motionValue:n,element:s,keyframes:i}=this.options;this.resolver=new mn(i,(t,e)=>this.onKeyframesResolved(t,e),e,n,s),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:n=300,times:s,ease:i,type:r,motionValue:o,name:a,startTime:l}=this.options;if(!o.owner||!o.owner.current)return!1;var u;if("string"==typeof i&&v()&&i in _n&&(i=_n[i]),d((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 qn({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<2e4;)s=n.sample(r),i.push(s.value),r+=10;return{times:void 0,keyframes:i,duration:r-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),n=c.duration,s=c.times,i=c.ease,r="keyframes"}const c=Gn(o.owner.current,a,t,{...this.options,duration:n,times:s,ease:i});return c.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(p(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;o.set(wn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:s,type:r,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return o(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return o(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=r(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:n}=this;if(!n)return e;const{animation:s}=n;p(s,t)}else this.pendingTimeline=t;return e}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:s,type:i,ease:o,times:a}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:l,element:u,...c}=this.options,h=new qn({...c,keyframes:n,duration:s,type:i,ease:o,times:a,isGenerator:!0}),d=r(this.time);t.setWithVelocity(h.sample(d-10).value,h.sample(d).value,10)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return Zn()&&n&&Xn.has(n)&&!a&&!l&&!s&&"mirror"!==i&&0!==r&&"inertia"!==o}}const Qn={type:"spring",stiffness:500,damping:25,restSpeed:10},ts={type:"keyframes",duration:.8},es={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ns=(t,{keyframes:e})=>e.length>2?ts:Vt.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Qn:es;const ss=(t,e,n,s={},i,o)=>a=>{const c=u(s,t)||{},h=c.delay||s.delay||0;let{elapsed:d=0}=s;d-=r(h);let p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...c,delay:-d,onUpdate:t=>{e.set(t),c.onUpdate&&c.onUpdate(t)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:t,motionValue:e,element:o?void 0:i};(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(c)||(p={...p,...ns(t,p)}),p.duration&&(p.duration=r(p.duration)),p.repeatDelay&&(p.repeatDelay=r(p.repeatDelay)),void 0!==p.from&&(p.keyframes[0]=p.from);let f=!1;if((!1===p.type||0===p.duration&&!p.repeatDelay)&&(p.duration=0,0===p.delay&&(f=!0)),f&&!o&&void 0!==e.get()){const t=wn(p.keyframes,c);if(void 0!==t)return Ct.update(()=>{p.onUpdate(t),p.onComplete()}),new l([])}return!o&&Jn.supports(p)?new Jn(p):new qn(p)};function is({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function rs(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const e in l){const s=t.getValue(e,null!==(r=t.latestValues[e])&&void 0!==r?r:null),i=l[e];if(void 0===i||h&&is(h,e))continue;const a={delay:n,...u(o||{},e)};let d=!1;if(window.MotionHandoffAnimation){const n=qt(t);if(n){const t=window.MotionHandoffAnimation(n,e,Ct);null!==t&&(a.startTime=t,d=!0)}}$t(t,e),s.start(ss(e,s,i,t.shouldReduceMotion&&Mt.has(e)?{type:!1}:a,t,d));const p=s.animation;p&&c.push(p)}return a&&Promise.all(c).then(()=>{Ct.update(()=>{a&&Ut(t,a)})}),c}const os=()=>({x:{min:0,max:0},y:{min:0,max:0}}),as={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"]},ls={};for(const t in as)ls[t]={isEnabled:e=>as[t].some(t=>!!e[t])};const us="undefined"!=typeof window,cs={current:null},hs={current:!1};const ds=[...pn,Ve,Oe];const ps=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function fs(t){return null!==(e=t.animate)&&"object"==typeof e&&"function"==typeof e.start||ps.some(e=>function(t){return"string"==typeof t||Array.isArray(t)}(t[e]));var e}const ms=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class gs{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=nn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=Bt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,Ct.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:u}=r;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(i),this.isControllingVariants=fs(e),this.isVariantNode=function(t){return Boolean(fs(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]&&lt(e)&&e.set(a[t],!1)}}mount(t){this.current=t,St.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)),hs.current||function(){if(hs.current=!0,us)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>cs.current=t.matches;t.addListener(e),e()}else cs.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||cs.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){St.delete(this.current),this.projection&&this.projection.unmount(),Ft(this.notifyUpdate),Ft(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Vt.has(t),s=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Ct.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 ls){const e=ls[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<ms.length;e++){const n=ms[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(lt(i))t.addValue(s,i);else if(lt(r))t.addValue(s,Nt(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,Nt(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=Nt(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let s=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var i;return null!=s&&("string"==typeof s&&(sn(s)||re(s))?s=parseFloat(s):(i=s,!ds.find(dn(i))&&Oe.test(e)&&(s=Ue(t,e))),this.setBaseTarget(t,lt(s)?s.get():s)),lt(s)?s.get():s}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let s;if("string"==typeof n||"object"==typeof n){const i=jt(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);i&&(s=i[t])}if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||lt(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new Dt),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class vs extends gs{constructor(){super(...arguments),this.KeyframeResolver=mn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;lt(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,ws={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},bs=At.length;function Ts(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(Vt.has(t))o=!0;else if(on(t))i[t]=n;else{const e=ys(n,Ke[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<bs;r++){const o=At[r],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,Ke[o]);if(!l){i=!1;s+=`${ws[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 xs={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ss={offset:"strokeDashoffset",array:"strokeDasharray"};function As(t,e,n){return"string"==typeof t?t:be.transform(e+n*t)}function Vs(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Ts(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!==i||void 0!==r||p.transform)&&(p.transformOrigin=function(t,e,n){return`${As(e,t.x,t.width)} ${As(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?xs:Ss;t[r.offset]=be.transform(-s);const o=be.transform(e),a=be.transform(n);t[r.array]=`${o} ${a}`}(d,o,a,l,!1)}const Ms=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 Ps(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 ks={};function Es(t,{layout:e,layoutId:n}){return Vt.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!ks[t]||"opacity"===t)}function Cs(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(lt(i[o])||e.style&&lt(e.style[o])||Es(o,t)||void 0!==(null===(s=null==n?void 0:n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(r[o]=i[o]);return r}class Fs extends vs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=os}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Vt.has(e)){const t=ze(e);return t&&t.default||0}return e=Ms.has(e)?e:Ht(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return function(t,e,n){const s=Cs(t,e,n);for(const n in t)if(lt(t[n])||lt(e[n])){s[-1!==At.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return s}(t,e,n)}build(t,e,n){Vs(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,s){!function(t,e,n,s){Ps(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(Ms.has(n)?n:Ht(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 Os extends vs{constructor(){super(...arguments),this.type="html",this.renderInstance=Ps}readValueFromInstance(t,e){if(Vt.has(e)){const t=ze(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),i=(on(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){Ts(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Cs(t,e,n)}}class Is extends gs{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 Ls(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 Fs(e):new Os(e);n.mount(t),St.set(t,n)}function Rs(t){const e=new Is({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),St.set(t,e)}function Bs(t,e,n,s){const i=[];if(function(t,e){return lt(t)||"number"==typeof t||"string"==typeof t&&!ut(e)}(t,e))i.push(function(t,e,n){const s=lt(t)?t:Nt(t);return s.start(ss("",s,e,n)),s.animation}(t,ut(e)&&e.default||e,n&&n.default||n));else{const r=ct(t,e,s),o=r.length;for(let t=0;t<o;t++){const s=r[t],a=s instanceof Element?Ls:Rs;St.has(s)||a(s);const l=St.get(s),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,o)),i.push(...rs(l,{...e,transition:u},{}))}}return i}function Ds(t,e,n){const s=[];return function(t,{defaultTransition:e={},...n}={},s,o){const a=e.duration||.3,l=new Map,u=new Map,c={},p=new Map;let f=0,m=0,g=0;for(let n=0;n<t.length;n++){const i=t[n];if("string"==typeof i){p.set(i,m);continue}if(!Array.isArray(i)){p.set(i.name,dt(m,i.at,f,p));continue}let[l,v,y={}]=i;void 0!==y.at&&(m=dt(m,y.at,f,p));let w=0;const b=(t,n,s,i=0,l=0)=>{const u=wt(t),{delay:c=0,times:p=at(u),type:f="keyframes",repeat:v,repeatType:y,repeatDelay:b=0,...T}=n;let{ease:x=e.ease||"easeOut",duration:S}=n;const A="function"==typeof c?c(i,l):c,V=u.length,M=d(f)?f:null==o?void 0:o[f];if(V<=2&&M){let t=100;if(2===V&&xt(u)){const e=u[1]-u[0];t=Math.abs(e)}const e={...T};void 0!==S&&(e.duration=r(S));const n=h(e,t,M);x=n.ease,S=n.duration}null!=S||(S=a);const P=m+A;1===p.length&&0===p[0]&&(p[1]=1);const k=p.length-u.length;if(k>0&&ot(p,k),1===u.length&&u.unshift(null),v){S=ht(S,v);const t=[...u],e=[...p];x=Array.isArray(x)?[...x]:[x];const n=[...x];for(let s=0;s<v;s++){u.push(...t);for(let i=0;i<t.length;i++)p.push(e[i]+(s+1)),x.push(0===i?"linear":it(n,i-1))}mt(p,v)}const E=P+S;ft(s,u,x,p,P,E),w=Math.max(A+S,w),g=Math.max(E,g)};if(lt(l)){b(v,y,yt("default",vt(l,u)))}else{const t=ct(l,v,s,c),e=t.length;for(let n=0;n<e;n++){v=v,y=y;const s=vt(t[n],u);for(const t in v)b(v[t],bt(y,t),yt(t,s),n,e)}}f=m,m+=w}return u.forEach((t,s)=>{for(const r in t){const o=t[r];o.sort(gt);const a=[],u=[],c=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:s}=o[t];a.push(n),u.push(i(0,g,e)),c.push(s||"easeOut")}0!==u[0]&&(u.unshift(0),a.unshift(a[0]),c.unshift("easeInOut")),1!==u[u.length-1]&&(u.push(1),a.push(null)),l.has(s)||l.set(s,{keyframes:{},transition:{}});const h=l.get(s);h.keyframes[r]=a,h.transition[r]={...e,duration:g,ease:c,times:u,...n}}}),l}(t,e,n,{spring:et}).forEach(({keyframes:t,transition:e},n)=>{s.push(...Bs(n,t,e))}),s}function Ws(t){return function(e,n,s){let i=[];var r;r=e,i=Array.isArray(r)&&r.some(Array.isArray)?Ds(e,n,t):Bs(e,n,s,t);const o=new l(i);return t&&t.animations.push(o),o}}const Ns=Ws();function Ks(t,e,n){t.style.setProperty("--"+e,n)}function js(t,e,n){t.style[e]=n}const zs=s(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Us=new WeakMap;function $s(t){const e=Us.get(t)||new Map;return Us.set(t,e),Us.get(t)}class Hs extends class{constructor(t){this.animation=t}get duration(){var t,e,n;const s=(null===(e=null===(t=this.animation)||void 0===t?void 0:t.effect)||void 0===e?void 0:e.getComputedTiming().duration)||(null===(n=this.options)||void 0===n?void 0:n.duration)||300;return o(Number(s))}get time(){var t;return this.animation?o((null===(t=this.animation)||void 0===t?void 0:t.currentTime)||0):0}set time(t){this.animation&&(this.animation.currentTime=r(t))}get speed(){return this.animation?this.animation.playbackRate:1}set speed(t){this.animation&&(this.animation.playbackRate=t)}get state(){return this.animation?this.animation.playState:"finished"}get startTime(){return this.animation?this.animation.startTime:null}get finished(){return this.animation?this.animation.finished:Promise.resolve()}play(){this.animation&&this.animation.play()}pause(){this.animation&&this.animation.pause()}stop(){this.animation&&"idle"!==this.state&&"finished"!==this.state&&(this.animation.commitStyles&&this.animation.commitStyles(),this.cancel())}flatten(){var t;this.animation&&(null===(t=this.animation.effect)||void 0===t||t.updateTiming({easing:"linear"}))}attachTimeline(t){return this.animation&&p(this.animation,t),e}complete(){this.animation&&this.animation.finish()}cancel(){try{this.animation&&this.animation.cancel()}catch(t){}}}{constructor(t,e,s,i){const o=e.startsWith("--");n("string"!=typeof i.type);const a=$s(t).get(e);a&&a.stop();if(Array.isArray(s)||(s=[s]),function(t,e,n){for(let s=0;s<e.length;s++)null===e[s]&&(e[s]=0===s?n():e[s-1]),"number"==typeof e[s]&&De[t]&&(e[s]=De[t].transform(e[s]));!zs()&&e.length<2&&e.unshift(n())}(e,s,()=>e.startsWith("--")?t.style.getPropertyValue(e):window.getComputedStyle(t)[e]),d(i.type)){const t=h(i,100,i.type);i.ease=v()?t.ease:"easeOut",i.duration=r(t.duration),i.type="keyframes"}else i.ease=i.ease||"easeOut";const l=()=>{this.setValue(t,e,wn(s,i)),this.cancel(),this.resolveFinishedPromise()},u=()=>{this.setValue=o?Ks:js,this.options=i,this.updateFinishedPromise(),this.removeAnimation=()=>{const n=Us.get(t);n&&n.delete(e)}};Zn()?(super(Gn(t,e,s,i)),u(),!1===i.autoplay&&this.animation.pause(),this.animation.onfinish=l,$s(t).set(e,this)):(super(),u(),l())}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}play(){"finished"===this.state&&this.updateFinishedPromise(),super.play()}cancel(){this.removeAnimation(),super.cancel()}}const Ys=(t=>function(e,n,s){return new l(function(t,e,n,s){const i=V(t,s),o=i.length,a=[];for(let t=0;t<o;t++){const s=i[t],l={...n};"function"==typeof l.delay&&(l.delay=l.delay(t,o));for(const t in e){const n=e[t],i={...u(l,t)};i.duration=i.duration?r(i.duration):i.duration,i.delay=r(i.delay||0),a.push(new Hs(s,t,n,i))}}return a}(e,n,s,t))})();function qs(t,e){let n;const s=()=>{const{currentTime:s}=e,i=(null===s?0:s.value)/100;n!==i&&t(i),n=i};return Ct.update(s,!0),()=>Ft(s)}const Xs=new WeakMap;let Gs;function Zs({target:t,contentRect:e,borderBoxSize:n}){var s;null===(s=Xs.get(t))||void 0===s||s.forEach(s=>{s({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function _s(t){t.forEach(Zs)}function Js(t,e){Gs||"undefined"!=typeof ResizeObserver&&(Gs=new ResizeObserver(_s));const n=V(t);return n.forEach(t=>{let n=Xs.get(t);n||(n=new Set,Xs.set(t,n)),n.add(e),null==Gs||Gs.observe(t)}),()=>{n.forEach(t=>{const n=Xs.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Gs||Gs.unobserve(t)})}}const Qs=new Set;let ti;function ei(t){return Qs.add(t),ti||(ti=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Qs.forEach(t=>t(e))},window.addEventListener("resize",ti)),()=>{Qs.delete(t),!Qs.size&&ti&&(ti=void 0)}}const ni={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function si(t,e,n,s){const r=n[e],{length:o,position:a}=ni[e],l=r.current,u=n.time;r.current=t["scroll"+a],r.scrollLength=t["scroll"+o]-t["client"+o],r.offset.length=0,r.offset[0]=0,r.offset[1]=r.scrollLength,r.progress=i(0,r.scrollLength,r.current);const c=s-u;r.velocity=c>50?0:R(r.current-l,c)}const ii={start:0,center:.5,end:1};function ri(t,e,n=0){let s=0;if(t in ii&&(t=ii[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 oi=[0,0];function ai(t,e,n,s){let i=Array.isArray(t)?t:oi,r=0,o=0;return"number"==typeof t?i=[t,t]:"string"==typeof t&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,ii[t]?t:"0"]),r=ri(i[0],n,s),o=ri(i[1],e),r-o}const li={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ui={x:0,y:0};function ci(t,e,n){const{offset:s=li.All}=n,{target:i=t,axis:r="y"}=n,o="y"===r?"height":"width",a=i!==t?function(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(s instanceof HTMLElement)n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if("svg"===s.tagName){const t=s.getBoundingClientRect();s=s.parentElement;const e=s.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(s instanceof SVGGraphicsElement))break;{const{x:t,y:e}=s.getBBox();n.x+=t,n.y+=e;let i=null,r=s.parentNode;for(;!i;)"svg"===r.tagName&&(i=r),r=s.parentNode;s=i}}return n}(i,t):ui,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(i),u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let c=!e[r].interpolate;const h=s.length;for(let t=0;t<h;t++){const n=ai(s[t],u[o],l[o],a[r]);c||n===e[r].interpolatorOffsets[t]||(c=!0),e[r].offset[t]=n}c&&(e[r].interpolate=zn(e[r].offset,at(s),{clamp:!1}),e[r].interpolatorOffsets=[...e[r].offset]),e[r].progress=L(0,1,e[r].interpolate(e[r].current))}function hi(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){si(t,"x",e,n),si(t,"y",e,n),e.time=n}(t,n,e),(s.offset||s.target)&&ci(t,n,s)},notify:()=>e(n)}}const di=new WeakMap,pi=new WeakMap,fi=new WeakMap,mi=t=>t===document.documentElement?window:t;function gi(t,{container:e=document.documentElement,...n}={}){let s=fi.get(e);s||(s=new Set,fi.set(e,s));const i=hi(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),!di.has(e)){const t=()=>{for(const t of s)t.measure()},n=()=>{for(const t of s)t.update(Ot.timestamp)},i=()=>{for(const t of s)t.notify()},a=()=>{Ct.read(t,!1,!0),Ct.read(n,!1,!0),Ct.update(i,!1,!0)};di.set(e,a);const l=mi(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&pi.set(e,(o=a,"function"==typeof(r=e)?ei(r):Js(r,o))),l.addEventListener("scroll",a,{passive:!0})}var r,o;const a=di.get(e);return Ct.read(a,!1,!0),()=>{var t;Ft(a);const n=fi.get(e);if(!n)return;if(n.delete(i),n.size)return;const s=di.get(e);di.delete(e),s&&(mi(e).removeEventListener("scroll",s),null===(t=pi.get(e))||void 0===t||t(),window.removeEventListener("resize",s))}}const vi=new Map;function yi({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),vi.has(e)||vi.set(e,{});const s=vi.get(e);return s[n]||(s[n]=a()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const s={value:0},i=gi(t=>{s.value=100*t[n].progress},{container:e,axis:n});return{currentTime:s,cancel:i}}({source:e,axis:n})),s[n]}function wi(t){return t&&(t.target||t.offset)}const bi={some:0,all:1};const Ti=(t,e)=>Math.abs(t-e);const xi=Ct,Si=Et.reduce((t,e)=>(t[e]=t=>Ft(t),t),{});t.MotionValue=Wt,t.animate=Ns,t.animateMini=Ys,t.anticipate=ee,t.backIn=Qt,t.backInOut=te,t.backOut=Jt,t.cancelFrame=Ft,t.cancelSync=Si,t.circIn=ne,t.circInOut=ie,t.circOut=se,t.clamp=L,t.createScopedAnimate=Ws,t.cubicBezier=Gt,t.delay=function(t,e){return function(t,e){const n=Bt.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(Ft(s),t(r-e))};return Ct.read(s,!0),()=>Ft(s)}(t,r(e))},t.distance=Ti,t.distance2D=function(t,e){const n=Ti(t.x,e.x),s=Ti(t.y,e.y);return Math.sqrt(n**2+s**2)},t.easeIn=Dn,t.easeInOut=Nn,t.easeOut=Wn,t.frame=Ct,t.frameData=Ot,t.frameSteps=It,t.hover=function(t,e,n={}){const[s,i,r]=M(t,n),o=t=>{if(!P(t))return;const{target:n}=t,s=e(n,t);if("function"!=typeof s||!n)return;const r=t=>{P(t)&&(s(t),n.removeEventListener("pointerleave",r))};n.addEventListener("pointerleave",r,i)};return s.forEach(t=>{t.addEventListener("pointerenter",o,i)}),r},t.inView=function(t,e,{root:n,margin:s,amount:i="some"}={}){const r=V(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:bi[i]});return r.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=Bn,t.interpolate=zn,t.invariant=n,t.isDragActive=A,t.keyframes=Un,t.mirrorEasing=Zt,t.mix=Rn,t.motionValue=Nt,t.noop=e,t.pipe=kn,t.press=function(t,e,n={}){const[s,i,r]=M(t,n),o=t=>{const s=t.currentTarget;if(!I(t)||C.has(s))return;C.add(s);const r=e(s,t),o=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),I(t)&&C.has(s)&&(C.delete(s),"function"==typeof r&&r(t,{success:e}))},a=t=>{o(t,n.useGlobalTarget||k(s,t.target))},l=t=>{o(t,!1)};window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",l,i)};return s.forEach(t=>{(function(t){return E.has(t.tagName)||-1!==t.tabIndex})(t)||null!==t.getAttribute("tabindex")||(t.tabIndex=0);(n.useGlobalTarget?window:t).addEventListener("pointerdown",o,i),t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const s=F(()=>{if(C.has(n))return;O(n,"down");const t=F(()=>{O(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>O(n,"cancel"),e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)})(t,i),i)}),r},t.progress=i,t.reverseEasing=_t,t.scroll=function(t,{axis:n="y",...s}={}){const i={axis:n,...s};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||wi(e)?gi(n=>{t(n[e.axis].progress,n)},e):qs(t,yi(e))}(t,i):function(t,n){if(t.flatten(),wi(n))return t.pause(),gi(e=>{t.time=t.duration*e[n.axis].progress},n);{const s=yi(n);return t.attachTimeline?t.attachTimeline(s,t=>(t.pause(),qs(e=>{t.time=t.duration*e},s))):e}}(t,i)},t.scrollInfo=gi,t.spring=et,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 l=t*a;if(s){const e=r*t;l=jn(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,i="end"===e?Math.floor(s):Math.ceil(s);return L(0,1,i/t)}},t.sync=xi,t.time=Bt,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=zn(i,r,{mixer:(l=r[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...o});var l;return e?a(s):a},t.wrap=nt}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "motion",
3
- "version": "12.0.0-alpha.2",
3
+ "version": "12.0.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",
@@ -46,7 +46,7 @@
46
46
  "types": "dist/index.d.ts",
47
47
  "author": "Matt Perry",
48
48
  "license": "MIT",
49
- "repository": "https://github.com/framer/motion/",
49
+ "repository": "https://github.com/motiondivision/motion",
50
50
  "sideEffects": false,
51
51
  "keywords": [
52
52
  "javascript animation",
@@ -70,13 +70,13 @@
70
70
  "postpublish": "git push --tags"
71
71
  },
72
72
  "dependencies": {
73
- "framer-motion": "^12.0.0-alpha.2",
73
+ "framer-motion": "^12.0.0",
74
74
  "tslib": "^2.4.0"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@emotion/is-prop-valid": "*",
78
- "react": "^19.0.0-rc.1",
79
- "react-dom": "^19.0.0-rc.1"
78
+ "react": "^18.0.0 || ^19.0.0",
79
+ "react-dom": "^18.0.0 || ^19.0.0"
80
80
  },
81
81
  "peerDependenciesMeta": {
82
82
  "@emotion/is-prop-valid": {
@@ -89,5 +89,5 @@
89
89
  "optional": true
90
90
  }
91
91
  },
92
- "gitHead": "2f0a067c84ed852c279092acb4ae3e0cfe06db76"
92
+ "gitHead": "61d6a9be748fa01c694c1a92fb1ca12f4bcbed2c"
93
93
  }
@@ -1,47 +0,0 @@
1
- (node:58247) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
2
- (Use `node --trace-warnings ...` to show where the warning was created)
3
- 
4
- lib/index.js → dist/motion.dev.js...
5
- created dist/motion.dev.js in 459ms
6
- 
7
- lib/index.js → dist/motion.js...
8
- created dist/motion.js in 775ms
9
- 
10
- lib/index.js → dist/cjs...
11
- created dist/cjs in 313ms
12
- 
13
- lib/react-client.js → dist/cjs...
14
- created dist/cjs in 321ms
15
- 
16
- lib/react.js → dist/cjs...
17
- created dist/cjs in 37ms
18
- 
19
- lib/mini.js → dist/cjs...
20
- created dist/cjs in 46ms
21
- 
22
- lib/react-mini.js → dist/cjs...
23
- created dist/cjs in 69ms
24
- 
25
- lib/react-m.js → dist/cjs...
26
- created dist/cjs in 75ms
27
- 
28
- lib/index.js, lib/mini.js, lib/react.js, lib/react-mini.js, lib/react-client.js, lib/react-m.js → dist/es...
29
- created dist/es in 552ms
30
- 
31
- types/index.d.ts → dist/index.d.ts...
32
- created dist/index.d.ts in 9ms
33
- 
34
- types/react.d.ts → dist/react.d.ts...
35
- created dist/react.d.ts in 4ms
36
- 
37
- types/react-mini.d.ts → dist/react-mini.d.ts...
38
- created dist/react-mini.d.ts in 3ms
39
- 
40
- types/react-m.d.ts → dist/react-m.d.ts...
41
- created dist/react-m.d.ts in 2ms
42
- 
43
- types/mini.d.ts → dist/mini.d.ts...
44
- created dist/mini.d.ts in 2ms
45
- 
46
- types/react-client.d.ts → dist/react-client.d.ts...
47
- created dist/react-client.d.ts in 2ms
@@ -1,53 +0,0 @@
1
- function createLock(name) {
2
- let lock = null;
3
- return () => {
4
- const openLock = () => {
5
- lock = null;
6
- };
7
- if (lock === null) {
8
- lock = name;
9
- return openLock;
10
- }
11
- return false;
12
- };
13
- }
14
- const globalHorizontalLock = createLock("dragHorizontal");
15
- const globalVerticalLock = createLock("dragVertical");
16
- function getGlobalLock(drag) {
17
- let lock = false;
18
- if (drag === "y") {
19
- lock = globalVerticalLock();
20
- }
21
- else if (drag === "x") {
22
- lock = globalHorizontalLock();
23
- }
24
- else {
25
- const openHorizontal = globalHorizontalLock();
26
- const openVertical = globalVerticalLock();
27
- if (openHorizontal && openVertical) {
28
- lock = () => {
29
- openHorizontal();
30
- openVertical();
31
- };
32
- }
33
- else {
34
- // Release the locks because we don't use them
35
- if (openHorizontal)
36
- openHorizontal();
37
- if (openVertical)
38
- openVertical();
39
- }
40
- }
41
- return lock;
42
- }
43
- function isDragActive() {
44
- // Check the gesture lock - if we get it, it means no drag gesture is active
45
- // and we can safely fire the tap gesture.
46
- const openGestureLock = getGlobalLock(true);
47
- if (!openGestureLock)
48
- return true;
49
- openGestureLock();
50
- return false;
51
- }
52
-
53
- export { createLock, getGlobalLock, isDragActive };
@@ -1,5 +0,0 @@
1
- import { memo } from '../../../utils/memo.mjs';
2
-
3
- const supportsScrollTimeline = memo(() => window.ScrollTimeline !== undefined);
4
-
5
- export { supportsScrollTimeline };
@@ -1,28 +0,0 @@
1
- import { invariant } from '../../../utils/errors.mjs';
2
-
3
- function resolveElements(elements, scope, selectorCache) {
4
- var _a;
5
- if (typeof elements === "string") {
6
- let root = document;
7
- if (scope) {
8
- invariant(Boolean(scope.current), "Scope provided, but no element detected.");
9
- root = scope.current;
10
- }
11
- if (selectorCache) {
12
- (_a = selectorCache[elements]) !== null && _a !== void 0 ? _a : (selectorCache[elements] = root.querySelectorAll(elements));
13
- elements = selectorCache[elements];
14
- }
15
- else {
16
- elements = root.querySelectorAll(elements);
17
- }
18
- }
19
- else if (elements instanceof Element) {
20
- elements = [elements];
21
- }
22
- /**
23
- * Return an empty array
24
- */
25
- return Array.from(elements || []);
26
- }
27
-
28
- export { resolveElements };
package/lib/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from "framer-motion/dom";
2
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
package/lib/mini.js DELETED
@@ -1,2 +0,0 @@
1
- export * from "framer-motion/dom/mini";
2
- //# sourceMappingURL=mini.js.map
package/lib/mini.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"mini.js","sourceRoot":"","sources":["../src/mini.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA"}
@@ -1,3 +0,0 @@
1
- "use client";
2
- export * from "framer-motion/client";
3
- //# sourceMappingURL=react-client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-client.js","sourceRoot":"","sources":["../src/react-client.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,cAAc,sBAAsB,CAAA"}
package/lib/react-m.js DELETED
@@ -1,3 +0,0 @@
1
- "use client";
2
- export * from "framer-motion/m";
3
- //# sourceMappingURL=react-m.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-m.js","sourceRoot":"","sources":["../src/react-m.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,cAAc,iBAAiB,CAAA"}
package/lib/react-mini.js DELETED
@@ -1,3 +0,0 @@
1
- "use client";
2
- export * from "framer-motion/mini";
3
- //# sourceMappingURL=react-mini.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-mini.js","sourceRoot":"","sources":["../src/react-mini.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,cAAc,oBAAoB,CAAA"}
package/lib/react.js DELETED
@@ -1,3 +0,0 @@
1
- "use client";
2
- export * from "framer-motion";
3
- //# sourceMappingURL=react.js.map
package/lib/react.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,cAAc,eAAe,CAAA"}