framer-motion 7.0.3 → 7.1.2

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 (186) hide show
  1. package/dist/cjs/index.js +2090 -2304
  2. package/dist/es/animation/animate.mjs +4 -5
  3. package/dist/es/animation/animation-controls.mjs +22 -24
  4. package/dist/es/animation/use-animated-state.mjs +23 -25
  5. package/dist/es/animation/use-animation.mjs +2 -2
  6. package/dist/es/animation/utils/default-transitions.mjs +13 -14
  7. package/dist/es/animation/utils/easing.mjs +20 -21
  8. package/dist/es/animation/utils/is-animatable.mjs +1 -1
  9. package/dist/es/animation/utils/is-keyframes-target.mjs +1 -1
  10. package/dist/es/animation/utils/transitions.mjs +30 -31
  11. package/dist/es/components/AnimatePresence/PresenceChild.mjs +18 -31
  12. package/dist/es/components/AnimatePresence/index.mjs +33 -35
  13. package/dist/es/components/AnimatePresence/use-presence.mjs +5 -5
  14. package/dist/es/components/AnimateSharedLayout.mjs +4 -5
  15. package/dist/es/components/LayoutGroup/index.mjs +12 -16
  16. package/dist/es/components/LazyMotion/index.mjs +9 -10
  17. package/dist/es/components/MotionConfig/index.mjs +5 -5
  18. package/dist/es/components/Reorder/Group.mjs +16 -16
  19. package/dist/es/components/Reorder/Item.mjs +14 -18
  20. package/dist/es/components/Reorder/index.mjs +3 -3
  21. package/dist/es/components/Reorder/utils/check-reorder.mjs +6 -6
  22. package/dist/es/context/DeprecatedLayoutGroupContext.mjs +1 -1
  23. package/dist/es/context/LayoutGroupContext.mjs +1 -1
  24. package/dist/es/context/LazyContext.mjs +1 -1
  25. package/dist/es/context/MotionConfigContext.mjs +2 -2
  26. package/dist/es/context/MotionContext/create.mjs +2 -2
  27. package/dist/es/context/MotionContext/index.mjs +1 -1
  28. package/dist/es/context/MotionContext/utils.mjs +1 -1
  29. package/dist/es/context/PresenceContext.mjs +1 -1
  30. package/dist/es/context/ReorderContext.mjs +1 -1
  31. package/dist/es/context/SwitchLayoutGroupContext.mjs +1 -1
  32. package/dist/es/events/event-info.mjs +11 -17
  33. package/dist/es/events/use-dom-event.mjs +4 -5
  34. package/dist/es/events/use-pointer-event.mjs +2 -2
  35. package/dist/es/events/utils.mjs +3 -9
  36. package/dist/es/gestures/PanSession.mjs +42 -47
  37. package/dist/es/gestures/drag/VisualElementDragControls.mjs +147 -157
  38. package/dist/es/gestures/drag/use-drag-controls.mjs +10 -12
  39. package/dist/es/gestures/drag/use-drag.mjs +4 -4
  40. package/dist/es/gestures/drag/utils/constraints.mjs +12 -17
  41. package/dist/es/gestures/drag/utils/lock.mjs +17 -17
  42. package/dist/es/gestures/use-focus-gesture.mjs +3 -4
  43. package/dist/es/gestures/use-hover-gesture.mjs +2 -3
  44. package/dist/es/gestures/use-pan-gesture.mjs +9 -10
  45. package/dist/es/gestures/use-tap-gesture.mjs +5 -6
  46. package/dist/es/gestures/utils/event-type.mjs +1 -1
  47. package/dist/es/gestures/utils/is-node-or-child.mjs +1 -1
  48. package/dist/es/index.mjs +1 -0
  49. package/dist/es/motion/features/animations.mjs +9 -11
  50. package/dist/es/motion/features/definitions.mjs +5 -5
  51. package/dist/es/motion/features/drag.mjs +1 -1
  52. package/dist/es/motion/features/gestures.mjs +1 -1
  53. package/dist/es/motion/features/layout/MeasureLayout.mjs +32 -40
  54. package/dist/es/motion/features/layout/index.mjs +1 -1
  55. package/dist/es/motion/features/use-features.mjs +8 -9
  56. package/dist/es/motion/features/use-projection.mjs +10 -11
  57. package/dist/es/motion/features/viewport/observers.mjs +12 -12
  58. package/dist/es/motion/features/viewport/use-viewport.mjs +17 -20
  59. package/dist/es/motion/index.mjs +13 -16
  60. package/dist/es/motion/utils/VisualElementHandler.mjs +10 -16
  61. package/dist/es/motion/utils/is-forced-motion-value.mjs +1 -2
  62. package/dist/es/motion/utils/make-renderless-component.mjs +2 -2
  63. package/dist/es/motion/utils/use-motion-ref.mjs +1 -1
  64. package/dist/es/motion/utils/use-visual-element.mjs +13 -13
  65. package/dist/es/motion/utils/use-visual-state.mjs +26 -31
  66. package/dist/es/motion/utils/valid-prop.mjs +1 -1
  67. package/dist/es/projection/animation/mix-values.mjs +12 -16
  68. package/dist/es/projection/geometry/conversion.mjs +4 -6
  69. package/dist/es/projection/geometry/delta-apply.mjs +14 -20
  70. package/dist/es/projection/geometry/delta-calc.mjs +2 -5
  71. package/dist/es/projection/geometry/delta-remove.mjs +6 -13
  72. package/dist/es/projection/geometry/models.mjs +7 -7
  73. package/dist/es/projection/node/DocumentProjectionNode.mjs +5 -5
  74. package/dist/es/projection/node/HTMLProjectionNode.mjs +8 -10
  75. package/dist/es/projection/node/create-projection-node.mjs +283 -307
  76. package/dist/es/projection/node/group.mjs +6 -8
  77. package/dist/es/projection/node/id.mjs +2 -2
  78. package/dist/es/projection/node/state.mjs +1 -1
  79. package/dist/es/projection/shared/stack.mjs +26 -27
  80. package/dist/es/projection/styles/scale-border-radius.mjs +5 -5
  81. package/dist/es/projection/styles/scale-box-shadow.mjs +18 -19
  82. package/dist/es/projection/styles/scale-correction.mjs +1 -1
  83. package/dist/es/projection/styles/transform.mjs +12 -12
  84. package/dist/es/projection/use-reset-projection.mjs +2 -2
  85. package/dist/es/projection/utils/has-transform.mjs +1 -2
  86. package/dist/es/projection/utils/measure.mjs +2 -2
  87. package/dist/es/render/dom/create-visual-element.mjs +1 -1
  88. package/dist/es/render/dom/features-animation.mjs +1 -2
  89. package/dist/es/render/dom/features-max.mjs +1 -2
  90. package/dist/es/render/dom/motion-minimal.mjs +1 -1
  91. package/dist/es/render/dom/motion-proxy.mjs +3 -4
  92. package/dist/es/render/dom/motion.mjs +2 -5
  93. package/dist/es/render/dom/use-render.mjs +6 -9
  94. package/dist/es/render/dom/utils/camel-to-dash.mjs +3 -5
  95. package/dist/es/render/dom/utils/create-config.mjs +5 -5
  96. package/dist/es/render/dom/utils/css-variables-conversion.mjs +19 -20
  97. package/dist/es/render/dom/utils/filter-props.mjs +4 -6
  98. package/dist/es/render/dom/utils/parse-dom-variant.mjs +2 -2
  99. package/dist/es/render/dom/utils/unit-conversion.mjs +68 -99
  100. package/dist/es/render/dom/value-types/animatable-none.mjs +1 -1
  101. package/dist/es/render/dom/value-types/defaults.mjs +4 -5
  102. package/dist/es/render/dom/value-types/dimensions.mjs +2 -4
  103. package/dist/es/render/dom/value-types/find.mjs +2 -3
  104. package/dist/es/render/dom/value-types/get-as-type.mjs +1 -1
  105. package/dist/es/render/dom/value-types/number.mjs +2 -2
  106. package/dist/es/render/dom/value-types/test.mjs +1 -1
  107. package/dist/es/render/dom/value-types/type-auto.mjs +3 -3
  108. package/dist/es/render/dom/value-types/type-int.mjs +1 -2
  109. package/dist/es/render/html/config-motion.mjs +1 -1
  110. package/dist/es/render/html/use-props.mjs +11 -13
  111. package/dist/es/render/html/utils/build-styles.mjs +8 -8
  112. package/dist/es/render/html/utils/build-transform.mjs +11 -16
  113. package/dist/es/render/html/utils/create-render-state.mjs +2 -2
  114. package/dist/es/render/html/utils/render.mjs +2 -3
  115. package/dist/es/render/html/utils/scrape-motion-values.mjs +3 -3
  116. package/dist/es/render/html/utils/transform.mjs +6 -10
  117. package/dist/es/render/html/visual-element.mjs +22 -23
  118. package/dist/es/render/index.mjs +359 -364
  119. package/dist/es/render/svg/config-motion.mjs +2 -3
  120. package/dist/es/render/svg/lowercase-elements.mjs +1 -1
  121. package/dist/es/render/svg/use-props.mjs +5 -6
  122. package/dist/es/render/svg/utils/build-attrs.mjs +2 -2
  123. package/dist/es/render/svg/utils/camel-case-attrs.mjs +1 -1
  124. package/dist/es/render/svg/utils/create-render-state.mjs +1 -2
  125. package/dist/es/render/svg/utils/path.mjs +7 -10
  126. package/dist/es/render/svg/utils/render.mjs +1 -1
  127. package/dist/es/render/svg/utils/scrape-motion-values.mjs +3 -3
  128. package/dist/es/render/svg/utils/transform-origin.mjs +3 -3
  129. package/dist/es/render/svg/visual-element.mjs +6 -4
  130. package/dist/es/render/utils/animation-state.mjs +71 -87
  131. package/dist/es/render/utils/animation.mjs +48 -60
  132. package/dist/es/render/utils/compare-by-depth.mjs +1 -3
  133. package/dist/es/render/utils/flat-tree.mjs +9 -10
  134. package/dist/es/render/utils/lifecycles.mjs +12 -19
  135. package/dist/es/render/utils/motion-values.mjs +16 -8
  136. package/dist/es/render/utils/setters.mjs +19 -19
  137. package/dist/es/render/utils/variants.mjs +6 -8
  138. package/dist/es/utils/array.mjs +9 -10
  139. package/dist/es/utils/is-browser.mjs +1 -1
  140. package/dist/es/utils/is-numerical-string.mjs +1 -1
  141. package/dist/es/utils/is-zero-value-string.mjs +1 -1
  142. package/dist/es/utils/process.mjs +2 -2
  143. package/dist/es/utils/resolve-value.mjs +2 -2
  144. package/dist/es/utils/shallow-compare.mjs +2 -2
  145. package/dist/es/utils/subscription-manager.mjs +15 -17
  146. package/dist/es/utils/time-conversion.mjs +1 -1
  147. package/dist/es/utils/transform.mjs +10 -15
  148. package/dist/es/utils/use-animation-frame.mjs +5 -6
  149. package/dist/es/utils/use-constant.mjs +1 -1
  150. package/dist/es/utils/use-cycle.mjs +9 -10
  151. package/dist/es/utils/use-force-update.mjs +4 -5
  152. package/dist/es/utils/use-in-view.mjs +7 -9
  153. package/dist/es/utils/use-instant-transition-state.mjs +1 -1
  154. package/dist/es/utils/use-instant-transition.mjs +6 -9
  155. package/dist/es/utils/use-is-mounted.mjs +3 -3
  156. package/dist/es/utils/use-isomorphic-effect.mjs +1 -1
  157. package/dist/es/utils/use-reduced-motion.mjs +8 -11
  158. package/dist/es/utils/use-unmount-effect.mjs +1 -1
  159. package/dist/es/utils/warn-once.mjs +1 -1
  160. package/dist/es/value/index.mjs +53 -59
  161. package/dist/es/value/use-combine-values.mjs +3 -3
  162. package/dist/es/value/use-inverted-scale.mjs +9 -11
  163. package/dist/es/value/use-motion-template.mjs +5 -9
  164. package/dist/es/value/use-motion-value.mjs +4 -5
  165. package/dist/es/value/use-on-change.mjs +4 -4
  166. package/dist/es/value/use-scroll.mjs +9 -11
  167. package/dist/es/value/use-spring.mjs +8 -10
  168. package/dist/es/value/use-time.mjs +2 -2
  169. package/dist/es/value/use-transform.mjs +6 -10
  170. package/dist/es/value/use-velocity.mjs +3 -3
  171. package/dist/es/value/use-will-change/index.mjs +50 -0
  172. package/dist/es/value/use-will-change/is.mjs +7 -0
  173. package/dist/es/value/utils/is-motion-value.mjs +1 -1
  174. package/dist/es/value/utils/resolve-motion-value.mjs +1 -1
  175. package/dist/framer-motion.dev.js +2134 -2414
  176. package/dist/framer-motion.js +1 -1
  177. package/dist/index.d.ts +9 -2
  178. package/dist/projection.dev.js +1154 -1300
  179. package/dist/size-rollup-dom-animation.js +1 -1
  180. package/dist/size-rollup-dom-max.js +1 -1
  181. package/dist/size-rollup-m.js +1 -1
  182. package/dist/size-webpack-dom-animation.js +1 -1
  183. package/dist/size-webpack-dom-max.js +1 -1
  184. package/dist/size-webpack-m.js +1 -1
  185. package/dist/three-entry.d.ts +0 -1
  186. package/package.json +12 -12
