@paynext/sdk 0.0.1
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/README.md +54 -0
- package/dist/assets/index.css +1 -0
- package/dist/index.d.ts +221 -0
- package/dist/index.es.js +9272 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +53 -0
- package/dist/index.umd.js.map +1 -0
- package/package.json +77 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/react/jsx-runtime.js","../src/pkg/checkout/constant/config.ts","../src/pkg/checkout/constant/enums.ts","../src/pkg/checkout/service/checkout.service.ts","../src/app/module/able-pay/able-pay.service.ts","../src/app/module/able-pay/context/translate/i18n/i18n.ts","../src/app/module/able-pay/context/translate/i18n/translates/ar.ts","../src/app/module/able-pay/context/translate/i18n/translates/en.ts","../src/app/module/able-pay/context/translate/i18n/translates/bg.ts","../src/app/module/able-pay/context/translate/i18n/translates/cs.ts","../src/app/module/able-pay/context/translate/i18n/translates/da.ts","../src/app/module/able-pay/context/translate/i18n/translates/de.ts","../src/app/module/able-pay/context/translate/i18n/translates/el.ts","../src/app/module/able-pay/context/translate/i18n/translates/es.ts","../src/app/module/able-pay/context/translate/i18n/translates/et.ts","../src/app/module/able-pay/context/translate/i18n/translates/fi.ts","../src/app/module/able-pay/context/translate/i18n/translates/fil.ts","../src/app/module/able-pay/context/translate/i18n/translates/fr.ts","../src/app/module/able-pay/context/translate/i18n/translates/hr.ts","../src/app/module/able-pay/context/translate/i18n/translates/hu.ts","../src/app/module/able-pay/context/translate/i18n/translates/id.ts","../src/app/module/able-pay/context/translate/i18n/translates/it.ts","../src/app/module/able-pay/context/translate/i18n/translates/ja.ts","../src/app/module/able-pay/context/translate/i18n/translates/ko.ts","../src/app/module/able-pay/context/translate/i18n/translates/lt.ts","../src/app/module/able-pay/context/translate/i18n/translates/lv.ts","../src/app/module/able-pay/context/translate/i18n/translates/ms.ts","../src/app/module/able-pay/context/translate/i18n/translates/ru.ts","../src/app/module/able-pay/context/translate/i18n/translates/mt.ts","../src/app/module/able-pay/context/translate/i18n/translates/nb.ts","../src/app/module/able-pay/context/translate/i18n/translates/nl.ts","../src/app/module/able-pay/context/translate/i18n/translates/pl.ts","../src/app/module/able-pay/context/translate/i18n/translates/pt.ts","../src/app/module/able-pay/context/translate/i18n/translates/ro.ts","../src/app/module/able-pay/context/translate/i18n/translates/sk.ts","../src/app/module/able-pay/context/translate/i18n/translates/sl.ts","../src/app/module/able-pay/context/translate/i18n/translates/sv.ts","../src/app/module/able-pay/context/translate/i18n/translates/th.ts","../src/app/module/able-pay/context/translate/i18n/translates/tr.ts","../src/app/module/able-pay/context/translate/i18n/translates/vi.ts","../src/app/module/able-pay/context/translate/i18n/translates/zh.ts","../src/app/module/able-pay/context/translate/translate.context.ts","../src/app/module/able-pay/context/translate/translate.provider.tsx","../src/app/module/able-pay/context/transaction/transaction.context.ts","../src/app/module/able-pay/context/transaction/transaction.provider.tsx","../node_modules/clsx/dist/clsx.mjs","../src/app/shared/ui/button/button.tsx","../node_modules/credit-card-type/dist/lib/card-types.js","../node_modules/credit-card-type/dist/lib/clone.js","../node_modules/credit-card-type/dist/lib/matches.js","../node_modules/credit-card-type/dist/lib/add-matching-cards-to-results.js","../node_modules/credit-card-type/dist/lib/is-valid-input-type.js","../node_modules/credit-card-type/dist/lib/find-best-match.js","../node_modules/credit-card-type/dist/index.js","../src/app/shared/utils/card/card.utils.ts","../node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs","../node_modules/framer-motion/dist/es/utils/use-constant.mjs","../node_modules/framer-motion/dist/es/utils/is-browser.mjs","../node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs","../node_modules/framer-motion/dist/es/context/PresenceContext.mjs","../node_modules/motion-utils/dist/es/array.mjs","../node_modules/motion-utils/dist/es/clamp.mjs","../node_modules/motion-utils/dist/es/errors.mjs","../node_modules/motion-utils/dist/es/global-config.mjs","../node_modules/motion-utils/dist/es/is-numerical-string.mjs","../node_modules/motion-utils/dist/es/is-object.mjs","../node_modules/motion-utils/dist/es/is-zero-value-string.mjs","../node_modules/motion-utils/dist/es/memo.mjs","../node_modules/motion-utils/dist/es/noop.mjs","../node_modules/motion-utils/dist/es/pipe.mjs","../node_modules/motion-utils/dist/es/progress.mjs","../node_modules/motion-utils/dist/es/subscription-manager.mjs","../node_modules/motion-utils/dist/es/time-conversion.mjs","../node_modules/motion-utils/dist/es/velocity-per-second.mjs","../node_modules/motion-utils/dist/es/warn-once.mjs","../node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs","../node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs","../node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs","../node_modules/motion-utils/dist/es/easing/back.mjs","../node_modules/motion-utils/dist/es/easing/anticipate.mjs","../node_modules/motion-utils/dist/es/easing/circ.mjs","../node_modules/motion-utils/dist/es/easing/ease.mjs","../node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs","../node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs","../node_modules/motion-utils/dist/es/easing/utils/map.mjs","../node_modules/motion-dom/dist/es/frameloop/order.mjs","../node_modules/motion-dom/dist/es/stats/buffer.mjs","../node_modules/motion-dom/dist/es/frameloop/render-step.mjs","../node_modules/motion-dom/dist/es/frameloop/batcher.mjs","../node_modules/motion-dom/dist/es/frameloop/frame.mjs","../node_modules/motion-dom/dist/es/frameloop/sync-time.mjs","../node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs","../node_modules/motion-dom/dist/es/value/types/numbers/index.mjs","../node_modules/motion-dom/dist/es/value/types/utils/sanitize.mjs","../node_modules/motion-dom/dist/es/value/types/utils/float-regex.mjs","../node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs","../node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs","../node_modules/motion-dom/dist/es/value/types/color/utils.mjs","../node_modules/motion-dom/dist/es/value/types/color/rgba.mjs","../node_modules/motion-dom/dist/es/value/types/color/hex.mjs","../node_modules/motion-dom/dist/es/value/types/numbers/units.mjs","../node_modules/motion-dom/dist/es/value/types/color/hsla.mjs","../node_modules/motion-dom/dist/es/value/types/color/index.mjs","../node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs","../node_modules/motion-dom/dist/es/value/types/complex/index.mjs","../node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs","../node_modules/motion-dom/dist/es/utils/mix/immediate.mjs","../node_modules/motion-dom/dist/es/utils/mix/number.mjs","../node_modules/motion-dom/dist/es/utils/mix/color.mjs","../node_modules/motion-dom/dist/es/utils/mix/visibility.mjs","../node_modules/motion-dom/dist/es/utils/mix/complex.mjs","../node_modules/motion-dom/dist/es/utils/mix/index.mjs","../node_modules/motion-dom/dist/es/animation/drivers/frame.mjs","../node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs","../node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs","../node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs","../node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs","../node_modules/motion-dom/dist/es/animation/generators/spring/defaults.mjs","../node_modules/motion-dom/dist/es/animation/generators/spring/find.mjs","../node_modules/motion-dom/dist/es/animation/generators/spring/index.mjs","../node_modules/motion-dom/dist/es/animation/generators/inertia.mjs","../node_modules/motion-dom/dist/es/utils/interpolate.mjs","../node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs","../node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs","../node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs","../node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs","../node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs","../node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs","../node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs","../node_modules/motion-dom/dist/es/animation/JSAnimation.mjs","../node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs","../node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs","../node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs","../node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs","../node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs","../node_modules/motion-dom/dist/es/render/dom/is-css-var.mjs","../node_modules/motion-dom/dist/es/render/dom/style-set.mjs","../node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs","../node_modules/motion-dom/dist/es/utils/supports/flags.mjs","../node_modules/motion-dom/dist/es/utils/supports/memo.mjs","../node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs","../node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs","../node_modules/motion-dom/dist/es/animation/waapi/easing/supported.mjs","../node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs","../node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs","../node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs","../node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs","../node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs","../node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs","../node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs","../node_modules/motion-dom/dist/es/animation/utils/is-animatable.mjs","../node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs","../node_modules/motion-dom/dist/es/utils/is-html-element.mjs","../node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs","../node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs","../node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs","../node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs","../node_modules/motion-dom/dist/es/render/utils/keys-position.mjs","../node_modules/motion-dom/dist/es/value/types/auto.mjs","../node_modules/motion-dom/dist/es/value/types/test.mjs","../node_modules/motion-dom/dist/es/value/types/dimensions.mjs","../node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs","../node_modules/motion-dom/dist/es/value/types/complex/filter.mjs","../node_modules/motion-dom/dist/es/value/types/int.mjs","../node_modules/motion-dom/dist/es/value/types/maps/number.mjs","../node_modules/motion-dom/dist/es/value/types/maps/transform.mjs","../node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs","../node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs","../node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs","../node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs","../node_modules/motion-dom/dist/es/utils/resolve-elements.mjs","../node_modules/motion-dom/dist/es/value/index.mjs","../node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs","../node_modules/motion-dom/dist/es/frameloop/microtask.mjs","../node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs","../node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs","../node_modules/motion-dom/dist/es/gestures/utils/setup.mjs","../node_modules/motion-dom/dist/es/gestures/hover.mjs","../node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs","../node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs","../node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs","../node_modules/motion-dom/dist/es/gestures/press/utils/state.mjs","../node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs","../node_modules/motion-dom/dist/es/gestures/press/index.mjs","../node_modules/motion-dom/dist/es/utils/is-svg-element.mjs","../node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs","../node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs","../node_modules/motion-dom/dist/es/value/types/utils/find.mjs","../node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs","../node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs","../node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs","../node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs","../node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs","../node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs","../node_modules/framer-motion/dist/es/context/LazyContext.mjs","../node_modules/framer-motion/dist/es/motion/features/definitions.mjs","../node_modules/framer-motion/dist/es/motion/features/load-features.mjs","../node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs","../node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs","../node_modules/framer-motion/dist/es/render/components/create-proxy.mjs","../node_modules/framer-motion/dist/es/context/MotionContext/index.mjs","../node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs","../node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs","../node_modules/framer-motion/dist/es/render/utils/variant-props.mjs","../node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs","../node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs","../node_modules/framer-motion/dist/es/context/MotionContext/create.mjs","../node_modules/framer-motion/dist/es/motion/utils/symbol.mjs","../node_modules/framer-motion/dist/es/utils/is-ref-object.mjs","../node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs","../node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs","../node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs","../node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs","../node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs","../node_modules/framer-motion/dist/es/motion/index.mjs","../node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs","../node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs","../node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs","../node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs","../node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs","../node_modules/framer-motion/dist/es/render/html/use-props.mjs","../node_modules/framer-motion/dist/es/render/svg/utils/path.mjs","../node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs","../node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs","../node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs","../node_modules/framer-motion/dist/es/render/svg/use-props.mjs","../node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs","../node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs","../node_modules/framer-motion/dist/es/render/dom/use-render.mjs","../node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs","../node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs","../node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs","../node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs","../node_modules/framer-motion/dist/es/render/html/config-motion.mjs","../node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs","../node_modules/framer-motion/dist/es/render/svg/config-motion.mjs","../node_modules/framer-motion/dist/es/render/components/create-factory.mjs","../node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs","../node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs","../node_modules/framer-motion/dist/es/render/utils/setters.mjs","../node_modules/framer-motion/dist/es/value/use-will-change/is.mjs","../node_modules/framer-motion/dist/es/value/use-will-change/add-will-change.mjs","../node_modules/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs","../node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs","../node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs","../node_modules/framer-motion/dist/es/animation/utils/is-transition-defined.mjs","../node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs","../node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs","../node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs","../node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs","../node_modules/framer-motion/dist/es/utils/shallow-compare.mjs","../node_modules/framer-motion/dist/es/render/utils/get-variant-context.mjs","../node_modules/framer-motion/dist/es/render/utils/animation-state.mjs","../node_modules/framer-motion/dist/es/motion/features/Feature.mjs","../node_modules/framer-motion/dist/es/motion/features/animation/index.mjs","../node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs","../node_modules/framer-motion/dist/es/motion/features/animations.mjs","../node_modules/framer-motion/dist/es/events/add-dom-event.mjs","../node_modules/framer-motion/dist/es/events/event-info.mjs","../node_modules/framer-motion/dist/es/events/add-pointer-event.mjs","../node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs","../node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs","../node_modules/framer-motion/dist/es/projection/geometry/models.mjs","../node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs","../node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs","../node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs","../node_modules/framer-motion/dist/es/projection/utils/measure.mjs","../node_modules/framer-motion/dist/es/utils/get-context-window.mjs","../node_modules/framer-motion/dist/es/utils/distance.mjs","../node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs","../node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs","../node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs","../node_modules/framer-motion/dist/es/gestures/drag/index.mjs","../node_modules/framer-motion/dist/es/gestures/pan/index.mjs","../node_modules/framer-motion/dist/es/projection/node/state.mjs","../node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs","../node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs","../node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs","../node_modules/framer-motion/dist/es/animation/animate/single-value.mjs","../node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs","../node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs","../node_modules/framer-motion/dist/es/utils/delay.mjs","../node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs","../node_modules/framer-motion/dist/es/projection/geometry/copy.mjs","../node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs","../node_modules/framer-motion/dist/es/projection/geometry/utils.mjs","../node_modules/framer-motion/dist/es/projection/shared/stack.mjs","../node_modules/framer-motion/dist/es/projection/styles/transform.mjs","../node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs","../node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs","../node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs","../node_modules/framer-motion/dist/es/motion/features/drag.mjs","../node_modules/framer-motion/dist/es/gestures/hover.mjs","../node_modules/framer-motion/dist/es/gestures/focus.mjs","../node_modules/framer-motion/dist/es/gestures/press.mjs","../node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs","../node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs","../node_modules/framer-motion/dist/es/motion/features/gestures.mjs","../node_modules/framer-motion/dist/es/motion/features/layout.mjs","../node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs","../node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs","../node_modules/framer-motion/dist/es/render/store.mjs","../node_modules/framer-motion/dist/es/render/utils/motion-values.mjs","../node_modules/framer-motion/dist/es/render/VisualElement.mjs","../node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs","../node_modules/framer-motion/dist/es/render/html/utils/render.mjs","../node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs","../node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs","../node_modules/framer-motion/dist/es/render/svg/utils/render.mjs","../node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs","../node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs","../node_modules/framer-motion/dist/es/render/components/motion/create.mjs","../node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs","../src/app/shared/ui/input/input.constants.ts","../src/app/shared/ui/input/input.tsx","../src/app/shared/icon/warning.tsx","../src/app/shared/icon/card-cvc.tsx","../src/app/shared/icon/back.tsx","../src/app/shared/icon/card.tsx","../src/app/shared/icon/visa.tsx","../src/app/shared/icon/mastercard.tsx","../src/app/shared/icon/diners-club.tsx","../src/app/shared/icon/jcb.tsx","../src/app/shared/icon/discover.tsx","../src/app/shared/icon/amex.tsx","../src/app/shared/icon/union-pay.tsx","../src/app/shared/icon/unknown-card.tsx","../src/app/shared/icon/maestro.tsx","../src/app/module/able-pay/context/styles/styles.context.ts","../src/app/module/able-pay/context/styles/styles.provider.tsx","../src/app/shared/utils/card/card.enums.ts","../src/app/shared/utils/card/card.validator.ts","../src/app/module/able-pay/element/checkout/element/card/element/cvc/cvc.tsx","../src/app/module/able-pay/element/checkout/element/card/element/expiry/expiry.tsx","../src/app/module/able-pay/element/checkout/element/card/element/name/name.tsx","../src/app/module/able-pay/element/checkout/element/card/element/number/number.constants.ts","../src/app/module/able-pay/element/checkout/element/card/element/card-icons/card-icons.tsx","../src/app/module/able-pay/element/checkout/element/card/element/number/number.tsx","../src/app/shared/ui/error-alert/error-alert.tsx","../src/app/shared/ui/spinner/spinner.tsx","../src/app/module/able-pay/element/checkout/element/card/card.tsx","../src/pkg/evervault/ev.context.ts","../node_modules/@evervault/react/dist/evervault-react.main.js","../node_modules/@evervault/js/dist/evervault-js.js","../src/pkg/evervault/ev.provider.tsx","../src/pkg/evervault/element/google-pay/google-pay.tsx","../src/pkg/evervault/element/apple-pay/apple-pay.tsx","../node_modules/@paypal/react-paypal-js/dist/esm/react-paypal-js.js","../src/pkg/paypal/paypal.tsx","../src/app/module/able-pay/mappers/checkout.mapper.ts","../src/app/module/able-pay/element/checkout/checkout.service.ts","../src/app/module/able-pay/element/checkout/checkout.constants.ts","../src/app/shared/ui/success-alert/success-alert.tsx","../src/app/module/able-pay/mappers/locale.mapper.ts","../src/app/module/able-pay/element/checkout/checkout.tsx","../src/app/module/able-pay/able-pay.module.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return (type.displayName || \"Context\") + \".Provider\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(\n type,\n key,\n self,\n source,\n owner,\n props,\n debugStack,\n debugTask\n ) {\n self = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== self ? self : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n source,\n self,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n self,\n source,\n getOwner(),\n maybeKey,\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_ELEMENT_TYPE &&\n node._store &&\n (node._store.validated = 1);\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\n Symbol.for(\"react.provider\");\n var REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n \"react-stack-bottom-frame\": function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React[\"react-stack-bottom-frame\"].bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import { CeckoutConfig } from '../interface'\n\nexport const config = {\n apiBase: import.meta.env.VITE_CHECKOUT_API_BASE,\n} as const\n\nexport const initialCheckoutConfig: CeckoutConfig[] = [\n {\n type: 'paypal',\n order: 1,\n is_active: true,\n },\n {\n type: 'apple-pay',\n order: 2,\n is_active: true,\n },\n {\n type: 'google-pay',\n order: 3,\n is_active: true,\n },\n {\n type: 'card',\n order: 4,\n is_active: true,\n },\n]\n","export enum PaymentType {\n Card = 'CARD'\n}\n","import { config, initialCheckoutConfig } from '../constant'\nimport { AgreementResponse, CheckoutDto, TransactionConfigResponse } from '../interface'\nimport { CheckoutResponse } from '../interface/response.interface'\n\nexport const checkoutReq = async (data: CheckoutDto): Promise<CheckoutResponse> => {\n const url = `${config.apiBase}/payments/create`\n const headers = new Headers()\n headers.append('Content-Type', 'application/json')\n const res = await fetch(url, {\n method: 'POST',\n headers,\n body: JSON.stringify(data),\n })\n const json = await res.json()\n return json\n}\n\nexport const captureReq = async (paypalId: string): Promise<CheckoutResponse> => {\n const url = `${config.apiBase}/payments/capture/${paypalId}`\n const res = await fetch(url, {\n method: 'POST',\n })\n const json = await res.json()\n return json\n}\n\nexport const paypalAgreementReq = async (clientToken: string): Promise<AgreementResponse> => {\n const url = `${config.apiBase}/payments/create/billing/agreement`\n const res = await fetch(url, {\n method: 'POST',\n body: JSON.stringify({ clientSession: clientToken }),\n })\n const json = await res.json()\n return json\n}\n\nexport const configReq = async (clientToken: string): Promise<TransactionConfigResponse> => {\n const url = `${config.apiBase}/payments/config?clientSessionID=${clientToken}`\n const res = await fetch(url)\n const transaction: TransactionConfigResponse = await res.json()\n if (!transaction.checkoutConfig) {\n transaction.checkoutConfig = initialCheckoutConfig\n }\n return transaction\n}\n","import { useCallback, useState } from 'react'\nimport { CheckoutDto, checkoutReq } from '@/pkg/checkout'\nimport { AblePayConfig } from './interface'\n\nexport const useAblePayService = ({ onCheckoutComplete, onCheckoutFail }: AblePayConfig) => {\n const [isCheckoutFetching, setCheckoutFetching] = useState(false)\n const [isCheckoutSuccess, setCheckoutSuccess] = useState(false)\n const [isCheckoutFail, setCheckoutFail] = useState(false)\n\n const handleCheckout = useCallback(\n async (checkout: CheckoutDto) => {\n try {\n setCheckoutSuccess(false)\n setCheckoutFail(false)\n setCheckoutFetching(true)\n const { success, error } = await checkoutReq(checkout)\n if (success) {\n setCheckoutSuccess(true)\n onCheckoutComplete?.()\n } else {\n const err = new Error(error || 'Unknown error')\n setCheckoutFail(true)\n onCheckoutFail?.(err)\n }\n } catch (e) {\n console.error(e)\n setCheckoutFail(true)\n onCheckoutFail?.(new Error('Unknown error'))\n } finally {\n setCheckoutFetching(false)\n }\n },\n [onCheckoutComplete, onCheckoutFail],\n )\n\n const handleCheckoutFail = useCallback((error: string) => {\n setCheckoutFail(true)\n onCheckoutFail?.(new Error(error))\n }, [onCheckoutFail])\n\n const handleCheckoutReset = useCallback(() => {\n setCheckoutSuccess(false)\n setCheckoutFail(false)\n }, [])\n\n return {\n handleCheckout,\n handleCheckoutFail,\n handleCheckoutReset,\n isCheckoutFetching,\n isCheckoutSuccess,\n isCheckoutFail,\n }\n}\n","import { CheckoutTranslate } from '../translate.interface'\nimport { ar } from './translates/ar'\nimport { bg } from './translates/bg'\nimport { cs } from './translates/cs'\nimport { da } from './translates/da'\nimport { de } from './translates/de'\nimport { el } from './translates/el'\nimport { en } from './translates/en'\nimport { es } from './translates/es'\nimport { et } from './translates/et'\nimport { fi } from './translates/fi'\nimport { fil } from './translates/fil'\nimport { fr } from './translates/fr'\nimport { hr } from './translates/hr'\nimport { hu } from './translates/hu'\nimport { id } from './translates/id'\nimport { it } from './translates/it'\nimport { ja } from './translates/ja'\nimport { ko } from './translates/ko'\nimport { lt } from './translates/lt'\nimport { lv } from './translates/lv'\nimport { ms } from './translates/ms'\nimport { mt } from './translates/mt'\nimport { nb } from './translates/nb'\nimport { nl } from './translates/nl'\nimport { pl } from './translates/pl'\nimport { pt } from './translates/pt'\nimport { ro } from './translates/ro'\nimport { ru } from './translates/ru'\nimport { sk } from './translates/sk'\nimport { sl } from './translates/sl'\nimport { sv } from './translates/sv'\nimport { th } from './translates/th'\nimport { tr } from './translates/tr'\nimport { vi } from './translates/vi'\nimport { zh } from './translates/zh'\n\nexport const i18n = {\n ar,\n en,\n bg,\n cs,\n da,\n de,\n el,\n es,\n et,\n fi,\n fil,\n fr,\n hr,\n hu,\n id,\n it,\n ja,\n ko,\n lt,\n lv,\n ms,\n ru,\n mt,\n nb,\n nl,\n pl,\n pt,\n ro,\n sk,\n sl,\n sv,\n th,\n tr,\n vi,\n zh,\n}\n\nexport type Locale = keyof typeof i18n\n\nexport const getDefaultTranslates = (): CheckoutTranslate => {\n const lang = 'navigator' in global ? navigator?.language.split('-')[0] : ''\n return i18n[lang as Locale] || i18n.en\n}\n\nexport const getTranslates = (locale?: Locale): CheckoutTranslate => {\n if (!locale) return getDefaultTranslates()\n return i18n[locale] || getDefaultTranslates()\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const ar: CheckoutTranslate = {\n card: {\n title: 'طريقة الدفع',\n number: {\n label: 'رقم البطاقة',\n error: {\n required: 'يتطلب',\n invalid: 'رقم البطاقة غير صالح',\n incomplete: 'رقم البطاقة غير كامل',\n unsupported: 'نوع البطاقة غير المدعوم',\n },\n },\n expiry: {\n label: 'تاريخ الانتهاء',\n placeholder: 'سنة / شهر',\n error: {\n required: 'يتطلب',\n invalid: 'تاريخ انتهاء صلاحية البطاقة غير صالح',\n incomplete: 'تاريخ انتهاء الصلاحية الخاص ببطاقتك غير كامل',\n expired: 'تاريخ انتهاء صلاحية بطاقتك في الماضي',\n },\n },\n cvc: {\n label: 'رمز الأمان',\n placeholder: 'CVC',\n error: {\n required: 'يتطلب',\n incomplete: 'رمز الأمان الخاص ببطاقتك غير كامل',\n invalid: 'رمز التحقق من البطاقة (CVC) الخاص ببطاقتك غير صالح',\n },\n },\n name: {\n label: 'اسم حامل البطاقة',\n placeholder: 'الاسم الكامل على البطاقة',\n error: {\n required: 'يتطلب',\n invalid: 'يرجى إدخال اسمك الكامل',\n },\n },\n pay: {\n button: 'الراتب',\n },\n compact: {\n button: 'البطاقة',\n },\n },\n status: {\n success: 'تمت عملية الدفع الخاصة بك بنجاح!',\n error: 'لم نتمكن من التحقق من طريقة الدفع الخاصة بك. يرجى اختيار طريقة دفع أخرى وإعادة المحاولة.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const en: CheckoutTranslate = {\n card: {\n title: 'Payment method',\n number: {\n label: 'Card number',\n error: {\n required: 'REQUIRED',\n invalid: 'Your card number is invalid',\n incomplete: 'Your card number is incomplete',\n unsupported: 'Unsupported card type',\n },\n },\n expiry: {\n label: 'Expiry date',\n placeholder: 'MM / YY',\n error: {\n required: 'REQUIRED',\n invalid: 'Your card’s expiry date is invalid',\n incomplete: 'Your card’s expiry date is incomplete',\n expired: 'Your card’s expiry {date} is in the past',\n },\n },\n cvc: {\n label: 'Security code',\n placeholder: 'CVC',\n error: {\n required: 'REQUIRED',\n incomplete: 'Your card’s security code is incomplete',\n invalid: 'Your card’s CVC is invalid',\n },\n },\n name: {\n label: 'Cardholder name',\n placeholder: 'Full name on card',\n error: {\n required: 'REQUIRED',\n invalid: 'Please provide your full name',\n },\n },\n pay: {\n button: 'Pay',\n },\n compact: {\n button: 'Card',\n },\n },\n status: {\n success: 'Your payment was successful!',\n error: 'We are unable to authenticate your payment method. Please choose a different payment method and try again.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const bg: CheckoutTranslate = {\n card: {\n title: 'Метод на плащане',\n number: {\n label: 'Информация за картата',\n error: {\n required: 'ЗАДЪЛЖИТЕЛНО',\n invalid: 'Номерът на Вашата карта е неправилен',\n incomplete: 'Номерът на Вашата карта е непълен',\n unsupported: 'Неподдържан тип карта',\n },\n },\n expiry: {\n label: 'Дата на валидност',\n placeholder: 'ММ / ГГ',\n error: {\n required: 'ЗАДЪЛЖИТЕЛНО',\n incomplete: 'Датата на валидност на вашата карта е непълна',\n invalid: 'Датата на валидност на вашата карта е невалидна',\n expired: 'Датата на валидност на вашата карта е в миналото',\n },\n },\n cvc: {\n label: 'Код за сигурност',\n placeholder: 'CVC',\n error: {\n required: 'ЗАДЪЛЖИТЕЛНО',\n incomplete: 'Кодът за сигурност на вашата карта е непълен',\n invalid: 'Кодът за сигурност на вашата карта е невалиден',\n },\n },\n name: {\n label: 'Име на картодържателя',\n placeholder: 'Пълно име върху картата',\n error: {\n required: 'ЗАДЪЛЖИТЕЛНО',\n invalid: 'Моля, въведете трите си имена',\n },\n },\n pay: {\n button: 'Платете',\n },\n compact: {\n button: 'Карта',\n },\n },\n status: {\n success: 'Успех',\n error: 'Не можем да удостоверим автентичността на вашия метод на плащане. Моля, изберете друг метод на плащане и опитайте отново.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const cs: CheckoutTranslate = {\n card: {\n title: 'Způsob platby',\n number: {\n label: 'Číslo karty',\n error: {\n required: 'POVINNÝ ÚDAJ',\n invalid: 'Číslo Vaší karty je neplatné',\n incomplete: 'Číslo vaší karty je neúplné',\n unsupported: 'Nepodporovaný typ karty',\n },\n },\n expiry: {\n label: 'Datum konce platnosti',\n placeholder: 'MM / RR',\n error: {\n required: 'POVINNÝ ÚDAJ',\n incomplete: 'Datum konce platnosti vaší karty je neúplné',\n invalid: 'Datum konce platnosti karty je neplatné',\n expired: 'Platnost vaší karty vypršela'\n },\n },\n cvc: {\n label: 'Bezpečnostní kód',\n placeholder: 'CVC',\n error: {\n required: 'POVINNÝ ÚDAJ',\n incomplete: 'Bezpečnostní kód vaší karty je neúplný',\n invalid: 'CVC vaší karty je neplatné',\n },\n },\n name: {\n label: 'Jméno držitele karty',\n placeholder: 'Celé jméno',\n error: {\n required: 'POVINNÝ ÚDAJ',\n invalid: 'Uvďte prosím celé své jméno',\n },\n },\n pay: {\n button: 'Platit',\n },\n compact: {\n button: 'Karta',\n },\n },\n status: {\n success: 'Úspěch',\n error: 'Váš způsob platby se nám nedaří ověřit. Zvolte prosím jiný způsob platby a zkuste to znovu.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const da: CheckoutTranslate = {\n card: {\n title: 'Betalingsmetode',\n number: {\n label: 'Kortnummer',\n error: {\n required: 'PÅKRÆVET',\n invalid: 'Kortnummeret er ugyldigt',\n incomplete: 'Kortnummeret er ufuldstændigt',\n unsupported: 'Ikke understøttet korttype',\n },\n },\n expiry: {\n label: 'Udløbsdato',\n placeholder: 'MM / ÅÅ',\n error: {\n required: 'PÅKRÆVET',\n incomplete: 'Kortets udløbsdato er ikke komplet',\n invalid: 'Dit korts udløbsdato er ugyldig',\n expired: 'Dit kort er udløbet',\n },\n },\n cvc: {\n label: 'Sikkerhedskode',\n placeholder: 'CVC',\n error: {\n required: 'PÅKRÆVET',\n incomplete: 'Dit korts sikkerhedskode er ikke komplet',\n invalid: 'Dit korts CVC er ugyldigt',\n },\n },\n name: {\n label: 'Kortholderens navn',\n placeholder: 'Fulde navn',\n error: {\n required: 'PÅKRÆVET',\n invalid: 'Angiv dit fulde navn',\n },\n },\n pay: {\n button: 'Betal',\n },\n compact: {\n button: 'Kredit- eller betalingskort',\n },\n },\n status: {\n success: 'Succes',\n error: 'Vi kan ikke godkende din betalingsmetode. Vælg venligst en anden betalingsmetode og prøv igen.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const de: CheckoutTranslate = {\n card: {\n title: 'Zahlungsmethode',\n number: {\n label: 'Kartennummer',\n error: {\n required: 'Pflichtfeld',\n invalid: 'Ihre Kartennummer ist ungültig',\n incomplete: 'Ihre Kartennummer ist unvollständig',\n unsupported: 'Nicht unterstützter Kartentyp',\n },\n },\n expiry: {\n label: 'Ablaufdatum',\n placeholder: 'MM / JJ',\n error: {\n required: 'Pflichtfeld',\n incomplete: 'Das Ablaufdatum Ihrer Karte ist unvollständig',\n invalid: 'Das Ablaufdatum Ihrer Karte ist ungültig',\n expired: 'Ihre Karte ist ungültig',\n },\n },\n cvc: {\n label: 'Sicherheitscode',\n placeholder: 'CVC',\n error: {\n required: 'Pflichtfeld',\n incomplete: 'Der Sicherheitscode Ihrer Karte ist unvollständig',\n invalid: 'Die Prüfziffer/CVC Ihrer Karte ist ungültig',\n },\n },\n name: {\n label: 'Name des/der Karteninhaber/in',\n placeholder: 'Vollständiger Name',\n error: {\n required: 'Pflichtfeld',\n invalid: 'Bitte geben Sie Ihren vollständigen Namen ein',\n },\n },\n pay: {\n button: 'Bezahlen',\n },\n compact: {\n button: 'Kredit- oder Debitkarte',\n },\n },\n status: {\n success: 'Erfolg',\n error:\n 'Wir können Ihre Zahlungsmethode nicht authentifizieren. Bitte wählen Sie eine andere Zahlungsmethode und versuchen Sie es erneut.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const el: CheckoutTranslate = {\n card: {\n title: 'Μέθοδος πληρωμής',\n number: {\n label: 'Αριθμός κάρτας',\n error: {\n required: 'Απαιτούμενο',\n invalid: 'Ο αριθμός της κάρτας σας δεν είναι έγκυρος',\n incomplete: 'Ο αριθμός της κάρτας σας είναι ελλιπής',\n unsupported: 'Δεν υποστηρίζεται ο τύπος της κάρτας',\n },\n },\n expiry: {\n label: 'Ημερομηνία λήξης',\n placeholder: 'ΜΜ / ΕΕ',\n error: {\n required: 'Απαιτούμενο',\n incomplete: 'Η ημερομηνία λήξης της κάρτας σας είναι ελλιπής',\n invalid: 'Η ημερομηνία λήξης της κάρτας σας δεν είναι έγκυρη',\n expired: 'Η κάρτα σας έχει λήξει',\n },\n },\n cvc: {\n label: 'Κωδικός ασφαλείας',\n placeholder: 'CVC',\n error: {\n required: 'Απαιτούμενο',\n incomplete: 'Ο κωδικός ασφαλείας της κάρτας σας είναι ελλιπής',\n invalid: 'Το CVC της κάρτας σας δεν είναι έγκυρο',\n },\n },\n name: {\n label: 'Όνομα κατόχου κάρτας',\n placeholder: 'Πλήρες όνομα στην κάρτα',\n error: {\n required: 'Απαιτούμενο',\n invalid: 'Συμπληρώστε το ονοματεπώνυμό σας',\n },\n },\n pay: {\n button: 'Πληρωμή',\n },\n compact: {\n button: 'Kάρτα',\n },\n },\n status: {\n success: 'Επιτυχία',\n error: 'Δεν μπορούμε να πιστοποιήσουμε τη μέθοδο πληρωμής σας. Παρακαλούμε επιλέξτε μια διαφορετική μέθοδο πληρωμής και προσπαθήστε ξανά.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const es: CheckoutTranslate = {\n card: {\n title: 'Método de pago',\n number: {\n label: 'Número de tarjeta',\n error: {\n required: 'OBLIGATORIO',\n invalid: 'El número de tu tarjeta no es válido',\n incomplete: 'El número de tu tarjeta está incompleto',\n unsupported: 'Tipo de tarjeta no soportado',\n },\n },\n expiry: {\n label: 'Fecha de caducidad',\n placeholder: 'MM / AA',\n error: {\n required: 'OBLIGATORIO',\n incomplete: 'La fecha de caducidad de la tarjeta está incompleta',\n invalid: 'La fecha de caducidad de la tarjeta no es válida',\n expired: 'La tarjeta ha caducado'\n },\n },\n cvc: {\n label: 'Código de seguridad',\n placeholder: 'CVC',\n error: {\n required: 'OBLIGATORIO',\n incomplete: 'El código de seguridad de la tarjeta está incompleto',\n invalid: 'El CVC de tu tarjeta no es válido',\n },\n },\n name: {\n label: 'Nombre del titular de la tarjeta',\n placeholder: 'Nombre completo',\n error: {\n required: 'OBLIGATORIO',\n invalid: 'Proporciona tu nombre completo',\n },\n },\n pay: {\n button: 'Pagar',\n },\n compact: {\n button: 'Tarjeta',\n },\n },\n status: {\n success: 'Éxito',\n error: 'No podemos autenticar su método de pago. Elija otro método de pago e inténtelo de nuevo.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const et: CheckoutTranslate = {\n card: {\n title: 'Makseviis',\n number: {\n label: 'Kaardi number',\n error: {\n required: 'NÕUTAV',\n invalid: 'Teie kaardinumber ei sobi',\n incomplete: 'Teie kaardinumber on puudulik',\n unsupported: 'Toetamata kaardi tüüp',\n },\n },\n expiry: {\n label: 'Aegumiskuupäev',\n placeholder: 'KK / AA',\n error: {\n required: 'NÕUTAV',\n incomplete: 'Teie kaardi aegumiskuupäev on puudulik',\n invalid: 'Teie kaardi aegumiskuupäev on kehtetu',\n expired: 'Teie kaart on aegunud',\n },\n },\n cvc: {\n label: 'Turvakood',\n placeholder: 'CVC',\n error: {\n required: 'NÕUTAV',\n incomplete: 'Teie kaardi turvakood on puudulik',\n invalid: 'Teie kaardi CVC on kehtetu',\n },\n },\n name: {\n label: 'Kaardiomaniku nimi',\n placeholder: 'Täisnimi',\n error: {\n required: 'NÕUTAV',\n invalid: 'Esitage oma täisnimi',\n },\n },\n pay: {\n button: 'Maksa',\n },\n compact: {\n button: 'Krediit- või deebetkaart',\n },\n },\n status: {\n success: 'Edu',\n error: 'Me ei suuda teie makseviisi autentida. Palun valige teine makseviis ja proovige uuesti.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const fi: CheckoutTranslate = {\n card: {\n title: 'Maksutapa',\n number: {\n label: 'Kortin numero',\n error: {\n required: 'PAKOLLINEN',\n invalid: 'Kortin numero ei kelpaa',\n incomplete: 'Kortin numero on puutteellinen',\n unsupported: 'Ei tuettu korttityyppi'\n },\n },\n expiry: {\n label: 'Erääntymispäivä',\n placeholder: 'KK / VV',\n error: {\n required: 'PAKOLLINEN',\n incomplete: 'Kortin voimassaoloaika on puutteellinen',\n invalid: 'Kortin voimassaoloaika on virheellinen',\n expired: 'Korttisi on vanhentunut'\n },\n },\n cvc: {\n label: 'Turvakoodi',\n placeholder: 'CVC-koodi',\n error: {\n required: 'PAKOLLINEN',\n incomplete: 'Kortin turvakoodi on puutteellinen',\n invalid: 'Kortin CVC ei kelpaa',\n },\n },\n name: {\n label: 'Kortinhaltijan nimi',\n placeholder: 'Koko nimi',\n error: {\n required: 'PAKOLLINEN',\n invalid: 'Anna koko nimesi',\n },\n },\n pay: {\n button: 'Maksa',\n },\n compact: {\n button: 'Luotto- tai pankkikortti',\n },\n },\n status: {\n success: 'Menestys',\n error: 'Emme pysty todentamaan maksutapaasi. Valitse toinen maksutapa ja yritä uudelleen.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const fil: CheckoutTranslate = {\n card: {\n title: 'Paraan ng pagbabayad',\n number: {\n label: 'Numero ng card',\n error: {\n required: 'KAILANGAN',\n invalid: 'Hindi valid ang numero ng kard mo',\n incomplete: 'Ang numero ng iyong kard ay kulang',\n unsupported: 'Hindi sinusuportahang uri ng card',\n },\n },\n expiry: {\n label: 'Petsa ng pagkapaso',\n placeholder: 'BB / TT',\n error: {\n required: 'KAILANGAN',\n incomplete: 'Ang petsa ng pagkapaso ng iyong kard ay kulang',\n invalid: 'Hindi valid ang petsa ng pagkapaso ng iyong kard',\n expired: 'Napaso na ang iyong kard',\n },\n },\n cvc: {\n label: 'Security code',\n placeholder: 'CVC',\n error: {\n required: 'KAILANGAN',\n incomplete: 'Ang security code ng iyong kard ay kulang',\n invalid: 'Hindi valid ang CVC ng iyong kard',\n },\n },\n name: {\n label: 'Pangalan ng may-ari ng kard',\n placeholder: 'Buong pangalan',\n error: {\n required: 'KAILANGAN',\n invalid: 'Pakibigay ang iyong buong pangalan',\n },\n },\n pay: {\n button: 'Magbayad',\n },\n compact: {\n button: 'Luotto- tai pankkikortti',\n },\n },\n status: {\n success: 'Tagumpay',\n error: 'Hindi namin ma-authenticate ang iyong paraan ng pagbabayad. Mangyaring pumili ng ibang paraan ng pagbabayad at subukang muli.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const fr: CheckoutTranslate = {\n card: {\n title: 'Moyen de paiement',\n number: {\n label: 'Numéro de la carte',\n error: {\n required: 'OBLIGATOIRE',\n invalid: \"Votre numéro de carte n'est pas valide\",\n incomplete: 'Votre numéro de carte est incomplet',\n unsupported: 'Type de carte non supporté',\n },\n },\n expiry: {\n label: \"Date d'expiration\",\n placeholder: 'MM / AA',\n error: {\n required: 'OBLIGATOIRE',\n incomplete: \"La date d'expiration de votre carte est incomplète\",\n invalid: \"La date d'expiration de votre carte n'est pas valide\",\n expired: 'Votre carte a expiré',\n },\n },\n cvc: {\n label: 'Code de sécurité',\n placeholder: 'CVC',\n error: {\n required: 'OBLIGATOIRE',\n incomplete: 'Le code de sécurité de votre carte est incomplet',\n invalid: \"Le code CVC de votre carte n'est pas valide\",\n },\n },\n name: {\n label: 'Nom du titulaire de la carte',\n placeholder: 'Nom complet',\n error: {\n required: 'OBLIGATOIRE',\n invalid: 'Veuillez indiquer votre nom complet',\n },\n },\n pay: {\n button: 'Payer',\n },\n compact: {\n button: 'Carte',\n },\n },\n status: {\n success: 'Succès',\n error:\n \"Nous ne sommes pas en mesure d'authentifier votre méthode de paiement. Veuillez choisir un autre mode de paiement et réessayer.\",\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const hr: CheckoutTranslate = {\n card: {\n title: 'Način plaćanja',\n number: {\n label: 'Broj kartice',\n error: {\n required: 'POTREBNO',\n invalid: 'Broj vaše kartice nije valjan',\n incomplete: 'Broj vaše kartice nije potpun',\n unsupported: 'Nepodržana vrsta kartice',\n },\n },\n expiry: {\n label: 'Datum isteka',\n placeholder: 'MM / GG',\n error: {\n required: 'POTREBNO',\n incomplete: 'Datum isteka vaše kartice je nepotpun',\n invalid: 'Datum isteka vaše kartice nije valjan',\n expired: 'Kartica je istekla'\n },\n },\n cvc: {\n label: 'Sigurnosni kod',\n placeholder: 'CVC',\n error: {\n required: 'POTREBNO',\n incomplete: 'Sigurnosni kôd vaše kartice je nepotpun',\n invalid: 'Kontrolni broj (CVC) vaše kartice nije valjan',\n },\n },\n name: {\n label: 'Ime vlasnika kartice',\n placeholder: 'Puno ime',\n error: {\n required: 'POTREBNO',\n invalid: 'Unesite svoje puno ime',\n },\n },\n pay: {\n button: 'Plati',\n },\n compact: {\n button: 'Kartica',\n },\n },\n status: {\n success: 'Uspjeh',\n error: 'Ne možemo provjeriti autentičnost vašeg načina plaćanja. Odaberite drugi način plaćanja i pokušajte ponovno.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const hu: CheckoutTranslate = {\n card: {\n title: 'Fizetési mód',\n number: {\n label: 'Kártya száma',\n error: {\n required: 'KÖTELEZŐ',\n invalid: 'A kártyaszáma érvénytelen',\n incomplete: 'A kártyaszáma hiányos',\n unsupported: 'Nem támogatott kártya típusa',\n },\n },\n expiry: {\n label: 'Lejárat dátuma',\n placeholder: 'HH / ÉÉ',\n error: {\n required: 'KÖTELEZŐ',\n incomplete: 'A kártyája lejárati dátuma hiányos',\n invalid: 'A kártyája lejárati dátuma érvénytelen',\n expired: 'A kártyája lejárt',\n },\n },\n cvc: {\n label: 'Biztonsági kód',\n placeholder: 'CVC',\n error: {\n required: 'KÖTELEZŐ',\n incomplete: 'A kártyája biztonsági kódja hiányos',\n invalid: 'A kártya CVC-kódja érvénytelen',\n },\n },\n name: {\n label: 'Kártyabirtokos neve',\n placeholder: 'Teljes név',\n error: {\n required: 'KÖTELEZŐ',\n invalid: 'Adja meg a teljes nevét',\n },\n },\n pay: {\n button: 'Fizetés',\n },\n compact: {\n button: 'Hitel- vagy bankkártya',\n },\n },\n status: {\n success: 'Siker',\n error: 'Nem tudjuk hitelesíteni a fizetési módját. Kérjük, válasszon másik fizetési módot, és próbálja meg újra.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const id: CheckoutTranslate = {\n card: {\n title: 'Metode pembayaran',\n number: {\n label: 'Nomor kartu',\n error: {\n required: 'WAJIB DIISI',\n invalid: 'Nomor kartu Anda tidak valid',\n incomplete: 'Nomor kartu Anda tidak lengkap',\n unsupported: 'Tipe kartu tidak didukung',\n },\n },\n expiry: {\n label: 'Tanggal kedaluwarsa',\n placeholder: 'BB / TT',\n error: {\n required: 'WAJIB DIISI',\n incomplete: 'Tanggal kedaluwarsa kartu Anda tidak lengkap',\n invalid: 'Tanggal kedaluwarsa kartu Anda tidak valid',\n expired: 'Kartu Anda telah kedaluwarsa'\n },\n },\n cvc: {\n label: 'Kode keamanan',\n placeholder: 'CVC',\n error: {\n required: 'WAJIB DIISI',\n incomplete: 'Kode keamanan kartu Anda tidak lengkap',\n invalid: 'CVC kartu Anda tidak valid',\n },\n },\n name: {\n label: 'Nama pemegang kartu',\n placeholder: 'Nama lengkap',\n error: {\n required: 'WAJIB DIISI',\n invalid: 'Berikan nama lengkap Anda',\n },\n },\n pay: {\n button: 'Bayar',\n },\n compact: {\n button: 'Kartu',\n },\n },\n status: {\n success: 'Sukses',\n error: 'Kami tidak dapat mengautentikasi metode pembayaran Anda. Silakan pilih metode pembayaran lain dan coba lagi.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const it: CheckoutTranslate = {\n card: {\n title: 'Modalità di pagamento',\n number: {\n label: 'Numero di carta',\n error: {\n required: 'OBBLIGATORIO',\n invalid: 'Il numero della carta non è valido',\n incomplete: 'Il numero della carta è incompleto',\n unsupported: 'Tipo di carta non supportato',\n },\n },\n expiry: {\n label: 'Data di scadenza',\n placeholder: 'MM / AA',\n error: {\n required: 'OBBLIGATORIO',\n incomplete: 'La data di scadenza della carta non è completa',\n invalid: 'La data di scadenza della carta non è valida',\n expired: 'La tua carta è scaduta'\n },\n },\n cvc: {\n label: 'Codice di sicurezza',\n placeholder: 'CVC',\n error: {\n required: 'OBBLIGATORIO',\n incomplete: 'Il codice di sicurezza della carta non è completo',\n invalid: 'Il CVC della carta non è valido',\n },\n },\n name: {\n label: 'Nome del titolare della carta',\n placeholder: 'Nome e cognome',\n error: {\n required: 'OBBLIGATORIO',\n invalid: 'Inserisci il tuo nome completo',\n },\n },\n pay: {\n button: 'Paga',\n },\n compact: {\n button: 'Carta',\n },\n },\n status: {\n success: 'Il successo',\n error: 'Non siamo in grado di autenticare il suo metodo di pagamento. Scegliere un altro metodo di pagamento e riprovare.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const ja: CheckoutTranslate = {\n card: {\n title: '支払い方法',\n number: {\n label: 'カード番号',\n error: {\n required: '必須',\n invalid: 'カード番号が無効です',\n incomplete: 'カード番号に不備があります',\n unsupported: 'サポートされていないカードタイプ',\n },\n },\n expiry: {\n label: '有効期限',\n placeholder: 'MM (月) / YY (年)',\n error: {\n required: '必須',\n incomplete: 'カードの有効期限に不備があります',\n invalid: 'カードの有効期間の満了月が無効です',\n expired: 'カードの有効期限が切れています',\n },\n },\n cvc: {\n label: 'セキュリティコード',\n placeholder: 'セキュリティコード',\n error: {\n required: '必須',\n incomplete: 'カードのセキュリティコードに不備があります',\n invalid: 'カードのセキュリティコードが無効です',\n },\n },\n name: {\n label: 'カード保有者の名前',\n placeholder: '氏名',\n error: {\n required: '必須',\n invalid: '氏名を入力してください',\n },\n },\n pay: {\n button: '支払う',\n },\n compact: {\n button: 'カード',\n },\n },\n status: {\n success: '成功',\n error: 'お客様のお支払い方法を認証できません。別のお支払い方法を選択し、再度お試しください。',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const ko: CheckoutTranslate = {\n card: {\n title: '결제 방식',\n number: {\n label: '카드 번호',\n error: {\n required: '필수',\n invalid: '카드 번호가 잘못되었습니다',\n incomplete: '카드 번호가 불완전합니다',\n unsupported: '지원되지 않는 카드 유형',\n },\n },\n expiry: {\n label: '만료 날짜',\n placeholder: 'MM / YY',\n error: {\n required: '필수',\n incomplete: '카드의 유효기간 만료일이 불완전합니다',\n invalid: '카드의 유효기간 만료일이 잘못되었습니다',\n expired: '카드가 만료되었습니다',\n },\n },\n cvc: {\n label: '보안 코드',\n placeholder: '보안 코드(CVC)',\n error: {\n required: '필수',\n incomplete: '카드의 보안 코드가 불완전합니다',\n invalid: '카드의 보안 코드(CVC)가 잘못되었습니다',\n },\n },\n name: {\n label: '카드 소유자 이름',\n placeholder: '성명',\n error: {\n required: '필수',\n invalid: '성명을 입력하십시오',\n },\n },\n pay: {\n button: '결제',\n },\n compact: {\n button: '카드 번호',\n },\n },\n status: {\n success: '성공',\n error: '결제 방법을 인증할 수 없습니다. 다른 결제 방법을 선택하고 다시 시도해 주세요.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const lt: CheckoutTranslate = {\n card: {\n title: 'Mokėjimo būdas',\n number: {\n label: 'Kortelės numeris',\n error: {\n required: 'PRIVALOMA',\n invalid: 'Negaliojantis kortelės numeris',\n incomplete: 'Neišsamus kortelės numeris',\n unsupported: 'Nepalaikomas kortelės tipas',\n },\n },\n expiry: {\n label: 'Galiojimo pabaigos data',\n placeholder: 'mm / MM',\n error: {\n required: 'PRIVALOMA',\n incomplete: 'Neišsami jūsų kortelės galiojimo pabaigos data',\n invalid: 'Netinkama jūsų kortelės galiojimo pabaigos data',\n expired: 'Kortelė baigė galioti',\n },\n },\n cvc: {\n label: 'Saugos kodas',\n placeholder: 'CVC',\n error: {\n required: 'PRIVALOMA',\n incomplete: 'Neišsamus jūsų kortelės saugos kodas',\n invalid: 'Jūsų kortelės CVC negalioja',\n },\n },\n name: {\n label: 'Kortelės turėtojo vardas ir pavardė',\n placeholder: 'Vardas ir pavardė',\n error: {\n required: 'PRIVALOMA',\n invalid: 'Įveskite ir vardą ir pavardę',\n },\n },\n pay: {\n button: 'Mokėti',\n },\n compact: {\n button: 'Kortelė',\n },\n },\n status: {\n success: 'Sėkmė',\n error: 'Negalime patvirtinti jūsų mokėjimo būdo. Pasirinkite kitą mokėjimo būdą ir bandykite dar kartą.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const lv: CheckoutTranslate = {\n card: {\n title: 'Maksājumu veids',\n number: {\n label: 'Kartes numurs',\n error: {\n required: 'OBLIGĀTI',\n invalid: 'Kartes numurs nav derīgs',\n incomplete: 'Kartes numurs nav pilnīgs',\n unsupported: 'Nepareizs kartes tips',\n },\n },\n expiry: {\n label: 'Derīguma termiņš',\n placeholder: 'MM / YY',\n error: {\n required: 'OBLIGĀTI',\n incomplete: 'Kartes derīguma termiņa datums nav pilnīgs',\n invalid: 'Kartes derīguma termiņa beigu datums nav derīgs',\n expired: 'Kartes derīgums ir beidzies',\n },\n },\n cvc: {\n label: 'Drošības kods',\n placeholder: 'CVC',\n error: {\n required: 'OBLIGĀTI',\n incomplete: 'Kartes drošības kods nav pilnīgs',\n invalid: 'Kartes CVC nav derīgs',\n },\n },\n name: {\n label: 'Kartes īpašnieka vārds',\n placeholder: 'Vārds, uzvārds',\n error: {\n required: 'OBLIGĀTI',\n invalid: 'Norādiet savu vārdu un uzvārdu',\n },\n },\n pay: {\n button: 'Maksāt',\n },\n compact: {\n button: 'Karte',\n },\n },\n status: {\n success: 'Panākumi',\n error:\n 'Mēs nevaram pārbaudīt jūsu maksājuma metodes autentiskumu. Lūdzu, izvēlieties citu maksājumu metodi un mēģiniet vēlreiz.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const ms: CheckoutTranslate = {\n card: {\n title: 'Kaedah pembayaran',\n number: {\n label: 'Nombor kad',\n error: {\n required: 'DIPERLUKAN',\n invalid: 'Nombor kad anda tidak sah',\n incomplete: 'Nombor kad anda tidak lengkap',\n unsupported: 'Tipe kad tidak sah',\n },\n },\n expiry: {\n label: 'Tarikh tamat tempoh',\n placeholder: 'BB / TT',\n error: {\n required: 'DIPERLUKAN',\n incomplete: 'Tarikh tamat tempoh kad anda tidak lengkap',\n invalid: 'Tarikh tamat tempoh kad anda tidak sah',\n expired: 'Kad anda telah tamat tempoh',\n },\n },\n cvc: {\n label: 'Kod keselamatan',\n placeholder: 'CVC',\n error: {\n required: 'DIPERLUKAN',\n incomplete: 'Kod keselamatan kad anda tidak lengkap',\n invalid: 'CVC kad anda tidak sah',\n },\n },\n name: {\n label: 'Nama pemegang kad',\n placeholder: 'Nama penuh',\n error: {\n required: 'DIPERLUKAN',\n invalid: 'Sila berikan nama penuh anda',\n },\n },\n pay: {\n button: 'Bayar',\n },\n compact: {\n button: 'Kad',\n },\n },\n status: {\n success: 'Kejayaan',\n error: 'Kami tidak dapat mengesahkan kaedah pembayaran anda. Sila pilih kaedah pembayaran lain dan cuba lagi.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const ru: CheckoutTranslate = {\n card: {\n title: 'Метод оплаты',\n number: {\n label: 'Номер карты',\n error: {\n required: 'ОБЯЗАТЕЛЬНО',\n invalid: 'Недопустимый номер карты',\n incomplete: 'Номер карты неполон',\n unsupported: 'Неподдерживаемый тип карты',\n },\n },\n expiry: {\n label: 'Срок действия',\n placeholder: 'ММ / ГГ',\n error: {\n required: 'ОБЯЗАТЕЛЬНО',\n incomplete: 'Срок действия карты указан не полностью',\n invalid: 'Указанный срок действия карты недействителен',\n expired: 'Срок действия карты истек',\n },\n },\n cvc: {\n label: 'Код безопасности',\n placeholder: 'CVC',\n error: {\n required: 'ОБЯЗАТЕЛЬНО',\n incomplete: 'Код безопасности карты введен не полностью',\n invalid: 'Код CVC карты недействителен',\n },\n },\n name: {\n label: 'Имя владельца карты',\n placeholder: 'Имя, фамилия',\n error: {\n required: 'ОБЯЗАТЕЛЬНО',\n invalid: 'Введите свое имя и фамилию',\n },\n },\n pay: {\n button: 'Оплатить',\n },\n compact: {\n button: 'Кредитная карта',\n },\n },\n status: {\n success: 'Успех',\n error: 'Мы не можем проверить подлинность вашего способа оплаты. Пожалуйста, выберите другой способ оплаты и повторите попытку.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const mt: CheckoutTranslate = {\n card: {\n title: 'Metodu tal-ħlas',\n number: {\n label: 'Numru tal-karta',\n error: {\n required: 'MEĦTIEĠ/A',\n invalid: 'In-numru tal-karta tiegħek mhuwiex tajjeb',\n incomplete: 'In-numru tal-karta tiegħek mhuwiex komplut',\n unsupported: \"Tip ta' karta mhux appoġġjat\",\n },\n },\n expiry: {\n label: 'Data tal-iskadenza',\n placeholder: 'XX / SS',\n error: {\n required: 'MEĦTIEĠ/A',\n incomplete: 'Id-data tal-iskadenza tal-karta tiegħek mhix sħiħa',\n invalid: 'Id-data tal-iskadenza tal-karta tiegħek mhix tajba',\n expired: 'Il-karta tiegħek skadiet',\n },\n },\n cvc: {\n label: 'Kodiċi tas-sigurtà',\n placeholder: 'CVC',\n error: {\n required: 'MEĦTIEĠ/A',\n incomplete: 'Il-kodiċi tas-sigurtà tal-karta tiegħek mhux sħiħ',\n invalid: 'Is-CVC tal-karta tiegħek mhux tajjeb',\n },\n },\n name: {\n label: 'Isem id-detentur tal-karta',\n placeholder: 'Isem u kunjom',\n error: {\n required: 'MEĦTIEĠ/A',\n invalid: 'Jekk jogħġbok ipprovdi isemek kollu',\n },\n },\n pay: {\n button: 'Ħallas',\n },\n compact: {\n button: \"Karta\",\n },\n },\n status: {\n success: 'Suċċess',\n error:\n \"Aħna ma nistgħux jawtentikaw il-metodu tal-ħlas tiegħek. Jekk jogħġbok agħżel metodu ta' ħlas differenti u erġa' pprova.\",\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const nb: CheckoutTranslate = {\n card: {\n title: 'Betalingsmetode',\n number: {\n label: 'Kortnummer',\n error: {\n required: 'PÅKREVET',\n invalid: 'Kortnummer er ugyldig',\n incomplete: 'Kortnummeret er ufullstendig',\n unsupported: 'Ikke understøttet korttype',\n },\n },\n expiry: {\n label: 'Utløpsdato',\n placeholder: 'MM / ÅÅ',\n error: {\n required: 'PÅKREVET',\n incomplete: 'Kortets utløpsdato er ufullstendig',\n invalid: 'Kortets utløpsdato er ugyldig',\n expired: 'Kortet er utløpt',\n },\n },\n cvc: {\n label: 'Sikkerhetskode',\n placeholder: 'CVC',\n error: {\n required: 'PÅKREVET',\n incomplete: 'Kortets sikkerhetskode er ufullstendig',\n invalid: 'Kortets CVC-nummer er ugyldig',\n },\n },\n name: {\n label: 'Kortinnehavers navn',\n placeholder: 'Fullt navn',\n error: {\n required: 'PÅKREVET',\n invalid: 'Oppgi fullt navn',\n },\n },\n pay: {\n button: 'Betal',\n },\n compact: {\n button: 'Kort',\n },\n },\n status: {\n success: 'Suksess',\n error: 'Vi kan ikke godkjenne betalingsmåten din. Vennligst velg en annen betalingsmetode og prøv på nytt.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const nl: CheckoutTranslate = {\n card: {\n title: 'Betaalmethode',\n number: {\n label: 'Kaartnummer',\n error: {\n required: 'VEREIST',\n invalid: 'Je kaartnummer is ongeldig',\n incomplete: 'Je kaartnummer is onvolledig',\n unsupported: 'Niet ondersteund',\n },\n },\n expiry: {\n label: 'Vervaldatum',\n placeholder: 'MM / JJ',\n error: {\n required: 'VEREIST',\n incomplete: 'De vervaldatum van je kaart is onvolledig',\n invalid: 'De vervaldatum van je betaalkaart is ongeldig',\n expired: 'Je kaart is vervallen'\n },\n },\n cvc: {\n label: 'Beveiligingscode',\n placeholder: 'CVC',\n error: {\n required: 'VEREIST',\n incomplete: 'De beveiligingscode van je betaalkaart is onvolledig',\n invalid: 'De CVC-code van je betaalkaart is ongeldig',\n },\n },\n name: {\n label: 'Naam kaarthouder',\n placeholder: 'Volledige naam',\n error: {\n required: 'VEREIST',\n invalid: 'Geef je volledige naam op',\n },\n },\n pay: {\n button: 'Betalen',\n },\n compact: {\n button: 'Kaart',\n },\n },\n status: {\n success: 'Succes',\n error: 'We kunnen je betaalmethode niet verifiëren. Kies een andere betaalmethode en probeer het opnieuw.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const pl: CheckoutTranslate = {\n card: {\n title: 'Metoda płatności',\n number: {\n label: 'Numer karty',\n error: {\n required: 'WYMAGANE',\n invalid: 'Numer karty jest nieprawidłowy',\n incomplete: 'Numer karty jest niepełny',\n unsupported: 'Nieobsługiwany typ karty',\n },\n },\n expiry: {\n label: 'Data ważności',\n placeholder: 'MM / RR',\n error: {\n required: 'WYMAGANE',\n incomplete: 'Data ważności karty jest niepełna',\n invalid: 'Termin ważności karty jest nieprawidłowy',\n expired: 'Karta straciła ważność'\n },\n },\n cvc: {\n label: 'Kod bezpieczeństwa',\n placeholder: 'Kod CVC',\n error: {\n required: 'WYMAGANE',\n incomplete: 'Kod zabezpieczający karty jest niekompletny',\n invalid: 'CVC karty jest nieprawidłowy',\n },\n },\n name: {\n label: 'Imię i nazwisko posiadacza karty',\n placeholder: 'Imię i nazwisko',\n error: {\n required: 'WYMAGANE',\n invalid: 'Podaj pełne imię i nazwisko',\n },\n },\n pay: {\n button: 'Zapłać',\n },\n compact: {\n button: 'Karta',\n },\n },\n status: {\n success: 'Sukces',\n error: 'Nie możemy uwierzytelnić metody płatności. Wybierz inną metodę płatności i spróbuj ponownie.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const pt: CheckoutTranslate = {\n card: {\n title: 'Forma de pagamento',\n number: {\n label: 'Número do cartão',\n error: {\n required: 'OBRIGATÓRIO',\n invalid: 'O número do seu cartão é inválido',\n incomplete: 'O número do seu cartão está incompleto',\n unsupported: 'Tipo de cartão não suportado',\n },\n },\n expiry: {\n label: 'Data de validade',\n placeholder: 'MM / AA',\n error: {\n required: 'OBRIGATÓRIO',\n incomplete: 'A data de validade do cartão está incompleta',\n invalid: 'A data de validade do seu cartão é inválida',\n expired: 'O seu cartão expirou',\n },\n },\n cvc: {\n label: 'Código de segurança',\n placeholder: 'CVC',\n error: {\n required: 'OBRIGATÓRIO',\n incomplete: 'O código de segurança de seu cartão está incompleto',\n invalid: 'O CVC do seu cartão é inválido',\n },\n },\n name: {\n label: 'Nome do titular do cartão',\n placeholder: 'Nome completo',\n error: {\n required: 'OBRIGATÓRIO',\n invalid: 'Forneça o seu nome completo',\n },\n },\n pay: {\n button: 'Pagar',\n },\n compact: {\n button: 'Cartão',\n },\n },\n status: {\n success: 'Sucesso',\n error: 'Não foi possível autenticar o seu método de pagamento. Selecione um método de pagamento diferente e tente novamente.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const ro: CheckoutTranslate = {\n card: {\n title: 'Metoda de plată',\n number: {\n label: 'Numărul cardului',\n error: {\n required: 'NECESAR',\n invalid: 'Numărul cardului dvs. nu este valid',\n incomplete: 'Numărul cardului dvs. nu este complet',\n unsupported: 'Tipul cardului nu este acceptat',\n },\n },\n expiry: {\n label: 'Data de expirare',\n placeholder: 'LL / AA',\n error: {\n required: 'NECESAR',\n incomplete: 'Data de expirare a cardului dvs. este incompletă',\n invalid: 'Data de expirare a cardului dvs. nu este validă',\n expired: 'Cardul dvs. a expirat',\n },\n },\n cvc: {\n label: 'Codul de securitate',\n placeholder: 'CVC',\n error: {\n required: 'NECESAR',\n incomplete: 'Codul de securitate al cardului dvs. este incomplet',\n invalid: 'Numărul CVC al cardului dvs. nu este valid',\n },\n },\n name: {\n label: 'Nume titular card',\n placeholder: 'Nume complet',\n error: {\n required: 'NECESAR',\n invalid: 'Vă rugăm să furnizați numele dvs. complet',\n },\n },\n pay: {\n button: 'Plătiți',\n },\n compact: {\n button: 'Card',\n },\n },\n status: {\n success: 'Succes',\n error: 'Nu putem să vă autentificăm metoda de plată. Vă rugăm să alegeți o altă metodă de plată și să încercați din nou.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const sk: CheckoutTranslate = {\n card: {\n title: 'Spôsob platby',\n number: {\n label: 'Číslo karty',\n error: {\n required: 'POŽADOVANÉ',\n invalid: 'Číslo vašej karty je neplatné',\n incomplete: 'Číslo vašej karty je neúplné',\n unsupported: 'Nepodporovaný typ karty',\n },\n },\n expiry: {\n label: 'Dátum ukončenia platnosti',\n placeholder: 'MM / RR',\n error: {\n required: 'POŽADOVANÉ',\n incomplete: 'Dátum vypršania platnosti vašej karty je neúplný',\n invalid: 'Dátum vypršania platnosti vašej karty je neplatný',\n expired: 'Platnosť vašej karty vypršala',\n },\n },\n cvc: {\n label: 'Bezpečnostný kód',\n placeholder: 'CVC',\n error: {\n required: 'POŽADOVANÉ',\n incomplete: 'Bezpečnostný kód vašej karty je neúplný',\n invalid: 'Číslo CVC vašej karty je neplatné',\n },\n },\n name: {\n label: 'Držiteľ karty',\n placeholder: 'Celé meno',\n error: {\n required: 'POŽADOVANÉ',\n invalid: 'Zadajte vaše celé meno',\n },\n },\n pay: {\n button: 'Zaplatiť',\n },\n compact: {\n button: 'Karta',\n },\n },\n status: {\n success: 'Úspech',\n error: 'Nemôžeme overiť váš spôsob platby. Vyberte si iný spôsob platby a skúste to znova.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const sl: CheckoutTranslate = {\n card: {\n title: 'Način plačila',\n number: {\n label: 'Številka kartice',\n error: {\n required: 'OBVEZNO',\n invalid: 'Številka vaše kartice ni veljavna',\n incomplete: 'Številka vaše kartice ni popolna',\n unsupported: 'Nepodprta vrsta kartice',\n },\n },\n expiry: {\n label: 'Datum poteka',\n placeholder: 'MM / LL',\n error: {\n required: 'OBVEZNO',\n incomplete: 'Datum poteka vaše kartice ni popoln',\n invalid: 'Datum poteka vaše kartice ni veljaven',\n expired: 'Vaša kartica je potekla',\n },\n },\n cvc: {\n label: 'Varnostna koda',\n placeholder: 'CVC',\n error: {\n required: 'OBVEZNO',\n incomplete: 'Varnostna koda vaše kartice ni popolna',\n invalid: 'Koda CVC vaše kartice ni veljavna',\n },\n },\n name: {\n label: 'Ime imetnika kartice',\n placeholder: 'Polno ime',\n error: {\n required: 'OBVEZNO',\n invalid: 'Vnesite svoje polno ime',\n },\n },\n pay: {\n button: 'Plačaj',\n },\n compact: {\n button: 'Kartica',\n },\n },\n status: {\n success: 'Uspeh',\n error: 'Vašega načina plačila ne moremo preveriti. Izberite drug način plačila in poskusite znova.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const sv: CheckoutTranslate = {\n card: {\n title: 'Betalningsmetod',\n number: {\n label: 'Kortnummer',\n error: {\n required: 'OBLIGATORISKT',\n invalid: 'Ditt kortnummer är ogiltigt',\n incomplete: 'Kortnumret är ofullständigt',\n unsupported: 'Nepodporovaný typ karty',\n },\n },\n expiry: {\n label: 'Sista giltighetsdag',\n placeholder: 'MM / ÅÅ',\n error: {\n required: 'OBLIGATORISKT',\n incomplete: 'Kortets utgångsdatum är ofullständigt',\n invalid: 'Kortets utgångsdatum är ogiltigt',\n expired: 'Ditt kort har gått ut',\n },\n },\n cvc: {\n label: 'Säkerhetskod',\n placeholder: 'CVC',\n error: {\n required: 'OBLIGATORISKT',\n incomplete: 'Kortets säkerhetskod är ofullständig',\n invalid: 'Kortets CVC-kod är ogiltig',\n },\n },\n name: {\n label: 'Kortinnehavarens namn',\n placeholder: 'Fullständigt namn',\n error: {\n required: 'OBLIGATORISKT',\n invalid: 'Ange ditt fullständiga namn',\n },\n },\n pay: {\n button: 'Betala',\n },\n compact: {\n button: 'Kort',\n },\n },\n status: {\n success: 'Framgång',\n error: 'Vi kan inte verifiera din betalningsmetod. Vänligen välj en annan betalningsmetod och försök igen.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const th: CheckoutTranslate = {\n card: {\n title: 'วิธีการชำระเงิน',\n number: {\n label: 'หมายเลขบัตร',\n error: {\n required: 'ต้องป้อนข้อมูล',\n invalid: 'หมายเลขบัตรของคุณไม่ถูกต้อง',\n incomplete: 'หมายเลขบัตรของคุณไม่ครบถ้วน',\n unsupported: 'ประเภทบัตรของคุณไม่ถูกต้อง',\n },\n },\n expiry: {\n label: 'วันหมดอายุ',\n placeholder: 'ดด / ปป',\n error: {\n required: 'ต้องป้อนข้อมูล',\n incomplete: 'วันที่หมดอายุของบัตรไม่ครบถ้วน',\n invalid: 'วันที่หมดอายุของบัตรไม่ถูกต้อง',\n expired: 'บัตรของคุณหมดอายุแล้ว',\n },\n },\n cvc: {\n label: 'รหัสความปลอดภัย',\n placeholder: 'CVC',\n error: {\n required: 'ต้องป้อนข้อมูล',\n incomplete: 'รหัสความปลอดภัยของบัตรไม่ครบถ้วน',\n invalid: 'CVC ของบัตรไม่ถูกต้อง',\n },\n },\n name: {\n label: 'ชื่อเจ้าของบัตร',\n placeholder: 'ชื่อ-นามสกุล',\n error: {\n required: 'ต้องป้อนข้อมูล',\n invalid: 'โปรดป้อนชื่อ-นามสกุล',\n },\n },\n pay: {\n button: 'ชำระเงิน',\n },\n compact: {\n button: 'การ์ด',\n },\n },\n status: {\n success: 'ความสำเร็จ',\n error: 'เราไม่สามารถตรวจสอบวิธีการชำระเงินของคุณได้ โปรดเลือกวิธีการชำระเงินอื่นแล้วลองอีกครั้ง',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const tr: CheckoutTranslate = {\n card: {\n title: 'Ödeme yöntemi',\n number: {\n label: 'Kart numarası',\n error: {\n required: 'GEREKLI',\n invalid: 'Kart numaranız geçersiz',\n incomplete: 'Kart numaranız eksik',\n unsupported: 'Desteklenmeyen kart türü',\n },\n },\n expiry: {\n label: 'Son Kullanma Tarihi',\n placeholder: 'AA / YY',\n error: {\n required: 'GEREKLI',\n incomplete: 'Kartınızın son kullanma tarihi eksik',\n invalid: 'Kartınızın son kullanım tarihi geçersiz',\n expired: 'Kartınızın süresi dolmuş',\n },\n },\n cvc: {\n label: 'Güvenlik kodu',\n placeholder: 'CVC',\n error: {\n required: 'GEREKLI',\n incomplete: 'Kartınızın güvenlik kodu eksik',\n invalid: \"Kartınızın CVC'si geçersiz\",\n },\n },\n name: {\n label: 'Kart sahibinin adı',\n placeholder: 'Ad ve soyadı',\n error: {\n required: 'GEREKLI',\n invalid: 'Lütfen tam adınızı girin',\n },\n },\n pay: {\n button: 'Öde',\n },\n compact: {\n button: 'Kart',\n },\n },\n status: {\n success: 'Başarı',\n error: 'Ödeme yönteminizi doğrulayamıyoruz. Lütfen farklı bir ödeme yöntemi seçin ve tekrar deneyin.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const vi: CheckoutTranslate = {\n card: {\n title: 'Phương thức thanh toán',\n number: {\n label: 'Số thẻ',\n error: {\n required: 'BẮT BUỘC',\n invalid: 'Số thẻ của quý vị không hợp lệ',\n incomplete: 'Số thẻ của quý vị không đầy đủ',\n unsupported: 'Không hỗ trợ loại thẻ',\n },\n },\n expiry: {\n label: 'Ngày hết hạn',\n placeholder: 'MM / YY',\n error: {\n required: 'BẮT BUỘC',\n incomplete: 'Ngày hết hạn trên thẻ không hợp lệ',\n invalid: 'Ngày hết hạn của thẻ không hợp lệ',\n expired: 'Thẻ của quý vị đã hết hạn',\n },\n },\n cvc: {\n label: 'Mã bảo mật',\n placeholder: 'CVC',\n error: {\n required: 'BẮT BUỘC',\n incomplete: 'Mã bảo mật của thẻ không đầy đủ',\n invalid: 'CVC thẻ của bạn không hợp lệ',\n },\n },\n name: {\n label: 'Tên chủ thẻ',\n placeholder: 'Họ và tên',\n error: {\n required: 'BẮT BUỘC',\n invalid: 'Vui lòng cung cấp tên đầy đủ của bạn',\n },\n },\n pay: {\n button: 'Thanh toán',\n },\n compact: {\n button: 'Thẻ',\n },\n },\n status: {\n success: 'Thành công',\n error: 'Chúng tôi không thể xác thực phương thức thanh toán của bạn. Vui lòng chọn phương thức thanh toán khác và thử lại.',\n },\n}\n","import { CheckoutTranslate } from '../../translate.interface'\n\nexport const zh: CheckoutTranslate = {\n card: {\n title: '支付方式',\n number: {\n label: '卡号',\n error: {\n required: '必填',\n invalid: '您的卡号无效',\n incomplete: '您的银行卡卡号不完整',\n unsupported: '不支持的卡类型',\n },\n },\n expiry: {\n label: '有效期',\n placeholder: '月份 / 年份',\n error: {\n required: '必填',\n incomplete: '您银行卡的有效期不完整',\n invalid: '您银行卡的有效期无效',\n expired: '您的银行卡已过期',\n },\n },\n cvc: {\n label: '安全代码',\n placeholder: 'CVC',\n error: {\n required: '必填',\n incomplete: '您银行卡的安全码不完整',\n invalid: '您银行卡的 CVC 无效',\n },\n },\n name: {\n label: '持卡人姓名',\n placeholder: '全名',\n error: {\n required: '必填',\n invalid: '请提供您的全名',\n },\n },\n pay: {\n button: '支付',\n },\n compact: {\n button: '卡片',\n },\n },\n status: {\n success: '成功',\n error: '我们无法验证您的付款方式。请选择其他付款方式并重试。',\n },\n}\n","import { useContext, createContext } from 'react'\nimport { CheckoutTranslateState } from './translate.interface'\nimport { getDefaultTranslates, Locale } from './i18n/i18n'\n\nexport const initialState: CheckoutTranslateState = {\n messages: getDefaultTranslates(),\n locale: 'navigator' in global ? (navigator?.language.split('-')[0] as Locale) : 'en',\n}\n\nexport const CheckoutTranslateContext = createContext(initialState)\nexport const useCheckoutTranslate = () => {\n const { messages } = useContext(CheckoutTranslateContext)\n return messages\n}\n\nexport const useLocale = (): Locale => {\n const { locale } = useContext(CheckoutTranslateContext)\n return locale\n}\n\nexport const useDir = (): 'rtl' | 'ltr' => {\n const { locale } = useContext(CheckoutTranslateContext)\n return locale === 'ar' ? 'rtl' : 'ltr'\n}\n","import { FC, PropsWithChildren } from 'react'\nimport { CheckoutTranslate } from './translate.interface'\nimport { CheckoutTranslateContext } from './translate.context'\nimport { DeepPartial } from '@/app/shared/types'\nimport { getTranslates, Locale } from './i18n/i18n'\n\ntype Props = { translate?: DeepPartial<CheckoutTranslate>; locale?: Locale }\n\nexport const CheckoutTranslateProvider: FC<PropsWithChildren<Props>> = ({ children, translate, locale = 'en' }) => {\n const translates = getTranslates(locale)\n const messages = {\n card: {\n title: translate?.card?.title || translates.card.title,\n number: {\n label: translate?.card?.number?.label || translates.card.number.label,\n error: {\n required: translate?.card?.number?.error?.required || translates.card.number.error.required,\n invalid: translate?.card?.number?.error?.invalid || translates.card.number.error.invalid,\n incomplete: translate?.card?.number?.error?.incomplete || translates.card.number.error.incomplete,\n unsupported: translate?.card?.number?.error?.unsupported || translates.card.number.error.unsupported,\n },\n },\n expiry: {\n label: translate?.card?.expiry?.label || translates.card.expiry.label,\n placeholder: translate?.card?.expiry?.placeholder || translates.card.expiry.placeholder,\n error: {\n required: translate?.card?.expiry?.error?.required || translates.card.expiry.error.required,\n invalid: translate?.card?.expiry?.error?.invalid || translates.card.expiry.error.invalid,\n incomplete: translate?.card?.expiry?.error?.incomplete || translates.card.expiry.error.incomplete,\n expired: translate?.card?.expiry?.error?.expired || translates.card.expiry.error.expired,\n },\n },\n cvc: {\n label: translate?.card?.cvc?.label || translates.card.cvc.label,\n placeholder: translate?.card?.cvc?.placeholder || translates.card.cvc.placeholder,\n error: {\n required: translate?.card?.cvc?.error?.required || translates.card.cvc.error.required,\n incomplete: translate?.card?.cvc?.error?.incomplete || translates.card.cvc.error.incomplete,\n invalid: translate?.card?.cvc?.error?.invalid || translates.card.cvc.error.invalid,\n },\n },\n name: {\n label: translate?.card?.name?.label || translates.card.name.label,\n placeholder: translate?.card?.name?.placeholder || translates.card.name.placeholder,\n error: {\n required: translate?.card?.name?.error?.required || translates.card.name.error.required,\n invalid: translate?.card?.name?.error?.invalid || translates.card.name.error.invalid,\n },\n },\n pay: {\n button: translate?.card?.pay?.button || translates.card.pay.button,\n },\n compact: {\n button: translate?.card?.compact?.button || translates.card.compact.button,\n },\n },\n status: {\n success: translate?.status?.success || translates.status.success,\n error: translate?.status?.error || translates.status.error,\n },\n }\n\n return <CheckoutTranslateContext.Provider value={{ messages, locale }}>{children}</CheckoutTranslateContext.Provider>\n}\n","import { TransactionConfig } from '@/pkg/checkout'\nimport { useContext, createContext } from 'react'\n\nexport const initialState: TransactionConfig | null = null\n\nexport const TransactionContext = createContext<TransactionConfig | null>(initialState)\nexport const useTransaction = () => useContext(TransactionContext)\n","import { FC, PropsWithChildren, useEffect, useState } from 'react'\nimport { TransactionContext } from './transaction.context'\nimport { configReq, TransactionConfig } from '@/pkg/checkout'\n\ntype Props = {\n clientToken: string\n}\n\nexport const TransactionProvider: FC<PropsWithChildren<Props>> = ({ children, clientToken }) => {\n const [transaction, setTransaction] = useState<TransactionConfig | null>(null)\n\n useEffect(() => {\n configReq(clientToken)\n .then((data) => setTransaction(data))\n .catch(console.error)\n }, [clientToken])\n\n return <TransactionContext.Provider value={transaction}>{children}</TransactionContext.Provider>\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import { ButtonHTMLAttributes, FC, useCallback, MouseEventHandler, useState } from 'react'\nimport styles from './button.module.css'\nimport clsx from 'clsx'\n\ntype Props = ButtonHTMLAttributes<HTMLButtonElement> & {\n color?: 'primary' | 'success'\n isLoading?: boolean\n}\n\nexport const Button: FC<Props> = ({\n color,\n isLoading,\n children,\n onClick,\n onMouseUp,\n onMouseOut,\n onMouseDown,\n ...props\n}: Props) => {\n const [press, setPress] = useState(false)\n\n const handleClick: MouseEventHandler<HTMLButtonElement> = useCallback(\n (e) => {\n if (isLoading || props.disabled) return\n onClick?.(e)\n },\n [onClick, isLoading, props.disabled],\n )\n\n const handleMouseDown: MouseEventHandler<HTMLButtonElement> = useCallback(\n (e) => {\n setPress(true)\n onMouseDown?.(e)\n },\n [onMouseDown],\n )\n\n const handleMouseUp: MouseEventHandler<HTMLButtonElement> = useCallback(\n (e) => {\n setPress(false)\n onMouseUp?.(e)\n },\n [onMouseUp],\n )\n\n const handleMouseOut: MouseEventHandler<HTMLButtonElement> = useCallback(\n (e) => {\n setPress(false)\n onMouseOut?.(e)\n },\n [onMouseOut],\n )\n\n return (\n <button\n {...props}\n onClick={handleClick}\n onMouseDown={handleMouseDown}\n onMouseUp={handleMouseUp}\n onMouseOut={handleMouseOut}\n className={clsx(\n styles.button,\n color && styles[color],\n isLoading && styles.loading,\n press && styles.press,\n props.className,\n )}\n style={props.style}\n >\n {children}\n </button>\n )\n}\n","\"use strict\";\nvar cardTypes = {\n visa: {\n niceType: \"Visa\",\n type: \"visa\",\n patterns: [4],\n gaps: [4, 8, 12],\n lengths: [16, 18, 19],\n code: {\n name: \"CVV\",\n size: 3,\n },\n },\n mastercard: {\n niceType: \"Mastercard\",\n type: \"mastercard\",\n patterns: [[51, 55], [2221, 2229], [223, 229], [23, 26], [270, 271], 2720],\n gaps: [4, 8, 12],\n lengths: [16],\n code: {\n name: \"CVC\",\n size: 3,\n },\n },\n \"american-express\": {\n niceType: \"American Express\",\n type: \"american-express\",\n patterns: [34, 37],\n gaps: [4, 10],\n lengths: [15],\n code: {\n name: \"CID\",\n size: 4,\n },\n },\n \"diners-club\": {\n niceType: \"Diners Club\",\n type: \"diners-club\",\n patterns: [[300, 305], 36, 38, 39],\n gaps: [4, 10],\n lengths: [14, 16, 19],\n code: {\n name: \"CVV\",\n size: 3,\n },\n },\n discover: {\n niceType: \"Discover\",\n type: \"discover\",\n patterns: [6011, [644, 649], 65],\n gaps: [4, 8, 12],\n lengths: [16, 19],\n code: {\n name: \"CID\",\n size: 3,\n },\n },\n jcb: {\n niceType: \"JCB\",\n type: \"jcb\",\n patterns: [2131, 1800, [3528, 3589]],\n gaps: [4, 8, 12],\n lengths: [16, 17, 18, 19],\n code: {\n name: \"CVV\",\n size: 3,\n },\n },\n unionpay: {\n niceType: \"UnionPay\",\n type: \"unionpay\",\n patterns: [\n 620,\n [62100, 62182],\n [62184, 62187],\n [62185, 62197],\n [62200, 62205],\n [622010, 622999],\n 622018,\n [62207, 62209],\n [623, 626],\n 6270,\n 6272,\n 6276,\n [627700, 627779],\n [627781, 627799],\n [6282, 6289],\n 6291,\n 6292,\n 810,\n [8110, 8131],\n [8132, 8151],\n [8152, 8163],\n [8164, 8171],\n ],\n gaps: [4, 8, 12],\n lengths: [14, 15, 16, 17, 18, 19],\n code: {\n name: \"CVN\",\n size: 3,\n },\n },\n maestro: {\n niceType: \"Maestro\",\n type: \"maestro\",\n patterns: [\n 493698,\n [500000, 504174],\n [504176, 506698],\n [506779, 508999],\n [56, 59],\n 63,\n 67,\n 6,\n ],\n gaps: [4, 8, 12],\n lengths: [12, 13, 14, 15, 16, 17, 18, 19],\n code: {\n name: \"CVC\",\n size: 3,\n },\n },\n elo: {\n niceType: \"Elo\",\n type: \"elo\",\n patterns: [\n 401178,\n 401179,\n 438935,\n 457631,\n 457632,\n 431274,\n 451416,\n 457393,\n 504175,\n [506699, 506778],\n [509000, 509999],\n 627780,\n 636297,\n 636368,\n [650031, 650033],\n [650035, 650051],\n [650405, 650439],\n [650485, 650538],\n [650541, 650598],\n [650700, 650718],\n [650720, 650727],\n [650901, 650978],\n [651652, 651679],\n [655000, 655019],\n [655021, 655058],\n ],\n gaps: [4, 8, 12],\n lengths: [16],\n code: {\n name: \"CVE\",\n size: 3,\n },\n },\n mir: {\n niceType: \"Mir\",\n type: \"mir\",\n patterns: [[2200, 2204]],\n gaps: [4, 8, 12],\n lengths: [16, 17, 18, 19],\n code: {\n name: \"CVP2\",\n size: 3,\n },\n },\n hiper: {\n niceType: \"Hiper\",\n type: \"hiper\",\n patterns: [637095, 63737423, 63743358, 637568, 637599, 637609, 637612],\n gaps: [4, 8, 12],\n lengths: [16],\n code: {\n name: \"CVC\",\n size: 3,\n },\n },\n hipercard: {\n niceType: \"Hipercard\",\n type: \"hipercard\",\n patterns: [606282],\n gaps: [4, 8, 12],\n lengths: [16],\n code: {\n name: \"CVC\",\n size: 3,\n },\n },\n};\nmodule.exports = cardTypes;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.clone = void 0;\nfunction clone(originalObject) {\n if (!originalObject) {\n return null;\n }\n return JSON.parse(JSON.stringify(originalObject));\n}\nexports.clone = clone;\n","\"use strict\";\n/*\n * Adapted from https://github.com/polvo-labs/card-type/blob/aaab11f80fa1939bccc8f24905a06ae3cd864356/src/cardType.js#L37-L42\n * */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.matches = void 0;\nfunction matchesRange(cardNumber, min, max) {\n var maxLengthToCheck = String(min).length;\n var substr = cardNumber.substr(0, maxLengthToCheck);\n var integerRepresentationOfCardNumber = parseInt(substr, 10);\n min = parseInt(String(min).substr(0, substr.length), 10);\n max = parseInt(String(max).substr(0, substr.length), 10);\n return (integerRepresentationOfCardNumber >= min &&\n integerRepresentationOfCardNumber <= max);\n}\nfunction matchesPattern(cardNumber, pattern) {\n pattern = String(pattern);\n return (pattern.substring(0, cardNumber.length) ===\n cardNumber.substring(0, pattern.length));\n}\nfunction matches(cardNumber, pattern) {\n if (Array.isArray(pattern)) {\n return matchesRange(cardNumber, pattern[0], pattern[1]);\n }\n return matchesPattern(cardNumber, pattern);\n}\nexports.matches = matches;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.addMatchingCardsToResults = void 0;\nvar clone_1 = require(\"./clone\");\nvar matches_1 = require(\"./matches\");\nfunction addMatchingCardsToResults(cardNumber, cardConfiguration, results) {\n var i, patternLength;\n for (i = 0; i < cardConfiguration.patterns.length; i++) {\n var pattern = cardConfiguration.patterns[i];\n if (!(0, matches_1.matches)(cardNumber, pattern)) {\n continue;\n }\n var clonedCardConfiguration = (0, clone_1.clone)(cardConfiguration);\n if (Array.isArray(pattern)) {\n patternLength = String(pattern[0]).length;\n }\n else {\n patternLength = String(pattern).length;\n }\n if (cardNumber.length >= patternLength) {\n clonedCardConfiguration.matchStrength = patternLength;\n }\n results.push(clonedCardConfiguration);\n break;\n }\n}\nexports.addMatchingCardsToResults = addMatchingCardsToResults;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isValidInputType = void 0;\nfunction isValidInputType(cardNumber) {\n return typeof cardNumber === \"string\" || cardNumber instanceof String;\n}\nexports.isValidInputType = isValidInputType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findBestMatch = void 0;\nfunction hasEnoughResultsToDetermineBestMatch(results) {\n var numberOfResultsWithMaxStrengthProperty = results.filter(function (result) { return result.matchStrength; }).length;\n /*\n * if all possible results have a maxStrength property that means the card\n * number is sufficiently long enough to determine conclusively what the card\n * type is\n * */\n return (numberOfResultsWithMaxStrengthProperty > 0 &&\n numberOfResultsWithMaxStrengthProperty === results.length);\n}\nfunction findBestMatch(results) {\n if (!hasEnoughResultsToDetermineBestMatch(results)) {\n return null;\n }\n return results.reduce(function (bestMatch, result) {\n if (!bestMatch) {\n return result;\n }\n /*\n * If the current best match pattern is less specific than this result, set\n * the result as the new best match\n * */\n if (Number(bestMatch.matchStrength) < Number(result.matchStrength)) {\n return result;\n }\n return bestMatch;\n });\n}\nexports.findBestMatch = findBestMatch;\n","\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar cardTypes = require(\"./lib/card-types\");\nvar add_matching_cards_to_results_1 = require(\"./lib/add-matching-cards-to-results\");\nvar is_valid_input_type_1 = require(\"./lib/is-valid-input-type\");\nvar find_best_match_1 = require(\"./lib/find-best-match\");\nvar clone_1 = require(\"./lib/clone\");\nvar customCards = {};\nvar cardNames = {\n VISA: \"visa\",\n MASTERCARD: \"mastercard\",\n AMERICAN_EXPRESS: \"american-express\",\n DINERS_CLUB: \"diners-club\",\n DISCOVER: \"discover\",\n JCB: \"jcb\",\n UNIONPAY: \"unionpay\",\n MAESTRO: \"maestro\",\n ELO: \"elo\",\n MIR: \"mir\",\n HIPER: \"hiper\",\n HIPERCARD: \"hipercard\",\n};\nvar ORIGINAL_TEST_ORDER = [\n cardNames.VISA,\n cardNames.MASTERCARD,\n cardNames.AMERICAN_EXPRESS,\n cardNames.DINERS_CLUB,\n cardNames.DISCOVER,\n cardNames.JCB,\n cardNames.UNIONPAY,\n cardNames.MAESTRO,\n cardNames.ELO,\n cardNames.MIR,\n cardNames.HIPER,\n cardNames.HIPERCARD,\n];\nvar testOrder = (0, clone_1.clone)(ORIGINAL_TEST_ORDER);\nfunction findType(cardType) {\n return customCards[cardType] || cardTypes[cardType];\n}\nfunction getAllCardTypes() {\n return testOrder.map(function (cardType) { return (0, clone_1.clone)(findType(cardType)); });\n}\nfunction getCardPosition(name, ignoreErrorForNotExisting) {\n if (ignoreErrorForNotExisting === void 0) { ignoreErrorForNotExisting = false; }\n var position = testOrder.indexOf(name);\n if (!ignoreErrorForNotExisting && position === -1) {\n throw new Error('\"' + name + '\" is not a supported card type.');\n }\n return position;\n}\nfunction creditCardType(cardNumber) {\n var results = [];\n if (!(0, is_valid_input_type_1.isValidInputType)(cardNumber)) {\n return results;\n }\n if (cardNumber.length === 0) {\n return getAllCardTypes();\n }\n testOrder.forEach(function (cardType) {\n var cardConfiguration = findType(cardType);\n (0, add_matching_cards_to_results_1.addMatchingCardsToResults)(cardNumber, cardConfiguration, results);\n });\n var bestMatch = (0, find_best_match_1.findBestMatch)(results);\n if (bestMatch) {\n return [bestMatch];\n }\n return results;\n}\ncreditCardType.getTypeInfo = function (cardType) {\n return (0, clone_1.clone)(findType(cardType));\n};\ncreditCardType.removeCard = function (name) {\n var position = getCardPosition(name);\n testOrder.splice(position, 1);\n};\ncreditCardType.addCard = function (config) {\n var existingCardPosition = getCardPosition(config.type, true);\n customCards[config.type] = config;\n if (existingCardPosition === -1) {\n testOrder.push(config.type);\n }\n};\ncreditCardType.updateCard = function (cardType, updates) {\n var originalObject = customCards[cardType] || cardTypes[cardType];\n if (!originalObject) {\n throw new Error(\"\\\"\".concat(cardType, \"\\\" is not a recognized type. Use `addCard` instead.'\"));\n }\n if (updates.type && originalObject.type !== updates.type) {\n throw new Error(\"Cannot overwrite type parameter.\");\n }\n var clonedCard = (0, clone_1.clone)(originalObject);\n clonedCard = __assign(__assign({}, clonedCard), updates);\n customCards[clonedCard.type] = clonedCard;\n};\ncreditCardType.changeOrder = function (name, position) {\n var currentPosition = getCardPosition(name);\n testOrder.splice(currentPosition, 1);\n testOrder.splice(position, 0, name);\n};\ncreditCardType.resetModifications = function () {\n testOrder = (0, clone_1.clone)(ORIGINAL_TEST_ORDER);\n customCards = {};\n};\ncreditCardType.types = cardNames;\nmodule.exports = creditCardType;\n","import { getTypeInfo, updateCard } from 'credit-card-type'\n\nupdateCard('visa', {\n lengths: [16],\n})\n\nupdateCard('unionpay', {\n gaps: [4, 8, 12, 16],\n})\n\nexport const prettyCardNumber = (cardNumber: string, cardType: string): string => {\n const card = getTypeInfo(cardType)\n const numbers = cardNumber.replace(/\\D/g, '')\n const gaps = card?.gaps || [4, 8, 12]\n const size = card ? Math.max(...card.lengths) + gaps.length : 19\n\n const offsets = [0].concat(gaps, numbers.length)\n const components = []\n\n for (let i = 0; offsets[i] < numbers.length; i++) {\n const start = offsets[i]\n const end = Math.min(offsets[i + 1], numbers.length)\n components.push(numbers.slice(start, end))\n }\n\n return components.join(' ').slice(0, size)\n}\n\nexport const prettyCVC = (cvc: string, cardType: string): string => {\n const card = getTypeInfo(cardType)\n const size = card?.code.size || 4\n return cvc.replace(/\\D/g, '').slice(0, size)\n}\n\nexport const prettyCardExpiry = (expiry: string, prev: string): string => {\n const numbers = expiry.replace(/\\D/g, '')\n let month = numbers.slice(0, 2)\n if (!month) return ''\n\n const monthNumber = Number(month)\n if (month !== '01') {\n if (Number.isNaN(monthNumber)) return '0'\n if (monthNumber === 0 || monthNumber === 1) return `${monthNumber}`\n if (monthNumber > 12) return '1'\n month = monthNumber > 9 ? `${monthNumber}` : `0${monthNumber}`\n }\n\n if (expiry.length < prev.length) {\n const lastSymbol = Number(expiry[expiry.length - 1])\n if (Number.isNaN(lastSymbol)) return month\n }\n\n const year = numbers.slice(2, 4)\n return `${month} / ${year}`\n}\n","\"use client\";\nimport { createContext } from 'react';\n\nconst LayoutGroupContext = createContext({});\n\nexport { LayoutGroupContext };\n","import { useRef } from 'react';\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nfunction useConstant(init) {\n const ref = useRef(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}\n\nexport { useConstant };\n","const isBrowser = typeof window !== \"undefined\";\n\nexport { isBrowser };\n","import { useLayoutEffect, useEffect } from 'react';\nimport { isBrowser } from './is-browser.mjs';\n\nconst useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect };\n","\"use client\";\nimport { createContext } from 'react';\n\n/**\n * @public\n */\nconst PresenceContext = \n/* @__PURE__ */ createContext(null);\n\nexport { PresenceContext };\n","function addUniqueItem(arr, item) {\n if (arr.indexOf(item) === -1)\n arr.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n if (index > -1)\n arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem([...arr], fromIndex, toIndex) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n const [item] = arr.splice(fromIndex, 1);\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n","const clamp = (min, max, v) => {\n if (v > max)\n return max;\n if (v < min)\n return min;\n return v;\n};\n\nexport { clamp };\n","let warning = () => { };\nlet invariant = () => { };\nif (process.env.NODE_ENV !== \"production\") {\n warning = (check, message) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(message);\n }\n };\n invariant = (check, message) => {\n if (!check) {\n throw new Error(message);\n }\n };\n}\n\nexport { invariant, warning };\n","const MotionGlobalConfig = {};\n\nexport { MotionGlobalConfig };\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nconst isNumericalString = (v) => /^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(v);\n\nexport { isNumericalString };\n","function isObject(value) {\n return typeof value === \"object\" && value !== null;\n}\n\nexport { isObject };\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nconst isZeroValueString = (v) => /^0[^.\\s]+$/u.test(v);\n\nexport { isZeroValueString };\n","/*#__NO_SIDE_EFFECTS__*/\nfunction memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n","/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n","/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nconst combineFunctions = (a, b) => (v) => b(a(v));\nconst pipe = (...transformers) => transformers.reduce(combineFunctions);\n\nexport { pipe };\n","/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n\n @param [number]: Lower limit\n @param [number]: Upper limit\n @param [number]: Value to find progress within given range\n @return [number]: Progress of value within range as expressed 0-1\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst progress = (from, to, value) => {\n const toFromDifference = to - from;\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\nexport { progress };\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nclass SubscriptionManager {\n constructor() {\n this.subscriptions = [];\n }\n add(handler) {\n addUniqueItem(this.subscriptions, handler);\n return () => removeItem(this.subscriptions, handler);\n }\n notify(a, b, c) {\n const numSubscriptions = this.subscriptions.length;\n if (!numSubscriptions)\n return;\n if (numSubscriptions === 1) {\n /**\n * If there's only a single handler we can just call it without invoking a loop.\n */\n this.subscriptions[0](a, b, c);\n }\n else {\n for (let i = 0; i < numSubscriptions; i++) {\n /**\n * Check whether the handler exists before firing as it's possible\n * the subscriptions were modified during this loop running.\n */\n const handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n }\n getSize() {\n return this.subscriptions.length;\n }\n clear() {\n this.subscriptions.length = 0;\n }\n}\n\nexport { SubscriptionManager };\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\n/*#__NO_SIDE_EFFECTS__*/\nconst secondsToMilliseconds = (seconds) => seconds * 1000;\n/*#__NO_SIDE_EFFECTS__*/\nconst millisecondsToSeconds = (milliseconds) => milliseconds / 1000;\n\nexport { millisecondsToSeconds, secondsToMilliseconds };\n","/*\n Convert velocity into velocity per second\n\n @param [number]: Unit per frame\n @param [number]: Frame duration in ms\n*/\nfunction velocityPerSecond(velocity, frameDuration) {\n return frameDuration ? velocity * (1000 / frameDuration) : 0;\n}\n\nexport { velocityPerSecond };\n","const warned = new Set();\nfunction hasWarned(message) {\n return warned.has(message);\n}\nfunction warnOnce(condition, message, element) {\n if (condition || warned.has(message))\n return;\n console.warn(message);\n if (element)\n console.warn(element);\n warned.add(message);\n}\n\nexport { hasWarned, warnOnce };\n","import { noop } from '../noop.mjs';\n\n/*\n Bezier function generator\n This has been modified from Gaëtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n \n I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticiably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n t;\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 12;\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - x;\n if (currentX > 0.0) {\n upperBound = currentT;\n }\n else {\n lowerBound = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2)\n return noop;\n const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);\n // If animation is at start/end, return t without easing\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n","// Accepts an easing function and returns a new one that outputs mirrored values for\n// the second half of the animation. Turns easeIn into easeInOut.\nconst mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n\nexport { mirrorEasing };\n","// Accepts an easing function and returns a new one that outputs reversed values.\n// Turns easeIn into easeOut.\nconst reverseEasing = (easing) => (p) => 1 - easing(1 - p);\n\nexport { reverseEasing };\n","import { cubicBezier } from './cubic-bezier.mjs';\nimport { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99);\nconst backIn = /*@__PURE__*/ reverseEasing(backOut);\nconst backInOut = /*@__PURE__*/ mirrorEasing(backIn);\n\nexport { backIn, backInOut, backOut };\n","import { backIn } from './back.mjs';\n\nconst anticipate = (p) => (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n\nexport { anticipate };\n","import { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst circIn = (p) => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circIn);\n\nexport { circIn, circInOut, circOut };\n","import { cubicBezier } from './cubic-bezier.mjs';\n\nconst easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1);\nconst easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1);\nconst easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1);\n\nexport { easeIn, easeInOut, easeOut };\n","const isEasingArray = (ease) => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { isEasingArray };\n","const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\nexport { isBezierDefinition };\n","import { invariant } from '../../errors.mjs';\nimport { noop } from '../../noop.mjs';\nimport { anticipate } from '../anticipate.mjs';\nimport { backIn, backInOut, backOut } from '../back.mjs';\nimport { circIn, circInOut, circOut } from '../circ.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { easeIn, easeInOut, easeOut } from '../ease.mjs';\nimport { isBezierDefinition } from './is-bezier-definition.mjs';\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n};\nconst isValidEasing = (easing) => {\n return typeof easing === \"string\";\n};\nconst easingDefinitionToFunction = (definition) => {\n if (isBezierDefinition(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`);\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (isValidEasing(definition)) {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`);\n return easingLookup[definition];\n }\n return definition;\n};\n\nexport { easingDefinitionToFunction };\n","const stepsOrder = [\n \"setup\", // Compute\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"preUpdate\", // Compute\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\n\nexport { stepsOrder };\n","const statsBuffer = {\n value: null,\n addProjectionMetrics: null,\n};\n\nexport { statsBuffer };\n","import { statsBuffer } from '../stats/buffer.mjs';\n\nfunction createRenderStep(runNextFrame, stepName) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n let numCalls = 0;\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n numCalls++;\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n if (!queue.has(callback))\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n [thisFrame, nextFrame] = [nextFrame, thisFrame];\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n /**\n * If we're recording stats then\n */\n if (stepName && statsBuffer.value) {\n statsBuffer.value.frameloop[stepName].push(numCalls);\n }\n numCalls = 0;\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear();\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { stepsOrder } from './order.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : undefined);\n return acc;\n }, {});\n const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps;\n const processBatch = () => {\n const timestamp = MotionGlobalConfig.useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n if (!MotionGlobalConfig.useManualTiming) {\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n }\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n setup.process(state);\n read.process(state);\n resolveKeyframes.process(state);\n preUpdate.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher };\n","import { noop } from 'motion-utils';\nimport { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = /* @__PURE__ */ createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n\nexport { cancelFrame, frame, frameData, frameSteps };\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { frameData } from './frame.mjs';\n\nlet now;\nfunction clearTime() {\n now = undefined;\n}\n/**\n * An eventloop-synchronous alternative to performance.now().\n *\n * Ensures that time measurements remain consistent within a synchronous context.\n * Usually calling performance.now() twice within the same synchronous context\n * will return different values which isn't useful for animations when we're usually\n * trying to sync animations to the same frame.\n */\nconst time = {\n now: () => {\n if (now === undefined) {\n time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming\n ? frameData.timestamp\n : performance.now());\n }\n return now;\n },\n set: (newTime) => {\n now = newTime;\n queueMicrotask(clearTime);\n },\n};\n\nexport { time };\n","const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = \n/*@__PURE__*/ checkStringStartsWith(\"--\");\nconst startsAsVariableToken = \n/*@__PURE__*/ checkStringStartsWith(\"var(--\");\nconst isCSSVariableToken = (value) => {\n const startsWithToken = startsAsVariableToken(value);\n if (!startsWithToken)\n return false;\n // Ensure any comments are stripped from the value as this can harm performance of the regex.\n return singleCssVariableRegex.test(value.split(\"/*\")[0].trim());\n};\nconst singleCssVariableRegex = /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;\n\nexport { isCSSVariableName, isCSSVariableToken };\n","import { clamp } from 'motion-utils';\n\nconst number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v),\n};\nconst scale = {\n ...number,\n default: 1,\n};\n\nexport { alpha, number, scale };\n","// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nconst sanitize = (v) => Math.round(v * 100000) / 100000;\n\nexport { sanitize };\n","const floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;\n\nexport { floatRegex };\n","function isNullish(v) {\n return v == null;\n}\n\nexport { isNullish };\n","const singleColorRegex = /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;\n\nexport { singleColorRegex };\n","import { floatRegex } from '../utils/float-regex.mjs';\nimport { isNullish } from '../utils/is-nullish.mjs';\nimport { singleColorRegex } from '../utils/single-color-regex.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((typeof v === \"string\" &&\n singleColorRegex.test(v) &&\n v.startsWith(type)) ||\n (testProp &&\n !isNullish(v) &&\n Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (typeof v !== \"string\")\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n","import { clamp } from 'motion-utils';\nimport { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v)),\n};\nconst rgba = {\n test: /*@__PURE__*/ isColorString(\"rgb\", \"red\"),\n parse: /*@__PURE__*/ splitColor(\"red\", \"green\", \"blue\"),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => \"rgba(\" +\n rgbUnit.transform(red) +\n \", \" +\n rgbUnit.transform(green) +\n \", \" +\n rgbUnit.transform(blue) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\",\n};\n\nexport { rgbUnit, rgba };\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = \"\";\n let g = \"\";\n let b = \"\";\n let a = \"\";\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n","/*#__NO_SIDE_EFFECTS__*/\nconst createUnitType = (unit) => ({\n test: (v) => typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = /*@__PURE__*/ createUnitType(\"deg\");\nconst percent = /*@__PURE__*/ createUnitType(\"%\");\nconst px = /*@__PURE__*/ createUnitType(\"px\");\nconst vh = /*@__PURE__*/ createUnitType(\"vh\");\nconst vw = /*@__PURE__*/ createUnitType(\"vw\");\nconst progressPercentage = /*@__PURE__*/ (() => ({\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100),\n}))();\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst hsla = {\n test: /*@__PURE__*/ isColorString(\"hsl\", \"hue\"),\n parse: /*@__PURE__*/ splitColor(\"hue\", \"saturation\", \"lightness\"),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return (\"hsla(\" +\n Math.round(hue) +\n \", \" +\n percent.transform(sanitize(saturation)) +\n \", \" +\n percent.transform(sanitize(lightness)) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\");\n },\n};\n\nexport { hsla };\n","import { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return typeof v === \"string\"\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n};\n\nexport { color };\n","const colorRegex = /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;\n\nexport { colorRegex };\n","import { color } from '../color/index.mjs';\nimport { colorRegex } from '../utils/color-regex.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\n\nfunction test(v) {\n return (isNaN(v) &&\n typeof v === \"string\" &&\n (v.match(floatRegex)?.length || 0) +\n (v.match(colorRegex)?.length || 0) >\n 0);\n}\nconst NUMBER_TOKEN = \"number\";\nconst COLOR_TOKEN = \"color\";\nconst VAR_TOKEN = \"var\";\nconst VAR_FUNCTION_TOKEN = \"var(\";\nconst SPLIT_TOKEN = \"${}\";\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`\nconst complexRegex = /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const values = [];\n const indexes = {\n color: [],\n number: [],\n var: [],\n };\n const types = [];\n let i = 0;\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i);\n types.push(COLOR_TOKEN);\n values.push(color.parse(parsedValue));\n }\n else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i);\n types.push(VAR_TOKEN);\n values.push(parsedValue);\n }\n else {\n indexes.number.push(i);\n types.push(NUMBER_TOKEN);\n values.push(parseFloat(parsedValue));\n }\n ++i;\n return SPLIT_TOKEN;\n });\n const split = tokenised.split(SPLIT_TOKEN);\n return { values, split, indexes, types };\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction createTransformer(source) {\n const { split, types } = analyseComplexValue(source);\n const numSections = split.length;\n return (v) => {\n let output = \"\";\n for (let i = 0; i < numSections; i++) {\n output += split[i];\n if (v[i] !== undefined) {\n const type = types[i];\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i]);\n }\n else if (type === COLOR_TOKEN) {\n output += color.transform(v[i]);\n }\n else {\n output += v[i];\n }\n }\n }\n return output;\n };\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : v;\nfunction getAnimatableNone(v) {\n const parsed = parseComplexValue(v);\n const transformer = createTransformer(v);\n return transformer(parsed.map(convertNumbersToZero));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex };\n","// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n }\n else {\n const q = lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n };\n}\n\nexport { hslaToRgba };\n","function mixImmediate(a, b) {\n return (p) => (p > 0 ? b : a);\n}\n\nexport { mixImmediate };\n","/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nconst mixNumber = (from, to, progress) => {\n return from + (to - from) * progress;\n};\n\nexport { mixNumber };\n","import { warning } from 'motion-utils';\nimport { hex } from '../../value/types/color/hex.mjs';\nimport { hsla } from '../../value/types/color/hsla.mjs';\nimport { hslaToRgba } from '../../value/types/color/hsla-to-rgba.mjs';\nimport { rgba } from '../../value/types/color/rgba.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber } from './number.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const expo = v * (to * to - fromExpo) + fromExpo;\n return expo < 0 ? 0 : Math.sqrt(expo);\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n const type = getColorType(color);\n warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`);\n if (!Boolean(type))\n return false;\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Motion's stricter typing\n model = hslaToRgba(model);\n }\n return model;\n}\nconst mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n if (!fromRGBA || !toRGBA) {\n return mixImmediate(from, to);\n }\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n","const invisibleValues = new Set([\"none\", \"hidden\"]);\n/**\n * Returns a function that, when provided a progress value between 0 and 1,\n * will return the \"none\" or \"hidden\" string only when the progress is that of\n * the origin or target.\n */\nfunction mixVisibility(origin, target) {\n if (invisibleValues.has(origin)) {\n return (p) => (p <= 0 ? origin : target);\n }\n else {\n return (p) => (p >= 1 ? target : origin);\n }\n}\n\nexport { invisibleValues, mixVisibility };\n","import { pipe, warning } from 'motion-utils';\nimport { isCSSVariableToken } from '../../animation/utils/is-css-variable.mjs';\nimport { color } from '../../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../../value/types/complex/index.mjs';\nimport { mixColor } from './color.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber as mixNumber$1 } from './number.mjs';\nimport { invisibleValues, mixVisibility } from './visibility.mjs';\n\nfunction mixNumber(a, b) {\n return (p) => mixNumber$1(a, b, p);\n}\nfunction getMixer(a) {\n if (typeof a === \"number\") {\n return mixNumber;\n }\n else if (typeof a === \"string\") {\n return isCSSVariableToken(a)\n ? mixImmediate\n : color.test(a)\n ? mixColor\n : mixComplex;\n }\n else if (Array.isArray(a)) {\n return mixArray;\n }\n else if (typeof a === \"object\") {\n return color.test(a) ? mixColor : mixObject;\n }\n return mixImmediate;\n}\nfunction mixArray(a, b) {\n const output = [...a];\n const numValues = output.length;\n const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));\n return (p) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](p);\n }\n return output;\n };\n}\nfunction mixObject(a, b) {\n const output = { ...a, ...b };\n const blendValue = {};\n for (const key in output) {\n if (a[key] !== undefined && b[key] !== undefined) {\n blendValue[key] = getMixer(a[key])(a[key], b[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n}\nfunction matchOrder(origin, target) {\n const orderedOrigin = [];\n const pointers = { color: 0, var: 0, number: 0 };\n for (let i = 0; i < target.values.length; i++) {\n const type = target.types[i];\n const originIndex = origin.indexes[type][pointers[type]];\n const originValue = origin.values[originIndex] ?? 0;\n orderedOrigin[i] = originValue;\n pointers[type]++;\n }\n return orderedOrigin;\n}\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length &&\n originStats.indexes.color.length === targetStats.indexes.color.length &&\n originStats.indexes.number.length >= targetStats.indexes.number.length;\n if (canInterpolate) {\n if ((invisibleValues.has(origin) &&\n !targetStats.values.length) ||\n (invisibleValues.has(target) &&\n !originStats.values.length)) {\n return mixVisibility(origin, target);\n }\n return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);\n }\n else {\n warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);\n return mixImmediate(origin, target);\n }\n};\n\nexport { getMixer, mixArray, mixComplex, mixObject };\n","import { getMixer } from './complex.mjs';\nimport { mixNumber } from './number.mjs';\n\nfunction mix(from, to, p) {\n if (typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof p === \"number\") {\n return mixNumber(from, to, p);\n }\n const mixer = getMixer(from);\n return mixer(from, to);\n}\n\nexport { mix };\n","import { time } from '../../frameloop/sync-time.mjs';\nimport { frame, cancelFrame, frameData } from '../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),\n };\n};\n\nexport { frameloopDriver };\n","const generateLinearEasing = (easing, duration, // as milliseconds\nresolution = 10 // as milliseconds\n) => {\n let points = \"\";\n const numPoints = Math.max(Math.round(duration / resolution), 2);\n for (let i = 0; i < numPoints; i++) {\n points += easing(i / (numPoints - 1)) + \", \";\n }\n return `linear(${points.substring(0, points.length - 2)})`;\n};\n\nexport { generateLinearEasing };\n","/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state = generator.next(duration);\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n","import { millisecondsToSeconds } from 'motion-utils';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nfunction createGeneratorEasing(options, scale = 100, createGenerator) {\n const generator = createGenerator({ ...options, keyframes: [0, scale] });\n const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n return {\n type: \"keyframes\",\n ease: (progress) => {\n return generator.next(duration * progress).value / scale;\n },\n duration: millisecondsToSeconds(duration),\n };\n}\n\nexport { createGeneratorEasing };\n","import { velocityPerSecond } from 'motion-utils';\n\nconst velocitySampleDuration = 5; // ms\nfunction calcGeneratorVelocity(resolveValue, t, current) {\n const prevT = Math.max(t - velocitySampleDuration, 0);\n return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n\nexport { calcGeneratorVelocity };\n","const springDefaults = {\n // Default spring physics\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n velocity: 0.0,\n // Default duration/bounce-based options\n duration: 800, // in ms\n bounce: 0.3,\n visualDuration: 0.3, // in seconds\n // Rest thresholds\n restSpeed: {\n granular: 0.01,\n default: 2,\n },\n restDelta: {\n granular: 0.005,\n default: 0.5,\n },\n // Limits\n minDuration: 0.01, // in seconds\n maxDuration: 10.0, // in seconds\n minDamping: 0.05,\n maxDamping: 1,\n};\n\nexport { springDefaults };\n","import { warning, secondsToMilliseconds, clamp, millisecondsToSeconds } from 'motion-utils';\nimport { springDefaults } from './defaults.mjs';\n\nconst safeMin = 0.001;\nfunction findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), \"Spring duration must be 10 seconds or less\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);\n duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\n\nexport { calcAngularFreq, findSpring };\n","import { millisecondsToSeconds, secondsToMilliseconds, clamp } from 'motion-utils';\nimport { generateLinearEasing } from '../../waapi/utils/linear.mjs';\nimport { calcGeneratorDuration, maxGeneratorDuration } from '../utils/calc-duration.mjs';\nimport { createGeneratorEasing } from '../utils/create-generator-easing.mjs';\nimport { calcGeneratorVelocity } from '../utils/velocity.mjs';\nimport { springDefaults } from './defaults.mjs';\nimport { findSpring, calcAngularFreq } from './find.mjs';\n\nconst durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n let springOptions = {\n velocity: springDefaults.velocity,\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n mass: springDefaults.mass,\n isResolvedFromDuration: false,\n ...options,\n };\n // stiffness/damping/mass overrides duration/bounce\n if (!isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)) {\n if (options.visualDuration) {\n const visualDuration = options.visualDuration;\n const root = (2 * Math.PI) / (visualDuration * 1.2);\n const stiffness = root * root;\n const damping = 2 *\n clamp(0.05, 1, 1 - (options.bounce || 0)) *\n Math.sqrt(stiffness);\n springOptions = {\n ...springOptions,\n mass: springDefaults.mass,\n stiffness,\n damping,\n };\n }\n else {\n const derived = findSpring(options);\n springOptions = {\n ...springOptions,\n ...derived,\n mass: springDefaults.mass,\n };\n springOptions.isResolvedFromDuration = true;\n }\n }\n return springOptions;\n}\nfunction spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {\n const options = typeof optionsOrVisualDuration !== \"object\"\n ? {\n visualDuration: optionsOrVisualDuration,\n keyframes: [0, 1],\n bounce,\n }\n : optionsOrVisualDuration;\n let { restSpeed, restDelta } = options;\n const origin = options.keyframes[0];\n const target = options.keyframes[options.keyframes.length - 1];\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = { done: false, value: origin };\n const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, } = getSpringOptions({\n ...options,\n velocity: -millisecondsToSeconds(options.velocity || 0),\n });\n const initialVelocity = velocity || 0.0;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const initialDelta = target - origin;\n const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\n /**\n * If we're working on a granular scale, use smaller defaults for determining\n * when the spring is finished.\n *\n * These defaults have been selected emprically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const isGranularScale = Math.abs(initialDelta) < 5;\n restSpeed || (restSpeed = isGranularScale\n ? springDefaults.restSpeed.granular\n : springDefaults.restSpeed.default);\n restDelta || (restDelta = isGranularScale\n ? springDefaults.restDelta.granular\n : springDefaults.restDelta.default);\n let resolveSpring;\n if (dampingRatio < 1) {\n const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n // Underdamped spring\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (target -\n envelope *\n (((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq) *\n Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t)));\n };\n }\n else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t) => target -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) * t);\n }\n else {\n // Overdamped spring\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n // When performing sinh or cosh values can hit Infinity so we cap them here\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return (target -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq);\n };\n }\n const generator = {\n calculatedDuration: isResolvedFromDuration ? duration || null : null,\n next: (t) => {\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n let currentVelocity = t === 0 ? initialVelocity : 0.0;\n /**\n * We only need to calculate velocity for under-damped springs\n * as over- and critically-damped springs can't overshoot, so\n * checking only for displacement is enough.\n */\n if (dampingRatio < 1) {\n currentVelocity =\n t === 0\n ? secondsToMilliseconds(initialVelocity)\n : calcGeneratorVelocity(resolveSpring, t, current);\n }\n const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;\n const isBelowDisplacementThreshold = Math.abs(target - current) <= restDelta;\n state.done =\n isBelowVelocityThreshold && isBelowDisplacementThreshold;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? target : current;\n return state;\n },\n toString: () => {\n const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30);\n return calculatedDuration + \"ms \" + easing;\n },\n toTransition: () => { },\n };\n return generator;\n}\nspring.applyToOptions = (options) => {\n const generatorOptions = createGeneratorEasing(options, 100, spring);\n options.ease = generatorOptions.ease;\n options.duration = secondsToMilliseconds(generatorOptions.duration);\n options.type = \"keyframes\";\n return options;\n};\n\nexport { spring };\n","import { spring } from './spring/index.mjs';\nimport { calcGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n const nearestBoundary = (v) => {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n velocity: calcGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n","import { invariant, clamp, MotionGlobalConfig, noop, pipe, progress } from 'motion-utils';\nimport { mix } from './mix/index.mjs';\n\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || MotionGlobalConfig.mix || mix;\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revisit this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, \"Both input and output ranges must be the same length\");\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1)\n return () => output[0];\n if (inputLength === 2 && output[0] === output[1])\n return () => output[1];\n const isZeroDeltaRange = input[0] === input[1];\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n if (isZeroDeltaRange && v < input[0])\n return output[0];\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n","import { progress } from 'motion-utils';\nimport { mixNumber } from '../../../utils/mix/number.mjs';\n\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mixNumber(min, 1, offsetProgress));\n }\n}\n\nexport { fillOffset };\n","import { fillOffset } from './fill.mjs';\n\nfunction defaultOffset(arr) {\n const offset = [0];\n fillOffset(offset, arr.length - 1);\n return offset;\n}\n\nexport { defaultOffset };\n","function convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\n\nexport { convertOffsetToTimes };\n","import { easeInOut, isEasingArray, easingDefinitionToFunction } from 'motion-utils';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n","const isNotNull = (value) => value !== null;\nfunction getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }, finalKeyframe, speed = 1) {\n const resolvedKeyframes = keyframes.filter(isNotNull);\n const useFirstKeyframe = speed < 0 || (repeat && repeatType !== \"loop\" && repeat % 2 === 1);\n const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1;\n return !index || finalKeyframe === undefined\n ? resolvedKeyframes[index]\n : finalKeyframe;\n}\n\nexport { getFinalKeyframe };\n","import { inertia } from '../generators/inertia.mjs';\nimport { keyframes } from '../generators/keyframes.mjs';\nimport { spring } from '../generators/spring/index.mjs';\n\nconst transitionTypeMap = {\n decay: inertia,\n inertia,\n tween: keyframes,\n keyframes: keyframes,\n spring,\n};\nfunction replaceTransitionType(transition) {\n if (typeof transition.type === \"string\") {\n transition.type = transitionTypeMap[transition.type];\n }\n}\n\nexport { replaceTransitionType };\n","class WithPromise {\n constructor() {\n this.updateFinished();\n }\n get finished() {\n return this._finished;\n }\n updateFinished() {\n this._finished = new Promise((resolve) => {\n this.resolve = resolve;\n });\n }\n notifyFinished() {\n this.resolve();\n }\n /**\n * Allows the animation to be awaited.\n *\n * @deprecated Use `finished` instead.\n */\n then(onResolve, onReject) {\n return this.finished.then(onResolve, onReject);\n }\n}\n\nexport { WithPromise };\n","import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { activeAnimations } from '../stats/animation-count.mjs';\nimport { mix } from '../utils/mix/index.mjs';\nimport { frameloopDriver } from './drivers/frame.mjs';\nimport { inertia } from './generators/inertia.mjs';\nimport { keyframes } from './generators/keyframes.mjs';\nimport { calcGeneratorDuration } from './generators/utils/calc-duration.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\n\nconst percentToProgress = (percent) => percent / 100;\nclass JSAnimation extends WithPromise {\n constructor(options) {\n super();\n this.state = \"idle\";\n this.startTime = null;\n this.isStopped = false;\n /**\n * The current time of the animation.\n */\n this.currentTime = 0;\n /**\n * The time at which the animation was paused.\n */\n this.holdTime = null;\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n this.playbackSpeed = 1;\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n this.stop = (sync = true) => {\n if (sync) {\n const { motionValue } = this.options;\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now());\n }\n }\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n this.options.onStop?.();\n };\n activeAnimations.mainThread++;\n this.options = options;\n this.initAnimation();\n this.play();\n if (options.autoplay === false)\n this.pause();\n }\n initAnimation() {\n const { options } = this;\n replaceTransitionType(options);\n const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;\n let { keyframes: keyframes$1 } = options;\n const generatorFactory = type || keyframes;\n if (process.env.NODE_ENV !== \"production\" &&\n generatorFactory !== keyframes) {\n invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`);\n }\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...options, keyframes: keyframes$1 });\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n this.mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -velocity,\n });\n }\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n this.calculatedDuration = calculatedDuration;\n this.resolvedDuration = calculatedDuration + repeatDelay;\n this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;\n this.generator = generator;\n }\n updateTime(timestamp) {\n const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;\n // Update currentTime\n if (this.holdTime !== null) {\n this.currentTime = this.holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime = animationTime;\n }\n }\n tick(timestamp, sample = false) {\n const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration, } = this;\n if (this.startTime === null)\n return generator.next(0);\n const { delay = 0, keyframes, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe, } = this.options;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp);\n }\n else if (this.speed < 0) {\n this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n }\n if (sample) {\n this.currentTime = timestamp;\n }\n else {\n this.updateTime(timestamp);\n }\n // Rebase on delay\n const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);\n const isInDelayPhase = this.playbackSpeed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration;\n this.currentTime = Math.max(timeWithoutDelay, 0);\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration;\n }\n let elapsed = this.currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const isOddIteration = Boolean(currentIteration % 2);\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n const state = isInDelayPhase\n ? { done: false, value: keyframes[0] }\n : frameGenerator.next(elapsed);\n if (mixKeyframes) {\n state.value = mixKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.playbackSpeed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0;\n }\n const isAnimationFinished = this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done));\n // TODO: The exception for inertia could be cleaner here\n if (isAnimationFinished && type !== inertia) {\n state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n }\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state;\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.finished.then(resolve, reject);\n }\n get duration() {\n return millisecondsToSeconds(this.calculatedDuration);\n }\n get time() {\n return millisecondsToSeconds(this.currentTime);\n }\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n this.currentTime = newTime;\n if (this.startTime === null ||\n this.holdTime !== null ||\n this.playbackSpeed === 0) {\n this.holdTime = newTime;\n }\n else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.playbackSpeed;\n }\n this.driver?.start(false);\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n this.updateTime(time.now());\n const hasChanged = this.playbackSpeed !== newSpeed;\n this.playbackSpeed = newSpeed;\n if (hasChanged) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, startTime } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n this.options.onPlay?.();\n const now = this.driver.now();\n if (this.state === \"finished\") {\n this.updateFinished();\n this.startTime = now;\n }\n else if (this.holdTime !== null) {\n this.startTime = now - this.holdTime;\n }\n else if (!this.startTime) {\n this.startTime = startTime ?? now;\n }\n if (this.state === \"finished\" && this.speed < 0) {\n this.startTime += this.calculatedDuration;\n }\n this.holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\";\n this.driver.start();\n }\n pause() {\n this.state = \"paused\";\n this.updateTime(time.now());\n this.holdTime = this.currentTime;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.notifyFinished();\n this.teardown();\n this.state = \"finished\";\n this.options.onComplete?.();\n }\n cancel() {\n this.holdTime = null;\n this.startTime = 0;\n this.tick(0);\n this.teardown();\n this.options.onCancel?.();\n }\n teardown() {\n this.state = \"idle\";\n this.stopDriver();\n this.startTime = this.holdTime = null;\n activeAnimations.mainThread--;\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = undefined;\n }\n sample(sampleTime) {\n this.startTime = 0;\n return this.tick(sampleTime, true);\n }\n attachTimeline(timeline) {\n if (this.options.allowFlatten) {\n this.options.type = \"keyframes\";\n this.options.ease = \"linear\";\n this.initAnimation();\n }\n this.driver?.stop();\n return timeline.observe(this);\n }\n}\n// Legacy function support\nfunction animateValue(options) {\n return new JSAnimation(options);\n}\n\nexport { JSAnimation, animateValue };\n","function fillWildcards(keyframes) {\n for (let i = 1; i < keyframes.length; i++) {\n keyframes[i] ?? (keyframes[i] = keyframes[i - 1]);\n }\n}\n\nexport { fillWildcards };\n","const radToDeg = (rad) => (rad * 180) / Math.PI;\nconst rotate = (v) => {\n const angle = radToDeg(Math.atan2(v[1], v[0]));\n return rebaseAngle(angle);\n};\nconst matrix2dParsers = {\n x: 4,\n y: 5,\n translateX: 4,\n translateY: 5,\n scaleX: 0,\n scaleY: 3,\n scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2,\n rotate,\n rotateZ: rotate,\n skewX: (v) => radToDeg(Math.atan(v[1])),\n skewY: (v) => radToDeg(Math.atan(v[2])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2,\n};\nconst rebaseAngle = (angle) => {\n angle = angle % 360;\n if (angle < 0)\n angle += 360;\n return angle;\n};\nconst rotateZ = rotate;\nconst scaleX = (v) => Math.sqrt(v[0] * v[0] + v[1] * v[1]);\nconst scaleY = (v) => Math.sqrt(v[4] * v[4] + v[5] * v[5]);\nconst matrix3dParsers = {\n x: 12,\n y: 13,\n z: 14,\n translateX: 12,\n translateY: 13,\n translateZ: 14,\n scaleX,\n scaleY,\n scale: (v) => (scaleX(v) + scaleY(v)) / 2,\n rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))),\n rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))),\n rotateZ,\n rotate: rotateZ,\n skewX: (v) => radToDeg(Math.atan(v[4])),\n skewY: (v) => radToDeg(Math.atan(v[1])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2,\n};\nfunction defaultTransformValue(name) {\n return name.includes(\"scale\") ? 1 : 0;\n}\nfunction parseValueFromTransform(transform, name) {\n if (!transform || transform === \"none\") {\n return defaultTransformValue(name);\n }\n const matrix3dMatch = transform.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);\n let parsers;\n let match;\n if (matrix3dMatch) {\n parsers = matrix3dParsers;\n match = matrix3dMatch;\n }\n else {\n const matrix2dMatch = transform.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);\n parsers = matrix2dParsers;\n match = matrix2dMatch;\n }\n if (!match) {\n return defaultTransformValue(name);\n }\n const valueParser = parsers[name];\n const values = match[1].split(\",\").map(convertTransformToNumber);\n return typeof valueParser === \"function\"\n ? valueParser(values)\n : values[valueParser];\n}\nconst readTransformValue = (instance, name) => {\n const { transform = \"none\" } = getComputedStyle(instance);\n return parseValueFromTransform(transform, name);\n};\nfunction convertTransformToNumber(value) {\n return parseFloat(value.trim());\n}\n\nexport { defaultTransformValue, parseValueFromTransform, readTransformValue };\n","/**\n * Generate a list of every possible transform key.\n */\nconst transformPropOrder = [\n \"transformPerspective\",\n \"x\",\n \"y\",\n \"z\",\n \"translateX\",\n \"translateY\",\n \"translateZ\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\",\n];\n/**\n * A quick lookup for transform props.\n */\nconst transformProps = /*@__PURE__*/ (() => new Set(transformPropOrder))();\n\nexport { transformPropOrder, transformProps };\n","import { parseValueFromTransform } from '../../../render/dom/parse-transform.mjs';\nimport { transformPropOrder } from '../../../render/utils/keys-transform.mjs';\nimport { number } from '../../../value/types/numbers/index.mjs';\nimport { px } from '../../../value/types/numbers/units.mjs';\n\nconst isNumOrPxType = (v) => v === number || v === px;\nconst transformKeys = new Set([\"x\", \"y\", \"z\"]);\nconst nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));\nfunction removeNonTranslationalTransform(visualElement) {\n const removedTransforms = [];\n nonTranslationalTransformKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (value !== undefined) {\n removedTransforms.push([key, value.get()]);\n value.set(key.startsWith(\"scale\") ? 1 : 0);\n }\n });\n return removedTransforms;\n}\nconst positionalValues = {\n // Dimensions\n width: ({ x }, { paddingLeft = \"0\", paddingRight = \"0\" }) => x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight),\n height: ({ y }, { paddingTop = \"0\", paddingBottom = \"0\" }) => y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom),\n top: (_bbox, { top }) => parseFloat(top),\n left: (_bbox, { left }) => parseFloat(left),\n bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min),\n right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min),\n // Transform\n x: (_bbox, { transform }) => parseValueFromTransform(transform, \"x\"),\n y: (_bbox, { transform }) => parseValueFromTransform(transform, \"y\"),\n};\n// Alias translate longform names\npositionalValues.translateX = positionalValues.x;\npositionalValues.translateY = positionalValues.y;\n\nexport { isNumOrPxType, positionalValues, removeNonTranslationalTransform };\n","import { fillWildcards } from './utils/fill-wildcards.mjs';\nimport { removeNonTranslationalTransform } from './utils/unit-conversion.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst toResolve = new Set();\nlet isScheduled = false;\nlet anyNeedsMeasurement = false;\nlet isForced = false;\nfunction measureAllKeyframes() {\n if (anyNeedsMeasurement) {\n const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement);\n const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element));\n const transformsToRestore = new Map();\n /**\n * Write pass\n * If we're measuring elements we want to remove bounding box-changing transforms.\n */\n elementsToMeasure.forEach((element) => {\n const removedTransforms = removeNonTranslationalTransform(element);\n if (!removedTransforms.length)\n return;\n transformsToRestore.set(element, removedTransforms);\n element.render();\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureInitialState());\n // Write\n elementsToMeasure.forEach((element) => {\n element.render();\n const restore = transformsToRestore.get(element);\n if (restore) {\n restore.forEach(([key, value]) => {\n element.getValue(key)?.set(value);\n });\n }\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureEndState());\n // Write\n resolversToMeasure.forEach((resolver) => {\n if (resolver.suspendedScrollY !== undefined) {\n window.scrollTo(0, resolver.suspendedScrollY);\n }\n });\n }\n anyNeedsMeasurement = false;\n isScheduled = false;\n toResolve.forEach((resolver) => resolver.complete(isForced));\n toResolve.clear();\n}\nfunction readAllKeyframes() {\n toResolve.forEach((resolver) => {\n resolver.readKeyframes();\n if (resolver.needsMeasurement) {\n anyNeedsMeasurement = true;\n }\n });\n}\nfunction flushKeyframeResolvers() {\n isForced = true;\n readAllKeyframes();\n measureAllKeyframes();\n isForced = false;\n}\nclass KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) {\n this.state = \"pending\";\n /**\n * Track whether this resolver is async. If it is, it'll be added to the\n * resolver queue and flushed in the next frame. Resolvers that aren't going\n * to trigger read/write thrashing don't need to be async.\n */\n this.isAsync = false;\n /**\n * Track whether this resolver needs to perform a measurement\n * to resolve its keyframes.\n */\n this.needsMeasurement = false;\n this.unresolvedKeyframes = [...unresolvedKeyframes];\n this.onComplete = onComplete;\n this.name = name;\n this.motionValue = motionValue;\n this.element = element;\n this.isAsync = isAsync;\n }\n scheduleResolve() {\n this.state = \"scheduled\";\n if (this.isAsync) {\n toResolve.add(this);\n if (!isScheduled) {\n isScheduled = true;\n frame.read(readAllKeyframes);\n frame.resolveKeyframes(measureAllKeyframes);\n }\n }\n else {\n this.readKeyframes();\n this.complete();\n }\n }\n readKeyframes() {\n const { unresolvedKeyframes, name, element, motionValue } = this;\n // If initial keyframe is null we need to read it from the DOM\n if (unresolvedKeyframes[0] === null) {\n const currentValue = motionValue?.get();\n // TODO: This doesn't work if the final keyframe is a wildcard\n const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (currentValue !== undefined) {\n unresolvedKeyframes[0] = currentValue;\n }\n else if (element && name) {\n const valueAsRead = element.readValue(name, finalKeyframe);\n if (valueAsRead !== undefined && valueAsRead !== null) {\n unresolvedKeyframes[0] = valueAsRead;\n }\n }\n if (unresolvedKeyframes[0] === undefined) {\n unresolvedKeyframes[0] = finalKeyframe;\n }\n if (motionValue && currentValue === undefined) {\n motionValue.set(unresolvedKeyframes[0]);\n }\n }\n fillWildcards(unresolvedKeyframes);\n }\n setFinalKeyframe() { }\n measureInitialState() { }\n renderEndStyles() { }\n measureEndState() { }\n complete(isForcedComplete = false) {\n this.state = \"complete\";\n this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete);\n toResolve.delete(this);\n }\n cancel() {\n if (this.state === \"scheduled\") {\n toResolve.delete(this);\n this.state = \"pending\";\n }\n }\n resume() {\n if (this.state === \"pending\")\n this.scheduleResolve();\n }\n}\n\nexport { KeyframeResolver, flushKeyframeResolvers };\n","const isCSSVar = (name) => name.startsWith(\"--\");\n\nexport { isCSSVar };\n","import { isCSSVar } from './is-css-var.mjs';\n\nfunction setStyle(element, name, value) {\n isCSSVar(name)\n ? element.style.setProperty(name, value)\n : (element.style[name] = value);\n}\n\nexport { setStyle };\n","import { memo } from 'motion-utils';\n\nconst supportsScrollTimeline = /* @__PURE__ */ memo(() => window.ScrollTimeline !== undefined);\n\nexport { supportsScrollTimeline };\n","/**\n * Add the ability for test suites to manually set support flags\n * to better test more environments.\n */\nconst supportsFlags = {};\n\nexport { supportsFlags };\n","import { memo } from 'motion-utils';\nimport { supportsFlags } from './flags.mjs';\n\nfunction memoSupports(callback, supportsFlag) {\n const memoized = memo(callback);\n return () => supportsFlags[supportsFlag] ?? memoized();\n}\n\nexport { memoSupports };\n","import { memoSupports } from './memo.mjs';\n\nconst supportsLinearEasing = /*@__PURE__*/ memoSupports(() => {\n try {\n document\n .createElement(\"div\")\n .animate({ opacity: 0 }, { easing: \"linear(0, 1)\" });\n }\n catch (e) {\n return false;\n }\n return true;\n}, \"linearEasing\");\n\nexport { supportsLinearEasing };\n","const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\n\nexport { cubicBezierAsString };\n","import { cubicBezierAsString } from './cubic-bezier.mjs';\n\nconst supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n};\n\nexport { supportedWaapiEasing };\n","import { isBezierDefinition } from 'motion-utils';\nimport { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { generateLinearEasing } from '../utils/linear.mjs';\nimport { cubicBezierAsString } from './cubic-bezier.mjs';\nimport { supportedWaapiEasing } from './supported.mjs';\n\nfunction mapEasingToNativeEasing(easing, duration) {\n if (!easing) {\n return undefined;\n }\n else if (typeof easing === \"function\") {\n return supportsLinearEasing()\n ? generateLinearEasing(easing, duration)\n : \"ease-out\";\n }\n else if (isBezierDefinition(easing)) {\n return cubicBezierAsString(easing);\n }\n else if (Array.isArray(easing)) {\n return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) ||\n supportedWaapiEasing.easeOut);\n }\n else {\n return supportedWaapiEasing[easing];\n }\n}\n\nexport { mapEasingToNativeEasing };\n","import { activeAnimations } from '../../stats/animation-count.mjs';\nimport { statsBuffer } from '../../stats/buffer.mjs';\nimport { mapEasingToNativeEasing } from './easing/map-easing.mjs';\n\nfunction startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = \"loop\", ease = \"easeOut\", times, } = {}, pseudoElement = undefined) {\n const keyframeOptions = {\n [valueName]: keyframes,\n };\n if (times)\n keyframeOptions.offset = times;\n const easing = mapEasingToNativeEasing(ease, duration);\n /**\n * If this is an easing array, apply to keyframes, not animation as a whole\n */\n if (Array.isArray(easing))\n keyframeOptions.easing = easing;\n if (statsBuffer.value) {\n activeAnimations.waapi++;\n }\n const options = {\n delay,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n };\n if (pseudoElement)\n options.pseudoElement = pseudoElement;\n const animation = element.animate(keyframeOptions, options);\n if (statsBuffer.value) {\n animation.finished.finally(() => {\n activeAnimations.waapi--;\n });\n }\n return animation;\n}\n\nexport { startWaapiAnimation };\n","function isGenerator(type) {\n return typeof type === \"function\" && \"applyToOptions\" in type;\n}\n\nexport { isGenerator };\n","import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { isGenerator } from '../../generators/utils/is-generator.mjs';\n\nfunction applyGeneratorOptions({ type, ...options }) {\n if (isGenerator(type) && supportsLinearEasing()) {\n return type.applyToOptions(options);\n }\n else {\n options.duration ?? (options.duration = 300);\n options.ease ?? (options.ease = \"easeOut\");\n }\n return options;\n}\n\nexport { applyGeneratorOptions };\n","import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';\nimport { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nclass NativeAnimation extends WithPromise {\n constructor(options) {\n super();\n this.finishedTime = null;\n this.isStopped = false;\n if (!options)\n return;\n const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;\n this.isPseudoElement = Boolean(pseudoElement);\n this.allowFlatten = allowFlatten;\n this.options = options;\n invariant(typeof options.type !== \"string\", `animateMini doesn't support \"type\" as a string. Did you mean to import { spring } from \"motion\"?`);\n const transition = applyGeneratorOptions(options);\n this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);\n if (transition.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = () => {\n this.finishedTime = this.time;\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe);\n }\n else {\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n */\n setStyle(element, name, keyframe);\n }\n this.animation.cancel();\n }\n onComplete?.();\n this.notifyFinished();\n };\n }\n play() {\n if (this.isStopped)\n return;\n this.animation.play();\n if (this.state === \"finished\") {\n this.updateFinished();\n }\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.finish?.();\n }\n cancel() {\n try {\n this.animation.cancel();\n }\n catch (e) { }\n }\n stop() {\n if (this.isStopped)\n return;\n this.isStopped = true;\n const { state } = this;\n if (state === \"idle\" || state === \"finished\") {\n return;\n }\n if (this.updateMotionValue) {\n this.updateMotionValue();\n }\n else {\n this.commitStyles();\n }\n if (!this.isPseudoElement)\n this.cancel();\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n commitStyles() {\n if (!this.isPseudoElement) {\n this.animation.commitStyles?.();\n }\n }\n get duration() {\n const duration = this.animation.effect?.getComputedTiming?.().duration || 0;\n return millisecondsToSeconds(Number(duration));\n }\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0);\n }\n set time(newTime) {\n this.finishedTime = null;\n this.animation.currentTime = secondsToMilliseconds(newTime);\n }\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate;\n }\n set speed(newSpeed) {\n // Allow backwards playback after finishing\n if (newSpeed < 0)\n this.finishedTime = null;\n this.animation.playbackRate = newSpeed;\n }\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState;\n }\n get startTime() {\n return Number(this.animation.startTime);\n }\n set startTime(newStartTime) {\n this.animation.startTime = newStartTime;\n }\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({ timeline, observe }) {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" });\n }\n this.animation.onfinish = null;\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline;\n return noop;\n }\n else {\n return observe(this);\n }\n }\n}\n\nexport { NativeAnimation };\n","import { anticipate, backInOut, circInOut } from 'motion-utils';\n\nconst unsupportedEasingFunctions = {\n anticipate,\n backInOut,\n circInOut,\n};\nfunction isUnsupportedEase(key) {\n return key in unsupportedEasingFunctions;\n}\nfunction replaceStringEasing(transition) {\n if (typeof transition.ease === \"string\" &&\n isUnsupportedEase(transition.ease)) {\n transition.ease = unsupportedEasingFunctions[transition.ease];\n }\n}\n\nexport { replaceStringEasing };\n","import { secondsToMilliseconds } from 'motion-utils';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { NativeAnimation } from './NativeAnimation.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { replaceStringEasing } from './waapi/utils/unsupported-easing.mjs';\n\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10; //ms\nclass NativeAnimationExtended extends NativeAnimation {\n constructor(options) {\n /**\n * The base NativeAnimation function only supports a subset\n * of Motion easings, and WAAPI also only supports some\n * easing functions via string/cubic-bezier definitions.\n *\n * This function replaces those unsupported easing functions\n * with a JS easing function. This will later get compiled\n * to a linear() easing function.\n */\n replaceStringEasing(options);\n /**\n * Ensure we replace the transition type with a generator function\n * before passing to WAAPI.\n *\n * TODO: Does this have a better home? It could be shared with\n * JSAnimation.\n */\n replaceTransitionType(options);\n super(options);\n if (options.startTime) {\n this.startTime = options.startTime;\n }\n this.options = options;\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read commited styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n updateMotionValue(value) {\n const { motionValue, onUpdate, onComplete, element, ...options } = this.options;\n if (!motionValue)\n return;\n if (value !== undefined) {\n motionValue.set(value);\n return;\n }\n const sampleAnimation = new JSAnimation({\n ...options,\n autoplay: false,\n });\n const sampleTime = secondsToMilliseconds(this.finishedTime ?? this.time);\n motionValue.setWithVelocity(sampleAnimation.sample(sampleTime - sampleDelta).value, sampleAnimation.sample(sampleTime).value, sampleDelta);\n sampleAnimation.stop();\n }\n}\n\nexport { NativeAnimationExtended };\n","import { complex } from '../../value/types/complex/index.mjs';\n\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * ❌: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\nconst isAnimatable = (value, name) => {\n // If the list of keys tat might be non-animatable grows, replace with Set\n if (name === \"zIndex\")\n return false;\n // If it's a number or a keyframes array, we can animate it. We might at some point\n // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n // but for now lets leave it like this for performance reasons\n if (typeof value === \"number\" || Array.isArray(value))\n return true;\n if (typeof value === \"string\" && // It's animatable if we have a string\n (complex.test(value) || value === \"0\") && // And it contains numbers and/or colors\n !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n ) {\n return true;\n }\n return false;\n};\n\nexport { isAnimatable };\n","import { warning } from 'motion-utils';\nimport { isGenerator } from '../generators/utils/is-generator.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\n\nfunction hasKeyframesChanged(keyframes) {\n const current = keyframes[0];\n if (keyframes.length === 1)\n return true;\n for (let i = 0; i < keyframes.length; i++) {\n if (keyframes[i] !== current)\n return true;\n }\n}\nfunction canAnimate(keyframes, name, type, velocity) {\n /**\n * Check if we're able to animate between the start and end keyframes,\n * and throw a warning if we're attempting to animate between one that's\n * animatable and another that isn't.\n */\n const originKeyframe = keyframes[0];\n if (originKeyframe === null)\n return false;\n /**\n * These aren't traditionally animatable but we do support them.\n * In future we could look into making this more generic or replacing\n * this function with mix() === mixImmediate\n */\n if (name === \"display\" || name === \"visibility\")\n return true;\n const targetKeyframe = keyframes[keyframes.length - 1];\n const isOriginAnimatable = isAnimatable(originKeyframe, name);\n const isTargetAnimatable = isAnimatable(targetKeyframe, name);\n warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from \"${originKeyframe}\" to \"${targetKeyframe}\". ${originKeyframe} is not an animatable value - to enable this animation set ${originKeyframe} to a value animatable to ${targetKeyframe} via the \\`style\\` property.`);\n // Always skip if any of these are true\n if (!isOriginAnimatable || !isTargetAnimatable) {\n return false;\n }\n return (hasKeyframesChanged(keyframes) ||\n ((type === \"spring\" || isGenerator(type)) && velocity));\n}\n\nexport { canAnimate };\n","import { isObject } from 'motion-utils';\n\n/**\n * Checks if an element is an HTML element in a way\n * that works across iframes\n */\nfunction isHTMLElement(element) {\n return isObject(element) && \"offsetHeight\" in element;\n}\n\nexport { isHTMLElement };\n","import { memo } from 'motion-utils';\nimport { isHTMLElement } from '../../../utils/is-html-element.mjs';\n\n/**\n * A list of values that can be hardware-accelerated.\n */\nconst acceleratedValues = new Set([\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"transform\",\n // TODO: Could be re-enabled now we have support for linear() easing\n // \"background-color\"\n]);\nconst supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, \"animate\"));\nfunction supportsBrowserAnimation(options) {\n const { motionValue, name, repeatDelay, repeatType, damping, type } = options;\n if (!isHTMLElement(motionValue?.owner?.current)) {\n return false;\n }\n const { onUpdate, transformTemplate } = motionValue.owner.getProps();\n return (supportsWaapi() &&\n name &&\n acceleratedValues.has(name) &&\n (name !== \"transform\" || !transformTemplate) &&\n /**\n * If we're outputting values to onUpdate then we can't use WAAPI as there's\n * no way to read the value from WAAPI every frame.\n */\n !onUpdate &&\n !repeatDelay &&\n repeatType !== \"mirror\" &&\n damping !== 0 &&\n type !== \"inertia\");\n}\n\nexport { supportsBrowserAnimation };\n","import { MotionGlobalConfig, noop } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { KeyframeResolver, flushKeyframeResolvers } from './keyframes/KeyframesResolver.mjs';\nimport { NativeAnimationExtended } from './NativeAnimationExtended.mjs';\nimport { canAnimate } from './utils/can-animate.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { supportsBrowserAnimation } from './waapi/supports/waapi.mjs';\n\n/**\n * Maximum time allowed between an animation being created and it being\n * resolved for us to use the latter as the start time.\n *\n * This is to ensure that while we prefer to \"start\" an animation as soon\n * as it's triggered, we also want to avoid a visual jump if there's a big delay\n * between these two moments.\n */\nconst MAX_RESOLVE_DELAY = 40;\nclass AsyncMotionValueAnimation extends WithPromise {\n constructor({ autoplay = true, delay = 0, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", keyframes, name, motionValue, element, ...options }) {\n super();\n /**\n * Bound to support return animation.stop pattern\n */\n this.stop = () => {\n if (this._animation) {\n this._animation.stop();\n this.stopTimeline?.();\n }\n this.keyframeResolver?.cancel();\n };\n this.createdAt = time.now();\n const optionsWithDefaults = {\n autoplay,\n delay,\n type,\n repeat,\n repeatDelay,\n repeatType,\n name,\n motionValue,\n element,\n ...options,\n };\n const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver;\n this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element);\n this.keyframeResolver?.scheduleResolve();\n }\n onKeyframesResolved(keyframes, finalKeyframe, options, sync) {\n this.keyframeResolver = undefined;\n const { name, type, velocity, delay, isHandoff, onUpdate } = options;\n this.resolvedAt = time.now();\n /**\n * If we can't animate this value with the resolved keyframes\n * then we should complete it immediately.\n */\n if (!canAnimate(keyframes, name, type, velocity)) {\n if (MotionGlobalConfig.instantAnimations || !delay) {\n onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe));\n }\n keyframes[0] = keyframes[keyframes.length - 1];\n options.duration = 0;\n options.repeat = 0;\n }\n /**\n * Resolve startTime for the animation.\n *\n * This method uses the createdAt and resolvedAt to calculate the\n * animation startTime. *Ideally*, we would use the createdAt time as t=0\n * as the following frame would then be the first frame of the animation in\n * progress, which would feel snappier.\n *\n * However, if there's a delay (main thread work) between the creation of\n * the animation and the first commited frame, we prefer to use resolvedAt\n * to avoid a sudden jump into the animation.\n */\n const startTime = sync\n ? !this.resolvedAt\n ? this.createdAt\n : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY\n ? this.resolvedAt\n : this.createdAt\n : undefined;\n const resolvedOptions = {\n startTime,\n finalKeyframe,\n ...options,\n keyframes,\n };\n /**\n * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via\n * WAAPI. Therefore, this animation must be JS to ensure it runs \"under\" the\n * optimised animation.\n */\n const animation = !isHandoff && supportsBrowserAnimation(resolvedOptions)\n ? new NativeAnimationExtended({\n ...resolvedOptions,\n element: resolvedOptions.motionValue.owner.current,\n })\n : new JSAnimation(resolvedOptions);\n animation.finished.then(() => this.notifyFinished()).catch(noop);\n if (this.pendingTimeline) {\n this.stopTimeline = animation.attachTimeline(this.pendingTimeline);\n this.pendingTimeline = undefined;\n }\n this._animation = animation;\n }\n get finished() {\n if (!this._animation) {\n return this._finished;\n }\n else {\n return this.animation.finished;\n }\n }\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n get animation() {\n if (!this._animation) {\n this.keyframeResolver?.resume();\n flushKeyframeResolvers();\n }\n return this._animation;\n }\n get duration() {\n return this.animation.duration;\n }\n get time() {\n return this.animation.time;\n }\n set time(newTime) {\n this.animation.time = newTime;\n }\n get speed() {\n return this.animation.speed;\n }\n get state() {\n return this.animation.state;\n }\n set speed(newSpeed) {\n this.animation.speed = newSpeed;\n }\n get startTime() {\n return this.animation.startTime;\n }\n attachTimeline(timeline) {\n if (this._animation) {\n this.stopTimeline = this.animation.attachTimeline(timeline);\n }\n else {\n this.pendingTimeline = timeline;\n }\n return () => this.stop();\n }\n play() {\n this.animation.play();\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.complete();\n }\n cancel() {\n if (this._animation) {\n this.animation.cancel();\n }\n this.keyframeResolver?.cancel();\n }\n}\n\nexport { AsyncMotionValueAnimation };\n","import { invariant, isNumericalString } from 'motion-utils';\nimport { isCSSVariableToken } from './is-css-variable.mjs';\n\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\nconst splitCSSVariableRegex = \n// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words\n/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;\nfunction parseCSSVariable(current) {\n const match = splitCSSVariableRegex.exec(current);\n if (!match)\n return [,];\n const [, token1, token2, fallback] = match;\n return [`--${token1 ?? token2}`, fallback];\n}\nconst maxDepth = 4;\nfunction getVariableValue(current, element, depth = 1) {\n invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property \"${current}\". This may indicate a circular fallback dependency.`);\n const [token, fallback] = parseCSSVariable(current);\n // No CSS variable detected\n if (!token)\n return;\n // Attempt to read this CSS variable off the element\n const resolved = window.getComputedStyle(element).getPropertyValue(token);\n if (resolved) {\n const trimmed = resolved.trim();\n return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;\n }\n return isCSSVariableToken(fallback)\n ? getVariableValue(fallback, element, depth + 1)\n : fallback;\n}\n\nexport { getVariableValue, parseCSSVariable };\n","function getValueTransition(transition, key) {\n return (transition?.[key] ??\n transition?.[\"default\"] ??\n transition);\n}\n\nexport { getValueTransition };\n","import { transformPropOrder } from './keys-transform.mjs';\n\nconst positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n ...transformPropOrder,\n]);\n\nexport { positionalKeys };\n","/**\n * ValueType for \"auto\"\n */\nconst auto = {\n test: (v) => v === \"auto\",\n parse: (v) => v,\n};\n\nexport { auto };\n","/**\n * Tests a provided value against a ValueType\n */\nconst testValueType = (v) => (type) => type.test(v);\n\nexport { testValueType };\n","import { auto } from './auto.mjs';\nimport { number } from './numbers/index.mjs';\nimport { px, percent, degrees, vw, vh } from './numbers/units.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of value types commonly used for dimensions\n */\nconst dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nconst findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));\n\nexport { dimensionValueTypes, findDimensionValueType };\n","import { isZeroValueString } from 'motion-utils';\n\nfunction isNone(value) {\n if (typeof value === \"number\") {\n return value === 0;\n }\n else if (value !== null) {\n return value === \"none\" || value === \"0\" || isZeroValueString(value);\n }\n else {\n return true;\n }\n}\n\nexport { isNone };\n","import { complex } from './index.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"]);\nfunction applyDefaultFilter(v) {\n const [name, value] = v.slice(0, -1).split(\"(\");\n if (name === \"drop-shadow\")\n return v;\n const [number] = value.match(floatRegex) || [];\n if (!number)\n return v;\n const unit = value.replace(number, \"\");\n let defaultValue = maxDefaults.has(name) ? 1 : 0;\n if (number !== value)\n defaultValue *= 100;\n return name + \"(\" + defaultValue + unit + \")\";\n}\nconst functionRegex = /\\b([a-z-]*)\\(.*?\\)/gu;\nconst filter = {\n ...complex,\n getAnimatableNone: (v) => {\n const functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(\" \") : v;\n },\n};\n\nexport { filter };\n","import { number } from './numbers/index.mjs';\n\nconst int = {\n ...number,\n transform: Math.round,\n};\n\nexport { int };\n","import { int } from '../int.mjs';\nimport { alpha } from '../numbers/index.mjs';\nimport { px } from '../numbers/units.mjs';\nimport { transformValueTypes } from './transform.mjs';\n\nconst numberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n radius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n // Misc\n backgroundPositionX: px,\n backgroundPositionY: px,\n ...transformValueTypes,\n zIndex: int,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n};\n\nexport { numberValueTypes };\n","import { scale, alpha } from '../numbers/index.mjs';\nimport { degrees, px, progressPercentage } from '../numbers/units.mjs';\n\nconst transformValueTypes = {\n rotate: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n};\n\nexport { transformValueTypes };\n","import { color } from '../color/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { numberValueTypes } from './number.mjs';\n\n/**\n * A map of default value types for common values\n */\nconst defaultValueTypes = {\n ...numberValueTypes,\n // Color props\n color,\n backgroundColor: color,\n outlineColor: color,\n fill: color,\n stroke: color,\n // Border props\n borderColor: color,\n borderTopColor: color,\n borderRightColor: color,\n borderBottomColor: color,\n borderLeftColor: color,\n filter,\n WebkitFilter: filter,\n};\n/**\n * Gets the default ValueType for the provided value key\n */\nconst getDefaultValueType = (key) => defaultValueTypes[key];\n\nexport { defaultValueTypes, getDefaultValueType };\n","import { complex } from '../complex/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { getDefaultValueType } from '../maps/defaults.mjs';\n\nfunction getAnimatableNone(key, value) {\n let defaultValueType = getDefaultValueType(key);\n if (defaultValueType !== filter)\n defaultValueType = complex;\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return defaultValueType.getAnimatableNone\n ? defaultValueType.getAnimatableNone(value)\n : undefined;\n}\n\nexport { getAnimatableNone };\n","import { analyseComplexValue } from '../../../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../../../value/types/utils/animatable-none.mjs';\n\n/**\n * If we encounter keyframes like \"none\" or \"0\" and we also have keyframes like\n * \"#fff\" or \"200px 200px\" we want to find a keyframe to serve as a template for\n * the \"none\" keyframes. In this case \"#fff\" or \"200px 200px\" - then these get turned into\n * zero equivalents, i.e. \"#fff0\" or \"0px 0px\".\n */\nconst invalidTemplates = new Set([\"auto\", \"none\", \"0\"]);\nfunction makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {\n let i = 0;\n let animatableTemplate = undefined;\n while (i < unresolvedKeyframes.length && !animatableTemplate) {\n const keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\" &&\n !invalidTemplates.has(keyframe) &&\n analyseComplexValue(keyframe).values.length) {\n animatableTemplate = unresolvedKeyframes[i];\n }\n i++;\n }\n if (animatableTemplate && name) {\n for (const noneIndex of noneKeyframeIndexes) {\n unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);\n }\n }\n}\n\nexport { makeNoneKeyframesAnimatable };\n","import { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { findDimensionValueType } from '../../value/types/dimensions.mjs';\nimport { getVariableValue } from '../utils/css-variables-conversion.mjs';\nimport { isCSSVariableToken } from '../utils/is-css-variable.mjs';\nimport { KeyframeResolver } from './KeyframesResolver.mjs';\nimport { isNone } from './utils/is-none.mjs';\nimport { makeNoneKeyframesAnimatable } from './utils/make-none-animatable.mjs';\nimport { isNumOrPxType, positionalValues } from './utils/unit-conversion.mjs';\n\nclass DOMKeyframesResolver extends KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element) {\n super(unresolvedKeyframes, onComplete, name, motionValue, element, true);\n }\n readKeyframes() {\n const { unresolvedKeyframes, element, name } = this;\n if (!element || !element.current)\n return;\n super.readKeyframes();\n /**\n * If any keyframe is a CSS variable, we need to find its value by sampling the element\n */\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n let keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\") {\n keyframe = keyframe.trim();\n if (isCSSVariableToken(keyframe)) {\n const resolved = getVariableValue(keyframe, element.current);\n if (resolved !== undefined) {\n unresolvedKeyframes[i] = resolved;\n }\n if (i === unresolvedKeyframes.length - 1) {\n this.finalKeyframe = keyframe;\n }\n }\n }\n }\n /**\n * Resolve \"none\" values. We do this potentially twice - once before and once after measuring keyframes.\n * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which\n * have a far bigger performance impact.\n */\n this.resolveNoneKeyframes();\n /**\n * Check to see if unit type has changed. If so schedule jobs that will\n * temporarily set styles to the destination keyframes.\n * Skip if we have more than two keyframes or this isn't a positional value.\n * TODO: We can throw if there are multiple keyframes and the value type changes.\n */\n if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {\n return;\n }\n const [origin, target] = unresolvedKeyframes;\n const originType = findDimensionValueType(origin);\n const targetType = findDimensionValueType(target);\n /**\n * Either we don't recognise these value types or we can animate between them.\n */\n if (originType === targetType)\n return;\n /**\n * If both values are numbers or pixels, we can animate between them by\n * converting them to numbers.\n */\n if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n const value = unresolvedKeyframes[i];\n if (typeof value === \"string\") {\n unresolvedKeyframes[i] = parseFloat(value);\n }\n }\n }\n else if (positionalValues[name]) {\n /**\n * Else, the only way to resolve this is by measuring the element.\n */\n this.needsMeasurement = true;\n }\n }\n resolveNoneKeyframes() {\n const { unresolvedKeyframes, name } = this;\n const noneKeyframeIndexes = [];\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (unresolvedKeyframes[i] === null ||\n isNone(unresolvedKeyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n }\n if (noneKeyframeIndexes.length) {\n makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);\n }\n }\n measureInitialState() {\n const { element, unresolvedKeyframes, name } = this;\n if (!element || !element.current)\n return;\n if (name === \"height\") {\n this.suspendedScrollY = window.pageYOffset;\n }\n this.measuredOrigin = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n unresolvedKeyframes[0] = this.measuredOrigin;\n // Set final key frame to measure after next render\n const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (measureKeyframe !== undefined) {\n element.getValue(name, measureKeyframe).jump(measureKeyframe, false);\n }\n }\n measureEndState() {\n const { element, name, unresolvedKeyframes } = this;\n if (!element || !element.current)\n return;\n const value = element.getValue(name);\n value && value.jump(this.measuredOrigin, false);\n const finalKeyframeIndex = unresolvedKeyframes.length - 1;\n const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];\n unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\n if (finalKeyframe !== null && this.finalKeyframe === undefined) {\n this.finalKeyframe = finalKeyframe;\n }\n // If we removed transform values, reapply them before the next render\n if (this.removedTransforms?.length) {\n this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {\n element\n .getValue(unsetTransformName)\n .set(unsetTransformValue);\n });\n }\n this.resolveNoneKeyframes();\n }\n}\n\nexport { DOMKeyframesResolver };\n","function resolveElements(elementOrSelector, scope, selectorCache) {\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector];\n }\n else if (typeof elementOrSelector === \"string\") {\n let root = document;\n if (scope) {\n root = scope.current;\n }\n const elements = selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector);\n return elements ? Array.from(elements) : [];\n }\n return Array.from(elementOrSelector);\n}\n\nexport { resolveElements };\n","import { warnOnce, SubscriptionManager, velocityPerSecond } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\n/**\n * Maximum time between the value of two frames, beyond which we\n * assume the velocity has since been 0.\n */\nconst MAX_VELOCITY_DELTA = 30;\nconst isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nconst collectMotionValues = {\n current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nclass MotionValue {\n /**\n * @param init - The initiating value\n * @param config - Optional configuration options\n *\n * - `transformer`: A function to transform incoming values with.\n */\n constructor(init, options = {}) {\n /**\n * Tracks whether this value can output a velocity. Currently this is only true\n * if the value is numerical, but we might be able to widen the scope here and support\n * other value types.\n *\n * @internal\n */\n this.canTrackVelocity = null;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n this.updateAndNotify = (v, render = true) => {\n const currentTime = time.now();\n /**\n * If we're updating the value during another frame or eventloop\n * than the previous frame, then the we set the previous frame value\n * to current.\n */\n if (this.updatedAt !== currentTime) {\n this.setPrevFrameValue();\n }\n this.prev = this.current;\n this.setCurrent(v);\n // Update update subscribers\n if (this.current !== this.prev) {\n this.events.change?.notify(this.current);\n if (this.dependents) {\n for (const dependent of this.dependents) {\n dependent.dirty();\n }\n }\n }\n // Update render subscribers\n if (render) {\n this.events.renderRequest?.notify(this.current);\n }\n };\n this.hasAnimated = false;\n this.setCurrent(init);\n this.owner = options.owner;\n }\n setCurrent(current) {\n this.current = current;\n this.updatedAt = time.now();\n if (this.canTrackVelocity === null && current !== undefined) {\n this.canTrackVelocity = isFloat(this.current);\n }\n }\n setPrevFrameValue(prevFrameValue = this.current) {\n this.prevFrameValue = prevFrameValue;\n this.prevUpdatedAt = this.updatedAt;\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n *\n * When calling `onChange` inside a React component, it should be wrapped with the\n * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n * from the `useEffect` function to ensure you don't add duplicate subscribers..\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const opacity = useMotionValue(1)\n *\n * useEffect(() => {\n * function updateOpacity() {\n * const maxXY = Math.max(x.get(), y.get())\n * const newOpacity = transform(maxXY, [0, 100], [1, 0])\n * opacity.set(newOpacity)\n * }\n *\n * const unsubscribeX = x.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return <motion.div style={{ x }} />\n * }\n * ```\n *\n * @param subscriber - A function that receives the latest value.\n * @returns A function that, when called, will cancel this subscription.\n *\n * @deprecated\n */\n onChange(subscription) {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n const unsubscribe = this.events[eventName].add(callback);\n if (eventName === \"change\") {\n return () => {\n unsubscribe();\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop();\n }\n });\n };\n }\n return unsubscribe;\n }\n clearListeners() {\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\n }\n /**\n * Sets the state of the `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useMotionValue(0)\n * x.set(10)\n * ```\n *\n * @param latest - Latest value to set.\n * @param render - Whether to notify render subscribers. Defaults to `true`\n *\n * @public\n */\n set(v, render = true) {\n if (!render || !this.passiveEffect) {\n this.updateAndNotify(v, render);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = undefined;\n this.prevFrameValue = prev;\n this.prevUpdatedAt = this.updatedAt - delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v, endAnimation = true) {\n this.updateAndNotify(v);\n this.prev = v;\n this.prevUpdatedAt = this.prevFrameValue = undefined;\n endAnimation && this.stop();\n if (this.stopPassiveEffect)\n this.stopPassiveEffect();\n }\n dirty() {\n this.events.change?.notify(this.current);\n }\n addDependent(dependent) {\n if (!this.dependents) {\n this.dependents = new Set();\n }\n this.dependents.add(dependent);\n }\n removeDependent(dependent) {\n if (this.dependents) {\n this.dependents.delete(dependent);\n }\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this);\n }\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\n return this.prev;\n }\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n *\n * @public\n */\n getVelocity() {\n const currentTime = time.now();\n if (!this.canTrackVelocity ||\n this.prevFrameValue === undefined ||\n currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {\n return 0;\n }\n const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);\n // Casts because of parseFloat's poor typing\n return velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prevFrameValue), delta);\n }\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n *\n * ```jsx\n * value.start()\n * ```\n *\n * @param animation - A function that starts the provided animation\n */\n start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n this.animation = startAnimation(resolve);\n if (this.events.animationStart) {\n this.events.animationStart.notify();\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify();\n }\n this.clearAnimation();\n });\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n if (this.events.animationCancel) {\n this.events.animationCancel.notify();\n }\n }\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n clearAnimation() {\n delete this.animation;\n }\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n *\n * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n * created a `MotionValue` via the `motionValue` function.\n *\n * @public\n */\n destroy() {\n this.dependents?.clear();\n this.events.destroy?.notify();\n this.clearListeners();\n this.stop();\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect();\n }\n }\n}\nfunction motionValue(init, options) {\n return new MotionValue(init, options);\n}\n\nexport { MotionValue, collectMotionValues, motionValue };\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nconst getValueAsType = (value, type) => {\n return type && typeof value === \"number\"\n ? type.transform(value)\n : value;\n};\n\nexport { getValueAsType };\n","import { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: microtask, cancel: cancelMicrotask } = \n/* @__PURE__ */ createRenderBatcher(queueMicrotask, false);\n\nexport { cancelMicrotask, microtask };\n","const isDragging = {\n x: false,\n y: false,\n};\nfunction isDragActive() {\n return isDragging.x || isDragging.y;\n}\n\nexport { isDragActive, isDragging };\n","import { isDragging } from './is-active.mjs';\n\nfunction setDragLock(axis) {\n if (axis === \"x\" || axis === \"y\") {\n if (isDragging[axis]) {\n return null;\n }\n else {\n isDragging[axis] = true;\n return () => {\n isDragging[axis] = false;\n };\n }\n }\n else {\n if (isDragging.x || isDragging.y) {\n return null;\n }\n else {\n isDragging.x = isDragging.y = true;\n return () => {\n isDragging.x = isDragging.y = false;\n };\n }\n }\n}\n\nexport { setDragLock };\n","import { resolveElements } from '../../utils/resolve-elements.mjs';\n\nfunction setupGesture(elementOrSelector, options) {\n const elements = resolveElements(elementOrSelector);\n const gestureAbortController = new AbortController();\n const eventOptions = {\n passive: true,\n ...options,\n signal: gestureAbortController.signal,\n };\n const cancel = () => gestureAbortController.abort();\n return [elements, eventOptions, cancel];\n}\n\nexport { setupGesture };\n","import { isDragActive } from './drag/state/is-active.mjs';\nimport { setupGesture } from './utils/setup.mjs';\n\nfunction isValidHover(event) {\n return !(event.pointerType === \"touch\" || isDragActive());\n}\n/**\n * Create a hover gesture. hover() is different to .addEventListener(\"pointerenter\")\n * in that it has an easier syntax, filters out polyfilled touch events, interoperates\n * with drag gestures, and automatically removes the \"pointerennd\" event listener when the hover ends.\n *\n * @public\n */\nfunction hover(elementOrSelector, onHoverStart, options = {}) {\n const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options);\n const onPointerEnter = (enterEvent) => {\n if (!isValidHover(enterEvent))\n return;\n const { target } = enterEvent;\n const onHoverEnd = onHoverStart(target, enterEvent);\n if (typeof onHoverEnd !== \"function\" || !target)\n return;\n const onPointerLeave = (leaveEvent) => {\n if (!isValidHover(leaveEvent))\n return;\n onHoverEnd(leaveEvent);\n target.removeEventListener(\"pointerleave\", onPointerLeave);\n };\n target.addEventListener(\"pointerleave\", onPointerLeave, eventOptions);\n };\n elements.forEach((element) => {\n element.addEventListener(\"pointerenter\", onPointerEnter, eventOptions);\n });\n return cancel;\n}\n\nexport { hover };\n","/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nconst isNodeOrChild = (parent, child) => {\n if (!child) {\n return false;\n }\n else if (parent === child) {\n return true;\n }\n else {\n return isNodeOrChild(parent, child.parentElement);\n }\n};\n\nexport { isNodeOrChild };\n","const isPrimaryPointer = (event) => {\n if (event.pointerType === \"mouse\") {\n return typeof event.button !== \"number\" || event.button <= 0;\n }\n else {\n /**\n * isPrimary is true for all mice buttons, whereas every touch point\n * is regarded as its own input. So subsequent concurrent touch points\n * will be false.\n *\n * Specifically match against false here as incomplete versions of\n * PointerEvents in very old browser might have it set as undefined.\n */\n return event.isPrimary !== false;\n }\n};\n\nexport { isPrimaryPointer };\n","const focusableElements = new Set([\n \"BUTTON\",\n \"INPUT\",\n \"SELECT\",\n \"TEXTAREA\",\n \"A\",\n]);\nfunction isElementKeyboardAccessible(element) {\n return (focusableElements.has(element.tagName) ||\n element.tabIndex !== -1);\n}\n\nexport { isElementKeyboardAccessible };\n","const isPressing = new WeakSet();\n\nexport { isPressing };\n","import { isPressing } from './state.mjs';\n\n/**\n * Filter out events that are not \"Enter\" keys.\n */\nfunction filterEvents(callback) {\n return (event) => {\n if (event.key !== \"Enter\")\n return;\n callback(event);\n };\n}\nfunction firePointerEvent(target, type) {\n target.dispatchEvent(new PointerEvent(\"pointer\" + type, { isPrimary: true, bubbles: true }));\n}\nconst enableKeyboardPress = (focusEvent, eventOptions) => {\n const element = focusEvent.currentTarget;\n if (!element)\n return;\n const handleKeydown = filterEvents(() => {\n if (isPressing.has(element))\n return;\n firePointerEvent(element, \"down\");\n const handleKeyup = filterEvents(() => {\n firePointerEvent(element, \"up\");\n });\n const handleBlur = () => firePointerEvent(element, \"cancel\");\n element.addEventListener(\"keyup\", handleKeyup, eventOptions);\n element.addEventListener(\"blur\", handleBlur, eventOptions);\n });\n element.addEventListener(\"keydown\", handleKeydown, eventOptions);\n /**\n * Add an event listener that fires on blur to remove the keydown events.\n */\n element.addEventListener(\"blur\", () => element.removeEventListener(\"keydown\", handleKeydown), eventOptions);\n};\n\nexport { enableKeyboardPress };\n","import { isHTMLElement } from '../../utils/is-html-element.mjs';\nimport { isDragActive } from '../drag/state/is-active.mjs';\nimport { isNodeOrChild } from '../utils/is-node-or-child.mjs';\nimport { isPrimaryPointer } from '../utils/is-primary-pointer.mjs';\nimport { setupGesture } from '../utils/setup.mjs';\nimport { isElementKeyboardAccessible } from './utils/is-keyboard-accessible.mjs';\nimport { enableKeyboardPress } from './utils/keyboard.mjs';\nimport { isPressing } from './utils/state.mjs';\n\n/**\n * Filter out events that are not primary pointer events, or are triggering\n * while a Motion gesture is active.\n */\nfunction isValidPressEvent(event) {\n return isPrimaryPointer(event) && !isDragActive();\n}\n/**\n * Create a press gesture.\n *\n * Press is different to `\"pointerdown\"`, `\"pointerup\"` in that it\n * automatically filters out secondary pointer events like right\n * click and multitouch.\n *\n * It also adds accessibility support for keyboards, where\n * an element with a press gesture will receive focus and\n * trigger on Enter `\"keydown\"` and `\"keyup\"` events.\n *\n * This is different to a browser's `\"click\"` event, which does\n * respond to keyboards but only for the `\"click\"` itself, rather\n * than the press start and end/cancel. The element also needs\n * to be focusable for this to work, whereas a press gesture will\n * make an element focusable by default.\n *\n * @public\n */\nfunction press(targetOrSelector, onPressStart, options = {}) {\n const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options);\n const startPress = (startEvent) => {\n const target = startEvent.currentTarget;\n if (!isValidPressEvent(startEvent))\n return;\n isPressing.add(target);\n const onPressEnd = onPressStart(target, startEvent);\n const onPointerEnd = (endEvent, success) => {\n window.removeEventListener(\"pointerup\", onPointerUp);\n window.removeEventListener(\"pointercancel\", onPointerCancel);\n if (isPressing.has(target)) {\n isPressing.delete(target);\n }\n if (!isValidPressEvent(endEvent)) {\n return;\n }\n if (typeof onPressEnd === \"function\") {\n onPressEnd(endEvent, { success });\n }\n };\n const onPointerUp = (upEvent) => {\n onPointerEnd(upEvent, target === window ||\n target === document ||\n options.useGlobalTarget ||\n isNodeOrChild(target, upEvent.target));\n };\n const onPointerCancel = (cancelEvent) => {\n onPointerEnd(cancelEvent, false);\n };\n window.addEventListener(\"pointerup\", onPointerUp, eventOptions);\n window.addEventListener(\"pointercancel\", onPointerCancel, eventOptions);\n };\n targets.forEach((target) => {\n const pointerDownTarget = options.useGlobalTarget ? window : target;\n pointerDownTarget.addEventListener(\"pointerdown\", startPress, eventOptions);\n if (isHTMLElement(target)) {\n target.addEventListener(\"focus\", (event) => enableKeyboardPress(event, eventOptions));\n if (!isElementKeyboardAccessible(target) &&\n !target.hasAttribute(\"tabindex\")) {\n target.tabIndex = 0;\n }\n }\n });\n return cancelEvents;\n}\n\nexport { press };\n","import { isObject } from 'motion-utils';\n\n/**\n * Checks if an element is an SVG element in a way\n * that works across iframes\n */\nfunction isSVGElement(element) {\n return isObject(element) && \"ownerSVGElement\" in element;\n}\n\nexport { isSVGElement };\n","import { isSVGElement } from './is-svg-element.mjs';\n\n/**\n * Checks if an element is specifically an SVGSVGElement (the root SVG element)\n * in a way that works across iframes\n */\nfunction isSVGSVGElement(element) {\n return isSVGElement(element) && element.tagName === \"svg\";\n}\n\nexport { isSVGSVGElement };\n","const isMotionValue = (value) => Boolean(value && value.getVelocity);\n\nexport { isMotionValue };\n","import { color } from '../color/index.mjs';\nimport { complex } from '../complex/index.mjs';\nimport { dimensionValueTypes } from '../dimensions.mjs';\nimport { testValueType } from '../test.mjs';\n\n/**\n * A list of all ValueTypes\n */\nconst valueTypes = [...dimensionValueTypes, color, complex];\n/**\n * Tests a value against the list of ValueTypes\n */\nconst findValueType = (v) => valueTypes.find(testValueType(v));\n\nexport { findValueType };\n","\"use client\";\nimport { createContext } from 'react';\n\n/**\n * @public\n */\nconst MotionConfigContext = createContext({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n","\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { isHTMLElement } from 'motion-dom';\nimport * as React from 'react';\nimport { useId, useRef, useContext, useInsertionEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.childRef.current;\n if (element && prevProps.isPresent && !this.props.isPresent) {\n const parent = element.offsetParent;\n const parentWidth = isHTMLElement(parent)\n ? parent.offsetWidth || 0\n : 0;\n const size = this.props.sizeRef.current;\n size.height = element.offsetHeight || 0;\n size.width = element.offsetWidth || 0;\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n size.right = parentWidth - size.width - size.left;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent, anchorX }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n right: 0,\n });\n const { nonce } = useContext(MotionConfigContext);\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left, right } = size.current;\n if (isPresent || !ref.current || !width || !height)\n return;\n const x = anchorX === \"left\" ? `left: ${left}` : `right: ${right}`;\n ref.current.dataset.motionPopId = id;\n const style = document.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n document.head.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n ${x}px !important;\n top: ${top}px !important;\n }\n `);\n }\n return () => {\n if (document.head.contains(style)) {\n document.head.removeChild(style);\n }\n };\n }, [isPresent]);\n return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, children: React.cloneElement(children, { ref }) }));\n}\n\nexport { PopChild };\n","\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { PopChild } from './PopChild.mjs';\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id = useId();\n let isReusedContext = true;\n let context = useMemo(() => {\n isReusedContext = false;\n return {\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n onExitComplete && onExitComplete();\n },\n register: (childId) => {\n presenceChildren.set(childId, false);\n return () => presenceChildren.delete(childId);\n },\n };\n }, [isPresent, presenceChildren, onExitComplete]);\n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n if (presenceAffectsLayout && isReusedContext) {\n context = { ...context };\n }\n useMemo(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false));\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete();\n }, [isPresent]);\n if (mode === \"popLayout\") {\n children = (jsx(PopChild, { isPresent: isPresent, anchorX: anchorX, children: children }));\n }\n return (jsx(PresenceContext.Provider, { value: context, children: children }));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n","import { useContext, useId, useEffect, useCallback } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed the tree, but\n * `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nfunction usePresence(subscribe = true) {\n const context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n const { isPresent, onExitComplete, register } = context;\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n const id = useId();\n useEffect(() => {\n if (subscribe) {\n return register(id);\n }\n }, [subscribe]);\n const safeToRemove = useCallback(() => subscribe && onExitComplete && onExitComplete(id), [id, onExitComplete, subscribe]);\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * @public\n */\nfunction useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\nfunction isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n\nexport { isPresent, useIsPresent, usePresence };\n","import { Children, isValidElement } from 'react';\n\nconst getChildKey = (child) => child.key || \"\";\nfunction onlyElements(children) {\n const filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, (child) => {\n if (isValidElement(child))\n filtered.push(child);\n });\n return filtered;\n}\n\nexport { getChildKey, onlyElements };\n","\"use client\";\nimport { jsx, Fragment } from 'react/jsx-runtime';\nimport { useMemo, useRef, useState, useContext } from 'react';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { usePresence } from './use-presence.mjs';\nimport { onlyElements, getChildKey } from './utils.mjs';\n\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * <AnimatePresence>\n * {items.map(item => (\n * <motion.div\n * key={item.id}\n * initial={{ opacity: 0 }}\n * animate={{ opacity: 1 }}\n * exit={{ opacity: 0 }}\n * />\n * ))}\n * </AnimatePresence>\n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nconst AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = \"sync\", propagate = false, anchorX = \"left\", }) => {\n const [isParentPresent, safeToRemove] = usePresence(propagate);\n /**\n * Filter any children that aren't ReactElements. We can only track components\n * between renders with a props.key.\n */\n const presentChildren = useMemo(() => onlyElements(children), [children]);\n /**\n * Track the keys of the currently rendered children. This is used to\n * determine which children are exiting.\n */\n const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);\n /**\n * If `initial={false}` we only want to pass this to components in the first render.\n */\n const isInitialRender = useRef(true);\n /**\n * A ref containing the currently present children. When all exit animations\n * are complete, we use this to re-render the component with the latest children\n * *committed* rather than the latest children *rendered*.\n */\n const pendingPresentChildren = useRef(presentChildren);\n /**\n * Track which exiting children have finished animating out.\n */\n const exitComplete = useConstant(() => new Map());\n /**\n * Save children to render as React state. To ensure this component is concurrent-safe,\n * we check for exiting children via an effect.\n */\n const [diffedChildren, setDiffedChildren] = useState(presentChildren);\n const [renderedChildren, setRenderedChildren] = useState(presentChildren);\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false;\n pendingPresentChildren.current = presentChildren;\n /**\n * Update complete status of exiting children.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const key = getChildKey(renderedChildren[i]);\n if (!presentKeys.includes(key)) {\n if (exitComplete.get(key) !== true) {\n exitComplete.set(key, false);\n }\n }\n else {\n exitComplete.delete(key);\n }\n }\n }, [renderedChildren, presentKeys.length, presentKeys.join(\"-\")]);\n const exitingChildren = [];\n if (presentChildren !== diffedChildren) {\n let nextChildren = [...presentChildren];\n /**\n * Loop through all the currently rendered components and decide which\n * are exiting.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const child = renderedChildren[i];\n const key = getChildKey(child);\n if (!presentKeys.includes(key)) {\n nextChildren.splice(i, 0, child);\n exitingChildren.push(child);\n }\n }\n /**\n * If we're in \"wait\" mode, and we have exiting children, we want to\n * only render these until they've all exited.\n */\n if (mode === \"wait\" && exitingChildren.length) {\n nextChildren = exitingChildren;\n }\n setRenderedChildren(onlyElements(nextChildren));\n setDiffedChildren(presentChildren);\n /**\n * Early return to ensure once we've set state with the latest diffed\n * children, we can immediately re-render.\n */\n return null;\n }\n if (process.env.NODE_ENV !== \"production\" &&\n mode === \"wait\" &&\n renderedChildren.length > 1) {\n console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`);\n }\n /**\n * If we've been provided a forceRender function by the LayoutGroupContext,\n * we can use it to force a re-render amongst all surrounding components once\n * all components have finished animating out.\n */\n const { forceRender } = useContext(LayoutGroupContext);\n return (jsx(Fragment, { children: renderedChildren.map((child) => {\n const key = getChildKey(child);\n const isPresent = propagate && !isParentPresent\n ? false\n : presentChildren === renderedChildren ||\n presentKeys.includes(key);\n const onExit = () => {\n if (exitComplete.has(key)) {\n exitComplete.set(key, true);\n }\n else {\n return;\n }\n let isEveryExitComplete = true;\n exitComplete.forEach((isExitComplete) => {\n if (!isExitComplete)\n isEveryExitComplete = false;\n });\n if (isEveryExitComplete) {\n forceRender?.();\n setRenderedChildren(pendingPresentChildren.current);\n propagate && safeToRemove?.();\n onExitComplete && onExitComplete();\n }\n };\n return (jsx(PresenceChild, { isPresent: isPresent, initial: !isInitialRender.current || initial\n ? undefined\n : false, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, onExitComplete: isPresent ? undefined : onExit, anchorX: anchorX, children: child }, key));\n }) }));\n};\n\nexport { AnimatePresence };\n","\"use client\";\nimport { createContext } from 'react';\n\nconst LazyContext = createContext({ strict: false });\n\nexport { LazyContext };\n","const featureProps = {\n animation: [\n \"animate\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"exit\",\n \"whileInView\",\n \"whileFocus\",\n \"whileDrag\",\n ],\n exit: [\"exit\"],\n drag: [\"drag\", \"dragControls\"],\n focus: [\"whileFocus\"],\n hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n layout: [\"layout\", \"layoutId\"],\n};\nconst featureDefinitions = {};\nfor (const key in featureProps) {\n featureDefinitions[key] = {\n isEnabled: (props) => featureProps[key].some((name) => !!props[name]),\n };\n}\n\nexport { featureDefinitions };\n","import { featureDefinitions } from './definitions.mjs';\n\nfunction loadFeatures(features) {\n for (const key in features) {\n featureDefinitions[key] = {\n ...featureDefinitions[key],\n ...features[key],\n };\n }\n}\n\nexport { loadFeatures };\n","/**\n * A list of all valid MotionProps.\n *\n * @privateRemarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nconst validMotionProps = new Set([\n \"animate\",\n \"exit\",\n \"variants\",\n \"initial\",\n \"style\",\n \"values\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"custom\",\n \"inherit\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"_dragX\",\n \"_dragY\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"globalTapTarget\",\n \"ignoreStrict\",\n \"viewport\",\n]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nfunction isValidMotionProp(key) {\n return (key.startsWith(\"while\") ||\n (key.startsWith(\"drag\") && key !== \"draggable\") ||\n key.startsWith(\"layout\") ||\n key.startsWith(\"onTap\") ||\n key.startsWith(\"onPan\") ||\n key.startsWith(\"onLayout\") ||\n validMotionProps.has(key));\n}\n\nexport { isValidMotionProp };\n","import { isValidMotionProp } from '../../../motion/utils/valid-prop.mjs';\n\nlet shouldForward = (key) => !isValidMotionProp(key);\nfunction loadExternalIsValidProp(isValidProp) {\n if (!isValidProp)\n return;\n // Explicitly filter our events\n shouldForward = (key) => key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n}\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n */\n loadExternalIsValidProp(require(\"@emotion/is-prop-valid\").default);\n}\ncatch {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\nfunction filterProps(props, isDom, forwardMotionProps) {\n const filteredProps = {};\n for (const key in props) {\n /**\n * values is considered a valid prop by Emotion, so if it's present\n * this will be rendered out to the DOM unless explicitly filtered.\n *\n * We check the type as it could be used with the `feColorMatrix`\n * element, which we support.\n */\n if (key === \"values\" && typeof props.values === \"object\")\n continue;\n if (shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\"] &&\n key.startsWith(\"onDrag\"))) {\n filteredProps[key] =\n props[key];\n }\n }\n return filteredProps;\n}\n\nexport { filterProps, loadExternalIsValidProp };\n","import { warnOnce } from 'motion-utils';\n\nfunction createDOMMotionComponentProxy(componentFactory) {\n if (typeof Proxy === \"undefined\") {\n return componentFactory;\n }\n /**\n * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n * Rather than generating them anew every render.\n */\n const componentCache = new Map();\n const deprecatedFactoryFunction = (...args) => {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, \"motion() is deprecated. Use motion.create() instead.\");\n }\n return componentFactory(...args);\n };\n return new Proxy(deprecatedFactoryFunction, {\n /**\n * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n * The prop name is passed through as `key` and we can use that to generate a `motion`\n * DOM component with that name.\n */\n get: (_target, key) => {\n if (key === \"create\")\n return componentFactory;\n /**\n * If this element doesn't exist in the component cache, create it and cache.\n */\n if (!componentCache.has(key)) {\n componentCache.set(key, componentFactory(key));\n }\n return componentCache.get(key);\n },\n });\n}\n\nexport { createDOMMotionComponentProxy };\n","\"use client\";\nimport { createContext } from 'react';\n\nconst MotionContext = /* @__PURE__ */ createContext({});\n\nexport { MotionContext };\n","function isAnimationControls(v) {\n return (v !== null &&\n typeof v === \"object\" &&\n typeof v.start === \"function\");\n}\n\nexport { isAnimationControls };\n","/**\n * Decides if the supplied variable is variant label\n */\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || Array.isArray(v);\n}\n\nexport { isVariantLabel };\n","const variantPriorityOrder = [\n \"animate\",\n \"whileInView\",\n \"whileFocus\",\n \"whileHover\",\n \"whileTap\",\n \"whileDrag\",\n \"exit\",\n];\nconst variantProps = [\"initial\", ...variantPriorityOrder];\n\nexport { variantPriorityOrder, variantProps };\n","import { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nfunction isControllingVariants(props) {\n return (isAnimationControls(props.animate) ||\n variantProps.some((name) => isVariantLabel(props[name])));\n}\nfunction isVariantNode(props) {\n return Boolean(isControllingVariants(props) || props.variants);\n}\n\nexport { isControllingVariants, isVariantNode };\n","import { isControllingVariants } from '../../render/utils/is-controlling-variants.mjs';\nimport { isVariantLabel } from '../../render/utils/is-variant-label.mjs';\n\nfunction getCurrentTreeVariants(props, context) {\n if (isControllingVariants(props)) {\n const { initial, animate } = props;\n return {\n initial: initial === false || isVariantLabel(initial)\n ? initial\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n };\n }\n return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };\n","import { useContext, useMemo } from 'react';\nimport { MotionContext } from './index.mjs';\nimport { getCurrentTreeVariants } from './utils.mjs';\n\nfunction useCreateMotionContext(props) {\n const { initial, animate } = getCurrentTreeVariants(props, useContext(MotionContext));\n return useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);\n}\nfunction variantLabelsAsDependency(prop) {\n return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\nexport { useCreateMotionContext };\n","const motionComponentSymbol = Symbol.for(\"motionComponentSymbol\");\n\nexport { motionComponentSymbol };\n","function isRefObject(ref) {\n return (ref &&\n typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\"));\n}\n\nexport { isRefObject };\n","import { useCallback } from 'react';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nfunction useMotionRef(visualState, visualElement, externalRef) {\n return useCallback((instance) => {\n if (instance) {\n visualState.onMount && visualState.onMount(instance);\n }\n if (visualElement) {\n if (instance) {\n visualElement.mount(instance);\n }\n else {\n visualElement.unmount();\n }\n }\n if (externalRef) {\n if (typeof externalRef === \"function\") {\n externalRef(instance);\n }\n else if (isRefObject(externalRef)) {\n externalRef.current = instance;\n }\n }\n }, \n /**\n * Only pass a new ref callback to React if we've received a visual element\n * factory. Otherwise we'll be mounting/remounting every time externalRef\n * or other dependencies change.\n */\n [visualElement]);\n}\n\nexport { useMotionRef };\n","/**\n * Convert camelCase to dash-case properties.\n */\nconst camelToDash = (str) => str.replace(/([a-z])([A-Z])/gu, \"$1-$2\").toLowerCase();\n\nexport { camelToDash };\n","import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';\n\nconst optimizedAppearDataId = \"framerAppearId\";\nconst optimizedAppearDataAttribute = \"data-\" + camelToDash(optimizedAppearDataId);\n\nexport { optimizedAppearDataAttribute, optimizedAppearDataId };\n","\"use client\";\nimport { createContext } from 'react';\n\n/**\n * Internal, exported only for usage in Framer\n */\nconst SwitchLayoutGroupContext = createContext({});\n\nexport { SwitchLayoutGroupContext };\n","import { microtask } from 'motion-dom';\nimport { useContext, useRef, useInsertionEffect, useEffect } from 'react';\nimport { optimizedAppearDataAttribute } from '../../animation/optimized-appear/data-id.mjs';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../context/SwitchLayoutGroupContext.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\n\nfunction useVisualElement(Component, visualState, props, createVisualElement, ProjectionNodeConstructor) {\n const { visualElement: parent } = useContext(MotionContext);\n const lazyContext = useContext(LazyContext);\n const presenceContext = useContext(PresenceContext);\n const reducedMotionConfig = useContext(MotionConfigContext).reducedMotion;\n const visualElementRef = useRef(null);\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n createVisualElement = createVisualElement || lazyContext.renderer;\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState,\n parent,\n props,\n presenceContext,\n blockInitialAnimation: presenceContext\n ? presenceContext.initial === false\n : false,\n reducedMotionConfig,\n });\n }\n const visualElement = visualElementRef.current;\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n */\n const initialLayoutGroupConfig = useContext(SwitchLayoutGroupContext);\n if (visualElement &&\n !visualElement.projection &&\n ProjectionNodeConstructor &&\n (visualElement.type === \"html\" || visualElement.type === \"svg\")) {\n createProjectionNode(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig);\n }\n const isMounted = useRef(false);\n useInsertionEffect(() => {\n /**\n * Check the component has already mounted before calling\n * `update` unnecessarily. This ensures we skip the initial update.\n */\n if (visualElement && isMounted.current) {\n visualElement.update(props, presenceContext);\n }\n });\n /**\n * Cache this value as we want to know whether HandoffAppearAnimations\n * was present on initial render - it will be deleted after this.\n */\n const optimisedAppearId = props[optimizedAppearDataAttribute];\n const wantsHandoff = useRef(Boolean(optimisedAppearId) &&\n !window.MotionHandoffIsComplete?.(optimisedAppearId) &&\n window.MotionHasOptimisedAnimation?.(optimisedAppearId));\n useIsomorphicLayoutEffect(() => {\n if (!visualElement)\n return;\n isMounted.current = true;\n window.MotionIsMounted = true;\n visualElement.updateFeatures();\n microtask.render(visualElement.render);\n /**\n * Ideally this function would always run in a useEffect.\n *\n * However, if we have optimised appear animations to handoff from,\n * it needs to happen synchronously to ensure there's no flash of\n * incorrect styles in the event of a hydration error.\n *\n * So if we detect a situtation where optimised appear animations\n * are running, we use useLayoutEffect to trigger animations.\n */\n if (wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n });\n useEffect(() => {\n if (!visualElement)\n return;\n if (!wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n if (wantsHandoff.current) {\n // This ensures all future calls to animateChanges() in this component will run in useEffect\n queueMicrotask(() => {\n window.MotionHandoffMarkAsComplete?.(optimisedAppearId);\n });\n wantsHandoff.current = false;\n }\n });\n return visualElement;\n}\nfunction createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {\n const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutCrossfade, } = props;\n visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props[\"data-framer-portal-id\"]\n ? undefined\n : getClosestProjectingNode(visualElement.parent));\n visualElement.projection.setOptions({\n layoutId,\n layout,\n alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),\n visualElement,\n /**\n * TODO: Update options in an effect. This could be tricky as it'll be too late\n * to update by the time layout animations run.\n * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n * ensuring it gets called if there's no potential layout animations.\n *\n */\n animationType: typeof layout === \"string\" ? layout : \"both\",\n initialPromotionConfig,\n crossfade: layoutCrossfade,\n layoutScroll,\n layoutRoot,\n });\n}\nfunction getClosestProjectingNode(visualElement) {\n if (!visualElement)\n return undefined;\n return visualElement.options.allowProjection !== false\n ? visualElement.projection\n : getClosestProjectingNode(visualElement.parent);\n}\n\nexport { useVisualElement };\n","\"use client\";\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { warning, invariant } from 'motion-utils';\nimport { forwardRef, useContext } from 'react';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { LazyContext } from '../context/LazyContext.mjs';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../context/MotionContext/index.mjs';\nimport { useCreateMotionContext } from '../context/MotionContext/create.mjs';\nimport { isBrowser } from '../utils/is-browser.mjs';\nimport { featureDefinitions } from './features/definitions.mjs';\nimport { loadFeatures } from './features/load-features.mjs';\nimport { motionComponentSymbol } from './utils/symbol.mjs';\nimport { useMotionRef } from './utils/use-motion-ref.mjs';\nimport { useVisualElement } from './utils/use-visual-element.mjs';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nfunction createRendererMotionComponent({ preloadedFeatures, createVisualElement, useRender, useVisualState, Component, }) {\n preloadedFeatures && loadFeatures(preloadedFeatures);\n function MotionComponent(props, externalRef) {\n /**\n * If we need to measure the element we load this functionality in a\n * separate class component in order to gain access to getSnapshotBeforeUpdate.\n */\n let MeasureLayout;\n const configAndProps = {\n ...useContext(MotionConfigContext),\n ...props,\n layoutId: useLayoutId(props),\n };\n const { isStatic } = configAndProps;\n const context = useCreateMotionContext(props);\n const visualState = useVisualState(props, isStatic);\n if (!isStatic && isBrowser) {\n useStrictMode(configAndProps, preloadedFeatures);\n const layoutProjection = getProjectionFunctionality(configAndProps);\n MeasureLayout = layoutProjection.MeasureLayout;\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode);\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)] }));\n }\n MotionComponent.displayName = `motion.${typeof Component === \"string\"\n ? Component\n : `create(${Component.displayName ?? Component.name ?? \"\"})`}`;\n const ForwardRefMotionComponent = forwardRef(MotionComponent);\n ForwardRefMotionComponent[motionComponentSymbol] = Component;\n return ForwardRefMotionComponent;\n}\nfunction useLayoutId({ layoutId }) {\n const layoutGroupId = useContext(LayoutGroupContext).id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\nfunction useStrictMode(configAndProps, preloadedFeatures) {\n const isStrict = useContext(LazyContext).strict;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (process.env.NODE_ENV !== \"production\" &&\n preloadedFeatures &&\n isStrict) {\n const strictMessage = \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\";\n configAndProps.ignoreStrict\n ? warning(false, strictMessage)\n : invariant(false, strictMessage);\n }\n}\nfunction getProjectionFunctionality(props) {\n const { drag, layout } = featureDefinitions;\n if (!drag && !layout)\n return {};\n const combined = { ...drag, ...layout };\n return {\n MeasureLayout: drag?.isEnabled(props) || layout?.isEnabled(props)\n ? combined.MeasureLayout\n : undefined,\n ProjectionNode: combined.ProjectionNode,\n };\n}\n\nexport { createRendererMotionComponent };\n","import { isCSSVariableName } from 'motion-dom';\n\nconst scaleCorrectors = {};\nfunction addScaleCorrector(correctors) {\n for (const key in correctors) {\n scaleCorrectors[key] = correctors[key];\n if (isCSSVariableName(key)) {\n scaleCorrectors[key].isCSSVariable = true;\n }\n }\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n","import { transformProps } from 'motion-dom';\nimport { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\n\nfunction isForcedMotionValue(key, { layout, layoutId }) {\n return (transformProps.has(key) ||\n key.startsWith(\"origin\") ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue };\n","import { transformPropOrder, getValueAsType, numberValueTypes } from 'motion-dom';\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\nconst numTransforms = transformPropOrder.length;\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(latestValues, transform, transformTemplate) {\n // The transform string we're going to build into.\n let transformString = \"\";\n let transformIsDefault = true;\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i];\n const value = latestValues[key];\n if (value === undefined)\n continue;\n let valueIsDefault = true;\n if (typeof value === \"number\") {\n valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0);\n }\n else {\n valueIsDefault = parseFloat(value) === 0;\n }\n if (!valueIsDefault || transformTemplate) {\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (!valueIsDefault) {\n transformIsDefault = false;\n const transformName = translateAlias[key] || key;\n transformString += `${transformName}(${valueAsType}) `;\n }\n if (transformTemplate) {\n transform[key] = valueAsType;\n }\n }\n }\n transformString = transformString.trim();\n // If we have a custom `transform` template, pass our transform values and\n // generated transformString to that before returning\n if (transformTemplate) {\n transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n }\n else if (transformIsDefault) {\n transformString = \"none\";\n }\n return transformString;\n}\n\nexport { buildTransform };\n","import { transformProps, isCSSVariableName, getValueAsType, numberValueTypes } from 'motion-dom';\nimport { buildTransform } from './build-transform.mjs';\n\nfunction buildHTMLStyles(state, latestValues, transformTemplate) {\n const { style, vars, transformOrigin } = state;\n // Track whether we encounter any transform or transformOrigin values.\n let hasTransform = false;\n let hasTransformOrigin = false;\n /**\n * Loop over all our latest animated values and decide whether to handle them\n * as a style or CSS variable.\n *\n * Transforms and transform origins are kept separately for further processing.\n */\n for (const key in latestValues) {\n const value = latestValues[key];\n if (transformProps.has(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true;\n continue;\n }\n else if (isCSSVariableName(key)) {\n vars[key] = value;\n continue;\n }\n else {\n // Convert the value to its default value type, ie 0 -> \"0px\"\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (key.startsWith(\"origin\")) {\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true;\n transformOrigin[key] =\n valueAsType;\n }\n else {\n style[key] = valueAsType;\n }\n }\n }\n if (!latestValues.transform) {\n if (hasTransform || transformTemplate) {\n style.transform = buildTransform(latestValues, state.transform, transformTemplate);\n }\n else if (style.transform) {\n /**\n * If we have previously created a transform but currently don't have any,\n * reset transform style to none.\n */\n style.transform = \"none\";\n }\n }\n /**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\n if (hasTransformOrigin) {\n const { originX = \"50%\", originY = \"50%\", originZ = 0, } = transformOrigin;\n style.transformOrigin = `${originX} ${originY} ${originZ}`;\n }\n}\n\nexport { buildHTMLStyles };\n","const createHtmlRenderState = () => ({\n style: {},\n transform: {},\n transformOrigin: {},\n vars: {},\n});\n\nexport { createHtmlRenderState };\n","import { isMotionValue } from 'motion-dom';\nimport { useMemo } from 'react';\nimport { isForcedMotionValue } from '../../motion/utils/is-forced-motion-value.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nfunction copyRawValuesOnly(target, source, props) {\n for (const key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\nfunction useInitialMotionValues({ transformTemplate }, visualState) {\n return useMemo(() => {\n const state = createHtmlRenderState();\n buildHTMLStyles(state, visualState, transformTemplate);\n return Object.assign({}, state.vars, state.style);\n }, [visualState]);\n}\nfunction useStyle(props, visualState) {\n const styleProp = props.style || {};\n const style = {};\n /**\n * Copy non-Motion Values straight into style\n */\n copyRawValuesOnly(style, styleProp, props);\n Object.assign(style, useInitialMotionValues(props, visualState));\n return style;\n}\nfunction useHTMLProps(props, visualState) {\n // The `any` isn't ideal but it is the type of createElement props argument\n const htmlProps = {};\n const style = useStyle(props, visualState);\n if (props.drag && props.dragListener !== false) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false;\n // Disable text selection\n style.userSelect =\n style.WebkitUserSelect =\n style.WebkitTouchCallout =\n \"none\";\n // Disable scrolling on the draggable direction\n style.touchAction =\n props.drag === true\n ? \"none\"\n : `pan-${props.drag === \"x\" ? \"y\" : \"x\"}`;\n }\n if (props.tabIndex === undefined &&\n (props.onTap || props.onTapStart || props.whileTap)) {\n htmlProps.tabIndex = 0;\n }\n htmlProps.style = style;\n return htmlProps;\n}\n\nexport { copyRawValuesOnly, useHTMLProps };\n","import { px } from 'motion-dom';\n\nconst dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n};\nconst camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\",\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n */\nfunction buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) {\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1;\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n const keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset\n attrs[keys.offset] = px.transform(-offset);\n // Build the dash array\n const pathLength = px.transform(length);\n const pathSpacing = px.transform(spacing);\n attrs[keys.array] = `${pathLength} ${pathSpacing}`;\n}\n\nexport { buildSVGPath };\n","import { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * Build SVG visual attrbutes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0, \n// This is object creation, which we try to avoid per-frame.\n...latest }, isSVGTag, transformTemplate, styleProp) {\n buildHTMLStyles(state, latest, transformTemplate);\n /**\n * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n * as normal HTML tags.\n */\n if (isSVGTag) {\n if (state.style.viewBox) {\n state.attrs.viewBox = state.style.viewBox;\n }\n return;\n }\n state.attrs = state.style;\n state.style = {};\n const { attrs, style } = state;\n /**\n * However, we apply transforms as CSS transforms.\n * So if we detect a transform, transformOrigin we take it from attrs and copy it into style.\n */\n if (attrs.transform) {\n style.transform = attrs.transform;\n delete attrs.transform;\n }\n if (style.transform || attrs.transformOrigin) {\n style.transformOrigin = attrs.transformOrigin ?? \"50% 50%\";\n delete attrs.transformOrigin;\n }\n if (style.transform) {\n /**\n * SVG's element transform-origin uses its own median as a reference.\n * Therefore, transformBox becomes a fill-box\n */\n style.transformBox = styleProp?.transformBox ?? \"fill-box\";\n delete attrs.transformBox;\n }\n // Render attrX/attrY/attrScale as attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n if (attrScale !== undefined)\n attrs.scale = attrScale;\n // Build SVG path if one has been defined\n if (pathLength !== undefined) {\n buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n }\n}\n\nexport { buildSVGAttrs };\n","import { createHtmlRenderState } from '../../html/utils/create-render-state.mjs';\n\nconst createSvgRenderState = () => ({\n ...createHtmlRenderState(),\n attrs: {},\n});\n\nexport { createSvgRenderState };\n","const isSVGTag = (tag) => typeof tag === \"string\" && tag.toLowerCase() === \"svg\";\n\nexport { isSVGTag };\n","import { useMemo } from 'react';\nimport { copyRawValuesOnly } from '../html/use-props.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\n\nfunction useSVGProps(props, visualState, _isStatic, Component) {\n const visualProps = useMemo(() => {\n const state = createSvgRenderState();\n buildSVGAttrs(state, visualState, isSVGTag(Component), props.transformTemplate, props.style);\n return {\n ...state.attrs,\n style: { ...state.style },\n };\n }, [visualState]);\n if (props.style) {\n const rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = { ...rawStyles, ...visualProps.style };\n }\n return visualProps;\n}\n\nexport { useSVGProps };\n","/**\n * We keep these listed separately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nconst lowercaseSVGElements = [\n \"animate\",\n \"circle\",\n \"defs\",\n \"desc\",\n \"ellipse\",\n \"g\",\n \"image\",\n \"line\",\n \"filter\",\n \"marker\",\n \"mask\",\n \"metadata\",\n \"path\",\n \"pattern\",\n \"polygon\",\n \"polyline\",\n \"rect\",\n \"stop\",\n \"switch\",\n \"symbol\",\n \"svg\",\n \"text\",\n \"tspan\",\n \"use\",\n \"view\",\n];\n\nexport { lowercaseSVGElements };\n","import { lowercaseSVGElements } from '../../svg/lowercase-elements.mjs';\n\nfunction isSVGComponent(Component) {\n if (\n /**\n * If it's not a string, it's a custom React component. Currently we only support\n * HTML custom React components.\n */\n typeof Component !== \"string\" ||\n /**\n * If it contains a dash, the element is a custom HTML webcomponent.\n */\n Component.includes(\"-\")) {\n return false;\n }\n else if (\n /**\n * If it's in our list of lowercase SVG tags, it's an SVG component\n */\n lowercaseSVGElements.indexOf(Component) > -1 ||\n /**\n * If it contains a capital letter, it's an SVG component\n */\n /[A-Z]/u.test(Component)) {\n return true;\n }\n return false;\n}\n\nexport { isSVGComponent };\n","import { isMotionValue } from 'motion-dom';\nimport { Fragment, useMemo, createElement } from 'react';\nimport { useHTMLProps } from '../html/use-props.mjs';\nimport { useSVGProps } from '../svg/use-props.mjs';\nimport { filterProps } from './utils/filter-props.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\n\nfunction createUseRender(forwardMotionProps = false) {\n const useRender = (Component, props, ref, { latestValues }, isStatic) => {\n const useVisualProps = isSVGComponent(Component)\n ? useSVGProps\n : useHTMLProps;\n const visualProps = useVisualProps(props, latestValues, isStatic, Component);\n const filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n const elementProps = Component !== Fragment\n ? { ...filteredProps, ...visualProps, ref }\n : {};\n /**\n * If component has been handed a motion value as its child,\n * memoise its initial value and render that. Subsequent updates\n * will be handled by the onChange handler\n */\n const { children } = props;\n const renderedChildren = useMemo(() => (isMotionValue(children) ? children.get() : children), [children]);\n return createElement(Component, {\n ...elementProps,\n children: renderedChildren,\n });\n };\n return useRender;\n}\n\nexport { createUseRender };\n","function getValueState(visualElement) {\n const state = [{}, {}];\n visualElement?.values.forEach((value, key) => {\n state[0][key] = value.get();\n state[1][key] = value.getVelocity();\n });\n return state;\n}\nfunction resolveVariantFromProps(props, definition, custom, visualElement) {\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = props.variants && props.variants[definition];\n }\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n return definition;\n}\n\nexport { resolveVariantFromProps };\n","import { isMotionValue } from 'motion-dom';\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n *\n * TODO: Remove and move to library\n */\nfunction resolveMotionValue(value) {\n return isMotionValue(value) ? value.get() : value;\n}\n\nexport { resolveMotionValue };\n","import { useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { isControllingVariants, isVariantNode } from '../../render/utils/is-controlling-variants.mjs';\nimport { resolveVariantFromProps } from '../../render/utils/resolve-variants.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\n\nfunction makeState({ scrapeMotionValuesFromProps, createRenderState, }, props, context, presenceContext) {\n const state = {\n latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n renderState: createRenderState(),\n };\n return state;\n}\nconst makeUseVisualState = (config) => (props, isStatic) => {\n const context = useContext(MotionContext);\n const presenceContext = useContext(PresenceContext);\n const make = () => makeState(config, props, context, presenceContext);\n return isStatic ? make() : useConstant(make);\n};\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n const values = {};\n const motionValues = scrapeMotionValues(props, {});\n for (const key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n let { initial, animate } = props;\n const isControllingVariants$1 = isControllingVariants(props);\n const isVariantNode$1 = isVariantNode(props);\n if (context &&\n isVariantNode$1 &&\n !isControllingVariants$1 &&\n props.inherit !== false) {\n if (initial === undefined)\n initial = context.initial;\n if (animate === undefined)\n animate = context.animate;\n }\n let isInitialAnimationBlocked = presenceContext\n ? presenceContext.initial === false\n : false;\n isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;\n const variantToSet = isInitialAnimationBlocked ? animate : initial;\n if (variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)) {\n const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n for (let i = 0; i < list.length; i++) {\n const resolved = resolveVariantFromProps(props, list[i]);\n if (resolved) {\n const { transitionEnd, transition, ...target } = resolved;\n for (const key in target) {\n let valueTarget = target[key];\n if (Array.isArray(valueTarget)) {\n /**\n * Take final keyframe if the initial animation is blocked because\n * we want to initialise at the end of that blocked animation.\n */\n const index = isInitialAnimationBlocked\n ? valueTarget.length - 1\n : 0;\n valueTarget = valueTarget[index];\n }\n if (valueTarget !== null) {\n values[key] = valueTarget;\n }\n }\n for (const key in transitionEnd) {\n values[key] = transitionEnd[key];\n }\n }\n }\n }\n return values;\n}\n\nexport { makeUseVisualState };\n","import { isMotionValue } from 'motion-dom';\nimport { isForcedMotionValue } from '../../../motion/utils/is-forced-motion-value.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const { style } = props;\n const newValues = {};\n for (const key in style) {\n if (isMotionValue(style[key]) ||\n (prevProps.style &&\n isMotionValue(prevProps.style[key])) ||\n isForcedMotionValue(key, props) ||\n visualElement?.getValue(key)?.liveStyle !== undefined) {\n newValues[key] = style[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nconst htmlMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n }),\n};\n\nexport { htmlMotionConfig };\n","import { isMotionValue, transformPropOrder } from 'motion-dom';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);\n for (const key in props) {\n if (isMotionValue(props[key]) ||\n isMotionValue(prevProps[key])) {\n const targetKey = transformPropOrder.indexOf(key) !== -1\n ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nconst svgMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n }),\n};\n\nexport { svgMotionConfig };\n","import { createRendererMotionComponent } from '../../motion/index.mjs';\nimport { createUseRender } from '../dom/use-render.mjs';\nimport { isSVGComponent } from '../dom/utils/is-svg-component.mjs';\nimport { htmlMotionConfig } from '../html/config-motion.mjs';\nimport { svgMotionConfig } from '../svg/config-motion.mjs';\n\nfunction createMotionComponentFactory(preloadedFeatures, createVisualElement) {\n return function createMotionComponent(Component, { forwardMotionProps } = { forwardMotionProps: false }) {\n const baseConfig = isSVGComponent(Component)\n ? svgMotionConfig\n : htmlMotionConfig;\n const config = {\n ...baseConfig,\n preloadedFeatures,\n useRender: createUseRender(forwardMotionProps),\n createVisualElement,\n Component,\n };\n return createRendererMotionComponent(config);\n };\n}\n\nexport { createMotionComponentFactory };\n","import { resolveVariantFromProps } from './resolve-variants.mjs';\n\nfunction resolveVariant(visualElement, definition, custom) {\n const props = visualElement.getProps();\n return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, visualElement);\n}\n\nexport { resolveVariant };\n","const isKeyframesTarget = (v) => {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\n","import { motionValue } from 'motion-dom';\nimport { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, motionValue(value));\n }\n}\nfunction resolveFinalValueInKeyframes(v) {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n}\nfunction setTarget(visualElement, definition) {\n const resolved = resolveVariant(visualElement, definition);\n let { transitionEnd = {}, transition = {}, ...target } = resolved || {};\n target = { ...target, ...transitionEnd };\n for (const key in target) {\n const value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\n\nexport { setTarget };\n","import { isMotionValue } from 'motion-dom';\n\nfunction isWillChangeMotionValue(value) {\n return Boolean(isMotionValue(value) && value.add);\n}\n\nexport { isWillChangeMotionValue };\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { isWillChangeMotionValue } from './is.mjs';\n\nfunction addValueToWillChange(visualElement, key) {\n const willChange = visualElement.getValue(\"willChange\");\n /**\n * It could be that a user has set willChange to a regular MotionValue,\n * in which case we can't add the value to it.\n */\n if (isWillChangeMotionValue(willChange)) {\n return willChange.add(key);\n }\n else if (!willChange && MotionGlobalConfig.WillChange) {\n const newWillChange = new MotionGlobalConfig.WillChange(\"auto\");\n visualElement.addValue(\"willChange\", newWillChange);\n newWillChange.add(key);\n }\n}\n\nexport { addValueToWillChange };\n","import { optimizedAppearDataAttribute } from './data-id.mjs';\n\nfunction getOptimisedAppearId(visualElement) {\n return visualElement.props[optimizedAppearDataAttribute];\n}\n\nexport { getOptimisedAppearId };\n","const isNotNull = (value) => value !== null;\nfunction getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }, finalKeyframe) {\n const resolvedKeyframes = keyframes.filter(isNotNull);\n const index = repeat && repeatType !== \"loop\" && repeat % 2 === 1\n ? 0\n : resolvedKeyframes.length - 1;\n return !index || finalKeyframe === undefined\n ? resolvedKeyframes[index]\n : finalKeyframe;\n}\n\nexport { getFinalKeyframe };\n","import { transformProps } from 'motion-dom';\n\nconst underDampedSpring = {\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10,\n};\nconst criticallyDampedSpring = (target) => ({\n type: \"spring\",\n stiffness: 550,\n damping: target === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10,\n});\nconst keyframesTransition = {\n type: \"keyframes\",\n duration: 0.8,\n};\n/**\n * Default easing curve is a slightly shallower version of\n * the default browser easing curve.\n */\nconst ease = {\n type: \"keyframes\",\n ease: [0.25, 0.1, 0.35, 1],\n duration: 0.3,\n};\nconst getDefaultTransition = (valueKey, { keyframes }) => {\n if (keyframes.length > 2) {\n return keyframesTransition;\n }\n else if (transformProps.has(valueKey)) {\n return valueKey.startsWith(\"scale\")\n ? criticallyDampedSpring(keyframes[1])\n : underDampedSpring;\n }\n return ease;\n};\n\nexport { getDefaultTransition };\n","/**\n * Decide whether a transition is defined on a given Transition.\n * This filters out orchestration options and returns true\n * if any options are left.\n */\nfunction isTransitionDefined({ when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, elapsed, ...transition }) {\n return !!Object.keys(transition).length;\n}\n\nexport { isTransitionDefined };\n","import { getValueTransition, frame, JSAnimation, AsyncMotionValueAnimation } from 'motion-dom';\nimport { secondsToMilliseconds, MotionGlobalConfig } from 'motion-utils';\nimport { getFinalKeyframe } from '../animators/waapi/utils/get-final-keyframe.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { isTransitionDefined } from '../utils/is-transition-defined.mjs';\n\nconst animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {\n const valueTransition = getValueTransition(transition, name) || {};\n /**\n * Most transition values are currently completely overwritten by value-specific\n * transitions. In the future it'd be nicer to blend these transitions. But for now\n * delay actually does inherit from the root transition if not value-specific.\n */\n const delay = valueTransition.delay || transition.delay || 0;\n /**\n * Elapsed isn't a public transition option but can be passed through from\n * optimized appear effects in milliseconds.\n */\n let { elapsed = 0 } = transition;\n elapsed = elapsed - secondsToMilliseconds(delay);\n const options = {\n keyframes: Array.isArray(target) ? target : [null, target],\n ease: \"easeOut\",\n velocity: value.getVelocity(),\n ...valueTransition,\n delay: -elapsed,\n onUpdate: (v) => {\n value.set(v);\n valueTransition.onUpdate && valueTransition.onUpdate(v);\n },\n onComplete: () => {\n onComplete();\n valueTransition.onComplete && valueTransition.onComplete();\n },\n name,\n motionValue: value,\n element: isHandoff ? undefined : element,\n };\n /**\n * If there's no transition defined for this value, we can generate\n * unique transition settings for this value.\n */\n if (!isTransitionDefined(valueTransition)) {\n Object.assign(options, getDefaultTransition(name, options));\n }\n /**\n * Both WAAPI and our internal animation functions use durations\n * as defined by milliseconds, while our external API defines them\n * as seconds.\n */\n options.duration && (options.duration = secondsToMilliseconds(options.duration));\n options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));\n /**\n * Support deprecated way to set initial value. Prefer keyframe syntax.\n */\n if (options.from !== undefined) {\n options.keyframes[0] = options.from;\n }\n let shouldSkip = false;\n if (options.type === false ||\n (options.duration === 0 && !options.repeatDelay)) {\n options.duration = 0;\n if (options.delay === 0) {\n shouldSkip = true;\n }\n }\n if (MotionGlobalConfig.instantAnimations ||\n MotionGlobalConfig.skipAnimations) {\n shouldSkip = true;\n options.duration = 0;\n options.delay = 0;\n }\n /**\n * If the transition type or easing has been explicitly set by the user\n * then we don't want to allow flattening the animation.\n */\n options.allowFlatten = !valueTransition.type && !valueTransition.ease;\n /**\n * If we can or must skip creating the animation, and apply only\n * the final keyframe, do so. We also check once keyframes are resolved but\n * this early check prevents the need to create an animation at all.\n */\n if (shouldSkip && !isHandoff && value.get() !== undefined) {\n const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);\n if (finalKeyframe !== undefined) {\n frame.update(() => {\n options.onUpdate(finalKeyframe);\n options.onComplete();\n });\n return;\n }\n }\n return valueTransition.isSync\n ? new JSAnimation(options)\n : new AsyncMotionValueAnimation(options);\n};\n\nexport { animateMotionValue };\n","import { getValueTransition, frame, positionalKeys } from 'motion-dom';\nimport { setTarget } from '../../render/utils/setters.mjs';\nimport { addValueToWillChange } from '../../value/use-will-change/add-will-change.mjs';\nimport { getOptimisedAppearId } from '../optimized-appear/get-appear-id.mjs';\nimport { animateMotionValue } from './motion-value.mjs';\n\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {\n const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\nfunction animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {\n let { transition = visualElement.getDefaultTransition(), transitionEnd, ...target } = targetAndTransition;\n if (transitionOverride)\n transition = transitionOverride;\n const animations = [];\n const animationTypeState = type &&\n visualElement.animationState &&\n visualElement.animationState.getState()[type];\n for (const key in target) {\n const value = visualElement.getValue(key, visualElement.latestValues[key] ?? null);\n const valueTarget = target[key];\n if (valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n const valueTransition = {\n delay,\n ...getValueTransition(transition || {}, key),\n };\n /**\n * If the value is already at the defined target, skip the animation.\n */\n const currentValue = value.get();\n if (currentValue !== undefined &&\n !value.isAnimating &&\n !Array.isArray(valueTarget) &&\n valueTarget === currentValue &&\n !valueTransition.velocity) {\n continue;\n }\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n let isHandoff = false;\n if (window.MotionHandoffAnimation) {\n const appearId = getOptimisedAppearId(visualElement);\n if (appearId) {\n const startTime = window.MotionHandoffAnimation(appearId, key, frame);\n if (startTime !== null) {\n valueTransition.startTime = startTime;\n isHandoff = true;\n }\n }\n }\n addValueToWillChange(visualElement, key);\n value.start(animateMotionValue(key, value, valueTarget, visualElement.shouldReduceMotion && positionalKeys.has(key)\n ? { type: false }\n : valueTransition, visualElement, isHandoff));\n const animation = value.animation;\n if (animation) {\n animations.push(animation);\n }\n }\n if (transitionEnd) {\n Promise.all(animations).then(() => {\n frame.update(() => {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n });\n }\n return animations;\n}\n\nexport { animateTarget };\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\n\nfunction animateVariant(visualElement, variant, options = {}) {\n const resolved = resolveVariant(visualElement, variant, options.type === \"exit\"\n ? visualElement.presenceContext?.custom\n : undefined);\n let { transition = visualElement.getDefaultTransition() || {} } = resolved || {};\n if (options.transitionOverride) {\n transition = options.transitionOverride;\n }\n /**\n * If we have a variant, create a callback that runs it as an animation.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getAnimation = resolved\n ? () => Promise.all(animateTarget(visualElement, resolved, options))\n : () => Promise.resolve();\n /**\n * If we have children, create a callback that runs all their animations.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size\n ? (forwardDelay = 0) => {\n const { delayChildren = 0, staggerChildren, staggerDirection, } = transition;\n return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);\n }\n : () => Promise.resolve();\n /**\n * If the transition explicitly defines a \"when\" option, we need to resolve either\n * this animation or all children animations before playing the other.\n */\n const { when } = transition;\n if (when) {\n const [first, last] = when === \"beforeChildren\"\n ? [getAnimation, getChildAnimations]\n : [getChildAnimations, getAnimation];\n return first().then(() => last());\n }\n else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n }\n}\nfunction animateChildren(visualElement, variant, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) {\n const animations = [];\n const maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;\n const generateStaggerDuration = staggerDirection === 1\n ? (i = 0) => i * staggerChildren\n : (i = 0) => maxStaggerDuration - i * staggerChildren;\n Array.from(visualElement.variantChildren)\n .sort(sortByTreeOrder)\n .forEach((child, i) => {\n child.notify(\"AnimationStart\", variant);\n animations.push(animateVariant(child, variant, {\n ...options,\n delay: delayChildren + generateStaggerDuration(i),\n }).then(() => child.notify(\"AnimationComplete\", variant)));\n });\n return Promise.all(animations);\n}\nfunction sortByTreeOrder(a, b) {\n return a.sortNodePosition(b);\n}\n\nexport { animateVariant, sortByTreeOrder };\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\nimport { animateVariant } from './visual-element-variant.mjs';\n\nfunction animateVisualElement(visualElement, definition, options = {}) {\n visualElement.notify(\"AnimationStart\", definition);\n let animation;\n if (Array.isArray(definition)) {\n const animations = definition.map((variant) => animateVariant(visualElement, variant, options));\n animation = Promise.all(animations);\n }\n else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options);\n }\n else {\n const resolvedDefinition = typeof definition === \"function\"\n ? resolveVariant(visualElement, definition, options.custom)\n : definition;\n animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options));\n }\n return animation.then(() => {\n visualElement.notify(\"AnimationComplete\", definition);\n });\n}\n\nexport { animateVisualElement };\n","function shallowCompare(next, prev) {\n if (!Array.isArray(prev))\n return false;\n const prevLength = prev.length;\n if (prevLength !== next.length)\n return false;\n for (let i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i])\n return false;\n }\n return true;\n}\n\nexport { shallowCompare };\n","import { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nconst numVariantProps = variantProps.length;\nfunction getVariantContext(visualElement) {\n if (!visualElement)\n return undefined;\n if (!visualElement.isControllingVariants) {\n const context = visualElement.parent\n ? getVariantContext(visualElement.parent) || {}\n : {};\n if (visualElement.props.initial !== undefined) {\n context.initial = visualElement.props.initial;\n }\n return context;\n }\n const context = {};\n for (let i = 0; i < numVariantProps; i++) {\n const name = variantProps[i];\n const prop = visualElement.props[name];\n if (isVariantLabel(prop) || prop === false) {\n context[name] = prop;\n }\n }\n return context;\n}\n\nexport { getVariantContext };\n","import { animateVisualElement } from '../../animation/interfaces/visual-element.mjs';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.mjs';\nimport { shallowCompare } from '../../utils/shallow-compare.mjs';\nimport { getVariantContext } from './get-variant-context.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { variantPriorityOrder } from './variant-props.mjs';\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse();\nconst numAnimationTypes = variantPriorityOrder.length;\nfunction animateList(visualElement) {\n return (animations) => Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));\n}\nfunction createAnimationState(visualElement) {\n let animate = animateList(visualElement);\n let state = createState();\n let isInitialRender = true;\n /**\n * This function will be used to reduce the animation definitions for\n * each active animation type into an object of resolved values for it.\n */\n const buildResolvedTypeValues = (type) => (acc, definition) => {\n const resolved = resolveVariant(visualElement, definition, type === \"exit\"\n ? visualElement.presenceContext?.custom\n : undefined);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n acc = { ...acc, ...target, ...transitionEnd };\n }\n return acc;\n };\n /**\n * This just allows us to inject mocked animation functions\n * @internal\n */\n function setAnimateFunction(makeAnimator) {\n animate = makeAnimator(visualElement);\n }\n /**\n * When we receive new props, we need to:\n * 1. Create a list of protected keys for each type. This is a directory of\n * value keys that are currently being \"handled\" by types of a higher priority\n * so that whenever an animation is played of a given type, these values are\n * protected from being animated.\n * 2. Determine if an animation type needs animating.\n * 3. Determine if any values have been removed from a type and figure out\n * what to animate those to.\n */\n function animateChanges(changedActiveType) {\n const { props } = visualElement;\n const context = getVariantContext(visualElement.parent) || {};\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n const animations = [];\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n const removedKeys = new Set();\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n let encounteredKeys = {};\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n let removedVariantIndex = Infinity;\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n for (let i = 0; i < numAnimationTypes; i++) {\n const type = reversePriorityOrder[i];\n const typeState = state[type];\n const prop = props[type] !== undefined\n ? props[type]\n : context[type];\n const propIsVariant = isVariantLabel(prop);\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n const activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false)\n removedVariantIndex = i;\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n *\n * TODO: Can probably change this to a !isControllingVariants check\n */\n let isInherited = prop === context[type] &&\n prop !== props[type] &&\n propIsVariant;\n /**\n *\n */\n if (isInherited &&\n isInitialRender &&\n visualElement.manuallyAnimateOnMount) {\n isInherited = false;\n }\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n typeState.protectedKeys = { ...encounteredKeys };\n // Check if we can skip analysing this prop early\n if (\n // If it isn't active and hasn't *just* been set as inactive\n (!typeState.isActive && activeDelta === null) ||\n // If we didn't and don't have any defined prop for this animation type\n (!prop && !typeState.prevProp) ||\n // Or if the prop doesn't define an animation\n isAnimationControls(prop) ||\n typeof prop === \"boolean\") {\n continue;\n }\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n let shouldAnimateType = variantDidChange ||\n // If we're making this variant active, we want to always make it active\n (type === changedActiveType &&\n typeState.isActive &&\n !isInherited &&\n propIsVariant) ||\n // If we removed a higher-priority variant (i is in reverse order)\n (i > removedVariantIndex && propIsVariant);\n let handledRemovedValues = false;\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n const definitionList = Array.isArray(prop) ? prop : [prop];\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * animateChanges calls to determine whether a value has changed.\n */\n let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {});\n if (activeDelta === false)\n resolvedValues = {};\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n const { prevResolvedValues = {} } = typeState;\n const allKeys = {\n ...prevResolvedValues,\n ...resolvedValues,\n };\n const markToAnimate = (key) => {\n shouldAnimateType = true;\n if (removedKeys.has(key)) {\n handledRemovedValues = true;\n removedKeys.delete(key);\n }\n typeState.needsAnimating[key] = true;\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = false;\n };\n for (const key in allKeys) {\n const next = resolvedValues[key];\n const prev = prevResolvedValues[key];\n // If we've already handled this we can just skip ahead\n if (encounteredKeys.hasOwnProperty(key))\n continue;\n /**\n * If the value has changed, we probably want to animate it.\n */\n let valueHasChanged = false;\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n valueHasChanged = !shallowCompare(next, prev);\n }\n else {\n valueHasChanged = next !== prev;\n }\n if (valueHasChanged) {\n if (next !== undefined && next !== null) {\n // If next is defined and doesn't equal prev, it needs animating\n markToAnimate(key);\n }\n else {\n // If it's undefined, it's been removed.\n removedKeys.add(key);\n }\n }\n else if (next !== undefined && removedKeys.has(key)) {\n /**\n * If next hasn't changed and it isn't undefined, we want to check if it's\n * been removed by a higher priority\n */\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we add it to the list of protected values\n * to ensure it doesn't get animated.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n /**\n * Update the typeState so next time animateChanges is called we can compare the\n * latest prop and resolvedValues to these.\n */\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n /**\n *\n */\n if (typeState.isActive) {\n encounteredKeys = { ...encounteredKeys, ...resolvedValues };\n }\n if (isInitialRender && visualElement.blockInitialAnimation) {\n shouldAnimateType = false;\n }\n /**\n * If this is an inherited prop we want to skip this animation\n * unless the inherited variants haven't changed on this render.\n */\n const willAnimateViaParent = isInherited && variantDidChange;\n const needsAnimating = !willAnimateViaParent || handledRemovedValues;\n if (shouldAnimateType && needsAnimating) {\n animations.push(...definitionList.map((animation) => ({\n animation: animation,\n options: { type },\n })));\n }\n }\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n if (removedKeys.size) {\n const fallbackAnimation = {};\n /**\n * If the initial prop contains a transition we can use that, otherwise\n * allow the animation function to use the visual element's default.\n */\n if (typeof props.initial !== \"boolean\") {\n const initialTransition = resolveVariant(visualElement, Array.isArray(props.initial)\n ? props.initial[0]\n : props.initial);\n if (initialTransition && initialTransition.transition) {\n fallbackAnimation.transition = initialTransition.transition;\n }\n }\n removedKeys.forEach((key) => {\n const fallbackTarget = visualElement.getBaseTarget(key);\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = true;\n // @ts-expect-error - @mattgperry to figure if we should do something here\n fallbackAnimation[key] = fallbackTarget ?? null;\n });\n animations.push({ animation: fallbackAnimation });\n }\n let shouldAnimate = Boolean(animations.length);\n if (isInitialRender &&\n (props.initial === false || props.initial === props.animate) &&\n !visualElement.manuallyAnimateOnMount) {\n shouldAnimate = false;\n }\n isInitialRender = false;\n return shouldAnimate ? animate(animations) : Promise.resolve();\n }\n /**\n * Change whether a certain animation type is active.\n */\n function setActive(type, isActive) {\n // If the active state hasn't changed, we can safely do nothing here\n if (state[type].isActive === isActive)\n return Promise.resolve();\n // Propagate active change to children\n visualElement.variantChildren?.forEach((child) => child.animationState?.setActive(type, isActive));\n state[type].isActive = isActive;\n const animations = animateChanges(type);\n for (const key in state) {\n state[key].protectedKeys = {};\n }\n return animations;\n }\n return {\n animateChanges,\n setActive,\n setAnimateFunction,\n getState: () => state,\n reset: () => {\n state = createState();\n isInitialRender = true;\n },\n };\n}\nfunction checkVariantsDidChange(prev, next) {\n if (typeof next === \"string\") {\n return next !== prev;\n }\n else if (Array.isArray(next)) {\n return !shallowCompare(next, prev);\n }\n return false;\n}\nfunction createTypeState(isActive = false) {\n return {\n isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n };\n}\nfunction createState() {\n return {\n animate: createTypeState(true),\n whileInView: createTypeState(),\n whileHover: createTypeState(),\n whileTap: createTypeState(),\n whileDrag: createTypeState(),\n whileFocus: createTypeState(),\n exit: createTypeState(),\n };\n}\n\nexport { checkVariantsDidChange, createAnimationState };\n","class Feature {\n constructor(node) {\n this.isMounted = false;\n this.node = node;\n }\n update() { }\n}\n\nexport { Feature };\n","import { isAnimationControls } from '../../../animation/utils/is-animation-controls.mjs';\nimport { createAnimationState } from '../../../render/utils/animation-state.mjs';\nimport { Feature } from '../Feature.mjs';\n\nclass AnimationFeature extends Feature {\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n constructor(node) {\n super(node);\n node.animationState || (node.animationState = createAnimationState(node));\n }\n updateAnimationControlsSubscription() {\n const { animate } = this.node.getProps();\n if (isAnimationControls(animate)) {\n this.unmountControls = animate.subscribe(this.node);\n }\n }\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n mount() {\n this.updateAnimationControlsSubscription();\n }\n update() {\n const { animate } = this.node.getProps();\n const { animate: prevAnimate } = this.node.prevProps || {};\n if (animate !== prevAnimate) {\n this.updateAnimationControlsSubscription();\n }\n }\n unmount() {\n this.node.animationState.reset();\n this.unmountControls?.();\n }\n}\n\nexport { AnimationFeature };\n","import { Feature } from '../Feature.mjs';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n }\n update() {\n if (!this.node.presenceContext)\n return;\n const { isPresent, onExitComplete } = this.node.presenceContext;\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n if (!this.node.animationState || isPresent === prevIsPresent) {\n return;\n }\n const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent);\n if (onExitComplete && !isPresent) {\n exitAnimation.then(() => {\n onExitComplete(this.id);\n });\n }\n }\n mount() {\n const { register, onExitComplete } = this.node.presenceContext || {};\n if (onExitComplete) {\n onExitComplete(this.id);\n }\n if (register) {\n this.unmount = register(this.id);\n }\n }\n unmount() { }\n}\n\nexport { ExitAnimationFeature };\n","import { AnimationFeature } from './animation/index.mjs';\nimport { ExitAnimationFeature } from './animation/exit.mjs';\n\nconst animations = {\n animation: {\n Feature: AnimationFeature,\n },\n exit: {\n Feature: ExitAnimationFeature,\n },\n};\n\nexport { animations };\n","function addDomEvent(target, eventName, handler, options = { passive: true }) {\n target.addEventListener(eventName, handler, options);\n return () => target.removeEventListener(eventName, handler);\n}\n\nexport { addDomEvent };\n","import { isPrimaryPointer } from 'motion-dom';\n\nfunction extractEventInfo(event) {\n return {\n point: {\n x: event.pageX,\n y: event.pageY,\n },\n };\n}\nconst addPointerInfo = (handler) => {\n return (event) => isPrimaryPointer(event) && handler(event, extractEventInfo(event));\n};\n\nexport { addPointerInfo, extractEventInfo };\n","import { addDomEvent } from './add-dom-event.mjs';\nimport { addPointerInfo } from './event-info.mjs';\n\nfunction addPointerEvent(target, eventName, handler, options) {\n return addDomEvent(target, eventName, addPointerInfo(handler), options);\n}\n\nexport { addPointerEvent };\n","/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nfunction convertBoundingBoxToBox({ top, left, right, bottom, }) {\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n };\n}\nfunction convertBoxToBoundingBox({ x, y }) {\n return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nfunction transformBoxPoints(point, transformPoint) {\n if (!transformPoint)\n return point;\n const topLeft = transformPoint({ x: point.left, y: point.top });\n const bottomRight = transformPoint({ x: point.right, y: point.bottom });\n return {\n top: topLeft.y,\n left: topLeft.x,\n bottom: bottomRight.y,\n right: bottomRight.x,\n };\n}\n\nexport { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };\n","import { mixNumber } from 'motion-dom';\n\nconst SCALE_PRECISION = 0.0001;\nconst SCALE_MIN = 1 - SCALE_PRECISION;\nconst SCALE_MAX = 1 + SCALE_PRECISION;\nconst TRANSLATE_PRECISION = 0.01;\nconst TRANSLATE_MIN = 0 - TRANSLATE_PRECISION;\nconst TRANSLATE_MAX = 0 + TRANSLATE_PRECISION;\nfunction calcLength(axis) {\n return axis.max - axis.min;\n}\nfunction isNear(value, target, maxDistance) {\n return Math.abs(value - target) <= maxDistance;\n}\nfunction calcAxisDelta(delta, source, target, origin = 0.5) {\n delta.origin = origin;\n delta.originPoint = mixNumber(source.min, source.max, delta.origin);\n delta.scale = calcLength(target) / calcLength(source);\n delta.translate =\n mixNumber(target.min, target.max, delta.origin) - delta.originPoint;\n if ((delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX) ||\n isNaN(delta.scale)) {\n delta.scale = 1.0;\n }\n if ((delta.translate >= TRANSLATE_MIN &&\n delta.translate <= TRANSLATE_MAX) ||\n isNaN(delta.translate)) {\n delta.translate = 0.0;\n }\n}\nfunction calcBoxDelta(delta, source, target, origin) {\n calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined);\n calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined);\n}\nfunction calcRelativeAxis(target, relative, parent) {\n target.min = parent.min + relative.min;\n target.max = target.min + calcLength(relative);\n}\nfunction calcRelativeBox(target, relative, parent) {\n calcRelativeAxis(target.x, relative.x, parent.x);\n calcRelativeAxis(target.y, relative.y, parent.y);\n}\nfunction calcRelativeAxisPosition(target, layout, parent) {\n target.min = layout.min - parent.min;\n target.max = target.min + calcLength(layout);\n}\nfunction calcRelativePosition(target, layout, parent) {\n calcRelativeAxisPosition(target.x, layout.x, parent.x);\n calcRelativeAxisPosition(target.y, layout.y, parent.y);\n}\n\nexport { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };\n","const createAxisDelta = () => ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0,\n});\nconst createDelta = () => ({\n x: createAxisDelta(),\n y: createAxisDelta(),\n});\nconst createAxis = () => ({ min: 0, max: 0 });\nconst createBox = () => ({\n x: createAxis(),\n y: createAxis(),\n});\n\nexport { createAxis, createAxisDelta, createBox, createDelta };\n","function eachAxis(callback) {\n return [callback(\"x\"), callback(\"y\")];\n}\n\nexport { eachAxis };\n","function isIdentityScale(scale) {\n return scale === undefined || scale === 1;\n}\nfunction hasScale({ scale, scaleX, scaleY }) {\n return (!isIdentityScale(scale) ||\n !isIdentityScale(scaleX) ||\n !isIdentityScale(scaleY));\n}\nfunction hasTransform(values) {\n return (hasScale(values) ||\n has2DTranslate(values) ||\n values.z ||\n values.rotate ||\n values.rotateX ||\n values.rotateY ||\n values.skewX ||\n values.skewY);\n}\nfunction has2DTranslate(values) {\n return is2DTranslate(values.x) || is2DTranslate(values.y);\n}\nfunction is2DTranslate(value) {\n return value && value !== \"0%\";\n}\n\nexport { has2DTranslate, hasScale, hasTransform };\n","import { mixNumber } from 'motion-dom';\nimport { hasTransform } from '../utils/has-transform.mjs';\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nfunction scalePoint(point, scale, originPoint) {\n const distanceFromOrigin = point - originPoint;\n const scaled = scale * distanceFromOrigin;\n return originPoint + scaled;\n}\n/**\n * Applies a translate/scale delta to a point\n */\nfunction applyPointDelta(point, translate, scale, originPoint, boxScale) {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint);\n }\n return scalePoint(point, scale, originPoint) + translate;\n}\n/**\n * Applies a translate/scale delta to an axis\n */\nfunction applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {\n axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Applies a translate/scale delta to a box\n */\nfunction applyBoxDelta(box, { x, y }) {\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);\n}\nconst TREE_SCALE_SNAP_MIN = 0.999999999999;\nconst TREE_SCALE_SNAP_MAX = 1.0000000000001;\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nfunction applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {\n const treeLength = treePath.length;\n if (!treeLength)\n return;\n // Reset the treeScale\n treeScale.x = treeScale.y = 1;\n let node;\n let delta;\n for (let i = 0; i < treeLength; i++) {\n node = treePath[i];\n delta = node.projectionDelta;\n /**\n * TODO: Prefer to remove this, but currently we have motion components with\n * display: contents in Framer.\n */\n const { visualElement } = node.options;\n if (visualElement &&\n visualElement.props.style &&\n visualElement.props.style.display === \"contents\") {\n continue;\n }\n if (isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(box, {\n x: -node.scroll.offset.x,\n y: -node.scroll.offset.y,\n });\n }\n if (delta) {\n // Incoporate each ancestor's scale into a culmulative treeScale for this component\n treeScale.x *= delta.x.scale;\n treeScale.y *= delta.y.scale;\n // Apply each ancestor's calculated delta into this component's recorded layout box\n applyBoxDelta(box, delta);\n }\n if (isSharedTransition && hasTransform(node.latestValues)) {\n transformBox(box, node.latestValues);\n }\n }\n /**\n * Snap tree scale back to 1 if it's within a non-perceivable threshold.\n * This will help reduce useless scales getting rendered.\n */\n if (treeScale.x < TREE_SCALE_SNAP_MAX &&\n treeScale.x > TREE_SCALE_SNAP_MIN) {\n treeScale.x = 1.0;\n }\n if (treeScale.y < TREE_SCALE_SNAP_MAX &&\n treeScale.y > TREE_SCALE_SNAP_MIN) {\n treeScale.y = 1.0;\n }\n}\nfunction translateAxis(axis, distance) {\n axis.min = axis.min + distance;\n axis.max = axis.max + distance;\n}\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nfunction transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {\n const originPoint = mixNumber(axis.min, axis.max, axisOrigin);\n // Apply the axis delta to the final axis\n applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale);\n}\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nfunction transformBox(box, transform) {\n transformAxis(box.x, transform.x, transform.scaleX, transform.scale, transform.originX);\n transformAxis(box.y, transform.y, transform.scaleY, transform.scale, transform.originY);\n}\n\nexport { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };\n","import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs';\nimport { translateAxis } from '../geometry/delta-apply.mjs';\n\nfunction measureViewportBox(instance, transformPoint) {\n return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));\n}\nfunction measurePageBox(element, rootProjectionNode, transformPagePoint) {\n const viewportBox = measureViewportBox(element, transformPagePoint);\n const { scroll } = rootProjectionNode;\n if (scroll) {\n translateAxis(viewportBox.x, scroll.offset.x);\n translateAxis(viewportBox.y, scroll.offset.y);\n }\n return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n","// Fixes https://github.com/motiondivision/motion/issues/2270\nconst getContextWindow = ({ current }) => {\n return current ? current.ownerDocument.defaultView : null;\n};\n\nexport { getContextWindow };\n","const distance = (a, b) => Math.abs(a - b);\nfunction distance2D(a, b) {\n // Multi-dimensional\n const xDelta = distance(a.x, b.x);\n const yDelta = distance(a.y, b.y);\n return Math.sqrt(xDelta ** 2 + yDelta ** 2);\n}\n\nexport { distance, distance2D };\n","import { frame, isPrimaryPointer, cancelFrame, frameData } from 'motion-dom';\nimport { pipe, secondsToMilliseconds, millisecondsToSeconds } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { distance2D } from '../../utils/distance.mjs';\n\n/**\n * @internal\n */\nclass PanSession {\n constructor(event, handlers, { transformPagePoint, contextWindow, dragSnapToOrigin = false, } = {}) {\n /**\n * @internal\n */\n this.startEvent = null;\n /**\n * @internal\n */\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n this.lastMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n /**\n * @internal\n */\n this.contextWindow = window;\n this.updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const info = getPanInfo(this.lastMoveEventInfo, this.history);\n const isPanStarted = this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursoe.\n const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= 3;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n const { point } = info;\n const { timestamp } = frameData;\n this.history.push({ ...point, timestamp });\n const { onStart, onMove } = this.handlers;\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info);\n this.startEvent = this.lastMoveEvent;\n }\n onMove && onMove(this.lastMoveEvent, info);\n };\n this.handlePointerMove = (event, info) => {\n this.lastMoveEvent = event;\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true);\n };\n this.handlePointerUp = (event, info) => {\n this.end();\n const { onEnd, onSessionEnd, resumeAnimation } = this.handlers;\n if (this.dragSnapToOrigin)\n resumeAnimation && resumeAnimation();\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const panInfo = getPanInfo(event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : transformPoint(info, this.transformPagePoint), this.history);\n if (this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (!isPrimaryPointer(event))\n return;\n this.dragSnapToOrigin = dragSnapToOrigin;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n this.contextWindow = contextWindow || window;\n const info = extractEventInfo(event);\n const initialInfo = transformPoint(info, this.transformPagePoint);\n const { point } = initialInfo;\n const { timestamp } = frameData;\n this.history = [{ ...point, timestamp }];\n const { onSessionStart } = handlers;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n this.removeListeners = pipe(addPointerEvent(this.contextWindow, \"pointermove\", this.handlePointerMove), addPointerEvent(this.contextWindow, \"pointerup\", this.handlePointerUp), addPointerEvent(this.contextWindow, \"pointercancel\", this.handlePointerUp));\n }\n updateHandlers(handlers) {\n this.handlers = handlers;\n }\n end() {\n this.removeListeners && this.removeListeners();\n cancelFrame(this.updatePoint);\n }\n}\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo({ point }, history) {\n return {\n point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n let i = history.length - 1;\n let timestampedPoint = null;\n const lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\nexport { PanSession };\n","import { mixNumber } from 'motion-dom';\nimport { progress, clamp } from 'motion-utils';\nimport { calcLength } from '../../../projection/geometry/delta-calc.mjs';\n\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\nfunction applyConstraints(point, { min, max }, elastic) {\n if (min !== undefined && point < min) {\n // If we have a min point defined, and this is outside of that, constrain\n point = elastic\n ? mixNumber(min, point, elastic.min)\n : Math.max(point, min);\n }\n else if (max !== undefined && point > max) {\n // If we have a max point defined, and this is outside of that, constrain\n point = elastic\n ? mixNumber(max, point, elastic.max)\n : Math.min(point, max);\n }\n return point;\n}\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\nfunction calcRelativeAxisConstraints(axis, min, max) {\n return {\n min: min !== undefined ? axis.min + min : undefined,\n max: max !== undefined\n ? axis.max + max - (axis.max - axis.min)\n : undefined,\n };\n}\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\nfunction calcRelativeConstraints(layoutBox, { top, left, bottom, right }) {\n return {\n x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),\n };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\nfunction calcViewportAxisConstraints(layoutAxis, constraintsAxis) {\n let min = constraintsAxis.min - layoutAxis.min;\n let max = constraintsAxis.max - layoutAxis.max;\n // If the constraints axis is actually smaller than the layout axis then we can\n // flip the constraints\n if (constraintsAxis.max - constraintsAxis.min <\n layoutAxis.max - layoutAxis.min) {\n [min, max] = [max, min];\n }\n return { min, max };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\nfunction calcViewportConstraints(layoutBox, constraintsBox) {\n return {\n x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),\n };\n}\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\nfunction calcOrigin(source, target) {\n let origin = 0.5;\n const sourceLength = calcLength(source);\n const targetLength = calcLength(target);\n if (targetLength > sourceLength) {\n origin = progress(target.min, target.max - sourceLength, source.min);\n }\n else if (sourceLength > targetLength) {\n origin = progress(source.min, source.max - targetLength, target.min);\n }\n return clamp(0, 1, origin);\n}\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\nfunction rebaseAxisConstraints(layout, constraints) {\n const relativeConstraints = {};\n if (constraints.min !== undefined) {\n relativeConstraints.min = constraints.min - layout.min;\n }\n if (constraints.max !== undefined) {\n relativeConstraints.max = constraints.max - layout.min;\n }\n return relativeConstraints;\n}\nconst defaultElastic = 0.35;\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nfunction resolveDragElastic(dragElastic = defaultElastic) {\n if (dragElastic === false) {\n dragElastic = 0;\n }\n else if (dragElastic === true) {\n dragElastic = defaultElastic;\n }\n return {\n x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n y: resolveAxisElastic(dragElastic, \"top\", \"bottom\"),\n };\n}\nfunction resolveAxisElastic(dragElastic, minLabel, maxLabel) {\n return {\n min: resolvePointElastic(dragElastic, minLabel),\n max: resolvePointElastic(dragElastic, maxLabel),\n };\n}\nfunction resolvePointElastic(dragElastic, label) {\n return typeof dragElastic === \"number\"\n ? dragElastic\n : dragElastic[label] || 0;\n}\n\nexport { applyConstraints, calcOrigin, calcRelativeAxisConstraints, calcRelativeConstraints, calcViewportAxisConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveAxisElastic, resolveDragElastic, resolvePointElastic };\n","import { frame, mixNumber, setDragLock, percent } from 'motion-dom';\nimport { invariant } from 'motion-utils';\nimport { animateMotionValue } from '../../animation/interfaces/motion-value.mjs';\nimport { addDomEvent } from '../../events/add-dom-event.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../projection/geometry/conversion.mjs';\nimport { calcLength } from '../../projection/geometry/delta-calc.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { eachAxis } from '../../projection/utils/each-axis.mjs';\nimport { measurePageBox } from '../../projection/utils/measure.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { addValueToWillChange } from '../../value/use-will-change/add-will-change.mjs';\nimport { PanSession } from '../pan/PanSession.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\n\nconst elementDragControls = new WeakMap();\n/**\n *\n */\n// let latestPointerEvent: PointerEvent\nclass VisualElementDragControls {\n constructor(visualElement) {\n this.openDragLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n const { dragSnapToOrigin } = this.getProps();\n // Stop or pause any animations on both axis values immediately. This allows the user to throw and catch\n // the component.\n dragSnapToOrigin ? this.pauseAnimation() : this.stopAnimation();\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event).point);\n }\n };\n const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\n if (drag && !dragPropagation) {\n if (this.openDragLock)\n this.openDragLock();\n this.openDragLock = setDragLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!this.openDragLock)\n return;\n }\n this.isDragging = true;\n this.currentDirection = null;\n this.resolveConstraints();\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true;\n this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.postRender(() => onDragStart(event, info));\n }\n addValueToWillChange(this.visualElement, \"transform\");\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n // latestPointerEvent = event\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openDragLock)\n return;\n const { offset } = info;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n onDrag && onDrag(event, info);\n };\n const onSessionEnd = (event, info) => this.stop(event, info);\n const resumeAnimation = () => eachAxis((axis) => this.getAnimationState(axis) === \"paused\" &&\n this.getAxisMotionValue(axis).animation?.play());\n const { dragSnapToOrigin } = this.getProps();\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation,\n }, {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n contextWindow: getContextWindow(this.visualElement),\n });\n }\n stop(event, info) {\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging)\n return;\n const { velocity } = info;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(event, info));\n }\n }\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openDragLock) {\n this.openDragLock();\n this.openDragLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n const { dragConstraints, dragElastic } = this.getProps();\n const layout = this.visualElement.projection &&\n !this.visualElement.projection.layout\n ? this.visualElement.projection.measure(false)\n : this.visualElement.projection?.layout;\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative.\n */\n if (prevConstraints !== this.constraints &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.constraints !== false &&\n this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\");\n const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\n if (dragSnapToOrigin)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n addValueToWillChange(this.visualElement, axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n pauseAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).animation?.pause());\n }\n getAnimationState(axis) {\n return this.getAxisMotionValue(axis).animation?.state;\n }\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = `_drag${axis.toUpperCase()}`;\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, (props.initial\n ? props.initial[axis]\n : undefined) || 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n axisValue.set(point[axis] - mixNumber(min, max, 0.5));\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mixNumber(min, max, boxProgress[axis]));\n });\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n drag && dragListener && this.start(event);\n });\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints) && dragConstraints.current) {\n this.constraints = this.resolveRefConstraints();\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n frame.read(measureDragConstraints);\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\n}\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n","import { Feature } from '../../motion/features/Feature.mjs';\nimport { noop } from 'motion-utils';\nimport { VisualElementDragControls } from './VisualElementDragControls.mjs';\n\nclass DragGesture extends Feature {\n constructor(node) {\n super(node);\n this.removeGroupControls = noop;\n this.removeListeners = noop;\n this.controls = new VisualElementDragControls(node);\n }\n mount() {\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n const { dragControls } = this.node.getProps();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n this.removeListeners = this.controls.addListeners() || noop;\n }\n unmount() {\n this.removeGroupControls();\n this.removeListeners();\n }\n}\n\nexport { DragGesture };\n","import { frame } from 'motion-dom';\nimport { noop } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { Feature } from '../../motion/features/Feature.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { PanSession } from './PanSession.mjs';\n\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.postRender(() => handler(event, info));\n }\n};\nclass PanGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), {\n transformPagePoint: this.node.getTransformPagePoint(),\n contextWindow: getContextWindow(this.node),\n });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: onPan,\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.postRender(() => onPanEnd(event, info));\n }\n },\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session && this.session.end();\n }\n}\n\nexport { PanGesture };\n","/**\n * This should only ever be modified on the client otherwise it'll\n * persist through server requests. If we need instanced states we\n * could lazy-init via root.\n */\nconst globalProjectionState = {\n /**\n * Global flag as to whether the tree has animated since the last time\n * we resized the window\n */\n hasAnimatedSinceResize: true,\n /**\n * We set this to true once, on the first update. Any nodes added to the tree beyond that\n * update will be given a `data-projection-id` attribute.\n */\n hasEverUpdated: false,\n};\n\nexport { globalProjectionState };\n","import { px } from 'motion-dom';\n\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nconst correctBorderRadius = {\n correct: (latest, node) => {\n if (!node.target)\n return latest;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n }\n else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n const x = pixelsToPercent(latest, node.target.x);\n const y = pixelsToPercent(latest, node.target.y);\n return `${x}% ${y}%`;\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n","import { complex, mixNumber } from 'motion-dom';\n\nconst correctBoxShadow = {\n correct: (latest, { treeScale, projectionDelta }) => {\n const original = latest;\n const shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n const template = complex.createTransformer(latest);\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n const xScale = projectionDelta.x.scale * treeScale.x;\n const yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n const averageScale = mixNumber(xScale, yScale, 0.5);\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n return template(shadow);\n },\n};\n\nexport { correctBoxShadow };\n","\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { frame, microtask } from 'motion-dom';\nimport { useContext, Component } from 'react';\nimport { usePresence } from '../../../components/AnimatePresence/use-presence.mjs';\nimport { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.mjs';\nimport { globalProjectionState } from '../../../projection/node/state.mjs';\nimport { correctBorderRadius } from '../../../projection/styles/scale-border-radius.mjs';\nimport { correctBoxShadow } from '../../../projection/styles/scale-box-shadow.mjs';\nimport { addScaleCorrector } from '../../../projection/styles/scale-correction.mjs';\n\nclass MeasureLayoutWithContext extends Component {\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n componentDidMount() {\n const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;\n const { projection } = visualElement;\n addScaleCorrector(defaultScaleCorrectors);\n if (projection) {\n if (layoutGroup.group)\n layoutGroup.group.add(projection);\n if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n switchLayoutGroup.register(projection);\n }\n projection.root.didUpdate();\n projection.addEventListener(\"animationComplete\", () => {\n this.safeToRemove();\n });\n projection.setOptions({\n ...projection.options,\n onExitComplete: () => this.safeToRemove(),\n });\n }\n globalProjectionState.hasEverUpdated = true;\n }\n getSnapshotBeforeUpdate(prevProps) {\n const { layoutDependency, visualElement, drag, isPresent } = this.props;\n const { projection } = visualElement;\n if (!projection)\n return null;\n /**\n * TODO: We use this data in relegate to determine whether to\n * promote a previous element. There's no guarantee its presence data\n * will have updated by this point - if a bug like this arises it will\n * have to be that we markForRelegation and then find a new lead some other way,\n * perhaps in didUpdate\n */\n projection.isPresent = isPresent;\n if (drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined ||\n prevProps.isPresent !== isPresent) {\n projection.willUpdate();\n }\n else {\n this.safeToRemove();\n }\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote();\n }\n else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n frame.postRender(() => {\n const stack = projection.getStack();\n if (!stack || !stack.members.length) {\n this.safeToRemove();\n }\n });\n }\n }\n return null;\n }\n componentDidUpdate() {\n const { projection } = this.props.visualElement;\n if (projection) {\n projection.root.didUpdate();\n microtask.postRender(() => {\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove();\n }\n });\n }\n }\n componentWillUnmount() {\n const { visualElement, layoutGroup, switchLayoutGroup: promoteContext, } = this.props;\n const { projection } = visualElement;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n if (layoutGroup && layoutGroup.group)\n layoutGroup.group.remove(projection);\n if (promoteContext && promoteContext.deregister)\n promoteContext.deregister(projection);\n }\n }\n safeToRemove() {\n const { safeToRemove } = this.props;\n safeToRemove && safeToRemove();\n }\n render() {\n return null;\n }\n}\nfunction MeasureLayout(props) {\n const [isPresent, safeToRemove] = usePresence();\n const layoutGroup = useContext(LayoutGroupContext);\n return (jsx(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove }));\n}\nconst defaultScaleCorrectors = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ],\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\n\nexport { MeasureLayout };\n","import { isMotionValue, motionValue } from 'motion-dom';\nimport { animateMotionValue } from '../interfaces/motion-value.mjs';\n\nfunction animateSingleValue(value, keyframes, options) {\n const motionValue$1 = isMotionValue(value) ? value : motionValue(value);\n motionValue$1.start(animateMotionValue(\"\", motionValue$1, keyframes, options));\n return motionValue$1.animation;\n}\n\nexport { animateSingleValue };\n","const compareByDepth = (a, b) => a.depth - b.depth;\n\nexport { compareByDepth };\n","import { addUniqueItem, removeItem } from 'motion-utils';\nimport { compareByDepth } from './compare-by-depth.mjs';\n\nclass FlatTree {\n constructor() {\n this.children = [];\n this.isDirty = false;\n }\n add(child) {\n addUniqueItem(this.children, child);\n this.isDirty = true;\n }\n remove(child) {\n removeItem(this.children, child);\n this.isDirty = true;\n }\n forEach(callback) {\n this.isDirty && this.children.sort(compareByDepth);\n this.isDirty = false;\n this.children.forEach(callback);\n }\n}\n\nexport { FlatTree };\n","import { time, frame, cancelFrame } from 'motion-dom';\nimport { secondsToMilliseconds } from 'motion-utils';\n\n/**\n * Timeout defined in ms\n */\nfunction delay(callback, timeout) {\n const start = time.now();\n const checkElapsed = ({ timestamp }) => {\n const elapsed = timestamp - start;\n if (elapsed >= timeout) {\n cancelFrame(checkElapsed);\n callback(elapsed - timeout);\n }\n };\n frame.setup(checkElapsed, true);\n return () => cancelFrame(checkElapsed);\n}\nfunction delayInSeconds(callback, timeout) {\n return delay(callback, secondsToMilliseconds(timeout));\n}\n\nexport { delay, delayInSeconds };\n","import { mixNumber, percent, px } from 'motion-dom';\nimport { progress, circOut, noop } from 'motion-utils';\n\nconst borders = [\"TopLeft\", \"TopRight\", \"BottomLeft\", \"BottomRight\"];\nconst numBorders = borders.length;\nconst asNumber = (value) => typeof value === \"string\" ? parseFloat(value) : value;\nconst isPx = (value) => typeof value === \"number\" || px.test(value);\nfunction mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {\n if (shouldCrossfadeOpacity) {\n target.opacity = mixNumber(0, lead.opacity ?? 1, easeCrossfadeIn(progress));\n target.opacityExit = mixNumber(follow.opacity ?? 1, 0, easeCrossfadeOut(progress));\n }\n else if (isOnlyMember) {\n target.opacity = mixNumber(follow.opacity ?? 1, lead.opacity ?? 1, progress);\n }\n /**\n * Mix border radius\n */\n for (let i = 0; i < numBorders; i++) {\n const borderLabel = `border${borders[i]}Radius`;\n let followRadius = getRadius(follow, borderLabel);\n let leadRadius = getRadius(lead, borderLabel);\n if (followRadius === undefined && leadRadius === undefined)\n continue;\n followRadius || (followRadius = 0);\n leadRadius || (leadRadius = 0);\n const canMix = followRadius === 0 ||\n leadRadius === 0 ||\n isPx(followRadius) === isPx(leadRadius);\n if (canMix) {\n target[borderLabel] = Math.max(mixNumber(asNumber(followRadius), asNumber(leadRadius), progress), 0);\n if (percent.test(leadRadius) || percent.test(followRadius)) {\n target[borderLabel] += \"%\";\n }\n }\n else {\n target[borderLabel] = leadRadius;\n }\n }\n /**\n * Mix rotation\n */\n if (follow.rotate || lead.rotate) {\n target.rotate = mixNumber(follow.rotate || 0, lead.rotate || 0, progress);\n }\n}\nfunction getRadius(values, radiusName) {\n return values[radiusName] !== undefined\n ? values[radiusName]\n : values.borderRadius;\n}\n// /**\n// * We only want to mix the background color if there's a follow element\n// * that we're not crossfading opacity between. For instance with switch\n// * AnimateSharedLayout animations, this helps the illusion of a continuous\n// * element being animated but also cuts down on the number of paints triggered\n// * for elements where opacity is doing that work for us.\n// */\n// if (\n// !hasFollowElement &&\n// latestLeadValues.backgroundColor &&\n// latestFollowValues.backgroundColor\n// ) {\n// /**\n// * This isn't ideal performance-wise as mixColor is creating a new function every frame.\n// * We could probably create a mixer that runs at the start of the animation but\n// * the idea behind the crossfader is that it runs dynamically between two potentially\n// * changing targets (ie opacity or borderRadius may be animating independently via variants)\n// */\n// leadState.backgroundColor = followState.backgroundColor = mixColor(\n// latestFollowValues.backgroundColor as string,\n// latestLeadValues.backgroundColor as string\n// )(p)\n// }\nconst easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, circOut);\nconst easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, noop);\nfunction compress(min, max, easing) {\n return (p) => {\n // Could replace ifs with clamp\n if (p < min)\n return 0;\n if (p > max)\n return 1;\n return easing(progress(min, max, p));\n };\n}\n\nexport { mixValues };\n","/**\n * Reset an axis to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyAxisInto(axis, originAxis) {\n axis.min = originAxis.min;\n axis.max = originAxis.max;\n}\n/**\n * Reset a box to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyBoxInto(box, originBox) {\n copyAxisInto(box.x, originBox.x);\n copyAxisInto(box.y, originBox.y);\n}\n/**\n * Reset a delta to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyAxisDeltaInto(delta, originDelta) {\n delta.translate = originDelta.translate;\n delta.scale = originDelta.scale;\n delta.originPoint = originDelta.originPoint;\n delta.origin = originDelta.origin;\n}\n\nexport { copyAxisDeltaInto, copyAxisInto, copyBoxInto };\n","import { percent, mixNumber } from 'motion-dom';\nimport { scalePoint } from './delta-apply.mjs';\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n point -= translate;\n point = scalePoint(point, 1 / scale, originPoint);\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint);\n }\n return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nfunction removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n const relativeProgress = mixNumber(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\")\n return;\n let originPoint = mixNumber(originAxis.min, originAxis.max, origin);\n if (axis === originAxis)\n originPoint -= translate;\n axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);\n removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);\n}\n\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };\n","import { calcLength } from './delta-calc.mjs';\n\nfunction isAxisDeltaZero(delta) {\n return delta.translate === 0 && delta.scale === 1;\n}\nfunction isDeltaZero(delta) {\n return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);\n}\nfunction axisEquals(a, b) {\n return a.min === b.min && a.max === b.max;\n}\nfunction boxEquals(a, b) {\n return axisEquals(a.x, b.x) && axisEquals(a.y, b.y);\n}\nfunction axisEqualsRounded(a, b) {\n return (Math.round(a.min) === Math.round(b.min) &&\n Math.round(a.max) === Math.round(b.max));\n}\nfunction boxEqualsRounded(a, b) {\n return axisEqualsRounded(a.x, b.x) && axisEqualsRounded(a.y, b.y);\n}\nfunction aspectRatio(box) {\n return calcLength(box.x) / calcLength(box.y);\n}\nfunction axisDeltaEquals(a, b) {\n return (a.translate === b.translate &&\n a.scale === b.scale &&\n a.originPoint === b.originPoint);\n}\n\nexport { aspectRatio, axisDeltaEquals, axisEquals, axisEqualsRounded, boxEquals, boxEqualsRounded, isDeltaZero };\n","import { addUniqueItem, removeItem } from 'motion-utils';\n\nclass NodeStack {\n constructor() {\n this.members = [];\n }\n add(node) {\n addUniqueItem(this.members, node);\n node.scheduleRender();\n }\n remove(node) {\n removeItem(this.members, node);\n if (node === this.prevLead) {\n this.prevLead = undefined;\n }\n if (node === this.lead) {\n const prevLead = this.members[this.members.length - 1];\n if (prevLead) {\n this.promote(prevLead);\n }\n }\n }\n relegate(node) {\n const indexOfNode = this.members.findIndex((member) => node === member);\n if (indexOfNode === 0)\n return false;\n /**\n * Find the next projection node that is present\n */\n let prevLead;\n for (let i = indexOfNode; i >= 0; i--) {\n const member = this.members[i];\n if (member.isPresent !== false) {\n prevLead = member;\n break;\n }\n }\n if (prevLead) {\n this.promote(prevLead);\n return true;\n }\n else {\n return false;\n }\n }\n promote(node, preserveFollowOpacity) {\n const prevLead = this.lead;\n if (node === prevLead)\n return;\n this.prevLead = prevLead;\n this.lead = node;\n node.show();\n if (prevLead) {\n prevLead.instance && prevLead.scheduleRender();\n node.scheduleRender();\n node.resumeFrom = prevLead;\n if (preserveFollowOpacity) {\n node.resumeFrom.preserveOpacity = true;\n }\n if (prevLead.snapshot) {\n node.snapshot = prevLead.snapshot;\n node.snapshot.latestValues =\n prevLead.animationValues || prevLead.latestValues;\n }\n if (node.root && node.root.isUpdating) {\n node.isLayoutDirty = true;\n }\n const { crossfade } = node.options;\n if (crossfade === false) {\n prevLead.hide();\n }\n /**\n * TODO:\n * - Test border radius when previous node was deleted\n * - boxShadow mixing\n * - Shared between element A in scrolled container and element B (scroll stays the same or changes)\n * - Shared between element A in transformed container and element B (transform stays the same or changes)\n * - Shared between element A in scrolled page and element B (scroll stays the same or changes)\n * ---\n * - Crossfade opacity of root nodes\n * - layoutId changes after animation\n * - layoutId changes mid animation\n */\n }\n }\n exitAnimationComplete() {\n this.members.forEach((node) => {\n const { options, resumingFrom } = node;\n options.onExitComplete && options.onExitComplete();\n if (resumingFrom) {\n resumingFrom.options.onExitComplete &&\n resumingFrom.options.onExitComplete();\n }\n });\n }\n scheduleRender() {\n this.members.forEach((node) => {\n node.instance && node.scheduleRender(false);\n });\n }\n /**\n * Clear any leads that have been removed this render to prevent them from being\n * used in future animations and to prevent memory leaks\n */\n removeLeadSnapshot() {\n if (this.lead && this.lead.snapshot) {\n this.lead.snapshot = undefined;\n }\n }\n}\n\nexport { NodeStack };\n","function buildProjectionTransform(delta, treeScale, latestTransform) {\n let transform = \"\";\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n const xTranslate = delta.x.translate / treeScale.x;\n const yTranslate = delta.y.translate / treeScale.y;\n const zTranslate = latestTransform?.z || 0;\n if (xTranslate || yTranslate || zTranslate) {\n transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `;\n }\n /**\n * Apply scale correction for the tree transform.\n * This will apply scale to the screen-orientated axes.\n */\n if (treeScale.x !== 1 || treeScale.y !== 1) {\n transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;\n }\n if (latestTransform) {\n const { transformPerspective, rotate, rotateX, rotateY, skewX, skewY } = latestTransform;\n if (transformPerspective)\n transform = `perspective(${transformPerspective}px) ${transform}`;\n if (rotate)\n transform += `rotate(${rotate}deg) `;\n if (rotateX)\n transform += `rotateX(${rotateX}deg) `;\n if (rotateY)\n transform += `rotateY(${rotateY}deg) `;\n if (skewX)\n transform += `skewX(${skewX}deg) `;\n if (skewY)\n transform += `skewY(${skewY}deg) `;\n }\n /**\n * Apply scale to match the size of the element to the size we want it.\n * This will apply scale to the element-orientated axes.\n */\n const elementScaleX = delta.x.scale * treeScale.x;\n const elementScaleY = delta.y.scale * treeScale.y;\n if (elementScaleX !== 1 || elementScaleY !== 1) {\n transform += `scale(${elementScaleX}, ${elementScaleY})`;\n }\n return transform || \"none\";\n}\n\nexport { buildProjectionTransform };\n","import { statsBuffer, isSVGElement, isSVGSVGElement, getValueTransition, cancelFrame, time, frameData, frameSteps, microtask, frame, activeAnimations, motionValue, mixNumber } from 'motion-dom';\nimport { SubscriptionManager, clamp, noop } from 'motion-utils';\nimport { animateSingleValue } from '../../animation/animate/single-value.mjs';\nimport { getOptimisedAppearId } from '../../animation/optimized-appear/get-appear-id.mjs';\nimport { FlatTree } from '../../render/utils/flat-tree.mjs';\nimport { delay } from '../../utils/delay.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { mixValues } from '../animation/mix-values.mjs';\nimport { copyBoxInto, copyAxisDeltaInto } from '../geometry/copy.mjs';\nimport { translateAxis, transformBox, applyBoxDelta, applyTreeDeltas } from '../geometry/delta-apply.mjs';\nimport { calcLength, calcRelativePosition, calcRelativeBox, calcBoxDelta, isNear } from '../geometry/delta-calc.mjs';\nimport { removeBoxTransforms } from '../geometry/delta-remove.mjs';\nimport { createBox, createDelta } from '../geometry/models.mjs';\nimport { boxEqualsRounded, isDeltaZero, axisDeltaEquals, aspectRatio, boxEquals } from '../geometry/utils.mjs';\nimport { NodeStack } from '../shared/stack.mjs';\nimport { scaleCorrectors } from '../styles/scale-correction.mjs';\nimport { buildProjectionTransform } from '../styles/transform.mjs';\nimport { eachAxis } from '../utils/each-axis.mjs';\nimport { hasTransform, hasScale, has2DTranslate } from '../utils/has-transform.mjs';\nimport { globalProjectionState } from './state.mjs';\n\nconst metrics = {\n nodes: 0,\n calculatedTargetDeltas: 0,\n calculatedProjections: 0,\n};\nconst transformAxes = [\"\", \"X\", \"Y\", \"Z\"];\nconst hiddenVisibility = { visibility: \"hidden\" };\n/**\n * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1\n * which has a noticeable difference in spring animations\n */\nconst animationTarget = 1000;\nlet id = 0;\nfunction resetDistortingTransform(key, visualElement, values, sharedAnimationValues) {\n const { latestValues } = visualElement;\n // Record the distorting transform and then temporarily set it to 0\n if (latestValues[key]) {\n values[key] = latestValues[key];\n visualElement.setStaticValue(key, 0);\n if (sharedAnimationValues) {\n sharedAnimationValues[key] = 0;\n }\n }\n}\nfunction cancelTreeOptimisedTransformAnimations(projectionNode) {\n projectionNode.hasCheckedOptimisedAppear = true;\n if (projectionNode.root === projectionNode)\n return;\n const { visualElement } = projectionNode.options;\n if (!visualElement)\n return;\n const appearId = getOptimisedAppearId(visualElement);\n if (window.MotionHasOptimisedAnimation(appearId, \"transform\")) {\n const { layout, layoutId } = projectionNode.options;\n window.MotionCancelOptimisedAnimation(appearId, \"transform\", frame, !(layout || layoutId));\n }\n const { parent } = projectionNode;\n if (parent && !parent.hasCheckedOptimisedAppear) {\n cancelTreeOptimisedTransformAnimations(parent);\n }\n}\nfunction createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }) {\n return class ProjectionNode {\n constructor(latestValues = {}, parent = defaultParent?.()) {\n /**\n * A unique ID generated for every projection node.\n */\n this.id = id++;\n /**\n * An id that represents a unique session instigated by startUpdate.\n */\n this.animationId = 0;\n /**\n * A Set containing all this component's children. This is used to iterate\n * through the children.\n *\n * TODO: This could be faster to iterate as a flat array stored on the root node.\n */\n this.children = new Set();\n /**\n * Options for the node. We use this to configure what kind of layout animations\n * we should perform (if any).\n */\n this.options = {};\n /**\n * We use this to detect when its safe to shut down part of a projection tree.\n * We have to keep projecting children for scale correction and relative projection\n * until all their parents stop performing layout animations.\n */\n this.isTreeAnimating = false;\n this.isAnimationBlocked = false;\n /**\n * Flag to true if we think this layout has been changed. We can't always know this,\n * currently we set it to true every time a component renders, or if it has a layoutDependency\n * if that has changed between renders. Additionally, components can be grouped by LayoutGroup\n * and if one node is dirtied, they all are.\n */\n this.isLayoutDirty = false;\n /**\n * Flag to true if we think the projection calculations for this node needs\n * recalculating as a result of an updated transform or layout animation.\n */\n this.isProjectionDirty = false;\n /**\n * Flag to true if the layout *or* transform has changed. This then gets propagated\n * throughout the projection tree, forcing any element below to recalculate on the next frame.\n */\n this.isSharedProjectionDirty = false;\n /**\n * Flag transform dirty. This gets propagated throughout the whole tree but is only\n * respected by shared nodes.\n */\n this.isTransformDirty = false;\n /**\n * Block layout updates for instant layout transitions throughout the tree.\n */\n this.updateManuallyBlocked = false;\n this.updateBlockedByResize = false;\n /**\n * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`\n * call.\n */\n this.isUpdating = false;\n /**\n * If this is an SVG element we currently disable projection transforms\n */\n this.isSVG = false;\n /**\n * Flag to true (during promotion) if a node doing an instant layout transition needs to reset\n * its projection styles.\n */\n this.needsReset = false;\n /**\n * Flags whether this node should have its transform reset prior to measuring.\n */\n this.shouldResetTransform = false;\n /**\n * Store whether this node has been checked for optimised appear animations. As\n * effects fire bottom-up, and we want to look up the tree for appear animations,\n * this makes sure we only check each path once, stopping at nodes that\n * have already been checked.\n */\n this.hasCheckedOptimisedAppear = false;\n /**\n * An object representing the calculated contextual/accumulated/tree scale.\n * This will be used to scale calculcated projection transforms, as these are\n * calculated in screen-space but need to be scaled for elements to layoutly\n * make it to their calculated destinations.\n *\n * TODO: Lazy-init\n */\n this.treeScale = { x: 1, y: 1 };\n /**\n *\n */\n this.eventHandlers = new Map();\n this.hasTreeAnimated = false;\n // Note: Currently only running on root node\n this.updateScheduled = false;\n this.scheduleUpdate = () => this.update();\n this.projectionUpdateScheduled = false;\n this.checkUpdateFailed = () => {\n if (this.isUpdating) {\n this.isUpdating = false;\n this.clearAllSnapshots();\n }\n };\n /**\n * This is a multi-step process as shared nodes might be of different depths. Nodes\n * are sorted by depth order, so we need to resolve the entire tree before moving to\n * the next step.\n */\n this.updateProjection = () => {\n this.projectionUpdateScheduled = false;\n /**\n * Reset debug counts. Manually resetting rather than creating a new\n * object each frame.\n */\n if (statsBuffer.value) {\n metrics.nodes =\n metrics.calculatedTargetDeltas =\n metrics.calculatedProjections =\n 0;\n }\n this.nodes.forEach(propagateDirtyNodes);\n this.nodes.forEach(resolveTargetDelta);\n this.nodes.forEach(calcProjection);\n this.nodes.forEach(cleanDirtyNodes);\n if (statsBuffer.addProjectionMetrics) {\n statsBuffer.addProjectionMetrics(metrics);\n }\n };\n /**\n * Frame calculations\n */\n this.resolvedRelativeTargetAt = 0.0;\n this.hasProjected = false;\n this.isVisible = true;\n this.animationProgress = 0;\n /**\n * Shared layout\n */\n // TODO Only running on root node\n this.sharedNodes = new Map();\n this.latestValues = latestValues;\n this.root = parent ? parent.root || parent : this;\n this.path = parent ? [...parent.path, parent] : [];\n this.parent = parent;\n this.depth = parent ? parent.depth + 1 : 0;\n for (let i = 0; i < this.path.length; i++) {\n this.path[i].shouldResetTransform = true;\n }\n if (this.root === this)\n this.nodes = new FlatTree();\n }\n addEventListener(name, handler) {\n if (!this.eventHandlers.has(name)) {\n this.eventHandlers.set(name, new SubscriptionManager());\n }\n return this.eventHandlers.get(name).add(handler);\n }\n notifyListeners(name, ...args) {\n const subscriptionManager = this.eventHandlers.get(name);\n subscriptionManager && subscriptionManager.notify(...args);\n }\n hasListeners(name) {\n return this.eventHandlers.has(name);\n }\n /**\n * Lifecycles\n */\n mount(instance) {\n if (this.instance)\n return;\n this.isSVG = isSVGElement(instance) && !isSVGSVGElement(instance);\n this.instance = instance;\n const { layoutId, layout, visualElement } = this.options;\n if (visualElement && !visualElement.current) {\n visualElement.mount(instance);\n }\n this.root.nodes.add(this);\n this.parent && this.parent.children.add(this);\n if (this.root.hasTreeAnimated && (layout || layoutId)) {\n this.isLayoutDirty = true;\n }\n if (attachResizeListener) {\n let cancelDelay;\n const resizeUnblockUpdate = () => (this.root.updateBlockedByResize = false);\n attachResizeListener(instance, () => {\n this.root.updateBlockedByResize = true;\n cancelDelay && cancelDelay();\n cancelDelay = delay(resizeUnblockUpdate, 250);\n if (globalProjectionState.hasAnimatedSinceResize) {\n globalProjectionState.hasAnimatedSinceResize = false;\n this.nodes.forEach(finishAnimation);\n }\n });\n }\n if (layoutId) {\n this.root.registerSharedNode(layoutId, this);\n }\n // Only register the handler if it requires layout animation\n if (this.options.animate !== false &&\n visualElement &&\n (layoutId || layout)) {\n this.addEventListener(\"didUpdate\", ({ delta, hasLayoutChanged, hasRelativeLayoutChanged, layout: newLayout, }) => {\n if (this.isTreeAnimationBlocked()) {\n this.target = undefined;\n this.relativeTarget = undefined;\n return;\n }\n // TODO: Check here if an animation exists\n const layoutTransition = this.options.transition ||\n visualElement.getDefaultTransition() ||\n defaultLayoutTransition;\n const { onLayoutAnimationStart, onLayoutAnimationComplete, } = visualElement.getProps();\n /**\n * The target layout of the element might stay the same,\n * but its position relative to its parent has changed.\n */\n const hasTargetChanged = !this.targetLayout ||\n !boxEqualsRounded(this.targetLayout, newLayout);\n /*\n * Note: Disabled to fix relative animations always triggering new\n * layout animations. If this causes further issues, we can try\n * a different approach to detecting relative target changes.\n */\n // || hasRelativeLayoutChanged\n /**\n * If the layout hasn't seemed to have changed, it might be that the\n * element is visually in the same place in the document but its position\n * relative to its parent has indeed changed. So here we check for that.\n */\n const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeLayoutChanged;\n if (this.options.layoutRoot ||\n this.resumeFrom ||\n hasOnlyRelativeTargetChanged ||\n (hasLayoutChanged &&\n (hasTargetChanged || !this.currentAnimation))) {\n if (this.resumeFrom) {\n this.resumingFrom = this.resumeFrom;\n this.resumingFrom.resumingFrom = undefined;\n }\n this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);\n const animationOptions = {\n ...getValueTransition(layoutTransition, \"layout\"),\n onPlay: onLayoutAnimationStart,\n onComplete: onLayoutAnimationComplete,\n };\n if (visualElement.shouldReduceMotion ||\n this.options.layoutRoot) {\n animationOptions.delay = 0;\n animationOptions.type = false;\n }\n this.startAnimation(animationOptions);\n }\n else {\n /**\n * If the layout hasn't changed and we have an animation that hasn't started yet,\n * finish it immediately. Otherwise it will be animating from a location\n * that was probably never commited to screen and look like a jumpy box.\n */\n if (!hasLayoutChanged) {\n finishAnimation(this);\n }\n if (this.isLead() && this.options.onExitComplete) {\n this.options.onExitComplete();\n }\n }\n this.targetLayout = newLayout;\n });\n }\n }\n unmount() {\n this.options.layoutId && this.willUpdate();\n this.root.nodes.remove(this);\n const stack = this.getStack();\n stack && stack.remove(this);\n this.parent && this.parent.children.delete(this);\n this.instance = undefined;\n this.eventHandlers.clear();\n cancelFrame(this.updateProjection);\n }\n // only on the root\n blockUpdate() {\n this.updateManuallyBlocked = true;\n }\n unblockUpdate() {\n this.updateManuallyBlocked = false;\n }\n isUpdateBlocked() {\n return this.updateManuallyBlocked || this.updateBlockedByResize;\n }\n isTreeAnimationBlocked() {\n return (this.isAnimationBlocked ||\n (this.parent && this.parent.isTreeAnimationBlocked()) ||\n false);\n }\n // Note: currently only running on root node\n startUpdate() {\n if (this.isUpdateBlocked())\n return;\n this.isUpdating = true;\n this.nodes && this.nodes.forEach(resetSkewAndRotation);\n this.animationId++;\n }\n getTransformTemplate() {\n const { visualElement } = this.options;\n return visualElement && visualElement.getProps().transformTemplate;\n }\n willUpdate(shouldNotifyListeners = true) {\n this.root.hasTreeAnimated = true;\n if (this.root.isUpdateBlocked()) {\n this.options.onExitComplete && this.options.onExitComplete();\n return;\n }\n /**\n * If we're running optimised appear animations then these must be\n * cancelled before measuring the DOM. This is so we can measure\n * the true layout of the element rather than the WAAPI animation\n * which will be unaffected by the resetSkewAndRotate step.\n *\n * Note: This is a DOM write. Worst case scenario is this is sandwiched\n * between other snapshot reads which will cause unnecessary style recalculations.\n * This has to happen here though, as we don't yet know which nodes will need\n * snapshots in startUpdate(), but we only want to cancel optimised animations\n * if a layout animation measurement is actually going to be affected by them.\n */\n if (window.MotionCancelOptimisedAnimation &&\n !this.hasCheckedOptimisedAppear) {\n cancelTreeOptimisedTransformAnimations(this);\n }\n !this.root.isUpdating && this.root.startUpdate();\n if (this.isLayoutDirty)\n return;\n this.isLayoutDirty = true;\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.shouldResetTransform = true;\n node.updateScroll(\"snapshot\");\n if (node.options.layoutRoot) {\n node.willUpdate(false);\n }\n }\n const { layoutId, layout } = this.options;\n if (layoutId === undefined && !layout)\n return;\n const transformTemplate = this.getTransformTemplate();\n this.prevTransformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n this.updateSnapshot();\n shouldNotifyListeners && this.notifyListeners(\"willUpdate\");\n }\n update() {\n this.updateScheduled = false;\n const updateWasBlocked = this.isUpdateBlocked();\n // When doing an instant transition, we skip the layout update,\n // but should still clean up the measurements so that the next\n // snapshot could be taken correctly.\n if (updateWasBlocked) {\n this.unblockUpdate();\n this.clearAllSnapshots();\n this.nodes.forEach(clearMeasurements);\n return;\n }\n if (!this.isUpdating) {\n this.nodes.forEach(clearIsLayoutDirty);\n }\n this.isUpdating = false;\n /**\n * Write\n */\n this.nodes.forEach(resetTransformStyle);\n /**\n * Read ==================\n */\n // Update layout measurements of updated children\n this.nodes.forEach(updateLayout);\n /**\n * Write\n */\n // Notify listeners that the layout is updated\n this.nodes.forEach(notifyLayoutUpdate);\n this.clearAllSnapshots();\n /**\n * Manually flush any pending updates. Ideally\n * we could leave this to the following requestAnimationFrame but this seems\n * to leave a flash of incorrectly styled content.\n */\n const now = time.now();\n frameData.delta = clamp(0, 1000 / 60, now - frameData.timestamp);\n frameData.timestamp = now;\n frameData.isProcessing = true;\n frameSteps.update.process(frameData);\n frameSteps.preRender.process(frameData);\n frameSteps.render.process(frameData);\n frameData.isProcessing = false;\n }\n didUpdate() {\n if (!this.updateScheduled) {\n this.updateScheduled = true;\n microtask.read(this.scheduleUpdate);\n }\n }\n clearAllSnapshots() {\n this.nodes.forEach(clearSnapshot);\n this.sharedNodes.forEach(removeLeadSnapshots);\n }\n scheduleUpdateProjection() {\n if (!this.projectionUpdateScheduled) {\n this.projectionUpdateScheduled = true;\n frame.preRender(this.updateProjection, false, true);\n }\n }\n scheduleCheckAfterUnmount() {\n /**\n * If the unmounting node is in a layoutGroup and did trigger a willUpdate,\n * we manually call didUpdate to give a chance to the siblings to animate.\n * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.\n */\n frame.postRender(() => {\n if (this.isLayoutDirty) {\n this.root.didUpdate();\n }\n else {\n this.root.checkUpdateFailed();\n }\n });\n }\n /**\n * Update measurements\n */\n updateSnapshot() {\n if (this.snapshot || !this.instance)\n return;\n this.snapshot = this.measure();\n if (this.snapshot &&\n !calcLength(this.snapshot.measuredBox.x) &&\n !calcLength(this.snapshot.measuredBox.y)) {\n this.snapshot = undefined;\n }\n }\n updateLayout() {\n if (!this.instance)\n return;\n // TODO: Incorporate into a forwarded scroll offset\n this.updateScroll();\n if (!(this.options.alwaysMeasureLayout && this.isLead()) &&\n !this.isLayoutDirty) {\n return;\n }\n /**\n * When a node is mounted, it simply resumes from the prevLead's\n * snapshot instead of taking a new one, but the ancestors scroll\n * might have updated while the prevLead is unmounted. We need to\n * update the scroll again to make sure the layout we measure is\n * up to date.\n */\n if (this.resumeFrom && !this.resumeFrom.instance) {\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.updateScroll();\n }\n }\n const prevLayout = this.layout;\n this.layout = this.measure(false);\n this.layoutCorrected = createBox();\n this.isLayoutDirty = false;\n this.projectionDelta = undefined;\n this.notifyListeners(\"measure\", this.layout.layoutBox);\n const { visualElement } = this.options;\n visualElement &&\n visualElement.notify(\"LayoutMeasure\", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : undefined);\n }\n updateScroll(phase = \"measure\") {\n let needsMeasurement = Boolean(this.options.layoutScroll && this.instance);\n if (this.scroll &&\n this.scroll.animationId === this.root.animationId &&\n this.scroll.phase === phase) {\n needsMeasurement = false;\n }\n if (needsMeasurement && this.instance) {\n const isRoot = checkIsScrollRoot(this.instance);\n this.scroll = {\n animationId: this.root.animationId,\n phase,\n isRoot,\n offset: measureScroll(this.instance),\n wasRoot: this.scroll ? this.scroll.isRoot : isRoot,\n };\n }\n }\n resetTransform() {\n if (!resetTransform)\n return;\n const isResetRequested = this.isLayoutDirty ||\n this.shouldResetTransform ||\n this.options.alwaysMeasureLayout;\n const hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);\n const transformTemplate = this.getTransformTemplate();\n const transformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n const transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;\n if (isResetRequested &&\n this.instance &&\n (hasProjection ||\n hasTransform(this.latestValues) ||\n transformTemplateHasChanged)) {\n resetTransform(this.instance, transformTemplateValue);\n this.shouldResetTransform = false;\n this.scheduleRender();\n }\n }\n measure(removeTransform = true) {\n const pageBox = this.measurePageBox();\n let layoutBox = this.removeElementScroll(pageBox);\n /**\n * Measurements taken during the pre-render stage\n * still have transforms applied so we remove them\n * via calculation.\n */\n if (removeTransform) {\n layoutBox = this.removeTransform(layoutBox);\n }\n roundBox(layoutBox);\n return {\n animationId: this.root.animationId,\n measuredBox: pageBox,\n layoutBox,\n latestValues: {},\n source: this.id,\n };\n }\n measurePageBox() {\n const { visualElement } = this.options;\n if (!visualElement)\n return createBox();\n const box = visualElement.measureViewportBox();\n const wasInScrollRoot = this.scroll?.wasRoot || this.path.some(checkNodeWasScrollRoot);\n if (!wasInScrollRoot) {\n // Remove viewport scroll to give page-relative coordinates\n const { scroll } = this.root;\n if (scroll) {\n translateAxis(box.x, scroll.offset.x);\n translateAxis(box.y, scroll.offset.y);\n }\n }\n return box;\n }\n removeElementScroll(box) {\n const boxWithoutScroll = createBox();\n copyBoxInto(boxWithoutScroll, box);\n if (this.scroll?.wasRoot) {\n return boxWithoutScroll;\n }\n /**\n * Performance TODO: Keep a cumulative scroll offset down the tree\n * rather than loop back up the path.\n */\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n const { scroll, options } = node;\n if (node !== this.root && scroll && options.layoutScroll) {\n /**\n * If this is a new scroll root, we want to remove all previous scrolls\n * from the viewport box.\n */\n if (scroll.wasRoot) {\n copyBoxInto(boxWithoutScroll, box);\n }\n translateAxis(boxWithoutScroll.x, scroll.offset.x);\n translateAxis(boxWithoutScroll.y, scroll.offset.y);\n }\n }\n return boxWithoutScroll;\n }\n applyTransform(box, transformOnly = false) {\n const withTransforms = createBox();\n copyBoxInto(withTransforms, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!transformOnly &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(withTransforms, {\n x: -node.scroll.offset.x,\n y: -node.scroll.offset.y,\n });\n }\n if (!hasTransform(node.latestValues))\n continue;\n transformBox(withTransforms, node.latestValues);\n }\n if (hasTransform(this.latestValues)) {\n transformBox(withTransforms, this.latestValues);\n }\n return withTransforms;\n }\n removeTransform(box) {\n const boxWithoutTransform = createBox();\n copyBoxInto(boxWithoutTransform, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!node.instance)\n continue;\n if (!hasTransform(node.latestValues))\n continue;\n hasScale(node.latestValues) && node.updateSnapshot();\n const sourceBox = createBox();\n const nodeBox = node.measurePageBox();\n copyBoxInto(sourceBox, nodeBox);\n removeBoxTransforms(boxWithoutTransform, node.latestValues, node.snapshot ? node.snapshot.layoutBox : undefined, sourceBox);\n }\n if (hasTransform(this.latestValues)) {\n removeBoxTransforms(boxWithoutTransform, this.latestValues);\n }\n return boxWithoutTransform;\n }\n setTargetDelta(delta) {\n this.targetDelta = delta;\n this.root.scheduleUpdateProjection();\n this.isProjectionDirty = true;\n }\n setOptions(options) {\n this.options = {\n ...this.options,\n ...options,\n crossfade: options.crossfade !== undefined ? options.crossfade : true,\n };\n }\n clearMeasurements() {\n this.scroll = undefined;\n this.layout = undefined;\n this.snapshot = undefined;\n this.prevTransformTemplateValue = undefined;\n this.targetDelta = undefined;\n this.target = undefined;\n this.isLayoutDirty = false;\n }\n forceRelativeParentToResolveTarget() {\n if (!this.relativeParent)\n return;\n /**\n * If the parent target isn't up-to-date, force it to update.\n * This is an unfortunate de-optimisation as it means any updating relative\n * projection will cause all the relative parents to recalculate back\n * up the tree.\n */\n if (this.relativeParent.resolvedRelativeTargetAt !==\n frameData.timestamp) {\n this.relativeParent.resolveTargetDelta(true);\n }\n }\n resolveTargetDelta(forceRecalculation = false) {\n /**\n * Once the dirty status of nodes has been spread through the tree, we also\n * need to check if we have a shared node of a different depth that has itself\n * been dirtied.\n */\n const lead = this.getLead();\n this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty);\n this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty);\n this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty);\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n /**\n * We don't use transform for this step of processing so we don't\n * need to check whether any nodes have changed transform.\n */\n const canSkip = !(forceRecalculation ||\n (isShared && this.isSharedProjectionDirty) ||\n this.isProjectionDirty ||\n this.parent?.isProjectionDirty ||\n this.attemptToResolveRelativeTarget ||\n this.root.updateBlockedByResize);\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\n /**\n * If we have no layout, we can't perform projection, so early return\n */\n if (!this.layout || !(layout || layoutId))\n return;\n this.resolvedRelativeTargetAt = frameData.timestamp;\n /**\n * If we don't have a targetDelta but do have a layout, we can attempt to resolve\n * a relativeParent. This will allow a component to perform scale correction\n * even if no animation has started.\n */\n if (!this.targetDelta && !this.relativeTarget) {\n const relativeParent = this.getClosestProjectingParent();\n if (relativeParent &&\n relativeParent.layout &&\n this.animationProgress !== 1) {\n this.relativeParent = relativeParent;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.layout.layoutBox, relativeParent.layout.layoutBox);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n else {\n this.relativeParent = this.relativeTarget = undefined;\n }\n }\n /**\n * If we have no relative target or no target delta our target isn't valid\n * for this frame.\n */\n if (!this.relativeTarget && !this.targetDelta)\n return;\n /**\n * Lazy-init target data structure\n */\n if (!this.target) {\n this.target = createBox();\n this.targetWithTransforms = createBox();\n }\n /**\n * If we've got a relative box for this component, resolve it into a target relative to the parent.\n */\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.relativeParent &&\n this.relativeParent.target) {\n this.forceRelativeParentToResolveTarget();\n calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target);\n /**\n * If we've only got a targetDelta, resolve it into a target\n */\n }\n else if (this.targetDelta) {\n if (Boolean(this.resumingFrom)) {\n // TODO: This is creating a new object every frame\n this.target = this.applyTransform(this.layout.layoutBox);\n }\n else {\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n applyBoxDelta(this.target, this.targetDelta);\n }\n else {\n /**\n * If no target, use own layout as target\n */\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n /**\n * If we've been told to attempt to resolve a relative target, do so.\n */\n if (this.attemptToResolveRelativeTarget) {\n this.attemptToResolveRelativeTarget = false;\n const relativeParent = this.getClosestProjectingParent();\n if (relativeParent &&\n Boolean(relativeParent.resumingFrom) ===\n Boolean(this.resumingFrom) &&\n !relativeParent.options.layoutScroll &&\n relativeParent.target &&\n this.animationProgress !== 1) {\n this.relativeParent = relativeParent;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.target, relativeParent.target);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n else {\n this.relativeParent = this.relativeTarget = undefined;\n }\n }\n /**\n * Increase debug counter for resolved target deltas\n */\n if (statsBuffer.value) {\n metrics.calculatedTargetDeltas++;\n }\n }\n getClosestProjectingParent() {\n if (!this.parent ||\n hasScale(this.parent.latestValues) ||\n has2DTranslate(this.parent.latestValues)) {\n return undefined;\n }\n if (this.parent.isProjecting()) {\n return this.parent;\n }\n else {\n return this.parent.getClosestProjectingParent();\n }\n }\n isProjecting() {\n return Boolean((this.relativeTarget ||\n this.targetDelta ||\n this.options.layoutRoot) &&\n this.layout);\n }\n calcProjection() {\n const lead = this.getLead();\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n let canSkip = true;\n /**\n * If this is a normal layout animation and neither this node nor its nearest projecting\n * is dirty then we can't skip.\n */\n if (this.isProjectionDirty || this.parent?.isProjectionDirty) {\n canSkip = false;\n }\n /**\n * If this is a shared layout animation and this node's shared projection is dirty then\n * we can't skip.\n */\n if (isShared &&\n (this.isSharedProjectionDirty || this.isTransformDirty)) {\n canSkip = false;\n }\n /**\n * If we have resolved the target this frame we must recalculate the\n * projection to ensure it visually represents the internal calculations.\n */\n if (this.resolvedRelativeTargetAt === frameData.timestamp) {\n canSkip = false;\n }\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\n /**\n * If this section of the tree isn't animating we can\n * delete our target sources for the following frame.\n */\n this.isTreeAnimating = Boolean((this.parent && this.parent.isTreeAnimating) ||\n this.currentAnimation ||\n this.pendingAnimation);\n if (!this.isTreeAnimating) {\n this.targetDelta = this.relativeTarget = undefined;\n }\n if (!this.layout || !(layout || layoutId))\n return;\n /**\n * Reset the corrected box with the latest values from box, as we're then going\n * to perform mutative operations on it.\n */\n copyBoxInto(this.layoutCorrected, this.layout.layoutBox);\n /**\n * Record previous tree scales before updating.\n */\n const prevTreeScaleX = this.treeScale.x;\n const prevTreeScaleY = this.treeScale.y;\n /**\n * Apply all the parent deltas to this box to produce the corrected box. This\n * is the layout box, as it will appear on screen as a result of the transforms of its parents.\n */\n applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, isShared);\n /**\n * If this layer needs to perform scale correction but doesn't have a target,\n * use the layout as the target.\n */\n if (lead.layout &&\n !lead.target &&\n (this.treeScale.x !== 1 || this.treeScale.y !== 1)) {\n lead.target = lead.layout.layoutBox;\n lead.targetWithTransforms = createBox();\n }\n const { target } = lead;\n if (!target) {\n /**\n * If we don't have a target to project into, but we were previously\n * projecting, we want to remove the stored transform and schedule\n * a render to ensure the elements reflect the removed transform.\n */\n if (this.prevProjectionDelta) {\n this.createProjectionDeltas();\n this.scheduleRender();\n }\n return;\n }\n if (!this.projectionDelta || !this.prevProjectionDelta) {\n this.createProjectionDeltas();\n }\n else {\n copyAxisDeltaInto(this.prevProjectionDelta.x, this.projectionDelta.x);\n copyAxisDeltaInto(this.prevProjectionDelta.y, this.projectionDelta.y);\n }\n /**\n * Update the delta between the corrected box and the target box before user-set transforms were applied.\n * This will allow us to calculate the corrected borderRadius and boxShadow to compensate\n * for our layout reprojection, but still allow them to be scaled correctly by the user.\n * It might be that to simplify this we may want to accept that user-set scale is also corrected\n * and we wouldn't have to keep and calc both deltas, OR we could support a user setting\n * to allow people to choose whether these styles are corrected based on just the\n * layout reprojection or the final bounding box.\n */\n calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues);\n if (this.treeScale.x !== prevTreeScaleX ||\n this.treeScale.y !== prevTreeScaleY ||\n !axisDeltaEquals(this.projectionDelta.x, this.prevProjectionDelta.x) ||\n !axisDeltaEquals(this.projectionDelta.y, this.prevProjectionDelta.y)) {\n this.hasProjected = true;\n this.scheduleRender();\n this.notifyListeners(\"projectionUpdate\", target);\n }\n /**\n * Increase debug counter for recalculated projections\n */\n if (statsBuffer.value) {\n metrics.calculatedProjections++;\n }\n }\n hide() {\n this.isVisible = false;\n // TODO: Schedule render\n }\n show() {\n this.isVisible = true;\n // TODO: Schedule render\n }\n scheduleRender(notifyAll = true) {\n this.options.visualElement?.scheduleRender();\n if (notifyAll) {\n const stack = this.getStack();\n stack && stack.scheduleRender();\n }\n if (this.resumingFrom && !this.resumingFrom.instance) {\n this.resumingFrom = undefined;\n }\n }\n createProjectionDeltas() {\n this.prevProjectionDelta = createDelta();\n this.projectionDelta = createDelta();\n this.projectionDeltaWithTransform = createDelta();\n }\n setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false) {\n const snapshot = this.snapshot;\n const snapshotLatestValues = snapshot ? snapshot.latestValues : {};\n const mixedValues = { ...this.latestValues };\n const targetDelta = createDelta();\n if (!this.relativeParent ||\n !this.relativeParent.options.layoutRoot) {\n this.relativeTarget = this.relativeTargetOrigin = undefined;\n }\n this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;\n const relativeLayout = createBox();\n const snapshotSource = snapshot ? snapshot.source : undefined;\n const layoutSource = this.layout ? this.layout.source : undefined;\n const isSharedLayoutAnimation = snapshotSource !== layoutSource;\n const stack = this.getStack();\n const isOnlyMember = !stack || stack.members.length <= 1;\n const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation &&\n !isOnlyMember &&\n this.options.crossfade === true &&\n !this.path.some(hasOpacityCrossfade));\n this.animationProgress = 0;\n let prevRelativeTarget;\n this.mixTargetDelta = (latest) => {\n const progress = latest / 1000;\n mixAxisDelta(targetDelta.x, delta.x, progress);\n mixAxisDelta(targetDelta.y, delta.y, progress);\n this.setTargetDelta(targetDelta);\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.layout &&\n this.relativeParent &&\n this.relativeParent.layout) {\n calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox);\n mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress);\n /**\n * If this is an unchanged relative target we can consider the\n * projection not dirty.\n */\n if (prevRelativeTarget &&\n boxEquals(this.relativeTarget, prevRelativeTarget)) {\n this.isProjectionDirty = false;\n }\n if (!prevRelativeTarget)\n prevRelativeTarget = createBox();\n copyBoxInto(prevRelativeTarget, this.relativeTarget);\n }\n if (isSharedLayoutAnimation) {\n this.animationValues = mixedValues;\n mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember);\n }\n this.root.scheduleUpdateProjection();\n this.scheduleRender();\n this.animationProgress = progress;\n };\n this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0);\n }\n startAnimation(options) {\n this.notifyListeners(\"animationStart\");\n this.currentAnimation?.stop(false);\n this.resumingFrom?.currentAnimation?.stop(false);\n if (this.pendingAnimation) {\n cancelFrame(this.pendingAnimation);\n this.pendingAnimation = undefined;\n }\n /**\n * Start the animation in the next frame to have a frame with progress 0,\n * where the target is the same as when the animation started, so we can\n * calculate the relative positions correctly for instant transitions.\n */\n this.pendingAnimation = frame.update(() => {\n globalProjectionState.hasAnimatedSinceResize = true;\n activeAnimations.layout++;\n this.motionValue || (this.motionValue = motionValue(0));\n this.currentAnimation = animateSingleValue(this.motionValue, [0, 1000], {\n ...options,\n isSync: true,\n onUpdate: (latest) => {\n this.mixTargetDelta(latest);\n options.onUpdate && options.onUpdate(latest);\n },\n onStop: () => {\n activeAnimations.layout--;\n },\n onComplete: () => {\n activeAnimations.layout--;\n options.onComplete && options.onComplete();\n this.completeAnimation();\n },\n });\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = this.currentAnimation;\n }\n this.pendingAnimation = undefined;\n });\n }\n completeAnimation() {\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = undefined;\n this.resumingFrom.preserveOpacity = undefined;\n }\n const stack = this.getStack();\n stack && stack.exitAnimationComplete();\n this.resumingFrom =\n this.currentAnimation =\n this.animationValues =\n undefined;\n this.notifyListeners(\"animationComplete\");\n }\n finishAnimation() {\n if (this.currentAnimation) {\n this.mixTargetDelta && this.mixTargetDelta(animationTarget);\n this.currentAnimation.stop(false);\n }\n this.completeAnimation();\n }\n applyTransformsToTarget() {\n const lead = this.getLead();\n let { targetWithTransforms, target, layout, latestValues } = lead;\n if (!targetWithTransforms || !target || !layout)\n return;\n /**\n * If we're only animating position, and this element isn't the lead element,\n * then instead of projecting into the lead box we instead want to calculate\n * a new target that aligns the two boxes but maintains the layout shape.\n */\n if (this !== lead &&\n this.layout &&\n layout &&\n shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout.layoutBox)) {\n target = this.target || createBox();\n const xLength = calcLength(this.layout.layoutBox.x);\n target.x.min = lead.target.x.min;\n target.x.max = target.x.min + xLength;\n const yLength = calcLength(this.layout.layoutBox.y);\n target.y.min = lead.target.y.min;\n target.y.max = target.y.min + yLength;\n }\n copyBoxInto(targetWithTransforms, target);\n /**\n * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.\n * This is the final box that we will then project into by calculating a transform delta and\n * applying it to the corrected box.\n */\n transformBox(targetWithTransforms, latestValues);\n /**\n * Update the delta between the corrected box and the final target box, after\n * user-set transforms are applied to it. This will be used by the renderer to\n * create a transform style that will reproject the element from its layout layout\n * into the desired bounding box.\n */\n calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);\n }\n registerSharedNode(layoutId, node) {\n if (!this.sharedNodes.has(layoutId)) {\n this.sharedNodes.set(layoutId, new NodeStack());\n }\n const stack = this.sharedNodes.get(layoutId);\n stack.add(node);\n const config = node.options.initialPromotionConfig;\n node.promote({\n transition: config ? config.transition : undefined,\n preserveFollowOpacity: config && config.shouldPreserveFollowOpacity\n ? config.shouldPreserveFollowOpacity(node)\n : undefined,\n });\n }\n isLead() {\n const stack = this.getStack();\n return stack ? stack.lead === this : true;\n }\n getLead() {\n const { layoutId } = this.options;\n return layoutId ? this.getStack()?.lead || this : this;\n }\n getPrevLead() {\n const { layoutId } = this.options;\n return layoutId ? this.getStack()?.prevLead : undefined;\n }\n getStack() {\n const { layoutId } = this.options;\n if (layoutId)\n return this.root.sharedNodes.get(layoutId);\n }\n promote({ needsReset, transition, preserveFollowOpacity, } = {}) {\n const stack = this.getStack();\n if (stack)\n stack.promote(this, preserveFollowOpacity);\n if (needsReset) {\n this.projectionDelta = undefined;\n this.needsReset = true;\n }\n if (transition)\n this.setOptions({ transition });\n }\n relegate() {\n const stack = this.getStack();\n if (stack) {\n return stack.relegate(this);\n }\n else {\n return false;\n }\n }\n resetSkewAndRotation() {\n const { visualElement } = this.options;\n if (!visualElement)\n return;\n // If there's no detected skew or rotation values, we can early return without a forced render.\n let hasDistortingTransform = false;\n /**\n * An unrolled check for rotation values. Most elements don't have any rotation and\n * skipping the nested loop and new object creation is 50% faster.\n */\n const { latestValues } = visualElement;\n if (latestValues.z ||\n latestValues.rotate ||\n latestValues.rotateX ||\n latestValues.rotateY ||\n latestValues.rotateZ ||\n latestValues.skewX ||\n latestValues.skewY) {\n hasDistortingTransform = true;\n }\n // If there's no distorting values, we don't need to do any more.\n if (!hasDistortingTransform)\n return;\n const resetValues = {};\n if (latestValues.z) {\n resetDistortingTransform(\"z\", visualElement, resetValues, this.animationValues);\n }\n // Check the skew and rotate value of all axes and reset to 0\n for (let i = 0; i < transformAxes.length; i++) {\n resetDistortingTransform(`rotate${transformAxes[i]}`, visualElement, resetValues, this.animationValues);\n resetDistortingTransform(`skew${transformAxes[i]}`, visualElement, resetValues, this.animationValues);\n }\n // Force a render of this element to apply the transform with all skews and rotations\n // set to 0.\n visualElement.render();\n // Put back all the values we reset\n for (const key in resetValues) {\n visualElement.setStaticValue(key, resetValues[key]);\n if (this.animationValues) {\n this.animationValues[key] = resetValues[key];\n }\n }\n // Schedule a render for the next frame. This ensures we won't visually\n // see the element with the reset rotate value applied.\n visualElement.scheduleRender();\n }\n getProjectionStyles(styleProp) {\n if (!this.instance || this.isSVG)\n return undefined;\n if (!this.isVisible) {\n return hiddenVisibility;\n }\n const styles = {\n visibility: \"\",\n };\n const transformTemplate = this.getTransformTemplate();\n if (this.needsReset) {\n this.needsReset = false;\n styles.opacity = \"\";\n styles.pointerEvents =\n resolveMotionValue(styleProp?.pointerEvents) || \"\";\n styles.transform = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : \"none\";\n return styles;\n }\n const lead = this.getLead();\n if (!this.projectionDelta || !this.layout || !lead.target) {\n const emptyStyles = {};\n if (this.options.layoutId) {\n emptyStyles.opacity =\n this.latestValues.opacity !== undefined\n ? this.latestValues.opacity\n : 1;\n emptyStyles.pointerEvents =\n resolveMotionValue(styleProp?.pointerEvents) || \"\";\n }\n if (this.hasProjected && !hasTransform(this.latestValues)) {\n emptyStyles.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n this.hasProjected = false;\n }\n return emptyStyles;\n }\n const valuesToRender = lead.animationValues || lead.latestValues;\n this.applyTransformsToTarget();\n styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);\n if (transformTemplate) {\n styles.transform = transformTemplate(valuesToRender, styles.transform);\n }\n const { x, y } = this.projectionDelta;\n styles.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`;\n if (lead.animationValues) {\n /**\n * If the lead component is animating, assign this either the entering/leaving\n * opacity\n */\n styles.opacity =\n lead === this\n ? valuesToRender.opacity ??\n this.latestValues.opacity ??\n 1\n : this.preserveOpacity\n ? this.latestValues.opacity\n : valuesToRender.opacityExit;\n }\n else {\n /**\n * Or we're not animating at all, set the lead component to its layout\n * opacity and other components to hidden.\n */\n styles.opacity =\n lead === this\n ? valuesToRender.opacity !== undefined\n ? valuesToRender.opacity\n : \"\"\n : valuesToRender.opacityExit !== undefined\n ? valuesToRender.opacityExit\n : 0;\n }\n /**\n * Apply scale correction\n */\n for (const key in scaleCorrectors) {\n if (valuesToRender[key] === undefined)\n continue;\n const { correct, applyTo, isCSSVariable } = scaleCorrectors[key];\n /**\n * Only apply scale correction to the value if we have an\n * active projection transform. Otherwise these values become\n * vulnerable to distortion if the element changes size without\n * a corresponding layout animation.\n */\n const corrected = styles.transform === \"none\"\n ? valuesToRender[key]\n : correct(valuesToRender[key], lead);\n if (applyTo) {\n const num = applyTo.length;\n for (let i = 0; i < num; i++) {\n styles[applyTo[i]] = corrected;\n }\n }\n else {\n // If this is a CSS variable, set it directly on the instance.\n // Replacing this function from creating styles to setting them\n // would be a good place to remove per frame object creation\n if (isCSSVariable) {\n this.options.visualElement.renderState.vars[key] = corrected;\n }\n else {\n styles[key] = corrected;\n }\n }\n }\n /**\n * Disable pointer events on follow components. This is to ensure\n * that if a follow component covers a lead component it doesn't block\n * pointer events on the lead.\n */\n if (this.options.layoutId) {\n styles.pointerEvents =\n lead === this\n ? resolveMotionValue(styleProp?.pointerEvents) || \"\"\n : \"none\";\n }\n return styles;\n }\n clearSnapshot() {\n this.resumeFrom = this.snapshot = undefined;\n }\n // Only run on root\n resetTree() {\n this.root.nodes.forEach((node) => node.currentAnimation?.stop(false));\n this.root.nodes.forEach(clearMeasurements);\n this.root.sharedNodes.clear();\n }\n };\n}\nfunction updateLayout(node) {\n node.updateLayout();\n}\nfunction notifyLayoutUpdate(node) {\n const snapshot = node.resumeFrom?.snapshot || node.snapshot;\n if (node.isLead() &&\n node.layout &&\n snapshot &&\n node.hasListeners(\"didUpdate\")) {\n const { layoutBox: layout, measuredBox: measuredLayout } = node.layout;\n const { animationType } = node.options;\n const isShared = snapshot.source !== node.layout.source;\n // TODO Maybe we want to also resize the layout snapshot so we don't trigger\n // animations for instance if layout=\"size\" and an element has only changed position\n if (animationType === \"size\") {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(axisSnapshot);\n axisSnapshot.min = layout[axis].min;\n axisSnapshot.max = axisSnapshot.min + length;\n });\n }\n else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)) {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(layout[axis]);\n axisSnapshot.max = axisSnapshot.min + length;\n /**\n * Ensure relative target gets resized and rerendererd\n */\n if (node.relativeTarget && !node.currentAnimation) {\n node.isProjectionDirty = true;\n node.relativeTarget[axis].max =\n node.relativeTarget[axis].min + length;\n }\n });\n }\n const layoutDelta = createDelta();\n calcBoxDelta(layoutDelta, layout, snapshot.layoutBox);\n const visualDelta = createDelta();\n if (isShared) {\n calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox);\n }\n else {\n calcBoxDelta(visualDelta, layout, snapshot.layoutBox);\n }\n const hasLayoutChanged = !isDeltaZero(layoutDelta);\n let hasRelativeLayoutChanged = false;\n if (!node.resumeFrom) {\n const relativeParent = node.getClosestProjectingParent();\n /**\n * If the relativeParent is itself resuming from a different element then\n * the relative snapshot is not relavent\n */\n if (relativeParent && !relativeParent.resumeFrom) {\n const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent;\n if (parentSnapshot && parentLayout) {\n const relativeSnapshot = createBox();\n calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox);\n const relativeLayout = createBox();\n calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox);\n if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {\n hasRelativeLayoutChanged = true;\n }\n if (relativeParent.options.layoutRoot) {\n node.relativeTarget = relativeLayout;\n node.relativeTargetOrigin = relativeSnapshot;\n node.relativeParent = relativeParent;\n }\n }\n }\n }\n node.notifyListeners(\"didUpdate\", {\n layout,\n snapshot,\n delta: visualDelta,\n layoutDelta,\n hasLayoutChanged,\n hasRelativeLayoutChanged,\n });\n }\n else if (node.isLead()) {\n const { onExitComplete } = node.options;\n onExitComplete && onExitComplete();\n }\n /**\n * Clearing transition\n * TODO: Investigate why this transition is being passed in as {type: false } from Framer\n * and why we need it at all\n */\n node.options.transition = undefined;\n}\nfunction propagateDirtyNodes(node) {\n /**\n * Increase debug counter for nodes encountered this frame\n */\n if (statsBuffer.value) {\n metrics.nodes++;\n }\n if (!node.parent)\n return;\n /**\n * If this node isn't projecting, propagate isProjectionDirty. It will have\n * no performance impact but it will allow the next child that *is* projecting\n * but *isn't* dirty to just check its parent to see if *any* ancestor needs\n * correcting.\n */\n if (!node.isProjecting()) {\n node.isProjectionDirty = node.parent.isProjectionDirty;\n }\n /**\n * Propagate isSharedProjectionDirty and isTransformDirty\n * throughout the whole tree. A future revision can take another look at\n * this but for safety we still recalcualte shared nodes.\n */\n node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty ||\n node.parent.isProjectionDirty ||\n node.parent.isSharedProjectionDirty));\n node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty);\n}\nfunction cleanDirtyNodes(node) {\n node.isProjectionDirty =\n node.isSharedProjectionDirty =\n node.isTransformDirty =\n false;\n}\nfunction clearSnapshot(node) {\n node.clearSnapshot();\n}\nfunction clearMeasurements(node) {\n node.clearMeasurements();\n}\nfunction clearIsLayoutDirty(node) {\n node.isLayoutDirty = false;\n}\nfunction resetTransformStyle(node) {\n const { visualElement } = node.options;\n if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {\n visualElement.notify(\"BeforeLayoutMeasure\");\n }\n node.resetTransform();\n}\nfunction finishAnimation(node) {\n node.finishAnimation();\n node.targetDelta = node.relativeTarget = node.target = undefined;\n node.isProjectionDirty = true;\n}\nfunction resolveTargetDelta(node) {\n node.resolveTargetDelta();\n}\nfunction calcProjection(node) {\n node.calcProjection();\n}\nfunction resetSkewAndRotation(node) {\n node.resetSkewAndRotation();\n}\nfunction removeLeadSnapshots(stack) {\n stack.removeLeadSnapshot();\n}\nfunction mixAxisDelta(output, delta, p) {\n output.translate = mixNumber(delta.translate, 0, p);\n output.scale = mixNumber(delta.scale, 1, p);\n output.origin = delta.origin;\n output.originPoint = delta.originPoint;\n}\nfunction mixAxis(output, from, to, p) {\n output.min = mixNumber(from.min, to.min, p);\n output.max = mixNumber(from.max, to.max, p);\n}\nfunction mixBox(output, from, to, p) {\n mixAxis(output.x, from.x, to.x, p);\n mixAxis(output.y, from.y, to.y, p);\n}\nfunction hasOpacityCrossfade(node) {\n return (node.animationValues && node.animationValues.opacityExit !== undefined);\n}\nconst defaultLayoutTransition = {\n duration: 0.45,\n ease: [0.4, 0, 0.1, 1],\n};\nconst userAgentContains = (string) => typeof navigator !== \"undefined\" &&\n navigator.userAgent &&\n navigator.userAgent.toLowerCase().includes(string);\n/**\n * Measured bounding boxes must be rounded in Safari and\n * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements\n * can appear to jump.\n */\nconst roundPoint = userAgentContains(\"applewebkit/\") && !userAgentContains(\"chrome/\")\n ? Math.round\n : noop;\nfunction roundAxis(axis) {\n // Round to the nearest .5 pixels to support subpixel layouts\n axis.min = roundPoint(axis.min);\n axis.max = roundPoint(axis.max);\n}\nfunction roundBox(box) {\n roundAxis(box.x);\n roundAxis(box.y);\n}\nfunction shouldAnimatePositionOnly(animationType, snapshot, layout) {\n return (animationType === \"position\" ||\n (animationType === \"preserve-aspect\" &&\n !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2)));\n}\nfunction checkNodeWasScrollRoot(node) {\n return node !== node.root && node.scroll?.wasRoot;\n}\n\nexport { cleanDirtyNodes, createProjectionNode, mixAxis, mixAxisDelta, mixBox, propagateDirtyNodes };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { addDomEvent } from '../../events/add-dom-event.mjs';\n\nconst DocumentProjectionNode = createProjectionNode({\n attachResizeListener: (ref, notify) => addDomEvent(ref, \"resize\", notify),\n measureScroll: () => ({\n x: document.documentElement.scrollLeft || document.body.scrollLeft,\n y: document.documentElement.scrollTop || document.body.scrollTop,\n }),\n checkIsScrollRoot: () => true,\n});\n\nexport { DocumentProjectionNode };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { DocumentProjectionNode } from './DocumentProjectionNode.mjs';\n\nconst rootProjectionNode = {\n current: undefined,\n};\nconst HTMLProjectionNode = createProjectionNode({\n measureScroll: (instance) => ({\n x: instance.scrollLeft,\n y: instance.scrollTop,\n }),\n defaultParent: () => {\n if (!rootProjectionNode.current) {\n const documentNode = new DocumentProjectionNode({});\n documentNode.mount(window);\n documentNode.setOptions({ layoutScroll: true });\n rootProjectionNode.current = documentNode;\n }\n return rootProjectionNode.current;\n },\n resetTransform: (instance, value) => {\n instance.style.transform = value !== undefined ? value : \"none\";\n },\n checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === \"fixed\"),\n});\n\nexport { HTMLProjectionNode, rootProjectionNode };\n","import { DragGesture } from '../../gestures/drag/index.mjs';\nimport { PanGesture } from '../../gestures/pan/index.mjs';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\nimport { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\n\nconst drag = {\n pan: {\n Feature: PanGesture,\n },\n drag: {\n Feature: DragGesture,\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { drag };\n","import { hover, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\n\nfunction handleHoverEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", lifecycle === \"Start\");\n }\n const eventName = (\"onHover\" + lifecycle);\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass HoverGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n this.unmount = hover(current, (_element, startEvent) => {\n handleHoverEvent(this.node, startEvent, \"Start\");\n return (endEvent) => handleHoverEvent(this.node, endEvent, \"End\");\n });\n }\n unmount() { }\n}\n\nexport { HoverGesture };\n","import { pipe } from 'motion-utils';\nimport { addDomEvent } from '../events/add-dom-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\n\nclass FocusGesture extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n }\n catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() { }\n}\n\nexport { FocusGesture };\n","import { press, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\n\nfunction handlePressEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.current instanceof HTMLButtonElement && node.current.disabled) {\n return;\n }\n if (node.animationState && props.whileTap) {\n node.animationState.setActive(\"whileTap\", lifecycle === \"Start\");\n }\n const eventName = (\"onTap\" + (lifecycle === \"End\" ? \"\" : lifecycle));\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass PressGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n this.unmount = press(current, (_element, startEvent) => {\n handlePressEvent(this.node, startEvent, \"Start\");\n return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? \"End\" : \"Cancel\");\n }, { useGlobalTarget: this.node.props.globalTapTarget });\n }\n unmount() { }\n}\n\nexport { PressGesture };\n","/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nconst observerCallbacks = new WeakMap();\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nconst observers = new WeakMap();\nconst fireObserverCallback = (entry) => {\n const callback = observerCallbacks.get(entry.target);\n callback && callback(entry);\n};\nconst fireAllObserverCallbacks = (entries) => {\n entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver({ root, ...options }) {\n const lookupRoot = root || document;\n /**\n * If we don't have an observer lookup map for this root, create one.\n */\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {});\n }\n const rootObservers = observers.get(lookupRoot);\n const key = JSON.stringify(options);\n /**\n * If we don't have an observer for this combination of root and settings,\n * create one.\n */\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options });\n }\n return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n const rootInteresectionObserver = initIntersectionObserver(options);\n observerCallbacks.set(element, callback);\n rootInteresectionObserver.observe(element);\n return () => {\n observerCallbacks.delete(element);\n rootInteresectionObserver.unobserve(element);\n };\n}\n\nexport { observeIntersection };\n","import { Feature } from '../Feature.mjs';\nimport { observeIntersection } from './observers.mjs';\n\nconst thresholdNames = {\n some: 0,\n all: 1,\n};\nclass InViewFeature extends Feature {\n constructor() {\n super(...arguments);\n this.hasEnteredView = false;\n this.isInView = false;\n }\n startObserver() {\n this.unmount();\n const { viewport = {} } = this.node.getProps();\n const { root, margin: rootMargin, amount = \"some\", once } = viewport;\n const options = {\n root: root ? root.current : undefined,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n };\n const onIntersectionUpdate = (entry) => {\n const { isIntersecting } = entry;\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (this.isInView === isIntersecting)\n return;\n this.isInView = isIntersecting;\n /**\n * Handle hasEnteredView. If this is only meant to run once, and\n * element isn't visible, early return. Otherwise set hasEnteredView to true.\n */\n if (once && !isIntersecting && this.hasEnteredView) {\n return;\n }\n else if (isIntersecting) {\n this.hasEnteredView = true;\n }\n if (this.node.animationState) {\n this.node.animationState.setActive(\"whileInView\", isIntersecting);\n }\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n const { onViewportEnter, onViewportLeave } = this.node.getProps();\n const callback = isIntersecting ? onViewportEnter : onViewportLeave;\n callback && callback(entry);\n };\n return observeIntersection(this.node.current, options, onIntersectionUpdate);\n }\n mount() {\n this.startObserver();\n }\n update() {\n if (typeof IntersectionObserver === \"undefined\")\n return;\n const { props, prevProps } = this.node;\n const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(hasViewportOptionChanged(props, prevProps));\n if (hasOptionsChanged) {\n this.startObserver();\n }\n }\n unmount() { }\n}\nfunction hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {\n return (name) => viewport[name] !== prevViewport[name];\n}\n\nexport { InViewFeature };\n","import { HoverGesture } from '../../gestures/hover.mjs';\nimport { FocusGesture } from '../../gestures/focus.mjs';\nimport { PressGesture } from '../../gestures/press.mjs';\nimport { InViewFeature } from './viewport/index.mjs';\n\nconst gestureAnimations = {\n inView: {\n Feature: InViewFeature,\n },\n tap: {\n Feature: PressGesture,\n },\n focus: {\n Feature: FocusGesture,\n },\n hover: {\n Feature: HoverGesture,\n },\n};\n\nexport { gestureAnimations };\n","import { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\n\nconst layout = {\n layout: {\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { layout };\n","// Does this device prefer reduced motion? Returns `null` server-side.\nconst prefersReducedMotion = { current: null };\nconst hasReducedMotionListener = { current: false };\n\nexport { hasReducedMotionListener, prefersReducedMotion };\n","import { isBrowser } from '../is-browser.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\nfunction initPrefersReducedMotion() {\n hasReducedMotionListener.current = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\");\n const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);\n motionMediaQuery.addListener(setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n\nexport { initPrefersReducedMotion };\n","const visualElementStore = new WeakMap();\n\nexport { visualElementStore };\n","import { isMotionValue, motionValue } from 'motion-dom';\n\nfunction updateMotionValuesFromProps(element, next, prev) {\n for (const key in next) {\n const nextValue = next[key];\n const prevValue = prev[key];\n if (isMotionValue(nextValue)) {\n /**\n * If this is a motion value found in props or style, we want to add it\n * to our visual element's motion value map.\n */\n element.addValue(key, nextValue);\n }\n else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping from a motion value to a static value,\n * create a new motion value from that\n */\n element.addValue(key, motionValue(nextValue, { owner: element }));\n }\n else if (prevValue !== nextValue) {\n /**\n * If this is a flat value that has changed, update the motion value\n * or create one if it doesn't exist. We only want to do this if we're\n * not handling the value with our animation state.\n */\n if (element.hasValue(key)) {\n const existingValue = element.getValue(key);\n if (existingValue.liveStyle === true) {\n existingValue.jump(nextValue);\n }\n else if (!existingValue.hasAnimated) {\n existingValue.set(nextValue);\n }\n }\n else {\n const latestValue = element.getStaticValue(key);\n element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element }));\n }\n }\n }\n // Handle removed values\n for (const key in prev) {\n if (next[key] === undefined)\n element.removeValue(key);\n }\n return next;\n}\n\nexport { updateMotionValuesFromProps };\n","import { KeyframeResolver, time, frame, isMotionValue, cancelFrame, transformProps, motionValue, findValueType, complex, getAnimatableNone } from 'motion-dom';\nimport { warnOnce, isNumericalString, isZeroValueString, SubscriptionManager } from 'motion-utils';\nimport { featureDefinitions } from '../motion/features/definitions.mjs';\nimport { createBox } from '../projection/geometry/models.mjs';\nimport { initPrefersReducedMotion } from '../utils/reduced-motion/index.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from '../utils/reduced-motion/state.mjs';\nimport { visualElementStore } from './store.mjs';\nimport { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { resolveVariantFromProps } from './utils/resolve-variants.mjs';\n\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n];\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nclass VisualElement {\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {\n return {};\n }\n constructor({ parent, props, presenceContext, reducedMotionConfig, blockInitialAnimation, visualState, }, options = {}) {\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n this.current = null;\n /**\n * A set containing references to this VisualElement's children.\n */\n this.children = new Set();\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n this.isVariantNode = false;\n this.isControllingVariants = false;\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n this.shouldReduceMotion = null;\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n this.values = new Map();\n this.KeyframeResolver = KeyframeResolver;\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n this.features = {};\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n this.valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n this.prevMotionValues = {};\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n this.propEventSubscriptions = {};\n this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n this.render = () => {\n if (!this.current)\n return;\n this.triggerBuild();\n this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n };\n this.renderScheduledAt = 0.0;\n this.scheduleRender = () => {\n const now = time.now();\n if (this.renderScheduledAt < now) {\n this.renderScheduledAt = now;\n frame.render(this.render, false, true);\n }\n };\n const { latestValues, renderState } = visualState;\n this.latestValues = latestValues;\n this.baseTarget = { ...latestValues };\n this.initialValues = props.initial ? { ...latestValues } : {};\n this.renderState = renderState;\n this.parent = parent;\n this.props = props;\n this.presenceContext = presenceContext;\n this.depth = parent ? parent.depth + 1 : 0;\n this.reducedMotionConfig = reducedMotionConfig;\n this.options = options;\n this.blockInitialAnimation = Boolean(blockInitialAnimation);\n this.isControllingVariants = isControllingVariants(props);\n this.isVariantNode = isVariantNode(props);\n if (this.isVariantNode) {\n this.variantChildren = new Set();\n }\n this.manuallyAnimateOnMount = Boolean(parent && parent.current);\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't necessarily a breaking change,\n * more a reflection of the test.\n */\n const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key], false);\n }\n }\n }\n mount(instance) {\n this.current = instance;\n visualElementStore.set(instance, this);\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance);\n }\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this);\n }\n this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion();\n }\n this.shouldReduceMotion =\n this.reducedMotionConfig === \"never\"\n ? false\n : this.reducedMotionConfig === \"always\"\n ? true\n : prefersReducedMotion.current;\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\");\n }\n if (this.parent)\n this.parent.children.add(this);\n this.update(this.props, this.presenceContext);\n }\n unmount() {\n this.projection && this.projection.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.valueSubscriptions.clear();\n this.removeFromVariantTree && this.removeFromVariantTree();\n this.parent && this.parent.children.delete(this);\n for (const key in this.events) {\n this.events[key].clear();\n }\n for (const key in this.features) {\n const feature = this.features[key];\n if (feature) {\n feature.unmount();\n feature.isMounted = false;\n }\n }\n this.current = null;\n }\n bindToMotionValue(key, value) {\n if (this.valueSubscriptions.has(key)) {\n this.valueSubscriptions.get(key)();\n }\n const valueIsTransform = transformProps.has(key);\n if (valueIsTransform && this.onBindTransform) {\n this.onBindTransform();\n }\n const removeOnChange = value.on(\"change\", (latestValue) => {\n this.latestValues[key] = latestValue;\n this.props.onUpdate && frame.preRender(this.notifyUpdate);\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true;\n }\n });\n const removeOnRenderRequest = value.on(\"renderRequest\", this.scheduleRender);\n let removeSyncCheck;\n if (window.MotionCheckAppearSync) {\n removeSyncCheck = window.MotionCheckAppearSync(this, key, value);\n }\n this.valueSubscriptions.set(key, () => {\n removeOnChange();\n removeOnRenderRequest();\n if (removeSyncCheck)\n removeSyncCheck();\n if (value.owner)\n value.stop();\n });\n }\n sortNodePosition(other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type) {\n return 0;\n }\n return this.sortInstanceNodePosition(this.current, other.current);\n }\n updateFeatures() {\n let key = \"animation\";\n for (key in featureDefinitions) {\n const featureDefinition = featureDefinitions[key];\n if (!featureDefinition)\n continue;\n const { isEnabled, Feature: FeatureConstructor } = featureDefinition;\n /**\n * If this feature is enabled but not active, make a new instance.\n */\n if (!this.features[key] &&\n FeatureConstructor &&\n isEnabled(this.props)) {\n this.features[key] = new FeatureConstructor(this);\n }\n /**\n * If we have a feature, mount or update it.\n */\n if (this.features[key]) {\n const feature = this.features[key];\n if (feature.isMounted) {\n feature.update();\n }\n else {\n feature.mount();\n feature.isMounted = true;\n }\n }\n }\n }\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.props);\n }\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox();\n }\n getStaticValue(key) {\n return this.latestValues[key];\n }\n setStaticValue(key, value) {\n this.latestValues[key] = value;\n }\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(props, presenceContext) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender();\n }\n this.prevProps = this.props;\n this.props = props;\n this.prevPresenceContext = this.presenceContext;\n this.presenceContext = presenceContext;\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i];\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]();\n delete this.propEventSubscriptions[key];\n }\n const listenerName = (\"on\" + key);\n const listener = props[listenerName];\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key, listener);\n }\n }\n this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps, this), this.prevMotionValues);\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue();\n }\n }\n getProps() {\n return this.props;\n }\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name) {\n return this.props.variants ? this.props.variants[name] : undefined;\n }\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition;\n }\n getTransformPagePoint() {\n return this.props.transformPagePoint;\n }\n getClosestVariantNode() {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined;\n }\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child) {\n const closestVariantNode = this.getClosestVariantNode();\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child);\n return () => closestVariantNode.variantChildren.delete(child);\n }\n }\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key, value) {\n // Remove existing value if it exists\n const existingValue = this.values.get(key);\n if (value !== existingValue) {\n if (existingValue)\n this.removeValue(key);\n this.bindToMotionValue(key, value);\n this.values.set(key, value);\n this.latestValues[key] = value.get();\n }\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n const unsubscribe = this.valueSubscriptions.get(key);\n if (unsubscribe) {\n unsubscribe();\n this.valueSubscriptions.delete(key);\n }\n delete this.latestValues[key];\n this.removeValueFromRenderState(key, this.renderState);\n }\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key) {\n return this.values.has(key);\n }\n getValue(key, defaultValue) {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key];\n }\n let value = this.values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this });\n this.addValue(key, value);\n }\n return value;\n }\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key, target) {\n let value = this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : this.getBaseTargetFromProps(this.props, key) ??\n this.readValueFromInstance(this.current, key, this.options);\n if (value !== undefined && value !== null) {\n if (typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n }\n else if (!findValueType(value) && complex.test(target)) {\n value = getAnimatableNone(key, target);\n }\n this.setBaseTarget(key, isMotionValue(value) ? value.get() : value);\n }\n return isMotionValue(value) ? value.get() : value;\n }\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key, value) {\n this.baseTarget[key] = value;\n }\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key) {\n const { initial } = this.props;\n let valueFromInitial;\n if (typeof initial === \"string\" || typeof initial === \"object\") {\n const variant = resolveVariantFromProps(this.props, initial, this.presenceContext?.custom);\n if (variant) {\n valueFromInitial = variant[key];\n }\n }\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial;\n }\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key];\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n return this.events[eventName].add(callback);\n }\n notify(eventName, ...args) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args);\n }\n }\n}\n\nexport { VisualElement };\n","import { DOMKeyframesResolver, isMotionValue } from 'motion-dom';\nimport { VisualElement } from '../VisualElement.mjs';\n\nclass DOMVisualElement extends VisualElement {\n constructor() {\n super(...arguments);\n this.KeyframeResolver = DOMKeyframesResolver;\n }\n sortInstanceNodePosition(a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n }\n getBaseTargetFromProps(props, key) {\n return props.style\n ? props.style[key]\n : undefined;\n }\n removeValueFromRenderState(key, { vars, style }) {\n delete vars[key];\n delete style[key];\n }\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription();\n delete this.childSubscription;\n }\n const { children } = this.props;\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current) {\n this.current.textContent = `${latest}`;\n }\n });\n }\n }\n}\n\nexport { DOMVisualElement };\n","function renderHTML(element, { style, vars }, styleProp, projection) {\n Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));\n // Loop over any CSS variables and assign those.\n for (const key in vars) {\n element.style.setProperty(key, vars[key]);\n }\n}\n\nexport { renderHTML };\n","import { transformProps, defaultTransformValue, readTransformValue, isCSSVariableName } from 'motion-dom';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\nclass HTMLVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"html\";\n this.renderInstance = renderHTML;\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n return this.projection?.isProjecting\n ? defaultTransformValue(key)\n : readTransformValue(instance, key);\n }\n else {\n const computedStyle = getComputedStyle(instance);\n const value = (isCSSVariableName(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key]) || 0;\n return typeof value === \"string\" ? value.trim() : value;\n }\n }\n measureInstanceViewportBox(instance, { transformPagePoint }) {\n return measureViewportBox(instance, transformPagePoint);\n }\n build(renderState, latestValues, props) {\n buildHTMLStyles(renderState, latestValues, props.transformTemplate);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n}\n\nexport { HTMLVisualElement, getComputedStyle };\n","/**\n * A set of attribute names that are always read/written as camel case.\n */\nconst camelCaseAttributes = new Set([\n \"baseFrequency\",\n \"diffuseConstant\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keySplines\",\n \"keyTimes\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerWidth\",\n \"numOctaves\",\n \"targetX\",\n \"targetY\",\n \"surfaceScale\",\n \"specularConstant\",\n \"specularExponent\",\n \"stdDeviation\",\n \"tableValues\",\n \"viewBox\",\n \"gradientTransform\",\n \"pathLength\",\n \"startOffset\",\n \"textLength\",\n \"lengthAdjust\",\n]);\n\nexport { camelCaseAttributes };\n","import { camelToDash } from '../../dom/utils/camel-to-dash.mjs';\nimport { renderHTML } from '../../html/utils/render.mjs';\nimport { camelCaseAttributes } from './camel-case-attrs.mjs';\n\nfunction renderSVG(element, renderState, _styleProp, projection) {\n renderHTML(element, renderState, undefined, projection);\n for (const key in renderState.attrs) {\n element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n }\n}\n\nexport { renderSVG };\n","import { transformProps, getDefaultValueType } from 'motion-dom';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\n\nclass SVGVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"svg\";\n this.isSVGTag = false;\n this.measureInstanceViewportBox = createBox;\n }\n getBaseTargetFromProps(props, key) {\n return props[key];\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return instance.getAttribute(key);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n build(renderState, latestValues, props) {\n buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate, props.style);\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderSVG(instance, renderState, styleProp, projection);\n }\n mount(instance) {\n this.isSVGTag = isSVGTag(instance.tagName);\n super.mount(instance);\n }\n}\n\nexport { SVGVisualElement };\n","import { Fragment } from 'react';\nimport { HTMLVisualElement } from '../html/HTMLVisualElement.mjs';\nimport { SVGVisualElement } from '../svg/SVGVisualElement.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\n\nconst createDomVisualElement = (Component, options) => {\n return isSVGComponent(Component)\n ? new SVGVisualElement(options)\n : new HTMLVisualElement(options, {\n allowProjection: Component !== Fragment,\n });\n};\n\nexport { createDomVisualElement };\n","import { animations } from '../../../motion/features/animations.mjs';\nimport { drag } from '../../../motion/features/drag.mjs';\nimport { gestureAnimations } from '../../../motion/features/gestures.mjs';\nimport { layout } from '../../../motion/features/layout.mjs';\nimport { createMotionComponentFactory } from '../create-factory.mjs';\nimport { createDomVisualElement } from '../../dom/create-visual-element.mjs';\n\nconst createMotionComponent = /*@__PURE__*/ createMotionComponentFactory({\n ...animations,\n ...gestureAnimations,\n ...drag,\n ...layout,\n}, createDomVisualElement);\n\nexport { createMotionComponent };\n","import { createDOMMotionComponentProxy } from '../create-proxy.mjs';\nimport { createMotionComponent } from './create.mjs';\n\nconst motion = /*@__PURE__*/ createDOMMotionComponentProxy(createMotionComponent);\n\nexport { motion };\n","export const errorVariants = {\n initial: { opacity: 0, height: 0 },\n animate: { opacity: 1, height: 'auto' },\n exit: { opacity: 0, height: 0 },\n transition: {\n height: { duration: 0.2 },\n opacity: { duration: 0.2 },\n },\n}\n\nexport const lableVariants = {\n initial: { opacity: 0, height: 0 },\n animate: { opacity: 1, height: 'auto' },\n exit: { opacity: 0, height: 0 },\n transition: {\n height: { duration: 0.2 },\n opacity: { duration: 0.2 },\n },\n}\n","import {\n FC,\n InputHTMLAttributes,\n ReactNode,\n useCallback,\n useRef,\n useState,\n FocusEventHandler,\n CSSProperties,\n} from 'react'\nimport styles from './input.module.css'\nimport clsx from 'clsx'\nimport { motion, AnimatePresence } from 'framer-motion'\nimport { errorVariants, lableVariants } from './input.constants'\n\nexport type InputStyles = {\n field?: {\n styles?: CSSProperties\n className?: string\n }\n label?: {\n styles?: CSSProperties\n className?: string\n }\n error?: {\n styles?: CSSProperties\n className?: string\n }\n container?: {\n styles?: CSSProperties\n className?: string\n focus?: string\n }\n}\n\ntype Props = InputHTMLAttributes<HTMLInputElement> & {\n labelError?: string\n label?: string\n error?: string\n endContent?: ReactNode\n styles?: InputStyles\n}\n\nexport const Input: FC<Props> = ({\n label,\n error,\n labelError,\n endContent,\n styles: customStyles,\n onFocus,\n onBlur,\n ...props\n}: Props) => {\n const ref = useRef<HTMLInputElement>(null)\n const [focus, setFocus] = useState(false)\n const isError = error || labelError\n const handleFocus = useCallback(() => ref.current?.focus(), [])\n const handleInputFocus: FocusEventHandler<HTMLInputElement> = useCallback(\n (e) => {\n setFocus(true)\n onFocus?.(e)\n },\n [onFocus],\n )\n const handleInputBlur: FocusEventHandler<HTMLInputElement> = useCallback(\n (e) => {\n setFocus(false)\n onBlur?.(e)\n },\n [onBlur],\n )\n\n const focusClass = !isError && focus && (customStyles?.container?.focus || styles.inputFocus)\n return (\n <div>\n {label && (\n <label\n htmlFor={props.id}\n className={clsx(styles.label, customStyles?.label?.className)}\n style={customStyles?.label?.styles}\n >\n <span key={label} className={styles.label}>\n {label}\n </span>\n <AnimatePresence mode='wait'>\n {labelError && (\n <motion.span\n key={error}\n initial={lableVariants.initial}\n animate={lableVariants.animate}\n exit={lableVariants.exit}\n transition={lableVariants.transition}\n className={styles.labelError}\n >\n {labelError}\n </motion.span>\n )}\n </AnimatePresence>\n </label>\n )}\n\n <div\n className={clsx(\n styles.inputContainer,\n isError && styles.errorInput,\n focusClass,\n customStyles?.container?.className,\n )}\n style={customStyles?.container?.styles}\n onClick={handleFocus}\n >\n <input\n {...props}\n ref={ref}\n onFocus={handleInputFocus}\n onBlur={handleInputBlur}\n style={customStyles?.field?.styles}\n className={clsx(styles.input, props.className, customStyles?.field?.className)}\n />\n {endContent && <div className={styles.endContent}>{endContent}</div>}\n </div>\n\n <AnimatePresence mode='wait'>\n {error && (\n <motion.div\n initial={errorVariants.initial}\n animate={errorVariants.animate}\n exit={errorVariants.exit}\n transition={errorVariants.transition}\n className={clsx(styles.error, customStyles?.error?.className)}\n style={customStyles?.error?.styles}\n >\n {error}\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n )\n}\n","import { FC } from 'react'\n\nconst styles = {\n width: 16,\n height: 16,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n}\n\nexport const IconWarning: FC<{ className?: string }> = ({ className }) => {\n return (\n <div style={styles}>\n <svg className={className} focusable='false' fill='#dc2626' color='#dc2626' height='12' viewBox='0 0 12 12' width='12'>\n <g fill='none' fillRule='evenodd' transform='matrix(1 0 0 -1 0 12)'>\n <circle cx='6' cy='3.2' fill='currentColor' r='1'></circle>\n <g stroke='currentColor'>\n <circle cx='6' cy='6' r='5.5'></circle>\n <path d='m6 9.2v-3.2' strokeLinecap='round' strokeLinejoin='round'></path>\n </g>\n </g>\n </svg>\n </div>\n )\n}\n","import { FC } from 'react'\n\nconst styles = {\n width: 30,\n height: 20,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n}\n\nconst svgStyles = {\n width: '100%',\n height: '100%',\n}\n\nexport const IconCardCVC: FC<{ className?: string }> = ({ className }) => {\n return (\n <div style={styles} className={className}>\n <svg style={svgStyles} focusable='false' viewBox='0 0 32 21' role='img' aria-label='CVC'>\n <title>CVC</title>\n <g fill='none' fillRule='evenodd'>\n <g fill='#565656'>\n <g transform='translate(0 2)'>\n <path\n d='M21.68 0H2c-.92 0-2 1.06-2 2v15c0 .94 1.08 2 2 2h25c.92 0 2-1.06 2-2V9.47a5.98 5.98 0 0 1-3 1.45V11c0 .66-.36 1-1 1H3c-.64 0-1-.34-1-1v-1c0-.66.36-1 1-1h17.53a5.98 5.98 0 0 1 1.15-9z'\n opacity='.2'\n ></path>\n <path d='M19.34 3H0v3h19.08a6.04 6.04 0 0 1 .26-3z' opacity='.3'></path>\n </g>\n <g transform='translate(18)'>\n <path d='M7 14A7 7 0 1 1 7 0a7 7 0 0 1 0 14zM4.22 4.1h-.79l-1.93.98v1l1.53-.8V9.9h1.2V4.1zm2.3.8c.57 0 .97.32.97.78 0 .5-.47.85-1.15.85h-.3v.85h.36c.72 0 1.21.36 1.21.88 0 .5-.48.84-1.16.84-.5 0-1-.16-1.52-.47v1c.56.24 1.12.37 1.67.37 1.31 0 2.21-.67 2.21-1.64 0-.68-.42-1.23-1.12-1.45.6-.2.99-.73.99-1.33C8.68 4.64 7.85 4 6.65 4a4 4 0 0 0-1.57.34v.98c.48-.27.97-.42 1.44-.42zm4.32 2.18c.73 0 1.24.43 1.24.99 0 .59-.51 1-1.24 1-.44 0-.9-.14-1.37-.43v1.03c.49.22.99.33 1.48.33.26 0 .5-.04.73-.1.52-.85.82-1.83.82-2.88l-.02-.42a2.3 2.3 0 0 0-1.23-.32c-.18 0-.37.01-.57.04v-1.3h1.44a5.62 5.62 0 0 0-.46-.92H9.64v3.15c.4-.1.8-.17 1.2-.17z'></path>\n </g>\n </g>\n </g>\n </svg>\n </div>\n )\n}\n","import { FC } from 'react'\n\nexport const IconBack: FC<{ className?: string }> = ({ className }) => {\n return (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n width='24'\n height='24'\n viewBox='0 0 24 24'\n fill='none'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n className={className}\n >\n <polyline points='15 18 9 12 15 6'></polyline>\n </svg>\n )\n}\n","import { FC } from 'react'\n\nconst styles = {\n width: 30,\n height: 20,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n}\n\nconst svgStyles = {\n width: '100%',\n height: '100%',\n}\n\nexport const IconCard: FC<{ className?: string }> = ({ className }) => {\n return (\n <div style={styles} className={className}>\n <svg\n xmlns='http://www.w3.org/2000/svg'\n viewBox='0 0 30 20'\n fill='none'\n stroke='currentColor'\n strokeWidth='2'\n strokeLinecap='round'\n strokeLinejoin='round'\n style={svgStyles}\n >\n <rect x='1' y='1' width='28' height='18' rx='2' ry='2'></rect>\n <line x1='1' y1='8' x2='27' y2='8'></line>\n </svg>\n </div>\n )\n}\n","import { FC } from 'react'\n\nconst styles = {\n width: 30,\n height: 20,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n}\n\nconst svgStyles = {\n width: '100%',\n height: '100%',\n}\n\nexport const IconVisa: FC<{ className?: string }> = ({ className }) => {\n return (\n <div style={styles} className={className}>\n <svg\n xmlns='http://www.w3.org/2000/svg'\n xmlnsXlink='http://www.w3.org/1999/xlink'\n width='24px'\n height='16px'\n viewBox='0 0 24 16'\n version='1.1'\n style={svgStyles}\n >\n <g id='319' stroke='none' strokeWidth='1' fill='none' fillRule='evenodd'>\n <g id='New-Icons' transform='translate(-80.000000, -280.000000)' fillRule='nonzero'>\n <g id='Card-Brands' transform='translate(40.000000, 200.000000)'>\n <g id='Color' transform='translate(0.000000, 80.000000)'>\n <g id='Visa' transform='translate(40.000000, 0.000000)'>\n <rect\n id='Container'\n strokeOpacity='0.2'\n stroke='#000000'\n strokeWidth='0.5'\n fill='#FFFFFF'\n x='0.25'\n y='0.25'\n width='23.5'\n height='15.5'\n rx='2'\n />\n <path\n d='M2.78773262,5.91443732 C2.26459089,5.62750595 1.6675389,5.39673777 1,5.23659312 L1.0280005,5.1118821 L3.76497922,5.1118821 C4.13596254,5.12488556 4.43699113,5.23650585 4.53494636,5.63071135 L5.12976697,8.46659052 L5.31198338,9.32072617 L6.97796639,5.1118821 L8.77678896,5.1118821 L6.10288111,11.2775284 L4.30396552,11.2775284 L2.78773262,5.91443732 L2.78773262,5.91443732 Z M10.0999752,11.2840738 L8.39882877,11.2840738 L9.46284763,5.1118821 L11.163901,5.1118821 L10.0999752,11.2840738 Z M16.2667821,5.26277458 L16.0354292,6.59558538 L15.881566,6.53004446 C15.5737466,6.40524617 15.1674138,6.28053516 14.6143808,6.29371316 C13.942741,6.29371316 13.6415263,6.56277129 13.6345494,6.82545859 C13.6345494,7.11441463 13.998928,7.3048411 14.5939153,7.58725177 C15.5740257,8.02718756 16.0286384,8.56556562 16.0218476,9.26818871 C16.0080799,10.5486366 14.8460128,11.376058 13.0610509,11.376058 C12.2978746,11.3694253 11.5627918,11.2180965 11.163808,11.0475679 L11.4018587,9.66204513 L11.6258627,9.76066195 C12.1788958,9.99070971 12.5428092,10.0889775 13.221984,10.0889775 C13.7117601,10.0889775 14.2368857,9.89837643 14.2435835,9.48488392 C14.2435835,9.21565125 14.0198586,9.01850486 13.3617074,8.7164581 C12.717789,8.42086943 11.8568435,7.92848346 11.8707973,7.04197926 C11.8780532,5.84042483 13.0610509,5 14.7409877,5 C15.3990458,5 15.9312413,5.13788902 16.2667821,5.26277458 Z M18.5277524,9.0974856 L19.941731,9.0974856 C19.8717762,8.78889347 19.549631,7.31147374 19.549631,7.31147374 L19.4307452,6.77964104 C19.3467437,7.00942698 19.1998574,7.38373457 19.2069273,7.37055657 C19.2069273,7.37055657 18.6678479,8.74290137 18.5277524,9.0974856 Z M20.6276036,5.1118821 L22,11.2839865 L20.4249023,11.2839865 C20.4249023,11.2839865 20.2707601,10.5748181 20.221922,10.3581228 L18.0377903,10.3581228 C17.9746264,10.5221933 17.6807607,11.2839865 17.6807607,11.2839865 L15.8957988,11.2839865 L18.4226343,5.62399144 C18.5977072,5.22341512 18.9059917,5.1118821 19.3117663,5.1118821 L20.6276036,5.1118821 L20.6276036,5.1118821 Z'\n id='Shape'\n fill='#1434CB'\n />\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </div>\n )\n}\n","import { FC } from 'react'\n\nconst styles = {\n width: 30,\n height: 20,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n}\n\nconst svgStyles = {\n width: '100%',\n height: '100%',\n}\n\nexport const IconMastercard: FC<{ className?: string }> = ({ className }) => {\n return (\n <div style={styles} className={className}>\n <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' style={svgStyles}>\n <g fill='none' fillRule='evenodd'>\n <rect fill='#252525' height='16' rx='2' width='24' />\n <circle cx='9' cy='8' fill='#eb001b' r='5' />\n <circle cx='15' cy='8' fill='#f79e1b' r='5' />\n <path\n d='m12 3.99963381c1.2144467.91220633 2 2.36454836 2 4.00036619s-.7855533 3.0881599-2 4.0003662c-1.2144467-.9122063-2-2.36454837-2-4.0003662s.7855533-3.08815986 2-4.00036619z'\n fill='#ff5f00'\n />\n </g>\n </svg>\n </div>\n )\n}\n","import { FC } from 'react'\n\nconst styles = {\n width: 30,\n height: 20,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n}\n\nconst svgStyles = {\n width: '100%',\n height: '100%',\n}\n\nexport const IconDinersClub: FC<{ className?: string }> = ({ className }) => {\n return (\n <div style={styles} className={className}>\n <svg\n xmlns='http://www.w3.org/2000/svg'\n xmlnsXlink='http://www.w3.org/1999/xlink'\n width='24px'\n height='16px'\n viewBox='0 0 24 16'\n version='1.1'\n style={svgStyles}\n >\n <g id='319' stroke='none' strokeWidth='1' fill='none' fillRule='evenodd'>\n <g id='New-Icons' transform='translate(-320.000000, -280.000000)' fillRule='nonzero'>\n <g id='Card-Brands' transform='translate(40.000000, 200.000000)'>\n <g id='Color' transform='translate(0.000000, 80.000000)'>\n <g id='Diners-Club' transform='translate(280.000000, 0.000000)'>\n <path\n d='M21.9972414,15.749927 L21.999381,15.7499362 C22.9544683,15.7581106 23.73806,14.9772525 23.75,14.0041555 L23.7500083,2.00630219 C23.7461702,1.53568921 23.5588633,1.08617106 23.2297297,0.756801782 C22.9014319,0.428268884 22.4589161,0.246148853 21.9972414,0.250070854 L2.00063,0.250061791 C1.54108393,0.246148853 1.09856813,0.428268884 0.77027028,0.756801782 C0.441136651,1.08617106 0.253829819,1.53568921 0.25,2.00426336 L0.249991686,13.9936957 C0.253829819,14.4643086 0.441136651,14.9138268 0.77027028,15.2431961 C1.09856813,15.571729 1.54108393,15.753849 2.00275862,15.749927 L21.9972414,15.749927 Z M21.996203,16.249927 C21.9958359,16.249924 21.9954688,16.249921 21.9951018,16.2499178 L21.9972414,16.249927 L21.996203,16.249927 Z'\n id='shape'\n strokeOpacity='0.2'\n stroke='#000000'\n strokeWidth='0.5'\n fill='#FFFFFF'\n />\n <path\n d='M10.0021142,2.05179033 L10.0021142,2.03579033 L14.0021142,2.03579033 L14.0021142,2.05179033 C17.1375481,2.28122918 19.5642283,4.89197286 19.5642283,8.03579033 C19.5642283,11.1796078 17.1375481,13.7903515 14.0021142,14.0197903 L14.0021142,14.0357903 L10.0021142,14.0357903 L10.0021142,14.0197903 C6.86668021,13.7903515 4.44,11.1796078 4.44,8.03579033 C4.44,4.89197286 6.86668021,2.28122918 10.0021142,2.05179033 Z'\n id='shape'\n fill='#0165AC'\n />\n <path\n d='M11.6021142,11.4277903 C13.0374002,10.9175027 13.9961556,9.55908923 13.9961556,8.03579033 C13.9961556,6.51249143 13.0374002,5.15407792 11.6021142,4.64379033 L11.6021142,11.4277903 L11.6021142,11.4277903 Z M9.20211417,4.64379033 C7.76682809,5.15407792 6.80807271,6.51249143 6.80807271,8.03579033 C6.80807271,9.55908923 7.76682809,10.9175027 9.20211417,11.4277903 L9.20211417,4.64379033 L9.20211417,4.64379033 Z M10.4021142,13.2357903 C7.53023347,13.2357903 5.20211417,10.907671 5.20211417,8.03579033 C5.20211417,5.16390963 7.53023347,2.83579033 10.4021142,2.83579033 C13.2739949,2.83579033 15.6021142,5.16390963 15.6021142,8.03579033 C15.6021142,10.907671 13.2739949,13.2357903 10.4021142,13.2357903 Z'\n id='shape'\n fill='#FFFFFF'\n />\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </div>\n )\n}\n","import { FC } from 'react'\n\nconst styles = {\n width: 30,\n height: 20,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n}\n\nconst svgStyles = {\n width: '100%',\n height: '100%',\n}\n\nexport const IconJcb: FC<{ className?: string }> = ({ className }) => {\n return (\n <div style={styles} className={className}>\n <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 23 16' width='23' style={svgStyles}>\n <g fill='none'>\n <path\n d='m.20535714 16h4.51785715c1.0278125 0 2.25892857-1.1946667 2.25892857-2.1333333v-13.8666667h-4.51785715c-1.0278125 0-2.25892857 1.19466667-2.25892857 3.2z'\n fill='#047ab1'\n />\n <path\n d='m2.76924107 10.816c-.86733559.0001606-1.73039558-.1147397-2.56388393-.3413333v-1.17333337c.64678874.37770431 1.38610045.59084099 2.14598215.61866667.8696875 0 1.35535714-.576 1.35535714-1.36533333v-3.22133334h2.14598214v3.22133334c0 1.25866666-.70026786 2.26133333-3.0834375 2.26133333z'\n fill='#fff'\n />\n <path\n d='m8.11160714 16h4.51785716c1.0278125 0 2.2589286-1.1946667 2.2589286-2.1333333v-13.8666667h-4.5178572c-1.02781249 0-2.25892856 1.19466667-2.25892856 3.2z'\n fill='#d42d06'\n />\n <path\n d='m8.11160714 6.08c.65508929-.59733333 1.78455357-.97066667 3.61428576-.88533333.9939285.04266666 2.0330357.32 2.0330357.32v1.184c-.5943231-.3394747-1.2623758-.54734656-1.9539732-.608-1.3892411-.11733334-2.23633933.61866666-2.23633933 1.90933333s.84709823 2.0266667 2.23633933 1.92c.6920185-.06606555 1.3596342-.27744592 1.9539732-.61866667v1.17333337s-1.0391072.288-2.0330357.3306666c-1.82973219.0853334-2.95919647-.288-3.61428576-.8853333z'\n fill='#fff'\n />\n <path\n d='m16.0178571 16h4.5178572c1.0278125 0 2.2589286-1.1946667 2.2589286-2.1333333v-13.8666667h-4.5178572c-1.0278125 0-2.2589286 1.19466667-2.2589286 3.2z'\n fill='#67b637'\n />\n <path\n d='m21.6651786 9.28c0 .8533333-.7002679 1.3866667-1.6377232 1.3866667h-4.0095983v-5.33333337h3.6481697l.2597768.01066667c.8245089.04266667 1.4344196.50133333 1.4344196 1.29066667 0 .61866666-.4179018 1.152-1.1746428 1.28v.032c.8358035.05333333 1.4795982.55466666 1.4795982 1.33333333zm-2.880134-3.104c-.0486104-.00686658-.0976798-.01043129-.1468303-.01066667h-1.3553572v1.344h1.5021875c.2823661-.064.5195536-.30933333.5195536-.672 0-.36266666-.2371875-.608-.5195536-.66133333zm.1694197 2.176c-.059755-.00886168-.1202559-.01243275-.1807143-.01066667h-1.4908929v1.46133334h1.4908929l.1807143-.02133334c.2823661-.064.5195536-.34133333.5195536-.71466666 0-.37333334-.2258929-.64-.5195536-.71466667z'\n fill='#fff'\n />\n </g>\n </svg>\n </div>\n )\n}\n","import { FC } from 'react'\n\nconst styles = {\n width: 30,\n height: 20,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n}\n\nconst svgStyles = {\n width: '100%',\n height: '100%',\n}\n\nexport const IconDiscover: FC<{ className?: string }> = ({ className }) => {\n return (\n <div style={styles} className={className}>\n <svg\n xmlns='http://www.w3.org/2000/svg'\n xmlnsXlink='http://www.w3.org/1999/xlink'\n width='24px'\n height='16px'\n viewBox='0 0 24 16'\n version='1.1'\n style={svgStyles}\n >\n <g id='319' stroke='none' strokeWidth='1' fill='none' fillRule='evenodd'>\n <g id='New-Icons' transform='translate(-280.000000, -280.000000)' fillRule='nonzero'>\n <g id='Card-Brands' transform='translate(40.000000, 200.000000)'>\n <g id='Color' transform='translate(0.000000, 80.000000)'>\n <g id='Discover' transform='translate(240.000000, 0.000000)'>\n <path\n d='M21.9972414,15.749927 L21.999381,15.7499362 C22.9544683,15.7581106 23.73806,14.9772525 23.75,14.0041555 L23.7500083,2.00630219 C23.7461702,1.53568921 23.5588633,1.08617106 23.2297297,0.756801782 C22.9014319,0.428268884 22.4589161,0.246148853 21.9972414,0.250070854 L2.00063,0.250061791 C1.54108393,0.246148853 1.09856813,0.428268884 0.77027028,0.756801782 C0.441136651,1.08617106 0.253829819,1.53568921 0.25,2.00426336 L0.249991686,13.9936957 C0.253829819,14.4643086 0.441136651,14.9138268 0.77027028,15.2431961 C1.09856813,15.571729 1.54108393,15.753849 2.00275862,15.749927 L21.9972414,15.749927 Z M21.996203,16.249927 C21.9958359,16.249924 21.9954688,16.249921 21.9951018,16.2499178 L21.9972414,16.249927 L21.996203,16.249927 Z'\n id='shape'\n strokeOpacity='0.2'\n stroke='#000000'\n strokeWidth='0.5'\n fill='#FFFFFF'\n />\n <path\n d='M12.6124138,15.9999283 L21.9972414,15.9999283 C22.5240217,16.0043364 23.0309756,15.7992919 23.4065697,15.4299059 C23.7821638,15.06052 23.9956285,14.5570537 24,14.0302731 L24,11.6716524 C20.4561668,13.7059622 16.6127929,15.1667795 12.6124138,15.9999283 L12.6124138,15.9999283 Z'\n id='shape'\n fill='#F27712'\n />\n <path\n d='M23.1724138,9.29647999 L22.32,9.29647999 L21.36,8.03027309 L21.2689655,8.03027309 L21.2689655,9.29647999 L20.5737931,9.29647999 L20.5737931,6.1516524 L21.6,6.1516524 C22.4027586,6.1516524 22.8662069,6.48268688 22.8662069,7.07854895 C22.8662069,7.56682481 22.5765517,7.88130757 22.0551724,7.98061792 L23.1724138,9.29647999 Z M22.1462069,7.10337654 C22.1462069,6.79716964 21.9144828,6.63992826 21.4841379,6.63992826 L21.2689655,6.63992826 L21.2689655,7.5916524 L21.4675862,7.5916524 C21.9144828,7.5916524 22.1462069,7.42613516 22.1462069,7.10337654 L22.1462069,7.10337654 Z M18.1406897,6.1516524 L20.1103448,6.1516524 L20.1103448,6.68130757 L18.8358621,6.68130757 L18.8358621,7.38475585 L20.0606897,7.38475585 L20.0606897,7.92268688 L18.8358621,7.92268688 L18.8358621,8.77510068 L20.1103448,8.77510068 L20.1103448,9.30475585 L18.1406897,9.30475585 L18.1406897,6.1516524 Z M15.9062069,9.37923861 L14.4,6.14337654 L15.1613793,6.14337654 L16.1131034,8.26199723 L17.0731034,6.14337654 L17.817931,6.14337654 L16.2951724,9.37923861 L15.9227586,9.37923861 L15.9062069,9.37923861 Z M9.60827586,9.37096274 C8.54896552,9.37096274 7.72137931,8.65096274 7.72137931,7.71579033 C7.72137931,6.8054455 8.56551724,6.06889378 9.62482759,6.06889378 C9.92275862,6.06889378 10.1710345,6.12682481 10.4772414,6.25923861 L10.4772414,6.98751447 C10.2453534,6.75969251 9.93335245,6.63192067 9.60827586,6.6316524 C8.9462069,6.6316524 8.44137931,7.1116524 8.44137931,7.71579033 C8.44137931,8.35303171 8.93793103,8.80820412 9.64137931,8.80820412 C9.95586207,8.80820412 10.1958621,8.70889378 10.4772414,8.46061792 L10.4772414,9.18889378 C10.1627586,9.32130757 9.89793103,9.37096274 9.60827586,9.37096274 L9.60827586,9.37096274 Z M7.5062069,8.33647999 C7.5062069,8.94889378 7.00137931,9.37096274 6.27310345,9.37096274 C5.74344828,9.37096274 5.36275862,9.18889378 5.04,8.77510068 L5.49517241,8.38613516 C5.65241379,8.66751447 5.91724138,8.80820412 6.24827586,8.80820412 C6.56275862,8.80820412 6.7862069,8.6178593 6.7862069,8.36958343 C6.7862069,8.22889378 6.72,8.12130757 6.57931034,8.03854895 C6.42504922,7.96369158 6.26441119,7.90275992 6.09931034,7.85647999 C5.44551724,7.64958343 5.22206897,7.42613516 5.22206897,6.98751447 C5.22206897,6.47441102 5.70206897,6.0854455 6.33103448,6.0854455 C6.72827586,6.0854455 7.08413793,6.20958343 7.38206897,6.44130757 L7.01793103,6.85510068 C6.87360928,6.69688076 6.66932728,6.60675635 6.45517241,6.60682481 C6.15724138,6.60682481 5.94206897,6.75579033 5.94206897,6.95441102 C5.94206897,7.11992826 6.0662069,7.21096274 6.48,7.3516524 C7.27448276,7.59992826 7.5062069,7.8316524 7.5062069,8.34475585 L7.5062069,8.33647999 Z M4.08827586,6.1516524 L4.78344828,6.1516524 L4.78344828,9.30475585 L4.08827586,9.30475585 L4.08827586,6.1516524 Z M1.8537931,9.30475585 L0.827586207,9.30475585 L0.827586207,6.1516524 L1.8537931,6.1516524 C2.97931034,6.1516524 3.75724138,6.79716964 3.75724138,7.72406619 C3.75724138,8.19579033 3.52551724,8.64268688 3.12,8.94061792 C2.77241379,9.18889378 2.38344828,9.30475585 1.84551724,9.30475585 L1.8537931,9.30475585 Z M2.66482759,6.9378593 C2.43310345,6.75579033 2.16827586,6.68958343 1.71310345,6.68958343 L1.52275862,6.68958343 L1.52275862,8.77510068 L1.71310345,8.77510068 C2.16,8.77510068 2.44137931,8.69234206 2.66482759,8.52682481 C2.90482759,8.32820412 3.04551724,8.03027309 3.04551724,7.72406619 C3.04551724,7.4178593 2.90482759,7.12820412 2.66482759,6.9378593 Z'\n id='shape'\n fill='#000000'\n />\n <path\n d='M12.4137931,6.06889378 C11.5034483,6.06889378 10.7586207,6.79716964 10.7586207,7.69923861 C10.7586207,8.65923861 11.4703448,9.37923861 12.4137931,9.37923861 C13.3406897,9.37923861 14.0689655,8.65096274 14.0689655,7.72406619 C14.0689655,6.79716964 13.3489655,6.06889378 12.4137931,6.06889378 Z'\n id='shape'\n fill='#F27712'\n />\n </g>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </div>\n )\n}\n","import { FC } from 'react'\n\nconst styles = {\n width: 30,\n height: 20,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n}\n\nconst svgStyles = {\n width: '100%',\n height: '100%',\n}\n\nexport const IconAmex: FC<{ className?: string }> = ({ className }) => {\n return (\n <div style={styles} className={className}>\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' style={svgStyles}>\n <g fill='none' fillRule='evenodd'>\n <rect fill='#016fd0' height='16' rx='2' width='24' />\n <path\n d='m13.7640663 13.3938564v-5.70139231l10.1475359.00910497v1.57489503l-1.1728619 1.25339231 1.1728619 1.2648839v1.6083094h-1.8726188l-.9951823-1.0981657-.9881105 1.1023204z'\n fill='#fffffe'\n />\n <path\n d='m14.4418122 12.7687956v-4.448884h3.7722872v1.02488398h-2.550895v.69569062h2.4900774v1.0078232h-2.4900774v.6833149h2.550895v1.0371713z'\n fill='#016fd0'\n />\n <path\n d='m18.1952707 12.7687956 2.087337-2.2270055-2.0874254-2.2217901h1.6156464l1.2754917 1.41003315 1.2791161-1.41003315h1.5461657v.03500552l-2.0428729 2.18678458 2.0428729 2.1638895v.063116h-1.5617237l-1.2981216-1.4241768-1.2847735 1.4241768z'\n fill='#016fd0'\n />\n <path\n d='m14.2373481 2.6319558h2.4460552l.8591381 1.95085083v-1.95085083h3.0198453l.5207514 1.46156906.5225194-1.46156906h2.3059447v5.70139227h-12.1865193z'\n fill='#fffffe'\n />\n <g fill='#016fd0'>\n <path d='m14.7004641 3.25135912-1.9740111 4.44517127h1.3539006l.3724199-.89016575h2.0179447l.3721547.89016575h1.3875801l-1.96579-4.44517127zm.1696353 2.55743646.592-1.41507182.5915581 1.41507182z' />\n <path d='m18.2119779 7.69573481v-4.44508288l1.903116.00654144.9792707 2.73272928.9856354-2.73927072h1.8316022v4.44508288l-1.1786077.01043094v-3.05334807l-1.1125746 3.04291713h-1.0758011l-1.1356464-3.05334807v3.05334807z' />\n </g>\n </g>\n </svg>\n </div>\n )\n}\n","import { FC } from 'react'\n\nconst styles = {\n width: 30,\n height: 20,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n}\n\nconst svgStyles = {\n width: '100%',\n height: '100%',\n}\n\nexport const IconUnionPay: FC<{ className?: string }> = ({ className }) => {\n return (\n <div style={styles} className={className}>\n <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' style={svgStyles}>\n <g fill='none'>\n <path\n d='m4.54588254.00006676h5.79377466c.8087588 0 1.3117793.72566459 1.1231113 1.61890981l-2.69741608 12.74856503c-.19036262.8901361-1.00010994 1.6164225-1.80943362 1.6164225h-5.79320976c-.80762905 0-1.31177937-.7262864-1.12311135-1.6164225l2.69854581-12.74856503c.18866803-.89324522.9979917-1.61890981 1.80773904-1.61890981'\n fill='#dd2423'\n />\n <path\n d='m9.85756516.00006676h6.66269264c.8086174 0 .4439911.72566459.2537697 1.61890981l-2.6969924 12.74856503c-.1892329.8901361-.1302036 1.6164225-.9405158 1.6164225h-6.66269248c-.81031221 0-1.31177939-.7262864-1.12141672-1.6164225l2.69685116-12.74856503c.19149238-.89324522.99912144-1.61890981 1.8083039-1.61890981'\n fill='#16315e'\n />\n <path\n d='m16.2559813.00006676h5.7937745c.8098886 0 1.3129092.72566459 1.1226878 1.61890981l-2.6969924 12.74856503c-.1903626.8901361-1.0006749 1.6164225-1.8104222 1.6164225h-5.7910915c-.8103122 0-1.3129091-.7262864-1.1231113-1.6164225l2.697416-12.74856503c.1886681-.89324522.9974268-1.61890981 1.8077391-1.61890981'\n fill='#036862'\n />\n <path\n d='m6.05901135 4.08561434c-.59580116.00668457-.77175951 0-.8279645-.01461278-.02160646.11301588-.42365577 2.15460824-.42478553 2.15631824-.08656699.4130443-.14955043.7074763-.36349659.89759795-.12144798.1105286-.26323144.1638497-.42760986.1638497-.26421996 0-.41814822-.1444178-.44399122-.41832975l-.00494264-.09405035s.08049458-.55326485.08049458-.55637395c0 0 .42196112-1.86048711.49751306-2.10641713.00395412-.01399096.00508387-.02129736.00607239-.02798193-.82132725.00792821-.9669236 0-.97695012-.01461278-.00550753.02005371-.025843.13540142-.025843.13540142l-.43085788 2.09693437-.03699927.1778407-.07159782.5817131c0 .1725552.03078565.31339755.09207452.4324762.19629382.37760055.75622549.4341862 1.07297875.4341862.40812169 0 .79096525-.09544945 1.04967767-.26971465.44907509-.2921002.56656897-.74867195.67135315-1.15440985l.04857917-.20815445s.43467082-1.93230737.5085281-2.18367833c.00282441-.01399096.00395413-.02129736.00776704-.02798193zm1.47893982 1.55881086c-.10478422 0-.29627659.0279819-.46828081.12078865-.0624186.0352883-.12144796.07601755-.18372539.11659135l.056205-.22338905-.03078563-.03762015c-.36476761.08130305-.44639193.0921849-.78333945.14441785l-.02824374.0206755c-.03911752.3570805-.07385733.6255515-.21888878 1.32743145-.05521646.25867735-.11255121.519842-.17002718.7778975l.01553403.03280105c.34527946-.0200537.45006363-.0200537.75015309-.0146128l.02428961-.0290701c.03812903-.21499445.04307165-.2653619.12752039-.70079175.03968242-.20644445.1224365-.66006255.16324868-.8215804.07498704-.038242.14898558-.07586215.21959486-.07586215.16819135 0 .14771465.1615179.14121858.22587635-.00720213.1080413-.06849101.4609245-.13133325.76390655l-.04194194.19556255c-.02923223.14441785-.06128888.2847938-.09052111.427968l.01270966.02860375c.34033679-.0200537.44413246-.0200537.73476028-.0146128l.0341749-.0290701c.0525333-.3357831.06792611-.42563615.16113038-.9145426l.04688457-.22463265c.09108601-.43962715.13684082-.6625498.06792616-.8441214-.07286879-.2034908-.24769738-.2526146-.40826291-.2526146zm1.65214439.4602871c-.18090101.038242-.29627659.0637366-.41094606.08021485-.11368097.02005375-.22453757.038242-.39936616.06498025l-.01383941.0138355-.01270966.01103735c-.01821719.14332965-.0309269.26722735-.05507525.41288885-.02047669.150636-.05196844.3217921-.10323077.56772215-.03968243.18825615-.06015913.25385825-.08275412.32008215-.0220301.06622385-.04631967.1305823-.09094476.31572935l.01045019.0171001.00875554.01570095c.1633899-.00855005.27029237-.0146128.38016043-.01570095.10972684-.00435275.22340776 0 .39936611.00108815l.01539286-.0138355.01652257-.0152346c.02541932-.1669588.02923224-.21188535.04476626-.29334385.01539282-.0873658.04194194-.20830985.10704369-.53134565.03078568-.1517242.06510179-.30298205.09701718-.4578154.03318641-.1542115.06792612-.30609115.10097127-.45781535l-.00494263-.0183437zm.00385525-.620608c-.1643784-.10679765-.45288796-.07290845-.64706354.0746185-.19361063.14457325-.21564072.34977405-.05182718.4579708.16155403.10384405.45119334.0729085.64367421-.0758621.19318708-.14768235.21733543-.3510177.05521651-.4567272zm.99410809 2.473369c.3325698 0 .6734715-.1008904.9300657-.400297.1974235-.2428209.2879446-.60409865.3192952-.7528692.1021011-.4931037.0225949-.7233328-.0772466-.8635533-.1516687-.21375085-.4197016-.28230655-.697761-.28230655-.1672028 0-.5654392.01818825-.87654364.33391765-.22340786.22774175-.32663863.5367866-.38891601.83308405-.06284224.3018939-.13514621.84536505.31887154 1.0476122.14008884.0662239.34203141.08441215.47223481.08441215zm-.0259841-1.10948335c.0766817-.3734032.1672028-.6868008.3982364-.6868008.1810422 0 .1941755.23318275.1136809.6078296-.0144042.0831685-.0804945.3923688-.1698859.5240393-.0624186.09715945-.1362759.15607695-.2179003.15607695-.0242896 0-.1687562 0-.1710157-.23613635-.0011297-.11659135.0204767-.23567.0468846-.3650087zm2.1066988 1.06146325.0259841-.0290701c.0368581-.21499445.0429305-.2655174.1245549-.70079175.0408121-.20644445.1252608-.66006255.1649433-.82158045.0751282-.0383974.1478558-.07601755.2207245-.07601755.1670616 0 .1467262.1615179.140089.2258763-.0060725.1081968-.0673613.4609245-.1313334.76390655l-.0396824.1955626c-.030362.14457325-.0634071.2847938-.0926394.42812345l.0127097.02860375c.3414665-.02005375.441308-.02005375.7336305-.0146128l.0353047-.0290701c.0512623-.33593855.0651017-.42579165.1611304-.9145426l.0457548-.2247881c.0915096-.43962715.1378292-.66239435.0700444-.84396595-.0749871-.2034908-.2509454-.2526146-.4092515-.2526146-.1049254 0-.2974063.02782645-.468422.12078865-.0611476.0352883-.1224365.0758621-.1825956.11659135l.0523921-.22338905-.0281025-.0377756c-.3646263.0814585-.4479453.09234035-.7844692.1445733l-.025843.0206755c-.0408122.35708045-.0739986.62539605-.21903 1.32743145-.0552164.25867735-.1125512.51984195-.1698859.7778975l.0153928.03280105c.3458442-.02005375.4490751-.02005375.7485997-.0146128zm2.5088186.01453505c.0214652-.1153477.1489856-.7990394.1501153-.7990394 0 0 .1085971-.50165375.1152345-.519842 0 0 .0341748-.0522329.0683497-.07290845h.0502738c.4743532 0 1.0099953 0 1.4298381-.3399804.2856852-.2331827.4809905-.57751585.5681223-.99600105.022595-.1026004.0392588-.22463269.0392588-.34666496 0-.16027425-.0292322-.3188385-.1136809-.44273624-.2140874-.32972035-.6404262-.3357831-1.132573-.33827039-.0015534 0-.2426136.00248729-.2426136.00248729-.629976.00855003-.8826161.00606275-.9864117-.00792821-.0087556.05052291-.0252782.14037599-.0252782.14037599s-.2256673 1.15130077-.2256673 1.15316622c0 0-.5400198 2.4477966-.5654392 2.5631443.5500464-.00730635.7755725-.00730635.8704714.0041973zm.4181482-2.0451678s.2399304-1.14896892.2388007-1.14461618l.0077669-.05891749.0033893-.04492654.0958874.01088185s.4948299.046792.5064099.04803565c.1953052.0831685.2757998.29754113.2195948.57736036-.0512623.2557237-.2019425.4707182-.3955532.5745622-.1594358.0879876-.3547411.095294-.5559775.095294h-.1302035zm1.4938667.99045135c-.0634072.2975411-.136276.8410123.3154822 1.0347094.1440429.0674675.2731167.0875212.4043088.08021485.1385355-.00823915.2669031-.08472305.3858092-.1947853-.0107326.04523745-.0214652.0904749-.0321978.1358678l.0204766.0290701c.324944-.01507915.4257741-.01507915.7778319-.0121255l.0319154-.0267383c.0514036-.332674.0998416-.65570975.2334344-1.2921431.0651017-.30484755.1300622-.6067414.1968587-.9103453l-.0104501-.03342285c-.3634967.0741521-.4606551.09000855-.8103124.1445733l-.026549.0237846c-.0035305.0309356-.0072021.0606275-.0105914.09031945-.0543692-.0966931-.1331691-.17923975-.2547583-.2306954-.1554817-.0673121-.5206729.01943185-.8346018.33407305-.2205834.2246327-.3264973.53243385-.3866564.8276432zm.7634275.01818825c.0778115-.3667187.1672028-.67700715.3988014-.67700715.1464436 0 .2235489.14877055.2078737.40247335-.0124272.06327025-.025843.1299605-.0418008.20535625-.0231597.10897405-.0482967.21701535-.0727275.32521215-.0248545.07399665-.0538043.143796-.0855784.1902771-.0595943.09296215-.2013777.150636-.2830021.150636-.0231599 0-.1660731 0-.1710157-.23193905-.0011298-.11550315.0204767-.23442635.0474494-.36500865zm3.9866711-1.21085565-.0281024-.0352883c-.3596838.08021485-.4247856.09296215-.755237.142086l-.0242897.02673825c-.0011296.00435275-.0021182.01103735-.0038128.0171001l-.0011298-.00606275c-.2460027.6247742-.2388006.4899946-.4390485.98185465-.0011298-.02238555-.0011298-.0363765-.0022595-.06016115l-.0501327-1.0662668-.0314917-.0352883c-.3767711.08021485-.3856679.09296215-.7336305.142086l-.0271139.02673825c-.003813.01274735-.003813.0267383-.0060724.0419729l.0022594.00544095c.0434954.2446864.0330452.19012165.0766818.5762722.0203354.1894998.0474494.3800878.0677848.5672558.0343162.3132421.0535219.4674536.0954638.94547815-.2349878.4268798-.2906279.5883977-.51686.9630446l.0015534.0037309-.1592946.27733195c-.0182171.0292256-.0347397.0492793-.0578996.05782935-.0254193.0138355-.0584644.01632275-.1043605.01632275h-.0882616l-.131192.4803564.4500635.00855005c.26422-.00124365.4302931-.1372669.5196844-.32008215l.283002-.53383295h-.004519l.0297972-.03762015c.1903626-.4511308 1.6384179-3.1855867 1.6384179-3.1855867zm-4.7501128 6.3087581h-.1909276l.7066579-2.57293795h.2344228l.0744221-.265051.0072022.29474295c-.0087556.1821934.121448.3437113.4634794.31697305h.3955532l.1361347-.49543555h-.1488443c-.0855785 0-.1252609-.02378465-.1203182-.0747739l-.0072022-.299873h-.7325008v.00155455c-.2368235.00544095-.9440462.0250283-1.0872418.0670012-.1732752.0491238-.3558709.1936971-.3558709.1936971l.071739-.26536195h-.6851925l-.1427719.52652655-.7161194 2.61226815h-.1389591l-.136276.4918601h1.3647364l-.0457548.1640051h.6724828l.0446251-.1640051h.1886681zm-.5599316-2.0501423c-.1097268.03342285-.313929.1347796-.313929.1347796l.1816071-.65757525h.5443977l-.1313333.47911275s-.1681914.01088185-.2807425.0436829zm.0104502.9394154s-.1710158.0236292-.283567.0516111c-.1108566.0369984-.3187303.1535897-.3187303.1535897l.1875382-.6843135h.5472221zm-.3050322 1.1167897h-.5460922l.158306-.5775158h.5443976zm1.315112-1.5959024h.7871525l-.1131162.4032506h-.7976024l-.1197535.4408708h.6979023l-.5284398.8190931c-.0369994.0601612-.0701858.0814585-.1070437.0984031-.0369994.0206755-.0855785.0449265-.1417835.0449265h-.1936107l-.133028.4828437h.5064098c.2632315 0 .4187131-.131826.5335239-.3048476l.3623669-.5459584.0778115.5543531c.0165225.1038439.0843074.1646269.1302034.1882561.0506975.0279819.1030897.0760176.1770882.0831685.0793648.0037309.1366995.0066846.1748285.0066846h.2488272l.1494092-.5403621h-.0981469c-.0563463 0-.1533633-.0104155-.1698859-.0298474-.0165226-.0236292-.0165226-.0600057-.0254194-.1153477l-.0789412-.5555967h-.3232494l.1417836-.1857688h.796049l.1224365-.4408708h-.7370197l.1148107-.4032506h.7347603l.1362759-.497301h-2.1905826zm-6.6483163 1.7081877.1837253-.6728098h.7550958l.1379705-.5004101h-.7558018l.1153756-.4141325h.7385731l.1368408-.4845537h-1.84798632l-.13401641.4845537h.41984283l-.1119863.4141325h-.42097264l-.13952389.5089601h.41970155l-.24487301.8901361c-.03304514.117835.01553408.1627615.04631971.2174817.03149175.0533211.06340718.0886094.13514621.1086631.07399857.0181883.12469597.0290701.19361067.0290701h.8512656l.1516688-.554353-.3773361.0570521c-.0728688 0-.2746701-.0096382-.25264-.0837903zm.0866093-3.22084395-.1913512.38070965c-.0409534.08316845-.0778114.1347796-.1109978.1585642-.0292322.02005375-.0871318.0284483-.1710157.0284483h-.0998415l-.13345158.48704095h.33158128c.1594357 0 .2818722-.0643584.3403368-.09653765.0628422-.0369983.0793647-.0158564.1279439-.0674675l.1119864-.1067977h1.0354146l.1374057-.50709465h-.7579202l.1323219-.2768656zm1.5286064 3.23062205c-.0176524-.027982-.0049427-.0772612.0220301-.1798616l.283002-1.0311339h1.0067472c.1467262-.0023318.25264-.0041973.3215547-.0096382.0739985-.0085501.1544932-.0376202.2421899-.0898531.0905212-.0547202.1368408-.1123941.1759583-.178618.0436366-.0660684.113681-.2106417.1738401-.4335643l.3557296-1.3048905-1.044735.0066846s-.3216959.0522329-.4633381.10990675c-.1429132.06435845-.3471154.2440646-.3471154.2440646l.0943341-.3577023h-.645369l-.9035164 3.29860265c-.0320566.1280949-.0535218.2210571-.0584645.2768655-.0016946.0601612.0689147.1197005.1146695.164627.0540867.0449266.1340164.0376202.2106981.0449266.0806358.0066846.1953053.0108818.3536113.0108818h.4959597l.1522336-.5658567-.4439912.0461702c-.0474494 0-.0817655-.027982-.0960286-.0516111zm.4876277-1.9074346h1.0574447l-.06722.2319391c-.0094616.0054409-.0320566-.0115037-.1396652.0024873h-.9156612zm.2118279-.77789745h1.0663414l-.0766816.27935285s-.5025969-.0054409-.5830915.01088185c-.3541763.06746755-.5610614.27577745-.5610614.27577745zm.802065 1.78653705c-.0087555.0346665-.0225949.0558084-.0419418.0716648-.0214654.0152346-.0562051.0206755-.1080323.0206755h-.1506803l.0088968-.2824619h-.626728l-.0254193 1.380908c-.0009886.0996467.007767.1573206.0739985.2034908.0662315.0576738.2702923.0649802.5449624.0649802h.392729l.1417834-.5168883-.3418902.0206755-.1136809.0073064c-.0155341-.0073064-.030362-.013991-.0468846-.0321792-.0144043-.015701-.0386939-.0060627-.0347398-.1057095l.0026831-.3539713.3585541-.0163228c.1936107 0 .2763648-.0693331.346974-.1354015.0673612-.0632702.0893913-.1360232.1148107-.2344264l.0601592-.3133975h-.4927118z'\n fill='#fefefe'\n />\n </g>\n </svg>\n </div>\n )\n}\n","import { FC } from 'react'\n\nconst styles = {\n width: 30,\n height: 20,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n}\n\nconst svgStyles = {\n width: '100%',\n height: '100%',\n}\n\nexport const IconUnknownCard: FC<{ className?: string }> = ({ className }) => {\n return (\n <div style={styles} className={className}>\n <svg\n width='30'\n height='20'\n viewBox='0 0 30 20'\n xmlns='http://www.w3.org/2000/svg'\n fill='rgb(223, 27, 65)'\n role='presentation'\n style={svgStyles}\n >\n <g clipPath='url(#clip0_184_11820)'>\n <path\n opacity='0.74'\n d='M26.2061 0.00488281C28.3194 0.112115 30 1.85996 30 4V13.335L28.5 10.623V8H27.0488L25.9736 6.05664C25.744 5.64161 25.4595 5.2894 25.1367 5H28.5V4C28.5 2.61929 27.3807 1.5 26 1.5H4C2.61929 1.5 1.5 2.61929 1.5 4V5H19.8643C19.608 5.22972 19.3755 5.49872 19.1758 5.80762L19.0264 6.05664L17.9512 8H1.5V16C1.5 17.3807 2.61929 18.5 4 18.5H13.0371C13.1062 19.0302 13.2775 19.5408 13.5391 20H4L3.79395 19.9951C1.7488 19.8913 0.108652 18.2512 0.00488281 16.2061L0 16V4C0 1.85996 1.68056 0.112115 3.79395 0.00488281L4 0H26L26.2061 0.00488281Z'\n ></path>\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M20.7762 7.0252C21.5325 5.65827 23.4673 5.65826 24.2235 7.0252L29.743 17.0027C30.4843 18.3434 29.5319 19.9995 28.0194 19.9998H16.9803C15.4679 19.9995 14.5155 18.3434 15.2567 17.0027L20.7762 7.0252ZM22.4999 15.4998C21.8095 15.4998 21.2499 16.0595 21.2499 16.7498C21.2499 17.4402 21.8095 17.9998 22.4999 17.9998C23.1902 17.9998 23.7499 17.4402 23.7499 16.7498C23.7499 16.0595 23.1902 15.4998 22.4999 15.4998ZM22.4999 8.99981C21.9476 8.99981 21.4999 9.44753 21.4999 9.99981V12.9998C21.4999 13.5521 21.9476 13.9998 22.4999 13.9998C23.0522 13.9998 23.4999 13.5521 23.4999 12.9998V9.99981C23.4999 9.44753 23.0522 8.99981 22.4999 8.99981Z'\n ></path>\n </g>\n <defs>\n <clipPath id='clip0_184_11820'>\n <rect width='30' height='20'></rect>\n </clipPath>\n </defs>\n </svg>\n </div>\n )\n}\n","import { FC } from 'react'\n\nconst styles = {\n width: 30,\n height: 20,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n}\n\nconst svgStyles = {\n width: '100%',\n height: '100%',\n}\n\nexport const IconMaestro: FC<{ className?: string }> = ({ className }) => {\n return (\n <div style={styles} className={className}>\n <svg viewBox='0 0 100 66' fill='none' xmlns='http://www.w3.org/2000/svg' style={svgStyles}>\n <rect x='2' y='2' width='96' height='62' rx='5' stroke='#D3D3D3' strokeWidth='4' />\n <ellipse cx='38' cy='33' rx='22' ry='22' fill='#F00' />\n <ellipse cx='62' cy='33' rx='22' ry='22' fill='#1E88E5' />\n </svg>\n </div>\n )\n}\n","import { useContext, createContext } from 'react'\nimport { StylesConfig } from '../../interface'\n\nexport const initialState: StylesConfig | null = null\n\nexport const StylesContext = createContext<StylesConfig | null>(initialState)\nexport const useCheckoutStyles = () => useContext(StylesContext)\n","import { FC, PropsWithChildren } from 'react'\nimport { StylesContext } from './styles.context'\nimport { StylesConfig } from '../../interface'\n\ntype Props = {\n styles?: StylesConfig\n}\n\nexport const StylesProvider: FC<PropsWithChildren<Props>> = ({ children, styles }) => {\n return <StylesContext.Provider value={styles || null}>{children}</StylesContext.Provider>\n}\n","export enum InputError {\n Invalid = 'invalid',\n Empty = 'empty',\n Incomplete = 'incomplete',\n Unsupported = 'unsupported',\n Expired = 'expired',\n}\n\nexport enum CardType {\n Visa = 'visa',\n Mastercard = 'mastercard',\n AmericanExpress = 'american-express',\n Discover = 'discover',\n JCB = 'jcb',\n DinersClub = 'diners-club',\n UnionPay = 'unionpay',\n Maestro = 'maestro',\n}\n\nexport const cardTypes = [\n { name: 'Visa', type: CardType.Visa, pattern: /^4/, minLength: 16, maxLength: 16 },\n { name: 'MasterCard', type: CardType.Mastercard, pattern: /^5[1-5]/, minLength: 16, maxLength: 16 },\n { name: 'American Express', type: CardType.AmericanExpress, pattern: /^3[47]/, minLength: 15, maxLength: 15 },\n { name: 'Discover', type: CardType.Discover, pattern: /^6(?:011|5[0-9]{2})/, minLength: 16, maxLength: 16 },\n { name: 'JCB', type: CardType.JCB, pattern: /^(?:2131|1800|35\\d{2})/, minLength: 15, maxLength: 16 },\n { name: 'Diners Club', type: CardType.DinersClub, pattern: /^3(?:0[0-5]|[68][0-9])/, minLength: 14, maxLength: 16 },\n { name: 'Union Pay', type: CardType.UnionPay, pattern: /^62/, minLength: 16, maxLength: 19 },\n {\n name: 'Maestro',\n type: CardType.Maestro,\n pattern:\n /^(50\\d{2,16}|5[6-9]\\d{2,16}|6\\d{3,15}|0604\\d{0,13}|6390\\d{0,13}|5018\\d{0,15}|5020\\d{0,15}|5038\\d{0,15}|5893\\d{0,15}|6304\\d{0,15}|6759\\d{0,15}|6761\\d{0,15}|6762\\d{0,15}|6763\\d{0,15})$/,\n minLength: 12,\n maxLength: 19,\n },\n] as const\n","import { CardType, cardTypes, InputError } from './card.enums'\n\nexport const detectCardType = (cardNumber: string) => {\n return cardTypes.find((type) => type.pattern.test(cardNumber)) || null\n}\n\nexport const getCardTypes = (cardNumber: string) => {\n return cardTypes.filter((type) => type.pattern.test(cardNumber))\n}\n\nconst isValidLuhn = (cardNumber: string) => {\n let sum = 0\n let isEven = false\n\n for (let i = cardNumber.length - 1; i >= 0; i--) {\n let digit = parseInt(cardNumber[i])\n\n if (isEven) {\n digit *= 2\n if (digit > 9) digit -= 9\n }\n\n sum += digit\n isEven = !isEven\n }\n\n return sum % 10 === 0\n}\n\nexport const validateCardNumber = (cardNumber: string, supportedCardTypes?: CardType[]) => {\n const cleanNumber = cardNumber.replace(/\\D/g, '')\n\n if (!cleanNumber) {\n return { isValid: false, cardType: null, error: InputError.Empty }\n }\n\n if (!/^\\d+$/.test(cleanNumber)) {\n return { isValid: false, cardType: null, error: InputError.Invalid }\n }\n\n const cardType = detectCardType(cleanNumber)\n if (cardType) {\n if (cleanNumber.length < cardType.minLength || cleanNumber.length > cardType.maxLength) {\n return {\n isValid: false,\n cardType: cardType.name,\n error: InputError.Incomplete,\n }\n }\n } else {\n if (cleanNumber.length < 16) {\n return {\n isValid: false,\n cardType: null,\n error: InputError.Incomplete,\n }\n }\n }\n\n if (cardType && supportedCardTypes && !supportedCardTypes.includes(cardType.type as CardType)) {\n return {\n isValid: false,\n cardType: cardType.name,\n error: 'unsupported',\n }\n }\n\n if (!isValidLuhn(cleanNumber)) {\n return {\n isValid: false,\n cardType: cardType?.name || null,\n error: InputError.Invalid,\n }\n }\n\n return {\n isValid: true,\n cardType: cardType?.name || null,\n error: null,\n }\n}\n","import { ChangeEventHandler, FC, useId, useState } from 'react'\nimport { Input } from '@/app/shared/ui/input'\nimport { getTypeInfo } from 'credit-card-type'\nimport { useCheckoutTranslate } from '@/app/module/able-pay/context/translate'\nimport { prettyCVC } from '@/app/shared/utils/card/card.utils'\nimport { IconCardCVC, IconWarning } from '@/app/shared/icon'\nimport styles from './cvc.module.css'\nimport { InputProps } from '../../card.interface'\nimport { useCheckoutStyles } from '@/app/module/able-pay/context/styles'\nimport { InputError } from '@/app/shared/utils/card'\n\ntype Props = InputProps & {\n cardType?: string\n}\n\nconst validator = (value: string, cardType = ''): InputError | null => {\n const card = getTypeInfo(cardType)\n const isEmpty = !value\n const isIncomplete = value.length < (card?.code.size || 3)\n const isValid = !isEmpty && !isIncomplete\n if (!isValid) {\n return isEmpty ? InputError.Empty : InputError.Incomplete\n }\n\n return null\n}\n\nexport const CvcInput: FC<Props> = ({ onChange, value, isTouchSubmit, disabled, cardType = '' }) => {\n const id = useId()\n const m = useCheckoutTranslate()\n const customStyles = useCheckoutStyles()\n const [error, setError] = useState('')\n const [isRequired, setRequired] = useState(true)\n const [isChanged, setChanged] = useState(false)\n const isTouched = isTouchSubmit || isChanged\n\n const validate = (value: string) => {\n const error = validator(value, cardType)\n if (error) {\n if (error === InputError.Empty) {\n setError('')\n setRequired(true)\n } else {\n setError(error === InputError.Incomplete ? m.card.cvc.error.incomplete : m.card.cvc.error.invalid)\n setRequired(false)\n }\n return\n }\n\n setRequired(false)\n setError('')\n }\n\n const handleCVC: ChangeEventHandler<HTMLInputElement> = (e) => {\n if (disabled) return\n const { value: cvcValue } = e.currentTarget\n setError('')\n setRequired(false)\n if (!isChanged) setChanged(true)\n const cvc = prettyCVC(cvcValue, cardType)\n const card = getTypeInfo(cardType)\n if (cvc.length === card?.code.size) {\n validate(cvc)\n }\n onChange({\n value: cvc,\n isValid: validator(cvc, cardType) === null,\n })\n }\n\n const isError = isTouched && (!!error || isRequired)\n return (\n <Input\n id={id}\n label={m.card.cvc.label}\n labelError={isError && isRequired ? m.card.cvc.error.required : undefined}\n autoComplete={'cc-exp'}\n value={value}\n disabled={disabled}\n placeholder={m.card.cvc.placeholder}\n error={isError && !isRequired ? error : undefined}\n onChange={handleCVC}\n onBlur={() => validate(value)}\n styles={customStyles?.card?.input}\n endContent={isError ? <IconWarning /> : <IconCardCVC className={styles.cvcIcon} />}\n />\n )\n}\n","import { ChangeEventHandler, FC, useId, useState } from 'react'\nimport { Input } from '@/app/shared/ui/input'\nimport { useCheckoutTranslate } from '@/app/module/able-pay/context/translate'\nimport { prettyCardExpiry } from '@/app/shared/utils/card/card.utils'\nimport { IconWarning } from '@/app/shared/icon'\nimport { InputProps } from '../../card.interface'\nimport { useCheckoutStyles } from '@/app/module/able-pay/context/styles'\nimport { InputError } from '@/app/shared/utils/card'\n\ntype Props = InputProps\n\nconst validator = (value: string): InputError | 'expired' | 'dateExpired' | null => {\n const isEmpty = !value\n const isIncomplete = value.length < 7\n\n const date = new Date()\n const [month, year] = value.split(' / ')\n date.setFullYear(2000 + parseInt(year), parseInt(month) - 1, 31)\n const isExpired = date.getTime() < Date.now()\n const isValid = !isEmpty && !isIncomplete && !isExpired\n\n if (!isValid) {\n if (isEmpty) return InputError.Empty\n if (isIncomplete) return InputError.Incomplete\n if (date.getFullYear() === new Date().getFullYear()) return 'dateExpired'\n return 'expired'\n }\n\n return null\n}\n\nexport const ExpiryInput: FC<Props> = ({ onChange, value, isTouchSubmit, disabled }) => {\n const id = useId()\n const m = useCheckoutTranslate()\n const customStyles = useCheckoutStyles()\n const [error, setError] = useState('')\n const [isRequired, setRequired] = useState(true)\n const [isChanged, setChanged] = useState(false)\n const isTouched = isTouchSubmit || isChanged\n\n const validate = (value: string) => {\n const error = validator(value)\n\n if (error) {\n if (error === InputError.Empty) {\n setError('')\n setRequired(true)\n } else {\n if (error === 'expired') {\n setError(m.card.expiry.error.expired.replace('{date}', 'year'))\n } else if (error === 'dateExpired') {\n setError(m.card.expiry.error.expired.replace('{date}', 'date'))\n } else {\n setError(error === InputError.Incomplete ? m.card.expiry.error.incomplete : m.card.expiry.error.invalid)\n }\n setRequired(false)\n }\n return\n }\n\n setRequired(false)\n setError('')\n }\n\n const handleExpiry: ChangeEventHandler<HTMLInputElement> = (e) => {\n if (disabled) return\n const { value: expiryValue } = e.currentTarget\n setError('')\n setRequired(false)\n if (!isChanged) setChanged(true)\n const expiry = prettyCardExpiry(expiryValue, value)\n if (expiry.length === 7) {\n validate(expiry)\n }\n onChange({\n value: expiry,\n isValid: validator(expiry) === null,\n })\n }\n\n const isError = isTouched && (!!error || isRequired)\n return (\n <Input\n id={id}\n label={m.card.expiry.label}\n labelError={isError && isRequired ? m.card.expiry.error.required : undefined}\n autoComplete={'cc-exp'}\n value={value}\n disabled={disabled}\n placeholder={m.card.expiry.placeholder || 'MM / YY'}\n error={isError && !isRequired ? error : undefined}\n onChange={handleExpiry}\n onBlur={() => validate(value)}\n styles={customStyles?.card?.input}\n endContent={isError ? <IconWarning /> : null}\n />\n )\n}\n","import { ChangeEventHandler, FC, useId, useState } from 'react'\nimport { Input } from '@/app/shared/ui/input'\nimport { useCheckoutTranslate } from '@/app/module/able-pay/context/translate'\nimport { IconWarning } from '@/app/shared/icon'\nimport { InputProps } from '../../card.interface'\nimport { useCheckoutStyles } from '@/app/module/able-pay/context/styles'\nimport { InputError } from '@/app/shared/utils/card'\n\ntype Props = InputProps\n\nconst validator = (value: string): InputError | null => {\n return !value ? InputError.Empty : null\n}\n\nexport const NameInput: FC<Props> = ({ onChange, value, isTouchSubmit, disabled }) => {\n const id = useId()\n const m = useCheckoutTranslate()\n const customStyles = useCheckoutStyles()\n const [error, setError] = useState('')\n const [isRequired, setRequired] = useState(true)\n const [isChanged, setChanged] = useState(false)\n const isTouched = isTouchSubmit || isChanged\n\n const validate = (value: string) => {\n const error = validator(value)\n if (error) {\n setError('')\n setRequired(true)\n return\n }\n\n setRequired(false)\n setError('')\n }\n\n const handleName: ChangeEventHandler<HTMLInputElement> = (e) => {\n if (disabled) return\n const { value: name } = e.currentTarget\n setError('')\n setRequired(false)\n if (!isChanged) setChanged(true)\n onChange({\n value: name,\n isValid: validator(name) === null,\n })\n }\n\n const isError = isTouched && (!!error || isRequired)\n return (\n <Input\n id={id}\n label={m.card.name.label}\n labelError={isError && isRequired ? m.card.name.error.required : undefined}\n autoComplete={'cc-name'}\n value={value}\n disabled={disabled}\n placeholder={m.card.name.placeholder}\n error={isError && !isRequired ? error : undefined}\n onChange={handleName}\n onBlur={() => validate(value)}\n styles={customStyles?.card?.input}\n endContent={isError ? <IconWarning /> : null}\n />\n )\n}\n","import { cardTypes } from '@/app/shared/utils/card'\n\nexport const initialCardTypes = cardTypes.map((type) => type.type)\n","import {\n IconAmex,\n IconDinersClub,\n IconDiscover,\n IconJcb,\n IconMaestro,\n IconMastercard,\n IconUnionPay,\n IconVisa,\n} from '@/app/shared/icon'\nimport { FC } from 'react'\nimport styles from './card-icons.module.css'\nimport { CardType } from '@/app/shared/utils/card'\n\nexport const CardIcons: FC<{ cardTypes: CardType[]; supportedCardTypes: CardType[] }> = ({\n cardTypes,\n supportedCardTypes,\n}) => {\n return cardTypes\n .filter((type) => supportedCardTypes.includes(type))\n .slice(0, 4)\n .map((type) => {\n switch (type) {\n case CardType.Visa:\n return (\n <span key={type} className={styles.iconContainer}>\n <IconVisa />\n </span>\n )\n case CardType.Mastercard:\n return (\n <span key={type} className={styles.iconContainer}>\n <IconMastercard />\n </span>\n )\n case CardType.DinersClub:\n return (\n <span key={type} className={styles.iconContainer}>\n <IconDinersClub />\n </span>\n )\n case CardType.JCB:\n return (\n <span key={type} className={styles.iconContainer}>\n <IconJcb />\n </span>\n )\n case CardType.AmericanExpress:\n return (\n <span key={type} className={styles.iconContainer}>\n <IconAmex />\n </span>\n )\n case CardType.Discover:\n return (\n <span key={type} className={styles.iconContainer}>\n <IconDiscover />\n </span>\n )\n case CardType.UnionPay:\n return (\n <span key={type} className={styles.iconContainer}>\n <IconUnionPay />\n </span>\n )\n case CardType.Maestro:\n return (\n <span key={type} className={styles.iconContainer}>\n <IconMaestro />\n </span>\n )\n default:\n return null\n }\n })\n}\n","import { ChangeEventHandler, FC, useId, useState } from 'react'\n\nimport { Input } from '@/app/shared/ui/input'\nimport { useCheckoutTranslate } from '@/app/module/able-pay/context/translate'\nimport { prettyCardNumber } from '@/app/shared/utils/card/card.utils'\nimport { NumberProps } from './number.interface'\nimport { initialCardTypes } from './number.constants'\nimport { CardType, detectCardType, getCardTypes, InputError, validateCardNumber } from '@/app/shared/utils/card'\nimport { IconUnknownCard } from '@/app/shared/icon'\nimport { CardIcons } from '../card-icons'\nimport { useCheckoutStyles } from '@/app/module/able-pay/context/styles'\n\nexport const NumberInput: FC<NumberProps> = ({ onChange, value, disabled, isTouchSubmit, supportedCardTypes }) => {\n const id = useId()\n const m = useCheckoutTranslate()\n const customStyles = useCheckoutStyles()\n const [cardTypes, setCardTypes] = useState<CardType[]>(initialCardTypes)\n const [error, setError] = useState('')\n const [isRequired, setRequired] = useState(true)\n const [isChanged, setChanged] = useState(false)\n const isTouched = isTouchSubmit || isChanged\n\n const validate = (value: string) => {\n const { isValid, error } = validateCardNumber(value, supportedCardTypes)\n if (!isValid) {\n if (error === InputError.Empty) {\n setError('')\n setRequired(true)\n } else if (error === InputError.Unsupported) {\n setError(m.card.number.error.unsupported)\n setRequired(false)\n } else {\n setError(error === InputError.Incomplete ? m.card.number.error.incomplete : m.card.number.error.invalid)\n setRequired(false)\n }\n return false\n }\n\n setRequired(false)\n setError('')\n }\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n if (disabled) return\n const { value: cardNumber } = e.currentTarget\n setError('')\n setRequired(false)\n if (!isChanged) setChanged(true)\n const cardTypes = getCardTypes(cardNumber).map((type) => type.type)\n console.log({ cardTypes })\n const cardType = detectCardType(cardNumber)\n const card = prettyCardNumber(cardNumber, cardType?.type || '')\n if (card.replace(/\\D/g, '').length === (cardType?.maxLength || 16)) {\n validate(card)\n }\n setCardTypes(cardTypes.length ? cardTypes : initialCardTypes)\n onChange({\n card,\n cardType: cardType?.type || '',\n cardTypes,\n isValid: validateCardNumber(card).isValid,\n })\n }\n\n const isError = isTouched && (!!error || isRequired)\n return (\n <Input\n id={id}\n label={m.card.number.label}\n labelError={isError && isRequired ? m.card.number.error.required : undefined}\n autoComplete={'cc-number'}\n value={value}\n disabled={disabled}\n placeholder={'1234 1234 1234 1234'}\n error={isError && !isRequired ? error : undefined}\n onChange={handleChange}\n onBlur={() => validate(value)}\n styles={customStyles?.card?.input}\n endContent={\n isError ? (\n <IconUnknownCard />\n ) : (\n <CardIcons cardTypes={cardTypes} supportedCardTypes={supportedCardTypes || []} />\n )\n }\n />\n )\n}\n","import { FC } from 'react'\nimport { IconWarning } from '../../icon'\nimport styles from './error-alert.module.css'\n\ntype Props = {\n title: string\n}\n\nexport const ErrorAlert: FC<Props> = ({ title }) => {\n return (\n <div className={styles.container}>\n <div className={styles.iconContainer}>\n <IconWarning className={styles.icon} />\n </div>\n <div className={styles.title}>{title}</div>\n </div>\n )\n}\n","import { FC } from 'react'\nimport styles from './spinner.module.css'\n\nexport const Spinner: FC<{ className?: string }> = ({ className }) => {\n return (\n <div role='status' className={className}>\n <svg\n aria-hidden='true'\n className={styles.svg}\n viewBox='0 0 100 101'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n d='M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z'\n fill='currentColor'\n />\n <path\n d='M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z'\n fill='currentFill'\n />\n </svg>\n <span className={styles.sr}>Loading...</span>\n </div>\n )\n}\n","import { FC, FormEvent, useState } from 'react'\n\nimport { Button } from '@/app/shared/ui/button'\nimport { useCheckoutTranslate } from '@/app/module/able-pay/context/translate'\nimport { prettyCVC } from '@/app/shared/utils/card/card.utils'\nimport styles from './card.module.css'\nimport { CvcInput } from './element/cvc/cvc'\nimport { ExpiryInput } from './element/expiry'\nimport { NameInput } from './element/name'\nimport { InputValue } from './card.interface'\nimport { CardNumberInfo, NumberInput } from './element/number'\nimport { CardType } from '@/app/shared/utils/card'\nimport { ErrorAlert } from '@/app/shared/ui/error-alert'\nimport { useCheckoutStyles } from '@/app/module/able-pay/context/styles'\nimport { Spinner } from '@/app/shared/ui/spinner'\nimport clsx from 'clsx'\n\nexport type CardInput = {\n number: string\n expiry: string\n cvc: string\n name: string\n cardBrand?: string\n}\n\ntype Props = {\n onSubmit: (data: CardInput) => void\n isFetching: boolean\n isFail: boolean\n supportedCardTypes?: CardType[]\n}\n\nexport const Card: FC<Props> = ({ isFetching, isFail, supportedCardTypes, onSubmit }) => {\n const m = useCheckoutTranslate()\n const customStyles = useCheckoutStyles()\n const [cvc, setCVC] = useState({ value: '', isValid: false })\n const [expiry, setExpiry] = useState({ value: '', isValid: false })\n const [cardNumber, setCardNumber] = useState({ value: '', isValid: false })\n const [cardType, setCardType] = useState('')\n const [name, setName] = useState({ value: '', isValid: false })\n const [isTouchSubmit, setTouchSubmit] = useState(false)\n\n const handleCardNumber = ({ card, cardType, isValid }: CardNumberInfo) => {\n setCardNumber({ value: card, isValid })\n setCardType(cardType)\n const cvcValue = prettyCVC(cvc.value, cardType)\n setCVC({ value: cvcValue, isValid: cvc.isValid })\n }\n\n const handleCvc = ({ value, isValid }: InputValue) => {\n const cvcValue = prettyCVC(value, cardType)\n setCVC({ value: cvcValue, isValid: isValid })\n }\n\n const handlePay = (e: FormEvent<HTMLFormElement>) => {\n e.preventDefault()\n const isValid = cardNumber.isValid && expiry.isValid && cvc.isValid && name.isValid\n if (!isValid) return\n const spacePattern = /\\s/g\n onSubmit({\n number: cardNumber.value.replace(spacePattern, ''),\n expiry: expiry.value.replace(spacePattern, ''),\n cvc: cvc.value,\n name: name.value,\n cardBrand: cardType,\n })\n }\n\n return (\n <form onSubmit={handlePay} className={styles.card}>\n <NumberInput\n value={cardNumber.value}\n onChange={handleCardNumber}\n isTouchSubmit={isTouchSubmit}\n supportedCardTypes={supportedCardTypes}\n disabled={isFetching}\n />\n\n <div className={styles.cardDataContainer}>\n <ExpiryInput value={expiry.value} onChange={setExpiry} isTouchSubmit={isTouchSubmit} disabled={isFetching} />\n <CvcInput\n cardType={cardType}\n value={cvc.value}\n onChange={handleCvc}\n isTouchSubmit={isTouchSubmit}\n disabled={isFetching}\n />\n </div>\n\n <NameInput value={name.value} onChange={setName} isTouchSubmit={isTouchSubmit} disabled={isFetching} />\n\n {isFail ? <ErrorAlert title={m.status.error} /> : null}\n\n <Button\n type='submit'\n color='primary'\n isLoading={isFetching}\n disabled={isFetching}\n onClick={() => setTouchSubmit(true)}\n className={clsx(styles.payButton, customStyles?.card?.button?.className)}\n style={customStyles?.card?.button?.styles}\n >\n {isFetching && <Spinner className={styles.spinner} />}\n {m.card.pay.button}\n </Button>\n </form>\n )\n}\n","import { useContext, createContext } from 'react'\nimport { EvConfig } from './ev.interface'\n\nexport const initialState: EvConfig = {\n appId: '',\n teamId: '',\n ev: null,\n}\n\nexport const EvContext = createContext<EvConfig>(initialState)\nexport const useEv = () => useContext(EvContext)\n","\"use client\";\nimport * as u from \"react\";\nimport { createContext as H, useContext as W, useState as C, useRef as b, useLayoutEffect as P, useEffect as h, useMemo as q, useCallback as D } from \"react\";\nfunction X(r) {\n return (o) => ({\n styles: {\n \":root\": {\n \"--icon-offset\": \"1.9rem\"\n },\n body: {\n paddingBottom: 2\n },\n label: {\n fontSize: 14,\n marginBottom: 4,\n display: \"block\",\n color: \"#0a2540\"\n },\n input: {\n height: 40,\n fontSize: 16,\n borderRadius: 6,\n color: \"#0a2540\",\n padding: \"0 12px\",\n backgroundColor: \"#fff\",\n border: \"1px solid #e6ebf1\",\n boxShadow: \"0px 1px 1px rgba(0, 0, 0, .03), 0px 3px 6px rgba(0, 0, 0, .02)\",\n \"&::placeholder\": {\n color: \"#717f96\"\n },\n \"&:focus\": {\n outline: \"none\",\n borderColor: \"#63e\"\n }\n },\n textarea: {\n height: 40,\n fontSize: 16,\n borderRadius: 6,\n color: \"#0a2540\",\n padding: \"6px 12px\",\n backgroundColor: \"#fff\",\n border: \"1px solid #e6ebf1\",\n boxShadow: \"0px 1px 1px rgba(0, 0, 0, .03), 0px 3px 6px rgba(0, 0, 0, .02)\",\n \"&::placeholder\": {\n color: \"#717f96\"\n },\n \"&:focus\": {\n outline: \"none\",\n borderColor: \"#63e\"\n }\n },\n select: {\n height: 40,\n fontSize: 16,\n borderRadius: 6,\n color: \"#0a2540\",\n padding: \"6px 12px\",\n backgroundColor: \"#fff\",\n border: \"1px solid #e6ebf1\"\n },\n button: {\n fontSize: 16,\n height: 40,\n border: \"1px solid #e6ebf1\",\n padding: \"0 12px\"\n },\n \".field[ev-valid=false] input\": {\n color: \"#df1c41\",\n borderColor: \"#df1c41\"\n },\n \".error\": {\n color: \"#df1c41\",\n fontSize: \"0.75rem\",\n padding: \"0.25rem 0\"\n },\n \"[ev-component=card]\": {\n gap: 16\n },\n \"[ev-component=pin] input\": {\n height: 80,\n fontSize: 20,\n caretColor: \"transparent\"\n },\n \"[ev-component=card]:has(.icon)\": {\n \"& .field[ev-name=number]\": {\n position: \"relative\"\n },\n \"& .icon\": {\n left: 10,\n height: 20,\n position: \"absolute\",\n top: \"var(--icon-offset)\"\n },\n \"& .field[ev-name=number] input\": {\n paddingLeft: 48\n }\n },\n ...r ? o.extend(r) : {}\n }\n });\n}\nfunction Z(r) {\n return (o) => ({\n styles: {\n body: {\n paddingTop: 4\n },\n \".field\": {\n position: \"relative\"\n },\n label: {\n top: 10,\n left: 8,\n zIndex: 3,\n fontSize: 14,\n lineHeight: 1,\n height: \"20px\",\n display: \"flex\",\n color: \"#717f96\",\n padding: \"0 4px\",\n alignItems: \"center\",\n position: \"absolute\",\n pointerEvents: \"none\",\n transformOrigin: \"center left\",\n transition: \"transform 150ms, background 150ms\"\n },\n input: {\n height: 40,\n fontSize: 16,\n borderRadius: 6,\n color: \"#0a2540\",\n padding: \"0 12px\",\n backgroundColor: \"#fff\",\n border: \"1px solid #e6ebf1\",\n \"&::placeholder\": {\n color: \"transparent\"\n },\n \"&:focus\": {\n outline: \"none\",\n borderColor: \"#63e\"\n }\n },\n textarea: {\n height: 40,\n fontSize: 16,\n borderRadius: 6,\n color: \"#0a2540\",\n padding: \"6 12px\",\n backgroundColor: \"#fff\",\n border: \"1px solid #e6ebf1\",\n \"&::placeholder\": {\n color: \"transparent\"\n },\n \"&:focus\": {\n outline: \"none\",\n borderColor: \"#63e\"\n }\n },\n \".field[ev-valid=false] input\": {\n color: \"#df1c41\",\n borderColor: \"#df1c41\"\n },\n \".field:focus-within label, .field:not([ev-has-value=false]) label\": {\n background: \"white\",\n transform: \"translateY(-100%) scale(0.8)\"\n },\n \".error\": {\n color: \"#df1c41\",\n fontSize: \"0.75rem\",\n padding: \"0.25rem 0\"\n },\n \".field:not([ev-valid=false]):focus-within label\": {\n color: \"#63e\"\n },\n \".field[ev-valid=false] label\": {\n color: \"#df1c41\"\n },\n \".field[ev-has-value=true][ev-valid=true]:not(:focus-within) label\": {\n color: \"#0a2540\"\n },\n \"[ev-component=card]\": {\n gap: 16\n },\n \"[ev-component=card]:has(.icon)\": {\n \"& .icon\": {\n left: 10,\n height: 20,\n position: \"absolute\",\n top: 10,\n opacity: 0\n },\n \"& .field[ev-name=number]:focus-within, & .field[ev-name=number]:not([ev-has-value=false])\": {\n \"& .icon\": {\n opacity: 1\n },\n \"& input\": {\n paddingLeft: 45\n }\n }\n },\n ...r ? o.extend(r) : {}\n }\n });\n}\nfunction $(r) {\n return (o) => ({\n styles: {\n \":root\": {\n \"--icon-offset\": \"34px\"\n },\n body: {\n paddingBottom: 2\n },\n label: {\n fontSize: 14,\n marginBottom: \"0.5rem\",\n color: \"#0a2540\",\n display: \"none\"\n },\n \".field:first-child label\": {\n display: \"block\"\n },\n \"fieldset[ev-valid=false]\": {\n paddingBottom: \"1.5rem\"\n },\n input: {\n height: 40,\n fontSize: 16,\n borderRadius: 0,\n color: \"#0a2540\",\n padding: \"0 12px\",\n backgroundColor: \"#fff\",\n border: \"1px solid #e6ebf1\",\n boxShadow: \"0px 1px 1px rgba(0, 0, 0, .03), 0px 3px 6px rgba(0, 0, 0, .02)\",\n \"&::placeholder\": {\n color: \"#717f96\"\n },\n \"&:focus\": {\n outline: \"none\",\n borderColor: \"#63e\"\n }\n },\n textarea: {\n height: 40,\n fontSize: 16,\n borderRadius: 0,\n color: \"#0a2540\",\n padding: \"6 12px\",\n backgroundColor: \"#fff\",\n border: \"1px solid #e6ebf1\",\n boxShadow: \"0px 1px 1px rgba(0, 0, 0, .03), 0px 3px 6px rgba(0, 0, 0, .02)\",\n \"&::placeholder\": {\n color: \"#717f96\"\n },\n \"&:focus\": {\n outline: \"none\",\n borderColor: \"#63e\"\n }\n },\n \".field[ev-valid=false] input\": {\n color: \"#df1c41\",\n borderColor: \"#df1c41\"\n },\n \".error\": {\n color: \"#df1c41\",\n fontSize: \"0.75rem\",\n padding: \"0.25rem 0\",\n position: \"absolute\",\n left: 0,\n bottom: 0,\n display: \"none\"\n },\n \".field[ev-valid=false]\": {\n zIndex: 4\n },\n \".field:focus-within\": {\n zIndex: 5\n },\n \"[ev-component=card]\": {\n gap: 0,\n \"& .field[ev-valid=false]:nth-child(1) .error\": {\n display: \"block\"\n },\n \"& [ev-valid=true]:nth-child(1) + [ev-valid=false] .error\": {\n display: \"block\"\n },\n \"& [ev-valid=true]:nth-child(1) + [ev-valid=true]:nth-child(2) + [ev-valid=false] .error\": {\n display: \"block\"\n },\n \"& [ev-valid=true]:nth-child(1) + [ev-valid=true]:nth-child(2) + [ev-valid=true]:nth-child(3) + [ev-valid=false] .error\": {\n display: \"block\"\n },\n \"& .field:not(:last-child)\": {\n marginBottom: \"-1px\"\n },\n \"& .field:first-child\": {\n \"& input\": {\n borderTopLeftRadius: 6,\n borderTopRightRadius: 6\n }\n },\n \"& .field:last-child\": {\n \"& input\": {\n borderBottomRightRadius: 6,\n borderBottomLeftRadius: 6\n }\n }\n },\n \"[ev-component=card][ev-fields*=cvc][ev-fields*=expiry]\": {\n \"& .field[ev-name=expiry]\": {\n \"& input\": {\n borderBottomLeftRadius: 6\n }\n },\n \"& .field[ev-name=cvc]\": {\n marginLeft: \"-1px\",\n \"& input\": {\n borderBottomLeftRadius: 0\n }\n }\n },\n \"[ev-component=pin]\": {\n gap: 0,\n \"& input\": {\n height: 60\n },\n \"& .field:not(:first-child)\": {\n marginLeft: \"-1px\"\n },\n \"& .field:first-child input\": {\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6\n },\n \"& .field:last-child input\": {\n borderTopRightRadius: 6,\n borderBottomRightRadius: 6\n }\n },\n \"[ev-component=card]:has(.icon)\": {\n \"& .icon\": {\n left: 10,\n height: 20,\n position: \"absolute\",\n top: \"var(--icon-offset)\"\n },\n \"& .field[ev-name=number] input\": {\n paddingLeft: 48\n }\n },\n ...r ? o.extend(r) : {}\n }\n });\n}\nconst oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__: null,\n clean: X,\n material: Z,\n minimal: $\n}, Symbol.toStringTag, { value: \"Module\" })), L = H(null);\nfunction w() {\n if (typeof window > \"u\")\n return null;\n if (typeof u.useContext != \"function\")\n throw new Error(\n \"You must use React >= 18.0 in order to use useEvervault()\"\n );\n const r = u.useContext(L);\n if (!r)\n throw new Error(\n \"You must wrap your app in an <EvervaultProvider> to use useEvervault()\"\n );\n return r;\n}\nconst A = H(\n void 0\n);\nfunction G() {\n const r = W(A);\n if (!r)\n throw new Error(\"Reveal consumers must be used within a Reveal component\");\n return r;\n}\nfunction U({\n path: r,\n onCopy: o,\n ...t\n}) {\n const [i, d] = C(null), l = b(null), { reveal: e } = G();\n return u.useEffect(() => {\n if (!(!i || !o))\n return i == null ? void 0 : i.on(\"copy\", o);\n }, [i, o]), P(() => {\n if ((!l.current || i) ?? !e) return;\n const a = e == null ? void 0 : e.copyButton(r, t);\n a.mount(l.current), d(a);\n }, [e, r, t, i]), /* @__PURE__ */ u.createElement(\"div\", { ref: l });\n}\nfunction V({ path: r, theme: o, format: t }) {\n const [i, d] = C(null), l = b(null), { reveal: e } = G();\n return P(() => {\n if ((!l.current || i) ?? !e) return;\n const a = e.text(r, {\n theme: o,\n format: t\n });\n a.mount(l.current), d(a);\n }, [e, r, o, t, i]), /* @__PURE__ */ u.createElement(\"div\", { ref: l });\n}\nfunction J({ request: r, children: o, onReady: t, onError: i }) {\n const d = b(!1), l = w(), [e, a] = C(null), v = b(null);\n return u.useEffect(() => {\n if (!(!e || !t))\n return e == null ? void 0 : e.on(\"ready\", t);\n }, [e, t]), u.useEffect(() => {\n if (!(!e || !i))\n return e == null ? void 0 : e.on(\"error\", i);\n }, [e, i]), h(() => {\n if (!v.current || d.current) return;\n async function s() {\n d.current = !0;\n const c = await l;\n if (!c) return;\n const f = c.ui.reveal(r);\n a(f);\n }\n s().catch(console.error);\n }, [e, r, l]), /* @__PURE__ */ u.createElement(A.Provider, { value: { reveal: e } }, /* @__PURE__ */ u.createElement(u.Fragment, null, /* @__PURE__ */ u.createElement(\"div\", { ref: v }), o));\n}\nJ.Text = V;\nJ.CopyButton = U;\nfunction ne({\n theme: r,\n icons: o,\n fields: t,\n autoFocus: i,\n translations: d,\n onSwipe: l,\n onReady: e,\n onError: a,\n onChange: v,\n onComplete: s,\n onFocus: c,\n onBlur: f,\n onKeyUp: p,\n onKeyDown: m,\n autoComplete: y,\n autoProgress: x,\n acceptedBrands: g,\n defaultValues: I,\n redactCVC: T,\n allow3DigitAmexCVC: j\n}) {\n const _ = w(), M = b(!1), E = b(null), [n, N] = u.useState(null), R = b(a);\n h(() => {\n R.current = a;\n }, [a]), h(() => {\n if (!(!n || !e))\n return n == null ? void 0 : n.on(\"ready\", e);\n }, [n, e]), h(() => {\n if (!(!n || !a))\n return n == null ? void 0 : n.on(\"error\", a);\n }, [n, a]), h(() => {\n if (!(!n || !l))\n return n == null ? void 0 : n.on(\"swipe\", l);\n }, [n, l]), h(() => {\n if (!(!n || !v))\n return n == null ? void 0 : n.on(\"change\", v);\n }, [n, v]), h(() => {\n if (!(!n || !s))\n return n == null ? void 0 : n.on(\"complete\", s);\n }, [n, s]), h(() => {\n if (!(!n || !c))\n return n == null ? void 0 : n.on(\"focus\", c);\n }, [n, c]), h(() => {\n if (!(!n || !f))\n return n == null ? void 0 : n.on(\"blur\", f);\n }, [n, f]), h(() => {\n if (!(!n || !p))\n return n == null ? void 0 : n.on(\"keyup\", p);\n }, [n, p]), h(() => {\n if (!(!n || !m))\n return n == null ? void 0 : n.on(\"keydown\", m);\n }, [n, m]);\n const B = q(\n () => ({\n theme: r,\n icons: o,\n fields: t,\n autoFocus: i,\n translations: d,\n autoComplete: y,\n autoProgress: x,\n acceptedBrands: g,\n defaultValues: I,\n redactCVC: T,\n allow3DigitAmexCVC: j\n }),\n [\n r,\n o,\n d,\n t,\n i,\n y,\n x,\n g,\n I,\n T,\n j\n ]\n );\n return P(() => {\n if (!E.current) return;\n async function Q() {\n var O;\n try {\n if (M.current || !E.current) return;\n M.current = !0;\n const S = await _;\n if (!S) return;\n const Y = S.ui.card(B);\n Y.mount(E.current), N(Y);\n } catch (S) {\n (O = R.current) == null || O.call(R), console.error(S);\n }\n }\n n ? n.update(B) : Q();\n }, [_, B, n]), /* @__PURE__ */ u.createElement(\"div\", { ref: E });\n}\nfunction ie({\n theme: r,\n autoFocus: o,\n mode: t,\n inputType: i,\n length: d,\n onReady: l,\n onChange: e,\n onError: a\n}) {\n const v = w(), s = b(!1), [c, f] = u.useState(null), p = b(null);\n u.useEffect(() => {\n if (!(!c || !l))\n return c == null ? void 0 : c.on(\"ready\", l);\n }, [c, l]), u.useEffect(() => {\n if (!(!c || !a))\n return c == null ? void 0 : c.on(\"error\", a);\n }, [c, a]), u.useEffect(() => {\n if (!(!c || !e))\n return c == null ? void 0 : c.on(\"change\", e);\n }, [c, e]);\n const m = q(\n () => ({\n theme: r,\n length: d,\n autoFocus: o,\n mode: t,\n inputType: i\n }),\n [r, d, o, t, i]\n );\n return P(() => {\n if (!p.current) return;\n async function y() {\n if (s.current || !p.current) return;\n s.current = !0;\n const x = await v;\n if (!x) return;\n const g = x.ui.pin(m);\n g.mount(p.current), f(g);\n }\n c ? c.update(m) : y().catch(console.error);\n }, [c, m]), /* @__PURE__ */ u.createElement(\"div\", { ref: p });\n}\nfunction ue({\n session: r,\n theme: o,\n size: t,\n onReady: i,\n onError: d,\n onSuccess: l,\n onFailure: e,\n failOnChallenge: a\n}) {\n const v = w(), s = u.useRef(!1), c = u.useRef(null), [f, p] = u.useState(\n null\n );\n u.useEffect(() => {\n if (!(!f || !i))\n return f == null ? void 0 : f.on(\"ready\", i);\n }, [f, i]), u.useEffect(() => {\n if (!(!f || !l))\n return f == null ? void 0 : f.on(\"success\", l);\n }, [f, l]), u.useEffect(() => {\n if (!(!f || !e))\n return f == null ? void 0 : f.on(\"failure\", e);\n }, [f, e]), u.useEffect(() => {\n if (!(!f || !d))\n return f == null ? void 0 : f.on(\"error\", d);\n }, [f, d]);\n const m = u.useMemo(\n () => ({\n theme: o,\n size: t,\n failOnChallenge: a\n }),\n [o, t, a]\n );\n return u.useLayoutEffect(() => {\n async function y() {\n if (s.current) return;\n s.current = !0;\n const x = await v;\n if (!x) return;\n const g = x.ui.threeDSecure(r, m);\n g.mount(c.current), p(g);\n }\n f ? f.update(m) : y().catch(console.error);\n }, [f, r, m]), /* @__PURE__ */ u.createElement(\"div\", { ref: c });\n}\nfunction de(r) {\n const o = w(), t = b(null), i = D(\n (l, e) => {\n t.current && (t.current.unmount(), t.current = null);\n async function a() {\n const v = await o;\n if (v)\n try {\n t.current = v.ui.threeDSecure(l, r), e != null && e.onReady && t.current.on(\"ready\", e.onReady), e != null && e.onSuccess && t.current.on(\"success\", e.onSuccess), e != null && e.onFailure && t.current.on(\"failure\", e.onFailure), e != null && e.onError && t.current.on(\"error\", e.onError), t.current.mount();\n } catch (s) {\n t.current = null, e != null && e.onError && e.onError(s);\n }\n }\n a();\n },\n [o, r]\n );\n h(() => () => {\n t.current && (t.current.unmount(), t.current = null);\n }, []);\n const d = D((l) => {\n t.current && t.current.update(l);\n }, []);\n return {\n start: i,\n update: d\n };\n}\nclass F extends Promise {\n async encrypt(o) {\n return (await this).encrypt(o);\n }\n async decrypt(o, t) {\n return (await this).decrypt(o, t);\n }\n}\nconst K = \"https://js.evervault.com/v2\";\nfunction k(r) {\n const o = document.createElement(\"script\");\n r && r !== \"\" ? o.src = r : o.src = K;\n const t = document.head || document.body;\n if (!t)\n throw new Error(\n \"Expected document.body not to be null. Evervault.js requires a <body> element.\"\n );\n return t.appendChild(o), o;\n}\nlet z = null;\nfunction ee(r, o) {\n return z !== null || (z = new Promise((t, i) => {\n if (typeof window > \"u\") {\n t(void 0);\n return;\n }\n if (window.Evervault) {\n console.warn(\"Evervault has already been loaded\"), t(window.Evervault);\n return;\n }\n try {\n const d = k(r);\n d.addEventListener(\"load\", () => {\n window.Evervault ? t(window.Evervault) : (o == null || o(), i(new Error(\"Evervault.js not available\")));\n }), d.addEventListener(\"error\", () => {\n o == null || o(), i(new Error(\"Failed to load Evervault.js\"));\n });\n } catch (d) {\n i(d);\n }\n })), z;\n}\nfunction te(r, o) {\n const t = Promise.resolve().then(\n () => ee(r, o)\n );\n let i = !1;\n return t.catch((d) => {\n i || console.warn(d);\n }), i = !0, t.then((d) => typeof window < \"u\" ? window.Evervault : d ?? void 0);\n}\nconst fe = ({\n teamId: r,\n appId: o,\n customConfig: t,\n children: i,\n onLoadError: d,\n ...l\n}) => {\n if (typeof window > \"u\")\n return /* @__PURE__ */ u.createElement(L.Provider, { value: null }, i);\n const e = u.useMemo(\n () => new F((a, v) => {\n te(t == null ? void 0 : t.jsSdkUrl, d).then((s) => {\n s !== void 0 ? a(new s(r, o, t)) : (console.error(\"Evervault.js not available\"), v(\"Evervault.js not available\"));\n }).catch((s) => v(s));\n }),\n []\n );\n return /* @__PURE__ */ u.createElement(L.Provider, { ...l, value: e }, i);\n};\nfunction le({\n onChange: r,\n config: o,\n onInputsLoad: t\n}) {\n const i = u.useId();\n if (typeof window > \"u\")\n return /* @__PURE__ */ u.createElement(\"div\", { id: i });\n const d = w(), { height: l = \"auto\", ...e } = o ?? {}, a = e ? { height: l, ...e } : { height: l };\n return u.useEffect(() => {\n d == null || d.then((v) => {\n const s = v.inputs(i, a);\n s == null || s.on(\"change\", (c) => {\n typeof r == \"function\" && r(c);\n }), t && (s == null ? void 0 : s.isInputsLoaded) != null && s.isInputsLoaded instanceof Promise && s.isInputsLoaded.then(() => t());\n });\n }, [d]), /* @__PURE__ */ u.createElement(\"div\", { id: i });\n}\nfunction ce({\n request: r,\n config: o,\n onCopy: t,\n onRevealLoad: i,\n onRevealError: d\n}) {\n const l = u.useId();\n if (typeof window > \"u\")\n return /* @__PURE__ */ u.createElement(\"div\", { id: l });\n const e = w(), { height: a = \"auto\", ...v } = o ?? {}, s = v ? { height: a, ...v } : { height: a };\n return u.useEffect(() => {\n e == null || e.then((c) => {\n const f = c.reveal(l, r, s, t);\n (f == null ? void 0 : f.isRevealLoaded) != null && f.isRevealLoaded instanceof Promise && f.isRevealLoaded.then(() => {\n i && i();\n }).catch((p) => {\n d && d(p);\n });\n });\n }, [e]), /* @__PURE__ */ u.createElement(\"div\", { id: l });\n}\nexport {\n ne as Card,\n le as EvervaultInput,\n fe as EvervaultProvider,\n ce as EvervaultReveal,\n ie as Pin,\n F as PromisifiedEvervaultClient,\n J as Reveal,\n ue as ThreeDSecure,\n oe as themes,\n w as useEvervault,\n de as useThreeDSecure\n};\n","let t = null;\nasync function i() {\n return t || (t = new Promise((n, r) => {\n const e = document.createElement(\"script\");\n if (e.src = \"https://js.evervault.com/v2\", e.onload = () => n(), e.onerror = () => {\n t = null, r();\n }, !document.head)\n throw new Error(\n \"Expected document.head not to be null. Evervault.js requires a <head> element.\"\n );\n document.head.appendChild(e);\n }), t);\n}\nasync function o() {\n if (window.Evervault)\n return window.Evervault;\n try {\n return await i(), window.Evervault;\n } catch {\n throw new Error(\"Failed to load Evervault.js\");\n }\n}\nasync function l(n, r, e) {\n const a = await o();\n return new a(n, r, e);\n}\nPromise.resolve().then(() => {\n o();\n});\nexport {\n l as loadEvervault\n};\n","import { FC, PropsWithChildren, useEffect, useMemo, useState } from 'react'\nimport { EvervaultProvider, EvervaultProviderProps } from '@evervault/react'\nimport { EvContext } from './ev.context'\nimport { EvervaultInstance, loadEvervault } from '@evervault/js'\nimport { EvConfig } from './ev.interface'\n\nexport type EvProps = PropsWithChildren<{\n evConfig: Pick<EvervaultProviderProps, 'appId' | 'teamId'>\n}>\n\nexport const EvProvider: FC<EvProps> = ({ children, evConfig }) => {\n const [ev, setEv] = useState<EvervaultInstance | null>(null)\n const value: EvConfig = useMemo(\n () => ({\n ...evConfig,\n ev,\n }),\n [evConfig, ev],\n )\n\n useEffect(() => {\n loadEvervault(evConfig.teamId, evConfig.appId)\n .then((ev) => setEv(ev))\n .catch(console.error)\n }, [evConfig])\n\n return (\n <EvervaultProvider {...evConfig}>\n <EvContext.Provider value={value}>{children}</EvContext.Provider>\n </EvervaultProvider>\n )\n}\n","import { FC, useEffect, useState } from 'react'\nimport { useEv } from '../../ev.context'\nimport { EvervaultInstance } from '@evervault/js'\nimport { EncryptedGooglePayData, GooglePayButtonLocale } from '@evervault/react'\nimport { GooglePayTransaction } from './google-pay.interface'\nimport styles from './google-pay.module.css'\nimport clsx from 'clsx'\n\ntype Props = {\n transaction: GooglePayTransaction\n locale?: GooglePayButtonLocale\n onCancel?: () => void\n onError?: (error: string) => void\n onSuccess?: () => void\n onReady?: () => void\n onSubmit: (data: EncryptedGooglePayData) => void\n}\n\nconst containerId = 'ab-ev-google-pay-container'\nexport const GooglePay: FC<Props> = ({ onSubmit, onCancel, onError, onSuccess, onReady, transaction, locale }) => {\n const { ev } = useEv()\n const [isReady, setReady] = useState(false)\n const [google, setGoogle] = useState<ReturnType<EvervaultInstance['ui']['googlePay']> | null>(null)\n\n useEffect(() => {\n if (!google) return\n if (onCancel) google.on('cancel', onCancel)\n if (onError) google.on('error', onError)\n if (onSuccess) google.on('success', onSuccess)\n }, [google, onCancel, onError, onSuccess])\n\n useEffect(() => {\n if (!ev) return\n\n try {\n const evTransaction = ev.transactions.create(transaction)\n const google = ev.ui.googlePay(evTransaction, {\n locale,\n size: {\n width: '100%',\n height: '42px',\n },\n billingAddress: {\n phoneNumber: true,\n },\n process: async (paymentData, { fail }) => {\n try {\n onSubmit(paymentData)\n } catch (error) {\n console.error(error)\n fail({\n message: 'Cannot pay with payment credentials',\n })\n }\n },\n })\n\n google.on('ready', () => {\n setReady(true)\n onReady?.()\n })\n\n setGoogle(google)\n google.unmount()\n google.mount(`#${containerId}`)\n } catch (error) {\n console.error(error)\n setReady(false)\n onReady?.()\n }\n }, [ev, transaction, locale, onSubmit, onReady])\n\n return <div id={containerId} className={clsx(styles.googlePay, !isReady ? styles.hidden : undefined)}></div>\n}\n","import { FC, useEffect, useState } from 'react'\nimport { useEv } from '../../ev.context'\nimport { ApplePayButtonLocale, ApplePayCardNetwork, EncryptedApplePayData } from '@evervault/react'\nimport styles from './apple-pay.module.css'\nimport { ApplePayTransaction } from './apple-pay.interface'\nimport clsx from 'clsx'\n\ntype Props = {\n transaction: ApplePayTransaction\n supportedCardTypes?: ApplePayCardNetwork[]\n locale?: ApplePayButtonLocale\n onCancel?: () => void\n onError?: (error: string) => void\n onSuccess?: () => void\n onReady?: () => void\n onSubmit: (data: EncryptedApplePayData) => void\n}\n\nconst containerId = 'ab-ev-apple-pay-container'\nexport const ApplePay: FC<Props> = ({\n onSubmit,\n onCancel,\n onError,\n onSuccess,\n onReady,\n locale,\n transaction,\n supportedCardTypes,\n}) => {\n const [isReady, setReady] = useState(false)\n const { ev } = useEv()\n\n useEffect(() => {\n const init = async () => {\n if (!ev) return\n\n try {\n const evTransaction = ev.transactions.create(transaction)\n const apple = ev.ui.applePay(evTransaction, {\n locale,\n borderRadius: 12,\n size: {\n width: '100%',\n height: '40px',\n },\n allowedCardNetworks: supportedCardTypes,\n requestBillingAddress: true,\n requestPayerDetails: ['name', 'email', 'phone'],\n process: async (paymentData, { fail }) => {\n try {\n onSubmit(paymentData)\n } catch (error) {\n console.error(error)\n fail({\n message: 'Cannot pay with payment credentials',\n })\n }\n },\n })\n\n const availability = await apple.availability()\n if (availability !== 'available') {\n setReady(false)\n onReady?.()\n return\n }\n\n if (onCancel) apple.on('cancel', onCancel)\n if (onError) apple.on('error', (error = '') => onError(error))\n if (onSuccess) apple.on('success', onSuccess)\n\n apple.unmount()\n if ('document' in global) {\n const container = document.getElementById(containerId)\n if (container) {\n container.innerHTML = ''\n }\n }\n apple.mount(`#${containerId}`)\n setReady(true)\n onReady?.()\n } catch (error) {\n console.error(error)\n setReady(false)\n onReady?.()\n }\n }\n init()\n }, [ev, transaction, supportedCardTypes, locale, onSubmit, onCancel, onError, onSuccess, onReady])\n\n return <div id={containerId} className={clsx(styles.applePay, !isReady ? styles.hidden : undefined)}></div>\n}\n","/*!\n * react-paypal-js v8.8.3 (2025-04-11T19:50:46.506Z)\n * Copyright 2020-present, PayPal, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React, { createContext, useContext, useRef, useState, useEffect, useReducer } from 'react';\n\n/**\n * Enum for the SDK script resolve status,\n *\n * @enum {string}\n */\nvar SCRIPT_LOADING_STATE;\n(function (SCRIPT_LOADING_STATE) {\n SCRIPT_LOADING_STATE[\"INITIAL\"] = \"initial\";\n SCRIPT_LOADING_STATE[\"PENDING\"] = \"pending\";\n SCRIPT_LOADING_STATE[\"REJECTED\"] = \"rejected\";\n SCRIPT_LOADING_STATE[\"RESOLVED\"] = \"resolved\";\n})(SCRIPT_LOADING_STATE || (SCRIPT_LOADING_STATE = {}));\n/**\n * Enum for the PayPalScriptProvider context dispatch actions\n *\n * @enum {string}\n */\nvar DISPATCH_ACTION;\n(function (DISPATCH_ACTION) {\n DISPATCH_ACTION[\"LOADING_STATUS\"] = \"setLoadingStatus\";\n DISPATCH_ACTION[\"RESET_OPTIONS\"] = \"resetOptions\";\n DISPATCH_ACTION[\"SET_BRAINTREE_INSTANCE\"] = \"braintreeInstance\";\n})(DISPATCH_ACTION || (DISPATCH_ACTION = {}));\n/**\n * Enum for all the available hosted fields\n *\n * @enum {string}\n */\nvar PAYPAL_HOSTED_FIELDS_TYPES;\n(function (PAYPAL_HOSTED_FIELDS_TYPES) {\n PAYPAL_HOSTED_FIELDS_TYPES[\"NUMBER\"] = \"number\";\n PAYPAL_HOSTED_FIELDS_TYPES[\"CVV\"] = \"cvv\";\n PAYPAL_HOSTED_FIELDS_TYPES[\"EXPIRATION_DATE\"] = \"expirationDate\";\n PAYPAL_HOSTED_FIELDS_TYPES[\"EXPIRATION_MONTH\"] = \"expirationMonth\";\n PAYPAL_HOSTED_FIELDS_TYPES[\"EXPIRATION_YEAR\"] = \"expirationYear\";\n PAYPAL_HOSTED_FIELDS_TYPES[\"POSTAL_CODE\"] = \"postalCode\";\n})(PAYPAL_HOSTED_FIELDS_TYPES || (PAYPAL_HOSTED_FIELDS_TYPES = {}));\nvar __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nfunction __rest$1(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nfunction __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\n/*********************************************\n * Common reference to the script identifier *\n *********************************************/\n// keep this script id value in kebab-case format\nvar SCRIPT_ID = \"data-react-paypal-script-id\";\nvar SDK_SETTINGS = {\n DATA_CLIENT_TOKEN: \"dataClientToken\",\n DATA_JS_SDK_LIBRARY: \"dataJsSdkLibrary\",\n DATA_LIBRARY_VALUE: \"react-paypal-js\",\n DATA_NAMESPACE: \"dataNamespace\",\n DATA_SDK_INTEGRATION_SOURCE: \"dataSdkIntegrationSource\",\n DATA_USER_ID_TOKEN: \"dataUserIdToken\"\n};\nvar LOAD_SCRIPT_ERROR = \"Failed to load the PayPal JS SDK script.\";\n/****************************\n * Braintree error messages *\n ****************************/\nvar EMPTY_BRAINTREE_AUTHORIZATION_ERROR_MESSAGE = \"Invalid authorization data. Use dataClientToken or dataUserIdToken to authorize.\";\nvar braintreeVersion = \"3.117.0\";\nvar BRAINTREE_SOURCE = \"https://js.braintreegateway.com/web/\".concat(braintreeVersion, \"/js/client.min.js\");\nvar BRAINTREE_PAYPAL_CHECKOUT_SOURCE = \"https://js.braintreegateway.com/web/\".concat(braintreeVersion, \"/js/paypal-checkout.min.js\");\n/*********************\n * PayPal namespaces *\n *********************/\nvar DEFAULT_PAYPAL_NAMESPACE = \"paypal\";\nvar DEFAULT_BRAINTREE_NAMESPACE = \"braintree\";\n/*****************\n * Hosted Fields *\n *****************/\nvar HOSTED_FIELDS_CHILDREN_ERROR = \"To use HostedFields you must use it with at least 3 children with types: [number, cvv, expirationDate] includes\";\nvar HOSTED_FIELDS_DUPLICATE_CHILDREN_ERROR = \"Cannot use duplicate HostedFields as children\";\n/*******************\n * Script Provider *\n *******************/\nvar SCRIPT_PROVIDER_REDUCER_ERROR = \"usePayPalScriptReducer must be used within a PayPalScriptProvider\";\nvar CARD_FIELDS_DUPLICATE_CHILDREN_ERROR = \"Cannot use duplicate CardFields as children\";\nvar CARD_FIELDS_CONTEXT_ERROR = \"Individual CardFields must be rendered inside the PayPalCardFieldsProvider\";\n\n/**\n * Get the namespace from the window in the browser\n * this is useful to get the paypal object from window\n * after load PayPal SDK script\n *\n * @param namespace the name space to return\n * @returns the namespace if exists or undefined otherwise\n */\nfunction getPayPalWindowNamespace$1(namespace) {\n if (namespace === void 0) {\n namespace = DEFAULT_PAYPAL_NAMESPACE;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return window[namespace];\n}\n/**\n * Get a namespace from the window in the browser\n * this is useful to get the braintree from window\n * after load Braintree script\n *\n * @param namespace the name space to return\n * @returns the namespace if exists or undefined otherwise\n */\nfunction getBraintreeWindowNamespace(namespace) {\n if (namespace === void 0) {\n namespace = DEFAULT_BRAINTREE_NAMESPACE;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return window[namespace];\n}\n/**\n * Creates a string hash code based on the string argument\n *\n * @param str the source input string to hash\n * @returns string hash code\n */\nfunction hashStr(str) {\n var hash = \"\";\n for (var i = 0; i < str.length; i++) {\n var total = str[i].charCodeAt(0) * i;\n if (str[i + 1]) {\n total += str[i + 1].charCodeAt(0) * (i - 1);\n }\n hash += String.fromCharCode(97 + Math.abs(total) % 26);\n }\n return hash;\n}\nfunction generateErrorMessage(_a) {\n var reactComponentName = _a.reactComponentName,\n sdkComponentKey = _a.sdkComponentKey,\n _b = _a.sdkRequestedComponents,\n sdkRequestedComponents = _b === void 0 ? \"\" : _b,\n _c = _a.sdkDataNamespace,\n sdkDataNamespace = _c === void 0 ? DEFAULT_PAYPAL_NAMESPACE : _c;\n var requiredOptionCapitalized = sdkComponentKey.charAt(0).toUpperCase().concat(sdkComponentKey.substring(1));\n var errorMessage = \"Unable to render <\".concat(reactComponentName, \" /> because window.\").concat(sdkDataNamespace, \".\").concat(requiredOptionCapitalized, \" is undefined.\");\n // The JS SDK only loads the buttons component by default.\n // All other components like messages and marks must be requested using the \"components\" query parameter\n var requestedComponents = typeof sdkRequestedComponents === \"string\" ? sdkRequestedComponents : sdkRequestedComponents.join(\",\");\n if (!requestedComponents.includes(sdkComponentKey)) {\n var expectedComponents = [requestedComponents, sdkComponentKey].filter(Boolean).join();\n errorMessage += \"\\nTo fix the issue, add '\".concat(sdkComponentKey, \"' to the list of components passed to the parent PayPalScriptProvider:\") + \"\\n`<PayPalScriptProvider options={{ components: '\".concat(expectedComponents, \"'}}>`.\");\n }\n return errorMessage;\n}\n\n/**\n * Generate a new random identifier for react-paypal-js\n *\n * @returns the {@code string} containing the random library name\n */\nfunction getScriptID(options) {\n // exclude the data-react-paypal-script-id value from the options hash\n var _a = options,\n _b = SCRIPT_ID;\n _a[_b];\n var paypalScriptOptions = __rest$1(_a, [_b + \"\"]);\n return \"react-paypal-js-\".concat(hashStr(JSON.stringify(paypalScriptOptions)));\n}\n/**\n * Destroy the PayPal SDK from the document page\n *\n * @param reactPayPalScriptID the script identifier\n */\nfunction destroySDKScript(reactPayPalScriptID) {\n var scriptNode = self.document.querySelector(\"script[\".concat(SCRIPT_ID, \"=\\\"\").concat(reactPayPalScriptID, \"\\\"]\"));\n if (scriptNode === null || scriptNode === void 0 ? void 0 : scriptNode.parentNode) {\n scriptNode.parentNode.removeChild(scriptNode);\n }\n}\n/**\n * Reducer function to handle complex state changes on the context\n *\n * @param state the current state on the context object\n * @param action the action to be executed on the previous state\n * @returns a the same state if the action wasn't found, or a new state otherwise\n */\nfunction scriptReducer(state, action) {\n var _a, _b;\n switch (action.type) {\n case DISPATCH_ACTION.LOADING_STATUS:\n if (typeof action.value === \"object\") {\n return __assign(__assign({}, state), {\n loadingStatus: action.value.state,\n loadingStatusErrorMessage: action.value.message\n });\n }\n return __assign(__assign({}, state), {\n loadingStatus: action.value\n });\n case DISPATCH_ACTION.RESET_OPTIONS:\n // destroy existing script to make sure only one script loads at a time\n destroySDKScript(state.options[SCRIPT_ID]);\n return __assign(__assign({}, state), {\n loadingStatus: SCRIPT_LOADING_STATE.PENDING,\n options: __assign(__assign((_a = {}, _a[SDK_SETTINGS.DATA_SDK_INTEGRATION_SOURCE] = SDK_SETTINGS.DATA_LIBRARY_VALUE, _a), action.value), (_b = {}, _b[SCRIPT_ID] = \"\".concat(getScriptID(action.value)), _b))\n });\n case DISPATCH_ACTION.SET_BRAINTREE_INSTANCE:\n return __assign(__assign({}, state), {\n braintreePayPalCheckoutInstance: action.value\n });\n default:\n {\n return state;\n }\n }\n}\n// Create the React context to use in the script provider component\nvar ScriptContext = createContext(null);\n\n/**\n * Check if the context is valid and ready to dispatch actions.\n *\n * @param scriptContext the result of connecting to the context provider\n * @returns strict context avoiding null values in the type\n */\nfunction validateReducer(scriptContext) {\n if (typeof (scriptContext === null || scriptContext === void 0 ? void 0 : scriptContext.dispatch) === \"function\" && scriptContext.dispatch.length !== 0) {\n return scriptContext;\n }\n throw new Error(SCRIPT_PROVIDER_REDUCER_ERROR);\n}\n/**\n * Check if the dataClientToken or the dataUserIdToken are\n * set in the options of the context.\n * @type dataClientToken is use to pass a client token\n * @type dataUserIdToken is use to pass a client tokenization key\n *\n * @param scriptContext the result of connecting to the context provider\n * @throws an {@link Error} if both dataClientToken and the dataUserIdToken keys are null or undefined\n * @returns strict context if one of the keys are defined\n */\nvar validateBraintreeAuthorizationData = function (scriptContext) {\n var _a, _b;\n if (!((_a = scriptContext === null || scriptContext === void 0 ? void 0 : scriptContext.options) === null || _a === void 0 ? void 0 : _a[SDK_SETTINGS.DATA_CLIENT_TOKEN]) && !((_b = scriptContext === null || scriptContext === void 0 ? void 0 : scriptContext.options) === null || _b === void 0 ? void 0 : _b[SDK_SETTINGS.DATA_USER_ID_TOKEN])) {\n throw new Error(EMPTY_BRAINTREE_AUTHORIZATION_ERROR_MESSAGE);\n }\n return scriptContext;\n};\n\n/**\n * Custom hook to get access to the Script context and\n * dispatch actions to modify the state on the {@link ScriptProvider} component\n *\n * @returns a tuple containing the state of the context and\n * a dispatch function to modify the state\n */\nfunction usePayPalScriptReducer() {\n var scriptContext = validateReducer(useContext(ScriptContext));\n var derivedStatusContext = __assign(__assign({}, scriptContext), {\n isInitial: scriptContext.loadingStatus === SCRIPT_LOADING_STATE.INITIAL,\n isPending: scriptContext.loadingStatus === SCRIPT_LOADING_STATE.PENDING,\n isResolved: scriptContext.loadingStatus === SCRIPT_LOADING_STATE.RESOLVED,\n isRejected: scriptContext.loadingStatus === SCRIPT_LOADING_STATE.REJECTED\n });\n return [derivedStatusContext, scriptContext.dispatch];\n}\n/**\n * Custom hook to get access to the ScriptProvider context\n *\n * @returns the latest state of the context\n */\nfunction useScriptProviderContext() {\n var scriptContext = validateBraintreeAuthorizationData(validateReducer(useContext(ScriptContext)));\n return [scriptContext, scriptContext.dispatch];\n}\n\n// Create the React context to use in the PayPal hosted fields provider\nvar PayPalHostedFieldsContext = createContext({});\n\n/**\n * Custom hook to get access to the PayPal Hosted Fields instance.\n * The instance represent the returned object after the render process\n * With this object a user can submit the fields and dynamically modify the cards\n *\n * @returns the hosted fields instance if is available in the component\n */\nfunction usePayPalHostedFields() {\n return useContext(PayPalHostedFieldsContext);\n}\nfunction useProxyProps(props) {\n var proxyRef = useRef(new Proxy({}, {\n get: function (target, prop, receiver) {\n /**\n *\n * If target[prop] is a function, return a function that accesses\n * this function off the target object. We can mutate the target with\n * new copies of this function without having to re-render the\n * SDK components to pass new callbacks.\n *\n * */\n if (typeof target[prop] === \"function\") {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // eslint-disable-next-line @typescript-eslint/ban-types\n return target[prop].apply(target, args);\n };\n }\n return Reflect.get(target, prop, receiver);\n }\n }));\n proxyRef.current = Object.assign(proxyRef.current, props);\n return proxyRef.current;\n}\n\n/**\nThis `<PayPalButtons />` component supports rendering [buttons](https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-reference/#buttons) for PayPal, Venmo, and alternative payment methods.\nIt relies on the `<PayPalScriptProvider />` parent component for managing state related to loading the JS SDK script.\n*/\nvar PayPalButtons = function (_a) {\n var _b;\n var _c = _a.className,\n className = _c === void 0 ? \"\" : _c,\n _d = _a.disabled,\n disabled = _d === void 0 ? false : _d,\n children = _a.children,\n _e = _a.forceReRender,\n forceReRender = _e === void 0 ? [] : _e,\n buttonProps = __rest$1(_a, [\"className\", \"disabled\", \"children\", \"forceReRender\"]);\n var isDisabledStyle = disabled ? {\n opacity: 0.38\n } : {};\n var classNames = \"\".concat(className, \" \").concat(disabled ? \"paypal-buttons-disabled\" : \"\").trim();\n var buttonsContainerRef = useRef(null);\n var buttons = useRef(null);\n var proxyProps = useProxyProps(buttonProps);\n var _f = usePayPalScriptReducer()[0],\n isResolved = _f.isResolved,\n options = _f.options;\n var _g = useState(null),\n initActions = _g[0],\n setInitActions = _g[1];\n var _h = useState(true),\n isEligible = _h[0],\n setIsEligible = _h[1];\n var _j = useState(null),\n setErrorState = _j[1];\n function closeButtonsComponent() {\n if (buttons.current !== null) {\n buttons.current.close().catch(function () {\n // ignore errors when closing the component\n });\n }\n }\n if ((_b = buttons.current) === null || _b === void 0 ? void 0 : _b.updateProps) {\n buttons.current.updateProps({\n message: buttonProps.message\n });\n }\n // useEffect hook for rendering the buttons\n useEffect(function () {\n // verify the sdk script has successfully loaded\n if (isResolved === false) {\n return closeButtonsComponent;\n }\n var paypalWindowNamespace = getPayPalWindowNamespace$1(options.dataNamespace);\n // verify dependency on window object\n if (paypalWindowNamespace === undefined || paypalWindowNamespace.Buttons === undefined) {\n setErrorState(function () {\n throw new Error(generateErrorMessage({\n reactComponentName: PayPalButtons.displayName,\n sdkComponentKey: \"buttons\",\n sdkRequestedComponents: options.components,\n sdkDataNamespace: options[SDK_SETTINGS.DATA_NAMESPACE]\n }));\n });\n return closeButtonsComponent;\n }\n var decoratedOnInit = function (data, actions) {\n setInitActions(actions);\n if (typeof buttonProps.onInit === \"function\") {\n buttonProps.onInit(data, actions);\n }\n };\n try {\n buttons.current = paypalWindowNamespace.Buttons(__assign(__assign({}, proxyProps), {\n onInit: decoratedOnInit\n }));\n } catch (err) {\n return setErrorState(function () {\n throw new Error(\"Failed to render <PayPalButtons /> component. Failed to initialize: \".concat(err));\n });\n }\n // only render the button when eligible\n if (buttons.current.isEligible() === false) {\n setIsEligible(false);\n return closeButtonsComponent;\n }\n if (!buttonsContainerRef.current) {\n return closeButtonsComponent;\n }\n buttons.current.render(buttonsContainerRef.current).catch(function (err) {\n // component failed to render, possibly because it was closed or destroyed.\n if (buttonsContainerRef.current === null || buttonsContainerRef.current.children.length === 0) {\n // paypal buttons container is no longer in the DOM, we can safely ignore the error\n return;\n }\n // paypal buttons container is still in the DOM\n setErrorState(function () {\n throw new Error(\"Failed to render <PayPalButtons /> component. \".concat(err));\n });\n });\n return closeButtonsComponent;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, __spreadArray(__spreadArray([isResolved], forceReRender, true), [buttonProps.fundingSource], false));\n // useEffect hook for managing disabled state\n useEffect(function () {\n if (initActions === null) {\n return;\n }\n if (disabled === true) {\n initActions.disable().catch(function () {\n // ignore errors when disabling the component\n });\n } else {\n initActions.enable().catch(function () {\n // ignore errors when enabling the component\n });\n }\n }, [disabled, initActions]);\n return React.createElement(React.Fragment, null, isEligible ? React.createElement(\"div\", {\n ref: buttonsContainerRef,\n style: isDisabledStyle,\n className: classNames\n }) : children);\n};\nPayPalButtons.displayName = \"PayPalButtons\";\nfunction __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\nfunction findScript(url, attributes) {\n var currentScript = document.querySelector(\"script[src=\\\"\".concat(url, \"\\\"]\"));\n if (currentScript === null) return null;\n var nextScript = createScriptElement(url, attributes);\n var currentScriptClone = currentScript.cloneNode();\n delete currentScriptClone.dataset.uidAuto;\n if (Object.keys(currentScriptClone.dataset).length !== Object.keys(nextScript.dataset).length) {\n return null;\n }\n var isExactMatch = true;\n Object.keys(currentScriptClone.dataset).forEach(function (key) {\n if (currentScriptClone.dataset[key] !== nextScript.dataset[key]) {\n isExactMatch = false;\n }\n });\n return isExactMatch ? currentScript : null;\n}\nfunction insertScriptElement(_a) {\n var url = _a.url,\n attributes = _a.attributes,\n onSuccess = _a.onSuccess,\n onError = _a.onError;\n var newScript = createScriptElement(url, attributes);\n newScript.onerror = onError;\n newScript.onload = onSuccess;\n document.head.insertBefore(newScript, document.head.firstElementChild);\n}\nfunction processOptions(_a) {\n var customSdkBaseUrl = _a.sdkBaseUrl,\n environment = _a.environment,\n options = __rest(_a, [\"sdkBaseUrl\", \"environment\"]);\n var sdkBaseUrl = customSdkBaseUrl || processSdkBaseUrl(environment);\n var optionsWithStringIndex = options;\n var _b = Object.keys(optionsWithStringIndex).filter(function (key) {\n return typeof optionsWithStringIndex[key] !== \"undefined\" && optionsWithStringIndex[key] !== null && optionsWithStringIndex[key] !== \"\";\n }).reduce(function (accumulator, key) {\n var value = optionsWithStringIndex[key].toString();\n key = camelCaseToKebabCase(key);\n if (key.substring(0, 4) === \"data\" || key === \"crossorigin\") {\n accumulator.attributes[key] = value;\n } else {\n accumulator.queryParams[key] = value;\n }\n return accumulator;\n }, {\n queryParams: {},\n attributes: {}\n }),\n queryParams = _b.queryParams,\n attributes = _b.attributes;\n if (queryParams[\"merchant-id\"] && queryParams[\"merchant-id\"].indexOf(\",\") !== -1) {\n attributes[\"data-merchant-id\"] = queryParams[\"merchant-id\"];\n queryParams[\"merchant-id\"] = \"*\";\n }\n return {\n url: \"\".concat(sdkBaseUrl, \"?\").concat(objectToQueryString(queryParams)),\n attributes: attributes\n };\n}\nfunction camelCaseToKebabCase(str) {\n var replacer = function (match, indexOfMatch) {\n return (indexOfMatch ? \"-\" : \"\") + match.toLowerCase();\n };\n return str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, replacer);\n}\nfunction objectToQueryString(params) {\n var queryString = \"\";\n Object.keys(params).forEach(function (key) {\n if (queryString.length !== 0) queryString += \"&\";\n queryString += key + \"=\" + params[key];\n });\n return queryString;\n}\nfunction processSdkBaseUrl(environment) {\n return environment === \"sandbox\" ? \"https://www.sandbox.paypal.com/sdk/js\" : \"https://www.paypal.com/sdk/js\";\n}\nfunction createScriptElement(url, attributes) {\n if (attributes === void 0) {\n attributes = {};\n }\n var newScript = document.createElement(\"script\");\n newScript.src = url;\n Object.keys(attributes).forEach(function (key) {\n newScript.setAttribute(key, attributes[key]);\n if (key === \"data-csp-nonce\") {\n newScript.setAttribute(\"nonce\", attributes[\"data-csp-nonce\"]);\n }\n });\n return newScript;\n}\nfunction loadScript(options, PromisePonyfill) {\n if (PromisePonyfill === void 0) {\n PromisePonyfill = Promise;\n }\n validateArguments(options, PromisePonyfill);\n if (typeof document === \"undefined\") return PromisePonyfill.resolve(null);\n var _a = processOptions(options),\n url = _a.url,\n attributes = _a.attributes;\n var namespace = attributes[\"data-namespace\"] || \"paypal\";\n var existingWindowNamespace = getPayPalWindowNamespace(namespace);\n if (!attributes[\"data-js-sdk-library\"]) {\n attributes[\"data-js-sdk-library\"] = \"paypal-js\";\n }\n if (findScript(url, attributes) && existingWindowNamespace) {\n return PromisePonyfill.resolve(existingWindowNamespace);\n }\n return loadCustomScript({\n url: url,\n attributes: attributes\n }, PromisePonyfill).then(function () {\n var newWindowNamespace = getPayPalWindowNamespace(namespace);\n if (newWindowNamespace) {\n return newWindowNamespace;\n }\n throw new Error(\"The window.\".concat(namespace, \" global variable is not available.\"));\n });\n}\nfunction loadCustomScript(options, PromisePonyfill) {\n if (PromisePonyfill === void 0) {\n PromisePonyfill = Promise;\n }\n validateArguments(options, PromisePonyfill);\n var url = options.url,\n attributes = options.attributes;\n if (typeof url !== \"string\" || url.length === 0) {\n throw new Error(\"Invalid url.\");\n }\n if (typeof attributes !== \"undefined\" && typeof attributes !== \"object\") {\n throw new Error(\"Expected attributes to be an object.\");\n }\n return new PromisePonyfill(function (resolve, reject) {\n if (typeof document === \"undefined\") return resolve();\n insertScriptElement({\n url: url,\n attributes: attributes,\n onSuccess: function () {\n return resolve();\n },\n onError: function () {\n var defaultError = new Error(\"The script \\\"\".concat(url, \"\\\" failed to load. Check the HTTP status code and response body in DevTools to learn more.\"));\n return reject(defaultError);\n }\n });\n });\n}\nfunction getPayPalWindowNamespace(namespace) {\n return window[namespace];\n}\nfunction validateArguments(options, PromisePonyfill) {\n if (typeof options !== \"object\" || options === null) {\n throw new Error(\"Expected an options object.\");\n }\n var environment = options.environment;\n if (environment && environment !== \"production\" && environment !== \"sandbox\") {\n throw new Error('The `environment` option must be either \"production\" or \"sandbox\".');\n }\n if (typeof PromisePonyfill !== \"undefined\" && typeof PromisePonyfill !== \"function\") {\n throw new Error(\"Expected PromisePonyfill to be a function.\");\n }\n}\n\n/**\n * Simple check to determine if the Braintree is a valid namespace.\n *\n * @param braintreeSource the source {@link BraintreeNamespace}\n * @returns a boolean representing if the namespace is valid.\n */\nvar isValidBraintreeNamespace = function (braintreeSource) {\n var _a, _b;\n if (typeof ((_a = braintreeSource === null || braintreeSource === void 0 ? void 0 : braintreeSource.client) === null || _a === void 0 ? void 0 : _a.create) !== \"function\" && typeof ((_b = braintreeSource === null || braintreeSource === void 0 ? void 0 : braintreeSource.paypalCheckout) === null || _b === void 0 ? void 0 : _b.create) !== \"function\") {\n throw new Error(\"The braintreeNamespace property is not a valid BraintreeNamespace type.\");\n }\n return true;\n};\n/**\n * Use `actions.braintree` to provide an interface for the paypalCheckoutInstance\n * through the createOrder, createBillingAgreement and onApprove callbacks\n *\n * @param braintreeButtonProps the component button options\n * @returns a new copy of the component button options casted as {@link PayPalButtonsComponentProps}\n */\nvar decorateActions = function (buttonProps, payPalCheckoutInstance) {\n var createOrderRef = buttonProps.createOrder;\n var createBillingAgreementRef = buttonProps.createBillingAgreement;\n var onApproveRef = buttonProps.onApprove;\n if (typeof createOrderRef === \"function\") {\n buttonProps.createOrder = function (data, actions) {\n return createOrderRef(data, __assign(__assign({}, actions), {\n braintree: payPalCheckoutInstance\n }));\n };\n }\n if (typeof createBillingAgreementRef === \"function\") {\n buttonProps.createBillingAgreement = function (data, actions) {\n return createBillingAgreementRef(data, __assign(__assign({}, actions), {\n braintree: payPalCheckoutInstance\n }));\n };\n }\n if (typeof onApproveRef === \"function\") {\n buttonProps.onApprove = function (data, actions) {\n return onApproveRef(data, __assign(__assign({}, actions), {\n braintree: payPalCheckoutInstance\n }));\n };\n }\n return __assign({}, buttonProps);\n};\n/**\n * Get the Braintree namespace from the component props.\n * If the prop `braintreeNamespace` is undefined will try to load it from the CDN.\n * This function allows users to set the braintree manually on the `BraintreePayPalButtons` component.\n *\n * Use case can be for example legacy sites using AMD/UMD modules,\n * trying to integrate the `BraintreePayPalButtons` component.\n * If we attempt to load the Braintree from the CDN won't define the braintree namespace.\n * This happens because the braintree script is an UMD module.\n * After detecting the AMD on the global scope will create an anonymous module using `define`\n * and the `BraintreePayPalButtons` won't be able to get access to the `window.braintree` namespace\n * from the global context.\n *\n * @param braintreeSource the source {@link BraintreeNamespace}\n * @returns the {@link BraintreeNamespace}\n */\nvar getBraintreeNamespace = function (braintreeSource) {\n if (braintreeSource && isValidBraintreeNamespace(braintreeSource)) {\n return Promise.resolve(braintreeSource);\n }\n return Promise.all([loadCustomScript({\n url: BRAINTREE_SOURCE\n }), loadCustomScript({\n url: BRAINTREE_PAYPAL_CHECKOUT_SOURCE\n })]).then(function () {\n return getBraintreeWindowNamespace();\n });\n};\n\n/**\nThis `<BraintreePayPalButtons />` component renders the [Braintree PayPal Buttons](https://developer.paypal.com/braintree/docs/guides/paypal/overview) for Braintree Merchants.\nIt relies on the `<PayPalScriptProvider />` parent component for managing state related to loading the JS SDK script.\n\nNote: You are able to make your integration using the client token or using the tokenization key.\n\n- To use the client token integration set the key `dataClientToken` in the `PayPayScriptProvider` component's options.\n- To use the tokenization key integration set the key `dataUserIdToken` in the `PayPayScriptProvider` component's options.\n*/\nvar BraintreePayPalButtons = function (_a) {\n var _b = _a.className,\n className = _b === void 0 ? \"\" : _b,\n _c = _a.disabled,\n disabled = _c === void 0 ? false : _c,\n children = _a.children,\n _d = _a.forceReRender,\n forceReRender = _d === void 0 ? [] : _d,\n braintreeNamespace = _a.braintreeNamespace,\n merchantAccountId = _a.merchantAccountId,\n buttonProps = __rest$1(_a, [\"className\", \"disabled\", \"children\", \"forceReRender\", \"braintreeNamespace\", \"merchantAccountId\"]);\n var _e = useState(null),\n setErrorState = _e[1];\n var _f = useScriptProviderContext(),\n providerContext = _f[0],\n dispatch = _f[1];\n useEffect(function () {\n getBraintreeNamespace(braintreeNamespace).then(function (braintree) {\n var clientTokenizationKey = providerContext.options[SDK_SETTINGS.DATA_USER_ID_TOKEN];\n var clientToken = providerContext.options[SDK_SETTINGS.DATA_CLIENT_TOKEN];\n return braintree.client.create({\n authorization: clientTokenizationKey || clientToken\n }).then(function (clientInstance) {\n var merchantProp = merchantAccountId ? {\n merchantAccountId: merchantAccountId\n } : {};\n return braintree.paypalCheckout.create(__assign(__assign({}, merchantProp), {\n client: clientInstance\n }));\n }).then(function (paypalCheckoutInstance) {\n dispatch({\n type: DISPATCH_ACTION.SET_BRAINTREE_INSTANCE,\n value: paypalCheckoutInstance\n });\n });\n }).catch(function (err) {\n setErrorState(function () {\n throw new Error(\"\".concat(LOAD_SCRIPT_ERROR, \" \").concat(err));\n });\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [providerContext.options]);\n return React.createElement(React.Fragment, null, providerContext.braintreePayPalCheckoutInstance && React.createElement(PayPalButtons, __assign({\n className: className,\n disabled: disabled,\n forceReRender: forceReRender\n }, decorateActions(buttonProps, providerContext.braintreePayPalCheckoutInstance)), children));\n};\n\n/**\nThe `<PayPalMarks />` component is used for conditionally rendering different payment options using radio buttons.\nThe [Display PayPal Buttons with other Payment Methods guide](https://developer.paypal.com/docs/business/checkout/add-capabilities/buyer-experience/#display-paypal-buttons-with-other-payment-methods) describes this style of integration in detail.\nIt relies on the `<PayPalScriptProvider />` parent component for managing state related to loading the JS SDK script.\n\nThis component can also be configured to use a single funding source similar to the [standalone buttons](https://developer.paypal.com/docs/business/checkout/configure-payments/standalone-buttons/) approach.\nA `FUNDING` object is exported by this library which has a key for every available funding source option.\n*/\nvar PayPalMarks = function (_a) {\n var _b = _a.className,\n className = _b === void 0 ? \"\" : _b,\n children = _a.children,\n markProps = __rest$1(_a, [\"className\", \"children\"]);\n var _c = usePayPalScriptReducer()[0],\n isResolved = _c.isResolved,\n options = _c.options;\n var markContainerRef = useRef(null);\n var _d = useState(true),\n isEligible = _d[0],\n setIsEligible = _d[1];\n var _e = useState(null),\n setErrorState = _e[1];\n /**\n * Render PayPal Mark into the DOM\n */\n var renderPayPalMark = function (mark) {\n var current = markContainerRef.current;\n // only render the mark when eligible\n if (!current || !mark.isEligible()) {\n return setIsEligible(false);\n }\n // Remove any children before render it again\n if (current.firstChild) {\n current.removeChild(current.firstChild);\n }\n mark.render(current).catch(function (err) {\n // component failed to render, possibly because it was closed or destroyed.\n if (current === null || current.children.length === 0) {\n // paypal marks container is no longer in the DOM, we can safely ignore the error\n return;\n }\n // paypal marks container is still in the DOM\n setErrorState(function () {\n throw new Error(\"Failed to render <PayPalMarks /> component. \".concat(err));\n });\n });\n };\n useEffect(function () {\n // verify the sdk script has successfully loaded\n if (isResolved === false) {\n return;\n }\n var paypalWindowNamespace = getPayPalWindowNamespace$1(options[SDK_SETTINGS.DATA_NAMESPACE]);\n // verify dependency on window object\n if (paypalWindowNamespace === undefined || paypalWindowNamespace.Marks === undefined) {\n return setErrorState(function () {\n throw new Error(generateErrorMessage({\n reactComponentName: PayPalMarks.displayName,\n sdkComponentKey: \"marks\",\n sdkRequestedComponents: options.components,\n sdkDataNamespace: options[SDK_SETTINGS.DATA_NAMESPACE]\n }));\n });\n }\n renderPayPalMark(paypalWindowNamespace.Marks(__assign({}, markProps)));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isResolved, markProps.fundingSource]);\n return React.createElement(React.Fragment, null, isEligible ? React.createElement(\"div\", {\n ref: markContainerRef,\n className: className\n }) : children);\n};\nPayPalMarks.displayName = \"PayPalMarks\";\n\n/**\nThis `<PayPalMessages />` messages component renders a credit messaging on upstream merchant sites.\nIt relies on the `<PayPalScriptProvider />` parent component for managing state related to loading the JS SDK script.\n*/\nvar PayPalMessages = function (_a) {\n var _b = _a.className,\n className = _b === void 0 ? \"\" : _b,\n _c = _a.forceReRender,\n forceReRender = _c === void 0 ? [] : _c,\n messageProps = __rest$1(_a, [\"className\", \"forceReRender\"]);\n var _d = usePayPalScriptReducer()[0],\n isResolved = _d.isResolved,\n options = _d.options;\n var messagesContainerRef = useRef(null);\n var messages = useRef(null);\n var _e = useState(null),\n setErrorState = _e[1];\n useEffect(function () {\n // verify the sdk script has successfully loaded\n if (isResolved === false) {\n return;\n }\n var paypalWindowNamespace = getPayPalWindowNamespace$1(options[SDK_SETTINGS.DATA_NAMESPACE]);\n // verify dependency on window object\n if (paypalWindowNamespace === undefined || paypalWindowNamespace.Messages === undefined) {\n return setErrorState(function () {\n throw new Error(generateErrorMessage({\n reactComponentName: PayPalMessages.displayName,\n sdkComponentKey: \"messages\",\n sdkRequestedComponents: options.components,\n sdkDataNamespace: options[SDK_SETTINGS.DATA_NAMESPACE]\n }));\n });\n }\n messages.current = paypalWindowNamespace.Messages(__assign({}, messageProps));\n messages.current.render(messagesContainerRef.current).catch(function (err) {\n // component failed to render, possibly because it was closed or destroyed.\n if (messagesContainerRef.current === null || messagesContainerRef.current.children.length === 0) {\n // paypal messages container is no longer in the DOM, we can safely ignore the error\n return;\n }\n // paypal messages container is still in the DOM\n setErrorState(function () {\n throw new Error(\"Failed to render <PayPalMessages /> component. \".concat(err));\n });\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, __spreadArray([isResolved], forceReRender, true));\n return React.createElement(\"div\", {\n ref: messagesContainerRef,\n className: className\n });\n};\nPayPalMessages.displayName = \"PayPalMessages\";\n\n/**\nThis `<PayPalScriptProvider />` component takes care of loading the JS SDK `<script>`.\nIt manages state for script loading so children components like `<PayPalButtons />` know when it's safe to use the `window.paypal` global namespace.\n\nNote: You always should use this component as a wrapper for `PayPalButtons`, `PayPalMarks`, `PayPalMessages` and `BraintreePayPalButtons` components.\n */\nvar PayPalScriptProvider = function (_a) {\n var _b;\n var _c = _a.options,\n options = _c === void 0 ? {\n clientId: \"test\"\n } : _c,\n children = _a.children,\n _d = _a.deferLoading,\n deferLoading = _d === void 0 ? false : _d;\n var _e = useReducer(scriptReducer, {\n options: __assign(__assign({}, options), (_b = {}, _b[SDK_SETTINGS.DATA_JS_SDK_LIBRARY] = SDK_SETTINGS.DATA_LIBRARY_VALUE, _b[SDK_SETTINGS.DATA_SDK_INTEGRATION_SOURCE] = SDK_SETTINGS.DATA_LIBRARY_VALUE, _b[SCRIPT_ID] = \"\".concat(getScriptID(options)), _b)),\n loadingStatus: deferLoading ? SCRIPT_LOADING_STATE.INITIAL : SCRIPT_LOADING_STATE.PENDING\n }),\n state = _e[0],\n dispatch = _e[1];\n useEffect(function () {\n if (deferLoading === false && state.loadingStatus === SCRIPT_LOADING_STATE.INITIAL) {\n return dispatch({\n type: DISPATCH_ACTION.LOADING_STATUS,\n value: SCRIPT_LOADING_STATE.PENDING\n });\n }\n if (state.loadingStatus !== SCRIPT_LOADING_STATE.PENDING) {\n return;\n }\n var isSubscribed = true;\n loadScript(state.options).then(function () {\n if (isSubscribed) {\n dispatch({\n type: DISPATCH_ACTION.LOADING_STATUS,\n value: SCRIPT_LOADING_STATE.RESOLVED\n });\n }\n }).catch(function (err) {\n console.error(\"\".concat(LOAD_SCRIPT_ERROR, \" \").concat(err));\n if (isSubscribed) {\n dispatch({\n type: DISPATCH_ACTION.LOADING_STATUS,\n value: {\n state: SCRIPT_LOADING_STATE.REJECTED,\n message: String(err)\n }\n });\n }\n });\n return function () {\n isSubscribed = false;\n };\n }, [state.options, deferLoading, state.loadingStatus]);\n return React.createElement(ScriptContext.Provider, {\n value: __assign(__assign({}, state), {\n dispatch: dispatch\n })\n }, children);\n};\n\n/**\n * Custom hook to store registered hosted fields children\n * Each `PayPalHostedField` component should be registered on the parent provider\n *\n * @param initialValue the initially registered components\n * @returns at first, an {@link Object} containing the registered hosted fields,\n * and at the second a function handler to register the hosted fields components\n */\nvar useHostedFieldsRegister = function (initialValue) {\n if (initialValue === void 0) {\n initialValue = {};\n }\n var registeredFields = useRef(initialValue);\n var registerHostedField = function (component) {\n registeredFields.current = __assign(__assign({}, registeredFields.current), component);\n };\n return [registeredFields, registerHostedField];\n};\n\n/**\n * Throw an exception if the HostedFields is not found in the paypal namespace\n * Probably cause for this problem is not sending the hosted-fields string\n * as part of the components props in options\n * {@code <PayPalScriptProvider options={{ components: 'hosted-fields'}}>}\n *\n * @param param0 and object containing the components and namespace defined in options\n * @throws {@code Error}\n *\n */\nvar generateMissingHostedFieldsError = function (_a) {\n var _b = _a.components,\n components = _b === void 0 ? \"\" : _b,\n _c = SDK_SETTINGS.DATA_NAMESPACE,\n _d = _a[_c],\n dataNamespace = _d === void 0 ? DEFAULT_PAYPAL_NAMESPACE : _d;\n var expectedComponents = components ? \"\".concat(components, \",hosted-fields\") : \"hosted-fields\";\n var errorMessage = \"Unable to render <PayPalHostedFieldsProvider /> because window.\".concat(dataNamespace, \".HostedFields is undefined.\");\n if (!components.includes(\"hosted-fields\")) {\n errorMessage += \"\\nTo fix the issue, add 'hosted-fields' to the list of components passed to the parent PayPalScriptProvider: <PayPalScriptProvider options={{ components: '\".concat(expectedComponents, \"'}}>\");\n }\n return errorMessage;\n};\n/**\n * Validate the expiration date component. Valid combinations are:\n * 1- Only the `expirationDate` field exists.\n * 2- Only the `expirationMonth` and `expirationYear` fields exist. Cannot be used with the `expirationDate` field.\n *\n * @param registerTypes\n * @returns @type {true} when the children are valid\n */\nvar validateExpirationDate = function (registerTypes) {\n return !registerTypes.includes(PAYPAL_HOSTED_FIELDS_TYPES.EXPIRATION_DATE) && !registerTypes.includes(PAYPAL_HOSTED_FIELDS_TYPES.EXPIRATION_MONTH) && !registerTypes.includes(PAYPAL_HOSTED_FIELDS_TYPES.EXPIRATION_YEAR);\n};\n/**\n * Check if we find the [number, expiration, cvv] in children\n *\n * @param requiredChildren the list with required children [number, expiration, cvv]\n * @param registerTypes the list of all the children types pass to the parent\n * @throw an @type {Error} when not find the default children\n */\nvar hasDefaultChildren = function (registerTypes) {\n if (!registerTypes.includes(PAYPAL_HOSTED_FIELDS_TYPES.NUMBER) || !registerTypes.includes(PAYPAL_HOSTED_FIELDS_TYPES.CVV) || validateExpirationDate(registerTypes)) {\n throw new Error(HOSTED_FIELDS_CHILDREN_ERROR);\n }\n};\n/**\n * Check if we don't have duplicate children types\n *\n * @param registerTypes the list of all the children types pass to the parent\n * @throw an @type {Error} when duplicate types was found\n */\nvar noDuplicateChildren = function (registerTypes) {\n if (registerTypes.length !== new Set(registerTypes).size) {\n throw new Error(HOSTED_FIELDS_DUPLICATE_CHILDREN_ERROR);\n }\n};\n/**\n * Validate the hosted field children in the PayPalHostedFieldsProvider component.\n * These are the rules:\n * 1- We need to find 3 default children for number, expiration, cvv\n * 2- No duplicate children are allowed\n * 3- No invalid combinations of `expirationDate`, `expirationMonth`, and `expirationYear`\n *\n * @param childrenList the list of children\n * @param requiredChildren the list with required children [number, expiration, cvv]\n */\nvar validateHostedFieldChildren = function (registeredFields) {\n hasDefaultChildren(registeredFields);\n noDuplicateChildren(registeredFields);\n};\n\n/**\nThis `<PayPalHostedFieldsProvider />` provider component wraps the form field elements and accepts props like `createOrder()`.\n\nThis provider component is designed to be used with the `<PayPalHostedField />` component.\n\nWarning: If you don't see anything in the screen probably your client is ineligible.\nTo handle this problem make sure to use the prop `notEligibleError` and pass a component with a custom message.\nTake a look to this link if that is the case: https://developer.paypal.com/docs/checkout/advanced/integrate/\n*/\nvar PayPalHostedFieldsProvider = function (_a) {\n var styles = _a.styles,\n createOrder = _a.createOrder,\n notEligibleError = _a.notEligibleError,\n children = _a.children,\n installments = _a.installments;\n var _b = useScriptProviderContext()[0],\n options = _b.options,\n loadingStatus = _b.loadingStatus;\n var _c = useState(true),\n isEligible = _c[0],\n setIsEligible = _c[1];\n var _d = useState(),\n cardFields = _d[0],\n setCardFields = _d[1];\n var _e = useState(null),\n setErrorState = _e[1];\n var hostedFieldsContainerRef = useRef(null);\n var hostedFields = useRef();\n var _f = useHostedFieldsRegister(),\n registeredFields = _f[0],\n registerHostedField = _f[1];\n useEffect(function () {\n var _a;\n validateHostedFieldChildren(Object.keys(registeredFields.current));\n // Only render the hosted fields when script is loaded and hostedFields is eligible\n if (!(loadingStatus === SCRIPT_LOADING_STATE.RESOLVED)) {\n return;\n }\n // Get the hosted fields from the [window.paypal.HostedFields] SDK\n hostedFields.current = getPayPalWindowNamespace$1(options[SDK_SETTINGS.DATA_NAMESPACE]).HostedFields;\n if (!hostedFields.current) {\n throw new Error(generateMissingHostedFieldsError((_a = {\n components: options.components\n }, _a[SDK_SETTINGS.DATA_NAMESPACE] = options[SDK_SETTINGS.DATA_NAMESPACE], _a)));\n }\n if (!hostedFields.current.isEligible()) {\n return setIsEligible(false);\n }\n // Clean all the fields before the rerender\n if (cardFields) {\n cardFields.teardown();\n }\n hostedFields.current.render({\n // Call your server to set up the transaction\n createOrder: createOrder,\n fields: registeredFields.current,\n installments: installments,\n styles: styles\n }).then(function (cardFieldsInstance) {\n if (hostedFieldsContainerRef.current) {\n setCardFields(cardFieldsInstance);\n }\n }).catch(function (err) {\n setErrorState(function () {\n throw new Error(\"Failed to render <PayPalHostedFieldsProvider /> component. \".concat(err));\n });\n });\n }, [loadingStatus, styles]); // eslint-disable-line react-hooks/exhaustive-deps\n return React.createElement(\"div\", {\n ref: hostedFieldsContainerRef\n }, isEligible ? React.createElement(PayPalHostedFieldsContext.Provider, {\n value: {\n cardFields: cardFields,\n registerHostedField: registerHostedField\n }\n }, children) : notEligibleError);\n};\n\n/**\nThis `<PayPalHostedField />` component renders individual fields for [Hosted Fields](https://developer.paypal.com/docs/business/checkout/advanced-card-payments/integrate#3-add-javascript-sdk-and-card-form) integrations.\nIt relies on the `<PayPalHostedFieldsProvider />` parent component for managing state related to loading the JS SDK script\nand execute some validations before the rendering the fields.\n\nTo use the PayPal hosted fields you need to define at least three fields:\n\n- A card number field\n- The CVV code from the client card\n- The expiration date\n\nYou can define the expiration date as a single field similar to the example below,\nor you are able to define it in [two separate fields](https://paypal.github.io/react-paypal-js//?path=/docs/paypal-paypalhostedfields--expiration-date). One for the month and second for year.\n\nNote: Take care when using multiple instances of the PayPal Hosted Fields on the same page.\nThe component will fail to render when any of the selectors return more than one element.\n*/\nvar PayPalHostedField = function (_a) {\n var hostedFieldType = _a.hostedFieldType,\n // eslint-disable-line @typescript-eslint/no-unused-vars\n options = _a.options,\n // eslint-disable-line @typescript-eslint/no-unused-vars\n props = __rest$1(_a, [\"hostedFieldType\", \"options\"]);\n var hostedFieldContext = useContext(PayPalHostedFieldsContext);\n useEffect(function () {\n var _a;\n if (!(hostedFieldContext === null || hostedFieldContext === void 0 ? void 0 : hostedFieldContext.registerHostedField)) {\n throw new Error(\"The HostedField cannot be register in the PayPalHostedFieldsProvider parent component\");\n }\n // Register in the parent provider\n hostedFieldContext.registerHostedField((_a = {}, _a[hostedFieldType] = {\n selector: options.selector,\n placeholder: options.placeholder,\n type: options.type,\n formatInput: options.formatInput,\n maskInput: options.maskInput,\n select: options.select,\n maxlength: options.maxlength,\n minlength: options.minlength,\n prefill: options.prefill,\n rejectUnsupportedCards: options.rejectUnsupportedCards\n }, _a));\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n return React.createElement(\"div\", __assign({}, props));\n};\n\n/**\n * Throw an exception if the CardFields is not found in the paypal namespace\n * Probably cause for this problem is not sending the card-fields string\n * as part of the components props in options\n * {@code <PayPalScriptProvider options={{ components: 'card-fields'}}>}\n *\n * @param param0 and object containing the components and namespace defined in options\n * @throws {@code Error}\n *\n */\nvar generateMissingCardFieldsError = function (_a) {\n var _b = _a.components,\n components = _b === void 0 ? \"\" : _b,\n _c = SDK_SETTINGS.DATA_NAMESPACE,\n _d = _a[_c],\n dataNamespace = _d === void 0 ? DEFAULT_PAYPAL_NAMESPACE : _d;\n var expectedComponents = components ? \"\".concat(components, \",card-fields\") : \"card-fields\";\n var errorMessage = \"Unable to render <PayPalCardFieldsProvider /> because window.\".concat(dataNamespace, \".CardFields is undefined.\");\n if (!components.includes(\"card-fields\")) {\n errorMessage += \"\\nTo fix the issue, add 'card-fields' to the list of components passed to the parent PayPalScriptProvider: <PayPalScriptProvider options={{ components: '\".concat(expectedComponents, \"'}}>\");\n }\n return errorMessage;\n};\nfunction ignore() {\n return;\n}\nfunction hasChildren(container) {\n var _a;\n return !!((_a = container.current) === null || _a === void 0 ? void 0 : _a.children.length);\n}\nvar PayPalCardFieldsContext = createContext({\n cardFieldsForm: null,\n fields: {},\n registerField: ignore,\n unregisterField: ignore // implementation is inside hook and passed through the provider\n});\nvar usePayPalCardFields = function () {\n return useContext(PayPalCardFieldsContext);\n};\nvar usePayPalCardFieldsRegistry = function () {\n var _a = useState(null),\n setError = _a[1];\n var registeredFields = useRef({});\n var registerField = function () {\n var props = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n props[_i] = arguments[_i];\n }\n var fieldName = props[0],\n options = props[1],\n cardFields = props[2];\n if (registeredFields.current[fieldName]) {\n setError(function () {\n throw new Error(CARD_FIELDS_DUPLICATE_CHILDREN_ERROR);\n });\n }\n registeredFields.current[fieldName] = cardFields === null || cardFields === void 0 ? void 0 : cardFields[fieldName](options);\n return registeredFields.current[fieldName];\n };\n var unregisterField = function (fieldName) {\n var field = registeredFields.current[fieldName];\n if (field) {\n field.close().catch(ignore);\n delete registeredFields.current[fieldName];\n }\n };\n return {\n fields: registeredFields.current,\n registerField: registerField,\n unregisterField: unregisterField\n };\n};\nvar FullWidthContainer = function (_a) {\n var children = _a.children;\n return React.createElement(\"div\", {\n style: {\n width: \"100%\"\n }\n }, children);\n};\n\n/**\nThe `<PayPalCardFieldsProvider />` is a context provider that is designed to support the rendering and state management of PayPal CardFields in your application.\n\nThe context provider will initialize the `CardFields` instance from the JS SDK and determine eligibility to render the CardField components. Once the `CardFields` are initialized, the context provider will manage the state of the `CardFields` instance as well as the reference to each individual card field.\n\nPassing the `inputEvents` and `style` props to the context provider will apply them to each of the individual field components.\n\nThe state managed by the provider is accessible through our custom hook `usePayPalCardFields`.\n\n*/\nvar PayPalCardFieldsProvider = function (_a) {\n var children = _a.children,\n props = __rest$1(_a, [\"children\"]);\n var _b = usePayPalScriptReducer()[0],\n isResolved = _b.isResolved,\n options = _b.options;\n var _c = usePayPalCardFieldsRegistry(),\n fields = _c.fields,\n registerField = _c.registerField,\n unregisterField = _c.unregisterField;\n var _d = useState(null),\n cardFieldsForm = _d[0],\n setCardFieldsForm = _d[1];\n var cardFieldsInstance = useRef(null);\n var _e = useState(false),\n isEligible = _e[0],\n setIsEligible = _e[1];\n // We set the error inside state so that it can be caught by React's error boundary\n var _f = useState(null),\n setError = _f[1];\n useEffect(function () {\n var _a, _b, _c;\n if (!isResolved) {\n return;\n }\n try {\n cardFieldsInstance.current = (_c = (_b = (_a = getPayPalWindowNamespace$1(options[SDK_SETTINGS.DATA_NAMESPACE])).CardFields) === null || _b === void 0 ? void 0 : _b.call(_a, __assign({}, props))) !== null && _c !== void 0 ? _c : null;\n } catch (error) {\n setError(function () {\n throw new Error(\"Failed to render <PayPalCardFieldsProvider /> component. Failed to initialize: \".concat(error));\n });\n return;\n }\n if (!cardFieldsInstance.current) {\n setError(function () {\n var _a;\n throw new Error(generateMissingCardFieldsError((_a = {\n components: options.components\n }, _a[SDK_SETTINGS.DATA_NAMESPACE] = options[SDK_SETTINGS.DATA_NAMESPACE], _a)));\n });\n return;\n }\n setIsEligible(cardFieldsInstance.current.isEligible());\n setCardFieldsForm(cardFieldsInstance.current);\n return function () {\n setCardFieldsForm(null);\n cardFieldsInstance.current = null;\n };\n }, [isResolved]); // eslint-disable-line react-hooks/exhaustive-deps\n if (!isEligible) {\n // TODO: What should be returned here?\n return React.createElement(\"div\", null);\n }\n return React.createElement(FullWidthContainer, null, React.createElement(PayPalCardFieldsContext.Provider, {\n value: {\n cardFieldsForm: cardFieldsForm,\n fields: fields,\n registerField: registerField,\n unregisterField: unregisterField\n }\n }, children));\n};\nvar PayPalCardField = function (_a) {\n var className = _a.className,\n fieldName = _a.fieldName,\n options = __rest$1(_a, [\"className\", \"fieldName\"]);\n var _b = usePayPalCardFields(),\n cardFieldsForm = _b.cardFieldsForm,\n registerField = _b.registerField,\n unregisterField = _b.unregisterField;\n var containerRef = useRef(null);\n // Set errors is state so that they can be caught by React's error boundary\n var _c = useState(null),\n setError = _c[1];\n function closeComponent() {\n unregisterField(fieldName);\n }\n useEffect(function () {\n if (!cardFieldsForm) {\n setError(function () {\n throw new Error(CARD_FIELDS_CONTEXT_ERROR);\n });\n return closeComponent;\n }\n if (!containerRef.current) {\n return closeComponent;\n }\n var registeredField = registerField(fieldName, options, cardFieldsForm);\n registeredField === null || registeredField === void 0 ? void 0 : registeredField.render(containerRef.current).catch(function (err) {\n if (!hasChildren(containerRef)) {\n // Component no longer in the DOM, we can safely ignore the error\n return;\n }\n // Component is still in the DOM\n setError(function () {\n throw new Error(\"Failed to render <PayPal\".concat(fieldName, \" /> component. \").concat(err));\n });\n });\n return closeComponent;\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n return React.createElement(\"div\", {\n ref: containerRef,\n className: className\n });\n};\nvar PayPalNameField = function (options) {\n return React.createElement(PayPalCardField, __assign({\n fieldName: \"NameField\"\n }, options));\n};\nvar PayPalNumberField = function (options) {\n return React.createElement(PayPalCardField, __assign({\n fieldName: \"NumberField\"\n }, options));\n};\nvar PayPalExpiryField = function (options) {\n return React.createElement(PayPalCardField, __assign({\n fieldName: \"ExpiryField\"\n }, options));\n};\nvar PayPalCVVField = function (options) {\n return React.createElement(PayPalCardField, __assign({\n fieldName: \"CVVField\"\n }, options));\n};\nvar FlexContainer = function (_a) {\n var children = _a.children;\n return React.createElement(\"div\", {\n style: {\n display: \"flex\",\n width: \"100%\"\n }\n }, children);\n};\n\n/**\nThis `<PayPalCardFieldsForm />` component renders the 4 individual fields for [Card Fields](https://developer.paypal.com/docs/business/checkout/advanced-card-payments/integrate#3-add-javascript-sdk-and-card-form) integrations.\nThis setup relies on the `<PayPalCardFieldsProvider />` parent component, which manages the state related to loading the JS SDK script and performs certain validations before rendering the fields.\n\n\n\nNote: If you want to have more granular control over the layout of how the fields are rendered, you can alternatively use our Individual Fields.\n*/\nvar PayPalCardFieldsForm = function (_a) {\n var className = _a.className;\n return React.createElement(\"div\", {\n className: className\n }, React.createElement(PayPalCardField, {\n fieldName: \"NameField\"\n }), React.createElement(PayPalCardField, {\n fieldName: \"NumberField\"\n }), React.createElement(FlexContainer, null, React.createElement(FullWidthContainer, null, React.createElement(PayPalCardField, {\n fieldName: \"ExpiryField\"\n })), React.createElement(FullWidthContainer, null, React.createElement(PayPalCardField, {\n fieldName: \"CVVField\"\n }))));\n};\nvar FUNDING$1 = {\n PAYPAL: \"paypal\",\n VENMO: \"venmo\",\n APPLEPAY: \"applepay\",\n ITAU: \"itau\",\n CREDIT: \"credit\",\n PAYLATER: \"paylater\",\n CARD: \"card\",\n IDEAL: \"ideal\",\n SEPA: \"sepa\",\n BANCONTACT: \"bancontact\",\n GIROPAY: \"giropay\",\n SOFORT: \"sofort\",\n EPS: \"eps\",\n MYBANK: \"mybank\",\n P24: \"p24\",\n PAYU: \"payu\",\n BLIK: \"blik\",\n TRUSTLY: \"trustly\",\n OXXO: \"oxxo\",\n BOLETO: \"boleto\",\n BOLETOBANCARIO: \"boletobancario\",\n WECHATPAY: \"wechatpay\",\n MERCADOPAGO: \"mercadopago\",\n MULTIBANCO: \"multibanco\",\n SATISPAY: \"satispay\",\n PAIDY: \"paidy\",\n ZIMPLER: \"zimpler\",\n MAXIMA: \"maxima\"\n};\n[FUNDING$1.IDEAL, FUNDING$1.BANCONTACT, FUNDING$1.GIROPAY, FUNDING$1.SOFORT, FUNDING$1.EPS, FUNDING$1.MYBANK, FUNDING$1.P24, FUNDING$1.PAYU, FUNDING$1.BLIK, FUNDING$1.TRUSTLY, FUNDING$1.OXXO, FUNDING$1.BOLETO, FUNDING$1.BOLETOBANCARIO, FUNDING$1.WECHATPAY, FUNDING$1.MERCADOPAGO, FUNDING$1.MULTIBANCO, FUNDING$1.SATISPAY, FUNDING$1.PAIDY, FUNDING$1.MAXIMA, FUNDING$1.ZIMPLER];\n\n// We do not re-export `FUNDING` from the `sdk-constants` module\n// directly because it has no type definitions.\n//\n// See https://github.com/paypal/react-paypal-js/issues/125\nvar FUNDING = FUNDING$1;\nexport { BraintreePayPalButtons, DISPATCH_ACTION, FUNDING, PAYPAL_HOSTED_FIELDS_TYPES, PayPalButtons, PayPalCVVField, PayPalCardFieldsContext, PayPalCardFieldsForm, PayPalCardFieldsProvider, PayPalExpiryField, PayPalHostedField, PayPalHostedFieldsProvider, PayPalMarks, PayPalMessages, PayPalNameField, PayPalNumberField, PayPalScriptProvider, SCRIPT_LOADING_STATE, ScriptContext, destroySDKScript, getScriptID, scriptReducer, usePayPalCardFields, usePayPalHostedFields, usePayPalScriptReducer, useScriptProviderContext };\n","import { PayPalScriptProvider, PayPalButtons } from '@paypal/react-paypal-js'\nimport { FC } from 'react'\nimport styles from './paypal.module.css'\nimport { PayPalTransaction } from './paypal.interface'\n\n\ntype Props = {\n transaction: PayPalTransaction\n onCreate: (data: PayPalTransaction) => Promise<string>\n onApprove: (paypalId: string) => void\n}\n\nexport const PayPal: FC<Props> = ({ onCreate, onApprove, transaction }) => {\n return (\n <div className={styles.paypalBtn}>\n <PayPalScriptProvider options={{ clientId: 'test', vault: true }}>\n <PayPalButtons\n style={{ layout: 'vertical', tagline: false, height: 40, borderRadius: 12 }}\n fundingSource='paypal'\n createBillingAgreement={async () => {\n const orderId = await onCreate(transaction)\n return orderId\n }} \n onApprove={async ({ billingToken }) => {\n if (billingToken) onApprove(billingToken)\n }}\n />\n </PayPalScriptProvider>\n </div>\n )\n}\n","import { CardType } from '@/app/shared/utils/card'\nimport { PayPalTransaction, TransactionConfig } from '@/pkg/checkout'\nimport { ApplePayTransaction, GooglePayTransaction } from '@/pkg/evervault'\nimport { ApplePayCardNetwork } from '@evervault/react'\n\nexport const transactionConfigToGooglePay = (transaction?: TransactionConfig | null): GooglePayTransaction | null => {\n if (!transaction || !transaction.amount || !transaction.currency || !transaction.country || !transaction.merchantId) {\n return null\n }\n\n if (transaction.checkoutConfig) {\n const googlePay = transaction.checkoutConfig?.find(({ is_active, type }) => is_active && type === 'google-pay')\n if (!googlePay) return null\n }\n\n return {\n amount: transaction.amount,\n currency: transaction.currency,\n country: transaction.country,\n merchantId: transaction.merchantId,\n lineItems: [],\n }\n}\n\nexport const transactionConfigToApplePay = (transaction?: TransactionConfig | null): ApplePayTransaction | null => {\n if (!transaction || !transaction.amount || !transaction.currency || !transaction.country || !transaction.merchantId) {\n return null\n }\n\n if (transaction.checkoutConfig) {\n const applePay = transaction.checkoutConfig?.find(({ is_active, type }) => is_active && type === 'apple-pay')\n if (!applePay) return null\n }\n\n return {\n amount: transaction.amount,\n currency: transaction.currency,\n country: transaction.country,\n merchantId: transaction.merchantId,\n lineItems: transaction.applePayInfo?.lineItems || [],\n }\n}\n\nexport const transactionConfigToPayPal = (transaction?: TransactionConfig | null): PayPalTransaction | null => {\n if (!transaction || !transaction.amount || !transaction.currency || !transaction.country || !transaction.merchantId) {\n return null\n }\n\n if (transaction.checkoutConfig) {\n const paypal = transaction.checkoutConfig.find(({ is_active, type }) => is_active && type === 'paypal')\n if (!paypal) return null\n }\n\n return {\n intent: 'TOKENIZE',\n purchase_units: [\n {\n amount: {\n currency_code: transaction.currency,\n value: (transaction.amount / 100).toString(),\n },\n reference_id: transaction.merchantId,\n },\n ],\n }\n}\n\nexport const mapCardTypeToAppleCardNetwork = (cardTypes: CardType[] = []): ApplePayCardNetwork[] => {\n return cardTypes.reduce((acc, type) => {\n switch (type) {\n case CardType.Visa:\n acc.push('visa')\n return acc\n case CardType.Mastercard:\n acc.push('masterCard')\n return acc\n case CardType.AmericanExpress:\n acc.push('amex')\n return acc\n case CardType.Discover:\n acc.push('discover')\n return acc\n case CardType.JCB:\n acc.push('jcb')\n return acc\n case CardType.UnionPay:\n acc.push('chinaUnionPay')\n return acc\n default:\n return acc\n }\n }, [] as ApplePayCardNetwork[])\n}\n","import { EncryptedApplePayData, EncryptedGooglePayData, useEvervault } from '@evervault/react'\nimport { useTransaction } from '../../context/transaction'\nimport { useCallback, useEffect, useMemo, useState } from 'react'\nimport { CardInput } from './element/card'\nimport {\n CheckoutDto,\n PaymentType,\n paypalAgreementReq,\n GooglePay as IGooglePay,\n ApplePay as IApplePay,\n} from '@/pkg/checkout'\nimport {\n transactionConfigToApplePay,\n transactionConfigToGooglePay,\n transactionConfigToPayPal,\n} from '../../mappers/checkout.mapper'\n\nexport interface CheckoutServiceProps {\n onSubmit: (checkout: CheckoutDto) => void\n onError: (error: string) => void\n onReset?: () => void\n clientToken: string\n}\n\nexport const useCheckoutService = ({ onError, onSubmit, onReset, clientToken }: CheckoutServiceProps) => {\n const ev = useEvervault()\n const transaction = useTransaction()\n const [isCardOpen, setCardOpen] = useState(false)\n const [isGooglePayReady, setGooglePayReady] = useState(false)\n const [isApplePayReady, setApplePayReady] = useState(false)\n const [isLoaded, setLoaded] = useState(false)\n const { googlePay, applePay, paypal } = useMemo(\n () => ({\n googlePay: transactionConfigToGooglePay(transaction),\n applePay: transactionConfigToApplePay(transaction),\n paypal: transactionConfigToPayPal(transaction),\n }),\n [transaction],\n )\n\n useEffect(() => {\n const timeout = setTimeout(() => {\n setLoaded(true)\n }, 2000)\n return () => clearTimeout(timeout)\n }, [])\n\n const handlePayCard = useCallback(\n async (data: CardInput) => {\n if (!ev) return\n onReset?.()\n const evNumber = await ev?.encrypt(data.number)\n const evCvc = await ev?.encrypt(data.cvc)\n const [expMonth, expYear] = data.expiry.split('/')\n\n onSubmit({\n clientSession: clientToken,\n card: {\n firstSixDigits: data.number.slice(0, 6),\n lastFourDigits: data.number.slice(-4),\n expMonth: Number(expMonth),\n expYear: Number(expYear),\n cardBrand: data.cardBrand || '',\n number: evNumber,\n cvc: evCvc,\n type: PaymentType.Card,\n metadata: {\n name: data.name,\n userAgent: 'navigator' in global ? navigator?.userAgent : '',\n },\n },\n })\n },\n [ev, onSubmit, onReset, clientToken],\n )\n\n const handleGooglePay = useCallback(\n (data: EncryptedGooglePayData) => {\n onSubmit({\n clientSession: clientToken,\n googlePay: data as IGooglePay,\n })\n },\n [onSubmit, clientToken],\n )\n\n const handleGooglePayReady = useCallback(() => {\n setGooglePayReady(true)\n }, [])\n\n const handleGooglePayError = useCallback(\n (error: string) => {\n console.error(error)\n onError(error)\n },\n [onError],\n )\n\n const handleApplePay = useCallback(\n (data: EncryptedApplePayData) => {\n onSubmit({\n clientSession: clientToken,\n applePay: data as IApplePay,\n })\n },\n [onSubmit, clientToken],\n )\n\n const handleApplePayError = useCallback(\n (error: string) => {\n console.error(error)\n onError(error)\n },\n [onError],\n )\n\n const handleApplePayReady = useCallback(() => {\n setApplePayReady(true)\n }, [])\n\n const handlePayPalCreate = useCallback(async () => {\n const res = await paypalAgreementReq(clientToken)\n if (!res.success) {\n const message = res.error || 'Paypal request failed'\n onError(message)\n throw message\n }\n return res.paypalAgreementTokenResponse.token_id || ''\n }, [clientToken, onError])\n\n const handlePayPal = useCallback(\n (agreementToken: string) => {\n onSubmit({\n clientSession: clientToken,\n paypal: {\n billing_agreement_token: agreementToken,\n },\n })\n },\n [onSubmit, clientToken],\n )\n\n const handleCardOpen = useCallback(() => {\n onReset?.()\n setCardOpen(true)\n }, [onReset])\n\n const handleCardClose = useCallback(() => {\n onReset?.()\n setCardOpen(false)\n }, [onReset])\n\n return {\n isCardOpen,\n transaction,\n isReady: (!googlePay || isGooglePayReady) && (!applePay || isApplePayReady) && isLoaded,\n googlePay,\n applePay,\n paypal,\n handleGooglePayReady,\n handleApplePayReady,\n handlePayCard,\n handleGooglePay,\n handleGooglePayError,\n handleApplePay,\n handleApplePayError,\n handleCardOpen,\n handleCardClose,\n handlePayPalCreate,\n handlePayPal,\n }\n}\n","const variants = {\n initial: { y: 100, opacity: 0 },\n animate: { y: 0, opacity: 1, transition: { type: 'spring', stiffness: 80, damping: 20 } },\n exit: { y: 100, opacity: 0, transition: { duration: 0.3 } },\n open: { y: 0, opacity: 1, transition: { type: 'spring', stiffness: 80, damping: 20, delay: 0.3 } },\n close: { y: 100, opacity: 0, display: 'none', transition: { duration: 0.3 } },\n}\n\nconst btnVariants = {\n initial: { y: -100, opacity: 0 },\n animate: { y: 0, opacity: 1, transition: { type: 'spring', stiffness: 80, damping: 20 } },\n exit: { y: -100, opacity: 0, transition: { duration: 0.3 } },\n open: { y: 0, opacity: 1, transition: { type: 'spring', stiffness: 80, damping: 20, delay: 0.3 } },\n close: { y: -100, opacity: 0, display: 'none', transition: { duration: 0.3 } },\n}\n\nconst success = {\n initial: { y: 100, opacity: 0 },\n animate: { y: 0, opacity: 1, transition: { type: 'spring', stiffness: 80, damping: 20 } },\n}\n\nexport const config = {\n variants,\n btnVariants,\n success,\n}\n","import { FC } from 'react'\nimport styles from './success-alert.module.css'\n\ntype Props = {\n title: string\n}\n\nexport const SuccessAlert: FC<Props> = ({ title }) => {\n return (\n <div className={styles.container}>\n <div className={styles.iconContainer}>\n <svg\n fill='none'\n height='24'\n viewBox='0 0 24 24'\n width='24'\n xmlns='http://www.w3.org/2000/svg'\n className={styles.icon}\n >\n <path\n d='\n M12 2C6.49 2 2 6.49 2 12C2 17.51 6.49 22 12 22C17.51 22 22 17.51 22 12C22 6.49 17.51 2 12 2Z\n M16.78 9.7L11.11 15.37C10.97 15.51 10.78 15.59 10.58 15.59C10.38 15.59 10.19 15.51 10.05 15.37L7.22 12.54\n C6.93 12.25 6.93 11.77 7.22 11.48C7.51 11.19 7.99 11.19 8.28 11.48L10.58 13.78L15.72 8.64\n C16.01 8.35 16.49 8.35 16.78 8.64C17.07 8.93 17.07 9.4 16.78 9.7Z\n '\n ></path>\n </svg>\n </div>\n <div className={styles.title}>{title}</div>\n </div>\n )\n}\n","import { ApplePayButtonLocale, GooglePayButtonLocale } from '@evervault/react'\nimport { Locale } from '../context/translate/i18n/i18n'\n\nexport const localeToAppleLocale = (locale: Locale): ApplePayButtonLocale => {\n const locales = {\n ar: 'ar-AB',\n en: 'en-GB',\n cs: 'cs-CZ',\n da: 'da-DK',\n de: 'de-DE',\n el: 'el-GR',\n es: 'es-ES',\n fi: 'fi-FI',\n fr: 'fr-FR',\n hr: 'hr-HR',\n hu: 'hu-HU',\n id: 'id-ID',\n it: 'it-IT',\n ja: 'ja-JP',\n ko: 'ko-KR',\n ms: 'ms-MY',\n ru: 'ru-RU',\n nb: 'nb-NO',\n nl: 'nl-NL',\n pl: 'pl-PL',\n pt: 'pt-PT',\n ro: 'ro-RO',\n sk: 'sk-SK',\n sv: 'sv-SE',\n th: 'th-TH',\n tr: 'tr-TR',\n vi: 'vi-VN',\n zh: 'zh-CN',\n }\n return (locales[locale as keyof typeof locales] as ApplePayButtonLocale) || 'en-US'\n}\n\nexport const localeToGoogleLocale = (locale: Locale): GooglePayButtonLocale => {\n const locales = {\n en: 'en',\n ar: 'ar',\n cs: 'cs',\n da: 'da',\n de: 'de',\n el: 'el',\n es: 'es',\n fi: 'fi',\n fr: 'fr',\n hr: 'hr',\n id: 'id',\n it: 'it',\n ja: 'ja',\n ko: 'ko',\n ms: 'ms',\n ru: 'ru',\n nl: 'nl',\n pl: 'pl',\n pt: 'pt',\n sv: 'sv',\n th: 'th',\n tr: 'tr',\n zh: 'zh',\n }\n return (locales[locale as keyof typeof locales] as GooglePayButtonLocale) || 'en'\n}\n","import { FC } from 'react'\nimport { Card } from './element/card'\nimport { ApplePay, GooglePay } from '@/pkg/evervault'\nimport { motion } from 'framer-motion'\nimport styles from './checkout.module.css'\nimport { Button } from '@/app/shared/ui/button'\nimport { IconBack, IconCard } from '@/app/shared/icon'\nimport { PayPal } from '@/pkg/paypal'\nimport { CheckoutServiceProps, useCheckoutService } from './checkout.service'\nimport { config } from './checkout.constants'\nimport { useCheckoutTranslate } from '../../context/translate'\nimport { CardType } from '@/app/shared/utils/card'\nimport { SuccessAlert } from '@/app/shared/ui/success-alert'\nimport { mapCardTypeToAppleCardNetwork } from '../../mappers/checkout.mapper'\nimport { useDir, useLocale } from '../../context/translate/translate.context'\nimport { localeToAppleLocale, localeToGoogleLocale } from '../../mappers/locale.mapper'\nimport { Spinner } from '@/app/shared/ui/spinner'\n\ntype Props = CheckoutServiceProps & {\n variant?: 'default' | 'compact'\n supportedCardTypes?: CardType[]\n isFetching: boolean\n isSuccess?: boolean\n isFail?: boolean\n}\n\nexport const Checkout: FC<Props> = ({\n onSubmit,\n onError,\n onReset,\n isSuccess,\n isFail,\n variant,\n isFetching,\n clientToken,\n supportedCardTypes,\n}) => {\n const m = useCheckoutTranslate()\n const locale = useLocale()\n const dir = useDir()\n const {\n handleApplePay,\n handleCardClose,\n handleCardOpen,\n handleGooglePay,\n handlePayPalCreate,\n handlePayPal,\n handlePayCard,\n handleApplePayReady,\n handleGooglePayReady,\n handleApplePayError,\n handleGooglePayError,\n isReady,\n isCardOpen,\n transaction,\n googlePay,\n applePay,\n paypal,\n } = useCheckoutService({ onSubmit, onError, onReset, clientToken })\n\n const card = (\n <Card\n key='card'\n isFetching={isFetching}\n isFail={!!isFail}\n onSubmit={handlePayCard}\n supportedCardTypes={supportedCardTypes}\n />\n )\n\n const methods = {\n 'apple-pay': applePay ? (\n <ApplePay\n key={'apple-pay'}\n onError={handleApplePayError}\n onSubmit={handleApplePay}\n onReady={handleApplePayReady}\n transaction={applePay}\n locale={localeToAppleLocale(locale)}\n supportedCardTypes={supportedCardTypes && mapCardTypeToAppleCardNetwork(supportedCardTypes)}\n />\n ) : null,\n 'google-pay': googlePay ? (\n <GooglePay\n key={'google-pay'}\n onError={handleGooglePayError}\n onSubmit={handleGooglePay}\n onReady={handleGooglePayReady}\n locale={localeToGoogleLocale(locale)}\n transaction={googlePay}\n />\n ) : null,\n paypal: paypal ? (\n <PayPal key={'paypal'} transaction={paypal} onCreate={handlePayPalCreate} onApprove={handlePayPal} />\n ) : null,\n card:\n variant === 'compact' ? (\n <Button key={'card'} color='success' onClick={handleCardOpen} className={styles.cardBtn}>\n <IconCard />\n {m.card.compact.button}\n </Button>\n ) : null,\n }\n\n if (isSuccess) {\n return (\n <motion.div variants={config.success} animate={'animate'} initial={config.success.initial}>\n <SuccessAlert title={m.status.success} />\n </motion.div>\n )\n }\n\n if (variant === 'compact') {\n return (\n <div className={styles.container} dir={dir}>\n {!isReady ? (\n <div className={styles.spinnerContainer}>\n <Spinner className={styles.spinner} />\n </div>\n ) : null}\n <div\n style={{\n display: isReady ? 'block' : 'none',\n position: 'relative',\n width: '100%',\n maxWidth: '640px',\n overflow: 'hidden',\n }}\n >\n <motion.div\n key={'btnVariants'}\n variants={config.btnVariants}\n animate={isCardOpen ? 'close' : 'open'}\n style={{\n position: 'relative',\n width: '100%',\n height: 'auto',\n }}\n className={styles.btnContainer}\n >\n {transaction?.checkoutConfig.map(({ type, is_active }) => {\n if (!is_active) return null\n return methods[type] || null\n })}\n </motion.div>\n <motion.div\n key={'cardVariants'}\n variants={config.variants}\n animate={isCardOpen ? 'open' : 'close'}\n style={{\n position: 'relative',\n width: '100%',\n height: 'auto',\n }}\n >\n <div onClick={handleCardClose} className={styles.backBtn}>\n <IconBack />\n </div>\n {card}\n </motion.div>\n </div>\n </div>\n )\n }\n\n return (\n <div className={styles.container} dir={dir}>\n {!isReady ? (\n <div className={styles.spinnerContainer}>\n <Spinner className={styles.spinner} />\n </div>\n ) : null}\n <div style={{ display: isReady ? 'block' : 'none' }}>\n {transaction?.checkoutConfig.map(({ type, is_active }) => {\n if (!is_active) return null\n return methods[type] || null\n })}\n {card}\n </div>\n </div>\n )\n}\n","import { FC, StrictMode } from 'react'\nimport { useAblePayService } from './able-pay.service'\nimport { AblePayConfig } from './interface'\nimport { EvervaultProviderProps } from '@evervault/react'\nimport { CheckoutTranslate, CheckoutTranslateProvider } from './context/translate'\nimport { DeepPartial } from '@/app/shared/types'\nimport { TransactionProvider } from './context/transaction'\nimport { Checkout } from './element/checkout'\nimport { EvProvider } from '@/pkg/evervault'\nimport { Locale } from './context/translate/i18n/i18n'\nimport { StylesProvider } from './context/styles'\n\nexport type CehckoutFormProps = AblePayConfig & {\n evConfig: Pick<EvervaultProviderProps, 'appId' | 'teamId'>\n translate?: DeepPartial<CheckoutTranslate>\n locale?: Locale\n}\n\nexport const AblePayModule: FC<CehckoutFormProps> = ({\n clientToken,\n evConfig,\n translate,\n variant,\n locale,\n supportedCardTypes,\n styles,\n onCheckoutComplete,\n onCheckoutFail,\n}) => {\n const thisService = useAblePayService({\n clientToken,\n variant,\n supportedCardTypes,\n onCheckoutComplete,\n onCheckoutFail,\n })\n\n return (\n <StrictMode>\n <EvProvider evConfig={evConfig}>\n <CheckoutTranslateProvider translate={translate} locale={locale}>\n <TransactionProvider clientToken={clientToken}>\n <StylesProvider styles={styles}>\n <Checkout\n clientToken={clientToken}\n variant={variant}\n supportedCardTypes={supportedCardTypes}\n isSuccess={thisService.isCheckoutSuccess}\n isFail={thisService.isCheckoutFail}\n onError={thisService.handleCheckoutFail}\n onSubmit={thisService.handleCheckout}\n onReset={thisService.handleCheckoutReset}\n isFetching={thisService.isCheckoutFetching}\n />\n </StylesProvider>\n </TransactionProvider>\n </CheckoutTranslateProvider>\n </EvProvider>\n </StrictMode>\n )\n}\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","self","source","owner","debugStack","debugTask","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","initialCheckoutConfig","PaymentType","checkoutReq","data","url","headers","paypalAgreementReq","clientToken","configReq","transaction","useAblePayService","onCheckoutComplete","onCheckoutFail","isCheckoutFetching","setCheckoutFetching","useState","isCheckoutSuccess","setCheckoutSuccess","isCheckoutFail","setCheckoutFail","handleCheckout","useCallback","checkout","success","error","err","e","handleCheckoutFail","handleCheckoutReset","i18n","getDefaultTranslates","lang","getTranslates","locale","initialState","CheckoutTranslateContext","createContext","useCheckoutTranslate","messages","useContext","useLocale","useDir","CheckoutTranslateProvider","translate","translates","jsx","TransactionContext","useTransaction","TransactionProvider","setTransaction","useEffect","r","f","n","o","clsx","Button","color","isLoading","onClick","onMouseUp","onMouseOut","onMouseDown","press","setPress","handleClick","handleMouseDown","handleMouseUp","handleMouseOut","styles","cardTypes","cardTypes_1","clone_1","clone","originalObject","matches_1","matchesRange","cardNumber","min","max","maxLengthToCheck","substr","integerRepresentationOfCardNumber","matchesPattern","pattern","matches","addMatchingCardsToResults_1","addMatchingCardsToResults","cardConfiguration","results","i","patternLength","clonedCardConfiguration","isValidInputType_1","isValidInputType","findBestMatch_1","hasEnoughResultsToDetermineBestMatch","numberOfResultsWithMaxStrengthProperty","result","findBestMatch","bestMatch","__assign","this","t","s","p","add_matching_cards_to_results_1","is_valid_input_type_1","require$$2","find_best_match_1","require$$3","require$$4","customCards","cardNames","ORIGINAL_TEST_ORDER","testOrder","findType","cardType","getAllCardTypes","getCardPosition","ignoreErrorForNotExisting","position","creditCardType","existingCardPosition","updates","clonedCard","currentPosition","dist","distExports","prettyCardNumber","card","getTypeInfo","numbers","gaps","size","offsets","components","start","end","prettyCVC","cvc","prettyCardExpiry","expiry","prev","month","monthNumber","lastSymbol","year","LayoutGroupContext","useConstant","init","ref","useRef","isBrowser","useIsomorphicLayoutEffect","useLayoutEffect","PresenceContext","addUniqueItem","arr","item","removeItem","index","clamp","v","warning","invariant","check","message","MotionGlobalConfig","isNumericalString","isObject","isZeroValueString","memo","callback","noop","any","combineFunctions","a","b","pipe","transformers","progress","from","to","toFromDifference","SubscriptionManager","handler","c","numSubscriptions","secondsToMilliseconds","seconds","millisecondsToSeconds","milliseconds","velocityPerSecond","velocity","frameDuration","warned","warnOnce","condition","element","calcBezier","a1","a2","subdivisionPrecision","subdivisionMaxIterations","binarySubdivide","x","lowerBound","upperBound","mX1","mX2","currentX","currentT","cubicBezier","mY1","mY2","getTForX","aX","mirrorEasing","easing","reverseEasing","backOut","backIn","backInOut","anticipate","circIn","circOut","circInOut","easeIn","easeOut","easeInOut","isEasingArray","ease","isBezierDefinition","easingLookup","isValidEasing","easingDefinitionToFunction","definition","x1","y1","x2","y2","stepsOrder","statsBuffer","createRenderStep","runNextFrame","stepName","thisFrame","nextFrame","isProcessing","flushNextFrame","toKeepAlive","latestFrameData","numCalls","triggerCallback","step","keepAlive","immediate","queue","frameData","maxElapsed","createRenderBatcher","scheduleNextBatch","allowKeepAlive","useDefaultElapsed","state","flagRunNextFrame","steps","acc","setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender","processBatch","timestamp","wake","process","frame","cancelFrame","frameSteps","now","clearTime","time","newTime","checkStringStartsWith","token","isCSSVariableName","startsAsVariableToken","isCSSVariableToken","singleCssVariableRegex","number","alpha","scale","sanitize","floatRegex","isNullish","singleColorRegex","isColorString","testProp","splitColor","aName","bName","cName","clampRgbUnit","rgbUnit","rgba","red","green","blue","alpha$1","parseHex","g","hex","createUnitType","unit","degrees","percent","px","vh","vw","progressPercentage","hsla","hue","saturation","lightness","colorRegex","test","NUMBER_TOKEN","COLOR_TOKEN","VAR_TOKEN","VAR_FUNCTION_TOKEN","SPLIT_TOKEN","complexRegex","analyseComplexValue","originalValue","values","indexes","types","split","parsedValue","parseComplexValue","createTransformer","numSections","output","convertNumbersToZero","getAnimatableNone","parsed","complex","hueToRgb","q","hslaToRgba","mixImmediate","mixNumber","mixLinearColor","fromExpo","expo","colorTypes","getColorType","asRGBA","model","mixColor","fromRGBA","toRGBA","blended","invisibleValues","mixVisibility","origin","target","mixNumber$1","getMixer","mixComplex","mixArray","mixObject","numValues","blendValue","matchOrder","orderedOrigin","pointers","originIndex","originValue","template","originStats","targetStats","mix","frameloopDriver","passTimestamp","generateLinearEasing","duration","resolution","points","numPoints","maxGeneratorDuration","calcGeneratorDuration","generator","timeStep","createGeneratorEasing","options","createGenerator","velocitySampleDuration","calcGeneratorVelocity","resolveValue","current","prevT","springDefaults","safeMin","findSpring","bounce","mass","envelope","derivative","dampingRatio","undampedFreq","exponentialDecay","delta","calcAngularFreq","d","initialGuess","approximateRoot","stiffness","rootIterations","durationKeys","physicsKeys","isSpringType","getSpringOptions","springOptions","visualDuration","root","damping","derived","spring","optionsOrVisualDuration","restSpeed","restDelta","isResolvedFromDuration","initialVelocity","initialDelta","undampedAngularFreq","isGranularScale","resolveSpring","angularFreq","dampedAngularFreq","freqForT","currentVelocity","isBelowVelocityThreshold","isBelowDisplacementThreshold","calculatedDuration","generatorOptions","inertia","keyframes","power","timeConstant","bounceDamping","bounceStiffness","modifyTarget","isOutOfBounds","nearestBoundary","amplitude","ideal","calcDelta","calcLatest","applyFriction","latest","timeReachedBoundary","spring$1","checkCatchBoundary","hasUpdatedFrame","createMixers","customMixer","mixers","mixerFactory","numMixers","mixer","easingFunction","interpolate","input","isClamp","inputLength","isZeroDeltaRange","interpolator","progressInRange","fillOffset","offset","remaining","offsetProgress","defaultOffset","convertOffsetToTimes","defaultEasing","keyframeValues","times","easingFunctions","absoluteTimes","mapTimeToKeyframe","isNotNull","getFinalKeyframe","repeat","repeatType","finalKeyframe","speed","resolvedKeyframes","transitionTypeMap","replaceTransitionType","transition","WithPromise","resolve","onResolve","onReject","percentToProgress","JSAnimation","sync","motionValue","repeatDelay","keyframes$1","generatorFactory","animationTime","sample","totalDuration","mixKeyframes","mirroredGenerator","resolvedDuration","delay","onUpdate","timeWithoutDelay","isInDelayPhase","elapsed","frameGenerator","currentIteration","iterationProgress","done","isAnimationFinished","reject","newSpeed","hasChanged","driver","startTime","sampleTime","timeline","fillWildcards","radToDeg","rad","rotate","angle","rebaseAngle","matrix2dParsers","rotateZ","scaleX","scaleY","matrix3dParsers","defaultTransformValue","parseValueFromTransform","transform","matrix3dMatch","parsers","match","matrix2dMatch","valueParser","convertTransformToNumber","readTransformValue","instance","transformPropOrder","transformProps","isNumOrPxType","transformKeys","nonTranslationalTransformKeys","removeNonTranslationalTransform","visualElement","removedTransforms","positionalValues","paddingLeft","paddingRight","y","paddingTop","paddingBottom","_bbox","top","left","toResolve","isScheduled","anyNeedsMeasurement","isForced","measureAllKeyframes","resolversToMeasure","resolver","elementsToMeasure","transformsToRestore","restore","readAllKeyframes","flushKeyframeResolvers","KeyframeResolver","unresolvedKeyframes","onComplete","isAsync","currentValue","valueAsRead","isForcedComplete","isCSSVar","setStyle","supportsScrollTimeline","supportsFlags","memoSupports","supportsFlag","memoized","supportsLinearEasing","cubicBezierAsString","supportedWaapiEasing","mapEasingToNativeEasing","segmentEasing","startWaapiAnimation","valueName","pseudoElement","keyframeOptions","isGenerator","applyGeneratorOptions","NativeAnimation","allowFlatten","keyframe","newStartTime","observe","unsupportedEasingFunctions","isUnsupportedEase","replaceStringEasing","sampleDelta","NativeAnimationExtended","sampleAnimation","isAnimatable","hasKeyframesChanged","canAnimate","originKeyframe","targetKeyframe","isOriginAnimatable","isTargetAnimatable","isHTMLElement","acceleratedValues","supportsWaapi","supportsBrowserAnimation","transformTemplate","MAX_RESOLVE_DELAY","AsyncMotionValueAnimation","autoplay","optionsWithDefaults","KeyframeResolver$1","forced","isHandoff","resolvedOptions","animation","_onReject","splitCSSVariableRegex","parseCSSVariable","token1","token2","fallback","maxDepth","getVariableValue","depth","resolved","trimmed","getValueTransition","positionalKeys","auto","testValueType","dimensionValueTypes","findDimensionValueType","isNone","maxDefaults","applyDefaultFilter","defaultValue","functionRegex","filter","functions","int","numberValueTypes","defaultValueTypes","getDefaultValueType","defaultValueType","invalidTemplates","makeNoneKeyframesAnimatable","noneKeyframeIndexes","animatableTemplate","noneIndex","DOMKeyframesResolver","originType","targetType","measureKeyframe","finalKeyframeIndex","unsetTransformName","unsetTransformValue","resolveElements","elementOrSelector","scope","selectorCache","elements","MAX_VELOCITY_DELTA","isFloat","MotionValue","currentTime","dependent","prevFrameValue","subscription","eventName","unsubscribe","eventManagers","passiveEffect","stopPassiveEffect","endAnimation","startAnimation","getValueAsType","microtask","isDragging","isDragActive","setDragLock","axis","setupGesture","gestureAbortController","eventOptions","isValidHover","event","hover","onHoverStart","cancel","onPointerEnter","enterEvent","onHoverEnd","onPointerLeave","leaveEvent","isNodeOrChild","parent","child","isPrimaryPointer","focusableElements","isElementKeyboardAccessible","isPressing","filterEvents","firePointerEvent","enableKeyboardPress","focusEvent","handleKeydown","handleKeyup","handleBlur","isValidPressEvent","targetOrSelector","onPressStart","targets","cancelEvents","startPress","startEvent","onPressEnd","onPointerEnd","endEvent","onPointerUp","onPointerCancel","upEvent","cancelEvent","isSVGElement","isSVGSVGElement","isMotionValue","valueTypes","findValueType","MotionConfigContext","PopChildMeasure","prevProps","parentWidth","PopChild","isPresent","anchorX","id","useId","nonce","useInsertionEffect","width","height","right","style","PresenceChild","initial","onExitComplete","custom","presenceAffectsLayout","mode","presenceChildren","newChildrenMap","isReusedContext","context","useMemo","childId","isComplete","_","usePresence","subscribe","register","safeToRemove","getChildKey","onlyElements","filtered","Children","isValidElement","AnimatePresence","propagate","isParentPresent","presentChildren","presentKeys","isInitialRender","pendingPresentChildren","exitComplete","diffedChildren","setDiffedChildren","renderedChildren","setRenderedChildren","exitingChildren","nextChildren","forceRender","Fragment","onExit","isEveryExitComplete","isExitComplete","LazyContext","featureProps","featureDefinitions","loadFeatures","features","validMotionProps","isValidMotionProp","shouldForward","loadExternalIsValidProp","isValidProp","filterProps","isDom","forwardMotionProps","filteredProps","createDOMMotionComponentProxy","componentFactory","componentCache","deprecatedFactoryFunction","args","_target","MotionContext","isAnimationControls","isVariantLabel","variantPriorityOrder","variantProps","isControllingVariants","isVariantNode","getCurrentTreeVariants","animate","useCreateMotionContext","variantLabelsAsDependency","prop","motionComponentSymbol","isRefObject","useMotionRef","visualState","externalRef","camelToDash","str","optimizedAppearDataAttribute","SwitchLayoutGroupContext","useVisualElement","Component","createVisualElement","ProjectionNodeConstructor","lazyContext","presenceContext","reducedMotionConfig","visualElementRef","initialLayoutGroupConfig","createProjectionNode","isMounted","optimisedAppearId","wantsHandoff","initialPromotionConfig","layoutId","layout","drag","dragConstraints","layoutScroll","layoutRoot","layoutCrossfade","getClosestProjectingNode","createRendererMotionComponent","preloadedFeatures","useRender","useVisualState","MotionComponent","MeasureLayout","configAndProps","useLayoutId","isStatic","useStrictMode","layoutProjection","getProjectionFunctionality","jsxs","ForwardRefMotionComponent","forwardRef","layoutGroupId","isStrict","strictMessage","combined","scaleCorrectors","addScaleCorrector","correctors","isForcedMotionValue","translateAlias","numTransforms","buildTransform","latestValues","transformString","transformIsDefault","valueIsDefault","valueAsType","transformName","buildHTMLStyles","vars","transformOrigin","hasTransform","hasTransformOrigin","originX","originY","originZ","createHtmlRenderState","copyRawValuesOnly","useInitialMotionValues","useStyle","styleProp","useHTMLProps","htmlProps","dashKeys","camelKeys","buildSVGPath","attrs","length","spacing","useDashCase","pathLength","pathSpacing","buildSVGAttrs","attrX","attrY","attrScale","pathOffset","isSVGTag","createSvgRenderState","tag","useSVGProps","_isStatic","visualProps","rawStyles","lowercaseSVGElements","isSVGComponent","createUseRender","elementProps","createElement","getValueState","resolveVariantFromProps","resolveMotionValue","makeState","scrapeMotionValuesFromProps","createRenderState","makeLatestValues","makeUseVisualState","make","scrapeMotionValues","motionValues","isControllingVariants$1","isVariantNode$1","isInitialAnimationBlocked","variantToSet","list","transitionEnd","valueTarget","newValues","htmlMotionConfig","scrapeMotionValuesFromProps$1","targetKey","svgMotionConfig","createMotionComponentFactory","resolveVariant","isKeyframesTarget","setMotionValue","resolveFinalValueInKeyframes","setTarget","isWillChangeMotionValue","addValueToWillChange","willChange","newWillChange","getOptimisedAppearId","underDampedSpring","criticallyDampedSpring","keyframesTransition","getDefaultTransition","valueKey","isTransitionDefined","when","_delay","delayChildren","staggerChildren","staggerDirection","animateMotionValue","valueTransition","shouldSkip","shouldBlockAnimation","protectedKeys","needsAnimating","shouldBlock","animateTarget","targetAndTransition","transitionOverride","animations","animationTypeState","appearId","animateVariant","variant","getAnimation","getChildAnimations","forwardDelay","animateChildren","first","last","maxStaggerDuration","generateStaggerDuration","sortByTreeOrder","animateVisualElement","resolvedDefinition","shallowCompare","next","prevLength","numVariantProps","getVariantContext","reversePriorityOrder","numAnimationTypes","animateList","createAnimationState","createState","buildResolvedTypeValues","setAnimateFunction","makeAnimator","animateChanges","changedActiveType","removedKeys","encounteredKeys","removedVariantIndex","typeState","propIsVariant","activeDelta","isInherited","variantDidChange","checkVariantsDidChange","shouldAnimateType","handledRemovedValues","definitionList","resolvedValues","prevResolvedValues","allKeys","markToAnimate","valueHasChanged","fallbackAnimation","initialTransition","fallbackTarget","shouldAnimate","setActive","isActive","createTypeState","Feature","AnimationFeature","prevAnimate","ExitAnimationFeature","prevIsPresent","exitAnimation","addDomEvent","extractEventInfo","addPointerInfo","addPointerEvent","convertBoundingBoxToBox","bottom","convertBoxToBoundingBox","transformBoxPoints","point","transformPoint","topLeft","bottomRight","SCALE_PRECISION","SCALE_MIN","SCALE_MAX","TRANSLATE_PRECISION","TRANSLATE_MIN","TRANSLATE_MAX","calcLength","isNear","maxDistance","calcAxisDelta","calcBoxDelta","calcRelativeAxis","relative","calcRelativeBox","calcRelativeAxisPosition","calcRelativePosition","createAxisDelta","createDelta","createAxis","createBox","eachAxis","isIdentityScale","hasScale","has2DTranslate","is2DTranslate","scalePoint","originPoint","distanceFromOrigin","scaled","applyPointDelta","boxScale","applyAxisDelta","applyBoxDelta","box","TREE_SCALE_SNAP_MIN","TREE_SCALE_SNAP_MAX","applyTreeDeltas","treeScale","treePath","isSharedTransition","treeLength","transformBox","translateAxis","distance","transformAxis","axisTranslate","axisScale","axisOrigin","measureViewportBox","measurePageBox","rootProjectionNode","transformPagePoint","viewportBox","scroll","getContextWindow","distance2D","xDelta","yDelta","PanSession","handlers","contextWindow","dragSnapToOrigin","info","getPanInfo","isPanStarted","isDistancePastThreshold","onStart","onMove","onEnd","onSessionEnd","resumeAnimation","panInfo","initialInfo","onSessionStart","subtractPoint","history","lastDevicePoint","startDevicePoint","getVelocity","timeDelta","timestampedPoint","lastPoint","applyConstraints","elastic","calcRelativeAxisConstraints","calcRelativeConstraints","layoutBox","calcViewportAxisConstraints","layoutAxis","constraintsAxis","calcViewportConstraints","constraintsBox","calcOrigin","sourceLength","targetLength","rebaseAxisConstraints","constraints","relativeConstraints","defaultElastic","resolveDragElastic","dragElastic","resolveAxisElastic","minLabel","maxLabel","resolvePointElastic","label","elementDragControls","VisualElementDragControls","originEvent","snapToCursor","dragPropagation","onDragStart","projection","measuredAxis","animationState","dragDirectionLock","onDirectionLock","onDrag","getCurrentDirection","onDragEnd","_point","shouldDrag","axisValue","prevConstraints","onMeasureDragConstraints","constraintsElement","measuredConstraints","userConstraints","dragMomentum","dragTransition","onDragTransitionEnd","momentumAnimations","dragKey","externalMotionValue","boxProgress","stopPointerListener","dragListener","measureDragConstraints","stopMeasureLayoutListener","stopResizeListener","stopLayoutUpdateListener","hasLayoutChanged","direction","currentDirection","lockThreshold","DragGesture","dragControls","asyncHandler","PanGesture","pointerDownEvent","onPanSessionStart","onPanStart","onPan","onPanEnd","globalProjectionState","pixelsToPercent","pixels","correctBorderRadius","correctBoxShadow","projectionDelta","original","shadow","xScale","yScale","averageScale","MeasureLayoutWithContext","layoutGroup","switchLayoutGroup","defaultScaleCorrectors","layoutDependency","stack","promoteContext","animateSingleValue","motionValue$1","compareByDepth","FlatTree","timeout","checkElapsed","borders","numBorders","asNumber","isPx","mixValues","follow","lead","shouldCrossfadeOpacity","isOnlyMember","easeCrossfadeIn","easeCrossfadeOut","borderLabel","followRadius","getRadius","leadRadius","radiusName","compress","copyAxisInto","originAxis","copyBoxInto","originBox","copyAxisDeltaInto","originDelta","removePointDelta","removeAxisDelta","sourceAxis","removeAxisTransforms","transforms","scaleKey","originKey","xKeys","yKeys","removeBoxTransforms","sourceBox","isAxisDeltaZero","isDeltaZero","axisEquals","boxEquals","axisEqualsRounded","boxEqualsRounded","aspectRatio","axisDeltaEquals","NodeStack","prevLead","indexOfNode","member","preserveFollowOpacity","crossfade","resumingFrom","buildProjectionTransform","latestTransform","xTranslate","yTranslate","zTranslate","transformPerspective","rotateX","rotateY","skewX","skewY","elementScaleX","elementScaleY","transformAxes","hiddenVisibility","animationTarget","resetDistortingTransform","sharedAnimationValues","cancelTreeOptimisedTransformAnimations","projectionNode","attachResizeListener","defaultParent","measureScroll","checkIsScrollRoot","resetTransform","propagateDirtyNodes","resolveTargetDelta","calcProjection","cleanDirtyNodes","subscriptionManager","cancelDelay","resizeUnblockUpdate","finishAnimation","hasRelativeLayoutChanged","newLayout","layoutTransition","defaultLayoutTransition","onLayoutAnimationStart","onLayoutAnimationComplete","hasTargetChanged","hasOnlyRelativeTargetChanged","animationOptions","resetSkewAndRotation","shouldNotifyListeners","clearMeasurements","clearIsLayoutDirty","resetTransformStyle","updateLayout","notifyLayoutUpdate","clearSnapshot","removeLeadSnapshots","prevLayout","phase","needsMeasurement","isRoot","isResetRequested","hasProjection","transformTemplateValue","transformTemplateHasChanged","removeTransform","pageBox","roundBox","checkNodeWasScrollRoot","boxWithoutScroll","transformOnly","withTransforms","boxWithoutTransform","nodeBox","forceRecalculation","isShared","relativeParent","canSkip","prevTreeScaleX","prevTreeScaleY","notifyAll","snapshot","snapshotLatestValues","mixedValues","targetDelta","relativeLayout","snapshotSource","layoutSource","isSharedLayoutAnimation","hasOpacityCrossfade","prevRelativeTarget","mixAxisDelta","mixBox","targetWithTransforms","shouldAnimatePositionOnly","xLength","yLength","needsReset","hasDistortingTransform","resetValues","emptyStyles","valuesToRender","correct","applyTo","isCSSVariable","corrected","num","measuredLayout","animationType","axisSnapshot","layoutDelta","visualDelta","parentSnapshot","parentLayout","relativeSnapshot","mixAxis","userAgentContains","string","roundPoint","roundAxis","DocumentProjectionNode","notify","HTMLProjectionNode","documentNode","handleHoverEvent","lifecycle","HoverGesture","_element","FocusGesture","isFocusVisible","handlePressEvent","PressGesture","observerCallbacks","observers","fireObserverCallback","entry","fireAllObserverCallbacks","entries","initIntersectionObserver","lookupRoot","rootObservers","observeIntersection","rootInteresectionObserver","thresholdNames","InViewFeature","viewport","rootMargin","amount","once","onIntersectionUpdate","isIntersecting","onViewportEnter","onViewportLeave","hasViewportOptionChanged","prevViewport","gestureAnimations","prefersReducedMotion","hasReducedMotionListener","initPrefersReducedMotion","motionMediaQuery","setReducedMotionPreferences","visualElementStore","updateMotionValuesFromProps","nextValue","prevValue","existingValue","latestValue","propEventHandlers","VisualElement","_props","_prevProps","_visualElement","blockInitialAnimation","renderState","initialMotionValues","remove","feature","valueIsTransform","removeOnChange","removeOnRenderRequest","removeSyncCheck","other","featureDefinition","isEnabled","FeatureConstructor","listenerName","listener","closestVariantNode","valueFromInitial","DOMVisualElement","renderHTML","getComputedStyle","HTMLVisualElement","computedStyle","camelCaseAttributes","renderSVG","_styleProp","SVGVisualElement","defaultType","createDomVisualElement","createMotionComponent","motion","errorVariants","lableVariants","Input","labelError","endContent","customStyles","onFocus","onBlur","focus","setFocus","isError","handleFocus","handleInputFocus","handleInputBlur","focusClass","IconWarning","className","svgStyles","IconCardCVC","IconBack","IconCard","IconVisa","IconMastercard","IconDinersClub","IconJcb","IconDiscover","IconAmex","IconUnionPay","IconUnknownCard","IconMaestro","StylesContext","useCheckoutStyles","StylesProvider","InputError","CardType","detectCardType","getCardTypes","isValidLuhn","sum","isEven","digit","validateCardNumber","supportedCardTypes","cleanNumber","validator","isEmpty","isIncomplete","CvcInput","onChange","isTouchSubmit","disabled","m","setError","isRequired","setRequired","isChanged","setChanged","isTouched","validate","handleCVC","cvcValue","date","isExpired","ExpiryInput","handleExpiry","expiryValue","NameInput","handleName","initialCardTypes","CardIcons","NumberInput","setCardTypes","isValid","handleChange","ErrorAlert","title","Spinner","Card","isFetching","isFail","onSubmit","setCVC","setExpiry","setCardNumber","setCardType","setName","setTouchSubmit","handleCardNumber","handleCvc","handlePay","spacePattern","EvContext","useEv","L","H","w","u","F","K","z","ee","te","fe","l","EvProvider","evConfig","ev","setEv","loadEvervault","EvervaultProvider","containerId","GooglePay","onCancel","onError","onSuccess","onReady","isReady","setReady","google","setGoogle","evTransaction","paymentData","fail","ApplePay","apple","container","SCRIPT_LOADING_STATE","DISPATCH_ACTION","PAYPAL_HOSTED_FIELDS_TYPES","__rest$1","__spreadArray","pack","ar","SCRIPT_ID","SDK_SETTINGS","LOAD_SCRIPT_ERROR","DEFAULT_PAYPAL_NAMESPACE","SCRIPT_PROVIDER_REDUCER_ERROR","getPayPalWindowNamespace$1","namespace","hashStr","hash","total","generateErrorMessage","_a","reactComponentName","sdkComponentKey","_b","sdkRequestedComponents","_c","sdkDataNamespace","requiredOptionCapitalized","errorMessage","requestedComponents","expectedComponents","getScriptID","paypalScriptOptions","destroySDKScript","reactPayPalScriptID","scriptNode","scriptReducer","action","ScriptContext","validateReducer","scriptContext","usePayPalScriptReducer","derivedStatusContext","useProxyProps","proxyRef","receiver","_i","PayPalButtons","_d","_e","forceReRender","buttonProps","isDisabledStyle","classNames","buttonsContainerRef","buttons","proxyProps","_f","isResolved","_g","initActions","setInitActions","_h","isEligible","setIsEligible","_j","setErrorState","closeButtonsComponent","paypalWindowNamespace","decoratedOnInit","actions","__rest","findScript","attributes","currentScript","nextScript","createScriptElement","currentScriptClone","isExactMatch","insertScriptElement","newScript","processOptions","customSdkBaseUrl","environment","sdkBaseUrl","processSdkBaseUrl","optionsWithStringIndex","accumulator","camelCaseToKebabCase","queryParams","objectToQueryString","replacer","indexOfMatch","params","queryString","loadScript","PromisePonyfill","validateArguments","existingWindowNamespace","getPayPalWindowNamespace","loadCustomScript","newWindowNamespace","defaultError","PayPalScriptProvider","deferLoading","useReducer","dispatch","isSubscribed","ignore","PayPal","onCreate","onApprove","billingToken","transactionConfigToGooglePay","is_active","transactionConfigToApplePay","transactionConfigToPayPal","mapCardTypeToAppleCardNetwork","useCheckoutService","onReset","useEvervault","isCardOpen","setCardOpen","isGooglePayReady","setGooglePayReady","isApplePayReady","setApplePayReady","isLoaded","setLoaded","googlePay","applePay","paypal","handlePayCard","evNumber","evCvc","expMonth","expYear","handleGooglePay","handleGooglePayReady","handleGooglePayError","handleApplePay","handleApplePayError","handleApplePayReady","handlePayPalCreate","res","handlePayPal","agreementToken","handleCardOpen","handleCardClose","SuccessAlert","localeToAppleLocale","localeToGoogleLocale","Checkout","isSuccess","dir","methods","AblePayModule","thisService","StrictMode"],"mappings":";;;;;;;;;6CAWA,IAAIA,EAAqB,OAAO,IAAI,4BAA4B,EAC9DC,EAAsB,OAAO,IAAI,gBAA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,47,49,50,51,52,53,54,55,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,344,345,349]}
|