@nethesis/phone-island 0.7.78 → 0.7.80
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.
- package/dist/App.d.ts +1 -0
- package/dist/App.js +1 -1
- package/dist/App.js.map +1 -1
- package/dist/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/dist/_virtual/floating-ui.dom.esm.js +2 -0
- package/dist/_virtual/floating-ui.dom.esm.js.map +1 -0
- package/dist/_virtual/index.js +1 -1
- package/dist/_virtual/index3.js +1 -1
- package/dist/_virtual/index4.js +1 -1
- package/dist/_virtual/index5.js +1 -1
- package/dist/_virtual/index6.js +1 -1
- package/dist/_virtual/index8.js +1 -1
- package/dist/_virtual/index9.js +2 -0
- package/dist/_virtual/index9.js.map +1 -0
- package/dist/_virtual/react-tooltip.min.cjs.js +2 -0
- package/dist/_virtual/react-tooltip.min.cjs.js.map +1 -0
- package/dist/components/Button.js +1 -1
- package/dist/components/Button.js.map +1 -1
- package/dist/components/CallView/Actions.js +1 -1
- package/dist/components/CallView/Actions.js.map +1 -1
- package/dist/components/CallView/Avatar.js +1 -1
- package/dist/components/CallView/Avatar.js.map +1 -1
- package/dist/components/CallView/BackCall.js +1 -1
- package/dist/components/CallView/BackCall.js.map +1 -1
- package/dist/components/CallView/DisplayName.js +1 -1
- package/dist/components/CallView/DisplayName.js.map +1 -1
- package/dist/components/CallView/index.js +1 -1
- package/dist/components/CallView/index.js.map +1 -1
- package/dist/components/Events.d.ts +1 -0
- package/dist/components/Events.js +1 -1
- package/dist/components/Events.js.map +1 -1
- package/dist/components/Hangup.d.ts +1 -0
- package/dist/components/Hangup.js +1 -1
- package/dist/components/Hangup.js.map +1 -1
- package/dist/components/Island.js +1 -1
- package/dist/components/Island.js.map +1 -1
- package/dist/components/KeypadView/index.js +1 -1
- package/dist/components/KeypadView/index.js.map +1 -1
- package/dist/components/Socket.js +1 -1
- package/dist/components/Socket.js.map +1 -1
- package/dist/components/TransferView/ListAvatar.d.ts +2 -2
- package/dist/components/TransferView/ListAvatar.js +1 -1
- package/dist/components/TransferView/ListAvatar.js.map +1 -1
- package/dist/components/TransferView/TransferActions.js +1 -1
- package/dist/components/TransferView/TransferActions.js.map +1 -1
- package/dist/components/TransferView/TransferList.js +1 -1
- package/dist/components/TransferView/TransferList.js.map +1 -1
- package/dist/components/WebRTC.d.ts +2 -0
- package/dist/components/WebRTC.js +1 -1
- package/dist/components/WebRTC.js.map +1 -1
- package/dist/events/CallEvents.d.ts +3 -1
- package/dist/events/CallEvents.js +1 -1
- package/dist/events/CallEvents.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/lib/devices/devices.js +1 -1
- package/dist/lib/phone/call.d.ts +2 -2
- package/dist/lib/phone/call.js +1 -1
- package/dist/lib/phone/call.js.map +1 -1
- package/dist/lib/webrtc/messages.d.ts +6 -1
- package/dist/lib/webrtc/messages.js +1 -1
- package/dist/lib/webrtc/messages.js.map +1 -1
- package/dist/models/currentCall.d.ts +67 -0
- package/dist/models/currentCall.js +1 -1
- package/dist/models/currentCall.js.map +1 -1
- package/dist/models/motions.js +1 -1
- package/dist/models/motions.js.map +1 -1
- package/dist/node_modules/@emotion/stylis/dist/stylis.browser.esm.js +1 -1
- package/dist/node_modules/@emotion/stylis/dist/stylis.browser.esm.js.map +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs.js +2 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs.js.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js +2 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js.map +1 -0
- package/dist/node_modules/@fortawesome/react-fontawesome/index.es.js +1 -1
- package/dist/node_modules/@nethesis/nethesis-light-svg-icons/index.mjs.js +1 -1
- package/dist/node_modules/@nethesis/nethesis-light-svg-icons/index.mjs.js.map +1 -1
- package/dist/node_modules/@nethesis/nethesis-solid-svg-icons/index.mjs.js +1 -1
- package/dist/node_modules/@nethesis/nethesis-solid-svg-icons/index.mjs.js.map +1 -1
- package/dist/node_modules/@rematch/core/dist/core.esm.js +1 -1
- package/dist/node_modules/@rematch/core/dist/core.esm.js.map +1 -1
- package/dist/node_modules/bowser/es5.js +1 -1
- package/dist/node_modules/bowser/es5.js.map +1 -1
- package/dist/node_modules/classnames/index.js +7 -0
- package/dist/node_modules/classnames/index.js.map +1 -0
- package/dist/node_modules/engine.io-client/build/esm/contrib/has-cors.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/contrib/has-cors.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/contrib/parseqs.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/contrib/parseqs.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/contrib/parseuri.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/contrib/parseuri.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/contrib/yeast.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/contrib/yeast.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/globalThis.browser.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/globalThis.browser.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/socket.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/socket.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transport.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transport.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/index.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/index.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/polling.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/polling.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/websocket.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/websocket.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/util.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/util.js.map +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/commons.js +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/commons.js.map +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js.map +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/decodePacket.browser.js +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/decodePacket.browser.js.map +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js.map +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/index.js +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/index.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/framer-motion.js +1 -1
- package/dist/node_modules/framer-motion/dist/framer-motion.js.map +1 -1
- package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +1 -1
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +9 -1
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js.map +1 -1
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +9 -1
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/immer/dist/immer.esm.mjs.js +1 -1
- package/dist/node_modules/immer/dist/immer.esm.mjs.js.map +1 -1
- package/dist/node_modules/js-base64/base64.mjs.js +1 -1
- package/dist/node_modules/js-base64/base64.mjs.js.map +1 -1
- package/dist/node_modules/mic-check/lib/index.js +1 -1
- package/dist/node_modules/mic-check/lib/requestMediaPermissions.js +1 -1
- package/dist/node_modules/mic-check/lib/requestMediaPermissions.js.map +1 -1
- package/dist/node_modules/moment/moment.js +2 -2
- package/dist/node_modules/moment/moment.js.map +1 -1
- package/dist/node_modules/prop-types/checkPropTypes.js +1 -1
- package/dist/node_modules/prop-types/checkPropTypes.js.map +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -1
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +9 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +9 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-is/cjs/react-is.development.js +9 -1
- package/dist/node_modules/react-is/cjs/react-is.development.js.map +1 -1
- package/dist/node_modules/react-is/cjs/react-is.production.min.js +9 -1
- package/dist/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-is/index.js.map +1 -1
- package/dist/node_modules/react-moment/dist/index.js +2 -2
- package/dist/node_modules/react-moment/dist/index.js.map +1 -1
- package/dist/node_modules/react-redux/es/components/Context.js +1 -1
- package/dist/node_modules/react-redux/es/components/Context.js.map +1 -1
- package/dist/node_modules/react-redux/es/components/Provider.js +1 -1
- package/dist/node_modules/react-redux/es/components/Provider.js.map +1 -1
- package/dist/node_modules/react-redux/es/hooks/useDispatch.js +1 -1
- package/dist/node_modules/react-redux/es/hooks/useDispatch.js.map +1 -1
- package/dist/node_modules/react-redux/es/hooks/useReduxContext.js +1 -1
- package/dist/node_modules/react-redux/es/hooks/useReduxContext.js.map +1 -1
- package/dist/node_modules/react-redux/es/hooks/useSelector.js +1 -1
- package/dist/node_modules/react-redux/es/hooks/useSelector.js.map +1 -1
- package/dist/node_modules/react-redux/es/hooks/useStore.js +1 -1
- package/dist/node_modules/react-redux/es/hooks/useStore.js.map +1 -1
- package/dist/node_modules/react-redux/es/utils/Subscription.js +1 -1
- package/dist/node_modules/react-redux/es/utils/Subscription.js.map +1 -1
- package/dist/node_modules/react-redux/es/utils/batch.js +1 -1
- package/dist/node_modules/react-redux/es/utils/batch.js.map +1 -1
- package/dist/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js +1 -1
- package/dist/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/node_modules/react-redux/es/utils/useSyncExternalStore.js +1 -1
- package/dist/node_modules/react-redux/es/utils/useSyncExternalStore.js.map +1 -1
- package/dist/node_modules/react-redux/node_modules/react-is/cjs/react-is.development.js +10 -1
- package/dist/node_modules/react-redux/node_modules/react-is/cjs/react-is.development.js.map +1 -1
- package/dist/node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js +10 -1
- package/dist/node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
- package/dist/node_modules/react-redux/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-tooltip/dist/react-tooltip.min.cjs.js +2 -0
- package/dist/node_modules/react-tooltip/dist/react-tooltip.min.cjs.js.map +1 -0
- package/dist/node_modules/react-tooltip/dist/react-tooltip.min.css.js +2 -0
- package/dist/node_modules/react-tooltip/dist/react-tooltip.min.css.js.map +1 -0
- package/dist/node_modules/redux/es/redux.js +1 -1
- package/dist/node_modules/redux/es/redux.js.map +1 -1
- package/dist/node_modules/sdp/sdp.js +1 -1
- package/dist/node_modules/sdp/sdp.js.map +1 -1
- package/dist/node_modules/socket.io-client/build/esm/index.js +1 -1
- package/dist/node_modules/socket.io-client/build/esm/index.js.map +1 -1
- package/dist/node_modules/socket.io-client/build/esm/manager.js +1 -1
- package/dist/node_modules/socket.io-client/build/esm/manager.js.map +1 -1
- package/dist/node_modules/socket.io-client/build/esm/socket.js +1 -1
- package/dist/node_modules/socket.io-client/build/esm/socket.js.map +1 -1
- package/dist/node_modules/socket.io-client/build/esm/url.js +1 -1
- package/dist/node_modules/socket.io-client/build/esm/url.js.map +1 -1
- package/dist/node_modules/socket.io-parser/build/esm/binary.js +1 -1
- package/dist/node_modules/socket.io-parser/build/esm/binary.js.map +1 -1
- package/dist/node_modules/socket.io-parser/build/esm/index.js +1 -1
- package/dist/node_modules/socket.io-parser/build/esm/index.js.map +1 -1
- package/dist/node_modules/socket.io-parser/build/esm/is-binary.js +1 -1
- package/dist/node_modules/socket.io-parser/build/esm/is-binary.js.map +1 -1
- package/dist/node_modules/style-inject/dist/style-inject.es.js +2 -0
- package/dist/node_modules/style-inject/dist/style-inject.es.js.map +1 -0
- package/dist/node_modules/styled-components/dist/styled-components.browser.esm.js +1 -1
- package/dist/node_modules/styled-components/dist/styled-components.browser.esm.js.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +1 -1
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/adapter_core.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/adapter_core.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/adapter_factory.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/adapter_factory.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/chrome/getdisplaymedia.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/chrome/getdisplaymedia.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/common_shim.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/common_shim.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/firefox/getdisplaymedia.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/firefox/getdisplaymedia.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/firefox/getusermedia.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/firefox/getusermedia.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/utils.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/utils.js.map +1 -1
- package/dist/services/astproxy.js +1 -1
- package/dist/services/astproxy.js.map +1 -1
- package/dist/styles/Island.styles.js +1 -1
- package/dist/styles/Island.styles.js.map +1 -1
- package/package.json +3 -2
- package/dist/node_modules/engine.io-client/build/esm/index.js +0 -2
- package/dist/node_modules/engine.io-client/build/esm/index.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var t=require("../../../_virtual/_rollupPluginBabelHelpers.js"),e=require("../../../_virtual/_commonjsHelpers.js"),n=require("../../../_virtual/framer-motion.js"),r=require("react"),i=require("../../../_virtual/is-prop-valid.browser.esm.js");function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a,s=o(r),u=["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"],l=["transitionEnd","transition"],c=["root"],f=["from","to","restSpeed","restDelta"],d=["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate","type"],v=["ease","times","yoyo","flip","loop"],h=["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"],p=["transitionEnd","transition"],m=["transition","transitionEnd"],y=["transition","transitionEnd"],g=["willChange"],x=["transition","transitionEnd"],b=["children","as","axis","onReorder","values"],S=["children","style","value","as","onDrag","layout"],E=["container","target","layoutEffect"],k=["transition","transitionEnd"],w=["renderer"],C=["renderer"],P=["children","isValidProp"];n.framerMotion,a=n.framerMotion.exports,e.commonjsGlobal,function(e,n){function r(e){return e&&"object"==t.typeof(e)&&"default"in e?e:{default:e}}function o(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var a=r(n),s=o(n),A=n.createContext({transformPagePoint:function(t){return t},isStatic:!1,reducedMotion:"never"}),T=n.createContext({});function j(){return n.useContext(T).visualElement}var V=n.createContext(null),M="undefined"!=typeof document,R=M?n.useLayoutEffect:n.useEffect,L=n.createContext({strict:!1});function D(e){return"object"==t.typeof(e)&&Object.prototype.hasOwnProperty.call(e,"current")}function B(t){return"string"==typeof t||Array.isArray(t)}function O(e){return"object"==t.typeof(e)&&"function"==typeof e.start}var F=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function I(t){return O(t.animate)||F.some((function(e){return B(t[e])}))}function U(t){return Boolean(I(t)||t.variants)}function W(t){var e=function(t,e){if(I(t)){var n=t.initial,r=t.animate;return{initial:!1===n||B(n)?n:void 0,animate:B(r)?r:void 0}}return!1!==t.inherit?e:{}}(t,n.useContext(T)),r=e.initial,i=e.animate;return n.useMemo((function(){return{initial:r,animate:i}}),[N(r),N(i)])}function N(t){return Array.isArray(t)?t.join(" "):t}var z=function(t){return{isEnabled:function(e){return t.some((function(t){return!!e[t]}))}}},H={measureLayout:z(["layout","layoutId","drag"]),animation:z(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:z(["exit"]),drag:z(["drag","dragControls"]),focus:z(["whileFocus"]),hover:z(["whileHover","onHoverStart","onHoverEnd"]),tap:z(["whileTap","onTap","onTapStart","onTapCancel"]),pan:z(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:z(["whileInView","onViewportEnter","onViewportLeave"])};function Y(t){for(var e in t)"projectionNodeConstructor"===e?H.projectionNodeConstructor=t[e]:H[e].Component=t[e]}function X(t){var e=n.useRef(null);return null===e.current&&(e.current=t()),e.current}var G={hasAnimatedSinceResize:!0,hasEverUpdated:!1},q=1,Z=n.createContext({}),_=function(e){t.inherits(r,e);var n=t.createSuper(r);function r(){return t.classCallCheck(this,r),n.apply(this,arguments)}return t.createClass(r,[{key:"getSnapshotBeforeUpdate",value:function(){var t=this.props,e=t.visualElement,n=t.props;return e&&e.setProps(n),null}},{key:"componentDidUpdate",value:function(){}},{key:"render",value:function(){return this.props.children}}]),r}(a.default.Component),$=n.createContext({}),K=Symbol.for("motionComponentSymbol");function J(e){var r=e.preloadedFeatures,i=e.createVisualElement,o=e.projectionNodeConstructor,a=e.useRender,u=e.useVisualState,l=e.Component;r&&Y(r);var c=n.forwardRef((function(e,c){var f=t.objectSpread2(t.objectSpread2(t.objectSpread2({},n.useContext(A)),e),{},{layoutId:Q(e)}),d=f.isStatic,v=null,h=W(e),p=d?void 0:X((function(){if(G.hasEverUpdated)return q++})),m=u(e,d);if(!d&&M){h.visualElement=function(t,e,r,i){var o=j(),a=n.useContext(L),s=n.useContext(V),u=n.useContext(A).reducedMotion,l=n.useRef();i=i||a.renderer,!l.current&&i&&(l.current=i(t,{visualState:e,parent:o,props:r,presenceId:s?s.id:void 0,blockInitialAnimation:!!s&&!1===s.initial,reducedMotionConfig:u}));var c=l.current;return R((function(){c&&c.render()})),n.useEffect((function(){c&&c.animationState&&c.animationState.animateChanges()})),R((function(){return function(){return c&&c.notify("Unmount")}}),[]),c}(l,m,f,i);var y=n.useContext(L).strict,g=n.useContext($);h.visualElement&&(v=h.visualElement.loadFeatures(f,y,r,p,o||H.projectionNodeConstructor,g))}return s.createElement(_,{visualElement:h.visualElement,props:f},v,s.createElement(T.Provider,{value:h},a(l,e,p,function(t,e,r){return n.useCallback((function(n){n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&("function"==typeof r?r(n):D(r)&&(r.current=n))}),[e])}(m,h.visualElement,c),m,d,h.visualElement)))}));return c[K]=l,c}function Q(t){var e=t.layoutId,r=n.useContext(Z).id;return r&&void 0!==e?r+"-"+e:e}function tt(t){function e(e){return J(t(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}if("undefined"==typeof Proxy)return e;var n=new Map;return new Proxy(e,{get:function(t,r){return n.has(r)||n.set(r,e(r)),n.get(r)}})}var et=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function nt(t){return"string"==typeof t&&!t.includes("-")&&!!(et.indexOf(t)>-1||/[A-Z]/.test(t))}var rt={};function it(t){Object.assign(rt,t)}var ot=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],at=new Set(ot);function st(t,e){var n=e.layout,r=e.layoutId;return at.has(t)||t.startsWith("origin")||(n||void 0!==r)&&(!!rt[t]||"opacity"===t)}var ut=function(t){return!!(null==t?void 0:t.getVelocity)},lt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ct=function(t,e){return ot.indexOf(t)-ot.indexOf(e)};function ft(e,n,r,i){var o=e.transform,a=e.transformKeys,s=n.enableHardwareAcceleration,u=void 0===s||s,l=n.allowTransformNone,c=void 0===l||l,f="";a.sort(ct);var d,v=t.createForOfIteratorHelper(a);try{for(v.s();!(d=v.n()).done;){var h=d.value;f+="".concat(lt[h]||h,"(").concat(o[h],") ")}}catch(t){v.e(t)}finally{v.f()}return u&&!o.z&&(f+="translateZ(0)"),f=f.trim(),i?f=i(o,r?"":f):c&&r&&(f="none"),f}function dt(t){return t.startsWith("--")}var vt=function(t,e){return e&&"number"==typeof t?e.transform(t):t},ht=function(t,e){return function(n){return Math.max(Math.min(n,e),t)}},pt=function(t){return t%1?Number(t.toFixed(5)):t},mt=/(-)?([\d]*\.?[\d])+/g,yt=/(#[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,gt=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function xt(t){return"string"==typeof t}var bt={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},St=Object.assign(Object.assign({},bt),{transform:ht(0,1)}),Et=Object.assign(Object.assign({},bt),{default:1}),kt=function(t){return{test:function(e){return xt(e)&&e.endsWith(t)&&1===e.split(" ").length},parse:parseFloat,transform:function(e){return"".concat(e).concat(t)}}},wt=kt("deg"),Ct=kt("%"),Pt=kt("px"),At=kt("vh"),Tt=kt("vw"),jt=Object.assign(Object.assign({},Ct),{parse:function(t){return Ct.parse(t)/100},transform:function(t){return Ct.transform(100*t)}}),Vt=function(t,e){return function(n){return Boolean(xt(n)&>.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e))}},Mt=function(e,n,r){return function(i){var o;if(!xt(i))return i;var a=i.match(mt),s=t.slicedToArray(a,4),u=s[0],l=s[1],c=s[2],f=s[3];return o={},t.defineProperty(o,e,parseFloat(u)),t.defineProperty(o,n,parseFloat(l)),t.defineProperty(o,r,parseFloat(c)),t.defineProperty(o,"alpha",void 0!==f?parseFloat(f):1),o}},Rt={test:Vt("hsl","hue"),parse:Mt("hue","saturation","lightness"),transform:function(t){var e=t.hue,n=t.saturation,r=t.lightness,i=t.alpha,o=void 0===i?1:i;return"hsla("+Math.round(e)+", "+Ct.transform(pt(n))+", "+Ct.transform(pt(r))+", "+pt(St.transform(o))+")"}},Lt=ht(0,255),Dt=Object.assign(Object.assign({},bt),{transform:function(t){return Math.round(Lt(t))}}),Bt={test:Vt("rgb","red"),parse:Mt("red","green","blue"),transform:function(t){var e=t.red,n=t.green,r=t.blue,i=t.alpha,o=void 0===i?1:i;return"rgba("+Dt.transform(e)+", "+Dt.transform(n)+", "+Dt.transform(r)+", "+pt(St.transform(o))+")"}},Ot={test:Vt("#"),parse:function(t){var e="",n="",r="",i="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),i=t.substr(4,1),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:Bt.transform},Ft={test:function(t){return Bt.test(t)||Ot.test(t)||Rt.test(t)},parse:function(t){return Bt.test(t)?Bt.parse(t):Rt.test(t)?Rt.parse(t):Ot.parse(t)},transform:function(t){return xt(t)?t:t.hasOwnProperty("red")?Bt.transform(t):Rt.transform(t)}};function It(e){"number"==typeof e&&(e=""+e);var n=[],r=0,i=e.match(yt);i&&(r=i.length,e=e.replace(yt,"${c}"),n.push.apply(n,t.toConsumableArray(i.map(Ft.parse))));var o=e.match(mt);return o&&(e=e.replace(mt,"${n}"),n.push.apply(n,t.toConsumableArray(o.map(bt.parse)))),{values:n,numColors:r,tokenised:e}}function Ut(t){return It(t).values}function Wt(t){var e=It(t),n=e.values,r=e.numColors,i=e.tokenised,o=n.length;return function(t){for(var e=i,n=0;n<o;n++)e=e.replace(n<r?"${c}":"${n}",n<r?Ft.transform(t[n]):pt(t[n]));return e}}var Nt=function(t){return"number"==typeof t?0:t},zt={test:function(t){var e,n,r,i;return isNaN(t)&&xt(t)&&(null!==(n=null===(e=t.match(mt))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(i=null===(r=t.match(yt))||void 0===r?void 0:r.length)&&void 0!==i?i:0)>0},parse:Ut,createTransformer:Wt,getAnimatableNone:function(t){var e=Ut(t);return Wt(t)(e.map(Nt))}},Ht=new Set(["brightness","contrast","saturate","opacity"]);function Yt(e){var n=e.slice(0,-1).split("("),r=t.slicedToArray(n,2),i=r[0],o=r[1];if("drop-shadow"===i)return e;var a=o.match(mt)||[],s=t.slicedToArray(a,1)[0];if(!s)return e;var u=o.replace(s,""),l=Ht.has(i)?1:0;return s!==o&&(l*=100),i+"("+l+u+")"}var Xt=/([a-z-]*)\(.*?\)/g,Gt=Object.assign(Object.assign({},zt),{getAnimatableNone:function(t){var e=t.match(Xt);return e?e.map(Yt).join(" "):t}}),qt=t.objectSpread2(t.objectSpread2({},bt),{},{transform:Math.round}),Zt={borderWidth:Pt,borderTopWidth:Pt,borderRightWidth:Pt,borderBottomWidth:Pt,borderLeftWidth:Pt,borderRadius:Pt,radius:Pt,borderTopLeftRadius:Pt,borderTopRightRadius:Pt,borderBottomRightRadius:Pt,borderBottomLeftRadius:Pt,width:Pt,maxWidth:Pt,height:Pt,maxHeight:Pt,size:Pt,top:Pt,right:Pt,bottom:Pt,left:Pt,padding:Pt,paddingTop:Pt,paddingRight:Pt,paddingBottom:Pt,paddingLeft:Pt,margin:Pt,marginTop:Pt,marginRight:Pt,marginBottom:Pt,marginLeft:Pt,rotate:wt,rotateX:wt,rotateY:wt,rotateZ:wt,scale:Et,scaleX:Et,scaleY:Et,scaleZ:Et,skew:wt,skewX:wt,skewY:wt,distance:Pt,translateX:Pt,translateY:Pt,translateZ:Pt,x:Pt,y:Pt,z:Pt,perspective:Pt,transformPerspective:Pt,opacity:St,originX:jt,originY:jt,originZ:Pt,zIndex:qt,fillOpacity:St,strokeOpacity:St,numOctaves:qt};function _t(t,e,n,r){var i=t.style,o=t.vars,a=t.transform,s=t.transformKeys,u=t.transformOrigin;s.length=0;var l=!1,c=!1,f=!0;for(var d in e){var v=e[d];if(dt(d))o[d]=v;else{var h=Zt[d],p=vt(v,h);if(at.has(d)){if(l=!0,a[d]=p,s.push(d),!f)continue;v!==(h.default||0)&&(f=!1)}else d.startsWith("origin")?(c=!0,u[d]=p):i[d]=p}}if(e.transform||(l||r?i.transform=ft(t,n,f,r):i.transform&&(i.transform="none")),c){var m=u.originX,y=void 0===m?"50%":m,g=u.originY,x=void 0===g?"50%":g,b=u.originZ,S=void 0===b?0:b;i.transformOrigin="".concat(y," ").concat(x," ").concat(S)}}var $t=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function Kt(t,e,n){for(var r in e)ut(e[r])||st(r,n)||(t[r]=e[r])}function Jt(t,e,r){var i={};return Kt(i,t.style||{},t),Object.assign(i,function(t,e,r){var i=t.transformTemplate;return n.useMemo((function(){var t={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};return _t(t,e,{enableHardwareAcceleration:!r},i),Object.assign({},t.vars,t.style)}),[e])}(t,e,r)),t.transformValues?t.transformValues(i):i}function Qt(t,e,n){var r={},i=Jt(t,e,n);return t.drag&&!1!==t.dragListener&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),r.style=i,r}var te=new Set(["initial","style","values","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","onHoverStart","onHoverEnd","layoutScroll","whileInView","onViewportEnter","onViewportLeave","viewport","whileTap","onTap","onTapStart","onTapCancel","animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView","onPan","onPanStart","onPanSessionStart","onPanEnd"]);function ee(t){return te.has(t)}var ne=function(t){return!ee(t)};function re(t){t&&(ne=function(e){return e.startsWith("on")?!ee(e):t(e)})}try{re(i.default.default)}catch(e){}function ie(t,e,n){var r={};for(var i in t)(ne(i)||!0===n&&ee(i)||!e&&!ee(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}function oe(t,e,n){return"string"==typeof t?t:Pt.transform(e+n*t)}var ae={offset:"stroke-dashoffset",array:"stroke-dasharray"},se={offset:"strokeDashoffset",array:"strokeDasharray"};function ue(e,n,r,i,o){var a=n.attrX,s=n.attrY,l=n.originX,c=n.originY,f=n.pathLength,d=n.pathSpacing,v=void 0===d?1:d,h=n.pathOffset,p=void 0===h?0:h;if(_t(e,t.objectWithoutProperties(n,u),r,o),i)e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);else{e.attrs=e.style,e.style={};var m=e.attrs,y=e.style,g=e.dimensions;m.transform&&(g&&(y.transform=m.transform),delete m.transform),g&&(void 0!==l||void 0!==c||y.transform)&&(y.transformOrigin=function(t,e,n){return"".concat(oe(e,t.x,t.width)," ").concat(oe(n,t.y,t.height))}(g,void 0!==l?l:.5,void 0!==c?c:.5)),void 0!==a&&(m.x=a),void 0!==s&&(m.y=s),void 0!==f&&function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];t.pathLength=1;var o=i?ae:se;t[o.offset]=Pt.transform(-r);var a=Pt.transform(e),s=Pt.transform(n);t[o.array]="".concat(a," ").concat(s)}(m,f,v,p,!1)}}var le=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}}},ce=function(t){return"string"==typeof t&&"svg"===t.toLowerCase()};function fe(e,r,i,o){var a=n.useMemo((function(){var n={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}};return ue(n,r,{enableHardwareAcceleration:!1},ce(o),e.transformTemplate),t.objectSpread2(t.objectSpread2({},n.attrs),{},{style:t.objectSpread2({},n.style)})}),[r]);if(e.style){var s={};Kt(s,e.style,e),a.style=t.objectSpread2(t.objectSpread2({},s),a.style)}return a}function de(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(r,i,o,a,s,u){var l=s.latestValues,c=(nt(r)?fe:Qt)(i,l,u,r),f=t.objectSpread2(t.objectSpread2(t.objectSpread2({},ie(i,"string"==typeof r,e)),c),{},{ref:a});return o&&(f["data-projection-id"]=o),n.createElement(r,f)}}var ve=function(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()};function he(t,e,n,r){var i=e.style,o=e.vars;for(var a in Object.assign(t.style,i,r&&r.getProjectionStyles(n)),o)t.style.setProperty(a,o[a])}var pe=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function me(t,e,n,r){for(var i in he(t,e,void 0,r),e.attrs)t.setAttribute(pe.has(i)?i:ve(i),e.attrs[i])}function ye(t){var e=t.style,n={};for(var r in e)(ut(e[r])||st(r,t))&&(n[r]=e[r]);return n}function ge(t){var e=ye(t);for(var n in t)ut(t[n])&&(e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]);return e}function xe(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,r,i)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,r,i)),e}var be=function(t){return Array.isArray(t)},Se=function(t){return be(t)?t[t.length-1]||0:t};function Ee(e){var n,r=ut(e)?e.get():e;return n=r,Boolean(n&&"object"==t.typeof(n)&&n.mix&&n.toValue)?r.toValue():r}var ke=function(t){return function(e,r){var i=n.useContext(T),o=n.useContext(V),a=function(){return function(t,e,n,r){var i=t.scrapeMotionValuesFromProps,o=t.createRenderState,a=t.onMount,s={latestValues:we(e,n,r,i),renderState:o()};return a&&(s.mount=function(t){return a(e,t,s)}),s}(t,e,i,o)};return r?a():X(a)}};function we(e,n,r,i){var o={},a=i(e);for(var s in a)o[s]=Ee(a[s]);var u=e.initial,c=e.animate,f=I(e),d=U(e);n&&d&&!f&&!1!==e.inherit&&(void 0===u&&(u=n.initial),void 0===c&&(c=n.animate));var v=!!r&&!1===r.initial,h=(v=v||!1===u)?c:u;return h&&"boolean"!=typeof h&&!O(h)&&(Array.isArray(h)?h:[h]).forEach((function(n){var r=xe(e,n);if(r){var i=r.transitionEnd;r.transition;var a=t.objectWithoutProperties(r,l);for(var s in a){var u=a[s];Array.isArray(u)&&(u=u[v?u.length-1:0]),null!==u&&(o[s]=u)}for(var c in i)o[c]=i[c]}})),o}var Ce,Pe={useVisualState:ke({scrapeMotionValuesFromProps:ge,createRenderState:le,onMount:function(t,e,n){var r=n.renderState,i=n.latestValues;try{r.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){r.dimensions={x:0,y:0,width:0,height:0}}ue(r,i,{enableHardwareAcceleration:!1},ce(e.tagName),t.transformTemplate),me(e,r)}})},Ae={useVisualState:ke({scrapeMotionValuesFromProps:ye,createRenderState:$t})};function Te(e,n,r,i,o){var a=n.forwardMotionProps,s=void 0!==a&&a;return t.objectSpread2(t.objectSpread2({},nt(e)?Pe:Ae),{},{preloadedFeatures:r,useRender:de(s),createVisualElement:i,projectionNodeConstructor:o,Component:e})}function je(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!0};return t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n)}}function Ve(t,e,r,i){n.useEffect((function(){var n=t.current;if(r&&n)return je(n,e,r,i)}),[t,e,r,i])}function Me(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function Re(t){return!!t.touches}e.AnimationType=void 0,(Ce=e.AnimationType||(e.AnimationType={})).Animate="animate",Ce.Hover="whileHover",Ce.Tap="whileTap",Ce.Drag="whileDrag",Ce.Focus="whileFocus",Ce.InView="whileInView",Ce.Exit="exit";var Le={pageX:0,pageY:0};function De(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page",n=t.touches[0]||t.changedTouches[0]||Le;return{x:n[e+"X"],y:n[e+"Y"]}}function Be(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page";return{x:t[e+"X"],y:t[e+"Y"]}}function Oe(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page";return{point:Re(t)?De(t,e):Be(t,e)}}var Fe=function(t){var e,n=function(e){return t(e,Oe(e))};return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(e=n,function(t){var n=t instanceof MouseEvent;(!n||n&&0===t.button)&&e(t)}):n},Ie={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Ue={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function We(t){return M&&null===window.onpointerdown?t:M&&null===window.ontouchstart?Ue[t]:M&&null===window.onmousedown?Ie[t]:t}function Ne(t,e,n,r){return je(t,We(e),Fe(n,"pointerdown"===e),r)}function ze(t,e,n,r){return Ve(t,We(e),n&&Fe(n,"pointerdown"===e),r)}function He(t){var e=null;return function(){var n=function(){e=null};return null===e&&(e=t,n)}}var Ye=He("dragHorizontal"),Xe=He("dragVertical");function Ge(t){var e=!1;if("y"===t)e=Xe();else if("x"===t)e=Ye();else{var n=Ye(),r=Xe();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}function qe(){var t=Ge(!0);return!t||(t(),!1)}function Ze(t,n,r){return function(i,o){Me(i)&&!qe()&&(t.animationState&&t.animationState.setActive(e.AnimationType.Hover,n),r&&r(i,o))}}var _e=function t(e,n){return!!n&&(e===n||t(e,n.parentElement))};function $e(t){return n.useEffect((function(){return function(){return t()}}),[])}var Ke=function(t,e){return function(n){return e(t(n))}},Je=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce(Ke)};"undefined"==typeof process||process.env;var Qe=new Set;function tn(t,e,n){t||Qe.has(e)||(console.warn(e),n&&console.warn(n),Qe.add(e))}var en=new WeakMap,nn=new WeakMap,rn=function(t){var e=en.get(t.target);e&&e(t)},on=function(t){t.forEach(rn)};function an(e,n,r){var i=function(e){var n=e.root,r=t.objectWithoutProperties(e,c),i=n||document;nn.has(i)||nn.set(i,{});var o=nn.get(i),a=JSON.stringify(r);return o[a]||(o[a]=new IntersectionObserver(on,t.objectSpread2({root:n},r))),o[a]}(n);return en.set(e,r),i.observe(e),function(){en.delete(e),i.unobserve(e)}}var sn={some:0,all:1};function un(t,r,i,o){var a=o.root,s=o.margin,u=o.amount,l=void 0===u?"some":u,c=o.once;n.useEffect((function(){if(t&&i.current){var n={root:null==a?void 0:a.current,rootMargin:s,threshold:"number"==typeof l?l:sn[l]};return an(i.current,n,(function(t){var n=t.isIntersecting;if(r.isInView!==n&&(r.isInView=n,!c||n||!r.hasEnteredView)){n&&(r.hasEnteredView=!0),i.animationState&&i.animationState.setActive(e.AnimationType.InView,n);var o=i.getProps(),a=n?o.onViewportEnter:o.onViewportLeave;a&&a(t)}}))}}),[t,a,s,l])}function ln(t,r,i,o){var a=o.fallback,s=void 0===a||a;n.useEffect((function(){t&&s&&requestAnimationFrame((function(){r.hasEnteredView=!0;var t=i.getProps().onViewportEnter;t&&t(null),i.animationState&&i.animationState.setActive(e.AnimationType.InView,!0)}))}),[t])}var cn=function(t){return function(e){return t(e),null}},fn={inView:cn((function(t){var e=t.visualElement,r=t.whileInView,i=t.onViewportEnter,o=t.onViewportLeave,a=t.viewport,s=void 0===a?{}:a,u=n.useRef({hasEnteredView:!1,isInView:!1}),l=Boolean(r||i||o);s.once&&u.current.hasEnteredView&&(l=!1),("undefined"==typeof IntersectionObserver?ln:un)(l,u.current,e,s)})),tap:cn((function(t){var r=t.onTap,i=t.onTapStart,o=t.onTapCancel,a=t.whileTap,s=t.visualElement,u=r||i||o||a,l=n.useRef(!1),c=n.useRef(null),f={passive:!(i||r||o||m)};function d(){c.current&&c.current(),c.current=null}function v(){return d(),l.current=!1,s.animationState&&s.animationState.setActive(e.AnimationType.Tap,!1),!qe()}function h(t,e){v()&&(_e(s.current,t.target)?r&&r(t,e):o&&o(t,e))}function p(t,e){v()&&o&&o(t,e)}function m(t,n){d(),l.current||(l.current=!0,c.current=Je(Ne(window,"pointerup",h,f),Ne(window,"pointercancel",p,f)),s.animationState&&s.animationState.setActive(e.AnimationType.Tap,!0),i&&i(t,n))}ze(s,"pointerdown",u?m:void 0,f),$e(d)})),focus:cn((function(t){var n=t.whileFocus,r=t.visualElement,i=r.animationState;Ve(r,"focus",n?function(){i&&i.setActive(e.AnimationType.Focus,!0)}:void 0),Ve(r,"blur",n?function(){i&&i.setActive(e.AnimationType.Focus,!1)}:void 0)})),hover:cn((function(t){var e=t.onHoverStart,n=t.onHoverEnd,r=t.whileHover,i=t.visualElement;ze(i,"pointerenter",e||r?Ze(i,!0,e):void 0,{passive:!e}),ze(i,"pointerleave",n||r?Ze(i,!1,n):void 0,{passive:!n})}))};function dn(){var t=n.useContext(V);if(null===t)return[!0,null];var e=t.isPresent,r=t.onExitComplete,i=t.register,o=n.useId();return n.useEffect((function(){return i(o)}),[]),!e&&r?[!1,function(){return r&&r(o)}]:[!0]}function vn(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 hn=function(t){return 1e3*t},pn=function(t){return t},mn=function(t,e,n){return(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t};function yn(t,e,n,r){if(t===e&&n===r)return pn;var i=function(e){return function(t,e,n,r,i){var o,a,s=0;do{(o=mn(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a}while(Math.abs(o)>1e-7&&++s<12);return a}(e,0,1,t,n)};return function(t){return 0===t||1===t?t:mn(i(t),e,r)}}var gn=function(t){return function(e){return e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2}},xn=function(t){return function(e){return 1-t(1-e)}},bn=function(t){return t*t},Sn=xn(bn),En=gn(bn),kn=function(t){return 1-Math.sin(Math.acos(t))},wn=xn(kn),Cn=gn(wn),Pn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.525;return function(e){return e*e*((t+1)*e-t)}},An=Pn(),Tn=xn(An),jn=gn(An),Vn=function(t){var e=Pn(void 0);return function(t){return(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))}}(),Mn={linear:pn,easeIn:bn,easeInOut:En,easeOut:Sn,circIn:kn,circInOut:Cn,circOut:wn,backIn:An,backInOut:jn,backOut:Tn,anticipate:Vn},Rn=function(e){if(Array.isArray(e)){e.length;var n=t.slicedToArray(e,4);return yn(n[0],n[1],n[2],n[3])}return"string"==typeof e?Mn[e]:e},Ln=function(t,e){return!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!zt.test(e)||e.startsWith("url(")))},Dn=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},Bn=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}},On=function(){return{type:"keyframes",ease:"linear",duration:.3}},Fn=function(t){return{type:"keyframes",duration:.8,values:t}},In={x:Dn,y:Dn,z:Dn,rotate:Dn,rotateX:Dn,rotateY:Dn,rotateZ:Dn,scaleX:Bn,scaleY:Bn,scale:Bn,opacity:On,backgroundColor:On,color:On,default:Bn},Un=function(e,n){var r;return r=be(n)?Fn:In[e]||In.default,t.objectSpread2({to:n},r(n))},Wn=t.objectSpread2(t.objectSpread2({},Zt),{},{color:Ft,backgroundColor:Ft,outlineColor:Ft,fill:Ft,stroke:Ft,borderColor:Ft,borderTopColor:Ft,borderRightColor:Ft,borderBottomColor:Ft,borderLeftColor:Ft,filter:Gt,WebkitFilter:Gt}),Nn=function(t){return Wn[t]};function zn(t,e){var n,r=Nn(t);return r!==Gt&&(r=zt),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}var Hn={current:!1},Yn="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},Xn="undefined"!=typeof window?function(t){return window.requestAnimationFrame(t)}:function(t){return setTimeout((function(){return t(Yn())}),1/60*1e3)},Gn=!0,qn=!1,Zn=!1,_n={delta:0,timestamp:0},$n=["read","update","preRender","render","postRender"],Kn=$n.reduce((function(t,e){return t[e]=function(t){var e=[],n=[],r=0,i=!1,o=!1,a=new WeakSet,s={schedule:function(t){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&i,s=o?e:n;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&a.add(t),-1===s.indexOf(t)&&(s.push(t),o&&i&&(r=e.length)),t},cancel:function(t){var e=n.indexOf(t);-1!==e&&n.splice(e,1),a.delete(t)},process:function(u){if(i)o=!0;else{var l;if(i=!0,e=(l=[n,e])[0],(n=l[1]).length=0,r=e.length)for(var c=0;c<r;c++){var f=e[c];f(u),a.has(f)&&(s.schedule(f),t())}i=!1,o&&(o=!1,s.process(u))}}};return s}((function(){return qn=!0})),t}),{}),Jn=$n.reduce((function(t,e){var n=Kn[e];return t[e]=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return qn||rr(),n.schedule(t,e,r)},t}),{}),Qn=$n.reduce((function(t,e){return t[e]=Kn[e].cancel,t}),{}),tr=$n.reduce((function(t,e){return t[e]=function(){return Kn[e].process(_n)},t}),{}),er=function(t){return Kn[t].process(_n)},nr=function t(e){qn=!1,_n.delta=Gn?1/60*1e3:Math.max(Math.min(e-_n.timestamp,40),1),_n.timestamp=e,Zn=!0,$n.forEach(er),Zn=!1,qn&&(Gn=!1,Xn(t))},rr=function(){qn=!0,Gn=!0,Zn||Xn(nr)},ir=function(){return _n};function or(t,e){var n=performance.now(),r=function r(i){var o=i.timestamp-n;o>=e&&(Qn.read(r),t(o-e))};return Jn.read(r,!0),function(){return Qn.read(r)}}var ar=function(t,e,n){return Math.min(Math.max(n,t),e)},sr=function(t,e,n){return-n*t+n*e+t};function ur(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}var lr=function(t,e,n){var r=t*t;return Math.sqrt(Math.max(0,n*(e*e-r)+r))},cr=[Ot,Bt,Rt];function fr(t){var e,n=(e=t,cr.find((function(t){return t.test(e)}))),r=n.parse(t);return n===Rt&&(r=function(t){var e=t.hue,n=t.saturation,r=t.lightness,i=t.alpha;e/=360,r/=100;var o=0,a=0,s=0;if(n/=100){var u=r<.5?r*(1+n):r+n-r*n,l=2*r-u;o=ur(l,u,e+1/3),a=ur(l,u,e),s=ur(l,u,e-1/3)}else o=a=s=r;return{red:Math.round(255*o),green:Math.round(255*a),blue:Math.round(255*s),alpha:i}}(r)),r}var dr=function(e,n){var r=fr(e),i=fr(n),o=t.objectSpread2({},r);return function(t){return o.red=lr(r.red,i.red,t),o.green=lr(r.green,i.green,t),o.blue=lr(r.blue,i.blue,t),o.alpha=sr(r.alpha,i.alpha,t),Bt.transform(o)}};function vr(t,e){return"number"==typeof t?function(n){return sr(t,e,n)}:Ft.test(t)?dr(t,e):yr(t,e)}var hr=function(e,n){var r=t.toConsumableArray(e),i=r.length,o=e.map((function(t,e){return vr(t,n[e])}));return function(t){for(var e=0;e<i;e++)r[e]=o[e](t);return r}},pr=function(e,n){var r=t.objectSpread2(t.objectSpread2({},e),n),i={};for(var o in r)void 0!==e[o]&&void 0!==n[o]&&(i[o]=vr(e[o],n[o]));return function(t){for(var e in i)r[e]=i[e](t);return r}};function mr(t){for(var e=zt.parse(t),n=e.length,r=0,i=0,o=0;o<n;o++)r||"number"==typeof e[o]?r++:i++;return{parsed:e,numNumbers:r,numColors:i}}var yr=function(t,e){var n=zt.createTransformer(e),r=mr(t),i=mr(e);return r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Je(hr(r.parsed,i.parsed),n):function(n){return""+(n>0?e:t)}},gr=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},xr=function(t,e){return function(n){return sr(t,e,n)}};function br(e,n,r){for(var i,o=[],a=r||("number"==typeof(i=e[0])?xr:"string"==typeof i?Ft.test(i)?dr:yr:Array.isArray(i)?hr:"object"==t.typeof(i)?pr:xr),s=e.length-1,u=0;u<s;u++){var l=a(e[u],e[u+1]);if(n){var c=Array.isArray(n)?n[u]:n;l=Je(c,l)}o.push(l)}return o}function Sr(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.clamp,o=void 0===i||i,a=r.ease,s=r.mixer,u=e.length;n.length,!a||!Array.isArray(a)||a.length,e[0]>e[u-1]&&(e=t.toConsumableArray(e).reverse(),n=t.toConsumableArray(n).reverse());var l=br(n,a,s),c=l.length,f=function(t){var n=0;if(c>1)for(;n<e.length-2&&!(t<e[n+1]);n++);var r=gr(e[n],e[n+1],t);return l[n](r)};return o?function(t){return f(ar(e[0],e[u-1],t))}:f}function Er(t,e){return t.map((function(){return e||En})).splice(0,t.length-1)}function kr(t){var e,n,r=t.duration,i=void 0===r?800:r,o=t.bounce,a=void 0===o?.25:o,s=t.velocity,u=void 0===s?0:s,l=t.mass,c=void 0===l?1:l,f=1-a;f=ar(.05,1,f),i=ar(.01,10,i/1e3),f<1?(e=function(t){var e=t*f,n=e*i;return.001-(e-u)/wr(t,f)*Math.exp(-n)},n=function(t){var n=t*f*i,r=n*u+u,o=Math.pow(f,2)*Math.pow(t,2)*i,a=Math.exp(-n),s=wr(Math.pow(t,2),f);return(.001-e(t)>0?-1:1)*((r-o)*a)/s}):(e=function(t){return Math.exp(-t*i)*((t-u)*i+1)-.001},n=function(t){return Math.exp(-t*i)*(i*i*(u-t))});var d=function(t,e,n){for(var r=n,i=1;i<12;i++)r-=t(r)/e(r);return r}(e,n,5/i);if(i*=1e3,isNaN(d))return{stiffness:100,damping:10,duration:i};var v=Math.pow(d,2)*c;return{stiffness:v,damping:2*f*Math.sqrt(c*v),duration:i}}function wr(t,e){return t*Math.sqrt(1-e*e)}var Cr=["duration","bounce"],Pr=["stiffness","damping","mass"];function Ar(t,e){return e.some((function(e){return void 0!==t[e]}))}function Tr(e){var n=e.from,r=void 0===n?0:n,i=e.to,o=void 0===i?1:i,a=e.restSpeed,s=void 0===a?2:a,u=e.restDelta,l=void 0===u?.01:u,c=t.objectWithoutProperties(e,f),d={done:!1,value:r},v=function(e){var n=t.objectSpread2({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!Ar(e,Pr)&&Ar(e,Cr)){var r=kr(e);(n=t.objectSpread2(t.objectSpread2(t.objectSpread2({},n),r),{},{velocity:0,mass:1})).isResolvedFromDuration=!0}return n}(c),h=v.stiffness,p=v.damping,m=v.mass,y=v.velocity,g=v.duration,x=v.isResolvedFromDuration,b=jr,S=jr;function E(){var t=y?-y/1e3:0,e=o-r,n=p/(2*Math.sqrt(h*m)),i=Math.sqrt(h/m)/1e3;if(void 0===l&&(l=Math.min(Math.abs(o-r)/100,.4)),n<1){var a=wr(i,n);b=function(r){var s=Math.exp(-n*i*r);return o-s*((t+n*i*e)/a*Math.sin(a*r)+e*Math.cos(a*r))},S=function(r){var o=Math.exp(-n*i*r);return n*i*o*(Math.sin(a*r)*(t+n*i*e)/a+e*Math.cos(a*r))-o*(Math.cos(a*r)*(t+n*i*e)-a*e*Math.sin(a*r))}}else if(1===n)b=function(n){return o-Math.exp(-i*n)*(e+(t+i*e)*n)};else{var s=i*Math.sqrt(n*n-1);b=function(r){var a=Math.exp(-n*i*r),u=Math.min(s*r,300);return o-a*((t+n*i*e)*Math.sinh(u)+s*e*Math.cosh(u))/s}}}return E(),{next:function(t){var e=b(t);if(x)d.done=t>=g;else{var n=1e3*S(t),r=Math.abs(n)<=s,i=Math.abs(o-e)<=l;d.done=r&&i}return d.value=d.done?o:e,d},flipTarget:function(){var t;y=-y,r=(t=[o,r])[0],o=t[1],E()}}}Tr.needsInterpolation=function(t,e){return"string"==typeof t||"string"==typeof e};var jr=function(t){return 0},Vr={decay:function(t){var e=t.velocity,n=void 0===e?0:e,r=t.from,i=void 0===r?0:r,o=t.power,a=void 0===o?.8:o,s=t.timeConstant,u=void 0===s?350:s,l=t.restDelta,c=void 0===l?.5:l,f=t.modifyTarget,d={done:!1,value:i},v=a*n,h=i+v,p=void 0===f?h:f(h);return p!==h&&(v=p-i),{next:function(t){var e=-v*Math.exp(-t/u);return d.done=!(e>c||e<-c),d.value=d.done?p:p+e,d},flipTarget:function(){}}},keyframes:function(t){var e=t.from,n=void 0===e?0:e,r=t.to,i=void 0===r?1:r,o=t.ease,a=t.offset,s=t.duration,u=void 0===s?300:s,l={done:!1,value:n},c=Array.isArray(i)?i:[n,i],f=function(t,e){return t.map((function(t){return t*e}))}(a&&a.length===c.length?a:function(t){var e=t.length;return t.map((function(t,n){return 0!==n?n/(e-1):0}))}(c),u);function d(){return Sr(f,c,{ease:Array.isArray(o)?o:Er(c,o)})}var v=d();return{next:function(t){return l.value=v(t),l.done=t>=u,l},flipTarget:function(){c.reverse(),v=d()}}},spring:Tr};function Mr(t,e){return t-e-(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)}var Rr=function(t){var e=function(e){var n=e.delta;return t(n)};return{start:function(){return Jn.update(e,!0)},stop:function(){return Qn.update(e)}}};function Lr(e){var n,r,i,o,a,s=e.from,u=e.autoplay,l=void 0===u||u,c=e.driver,f=void 0===c?Rr:c,v=e.elapsed,h=void 0===v?0:v,p=e.repeat,m=void 0===p?0:p,y=e.repeatType,g=void 0===y?"loop":y,x=e.repeatDelay,b=void 0===x?0:x,S=e.onPlay,E=e.onStop,k=e.onComplete,w=e.onRepeat,C=e.onUpdate,P=e.type,A=void 0===P?"keyframes":P,T=t.objectWithoutProperties(e,d),j=T.to,V=0,M=T.duration,R=!1,L=!0,D=Vr[Array.isArray(j)?"keyframes":A];(null===(r=(n=D).needsInterpolation)||void 0===r?void 0:r.call(n,s,j))&&(a=Sr([0,100],[s,j],{clamp:!1}),s=0,j=100);var B=D(t.objectSpread2(t.objectSpread2({},T),{},{from:s,to:j}));function O(){V++,"reverse"===g?h=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?e-(t-e)+n:Mr(e+-t,e,n)}(h,M,b,L=V%2==0):(h=Mr(h,M,b),"mirror"===g&&B.flipTarget()),R=!1,w&&w()}function F(t){if(L||(t=-t),h+=t,!R){var e=B.next(Math.max(0,h));o=e.value,a&&(o=a(o)),R=L?e.done:h<=0}null==C||C(o),R&&(0===V&&(null!=M||(M=h)),V<m?function(t,e,n,r){return r?t>=e+n:t<=-n}(h,M,b,L)&&O():(i.stop(),k&&k()))}return l&&(null==S||S(),(i=f(F)).start()),{stop:function(){null==E||E(),i.stop()}}}function Dr(t,e){return e?t*(1e3/e):0}function Br(e){var n=e.ease,r=e.times,i=e.yoyo,o=e.flip,a=e.loop,s=t.objectWithoutProperties(e,v),u=t.objectSpread2({},s);return r&&(u.offset=r),s.duration&&(u.duration=hn(s.duration)),s.repeatDelay&&(u.repeatDelay=hn(s.repeatDelay)),n&&(u.ease=function(t){return Array.isArray(t)&&"number"!=typeof t[0]}(n)?n.map(Rn):Rn(n)),"tween"===s.type&&(u.type="keyframes"),(i||a||o)&&(i?u.repeatType="reverse":a?u.repeatType="loop":o&&(u.repeatType="mirror"),u.repeat=a||i||o||s.repeat),"spring"!==s.type&&(u.type="keyframes"),u}function Or(e,n,r){return Array.isArray(n.to)&&void 0===e.duration&&(e.duration=.8),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=t.toConsumableArray(e.to),e.to[0]=e.from)}(n),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var n=t.objectWithoutProperties(e,h);return!!Object.keys(n).length}(e)||(e=t.objectSpread2(t.objectSpread2({},e),Un(r,n.to))),t.objectSpread2(t.objectSpread2({},n),Br(e))}function Fr(e,n,r,i,o){var a=Wr(i,e)||{},s=void 0!==a.from?a.from:n.get(),u=Ln(e,r);return"none"===s&&u&&"string"==typeof r?s=zn(e,r):Ir(s)&&"string"==typeof r?s=Ur(r):!Array.isArray(r)&&Ir(r)&&"string"==typeof s&&(r=Ur(s)),Ln(e,s)&&u&&!1!==a.type?function(){var i={from:s,to:r,velocity:n.getVelocity(),onComplete:o,onUpdate:function(t){return n.set(t)}};return"inertia"===a.type||"decay"===a.type?function(e){var n,r=e.from,i=void 0===r?0:r,o=e.velocity,a=void 0===o?0:o,s=e.min,u=e.max,l=e.power,c=void 0===l?.8:l,f=e.timeConstant,d=void 0===f?750:f,v=e.bounceStiffness,h=void 0===v?500:v,p=e.bounceDamping,m=void 0===p?10:p,y=e.restDelta,g=void 0===y?1:y,x=e.modifyTarget,b=e.driver,S=e.onUpdate,E=e.onComplete,k=e.onStop;function w(t){return void 0!==s&&t<s||void 0!==u&&t>u}function C(t){return void 0===s?u:void 0===u||Math.abs(s-t)<Math.abs(u-t)?s:u}function P(e){null==n||n.stop(),n=Lr(t.objectSpread2(t.objectSpread2({},e),{},{driver:b,onUpdate:function(t){var n;null==S||S(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:E,onStop:k}))}function A(e){P(t.objectSpread2({type:"spring",stiffness:h,damping:m,restDelta:g},e))}if(w(i))A({from:i,velocity:a,to:C(i)});else{var T=c*a+i;void 0!==x&&(T=x(T));var j,V,M=C(T),R=M===s?-1:1,L=function(t){j=V,V=t,a=Dr(t-j,ir().delta),(1===R&&t>M||-1===R&&t<M)&&A({from:t,to:M,velocity:a})};P({type:"decay",from:i,velocity:a,timeConstant:d,power:c,restDelta:g,modifyTarget:x,onUpdate:w(T)?L:void 0})}return{stop:function(){return null==n?void 0:n.stop()}}}(t.objectSpread2(t.objectSpread2({},i),a)):Lr(t.objectSpread2(t.objectSpread2({},Or(a,i,e)),{},{onUpdate:function(t){i.onUpdate(t),a.onUpdate&&a.onUpdate(t)},onComplete:function(){i.onComplete(),a.onComplete&&a.onComplete()}}))}:function(){var t=Se(r);return n.set(t),o(),a.onUpdate&&a.onUpdate(t),a.onComplete&&a.onComplete(),{stop:function(){}}}}function Ir(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Ur(t){return"number"==typeof t?0:zn("",t)}function Wr(t,e){return t[e]||t.default||t}function Nr(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Hn.current&&(r={type:!1}),e.start((function(i){var o,a,s=Fr(t,e,n,r,i),u=function(t,e){var n,r;return null!==(r=null!==(n=(Wr(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==r?r:0}(r,t),l=function(){return o=s()};return u?a=or(l,hn(u)):l(),function(){a&&a(),o&&o.stop()}}))}var zr=function(t){return/^0[^.\s]+$/.test(t)};function Hr(t,e){-1===t.indexOf(e)&&t.push(e)}function Yr(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var Xr=function(){function e(){t.classCallCheck(this,e),this.subscriptions=[]}return t.createClass(e,[{key:"add",value:function(t){var e=this;return Hr(this.subscriptions,t),function(){return Yr(e.subscriptions,t)}}},{key:"notify",value:function(t,e,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(var i=0;i<r;i++){var o=this.subscriptions[i];o&&o(t,e,n)}}},{key:"getSize",value:function(){return this.subscriptions.length}},{key:"clear",value:function(){this.subscriptions.length=0}}]),e}(),Gr=function(){function e(n){var r,i=this;t.classCallCheck(this,e),this.version="7.6.19",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Xr,this.velocityUpdateSubscribers=new Xr,this.renderSubscribers=new Xr,this.canTrackVelocity=!1,this.updateAndNotify=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];i.prev=i.current,i.current=t;var n=ir(),r=n.delta,o=n.timestamp;i.lastUpdated!==o&&(i.timeDelta=r,i.lastUpdated=o,Jn.postRender(i.scheduleVelocityCheck)),i.prev!==i.current&&i.updateSubscribers.notify(i.current),i.velocityUpdateSubscribers.getSize()&&i.velocityUpdateSubscribers.notify(i.getVelocity()),e&&i.renderSubscribers.notify(i.current)},this.scheduleVelocityCheck=function(){return Jn.postRender(i.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==i.lastUpdated&&(i.prev=i.current,i.velocityUpdateSubscribers.notify(i.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=n,this.canTrackVelocity=(r=this.current,!isNaN(parseFloat(r)))}return t.createClass(e,[{key:"onChange",value:function(t){return this.updateSubscribers.add(t)}},{key:"clearListeners",value:function(){this.updateSubscribers.clear()}},{key:"onRenderRequest",value:function(t){return t(this.get()),this.renderSubscribers.add(t)}},{key:"attach",value:function(t){this.passiveEffect=t}},{key:"set",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}},{key:"get",value:function(){return this.current}},{key:"getPrevious",value:function(){return this.prev}},{key:"getVelocity",value:function(){return this.canTrackVelocity?Dr(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}},{key:"start",value:function(t){var e=this;return this.stop(),new Promise((function(n){e.hasAnimated=!0,e.stopAnimation=t(n)})).then((function(){return e.clearAnimation()}))}},{key:"stop",value:function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}},{key:"isAnimating",value:function(){return!!this.stopAnimation}},{key:"clearAnimation",value:function(){this.stopAnimation=null}},{key:"destroy",value:function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}]),e}();function qr(t){return new Gr(t)}var Zr=function(t){return function(e){return e.test(t)}},_r=[bt,Pt,Ct,wt,Tt,At,{test:function(t){return"auto"===t},parse:function(t){return t}}],$r=function(t){return _r.find(Zr(t))},Kr=[].concat(_r,[Ft,zt]),Jr=function(t){return Kr.find(Zr(t))};function Qr(t,e,n){var r=t.getProps();return xe(r,e,void 0!==n?n:r.custom,function(t){var e={};return t.values.forEach((function(t,n){return e[n]=t.get()})),e}(t),function(t){var e={};return t.values.forEach((function(t,n){return e[n]=t.getVelocity()})),e}(t))}function ti(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,qr(n))}function ei(e,n){var r=Qr(e,n),i=r?e.makeTargetAnimatable(r,!1):{},o=i.transitionEnd,a=void 0===o?{}:o;i.transition;var s=t.objectWithoutProperties(i,p);for(var u in s=t.objectSpread2(t.objectSpread2({},s),a))ti(e,u,Se(s[u]))}function ni(e,n){t.toConsumableArray(n).reverse().forEach((function(t){var r,i=e.getVariant(t);i&&ei(e,i),null===(r=e.variantChildren)||void 0===r||r.forEach((function(t){ni(t,n)}))}))}function ri(t,e,n){var r,i,o=Object.keys(e).filter((function(e){return!t.hasValue(e)})),a=o.length;if(a)for(var s=0;s<a;s++){var u=o[s],l=e[u],c=null;Array.isArray(l)&&(c=l[0]),null===c&&(c=null!==(i=null!==(r=n[u])&&void 0!==r?r:t.readValue(u))&&void 0!==i?i:e[u]),null!=c&&("string"==typeof c&&(/^\-?\d*\.?\d+$/.test(c)||zr(c))?c=parseFloat(c):!Jr(c)&&zt.test(l)&&(c=zn(u,l)),t.addValue(u,qr(c)),void 0===n[u]&&(n[u]=c),null!==c&&t.setBaseTarget(u,c))}}function ii(t,e){if(e)return(e[t]||e.default||e).from}function oi(t,e,n){var r,i={};for(var o in t){var a=ii(o,e);i[o]=void 0!==a?a:null===(r=n.getValue(o))||void 0===r?void 0:r.get()}return i}function ai(t){return Boolean(ut(t)&&t.add)}function si(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t.notify("AnimationStart",e),Array.isArray(e)){var i=e.map((function(e){return ui(t,e,r)}));n=Promise.all(i)}else if("string"==typeof e)n=ui(t,e,r);else{var o="function"==typeof e?Qr(t,e,r.custom):e;n=li(t,o,r)}return n.then((function(){return t.notify("AnimationComplete",e)}))}function ui(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=Qr(e,n,i.custom),a=(o||{}).transition,s=void 0===a?e.getDefaultTransition()||{}:a;i.transitionOverride&&(s=i.transitionOverride);var u=o?function(){return li(e,o,i)}:function(){return Promise.resolve()},l=(null===(r=e.variantChildren)||void 0===r?void 0:r.size)?function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=s,a=o.delayChildren,u=void 0===a?0:a,l=o.staggerChildren,c=o.staggerDirection;return function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=arguments.length>5?arguments[5]:void 0,s=[],u=(e.variantChildren.size-1)*i,l=1===o?function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)*i}:function(){return u-(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)*i};return Array.from(e.variantChildren).sort(ci).forEach((function(e,i){s.push(ui(e,n,t.objectSpread2(t.objectSpread2({},a),{},{delay:r+l(i)})).then((function(){return e.notify("AnimationComplete",n)})))})),Promise.all(s)}(e,n,u+r,l,c,i)}:function(){return Promise.resolve()},c=s.when;if(c){var f="beforeChildren"===c?[u,l]:[l,u],d=t.slicedToArray(f,2),v=d[0],h=d[1];return v().then(h)}return Promise.all([u(),l(i.delay)])}function li(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.delay,a=void 0===o?0:o,s=i.transitionOverride,u=i.type,l=e.makeTargetAnimatable(n),c=l.transition,f=void 0===c?e.getDefaultTransition():c,d=l.transitionEnd,v=t.objectWithoutProperties(l,m),h=e.getValue("willChange");s&&(f=s);var p=[],y=u&&(null===(r=e.animationState)||void 0===r?void 0:r.getState()[u]),g=function(n){var r=e.getValue(n),i=v[n];if(!r||void 0===i||y&&fi(y,n))return"continue";var o=t.objectSpread2({delay:a},f);e.shouldReduceMotion&&at.has(n)&&(o=t.objectSpread2(t.objectSpread2({},o),{},{type:!1,delay:0}));var s=Nr(n,r,i,o);ai(h)&&(h.add(n),s=s.then((function(){return h.remove(n)}))),p.push(s)};for(var x in v)g(x);return Promise.all(p).then((function(){d&&ei(e,d)}))}function ci(t,e){return t.sortNodePosition(e)}function fi(t,e){var n=t.protectedKeys,r=t.needsAnimating,i=n.hasOwnProperty(e)&&!0!==r[e];return r[e]=!1,i}var di=[e.AnimationType.Animate,e.AnimationType.InView,e.AnimationType.Focus,e.AnimationType.Hover,e.AnimationType.Tap,e.AnimationType.Drag,e.AnimationType.Exit],vi=[].concat(di).reverse(),hi=di.length;function pi(n){var r,i=function(t){return function(e){return Promise.all(e.map((function(e){var n=e.animation,r=e.options;return si(t,n,r)})))}}(n),o=(r={},t.defineProperty(r,e.AnimationType.Animate,yi(!0)),t.defineProperty(r,e.AnimationType.InView,yi()),t.defineProperty(r,e.AnimationType.Hover,yi()),t.defineProperty(r,e.AnimationType.Tap,yi()),t.defineProperty(r,e.AnimationType.Drag,yi()),t.defineProperty(r,e.AnimationType.Focus,yi()),t.defineProperty(r,e.AnimationType.Exit,yi()),r),a=!0,s=function(e,r){var i=Qr(n,r);if(i){i.transition;var o=i.transitionEnd,a=t.objectWithoutProperties(i,y);e=t.objectSpread2(t.objectSpread2(t.objectSpread2({},e),a),o)}return e};function u(e,r){for(var u,l=n.getProps(),c=n.getVariantContext(!0)||{},f=[],d=new Set,v={},h=1/0,p=function(i){var p=vi[i],m=o[p],y=null!==(u=l[p])&&void 0!==u?u:c[p],g=B(y),x=p===r?m.isActive:null;!1===x&&(h=i);var b=y===c[p]&&y!==l[p]&&g;if(b&&a&&n.manuallyAnimateOnMount&&(b=!1),m.protectedKeys=t.objectSpread2({},v),!m.isActive&&null===x||!y&&!m.prevProp||O(y)||"boolean"==typeof y)return"continue";var S=mi(m.prevProp,y),E=S||p===r&&m.isActive&&!b&&g||i>h&&g,k=Array.isArray(y)?y:[y],w=k.reduce(s,{});!1===x&&(w={});var C=m.prevResolvedValues,P=void 0===C?{}:C,A=t.objectSpread2(t.objectSpread2({},P),w),T=function(t){E=!0,d.delete(t),m.needsAnimating[t]=!0};for(var j in A){var V=w[j],M=P[j];v.hasOwnProperty(j)||(V!==M?be(V)&&be(M)?!vn(V,M)||S?T(j):m.protectedKeys[j]=!0:void 0!==V?T(j):d.add(j):void 0!==V&&d.has(j)?T(j):m.protectedKeys[j]=!0)}m.prevProp=y,m.prevResolvedValues=w,m.isActive&&(v=t.objectSpread2(t.objectSpread2({},v),w)),a&&n.blockInitialAnimation&&(E=!1),E&&!b&&f.push.apply(f,t.toConsumableArray(k.map((function(n){return{animation:n,options:t.objectSpread2({type:p},e)}}))))},m=0;m<hi;m++)p(m);if(d.size){var y={};d.forEach((function(t){var e=n.getBaseTarget(t);void 0!==e&&(y[t]=e)})),f.push({animation:y})}var g=Boolean(f.length);return a&&!1===l.initial&&!n.manuallyAnimateOnMount&&(g=!1),a=!1,g?i(f):Promise.resolve()}return{animateChanges:u,setActive:function(t,e,r){var i;if(o[t].isActive===e)return Promise.resolve();null===(i=n.variantChildren)||void 0===i||i.forEach((function(n){var r;return null===(r=n.animationState)||void 0===r?void 0:r.setActive(t,e)})),o[t].isActive=e;var a=u(r,t);for(var s in o)o[s].protectedKeys={};return a},setAnimateFunction:function(t){i=t(n)},getState:function(){return o}}}function mi(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!vn(e,t)}function yi(){return{isActive:arguments.length>0&&void 0!==arguments[0]&&arguments[0],protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var gi={animation:cn((function(t){var e=t.visualElement,r=t.animate;e.animationState||(e.animationState=pi(e)),O(r)&&n.useEffect((function(){return r.subscribe(e)}),[r])})),exit:cn((function(r){var i=r.custom,o=r.visualElement,a=dn(),s=t.slicedToArray(a,2),u=s[0],l=s[1],c=n.useContext(V);n.useEffect((function(){o.isPresent=u;var t=o.animationState&&o.animationState.setActive(e.AnimationType.Exit,!u,{custom:c&&c.custom||i});t&&!u&&t.then(l)}),[u])}))},xi=function(t,e){return Math.abs(t-e)};function bi(t,e){var n=xi(t.x,e.x),r=xi(t.y,e.y);return Math.sqrt(Math.pow(n,2)+Math.pow(r,2))}var Si=function(){function e(n,r){var i=this,o=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).transformPagePoint;if(t.classCallCheck(this,e),this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(i.lastMoveEvent&&i.lastMoveEventInfo){var e=wi(i.lastMoveEventInfo,i.history),n=null!==i.startEvent,r=bi(e.offset,{x:0,y:0})>=3;if(n||r){var o=e.point,a=ir().timestamp;i.history.push(t.objectSpread2(t.objectSpread2({},o),{},{timestamp:a}));var s=i.handlers,u=s.onStart,l=s.onMove;n||(u&&u(i.lastMoveEvent,e),i.startEvent=i.lastMoveEvent),l&&l(i.lastMoveEvent,e)}}},this.handlePointerMove=function(t,e){i.lastMoveEvent=t,i.lastMoveEventInfo=Ei(e,i.transformPagePoint),Me(t)&&0===t.buttons?i.handlePointerUp(t,e):Jn.update(i.updatePoint,!0)},this.handlePointerUp=function(t,e){i.end();var n=i.handlers,r=n.onEnd,o=n.onSessionEnd,a=wi(Ei(e,i.transformPagePoint),i.history);i.startEvent&&r&&r(t,a),o&&o(t,a)},!(Re(n)&&n.touches.length>1)){this.handlers=r,this.transformPagePoint=o;var a=Ei(Oe(n),this.transformPagePoint),s=a.point,u=ir().timestamp;this.history=[t.objectSpread2(t.objectSpread2({},s),{},{timestamp:u})];var l=r.onSessionStart;l&&l(n,wi(a,this.history)),this.removeListeners=Je(Ne(window,"pointermove",this.handlePointerMove),Ne(window,"pointerup",this.handlePointerUp),Ne(window,"pointercancel",this.handlePointerUp))}}return t.createClass(e,[{key:"updateHandlers",value:function(t){this.handlers=t}},{key:"end",value:function(){this.removeListeners&&this.removeListeners(),Qn.update(this.updatePoint)}}]),e}();function Ei(t,e){return e?{point:e(t.point)}:t}function ki(t,e){return{x:t.x-e.x,y:t.y-e.y}}function wi(t,e){var n=t.point;return{point:n,delta:ki(n,Pi(e)),offset:ki(n,Ci(e)),velocity:Ai(e,.1)}}function Ci(t){return t[0]}function Pi(t){return t[t.length-1]}function Ai(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,i=Pi(t);n>=0&&(r=t[n],!(i.timestamp-r.timestamp>hn(e)));)n--;if(!r)return{x:0,y:0};var o=(i.timestamp-r.timestamp)/1e3;if(0===o)return{x:0,y:0};var a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Ti(t){return t.max-t.min}function ji(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.01;return Math.abs(t-e)<=n}function Vi(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;t.origin=r,t.originPoint=sr(e.min,e.max,t.origin),t.scale=Ti(n)/Ti(e),(ji(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=sr(n.min,n.max,t.origin)-t.originPoint,(ji(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Mi(t,e,n,r){Vi(t.x,e.x,n.x,null==r?void 0:r.originX),Vi(t.y,e.y,n.y,null==r?void 0:r.originY)}function Ri(t,e,n){t.min=n.min+e.min,t.max=t.min+Ti(e)}function Li(t,e,n){t.min=e.min-n.min,t.max=t.min+Ti(e)}function Di(t,e,n){Li(t.x,e.x,n.x),Li(t.y,e.y,n.y)}function Bi(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 Oi(t,e){var n,r=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&(r=(n=[i,r])[0],i=n[1]),{min:r,max:i}}var Fi=.35;function Ii(t,e,n){return{min:Ui(t,e),max:Ui(t,n)}}function Ui(t,e){var n;return"number"==typeof t?t:null!==(n=t[e])&&void 0!==n?n:0}var Wi=function(){return{x:{min:0,max:0},y:{min:0,max:0}}};function Ni(t){return[t("x"),t("y")]}function zi(t){var e=t.top;return{x:{min:t.left,max:t.right},y:{min:e,max:t.bottom}}}function Hi(t){return void 0===t||1===t}function Yi(t){var e=t.scale,n=t.scaleX,r=t.scaleY;return!Hi(e)||!Hi(n)||!Hi(r)}function Xi(t){return Yi(t)||Gi(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Gi(t){return qi(t.x)||qi(t.y)}function qi(t){return t&&"0%"!==t}function Zi(t,e,n){return n+e*(t-n)}function _i(t,e,n,r,i){return void 0!==i&&(t=Zi(t,i,r)),Zi(t,n,r)+e}function $i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;t.min=_i(t.min,e,n,r,i),t.max=_i(t.max,e,n,r,i)}function Ki(t,e){var n=e.x,r=e.y;$i(t.x,n.translate,n.scale,n.originPoint),$i(t.y,r.translate,r.scale,r.originPoint)}function Ji(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Qi(t,e){t.min=t.min+e,t.max=t.max+e}function to(e,n,r){var i=t.slicedToArray(r,3),o=i[0],a=i[1],s=i[2],u=void 0!==n[s]?n[s]:.5,l=sr(e.min,e.max,u);$i(e,n[o],n[a],l,n.scale)}var eo=["x","scaleX","originX"],no=["y","scaleY","originY"];function ro(t,e){to(t.x,e,eo),to(t.y,e,no)}function io(t,e){return zi(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 oo=new WeakMap,ao=function(){function n(e){t.classCallCheck(this,n),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=e}return t.createClass(n,[{key:"start",value:function(t){var n=this,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).snapToCursor,i=void 0!==r&&r;!1!==this.visualElement.isPresent&&(this.panSession=new Si(t,{onSessionStart:function(t){n.stopAnimation(),i&&n.snapToCursor(Oe(t,"page").point)},onStart:function(t,r){var i,o=n.getProps(),a=o.drag,s=o.dragPropagation,u=o.onDragStart;(!a||s||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Ge(a),n.openGlobalLock))&&(n.isDragging=!0,n.currentDirection=null,n.resolveConstraints(),n.visualElement.projection&&(n.visualElement.projection.isAnimationBlocked=!0,n.visualElement.projection.target=void 0),Ni((function(t){var e,r,i=n.getAxisMotionValue(t).get()||0;if(Ct.test(i)){var o=null===(r=null===(e=n.visualElement.projection)||void 0===e?void 0:e.layout)||void 0===r?void 0:r.layoutBox[t];o&&(i=Ti(o)*(parseFloat(i)/100))}n.originPoint[t]=i})),null==u||u(t,r),null===(i=n.visualElement.animationState)||void 0===i||i.setActive(e.AnimationType.Drag,!0))},onMove:function(t,e){var r=n.getProps(),i=r.dragPropagation,o=r.dragDirectionLock,a=r.onDirectionLock,s=r.onDrag;if(i||n.openGlobalLock){var u=e.offset;if(o&&null===n.currentDirection)return n.currentDirection=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),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.render(),null==s||s(t,e)}},onSessionEnd:function(t,e){return n.stop(t,e)}},{transformPagePoint:this.visualElement.getTransformPagePoint()}))}},{key:"stop",value:function(t,e){var n=this.isDragging;if(this.cancel(),n){var r=e.velocity;this.startAnimation(r);var i=this.getProps().onDragEnd;null==i||i(t,e)}}},{key:"cancel",value:function(){var t,n;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===(n=this.visualElement.animationState)||void 0===n||n.setActive(e.AnimationType.Drag,!1)}},{key:"updateAxis",value:function(t,e,n){var r=this.getProps().drag;if(n&&so(t,r,this.currentDirection)){var i=this.getAxisMotionValue(t),o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,e,n){var r=e.min,i=e.max;return void 0!==r&&t<r?t=n?sr(r,t,n.min):Math.max(t,r):void 0!==i&&t>i&&(t=n?sr(i,t,n.max):Math.min(t,i)),t}(o,this.constraints[t],this.elastic[t])),i.set(o)}}},{key:"resolveConstraints",value:function(){var t=this,e=this.getProps(),n=e.dragConstraints,r=e.dragElastic,i=(this.visualElement.projection||{}).layout,o=this.constraints;n&&D(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!n||!i)&&function(t,e){var n=e.top,r=e.left,i=e.bottom,o=e.right;return{x:Bi(t.x,r,o),y:Bi(t.y,n,i)}}(i.layoutBox,n),this.elastic=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fi;return!1===t?t=0:!0===t&&(t=Fi),{x:Ii(t,"left","right"),y:Ii(t,"top","bottom")}}(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Ni((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}(i.layoutBox[e],t.constraints[e]))}))}},{key:"resolveRefConstraints",value:function(){var t=this.getProps(),e=t.dragConstraints,n=t.onMeasureDragConstraints;if(!e||!D(e))return!1;var r=e.current,i=this.visualElement.projection;if(!i||!i.layout)return!1;var o=function(t,e,n){var r=io(t,n),i=e.scroll;return i&&(Qi(r.x,i.offset.x),Qi(r.y,i.offset.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),a=function(t,e){return{x:Oi(t.x,e.x),y:Oi(t.y,e.y)}}(i.layout.layoutBox,o);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=zi(s))}return a}},{key:"startAnimation",value:function(e){var n=this,r=this.getProps(),i=r.drag,o=r.dragMomentum,a=r.dragElastic,s=r.dragTransition,u=r.dragSnapToOrigin,l=r.onDragTransitionEnd,c=this.constraints||{},f=Ni((function(r){var l;if(so(r,i,n.currentDirection)){var f=null!==(l=null==c?void 0:c[r])&&void 0!==l?l:{};u&&(f={min:0,max:0});var d=a?200:1e6,v=a?40:1e7,h=t.objectSpread2(t.objectSpread2({type:"inertia",velocity:o?e[r]:0,bounceStiffness:d,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10},s),f);return n.startAxisValueAnimation(r,h)}}));return Promise.all(f).then(l)}},{key:"startAxisValueAnimation",value:function(t,e){return Nr(t,this.getAxisMotionValue(t),0,e)}},{key:"stopAnimation",value:function(){var t=this;Ni((function(e){return t.getAxisMotionValue(e).stop()}))}},{key:"getAxisMotionValue",value:function(t){var e,n,r="_drag"+t.toUpperCase();return this.visualElement.getProps()[r]||this.visualElement.getValue(t,null!==(n=null===(e=this.visualElement.getProps().initial)||void 0===e?void 0:e[t])&&void 0!==n?n:0)}},{key:"snapToCursor",value:function(t){var e=this;Ni((function(n){if(so(n,e.getProps().drag,e.currentDirection)){var r=e.visualElement.projection,i=e.getAxisMotionValue(n);if(r&&r.layout){var o=r.layout.layoutBox[n],a=o.min,s=o.max;i.set(t[n]-sr(a,s,.5))}}}))}},{key:"scalePositionWithinConstraints",value:function(){var t,e=this;if(this.visualElement.current){var n=this.getProps(),r=n.drag,i=n.dragConstraints,o=this.visualElement.projection;if(D(i)&&o&&this.constraints){this.stopAnimation();var a={x:0,y:0};Ni((function(t){var n=e.getAxisMotionValue(t);if(n){var r=n.get();a[t]=function(t,e){var n=.5,r=Ti(t),i=Ti(e);return i>r?n=gr(e.min,e.max-r,t.min):r>i&&(n=gr(t.min,t.max-i,e.min)),ar(0,1,n)}({min:r,max:r},e.constraints[t])}}));var s=this.visualElement.getProps().transformTemplate;this.visualElement.current.style.transform=s?s({},""):"none",null===(t=o.root)||void 0===t||t.updateScroll(),o.updateLayout(),this.resolveConstraints(),Ni((function(t){if(so(t,r,null)){var n=e.getAxisMotionValue(t),i=e.constraints[t],o=i.min,s=i.max;n.set(sr(o,s,a[t]))}}))}}}},{key:"addListeners",value:function(){var t,e=this;if(this.visualElement.current){oo.set(this.visualElement,this);var n=Ne(this.visualElement.current,"pointerdown",(function(t){var n=e.getProps(),r=n.drag,i=n.dragListener;r&&(void 0===i||i)&&e.start(t)})),r=function(){D(e.getProps().dragConstraints)&&(e.constraints=e.resolveRefConstraints())},i=this.visualElement.projection,o=i.addEventListener("measure",r);i&&!i.layout&&(null===(t=i.root)||void 0===t||t.updateScroll(),i.updateLayout()),r();var a=je(window,"resize",(function(){return e.scalePositionWithinConstraints()})),s=i.addEventListener("didUpdate",(function(t){var n=t.delta,r=t.hasLayoutChanged;e.isDragging&&r&&(Ni((function(t){var r=e.getAxisMotionValue(t);r&&(e.originPoint[t]+=n[t].translate,r.set(r.get()+n[t].translate))})),e.visualElement.render())}));return function(){a(),n(),o(),null==s||s()}}}},{key:"getProps",value:function(){var e=this.visualElement.getProps(),n=e.drag,r=void 0!==n&&n,i=e.dragDirectionLock,o=void 0!==i&&i,a=e.dragPropagation,s=void 0!==a&&a,u=e.dragConstraints,l=void 0!==u&&u,c=e.dragElastic,f=void 0===c?Fi:c,d=e.dragMomentum,v=void 0===d||d;return t.objectSpread2(t.objectSpread2({},e),{},{drag:r,dragDirectionLock:o,dragPropagation:s,dragConstraints:l,dragElastic:f,dragMomentum:v})}}]),n}();function so(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}var uo={pan:cn((function(t){var e=t.onPan,r=t.onPanStart,i=t.onPanEnd,o=t.onPanSessionStart,a=t.visualElement,s=e||r||i||o,u=n.useRef(null),l=n.useContext(A).transformPagePoint,c={onSessionStart:o,onStart:r,onMove:e,onEnd:function(t,e){u.current=null,i&&i(t,e)}};n.useEffect((function(){null!==u.current&&u.current.updateHandlers(c)})),ze(a,"pointerdown",s&&function(t){u.current=new Si(t,c,{transformPagePoint:l})}),$e((function(){return u.current&&u.current.end()}))})),drag:cn((function(t){var e=t.dragControls,r=t.visualElement,i=X((function(){return new ao(r)}));n.useEffect((function(){return e&&e.subscribe(i)}),[i,e]),n.useEffect((function(){return i.addListeners()}),[i])}))};function lo(t){return"string"==typeof t&&t.startsWith("var(--")}var co=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function fo(e,n){var r=function(e){var n=co.exec(e);if(!n)return[,];var r=t.slicedToArray(n,3);return[r[1],r[2]]}(e),i=t.slicedToArray(r,2),o=i[0],a=i[1];if(o){var s=window.getComputedStyle(n).getPropertyValue(o);return s?s.trim():lo(a)?fo(a,n):a}}var vo,ho=new Set(["width","height","top","left","right","bottom","x","y"]),po=function(t){return ho.has(t)},mo=function(t,e){t.set(e,!1),t.set(e)},yo=function(t){return t===bt||t===Pt};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(vo||(vo={}));var go=function(t,e){return parseFloat(t.split(", ")[e])},xo=function(t,e){return function(n,r){var i=r.transform;if("none"===i||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return go(o[1],e);var a=i.match(/^matrix\((.+)\)$/);return a?go(a[1],t):0}},bo=new Set(["x","y","z"]),So=ot.filter((function(t){return!bo.has(t)})),Eo={width:function(t,e){var n=t.x,r=e.paddingLeft,i=void 0===r?"0":r,o=e.paddingRight,a=void 0===o?"0":o;return n.max-n.min-parseFloat(i)-parseFloat(a)},height:function(t,e){var n=t.y,r=e.paddingTop,i=void 0===r?"0":r,o=e.paddingBottom,a=void 0===o?"0":o;return n.max-n.min-parseFloat(i)-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:xo(4,13),y:xo(5,14)},ko=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};n=t.objectSpread2({},n),i=t.objectSpread2({},i);var o=Object.keys(n).filter(po),a=[],s=!1,u=[];if(o.forEach((function(t){var o=e.getValue(t);if(e.hasValue(t)){var l,c=r[t],f=$r(c),d=n[t];if(be(d)){var v=d.length,h=null===d[0]?1:0;c=d[h],f=$r(c);for(var p=h;p<v;p++)l?$r(d[p]):l=$r(d[p])}else l=$r(d);if(f!==l)if(yo(f)&&yo(l)){var m=o.get();"string"==typeof m&&o.set(parseFloat(m)),"string"==typeof d?n[t]=parseFloat(d):Array.isArray(d)&&l===Pt&&(n[t]=d.map(parseFloat))}else(null==f?void 0:f.transform)&&(null==l?void 0:l.transform)&&(0===c||0===d)?0===c?o.set(l.transform(c)):n[t]=f.transform(d):(s||(a=function(t){var e=[];return So.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.render(),e}(e),s=!0),u.push(t),i[t]=void 0!==i[t]?i[t]:n[t],mo(o,d))}})),u.length){var l=u.indexOf("height")>=0?window.pageYOffset:null,c=function(t,e,n){var r=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),a=o.display,s={};"none"===a&&e.setStaticValue("display",t.display||"block"),n.forEach((function(t){s[t]=Eo[t](r,o)})),e.render();var u=e.measureViewportBox();return n.forEach((function(n){var r=e.getValue(n);mo(r,s[n]),t[n]=Eo[n](u,o)})),t}(n,e,u);return a.length&&a.forEach((function(n){var r=t.slicedToArray(n,2),i=r[0],o=r[1];e.getValue(i).set(o)})),e.render(),M&&null!==l&&window.scrollTo({top:l}),{target:c,transitionEnd:i}}return{target:n,transitionEnd:i}};function wo(t,e,n,r){return function(t){return Object.keys(t).some(po)}(e)?ko(t,e,n,r):{target:e,transitionEnd:r}}var Co=function(e,n,r,i){var o=function(e,n,r){var i=t.extends({},(t.objectDestructuringEmpty(n),n)),o=e.current;if(!(o instanceof Element))return{target:i,transitionEnd:r};for(var a in r&&(r=t.objectSpread2({},r)),e.values.forEach((function(t){var e=t.get();if(lo(e)){var n=fo(e,o);n&&t.set(n)}})),i){var s=i[a];if(lo(s)){var u=fo(s,o);u&&(i[a]=u,r&&void 0===r[a]&&(r[a]=s))}}return{target:i,transitionEnd:r}}(e,n,i);return wo(e,n=o.target,r,i=o.transitionEnd)},Po={current:null},Ao={current:!1};function To(){if(Ao.current=!0,M)if(window.matchMedia){var t=window.matchMedia("(prefers-reduced-motion)"),e=function(){return Po.current=t.matches};t.addListener(e),e()}else Po.current=!1}var jo=Object.keys(H),Vo=jo.length,Mo=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Ro=function(){function e(n){var r=this,i=n.parent,o=n.props,a=n.reducedMotionConfig,s=n.visualState,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.classCallCheck(this,e),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=function(){return r.notify("Update",r.latestValues)},this.render=function(){r.current&&(r.triggerBuild(),r.renderInstance(r.current,r.renderState,r.props.style,r.projection))},this.scheduleRender=function(){return Jn.render(r.render,!1,!0)};var l=s.latestValues,c=s.renderState;this.latestValues=l,this.baseTarget=t.objectSpread2({},l),this.initialValues=o.initial?t.objectSpread2({},l):{},this.renderState=c,this.parent=i,this.props=o,this.depth=i?i.depth+1:0,this.reducedMotionConfig=a,this.options=u,this.isControllingVariants=I(o),this.isVariantNode=U(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(i&&i.current);var f=this.scrapeMotionValuesFromProps(o),d=f.willChange,v=t.objectWithoutProperties(f,g);for(var h in v){var p=v[h];void 0!==l[h]&&ut(p)&&(p.set(l[h],!1),ai(d)&&d.add(h))}}return t.createClass(e,[{key:"scrapeMotionValuesFromProps",value:function(t){return{}}},{key:"mount",value:function(t){var e,n=this;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=null===(e=this.parent)||void 0===e?void 0:e.addVariantChild(this)),this.values.forEach((function(t,e){return n.bindToMotionValue(e,t)})),Ao.current||To(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Po.current),this.parent&&this.parent.children.add(this),this.setProps(this.props)}},{key:"unmount",value:function(){var t,e,n;for(var r in null===(t=this.projection)||void 0===t||t.unmount(),Qn.update(this.notifyUpdate),Qn.render(this.render),this.valueSubscriptions.forEach((function(t){return t()})),null===(e=this.removeFromVariantTree)||void 0===e||e.call(this),null===(n=this.parent)||void 0===n||n.children.delete(this),this.events)this.events[r].clear();this.current=null}},{key:"bindToMotionValue",value:function(t,e){var n=this,r=at.has(t),i=e.onChange((function(e){n.latestValues[t]=e,n.props.onUpdate&&Jn.update(n.notifyUpdate,!1,!0),r&&n.projection&&(n.projection.isTransformDirty=!0)})),o=e.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,(function(){i(),o()}))}},{key:"sortNodePosition",value:function(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}},{key:"loadFeatures",value:function(e,r,i,o,a,s){for(var u=this,l=[],c=0;c<Vo;c++){var f=jo[c],d=H[f],v=d.isEnabled,h=d.Component;v(e)&&h&&l.push(n.createElement(h,t.objectSpread2(t.objectSpread2({key:f},e),{},{visualElement:this})))}if(!this.projection&&a){this.projection=new a(o,this.latestValues,this.parent&&this.parent.projection);var p=e.layoutId,m=e.layout,y=e.drag,g=e.dragConstraints,x=e.layoutScroll;this.projection.setOptions({layoutId:p,layout:m,alwaysMeasureLayout:Boolean(y)||g&&D(g),visualElement:this,scheduleRender:function(){return u.scheduleRender()},animationType:"string"==typeof m?m:"both",initialPromotionConfig:s,layoutScroll:x})}return l}},{key:"triggerBuild",value:function(){this.build(this.renderState,this.latestValues,this.options,this.props)}},{key:"measureViewportBox",value:function(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}},{key:"getStaticValue",value:function(t){return this.latestValues[t]}},{key:"setStaticValue",value:function(t,e){this.latestValues[t]=e}},{key:"makeTargetAnimatable",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.makeTargetAnimatableFromInstance(t,this.props,e)}},{key:"setProps",value:function(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(var e=0;e<Mo.length;e++){var n=Mo[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);var r=t["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(t,e,n){var r=e.willChange;for(var i in e){var o=e[i],a=n[i];if(ut(o))t.addValue(i,o),ai(r)&&r.add(i);else if(ut(a))t.addValue(i,qr(o)),ai(r)&&r.remove(i);else if(a!==o)if(t.hasValue(i)){var s=t.getValue(i);!s.hasAnimated&&s.set(o)}else{var u=t.getStaticValue(i);t.addValue(i,qr(void 0!==u?u:o))}}for(var l in n)void 0===e[l]&&t.removeValue(l);return e}(this,this.scrapeMotionValuesFromProps(t),this.prevMotionValues)}},{key:"getProps",value:function(){return this.props}},{key:"getVariant",value:function(t){var e;return null===(e=this.props.variants)||void 0===e?void 0:e[t]}},{key:"getDefaultTransition",value:function(){return this.props.transition}},{key:"getTransformPagePoint",value:function(){return this.props.transformPagePoint}},{key:"getClosestVariantNode",value:function(){var t;return this.isVariantNode?this:null===(t=this.parent)||void 0===t?void 0:t.getClosestVariantNode()}},{key:"getVariantContext",value:function(){var t,e;if(arguments.length>0&&void 0!==arguments[0]&&arguments[0])return null===(t=this.parent)||void 0===t?void 0:t.getVariantContext();if(!this.isControllingVariants){var n=(null===(e=this.parent)||void 0===e?void 0:e.getVariantContext())||{};return void 0!==this.props.initial&&(n.initial=this.props.initial),n}for(var r={},i=0;i<Do;i++){var o=Lo[i],a=this.props[o];(B(a)||!1===a)&&(r[o]=a)}return r}},{key:"addVariantChild",value:function(t){var e,n=this.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),function(){return n.variantChildren.delete(t)}}},{key:"addValue",value:function(t,e){this.hasValue(t)&&this.removeValue(t),this.values.set(t,e),this.latestValues[t]=e.get(),this.bindToMotionValue(t,e)}},{key:"removeValue",value:function(t){var e;this.values.delete(t),null===(e=this.valueSubscriptions.get(t))||void 0===e||e(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}},{key:"hasValue",value:function(t){return this.values.has(t)}},{key:"getValue",value:function(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];var n=this.values.get(t);return void 0===n&&void 0!==e&&(n=qr(e),this.addValue(t,n)),n}},{key:"readValue",value:function(t){return void 0===this.latestValues[t]&&this.current?this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}},{key:"setBaseTarget",value:function(t,e){this.baseTarget[t]=e}},{key:"getBaseTarget",value:function(e){var n,r=this.props.initial,i="string"==typeof r||"object"==t.typeof(r)?null===(n=xe(this.props,r))||void 0===n?void 0:n[e]:void 0;if(r&&void 0!==i)return i;var o=this.getBaseTargetFromProps(this.props,e);return void 0===o||ut(o)?void 0!==this.initialValues[e]&&void 0===i?void 0:this.baseTarget[e]:o}},{key:"on",value:function(t,e){return this.events[t]||(this.events[t]=new Xr),this.events[t].add(e)}},{key:"notify",value:function(t){for(var e,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];null===(n=this.events[t])||void 0===n||(e=n).notify.apply(e,i)}}]),e}(),Lo=["initial"].concat(di),Do=Lo.length,Bo=function(e){t.inherits(r,e);var n=t.createSuper(r);function r(){return t.classCallCheck(this,r),n.apply(this,arguments)}return t.createClass(r,[{key:"sortInstanceNodePosition",value:function(t,e){return 2&t.compareDocumentPosition(e)?1:-1}},{key:"getBaseTargetFromProps",value:function(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]}},{key:"removeValueFromRenderState",value:function(t,e){var n=e.vars,r=e.style;delete n[t],delete r[t]}},{key:"makeTargetAnimatableFromInstance",value:function(e,n,r){var i=e.transition,o=e.transitionEnd,a=t.objectWithoutProperties(e,x),s=n.transformValues,u=oi(a,i||{},this);if(s&&(o&&(o=s(o)),a&&(a=s(a)),u&&(u=s(u))),r){ri(this,a,u);var l=Co(this,a,u,o);o=l.transitionEnd,a=l.target}return t.objectSpread2({transition:i,transitionEnd:o},a)}}]),r}(Ro),Oo=function(e){t.inherits(r,e);var n=t.createSuper(r);function r(){return t.classCallCheck(this,r),n.apply(this,arguments)}return t.createClass(r,[{key:"readValueFromInstance",value:function(t,e){if(at.has(e)){var n=Nn(e);return n&&n.default||0}var r,i=(r=t,window.getComputedStyle(r)),o=(dt(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof o?o.trim():o}},{key:"measureInstanceViewportBox",value:function(t,e){return io(t,e.transformPagePoint)}},{key:"build",value:function(t,e,n,r){_t(t,e,n,r.transformTemplate)}},{key:"scrapeMotionValuesFromProps",value:function(t){return ye(t)}},{key:"renderInstance",value:function(t,e,n,r){he(t,e,n,r)}}]),r}(Bo),Fo=function(e){t.inherits(r,e);var n=t.createSuper(r);function r(){var e;return t.classCallCheck(this,r),(e=n.apply(this,arguments)).isSVGTag=!1,e}return t.createClass(r,[{key:"getBaseTargetFromProps",value:function(t,e){return t[e]}},{key:"readValueFromInstance",value:function(t,e){var n;return at.has(e)?(null===(n=Nn(e))||void 0===n?void 0:n.default)||0:(e=pe.has(e)?e:ve(e),t.getAttribute(e))}},{key:"measureInstanceViewportBox",value:function(){return{x:{min:0,max:0},y:{min:0,max:0}}}},{key:"scrapeMotionValuesFromProps",value:function(t){return ge(t)}},{key:"build",value:function(t,e,n,r){ue(t,e,n,this.isSVGTag,r.transformTemplate)}},{key:"renderInstance",value:function(t,e,n,r){me(t,e,0,r)}},{key:"mount",value:function(e){this.isSVGTag=ce(e.tagName),t.get(t.getPrototypeOf(r.prototype),"mount",this).call(this,e)}}]),r}(Bo),Io=function(t,e){return nt(t)?new Fo(e,{enableHardwareAcceleration:!1}):new Oo(e,{enableHardwareAcceleration:!0})};function Uo(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var Wo={correct:function(t,e){if(!e.target)return t;if("string"==typeof t){if(!Pt.test(t))return t;t=parseFloat(t)}return"".concat(Uo(t,e.target.x),"% ").concat(Uo(t,e.target.y),"%")}},No={correct:function(t,e){var n=e.treeScale,r=e.projectionDelta,i=t,o=t.includes("var("),a=[];o&&(t=t.replace(co,(function(t){return a.push(t),"_$css"})));var s=zt.parse(t);if(s.length>5)return i;var u=zt.createTransformer(t),l="number"!=typeof s[0]?1:0,c=r.x.scale*n.x,f=r.y.scale*n.y;s[0+l]/=c,s[1+l]/=f;var d=sr(c,f,.5);"number"==typeof s[2+l]&&(s[2+l]/=d),"number"==typeof s[3+l]&&(s[3+l]/=d);var v=u(s);if(o){var h=0;v=v.replace("_$css",(function(){var t=a[h];return h++,t}))}return v}},zo=function(e){t.inherits(r,e);var n=t.createSuper(r);function r(){return t.classCallCheck(this,r),n.apply(this,arguments)}return t.createClass(r,[{key:"componentDidMount",value:function(){var e=this,n=this.props,r=n.visualElement,i=n.layoutGroup,o=n.switchLayoutGroup,a=n.layoutId,s=r.projection;it(Ho),s&&(i.group&&i.group.add(s),o&&o.register&&a&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(function(){e.safeToRemove()})),s.setOptions(t.objectSpread2(t.objectSpread2({},s.options),{},{onExitComplete:function(){return e.safeToRemove()}}))),G.hasEverUpdated=!0}},{key:"getSnapshotBeforeUpdate",value:function(t){var e=this,n=this.props,r=n.layoutDependency,i=n.visualElement,o=n.drag,a=n.isPresent,s=i.projection;return s?(s.isPresent=a,o||t.layoutDependency!==r||void 0===r?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||Jn.postRender((function(){var t;(null===(t=s.getStack())||void 0===t?void 0:t.members.length)||e.safeToRemove()}))),null):null}},{key:"componentDidUpdate",value:function(){var t=this.props.visualElement.projection;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}},{key:"componentWillUnmount",value:function(){var t=this.props,e=t.visualElement,n=t.layoutGroup,r=t.switchLayoutGroup,i=e.projection;i&&(i.scheduleCheckAfterUnmount(),(null==n?void 0:n.group)&&n.group.remove(i),(null==r?void 0:r.deregister)&&r.deregister(i))}},{key:"safeToRemove",value:function(){var t=this.props.safeToRemove;null==t||t()}},{key:"render",value:function(){return null}}]),r}(a.default.Component),Ho={borderRadius:t.objectSpread2(t.objectSpread2({},Wo),{},{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Wo,borderTopRightRadius:Wo,borderBottomLeftRadius:Wo,borderBottomRightRadius:Wo,boxShadow:No},Yo={measureLayout:function(e){var r=dn(),i=t.slicedToArray(r,2),o=i[0],s=i[1],u=n.useContext(Z);return a.default.createElement(zo,t.objectSpread2(t.objectSpread2({},e),{},{layoutGroup:u,switchLayoutGroup:n.useContext($),isPresent:o,safeToRemove:s}))}};function Xo(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=ut(t)?t:qr(t);return Nr("",r,e,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}var Go=["TopLeft","TopRight","BottomLeft","BottomRight"],qo=Go.length,Zo=function(t){return"string"==typeof t?parseFloat(t):t},_o=function(t){return"number"==typeof t||Pt.test(t)};function $o(t,e){var n;return null!==(n=t[e])&&void 0!==n?n:t.borderRadius}var Ko=Qo(0,.5,wn),Jo=Qo(.5,.95,pn);function Qo(t,e,n){return function(r){return r<t?0:r>e?1:n(gr(t,e,r))}}function ta(t,e){t.min=e.min,t.max=e.max}function ea(t,e){ta(t.x,e.x),ta(t.y,e.y)}function na(t,e,n,r,i){return t=Zi(t-=e,1/n,r),void 0!==i&&(t=Zi(t,1/i,r)),t}function ra(e,n,r,i,o){var a=t.slicedToArray(r,3),s=a[0],u=a[1],l=a[2];!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:t,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t;if(Ct.test(e)&&(e=parseFloat(e),e=sr(a.min,a.max,e/100)-a.min),"number"==typeof e){var s=sr(o.min,o.max,r);t===o&&(s-=e),t.min=na(t.min,e,n,s,i),t.max=na(t.max,e,n,s,i)}}(e,n[s],n[u],n[l],n.scale,i,o)}var ia=["x","scaleX","originX"],oa=["y","scaleY","originY"];function aa(t,e,n,r){ra(t.x,e,ia,null==n?void 0:n.x,null==r?void 0:r.x),ra(t.y,e,oa,null==n?void 0:n.y,null==r?void 0:r.y)}function sa(t){return 0===t.translate&&1===t.scale}function ua(t){return sa(t.x)&&sa(t.y)}function la(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}function ca(t){return Ti(t.x)/Ti(t.y)}var fa=function(){function e(){t.classCallCheck(this,e),this.members=[]}return t.createClass(e,[{key:"add",value:function(t){Hr(this.members,t),t.scheduleRender()}},{key:"remove",value:function(t){if(Yr(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)}}},{key:"relegate",value: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 i=this.members[r];if(!1!==i.isPresent){e=i;break}}return!!e&&(this.promote(e),!0)}},{key:"promote",value: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),(null===(n=t.root)||void 0===n?void 0:n.isUpdating)&&(t.isLayoutDirty=!0),!1===t.options.crossfade&&r.hide())}},{key:"exitAnimationComplete",value:function(){this.members.forEach((function(t){var e,n,r,i,o;null===(n=(e=t.options).onExitComplete)||void 0===n||n.call(e),null===(o=null===(r=t.resumingFrom)||void 0===r?void 0:(i=r.options).onExitComplete)||void 0===o||o.call(i)}))}},{key:"scheduleRender",value:function(){this.members.forEach((function(t){t.instance&&t.scheduleRender(!1)}))}},{key:"removeLeadSnapshot",value:function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}]),e}();function da(t,e,n){var r="",i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(r="translate3d(".concat(i,"px, ").concat(o,"px, 0) ")),1===e.x&&1===e.y||(r+="scale(".concat(1/e.x,", ").concat(1/e.y,") ")),n){var a=n.rotate,s=n.rotateX,u=n.rotateY;a&&(r+="rotate(".concat(a,"deg) ")),s&&(r+="rotateX(".concat(s,"deg) ")),u&&(r+="rotateY(".concat(u,"deg) "))}var l=t.x.scale*e.x,c=t.y.scale*e.y;return 1===l&&1===c||(r+="scale(".concat(l,", ").concat(c,")")),r||"none"}var va=function(t,e){return t.depth-e.depth},ha=function(){function e(){t.classCallCheck(this,e),this.children=[],this.isDirty=!1}return t.createClass(e,[{key:"add",value:function(t){Hr(this.children,t),this.isDirty=!0}},{key:"remove",value:function(t){Yr(this.children,t),this.isDirty=!0}},{key:"forEach",value:function(t){this.isDirty&&this.children.sort(va),this.isDirty=!1,this.children.forEach(t)}}]),e}(),pa=["","X","Y","Z"],ma=0;function ya(e){var n=e.attachResizeListener,r=e.defaultParent,i=e.measureScroll,o=e.checkIsScrollRoot,a=e.resetTransform;return function(){function e(n){var i=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null==r?void 0:r();t.classCallCheck(this,e),this.id=ma++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!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(){i.isUpdating&&(i.isUpdating=!1,i.clearAllSnapshots())},this.updateProjection=function(){i.nodes.forEach(ba),i.nodes.forEach(Ca),i.nodes.forEach(Pa)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=n,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[].concat(t.toConsumableArray(a.path),[a]):[],this.parent=a,this.depth=a?a.depth+1:0,n&&this.root.registerPotentialNode(n,this);for(var s=0;s<this.path.length;s++)this.path[s].shouldResetTransform=!0;this.root===this&&(this.nodes=new ha)}return t.createClass(e,[{key:"addEventListener",value:function(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Xr),this.eventHandlers.get(t).add(e)}},{key:"notifyListeners",value:function(t){for(var e=this.eventHandlers.get(t),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];null==e||e.notify.apply(e,r)}},{key:"hasListeners",value:function(t){return this.eventHandlers.has(t)}},{key:"registerPotentialNode",value:function(t,e){this.potentialNodes.set(t,e)}},{key:"mount",value:function(e){var r,i=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.instance){this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;var a=this.options,s=a.layoutId,u=a.layout,l=a.visualElement;if(l&&!l.current&&l.mount(e),this.root.nodes.add(this),null===(r=this.parent)||void 0===r||r.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),o&&(u||s)&&(this.isLayoutDirty=!0),n){var c,f=function(){return i.root.updateBlockedByResize=!1};n(e,(function(){i.root.updateBlockedByResize=!0,c&&c(),c=or(f,250),G.hasAnimatedSinceResize&&(G.hasAnimatedSinceResize=!1,i.nodes.forEach(wa))}))}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&l&&(s||u)&&this.addEventListener("didUpdate",(function(e){var n,r,o,a,s,u=e.delta,c=e.hasLayoutChanged,f=e.hasRelativeTargetChanged,d=e.layout;if(i.isTreeAnimationBlocked())return i.target=void 0,void(i.relativeTarget=void 0);var v=null!==(r=null!==(n=i.options.transition)&&void 0!==n?n:l.getDefaultTransition())&&void 0!==r?r:Ra,h=l.getProps(),p=h.onLayoutAnimationStart,m=h.onLayoutAnimationComplete,y=!i.targetLayout||!la(i.targetLayout,d)||f,g=!c&&f;if((null===(o=i.resumeFrom)||void 0===o?void 0:o.instance)||g||c&&(y||!i.currentAnimation)){i.resumeFrom&&(i.resumingFrom=i.resumeFrom,i.resumingFrom.resumingFrom=void 0),i.setAnimationOrigin(u,g);var x=t.objectSpread2(t.objectSpread2({},Wr(v,"layout")),{},{onPlay:p,onComplete:m});l.shouldReduceMotion&&(x.delay=0,x.type=!1),i.startAnimation(x)}else c||0!==i.animationProgress||wa(i),i.isLead()&&(null===(s=(a=i.options).onExitComplete)||void 0===s||s.call(a));i.targetLayout=d}))}}},{key:"unmount",value: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,Qn.preRender(this.updateProjection)}},{key:"blockUpdate",value:function(){this.updateManuallyBlocked=!0}},{key:"unblockUpdate",value:function(){this.updateManuallyBlocked=!1}},{key:"isUpdateBlocked",value:function(){return this.updateManuallyBlocked||this.updateBlockedByResize}},{key:"isTreeAnimationBlocked",value:function(){var t;return this.isAnimationBlocked||(null===(t=this.parent)||void 0===t?void 0:t.isTreeAnimationBlocked())||!1}},{key:"startUpdate",value:function(){var t;this.isUpdateBlocked()||(this.isUpdating=!0,null===(t=this.nodes)||void 0===t||t.forEach(Aa),this.animationId++)}},{key:"willUpdate",value:function(){var t,e,n,r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.root.isUpdateBlocked())null===(e=(t=this.options).onExitComplete)||void 0===e||e.call(t);else if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var i=0;i<this.path.length;i++){var o=this.path[i];o.shouldResetTransform=!0,o.updateScroll("snapshot")}var a=this.options,s=a.layoutId,u=a.layout;if(void 0!==s||u){var l=null===(n=this.options.visualElement)||void 0===n?void 0:n.getProps().transformTemplate;this.prevTransformTemplateValue=null==l?void 0:l(this.latestValues,""),this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}}}},{key:"didUpdate",value:function(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Ea);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(La),this.potentialNodes.clear()),this.nodes.forEach(ka),this.nodes.forEach(ga),this.nodes.forEach(xa),this.clearAllSnapshots(),tr.update(),tr.preRender(),tr.render())}},{key:"clearAllSnapshots",value:function(){this.nodes.forEach(Sa),this.sharedNodes.forEach(Ta)}},{key:"scheduleUpdateProjection",value:function(){Jn.preRender(this.updateProjection,!1,!0)}},{key:"scheduleCheckAfterUnmount",value:function(){var t=this;Jn.postRender((function(){t.isLayoutDirty?t.root.didUpdate():t.root.checkUpdateFailed()}))}},{key:"updateSnapshot",value:function(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}},{key:"updateLayout",value: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.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),null===(t=this.options.visualElement)||void 0===t||t.notify("LayoutMeasure",this.layout.layoutBox,null==n?void 0:n.layoutBox)}}},{key:"updateScroll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"measure",e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:o(this.instance),offset:i(this.instance)})}},{key:"resetTransform",value:function(){var t;if(a){var e=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!ua(this.projectionDelta),r=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate,i=null==r?void 0:r(this.latestValues,""),o=i!==this.prevTransformTemplateValue;e&&(n||Xi(this.latestValues)||o)&&(a(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}}},{key:"measure",value:function(){var t,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=this.measurePageBox(),r=this.removeElementScroll(n);return e&&(r=this.removeTransform(r)),Da((t=r).x),Da(t.y),{animationId:this.root.animationId,measuredBox:n,layoutBox:r,latestValues:{},source:this.id}}},{key:"measurePageBox",value: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&&(Qi(e.x,n.offset.x),Qi(e.y,n.offset.y)),e}},{key:"removeElementScroll",value:function(t){var e={x:{min:0,max:0},y:{min:0,max:0}};ea(e,t);for(var n=0;n<this.path.length;n++){var r=this.path[n],i=r.scroll,o=r.options;if(r!==this.root&&i&&o.layoutScroll){if(i.isRoot){ea(e,t);var a=this.root.scroll;a&&(Qi(e.x,-a.offset.x),Qi(e.y,-a.offset.y))}Qi(e.x,i.offset.x),Qi(e.y,i.offset.y)}}return e}},{key:"applyTransform",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={x:{min:0,max:0},y:{min:0,max:0}};ea(n,t);for(var r=0;r<this.path.length;r++){var i=this.path[r];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ro(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Xi(i.latestValues)&&ro(n,i.latestValues)}return Xi(this.latestValues)&&ro(n,this.latestValues),n}},{key:"removeTransform",value:function(t){var e,n={x:{min:0,max:0},y:{min:0,max:0}};ea(n,t);for(var r=0;r<this.path.length;r++){var i=this.path[r];if(i.instance&&Xi(i.latestValues)){Yi(i.latestValues)&&i.updateSnapshot();var o={x:{min:0,max:0},y:{min:0,max:0}};ea(o,i.measurePageBox()),aa(n,i.latestValues,null===(e=i.snapshot)||void 0===e?void 0:e.layoutBox,o)}}return Xi(this.latestValues)&&aa(n,this.latestValues),n}},{key:"setTargetDelta",value:function(t){this.targetDelta=t,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}},{key:"setOptions",value:function(e){this.options=t.objectSpread2(t.objectSpread2(t.objectSpread2({},this.options),e),{},{crossfade:void 0===e.crossfade||e.crossfade})}},{key:"clearMeasurements",value: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}},{key:"resolveTargetDelta",value:function(){var t,e=this.getLead();if(this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isProjectionDirty||this.attemptToResolveRelativeTarget){var n=this.options,r=n.layout,i=n.layoutId;if(this.layout&&(r||i)){if(!this.targetDelta&&!this.relativeTarget){var o=this.getClosestProjectingParent();o&&o.layout?(this.relativeParent=o,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Di(this.relativeTargetOrigin,this.layout.layoutBox,o.layout.layoutBox),ea(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var a,s,u;if((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)?(a=this.target,s=this.relativeTarget,u=this.relativeParent.target,Ri(a.x,s.x,u.x),Ri(a.y,s.y,u.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ea(this.target,this.layout.layoutBox),Ki(this.target,this.targetDelta)):ea(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;var l=this.getClosestProjectingParent();l&&Boolean(l.resumingFrom)===Boolean(this.resumingFrom)&&!l.options.layoutScroll&&l.target?(this.relativeParent=l,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Di(this.relativeTargetOrigin,this.target,l.target),ea(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}}},{key:"getClosestProjectingParent",value:function(){if(this.parent&&!Yi(this.parent.latestValues)&&!Gi(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}},{key:"calcProjection",value:function(){var t,e=this.isProjectionDirty,n=this.isTransformDirty;this.isProjectionDirty=this.isTransformDirty=!1;var r=this.getLead(),i=Boolean(this.resumingFrom)||this!==r,o=!0;if(e&&(o=!1),i&&n&&(o=!1),!o){var a=this.options,s=a.layout,u=a.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&&(s||u)){ea(this.layoutCorrected,this.layout.layoutBox),function(t,e,n){var r,i,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],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===(r=s.instance)||void 0===r?void 0:r.style)||void 0===i?void 0:i.display)&&(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&ro(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),u&&(e.x*=u.x.scale,e.y*=u.y.scale,Ki(t,u)),o&&Xi(s.latestValues)&&ro(t,s.latestValues));e.x=Ji(e.x),e.y=Ji(e.y)}}(this.layoutCorrected,this.treeScale,this.path,i);var l=r.target;if(l){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 c=this.treeScale.x,f=this.treeScale.y,d=this.projectionTransform;Mi(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=da(this.projectionDelta,this.treeScale),this.projectionTransform===d&&this.treeScale.x===c&&this.treeScale.y===f||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))}}}}},{key:"hide",value:function(){this.isVisible=!1}},{key:"show",value:function(){this.isVisible=!0}},{key:"scheduleRender",value:function(){var t,e,n,r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];null===(e=(t=this.options).scheduleRender)||void 0===e||e.call(t),r&&(null===(n=this.getStack())||void 0===n||n.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}},{key:"setAnimationOrigin",value:function(e){var n,r,i=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=this.snapshot,s=(null==a?void 0:a.latestValues)||{},u=t.objectSpread2({},this.latestValues),l={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=!o;var c={x:{min:0,max:0},y:{min:0,max:0}},f=(null==a?void 0:a.source)!==(null===(n=this.layout)||void 0===n?void 0:n.source),d=((null===(r=this.getStack())||void 0===r?void 0:r.members.length)||0)<=1,v=Boolean(f&&!d&&!0===this.options.crossfade&&!this.path.some(Ma));this.animationProgress=0,this.mixTargetDelta=function(t){var n,r,o,a,h,p=t/1e3;ja(l.x,e.x,p),ja(l.y,e.y,p),i.setTargetDelta(l),i.relativeTarget&&i.relativeTargetOrigin&&i.layout&&(null===(n=i.relativeParent)||void 0===n?void 0:n.layout)&&(Di(c,i.layout.layoutBox,i.relativeParent.layout.layoutBox),r=i.relativeTarget,o=i.relativeTargetOrigin,a=c,h=p,Va(r.x,o.x,a.x,h),Va(r.y,o.y,a.y,h)),f&&(i.animationValues=u,function(t,e,n,r,i,o){var a,s,u,l;i?(t.opacity=sr(0,null!==(a=n.opacity)&&void 0!==a?a:1,Ko(r)),t.opacityExit=sr(null!==(s=e.opacity)&&void 0!==s?s:1,0,Jo(r))):o&&(t.opacity=sr(null!==(u=e.opacity)&&void 0!==u?u:1,null!==(l=n.opacity)&&void 0!==l?l:1,r));for(var c=0;c<qo;c++){var f="border".concat(Go[c],"Radius"),d=$o(e,f),v=$o(n,f);void 0===d&&void 0===v||(d||(d=0),v||(v=0),0===d||0===v||_o(d)===_o(v)?(t[f]=Math.max(sr(Zo(d),Zo(v),r),0),(Ct.test(v)||Ct.test(d))&&(t[f]+="%")):t[f]=v)}(e.rotate||n.rotate)&&(t.rotate=sr(e.rotate||0,n.rotate||0,r))}(u,s,i.latestValues,p,v,d)),i.root.scheduleUpdateProjection(),i.scheduleRender(),i.animationProgress=p},this.mixTargetDelta(0)}},{key:"startAnimation",value:function(e){var n,r,i=this;this.notifyListeners("animationStart"),null===(n=this.currentAnimation)||void 0===n||n.stop(),this.resumingFrom&&(null===(r=this.resumingFrom.currentAnimation)||void 0===r||r.stop()),this.pendingAnimation&&(Qn.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Jn.update((function(){G.hasAnimatedSinceResize=!0,i.currentAnimation=Xo(0,1e3,t.objectSpread2(t.objectSpread2({},e),{},{onUpdate:function(t){var n;i.mixTargetDelta(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:function(){var t;null===(t=e.onComplete)||void 0===t||t.call(e),i.completeAnimation()}})),i.resumingFrom&&(i.resumingFrom.currentAnimation=i.currentAnimation),i.pendingAnimation=void 0}))}},{key:"completeAnimation",value: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")}},{key:"finishAnimation",value:function(){var t;this.currentAnimation&&(null===(t=this.mixTargetDelta)||void 0===t||t.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()}},{key:"applyTransformsToTarget",value:function(){var t=this.getLead(),e=t.targetWithTransforms,n=t.target,r=t.layout,i=t.latestValues;if(e&&n&&r){if(this!==t&&this.layout&&r&&Ba(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};var o=Ti(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+o;var a=Ti(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+a}ea(e,n),ro(e,i),Mi(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}},{key:"registerSharedNode",value:function(t,e){var n,r,i;this.sharedNodes.has(t)||this.sharedNodes.set(t,new fa),this.sharedNodes.get(t).add(e),e.promote({transition:null===(n=e.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(i=null===(r=e.options.initialPromotionConfig)||void 0===r?void 0:r.shouldPreserveFollowOpacity)||void 0===i?void 0:i.call(r,e)})}},{key:"isLead",value:function(){var t=this.getStack();return!t||t.lead===this}},{key:"getLead",value:function(){var t;return this.options.layoutId&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}},{key:"getPrevLead",value:function(){var t;return this.options.layoutId?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}},{key:"getStack",value:function(){var t=this.options.layoutId;if(t)return this.root.sharedNodes.get(t)}},{key:"promote",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.needsReset,n=t.transition,r=t.preserveFollowOpacity,i=this.getStack();i&&i.promote(this,r),e&&(this.projectionDelta=void 0,this.needsReset=!0),n&&this.setOptions({transition:n})}},{key:"relegate",value:function(){var t=this.getStack();return!!t&&t.relegate(this)}},{key:"resetRotation",value:function(){var t=this.options.visualElement;if(t){var e=!1,n=t.latestValues;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),e){for(var r={},i=0;i<pa.length;i++){var o="rotate"+pa[i];n[o]&&(r[o]=n[o],t.setStaticValue(o,0))}for(var a in null==t||t.render(),r)t.setStaticValue(a,r[a]);t.scheduleRender()}}}},{key:"getProjectionStyles",value:function(){var t,e,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i={};if(!this.instance||this.isSVG)return i;if(!this.isVisible)return{visibility:"hidden"};i.visibility="";var o=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=Ee(r.pointerEvents)||"",i.transform=o?o(this.latestValues,""):"none",i;var a=this.getLead();if(!this.projectionDelta||!this.layout||!a.target){var s={};return this.options.layoutId&&(s.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,s.pointerEvents=Ee(r.pointerEvents)||""),this.hasProjected&&!Xi(this.latestValues)&&(s.transform=o?o({},""):"none",this.hasProjected=!1),s}var u=a.animationValues||a.latestValues;this.applyTransformsToTarget(),i.transform=da(this.projectionDeltaWithTransform,this.treeScale,u),o&&(i.transform=o(u,i.transform));var l=this.projectionDelta,c=l.x,f=l.y;for(var d in i.transformOrigin="".concat(100*c.origin,"% ").concat(100*f.origin,"% 0"),a.animationValues?i.opacity=a===this?null!==(n=null!==(e=u.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:i.opacity=a===this?void 0!==u.opacity?u.opacity:"":void 0!==u.opacityExit?u.opacityExit:0,rt)if(void 0!==u[d]){var v=rt[d],h=v.correct,p=v.applyTo,m=h(u[d],a);if(p)for(var y=p.length,g=0;g<y;g++)i[p[g]]=m;else i[d]=m}return this.options.layoutId&&(i.pointerEvents=a===this?Ee(r.pointerEvents)||"":"none"),i}},{key:"clearSnapshot",value:function(){this.resumeFrom=this.snapshot=void 0}},{key:"resetTree",value: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(Ea),this.root.sharedNodes.clear()}}]),e}()}function ga(t){t.updateLayout()}function xa(t){var e,n,r,i=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){var o=t.layout,a=o.layoutBox,s=o.measuredBox,u=t.options.animationType,l=i.source!==t.layout.source;"size"===u?Ni((function(t){var e=l?i.measuredBox[t]:i.layoutBox[t],n=Ti(e);e.min=a[t].min,e.max=e.min+n})):Ba(u,i.layoutBox,a)&&Ni((function(t){var e=l?i.measuredBox[t]:i.layoutBox[t],n=Ti(a[t]);e.max=e.min+n}));var c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Mi(c,a,i.layoutBox);var f={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};l?Mi(f,t.applyTransform(s,!0),i.measuredBox):Mi(f,a,i.layoutBox);var d=!ua(c),v=!1;if(!t.resumeFrom){var h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){var p=h.snapshot,m=h.layout;if(p&&m){var y={x:{min:0,max:0},y:{min:0,max:0}};Di(y,i.layoutBox,p.layoutBox);var g={x:{min:0,max:0},y:{min:0,max:0}};Di(g,a,m.layoutBox),la(y,g)||(v=!0)}}}t.notifyListeners("didUpdate",{layout:a,snapshot:i,delta:f,layoutDelta:c,hasLayoutChanged:d,hasRelativeTargetChanged:v})}else t.isLead()&&(null===(r=(n=t.options).onExitComplete)||void 0===r||r.call(n));t.options.transition=void 0}function ba(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function Sa(t){t.clearSnapshot()}function Ea(t){t.clearMeasurements()}function ka(t){var e=t.options.visualElement;(null==e?void 0:e.getProps().onBeforeLayoutMeasure)&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function wa(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function Ca(t){t.resolveTargetDelta()}function Pa(t){t.calcProjection()}function Aa(t){t.resetRotation()}function Ta(t){t.removeLeadSnapshot()}function ja(t,e,n){t.translate=sr(e.translate,0,n),t.scale=sr(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Va(t,e,n,r){t.min=sr(e.min,n.min,r),t.max=sr(e.max,n.max,r)}function Ma(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}var Ra={duration:.45,ease:[.4,0,.1,1]};function La(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 i=(n&&n!==t.root?n.instance:document).querySelector('[data-projection-id="'.concat(e,'"]'));i&&t.mount(i,!0)}function Da(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function Ba(t,e,n){return"position"===t||"preserve-aspect"===t&&!ji(ca(e),ca(n),.2)}var Oa=ya({attachResizeListener:function(t,e){return je(t,"resize",e)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),Fa={current:void 0},Ia=ya({measureScroll:function(t){return{x:t.scrollLeft,y:t.scrollTop}},defaultParent:function(){if(!Fa.current){var t=new Oa(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Fa.current=t}return Fa.current},resetTransform:function(t,e){t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:function(t){return Boolean("fixed"===window.getComputedStyle(t).position)}}),Ua=t.objectSpread2(t.objectSpread2(t.objectSpread2(t.objectSpread2({},gi),fn),uo),Yo),Wa=tt((function(t,e){return Te(t,e,Ua,Io,Ia)})),Na=tt(Te);function za(){var t=n.useRef(!1);return R((function(){return t.current=!0,function(){t.current=!1}}),[]),t}function Ha(){var e=za(),r=n.useState(0),i=t.slicedToArray(r,2),o=i[0],a=i[1],s=n.useCallback((function(){e.current&&a(o+1)}),[o]);return[n.useCallback((function(){return Jn.postRender(s)}),[s]),o]}var Ya=function(e){t.inherits(r,e);var n=t.createSuper(r);function r(){return t.classCallCheck(this,r),n.apply(this,arguments)}return t.createClass(r,[{key:"getSnapshotBeforeUpdate",value:function(t){var e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){var n=this.props.sizeRef.current;n.height=e.offsetHeight||0,n.width=e.offsetWidth||0,n.top=e.offsetTop,n.left=e.offsetLeft}return null}},{key:"componentDidUpdate",value:function(){}},{key:"render",value:function(){return this.props.children}}]),r}(s.Component);function Xa(t){var e=t.children,r=t.isPresent,i=n.useId(),o=n.useRef(null),a=n.useRef({width:0,height:0,top:0,left:0});return n.useInsertionEffect((function(){var t=a.current,e=t.width,n=t.height,s=t.top,u=t.left;if(!r&&o.current&&e&&n){o.current.dataset.motionPopId=i;var l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule('\n [data-motion-pop-id="'.concat(i,'"] {\n position: absolute !important;\n width: ').concat(e,"px !important;\n height: ").concat(n,"px !important;\n top: ").concat(s,"px !important;\n left: ").concat(u,"px !important;\n }\n ")),function(){document.head.removeChild(l)}}}),[r]),s.createElement(Ya,{isPresent:r,childRef:o,sizeRef:a},s.cloneElement(e,{ref:o}))}var Ga=function(e){var r=e.children,i=e.initial,o=e.isPresent,a=e.onExitComplete,u=e.custom,l=e.presenceAffectsLayout,c=e.mode,f=X(qa),d=n.useId(),v=n.useMemo((function(){return{id:d,initial:i,isPresent:o,custom:u,onExitComplete:function(e){f.set(e,!0);var n,r=t.createForOfIteratorHelper(f.values());try{for(r.s();!(n=r.n()).done;)if(!n.value)return}catch(t){r.e(t)}finally{r.f()}a&&a()},register:function(t){return f.set(t,!1),function(){return f.delete(t)}}}}),l?void 0:[o]);return n.useMemo((function(){f.forEach((function(t,e){return f.set(e,!1)}))}),[o]),s.useEffect((function(){!o&&!f.size&&a&&a()}),[o]),"popLayout"===c&&(r=s.createElement(Xa,{isPresent:o},r)),s.createElement(V.Provider,{value:v},r)};function qa(){return new Map}var Za=function(t){return t.key||""},_a=n.createContext(null),$a=function(t){return!t.isLayoutDirty&&t.willUpdate(!1)};function Ka(){var t=new Set,e=new WeakMap,n=function(){return t.forEach($a)};return{add:function(r){t.add(r),e.set(r,r.addEventListener("willUpdate",n))},remove:function(r){var i;t.delete(r),null===(i=e.get(r))||void 0===i||i(),e.delete(r),n()},dirty:n}}var Ja=function(t){return!0===t},Qa=function(e){var r=e.children,i=e.id,o=e.inheritId,a=e.inherit,u=void 0===a||a;void 0!==o&&(u=o);var l=n.useContext(Z),c=n.useContext(_a),f=Ha(),d=t.slicedToArray(f,2),v=d[0],h=d[1],p=n.useRef(null),m=l.id||c;null===p.current&&(function(t){return Ja(!0===t)||"id"===t}(u)&&m&&(i=i?m+"-"+i:m),p.current={id:i,group:Ja(u)&&l.group||Ka()});var y=n.useMemo((function(){return t.objectSpread2(t.objectSpread2({},p.current),{},{forceRender:v})}),[h]);return s.createElement(Z.Provider,{value:y},r)},ts=0;function es(t){return"function"==typeof t}var ns=n.createContext(null),rs=n.forwardRef((function(e,r){var i=e.children,o=e.as,a=void 0===o?"ul":o,u=e.axis,l=void 0===u?"y":u,c=e.onReorder,f=e.values,d=t.objectWithoutProperties(e,b),v=X((function(){return Wa(a)})),h=[],p=n.useRef(!1),m={axis:l,registerItem:function(t,e){e&&-1===h.findIndex((function(e){return t===e.value}))&&(h.push({value:t,layout:e[l]}),h.sort(os))},updateOrder:function(e,n,r){if(!p.current){var i=function(e,n,r,i){if(!i)return e;var o=e.findIndex((function(t){return t.value===n}));if(-1===o)return e;var a=i>0?1:-1,s=e[o+a];if(!s)return e;var u=e[o],l=s.layout,c=sr(l.min,l.max,.5);return 1===a&&u.layout.max+r>c||-1===a&&u.layout.min+r<c?function(e,n,r){var i=t.toArray(e).slice(0),o=n<0?i.length+n:n;if(o>=0&&o<i.length){var a=r<0?i.length+r:r,s=i.splice(n,1),u=t.slicedToArray(s,1)[0];i.splice(a,0,u)}return i}(e,o,o+a):e}(h,e,n,r);h!==i&&(p.current=!0,c(i.map(is).filter((function(t){return-1!==f.indexOf(t)}))))}}};return n.useEffect((function(){p.current=!1})),s.createElement(v,t.objectSpread2(t.objectSpread2({},d),{},{ref:r}),s.createElement(ns.Provider,{value:m},i))}));function is(t){return t.value}function os(t,e){return t.layout.min-e.layout.min}function as(e){var r=X((function(){return qr(e)}));if(n.useContext(A).isStatic){var i=n.useState(e),o=t.slicedToArray(i,2)[1];n.useEffect((function(){return r.onChange(o)}),[])}return r}function ss(){var e,n=!Array.isArray(arguments.length<=0?void 0:arguments[0]),r=n?0:-1,i=0+r<0||arguments.length<=0+r?void 0:arguments[0+r],o=2+r<0||arguments.length<=2+r?void 0:arguments[2+r],a=3+r<0||arguments.length<=3+r?void 0:arguments[3+r],s=Sr(1+r<0||arguments.length<=1+r?void 0:arguments[1+r],o,t.objectSpread2({mixer:(e=o[0],function(e){return"object"==t.typeof(e)&&e.mix}(e)?e.mix:void 0)},a));return n?s(i):s}function us(t,e){var n=as(e()),r=function(){return n.set(e())};return r(),function(t,e,n){R((function(){var r=t.map((function(t){return t.onChange(e)}));return function(){r.forEach((function(t){return t()})),n()}}))}(t,(function(){return Jn.update(r,!1,!0)}),(function(){return Qn.update(r)})),n}function ls(e,n,r,i){var o="function"==typeof n?n:ss(n,r,i);return Array.isArray(e)?cs(e,o):cs([e],(function(e){var n=t.slicedToArray(e,1)[0];return o(n)}))}function cs(t,e){var n=X((function(){return[]}));return us(t,(function(){n.length=0;for(var r=t.length,i=0;i<r;i++)n[i]=t[i].get();return e(n)}))}function fs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return ut(t)?t:as(e)}var ds={Group:rs,Item:n.forwardRef((function(e,r){var i=e.children,o=e.style,a=void 0===o?{}:o,u=e.value,l=e.as,c=void 0===l?"li":l,f=e.onDrag,d=e.layout,v=void 0===d||d,h=t.objectWithoutProperties(e,S),p=X((function(){return Wa(c)})),m=n.useContext(ns),y={x:fs(a.x),y:fs(a.y)},g=ls([y.x,y.y],(function(e){var n=t.slicedToArray(e,2),r=n[0],i=n[1];return r||i?1:"unset"})),x=n.useRef(null),b=m.axis,E=m.registerItem,k=m.updateOrder;return n.useEffect((function(){E(u,x.current)}),[m]),s.createElement(p,t.objectSpread2(t.objectSpread2({drag:b},h),{},{dragSnapToOrigin:!0,style:t.objectSpread2(t.objectSpread2({},a),{},{x:y.x,y:y.y,zIndex:g}),layout:v,onDrag:function(t,e){var n=e.velocity;n[b]&&k(u,y[b].get(),n[b]),f&&f(t,e)},onLayoutMeasure:function(t){x.current=t},ref:r}),i)}))},vs=t.objectSpread2(t.objectSpread2({renderer:Io},gi),fn),hs=t.objectSpread2(t.objectSpread2(t.objectSpread2(t.objectSpread2({},vs),uo),Yo),{},{projectionNodeConstructor:Ia}),ps=function(t){return"number"==typeof t};function ms(t,e){return function(t){return Array.isArray(t)&&!ps(t[0])}(t)?t[function(t,e,n){var r=e-t;return((n-t)%r+r)%r+t}(0,t.length,e)]:t}var ys=function(t,e,n){return-n*t+n*e+t},gs=function(t){return t},xs=function(t,e,n){return e-t==0?1:(n-t)/(e-t)};function bs(t,e){for(var n=t[t.length-1],r=1;r<=e;r++){var i=xs(0,e,r);t.push(ys(n,1,i))}}function Ss(t){var e=[0];return bs(e,t-1),e}function Es(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ss(t.length),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:gs,r=t.length,i=r-e.length;return i>0&&bs(e,i),function(i){for(var o=0;o<r-2&&!(i<e[o+1]);o++);var a,s,u,l=(a=0,s=1,u=xs(e[o],e[o+1],i),Math.min(Math.max(u,a),s));return l=ms(n,o)(l),ys(t[o],t[o+1],l)}}var ks=function(t){return"function"==typeof t},ws=function(t){return"string"==typeof t};function Cs(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}var Ps,As={any:0,all:1},Ts=new WeakMap;function js(t){var e,n=t.target,r=t.contentRect,i=t.borderBoxSize;null===(e=Ts.get(n))||void 0===e||e.forEach((function(t){t({target:n,contentSize:r,get size(){return function(t,e){if(e){var n=e[0];return{width:n.inlineSize,height:n.blockSize}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(n,i)}})}))}function Vs(t){t.forEach(js)}function Ms(t,e){Ps||"undefined"!=typeof ResizeObserver&&(Ps=new ResizeObserver(Vs));var n=Cs(t);return n.forEach((function(t){var n=Ts.get(t);n||(n=new Set,Ts.set(t,n)),n.add(e),null==Ps||Ps.observe(t)})),function(){n.forEach((function(t){var n=Ts.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Ps||Ps.unobserve(t)}))}}var Rs,Ls=new Set;function Ds(t){return Ls.add(t),Rs||(Rs=function(){var t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Ls.forEach((function(t){return t(e)}))},window.addEventListener("resize",Rs)),function(){Ls.delete(t),!Ls.size&&Rs&&(Rs=void 0)}}var Bs={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Os(t,e,n,r){var i=n[e],o=Bs[e],a=o.length,s=o.position,u=i.current,l=n.time;i.current=t["scroll"+s],i.scrollLength=t["scroll"+a]-t["client"+a],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=xs(0,i.scrollLength,i.current);var c,f,d=r-l;i.velocity=d>50?0:(c=i.current-u,(f=d)?c*(1e3/f):0)}var Fs={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Is={start:0,center:.5,end:1};function Us(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0;if(void 0!==Is[t]&&(t=Is[t]),ws(t)){var i=parseFloat(t);t.endsWith("px")?r=i:t.endsWith("%")?t=i/100:t.endsWith("vw")?r=i/100*document.documentElement.clientWidth:t.endsWith("vh")?r=i/100*document.documentElement.clientHeight:t=i}return ps(t)&&(r=e*t),n+r}var Ws=[0,0];function Ns(t,e,n,r){var i=Array.isArray(t)?t:Ws;return ps(t)?i=[t,t]:ws(t)&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,Is[t]?t:"0"]),Us(i[0],n,r)-Us(i[1],e)}var zs={x:0,y:0};function Hs(e,n,r){var i=r.offset,o=void 0===i?Fs.All:i,a=r.target,s=void 0===a?e:a,u=r.axis,l=void 0===u?"y":u,c="y"===l?"height":"width",f=s!==e?function(t,e){for(var n={x:0,y:0},r=t;r&&r!==e;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r instanceof SVGGraphicsElement&&"getBBox"in r){var i=r.getBBox(),o=i.top,a=i.left;for(n.x+=a,n.y+=o;r&&"svg"!==r.tagName;)r=r.parentNode}return n}(s,e):zs,d=s===e?{width:e.scrollWidth,height:e.scrollHeight}:{width:s.clientWidth,height:s.clientHeight},v={width:e.clientWidth,height:e.clientHeight};n[l].offset.length=0;for(var h=!n[l].interpolate,p=o.length,m=0;m<p;m++){var y=Ns(o[m],v[c],d[c],f[l]);h||y===n[l].interpolatorOffsets[m]||(h=!0),n[l].offset[m]=y}h&&(n[l].interpolate=Es(Ss(p),n[l].offset),n[l].interpolatorOffsets=t.toConsumableArray(n[l].offset)),n[l].progress=n[l].interpolate(n[l].current)}function Ys(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.axis||"y";return{measure:function(){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=arguments.length>2?arguments[2]:void 0;if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t)for(var r=e;r&&r!=t;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent;n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,r.target,n)},update:function(e){!function(t,e,n){Os(t,"x",e,n),Os(t,"y",e,n),e.time=n}(t,n,e),(r.offset||r.target)&&Hs(t,n,r)},notify:ks(e)?function(){return e(n)}:Xs(e,n[i])}}function Xs(t,e){return t.pause(),t.forEachNative((function(t,e){var n,r,i=e.easing;if(t.updateDuration)i||(t.easing=gs),t.updateDuration(1);else{var o={duration:1e3};i||(o.easing="linear"),null===(r=null===(n=t.effect)||void 0===n?void 0:n.updateTiming)||void 0===r||r.call(n,o)}})),function(){t.currentTime=e.progress}}var Gs=new WeakMap,qs=new WeakMap,Zs=new WeakMap,_s=function(t){return t===document.documentElement?window:t};function $s(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.container,i=void 0===r?document.documentElement:r,o=function(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 i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(n,["container"]),a=Zs.get(i);a||(a=new Set,Zs.set(i,a));var s,u,l=Ys(i,e,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},o);if(a.add(l),!Gs.has(i)){var c=function(){var e,n=performance.now(),r=t.createForOfIteratorHelper(a);try{for(r.s();!(e=r.n()).done;)e.value.measure()}catch(t){r.e(t)}finally{r.f()}var i,o=t.createForOfIteratorHelper(a);try{for(o.s();!(i=o.n()).done;)i.value.update(n)}catch(t){o.e(t)}finally{o.f()}var s,u=t.createForOfIteratorHelper(a);try{for(u.s();!(s=u.n()).done;)s.value.notify()}catch(t){u.e(t)}finally{u.f()}};Gs.set(i,c);var f=_s(i);window.addEventListener("resize",c,{passive:!0}),i!==document.documentElement&&qs.set(i,(u=c,ks(s=i)?Ds(s):Ms(s,u))),f.addEventListener("scroll",c,{passive:!0})}var d=Gs.get(i),v=requestAnimationFrame(d);return function(){var t;"function"!=typeof e&&e.stop(),cancelAnimationFrame(v);var n=Zs.get(i);if(n&&(n.delete(l),!n.size)){var r=Gs.get(i);Gs.delete(i),r&&(_s(i).removeEventListener("scroll",r),null===(t=qs.get(i))||void 0===t||t(),window.removeEventListener("resize",r))}}}var Ks=function(){return{scrollX:qr(0),scrollY:qr(0),scrollXProgress:qr(0),scrollYProgress:qr(0)}};function Js(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.container,i=e.target,o=e.layoutEffect,a=void 0===o||o,s=t.objectWithoutProperties(e,E),u=X(Ks);return(a?R:n.useEffect)((function(){return $s((function(t){var e=t.x,n=t.y;u.scrollX.set(e.current),u.scrollXProgress.set(e.progress),u.scrollY.set(n.current),u.scrollYProgress.set(n.progress)}),t.objectSpread2(t.objectSpread2({},s),{},{container:(null==r?void 0:r.current)||void 0,target:(null==i?void 0:i.current)||void 0}))}),[]),u}function Qs(t){var e=n.useRef(0),r=n.useContext(A).isStatic;n.useEffect((function(){if(!r){var n=function(n){var r=n.timestamp,i=n.delta;e.current||(e.current=r),t(r-e.current,i)};return Jn.update(n,!0),function(){return Qn.update(n)}}}),[t])}var tu=function(e){t.inherits(r,e);var n=t.createSuper(r);function r(){var e;return t.classCallCheck(this,r),(e=n.apply(this,arguments)).members=[],e.transforms=new Set,e}return t.createClass(r,[{key:"add",value:function(t){var e;at.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||dt(t)||"willChange"===t||(e=ve(t)),e&&(Hr(this.members,e),this.update())}},{key:"remove",value:function(t){at.has(t)?(this.transforms.delete(t),this.transforms.size||Yr(this.members,"transform")):Yr(this.members,ve(t)),this.update()}},{key:"update",value:function(){this.set(this.members.length?this.members.join(", "):"auto")}}]),r}(Gr);function eu(){!Ao.current&&To();var e=n.useState(Po.current);return t.slicedToArray(e,1)[0]}function nu(){var e=!1,n=[],r=new Set,i={subscribe:function(t){return r.add(t),function(){r.delete(t)}},start:function(t,i){if(e){var o=[];return r.forEach((function(e){o.push(si(e,t,{transitionOverride:i}))})),Promise.all(o)}return new Promise((function(e){n.push({animation:[t,i],resolve:e})}))},set:function(t){return r.forEach((function(e){!function(t,e){Array.isArray(e)?ni(t,e):"string"==typeof e?ni(t,[e]):ei(t,e)}(e,t)}))},stop:function(){r.forEach((function(t){!function(t){t.values.forEach((function(t){return t.stop()}))}(t)}))},mount:function(){return e=!0,n.forEach((function(e){var n=e.animation,r=e.resolve;i.start.apply(i,t.toConsumableArray(n)).then(r)})),function(){e=!1,i.stop()}}};return i}function ru(){var t=X(nu);return n.useEffect(t.mount,[]),t}var iu=ru,ou=function(t,e,n){var r=e-t;return((n-t)%r+r)%r+t},au=function(){function e(){t.classCallCheck(this,e),this.componentControls=new Set}return t.createClass(e,[{key:"subscribe",value:function(t){var e=this;return this.componentControls.add(t),function(){return e.componentControls.delete(t)}}},{key:"start",value:function(t,e){this.componentControls.forEach((function(n){n.start(t.nativeEvent||t,e)}))}}]),e}(),su=function(){return new au};function uu(e){return null!==e&&"object"==t.typeof(e)&&K in e}function lu(){return cu}function cu(t){Fa.current&&(Fa.current.isUpdating=!1,Fa.current.blockUpdate(),t&&t())}var fu=function(){return{}},du=function(e){t.inherits(r,e);var n=t.createSuper(r);function r(){return t.classCallCheck(this,r),n.apply(this,arguments)}return t.createClass(r,[{key:"build",value:function(){}},{key:"measureInstanceViewportBox",value:function(){return{x:{min:0,max:0},y:{min:0,max:0}}}},{key:"resetTransform",value:function(){}},{key:"restoreTransform",value:function(){}},{key:"removeValueFromRenderState",value:function(){}},{key:"renderInstance",value:function(){}},{key:"scrapeMotionValuesFromProps",value:function(){return{}}},{key:"getBaseTargetFromProps",value:function(){}},{key:"readValueFromInstance",value:function(t,e,n){return n.initialState[e]||0}},{key:"sortInstanceNodePosition",value:function(){return 0}},{key:"makeTargetAnimatableFromInstance",value:function(e){var n=e.transition,r=e.transitionEnd,i=t.objectWithoutProperties(e,k);return ri(this,i,oi(i,n||{},this)),t.objectSpread2({transition:n,transitionEnd:r},i)}}]),r}(Ro),vu=ke({scrapeMotionValuesFromProps:fu,createRenderState:fu}),hu=function(t){return t>.001?1/t:1e5};e.AnimatePresence=function(e){var r=e.children,i=e.custom,o=e.initial,a=void 0===o||o,u=e.onExitComplete,l=e.exitBeforeEnter,c=e.presenceAffectsLayout,f=void 0===c||c,d=e.mode,v=void 0===d?"sync":d;l&&(v="wait",tn(!1,"Replace exitBeforeEnter with mode='wait'"));var h=Ha(),p=t.slicedToArray(h,1)[0],m=n.useContext(Z).forceRender;m&&(p=m);var y=za(),g=function(t){var e=[];return n.Children.forEach(t,(function(t){n.isValidElement(t)&&e.push(t)})),e}(r),x=g,b=new Set,S=n.useRef(x),E=n.useRef(new Map).current,k=n.useRef(!0);if(R((function(){k.current=!1,function(t,e){t.forEach((function(t){var n=Za(t);e.set(n,t)}))}(g,E),S.current=x})),$e((function(){k.current=!0,E.clear(),b.clear()})),k.current)return s.createElement(s.Fragment,null,x.map((function(t){return s.createElement(Ga,{key:Za(t),isPresent:!0,initial:!!a&&void 0,presenceAffectsLayout:f,mode:v},t)})));x=t.toConsumableArray(x);for(var w=S.current.map(Za),C=g.map(Za),P=w.length,A=0;A<P;A++){var T=w[A];-1===C.indexOf(T)&&b.add(T)}return"wait"===v&&b.size&&(x=[]),b.forEach((function(t){if(-1===C.indexOf(t)){var e=E.get(t);if(e){var n=w.indexOf(t);x.splice(n,0,s.createElement(Ga,{key:Za(e),isPresent:!1,onExitComplete:function(){E.delete(t),b.delete(t);var e=S.current.findIndex((function(e){return e.key===t}));if(S.current.splice(e,1),!b.size){if(S.current=g,!1===y.current)return;p(),u&&u()}},custom:i,presenceAffectsLayout:f,mode:v},e))}}})),x=x.map((function(t){var e=t.key;return b.has(e)?t:s.createElement(Ga,{key:Za(t),isPresent:!0,presenceAffectsLayout:f,mode:v},t)})),s.createElement(s.Fragment,null,b.size?x:x.map((function(t){return n.cloneElement(t)})))},e.AnimateSharedLayout=function(t){var e=t.children;return s.useEffect((function(){}),[]),s.createElement(Qa,{id:X((function(){return"asl-"+ts++}))},e)},e.DeprecatedLayoutGroupContext=_a,e.DragControls=au,e.FlatTree=ha,e.LayoutGroup=Qa,e.LayoutGroupContext=Z,e.LazyMotion=function(e){var r=e.children,i=e.features,o=e.strict,a=void 0!==o&&o,u=n.useState(!es(i)),l=t.slicedToArray(u,2)[1],c=n.useRef(void 0);if(!es(i)){var f=i.renderer,d=t.objectWithoutProperties(i,w);c.current=f,Y(d)}return n.useEffect((function(){es(i)&&i().then((function(e){var n=e.renderer;Y(t.objectWithoutProperties(e,C)),c.current=n,l(!0)}))}),[]),s.createElement(L.Provider,{value:{renderer:c.current,strict:a}},r)},e.MotionConfig=function(e){var r=e.children,i=e.isValidProp,o=t.objectWithoutProperties(e,P);i&&re(i),(o=t.objectSpread2(t.objectSpread2({},n.useContext(A)),o)).isStatic=X((function(){return o.isStatic}));var a=n.useMemo((function(){return o}),[JSON.stringify(o.transition),o.transformPagePoint,o.reducedMotion]);return s.createElement(A.Provider,{value:a},r)},e.MotionConfigContext=A,e.MotionContext=T,e.MotionValue=Gr,e.PresenceContext=V,e.Reorder=ds,e.SwitchLayoutGroupContext=$,e.VisualElement=Ro,e.addPointerEvent=Ne,e.addScaleCorrector=it,e.animate=Xo,e.animateVisualElement=si,e.animationControls=nu,e.animations=gi,e.buildTransform=ft,e.calcLength=Ti,e.checkTargetForNewValues=ri,e.clamp=ar,e.createBox=Wi,e.createDomMotionComponent=function(t){return J(Te(t,{forwardMotionProps:!1},Ua,Io,Ia))},e.createMotionComponent=J,e.delay=or,e.distance=xi,e.distance2D=bi,e.domAnimation=vs,e.domMax=hs,e.filterProps=ie,e.isBrowser=M,e.isDragActive=qe,e.isMotionComponent=uu,e.isMotionValue=ut,e.isValidMotionProp=ee,e.m=Na,e.makeUseVisualState=ke,e.mix=sr,e.motion=Wa,e.motionValue=qr,e.pipe=Je,e.resolveMotionValue=Ee,e.transform=ss,e.unwrapMotionComponent=function(t){if(uu(t))return t[K]},e.useAnimation=iu,e.useAnimationControls=ru,e.useAnimationFrame=Qs,e.useCycle=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var o=n.useRef(0),a=n.useState(r[o.current]),s=t.slicedToArray(a,2),u=s[0],l=s[1];return[u,n.useCallback((function(t){o.current="number"!=typeof t?ou(0,r.length,o.current+1):t,l(r[o.current])}),[r.length].concat(r))]},e.useDeprecatedAnimatedState=function(e){var r=n.useState(e),i=t.slicedToArray(r,2),o=i[0],a=i[1],s=vu({},!1),u=X((function(){return new du({props:{},visualState:s},{initialState:e})}));return n.useEffect((function(){return u.mount({}),function(){return u.unmount()}}),[u]),n.useEffect((function(){u.setProps({onUpdate:function(e){a(t.objectSpread2({},e))}})}),[a,u]),[o,X((function(){return function(t){return si(u,t)}}))]},e.useDeprecatedInvertedScale=function(t){var e=as(1),n=as(1),r=j();return t?(e=t.scaleX||e,n=t.scaleY||n):r&&(e=r.getValue("scaleX",1),n=r.getValue("scaleY",1)),{scaleX:ls(e,hu),scaleY:ls(n,hu)}},e.useDomEvent=Ve,e.useDragControls=function(){return X(su)},e.useElementScroll=function(t){return tn(!1,"useElementScroll is deprecated. Convert to useScroll({ container: ref })."),Js({container:t})},e.useForceUpdate=Ha,e.useInView=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.root,o=r.margin,a=r.amount,s=r.once,u=void 0!==s&&s,l=n.useState(!1),c=t.slicedToArray(l,2),f=c[0],d=c[1];return n.useEffect((function(){if(!(!e.current||u&&f)){var t={root:i&&i.current||void 0,margin:o,amount:"some"===a?"any":a};return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.root,i=n.margin,o=n.amount,a=void 0===o?"any":o;if("undefined"==typeof IntersectionObserver)return function(){};var s=Cs(t),u=new WeakMap,l=new IntersectionObserver((function(t){t.forEach((function(t){var n=u.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){var r=e(t);ks(r)?u.set(t.target,r):l.unobserve(t.target)}else n&&(n(t),u.delete(t.target))}))}),{root:r,rootMargin:i,threshold:"number"==typeof a?a:As[a]});return s.forEach((function(t){return l.observe(t)})),function(){return l.disconnect()}}(e.current,(function(){return d(!0),u?void 0:function(){return d(!1)}}),t)}}),[i,e,o,u]),f},e.useInstantLayoutTransition=lu,e.useInstantTransition=function(){var e=Ha(),r=t.slicedToArray(e,2),i=r[0],o=r[1],a=lu();return n.useEffect((function(){Jn.postRender((function(){return Jn.postRender((function(){return Hn.current=!1}))}))}),[o]),function(t){a((function(){Hn.current=!0,i(),t()}))}},e.useIsPresent=function(){return null===(t=n.useContext(V))||t.isPresent;var t},e.useIsomorphicLayoutEffect=R,e.useMotionTemplate=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=t.length;return us(n,(function(){for(var e="",r=0;r<i;r++)e+=t[r],n[r]&&(e+=n[r].get());return e}))},e.useMotionValue=as,e.usePresence=dn,e.useReducedMotion=eu,e.useReducedMotionConfig=function(){var t=eu(),e=n.useContext(A).reducedMotion;return"never"!==e&&("always"===e||t)},e.useResetProjection=function(){return s.useCallback((function(){var t=Fa.current;t&&t.resetTree()}),[])},e.useScroll=Js,e.useSpring=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.useContext(A).isStatic,o=n.useRef(null),a=as(ut(e)?e.get():e);return n.useMemo((function(){return a.attach((function(e,n){return i?n(e):(o.current&&o.current.stop(),o.current=Lr(t.objectSpread2(t.objectSpread2({from:a.get(),to:e,velocity:a.getVelocity()},r),{},{onUpdate:n})),a.get())}))}),[JSON.stringify(r)]),function(t,e){R((function(){if(ut(t))return e(t.get()),t.onChange(e)}),[t,e])}(e,(function(t){return a.set(parseFloat(t))})),a},e.useTime=function(){var t=as(0);return Qs((function(e){return t.set(e)})),t},e.useTransform=ls,e.useUnmountEffect=$e,e.useVelocity=function(t){var e=as(t.getVelocity());return n.useEffect((function(){return t.velocityUpdateSubscribers.add((function(t){e.set(t)}))}),[t]),e},e.useViewportScroll=function(){return tn(!1,"useViewportScroll is deprecated. Convert to useScroll()."),Js()},e.useVisualElementContext=j,e.useWillChange=function(){return X((function(){return new tu("auto")}))},e.wrap=ou,e.wrapHandler=Fe,Object.defineProperty(e,"__esModule",{value:!0})}(a,s.default);
|
|
1
|
+
"use strict";var t=require("../../../_virtual/_commonjsHelpers.js"),e=require("../../../_virtual/framer-motion.js"),n=require("react"),o=require("../../../_virtual/is-prop-valid.browser.esm.js");function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r,s=i(n);e.framerMotion,r=e.framerMotion.exports,t.commonjsGlobal,function(t,e){function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var r=n(e),s=i(e);const a=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),l=e.createContext({});function u(){return e.useContext(l).visualElement}const c=e.createContext(null),h="undefined"!=typeof document,d=h?e.useLayoutEffect:e.useEffect,p=e.createContext({strict:!1});function f(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function m(t){return"string"==typeof t||Array.isArray(t)}function g(t){return"object"==typeof t&&"function"==typeof t.start}const v=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function y(t){return g(t.animate)||v.some((e=>m(t[e])))}function x(t){return Boolean(y(t)||t.variants)}function E(t){const{initial:n,animate:o}=function(t,e){if(y(t)){const{initial:e,animate:n}=t;return{initial:!1===e||m(e)?e:void 0,animate:m(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(l));return e.useMemo((()=>({initial:n,animate:o})),[b(n),b(o)])}function b(t){return Array.isArray(t)?t.join(" "):t}const w=t=>({isEnabled:e=>t.some((t=>!!e[t]))}),P={measureLayout:w(["layout","layoutId","drag"]),animation:w(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:w(["exit"]),drag:w(["drag","dragControls"]),focus:w(["whileFocus"]),hover:w(["whileHover","onHoverStart","onHoverEnd"]),tap:w(["whileTap","onTap","onTapStart","onTapCancel"]),pan:w(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:w(["whileInView","onViewportEnter","onViewportLeave"])};function S(t){for(const e in t)"projectionNodeConstructor"===e?P.projectionNodeConstructor=t[e]:P[e].Component=t[e]}function T(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const A={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let V=1;const C=e.createContext({});class M extends r.default.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:e}=this.props;return t&&t.setProps(e),null}componentDidUpdate(){}render(){return this.props.children}}const R=e.createContext({}),L=Symbol.for("motionComponentSymbol");function D(t){let{preloadedFeatures:n,createVisualElement:o,projectionNodeConstructor:i,useRender:r,useVisualState:m,Component:g}=t;n&&S(n);const v=e.forwardRef((function(t,v){const y={...e.useContext(a),...t,layoutId:k(t)},{isStatic:x}=y;let b=null;const w=E(t),S=x?void 0:T((()=>{if(A.hasEverUpdated)return V++})),C=m(t,x);if(!x&&h){w.visualElement=function(t,n,o,i){const r=u(),s=e.useContext(p),l=e.useContext(c),h=e.useContext(a).reducedMotion,f=e.useRef();i=i||s.renderer,!f.current&&i&&(f.current=i(t,{visualState:n,parent:r,props:o,presenceId:l?l.id:void 0,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:h}));const m=f.current;return d((()=>{m&&m.render()})),e.useEffect((()=>{m&&m.animationState&&m.animationState.animateChanges()})),d((()=>()=>m&&m.notify("Unmount")),[]),m}(g,C,y,o);const t=e.useContext(p).strict,r=e.useContext(R);w.visualElement&&(b=w.visualElement.loadFeatures(y,t,n,S,i||P.projectionNodeConstructor,r))}return s.createElement(M,{visualElement:w.visualElement,props:y},b,s.createElement(l.Provider,{value:w},r(g,t,S,function(t,n,o){return e.useCallback((e=>{e&&t.mount&&t.mount(e),n&&(e?n.mount(e):n.unmount()),o&&("function"==typeof o?o(e):f(o)&&(o.current=e))}),[n])}(C,w.visualElement,v),C,x,w.visualElement)))}));return v[L]=g,v}function k(t){let{layoutId:n}=t;const o=e.useContext(C).id;return o&&void 0!==n?o+"-"+n:n}function B(t){function e(e){return D(t(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,o)=>(n.has(o)||n.set(o,e(o)),n.get(o))})}const j=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function O(t){return"string"==typeof t&&!t.includes("-")&&!!(j.indexOf(t)>-1||/[A-Z]/.test(t))}const F={};function I(t){Object.assign(F,t)}const U=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],N=new Set(U);function z(t,e){let{layout:n,layoutId:o}=e;return N.has(t)||t.startsWith("origin")||(n||void 0!==o)&&(!!F[t]||"opacity"===t)}const W=t=>!!(null==t?void 0:t.getVelocity),H={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$=(t,e)=>U.indexOf(t)-U.indexOf(e);function Y(t,e,n,o){let{transform:i,transformKeys:r}=t,{enableHardwareAcceleration:s=!0,allowTransformNone:a=!0}=e,l="";r.sort($);for(const t of r)l+=`${H[t]||t}(${i[t]}) `;return s&&!i.z&&(l+="translateZ(0)"),l=l.trim(),o?l=o(i,n?"":l):a&&n&&(l="none"),l}function X(t){return t.startsWith("--")}const G=(t,e)=>e&&"number"==typeof t?e.transform(t):t,q=(t,e)=>n=>Math.max(Math.min(n,e),t),Z=t=>t%1?Number(t.toFixed(5)):t,_=/(-)?([\d]*\.?[\d])+/g,K=/(#[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}),ot=t=>({test:e=>Q(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),it=ot("deg"),rt=ot("%"),st=ot("px"),at=ot("vh"),lt=ot("vw"),ut=Object.assign(Object.assign({},rt),{parse:t=>rt.parse(t)/100,transform:t=>rt.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)=>o=>{if(!Q(o))return o;const[i,r,s,a]=o.match(_);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},dt={test:ct("hsl","hue"),parse:ht("hue","saturation","lightness"),transform:t=>{let{hue:e,saturation:n,lightness:o,alpha:i=1}=t;return"hsla("+Math.round(e)+", "+rt.transform(Z(n))+", "+rt.transform(Z(o))+", "+Z(et.transform(i))+")"}},pt=q(0,255),ft=Object.assign(Object.assign({},tt),{transform:t=>Math.round(pt(t))}),mt={test:ct("rgb","red"),parse:ht("red","green","blue"),transform:t=>{let{red:e,green:n,blue:o,alpha:i=1}=t;return"rgba("+ft.transform(e)+", "+ft.transform(n)+", "+ft.transform(o)+", "+Z(et.transform(i))+")"}},gt={test:ct("#"),parse:function(t){let e="",n="",o="",i="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),o=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),o=t.substr(3,1),i=t.substr(4,1),e+=e,n+=n,o+=o,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:i?parseInt(i,16)/255:1}},transform:mt.transform},vt={test:t=>mt.test(t)||gt.test(t)||dt.test(t),parse:t=>mt.test(t)?mt.parse(t):dt.test(t)?dt.parse(t):gt.parse(t),transform:t=>Q(t)?t:t.hasOwnProperty("red")?mt.transform(t):dt.transform(t)};function yt(t){"number"==typeof t&&(t=""+t);const e=[];let n=0;const o=t.match(K);o&&(n=o.length,t=t.replace(K,"${c}"),e.push(...o.map(vt.parse)));const i=t.match(_);return i&&(t=t.replace(_,"${n}"),e.push(...i.map(tt.parse))),{values:e,numColors:n,tokenised:t}}function xt(t){return yt(t).values}function Et(t){const{values:e,numColors:n,tokenised:o}=yt(t),i=e.length;return t=>{let e=o;for(let o=0;o<i;o++)e=e.replace(o<n?"${c}":"${n}",o<n?vt.transform(t[o]):Z(t[o]));return e}}const bt=t=>"number"==typeof t?0:t,wt={test:function(t){var e,n,o,i;return isNaN(t)&&Q(t)&&(null!==(n=null===(e=t.match(_))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(i=null===(o=t.match(K))||void 0===o?void 0:o.length)&&void 0!==i?i:0)>0},parse:xt,createTransformer:Et,getAnimatableNone:function(t){const e=xt(t);return Et(t)(e.map(bt))}},Pt=new Set(["brightness","contrast","saturate","opacity"]);function St(t){let[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[o]=n.match(_)||[];if(!o)return t;const i=n.replace(o,"");let r=Pt.has(e)?1:0;return o!==n&&(r*=100),e+"("+r+i+")"}const Tt=/([a-z-]*)\(.*?\)/g,At=Object.assign(Object.assign({},wt),{getAnimatableNone:t=>{const e=t.match(Tt);return e?e.map(St).join(" "):t}}),Vt={...tt,transform:Math.round},Ct={borderWidth:st,borderTopWidth:st,borderRightWidth:st,borderBottomWidth:st,borderLeftWidth:st,borderRadius:st,radius:st,borderTopLeftRadius:st,borderTopRightRadius:st,borderBottomRightRadius:st,borderBottomLeftRadius:st,width:st,maxWidth:st,height:st,maxHeight:st,size:st,top:st,right:st,bottom:st,left:st,padding:st,paddingTop:st,paddingRight:st,paddingBottom:st,paddingLeft:st,margin:st,marginTop:st,marginRight:st,marginBottom:st,marginLeft:st,rotate:it,rotateX:it,rotateY:it,rotateZ:it,scale:nt,scaleX:nt,scaleY:nt,scaleZ:nt,skew:it,skewX:it,skewY:it,distance:st,translateX:st,translateY:st,translateZ:st,x:st,y:st,z:st,perspective:st,transformPerspective:st,opacity:et,originX:ut,originY:ut,originZ:st,zIndex:Vt,fillOpacity:et,strokeOpacity:et,numOctaves:Vt};function Mt(t,e,n,o){const{style:i,vars:r,transform:s,transformKeys:a,transformOrigin:l}=t;a.length=0;let u=!1,c=!1,h=!0;for(const t in e){const n=e[t];if(X(t)){r[t]=n;continue}const o=Ct[t],d=G(n,o);if(N.has(t)){if(u=!0,s[t]=d,a.push(t),!h)continue;n!==(o.default||0)&&(h=!1)}else t.startsWith("origin")?(c=!0,l[t]=d):i[t]=d}if(e.transform||(u||o?i.transform=Y(t,n,h,o):i.transform&&(i.transform="none")),c){const{originX:t="50%",originY:e="50%",originZ:n=0}=l;i.transformOrigin=`${t} ${e} ${n}`}}const Rt=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function Lt(t,e,n){for(const o in e)W(e[o])||z(o,n)||(t[o]=e[o])}function Dt(t,n,o){const i={};return Lt(i,t.style||{},t),Object.assign(i,function(t,n,o){let{transformTemplate:i}=t;return e.useMemo((()=>{const t={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};return Mt(t,n,{enableHardwareAcceleration:!o},i),Object.assign({},t.vars,t.style)}),[n])}(t,n,o)),t.transformValues?t.transformValues(i):i}function kt(t,e,n){const o={},i=Dt(t,e,n);return t.drag&&!1!==t.dragListener&&(o.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),o.style=i,o}const Bt=new Set(["initial","style","values","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","onHoverStart","onHoverEnd","layoutScroll","whileInView","onViewportEnter","onViewportLeave","viewport","whileTap","onTap","onTapStart","onTapCancel","animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView","onPan","onPanStart","onPanSessionStart","onPanEnd"]);function jt(t){return Bt.has(t)}let Ot=t=>!jt(t);function Ft(t){t&&(Ot=e=>e.startsWith("on")?!jt(e):t(e))}try{Ft(o.default.default)}catch(t){}function It(t,e,n){const o={};for(const i in t)(Ot(i)||!0===n&&jt(i)||!e&&!jt(i)||t.draggable&&i.startsWith("onDrag"))&&(o[i]=t[i]);return o}function Ut(t,e,n){return"string"==typeof t?t:st.transform(e+n*t)}const Nt={offset:"stroke-dashoffset",array:"stroke-dasharray"},zt={offset:"strokeDashoffset",array:"strokeDasharray"};function Wt(t,e,n,o,i){let{attrX:r,attrY:s,originX:a,originY:l,pathLength:u,pathSpacing:c=1,pathOffset:h=0,...d}=e;if(Mt(t,d,n,i),o)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:f,dimensions:m}=t;p.transform&&(m&&(f.transform=p.transform),delete p.transform),m&&(void 0!==a||void 0!==l||f.transform)&&(f.transformOrigin=function(t,e,n){return`${Ut(e,t.x,t.width)} ${Ut(n,t.y,t.height)}`}(m,void 0!==a?a:.5,void 0!==l?l:.5)),void 0!==r&&(p.x=r),void 0!==s&&(p.y=s),void 0!==u&&function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];t.pathLength=1;const r=i?Nt:zt;t[r.offset]=st.transform(-o);const s=st.transform(e),a=st.transform(n);t[r.array]=`${s} ${a}`}(p,u,c,h,!1)}const Ht=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}}),$t=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Yt(t,n,o,i){const r=e.useMemo((()=>{const e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}};return Wt(e,n,{enableHardwareAcceleration:!1},$t(i),t.transformTemplate),{...e.attrs,style:{...e.style}}}),[n]);if(t.style){const e={};Lt(e,t.style,t),r.style={...e,...r.style}}return r}function Xt(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(n,o,i,r,s,a)=>{let{latestValues:l}=s;const u=(O(n)?Yt:kt)(o,l,a,n),c={...It(o,"string"==typeof n,t),...u,ref:r};return i&&(c["data-projection-id"]=i),e.createElement(n,c)}}const Gt=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function qt(t,e,n,o){let{style:i,vars:r}=e;Object.assign(t.style,i,o&&o.getProjectionStyles(n));for(const e in r)t.style.setProperty(e,r[e])}const Zt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function _t(t,e,n,o){qt(t,e,void 0,o);for(const n in e.attrs)t.setAttribute(Zt.has(n)?n:Gt(n),e.attrs[n])}function Kt(t){const{style:e}=t,n={};for(const o in e)(W(e[o])||z(o,t))&&(n[o]=e[o]);return n}function Jt(t){const e=Kt(t);for(const n in t)W(t[n])&&(e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]);return e}function Qt(t,e,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,o,i)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,o,i)),e}const te=t=>Array.isArray(t),ee=t=>te(t)?t[t.length-1]||0:t;function ne(t){const e=W(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const oe=t=>(n,o)=>{const i=e.useContext(l),r=e.useContext(c),s=()=>function(t,e,n,o){let{scrapeMotionValuesFromProps:i,createRenderState:r,onMount:s}=t;const a={latestValues:ie(e,n,o,i),renderState:r()};return s&&(a.mount=t=>s(e,t,a)),a}(t,n,i,r);return o?s():T(s)};function ie(t,e,n,o){const i={},r=o(t);for(const t in r)i[t]=ne(r[t]);let{initial:s,animate:a}=t;const l=y(t),u=x(t);e&&u&&!l&&!1!==t.inherit&&(void 0===s&&(s=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===s;const h=c?a:s;return h&&"boolean"!=typeof h&&!g(h)&&(Array.isArray(h)?h:[h]).forEach((e=>{const n=Qt(t,e);if(!n)return;const{transitionEnd:o,transition:r,...s}=n;for(const t in s){let e=s[t];Array.isArray(e)&&(e=e[c?e.length-1:0]),null!==e&&(i[t]=e)}for(const t in o)i[t]=o[t]})),i}const re={useVisualState:oe({scrapeMotionValuesFromProps:Jt,createRenderState:Ht,onMount:(t,e,n)=>{let{renderState:o,latestValues:i}=n;try{o.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){o.dimensions={x:0,y:0,width:0,height:0}}Wt(o,i,{enableHardwareAcceleration:!1},$t(e.tagName),t.transformTemplate),_t(e,o)}})},se={useVisualState:oe({scrapeMotionValuesFromProps:Kt,createRenderState:Rt})};function ae(t,e,n,o,i){let{forwardMotionProps:r=!1}=e;return{...O(t)?re:se,preloadedFeatures:n,useRender:Xt(r),createVisualElement:o,projectionNodeConstructor:i,Component:t}}var le;function ue(t,e,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!0};return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n)}function ce(t,n,o,i){e.useEffect((()=>{const e=t.current;if(o&&e)return ue(e,n,o,i)}),[t,n,o,i])}function he(t){return"undefined"!=typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function de(t){return!!t.touches}t.AnimationType=void 0,(le=t.AnimationType||(t.AnimationType={})).Animate="animate",le.Hover="whileHover",le.Tap="whileTap",le.Drag="whileDrag",le.Focus="whileFocus",le.InView="whileInView",le.Exit="exit";const pe={pageX:0,pageY:0};function fe(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page";const n=t.touches[0]||t.changedTouches[0]||pe;return{x:n[e+"X"],y:n[e+"Y"]}}function me(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page";return{x:t[e+"X"],y:t[e+"Y"]}}function ge(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page";return{point:de(t)?fe(t,e):me(t,e)}}const ve=function(t){const e=e=>t(e,ge(e));return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(n=e,t=>{const e=t instanceof MouseEvent;(!e||e&&0===t.button)&&n(t)}):e;var n},ye={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},xe={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Ee(t){return h&&null===window.onpointerdown?t:h&&null===window.ontouchstart?xe[t]:h&&null===window.onmousedown?ye[t]:t}function be(t,e,n,o){return ue(t,Ee(e),ve(n,"pointerdown"===e),o)}function we(t,e,n,o){return ce(t,Ee(e),n&&ve(n,"pointerdown"===e),o)}function Pe(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const Se=Pe("dragHorizontal"),Te=Pe("dragVertical");function Ae(t){let e=!1;if("y"===t)e=Te();else if("x"===t)e=Se();else{const t=Se(),n=Te();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Ve(){const t=Ae(!0);return!t||(t(),!1)}function Ce(e,n,o){return(i,r)=>{he(i)&&!Ve()&&(e.animationState&&e.animationState.setActive(t.AnimationType.Hover,n),o&&o(i,r))}}const Me=(t,e)=>!!e&&(t===e||Me(t,e.parentElement));function Re(t){return e.useEffect((()=>()=>t()),[])}const Le=(t,e)=>n=>e(t(n)),De=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce(Le)};"undefined"==typeof process||process.env;const ke=new Set;function Be(t,e,n){t||ke.has(e)||(console.warn(e),n&&console.warn(n),ke.add(e))}const je=new WeakMap,Oe=new WeakMap,Fe=t=>{const e=je.get(t.target);e&&e(t)},Ie=t=>{t.forEach(Fe)};function Ue(t,e,n){const o=function(t){let{root:e,...n}=t;const o=e||document;Oe.has(o)||Oe.set(o,{});const i=Oe.get(o),r=JSON.stringify(n);return i[r]||(i[r]=new IntersectionObserver(Ie,{root:e,...n})),i[r]}(e);return je.set(t,n),o.observe(t),()=>{je.delete(t),o.unobserve(t)}}const Ne={some:0,all:1};function ze(n,o,i,r){let{root:s,margin:a,amount:l="some",once:u}=r;e.useEffect((()=>{if(!n||!i.current)return;const e={root:null==s?void 0:s.current,rootMargin:a,threshold:"number"==typeof l?l:Ne[l]};return Ue(i.current,e,(e=>{const{isIntersecting:n}=e;if(o.isInView===n)return;if(o.isInView=n,u&&!n&&o.hasEnteredView)return;n&&(o.hasEnteredView=!0),i.animationState&&i.animationState.setActive(t.AnimationType.InView,n);const r=i.getProps(),s=n?r.onViewportEnter:r.onViewportLeave;s&&s(e)}))}),[n,s,a,l])}function We(n,o,i,r){let{fallback:s=!0}=r;e.useEffect((()=>{n&&s&&requestAnimationFrame((()=>{o.hasEnteredView=!0;const{onViewportEnter:e}=i.getProps();e&&e(null),i.animationState&&i.animationState.setActive(t.AnimationType.InView,!0)}))}),[n])}const He=t=>e=>(t(e),null),$e={inView:He((function(t){let{visualElement:n,whileInView:o,onViewportEnter:i,onViewportLeave:r,viewport:s={}}=t;const a=e.useRef({hasEnteredView:!1,isInView:!1});let l=Boolean(o||i||r);s.once&&a.current.hasEnteredView&&(l=!1),("undefined"==typeof IntersectionObserver?We:ze)(l,a.current,n,s)})),tap:He((function(n){let{onTap:o,onTapStart:i,onTapCancel:r,whileTap:s,visualElement:a}=n;const l=o||i||r||s,u=e.useRef(!1),c=e.useRef(null),h={passive:!(i||o||r||g)};function d(){c.current&&c.current(),c.current=null}function p(){return d(),u.current=!1,a.animationState&&a.animationState.setActive(t.AnimationType.Tap,!1),!Ve()}function f(t,e){p()&&(Me(a.current,t.target)?o&&o(t,e):r&&r(t,e))}function m(t,e){p()&&r&&r(t,e)}function g(e,n){d(),u.current||(u.current=!0,c.current=De(be(window,"pointerup",f,h),be(window,"pointercancel",m,h)),a.animationState&&a.animationState.setActive(t.AnimationType.Tap,!0),i&&i(e,n))}we(a,"pointerdown",l?g:void 0,h),Re(d)})),focus:He((function(e){let{whileFocus:n,visualElement:o}=e;const{animationState:i}=o;ce(o,"focus",n?()=>{i&&i.setActive(t.AnimationType.Focus,!0)}:void 0),ce(o,"blur",n?()=>{i&&i.setActive(t.AnimationType.Focus,!1)}:void 0)})),hover:He((function(t){let{onHoverStart:e,onHoverEnd:n,whileHover:o,visualElement:i}=t;we(i,"pointerenter",e||o?Ce(i,!0,e):void 0,{passive:!e}),we(i,"pointerleave",n||o?Ce(i,!1,n):void 0,{passive:!n})}))};function Ye(){const t=e.useContext(c);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:o,register:i}=t,r=e.useId();return e.useEffect((()=>i(r)),[]),!n&&o?[!1,()=>o&&o(r)]:[!0]}function Xe(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let o=0;o<n;o++)if(e[o]!==t[o])return!1;return!0}const Ge=t=>1e3*t,qe=t=>t,Ze=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function _e(t,e,n,o){if(t===e&&n===o)return qe;const i=e=>function(t,e,n,o,i){let r,s,a=0;do{s=e+(n-e)/2,r=Ze(s,o,i)-t,r>0?n=s:e=s}while(Math.abs(r)>1e-7&&++a<12);return s}(e,0,1,t,n);return t=>0===t||1===t?t:Ze(i(t),e,o)}const Ke=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Je=t=>e=>1-t(1-e),Qe=t=>t*t,tn=Je(Qe),en=Ke(Qe),nn=t=>1-Math.sin(Math.acos(t)),on=Je(nn),rn=Ke(on),sn=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.525;return e=>e*e*((t+1)*e-t)},an=sn(),ln=Je(an),un=Ke(an),cn=(t=>{const e=sn(void 0);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))})(),hn={linear:qe,easeIn:Qe,easeInOut:en,easeOut:tn,circIn:nn,circInOut:rn,circOut:on,backIn:an,backInOut:un,backOut:ln,anticipate:cn},dn=t=>{if(Array.isArray(t)){t.length;const[e,n,o,i]=t;return _e(e,n,o,i)}return"string"==typeof t?hn[t]:t},pn=(t,e)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!wt.test(e)||e.startsWith("url("))),fn=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),mn=t=>({type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restSpeed:10}),gn=()=>({type:"keyframes",ease:"linear",duration:.3}),vn=t=>({type:"keyframes",duration:.8,values:t}),yn={x:fn,y:fn,z:fn,rotate:fn,rotateX:fn,rotateY:fn,rotateZ:fn,scaleX:mn,scaleY:mn,scale:mn,opacity:gn,backgroundColor:gn,color:gn,default:mn},xn=(t,e)=>{let n;return n=te(e)?vn:yn[t]||yn.default,{to:e,...n(e)}},En={...Ct,color:vt,backgroundColor:vt,outlineColor:vt,fill:vt,stroke:vt,borderColor:vt,borderTopColor:vt,borderRightColor:vt,borderBottomColor:vt,borderLeftColor:vt,filter:At,WebkitFilter:At},bn=t=>En[t];function wn(t,e){var n;let o=bn(t);return o!==At&&(o=wt),null===(n=o.getAnimatableNone)||void 0===n?void 0:n.call(o,e)}const Pn={current:!1},Sn="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),Tn="undefined"!=typeof window?t=>window.requestAnimationFrame(t):t=>setTimeout((()=>t(Sn())),1/60*1e3);let An=!0,Vn=!1,Cn=!1;const Mn={delta:0,timestamp:0},Rn=["read","update","preRender","render","postRender"],Ln=Rn.reduce(((t,e)=>(t[e]=function(t){let e=[],n=[],o=0,i=!1,r=!1;const s=new WeakSet,a={schedule:function(t){const r=arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&i,a=r?e:n;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&s.add(t),-1===a.indexOf(t)&&(a.push(t),r&&i&&(o=e.length)),t},cancel:t=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1),s.delete(t)},process:l=>{if(i)r=!0;else{if(i=!0,[e,n]=[n,e],n.length=0,o=e.length,o)for(let n=0;n<o;n++){const o=e[n];o(l),s.has(o)&&(a.schedule(o),t())}i=!1,r&&(r=!1,a.process(l))}}};return a}((()=>Vn=!0)),t)),{}),Dn=Rn.reduce(((t,e)=>{const n=Ln[e];return t[e]=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Vn||Fn(),n.schedule(t,e,o)},t}),{}),kn=Rn.reduce(((t,e)=>(t[e]=Ln[e].cancel,t)),{}),Bn=Rn.reduce(((t,e)=>(t[e]=()=>Ln[e].process(Mn),t)),{}),jn=t=>Ln[t].process(Mn),On=t=>{Vn=!1,Mn.delta=An?1/60*1e3:Math.max(Math.min(t-Mn.timestamp,40),1),Mn.timestamp=t,Cn=!0,Rn.forEach(jn),Cn=!1,Vn&&(An=!1,Tn(On))},Fn=()=>{Vn=!0,An=!0,Cn||Tn(On)},In=()=>Mn;function Un(t,e){const n=performance.now(),o=i=>{let{timestamp:r}=i;const s=r-n;s>=e&&(kn.read(o),t(s-e))};return Dn.read(o,!0),()=>kn.read(o)}const Nn=(t,e,n)=>Math.min(Math.max(n,t),e),zn=(t,e,n)=>-n*t+n*e+t;function Wn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}const Hn=(t,e,n)=>{const o=t*t;return Math.sqrt(Math.max(0,n*(e*e-o)+o))},$n=[gt,mt,dt];function Yn(t){const e=(n=t,$n.find((t=>t.test(n))));var n;let o=e.parse(t);return e===dt&&(o=function(t){let{hue:e,saturation:n,lightness:o,alpha:i}=t;e/=360,o/=100;let r=0,s=0,a=0;if(n/=100){const t=o<.5?o*(1+n):o+n-o*n,i=2*o-t;r=Wn(i,t,e+1/3),s=Wn(i,t,e),a=Wn(i,t,e-1/3)}else r=s=a=o;return{red:Math.round(255*r),green:Math.round(255*s),blue:Math.round(255*a),alpha:i}}(o)),o}const Xn=(t,e)=>{const n=Yn(t),o=Yn(e),i={...n};return t=>(i.red=Hn(n.red,o.red,t),i.green=Hn(n.green,o.green,t),i.blue=Hn(n.blue,o.blue,t),i.alpha=zn(n.alpha,o.alpha,t),mt.transform(i))};function Gn(t,e){return"number"==typeof t?n=>zn(t,e,n):vt.test(t)?Xn(t,e):Kn(t,e)}const qn=(t,e)=>{const n=[...t],o=n.length,i=t.map(((t,n)=>Gn(t,e[n])));return t=>{for(let e=0;e<o;e++)n[e]=i[e](t);return n}},Zn=(t,e)=>{const n={...t,...e},o={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(o[i]=Gn(t[i],e[i]));return t=>{for(const e in o)n[e]=o[e](t);return n}};function _n(t){const e=wt.parse(t),n=e.length;let o=0,i=0;for(let t=0;t<n;t++)o||"number"==typeof e[t]?o++:i++;return{parsed:e,numNumbers:o,numColors:i}}const Kn=(t,e)=>{const n=wt.createTransformer(e),o=_n(t),i=_n(e);return o.numColors===i.numColors&&o.numNumbers>=i.numNumbers?De(qn(o.parsed,i.parsed),n):n=>""+(n>0?e:t)},Jn=(t,e,n)=>{const o=e-t;return 0===o?1:(n-t)/o},Qn=(t,e)=>n=>zn(t,e,n);function to(t,e,n){const o=[],i=n||("number"==typeof(r=t[0])?Qn:"string"==typeof r?vt.test(r)?Xn:Kn:Array.isArray(r)?qn:"object"==typeof r?Zn:Qn);var r;const s=t.length-1;for(let n=0;n<s;n++){let r=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]:e;r=De(t,r)}o.push(r)}return o}function eo(t,e){let{clamp:n=!0,ease:o,mixer:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=t.length;e.length,!o||!Array.isArray(o)||o.length,t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=to(e,o,i),a=s.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const o=Jn(t[n],t[n+1],e);return s[n](o)};return n?e=>l(Nn(t[0],t[r-1],e)):l}function no(t,e){return t.map((()=>e||en)).splice(0,t.length-1)}function oo(t){let e,n,{duration:o=800,bounce:i=.25,velocity:r=0,mass:s=1}=t,a=1-i;a=Nn(.05,1,a),o=Nn(.01,10,o/1e3),a<1?(e=t=>{const e=t*a,n=e*o;return.001-(e-r)/io(t,a)*Math.exp(-n)},n=t=>{const n=t*a*o,i=n*r+r,s=Math.pow(a,2)*Math.pow(t,2)*o,l=Math.exp(-n),u=io(Math.pow(t,2),a);return(.001-e(t)>0?-1:1)*((i-s)*l)/u}):(e=t=>Math.exp(-t*o)*((t-r)*o+1)-.001,n=t=>Math.exp(-t*o)*(o*o*(r-t)));const l=function(t,e,n){let o=n;for(let n=1;n<12;n++)o-=t(o)/e(o);return o}(e,n,5/o);if(o*=1e3,isNaN(l))return{stiffness:100,damping:10,duration:o};{const t=Math.pow(l,2)*s;return{stiffness:t,damping:2*a*Math.sqrt(s*t),duration:o}}}function io(t,e){return t*Math.sqrt(1-e*e)}const ro=["duration","bounce"],so=["stiffness","damping","mass"];function ao(t,e){return e.some((e=>void 0!==t[e]))}function lo(t){let{from:e=0,to:n=1,restSpeed:o=2,restDelta:i=.01,...r}=t;const s={done:!1,value:e};let{stiffness:a,damping:l,mass:u,velocity:c,duration:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!ao(t,so)&&ao(t,ro)){const n=oo(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(r),p=uo,f=uo;function m(){const t=c?-c/1e3:0,o=n-e,r=l/(2*Math.sqrt(a*u)),s=Math.sqrt(a/u)/1e3;if(void 0===i&&(i=Math.min(Math.abs(n-e)/100,.4)),r<1){const e=io(s,r);p=i=>{const a=Math.exp(-r*s*i);return n-a*((t+r*s*o)/e*Math.sin(e*i)+o*Math.cos(e*i))},f=n=>{const i=Math.exp(-r*s*n);return r*s*i*(Math.sin(e*n)*(t+r*s*o)/e+o*Math.cos(e*n))-i*(Math.cos(e*n)*(t+r*s*o)-e*o*Math.sin(e*n))}}else if(1===r)p=e=>n-Math.exp(-s*e)*(o+(t+s*o)*e);else{const e=s*Math.sqrt(r*r-1);p=i=>{const a=Math.exp(-r*s*i),l=Math.min(e*i,300);return n-a*((t+r*s*o)*Math.sinh(l)+e*o*Math.cosh(l))/e}}}return m(),{next:t=>{const e=p(t);if(d)s.done=t>=h;else{const r=1e3*f(t),a=Math.abs(r)<=o,l=Math.abs(n-e)<=i;s.done=a&&l}return s.value=s.done?n:e,s},flipTarget:()=>{c=-c,[e,n]=[n,e],m()}}}lo.needsInterpolation=(t,e)=>"string"==typeof t||"string"==typeof e;const uo=t=>0,co={decay:function(t){let{velocity:e=0,from:n=0,power:o=.8,timeConstant:i=350,restDelta:r=.5,modifyTarget:s}=t;const a={done:!1,value:n};let l=o*e;const u=n+l,c=void 0===s?u:s(u);return c!==u&&(l=c-n),{next:t=>{const e=-l*Math.exp(-t/i);return a.done=!(e>r||e<-r),a.value=a.done?c:c+e,a},flipTarget:()=>{}}},keyframes:function(t){let{from:e=0,to:n=1,ease:o,offset:i,duration:r=300}=t;const s={done:!1,value:e},a=Array.isArray(n)?n:[e,n],l=function(t,e){return t.map((t=>t*e))}(i&&i.length===a.length?i:function(t){const e=t.length;return t.map(((t,n)=>0!==n?n/(e-1):0))}(a),r);function u(){return eo(l,a,{ease:Array.isArray(o)?o:no(a,o)})}let c=u();return{next:t=>(s.value=c(t),s.done=t>=r,s),flipTarget:()=>{a.reverse(),c=u()}}},spring:lo};function ho(t,e){return t-e-(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)}const po=t=>{const e=e=>{let{delta:n}=e;return t(n)};return{start:()=>Dn.update(e,!0),stop:()=>kn.update(e)}};function fo(t){let{from:e,autoplay:n=!0,driver:o=po,elapsed:i=0,repeat:r=0,repeatType:s="loop",repeatDelay:a=0,onPlay:l,onStop:u,onComplete:c,onRepeat:h,onUpdate:d,type:p="keyframes",...f}=t;var m,g;let v,y,x,{to:E}=f,b=0,w=f.duration,P=!1,S=!0;const T=co[Array.isArray(E)?"keyframes":p];(null===(g=(m=T).needsInterpolation)||void 0===g?void 0:g.call(m,e,E))&&(x=eo([0,100],[e,E],{clamp:!1}),e=0,E=100);const A=T({...f,from:e,to:E});function V(){b++,"reverse"===s?(S=b%2==0,i=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?e-(t-e)+n:ho(e+-t,e,n)}(i,w,a,S)):(i=ho(i,w,a),"mirror"===s&&A.flipTarget()),P=!1,h&&h()}function C(t){if(S||(t=-t),i+=t,!P){const t=A.next(Math.max(0,i));y=t.value,x&&(y=x(y)),P=S?t.done:i<=0}null==d||d(y),P&&(0===b&&(null!=w||(w=i)),b<r?function(t,e,n,o){return o?t>=e+n:t<=-n}(i,w,a,S)&&V():(v.stop(),c&&c()))}return n&&(null==l||l(),v=o(C),v.start()),{stop:()=>{null==u||u(),v.stop()}}}function mo(t,e){return e?t*(1e3/e):0}function go(t){let{ease:e,times:n,yoyo:o,flip:i,loop:r,...s}=t;const a={...s};return n&&(a.offset=n),s.duration&&(a.duration=Ge(s.duration)),s.repeatDelay&&(a.repeatDelay=Ge(s.repeatDelay)),e&&(a.ease=(t=>Array.isArray(t)&&"number"!=typeof t[0])(e)?e.map(dn):dn(e)),"tween"===s.type&&(a.type="keyframes"),(o||r||i)&&(o?a.repeatType="reverse":r?a.repeatType="loop":i&&(a.repeatType="mirror"),a.repeat=r||o||i||s.repeat),"spring"!==s.type&&(a.type="keyframes"),a}function vo(t,e,n){return Array.isArray(e.to)&&void 0===t.duration&&(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){let{when:e,delay:n,delayChildren:o,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:a,repeatDelay:l,from:u,...c}=t;return!!Object.keys(c).length}(t)||(t={...t,...xn(n,e.to)}),{...e,...go(t)}}function yo(t,e,n,o,i){const r=bo(o,t)||{};let s=void 0!==r.from?r.from:e.get();const a=pn(t,n);return"none"===s&&a&&"string"==typeof n?s=wn(t,n):xo(s)&&"string"==typeof n?s=Eo(n):!Array.isArray(n)&&xo(n)&&"string"==typeof s&&(n=Eo(s)),pn(t,s)&&a&&!1!==r.type?function(){const o={from:s,to:n,velocity:e.getVelocity(),onComplete:i,onUpdate:t=>e.set(t)};return"inertia"===r.type||"decay"===r.type?function(t){let e,{from:n=0,velocity:o=0,min:i,max:r,power:s=.8,timeConstant:a=750,bounceStiffness:l=500,bounceDamping:u=10,restDelta:c=1,modifyTarget:h,driver:d,onUpdate:p,onComplete:f,onStop:m}=t;function g(t){return void 0!==i&&t<i||void 0!==r&&t>r}function v(t){return void 0===i?r:void 0===r||Math.abs(i-t)<Math.abs(r-t)?i:r}function y(t){null==e||e.stop(),e=fo({...t,driver:d,onUpdate:e=>{var n;null==p||p(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:f,onStop:m})}function x(t){y({type:"spring",stiffness:l,damping:u,restDelta:c,...t})}if(g(n))x({from:n,velocity:o,to:v(n)});else{let t=s*o+n;void 0!==h&&(t=h(t));const e=v(t),r=e===i?-1:1;let l,u;const d=t=>{l=u,u=t,o=mo(t-l,In().delta),(1===r&&t>e||-1===r&&t<e)&&x({from:t,to:e,velocity:o})};y({type:"decay",from:n,velocity:o,timeConstant:a,power:s,restDelta:c,modifyTarget:h,onUpdate:g(t)?d:void 0})}return{stop:()=>null==e?void 0:e.stop()}}({...o,...r}):fo({...vo(r,o,t),onUpdate:t=>{o.onUpdate(t),r.onUpdate&&r.onUpdate(t)},onComplete:()=>{o.onComplete(),r.onComplete&&r.onComplete()}})}:function(){const t=ee(n);return e.set(t),i(),r.onUpdate&&r.onUpdate(t),r.onComplete&&r.onComplete(),{stop:()=>{}}}}function xo(t){return 0===t||"string"==typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Eo(t){return"number"==typeof t?0:wn("",t)}function bo(t,e){return t[e]||t.default||t}function wo(t,e,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Pn.current&&(o={type:!1}),e.start((i=>{let r;const s=yo(t,e,n,o,i),a=function(t,e){var n,o;return null!==(o=null!==(n=(bo(t,e)||{}).delay)&&void 0!==n?n:t.delay)&&void 0!==o?o:0}(o,t),l=()=>r=s();let u;return a?u=Un(l,Ge(a)):l(),()=>{u&&u(),r&&r.stop()}}))}const Po=t=>/^0[^.\s]+$/.test(t);function So(t,e){-1===t.indexOf(e)&&t.push(e)}function To(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Ao{constructor(){this.subscriptions=[]}add(t){return So(this.subscriptions,t),()=>To(this.subscriptions,t)}notify(t,e,n){const o=this.subscriptions.length;if(o)if(1===o)this.subscriptions[0](t,e,n);else for(let i=0;i<o;i++){const o=this.subscriptions[i];o&&o(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Vo{constructor(t){var e,n=this;this.version="7.6.19",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Ao,this.velocityUpdateSubscribers=new Ao,this.renderSubscribers=new Ao,this.canTrackVelocity=!1,this.updateAndNotify=function(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n.prev=n.current,n.current=t;const{delta:o,timestamp:i}=In();n.lastUpdated!==i&&(n.timeDelta=o,n.lastUpdated=i,Dn.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=()=>Dn.postRender(this.velocityCheck),this.velocityCheck=t=>{let{timestamp:e}=t;e!==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){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?mo(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 Co(t){return new Vo(t)}const Mo=t=>e=>e.test(t),Ro=[tt,st,rt,it,lt,at,{test:t=>"auto"===t,parse:t=>t}],Lo=t=>Ro.find(Mo(t)),Do=[...Ro,vt,wt],ko=t=>Do.find(Mo(t));function Bo(t,e,n){const o=t.getProps();return Qt(o,e,void 0!==n?n:o.custom,function(t){const e={};return t.values.forEach(((t,n)=>e[n]=t.get())),e}(t),function(t){const e={};return t.values.forEach(((t,n)=>e[n]=t.getVelocity())),e}(t))}function jo(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Co(n))}function Oo(t,e){const n=Bo(t,e);let{transitionEnd:o={},transition:i={},...r}=n?t.makeTargetAnimatable(n,!1):{};r={...r,...o};for(const e in r)jo(t,e,ee(r[e]))}function Fo(t,e){[...e].reverse().forEach((n=>{var o;const i=t.getVariant(n);i&&Oo(t,i),null===(o=t.variantChildren)||void 0===o||o.forEach((t=>{Fo(t,e)}))}))}function Io(t,e,n){var o,i;const r=Object.keys(e).filter((e=>!t.hasValue(e))),s=r.length;if(s)for(let a=0;a<s;a++){const s=r[a],l=e[s];let u=null;Array.isArray(l)&&(u=l[0]),null===u&&(u=null!==(i=null!==(o=n[s])&&void 0!==o?o:t.readValue(s))&&void 0!==i?i:e[s]),null!=u&&("string"==typeof u&&(/^\-?\d*\.?\d+$/.test(u)||Po(u))?u=parseFloat(u):!ko(u)&&wt.test(l)&&(u=wn(s,l)),t.addValue(s,Co(u)),void 0===n[s]&&(n[s]=u),null!==u&&t.setBaseTarget(s,u))}}function Uo(t,e){if(e)return(e[t]||e.default||e).from}function No(t,e,n){var o;const i={};for(const r in t){const t=Uo(r,e);i[r]=void 0!==t?t:null===(o=n.getValue(r))||void 0===o?void 0:o.get()}return i}function zo(t){return Boolean(W(t)&&t.add)}function Wo(t,e){let n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t.notify("AnimationStart",e),Array.isArray(e)){const i=e.map((e=>Ho(t,e,o)));n=Promise.all(i)}else if("string"==typeof e)n=Ho(t,e,o);else{const i="function"==typeof e?Bo(t,e,o.custom):e;n=$o(t,i,o)}return n.then((()=>t.notify("AnimationComplete",e)))}function Ho(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var o;const i=Bo(t,e,n.custom);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const s=i?()=>$o(t,i,n):()=>Promise.resolve(),a=(null===(o=t.variantChildren)||void 0===o?void 0:o.size)?function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=r;return function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5?arguments[5]:void 0;const s=[],a=(t.variantChildren.size-1)*o,l=1===i?function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)*o}:function(){return a-(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)*o};return Array.from(t.variantChildren).sort(Yo).forEach(((t,o)=>{s.push(Ho(t,e,{...r,delay:n+l(o)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(s)}(t,e,i+o,s,a,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[t,e]="beforeChildren"===l?[s,a]:[a,s];return t().then(e)}return Promise.all([s(),a(n.delay)])}function $o(t,e){let{delay:n=0,transitionOverride:o,type:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var r;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const u=t.getValue("willChange");o&&(s=o);const c=[],h=i&&(null===(r=t.animationState)||void 0===r?void 0:r.getState()[i]);for(const e in l){const o=t.getValue(e),i=l[e];if(!o||void 0===i||h&&Xo(h,e))continue;let r={delay:n,...s};t.shouldReduceMotion&&N.has(e)&&(r={...r,type:!1,delay:0});let a=wo(e,o,i,r);zo(u)&&(u.add(e),a=a.then((()=>u.remove(e)))),c.push(a)}return Promise.all(c).then((()=>{a&&Oo(t,a)}))}function Yo(t,e){return t.sortNodePosition(e)}function Xo(t,e){let{protectedKeys:n,needsAnimating:o}=t;const i=n.hasOwnProperty(e)&&!0!==o[e];return o[e]=!1,i}const Go=[t.AnimationType.Animate,t.AnimationType.InView,t.AnimationType.Focus,t.AnimationType.Hover,t.AnimationType.Tap,t.AnimationType.Drag,t.AnimationType.Exit],qo=[...Go].reverse(),Zo=Go.length;function _o(e){let n=function(t){return e=>Promise.all(e.map((e=>{let{animation:n,options:o}=e;return Wo(t,n,o)})))}(e);const o={[t.AnimationType.Animate]:Jo(!0),[t.AnimationType.InView]:Jo(),[t.AnimationType.Hover]:Jo(),[t.AnimationType.Tap]:Jo(),[t.AnimationType.Drag]:Jo(),[t.AnimationType.Focus]:Jo(),[t.AnimationType.Exit]:Jo()};let i=!0;const r=(t,n)=>{const o=Bo(e,n);if(o){const{transition:e,transitionEnd:n,...i}=o;t={...t,...i,...n}}return t};function s(t,s){var a;const l=e.getProps(),u=e.getVariantContext(!0)||{},c=[],h=new Set;let d={},p=1/0;for(let n=0;n<Zo;n++){const f=qo[n],v=o[f],y=null!==(a=l[f])&&void 0!==a?a:u[f],x=m(y),E=f===s?v.isActive:null;!1===E&&(p=n);let b=y===u[f]&&y!==l[f]&&x;if(b&&i&&e.manuallyAnimateOnMount&&(b=!1),v.protectedKeys={...d},!v.isActive&&null===E||!y&&!v.prevProp||g(y)||"boolean"==typeof y)continue;const w=Ko(v.prevProp,y);let P=w||f===s&&v.isActive&&!b&&x||n>p&&x;const S=Array.isArray(y)?y:[y];let T=S.reduce(r,{});!1===E&&(T={});const{prevResolvedValues:A={}}=v,V={...A,...T},C=t=>{P=!0,h.delete(t),v.needsAnimating[t]=!0};for(const t in V){const e=T[t],n=A[t];d.hasOwnProperty(t)||(e!==n?te(e)&&te(n)?!Xe(e,n)||w?C(t):v.protectedKeys[t]=!0:void 0!==e?C(t):h.add(t):void 0!==e&&h.has(t)?C(t):v.protectedKeys[t]=!0)}v.prevProp=y,v.prevResolvedValues=T,v.isActive&&(d={...d,...T}),i&&e.blockInitialAnimation&&(P=!1),P&&!b&&c.push(...S.map((e=>({animation:e,options:{type:f,...t}}))))}if(h.size){const t={};h.forEach((n=>{const o=e.getBaseTarget(n);void 0!==o&&(t[n]=o)})),c.push({animation:t})}let f=Boolean(c.length);return i&&!1===l.initial&&!e.manuallyAnimateOnMount&&(f=!1),i=!1,f?n(c):Promise.resolve()}return{animateChanges:s,setActive:function(t,n,i){var r;if(o[t].isActive===n)return Promise.resolve();null===(r=e.variantChildren)||void 0===r||r.forEach((e=>{var o;return null===(o=e.animationState)||void 0===o?void 0:o.setActive(t,n)})),o[t].isActive=n;const a=s(i,t);for(const t in o)o[t].protectedKeys={};return a},setAnimateFunction:function(t){n=t(e)},getState:()=>o}}function Ko(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Xe(e,t)}function Jo(){return{isActive:arguments.length>0&&void 0!==arguments[0]&&arguments[0],protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const Qo={animation:He((t=>{let{visualElement:n,animate:o}=t;n.animationState||(n.animationState=_o(n)),g(o)&&e.useEffect((()=>o.subscribe(n)),[o])})),exit:He((n=>{const{custom:o,visualElement:i}=n,[r,s]=Ye(),a=e.useContext(c);e.useEffect((()=>{i.isPresent=r;const e=i.animationState&&i.animationState.setActive(t.AnimationType.Exit,!r,{custom:a&&a.custom||o});e&&!r&&e.then(s)}),[r])}))},ti=(t,e)=>Math.abs(t-e);function ei(t,e){const n=ti(t.x,e.x),o=ti(t.y,e.y);return Math.sqrt(n**2+o**2)}class ni{constructor(t,e){let{transformPagePoint:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=ri(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=ei(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:o}=t,{timestamp:i}=In();this.history.push({...o,timestamp:i});const{onStart:r,onMove:s}=this.handlers;e||(r&&r(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=oi(e,this.transformPagePoint),he(t)&&0===t.buttons?this.handlePointerUp(t,e):Dn.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:o}=this.handlers,i=ri(oi(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,i),o&&o(t,i)},de(t)&&t.touches.length>1)return;this.handlers=e,this.transformPagePoint=n;const o=oi(ge(t),this.transformPagePoint),{point:i}=o,{timestamp:r}=In();this.history=[{...i,timestamp:r}];const{onSessionStart:s}=e;s&&s(t,ri(o,this.history)),this.removeListeners=De(be(window,"pointermove",this.handlePointerMove),be(window,"pointerup",this.handlePointerUp),be(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),kn.update(this.updatePoint)}}function oi(t,e){return e?{point:e(t.point)}:t}function ii(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ri(t,e){let{point:n}=t;return{point:n,delta:ii(n,ai(e)),offset:ii(n,si(e)),velocity:li(e,.1)}}function si(t){return t[0]}function ai(t){return t[t.length-1]}function li(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,o=null;const i=ai(t);for(;n>=0&&(o=t[n],!(i.timestamp-o.timestamp>Ge(e)));)n--;if(!o)return{x:0,y:0};const r=(i.timestamp-o.timestamp)/1e3;if(0===r)return{x:0,y:0};const s={x:(i.x-o.x)/r,y:(i.y-o.y)/r};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function ui(t){return t.max-t.min}function ci(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.01;return Math.abs(t-e)<=n}function hi(t,e,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;t.origin=o,t.originPoint=zn(e.min,e.max,t.origin),t.scale=ui(n)/ui(e),(ci(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=zn(n.min,n.max,t.origin)-t.originPoint,(ci(t.translate)||isNaN(t.translate))&&(t.translate=0)}function di(t,e,n,o){hi(t.x,e.x,n.x,null==o?void 0:o.originX),hi(t.y,e.y,n.y,null==o?void 0:o.originY)}function pi(t,e,n){t.min=n.min+e.min,t.max=t.min+ui(e)}function fi(t,e,n){t.min=e.min-n.min,t.max=t.min+ui(e)}function mi(t,e,n){fi(t.x,e.x,n.x),fi(t.y,e.y,n.y)}function gi(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 vi(t,e){let n=e.min-t.min,o=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,o]=[o,n]),{min:n,max:o}}const yi=.35;function xi(t,e,n){return{min:Ei(t,e),max:Ei(t,n)}}function Ei(t,e){var n;return"number"==typeof t?t:null!==(n=t[e])&&void 0!==n?n:0}const bi=()=>({x:{min:0,max:0},y:{min:0,max:0}});function wi(t){return[t("x"),t("y")]}function Pi(t){let{top:e,left:n,right:o,bottom:i}=t;return{x:{min:n,max:o},y:{min:e,max:i}}}function Si(t){return void 0===t||1===t}function Ti(t){let{scale:e,scaleX:n,scaleY:o}=t;return!Si(e)||!Si(n)||!Si(o)}function Ai(t){return Ti(t)||Vi(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Vi(t){return Ci(t.x)||Ci(t.y)}function Ci(t){return t&&"0%"!==t}function Mi(t,e,n){return n+e*(t-n)}function Ri(t,e,n,o,i){return void 0!==i&&(t=Mi(t,i,o)),Mi(t,n,o)+e}function Li(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;t.min=Ri(t.min,e,n,o,i),t.max=Ri(t.max,e,n,o,i)}function Di(t,e){let{x:n,y:o}=e;Li(t.x,n.translate,n.scale,n.originPoint),Li(t.y,o.translate,o.scale,o.originPoint)}function ki(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Bi(t,e){t.min=t.min+e,t.max=t.max+e}function ji(t,e,n){let[o,i,r]=n;const s=void 0!==e[r]?e[r]:.5,a=zn(t.min,t.max,s);Li(t,e[o],e[i],a,e.scale)}const Oi=["x","scaleX","originX"],Fi=["y","scaleY","originY"];function Ii(t,e){ji(t.x,e,Oi),ji(t.y,e,Fi)}function Ui(t,e){return Pi(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),o=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}(t.getBoundingClientRect(),e))}const Ni=new WeakMap;class zi{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(e){let{snapToCursor:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!1!==this.visualElement.isPresent&&(this.panSession=new ni(e,{onSessionStart:t=>{this.stopAnimation(),n&&this.snapToCursor(ge(t,"page").point)},onStart:(e,n)=>{var o;const{drag:i,dragPropagation:r,onDragStart:s}=this.getProps();(!i||r||(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Ae(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),wi((t=>{var e,n;let o=this.getAxisMotionValue(t).get()||0;if(rt.test(o)){const i=null===(n=null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout)||void 0===n?void 0:n.layoutBox[t];i&&(o=ui(i)*(parseFloat(o)/100))}this.originPoint[t]=o})),null==s||s(e,n),null===(o=this.visualElement.animationState)||void 0===o||o.setActive(t.AnimationType.Drag,!0))},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:o,onDirectionLock:i,onDrag:r}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=e;if(o&&null===this.currentDirection)return this.currentDirection=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}(s),void(null!==this.currentDirection&&(null==i||i(this.currentDirection)));this.updateAxis("x",e.point,s),this.updateAxis("y",e.point,s),this.visualElement.render(),null==r||r(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:o}=e;this.startAnimation(o);const{onDragEnd:i}=this.getProps();null==i||i(t,e)}cancel(){var e,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(n=this.visualElement.animationState)||void 0===n||n.setActive(t.AnimationType.Drag,!1)}updateAxis(t,e,n){const{drag:o}=this.getProps();if(!n||!Wi(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let r=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(r=function(t,e,n){let{min:o,max:i}=e;return void 0!==o&&t<o?t=n?zn(o,t,n.min):Math.max(t,o):void 0!==i&&t>i&&(t=n?zn(i,t,n.max):Math.min(t,i)),t}(r,this.constraints[t],this.elastic[t])),i.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{layout:n}=this.visualElement.projection||{},o=this.constraints;t&&f(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,e){let{top:n,left:o,bottom:i,right:r}=e;return{x:gi(t.x,o,r),y:gi(t.y,n,i)}}(n.layoutBox,t),this.elastic=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yi;return!1===t?t=0:!0===t&&(t=yi),{x:xi(t,"left","right"),y:xi(t,"top","bottom")}}(e),o!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&wi((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.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!f(t))return!1;const n=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=function(t,e,n){const o=Ui(t,n),{scroll:i}=e;return i&&(Bi(o.x,i.offset.x),Bi(o.y,i.offset.y)),o}(n,o.root,this.visualElement.getTransformPagePoint());let r=function(t,e){return{x:vi(t.x,e.x),y:vi(t.y,e.y)}}(o.layout.layoutBox,i);if(e){const t=e(function(t){let{x:e,y:n}=t;return{top:n.min,right:e.max,bottom:n.max,left:e.min}}(r));this.hasMutatedConstraints=!!t,t&&(r=Pi(t))}return r}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:o,dragTransition:i,dragSnapToOrigin:r,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=wi((s=>{var l;if(!Wi(s,e,this.currentDirection))return;let u=null!==(l=null==a?void 0:a[s])&&void 0!==l?l:{};r&&(u={min:0,max:0});const c=o?200:1e6,h=o?40:1e7,d={type:"inertia",velocity:n?t[s]:0,bounceStiffness:c,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(s,d)}));return Promise.all(l).then(s)}startAxisValueAnimation(t,e){return wo(t,this.getAxisMotionValue(t),0,e)}stopAnimation(){wi((t=>this.getAxisMotionValue(t).stop()))}getAxisMotionValue(t){var e,n;const o="_drag"+t.toUpperCase();return this.visualElement.getProps()[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){wi((e=>{const{drag:n}=this.getProps();if(!Wi(e,n,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(e);if(o&&o.layout){const{min:n,max:r}=o.layout.layoutBox[e];i.set(t[e]-zn(n,r,.5))}}))}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!f(n)||!o||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};wi((t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();i[t]=function(t,e){let n=.5;const o=ui(t),i=ui(e);return i>o?n=Jn(e.min,e.max-o,t.min):o>i&&(n=Jn(t.min,t.max-i,e.min)),Nn(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",null===(t=o.root)||void 0===t||t.updateScroll(),o.updateLayout(),this.resolveConstraints(),wi((t=>{if(!Wi(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:r}=this.constraints[t];n.set(zn(o,r,i[t]))}))}addListeners(){var t;if(!this.visualElement.current)return;Ni.set(this.visualElement,this);const e=be(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),n=()=>{const{dragConstraints:t}=this.getProps();f(t)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",n);o&&!o.layout&&(null===(t=o.root)||void 0===t||t.updateScroll(),o.updateLayout()),n();const r=ue(window,"resize",(()=>this.scalePositionWithinConstraints())),s=o.addEventListener("didUpdate",(t=>{let{delta:e,hasLayoutChanged:n}=t;this.isDragging&&n&&(wi((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{r(),e(),i(),null==s||s()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:r=yi,dragMomentum:s=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:o,dragConstraints:i,dragElastic:r,dragMomentum:s}}}function Wi(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Hi={pan:He((function(t){let{onPan:n,onPanStart:o,onPanEnd:i,onPanSessionStart:r,visualElement:s}=t;const l=n||o||i||r,u=e.useRef(null),{transformPagePoint:c}=e.useContext(a),h={onSessionStart:r,onStart:o,onMove:n,onEnd:(t,e)=>{u.current=null,i&&i(t,e)}};e.useEffect((()=>{null!==u.current&&u.current.updateHandlers(h)})),we(s,"pointerdown",l&&function(t){u.current=new ni(t,h,{transformPagePoint:c})}),Re((()=>u.current&&u.current.end()))})),drag:He((function(t){const{dragControls:n,visualElement:o}=t,i=T((()=>new zi(o)));e.useEffect((()=>n&&n.subscribe(i)),[i,n]),e.useEffect((()=>i.addListeners()),[i])}))};function $i(t){return"string"==typeof t&&t.startsWith("var(--")}const Yi=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Xi(t,e){const[n,o]=function(t){const e=Yi.exec(t);if(!e)return[,];const[,n,o]=e;return[n,o]}(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);return i?i.trim():$i(o)?Xi(o,e):o}const Gi=new Set(["width","height","top","left","right","bottom","x","y"]),qi=t=>Gi.has(t),Zi=(t,e)=>{t.set(e,!1),t.set(e)},_i=t=>t===tt||t===st;var Ki;!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Ki||(Ki={}));const Ji=(t,e)=>parseFloat(t.split(", ")[e]),Qi=(t,e)=>(n,o)=>{let{transform:i}=o;if("none"===i||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/);if(r)return Ji(r[1],e);{const e=i.match(/^matrix\((.+)\)$/);return e?Ji(e[1],t):0}},tr=new Set(["x","y","z"]),er=U.filter((t=>!tr.has(t))),nr={width:(t,e)=>{let{x:n}=t,{paddingLeft:o="0",paddingRight:i="0"}=e;return n.max-n.min-parseFloat(o)-parseFloat(i)},height:(t,e)=>{let{y:n}=t,{paddingTop:o="0",paddingBottom:i="0"}=e;return n.max-n.min-parseFloat(o)-parseFloat(i)},top:(t,e)=>{let{top:n}=e;return parseFloat(n)},left:(t,e)=>{let{left:n}=e;return parseFloat(n)},bottom:(t,e)=>{let{y:n}=t,{top:o}=e;return parseFloat(o)+(n.max-n.min)},right:(t,e)=>{let{x:n}=t,{left:o}=e;return parseFloat(o)+(n.max-n.min)},x:Qi(4,13),y:Qi(5,14)},or=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e={...e},o={...o};const i=Object.keys(e).filter(qi);let r=[],s=!1;const a=[];if(i.forEach((i=>{const l=t.getValue(i);if(!t.hasValue(i))return;let u=n[i],c=Lo(u);const h=e[i];let d;if(te(h)){const t=h.length,e=null===h[0]?1:0;u=h[e],c=Lo(u);for(let n=e;n<t;n++)d?Lo(h[n]):d=Lo(h[n])}else d=Lo(h);if(c!==d)if(_i(c)&&_i(d)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof h?e[i]=parseFloat(h):Array.isArray(h)&&d===st&&(e[i]=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[i]=c.transform(h):(s||(r=function(t){const e=[];return er.forEach((n=>{const o=t.getValue(n);void 0!==o&&(e.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))})),e.length&&t.render(),e}(t),s=!0),a.push(i),o[i]=void 0!==o[i]?o[i]:e[i],Zi(l,h))})),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,i=((t,e,n)=>{const o=e.measureViewportBox(),i=e.current,r=getComputedStyle(i),{display:s}=r,a={};"none"===s&&e.setStaticValue("display",t.display||"block"),n.forEach((t=>{a[t]=nr[t](o,r)})),e.render();const l=e.measureViewportBox();return n.forEach((n=>{const o=e.getValue(n);Zi(o,a[n]),t[n]=nr[n](l,r)})),t})(e,t,a);return r.length&&r.forEach((e=>{let[n,o]=e;t.getValue(n).set(o)})),t.render(),h&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:o}}return{target:e,transitionEnd:o}};function ir(t,e,n,o){return(t=>Object.keys(t).some(qi))(e)?or(t,e,n,o):{target:e,transitionEnd:o}}const rr=(t,e,n,o)=>{const i=function(t,e,n){let{...o}=e;const i=t.current;if(!(i instanceof Element))return{target:o,transitionEnd:n};n&&(n={...n}),t.values.forEach((t=>{const e=t.get();if(!$i(e))return;const n=Xi(e,i);n&&t.set(n)}));for(const t in o){const e=o[t];if(!$i(e))continue;const r=Xi(e,i);r&&(o[t]=r,n&&void 0===n[t]&&(n[t]=e))}return{target:o,transitionEnd:n}}(t,e,o);return ir(t,e=i.target,n,o=i.transitionEnd)},sr={current:null},ar={current:!1};function lr(){if(ar.current=!0,h)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>sr.current=t.matches;t.addListener(e),e()}else sr.current=!1}const ur=Object.keys(P),cr=ur.length,hr=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class dr{constructor(t){let{parent:e,props:n,reducedMotionConfig:o,visualState:i}=t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Dn.render(this.render,!1,!0);const{latestValues:s,renderState:a}=i;this.latestValues=s,this.baseTarget={...s},this.initialValues=n.initial?{...s}:{},this.renderState=a,this.parent=e,this.props=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=o,this.options=r,this.isControllingVariants=y(n),this.isVariantNode=x(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(n);for(const t in u){const e=u[t];void 0!==s[t]&&W(e)&&(e.set(s[t],!1),zo(l)&&l.add(t))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var e;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=null===(e=this.parent)||void 0===e?void 0:e.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),ar.current||lr(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||sr.current),this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,e,n;null===(t=this.projection)||void 0===t||t.unmount(),kn.update(this.notifyUpdate),kn.render(this.render),this.valueSubscriptions.forEach((t=>t())),null===(e=this.removeFromVariantTree)||void 0===e||e.call(this),null===(n=this.parent)||void 0===n||n.children.delete(this);for(const t in this.events)this.events[t].clear();this.current=null}bindToMotionValue(t,e){const n=N.has(t),o=e.onChange((e=>{this.latestValues[t]=e,this.props.onUpdate&&Dn.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=e.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(t,(()=>{o(),i()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures(t,n,o,i,r,s){const a=[];for(let n=0;n<cr;n++){const o=ur[n],{isEnabled:i,Component:r}=P[o];i(t)&&r&&a.push(e.createElement(r,{key:o,...t,visualElement:this}))}if(!this.projection&&r){this.projection=new r(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:o,dragConstraints:a,layoutScroll:l}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(o)||a&&f(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,layoutScroll:l})}return a}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.makeTargetAnimatableFromInstance(t,this.props,e)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let e=0;e<hr.length;e++){const n=hr[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const o=t["on"+n];o&&(this.propEventSubscriptions[n]=this.on(n,o))}this.prevMotionValues=function(t,e,n){const{willChange:o}=e;for(const i in e){const r=e[i],s=n[i];if(W(r))t.addValue(i,r),zo(o)&&o.add(i);else if(W(s))t.addValue(i,Co(r)),zo(o)&&o.remove(i);else if(s!==r)if(t.hasValue(i)){const e=t.getValue(i);!e.hasAnimated&&e.set(r)}else{const e=t.getStaticValue(i);t.addValue(i,Co(void 0!==e?e:r))}}for(const o in n)void 0===e[o]&&t.removeValue(o);return e}(this,this.scrapeMotionValuesFromProps(t),this.prevMotionValues)}getProps(){return this.props}getVariant(t){var e;return null===(e=this.props.variants)||void 0===e?void 0:e[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var t;return this.isVariantNode?this:null===(t=this.parent)||void 0===t?void 0:t.getClosestVariantNode()}getVariantContext(){var t,e;if(arguments.length>0&&void 0!==arguments[0]&&arguments[0])return null===(t=this.parent)||void 0===t?void 0:t.getVariantContext();if(!this.isControllingVariants){const t=(null===(e=this.parent)||void 0===e?void 0:e.getVariantContext())||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const n={};for(let t=0;t<fr;t++){const e=pr[t],o=this.props[e];(m(o)||!1===o)&&(n[e]=o)}return n}addVariantChild(t){var e;const n=this.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),()=>n.variantChildren.delete(t)}addValue(t,e){this.hasValue(t)&&this.removeValue(t),this.values.set(t,e),this.latestValues[t]=e.get(),this.bindToMotionValue(t,e)}removeValue(t){var e;this.values.delete(t),null===(e=this.valueSubscriptions.get(t))||void 0===e||e(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Co(e),this.addValue(t,n)),n}readValue(t){return void 0===this.latestValues[t]&&this.current?this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,o="string"==typeof n||"object"==typeof n?null===(e=Qt(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==o)return o;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||W(i)?void 0!==this.initialValues[t]&&void 0===o?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new Ao),this.events[t].add(e)}notify(t){for(var e,n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];null===(e=this.events[t])||void 0===e||e.notify(...o)}}const pr=["initial",...Go],fr=pr.length;class mr extends dr{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]}removeValueFromRenderState(t,e){let{vars:n,style:o}=e;delete n[t],delete o[t]}makeTargetAnimatableFromInstance(t,e,n){let{transition:o,transitionEnd:i,...r}=t,{transformValues:s}=e,a=No(r,o||{},this);if(s&&(i&&(i=s(i)),r&&(r=s(r)),a&&(a=s(a))),n){Io(this,r,a);const t=rr(this,r,a,i);i=t.transitionEnd,r=t.target}return{transition:o,transitionEnd:i,...r}}}class gr extends mr{readValueFromInstance(t,e){if(N.has(e)){const t=bn(e);return t&&t.default||0}{const o=(n=t,window.getComputedStyle(n)),i=(X(e)?o.getPropertyValue(e):o[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,e){let{transformPagePoint:n}=e;return Ui(t,n)}build(t,e,n,o){Mt(t,e,n,o.transformTemplate)}scrapeMotionValuesFromProps(t){return Kt(t)}renderInstance(t,e,n,o){qt(t,e,n,o)}}class vr extends mr{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){var n;return N.has(e)?(null===(n=bn(e))||void 0===n?void 0:n.default)||0:(e=Zt.has(e)?e:Gt(e),t.getAttribute(e))}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(t){return Jt(t)}build(t,e,n,o){Wt(t,e,n,this.isSVGTag,o.transformTemplate)}renderInstance(t,e,n,o){_t(t,e,0,o)}mount(t){this.isSVGTag=$t(t.tagName),super.mount(t)}}const yr=(t,e)=>O(t)?new vr(e,{enableHardwareAcceleration:!1}):new gr(e,{enableHardwareAcceleration:!0});function xr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Er={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!st.test(t))return t;t=parseFloat(t)}return`${xr(t,e.target.x)}% ${xr(t,e.target.y)}%`}},br={correct:(t,e)=>{let{treeScale:n,projectionDelta:o}=e;const i=t,r=t.includes("var("),s=[];r&&(t=t.replace(Yi,(t=>(s.push(t),"_$css"))));const a=wt.parse(t);if(a.length>5)return i;const l=wt.createTransformer(t),u="number"!=typeof a[0]?1:0,c=o.x.scale*n.x,h=o.y.scale*n.y;a[0+u]/=c,a[1+u]/=h;const d=zn(c,h,.5);"number"==typeof a[2+u]&&(a[2+u]/=d),"number"==typeof a[3+u]&&(a[3+u]/=d);let p=l(a);if(r){let t=0;p=p.replace("_$css",(()=>{const e=s[t];return t++,e}))}return p}};class wr extends r.default.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:o}=this.props,{projection:i}=t;I(Pr),i&&(e.group&&e.group.add(i),n&&n.register&&o&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",(()=>{this.safeToRemove()})),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),A.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:o,isPresent:i}=this.props,r=n.projection;return r?(r.isPresent=i,o||t.layoutDependency!==e||void 0===e?r.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?r.promote():r.relegate()||Dn.postRender((()=>{var t;(null===(t=r.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:o}=t;o&&(o.scheduleCheckAfterUnmount(),(null==e?void 0:e.group)&&e.group.remove(o),(null==n?void 0:n.deregister)&&n.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;null==t||t()}render(){return null}}const Pr={borderRadius:{...Er,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Er,borderTopRightRadius:Er,borderBottomLeftRadius:Er,borderBottomRightRadius:Er,boxShadow:br},Sr={measureLayout:function(t){const[n,o]=Ye(),i=e.useContext(C);return r.default.createElement(wr,{...t,layoutGroup:i,switchLayoutGroup:e.useContext(R),isPresent:n,safeToRemove:o})}};function Tr(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=W(t)?t:Co(t);return wo("",o,e,n),{stop:()=>o.stop(),isAnimating:()=>o.isAnimating()}}const Ar=["TopLeft","TopRight","BottomLeft","BottomRight"],Vr=Ar.length,Cr=t=>"string"==typeof t?parseFloat(t):t,Mr=t=>"number"==typeof t||st.test(t);function Rr(t,e){var n;return null!==(n=t[e])&&void 0!==n?n:t.borderRadius}const Lr=kr(0,.5,on),Dr=kr(.5,.95,qe);function kr(t,e,n){return o=>o<t?0:o>e?1:n(Jn(t,e,o))}function Br(t,e){t.min=e.min,t.max=e.max}function jr(t,e){Br(t.x,e.x),Br(t.y,e.y)}function Or(t,e,n,o,i){return t=Mi(t-=e,1/n,o),void 0!==i&&(t=Mi(t,1/i,o)),t}function Fr(t,e,n,o,i){let[r,s,a]=n;!function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:t,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:t;if(rt.test(e)&&(e=parseFloat(e),e=zn(s.min,s.max,e/100)-s.min),"number"!=typeof e)return;let a=zn(r.min,r.max,o);t===r&&(a-=e),t.min=Or(t.min,e,n,a,i),t.max=Or(t.max,e,n,a,i)}(t,e[r],e[s],e[a],e.scale,o,i)}const Ir=["x","scaleX","originX"],Ur=["y","scaleY","originY"];function Nr(t,e,n,o){Fr(t.x,e,Ir,null==n?void 0:n.x,null==o?void 0:o.x),Fr(t.y,e,Ur,null==n?void 0:n.y,null==o?void 0:o.y)}function zr(t){return 0===t.translate&&1===t.scale}function Wr(t){return zr(t.x)&&zr(t.y)}function Hr(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}function $r(t){return ui(t.x)/ui(t.y)}class Yr{constructor(){this.members=[]}add(t){So(this.members,t),t.scheduleRender()}remove(t){if(To(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 o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,e&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),(null===(n=t.root)||void 0===n?void 0:n.isUpdating)&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&o.hide()}}exitAnimationComplete(){this.members.forEach((t=>{var e,n,o,i,r;null===(n=(e=t.options).onExitComplete)||void 0===n||n.call(e),null===(r=null===(o=t.resumingFrom)||void 0===o?void 0:(i=o.options).onExitComplete)||void 0===r||r.call(i)}))}scheduleRender(){this.members.forEach((t=>{t.instance&&t.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Xr(t,e,n){let o="";const i=t.x.translate/e.x,r=t.y.translate/e.y;if((i||r)&&(o=`translate3d(${i}px, ${r}px, 0) `),1===e.x&&1===e.y||(o+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:i}=n;t&&(o+=`rotate(${t}deg) `),e&&(o+=`rotateX(${e}deg) `),i&&(o+=`rotateY(${i}deg) `)}const s=t.x.scale*e.x,a=t.y.scale*e.y;return 1===s&&1===a||(o+=`scale(${s}, ${a})`),o||"none"}const Gr=(t,e)=>t.depth-e.depth;class qr{constructor(){this.children=[],this.isDirty=!1}add(t){So(this.children,t),this.isDirty=!0}remove(t){To(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Gr),this.isDirty=!1,this.children.forEach(t)}}const Zr=["","X","Y","Z"];let _r=0;function Kr(t){let{attachResizeListener:e,defaultParent:n,measureScroll:o,checkIsScrollRoot:i,resetTransform:r}=t;return class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null==n?void 0:n();this.id=_r++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!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(ts),this.nodes.forEach(rs),this.nodes.forEach(ss)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=t,this.latestValues=e,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.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 qr)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Ao),this.eventHandlers.get(t).add(e)}notifyListeners(t){const e=this.eventHandlers.get(t);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];null==e||e.notify(...o)}hasListeners(t){return this.eventHandlers.has(t)}registerPotentialNode(t,e){this.potentialNodes.set(t,e)}mount(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var o;if(this.instance)return;this.isSVG=t instanceof SVGElement&&"svg"!==t.tagName,this.instance=t;const{layoutId:i,layout:r,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),null===(o=this.parent)||void 0===o||o.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),n&&(r||i)&&(this.isLayoutDirty=!0),e){let n;const o=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Un(o,250),A.hasAnimatedSinceResize&&(A.hasAnimatedSinceResize=!1,this.nodes.forEach(is))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||r)&&this.addEventListener("didUpdate",(t=>{let{delta:e,hasLayoutChanged:n,hasRelativeTargetChanged:o,layout:i}=t;var r,a,l,u,c;if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const h=null!==(a=null!==(r=this.options.transition)&&void 0!==r?r:s.getDefaultTransition())&&void 0!==a?a:ds,{onLayoutAnimationStart:d,onLayoutAnimationComplete:p}=s.getProps(),f=!this.targetLayout||!Hr(this.targetLayout,i)||o,m=!n&&o;if((null===(l=this.resumeFrom)||void 0===l?void 0:l.instance)||m||n&&(f||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,m);const t={...bo(h,"layout"),onPlay:d,onComplete:p};s.shouldReduceMotion&&(t.delay=0,t.type=!1),this.startAnimation(t)}else n||0!==this.animationProgress||is(this),this.isLead()&&(null===(c=(u=this.options).onExitComplete)||void 0===c||c.call(u));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,kn.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(as),this.animationId++)}willUpdate(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];var e,n,o;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("snapshot")}const{layoutId:i,layout:r}=this.options;if(void 0===i&&!r)return;const s=null===(o=this.options.visualElement)||void 0===o?void 0:o.getProps().transformTemplate;this.prevTransformTemplateValue=null==s?void 0:s(this.latestValues,""),this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ns);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(ps),this.potentialNodes.clear()),this.nodes.forEach(os),this.nodes.forEach(Jr),this.nodes.forEach(Qr),this.clearAllSnapshots(),Bn.update(),Bn.preRender(),Bn.render())}clearAllSnapshots(){this.nodes.forEach(es),this.sharedNodes.forEach(ls)}scheduleUpdateProjection(){Dn.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Dn.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}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.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),null===(t=this.options.visualElement)||void 0===t||t.notify("LayoutMeasure",this.layout.layoutBox,null==e?void 0:e.layoutBox)}updateScroll(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"measure",e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:i(this.instance),offset:o(this.instance)})}resetTransform(){var t;if(!r)return;const e=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!Wr(this.projectionDelta),o=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate,i=null==o?void 0:o(this.latestValues,""),s=i!==this.prevTransformTemplateValue;e&&(n||Ai(this.latestValues)||s)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=this.measurePageBox();let n=this.removeElementScroll(e);var o;return t&&(n=this.removeTransform(n)),fs((o=n).x),fs(o.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(Bi(e.x,n.offset.x),Bi(e.y,n.offset.y)),e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};jr(e,t);for(let n=0;n<this.path.length;n++){const o=this.path[n],{scroll:i,options:r}=o;if(o!==this.root&&i&&r.layoutScroll){if(i.isRoot){jr(e,t);const{scroll:n}=this.root;n&&(Bi(e.x,-n.offset.x),Bi(e.y,-n.offset.y))}Bi(e.x,i.offset.x),Bi(e.y,i.offset.y)}}return e}applyTransform(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n={x:{min:0,max:0},y:{min:0,max:0}};jr(n,t);for(let t=0;t<this.path.length;t++){const o=this.path[t];!e&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ii(n,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),Ai(o.latestValues)&&Ii(n,o.latestValues)}return Ai(this.latestValues)&&Ii(n,this.latestValues),n}removeTransform(t){var e;const n={x:{min:0,max:0},y:{min:0,max:0}};jr(n,t);for(let t=0;t<this.path.length;t++){const o=this.path[t];if(!o.instance)continue;if(!Ai(o.latestValues))continue;Ti(o.latestValues)&&o.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};jr(i,o.measurePageBox()),Nr(n,o.latestValues,null===(e=o.snapshot)||void 0===e?void 0:e.layoutBox,i)}return Ai(this.latestValues)&&Nr(n,this.latestValues),n}setTargetDelta(t){this.targetDelta=t,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var t;const e=this.getLead();if(this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),!this.isProjectionDirty&&!this.attemptToResolveRelativeTarget)return;const{layout:n,layoutId:o}=this.options;if(this.layout&&(n||o)){if(!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout?(this.relativeParent=t,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},mi(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),jr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var i,r,s;if((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,r=this.relativeTarget,s=this.relativeParent.target,pi(i.x,r.x,s.x),pi(i.y,r.y,s.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):jr(this.target,this.layout.layoutBox),Di(this.target,this.targetDelta)):jr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target?(this.relativeParent=t,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},mi(this.relativeTargetOrigin,this.target,t.target),jr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!Ti(this.parent.latestValues)&&!Vi(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var t;const{isProjectionDirty:e,isTransformDirty:n}=this;this.isProjectionDirty=this.isTransformDirty=!1;const o=this.getLead(),i=Boolean(this.resumingFrom)||this!==o;let r=!0;if(e&&(r=!1),i&&n&&(r=!1),r)return;const{layout:s,layoutId:a}=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||!s&&!a)return;jr(this.layoutCorrected,this.layout.layoutBox),function(t,e,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];var i,r;const s=n.length;if(!s)return;let a,l;e.x=e.y=1;for(let u=0;u<s;u++)a=n[u],l=a.projectionDelta,"contents"!==(null===(r=null===(i=a.instance)||void 0===i?void 0:i.style)||void 0===r?void 0:r.display)&&(o&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Ii(t,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),l&&(e.x*=l.x.scale,e.y*=l.y.scale,Di(t,l)),o&&Ai(a.latestValues)&&Ii(t,a.latestValues));e.x=ki(e.x),e.y=ki(e.y)}(this.layoutCorrected,this.treeScale,this.path,i);const{target:l}=o;if(!l)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 u=this.treeScale.x,c=this.treeScale.y,h=this.projectionTransform;di(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=Xr(this.projectionDelta,this.treeScale),this.projectionTransform===h&&this.treeScale.x===u&&this.treeScale.y===c||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];var e,n,o;null===(n=(e=this.options).scheduleRender)||void 0===n||n.call(e),t&&(null===(o=this.getStack())||void 0===o||o.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var n,o;const i=this.snapshot,r=(null==i?void 0:i.latestValues)||{},s={...this.latestValues},a={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 l={x:{min:0,max:0},y:{min:0,max:0}},u=(null==i?void 0:i.source)!==(null===(n=this.layout)||void 0===n?void 0:n.source),c=((null===(o=this.getStack())||void 0===o?void 0:o.members.length)||0)<=1,h=Boolean(u&&!c&&!0===this.options.crossfade&&!this.path.some(hs));this.animationProgress=0,this.mixTargetDelta=e=>{var n;const o=e/1e3;var i,d,p,f;us(a.x,t.x,o),us(a.y,t.y,o),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(null===(n=this.relativeParent)||void 0===n?void 0:n.layout)&&(mi(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox),i=this.relativeTarget,d=this.relativeTargetOrigin,p=l,f=o,cs(i.x,d.x,p.x,f),cs(i.y,d.y,p.y,f)),u&&(this.animationValues=s,function(t,e,n,o,i,r){var s,a,l,u;i?(t.opacity=zn(0,null!==(s=n.opacity)&&void 0!==s?s:1,Lr(o)),t.opacityExit=zn(null!==(a=e.opacity)&&void 0!==a?a:1,0,Dr(o))):r&&(t.opacity=zn(null!==(l=e.opacity)&&void 0!==l?l:1,null!==(u=n.opacity)&&void 0!==u?u:1,o));for(let i=0;i<Vr;i++){const r=`border${Ar[i]}Radius`;let s=Rr(e,r),a=Rr(n,r);void 0===s&&void 0===a||(s||(s=0),a||(a=0),0===s||0===a||Mr(s)===Mr(a)?(t[r]=Math.max(zn(Cr(s),Cr(a),o),0),(rt.test(a)||rt.test(s))&&(t[r]+="%")):t[r]=a)}(e.rotate||n.rotate)&&(t.rotate=zn(e.rotate||0,n.rotate||0,o))}(s,r,this.latestValues,o,h,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=o},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&&(kn.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Dn.update((()=>{A.hasAnimatedSinceResize=!0,this.currentAnimation=Tr(0,1e3,{...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 t=this.getLead();let{targetWithTransforms:e,target:n,layout:o,latestValues:i}=t;if(e&&n&&o){if(this!==t&&this.layout&&o&&ms(this.options.animationType,this.layout.layoutBox,o.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=ui(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const o=ui(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+o}jr(e,n),Ii(e,i),di(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){var n,o,i;this.sharedNodes.has(t)||this.sharedNodes.set(t,new Yr),this.sharedNodes.get(t).add(e),e.promote({transition:null===(n=e.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(i=null===(o=e.options.initialPromotionConfig)||void 0===o?void 0:o.shouldPreserveFollowOpacity)||void 0===i?void 0:i.call(o,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(){let{needsReset:t,transition:e,preserveFollowOpacity:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=this.getStack();o&&o.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const o={};for(let e=0;e<Zr.length;e++){const i="rotate"+Zr[e];n[i]&&(o[i]=n[i],t.setStaticValue(i,0))}null==t||t.render();for(const e in o)t.setStaticValue(e,o[e]);t.scheduleRender()}getProjectionStyles(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var e,n,o;const i={};if(!this.instance||this.isSVG)return i;if(!this.isVisible)return{visibility:"hidden"};i.visibility="";const r=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=ne(t.pointerEvents)||"",i.transform=r?r(this.latestValues,""):"none",i;const s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=ne(t.pointerEvents)||""),this.hasProjected&&!Ai(this.latestValues)&&(e.transform=r?r({},""):"none",this.hasProjected=!1),e}const a=s.animationValues||s.latestValues;this.applyTransformsToTarget(),i.transform=Xr(this.projectionDeltaWithTransform,this.treeScale,a),r&&(i.transform=r(a,i.transform));const{x:l,y:u}=this.projectionDelta;i.transformOrigin=`${100*l.origin}% ${100*u.origin}% 0`,s.animationValues?i.opacity=s===this?null!==(o=null!==(n=a.opacity)&&void 0!==n?n:this.latestValues.opacity)&&void 0!==o?o:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:i.opacity=s===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const t in F){if(void 0===a[t])continue;const{correct:e,applyTo:n}=F[t],o=e(a[t],s);if(n){const t=n.length;for(let e=0;e<t;e++)i[n[e]]=o}else i[t]=o}return this.options.layoutId&&(i.pointerEvents=s===this?ne(t.pointerEvents)||"":"none"),i}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(ns),this.root.sharedNodes.clear()}}}function Jr(t){t.updateLayout()}function Qr(t){var e,n,o;const i=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:n}=t.layout,{animationType:o}=t.options,r=i.source!==t.layout.source;"size"===o?wi((t=>{const n=r?i.measuredBox[t]:i.layoutBox[t],o=ui(n);n.min=e[t].min,n.max=n.min+o})):ms(o,i.layoutBox,e)&&wi((t=>{const n=r?i.measuredBox[t]:i.layoutBox[t],o=ui(e[t]);n.max=n.min+o}));const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};di(s,e,i.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};r?di(a,t.applyTransform(n,!0),i.measuredBox):di(a,e,i.layoutBox);const l=!Wr(s);let u=!1;if(!t.resumeFrom){const n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:t,layout:o}=n;if(t&&o){const n={x:{min:0,max:0},y:{min:0,max:0}};mi(n,i.layoutBox,t.layoutBox);const r={x:{min:0,max:0},y:{min:0,max:0}};mi(r,e,o.layoutBox),Hr(n,r)||(u=!0)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:i,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else t.isLead()&&(null===(o=(n=t.options).onExitComplete)||void 0===o||o.call(n));t.options.transition=void 0}function ts(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function es(t){t.clearSnapshot()}function ns(t){t.clearMeasurements()}function os(t){const{visualElement:e}=t.options;(null==e?void 0:e.getProps().onBeforeLayoutMeasure)&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function is(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function rs(t){t.resolveTargetDelta()}function ss(t){t.calcProjection()}function as(t){t.resetRotation()}function ls(t){t.removeLeadSnapshot()}function us(t,e,n){t.translate=zn(e.translate,0,n),t.scale=zn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function cs(t,e,n,o){t.min=zn(e.min,n.min,o),t.max=zn(e.max,n.max,o)}function hs(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const ds={duration:.45,ease:[.4,0,.1,1]};function ps(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 o=(n&&n!==t.root?n.instance:document).querySelector(`[data-projection-id="${e}"]`);o&&t.mount(o,!0)}function fs(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function ms(t,e,n){return"position"===t||"preserve-aspect"===t&&!ci($r(e),$r(n),.2)}const gs=Kr({attachResizeListener:(t,e)=>ue(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),vs={current:void 0},ys=Kr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!vs.current){const t=new gs(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),vs.current=t}return vs.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),xs={...Qo,...$e,...Hi,...Sr},Es=B(((t,e)=>ae(t,e,xs,yr,ys))),bs=B(ae);function ws(){const t=e.useRef(!1);return d((()=>(t.current=!0,()=>{t.current=!1})),[]),t}function Ps(){const t=ws(),[n,o]=e.useState(0),i=e.useCallback((()=>{t.current&&o(n+1)}),[n]);return[e.useCallback((()=>Dn.postRender(i)),[i]),n]}class Ss extends s.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Ts(t){let{children:n,isPresent:o}=t;const i=e.useId(),r=e.useRef(null),a=e.useRef({width:0,height:0,top:0,left:0});return e.useInsertionEffect((()=>{const{width:t,height:e,top:n,left:s}=a.current;if(o||!r.current||!t||!e)return;r.current.dataset.motionPopId=i;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${i}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n top: ${n}px !important;\n left: ${s}px !important;\n }\n `),()=>{document.head.removeChild(l)}}),[o]),s.createElement(Ss,{isPresent:o,childRef:r,sizeRef:a},s.cloneElement(n,{ref:r}))}const As=t=>{let{children:n,initial:o,isPresent:i,onExitComplete:r,custom:a,presenceAffectsLayout:l,mode:u}=t;const h=T(Vs),d=e.useId(),p=e.useMemo((()=>({id:d,initial:o,isPresent:i,custom:a,onExitComplete:t=>{h.set(t,!0);for(const t of h.values())if(!t)return;r&&r()},register:t=>(h.set(t,!1),()=>h.delete(t))})),l?void 0:[i]);return e.useMemo((()=>{h.forEach(((t,e)=>h.set(e,!1)))}),[i]),s.useEffect((()=>{!i&&!h.size&&r&&r()}),[i]),"popLayout"===u&&(n=s.createElement(Ts,{isPresent:i},n)),s.createElement(c.Provider,{value:p},n)};function Vs(){return new Map}const Cs=t=>t.key||"",Ms=e.createContext(null),Rs=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Ls(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Rs);return{add:o=>{t.add(o),e.set(o,o.addEventListener("willUpdate",n))},remove:o=>{var i;t.delete(o),null===(i=e.get(o))||void 0===i||i(),e.delete(o),n()},dirty:n}}const Ds=t=>!0===t,ks=t=>{let{children:n,id:o,inheritId:i,inherit:r=!0}=t;void 0!==i&&(r=i);const a=e.useContext(C),l=e.useContext(Ms),[u,c]=Ps(),h=e.useRef(null),d=a.id||l;null===h.current&&((t=>Ds(!0===t)||"id"===t)(r)&&d&&(o=o?d+"-"+o:d),h.current={id:o,group:Ds(r)&&a.group||Ls()});const p=e.useMemo((()=>({...h.current,forceRender:u})),[c]);return s.createElement(C.Provider,{value:p},n)};let Bs=0;function js(t){return"function"==typeof t}const Os=e.createContext(null),Fs=e.forwardRef((function(t,n){let{children:o,as:i="ul",axis:r="y",onReorder:a,values:l,...u}=t;const c=T((()=>Es(i))),h=[],d=e.useRef(!1),p={axis:r,registerItem:(t,e)=>{e&&-1===h.findIndex((e=>t===e.value))&&(h.push({value:t,layout:e[r]}),h.sort(Us))},updateOrder:(t,e,n)=>{if(d.current)return;const o=function(t,e,n,o){if(!o)return t;const i=t.findIndex((t=>t.value===e));if(-1===i)return t;const r=o>0?1:-1,s=t[i+r];if(!s)return t;const a=t[i],l=s.layout,u=zn(l.min,l.max,.5);return 1===r&&a.layout.max+n>u||-1===r&&a.layout.min+n<u?function(t,e,n){let[...o]=t;const i=e<0?o.length+e:e;if(i>=0&&i<o.length){const t=n<0?o.length+n:n,[i]=o.splice(e,1);o.splice(t,0,i)}return o}(t,i,i+r):t}(h,t,e,n);h!==o&&(d.current=!0,a(o.map(Is).filter((t=>-1!==l.indexOf(t)))))}};return e.useEffect((()=>{d.current=!1})),s.createElement(c,{...u,ref:n},s.createElement(Os.Provider,{value:p},o))}));function Is(t){return t.value}function Us(t,e){return t.layout.min-e.layout.min}function Ns(t){const n=T((()=>Co(t))),{isStatic:o}=e.useContext(a);if(o){const[,o]=e.useState(t);e.useEffect((()=>n.onChange(o)),[])}return n}function zs(){const t=!Array.isArray(arguments.length<=0?void 0:arguments[0]),e=t?0:-1,n=0+e<0||arguments.length<=0+e?void 0:arguments[0+e],o=2+e<0||arguments.length<=2+e?void 0:arguments[2+e],i=3+e<0||arguments.length<=3+e?void 0:arguments[3+e],r=eo(1+e<0||arguments.length<=1+e?void 0:arguments[1+e],o,{mixer:(s=o[0],(t=>"object"==typeof t&&t.mix)(s)?s.mix:void 0),...i});var s;return t?r(n):r}function Ws(t,e){const n=Ns(e()),o=()=>n.set(e());return o(),function(t,e,n){d((()=>{const o=t.map((t=>t.onChange(e)));return()=>{o.forEach((t=>t())),n()}}))}(t,(()=>Dn.update(o,!1,!0)),(()=>kn.update(o))),n}function Hs(t,e,n,o){const i="function"==typeof e?e:zs(e,n,o);return Array.isArray(t)?$s(t,i):$s([t],(t=>{let[e]=t;return i(e)}))}function $s(t,e){const n=T((()=>[]));return Ws(t,(()=>{n.length=0;const o=t.length;for(let e=0;e<o;e++)n[e]=t[e].get();return e(n)}))}function Ys(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return W(t)?t:Ns(e)}const Xs={Group:Fs,Item:e.forwardRef((function(t,n){let{children:o,style:i={},value:r,as:a="li",onDrag:l,layout:u=!0,...c}=t;const h=T((()=>Es(a))),d=e.useContext(Os),p={x:Ys(i.x),y:Ys(i.y)},f=Hs([p.x,p.y],(t=>{let[e,n]=t;return e||n?1:"unset"})),m=e.useRef(null),{axis:g,registerItem:v,updateOrder:y}=d;return e.useEffect((()=>{v(r,m.current)}),[d]),s.createElement(h,{drag:g,...c,dragSnapToOrigin:!0,style:{...i,x:p.x,y:p.y,zIndex:f},layout:u,onDrag:(t,e)=>{const{velocity:n}=e;n[g]&&y(r,p[g].get(),n[g]),l&&l(t,e)},onLayoutMeasure:t=>{m.current=t},ref:n},o)}))},Gs={renderer:yr,...Qo,...$e},qs={...Gs,...Hi,...Sr,projectionNodeConstructor:ys},Zs=t=>"number"==typeof t;function _s(t,e){return(t=>Array.isArray(t)&&!Zs(t[0]))(t)?t[((t,e,n)=>{const o=e-t;return((n-t)%o+o)%o+t})(0,t.length,e)]:t}const Ks=(t,e,n)=>-n*t+n*e+t,Js=t=>t,Qs=(t,e,n)=>e-t==0?1:(n-t)/(e-t);function ta(t,e){const n=t[t.length-1];for(let o=1;o<=e;o++){const i=Qs(0,e,o);t.push(Ks(n,1,i))}}function ea(t){const e=[0];return ta(e,t-1),e}function na(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ea(t.length),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Js;const o=t.length,i=o-e.length;return i>0&&ta(e,i),i=>{let r=0;for(;r<o-2&&!(i<e[r+1]);r++);let s=(a=0,l=1,u=Qs(e[r],e[r+1],i),Math.min(Math.max(u,a),l));var a,l,u;return s=_s(n,r)(s),Ks(t[r],t[r+1],s)}}const oa=t=>"function"==typeof t,ia=t=>"string"==typeof t;function ra(t,e){var n;return"string"==typeof t?e?(null!==(n=e[t])&&void 0!==n||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const sa={any:0,all:1},aa=new WeakMap;let la;function ua(t){let{target:e,contentRect:n,borderBoxSize:o}=t;var i;null===(i=aa.get(e))||void 0===i||i.forEach((t=>{t({target:e,contentSize:n,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(e,o)}})}))}function ca(t){t.forEach(ua)}function ha(t,e){la||"undefined"!=typeof ResizeObserver&&(la=new ResizeObserver(ca));const n=ra(t);return n.forEach((t=>{let n=aa.get(t);n||(n=new Set,aa.set(t,n)),n.add(e),null==la||la.observe(t)})),()=>{n.forEach((t=>{const n=aa.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==la||la.unobserve(t)}))}}const da=new Set;let pa;function fa(t){return da.add(t),pa||(pa=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};da.forEach((t=>t(e)))},window.addEventListener("resize",pa)),()=>{da.delete(t),!da.size&&pa&&(pa=void 0)}}const ma={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ga(t,e,n,o){const i=n[e],{length:r,position:s}=ma[e],a=i.current,l=n.time;i.current=t["scroll"+s],i.scrollLength=t["scroll"+r]-t["client"+r],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=Qs(0,i.scrollLength,i.current);const u=o-l;var c,h;i.velocity=u>50?0:(c=i.current-a,(h=u)?c*(1e3/h):0)}const va={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},ya={start:0,center:.5,end:1};function xa(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=0;if(void 0!==ya[t]&&(t=ya[t]),ia(t)){const e=parseFloat(t);t.endsWith("px")?o=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?o=e/100*document.documentElement.clientWidth:t.endsWith("vh")?o=e/100*document.documentElement.clientHeight:t=e}return Zs(t)&&(o=e*t),n+o}const Ea=[0,0];function ba(t,e,n,o){let i=Array.isArray(t)?t:Ea,r=0,s=0;return Zs(t)?i=[t,t]:ia(t)&&(i=(t=t.trim()).includes(" ")?t.split(" "):[t,ya[t]?t:"0"]),r=xa(i[0],n,o),s=xa(i[1],e),r-s}const wa={x:0,y:0};function Pa(t,e,n){let{offset:o=va.All}=n;const{target:i=t,axis:r="y"}=n,s="y"===r?"height":"width",a=i!==t?function(t,e){let n={x:0,y:0},o=t;for(;o&&o!==e;)if(o instanceof HTMLElement)n.x+=o.offsetLeft,n.y+=o.offsetTop,o=o.offsetParent;else if(o instanceof SVGGraphicsElement&&"getBBox"in o){const{top:t,left:e}=o.getBBox();for(n.x+=e,n.y+=t;o&&"svg"!==o.tagName;)o=o.parentNode}return n}(i,t):wa,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:{width:i.clientWidth,height:i.clientHeight},u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let c=!e[r].interpolate;const h=o.length;for(let t=0;t<h;t++){const n=ba(o[t],u[s],l[s],a[r]);c||n===e[r].interpolatorOffsets[t]||(c=!0),e[r].offset[t]=n}c&&(e[r].interpolate=na(ea(h),e[r].offset),e[r].interpolatorOffsets=[...e[r].offset]),e[r].progress=e[r].interpolate(e[r].current)}function Sa(t,e,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=o.axis||"y";return{measure:()=>function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=arguments.length>2?arguments[2]:void 0;if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let o=e;for(;o&&o!=t;)n.x.targetOffset+=o.offsetLeft,n.y.targetOffset+=o.offsetTop,o=o.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,o.target,n),update:e=>{!function(t,e,n){ga(t,"x",e,n),ga(t,"y",e,n),e.time=n}(t,n,e),(o.offset||o.target)&&Pa(t,n,o)},notify:oa(e)?()=>e(n):Ta(e,n[i])}}function Ta(t,e){return t.pause(),t.forEachNative(((t,e)=>{let{easing:n}=e;var o,i;if(t.updateDuration)n||(t.easing=Js),t.updateDuration(1);else{const e={duration:1e3};n||(e.easing="linear"),null===(i=null===(o=t.effect)||void 0===o?void 0:o.updateTiming)||void 0===i||i.call(o,e)}})),()=>{t.currentTime=e.progress}}const Aa=new WeakMap,Va=new WeakMap,Ca=new WeakMap,Ma=t=>t===document.documentElement?window:t;function Ra(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var{container:n=document.documentElement}=e,o=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(n[o[i]]=t[o[i]])}return n}(e,["container"]);let i=Ca.get(n);i||(i=new Set,Ca.set(n,i));const r=Sa(n,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},o);if(i.add(r),!Aa.has(n)){const t=()=>{const t=performance.now();for(const t of i)t.measure();for(const e of i)e.update(t);for(const t of i)t.notify()};Aa.set(n,t);const e=Ma(n);window.addEventListener("resize",t,{passive:!0}),n!==document.documentElement&&Va.set(n,(a=t,oa(s=n)?fa(s):ha(s,a))),e.addEventListener("scroll",t,{passive:!0})}var s,a;const l=Aa.get(n),u=requestAnimationFrame(l);return()=>{var e;"function"!=typeof t&&t.stop(),cancelAnimationFrame(u);const o=Ca.get(n);if(!o)return;if(o.delete(r),o.size)return;const i=Aa.get(n);Aa.delete(n),i&&(Ma(n).removeEventListener("scroll",i),null===(e=Va.get(n))||void 0===e||e(),window.removeEventListener("resize",i))}}const La=()=>({scrollX:Co(0),scrollY:Co(0),scrollXProgress:Co(0),scrollYProgress:Co(0)});function Da(){let{container:t,target:n,layoutEffect:o=!0,...i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=T(La);return(o?d:e.useEffect)((()=>Ra((t=>{let{x:e,y:n}=t;r.scrollX.set(e.current),r.scrollXProgress.set(e.progress),r.scrollY.set(n.current),r.scrollYProgress.set(n.progress)}),{...i,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[]),r}function ka(t){const n=e.useRef(0),{isStatic:o}=e.useContext(a);e.useEffect((()=>{if(o)return;const e=e=>{let{timestamp:o,delta:i}=e;n.current||(n.current=o),t(o-n.current,i)};return Dn.update(e,!0),()=>kn.update(e)}),[t])}class Ba extends Vo{constructor(){super(...arguments),this.members=[],this.transforms=new Set}add(t){let e;N.has(t)?(this.transforms.add(t),e="transform"):t.startsWith("origin")||X(t)||"willChange"===t||(e=Gt(t)),e&&(So(this.members,e),this.update())}remove(t){N.has(t)?(this.transforms.delete(t),this.transforms.size||To(this.members,"transform")):To(this.members,Gt(t)),this.update()}update(){this.set(this.members.length?this.members.join(", "):"auto")}}function ja(){!ar.current&&lr();const[t]=e.useState(sr.current);return t}function Oa(){let t=!1;const e=[],n=new Set,o={subscribe:t=>(n.add(t),()=>{n.delete(t)}),start(o,i){if(t){const t=[];return n.forEach((e=>{t.push(Wo(e,o,{transitionOverride:i}))})),Promise.all(t)}return new Promise((t=>{e.push({animation:[o,i],resolve:t})}))},set:t=>n.forEach((e=>{!function(t,e){Array.isArray(e)?Fo(t,e):"string"==typeof e?Fo(t,[e]):Oo(t,e)}(e,t)})),stop(){n.forEach((t=>{!function(t){t.values.forEach((t=>t.stop()))}(t)}))},mount:()=>(t=!0,e.forEach((t=>{let{animation:e,resolve:n}=t;o.start(...e).then(n)})),()=>{t=!1,o.stop()})};return o}function Fa(){const t=T(Oa);return e.useEffect(t.mount,[]),t}const Ia=Fa,Ua=(t,e,n)=>{const o=e-t;return((n-t)%o+o)%o+t};class Na{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach((n=>{n.start(t.nativeEvent||t,e)}))}}const za=()=>new Na;function Wa(t){return null!==t&&"object"==typeof t&&L in t}function Ha(){return $a}function $a(t){vs.current&&(vs.current.isUpdating=!1,vs.current.blockUpdate(),t&&t())}const Ya=()=>({});class Xa extends dr{build(){}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}makeTargetAnimatableFromInstance(t){let{transition:e,transitionEnd:n,...o}=t;return Io(this,o,No(o,e||{},this)),{transition:e,transitionEnd:n,...o}}}const Ga=oe({scrapeMotionValuesFromProps:Ya,createRenderState:Ya}),qa=t=>t>.001?1/t:1e5;t.AnimatePresence=t=>{let{children:n,custom:o,initial:i=!0,onExitComplete:r,exitBeforeEnter:a,presenceAffectsLayout:l=!0,mode:u="sync"}=t;a&&(u="wait",Be(!1,"Replace exitBeforeEnter with mode='wait'"));let[c]=Ps();const h=e.useContext(C).forceRender;h&&(c=h);const p=ws(),f=function(t){const n=[];return e.Children.forEach(t,(t=>{e.isValidElement(t)&&n.push(t)})),n}(n);let m=f;const g=new Set,v=e.useRef(m),y=e.useRef(new Map).current,x=e.useRef(!0);if(d((()=>{x.current=!1,function(t,e){t.forEach((t=>{const n=Cs(t);e.set(n,t)}))}(f,y),v.current=m})),Re((()=>{x.current=!0,y.clear(),g.clear()})),x.current)return s.createElement(s.Fragment,null,m.map((t=>s.createElement(As,{key:Cs(t),isPresent:!0,initial:!!i&&void 0,presenceAffectsLayout:l,mode:u},t))));m=[...m];const E=v.current.map(Cs),b=f.map(Cs),w=E.length;for(let t=0;t<w;t++){const e=E[t];-1===b.indexOf(e)&&g.add(e)}return"wait"===u&&g.size&&(m=[]),g.forEach((t=>{if(-1!==b.indexOf(t))return;const e=y.get(t);if(!e)return;const n=E.indexOf(t);m.splice(n,0,s.createElement(As,{key:Cs(e),isPresent:!1,onExitComplete:()=>{y.delete(t),g.delete(t);const e=v.current.findIndex((e=>e.key===t));if(v.current.splice(e,1),!g.size){if(v.current=f,!1===p.current)return;c(),r&&r()}},custom:o,presenceAffectsLayout:l,mode:u},e))})),m=m.map((t=>{const e=t.key;return g.has(e)?t:s.createElement(As,{key:Cs(t),isPresent:!0,presenceAffectsLayout:l,mode:u},t)})),s.createElement(s.Fragment,null,g.size?m:m.map((t=>e.cloneElement(t))))},t.AnimateSharedLayout=t=>{let{children:e}=t;return s.useEffect((()=>{}),[]),s.createElement(ks,{id:T((()=>"asl-"+Bs++))},e)},t.DeprecatedLayoutGroupContext=Ms,t.DragControls=Na,t.FlatTree=qr,t.LayoutGroup=ks,t.LayoutGroupContext=C,t.LazyMotion=function(t){let{children:n,features:o,strict:i=!1}=t;const[,r]=e.useState(!js(o)),a=e.useRef(void 0);if(!js(o)){const{renderer:t,...e}=o;a.current=t,S(e)}return e.useEffect((()=>{js(o)&&o().then((t=>{let{renderer:e,...n}=t;S(n),a.current=e,r(!0)}))}),[]),s.createElement(p.Provider,{value:{renderer:a.current,strict:i}},n)},t.MotionConfig=function(t){let{children:n,isValidProp:o,...i}=t;o&&Ft(o),(i={...e.useContext(a),...i}).isStatic=T((()=>i.isStatic));const r=e.useMemo((()=>i),[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return s.createElement(a.Provider,{value:r},n)},t.MotionConfigContext=a,t.MotionContext=l,t.MotionValue=Vo,t.PresenceContext=c,t.Reorder=Xs,t.SwitchLayoutGroupContext=R,t.VisualElement=dr,t.addPointerEvent=be,t.addScaleCorrector=I,t.animate=Tr,t.animateVisualElement=Wo,t.animationControls=Oa,t.animations=Qo,t.buildTransform=Y,t.calcLength=ui,t.checkTargetForNewValues=Io,t.clamp=Nn,t.createBox=bi,t.createDomMotionComponent=function(t){return D(ae(t,{forwardMotionProps:!1},xs,yr,ys))},t.createMotionComponent=D,t.delay=Un,t.distance=ti,t.distance2D=ei,t.domAnimation=Gs,t.domMax=qs,t.filterProps=It,t.isBrowser=h,t.isDragActive=Ve,t.isMotionComponent=Wa,t.isMotionValue=W,t.isValidMotionProp=jt,t.m=bs,t.makeUseVisualState=oe,t.mix=zn,t.motion=Es,t.motionValue=Co,t.pipe=De,t.resolveMotionValue=ne,t.transform=zs,t.unwrapMotionComponent=function(t){if(Wa(t))return t[L]},t.useAnimation=Ia,t.useAnimationControls=Fa,t.useAnimationFrame=ka,t.useCycle=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const i=e.useRef(0),[r,s]=e.useState(n[i.current]);return[r,e.useCallback((t=>{i.current="number"!=typeof t?Ua(0,n.length,i.current+1):t,s(n[i.current])}),[n.length,...n])]},t.useDeprecatedAnimatedState=function(t){const[n,o]=e.useState(t),i=Ga({},!1),r=T((()=>new Xa({props:{},visualState:i},{initialState:t})));return e.useEffect((()=>(r.mount({}),()=>r.unmount())),[r]),e.useEffect((()=>{r.setProps({onUpdate:t=>{o({...t})}})}),[o,r]),[n,T((()=>t=>Wo(r,t)))]},t.useDeprecatedInvertedScale=function(t){let e=Ns(1),n=Ns(1);const o=u();return t?(e=t.scaleX||e,n=t.scaleY||n):o&&(e=o.getValue("scaleX",1),n=o.getValue("scaleY",1)),{scaleX:Hs(e,qa),scaleY:Hs(n,qa)}},t.useDomEvent=ce,t.useDragControls=function(){return T(za)},t.useElementScroll=function(t){return Be(!1,"useElementScroll is deprecated. Convert to useScroll({ container: ref })."),Da({container:t})},t.useForceUpdate=Ps,t.useInView=function(t){let{root:n,margin:o,amount:i,once:r=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[s,a]=e.useState(!1);return e.useEffect((()=>{if(!t.current||r&&s)return;const e={root:n&&n.current||void 0,margin:o,amount:"some"===i?"any":i};return function(t,e){let{root:n,margin:o,amount:i="any"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("undefined"==typeof IntersectionObserver)return()=>{};const r=ra(t),s=new WeakMap,a=new IntersectionObserver((t=>{t.forEach((t=>{const n=s.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t);oa(n)?s.set(t.target,n):a.unobserve(t.target)}else n&&(n(t),s.delete(t.target))}))}),{root:n,rootMargin:o,threshold:"number"==typeof i?i:sa[i]});return r.forEach((t=>a.observe(t))),()=>a.disconnect()}(t.current,(()=>(a(!0),r?void 0:()=>a(!1))),e)}),[n,t,o,r]),s},t.useInstantLayoutTransition=Ha,t.useInstantTransition=function(){const[t,n]=Ps(),o=Ha();return e.useEffect((()=>{Dn.postRender((()=>Dn.postRender((()=>Pn.current=!1))))}),[n]),e=>{o((()=>{Pn.current=!0,t(),e()}))}},t.useIsPresent=function(){return null===(t=e.useContext(c))||t.isPresent;var t},t.useIsomorphicLayoutEffect=d,t.useMotionTemplate=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];const i=t.length;return Ws(n,(function(){let e="";for(let o=0;o<i;o++)e+=t[o],n[o]&&(e+=n[o].get());return e}))},t.useMotionValue=Ns,t.usePresence=Ye,t.useReducedMotion=ja,t.useReducedMotionConfig=function(){const t=ja(),{reducedMotion:n}=e.useContext(a);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return s.useCallback((()=>{const t=vs.current;t&&t.resetTree()}),[])},t.useScroll=Da,t.useSpring=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{isStatic:o}=e.useContext(a),i=e.useRef(null),r=Ns(W(t)?t.get():t);return e.useMemo((()=>r.attach(((t,e)=>o?e(t):(i.current&&i.current.stop(),i.current=fo({from:r.get(),to:t,velocity:r.getVelocity(),...n,onUpdate:e}),r.get())))),[JSON.stringify(n)]),function(t,e){d((()=>{if(W(t))return e(t.get()),t.onChange(e)}),[t,e])}(t,(t=>r.set(parseFloat(t)))),r},t.useTime=function(){const t=Ns(0);return ka((e=>t.set(e))),t},t.useTransform=Hs,t.useUnmountEffect=Re,t.useVelocity=function(t){const n=Ns(t.getVelocity());return e.useEffect((()=>t.velocityUpdateSubscribers.add((t=>{n.set(t)}))),[t]),n},t.useViewportScroll=function(){return Be(!1,"useViewportScroll is deprecated. Convert to useScroll()."),Da()},t.useVisualElementContext=u,t.useWillChange=function(){return T((()=>new Ba("auto")))},t.wrap=Ua,t.wrapHandler=ve,Object.defineProperty(t,"__esModule",{value:!0})}(r,s.default);
|
|
2
2
|
//# sourceMappingURL=framer-motion.js.map
|