@@ -1 +1 @@
1
- import t,{useEffect as e,useRef as n,createContext as r,useContext as o,useId as i}from"react";var a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function u(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function l(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function c(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}function d(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function p(t){return!!t.touches}var f={pageX:0,pageY:0};function v(t,e){void 0===e&&(e="page");var n=t.touches[0]||t.changedTouches[0]||f;return{x:n[e+"X"],y:n[e+"Y"]}}function h(t,e){return void 0===e&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function m(t,e){return void 0===e&&(e="page"),{point:p(t)?v(t,e):h(t,e)}}var y=function(t,e){void 0===e&&(e=!1);var n,r=function(e){return t(e,m(e))};return e?(n=r,function(t){var e=t instanceof MouseEvent;(!e||e&&0===t.button)&&n(t)}):r};const g="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),x="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(g()),1/60*1e3);let b=!0,P=!1,w=!1;const A={delta:0,timestamp:0},T=["read","update","preRender","render","postRender"],S=T.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(t,i=!1,s=!1)=>{const u=s&&o,l=u?e:n;return i&&a.add(t),-1===l.indexOf(t)&&(l.push(t),u&&o&&(r=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),a.delete(t)},process:u=>{if(o)i=!0;else{if(o=!0,[e,n]=[n,e],n.length=0,r=e.length,r)for(let n=0;n<r;n++){const r=e[n];r(u),a.has(r)&&(s.schedule(r),t())}o=!1,i&&(i=!1,s.process(u))}}};return s}(()=>P=!0),t),{}),E=T.reduce((t,e)=>{const n=S[e];return t[e]=(t,e=!1,r=!1)=>(P||L(),n.schedule(t,e,r)),t},{}),V=T.reduce((t,e)=>(t[e]=S[e].cancel,t),{}),M=T.reduce((t,e)=>(t[e]=()=>S[e].process(A),t),{}),R=t=>S[t].process(A),C=t=>{P=!1,A.delta=b?1/60*1e3:Math.max(Math.min(t-A.timestamp,40),1),A.timestamp=t,w=!0,T.forEach(R),w=!1,P&&(b=!1,x(C))},L=()=>{P=!0,b=!0,w||x(C)},D=()=>A;var O=function(t){return 1e3*t};function k(t,e,n,r){return void 0===r&&(r={passive:!0}),t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n)}}function j(t,n,r,o){e((function(){var e=t.current;if(r&&e)return k(e,n,r,o)}),[t,n,r,o])}var F="undefined"!=typeof document,U={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},B={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function I(t){return F&&null===window.onpointerdown?t:F&&null===window.ontouchstart?B[t]:F&&null===window.onmousedown?U[t]:t}function N(t,e,n,r){return k(t,I(e),y(n,"pointerdown"===e),r)}function z(t,e,n,r){return j(t,I(e),n&&y(n,"pointerdown"===e),r)}const Y=(t,e,n)=>Math.min(Math.max(n,t),e);function X({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let o,i,a=1-e;a=Y(.05,1,a),t=Y(.01,10,t/1e3),a<1?(o=e=>{const r=e*a,o=r*t;return.001-(r-n)/H(e,a)*Math.exp(-o)},i=e=>{const r=e*a*t,i=r*n+n,s=Math.pow(a,2)*Math.pow(e,2)*t,u=Math.exp(-r),l=H(Math.pow(e,2),a);return(.001-o(e)>0?-1:1)*((i-s)*u)/l}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,i=e=>Math.exp(-e*t)*(t*t*(n-e)));const s=function(t,e,n){let r=n;for(let n=1;n<12;n++)r-=t(r)/e(r);return r}(o,i,5/t);if(t*=1e3,isNaN(s))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(s,2)*r;return{stiffness:e,damping:2*a*Math.sqrt(r*e),duration:t}}}function H(t,e){return t*Math.sqrt(1-e*e)}const W=["duration","bounce"],G=["stiffness","damping","mass"];function $(t,e){return e.some(e=>void 0!==t[e])}function q(t){var{from:e=0,to:n=1,restSpeed:r=2,restDelta:o}=t,i=u(t,["from","to","restSpeed","restDelta"]);const a={done:!1,value:e};let{stiffness:s,damping:l,mass:c,velocity:d,duration:p,isResolvedFromDuration:f}=function(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!$(t,G)&&$(t,W)){const n=X(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(i),v=Z,h=Z;function m(){const t=d?-d/1e3:0,r=n-e,i=l/(2*Math.sqrt(s*c)),a=Math.sqrt(s/c)/1e3;if(void 0===o&&(o=Math.min(Math.abs(n-e)/100,.4)),i<1){const e=H(a,i);v=o=>{const s=Math.exp(-i*a*o);return n-s*((t+i*a*r)/e*Math.sin(e*o)+r*Math.cos(e*o))},h=n=>{const o=Math.exp(-i*a*n);return i*a*o*(Math.sin(e*n)*(t+i*a*r)/e+r*Math.cos(e*n))-o*(Math.cos(e*n)*(t+i*a*r)-e*r*Math.sin(e*n))}}else if(1===i)v=e=>n-Math.exp(-a*e)*(r+(t+a*r)*e);else{const e=a*Math.sqrt(i*i-1);v=o=>{const s=Math.exp(-i*a*o),u=Math.min(e*o,300);return n-s*((t+i*a*r)*Math.sinh(u)+e*r*Math.cosh(u))/e}}}return m(),{next:t=>{const e=v(t);if(f)a.done=t>=p;else{const i=1e3*h(t),s=Math.abs(i)<=r,u=Math.abs(n-e)<=o;a.done=s&&u}return a.value=a.done?n:e,a},flipTarget:()=>{d=-d,[e,n]=[n,e],m()}}}q.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const Z=t=>0,_=(t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r},K=(t,e,n)=>-n*t+n*e+t,J=(t,e)=>n=>Math.max(Math.min(n,e),t),Q=t=>t%1?Number(t.toFixed(5)):t,tt=/(-)?([\d]*\.?[\d])+/g,et=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,nt=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function rt(t){return"string"==typeof t}const ot={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},it=Object.assign(Object.assign({},ot),{transform:J(0,1)}),at=Object.assign(Object.assign({},ot),{default:1}),st=t=>({test:e=>rt(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ut=st("deg"),lt=st("%"),ct=st("px"),dt=st("vh"),pt=st("vw"),ft=Object.assign(Object.assign({},lt),{parse:t=>lt.parse(t)/100,transform:t=>lt.transform(100*t)}),vt=(t,e)=>n=>Boolean(rt(n)&&nt.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),ht=(t,e,n)=>r=>{if(!rt(r))return r;const[o,i,a,s]=r.match(tt);return{[t]:parseFloat(o),[e]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},mt={test:vt("hsl","hue"),parse:ht("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+lt.transform(Q(e))+", "+lt.transform(Q(n))+", "+Q(it.transform(r))+")"},yt=J(0,255),gt=Object.assign(Object.assign({},ot),{transform:t=>Math.round(yt(t))}),xt={test:vt("rgb","red"),parse:ht("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+gt.transform(t)+", "+gt.transform(e)+", "+gt.transform(n)+", "+Q(it.transform(r))+")"};const bt={test:vt("#"),parse:function(t){let e="",n="",r="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,r+=r,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:xt.transform},Pt={test:t=>xt.test(t)||bt.test(t)||mt.test(t),parse:t=>xt.test(t)?xt.parse(t):mt.test(t)?mt.parse(t):bt.parse(t),transform:t=>rt(t)?t:t.hasOwnProperty("red")?xt.transform(t):mt.transform(t)};function wt(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const r=t.match(et);r&&(n=r.length,t=t.replace(et,"${c}"),e.push(...r.map(Pt.parse)));const o=t.match(tt);return o&&(t=t.replace(tt,"${n}"),e.push(...o.map(ot.parse))),{values:e,numColors:n,tokenised:t}}function At(t){return wt(t).values}function Tt(t){const{values:e,numColors:n,tokenised:r}=wt(t),o=e.length;return t=>{let e=r;for(let r=0;r<o;r++)e=e.replace(r<n?"${c}":"${n}",r<n?Pt.transform(t[r]):Q(t[r]));return e}}const St=t=>"number"==typeof t?0:t;const Et={test:function(t){var e,n,r,o;return isNaN(t)&&rt(t)&&(null!==(n=null===(e=t.match(tt))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(o=null===(r=t.match(et))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:At,createTransformer:Tt,getAnimatableNone:function(t){const e=At(t);return Tt(t)(e.map(St))}},Vt=new Set(["brightness","contrast","saturate","opacity"]);function Mt(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(tt)||[];if(!r)return t;const o=n.replace(r,"");let i=Vt.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+o+")"}const Rt=/([a-z-]*)\(.*?\)/g,Ct=Object.assign(Object.assign({},Et),{getAnimatableNone:t=>{const e=t.match(Rt);return e?e.map(Mt).join(" "):t}});function Lt(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 Dt({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let o=0,i=0,a=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,s=2*n-r;o=Lt(s,r,t+1/3),i=Lt(s,r,t),a=Lt(s,r,t-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}const Ot=(t,e,n)=>{const r=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-r)+r))},kt=[bt,xt,mt],jt=t=>kt.find(e=>e.test(t)),Ft=(t,e)=>{let n=jt(t),r=jt(e),o=n.parse(t),i=r.parse(e);n===mt&&(o=Dt(o),n=xt),r===mt&&(i=Dt(i),r=xt);const a=Object.assign({},o);return t=>{for(const e in a)"alpha"!==e&&(a[e]=Ot(o[e],i[e],t));return a.alpha=K(o.alpha,i.alpha,t),n.transform(a)}},Ut=t=>"number"==typeof t,Bt=(t,e)=>n=>e(t(n)),It=(...t)=>t.reduce(Bt);function Nt(t,e){return Ut(t)?n=>K(t,e,n):Pt.test(t)?Ft(t,e):Ht(t,e)}const zt=(t,e)=>{const n=[...t],r=n.length,o=t.map((t,n)=>Nt(t,e[n]));return t=>{for(let e=0;e<r;e++)n[e]=o[e](t);return n}},Yt=(t,e)=>{const n=Object.assign(Object.assign({},t),e),r={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(r[o]=Nt(t[o],e[o]));return t=>{for(const e in r)n[e]=r[e](t);return n}};function Xt(t){const e=Et.parse(t),n=e.length;let r=0,o=0,i=0;for(let t=0;t<n;t++)r||"number"==typeof e[t]?r++:void 0!==e[t].hue?i++:o++;return{parsed:e,numNumbers:r,numRGB:o,numHSL:i}}const Ht=(t,e)=>{const n=Et.createTransformer(e),r=Xt(t),o=Xt(e);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?It(zt(r.parsed,o.parsed),n):n=>""+(n>0?e:t)},Wt=(t,e)=>n=>K(t,e,n);function Gt(t,e,n){const r=[],o=n||("number"==typeof(i=t[0])?Wt:"string"==typeof i?Pt.test(i)?Ft:Ht:Array.isArray(i)?zt:"object"==typeof i?Yt:void 0);var i;const a=t.length-1;for(let n=0;n<a;n++){let i=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;i=It(t,i)}r.push(i)}return r}function $t(t,e,{clamp:n=!0,ease:r,mixer:o}={}){const i=t.length;e.length,!r||!Array.isArray(r)||r.length,t[0]>t[i-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const a=Gt(e,r,o),s=2===i?function([t,e],[n]){return r=>n(_(t,e,r))}(t,a):function(t,e){const n=t.length,r=n-1;return o=>{let i=0,a=!1;if(o<=t[0]?a=!0:o>=t[r]&&(i=r-1,a=!0),!a){let e=1;for(;e<n&&!(t[e]>o||e===r);e++);i=e-1}const s=_(t[i],t[i+1],o);return e[i](s)}}(t,a);return n?e=>s(Y(t[0],t[i-1],e)):s}const qt=t=>e=>1-t(1-e),Zt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,_t=t=>e=>e*e*((t+1)*e-t),Kt=t=>t,Jt=(Qt=2,t=>Math.pow(t,Qt));var Qt;const te=qt(Jt),ee=Zt(Jt),ne=t=>1-Math.sin(Math.acos(t)),re=qt(ne),oe=Zt(re),ie=_t(1.525),ae=qt(ie),se=Zt(ie),ue=(t=>{const e=_t(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),le=t=>{if(1===t||0===t)return t;const e=t*t;return t<4/11?7.5625*e:t<8/11?9.075*e-9.9*t+3.4:t<.9?4356/361*e-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},ce=qt(le);function de(t,e){return t.map(()=>e||ee).splice(0,t.length-1)}function pe({from:t=0,to:e=1,ease:n,offset:r,duration:o=300}){const i={done:!1,value:t},a=Array.isArray(e)?e:[t,e],s=function(t,e){return t.map(t=>t*e)}(r&&r.length===a.length?r:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(a),o);function u(){return $t(s,a,{ease:Array.isArray(n)?n:de(a,n)})}let l=u();return{next:t=>(i.value=l(t),i.done=t>=o,i),flipTarget:()=>{a.reverse(),l=u()}}}const fe={keyframes:pe,spring:q,decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:i}){const a={done:!1,value:e};let s=n*t;const u=e+s,l=void 0===i?u:i(u);return l!==u&&(s=l-e),{next:t=>{const e=-s*Math.exp(-t/r);return a.done=!(e>o||e<-o),a.value=a.done?l:l+e,a},flipTarget:()=>{}}}};function ve(t,e,n=0){return t-e-n}const he=t=>{const e=({delta:e})=>t(e);return{start:()=>E.update(e,!0),stop:()=>V.update(e)}};function me(t){var e,n,{from:r,autoplay:o=!0,driver:i=he,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:c=0,onPlay:d,onStop:p,onComplete:f,onRepeat:v,onUpdate:h}=t,m=u(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let y,g,x,{to:b}=m,P=0,w=m.duration,A=!1,T=!0;const S=function(t){if(Array.isArray(t.to))return pe;if(fe[t.type])return fe[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?pe:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?q:pe}(m);(null===(n=(e=S).needsInterpolation)||void 0===n?void 0:n.call(e,r,b))&&(x=$t([0,100],[r,b],{clamp:!1}),r=0,b=100);const E=S(Object.assign(Object.assign({},m),{from:r,to:b}));function V(){P++,"reverse"===l?(T=P%2==0,a=function(t,e,n=0,r=!0){return r?ve(e+-t,e,n):e-(t-e)+n}(a,w,c,T)):(a=ve(a,w,c),"mirror"===l&&E.flipTarget()),A=!1,v&&v()}function M(t){if(T||(t=-t),a+=t,!A){const t=E.next(Math.max(0,a));g=t.value,x&&(g=x(g)),A=T?t.done:a<=0}null==h||h(g),A&&(0===P&&(null!=w||(w=a)),P<s?function(t,e,n,r){return r?t>=e+n:t<=-n}(a,w,c,T)&&V():(y.stop(),f&&f()))}return o&&(null==d||d(),y=i(M),y.start()),{stop:()=>{null==p||p(),y.stop()}}}function ye(t,e){return e?t*(1e3/e):0}const ge=t=>t.hasOwnProperty("x")&&t.hasOwnProperty("y"),xe=t=>ge(t)&&t.hasOwnProperty("z"),be=(t,e)=>Math.abs(t-e);function Pe(t,e){if(Ut(t)&&Ut(e))return be(t,e);if(ge(t)&&ge(e)){const n=be(t.x,e.x),r=be(t.y,e.y),o=xe(t)&&xe(e)?be(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}const we=(t,e)=>1-3*e+3*t,Ae=(t,e)=>3*e-6*t,Te=t=>3*t,Se=(t,e,n)=>((we(e,n)*t+Ae(e,n))*t+Te(e))*t,Ee=(t,e,n)=>3*we(e,n)*t*t+2*Ae(e,n)*t+Te(e);function Ve(t,e,n,r){if(t===e&&n===r)return Kt;const o=new Float32Array(11);for(let e=0;e<11;++e)o[e]=Se(.1*e,t,n);function i(e){let r=0,i=1;for(;10!==i&&o[i]<=e;++i)r+=.1;--i;const a=r+.1*((e-o[i])/(o[i+1]-o[i])),s=Ee(a,t,n);return s>=.001?function(t,e,n,r){for(let o=0;o<8;++o){const o=Ee(e,n,r);if(0===o)return e;e-=(Se(e,n,r)-t)/o}return e}(e,a,t,n):0===s?a:function(t,e,n,r,o){let i,a,s=0;do{a=e+(n-e)/2,i=Se(a,r,o)-t,i>0?n=a:e=a}while(Math.abs(i)>1e-7&&++s<10);return a}(e,r,r+.1,t,n)}return t=>0===t||1===t?t:Se(i(t),e,r)}var Me=function(){function t(t,e,n){var r=(void 0===n?{}:n).transformPagePoint,o=this;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(o.lastMoveEvent&&o.lastMoveEventInfo){var t=Le(o.lastMoveEventInfo,o.history),e=null!==o.startEvent,n=Pe(t.offset,{x:0,y:0})>=3;if(e||n){var r=t.point,i=D().timestamp;o.history.push(s(s({},r),{timestamp:i}));var a=o.handlers,u=a.onStart,l=a.onMove;e||(u&&u(o.lastMoveEvent,t),o.startEvent=o.lastMoveEvent),l&&l(o.lastMoveEvent,t)}}},this.handlePointerMove=function(t,e){o.lastMoveEvent=t,o.lastMoveEventInfo=Re(e,o.transformPagePoint),d(t)&&0===t.buttons?o.handlePointerUp(t,e):E.update(o.updatePoint,!0)},this.handlePointerUp=function(t,e){o.end();var n=o.handlers,r=n.onEnd,i=n.onSessionEnd,a=Le(Re(e,o.transformPagePoint),o.history);o.startEvent&&r&&r(t,a),i&&i(t,a)},!(p(t)&&t.touches.length>1)){this.handlers=e,this.transformPagePoint=r;var i=Re(m(t),this.transformPagePoint),a=i.point,u=D().timestamp;this.history=[s(s({},a),{timestamp:u})];var l=e.onSessionStart;l&&l(t,Le(i,this.history)),this.removeListeners=It(N(window,"pointermove",this.handlePointerMove),N(window,"pointerup",this.handlePointerUp),N(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),V.update(this.updatePoint)},t}();function Re(t,e){return e?{point:e(t.point)}:t}function Ce(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Le(t,e){var n=t.point;return{point:n,delta:Ce(n,Oe(e)),offset:Ce(n,De(e)),velocity:ke(e,.1)}}function De(t){return t[0]}function Oe(t){return t[t.length-1]}function ke(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,o=Oe(t);n>=0&&(r=t[n],!(o.timestamp-r.timestamp>O(e)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function je(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var Fe=je("dragHorizontal"),Ue=je("dragVertical");function Be(t){var e=!1;if("y"===t)e=Ue();else if("x"===t)e=Fe();else{var n=Fe(),r=Ue();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}function Ie(){var t=Be(!0);return!t||(t(),!1)}function Ne(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function ze(t){return t.max-t.min}function Ye(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=.01),Pe(t,e)<n}function Xe(t,e,n,r){void 0===r&&(r=.5),t.origin=r,t.originPoint=K(e.min,e.max,t.origin),t.scale=ze(n)/ze(e),(Ye(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=K(n.min,n.max,t.origin)-t.originPoint,(Ye(t.translate)||isNaN(t.translate))&&(t.translate=0)}function He(t,e,n,r){Xe(t.x,e.x,n.x,null==r?void 0:r.originX),Xe(t.y,e.y,n.y,null==r?void 0:r.originY)}function We(t,e,n){t.min=n.min+e.min,t.max=t.min+ze(e)}function Ge(t,e,n){t.min=e.min-n.min,t.max=t.min+ze(e)}function $e(t,e,n){Ge(t.x,e.x,n.x),Ge(t.y,e.y,n.y)}function qe(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Ze(t,e){var n,r=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&(r=(n=l([o,r],2))[0],o=n[1]),{min:r,max:o}}var _e;function Ke(t,e,n){return{min:Je(t,e),max:Je(t,n)}}function Je(t,e){var n;return"number"==typeof t?t:null!==(n=t[e])&&void 0!==n?n:0}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(_e||(_e={}));function Qe(t){return[t("x"),t("y")]}function tn(t){var e=t.top;return{x:{min:t.left,max:t.right},y:{min:e,max:t.bottom}}}function en(t){return void 0===t||1===t}function nn(t){var e=t.scale,n=t.scaleX,r=t.scaleY;return!en(e)||!en(n)||!en(r)}function rn(t){return nn(t)||on(t.x)||on(t.y)||t.z||t.rotate||t.rotateX||t.rotateY}function on(t){return t&&"0%"!==t}function an(t,e,n){return n+e*(t-n)}function sn(t,e,n,r,o){return void 0!==o&&(t=an(t,o,r)),an(t,n,r)+e}function un(t,e,n,r,o){void 0===e&&(e=0),void 0===n&&(n=1),t.min=sn(t.min,e,n,r,o),t.max=sn(t.max,e,n,r,o)}function ln(t,e){var n=e.x,r=e.y;un(t.x,n.translate,n.scale,n.originPoint),un(t.y,r.translate,r.scale,r.originPoint)}function cn(t,e){t.min=t.min+e,t.max=t.max+e}function dn(t,e,n){var r=l(n,3),o=r[0],i=r[1],a=r[2],s=void 0!==e[a]?e[a]:.5,u=K(t.min,t.max,s);un(t,e[o],e[i],u,e.scale)}var pn=["x","scaleX","originX"],fn=["y","scaleY","originY"];function vn(t,e){dn(t.x,e,pn),dn(t.y,e,fn)}function hn(t,e){return tn(function(t,e){if(!e)return t;var n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),e))}var mn={linear:Kt,easeIn:Jt,easeInOut:ee,easeOut:te,circIn:ne,circInOut:oe,circOut:re,backIn:ie,backInOut:se,backOut:ae,anticipate:ue,bounceIn:ce,bounceInOut:t=>t<.5?.5*(1-le(1-2*t)):.5*le(2*t-1)+.5,bounceOut:le},yn=function(t){if(Array.isArray(t)){t.length;var e=l(t,4);return Ve(e[0],e[1],e[2],e[3])}return"string"==typeof t?mn[t]:t},gn=function(t,e){return"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Et.test(e)||e.startsWith("url(")))},xn=function(t){return Array.isArray(t)},bn=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},Pn=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}},wn=function(){return{type:"keyframes",ease:"linear",duration:.3}},An=function(t){return{type:"keyframes",duration:.8,values:t}},Tn={x:bn,y:bn,z:bn,rotate:bn,rotateX:bn,rotateY:bn,rotateZ:bn,scaleX:Pn,scaleY:Pn,scale:Pn,opacity:wn,backgroundColor:wn,color:wn,default:Pn},Sn=s(s({},ot),{transform:Math.round}),En={borderWidth:ct,borderTopWidth:ct,borderRightWidth:ct,borderBottomWidth:ct,borderLeftWidth:ct,borderRadius:ct,radius:ct,borderTopLeftRadius:ct,borderTopRightRadius:ct,borderBottomRightRadius:ct,borderBottomLeftRadius:ct,width:ct,maxWidth:ct,height:ct,maxHeight:ct,size:ct,top:ct,right:ct,bottom:ct,left:ct,padding:ct,paddingTop:ct,paddingRight:ct,paddingBottom:ct,paddingLeft:ct,margin:ct,marginTop:ct,marginRight:ct,marginBottom:ct,marginLeft:ct,rotate:ut,rotateX:ut,rotateY:ut,rotateZ:ut,scale:at,scaleX:at,scaleY:at,scaleZ:at,skew:ut,skewX:ut,skewY:ut,distance:ct,translateX:ct,translateY:ct,translateZ:ct,x:ct,y:ct,z:ct,perspective:ct,transformPerspective:ct,opacity:it,originX:ft,originY:ft,originZ:ct,zIndex:Sn,fillOpacity:it,strokeOpacity:it,numOctaves:Sn},Vn=s(s({},En),{color:Pt,backgroundColor:Pt,outlineColor:Pt,fill:Pt,stroke:Pt,borderColor:Pt,borderTopColor:Pt,borderRightColor:Pt,borderBottomColor:Pt,borderLeftColor:Pt,filter:Ct,WebkitFilter:Ct}),Mn=function(t){return Vn[t]};function Rn(t,e){var n,r=Mn(t);return r!==Ct&&(r=Et),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}var Cn=!1,Ln=function(t){return xn(t)?t[t.length-1]||0:t};function Dn(t){var e=t.ease,n=t.times,r=t.yoyo,o=t.flip,i=t.loop,a=u(t,["ease","times","yoyo","flip","loop"]),l=s({},a);return n&&(l.offset=n),a.duration&&(l.duration=O(a.duration)),a.repeatDelay&&(l.repeatDelay=O(a.repeatDelay)),e&&(l.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(e)?e.map(yn):yn(e)),"tween"===a.type&&(l.type="keyframes"),(r||i||o)&&(r?l.repeatType="reverse":i?l.repeatType="loop":o&&(l.repeatType="mirror"),l.repeat=i||r||o||a.repeat),"spring"!==a.type&&(l.type="keyframes"),l}function On(t,e,n){var r,o,i,a;return Array.isArray(e.to)&&(null!==(r=t.duration)&&void 0!==r||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=c([],l(t.to),!1),t.to[0]=t.from)}(e),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=u(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=s(s({},t),(o=n,i=e.to,a=xn(i)?An:Tn[o]||Tn.default,s({to:i},a(i))))),s(s({},e),Dn(t))}function kn(t,e,n,r,o){var i,a=Un(r,t),u=null!==(i=a.from)&&void 0!==i?i:e.get(),l=gn(t,n);return"none"===u&&l&&"string"==typeof n?u=Rn(t,n):jn(u)&&"string"==typeof n?u=Fn(n):!Array.isArray(n)&&jn(n)&&"string"==typeof u&&(n=Fn(u)),gn(t,u)&&l&&!1!==a.type?function(){var r={from:u,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:function(t){return e.set(t)}};return"inertia"===a.type||"decay"===a.type?function({from:t=0,velocity:e=0,min:n,max:r,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:u=1,modifyTarget:l,driver:c,onUpdate:d,onComplete:p,onStop:f}){let v;function h(t){return void 0!==n&&t<n||void 0!==r&&t>r}function m(t){return void 0===n?r:void 0===r||Math.abs(n-t)<Math.abs(r-t)?n:r}function y(t){null==v||v.stop(),v=me(Object.assign(Object.assign({},t),{driver:c,onUpdate:e=>{var n;null==d||d(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:p,onStop:f}))}function g(t){y(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:u},t))}if(h(t))g({from:t,velocity:e,to:m(t)});else{let r=o*e+t;void 0!==l&&(r=l(r));const a=m(r),s=a===n?-1:1;let c,d;const p=t=>{c=d,d=t,e=ye(t-c,D().delta),(1===s&&t>a||-1===s&&t<a)&&g({from:t,to:a,velocity:e})};y({type:"decay",from:t,velocity:e,timeConstant:i,power:o,restDelta:u,modifyTarget:l,onUpdate:h(r)?p:void 0})}return{stop:()=>null==v?void 0:v.stop()}}(s(s({},r),a)):me(s(s({},On(a,r,t)),{onUpdate:function(t){var e;r.onUpdate(t),null===(e=a.onUpdate)||void 0===e||e.call(a,t)},onComplete:function(){var t;r.onComplete(),null===(t=a.onComplete)||void 0===t||t.call(a)}}))}:function(){var t,r,i=Ln(n);return e.set(i),o(),null===(t=null==a?void 0:a.onUpdate)||void 0===t||t.call(a,i),null===(r=null==a?void 0:a.onComplete)||void 0===r||r.call(a),{stop:function(){}}}}function jn(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Fn(t){return"number"==typeof t?0:Rn("",t)}function Un(t,e){return t[e]||t.default||t}function Bn(t,e,n,r){return void 0===r&&(r={}),Cn&&(r={type:!1}),e.start((function(o){var i,a,s=kn(t,e,n,r,o),u=function(t,e){var n,r;return null!==(r=null!==(n=(Un(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==r?r:0}(r,t),l=function(){return a=s()};return u?i=window.setTimeout(l,O(u)):l(),function(){clearTimeout(i),null==a||a.stop()}}))}var In=new WeakMap,Nn=function(){function t(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}return t.prototype.start=function(t,e){var n=this,r=(void 0===e?{}:e).snapToCursor,o=void 0!==r&&r;if(!1!==this.visualElement.isPresent){this.panSession=new Me(t,{onSessionStart:function(t){n.stopAnimation(),o&&n.snapToCursor(m(t,"page").point)},onStart:function(t,e){var r,o=n.getProps(),i=o.drag,a=o.dragPropagation,s=o.onDragStart;(!i||a||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Be(i),n.openGlobalLock))&&(n.isDragging=!0,n.currentDirection=null,n.resolveConstraints(),n.visualElement.projection&&(n.visualElement.projection.isAnimationBlocked=!0,n.visualElement.projection.target=void 0),Qe((function(t){var e,r,o=n.getAxisMotionValue(t).get()||0;if(lt.test(o)){var i=null===(r=null===(e=n.visualElement.projection)||void 0===e?void 0:e.layout)||void 0===r?void 0:r.actual[t];if(i)o=ze(i)*(parseFloat(o)/100)}n.originPoint[t]=o})),null==s||s(t,e),null===(r=n.visualElement.animationState)||void 0===r||r.setActive(_e.Drag,!0))},onMove:function(t,e){var r=n.getProps(),o=r.dragPropagation,i=r.dragDirectionLock,a=r.onDirectionLock,s=r.onDrag;if(o||n.openGlobalLock){var u=e.offset;if(i&&null===n.currentDirection)return n.currentDirection=function(t,e){void 0===e&&(e=10);var n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(u),void(null!==n.currentDirection&&(null==a||a(n.currentDirection)));n.updateAxis("x",e.point,u),n.updateAxis("y",e.point,u),n.visualElement.syncRender(),null==s||s(t,e)}},onSessionEnd:function(t,e){return n.stop(t,e)}},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},t.prototype.stop=function(t,e){var n=this.isDragging;if(this.cancel(),n){var r=e.velocity;this.startAnimation(r);var o=this.getProps().onDragEnd;null==o||o(t,e)}},t.prototype.cancel=function(){var t,e;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(t=this.panSession)||void 0===t||t.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(_e.Drag,!1)},t.prototype.updateAxis=function(t,e,n){var r=this.getProps().drag;if(n&&zn(t,r,this.currentDirection)){var o,i,a,s,u,l=this.getAxisMotionValue(t),c=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=c,i=this.constraints[t],a=this.elastic[t],s=i.min,u=i.max,void 0!==s&&o<s?o=a?K(s,o,a.min):Math.max(o,s):void 0!==u&&o>u&&(o=a?K(u,o,a.max):Math.min(o,u)),c=o),l.set(c)}},t.prototype.resolveConstraints=function(){var t=this,e=this.getProps(),n=e.dragConstraints,r=e.dragElastic,o=(this.visualElement.projection||{}).layout,i=this.constraints;n&&Ne(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!n||!o)&&function(t,e){var n=e.top,r=e.left,o=e.bottom,i=e.right;return{x:qe(t.x,r,i),y:qe(t.y,n,o)}}(o.actual,n),this.elastic=function(t){return void 0===t&&(t=.35),!1===t?t=0:!0===t&&(t=.35),{x:Ke(t,"left","right"),y:Ke(t,"top","bottom")}}(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Qe((function(e){t.getAxisMotionValue(e)&&(t.constraints[e]=function(t,e){var n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(o.actual[e],t.constraints[e]))}))},t.prototype.resolveRefConstraints=function(){var t=this.getProps(),e=t.dragConstraints,n=t.onMeasureDragConstraints;if(!e||!Ne(e))return!1;var r=e.current,o=this.visualElement.projection;if(!o||!o.layout)return!1;var i=function(t,e,n){var r=hn(t,n),o=e.scroll;return o&&(cn(r.x,o.x),cn(r.y,o.y)),r}(r,o.root,this.visualElement.getTransformPagePoint()),a=function(t,e){return{x:Ze(t.x,e.x),y:Ze(t.y,e.y)}}(o.layout.actual,i);if(n){var s=n(function(t){var e=t.x,n=t.y;return{top:n.min,right:e.max,bottom:n.max,left:e.min}}(a));this.hasMutatedConstraints=!!s,s&&(a=tn(s))}return a},t.prototype.startAnimation=function(t){var e=this,n=this.getProps(),r=n.drag,o=n.dragMomentum,i=n.dragElastic,a=n.dragTransition,u=n.dragSnapToOrigin,l=n.onDragTransitionEnd,c=this.constraints||{},d=Qe((function(n){var l;if(zn(n,r,e.currentDirection)){var d=null!==(l=null==c?void 0:c[n])&&void 0!==l?l:{};u&&(d={min:0,max:0});var p=i?200:1e6,f=i?40:1e7,v=s(s({type:"inertia",velocity:o?t[n]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},a),d);return e.startAxisValueAnimation(n,v)}}));return Promise.all(d).then(l)},t.prototype.startAxisValueAnimation=function(t,e){return Bn(t,this.getAxisMotionValue(t),0,e)},t.prototype.stopAnimation=function(){var t=this;Qe((function(e){return t.getAxisMotionValue(e).stop()}))},t.prototype.getAxisMotionValue=function(t){var e,n,r="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[r];return o||this.visualElement.getValue(t,null!==(n=null===(e=this.visualElement.getProps().initial)||void 0===e?void 0:e[t])&&void 0!==n?n:0)},t.prototype.snapToCursor=function(t){var e=this;Qe((function(n){if(zn(n,e.getProps().drag,e.currentDirection)){var r=e.visualElement.projection,o=e.getAxisMotionValue(n);if(r&&r.layout){var i=r.layout.actual[n],a=i.min,s=i.max;o.set(t[n]-K(a,s,.5))}}}))},t.prototype.scalePositionWithinConstraints=function(){var t,e=this,n=this.getProps(),r=n.drag,o=n.dragConstraints,i=this.visualElement.projection;if(Ne(o)&&i&&this.constraints){this.stopAnimation();var a={x:0,y:0};Qe((function(t){var n,r,o,i,s,u=e.getAxisMotionValue(t);if(u){var l=u.get();a[t]=(n={min:l,max:l},r=e.constraints[t],o=.5,i=ze(n),(s=ze(r))>i?o=_(r.min,r.max-i,n.min):i>s&&(o=_(n.min,n.max-s,r.min)),Y(0,1,o))}}));var s=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=s?s({},""):"none",null===(t=i.root)||void 0===t||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),Qe((function(t){if(zn(t,r,null)){var n=e.getAxisMotionValue(t),o=e.constraints[t],i=o.min,s=o.max;n.set(K(i,s,a[t]))}}))}},t.prototype.addListeners=function(){var t,e=this;In.set(this.visualElement,this);var n=N(this.visualElement.getInstance(),"pointerdown",(function(t){var n=e.getProps(),r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&e.start(t)})),r=function(){Ne(e.getProps().dragConstraints)&&(e.constraints=e.resolveRefConstraints())},o=this.visualElement.projection,i=o.addEventListener("measure",r);o&&!o.layout&&(null===(t=o.root)||void 0===t||t.updateScroll(),o.updateLayout()),r();var a=k(window,"resize",(function(){return e.scalePositionWithinConstraints()})),s=o.addEventListener("didUpdate",(function(t){var n=t.delta,r=t.hasLayoutChanged;e.isDragging&&r&&(Qe((function(t){var r=e.getAxisMotionValue(t);r&&(e.originPoint[t]+=n[t].translate,r.set(r.get()+n[t].translate))})),e.visualElement.syncRender())}));return function(){a(),n(),i(),null==s||s()}},t.prototype.getProps=function(){var t=this.visualElement.getProps(),e=t.drag,n=void 0!==e&&e,r=t.dragDirectionLock,o=void 0!==r&&r,i=t.dragPropagation,a=void 0!==i&&i,u=t.dragConstraints,l=void 0!==u&&u,c=t.dragElastic,d=void 0===c?.35:c,p=t.dragMomentum,f=void 0===p||p;return s(s({},t),{drag:n,dragDirectionLock:o,dragPropagation:a,dragConstraints:l,dragElastic:d,dragMomentum:f})},t}();function zn(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}var Yn=r({transformPagePoint:function(t){return t},isStatic:!1,reducedMotion:"never"});function Xn(t){return e((function(){return function(){return t()}}),[])}var Hn=function(t){return function(e){return t(e),null}},Wn={pan:Hn((function(t){var r=t.onPan,i=t.onPanStart,a=t.onPanEnd,s=t.onPanSessionStart,u=t.visualElement,l=r||i||a||s,c=n(null),d=o(Yn).transformPagePoint,p={onSessionStart:s,onStart:i,onMove:r,onEnd:function(t,e){c.current=null,a&&a(t,e)}};e((function(){null!==c.current&&c.current.updateHandlers(p)})),z(u,"pointerdown",l&&function(t){c.current=new Me(t,p,{transformPagePoint:d})}),Xn((function(){return c.current&&c.current.end()}))})),drag:Hn((function(t){var r,o,i=t.dragControls,a=t.visualElement,s=(r=function(){return new Nn(a)},null===(o=n(null)).current&&(o.current=r()),o.current);e((function(){return i&&i.subscribe(s)}),[s,i]),e((function(){return s.addListeners()}),[s])}))},Gn=r(null);function $n(){var t=o(Gn);if(null===t)return[!0,null];var n=t.isPresent,r=t.onExitComplete,a=t.register,s=i();e((function(){return a(s)}),[]);return!n&&r?[!1,function(){return null==r?void 0:r(s)}]:[!0]}var qn=r({}),Zn=r({}),_n={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Kn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var Jn={correct:function(t,e){if(!e.target)return t;if("string"==typeof t){if(!ct.test(t))return t;t=parseFloat(t)}var n=Kn(t,e.target.x),r=Kn(t,e.target.y);return"".concat(n,"% ").concat(r,"%")}};function Qn(t){return"string"==typeof t&&t.startsWith("var(--")}var tr=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function er(t,e,n){var r=l(function(t){var e=tr.exec(t);if(!e)return[,];var n=l(e,3);return[n[1],n[2]]}(t),2),o=r[0],i=r[1];if(o){var a=window.getComputedStyle(e).getPropertyValue(o);return a?a.trim():Qn(i)?er(i,e):i}}var nr={correct:function(t,e){var n=e.treeScale,r=e.projectionDelta,o=t,i=t.includes("var("),a=[];i&&(t=t.replace(tr,(function(t){return a.push(t),"_$css"})));var s=Et.parse(t);if(s.length>5)return o;var u=Et.createTransformer(t),l="number"!=typeof s[0]?1:0,c=r.x.scale*n.x,d=r.y.scale*n.y;s[0+l]/=c,s[1+l]/=d;var p=K(c,d,.5);"number"==typeof s[2+l]&&(s[2+l]/=p),"number"==typeof s[3+l]&&(s[3+l]/=p);var f=u(s);if(i){var v=0;f=f.replace("_$css",(function(){var t=a[v];return v++,t}))}return f}},rr={};var or=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.componentDidMount=function(){var t,e=this,n=this.props,r=n.visualElement,o=n.layoutGroup,i=n.switchLayoutGroup,a=n.layoutId,u=r.projection;t=ir,Object.assign(rr,t),u&&((null==o?void 0:o.group)&&o.group.add(u),(null==i?void 0:i.register)&&a&&i.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",(function(){e.safeToRemove()})),u.setOptions(s(s({},u.options),{onExitComplete:function(){return e.safeToRemove()}}))),_n.hasEverUpdated=!0},e.prototype.getSnapshotBeforeUpdate=function(t){var e=this,n=this.props,r=n.layoutDependency,o=n.visualElement,i=n.drag,a=n.isPresent,s=o.projection;return s?(s.isPresent=a,i||t.layoutDependency!==r||void 0===r?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||E.postRender((function(){var t;(null===(t=s.getStack())||void 0===t?void 0:t.members.length)||e.safeToRemove()}))),null):null},e.prototype.componentDidUpdate=function(){var t=this.props.visualElement.projection;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())},e.prototype.componentWillUnmount=function(){var t=this.props,e=t.visualElement,n=t.layoutGroup,r=t.switchLayoutGroup,o=e.projection;o&&(o.scheduleCheckAfterUnmount(),(null==n?void 0:n.group)&&n.group.remove(o),(null==r?void 0:r.deregister)&&r.deregister(o))},e.prototype.safeToRemove=function(){var t=this.props.safeToRemove;null==t||t()},e.prototype.render=function(){return null},e}(t.Component);var ir={borderRadius:s(s({},Jn),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Jn,borderTopRightRadius:Jn,borderBottomLeftRadius:Jn,borderBottomRightRadius:Jn,boxShadow:nr},ar={measureLayout:function(e){var n=l($n(),2),r=n[0],i=n[1],a=o(qn);return t.createElement(or,s({},e,{layoutGroup:a,switchLayoutGroup:o(Zn),isPresent:r,safeToRemove:i}))}};function sr(t,e){-1===t.indexOf(e)&&t.push(e)}function ur(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var lr=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var e=this;return sr(this.subscriptions,t),function(){return ur(e.subscriptions,t)}},t.prototype.notify=function(t,e,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(var o=0;o<r;o++){var i=this.subscriptions[o];i&&i(t,e,n)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),cr=function(){function t(t){var e,n=this;this.version="7.0.3",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new lr,this.velocityUpdateSubscribers=new lr,this.renderSubscribers=new lr,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),n.prev=n.current,n.current=t;var r=D(),o=r.delta,i=r.timestamp;n.lastUpdated!==i&&(n.timeDelta=o,n.lastUpdated=i,E.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),e&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return E.postRender(n.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?ye(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(n){e.hasAnimated=!0,e.stopAnimation=t(n)})).then((function(){return e.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function dr(t){return new cr(t)}var pr=function(t){return Boolean(null!==t&&"object"==typeof t&&t.getVelocity)};var fr=["TopLeft","TopRight","BottomLeft","BottomRight"],vr=fr.length,hr=function(t){return"string"==typeof t?parseFloat(t):t},mr=function(t){return"number"==typeof t||ct.test(t)};function yr(t,e){var n;return null!==(n=t[e])&&void 0!==n?n:t.borderRadius}var gr=br(0,.5,re),xr=br(.5,.95,Kt);function br(t,e,n){return function(r){return r<t?0:r>e?1:n(_(t,e,r))}}function Pr(t,e){t.min=e.min,t.max=e.max}function wr(t,e){Pr(t.x,e.x),Pr(t.y,e.y)}function Ar(t,e,n,r,o){return t=an(t-=e,1/n,r),void 0!==o&&(t=an(t,1/o,r)),t}function Tr(t,e,n,r,o){var i=l(n,3),a=i[0],s=i[1],u=i[2];!function(t,e,n,r,o,i,a){if(void 0===e&&(e=0),void 0===n&&(n=1),void 0===r&&(r=.5),void 0===i&&(i=t),void 0===a&&(a=t),lt.test(e)&&(e=parseFloat(e),e=K(a.min,a.max,e/100)-a.min),"number"==typeof e){var s=K(i.min,i.max,r);t===i&&(s-=e),t.min=Ar(t.min,e,n,s,o),t.max=Ar(t.max,e,n,s,o)}}(t,e[a],e[s],e[u],e.scale,r,o)}var Sr=["x","scaleX","originX"],Er=["y","scaleY","originY"];function Vr(t,e,n,r){Tr(t.x,e,Sr,null==n?void 0:n.x,null==r?void 0:r.x),Tr(t.y,e,Er,null==n?void 0:n.y,null==r?void 0:r.y)}function Mr(t){return 0===t.translate&&1===t.scale}function Rr(t){return Mr(t.x)&&Mr(t.y)}function Cr(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}var Lr=function(){function t(){this.members=[]}return t.prototype.add=function(t){sr(this.members,t),t.scheduleRender()},t.prototype.remove=function(t){if(ur(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var e=this.members[this.members.length-1];e&&this.promote(e)}},t.prototype.relegate=function(t){var e,n=this.members.findIndex((function(e){return t===e}));if(0===n)return!1;for(var r=n;r>=0;r--){var o=this.members[r];if(!1!==o.isPresent){e=o;break}}return!!e&&(this.promote(e),!0)},t.prototype.promote=function(t,e){var n,r=this.lead;t!==r&&(this.prevLead=r,this.lead=t,t.show(),r&&(r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,e&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues,t.snapshot.isShared=!0),(null===(n=t.root)||void 0===n?void 0:n.isUpdating)&&(t.isLayoutDirty=!0),!1===t.options.crossfade&&r.hide()))},t.prototype.exitAnimationComplete=function(){this.members.forEach((function(t){var e,n,r,o,i;null===(n=(e=t.options).onExitComplete)||void 0===n||n.call(e),null===(i=null===(r=t.resumingFrom)||void 0===r?void 0:(o=r.options).onExitComplete)||void 0===i||i.call(o)}))},t.prototype.scheduleRender=function(){this.members.forEach((function(t){t.instance&&t.scheduleRender(!1)}))},t.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},t}();function Dr(t,e,n){var r=t.x.translate/e.x,o=t.y.translate/e.y,i="translate3d(".concat(r,"px, ").concat(o,"px, 0) ");if(i+="scale(".concat(1/e.x,", ").concat(1/e.y,") "),n){var a=n.rotate,s=n.rotateX,u=n.rotateY;a&&(i+="rotate(".concat(a,"deg) ")),s&&(i+="rotateX(".concat(s,"deg) ")),u&&(i+="rotateY(".concat(u,"deg) "))}var l=t.x.scale*e.x,c=t.y.scale*e.y;return"translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)"===(i+="scale(".concat(l,", ").concat(c,")"))?"none":i}var Or=["","X","Y","Z"],kr=["transformPerspective","x","y","z"];function jr(t,e){return kr.indexOf(t)-kr.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return Or.forEach((function(e){return kr.push(t+e)}))}));var Fr=new Set(kr);function Ur(t){return Fr.has(t)}var Br=new Set(["originX","originY","originZ"]);function Ir(t){return Br.has(t)}var Nr=function(t,e){return t.depth-e.depth},zr=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(t){sr(this.children,t),this.isDirty=!0},t.prototype.remove=function(t){ur(this.children,t),this.isDirty=!0},t.prototype.forEach=function(t){this.isDirty&&this.children.sort(Nr),this.isDirty=!1,this.children.forEach(t)},t}();function Yr(t){var e,n=pr(t)?t.get():t;return e=n,Boolean(e&&"object"==typeof e&&e.mix&&e.toValue)?n.toValue():n}function Xr(t){var e=t.attachResizeListener,n=t.defaultParent,r=t.measureScroll,o=t.checkIsScrollRoot,i=t.resetTransform;return function(){function t(t,e,r){void 0===e&&(e={}),void 0===r&&(r=null==n?void 0:n());var o=this;this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){o.isUpdating&&(o.isUpdating=!1,o.clearAllSnapshots())},this.updateProjection=function(){o.nodes.forEach(_r),o.nodes.forEach(Kr)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=t,this.latestValues=e,this.root=r?r.root||r:this,this.path=r?c(c([],l(r.path),!1),[r],!1):[],this.parent=r,this.depth=r?r.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(var i=0;i<this.path.length;i++)this.path[i].shouldResetTransform=!0;this.root===this&&(this.nodes=new zr)}return t.prototype.addEventListener=function(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new lr),this.eventHandlers.get(t).add(e)},t.prototype.notifyListeners=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=this.eventHandlers.get(t);null==r||r.notify.apply(r,c([],l(e),!1))},t.prototype.hasListeners=function(t){return this.eventHandlers.has(t)},t.prototype.registerPotentialNode=function(t,e){this.potentialNodes.set(t,e)},t.prototype.mount=function(t,n){var r,o=this;if(void 0===n&&(n=!1),!this.instance){this.isSVG=t instanceof SVGElement&&"svg"!==t.tagName,this.instance=t;var i=this.options,a=i.layoutId,u=i.layout,l=i.visualElement;if(l&&!l.getInstance()&&l.mount(t),this.root.nodes.add(this),null===(r=this.parent)||void 0===r||r.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),n&&(u||a)&&(this.isLayoutDirty=!0),e){var c,d=function(){return o.root.updateBlockedByResize=!1};e(t,(function(){o.root.updateBlockedByResize=!0,clearTimeout(c),c=window.setTimeout(d,250),_n.hasAnimatedSinceResize&&(_n.hasAnimatedSinceResize=!1,o.nodes.forEach(Zr))}))}a&&this.root.registerSharedNode(a,this),!1!==this.options.animate&&l&&(a||u)&&this.addEventListener("didUpdate",(function(t){var e,n,r,i,a,u=t.delta,c=t.hasLayoutChanged,d=t.hasRelativeTargetChanged,p=t.layout;if(o.isTreeAnimationBlocked())return o.target=void 0,void(o.relativeTarget=void 0);var f=null!==(n=null!==(e=o.options.transition)&&void 0!==e?e:l.getDefaultTransition())&&void 0!==n?n:ro,v=l.getProps(),h=v.onLayoutAnimationStart,m=v.onLayoutAnimationComplete,y=!o.targetLayout||!Cr(o.targetLayout,p)||d,g=!c&&d;if((null===(r=o.resumeFrom)||void 0===r?void 0:r.instance)||g||c&&(y||!o.currentAnimation)){o.resumeFrom&&(o.resumingFrom=o.resumeFrom,o.resumingFrom.resumingFrom=void 0),o.setAnimationOrigin(u,g);var x=s(s({},Un(f,"layout")),{onPlay:h,onComplete:m});l.shouldReduceMotion&&(x.delay=0,x.type=!1),o.startAnimation(x)}else c||0!==o.animationProgress||o.finishAnimation(),o.isLead()&&(null===(a=(i=o.options).onExitComplete)||void 0===a||a.call(i));o.targetLayout=p}))}},t.prototype.unmount=function(){var t,e;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(t=this.getStack())||void 0===t||t.remove(this),null===(e=this.parent)||void 0===e||e.children.delete(this),this.instance=void 0,V.preRender(this.updateProjection)},t.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},t.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},t.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},t.prototype.isTreeAnimationBlocked=function(){var t;return this.isAnimationBlocked||(null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimationBlocked())||!1},t.prototype.startUpdate=function(){var t;this.isUpdateBlocked()||(this.isUpdating=!0,null===(t=this.nodes)||void 0===t||t.forEach(Jr))},t.prototype.willUpdate=function(t){var e,n,r;if(void 0===t&&(t=!0),this.root.isUpdateBlocked())null===(n=(e=this.options).onExitComplete)||void 0===n||n.call(e);else if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var o=0;o<this.path.length;o++){var i=this.path[o];i.shouldResetTransform=!0,i.updateScroll()}var a=this.options,s=a.layoutId,u=a.layout;if(void 0!==s||u){var l=null===(r=this.options.visualElement)||void 0===r?void 0:r.getProps().transformTemplate;this.prevTransformTemplateValue=null==l?void 0:l(this.latestValues,""),this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}}},t.prototype.didUpdate=function(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach($r);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(oo),this.potentialNodes.clear()),this.nodes.forEach(qr),this.nodes.forEach(Hr),this.nodes.forEach(Wr),this.clearAllSnapshots(),M.update(),M.preRender(),M.render())},t.prototype.clearAllSnapshots=function(){this.nodes.forEach(Gr),this.sharedNodes.forEach(Qr)},t.prototype.scheduleUpdateProjection=function(){E.preRender(this.updateProjection,!1,!0)},t.prototype.scheduleCheckAfterUnmount=function(){var t=this;E.postRender((function(){t.isLayoutDirty?t.root.didUpdate():t.root.checkUpdateFailed()}))},t.prototype.updateSnapshot=function(){if(!this.snapshot&&this.instance){var t=this.measure(),e=this.removeTransform(this.removeElementScroll(t));ao(e),this.snapshot={measured:t,layout:e,latestValues:{}}}},t.prototype.updateLayout=function(){var t;if(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)){if(this.resumeFrom&&!this.resumeFrom.instance)for(var e=0;e<this.path.length;e++){this.path[e].updateScroll()}var n=this.measure();ao(n);var r=this.layout;this.layout={measured:n,actual:this.removeElementScroll(n)},this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),null===(t=this.options.visualElement)||void 0===t||t.notifyLayoutMeasure(this.layout.actual,null==r?void 0:r.actual)}},t.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=o(this.instance),this.scroll=r(this.instance))},t.prototype.resetTransform=function(){var t;if(i){var e=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!Rr(this.projectionDelta),r=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate,o=null==r?void 0:r(this.latestValues,""),a=o!==this.prevTransformTemplateValue;e&&(n||rn(this.latestValues)||a)&&(i(this.instance,o),this.shouldResetTransform=!1,this.scheduleRender())}},t.prototype.measure=function(){var t=this.options.visualElement;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};var e=t.measureViewportBox(),n=this.root.scroll;return n&&(cn(e.x,n.x),cn(e.y,n.y)),e},t.prototype.removeElementScroll=function(t){var e={x:{min:0,max:0},y:{min:0,max:0}};wr(e,t);for(var n=0;n<this.path.length;n++){var r=this.path[n],o=r.scroll,i=r.options,a=r.isScrollRoot;if(r!==this.root&&o&&i.layoutScroll){if(a){wr(e,t);var s=this.root.scroll;s&&(cn(e.x,-s.x),cn(e.y,-s.y))}cn(e.x,o.x),cn(e.y,o.y)}}return e},t.prototype.applyTransform=function(t,e){void 0===e&&(e=!1);var n={x:{min:0,max:0},y:{min:0,max:0}};wr(n,t);for(var r=0;r<this.path.length;r++){var o=this.path[r];!e&&o.options.layoutScroll&&o.scroll&&o!==o.root&&vn(n,{x:-o.scroll.x,y:-o.scroll.y}),rn(o.latestValues)&&vn(n,o.latestValues)}return rn(this.latestValues)&&vn(n,this.latestValues),n},t.prototype.removeTransform=function(t){var e,n={x:{min:0,max:0},y:{min:0,max:0}};wr(n,t);for(var r=0;r<this.path.length;r++){var o=this.path[r];if(o.instance&&rn(o.latestValues)){nn(o.latestValues)&&o.updateSnapshot();var i={x:{min:0,max:0},y:{min:0,max:0}};wr(i,o.measure()),Vr(n,o.latestValues,null===(e=o.snapshot)||void 0===e?void 0:e.layout,i)}}return rn(this.latestValues)&&Vr(n,this.latestValues),n},t.prototype.setTargetDelta=function(t){this.targetDelta=t,this.root.scheduleUpdateProjection()},t.prototype.setOptions=function(t){var e;this.options=s(s(s({},this.options),t),{crossfade:null===(e=t.crossfade)||void 0===e||e})},t.prototype.clearMeasurements=function(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1},t.prototype.resolveTargetDelta=function(){var t,e,n,r,o=this.options,i=o.layout,a=o.layoutId;this.layout&&(i||a)&&(this.targetDelta||this.relativeTarget||(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},$e(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),wr(this.relativeTarget,this.relativeTargetOrigin))),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&(null===(t=this.relativeParent)||void 0===t?void 0:t.target)?(e=this.target,n=this.relativeTarget,r=this.relativeParent.target,We(e.x,n.x,r.x),We(e.y,n.y,r.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.actual):wr(this.target,this.layout.actual),ln(this.target,this.targetDelta)):wr(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&Boolean(this.relativeParent.resumingFrom)===Boolean(this.resumingFrom)&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},$e(this.relativeTargetOrigin,this.target,this.relativeParent.target),wr(this.relativeTarget,this.relativeTargetOrigin)))))},t.prototype.getClosestProjectingParent=function(){if(this.parent&&!rn(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},t.prototype.calcProjection=function(){var t,e=this.options,n=e.layout,r=e.layoutId;if(this.isTreeAnimating=Boolean((null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),this.layout&&(n||r)){var o=this.getLead();wr(this.layoutCorrected,this.layout.actual),function(t,e,n,r){var o,i;void 0===r&&(r=!1);var a=n.length;if(a){var s,u;e.x=e.y=1;for(var l=0;l<a;l++)u=(s=n[l]).projectionDelta,"contents"!==(null===(i=null===(o=s.instance)||void 0===o?void 0:o.style)||void 0===i?void 0:i.display)&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&vn(t,{x:-s.scroll.x,y:-s.scroll.y}),u&&(e.x*=u.x.scale,e.y*=u.y.scale,ln(t,u)),r&&rn(s.latestValues)&&vn(t,s.latestValues))}}(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==o);var i=o.target;if(i){this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});var a=this.treeScale.x,s=this.treeScale.y,u=this.projectionTransform;He(this.projectionDelta,this.layoutCorrected,i,this.latestValues),this.projectionTransform=Dr(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===a&&this.treeScale.y===s||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",i))}}},t.prototype.hide=function(){this.isVisible=!1},t.prototype.show=function(){this.isVisible=!0},t.prototype.scheduleRender=function(t){var e,n,r;void 0===t&&(t=!0),null===(n=(e=this.options).scheduleRender)||void 0===n||n.call(e),t&&(null===(r=this.getStack())||void 0===r||r.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},t.prototype.setAnimationOrigin=function(t,e){var n,r=this;void 0===e&&(e=!1);var o=this.snapshot,i=(null==o?void 0:o.latestValues)||{},a=s({},this.latestValues),u={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!e;var l={x:{min:0,max:0},y:{min:0,max:0}},c=null==o?void 0:o.isShared,d=((null===(n=this.getStack())||void 0===n?void 0:n.members.length)||0)<=1,p=Boolean(c&&!d&&!0===this.options.crossfade&&!this.path.some(no));this.animationProgress=0,this.mixTargetDelta=function(e){var n,o,s,f,v,h=e/1e3;to(u.x,t.x,h),to(u.y,t.y,h),r.setTargetDelta(u),r.relativeTarget&&r.relativeTargetOrigin&&r.layout&&(null===(n=r.relativeParent)||void 0===n?void 0:n.layout)&&($e(l,r.layout.actual,r.relativeParent.layout.actual),o=r.relativeTarget,s=r.relativeTargetOrigin,f=l,v=h,eo(o.x,s.x,f.x,v),eo(o.y,s.y,f.y,v)),c&&(r.animationValues=a,function(t,e,n,r,o,i){var a,s,u,l;o?(t.opacity=K(0,null!==(a=n.opacity)&&void 0!==a?a:1,gr(r)),t.opacityExit=K(null!==(s=e.opacity)&&void 0!==s?s:1,0,xr(r))):i&&(t.opacity=K(null!==(u=e.opacity)&&void 0!==u?u:1,null!==(l=n.opacity)&&void 0!==l?l:1,r));for(var c=0;c<vr;c++){var d="border".concat(fr[c],"Radius"),p=yr(e,d),f=yr(n,d);if(void 0!==p||void 0!==f)p||(p=0),f||(f=0),0===p||0===f||mr(p)===mr(f)?(t[d]=Math.max(K(hr(p),hr(f),r),0),(lt.test(f)||lt.test(p))&&(t[d]+="%")):t[d]=f}(e.rotate||n.rotate)&&(t.rotate=K(e.rotate||0,n.rotate||0,r))}(a,i,r.latestValues,h,p,d)),r.root.scheduleUpdateProjection(),r.scheduleRender(),r.animationProgress=h},this.mixTargetDelta(0)},t.prototype.startAnimation=function(t){var e,n,r=this;this.notifyListeners("animationStart"),null===(e=this.currentAnimation)||void 0===e||e.stop(),this.resumingFrom&&(null===(n=this.resumingFrom.currentAnimation)||void 0===n||n.stop()),this.pendingAnimation&&(V.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=E.update((function(){_n.hasAnimatedSinceResize=!0,r.currentAnimation=function(t,e,n){void 0===n&&(n={});var r=pr(t)?t:dr(t);return Bn("",r,e,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}(0,1e3,s(s({},t),{onUpdate:function(e){var n;r.mixTargetDelta(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:function(){var e;null===(e=t.onComplete)||void 0===e||e.call(t),r.completeAnimation()}})),r.resumingFrom&&(r.resumingFrom.currentAnimation=r.currentAnimation),r.pendingAnimation=void 0}))},t.prototype.completeAnimation=function(){var t;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(t=this.getStack())||void 0===t||t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},t.prototype.finishAnimation=function(){var t;this.currentAnimation&&(null===(t=this.mixTargetDelta)||void 0===t||t.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()},t.prototype.applyTransformsToTarget=function(){var t=this.getLead(),e=t.targetWithTransforms,n=t.target,r=t.layout,o=t.latestValues;e&&n&&r&&(wr(e,n),vn(e,o),He(this.projectionDeltaWithTransform,this.layoutCorrected,e,o))},t.prototype.registerSharedNode=function(t,e){var n,r,o;this.sharedNodes.has(t)||this.sharedNodes.set(t,new Lr),this.sharedNodes.get(t).add(e),e.promote({transition:null===(n=e.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(o=null===(r=e.options.initialPromotionConfig)||void 0===r?void 0:r.shouldPreserveFollowOpacity)||void 0===o?void 0:o.call(r,e)})},t.prototype.isLead=function(){var t=this.getStack();return!t||t.lead===this},t.prototype.getLead=function(){var t;return this.options.layoutId&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this},t.prototype.getPrevLead=function(){var t;return this.options.layoutId?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0},t.prototype.getStack=function(){var t=this.options.layoutId;if(t)return this.root.sharedNodes.get(t)},t.prototype.promote=function(t){var e=void 0===t?{}:t,n=e.needsReset,r=e.transition,o=e.preserveFollowOpacity,i=this.getStack();i&&i.promote(this,o),n&&(this.projectionDelta=void 0,this.needsReset=!0),r&&this.setOptions({transition:r})},t.prototype.relegate=function(){var t=this.getStack();return!!t&&t.relegate(this)},t.prototype.resetRotation=function(){var t=this.options.visualElement;if(t){for(var e=!1,n={},r=0;r<Or.length;r++){var o="rotate"+Or[r];t.getStaticValue(o)&&(e=!0,n[o]=t.getStaticValue(o),t.setStaticValue(o,0))}if(e){for(var o in null==t||t.syncRender(),n)t.setStaticValue(o,n[o]);t.scheduleRender()}}},t.prototype.getProjectionStyles=function(t){var e,n,r,o,i,a;void 0===t&&(t={});var s={};if(!this.instance||this.isSVG)return s;if(!this.isVisible)return{visibility:"hidden"};s.visibility="";var u=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=Yr(t.pointerEvents)||"",s.transform=u?u(this.latestValues,""):"none",s;var l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){var c={};return this.options.layoutId&&(c.opacity=null!==(n=this.latestValues.opacity)&&void 0!==n?n:1,c.pointerEvents=Yr(t.pointerEvents)||""),this.hasProjected&&!rn(this.latestValues)&&(c.transform=u?u({},""):"none",this.hasProjected=!1),c}var d=l.animationValues||l.latestValues;this.applyTransformsToTarget(),s.transform=Dr(this.projectionDeltaWithTransform,this.treeScale,d),u&&(s.transform=u(d,s.transform));var p=this.projectionDelta,f=p.x,v=p.y;for(var h in s.transformOrigin="".concat(100*f.origin,"% ").concat(100*v.origin,"% 0"),l.animationValues?s.opacity=l===this?null!==(o=null!==(r=d.opacity)&&void 0!==r?r:this.latestValues.opacity)&&void 0!==o?o:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:s.opacity=l===this?null!==(i=d.opacity)&&void 0!==i?i:"":null!==(a=d.opacityExit)&&void 0!==a?a:0,rr)if(void 0!==d[h]){var m=rr[h],y=m.correct,g=m.applyTo,x=y(d[h],l);if(g)for(var b=g.length,P=0;P<b;P++)s[g[P]]=x;else s[h]=x}return this.options.layoutId&&(s.pointerEvents=l===this?Yr(t.pointerEvents)||"":"none"),s},t.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},t.prototype.resetTree=function(){this.root.nodes.forEach((function(t){var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach($r),this.root.sharedNodes.clear()},t}()}function Hr(t){t.updateLayout()}function Wr(t){var e,n,r,o,i=null!==(n=null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)&&void 0!==n?n:t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){var a=t.layout,s=a.actual,u=a.measured;"size"===t.options.animationType?Qe((function(t){var e=i.isShared?i.measured[t]:i.layout[t],n=ze(e);e.min=s[t].min,e.max=e.min+n})):"position"===t.options.animationType&&Qe((function(t){var e=i.isShared?i.measured[t]:i.layout[t],n=ze(s[t]);e.max=e.min+n}));var l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};He(l,s,i.layout);var c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i.isShared?He(c,t.applyTransform(u,!0),i.measured):He(c,s,i.layout);var d=!Rr(l),p=!1;if(!t.resumeFrom&&(t.relativeParent=t.getClosestProjectingParent(),t.relativeParent&&!t.relativeParent.resumeFrom)){var f=t.relativeParent,v=f.snapshot,h=f.layout;if(v&&h){var m={x:{min:0,max:0},y:{min:0,max:0}};$e(m,i.layout,v.layout);var y={x:{min:0,max:0},y:{min:0,max:0}};$e(y,s,h.actual),Cr(m,y)||(p=!0)}}t.notifyListeners("didUpdate",{layout:s,snapshot:i,delta:c,layoutDelta:l,hasLayoutChanged:d,hasRelativeTargetChanged:p})}else t.isLead()&&(null===(o=(r=t.options).onExitComplete)||void 0===o||o.call(r));t.options.transition=void 0}function Gr(t){t.clearSnapshot()}function $r(t){t.clearMeasurements()}function qr(t){var e=t.options.visualElement;(null==e?void 0:e.getProps().onBeforeLayoutMeasure)&&e.notifyBeforeLayoutMeasure(),t.resetTransform()}function Zr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function _r(t){t.resolveTargetDelta()}function Kr(t){t.calcProjection()}function Jr(t){t.resetRotation()}function Qr(t){t.removeLeadSnapshot()}function to(t,e,n){t.translate=K(e.translate,0,n),t.scale=K(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function eo(t,e,n,r){t.min=K(e.min,n.min,r),t.max=K(e.max,n.max,r)}function no(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}var ro={duration:.45,ease:[.4,0,.1,1]};function oo(t,e){for(var n=t.root,r=t.path.length-1;r>=0;r--)if(Boolean(t.path[r].instance)){n=t.path[r];break}var o=(n&&n!==t.root?n.instance:document).querySelector('[data-projection-id="'.concat(e,'"]'));o&&t.mount(o,!0)}function io(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function ao(t){io(t.x),io(t.y)}var so=Xr({attachResizeListener:function(t,e){return k(t,"resize",e)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),uo={current:void 0},lo=Xr({measureScroll:function(t){return{x:t.scrollLeft,y:t.scrollTop}},defaultParent:function(){if(!uo.current){var t=new so(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),uo.current=t}return uo.current},resetTransform:function(t,e){t.style.transform=null!=e?e:"none"},checkIsScrollRoot:function(t){return Boolean("fixed"===window.getComputedStyle(t).position)}}),co={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function po(t){return"object"==typeof t&&"function"==typeof t.start}function fo(t,e){if(!Array.isArray(e))return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}var vo=function(t){return/^0[^.\s]+$/.test(t)},ho=function(t){return function(e){return e.test(t)}},mo=[ot,ct,lt,ut,pt,dt,{test:function(t){return"auto"===t},parse:function(t){return t}}],yo=function(t){return mo.find(ho(t))},go=c(c([],l(mo),!1),[Pt,Et],!1),xo=function(t){return go.find(ho(t))};function bo(t){return Array.isArray(t)}function Po(t){return"string"==typeof t||bo(t)}function wo(t,e,n){var r=t.getProps();return function(t,e,n,r,o){var i;return void 0===r&&(r={}),void 0===o&&(o={}),"function"==typeof e&&(e=e(null!=n?n:t.custom,r,o)),"string"==typeof e&&(e=null===(i=t.variants)||void 0===i?void 0:i[e]),"function"==typeof e&&(e=e(null!=n?n:t.custom,r,o)),e}(r,e,null!=n?n:r.custom,function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.get()})),e}(t),function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.getVelocity()})),e}(t))}function Ao(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||Po(t.initial)||Po(t.animate)||Po(t.whileHover)||Po(t.whileDrag)||Po(t.whileTap)||Po(t.whileFocus)||Po(t.exit)}function To(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,dr(n))}function So(t,e){if(e)return(e[t]||e.default||e).from}function Eo(t,e,n){var r;void 0===n&&(n={});var o=wo(t,e,n.custom),i=(o||{}).transition,a=void 0===i?t.getDefaultTransition()||{}:i;n.transitionOverride&&(a=n.transitionOverride);var u=o?function(){return Vo(t,o,n)}:function(){return Promise.resolve()},c=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var o=a.delayChildren,i=void 0===o?0:o,u=a.staggerChildren,l=a.staggerDirection;return function(t,e,n,r,o,i){void 0===n&&(n=0);void 0===r&&(r=0);void 0===o&&(o=1);var a=[],u=(t.variantChildren.size-1)*r,l=1===o?function(t){return void 0===t&&(t=0),t*r}:function(t){return void 0===t&&(t=0),u-t*r};return Array.from(t.variantChildren).sort(Mo).forEach((function(t,r){a.push(Eo(t,e,s(s({},i),{delay:n+l(r)})).then((function(){return t.notifyAnimationComplete(e)})))})),Promise.all(a)}(t,e,i+r,u,l,n)}:function(){return Promise.resolve()},d=a.when;if(d){var p=l("beforeChildren"===d?[u,c]:[c,u],2),f=p[0],v=p[1];return f().then(v)}return Promise.all([u(),c(n.delay)])}function Vo(t,e,n){var r,o=void 0===n?{}:n,i=o.delay,a=void 0===i?0:i,l=o.transitionOverride,c=o.type,d=t.makeTargetAnimatable(e),p=d.transition,f=void 0===p?t.getDefaultTransition():p,v=d.transitionEnd,h=u(d,["transition","transitionEnd"]);l&&(f=l);var m=[],y=c&&(null===(r=t.animationState)||void 0===r?void 0:r.getState()[c]);for(var g in h){var x=t.getValue(g),b=h[g];if(!(!x||void 0===b||y&&Ro(y,g))){var P=s({delay:a},f);t.shouldReduceMotion&&Ur(g)&&(P=s(s({},P),{type:!1,delay:0}));var w=Bn(g,x,b,P);m.push(w)}}return Promise.all(m).then((function(){v&&function(t,e){var n=wo(t,e),r=n?t.makeTargetAnimatable(n,!1):{},o=r.transitionEnd,i=void 0===o?{}:o;r.transition;var a=u(r,["transitionEnd","transition"]);for(var l in a=s(s({},a),i)){To(t,l,Ln(a[l]))}}(t,v)}))}function Mo(t,e){return t.sortNodePosition(e)}function Ro(t,e){var n=t.protectedKeys,r=t.needsAnimating,o=n.hasOwnProperty(e)&&!0!==r[e];return r[e]=!1,o}var Co=[_e.Animate,_e.InView,_e.Focus,_e.Hover,_e.Tap,_e.Drag,_e.Exit],Lo=c([],l(Co),!1).reverse(),Do=Co.length;function Oo(t){return function(e){return Promise.all(e.map((function(e){var n=e.animation,r=e.options;return function(t,e,n){var r;if(void 0===n&&(n={}),t.notifyAnimationStart(e),Array.isArray(e)){var o=e.map((function(e){return Eo(t,e,n)}));r=Promise.all(o)}else if("string"==typeof e)r=Eo(t,e,n);else{var i="function"==typeof e?wo(t,e,n.custom):e;r=Vo(t,i,n)}return r.then((function(){return t.notifyAnimationComplete(e)}))}(t,n,r)})))}}function ko(t){var e,n=Oo(t),r=((e={})[_e.Animate]=jo(!0),e[_e.InView]=jo(),e[_e.Hover]=jo(),e[_e.Tap]=jo(),e[_e.Drag]=jo(),e[_e.Focus]=jo(),e[_e.Exit]=jo(),e),o={},i=!0,a=function(e,n){var r=wo(t,n);if(r){r.transition;var o=r.transitionEnd,i=u(r,["transition","transitionEnd"]);e=s(s(s({},e),i),o)}return e};function d(e,u){for(var d,p=t.getProps(),f=t.getVariantContext(!0)||{},v=[],h=new Set,m={},y=1/0,g=function(n){var o=Lo[n],g=r[o],x=null!==(d=p[o])&&void 0!==d?d:f[o],b=Po(x),P=o===u?g.isActive:null;!1===P&&(y=n);var w=x===f[o]&&x!==p[o]&&b;if(w&&i&&t.manuallyAnimateOnMount&&(w=!1),g.protectedKeys=s({},m),!g.isActive&&null===P||!x&&!g.prevProp||po(x)||"boolean"==typeof x)return"continue";var A=function(t,e){if("string"==typeof e)return e!==t;if(bo(e))return!fo(e,t);return!1}(g.prevProp,x),T=A||o===u&&g.isActive&&!w&&b||n>y&&b,S=Array.isArray(x)?x:[x],E=S.reduce(a,{});!1===P&&(E={});var V=g.prevResolvedValues,M=void 0===V?{}:V,R=s(s({},M),E),C=function(t){T=!0,h.delete(t),g.needsAnimating[t]=!0};for(var L in R){var D=E[L],O=M[L];m.hasOwnProperty(L)||(D!==O?xn(D)&&xn(O)?!fo(D,O)||A?C(L):g.protectedKeys[L]=!0:void 0!==D?C(L):h.add(L):void 0!==D&&h.has(L)?C(L):g.protectedKeys[L]=!0)}g.prevProp=x,g.prevResolvedValues=E,g.isActive&&(m=s(s({},m),E)),i&&t.blockInitialAnimation&&(T=!1),T&&!w&&v.push.apply(v,c([],l(S.map((function(t){return{animation:t,options:s({type:o},e)}}))),!1))},x=0;x<Do;x++)g(x);if(o=s({},m),h.size){var b={};h.forEach((function(e){var n=t.getBaseTarget(e);void 0!==n&&(b[e]=n)})),v.push({animation:b})}var P=Boolean(v.length);return i&&!1===p.initial&&!t.manuallyAnimateOnMount&&(P=!1),i=!1,P?n(v):Promise.resolve()}return{isAnimated:function(t){return void 0!==o[t]},animateChanges:d,setActive:function(e,n,o){var i;if(r[e].isActive===n)return Promise.resolve();null===(i=t.variantChildren)||void 0===i||i.forEach((function(t){var r;return null===(r=t.animationState)||void 0===r?void 0:r.setActive(e,n)})),r[e].isActive=n;var a=d(o,e);for(var s in r)r[s].protectedKeys={};return a},setAnimateFunction:function(e){n=e(t)},getState:function(){return r}}}function jo(t){return void 0===t&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var Fo=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];var Uo=new Set;var Bo=function(t){var e=t.treeType,n=void 0===e?"":e,r=t.build,o=t.getBaseTarget,i=t.makeTargetAnimatable,a=t.measureViewportBox,u=t.render,d=t.readValueFromInstance,p=t.removeValueFromRenderState,f=t.sortNodePosition,v=t.scrapeMotionValuesFromProps;return function(t,e){var h=t.parent,m=t.props,y=t.presenceId,g=t.blockInitialAnimation,x=t.visualState,b=t.shouldReduceMotion;void 0===e&&(e={});var P,w,A=!1,T=x.latestValues,S=x.renderState,M=function(){var t=Fo.map((function(){return new lr})),e={},n={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){Fo.forEach((function(r){var o,i="on"+r,a=t[i];null===(o=e[r])||void 0===o||o.call(e),a&&(e[r]=n[i](a))}))}};return t.forEach((function(t,e){n["on"+Fo[e]]=function(e){return t.add(e)},n["notify"+Fo[e]]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.notify.apply(t,c([],l(e),!1))}})),n}(),R=new Map,C=new Map,L={},D=s({},T);function O(){P&&A&&(k(),u(P,S,m.style,Y.projection))}function k(){r(Y,S,T,e,m)}function j(){M.notifyUpdate(T)}function F(t,e){var n=e.onChange((function(e){T[t]=e,m.onUpdate&&E.update(j,!1,!0)})),r=e.onRenderRequest(Y.scheduleRender);C.set(t,(function(){n(),r()}))}var U=v(m);for(var B in U){var I=U[B];void 0!==T[B]&&pr(I)&&I.set(T[B],!1)}var N=Ao(m),z=function(t){return Boolean(Ao(t)||t.variants)}(m),Y=s(s({treeType:n,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:y,shouldReduceMotion:b,variantChildren:z?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==h?void 0:h.isMounted()),blockInitialAnimation:g,isMounted:function(){return Boolean(P)},mount:function(t){A=!0,P=Y.current=t,Y.projection&&Y.projection.mount(t),z&&h&&!N&&(w=null==h?void 0:h.addVariantChild(Y)),R.forEach((function(t,e){return F(e,t)})),null==h||h.children.add(Y),Y.setProps(m)},unmount:function(){var t;null===(t=Y.projection)||void 0===t||t.unmount(),V.update(j),V.render(O),C.forEach((function(t){return t()})),null==w||w(),null==h||h.children.delete(Y),M.clearAllListeners(),P=void 0,A=!1},addVariantChild:function(t){var e,n=Y.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),function(){return n.variantChildren.delete(t)}},sortNodePosition:function(t){return f&&n===t.treeType?f(Y.getInstance(),t.getInstance()):0},getClosestVariantNode:function(){return z?Y:null==h?void 0:h.getClosestVariantNode()},getLayoutId:function(){return m.layoutId},getInstance:function(){return P},getStaticValue:function(t){return T[t]},setStaticValue:function(t,e){return T[t]=e},getLatestValues:function(){return T},setVisibility:function(t){Y.isVisible!==t&&(Y.isVisible=t,Y.scheduleRender())},makeTargetAnimatable:function(t,e){return void 0===e&&(e=!0),i(Y,t,m,e)},measureViewportBox:function(){return a(P,m)},addValue:function(t,e){Y.hasValue(t)&&Y.removeValue(t),R.set(t,e),T[t]=e.get(),F(t,e)},removeValue:function(t){var e;R.delete(t),null===(e=C.get(t))||void 0===e||e(),C.delete(t),delete T[t],p(t,S)},hasValue:function(t){return R.has(t)},getValue:function(t,e){var n=R.get(t);return void 0===n&&void 0!==e&&(n=dr(e),Y.addValue(t,n)),n},forEachValue:function(t){return R.forEach(t)},readValue:function(t){var n;return null!==(n=T[t])&&void 0!==n?n:d(P,t,e)},setBaseTarget:function(t,e){D[t]=e},getBaseTarget:function(t){if(o){var e=o(m,t);if(void 0!==e&&!pr(e))return e}return D[t]}},M),{build:function(){return k(),S},scheduleRender:function(){E.render(O,!1,!0)},syncRender:O,setProps:function(t){(t.transformTemplate||m.transformTemplate)&&Y.scheduleRender(),m=t,M.updatePropListeners(t),L=function(t,e,n){var r;for(var o in e){var i=e[o],a=n[o];if(pr(i))t.addValue(o,i);else if(pr(a))t.addValue(o,dr(i));else if(a!==i)if(t.hasValue(o)){var s=t.getValue(o);!s.hasAnimated&&s.set(i)}else t.addValue(o,dr(null!==(r=t.getStaticValue(o))&&void 0!==r?r:i))}for(var o in n)void 0===e[o]&&t.removeValue(o);return e}(Y,v(m),L)},getProps:function(){return m},getVariant:function(t){var e;return null===(e=m.variants)||void 0===e?void 0:e[t]},getDefaultTransition:function(){return m.transition},getTransformPagePoint:function(){return m.transformPagePoint},getVariantContext:function(t){if(void 0===t&&(t=!1),t)return null==h?void 0:h.getVariantContext();if(!N){var e=(null==h?void 0:h.getVariantContext())||{};return void 0!==m.initial&&(e.initial=m.initial),e}for(var n={},r=0;r<No;r++){var o=Io[r],i=m[o];(Po(i)||!1===i)&&(n[o]=i)}return n}});return Y}},Io=c(["initial"],l(Co),!1),No=Io.length;function zo(t){return t.startsWith("--")}var Yo=function(t,e){return e&&"number"==typeof t?e.transform(t):t};function Xo(t,e,n,r){var o,i=t.style,a=t.vars,s=t.transform,u=t.transformKeys,l=t.transformOrigin;u.length=0;var c=!1,d=!1,p=!0;for(var f in e){var v=e[f];if(zo(f))a[f]=v;else{var h=En[f],m=Yo(v,h);if(Ur(f)){if(c=!0,s[f]=m,u.push(f),!p)continue;v!==(null!==(o=h.default)&&void 0!==o?o:0)&&(p=!1)}else Ir(f)?(l[f]=m,d=!0):i[f]=m}}c?i.transform=function(t,e,n,r){var o=t.transform,i=t.transformKeys,a=e.enableHardwareAcceleration,s=void 0===a||a,u=e.allowTransformNone,l=void 0===u||u,c="";i.sort(jr);for(var d=!1,p=i.length,f=0;f<p;f++){var v=i[f];c+="".concat(co[v]||v,"(").concat(o[v],") "),"z"===v&&(d=!0)}return!d&&s?c+="translateZ(0)":c=c.trim(),r?c=r(o,n?"":c):l&&n&&(c="none"),c}(t,n,p,r):r?i.transform=r({},""):!e.transform&&i.transform&&(i.transform="none"),d&&(i.transformOrigin=function(t){var e=t.originX,n=void 0===e?"50%":e,r=t.originY,o=void 0===r?"50%":r,i=t.originZ,a=void 0===i?0:i;return"".concat(n," ").concat(o," ").concat(a)}(l))}var Ho,Wo=new Set(["width","height","top","left","right","bottom","x","y"]),Go=function(t){return Wo.has(t)},$o=function(t,e){t.set(e,!1),t.set(e)},qo=function(t){return t===ot||t===ct};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Ho||(Ho={}));var Zo=function(t,e){return parseFloat(t.split(", ")[e])},_o=function(t,e){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return Zo(i[1],e);var a=o.match(/^matrix\((.+)\)$/);return a?Zo(a[1],t):0}},Ko=new Set(["x","y","z"]),Jo=kr.filter((function(t){return!Ko.has(t)}));var Qo={width:function(t,e){var n=t.x,r=e.paddingLeft,o=void 0===r?"0":r,i=e.paddingRight,a=void 0===i?"0":i;return n.max-n.min-parseFloat(o)-parseFloat(a)},height:function(t,e){var n=t.y,r=e.paddingTop,o=void 0===r?"0":r,i=e.paddingBottom,a=void 0===i?"0":i;return n.max-n.min-parseFloat(o)-parseFloat(a)},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,r=e.top;return parseFloat(r)+(n.max-n.min)},right:function(t,e){var n=t.x,r=e.left;return parseFloat(r)+(n.max-n.min)},x:_o(4,13),y:_o(5,14)},ti=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r={}),e=s({},e),r=s({},r);var o=Object.keys(e).filter(Go),i=[],a=!1,u=[];if(o.forEach((function(o){var s=t.getValue(o);if(t.hasValue(o)){var l,c=n[o],d=yo(c),p=e[o];if(xn(p)){var f=p.length,v=null===p[0]?1:0;c=p[v],d=yo(c);for(var h=v;h<f;h++)l?yo(p[h]):l=yo(p[h])}else l=yo(p);if(d!==l)if(qo(d)&&qo(l)){var m=s.get();"string"==typeof m&&s.set(parseFloat(m)),"string"==typeof p?e[o]=parseFloat(p):Array.isArray(p)&&l===ct&&(e[o]=p.map(parseFloat))}else(null==d?void 0:d.transform)&&(null==l?void 0:l.transform)&&(0===c||0===p)?0===c?s.set(l.transform(c)):e[o]=d.transform(p):(a||(i=function(t){var e=[];return Jo.forEach((function(n){var r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),e.length&&t.syncRender(),e}(t),a=!0),u.push(o),r[o]=void 0!==r[o]?r[o]:e[o],$o(s,p))}})),u.length){var c=u.indexOf("height")>=0?window.pageYOffset:null,d=function(t,e,n){var r=e.measureViewportBox(),o=e.getInstance(),i=getComputedStyle(o),a=i.display,s={};"none"===a&&e.setStaticValue("display",t.display||"block"),n.forEach((function(t){s[t]=Qo[t](r,i)})),e.syncRender();var u=e.measureViewportBox();return n.forEach((function(n){var r=e.getValue(n);$o(r,s[n]),t[n]=Qo[n](u,i)})),t}(e,t,u);return i.length&&i.forEach((function(e){var n=l(e,2),r=n[0],o=n[1];t.getValue(r).set(o)})),t.syncRender(),null!==c&&window.scrollTo({top:c}),{target:d,transitionEnd:r}}return{target:e,transitionEnd:r}};function ei(t,e,n,r){return function(t){return Object.keys(t).some(Go)}(e)?ti(t,e,n,r):{target:e,transitionEnd:r}}var ni=function(t,e,n,r){var o=function(t,e,n){var r,o=u(e,[]),i=t.getInstance();if(!(i instanceof Element))return{target:o,transitionEnd:n};for(var a in n&&(n=s({},n)),t.forEachValue((function(t){var e=t.get();if(Qn(e)){var n=er(e,i);n&&t.set(n)}})),o){var l=o[a];if(Qn(l)){var c=er(l,i);c&&(o[a]=c,n&&(null!==(r=n[a])&&void 0!==r||(n[a]=l)))}}return{target:o,transitionEnd:n}}(t,e,r);return ei(t,e=o.target,n,r=o.transitionEnd)};function ri(t,e){var n=e.layout,r=e.layoutId;return Ur(t)||Ir(t)||(n||void 0!==r)&&(!!rr[t]||"opacity"===t)}function oi(t){var e=t.style,n={};for(var r in e)(pr(e[r])||ri(r,t))&&(n[r]=e[r]);return n}function ii(t,e,n,r){var o=e.style,i=e.vars;for(var a in Object.assign(t.style,o,r&&r.getProjectionStyles(n)),i)t.style.setProperty(a,i[a])}var ai={treeType:"dom",readValueFromInstance:function(t,e){if(Ur(e)){var n=Mn(e);return n&&n.default||0}var r,o=(r=t,window.getComputedStyle(r)),i=(zo(e)?o.getPropertyValue(e):o[e])||0;return"string"==typeof i?i.trim():i},sortNodePosition:function(t,e){return 2&t.compareDocumentPosition(e)?1:-1},getBaseTarget:function(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]},measureViewportBox:function(t,e){return hn(t,e.transformPagePoint)},resetTransform:function(t,e,n){var r=n.transformTemplate;e.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var n=e.vars,r=e.style;delete n[t],delete r[t]},makeTargetAnimatable:function(t,e,n,r){var o=e.transition,i=e.transitionEnd,a=u(e,["transition","transitionEnd"]),l=n.transformValues;void 0===r&&(r=!0);var c=function(t,e,n){var r,o,i={};for(var a in t)i[a]=null!==(r=So(a,e))&&void 0!==r?r:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return i}(a,o||{},t);if(l&&(i&&(i=l(i)),a&&(a=l(a)),c&&(c=l(c))),r){!function(t,e,n){var r,o,i,a,s=Object.keys(e).filter((function(e){return!t.hasValue(e)})),u=s.length;if(u)for(var l=0;l<u;l++){var c=s[l],d=e[c],p=null;Array.isArray(d)&&(p=d[0]),null===p&&(p=null!==(o=null!==(r=n[c])&&void 0!==r?r:t.readValue(c))&&void 0!==o?o:e[c]),null!=p&&("string"==typeof p&&(/^\-?\d*\.?\d+$/.test(p)||vo(p))?p=parseFloat(p):!xo(p)&&Et.test(d)&&(p=Rn(c,d)),t.addValue(c,dr(p)),null!==(i=(a=n)[c])&&void 0!==i||(a[c]=p),t.setBaseTarget(c,p))}}(t,a,c);var d=ni(t,a,c,i);i=d.transitionEnd,a=d.target}return s({transition:o,transitionEnd:i},a)},scrapeMotionValuesFromProps:oi,build:function(t,e,n,r,o){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden"),Xo(e,n,r,o.transformTemplate)},render:ii},si=Bo(ai),ui={animation:Hn((function(t){var n=t.visualElement,r=t.animate;n.animationState||(n.animationState=ko(n)),po(r)&&e((function(){return r.subscribe(n)}),[r])})),exit:Hn((function(t){var n=t.custom,r=t.visualElement,i=l($n(),2),a=i[0],s=i[1],u=o(Gn);e((function(){var t,e;r.isPresent=a;var o=null===(t=r.animationState)||void 0===t?void 0:t.setActive(_e.Exit,!a,{custom:null!==(e=null==u?void 0:u.custom)&&void 0!==e?e:n});!a&&(null==o||o.then(s))}),[a])}))};function li(t,e,n){return function(r,o){var i;d(r)&&!Ie()&&(null===(i=t.animationState)||void 0===i||i.setActive(_e.Hover,e),null==n||n(r,o))}}var ci=function(t,e){return!!e&&(t===e||ci(t,e.parentElement))};var di=("undefined"==typeof process||process.env,"production"),pi=new WeakMap,fi=new WeakMap,vi=function(t){var e;null===(e=pi.get(t.target))||void 0===e||e(t)},hi=function(t){t.forEach(vi)};function mi(t,e,n){var r=function(t){var e=t.root,n=u(t,["root"]),r=e||document;fi.has(r)||fi.set(r,{});var o=fi.get(r),i=JSON.stringify(n);return o[i]||(o[i]=new IntersectionObserver(hi,s({root:e},n))),o[i]}(e);return pi.set(t,n),r.observe(t),function(){pi.delete(t),r.unobserve(t)}}var yi={some:0,all:1};function gi(t,n,r,o){var i=o.root,a=o.margin,s=o.amount,u=void 0===s?"some":s,l=o.once;e((function(){if(t){var e={root:null==i?void 0:i.current,rootMargin:a,threshold:"number"==typeof u?u:yi[u]};return mi(r.getInstance(),e,(function(t){var e,o=t.isIntersecting;if(n.isInView!==o&&(n.isInView=o,!l||o||!n.hasEnteredView)){o&&(n.hasEnteredView=!0),null===(e=r.animationState)||void 0===e||e.setActive(_e.InView,o);var i=r.getProps(),a=o?i.onViewportEnter:i.onViewportLeave;null==a||a(t)}}))}}),[t,i,a,u])}function xi(t,n,r,o){var i=o.fallback,a=void 0===i||i;e((function(){var e,o;t&&a&&("production"!==di&&(e="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||Uo.has(e)||(console.warn(e),o&&console.warn(o),Uo.add(e))),requestAnimationFrame((function(){var t;n.hasEnteredView=!0;var e=r.getProps().onViewportEnter;null==e||e(null),null===(t=r.animationState)||void 0===t||t.setActive(_e.InView,!0)})))}),[t])}var bi={inView:Hn((function(t){var e=t.visualElement,r=t.whileInView,o=t.onViewportEnter,i=t.onViewportLeave,a=t.viewport,s=void 0===a?{}:a,u=n({hasEnteredView:!1,isInView:!1}),l=Boolean(r||o||i);s.once&&u.current.hasEnteredView&&(l=!1),("undefined"==typeof IntersectionObserver?xi:gi)(l,u.current,e,s)})),tap:Hn((function(t){var e=t.onTap,r=t.onTapStart,o=t.onTapCancel,i=t.whileTap,a=t.visualElement,s=e||r||o||i,u=n(!1),l=n(null),c={passive:!(r||e||o||h)};function d(){var t;null===(t=l.current)||void 0===t||t.call(l),l.current=null}function p(){var t;return d(),u.current=!1,null===(t=a.animationState)||void 0===t||t.setActive(_e.Tap,!1),!Ie()}function f(t,n){p()&&(ci(a.getInstance(),t.target)?null==e||e(t,n):null==o||o(t,n))}function v(t,e){p()&&(null==o||o(t,e))}function h(t,e){var n;d(),u.current||(u.current=!0,l.current=It(N(window,"pointerup",f,c),N(window,"pointercancel",v,c)),null===(n=a.animationState)||void 0===n||n.setActive(_e.Tap,!0),null==r||r(t,e))}z(a,"pointerdown",s?h:void 0,c),Xn(d)})),focus:Hn((function(t){var e=t.whileFocus,n=t.visualElement;j(n,"focus",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(_e.Focus,!0)}:void 0),j(n,"blur",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(_e.Focus,!1)}:void 0)})),hover:Hn((function(t){var e=t.onHoverStart,n=t.onHoverEnd,r=t.whileHover,o=t.visualElement;z(o,"pointerenter",e||r?li(o,!0,e):void 0,{passive:!e}),z(o,"pointerleave",n||r?li(o,!1,n):void 0,{passive:!n})}))};function Pi(t,e,n){return"string"==typeof t?t:ct.transform(e+n*t)}var wi={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ai={offset:"strokeDashoffset",array:"strokeDasharray"};function Ti(t,e,n,r){var o=e.attrX,i=e.attrY,a=e.originX,s=e.originY,l=e.pathLength,c=e.pathSpacing,d=void 0===c?1:c,p=e.pathOffset,f=void 0===p?0:p;Xo(t,u(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r),t.attrs=t.style,t.style={};var v=t.attrs,h=t.style,m=t.dimensions;v.transform&&(m&&(h.transform=v.transform),delete v.transform),m&&(void 0!==a||void 0!==s||h.transform)&&(h.transformOrigin=function(t,e,n){var r=Pi(e,t.x,t.width),o=Pi(n,t.y,t.height);return"".concat(r," ").concat(o)}(m,void 0!==a?a:.5,void 0!==s?s:.5)),void 0!==o&&(v.x=o),void 0!==i&&(v.y=i),void 0!==l&&function(t,e,n,r,o){void 0===n&&(n=1),void 0===r&&(r=0),void 0===o&&(o=!0),t.pathLength=1;var i=o?wi:Ai;t[i.offset]=ct.transform(-r);var a=ct.transform(e),s=ct.transform(n);t[i.array]="".concat(a," ").concat(s)}(v,l,d,f,!1)}var Si=/([a-z])([A-Z])/g,Ei=function(t){return t.replace(Si,"$1-$2").toLowerCase()},Vi=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);var Mi=Bo(s(s({},ai),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return Ur(e)?(null===(n=Mn(e))||void 0===n?void 0:n.default)||0:(e=Vi.has(e)?e:Ei(e),t.getAttribute(e))},scrapeMotionValuesFromProps:function(t){var e=oi(t);for(var n in t){if(pr(t[n]))e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e},build:function(t,e,n,r,o){Ti(e,n,r,o.transformTemplate)},render:function(t,e,n,r){for(var o in ii(t,e,void 0,r),e.attrs)t.setAttribute(Vi.has(o)?o:Ei(o),e.attrs[o])}})),Ri=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];var Ci=s(s({renderer:function(t,e){return function(t){return"string"==typeof t&&!t.includes("-")&&!!(Ri.indexOf(t)>-1||/[A-Z]/.test(t))}(t)?Mi(e,{enableHardwareAcceleration:!1}):si(e,{enableHardwareAcceleration:!0})}},ui),bi),Li=s(s(s(s({},Ci),Wn),ar),{projectionNodeConstructor:lo});export{Li as domMax};
1
+ import t,{useEffect as e,useRef as n,createContext as i,useContext as o,useId as s}from"react";function r(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function a(t){return!!t.touches}const l={pageX:0,pageY:0};function u(t,e="page"){const n=t.touches[0]||t.changedTouches[0]||l;return{x:n[e+"X"],y:n[e+"Y"]}}function c(t,e="page"){return{x:t[e+"X"],y:t[e+"Y"]}}function h(t,e="page"){return{point:a(t)?u(t,e):c(t,e)}}const d=(t,e=!1)=>{const n=e=>t(e,h(e));return e?(i=n,t=>{const e=t instanceof MouseEvent;(!e||e&&0===t.button)&&i(t)}):n;var i},p="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),m="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(p()),1/60*1e3);let f=!0,g=!1,v=!1;const y={delta:0,timestamp:0},b=["read","update","preRender","render","postRender"],x=b.reduce((t,e)=>(t[e]=function(t){let e=[],n=[],i=0,o=!1,s=!1;const r=new WeakSet,a={schedule:(t,s=!1,a=!1)=>{const l=a&&o,u=l?e:n;return s&&r.add(t),-1===u.indexOf(t)&&(u.push(t),l&&o&&(i=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),r.delete(t)},process:l=>{if(o)s=!0;else{if(o=!0,[e,n]=[n,e],n.length=0,i=e.length,i)for(let n=0;n<i;n++){const i=e[n];i(l),r.has(i)&&(a.schedule(i),t())}o=!1,s&&(s=!1,a.process(l))}}};return a}(()=>g=!0),t),{}),P=b.reduce((t,e)=>{const n=x[e];return t[e]=(t,e=!1,i=!1)=>(g||S(),n.schedule(t,e,i)),t},{}),w=b.reduce((t,e)=>(t[e]=x[e].cancel,t),{}),A=b.reduce((t,e)=>(t[e]=()=>x[e].process(y),t),{}),T=t=>x[t].process(y),E=t=>{g=!1,y.delta=f?1/60*1e3:Math.max(Math.min(t-y.timestamp,40),1),y.timestamp=t,v=!0,b.forEach(T),v=!1,g&&(f=!1,m(E))},S=()=>{g=!0,f=!0,v||m(E)},V=()=>y,O=t=>1e3*t;function j(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function M(t,n,i,o){e(()=>{const e=t.current;if(i&&e)return j(e,n,i,o)},[t,n,i,o])}const R="undefined"!=typeof document,C={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},L={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function D(t){return R&&null===window.onpointerdown?t:R&&null===window.ontouchstart?L[t]:R&&null===window.onmousedown?C[t]:t}function k(t,e,n,i){return j(t,D(e),d(n,"pointerdown"===e),i)}function F(t,e,n,i){return M(t,D(e),n&&d(n,"pointerdown"===e),i)}function B(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]])}return n}const U=(t,e,n)=>Math.min(Math.max(n,t),e);function I({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let o,s,r=1-e;r=U(.05,1,r),t=U(.01,10,t/1e3),r<1?(o=e=>{const i=e*r,o=i*t;return.001-(i-n)/N(e,r)*Math.exp(-o)},s=e=>{const i=e*r*t,s=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),u=N(Math.pow(e,2),r);return(.001-o(e)>0?-1:1)*((s-a)*l)/u}):(o=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,s=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(o,s,5/t);if(t*=1e3,isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}function N(t,e){return t*Math.sqrt(1-e*e)}const $=["duration","bounce"],z=["stiffness","damping","mass"];function Y(t,e){return e.some(e=>void 0!==t[e])}function X(t){var{from:e=0,to:n=1,restSpeed:i=2,restDelta:o}=t,s=B(t,["from","to","restSpeed","restDelta"]);const r={done:!1,value:e};let{stiffness:a,damping:l,mass:u,velocity:c,duration:h,isResolvedFromDuration:d}=function(t){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!Y(t,z)&&Y(t,$)){const n=I(t);e=Object.assign(Object.assign(Object.assign({},e),n),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}(s),p=H,m=H;function f(){const t=c?-c/1e3:0,i=n-e,s=l/(2*Math.sqrt(a*u)),r=Math.sqrt(a/u)/1e3;if(void 0===o&&(o=Math.min(Math.abs(n-e)/100,.4)),s<1){const e=N(r,s);p=o=>{const a=Math.exp(-s*r*o);return n-a*((t+s*r*i)/e*Math.sin(e*o)+i*Math.cos(e*o))},m=n=>{const o=Math.exp(-s*r*n);return s*r*o*(Math.sin(e*n)*(t+s*r*i)/e+i*Math.cos(e*n))-o*(Math.cos(e*n)*(t+s*r*i)-e*i*Math.sin(e*n))}}else if(1===s)p=e=>n-Math.exp(-r*e)*(i+(t+r*i)*e);else{const e=r*Math.sqrt(s*s-1);p=o=>{const a=Math.exp(-s*r*o),l=Math.min(e*o,300);return n-a*((t+s*r*i)*Math.sinh(l)+e*i*Math.cosh(l))/e}}}return f(),{next:t=>{const e=p(t);if(d)r.done=t>=h;else{const s=1e3*m(t),a=Math.abs(s)<=i,l=Math.abs(n-e)<=o;r.done=a&&l}return r.value=r.done?n:e,r},flipTarget:()=>{c=-c,[e,n]=[n,e],f()}}}X.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const H=t=>0,W=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},G=(t,e,n)=>-n*t+n*e+t,q=(t,e)=>n=>Math.max(Math.min(n,e),t),Z=t=>t%1?Number(t.toFixed(5)):t,K=/(-)?([\d]*\.?[\d])+/g,_=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,J=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Q(t){return"string"==typeof t}const tt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},et=Object.assign(Object.assign({},tt),{transform:q(0,1)}),nt=Object.assign(Object.assign({},tt),{default:1}),it=t=>({test:e=>Q(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ot=it("deg"),st=it("%"),rt=it("px"),at=it("vh"),lt=it("vw"),ut=Object.assign(Object.assign({},st),{parse:t=>st.parse(t)/100,transform:t=>st.transform(100*t)}),ct=(t,e)=>n=>Boolean(Q(n)&&J.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),ht=(t,e,n)=>i=>{if(!Q(i))return i;const[o,s,r,a]=i.match(K);return{[t]:parseFloat(o),[e]:parseFloat(s),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},dt={test:ct("hsl","hue"),parse:ht("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+st.transform(Z(e))+", "+st.transform(Z(n))+", "+Z(et.transform(i))+")"},pt=q(0,255),mt=Object.assign(Object.assign({},tt),{transform:t=>Math.round(pt(t))}),ft={test:ct("rgb","red"),parse:ht("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+mt.transform(t)+", "+mt.transform(e)+", "+mt.transform(n)+", "+Z(et.transform(i))+")"};const gt={test:ct("#"),parse:function(t){let e="",n="",i="",o="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),i=t.substr(5,2),o=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),i=t.substr(3,1),o=t.substr(4,1),e+=e,n+=n,i+=i,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}},transform:ft.transform},vt={test:t=>ft.test(t)||gt.test(t)||dt.test(t),parse:t=>ft.test(t)?ft.parse(t):dt.test(t)?dt.parse(t):gt.parse(t),transform:t=>Q(t)?t:t.hasOwnProperty("red")?ft.transform(t):dt.transform(t)};function yt(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const i=t.match(_);i&&(n=i.length,t=t.replace(_,"${c}"),e.push(...i.map(vt.parse)));const o=t.match(K);return o&&(t=t.replace(K,"${n}"),e.push(...o.map(tt.parse))),{values:e,numColors:n,tokenised:t}}function bt(t){return yt(t).values}function xt(t){const{values:e,numColors:n,tokenised:i}=yt(t),o=e.length;return t=>{let e=i;for(let i=0;i<o;i++)e=e.replace(i<n?"${c}":"${n}",i<n?vt.transform(t[i]):Z(t[i]));return e}}const Pt=t=>"number"==typeof t?0:t;const wt={test:function(t){var e,n,i,o;return isNaN(t)&&Q(t)&&(null!==(n=null===(e=t.match(K))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(o=null===(i=t.match(_))||void 0===i?void 0:i.length)&&void 0!==o?o:0)>0},parse:bt,createTransformer:xt,getAnimatableNone:function(t){const e=bt(t);return xt(t)(e.map(Pt))}},At=new Set(["brightness","contrast","saturate","opacity"]);function Tt(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(K)||[];if(!i)return t;const o=n.replace(i,"");let s=At.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+o+")"}const Et=/([a-z-]*)\(.*?\)/g,St=Object.assign(Object.assign({},wt),{getAnimatableNone:t=>{const e=t.match(Et);return e?e.map(Tt).join(" "):t}});function Vt(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 Ot({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let o=0,s=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;o=Vt(a,i,t+1/3),s=Vt(a,i,t),r=Vt(a,i,t-1/3)}else o=s=r=n;return{red:Math.round(255*o),green:Math.round(255*s),blue:Math.round(255*r),alpha:i}}const jt=(t,e,n)=>{const i=t*t,o=e*e;return Math.sqrt(Math.max(0,n*(o-i)+i))},Mt=[gt,ft,dt],Rt=t=>Mt.find(e=>e.test(t)),Ct=(t,e)=>{let n=Rt(t),i=Rt(e),o=n.parse(t),s=i.parse(e);n===dt&&(o=Ot(o),n=ft),i===dt&&(s=Ot(s),i=ft);const r=Object.assign({},o);return t=>{for(const e in r)"alpha"!==e&&(r[e]=jt(o[e],s[e],t));return r.alpha=G(o.alpha,s.alpha,t),n.transform(r)}},Lt=t=>"number"==typeof t,Dt=(t,e)=>n=>e(t(n)),kt=(...t)=>t.reduce(Dt);function Ft(t,e){return Lt(t)?n=>G(t,e,n):vt.test(t)?Ct(t,e):Nt(t,e)}const Bt=(t,e)=>{const n=[...t],i=n.length,o=t.map((t,n)=>Ft(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=o[e](t);return n}},Ut=(t,e)=>{const n=Object.assign(Object.assign({},t),e),i={};for(const o in n)void 0!==t[o]&&void 0!==e[o]&&(i[o]=Ft(t[o],e[o]));return t=>{for(const e in i)n[e]=i[e](t);return n}};function It(t){const e=wt.parse(t),n=e.length;let i=0,o=0,s=0;for(let t=0;t<n;t++)i||"number"==typeof e[t]?i++:void 0!==e[t].hue?s++:o++;return{parsed:e,numNumbers:i,numRGB:o,numHSL:s}}const Nt=(t,e)=>{const n=wt.createTransformer(e),i=It(t),o=It(e);return i.numHSL===o.numHSL&&i.numRGB===o.numRGB&&i.numNumbers>=o.numNumbers?kt(Bt(i.parsed,o.parsed),n):n=>""+(n>0?e:t)},$t=(t,e)=>n=>G(t,e,n);function zt(t,e,n){const i=[],o=n||("number"==typeof(s=t[0])?$t:"string"==typeof s?vt.test(s)?Ct:Nt:Array.isArray(s)?Bt:"object"==typeof s?Ut:void 0);var s;const r=t.length-1;for(let n=0;n<r;n++){let s=o(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;s=kt(t,s)}i.push(s)}return i}function Yt(t,e,{clamp:n=!0,ease:i,mixer:o}={}){const s=t.length;e.length,!i||!Array.isArray(i)||i.length,t[0]>t[s-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());const r=zt(e,i,o),a=2===s?function([t,e],[n]){return i=>n(W(t,e,i))}(t,r):function(t,e){const n=t.length,i=n-1;return o=>{let s=0,r=!1;if(o<=t[0]?r=!0:o>=t[i]&&(s=i-1,r=!0),!r){let e=1;for(;e<n&&!(t[e]>o||e===i);e++);s=e-1}const a=W(t[s],t[s+1],o);return e[s](a)}}(t,r);return n?e=>a(U(t[0],t[s-1],e)):a}const Xt=t=>e=>1-t(1-e),Ht=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Wt=t=>e=>e*e*((t+1)*e-t),Gt=t=>t,qt=(Zt=2,t=>Math.pow(t,Zt));var Zt;const Kt=Xt(qt),_t=Ht(qt),Jt=t=>1-Math.sin(Math.acos(t)),Qt=Xt(Jt),te=Ht(Qt),ee=Wt(1.525),ne=Xt(ee),ie=Ht(ee),oe=(t=>{const e=Wt(t);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(1.525),se=t=>{if(1===t||0===t)return t;const e=t*t;return t<4/11?7.5625*e:t<8/11?9.075*e-9.9*t+3.4:t<.9?4356/361*e-35442/1805*t+16061/1805:10.8*t*t-20.52*t+10.72},re=Xt(se);function ae(t,e){return t.map(()=>e||_t).splice(0,t.length-1)}function le({from:t=0,to:e=1,ease:n,offset:i,duration:o=300}){const s={done:!1,value:t},r=Array.isArray(e)?e:[t,e],a=function(t,e){return t.map(t=>t*e)}(i&&i.length===r.length?i:function(t){const e=t.length;return t.map((t,n)=>0!==n?n/(e-1):0)}(r),o);function l(){return Yt(a,r,{ease:Array.isArray(n)?n:ae(r,n)})}let u=l();return{next:t=>(s.value=u(t),s.done=t>=o,s),flipTarget:()=>{r.reverse(),u=l()}}}const ue={keyframes:le,spring:X,decay:function({velocity:t=0,from:e=0,power:n=.8,timeConstant:i=350,restDelta:o=.5,modifyTarget:s}){const r={done:!1,value:e};let a=n*t;const l=e+a,u=void 0===s?l:s(l);return u!==l&&(a=u-e),{next:t=>{const e=-a*Math.exp(-t/i);return r.done=!(e>o||e<-o),r.value=r.done?u:u+e,r},flipTarget:()=>{}}}};function ce(t,e,n=0){return t-e-n}const he=t=>{const e=({delta:e})=>t(e);return{start:()=>P.update(e,!0),stop:()=>w.update(e)}};function de(t){var e,n,{from:i,autoplay:o=!0,driver:s=he,elapsed:r=0,repeat:a=0,repeatType:l="loop",repeatDelay:u=0,onPlay:c,onStop:h,onComplete:d,onRepeat:p,onUpdate:m}=t,f=B(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let g,v,y,{to:b}=f,x=0,P=f.duration,w=!1,A=!0;const T=function(t){if(Array.isArray(t.to))return le;if(ue[t.type])return ue[t.type];const e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?le:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?X:le}(f);(null===(n=(e=T).needsInterpolation)||void 0===n?void 0:n.call(e,i,b))&&(y=Yt([0,100],[i,b],{clamp:!1}),i=0,b=100);const E=T(Object.assign(Object.assign({},f),{from:i,to:b}));function S(){x++,"reverse"===l?(A=x%2==0,r=function(t,e,n=0,i=!0){return i?ce(e+-t,e,n):e-(t-e)+n}(r,P,u,A)):(r=ce(r,P,u),"mirror"===l&&E.flipTarget()),w=!1,p&&p()}function V(t){if(A||(t=-t),r+=t,!w){const t=E.next(Math.max(0,r));v=t.value,y&&(v=y(v)),w=A?t.done:r<=0}null==m||m(v),w&&(0===x&&(null!=P||(P=r)),x<a?function(t,e,n,i){return i?t>=e+n:t<=-n}(r,P,u,A)&&S():(g.stop(),d&&d()))}return o&&(null==c||c(),g=s(V),g.start()),{stop:()=>{null==h||h(),g.stop()}}}function pe(t,e){return e?t*(1e3/e):0}const me=t=>t.hasOwnProperty("x")&&t.hasOwnProperty("y"),fe=t=>me(t)&&t.hasOwnProperty("z"),ge=(t,e)=>Math.abs(t-e);function ve(t,e){if(Lt(t)&&Lt(e))return ge(t,e);if(me(t)&&me(e)){const n=ge(t.x,e.x),i=ge(t.y,e.y),o=fe(t)&&fe(e)?ge(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(i,2)+Math.pow(o,2))}}const ye=(t,e)=>1-3*e+3*t,be=(t,e)=>3*e-6*t,xe=t=>3*t,Pe=(t,e,n)=>((ye(e,n)*t+be(e,n))*t+xe(e))*t,we=(t,e,n)=>3*ye(e,n)*t*t+2*be(e,n)*t+xe(e);function Ae(t,e,n,i){if(t===e&&n===i)return Gt;const o=new Float32Array(11);for(let e=0;e<11;++e)o[e]=Pe(.1*e,t,n);function s(e){let i=0,s=1;for(;10!==s&&o[s]<=e;++s)i+=.1;--s;const r=i+.1*((e-o[s])/(o[s+1]-o[s])),a=we(r,t,n);return a>=.001?function(t,e,n,i){for(let o=0;o<8;++o){const o=we(e,n,i);if(0===o)return e;e-=(Pe(e,n,i)-t)/o}return e}(e,r,t,n):0===a?r:function(t,e,n,i,o){let s,r,a=0;do{r=e+(n-e)/2,s=Pe(r,i,o)-t,s>0?n=r:e=r}while(Math.abs(s)>1e-7&&++a<10);return r}(e,i,i+.1,t,n)}return t=>0===t||1===t?t:Pe(s(t),e,i)}class Te{constructor(t,e,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Ve(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=ve(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:o}=V();this.history.push(Object.assign(Object.assign({},i),{timestamp:o}));const{onStart:s,onMove:r}=this.handlers;e||(s&&s(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Ee(e,this.transformPagePoint),r(t)&&0===t.buttons?this.handlePointerUp(t,e):P.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i}=this.handlers,o=Ve(Ee(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},a(t)&&t.touches.length>1)return;this.handlers=e,this.transformPagePoint=n;const i=Ee(h(t),this.transformPagePoint),{point:o}=i,{timestamp:s}=V();this.history=[Object.assign(Object.assign({},o),{timestamp:s})];const{onSessionStart:l}=e;l&&l(t,Ve(i,this.history)),this.removeListeners=kt(k(window,"pointermove",this.handlePointerMove),k(window,"pointerup",this.handlePointerUp),k(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),w.update(this.updatePoint)}}function Ee(t,e){return e?{point:e(t.point)}:t}function Se(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ve({point:t},e){return{point:t,delta:Se(t,je(e)),offset:Se(t,Oe(e)),velocity:Me(e,.1)}}function Oe(t){return t[0]}function je(t){return t[t.length-1]}function Me(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const o=je(t);for(;n>=0&&(i=t[n],!(o.timestamp-i.timestamp>O(e)));)n--;if(!i)return{x:0,y:0};const s=(o.timestamp-i.timestamp)/1e3;if(0===s)return{x:0,y:0};const r={x:(o.x-i.x)/s,y:(o.y-i.y)/s};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Re(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Ce=Re("dragHorizontal"),Le=Re("dragVertical");function De(t){let e=!1;if("y"===t)e=Le();else if("x"===t)e=Ce();else{const t=Ce(),n=Le();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function ke(){const t=De(!0);return!t||(t(),!1)}function Fe(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function Be(t){return t.max-t.min}function Ue(t,e=0,n=.01){return ve(t,e)<n}function Ie(t,e,n,i=.5){t.origin=i,t.originPoint=G(e.min,e.max,t.origin),t.scale=Be(n)/Be(e),(Ue(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=G(n.min,n.max,t.origin)-t.originPoint,(Ue(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Ne(t,e,n,i){Ie(t.x,e.x,n.x,null==i?void 0:i.originX),Ie(t.y,e.y,n.y,null==i?void 0:i.originY)}function $e(t,e,n){t.min=n.min+e.min,t.max=t.min+Be(e)}function ze(t,e,n){t.min=e.min-n.min,t.max=t.min+Be(e)}function Ye(t,e,n){ze(t.x,e.x,n.x),ze(t.y,e.y,n.y)}function Xe(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function He(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const We=.35;function Ge(t,e,n){return{min:qe(t,e),max:qe(t,n)}}function qe(t,e){var n;return"number"==typeof t?t:null!==(n=t[e])&&void 0!==n?n:0}var Ze;!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"}(Ze||(Ze={}));function Ke(t){return[t("x"),t("y")]}function _e({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Je(t){return void 0===t||1===t}function Qe({scale:t,scaleX:e,scaleY:n}){return!Je(t)||!Je(e)||!Je(n)}function tn(t){return Qe(t)||en(t.x)||en(t.y)||t.z||t.rotate||t.rotateX||t.rotateY}function en(t){return t&&"0%"!==t}function nn(t,e,n){return n+e*(t-n)}function on(t,e,n,i,o){return void 0!==o&&(t=nn(t,o,i)),nn(t,n,i)+e}function sn(t,e=0,n=1,i,o){t.min=on(t.min,e,n,i,o),t.max=on(t.max,e,n,i,o)}function rn(t,{x:e,y:n}){sn(t.x,e.translate,e.scale,e.originPoint),sn(t.y,n.translate,n.scale,n.originPoint)}function an(t,e){t.min=t.min+e,t.max=t.max+e}function ln(t,e,[n,i,o]){const s=void 0!==e[o]?e[o]:.5,r=G(t.min,t.max,s);sn(t,e[n],e[i],r,e.scale)}const un=["x","scaleX","originX"],cn=["y","scaleY","originY"];function hn(t,e){ln(t.x,e,un),ln(t.y,e,cn)}function dn(t,e){return _e(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const pn={linear:Gt,easeIn:qt,easeInOut:_t,easeOut:Kt,circIn:Jt,circInOut:te,circOut:Qt,backIn:ee,backInOut:ie,backOut:ne,anticipate:oe,bounceIn:re,bounceInOut:t=>t<.5?.5*(1-se(1-2*t)):.5*se(2*t-1)+.5,bounceOut:se},mn=t=>{if(Array.isArray(t)){t.length;const[e,n,i,o]=t;return Ae(e,n,i,o)}return"string"==typeof t?pn[t]:t},fn=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!wt.test(e)||e.startsWith("url("))),gn=t=>Array.isArray(t),vn=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),yn=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),bn=()=>({type:"keyframes",ease:"linear",duration:.3}),xn=t=>({type:"keyframes",duration:.8,values:t}),Pn={x:vn,y:vn,z:vn,rotate:vn,rotateX:vn,rotateY:vn,rotateZ:vn,scaleX:yn,scaleY:yn,scale:yn,opacity:bn,backgroundColor:bn,color:bn,default:yn},wn=Object.assign(Object.assign({},tt),{transform:Math.round}),An={borderWidth:rt,borderTopWidth:rt,borderRightWidth:rt,borderBottomWidth:rt,borderLeftWidth:rt,borderRadius:rt,radius:rt,borderTopLeftRadius:rt,borderTopRightRadius:rt,borderBottomRightRadius:rt,borderBottomLeftRadius:rt,width:rt,maxWidth:rt,height:rt,maxHeight:rt,size:rt,top:rt,right:rt,bottom:rt,left:rt,padding:rt,paddingTop:rt,paddingRight:rt,paddingBottom:rt,paddingLeft:rt,margin:rt,marginTop:rt,marginRight:rt,marginBottom:rt,marginLeft:rt,rotate:ot,rotateX:ot,rotateY:ot,rotateZ:ot,scale:nt,scaleX:nt,scaleY:nt,scaleZ:nt,skew:ot,skewX:ot,skewY:ot,distance:rt,translateX:rt,translateY:rt,translateZ:rt,x:rt,y:rt,z:rt,perspective:rt,transformPerspective:rt,opacity:et,originX:ut,originY:ut,originZ:rt,zIndex:wn,fillOpacity:et,strokeOpacity:et,numOctaves:wn},Tn=Object.assign(Object.assign({},An),{color:vt,backgroundColor:vt,outlineColor:vt,fill:vt,stroke:vt,borderColor:vt,borderTopColor:vt,borderRightColor:vt,borderBottomColor:vt,borderLeftColor:vt,filter:St,WebkitFilter:St}),En=t=>Tn[t];function Sn(t,e){var n;let i=En(t);return i!==St&&(i=wt),null===(n=i.getAnimatableNone)||void 0===n?void 0:n.call(i,e)}const Vn=!1,On=t=>gn(t)?t[t.length-1]||0:t;function jn(t){var{ease:e,times:n,yoyo:i,flip:o,loop:s}=t,r=B(t,["ease","times","yoyo","flip","loop"]);const a=Object.assign({},r);return n&&(a.offset=n),r.duration&&(a.duration=O(r.duration)),r.repeatDelay&&(a.repeatDelay=O(r.repeatDelay)),e&&(a.ease=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(mn):mn(e)),"tween"===r.type&&(a.type="keyframes"),(i||s||o)&&(i?a.repeatType="reverse":s?a.repeatType="loop":o&&(a.repeatType="mirror"),a.repeat=s||i||o||r.repeat),"spring"!==r.type&&(a.type="keyframes"),a}function Mn(t,e,n){var i;return Array.isArray(e.to)&&(null!==(i=t.duration)&&void 0!==i||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=[...t.to],t.to[0]=t.from)}(e),function(t){var e=B(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=Object.assign(Object.assign({},t),((t,e)=>{let n;return n=gn(e)?xn:Pn[t]||Pn.default,Object.assign({to:e},n(e))})(n,e.to))),Object.assign(Object.assign({},e),jn(t))}function Rn(t,e,n,i,o){var s;const r=Dn(i,t);let a=null!==(s=r.from)&&void 0!==s?s:e.get();const l=fn(t,n);"none"===a&&l&&"string"==typeof n?a=Sn(t,n):Cn(a)&&"string"==typeof n?a=Ln(n):!Array.isArray(n)&&Cn(n)&&"string"==typeof a&&(n=Ln(a));return fn(t,a)&&l&&!1!==r.type?function(){const i={from:a,to:n,velocity:e.getVelocity(),onComplete:o,onUpdate:t=>e.set(t)};return"inertia"===r.type||"decay"===r.type?function({from:t=0,velocity:e=0,min:n,max:i,power:o=.8,timeConstant:s=750,bounceStiffness:r=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:u,driver:c,onUpdate:h,onComplete:d,onStop:p}){let m;function f(t){return void 0!==n&&t<n||void 0!==i&&t>i}function g(t){return void 0===n?i:void 0===i||Math.abs(n-t)<Math.abs(i-t)?n:i}function v(t){null==m||m.stop(),m=de(Object.assign(Object.assign({},t),{driver:c,onUpdate:e=>{var n;null==h||h(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:d,onStop:p}))}function y(t){v(Object.assign({type:"spring",stiffness:r,damping:a,restDelta:l},t))}if(f(t))y({from:t,velocity:e,to:g(t)});else{let i=o*e+t;void 0!==u&&(i=u(i));const r=g(i),a=r===n?-1:1;let c,h;const d=t=>{c=h,h=t,e=pe(t-c,V().delta),(1===a&&t>r||-1===a&&t<r)&&y({from:t,to:r,velocity:e})};v({type:"decay",from:t,velocity:e,timeConstant:s,power:o,restDelta:l,modifyTarget:u,onUpdate:f(i)?d:void 0})}return{stop:()=>null==m?void 0:m.stop()}}(Object.assign(Object.assign({},i),r)):de(Object.assign(Object.assign({},Mn(r,i,t)),{onUpdate:t=>{var e;i.onUpdate(t),null===(e=r.onUpdate)||void 0===e||e.call(r,t)},onComplete:()=>{var t;i.onComplete(),null===(t=r.onComplete)||void 0===t||t.call(r)}}))}:function(){var t,i;const s=On(n);return e.set(s),o(),null===(t=null==r?void 0:r.onUpdate)||void 0===t||t.call(r,s),null===(i=null==r?void 0:r.onComplete)||void 0===i||i.call(r),{stop:()=>{}}}}function Cn(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Ln(t){return"number"==typeof t?0:Sn("",t)}function Dn(t,e){return t[e]||t.default||t}function kn(t,e,n,i={}){return Vn&&(i={type:!1}),e.start(o=>{let s,r;const a=Rn(t,e,n,i,o),l=function(t,e){var n,i;return null!==(i=null!==(n=(Dn(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==i?i:0}(i,t),u=()=>r=a();return l?s=window.setTimeout(u,O(l)):u(),()=>{clearTimeout(s),null==r||r.stop()}})}const Fn=new WeakMap;class Bn{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){if(!1===this.visualElement.isPresent)return;this.panSession=new Te(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(h(t,"page").point)},onStart:(t,e)=>{var n;const{drag:i,dragPropagation:o,onDragStart:s}=this.getProps();(!i||o||(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=De(i),this.openGlobalLock))&&(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ke(t=>{var e,n;let i=this.getAxisMotionValue(t).get()||0;if(st.test(i)){const o=null===(n=null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout)||void 0===n?void 0:n.actual[t];if(o){i=Be(o)*(parseFloat(i)/100)}}this.originPoint[t]=i}),null==s||s(t,e),null===(n=this.visualElement.animationState)||void 0===n||n.setActive(Ze.Drag,!0))},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:o,onDrag:s}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&(null==o||o(this.currentDirection)));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.syncRender(),null==s||s(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:o}=this.getProps();null==o||o(t,e)}cancel(){var t,e;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(t=this.panSession)||void 0===t||t.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(Ze.Drag,!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Un(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(s=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?G(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?G(n,t,i.max):Math.min(t,n)),t}(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;t&&Fe(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:i,right:o}){return{x:Xe(t.x,n,o),y:Xe(t.y,e,i)}}(n.actual,t),this.elastic=function(t=We){return!1===t?t=0:!0===t&&(t=We),{x:Ge(t,"left","right"),y:Ge(t,"top","bottom")}}(e),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Ke(t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.actual[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!Fe(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=function(t,e,n){const i=dn(t,n),{scroll:o}=e;return o&&(an(i.x,o.x),an(i.y,o.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let s=function(t,e){return{x:He(t.x,e.x),y:He(t.y,e.y)}}(i.layout.actual,o);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(s));this.hasMutatedConstraints=!!t,t&&(s=_e(t))}return s}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Ke(r=>{var l;if(!Un(r,e,this.currentDirection))return;let u=null!==(l=null==a?void 0:a[r])&&void 0!==l?l:{};s&&(u={min:0,max:0});const c=i?200:1e6,h=i?40:1e7,d=Object.assign(Object.assign({type:"inertia",velocity:n?t[r]:0,bounceStiffness:c,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10},o),u);return this.startAxisValueAnimation(r,d)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){return kn(t,this.getAxisMotionValue(t),0,e)}stopAnimation(){Ke(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var e,n;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,null!==(n=null===(e=this.visualElement.getProps().initial)||void 0===e?void 0:e[t])&&void 0!==n?n:0)}snapToCursor(t){Ke(e=>{const{drag:n}=this.getProps();if(!Un(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:s}=i.layout.actual[e];o.set(t[e]-G(n,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Fe(n)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ke(t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();o[t]=function(t,e){let n=.5;const i=Be(t),o=Be(e);return o>i?n=W(e.min,e.max-i,t.min):i>o&&(n=W(t.min,t.max-o,e.min)),U(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=s?s({},""):"none",null===(t=i.root)||void 0===t||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),Ke(t=>{if(!Un(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:s}=this.constraints[t];n.set(G(i,s,o[t]))})}addListeners(){var t;Fn.set(this.visualElement,this);const e=k(this.visualElement.getInstance(),"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),n=()=>{const{dragConstraints:t}=this.getProps();Fe(t)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",n);i&&!i.layout&&(null===(t=i.root)||void 0===t||t.updateScroll(),i.updateLayout()),n();const s=j(window,"resize",()=>this.scalePositionWithinConstraints()),r=i.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Ke(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.syncRender())});return()=>{s(),e(),o(),null==r||r()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=We,dragMomentum:r=!0}=t;return Object.assign(Object.assign({},t),{drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:r})}}function Un(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const In=i({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Nn(t){return e(()=>()=>t(),[])}const $n=t=>e=>(t(e),null),zn={pan:$n((function({onPan:t,onPanStart:i,onPanEnd:s,onPanSessionStart:r,visualElement:a}){const l=t||i||s||r,u=n(null),{transformPagePoint:c}=o(In),h={onSessionStart:r,onStart:i,onMove:t,onEnd:(t,e)=>{u.current=null,s&&s(t,e)}};e(()=>{null!==u.current&&u.current.updateHandlers(h)}),F(a,"pointerdown",l&&function(t){u.current=new Te(t,h,{transformPagePoint:c})}),Nn(()=>u.current&&u.current.end())})),drag:$n((function(t){const{dragControls:i,visualElement:o}=t,s=function(t){const e=n(null);return null===e.current&&(e.current=t()),e.current}(()=>new Bn(o));e(()=>i&&i.subscribe(s),[s,i]),e(()=>s.addListeners(),[s])}))},Yn=i(null);function Xn(){const t=o(Yn);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=t,a=s();e(()=>r(a),[]);return!n&&i?[!1,()=>null==i?void 0:i(a)]:[!0]}const Hn=i({}),Wn=i({}),Gn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function qn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Zn={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!rt.test(t))return t;t=parseFloat(t)}return`${qn(t,e.target.x)}% ${qn(t,e.target.y)}%`}};function Kn(t){return"string"==typeof t&&t.startsWith("var(--")}const _n=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Jn(t,e,n=1){const[i,o]=function(t){const e=_n.exec(t);if(!e)return[,];const[,n,i]=e;return[n,i]}(t);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);return s?s.trim():Kn(o)?Jn(o,e,n+1):o}const Qn={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,o=t.includes("var("),s=[];o&&(t=t.replace(_n,t=>(s.push(t),"_$css")));const r=wt.parse(t);if(r.length>5)return i;const a=wt.createTransformer(t),l="number"!=typeof r[0]?1:0,u=n.x.scale*e.x,c=n.y.scale*e.y;r[0+l]/=u,r[1+l]/=c;const h=G(u,c,.5);"number"==typeof r[2+l]&&(r[2+l]/=h),"number"==typeof r[3+l]&&(r[3+l]/=h);let d=a(r);if(o){let t=0;d=d.replace("_$css",()=>{const e=s[t];return t++,e})}return d}},ti={};class ei extends t.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:o}=t;var s;s=ni,Object.assign(ti,s),o&&((null==e?void 0:e.group)&&e.group.add(o),(null==n?void 0:n.register)&&i&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions(Object.assign(Object.assign({},o.options),{onExitComplete:()=>this.safeToRemove()}))),Gn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:o}=this.props,s=n.projection;return s?(s.isPresent=o,i||t.layoutDependency!==e||void 0===e?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||P.postRender(()=>{var t;(null===(t=s.getStack())||void 0===t?void 0:t.members.length)||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),(null==e?void 0:e.group)&&e.group.remove(i),(null==n?void 0:n.deregister)&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;null==t||t()}render(){return null}}const ni={borderRadius:Object.assign(Object.assign({},Zn),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Zn,borderTopRightRadius:Zn,borderBottomLeftRadius:Zn,borderBottomRightRadius:Zn,boxShadow:Qn},ii={measureLayout:function(e){const[n,i]=Xn(),s=o(Hn);return t.createElement(ei,Object.assign({},e,{layoutGroup:s,switchLayoutGroup:o(Wn),isPresent:n,safeToRemove:i}))}};function oi(t,e){-1===t.indexOf(e)&&t.push(e)}function si(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class ri{constructor(){this.subscriptions=[]}add(t){return oi(this.subscriptions,t),()=>si(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let o=0;o<i;o++){const i=this.subscriptions[o];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class ai{constructor(t){var e;this.version="7.1.2",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new ri,this.velocityUpdateSubscribers=new ri,this.renderSubscribers=new ri,this.canTrackVelocity=!1,this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:i}=V();this.lastUpdated!==i&&(this.timeDelta=n,this.lastUpdated=i,P.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),e&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>P.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?pe(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.stopAnimation=t(e)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function li(t){return new ai(t)}const ui=t=>Boolean(null!==t&&"object"==typeof t&&t.getVelocity);const ci=["TopLeft","TopRight","BottomLeft","BottomRight"],hi=ci.length,di=t=>"string"==typeof t?parseFloat(t):t,pi=t=>"number"==typeof t||rt.test(t);function mi(t,e){var n;return null!==(n=t[e])&&void 0!==n?n:t.borderRadius}const fi=vi(0,.5,Qt),gi=vi(.5,.95,Gt);function vi(t,e,n){return i=>i<t?0:i>e?1:n(W(t,e,i))}function yi(t,e){t.min=e.min,t.max=e.max}function bi(t,e){yi(t.x,e.x),yi(t.y,e.y)}function xi(t,e,n,i,o){return t=nn(t-=e,1/n,i),void 0!==o&&(t=nn(t,1/o,i)),t}function Pi(t,e,[n,i,o],s,r){!function(t,e=0,n=1,i=.5,o,s=t,r=t){if(st.test(e)){e=parseFloat(e);e=G(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=G(s.min,s.max,i);t===s&&(a-=e),t.min=xi(t.min,e,n,a,o),t.max=xi(t.max,e,n,a,o)}(t,e[n],e[i],e[o],e.scale,s,r)}const wi=["x","scaleX","originX"],Ai=["y","scaleY","originY"];function Ti(t,e,n,i){Pi(t.x,e,wi,null==n?void 0:n.x,null==i?void 0:i.x),Pi(t.y,e,Ai,null==n?void 0:n.y,null==i?void 0:i.y)}function Ei(t){return 0===t.translate&&1===t.scale}function Si(t){return Ei(t.x)&&Ei(t.y)}function Vi(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}class Oi{constructor(){this.members=[]}add(t){oi(this.members,t),t.scheduleRender()}remove(t){if(si(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){var n;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),(null===(n=t.root)||void 0===n?void 0:n.isUpdating)&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;!1===o&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var e,n,i,o,s;null===(n=(e=t.options).onExitComplete)||void 0===n||n.call(e),null===(s=null===(i=t.resumingFrom)||void 0===i?void 0:(o=i.options).onExitComplete)||void 0===s||s.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ji(t,e,n){let i=`translate3d(${t.x.translate/e.x}px, ${t.y.translate/e.y}px, 0) `;if(i+=`scale(${1/e.x}, ${1/e.y}) `,n){const{rotate:t,rotateX:e,rotateY:o}=n;t&&(i+=`rotate(${t}deg) `),e&&(i+=`rotateX(${e}deg) `),o&&(i+=`rotateY(${o}deg) `)}return i+=`scale(${t.x.scale*e.x}, ${t.y.scale*e.y})`,"translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)"===i?"none":i}const Mi=["","X","Y","Z"],Ri=["transformPerspective","x","y","z"];function Ci(t,e){return Ri.indexOf(t)-Ri.indexOf(e)}["translate","scale","rotate","skew"].forEach(t=>Mi.forEach(e=>Ri.push(t+e)));const Li=new Set(Ri);function Di(t){return Li.has(t)}const ki=new Set(["originX","originY","originZ"]);function Fi(t){return ki.has(t)}const Bi=(t,e)=>t.depth-e.depth;class Ui{constructor(){this.children=[],this.isDirty=!1}add(t){oi(this.children,t),this.isDirty=!0}remove(t){si(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Bi),this.isDirty=!1,this.children.forEach(t)}}function Ii(t){const e=ui(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}function Ni({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(t,n={},i=(null==e?void 0:e())){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Gi),this.nodes.forEach(qi)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=t,this.latestValues=n,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ui)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new ri),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);null==n||n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}registerPotentialNode(t,e){this.potentialNodes.set(t,e)}mount(e,n=!1){var i;if(this.instance)return;this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;const{layoutId:o,layout:s,visualElement:r}=this.options;if(r&&!r.getInstance()&&r.mount(e),this.root.nodes.add(this),null===(i=this.parent)||void 0===i||i.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),n&&(s||o)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,clearTimeout(n),n=window.setTimeout(i,250),Gn.hasAnimatedSinceResize&&(Gn.hasAnimatedSinceResize=!1,this.nodes.forEach(Wi))})}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&r&&(o||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{var o,s,a,l,u;if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const c=null!==(s=null!==(o=this.options.transition)&&void 0!==o?o:r.getDefaultTransition())&&void 0!==s?s:to,{onLayoutAnimationStart:h,onLayoutAnimationComplete:d}=r.getProps(),p=!this.targetLayout||!Vi(this.targetLayout,i)||n,m=!e&&n;if((null===(a=this.resumeFrom)||void 0===a?void 0:a.instance)||m||e&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,m);const e=Object.assign(Object.assign({},Dn(c,"layout")),{onPlay:h,onComplete:d});r.shouldReduceMotion&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||0!==this.animationProgress||this.finishAnimation(),this.isLead()&&(null===(u=(l=this.options).onExitComplete)||void 0===u||u.call(l));this.targetLayout=i})}unmount(){var t,e;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(t=this.getStack())||void 0===t||t.remove(this),null===(e=this.parent)||void 0===e||e.children.delete(this),this.instance=void 0,w.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var t;return this.isAnimationBlocked||(null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimationBlocked())||!1}startUpdate(){var t;this.isUpdateBlocked()||(this.isUpdating=!0,null===(t=this.nodes)||void 0===t||t.forEach(Zi))}willUpdate(t=!0){var e,n,i;if(this.root.isUpdateBlocked())return void(null===(n=(e=this.options).onExitComplete)||void 0===n||n.call(e));if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll()}const{layoutId:o,layout:s}=this.options;if(void 0===o&&!s)return;const r=null===(i=this.options.visualElement)||void 0===i?void 0:i.getProps().transformTemplate;this.prevTransformTemplateValue=null==r?void 0:r(this.latestValues,""),this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Xi);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(eo),this.potentialNodes.clear()),this.nodes.forEach(Hi),this.nodes.forEach($i),this.nodes.forEach(zi),this.clearAllSnapshots(),A.update(),A.preRender(),A.render())}clearAllSnapshots(){this.nodes.forEach(Yi),this.sharedNodes.forEach(Ki)}scheduleUpdateProjection(){P.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){P.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const t=this.measure(),e=this.removeTransform(this.removeElementScroll(t));io(e),this.snapshot={measured:t,layout:e,latestValues:{}}}updateLayout(){var t;if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const e=this.measure();io(e);const n=this.layout;this.layout={measured:e,actual:this.removeElementScroll(e)},this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),null===(t=this.options.visualElement)||void 0===t||t.notifyLayoutMeasure(this.layout.actual,null==n?void 0:n.actual)}updateScroll(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=i(this.instance),this.scroll=n(this.instance))}resetTransform(){var t;if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!Si(this.projectionDelta),i=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate,s=null==i?void 0:i(this.latestValues,""),r=s!==this.prevTransformTemplateValue;e&&(n||tn(this.latestValues)||r)&&(o(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(an(e.x,n.x),an(e.y,n.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};bi(e,t);for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:o,options:s,isScrollRoot:r}=i;if(i!==this.root&&o&&s.layoutScroll){if(r){bi(e,t);const{scroll:n}=this.root;n&&(an(e.x,-n.x),an(e.y,-n.y))}an(e.x,o.x),an(e.y,o.y)}}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};bi(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&hn(n,{x:-i.scroll.x,y:-i.scroll.y}),tn(i.latestValues)&&hn(n,i.latestValues)}return tn(this.latestValues)&&hn(n,this.latestValues),n}removeTransform(t){var e;const n={x:{min:0,max:0},y:{min:0,max:0}};bi(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];if(!i.instance)continue;if(!tn(i.latestValues))continue;Qe(i.latestValues)&&i.updateSnapshot();const o={x:{min:0,max:0},y:{min:0,max:0}};bi(o,i.measure()),Ti(n,i.latestValues,null===(e=i.snapshot)||void 0===e?void 0:e.layout,o)}return tn(this.latestValues)&&Ti(n,this.latestValues),n}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection()}setOptions(t){var e;this.options=Object.assign(Object.assign(Object.assign({},this.options),t),{crossfade:null===(e=t.crossfade)||void 0===e||e})}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var t;const{layout:e,layoutId:n}=this.options;var i,o,s;this.layout&&(e||n)&&(this.targetDelta||this.relativeTarget||(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ye(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),bi(this.relativeTarget,this.relativeTargetOrigin))),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&(null===(t=this.relativeParent)||void 0===t?void 0:t.target)?(i=this.target,o=this.relativeTarget,s=this.relativeParent.target,$e(i.x,o.x,s.x),$e(i.y,o.y,s.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.actual):bi(this.target,this.layout.actual),rn(this.target,this.targetDelta)):bi(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&Boolean(this.relativeParent.resumingFrom)===Boolean(this.resumingFrom)&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ye(this.relativeTargetOrigin,this.target,this.relativeParent.target),bi(this.relativeTarget,this.relativeTargetOrigin)))))}getClosestProjectingParent(){if(this.parent&&!tn(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var t;const{layout:e,layoutId:n}=this.options;if(this.isTreeAnimating=Boolean((null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!e&&!n)return;const i=this.getLead();bi(this.layoutCorrected,this.layout.actual),function(t,e,n,i=!1){var o,s;const r=n.length;if(!r)return;let a,l;e.x=e.y=1;for(let u=0;u<r;u++)a=n[u],l=a.projectionDelta,"contents"!==(null===(s=null===(o=a.instance)||void 0===o?void 0:o.style)||void 0===s?void 0:s.display)&&(i&&a.options.layoutScroll&&a.scroll&&a!==a.root&&hn(t,{x:-a.scroll.x,y:-a.scroll.y}),l&&(e.x*=l.x.scale,e.y*=l.y.scale,rn(t,l)),i&&tn(a.latestValues)&&hn(t,a.latestValues))}(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==i);const{target:o}=i;if(!o)return;this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const s=this.treeScale.x,r=this.treeScale.y,a=this.projectionTransform;Ne(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.projectionTransform=ji(this.projectionDelta,this.treeScale),this.projectionTransform===a&&this.treeScale.x===s&&this.treeScale.y===r||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e,n,i;null===(n=(e=this.options).scheduleRender)||void 0===n||n.call(e),t&&(null===(i=this.getStack())||void 0===i||i.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){var n;const i=this.snapshot,o=(null==i?void 0:i.latestValues)||{},s=Object.assign({},this.latestValues),r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!e;const a={x:{min:0,max:0},y:{min:0,max:0}},l=null==i?void 0:i.isShared,u=((null===(n=this.getStack())||void 0===n?void 0:n.members.length)||0)<=1,c=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(Qi));this.animationProgress=0,this.mixTargetDelta=e=>{var n;const i=e/1e3;var h,d,p,m;_i(r.x,t.x,i),_i(r.y,t.y,i),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(null===(n=this.relativeParent)||void 0===n?void 0:n.layout)&&(Ye(a,this.layout.actual,this.relativeParent.layout.actual),h=this.relativeTarget,d=this.relativeTargetOrigin,p=a,m=i,Ji(h.x,d.x,p.x,m),Ji(h.y,d.y,p.y,m)),l&&(this.animationValues=s,function(t,e,n,i,o,s){var r,a,l,u;o?(t.opacity=G(0,null!==(r=n.opacity)&&void 0!==r?r:1,fi(i)),t.opacityExit=G(null!==(a=e.opacity)&&void 0!==a?a:1,0,gi(i))):s&&(t.opacity=G(null!==(l=e.opacity)&&void 0!==l?l:1,null!==(u=n.opacity)&&void 0!==u?u:1,i));for(let o=0;o<hi;o++){const s=`border${ci[o]}Radius`;let r=mi(e,s),a=mi(n,s);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||pi(r)===pi(a)?(t[s]=Math.max(G(di(r),di(a),i),0),(st.test(a)||st.test(r))&&(t[s]+="%")):t[s]=a}(e.rotate||n.rotate)&&(t.rotate=G(e.rotate||0,n.rotate||0,i))}(s,o,this.latestValues,i,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=i},this.mixTargetDelta(0)}startAnimation(t){var e,n;this.notifyListeners("animationStart"),null===(e=this.currentAnimation)||void 0===e||e.stop(),this.resumingFrom&&(null===(n=this.resumingFrom.currentAnimation)||void 0===n||n.stop()),this.pendingAnimation&&(w.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=P.update(()=>{Gn.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n={}){const i=ui(t)?t:li(t);return kn("",i,e,n),{stop:()=>i.stop(),isAnimating:()=>i.isAnimating()}}(0,1e3,Object.assign(Object.assign({},t),{onUpdate:e=>{var n;this.mixTargetDelta(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:()=>{var e;null===(e=t.onComplete)||void 0===e||e.call(t),this.completeAnimation()}})),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var t;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(t=this.getStack())||void 0===t||t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var t;this.currentAnimation&&(null===(t=this.mixTargetDelta)||void 0===t||t.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const{targetWithTransforms:t,target:e,layout:n,latestValues:i}=this.getLead();t&&e&&n&&(bi(t,e),hn(t,i),Ne(this.projectionDeltaWithTransform,this.layoutCorrected,t,i))}registerSharedNode(t,e){var n,i,o;this.sharedNodes.has(t)||this.sharedNodes.set(t,new Oi);this.sharedNodes.get(t).add(e),e.promote({transition:null===(n=e.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(o=null===(i=e.options.initialPromotionConfig)||void 0===i?void 0:i.shouldPreserveFollowOpacity)||void 0===o?void 0:o.call(i,e)})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const n={};for(let i=0;i<Mi.length;i++){const o="rotate"+Mi[i];t.getStaticValue(o)&&(e=!0,n[o]=t.getStaticValue(o),t.setStaticValue(o,0))}if(e){null==t||t.syncRender();for(const e in n)t.setStaticValue(e,n[e]);t.scheduleRender()}}getProjectionStyles(t={}){var e,n,i,o,s,r;const a={};if(!this.instance||this.isSVG)return a;if(!this.isVisible)return{visibility:"hidden"};a.visibility="";const l=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Ii(t.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const e={};return this.options.layoutId&&(e.opacity=null!==(n=this.latestValues.opacity)&&void 0!==n?n:1,e.pointerEvents=Ii(t.pointerEvents)||""),this.hasProjected&&!tn(this.latestValues)&&(e.transform=l?l({},""):"none",this.hasProjected=!1),e}const c=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=ji(this.projectionDeltaWithTransform,this.treeScale,c),l&&(a.transform=l(c,a.transform));const{x:h,y:d}=this.projectionDelta;a.transformOrigin=`${100*h.origin}% ${100*d.origin}% 0`,u.animationValues?a.opacity=u===this?null!==(o=null!==(i=c.opacity)&&void 0!==i?i:this.latestValues.opacity)&&void 0!==o?o:1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:a.opacity=u===this?null!==(s=c.opacity)&&void 0!==s?s:"":null!==(r=c.opacityExit)&&void 0!==r?r:0;for(const t in ti){if(void 0===c[t])continue;const{correct:e,applyTo:n}=ti[t],i=e(c[t],u);if(n){const t=n.length;for(let e=0;e<t;e++)a[n[e]]=i}else a[t]=i}return this.options.layoutId&&(a.pointerEvents=u===this?Ii(t.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(Xi),this.root.sharedNodes.clear()}}}function $i(t){t.updateLayout()}function zi(t){var e,n,i,o;const s=null!==(n=null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)&&void 0!==n?n:t.snapshot;if(t.isLead()&&t.layout&&s&&t.hasListeners("didUpdate")){const{actual:e,measured:n}=t.layout;"size"===t.options.animationType?Ke(t=>{const n=s.isShared?s.measured[t]:s.layout[t],i=Be(n);n.min=e[t].min,n.max=n.min+i}):"position"===t.options.animationType&&Ke(t=>{const n=s.isShared?s.measured[t]:s.layout[t],i=Be(e[t]);n.max=n.min+i});const i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ne(i,e,s.layout);const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};s.isShared?Ne(o,t.applyTransform(n,!0),s.measured):Ne(o,e,s.layout);const r=!Si(i);let a=!1;if(!t.resumeFrom&&(t.relativeParent=t.getClosestProjectingParent(),t.relativeParent&&!t.relativeParent.resumeFrom)){const{snapshot:n,layout:i}=t.relativeParent;if(n&&i){const t={x:{min:0,max:0},y:{min:0,max:0}};Ye(t,s.layout,n.layout);const o={x:{min:0,max:0},y:{min:0,max:0}};Ye(o,e,i.actual),Vi(t,o)||(a=!0)}}t.notifyListeners("didUpdate",{layout:e,snapshot:s,delta:o,layoutDelta:i,hasLayoutChanged:r,hasRelativeTargetChanged:a})}else t.isLead()&&(null===(o=(i=t.options).onExitComplete)||void 0===o||o.call(i));t.options.transition=void 0}function Yi(t){t.clearSnapshot()}function Xi(t){t.clearMeasurements()}function Hi(t){const{visualElement:e}=t.options;(null==e?void 0:e.getProps().onBeforeLayoutMeasure)&&e.notifyBeforeLayoutMeasure(),t.resetTransform()}function Wi(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function Gi(t){t.resolveTargetDelta()}function qi(t){t.calcProjection()}function Zi(t){t.resetRotation()}function Ki(t){t.removeLeadSnapshot()}function _i(t,e,n){t.translate=G(e.translate,0,n),t.scale=G(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ji(t,e,n,i){t.min=G(e.min,n.min,i),t.max=G(e.max,n.max,i)}function Qi(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const to={duration:.45,ease:[.4,0,.1,1]};function eo(t,e){let n=t.root;for(let e=t.path.length-1;e>=0;e--)if(Boolean(t.path[e].instance)){n=t.path[e];break}const i=(n&&n!==t.root?n.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}function no(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function io(t){no(t.x),no(t.y)}const oo=Ni({attachResizeListener:(t,e)=>j(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),so={current:void 0},ro=Ni({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!so.current){const t=new oo(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),so.current=t}return so.current},resetTransform:(t,e)=>{t.style.transform=null!=e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),ao={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function lo(t){return Boolean(ui(t)&&t.add)}function uo(t){return"object"==typeof t&&"function"==typeof t.start}function co(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const ho=t=>/^0[^.\s]+$/.test(t),po=t=>e=>e.test(t),mo=[tt,rt,st,ot,lt,at,{test:t=>"auto"===t,parse:t=>t}],fo=t=>mo.find(po(t)),go=[...mo,vt,wt],vo=t=>go.find(po(t));function yo(t){return Array.isArray(t)}function bo(t){return"string"==typeof t||yo(t)}function xo(t,e,n){const i=t.getProps();return function(t,e,n,i={},o={}){var s;return"function"==typeof e&&(e=e(null!=n?n:t.custom,i,o)),"string"==typeof e&&(e=null===(s=t.variants)||void 0===s?void 0:s[e]),"function"==typeof e&&(e=e(null!=n?n:t.custom,i,o)),e}(i,e,null!=n?n:i.custom,function(t){const e={};return t.forEachValue((t,n)=>e[n]=t.get()),e}(t),function(t){const e={};return t.forEachValue((t,n)=>e[n]=t.getVelocity()),e}(t))}function Po(t){var e;return"function"==typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||bo(t.initial)||bo(t.animate)||bo(t.whileHover)||bo(t.whileDrag)||bo(t.whileTap)||bo(t.whileFocus)||bo(t.exit)}function wo(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,li(n))}function Ao(t,e){if(!e)return;return(e[t]||e.default||e).from}function To(t,e,n={}){var i;const o=xo(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const r=o?()=>Eo(t,o,n):()=>Promise.resolve(),a=(null===(i=t.variantChildren)||void 0===i?void 0:i.size)?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,o=1,s){const r=[],a=(t.variantChildren.size-1)*i,l=1===o?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(So).forEach((t,i)=>{r.push(To(t,e,Object.assign(Object.assign({},s),{delay:n+l(i)})).then(()=>t.notifyAnimationComplete(e)))}),Promise.all(r)}(t,e,o+i,r,a,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[t,e]="beforeChildren"===l?[r,a]:[a,r];return t().then(e)}return Promise.all([r(),a(n.delay)])}function Eo(t,e,{delay:n=0,transitionOverride:i,type:o}={}){var s;let r=t.makeTargetAnimatable(e),{transition:a=t.getDefaultTransition(),transitionEnd:l}=r,u=B(r,["transition","transitionEnd"]);const c=t.getValue("willChange");i&&(a=i);const h=[],d=o&&(null===(s=t.animationState)||void 0===s?void 0:s.getState()[o]);for(const e in u){const i=t.getValue(e),o=u[e];if(!i||void 0===o||d&&Vo(d,e))continue;let s=Object.assign({delay:n},a);t.shouldReduceMotion&&Di(e)&&(s=Object.assign(Object.assign({},s),{type:!1,delay:0}));let r=kn(e,i,o,s);lo(c)&&(c.add(e),r=r.then(()=>c.remove(e))),h.push(r)}return Promise.all(h).then(()=>{l&&function(t,e){const n=xo(t,e);let i=n?t.makeTargetAnimatable(n,!1):{},{transitionEnd:o={},transition:s={}}=i,r=B(i,["transitionEnd","transition"]);r=Object.assign(Object.assign({},r),o);for(const e in r){wo(t,e,On(r[e]))}}(t,l)})}function So(t,e){return t.sortNodePosition(e)}function Vo({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}const Oo=[Ze.Animate,Ze.InView,Ze.Focus,Ze.Hover,Ze.Tap,Ze.Drag,Ze.Exit],jo=[...Oo].reverse(),Mo=Oo.length;function Ro(t){return e=>Promise.all(e.map(({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notifyAnimationStart(e),Array.isArray(e)){const o=e.map(e=>To(t,e,n));i=Promise.all(o)}else if("string"==typeof e)i=To(t,e,n);else{const o="function"==typeof e?xo(t,e,n.custom):e;i=Eo(t,o,n)}return i.then(()=>t.notifyAnimationComplete(e))}(t,e,n)))}function Co(t){let e=Ro(t);const n={[Ze.Animate]:Do(!0),[Ze.InView]:Do(),[Ze.Hover]:Do(),[Ze.Tap]:Do(),[Ze.Drag]:Do(),[Ze.Focus]:Do(),[Ze.Exit]:Do()};let i=!0;const o=(e,n)=>{const i=xo(t,n);if(i){const{transition:t,transitionEnd:n}=i,o=B(i,["transition","transitionEnd"]);e=Object.assign(Object.assign(Object.assign({},e),o),n)}return e};function s(s,r){var a;const l=t.getProps(),u=t.getVariantContext(!0)||{},c=[],h=new Set;let d={},p=1/0;for(let e=0;e<Mo;e++){const m=jo[e],f=n[m],g=null!==(a=l[m])&&void 0!==a?a:u[m],v=bo(g),y=m===r?f.isActive:null;!1===y&&(p=e);let b=g===u[m]&&g!==l[m]&&v;if(b&&i&&t.manuallyAnimateOnMount&&(b=!1),f.protectedKeys=Object.assign({},d),!f.isActive&&null===y||!g&&!f.prevProp||uo(g)||"boolean"==typeof g)continue;const x=Lo(f.prevProp,g);let P=x||m===r&&f.isActive&&!b&&v||e>p&&v;const w=Array.isArray(g)?g:[g];let A=w.reduce(o,{});!1===y&&(A={});const{prevResolvedValues:T={}}=f,E=Object.assign(Object.assign({},T),A),S=t=>{P=!0,h.delete(t),f.needsAnimating[t]=!0};for(const t in E){const e=A[t],n=T[t];d.hasOwnProperty(t)||(e!==n?gn(e)&&gn(n)?!co(e,n)||x?S(t):f.protectedKeys[t]=!0:void 0!==e?S(t):h.add(t):void 0!==e&&h.has(t)?S(t):f.protectedKeys[t]=!0)}f.prevProp=g,f.prevResolvedValues=A,f.isActive&&(d=Object.assign(Object.assign({},d),A)),i&&t.blockInitialAnimation&&(P=!1),P&&!b&&c.push(...w.map(t=>({animation:t,options:Object.assign({type:m},s)})))}if(h.size){const e={};h.forEach(n=>{const i=t.getBaseTarget(n);void 0!==i&&(e[n]=i)}),c.push({animation:e})}let m=Boolean(c.length);return i&&!1===l.initial&&!t.manuallyAnimateOnMount&&(m=!1),i=!1,m?e(c):Promise.resolve()}return{animateChanges:s,setActive:function(e,i,o){var r;if(n[e].isActive===i)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)}),n[e].isActive=i;const a=s(o,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Lo(t,e){return"string"==typeof e?e!==t:!!yo(e)&&!co(e,t)}function Do(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const ko=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];const Fo=new Set;const Bo=({treeType:t="",build:e,getBaseTarget:n,makeTargetAnimatable:i,measureViewportBox:o,render:s,readValueFromInstance:r,removeValueFromRenderState:a,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:c,props:h,presenceId:d,blockInitialAnimation:p,visualState:m,shouldReduceMotion:f},g={})=>{let v=!1;const{latestValues:y,renderState:b}=m;let x;const A=function(){const t=ko.map(()=>new ri),e={},n={clearAllListeners:()=>t.forEach(t=>t.clear()),updatePropListeners:t=>{ko.forEach(i=>{var o;const s="on"+i,r=t[s];null===(o=e[i])||void 0===o||o.call(e),r&&(e[i]=n[s](r))})}};return t.forEach((t,e)=>{n["on"+ko[e]]=e=>t.add(e),n["notify"+ko[e]]=(...e)=>t.notify(...e)}),n}(),T=new Map,E=new Map;let S={};const V=Object.assign({},y);let O;function j(){x&&v&&(M(),s(x,b,h.style,I.projection))}function M(){e(I,b,y,g,h)}function R(){A.notifyUpdate(y)}function C(t,e){const n=e.onChange(e=>{y[t]=e,h.onUpdate&&P.update(R,!1,!0)}),i=e.onRenderRequest(I.scheduleRender);E.set(t,()=>{n(),i()})}const L=u(h),{willChange:D}=L,k=B(L,["willChange"]);for(const t in k){const e=k[t];void 0!==y[t]&&ui(e)&&(e.set(y[t],!1),lo(D)&&D.add(t))}const F=Po(h),U=function(t){return Boolean(Po(t)||t.variants)}(h),I=Object.assign(Object.assign({treeType:t,current:null,depth:c?c.depth+1:0,parent:c,children:new Set,presenceId:d,shouldReduceMotion:f,variantChildren:U?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null==c?void 0:c.isMounted()),blockInitialAnimation:p,isMounted:()=>Boolean(x),mount(t){v=!0,x=I.current=t,I.projection&&I.projection.mount(t),U&&c&&!F&&(O=null==c?void 0:c.addVariantChild(I)),T.forEach((t,e)=>C(e,t)),null==c||c.children.add(I),I.setProps(h)},unmount(){var t;null===(t=I.projection)||void 0===t||t.unmount(),w.update(R),w.render(j),E.forEach(t=>t()),null==O||O(),null==c||c.children.delete(I),A.clearAllListeners(),x=void 0,v=!1},addVariantChild(t){var e;const n=I.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),()=>n.variantChildren.delete(t)},sortNodePosition:e=>l&&t===e.treeType?l(I.getInstance(),e.getInstance()):0,getClosestVariantNode:()=>U?I:null==c?void 0:c.getClosestVariantNode(),getLayoutId:()=>h.layoutId,getInstance:()=>x,getStaticValue:t=>y[t],setStaticValue:(t,e)=>y[t]=e,getLatestValues:()=>y,setVisibility(t){I.isVisible!==t&&(I.isVisible=t,I.scheduleRender())},makeTargetAnimatable:(t,e=!0)=>i(I,t,h,e),measureViewportBox:()=>o(x,h),addValue(t,e){I.hasValue(t)&&I.removeValue(t),T.set(t,e),y[t]=e.get(),C(t,e)},removeValue(t){var e;T.delete(t),null===(e=E.get(t))||void 0===e||e(),E.delete(t),delete y[t],a(t,b)},hasValue:t=>T.has(t),getValue(t,e){let n=T.get(t);return void 0===n&&void 0!==e&&(n=li(e),I.addValue(t,n)),n},forEachValue:t=>T.forEach(t),readValue:t=>{var e;return null!==(e=y[t])&&void 0!==e?e:r(x,t,g)},setBaseTarget(t,e){V[t]=e},getBaseTarget(t){if(n){const e=n(h,t);if(void 0!==e&&!ui(e))return e}return V[t]}},A),{build:()=>(M(),b),scheduleRender(){P.render(j,!1,!0)},syncRender:j,setProps(t){(t.transformTemplate||h.transformTemplate)&&I.scheduleRender(),h=t,A.updatePropListeners(t),S=function(t,e,n){var i;const{willChange:o}=e;for(const s in e){const r=e[s],a=n[s];if(ui(r))t.addValue(s,r),lo(o)&&o.add(s);else if(ui(a))t.addValue(s,li(r)),lo(o)&&o.remove(s);else if(a!==r)if(t.hasValue(s)){const e=t.getValue(s);!e.hasAnimated&&e.set(r)}else t.addValue(s,li(null!==(i=t.getStaticValue(s))&&void 0!==i?i:r))}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(I,u(h),S)},getProps:()=>h,getVariant:t=>{var e;return null===(e=h.variants)||void 0===e?void 0:e[t]},getDefaultTransition:()=>h.transition,getTransformPagePoint:()=>h.transformPagePoint,getVariantContext(t=!1){if(t)return null==c?void 0:c.getVariantContext();if(!F){const t=(null==c?void 0:c.getVariantContext())||{};return void 0!==h.initial&&(t.initial=h.initial),t}const e={};for(let t=0;t<Io;t++){const n=Uo[t],i=h[n];(bo(i)||!1===i)&&(e[n]=i)}return e}});return I},Uo=["initial",...Oo],Io=Uo.length;function No(t){return t.startsWith("--")}const $o=(t,e)=>e&&"number"==typeof t?e.transform(t):t;function zo(t,e,n,i){var o;const{style:s,vars:r,transform:a,transformKeys:l,transformOrigin:u}=t;l.length=0;let c=!1,h=!1,d=!0;for(const t in e){const n=e[t];if(No(t)){r[t]=n;continue}const i=An[t],p=$o(n,i);if(Di(t)){if(c=!0,a[t]=p,l.push(t),!d)continue;n!==(null!==(o=i.default)&&void 0!==o?o:0)&&(d=!1)}else Fi(t)?(u[t]=p,h=!0):s[t]=p}c?s.transform=function({transform:t,transformKeys:e},{enableHardwareAcceleration:n=!0,allowTransformNone:i=!0},o,s){let r="";e.sort(Ci);let a=!1;const l=e.length;for(let n=0;n<l;n++){const i=e[n];r+=`${ao[i]||i}(${t[i]}) `,"z"===i&&(a=!0)}return!a&&n&&(r+="translateZ(0)"),r=r.trim(),s?r=s(t,o?"":r):i&&o&&(r="none"),r}(t,n,d,i):i?s.transform=i({},""):!e.transform&&s.transform&&(s.transform="none"),h&&(s.transformOrigin=function({originX:t="50%",originY:e="50%",originZ:n=0}){return`${t} ${e} ${n}`}(u))}const Yo=new Set(["width","height","top","left","right","bottom","x","y"]),Xo=t=>Yo.has(t),Ho=(t,e)=>{t.set(e,!1),t.set(e)},Wo=t=>t===tt||t===rt;var Go;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Go||(Go={}));const qo=(t,e)=>parseFloat(t.split(", ")[e]),Zo=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const o=i.match(/^matrix3d\((.+)\)$/);if(o)return qo(o[1],e);{const e=i.match(/^matrix\((.+)\)$/);return e?qo(e[1],t):0}},Ko=new Set(["x","y","z"]),_o=Ri.filter(t=>!Ko.has(t));const Jo={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:Zo(4,13),y:Zo(5,14)},Qo=(t,e,n={},i={})=>{e=Object.assign({},e),i=Object.assign({},i);const o=Object.keys(e).filter(Xo);let s=[],r=!1;const a=[];if(o.forEach(o=>{const l=t.getValue(o);if(!t.hasValue(o))return;let u=n[o],c=fo(u);const h=e[o];let d;if(gn(h)){const t=h.length,e=null===h[0]?1:0;u=h[e],c=fo(u);for(let n=e;n<t;n++)d?fo(h[n]):d=fo(h[n])}else d=fo(h);if(c!==d)if(Wo(c)&&Wo(d)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof h?e[o]=parseFloat(h):Array.isArray(h)&&d===rt&&(e[o]=h.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==d?void 0:d.transform)&&(0===u||0===h)?0===u?l.set(d.transform(u)):e[o]=c.transform(h):(r||(s=function(t){const e=[];return _o.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e.length&&t.syncRender(),e}(t),r=!0),a.push(o),i[o]=void 0!==i[o]?i[o]:e[o],Ho(l,h))}),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,o=((t,e,n)=>{const i=e.measureViewportBox(),o=e.getInstance(),s=getComputedStyle(o),{display:r}=s,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach(t=>{a[t]=Jo[t](i,s)}),e.syncRender();const l=e.measureViewportBox();return n.forEach(n=>{const i=e.getValue(n);Ho(i,a[n]),t[n]=Jo[n](l,s)}),t})(e,t,a);return s.length&&s.forEach(([e,n])=>{t.getValue(e).set(n)}),t.syncRender(),R&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:i}}return{target:e,transitionEnd:i}};function ts(t,e,n,i){return(t=>Object.keys(t).some(Xo))(e)?Qo(t,e,n,i):{target:e,transitionEnd:i}}const es=(t,e,n,i)=>{const o=function(t,e,n){var i,o=B(e,[]);const s=t.getInstance();if(!(s instanceof Element))return{target:o,transitionEnd:n};n&&(n=Object.assign({},n)),t.forEachValue(t=>{const e=t.get();if(!Kn(e))return;const n=Jn(e,s);n&&t.set(n)});for(const t in o){const e=o[t];if(!Kn(e))continue;const r=Jn(e,s);r&&(o[t]=r,n&&(null!==(i=n[t])&&void 0!==i||(n[t]=e)))}return{target:o,transitionEnd:n}}(t,e,i);return ts(t,e=o.target,n,i=o.transitionEnd)};function ns(t,{layout:e,layoutId:n}){return Di(t)||Fi(t)||(e||void 0!==n)&&(!!ti[t]||"opacity"===t)}function is(t){const{style:e}=t,n={};for(const i in e)(ui(e[i])||ns(i,t))&&(n[i]=e[i]);return n}function os(t,{style:e,vars:n},i,o){Object.assign(t.style,e,o&&o.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}const ss={treeType:"dom",readValueFromInstance(t,e){if(Di(e)){const t=En(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),o=(No(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof o?o.trim():o}var n},sortNodePosition:(t,e)=>2&t.compareDocumentPosition(e)?1:-1,getBaseTarget(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]},measureViewportBox:(t,{transformPagePoint:e})=>dn(t,e),resetTransform(t,e,n){const{transformTemplate:i}=n;e.style.transform=i?i({},""):"none",t.scheduleRender()},restoreTransform(t,e){t.style.transform=e.style.transform},removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]},makeTargetAnimatable(t,e,n,i){var{transition:o,transitionEnd:s}=e,r=B(e,["transition","transitionEnd"]),a=n.transformValues;void 0===i&&(i=!0);let l=function(t,e,n){var i,o;const s={};for(const r in t)s[r]=null!==(i=Ao(r,e))&&void 0!==i?i:null===(o=n.getValue(r))||void 0===o?void 0:o.get();return s}(r,o||{},t);if(a&&(s&&(s=a(s)),r&&(r=a(r)),l&&(l=a(l))),i){!function(t,e,n){var i,o,s,r;const a=Object.keys(e).filter(e=>!t.hasValue(e)),l=a.length;if(l)for(let u=0;u<l;u++){const l=a[u],c=e[l];let h=null;Array.isArray(c)&&(h=c[0]),null===h&&(h=null!==(o=null!==(i=n[l])&&void 0!==i?i:t.readValue(l))&&void 0!==o?o:e[l]),null!=h&&("string"==typeof h&&(/^\-?\d*\.?\d+$/.test(h)||ho(h))?h=parseFloat(h):!vo(h)&&wt.test(c)&&(h=Sn(l,c)),t.addValue(l,li(h)),null!==(s=(r=n)[l])&&void 0!==s||(r[l]=h),t.setBaseTarget(l,h))}}(t,r,l);const e=es(t,r,l,s);s=e.transitionEnd,r=e.target}return Object.assign({transition:o,transitionEnd:s},r)},scrapeMotionValuesFromProps:is,build(t,e,n,i,o){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden"),zo(e,n,i,o.transformTemplate)},render:os},rs=Bo(ss),as={animation:$n(({visualElement:t,animate:n})=>{t.animationState||(t.animationState=Co(t)),uo(n)&&e(()=>n.subscribe(t),[n])}),exit:$n(t=>{const{custom:n,visualElement:i}=t,[s,r]=Xn(),a=o(Yn);e(()=>{var t,e;i.isPresent=s;const o=null===(t=i.animationState)||void 0===t?void 0:t.setActive(Ze.Exit,!s,{custom:null!==(e=null==a?void 0:a.custom)&&void 0!==e?e:n});!s&&(null==o||o.then(r))},[s])})};function ls(t,e,n){return(i,o)=>{var s;r(i)&&!ke()&&(null===(s=t.animationState)||void 0===s||s.setActive(Ze.Hover,e),null==n||n(i,o))}}const us=(t,e)=>!!e&&(t===e||us(t,e.parentElement));const cs=("undefined"==typeof process||process.env,"production"),hs=new WeakMap,ds=new WeakMap,ps=t=>{var e;null===(e=hs.get(t.target))||void 0===e||e(t)},ms=t=>{t.forEach(ps)};function fs(t,e,n){const i=function(t){var{root:e}=t,n=B(t,["root"]);const i=e||document;ds.has(i)||ds.set(i,{});const o=ds.get(i),s=JSON.stringify(n);return o[s]||(o[s]=new IntersectionObserver(ms,Object.assign({root:e},n))),o[s]}(e);return hs.set(t,n),i.observe(t),()=>{hs.delete(t),i.unobserve(t)}}const gs={some:0,all:1};function vs(t,n,i,{root:o,margin:s,amount:r="some",once:a}){e(()=>{if(!t)return;const e={root:null==o?void 0:o.current,rootMargin:s,threshold:"number"==typeof r?r:gs[r]};return fs(i.getInstance(),e,t=>{var e;const{isIntersecting:o}=t;if(n.isInView===o)return;if(n.isInView=o,a&&!o&&n.hasEnteredView)return;o&&(n.hasEnteredView=!0),null===(e=i.animationState)||void 0===e||e.setActive(Ze.InView,o);const s=i.getProps(),r=o?s.onViewportEnter:s.onViewportLeave;null==r||r(t)})},[t,o,s,r])}function ys(t,n,i,{fallback:o=!0}){e(()=>{var e,s;t&&o&&("production"!==cs&&(e="IntersectionObserver not available on this device. whileInView animations will trigger on mount.",!1||Fo.has(e)||(console.warn(e),s&&console.warn(s),Fo.add(e))),requestAnimationFrame(()=>{var t;n.hasEnteredView=!0;const{onViewportEnter:e}=i.getProps();null==e||e(null),null===(t=i.animationState)||void 0===t||t.setActive(Ze.InView,!0)}))},[t])}const bs={inView:$n((function({visualElement:t,whileInView:e,onViewportEnter:i,onViewportLeave:o,viewport:s={}}){const r=n({hasEnteredView:!1,isInView:!1});let a=Boolean(e||i||o);s.once&&r.current.hasEnteredView&&(a=!1),("undefined"==typeof IntersectionObserver?ys:vs)(a,r.current,t,s)})),tap:$n((function({onTap:t,onTapStart:e,onTapCancel:i,whileTap:o,visualElement:s}){const r=t||e||i||o,a=n(!1),l=n(null),u={passive:!(e||t||i||m)};function c(){var t;null===(t=l.current)||void 0===t||t.call(l),l.current=null}function h(){var t;return c(),a.current=!1,null===(t=s.animationState)||void 0===t||t.setActive(Ze.Tap,!1),!ke()}function d(e,n){h()&&(us(s.getInstance(),e.target)?null==t||t(e,n):null==i||i(e,n))}function p(t,e){h()&&(null==i||i(t,e))}function m(t,n){var i;c(),a.current||(a.current=!0,l.current=kt(k(window,"pointerup",d,u),k(window,"pointercancel",p,u)),null===(i=s.animationState)||void 0===i||i.setActive(Ze.Tap,!0),null==e||e(t,n))}F(s,"pointerdown",r?m:void 0,u),Nn(c)})),focus:$n((function({whileFocus:t,visualElement:e}){M(e,"focus",t?()=>{var t;null===(t=e.animationState)||void 0===t||t.setActive(Ze.Focus,!0)}:void 0),M(e,"blur",t?()=>{var t;null===(t=e.animationState)||void 0===t||t.setActive(Ze.Focus,!1)}:void 0)})),hover:$n((function({onHoverStart:t,onHoverEnd:e,whileHover:n,visualElement:i}){F(i,"pointerenter",t||n?ls(i,!0,t):void 0,{passive:!t}),F(i,"pointerleave",e||n?ls(i,!1,e):void 0,{passive:!e})}))};function xs(t,e,n){return"string"==typeof t?t:rt.transform(e+n*t)}const Ps={offset:"stroke-dashoffset",array:"stroke-dasharray"},ws={offset:"strokeDashoffset",array:"strokeDasharray"};function As(t,e,n,i){var{attrX:o,attrY:s,originX:r,originY:a,pathLength:l,pathSpacing:u=1,pathOffset:c=0}=e;zo(t,B(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,i),t.attrs=t.style,t.style={};const{attrs:h,style:d,dimensions:p}=t;h.transform&&(p&&(d.transform=h.transform),delete h.transform),p&&(void 0!==r||void 0!==a||d.transform)&&(d.transformOrigin=function(t,e,n){return`${xs(e,t.x,t.width)} ${xs(n,t.y,t.height)}`}(p,void 0!==r?r:.5,void 0!==a?a:.5)),void 0!==o&&(h.x=o),void 0!==s&&(h.y=s),void 0!==l&&function(t,e,n=1,i=0,o=!0){t.pathLength=1;const s=o?Ps:ws;t[s.offset]=rt.transform(-i);const r=rt.transform(e),a=rt.transform(n);t[s.array]=`${r} ${a}`}(h,l,u,c,!1)}const Ts=/([a-z])([A-Z])/g,Es=t=>t.replace(Ts,"$1-$2").toLowerCase(),Ss=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);const Vs=Bo(Object.assign(Object.assign({},ss),{getBaseTarget:(t,e)=>t[e],readValueFromInstance(t,e){var n;return Di(e)?(null===(n=En(e))||void 0===n?void 0:n.default)||0:(e=Ss.has(e)?e:Es(e),t.getAttribute(e))},scrapeMotionValuesFromProps:function(t){const e=is(t);for(const n in t)if(ui(t[n])){e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e},build(t,e,n,i,o){As(e,n,i,o.transformTemplate)},render:function(t,e,n,i){os(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Ss.has(n)?n:Es(n),e.attrs[n])}})),Os=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];const js=Object.assign(Object.assign({renderer:(t,e)=>function(t){return"string"==typeof t&&!t.includes("-")&&!!(Os.indexOf(t)>-1||/[A-Z]/.test(t))}(t)?Vs(e,{enableHardwareAcceleration:!1}):rs(e,{enableHardwareAcceleration:!0})},as),bs),Ms=Object.assign(Object.assign(Object.assign(Object.assign({},js),zn),ii),{projectionNodeConstructor:ro});export{Ms as domMax};
@@ -1 +1 @@
1
- import*as t from"react";import r,{createContext as n,useContext as e,useLayoutEffect as o,useEffect as a,useState as i,useRef as s,useCallback as u,useMemo as l,forwardRef as c,createElement as f}from"react";var d=function(t,r){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])})(t,r)};var p=function(){return(p=Object.assign||function(t){for(var r,n=1,e=arguments.length;n<e;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};function v(t,r){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)r.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(n[e[o]]=t[e[o]])}return n}var m=("undefined"==typeof process||process.env,"production"),y=function(t){return{isEnabled:function(r){return t.some((function(t){return!!r[t]}))}}},g={measureLayout:y(["layout","layoutId","drag"]),animation:y(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:y(["exit"]),drag:y(["drag","dragControls"]),focus:y(["whileFocus"]),hover:y(["whileHover","onHoverStart","onHoverEnd"]),tap:y(["whileTap","onTap","onTapStart","onTapCancel"]),pan:y(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:y(["whileInView","onViewportEnter","onViewportLeave"])};var h=n({strict:!1}),w=Object.keys(g),b=w.length;var S=n({transformPagePoint:function(t){return t},isStatic:!1,reducedMotion:"never"}),O=n({});var x=n(null),j="undefined"!=typeof document,E=j?o:a,P={current:null},C=!1;function T(){return!C&&function(){if(C=!0,j)if(window.matchMedia){var t=window.matchMedia("(prefers-reduced-motion)"),r=function(){return P.current=t.matches};t.addListener(r),r()}else P.current=!1}(),function(t,r){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var e,o,a=n.call(t),i=[];try{for(;(void 0===r||r-- >0)&&!(e=a.next()).done;)i.push(e.value)}catch(t){o={error:t}}finally{try{e&&!e.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}(i(P.current),1)[0]}function V(t,r,n,o){var i,u,l=e(h),c=e(O).visualElement,f=e(x),d=(i=T(),"never"!==(u=e(S).reducedMotion)&&("always"===u||i)),p=s(void 0);o||(o=l.renderer),!p.current&&o&&(p.current=o(t,{visualState:r,parent:c,props:n,presenceId:null==f?void 0:f.id,blockInitialAnimation:!1===(null==f?void 0:f.initial),shouldReduceMotion:d}));var v=p.current;return E((function(){null==v||v.syncRender()})),a((function(){var t;null===(t=null==v?void 0:v.animationState)||void 0===t||t.animateChanges()})),E((function(){return function(){return null==v?void 0:v.notifyUnmount()}}),[]),v}function L(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function k(t){return"string"==typeof t||function(t){return Array.isArray(t)}(t)}function A(t){var r;return"function"==typeof(null===(r=t.animate)||void 0===r?void 0:r.start)||k(t.initial)||k(t.animate)||k(t.whileHover)||k(t.whileDrag)||k(t.whileTap)||k(t.whileFocus)||k(t.exit)}function M(t){var r=function(t,r){if(A(t)){var n=t.initial,e=t.animate;return{initial:!1===n||k(n)?n:void 0,animate:k(e)?e:void 0}}return!1!==t.inherit?r:{}}(t,e(O)),n=r.initial,o=r.animate;return l((function(){return{initial:n,animate:o}}),[R(n),R(o)])}function R(t){return Array.isArray(t)?t.join(" "):t}function B(t){var r=s(null);return null===r.current&&(r.current=t()),r.current}var D=!1,X=1;var Y=n({}),H=n({});var I=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}d(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}(r,t),r.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},r.prototype.componentDidUpdate=function(){},r.prototype.updateProps=function(){var t=this.props,r=t.visualElement,n=t.props;r&&r.setProps(n)},r.prototype.render=function(){return this.props.children},r}(r.Component);function W(r){var n=r.preloadedFeatures,o=r.createVisualElement,a=r.projectionNodeConstructor,i=r.useRender,s=r.useVisualState,l=r.Component;return n&&function(t){for(var r in t)null!==t[r]&&("projectionNodeConstructor"===r?g.projectionNodeConstructor=t[r]:g[r].Component=t[r])}(n),c((function(r,c){var f=function(t){var r,n=t.layoutId,o=null===(r=e(Y))||void 0===r?void 0:r.id;return o&&void 0!==n?o+"-"+n:n}(r);r=p(p({},r),{layoutId:f});var d=e(S),v=null,y=M(r),x=d.isStatic?void 0:B((function(){if(D)return X++})),E=s(r,d.isStatic);return!d.isStatic&&j&&(y.visualElement=V(l,E,p(p({},d),r),o),function(t,r,n,o){var a,i=r.layoutId,s=r.layout,u=r.drag,l=r.dragConstraints,c=r.layoutScroll,f=e(H);o&&n&&!(null==n?void 0:n.projection)&&(n.projection=new o(t,n.getLatestValues(),null===(a=n.parent)||void 0===a?void 0:a.projection),n.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:Boolean(u)||l&&L(l),visualElement:n,scheduleRender:function(){return n.scheduleRender()},animationType:"string"==typeof s?s:"both",initialPromotionConfig:f,layoutScroll:c}))}(x,r,y.visualElement,a||g.projectionNodeConstructor),v=function(r,n,o){var a=[],i=e(h);if(!n)return null;"production"!==m&&o&&i.strict;for(var s=0;s<b;s++){var u=w[s],l=g[u],c=l.isEnabled,f=l.Component;c(r)&&f&&a.push(t.createElement(f,p({key:u},r,{visualElement:n})))}return a}(r,y.visualElement,n)),t.createElement(I,{visualElement:y.visualElement,props:p(p({},d),r)},v,t.createElement(O.Provider,{value:y},i(l,r,x,function(t,r,n){return u((function(e){var o;e&&(null===(o=t.mount)||void 0===o||o.call(t,e)),r&&(e?r.mount(e):r.unmount()),n&&("function"==typeof n?n(e):L(n)&&(n.current=e))}),[r])}(E,y.visualElement,c),E,d.isStatic,y.visualElement)))}))}var F=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Z(t){return"string"==typeof t&&!t.includes("-")&&!!(F.indexOf(t)>-1||/[A-Z]/.test(t))}var _={},z=["","X","Y","Z"],U=["transformPerspective","x","y","z"];function N(t,r){return U.indexOf(t)-U.indexOf(r)}["translate","scale","rotate","skew"].forEach((function(t){return z.forEach((function(r){return U.push(t+r)}))}));var K=new Set(U);function $(t){return K.has(t)}var q=new Set(["originX","originY","originZ"]);function G(t){return q.has(t)}function J(t,r){var n=r.layout,e=r.layoutId;return $(t)||G(t)||(n||void 0!==e)&&(!!_[t]||"opacity"===t)}var Q=function(t){return Boolean(null!==t&&"object"==typeof t&&t.getVelocity)},tt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function rt(t){return t.startsWith("--")}var nt=function(t,r){return r&&"number"==typeof t?r.transform(t):t};const et={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},ot=Object.assign(Object.assign({},et),{transform:(at=0,it=1,t=>Math.max(Math.min(t,it),at))});var at,it;const st=Object.assign(Object.assign({},et),{default:1}),ut=t=>({test:r=>function(t){return"string"==typeof t}(r)&&r.endsWith(t)&&1===r.split(" ").length,parse:parseFloat,transform:r=>`${r}${t}`}),lt=ut("deg"),ct=ut("%"),ft=ut("px"),dt=Object.assign(Object.assign({},ct),{parse:t=>ct.parse(t)/100,transform:t=>ct.transform(100*t)});var pt=p(p({},et),{transform:Math.round}),vt={borderWidth:ft,borderTopWidth:ft,borderRightWidth:ft,borderBottomWidth:ft,borderLeftWidth:ft,borderRadius:ft,radius:ft,borderTopLeftRadius:ft,borderTopRightRadius:ft,borderBottomRightRadius:ft,borderBottomLeftRadius:ft,width:ft,maxWidth:ft,height:ft,maxHeight:ft,size:ft,top:ft,right:ft,bottom:ft,left:ft,padding:ft,paddingTop:ft,paddingRight:ft,paddingBottom:ft,paddingLeft:ft,margin:ft,marginTop:ft,marginRight:ft,marginBottom:ft,marginLeft:ft,rotate:lt,rotateX:lt,rotateY:lt,rotateZ:lt,scale:st,scaleX:st,scaleY:st,scaleZ:st,skew:lt,skewX:lt,skewY:lt,distance:ft,translateX:ft,translateY:ft,translateZ:ft,x:ft,y:ft,z:ft,perspective:ft,transformPerspective:ft,opacity:ot,originX:dt,originY:dt,originZ:ft,zIndex:pt,fillOpacity:ot,strokeOpacity:ot,numOctaves:pt};function mt(t,r,n,e){var o,a=t.style,i=t.vars,s=t.transform,u=t.transformKeys,l=t.transformOrigin;u.length=0;var c=!1,f=!1,d=!0;for(var p in r){var v=r[p];if(rt(p))i[p]=v;else{var m=vt[p],y=nt(v,m);if($(p)){if(c=!0,s[p]=y,u.push(p),!d)continue;v!==(null!==(o=m.default)&&void 0!==o?o:0)&&(d=!1)}else G(p)?(l[p]=y,f=!0):a[p]=y}}c?a.transform=function(t,r,n,e){var o=t.transform,a=t.transformKeys,i=r.enableHardwareAcceleration,s=void 0===i||i,u=r.allowTransformNone,l=void 0===u||u,c="";a.sort(N);for(var f=!1,d=a.length,p=0;p<d;p++){var v=a[p];c+="".concat(tt[v]||v,"(").concat(o[v],") "),"z"===v&&(f=!0)}return!f&&s?c+="translateZ(0)":c=c.trim(),e?c=e(o,n?"":c):l&&n&&(c="none"),c}(t,n,d,e):e?a.transform=e({},""):!r.transform&&a.transform&&(a.transform="none"),f&&(a.transformOrigin=function(t){var r=t.originX,n=void 0===r?"50%":r,e=t.originY,o=void 0===e?"50%":e,a=t.originZ,i=void 0===a?0:a;return"".concat(n," ").concat(o," ").concat(i)}(l))}var yt=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function gt(t,r,n){for(var e in r)Q(r[e])||J(e,n)||(t[e]=r[e])}function ht(t,r,n){var e={};return gt(e,t.style||{},t),Object.assign(e,function(t,r,n){var e=t.transformTemplate;return l((function(){var t={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};mt(t,r,{enableHardwareAcceleration:!n},e);var o=t.style;return p(p({},t.vars),o)}),[r])}(t,r,n)),t.transformValues&&(e=t.transformValues(e)),e}function wt(t,r,n){var e={},o=ht(t,r,n);return Boolean(t.drag)&&!1!==t.dragListener&&(e.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-".concat("x"===t.drag?"y":"x")),e.style=o,e}var bt=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function St(t){return bt.has(t)}var Ot,xt=function(t){return!St(t)};try{(Ot=require("@emotion/is-prop-valid").default)&&(xt=function(t){return t.startsWith("on")?!St(t):Ot(t)})}catch(t){}function jt(t,r,n){return"string"==typeof t?t:ft.transform(r+n*t)}var Et={offset:"stroke-dashoffset",array:"stroke-dasharray"},Pt={offset:"strokeDashoffset",array:"strokeDasharray"};function Ct(t,r,n,e){var o=r.attrX,a=r.attrY,i=r.originX,s=r.originY,u=r.pathLength,l=r.pathSpacing,c=void 0===l?1:l,f=r.pathOffset,d=void 0===f?0:f;mt(t,v(r,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,e),t.attrs=t.style,t.style={};var p=t.attrs,m=t.style,y=t.dimensions;p.transform&&(y&&(m.transform=p.transform),delete p.transform),y&&(void 0!==i||void 0!==s||m.transform)&&(m.transformOrigin=function(t,r,n){var e=jt(r,t.x,t.width),o=jt(n,t.y,t.height);return"".concat(e," ").concat(o)}(y,void 0!==i?i:.5,void 0!==s?s:.5)),void 0!==o&&(p.x=o),void 0!==a&&(p.y=a),void 0!==u&&function(t,r,n,e,o){void 0===n&&(n=1),void 0===e&&(e=0),void 0===o&&(o=!0),t.pathLength=1;var a=o?Et:Pt;t[a.offset]=ft.transform(-e);var i=ft.transform(r),s=ft.transform(n);t[a.array]="".concat(i," ").concat(s)}(p,u,c,d,!1)}var Tt=function(){return p(p({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function Vt(t,r){var n=l((function(){var n=Tt();return Ct(n,r,{enableHardwareAcceleration:!1},t.transformTemplate),p(p({},n.attrs),{style:p({},n.style)})}),[r]);if(t.style){var e={};gt(e,t.style,t),n.style=p(p({},e),n.style)}return n}function Lt(t){void 0===t&&(t=!1);return function(r,n,e,o,a,i){var s=a.latestValues,u=(Z(r)?Vt:wt)(n,s,i),l=function(t,r,n){var e={};for(var o in t)(xt(o)||!0===n&&St(o)||!r&&!St(o)||t.draggable&&o.startsWith("onDrag"))&&(e[o]=t[o]);return e}(n,"string"==typeof r,t),c=p(p(p({},l),u),{ref:o});return e&&(c["data-projection-id"]=e),f(r,c)}}var kt=/([a-z])([A-Z])/g;var At=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function Mt(t,r,n,e){for(var o in function(t,r,n,e){var o=r.style,a=r.vars;for(var i in Object.assign(t.style,o,e&&e.getProjectionStyles(n)),a)t.style.setProperty(i,a[i])}(t,r,void 0,e),r.attrs)t.setAttribute(At.has(o)?o:o.replace(kt,"$1-$2").toLowerCase(),r.attrs[o])}function Rt(t){var r=t.style,n={};for(var e in r)(Q(r[e])||J(e,t))&&(n[e]=r[e]);return n}function Bt(t){var r,n=Q(t)?t.get():t;return r=n,Boolean(r&&"object"==typeof r&&r.mix&&r.toValue)?n.toValue():n}function Dt(t,r,n,e){var o=t.scrapeMotionValuesFromProps,a=t.createRenderState,i=t.onMount,s={latestValues:Yt(r,n,e,o),renderState:a()};return i&&(s.mount=function(t){return i(r,t,s)}),s}var Xt=function(t){return function(r,n){var o=e(O),a=e(x);return n?Dt(t,r,o,a):B((function(){return Dt(t,r,o,a)}))}};function Yt(t,r,n,e){var o={},a=!1===(null==n?void 0:n.initial),i=e(t);for(var s in i)o[s]=Bt(i[s]);var u=t.initial,l=t.animate,c=A(t),f=function(t){return Boolean(A(t)||t.variants)}(t);r&&f&&!c&&!1!==t.inherit&&(null!=u||(u=r.initial),null!=l||(l=r.animate));var d,p=a||!1===u,m=p?l:u;!m||"boolean"==typeof m||"object"==typeof(d=m)&&"function"==typeof d.start||(Array.isArray(m)?m:[m]).forEach((function(r){var n=function(t,r,n,e,o){var a;return void 0===e&&(e={}),void 0===o&&(o={}),"function"==typeof r&&(r=r(null!=n?n:t.custom,e,o)),"string"==typeof r&&(r=null===(a=t.variants)||void 0===a?void 0:a[r]),"function"==typeof r&&(r=r(null!=n?n:t.custom,e,o)),r}(t,r);if(n){var e=n.transitionEnd;n.transition;var a=v(n,["transitionEnd","transition"]);for(var i in a){var s=a[i];if(Array.isArray(s))s=s[p?s.length-1:0];null!==s&&(o[i]=s)}for(var i in e)o[i]=e[i]}}));return o}var Ht={useVisualState:Xt({scrapeMotionValuesFromProps:function(t){var r=Rt(t);for(var n in t){if(Q(t[n]))r["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return r},createRenderState:Tt,onMount:function(t,r,n){var e=n.renderState,o=n.latestValues;try{e.dimensions="function"==typeof r.getBBox?r.getBBox():r.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}Ct(e,o,{enableHardwareAcceleration:!1},t.transformTemplate),Mt(r,e)}})},It={useVisualState:Xt({scrapeMotionValuesFromProps:Rt,createRenderState:yt})};var Wt=function(t){function r(r,n){return void 0===n&&(n={}),W(t(r,n))}if("undefined"==typeof Proxy)return r;var n=new Map;return new Proxy(r,{get:function(t,e){return n.has(e)||n.set(e,r(e)),n.get(e)}})}((function(t,r,n,e,o){var a=r.forwardMotionProps,i=void 0!==a&&a,s=Z(t)?Ht:It;return p(p({},s),{preloadedFeatures:n,useRender:Lt(i),createVisualElement:e,projectionNodeConstructor:o,Component:t})}));export{Wt as m};
1
+ import*as t from"react";import n,{createContext as e,useContext as r,useLayoutEffect as o,useEffect as a,useState as i,useRef as s,useCallback as c,useMemo as l,forwardRef as u,createElement as f}from"react";const d=("undefined"==typeof process||process.env,"production"),p=t=>({isEnabled:n=>t.some(t=>!!n[t])}),m={measureLayout:p(["layout","layoutId","drag"]),animation:p(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:p(["exit"]),drag:p(["drag","dragControls"]),focus:p(["whileFocus"]),hover:p(["whileHover","onHoverStart","onHoverEnd"]),tap:p(["whileTap","onTap","onTapStart","onTapCancel"]),pan:p(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:p(["whileInView","onViewportEnter","onViewportLeave"])};const g=e({strict:!1}),y=Object.keys(m),h=y.length;const v=e({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),b=e({});const w=e(null),O="undefined"!=typeof document,j=O?o:a,S={current:null};let x=!1;function E(){!x&&function(){if(x=!0,O)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),n=()=>S.current=t.matches;t.addListener(n),n()}else S.current=!1}();const[t]=i(S.current);return t}function P(t,n,e,o){const i=r(g),c=r(b).visualElement,l=r(w),u=function(){const t=E(),{reducedMotion:n}=r(v);return"never"!==n&&("always"===n||t)}(),f=s(void 0);o||(o=i.renderer),!f.current&&o&&(f.current=o(t,{visualState:n,parent:c,props:e,presenceId:null==l?void 0:l.id,blockInitialAnimation:!1===(null==l?void 0:l.initial),shouldReduceMotion:u}));const d=f.current;return j(()=>{null==d||d.syncRender()}),a(()=>{var t;null===(t=null==d?void 0:d.animationState)||void 0===t||t.animateChanges()}),j(()=>()=>null==d?void 0:d.notifyUnmount(),[]),d}function C(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function T(t){return"string"==typeof t||function(t){return Array.isArray(t)}(t)}function V(t){var n;return"function"==typeof(null===(n=t.animate)||void 0===n?void 0:n.start)||T(t.initial)||T(t.animate)||T(t.whileHover)||T(t.whileDrag)||T(t.whileTap)||T(t.whileFocus)||T(t.exit)}function L(t){const{initial:n,animate:e}=function(t,n){if(V(t)){const{initial:n,animate:e}=t;return{initial:!1===n||T(n)?n:void 0,animate:T(e)?e:void 0}}return!1!==t.inherit?n:{}}(t,r(b));return l(()=>({initial:n,animate:e}),[k(n),k(e)])}function k(t){return Array.isArray(t)?t.join(" "):t}function A(t){const n=s(null);return null===n.current&&(n.current=t()),n.current}const M=!1;let R=1;const B=e({}),D=e({});class X extends n.Component{getSnapshotBeforeUpdate(){return this.updateProps(),null}componentDidUpdate(){}updateProps(){const{visualElement:t,props:n}=this.props;t&&t.setProps(n)}render(){return this.props.children}}function Y({preloadedFeatures:n,createVisualElement:e,projectionNodeConstructor:o,useRender:a,useVisualState:i,Component:s}){return n&&function(t){for(const n in t)null!==t[n]&&("projectionNodeConstructor"===n?m.projectionNodeConstructor=t[n]:m[n].Component=t[n])}(n),u((function(l,u){const f=function({layoutId:t}){var n;const e=null===(n=r(B))||void 0===n?void 0:n.id;return e&&void 0!==t?e+"-"+t:t}(l);l=Object.assign(Object.assign({},l),{layoutId:f});const p=r(v);let w=null;const j=L(l),S=p.isStatic?void 0:A(()=>{if(M)return R++}),x=i(l,p.isStatic);return!p.isStatic&&O&&(j.visualElement=P(s,x,Object.assign(Object.assign({},p),l),e),function(t,{layoutId:n,layout:e,drag:o,dragConstraints:a,layoutScroll:i},s,c){var l;const u=r(D);c&&s&&!(null==s?void 0:s.projection)&&(s.projection=new c(t,s.getLatestValues(),null===(l=s.parent)||void 0===l?void 0:l.projection),s.projection.setOptions({layoutId:n,layout:e,alwaysMeasureLayout:Boolean(o)||a&&C(a),visualElement:s,scheduleRender:()=>s.scheduleRender(),animationType:"string"==typeof e?e:"both",initialPromotionConfig:u,layoutScroll:i}))}(S,l,j.visualElement,o||m.projectionNodeConstructor),w=function(n,e,o){const a=[],i=r(g);if(!e)return null;"production"!==d&&o&&i.strict;for(let r=0;r<h;r++){const o=y[r],{isEnabled:i,Component:s}=m[o];i(n)&&s&&a.push(t.createElement(s,Object.assign({key:o},n,{visualElement:e})))}return a}(l,j.visualElement,n)),t.createElement(X,{visualElement:j.visualElement,props:Object.assign(Object.assign({},p),l)},w,t.createElement(b.Provider,{value:j},a(s,l,S,function(t,n,e){return c(r=>{var o;r&&(null===(o=t.mount)||void 0===o||o.call(t,r)),n&&(r?n.mount(r):n.unmount()),e&&("function"==typeof e?e(r):C(e)&&(e.current=r))},[n])}(x,j.visualElement,u),x,p.isStatic,j.visualElement)))}))}const H=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function I(t){return"string"==typeof t&&!t.includes("-")&&!!(H.indexOf(t)>-1||/[A-Z]/.test(t))}const W={},$=["","X","Y","Z"],F=["transformPerspective","x","y","z"];function Z(t,n){return F.indexOf(t)-F.indexOf(n)}["translate","scale","rotate","skew"].forEach(t=>$.forEach(n=>F.push(t+n)));const z=new Set(F);function U(t){return z.has(t)}const N=new Set(["originX","originY","originZ"]);function K(t){return N.has(t)}function q(t,{layout:n,layoutId:e}){return U(t)||K(t)||(n||void 0!==e)&&(!!W[t]||"opacity"===t)}const _=t=>Boolean(null!==t&&"object"==typeof t&&t.getVelocity),G={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function J(t){return t.startsWith("--")}const Q=(t,n)=>n&&"number"==typeof t?n.transform(t):t;const tt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},nt=Object.assign(Object.assign({},tt),{transform:(et=0,rt=1,t=>Math.max(Math.min(t,rt),et))});var et,rt;const ot=Object.assign(Object.assign({},tt),{default:1}),at=t=>({test:n=>function(t){return"string"==typeof t}(n)&&n.endsWith(t)&&1===n.split(" ").length,parse:parseFloat,transform:n=>`${n}${t}`}),it=at("deg"),st=at("%"),ct=at("px"),lt=Object.assign(Object.assign({},st),{parse:t=>st.parse(t)/100,transform:t=>st.transform(100*t)}),ut=Object.assign(Object.assign({},tt),{transform:Math.round}),ft={borderWidth:ct,borderTopWidth:ct,borderRightWidth:ct,borderBottomWidth:ct,borderLeftWidth:ct,borderRadius:ct,radius:ct,borderTopLeftRadius:ct,borderTopRightRadius:ct,borderBottomRightRadius:ct,borderBottomLeftRadius:ct,width:ct,maxWidth:ct,height:ct,maxHeight:ct,size:ct,top:ct,right:ct,bottom:ct,left:ct,padding:ct,paddingTop:ct,paddingRight:ct,paddingBottom:ct,paddingLeft:ct,margin:ct,marginTop:ct,marginRight:ct,marginBottom:ct,marginLeft:ct,rotate:it,rotateX:it,rotateY:it,rotateZ:it,scale:ot,scaleX:ot,scaleY:ot,scaleZ:ot,skew:it,skewX:it,skewY:it,distance:ct,translateX:ct,translateY:ct,translateZ:ct,x:ct,y:ct,z:ct,perspective:ct,transformPerspective:ct,opacity:nt,originX:lt,originY:lt,originZ:ct,zIndex:ut,fillOpacity:nt,strokeOpacity:nt,numOctaves:ut};function dt(t,n,e,r){var o;const{style:a,vars:i,transform:s,transformKeys:c,transformOrigin:l}=t;c.length=0;let u=!1,f=!1,d=!0;for(const t in n){const e=n[t];if(J(t)){i[t]=e;continue}const r=ft[t],p=Q(e,r);if(U(t)){if(u=!0,s[t]=p,c.push(t),!d)continue;e!==(null!==(o=r.default)&&void 0!==o?o:0)&&(d=!1)}else K(t)?(l[t]=p,f=!0):a[t]=p}u?a.transform=function({transform:t,transformKeys:n},{enableHardwareAcceleration:e=!0,allowTransformNone:r=!0},o,a){let i="";n.sort(Z);let s=!1;const c=n.length;for(let e=0;e<c;e++){const r=n[e];i+=`${G[r]||r}(${t[r]}) `,"z"===r&&(s=!0)}return!s&&e&&(i+="translateZ(0)"),i=i.trim(),a?i=a(t,o?"":i):r&&o&&(i="none"),i}(t,e,d,r):r?a.transform=r({},""):!n.transform&&a.transform&&(a.transform="none"),f&&(a.transformOrigin=function({originX:t="50%",originY:n="50%",originZ:e=0}){return`${t} ${n} ${e}`}(l))}const pt=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function mt(t,n,e){for(const r in n)_(n[r])||q(r,e)||(t[r]=n[r])}function gt(t,n,e){let r={};return mt(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n,e){return l(()=>{const r={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};dt(r,n,{enableHardwareAcceleration:!e},t);const{vars:o,style:a}=r;return Object.assign(Object.assign({},o),a)},[n])}(t,n,e)),t.transformValues&&(r=t.transformValues(r)),r}function yt(t,n,e){const r={},o=gt(t,n,e);return Boolean(t.drag)&&!1!==t.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),r.style=o,r}const ht=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function vt(t){return ht.has(t)}let bt=t=>!vt(t);try{(wt=require("@emotion/is-prop-valid").default)&&(bt=t=>t.startsWith("on")?!vt(t):wt(t))}catch(t){}var wt;function Ot(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(e[r[o]]=t[r[o]])}return e}function jt(t,n,e){return"string"==typeof t?t:ct.transform(n+e*t)}const St={offset:"stroke-dashoffset",array:"stroke-dasharray"},xt={offset:"strokeDashoffset",array:"strokeDasharray"};function Et(t,n,e,r){var{attrX:o,attrY:a,originX:i,originY:s,pathLength:c,pathSpacing:l=1,pathOffset:u=0}=n;dt(t,Ot(n,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),e,r),t.attrs=t.style,t.style={};const{attrs:f,style:d,dimensions:p}=t;f.transform&&(p&&(d.transform=f.transform),delete f.transform),p&&(void 0!==i||void 0!==s||d.transform)&&(d.transformOrigin=function(t,n,e){return`${jt(n,t.x,t.width)} ${jt(e,t.y,t.height)}`}(p,void 0!==i?i:.5,void 0!==s?s:.5)),void 0!==o&&(f.x=o),void 0!==a&&(f.y=a),void 0!==c&&function(t,n,e=1,r=0,o=!0){t.pathLength=1;const a=o?St:xt;t[a.offset]=ct.transform(-r);const i=ct.transform(n),s=ct.transform(e);t[a.array]=`${i} ${s}`}(f,c,l,u,!1)}const Pt=()=>Object.assign(Object.assign({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}});function Ct(t,n){const e=l(()=>{const e=Pt();return Et(e,n,{enableHardwareAcceleration:!1},t.transformTemplate),Object.assign(Object.assign({},e.attrs),{style:Object.assign({},e.style)})},[n]);if(t.style){const n={};mt(n,t.style,t),e.style=Object.assign(Object.assign({},n),e.style)}return e}function Tt(t=!1){return(n,e,r,o,{latestValues:a},i)=>{const s=(I(n)?Ct:yt)(e,a,i),c=function(t,n,e){const r={};for(const o in t)(bt(o)||!0===e&&vt(o)||!n&&!vt(o)||t.draggable&&o.startsWith("onDrag"))&&(r[o]=t[o]);return r}(e,"string"==typeof n,t),l=Object.assign(Object.assign(Object.assign({},c),s),{ref:o});return r&&(l["data-projection-id"]=r),f(n,l)}}const Vt=/([a-z])([A-Z])/g;const Lt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function kt(t,n,e,r){!function(t,{style:n,vars:e},r,o){Object.assign(t.style,n,o&&o.getProjectionStyles(r));for(const n in e)t.style.setProperty(n,e[n])}(t,n,void 0,r);for(const e in n.attrs)t.setAttribute(Lt.has(e)?e:e.replace(Vt,"$1-$2").toLowerCase(),n.attrs[e])}function At(t){const{style:n}=t,e={};for(const r in n)(_(n[r])||q(r,t))&&(e[r]=n[r]);return e}function Mt(t){const n=_(t)?t.get():t;return e=n,Boolean(e&&"object"==typeof e&&e.mix&&e.toValue)?n.toValue():n;var e}function Rt({scrapeMotionValuesFromProps:t,createRenderState:n,onMount:e},r,o,a){const i={latestValues:Dt(r,o,a,t),renderState:n()};return e&&(i.mount=t=>e(r,t,i)),i}const Bt=t=>(n,e)=>{const o=r(b),a=r(w);return e?Rt(t,n,o,a):A(()=>Rt(t,n,o,a))};function Dt(t,n,e,r){const o={},a=!1===(null==e?void 0:e.initial),i=r(t);for(const t in i)o[t]=Mt(i[t]);let{initial:s,animate:c}=t;const l=V(t),u=function(t){return Boolean(V(t)||t.variants)}(t);n&&u&&!l&&!1!==t.inherit&&(null!=s||(s=n.initial),null!=c||(c=n.animate));const f=a||!1===s,d=f?c:s;if(d&&"boolean"!=typeof d&&("object"!=typeof(p=d)||"function"!=typeof p.start)){(Array.isArray(d)?d:[d]).forEach(n=>{const e=function(t,n,e,r={},o={}){var a;return"function"==typeof n&&(n=n(null!=e?e:t.custom,r,o)),"string"==typeof n&&(n=null===(a=t.variants)||void 0===a?void 0:a[n]),"function"==typeof n&&(n=n(null!=e?e:t.custom,r,o)),n}(t,n);if(!e)return;const{transitionEnd:r,transition:a}=e,i=Ot(e,["transitionEnd","transition"]);for(const t in i){let n=i[t];if(Array.isArray(n)){n=n[f?n.length-1:0]}null!==n&&(o[t]=n)}for(const t in r)o[t]=r[t]})}var p;return o}const Xt={useVisualState:Bt({scrapeMotionValuesFromProps:function(t){const n=At(t);for(const e in t)if(_(t[e])){n["x"===e||"y"===e?"attr"+e.toUpperCase():e]=t[e]}return n},createRenderState:Pt,onMount:(t,n,{renderState:e,latestValues:r})=>{try{e.dimensions="function"==typeof n.getBBox?n.getBBox():n.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}Et(e,r,{enableHardwareAcceleration:!1},t.transformTemplate),kt(n,e)}})},Yt={useVisualState:Bt({scrapeMotionValuesFromProps:At,createRenderState:pt})};const Ht=function(t){function n(n,e={}){return Y(t(n,e))}if("undefined"==typeof Proxy)return n;const e=new Map;return new Proxy(n,{get:(t,r)=>(e.has(r)||e.set(r,n(r)),e.get(r))})}((function(t,{forwardMotionProps:n=!1},e,r,o){const a=I(t)?Xt:Yt;return Object.assign(Object.assign({},a),{preloadedFeatures:e,useRender:Tt(n),createVisualElement:r,projectionNodeConstructor:o,Component:t})}));export{Ht as m};