@paynext/sdk 0.0.39 → 0.0.40

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../node_modules/@evervault/js/dist/evervault-js.js","../ts-src/pkg/evervault/element/apple-pay.ts","../ts-src/pkg/evervault/element/google-pay.ts","../ts-src/core/shared/state/observer.ts","../ts-src/pkg/evervault/element/three-ds.ts","../ts-src/pkg/evervault/ev.service.ts","../node_modules/motion/dist/es/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/resolve-elements.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/animate/resolve-subjects.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/mix/number.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/wrap.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/utils/is-easing-array.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/array.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/sequence/utils/edit.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/sequence/utils/sort.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/utils/is-motion-value.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/progress.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/offsets/default.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/utils/is-generator.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/time-conversion.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/errors.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/sequence/create.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/store.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/utils/resolve-variants.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/frameloop/order.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/frameloop/render-step.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/global-config.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/frameloop/batcher.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/noop.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/frameloop/frame.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/frameloop/sync-time.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/warn-once.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/subscription-manager.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/velocity-per-second.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/index.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/utils/setters.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/value/use-will-change/is.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/value/use-will-change/add-will-change.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/optimized-appear/data-id.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/render/utils/keys-transform.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/utils/default-transitions.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/utils/is-transition-defined.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/utils/get-value-transition.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/utils/is-css-variable.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/clamp.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/numbers/index.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/sanitize.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/float-regex.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/is-nullish.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/single-color-regex.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/color/utils.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/color/rgba.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/color/hex.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/numbers/units.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/color/hsla.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/color/index.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/color-regex.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/complex/index.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/mix/immediate.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/mix/color.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/mix/visibility.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/pipe.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/mix/complex.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/mix/index.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/drivers/frame.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/utils/linear.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/utils/velocity.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/spring/defaults.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/spring/find.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/spring/index.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/inertia.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/interpolate.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/offsets/time.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/cubic-bezier.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/ease.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/modifiers/mirror.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/modifiers/reverse.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/back.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/anticipate.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/circ.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/utils/map.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/keyframes.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/get-final.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/utils/replace-transition-type.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/utils/WithPromise.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/JSAnimation.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/render/dom/parse-transform.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/render/dom/is-css-var.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/render/dom/style-set.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/memo.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/supports/scroll-timeline.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/supports/flags.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/supports/memo.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/supports/linear-easing.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/easing/supported.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/NativeAnimation.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/NativeAnimationExtended.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/utils/is-animatable.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/utils/can-animate.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/is-object.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/is-html-element.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/supports/waapi.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/interfaces/motion-value.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/render/utils/keys-position.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/projection/geometry/conversion.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/projection/utils/measure.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/motion/features/definitions.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/projection/geometry/models.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/utils/is-browser.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/utils/reduced-motion/state.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/utils/reduced-motion/index.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/utils/is-animation-controls.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/utils/is-variant-label.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/utils/variant-props.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/utils/is-controlling-variants.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/utils/motion-values.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/is-numerical-string.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/is-zero-value-string.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/auto.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/test.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/dimensions.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/find.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/complex/filter.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/int.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/maps/number.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/maps/transform.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/maps/defaults.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/animatable-none.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/VisualElement.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/dom/DOMVisualElement.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/get-as-type.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/html/utils/build-transform.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/html/utils/build-styles.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/html/utils/render.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/projection/styles/scale-correction.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/html/HTMLVisualElement.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/object/ObjectVisualElement.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/svg/utils/path.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/svg/utils/build-attrs.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/svg/utils/render.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/svg/SVGVisualElement.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/is-svg-element.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/is-svg-svg-element.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/utils/create-visual-element.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/animate/single-value.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/animate/subject.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/animate/sequence.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/GroupAnimation.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/animate/index.mjs","../ts-src/core/modules/checkout/ui/icons/spinner.icon.ts","../ts-src/core/modules/checkout/ui/loader/loader.component.ts","../ts-src/core/modules/checkout/ui/buttons/apple-pay/apple-pay.button.ts","../ts-src/core/modules/checkout/checkout.constant.ts","../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","../ts-src/core/modules/checkout/utils/card/card.utils.ts","../ts-src/core/modules/checkout/utils/card/card.enums.ts","../ts-src/core/modules/checkout/utils/card/card.validator.ts","../ts-src/core/modules/checkout/utils/checkout.mapper.ts","../ts-src/core/modules/checkout/ui/buttons/google-pay/google-pay.button.ts","../ts-src/core/modules/checkout/ui/buttons/paypal/paypal.button.ts","../ts-src/core/modules/checkout/utils/locale.mapper.ts","../ts-src/core/modules/checkout/ui/icons/card.icon.ts","../ts-src/core/modules/checkout/ui/buttons/card/card.button.ts","../ts-src/core/shared/array.utils.ts","../ts-src/pkg/checkout-api/constants/config.ts","../ts-src/pkg/checkout-api/checkout-api.service.ts","../ts-src/pkg/checkout-api/constants/enums.ts","../ts-src/core/modules/checkout/ui/buttons/buttons.component.ts","../ts-src/core/modules/checkout/ui/icons/back.icon.ts","../ts-src/core/modules/checkout/ui/card-form/buttons/back/back.button.ts","../ts-src/core/modules/checkout/ui/card-form/buttons/submit/submit.button.ts","../ts-src/core/modules/checkout/ui/icons/warning.icon.ts","../ts-src/core/modules/checkout/ui/card-form/inputs/name/name.input.ts","../ts-src/core/modules/checkout/ui/icons/unknown-card.icon.ts","../ts-src/core/modules/checkout/ui/icons/amex.icon.ts","../ts-src/core/modules/checkout/ui/icons/diners-club.icon.ts","../ts-src/core/modules/checkout/ui/icons/discover.icon.ts","../ts-src/core/modules/checkout/ui/icons/jcb.icon.ts","../ts-src/core/modules/checkout/ui/icons/master-card.icon.ts","../ts-src/core/modules/checkout/ui/icons/union-pay.icon.ts","../ts-src/core/modules/checkout/ui/icons/visa.icon.ts","../ts-src/core/modules/checkout/ui/card-form/inputs/number/number.input.ts","../ts-src/core/modules/checkout/ui/icons/card-cvc.icon.ts","../ts-src/core/modules/checkout/ui/card-form/inputs/card-security/card-security.component.ts","../ts-src/core/modules/checkout/ui/alerts/error/error.alert.ts","../ts-src/core/modules/checkout/ui/card-form/card.form.ts","../ts-src/core/modules/checkout/ui/icons/success.icon.ts","../ts-src/core/modules/checkout/ui/alerts/success/success.alert.ts","../ts-src/core/modules/checkout/ui/checkout.component.ts","../ts-src/core/modules/checkout/checkout.module.ts","../ts-src/core/shared/state/state.abstract.ts","../ts-src/core/modules/checkout/state/checkout.state.ts","../ts-src/core/modules/checkout/state/styles.state.ts","../ts-src/core/modules/checkout/state/transaction.state.ts","../ts-src/core/modules/checkout/state/translate/i18n/i18n.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/ar.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/en.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/bg.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/cs.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/da.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/de.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/el.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/es.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/et.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/fi.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/fil.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/fr.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/hr.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/hu.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/id.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/it.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/ja.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/ko.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/lt.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/lv.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/ms.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/ru.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/mt.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/nb.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/nl.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/pl.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/pt.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/ro.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/sk.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/sl.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/sv.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/th.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/tr.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/vi.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/zh.ts","../ts-src/core/modules/checkout/state/translate/translate.state.ts","../node_modules/@paypal/paypal-js/dist/esm/paypal-js.js","../ts-src/pkg/paypal/paypal.constant.ts","../ts-src/pkg/paypal/paypal.ts","../ts-src/core/core.module.ts","../ts-src/app/js/checkout.module.ts"],"sourcesContent":["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 type { EvervaultInstance } from '@evervault/js'\nimport type { ApplePayConfig } from '../ev.interface'\n\nexport class ApplePay {\n private apple: ReturnType<EvervaultInstance['ui']['applePay']> | null = null\n isAvailable = false\n private onReady: (() => void) | undefined\n\n constructor(private readonly ev: EvervaultInstance) {}\n\n async init({ transaction, locale, supportedCardTypes, onReady, onError, onSuccess, onCancel }: ApplePayConfig) {\n const evTransaction = this.ev.transactions.create(transaction)\n this.apple = this.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 onSuccess?.(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 this.apple.availability()\n this.isAvailable = true // availability === 'available'\n console.log('Apple Pay availability', availability)\n if (!this.isAvailable) {\n console.error('Apple Pay is not available', availability)\n }\n if (onError) this.apple.on('error', onError)\n if (onCancel) this.apple.on('cancel', onCancel)\n this.onReady = onReady\n }\n\n async render(parent: HTMLElement) {\n if (!this.apple || !this.isAvailable) return\n parent.innerHTML = ''\n await this.apple.mount(parent)\n this.onReady?.()\n }\n}\n","import type { EvervaultInstance } from '@evervault/js'\nimport type { GooglePayConfig } from '../ev.interface'\n\nexport class GooglePay {\n private google: ReturnType<EvervaultInstance['ui']['googlePay']> | null = null\n\n constructor(private readonly ev: EvervaultInstance) {}\n\n async init({ transaction, locale, onReady, onError, onSuccess, onCancel }: GooglePayConfig) {\n const evTransaction = this.ev.transactions.create(transaction)\n this.google = this.ev.ui.googlePay(evTransaction, {\n locale,\n size: {\n width: '100%',\n height: '42px',\n },\n borderRadius: 12,\n billingAddress: {\n phoneNumber: true,\n },\n process: async (paymentData, { fail }) => {\n try {\n onSuccess?.(paymentData)\n } catch (error) {\n console.error(error)\n fail({\n message: 'Cannot pay with payment credentials',\n })\n }\n },\n })\n\n if (onCancel) this.google.on('cancel', onCancel)\n if (onReady) this.google.on('ready', onReady)\n if (onError) this.google.on('error', onError)\n }\n\n async render(parent: HTMLElement) {\n if (!this.google) return\n parent.innerHTML = ''\n this.google.mount(parent)\n }\n}\n","import type { Listener, Unsubscribe } from './types'\n\nexport class Observer<TData> {\n private listeners: Listener<TData>[] = []\n\n private removeListener(listener: Listener<TData>): void {\n this.listeners = this.listeners.filter((l) => l !== listener)\n }\n\n addListener(listener: Listener<TData>): Unsubscribe {\n this.listeners.push(listener)\n return () => this.removeListener(listener)\n }\n\n emit(data: TData): void {\n for (const listener of this.listeners) {\n listener(data)\n }\n }\n\n clear(): void {\n this.listeners = []\n }\n}\n","import type { EvervaultInstance } from '@evervault/js'\nimport type { ThreeDsConfig } from '../ev.interface'\n\nexport class ThreeDs {\n private threeDs: ReturnType<EvervaultInstance['ui']['threeDSecure']> | null = null\n\n constructor(private readonly ev: EvervaultInstance) {}\n\n async init({ threeDsId, onReady, onSuccess, onError }: ThreeDsConfig) {\n this.threeDs = this.ev.ui.threeDSecure(threeDsId)\n this.threeDs.on('ready', () => onReady?.())\n this.threeDs.on('success', () => onSuccess?.())\n this.threeDs.on('failure', () => onError?.())\n this.threeDs.on('error', () => onError?.())\n }\n\n async render(parent?: HTMLElement) {\n if (!this.threeDs) return\n this.threeDs.mount(parent)\n }\n}\n","import { loadEvervault, type EvervaultInstance } from '@evervault/js'\nimport type { ApplePayConfig, EvConfig, GooglePayConfig, ThreeDsConfig } from './ev.interface'\nimport { ApplePay } from './element/apple-pay'\nimport { GooglePay } from './element/google-pay'\nimport { Observer } from '@ts/core/shared/state/observer'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport { ThreeDs } from './element/three-ds'\n\n// evervault service\nexport class EvService {\n isReady = false\n private ev: EvervaultInstance | null = null\n private apple: ApplePay | null = null\n private google: GooglePay | null = null\n private threeDs: ThreeDs | null = null\n private readonly events = {\n ready: new Observer<void>(),\n }\n\n // is should load\n private isShouldLoad({ teamId, appId }: EvConfig): boolean {\n return this.ev?.config.appId !== appId || this.ev?.config.teamId !== teamId\n }\n\n // init ev\n async initEv(config: EvConfig) {\n if (!this.isShouldLoad(config)) return\n\n this.isReady = false\n this.ev = await loadEvervault(config.teamId, config.appId)\n this.apple = new ApplePay(this.ev)\n this.google = new GooglePay(this.ev)\n this.events.ready.emit()\n this.isReady = true\n }\n\n // init three ds\n async initThreeDs(config: ThreeDsConfig) {\n if (!this.ev) throw new Error('Evervault should be init before using Three DS Secure')\n this.threeDs = new ThreeDs(this.ev)\n \n await this.threeDs.init(config)\n await this.threeDs.render()\n }\n\n // init apple\n async initApple(config: ApplePayConfig) {\n if (!this.apple) throw new Error('Evervault should be init before using Apple Pay')\n\n await this.apple.init(config)\n }\n\n // init google\n async initGoogle(config: GooglePayConfig) {\n if (!this.google) throw new Error('Evervault should be init before using Google Pay')\n \n await this.google.init(config)\n }\n\n // is apple available\n isAppleAvailable(): boolean {\n return !!this.apple?.isAvailable\n }\n\n // add event listener\n addEventListener(event: keyof EvService['events'], listener: Listener<void>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n // render apple\n async renderApple(parent: HTMLElement) {\n return await this.apple?.render(parent)\n }\n\n // render google\n async renderGoogle(parent: HTMLElement) {\n return await this.google?.render(parent)\n }\n\n // get evervault instance\n getEv(): EvervaultInstance {\n if (!this.ev) {\n throw new Error('Evervault should be init before getting instance')\n }\n\n return this.ev\n }\n}\n","function isDOMKeyframes(keyframes) {\n return typeof keyframes === \"object\" && !Array.isArray(keyframes);\n}\n\nexport { isDOMKeyframes };\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 { isDOMKeyframes } from '../utils/is-dom-keyframes.mjs';\nimport { resolveElements } from '../../../../../motion-dom/dist/es/utils/resolve-elements.mjs';\n\nfunction resolveSubjects(subject, keyframes, scope, selectorCache) {\n if (typeof subject === \"string\" && isDOMKeyframes(keyframes)) {\n return resolveElements(subject, scope, selectorCache);\n }\n else if (subject instanceof NodeList) {\n return Array.from(subject);\n }\n else if (Array.isArray(subject)) {\n return subject;\n }\n else {\n return [subject];\n }\n}\n\nexport { resolveSubjects };\n","function calculateRepeatDuration(duration, repeat, _repeatDelay) {\n return duration * (repeat + 1);\n}\n\nexport { calculateRepeatDuration };\n","/**\n * Given a absolute or relative time definition and current/prev time state of the sequence,\n * calculate an absolute time for the next keyframes.\n */\nfunction calcNextTime(current, next, prev, labels) {\n if (typeof next === \"number\") {\n return next;\n }\n else if (next.startsWith(\"-\") || next.startsWith(\"+\")) {\n return Math.max(0, current + parseFloat(next));\n }\n else if (next === \"<\") {\n return prev;\n }\n else {\n return labels.get(next) ?? current;\n }\n}\n\nexport { calcNextTime };\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","const wrap = (min, max, v) => {\n const rangeSize = max - min;\n return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min;\n};\n\nexport { wrap };\n","const isEasingArray = (ease) => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { isEasingArray };\n","import { wrap } from '../../wrap.mjs';\nimport { isEasingArray } from './is-easing-array.mjs';\n\nfunction getEasingForSegment(easing, i) {\n return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing;\n}\n\nexport { getEasingForSegment };\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","import { mixNumber } from '../../../../../../motion-dom/dist/es/utils/mix/number.mjs';\nimport { getEasingForSegment } from '../../../../../../motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs';\nimport { removeItem } from '../../../../../../motion-utils/dist/es/array.mjs';\n\nfunction eraseKeyframes(sequence, startTime, endTime) {\n for (let i = 0; i < sequence.length; i++) {\n const keyframe = sequence[i];\n if (keyframe.at > startTime && keyframe.at < endTime) {\n removeItem(sequence, keyframe);\n // If we remove this item we have to push the pointer back one\n i--;\n }\n }\n}\nfunction addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) {\n /**\n * Erase every existing value between currentTime and targetTime,\n * this will essentially splice this timeline into any currently\n * defined ones.\n */\n eraseKeyframes(sequence, startTime, endTime);\n for (let i = 0; i < keyframes.length; i++) {\n sequence.push({\n value: keyframes[i],\n at: mixNumber(startTime, endTime, offset[i]),\n easing: getEasingForSegment(easing, i),\n });\n }\n}\n\nexport { addKeyframes, eraseKeyframes };\n","/**\n * Take an array of times that represent repeated keyframes. For instance\n * if we have original times of [0, 0.5, 1] then our repeated times will\n * be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back\n * down to a 0-1 scale.\n */\nfunction normalizeTimes(times, repeat) {\n for (let i = 0; i < times.length; i++) {\n times[i] = times[i] / (repeat + 1);\n }\n}\n\nexport { normalizeTimes };\n","function compareByTime(a, b) {\n if (a.at === b.at) {\n if (a.value === null)\n return 1;\n if (b.value === null)\n return -1;\n return 0;\n }\n else {\n return a.at - b.at;\n }\n}\n\nexport { compareByTime };\n","const isMotionValue = (value) => Boolean(value && value.getVelocity);\n\nexport { isMotionValue };\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 { mixNumber } from '../../../utils/mix/number.mjs';\nimport { progress } from '../../../../../../motion-utils/dist/es/progress.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 isGenerator(type) {\n return typeof type === \"function\" && \"applyToOptions\" in type;\n}\n\nexport { isGenerator };\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","/**\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","import { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';\nimport { millisecondsToSeconds } from '../../../../../../motion-utils/dist/es/time-conversion.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","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","import { resolveSubjects } from '../animate/resolve-subjects.mjs';\nimport { calculateRepeatDuration } from './utils/calc-repeat-duration.mjs';\nimport { calcNextTime } from './utils/calc-time.mjs';\nimport { addKeyframes } from './utils/edit.mjs';\nimport { normalizeTimes } from './utils/normalize-times.mjs';\nimport { compareByTime } from './utils/sort.mjs';\nimport { isMotionValue } from '../../../../../motion-dom/dist/es/value/utils/is-motion-value.mjs';\nimport { defaultOffset } from '../../../../../motion-dom/dist/es/animation/keyframes/offsets/default.mjs';\nimport { isGenerator } from '../../../../../motion-dom/dist/es/animation/generators/utils/is-generator.mjs';\nimport { createGeneratorEasing } from '../../../../../motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs';\nimport { fillOffset } from '../../../../../motion-dom/dist/es/animation/keyframes/offsets/fill.mjs';\nimport { invariant } from '../../../../../motion-utils/dist/es/errors.mjs';\nimport { getEasingForSegment } from '../../../../../motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs';\nimport { progress } from '../../../../../motion-utils/dist/es/progress.mjs';\nimport { secondsToMilliseconds } from '../../../../../motion-utils/dist/es/time-conversion.mjs';\n\nconst defaultSegmentEasing = \"easeInOut\";\nconst MAX_REPEAT = 20;\nfunction createAnimationsFromSequence(sequence, { defaultTransition = {}, ...sequenceTransition } = {}, scope, generators) {\n const defaultDuration = defaultTransition.duration || 0.3;\n const animationDefinitions = new Map();\n const sequences = new Map();\n const elementCache = {};\n const timeLabels = new Map();\n let prevTime = 0;\n let currentTime = 0;\n let totalDuration = 0;\n /**\n * Build the timeline by mapping over the sequence array and converting\n * the definitions into keyframes and offsets with absolute time values.\n * These will later get converted into relative offsets in a second pass.\n */\n for (let i = 0; i < sequence.length; i++) {\n const segment = sequence[i];\n /**\n * If this is a timeline label, mark it and skip the rest of this iteration.\n */\n if (typeof segment === \"string\") {\n timeLabels.set(segment, currentTime);\n continue;\n }\n else if (!Array.isArray(segment)) {\n timeLabels.set(segment.name, calcNextTime(currentTime, segment.at, prevTime, timeLabels));\n continue;\n }\n let [subject, keyframes, transition = {}] = segment;\n /**\n * If a relative or absolute time value has been specified we need to resolve\n * it in relation to the currentTime.\n */\n if (transition.at !== undefined) {\n currentTime = calcNextTime(currentTime, transition.at, prevTime, timeLabels);\n }\n /**\n * Keep track of the maximum duration in this definition. This will be\n * applied to currentTime once the definition has been parsed.\n */\n let maxDuration = 0;\n const resolveValueSequence = (valueKeyframes, valueTransition, valueSequence, elementIndex = 0, numSubjects = 0) => {\n const valueKeyframesAsList = keyframesAsList(valueKeyframes);\n const { delay = 0, times = defaultOffset(valueKeyframesAsList), type = \"keyframes\", repeat, repeatType, repeatDelay = 0, ...remainingTransition } = valueTransition;\n let { ease = defaultTransition.ease || \"easeOut\", duration } = valueTransition;\n /**\n * Resolve stagger() if defined.\n */\n const calculatedDelay = typeof delay === \"function\"\n ? delay(elementIndex, numSubjects)\n : delay;\n /**\n * If this animation should and can use a spring, generate a spring easing function.\n */\n const numKeyframes = valueKeyframesAsList.length;\n const createGenerator = isGenerator(type)\n ? type\n : generators?.[type];\n if (numKeyframes <= 2 && createGenerator) {\n /**\n * As we're creating an easing function from a spring,\n * ideally we want to generate it using the real distance\n * between the two keyframes. However this isn't always\n * possible - in these situations we use 0-100.\n */\n let absoluteDelta = 100;\n if (numKeyframes === 2 &&\n isNumberKeyframesArray(valueKeyframesAsList)) {\n const delta = valueKeyframesAsList[1] - valueKeyframesAsList[0];\n absoluteDelta = Math.abs(delta);\n }\n const springTransition = { ...remainingTransition };\n if (duration !== undefined) {\n springTransition.duration = secondsToMilliseconds(duration);\n }\n const springEasing = createGeneratorEasing(springTransition, absoluteDelta, createGenerator);\n ease = springEasing.ease;\n duration = springEasing.duration;\n }\n duration ?? (duration = defaultDuration);\n const startTime = currentTime + calculatedDelay;\n /**\n * If there's only one time offset of 0, fill in a second with length 1\n */\n if (times.length === 1 && times[0] === 0) {\n times[1] = 1;\n }\n /**\n * Fill out if offset if fewer offsets than keyframes\n */\n const remainder = times.length - valueKeyframesAsList.length;\n remainder > 0 && fillOffset(times, remainder);\n /**\n * If only one value has been set, ie [1], push a null to the start of\n * the keyframe array. This will let us mark a keyframe at this point\n * that will later be hydrated with the previous value.\n */\n valueKeyframesAsList.length === 1 &&\n valueKeyframesAsList.unshift(null);\n /**\n * Handle repeat options\n */\n if (repeat) {\n invariant(repeat < MAX_REPEAT, \"Repeat count too high, must be less than 20\");\n duration = calculateRepeatDuration(duration, repeat);\n const originalKeyframes = [...valueKeyframesAsList];\n const originalTimes = [...times];\n ease = Array.isArray(ease) ? [...ease] : [ease];\n const originalEase = [...ease];\n for (let repeatIndex = 0; repeatIndex < repeat; repeatIndex++) {\n valueKeyframesAsList.push(...originalKeyframes);\n for (let keyframeIndex = 0; keyframeIndex < originalKeyframes.length; keyframeIndex++) {\n times.push(originalTimes[keyframeIndex] + (repeatIndex + 1));\n ease.push(keyframeIndex === 0\n ? \"linear\"\n : getEasingForSegment(originalEase, keyframeIndex - 1));\n }\n }\n normalizeTimes(times, repeat);\n }\n const targetTime = startTime + duration;\n /**\n * Add keyframes, mapping offsets to absolute time.\n */\n addKeyframes(valueSequence, valueKeyframesAsList, ease, times, startTime, targetTime);\n maxDuration = Math.max(calculatedDelay + duration, maxDuration);\n totalDuration = Math.max(targetTime, totalDuration);\n };\n if (isMotionValue(subject)) {\n const subjectSequence = getSubjectSequence(subject, sequences);\n resolveValueSequence(keyframes, transition, getValueSequence(\"default\", subjectSequence));\n }\n else {\n const subjects = resolveSubjects(subject, keyframes, scope, elementCache);\n const numSubjects = subjects.length;\n /**\n * For every element in this segment, process the defined values.\n */\n for (let subjectIndex = 0; subjectIndex < numSubjects; subjectIndex++) {\n /**\n * Cast necessary, but we know these are of this type\n */\n keyframes = keyframes;\n transition = transition;\n const thisSubject = subjects[subjectIndex];\n const subjectSequence = getSubjectSequence(thisSubject, sequences);\n for (const key in keyframes) {\n resolveValueSequence(keyframes[key], getValueTransition(transition, key), getValueSequence(key, subjectSequence), subjectIndex, numSubjects);\n }\n }\n }\n prevTime = currentTime;\n currentTime += maxDuration;\n }\n /**\n * For every element and value combination create a new animation.\n */\n sequences.forEach((valueSequences, element) => {\n for (const key in valueSequences) {\n const valueSequence = valueSequences[key];\n /**\n * Arrange all the keyframes in ascending time order.\n */\n valueSequence.sort(compareByTime);\n const keyframes = [];\n const valueOffset = [];\n const valueEasing = [];\n /**\n * For each keyframe, translate absolute times into\n * relative offsets based on the total duration of the timeline.\n */\n for (let i = 0; i < valueSequence.length; i++) {\n const { at, value, easing } = valueSequence[i];\n keyframes.push(value);\n valueOffset.push(progress(0, totalDuration, at));\n valueEasing.push(easing || \"easeOut\");\n }\n /**\n * If the first keyframe doesn't land on offset: 0\n * provide one by duplicating the initial keyframe. This ensures\n * it snaps to the first keyframe when the animation starts.\n */\n if (valueOffset[0] !== 0) {\n valueOffset.unshift(0);\n keyframes.unshift(keyframes[0]);\n valueEasing.unshift(defaultSegmentEasing);\n }\n /**\n * If the last keyframe doesn't land on offset: 1\n * provide one with a null wildcard value. This will ensure it\n * stays static until the end of the animation.\n */\n if (valueOffset[valueOffset.length - 1] !== 1) {\n valueOffset.push(1);\n keyframes.push(null);\n }\n if (!animationDefinitions.has(element)) {\n animationDefinitions.set(element, {\n keyframes: {},\n transition: {},\n });\n }\n const definition = animationDefinitions.get(element);\n definition.keyframes[key] = keyframes;\n definition.transition[key] = {\n ...defaultTransition,\n duration: totalDuration,\n ease: valueEasing,\n times: valueOffset,\n ...sequenceTransition,\n };\n }\n });\n return animationDefinitions;\n}\nfunction getSubjectSequence(subject, sequences) {\n !sequences.has(subject) && sequences.set(subject, {});\n return sequences.get(subject);\n}\nfunction getValueSequence(name, sequences) {\n if (!sequences[name])\n sequences[name] = [];\n return sequences[name];\n}\nfunction keyframesAsList(keyframes) {\n return Array.isArray(keyframes) ? keyframes : [keyframes];\n}\nfunction getValueTransition(transition, key) {\n return transition && transition[key]\n ? {\n ...transition,\n ...transition[key],\n }\n : { ...transition };\n}\nconst isNumber = (keyframe) => typeof keyframe === \"number\";\nconst isNumberKeyframesArray = (keyframes) => keyframes.every(isNumber);\n\nexport { createAnimationsFromSequence, getValueTransition };\n","const visualElementStore = new WeakMap();\n\nexport { visualElementStore };\n","const isKeyframesTarget = (v) => {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\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 { 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 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","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","const MotionGlobalConfig = {};\n\nexport { MotionGlobalConfig };\n","import { stepsOrder } from './order.mjs';\nimport { createRenderStep } from './render-step.mjs';\nimport { MotionGlobalConfig } from '../../../../motion-utils/dist/es/global-config.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","/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n","import { createRenderBatcher } from './batcher.mjs';\nimport { noop } from '../../../../motion-utils/dist/es/noop.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 { frameData } from './frame.mjs';\nimport { MotionGlobalConfig } from '../../../../motion-utils/dist/es/global-config.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 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 { 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 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","import { time } from '../frameloop/sync-time.mjs';\nimport { frame } from '../frameloop/frame.mjs';\nimport { warnOnce } from '../../../../motion-utils/dist/es/warn-once.mjs';\nimport { SubscriptionManager } from '../../../../motion-utils/dist/es/subscription-manager.mjs';\nimport { velocityPerSecond } from '../../../../motion-utils/dist/es/velocity-per-second.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","import { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { motionValue } from '../../../../../motion-dom/dist/es/value/index.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/dist/es/value/utils/is-motion-value.mjs';\n\nfunction isWillChangeMotionValue(value) {\n return Boolean(isMotionValue(value) && value.add);\n}\n\nexport { isWillChangeMotionValue };\n","import { isWillChangeMotionValue } from './is.mjs';\nimport { MotionGlobalConfig } from '../../../../../motion-utils/dist/es/global-config.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","/**\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","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","/**\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 { transformProps } from '../../../../../motion-dom/dist/es/render/utils/keys-transform.mjs';\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","function getValueTransition(transition, key) {\n return (transition?.[key] ??\n transition?.[\"default\"] ??\n transition);\n}\n\nexport { getValueTransition };\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","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","import { clamp } from '../../../../../../motion-utils/dist/es/clamp.mjs';\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 { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\nimport { clamp } from '../../../../../../motion-utils/dist/es/clamp.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","import { 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';\nimport { warning } from '../../../../../motion-utils/dist/es/errors.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","/**\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","import { 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';\nimport { pipe } from '../../../../../motion-utils/dist/es/pipe.mjs';\nimport { warning } from '../../../../../motion-utils/dist/es/errors.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","import { velocityPerSecond } from '../../../../../../motion-utils/dist/es/velocity-per-second.mjs';\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 { springDefaults } from './defaults.mjs';\nimport { warning } from '../../../../../../motion-utils/dist/es/errors.mjs';\nimport { secondsToMilliseconds, millisecondsToSeconds } from '../../../../../../motion-utils/dist/es/time-conversion.mjs';\nimport { clamp } from '../../../../../../motion-utils/dist/es/clamp.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 { 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';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../../../../../motion-utils/dist/es/time-conversion.mjs';\nimport { clamp } from '../../../../../../motion-utils/dist/es/clamp.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 { mix } from './mix/index.mjs';\nimport { invariant } from '../../../../motion-utils/dist/es/errors.mjs';\nimport { clamp } from '../../../../motion-utils/dist/es/clamp.mjs';\nimport { MotionGlobalConfig } from '../../../../motion-utils/dist/es/global-config.mjs';\nimport { noop } from '../../../../motion-utils/dist/es/noop.mjs';\nimport { pipe } from '../../../../motion-utils/dist/es/pipe.mjs';\nimport { progress } from '../../../../motion-utils/dist/es/progress.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","function convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\n\nexport { convertOffsetToTimes };\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","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","// 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","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","import { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\nimport { easeInOut } from '../../../../../motion-utils/dist/es/easing/ease.mjs';\nimport { isEasingArray } from '../../../../../motion-utils/dist/es/easing/utils/is-easing-array.mjs';\nimport { easingDefinitionToFunction } from '../../../../../motion-utils/dist/es/easing/utils/map.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 { 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';\nimport { invariant } from '../../../../motion-utils/dist/es/errors.mjs';\nimport { pipe } from '../../../../motion-utils/dist/es/pipe.mjs';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../../../motion-utils/dist/es/time-conversion.mjs';\nimport { clamp } from '../../../../motion-utils/dist/es/clamp.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 = () => {\n const { motionValue } = this.options;\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now());\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","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","/*#__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","import { memo } from '../../../../../motion-utils/dist/es/memo.mjs';\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 { supportsFlags } from './flags.mjs';\nimport { memo } from '../../../../../motion-utils/dist/es/memo.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 { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { generateLinearEasing } from '../utils/linear.mjs';\nimport { cubicBezierAsString } from './cubic-bezier.mjs';\nimport { supportedWaapiEasing } from './supported.mjs';\nimport { isBezierDefinition } from '../../../../../../motion-utils/dist/es/easing/utils/is-bezier-definition.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","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 { 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';\nimport { invariant } from '../../../../motion-utils/dist/es/errors.mjs';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../../../motion-utils/dist/es/time-conversion.mjs';\nimport { noop } from '../../../../motion-utils/dist/es/noop.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 } from '../../../../../../motion-utils/dist/es/easing/anticipate.mjs';\nimport { backInOut } from '../../../../../../motion-utils/dist/es/easing/back.mjs';\nimport { circInOut } from '../../../../../../motion-utils/dist/es/easing/circ.mjs';\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 { 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';\nimport { secondsToMilliseconds } from '../../../../motion-utils/dist/es/time-conversion.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 { isGenerator } from '../generators/utils/is-generator.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\nimport { warning } from '../../../../../motion-utils/dist/es/errors.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","function isObject(value) {\n return typeof value === \"object\" && value !== null;\n}\n\nexport { isObject };\n","import { isObject } from '../../../../motion-utils/dist/es/is-object.mjs';\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 { isHTMLElement } from '../../../utils/is-html-element.mjs';\nimport { memo } from '../../../../../../motion-utils/dist/es/memo.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 { 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';\nimport { MotionGlobalConfig } from '../../../../motion-utils/dist/es/global-config.mjs';\nimport { noop } from '../../../../motion-utils/dist/es/noop.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 { getFinalKeyframe } from '../animators/waapi/utils/get-final-keyframe.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { isTransitionDefined } from '../utils/is-transition-defined.mjs';\nimport { getValueTransition } from '../../../../../motion-dom/dist/es/animation/utils/get-value-transition.mjs';\nimport { secondsToMilliseconds } from '../../../../../motion-utils/dist/es/time-conversion.mjs';\nimport { MotionGlobalConfig } from '../../../../../motion-utils/dist/es/global-config.mjs';\nimport { frame } from '../../../../../motion-dom/dist/es/frameloop/frame.mjs';\nimport { JSAnimation } from '../../../../../motion-dom/dist/es/animation/JSAnimation.mjs';\nimport { AsyncMotionValueAnimation } from '../../../../../motion-dom/dist/es/animation/AsyncMotionValueAnimation.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 { 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","import { 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';\nimport { getValueTransition } from '../../../../../motion-dom/dist/es/animation/utils/get-value-transition.mjs';\nimport { frame } from '../../../../../motion-dom/dist/es/frameloop/frame.mjs';\nimport { positionalKeys } from '../../../../../motion-dom/dist/es/render/utils/keys-position.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","/**\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 { 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","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","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","const isBrowser = typeof window !== \"undefined\";\n\nexport { isBrowser };\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","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 { isMotionValue } from '../../../../../motion-dom/dist/es/value/utils/is-motion-value.mjs';\nimport { motionValue } from '../../../../../motion-dom/dist/es/value/index.mjs';\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","/**\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","/**\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","/**\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 { 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","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 { 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';\nimport { KeyframeResolver } from '../../../../motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs';\nimport { time } from '../../../../motion-dom/dist/es/frameloop/sync-time.mjs';\nimport { frame, cancelFrame } from '../../../../motion-dom/dist/es/frameloop/frame.mjs';\nimport { isMotionValue } from '../../../../motion-dom/dist/es/value/utils/is-motion-value.mjs';\nimport { warnOnce } from '../../../../motion-utils/dist/es/warn-once.mjs';\nimport { transformProps } from '../../../../motion-dom/dist/es/render/utils/keys-transform.mjs';\nimport { motionValue } from '../../../../motion-dom/dist/es/value/index.mjs';\nimport { isNumericalString } from '../../../../motion-utils/dist/es/is-numerical-string.mjs';\nimport { isZeroValueString } from '../../../../motion-utils/dist/es/is-zero-value-string.mjs';\nimport { findValueType } from '../../../../motion-dom/dist/es/value/types/utils/find.mjs';\nimport { complex } from '../../../../motion-dom/dist/es/value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../../../../motion-dom/dist/es/value/types/utils/animatable-none.mjs';\nimport { SubscriptionManager } from '../../../../motion-utils/dist/es/subscription-manager.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 { isCSSVariableToken } from './is-css-variable.mjs';\nimport { invariant } from '../../../../../motion-utils/dist/es/errors.mjs';\nimport { isNumericalString } from '../../../../../motion-utils/dist/es/is-numerical-string.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","import { isZeroValueString } from '../../../../../../motion-utils/dist/es/is-zero-value-string.mjs';\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 { 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","import { VisualElement } from '../VisualElement.mjs';\nimport { DOMKeyframesResolver } from '../../../../../motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs';\nimport { isMotionValue } from '../../../../../motion-dom/dist/es/value/utils/is-motion-value.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","/**\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 { transformPropOrder } from '../../../../../../motion-dom/dist/es/render/utils/keys-transform.mjs';\nimport { getValueAsType } from '../../../../../../motion-dom/dist/es/value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../../../../motion-dom/dist/es/value/types/maps/number.mjs';\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 { buildTransform } from './build-transform.mjs';\nimport { transformProps } from '../../../../../../motion-dom/dist/es/render/utils/keys-transform.mjs';\nimport { isCSSVariableName } from '../../../../../../motion-dom/dist/es/animation/utils/is-css-variable.mjs';\nimport { getValueAsType } from '../../../../../../motion-dom/dist/es/value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../../../../motion-dom/dist/es/value/types/maps/number.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","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 { isCSSVariableName } from '../../../../../motion-dom/dist/es/animation/utils/is-css-variable.mjs';\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 { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nimport { transformProps } from '../../../../../motion-dom/dist/es/render/utils/keys-transform.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 { isForcedMotionValue } from '../../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../../../../../motion-dom/dist/es/value/utils/is-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 { 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';\nimport { transformProps } from '../../../../../motion-dom/dist/es/render/utils/keys-transform.mjs';\nimport { defaultTransformValue, readTransformValue } from '../../../../../motion-dom/dist/es/render/dom/parse-transform.mjs';\nimport { isCSSVariableName } from '../../../../../motion-dom/dist/es/animation/utils/is-css-variable.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","import { createBox } from '../../projection/geometry/models.mjs';\nimport { VisualElement } from '../VisualElement.mjs';\n\nfunction isObjectKey(key, object) {\n return key in object;\n}\nclass ObjectVisualElement extends VisualElement {\n constructor() {\n super(...arguments);\n this.type = \"object\";\n }\n readValueFromInstance(instance, key) {\n if (isObjectKey(key, instance)) {\n const value = instance[key];\n if (typeof value === \"string\" || typeof value === \"number\") {\n return value;\n }\n }\n return undefined;\n }\n getBaseTargetFromProps() {\n return undefined;\n }\n removeValueFromRenderState(key, renderState) {\n delete renderState.output[key];\n }\n measureInstanceViewportBox() {\n return createBox();\n }\n build(renderState, latestValues) {\n Object.assign(renderState.output, latestValues);\n }\n renderInstance(instance, { output }) {\n Object.assign(instance, output);\n }\n sortInstanceNodePosition() {\n return 0;\n }\n}\n\nexport { ObjectVisualElement };\n","import { px } from '../../../../../../motion-dom/dist/es/value/types/numbers/units.mjs';\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","/**\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","const isSVGTag = (tag) => typeof tag === \"string\" && tag.toLowerCase() === \"svg\";\n\nexport { isSVGTag };\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 { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\nimport { isMotionValue } from '../../../../../../motion-dom/dist/es/value/utils/is-motion-value.mjs';\nimport { transformPropOrder } from '../../../../../../motion-dom/dist/es/render/utils/keys-transform.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 { 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';\nimport { transformProps } from '../../../../../motion-dom/dist/es/render/utils/keys-transform.mjs';\nimport { getDefaultValueType } from '../../../../../motion-dom/dist/es/value/types/maps/defaults.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 { isObject } from '../../../../motion-utils/dist/es/is-object.mjs';\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","import { HTMLVisualElement } from '../../render/html/HTMLVisualElement.mjs';\nimport { ObjectVisualElement } from '../../render/object/ObjectVisualElement.mjs';\nimport { visualElementStore } from '../../render/store.mjs';\nimport { SVGVisualElement } from '../../render/svg/SVGVisualElement.mjs';\nimport { isSVGElement } from '../../../../../motion-dom/dist/es/utils/is-svg-element.mjs';\nimport { isSVGSVGElement } from '../../../../../motion-dom/dist/es/utils/is-svg-svg-element.mjs';\n\nfunction createDOMVisualElement(element) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n transform: {},\n transformOrigin: {},\n style: {},\n vars: {},\n attrs: {},\n },\n latestValues: {},\n },\n };\n const node = isSVGElement(element) && !isSVGSVGElement(element)\n ? new SVGVisualElement(options)\n : new HTMLVisualElement(options);\n node.mount(element);\n visualElementStore.set(element, node);\n}\nfunction createObjectVisualElement(subject) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n output: {},\n },\n latestValues: {},\n },\n };\n const node = new ObjectVisualElement(options);\n node.mount(subject);\n visualElementStore.set(subject, node);\n}\n\nexport { createDOMVisualElement, createObjectVisualElement };\n","import { animateMotionValue } from '../interfaces/motion-value.mjs';\nimport { isMotionValue } from '../../../../../motion-dom/dist/es/value/utils/is-motion-value.mjs';\nimport { motionValue } from '../../../../../motion-dom/dist/es/value/index.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","import { visualElementStore } from '../../render/store.mjs';\nimport { animateTarget } from '../interfaces/visual-element-target.mjs';\nimport { createDOMVisualElement, createObjectVisualElement } from '../utils/create-visual-element.mjs';\nimport { isDOMKeyframes } from '../utils/is-dom-keyframes.mjs';\nimport { resolveSubjects } from './resolve-subjects.mjs';\nimport { animateSingleValue } from './single-value.mjs';\nimport { invariant } from '../../../../../motion-utils/dist/es/errors.mjs';\nimport { isMotionValue } from '../../../../../motion-dom/dist/es/value/utils/is-motion-value.mjs';\n\nfunction isSingleValue(subject, keyframes) {\n return (isMotionValue(subject) ||\n typeof subject === \"number\" ||\n (typeof subject === \"string\" && !isDOMKeyframes(keyframes)));\n}\n/**\n * Implementation\n */\nfunction animateSubject(subject, keyframes, options, scope) {\n const animations = [];\n if (isSingleValue(subject, keyframes)) {\n animations.push(animateSingleValue(subject, isDOMKeyframes(keyframes)\n ? keyframes.default || keyframes\n : keyframes, options ? options.default || options : options));\n }\n else {\n const subjects = resolveSubjects(subject, keyframes, scope);\n const numSubjects = subjects.length;\n invariant(Boolean(numSubjects), \"No valid elements provided.\");\n for (let i = 0; i < numSubjects; i++) {\n const thisSubject = subjects[i];\n const createVisualElement = thisSubject instanceof Element\n ? createDOMVisualElement\n : createObjectVisualElement;\n if (!visualElementStore.has(thisSubject)) {\n createVisualElement(thisSubject);\n }\n const visualElement = visualElementStore.get(thisSubject);\n const transition = { ...options };\n /**\n * Resolve stagger function if provided.\n */\n if (\"delay\" in transition &&\n typeof transition.delay === \"function\") {\n transition.delay = transition.delay(i, numSubjects);\n }\n animations.push(...animateTarget(visualElement, { ...keyframes, transition }, {}));\n }\n }\n return animations;\n}\n\nexport { animateSubject };\n","import { createAnimationsFromSequence } from '../sequence/create.mjs';\nimport { animateSubject } from './subject.mjs';\nimport { spring } from '../../../../../motion-dom/dist/es/animation/generators/spring/index.mjs';\n\nfunction animateSequence(sequence, options, scope) {\n const animations = [];\n const animationDefinitions = createAnimationsFromSequence(sequence, options, scope, { spring });\n animationDefinitions.forEach(({ keyframes, transition }, subject) => {\n animations.push(...animateSubject(subject, keyframes, transition));\n });\n return animations;\n}\n\nexport { animateSequence };\n","class GroupAnimation {\n constructor(animations) {\n // Bound to accomadate common `return animation.stop` pattern\n this.stop = () => this.runAll(\"stop\");\n this.animations = animations.filter(Boolean);\n }\n get finished() {\n return Promise.all(this.animations.map((animation) => animation.finished));\n }\n /**\n * TODO: Filter out cancelled or stopped animations before returning\n */\n getAll(propName) {\n return this.animations[0][propName];\n }\n setAll(propName, newValue) {\n for (let i = 0; i < this.animations.length; i++) {\n this.animations[i][propName] = newValue;\n }\n }\n attachTimeline(timeline) {\n const subscriptions = this.animations.map((animation) => animation.attachTimeline(timeline));\n return () => {\n subscriptions.forEach((cancel, i) => {\n cancel && cancel();\n this.animations[i].stop();\n });\n };\n }\n get time() {\n return this.getAll(\"time\");\n }\n set time(time) {\n this.setAll(\"time\", time);\n }\n get speed() {\n return this.getAll(\"speed\");\n }\n set speed(speed) {\n this.setAll(\"speed\", speed);\n }\n get state() {\n return this.getAll(\"state\");\n }\n get startTime() {\n return this.getAll(\"startTime\");\n }\n get duration() {\n let max = 0;\n for (let i = 0; i < this.animations.length; i++) {\n max = Math.max(max, this.animations[i].duration);\n }\n return max;\n }\n runAll(methodName) {\n this.animations.forEach((controls) => controls[methodName]());\n }\n play() {\n this.runAll(\"play\");\n }\n pause() {\n this.runAll(\"pause\");\n }\n cancel() {\n this.runAll(\"cancel\");\n }\n complete() {\n this.runAll(\"complete\");\n }\n}\n\nexport { GroupAnimation };\n","import { GroupAnimation } from './GroupAnimation.mjs';\n\nclass GroupAnimationWithThen extends GroupAnimation {\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n}\n\nexport { GroupAnimationWithThen };\n","import { animateSequence } from './sequence.mjs';\nimport { animateSubject } from './subject.mjs';\nimport { GroupAnimationWithThen } from '../../../../../motion-dom/dist/es/animation/GroupAnimationWithThen.mjs';\n\nfunction isSequence(value) {\n return Array.isArray(value) && value.some(Array.isArray);\n}\n/**\n * Creates an animation function that is optionally scoped\n * to a specific element.\n */\nfunction createScopedAnimate(scope) {\n /**\n * Implementation\n */\n function scopedAnimate(subjectOrSequence, optionsOrKeyframes, options) {\n let animations = [];\n if (isSequence(subjectOrSequence)) {\n animations = animateSequence(subjectOrSequence, optionsOrKeyframes, scope);\n }\n else {\n animations = animateSubject(subjectOrSequence, optionsOrKeyframes, options, scope);\n }\n const animation = new GroupAnimationWithThen(animations);\n if (scope) {\n scope.animations.push(animation);\n }\n return animation;\n }\n return scopedAnimate;\n}\nconst animate = createScopedAnimate();\n\nexport { animate, createScopedAnimate };\n","import styles from './icons.module.css'\n\nexport class SpinnerIcon {\n private readonly template = `\n <svg aria-hidden=\"true\" class=\"${styles.spinner}\" viewBox=\"0 0 100 101\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path 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\" fill=\"currentColor\"/>\n <path 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\" fill=\"currentFill\"/>\n </svg>\n <span class=\"${styles.srOnly}\">Loading...</span>\n `\n private readonly spinner = document.createElement('div')\n\n constructor() {\n this.spinner.setAttribute('role', 'status')\n this.spinner.classList.add(styles.spinnerContainer)\n this.spinner.innerHTML = this.template\n }\n\n addClass(className: string) {\n this.spinner.classList.add(className)\n }\n\n removeClass(className: string) {\n this.spinner.classList.remove(className)\n }\n\n render() {\n return this.spinner\n }\n}\n","import { SpinnerIcon } from '../icons/spinner.icon'\nimport styles from './loader.module.css'\n\nexport class Loader {\n private readonly loader: HTMLElement\n\n constructor() {\n this.loader = document.createElement('div')\n this.loader.classList.add(styles.loader)\n this.loader.appendChild(new SpinnerIcon().render())\n }\n\n setClassName(className?: string): void {\n if (className) this.loader.classList.add(className)\n else this.loader.className = styles.loader\n }\n\n render() {\n return this.loader\n }\n}\n","import { Observer } from '@ts/core/shared/state/observer'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport type { ApplePayConfig, EvService } from '@ts/pkg/evervault'\nimport styles from './apple-pay.module.css'\n\nexport class ApplePay {\n private readonly element: HTMLElement\n private readonly events = {\n ready: new Observer<void>(),\n }\n\n constructor(private readonly ev: EvService) {\n this.element = document.createElement('div')\n this.element.classList.add(styles.applePay, styles.hidden)\n }\n\n async init(config?: ApplePayConfig): Promise<void> {\n if (!config) return\n\n await this.ev.initApple(config)\n if (!this.ev.isAppleAvailable()) return\n\n await this.ev.renderApple(this.element)\n this.element.classList.remove(styles.hidden)\n this.events.ready.emit()\n }\n\n addEventListener(event: keyof ApplePay['events'], listener: Listener<void>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","import type { CheckoutConfig } from '@ts/pkg/checkout-api'\n\nexport const defaultCheckoutConfig: CheckoutConfig[] = [\n { type: 'paypal', is_active: true, order: 1 },\n { type: 'apple-pay', is_active: true, order: 2 },\n { type: 'google-pay', is_active: true, order: 3 },\n { type: 'card', is_active: true, order: 4 },\n] as const\n\nexport const variants = {\n open: { y: 0, opacity: 1 },\n close: { y: 100, opacity: 0 },\n transition: { duration: 0.5, type: 'spring', bounce: 0 },\n} as const\n\nexport const btnVariants = {\n open: { y: 0, opacity: 1 },\n close: { y: -100, opacity: 0 },\n transition: { duration: 0.5, type: 'spring', bounce: 0 },\n} as const\n\nexport const success = {\n animate: { y: 0, opacity: 1 },\n transition: { duration: 0.5, type: 'spring', bounce: 0 },\n} as const\n\nexport const labelVariants = {\n open: { y: 0, opacity: 1 },\n close: { y: 15, opacity: 0 },\n transition: { duration: 0.5, type: 'spring', bounce: 0 },\n} as const\n\nexport const errorVariants = {\n open: { y: 0, opacity: 1, height: 'auto' },\n close: { y: -15, opacity: 0, height: 0},\n transition: { duration: 0.5, type: 'spring', bounce: 0 },\n} as const\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","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 {\n name: 'MasterCard',\n type: CardType.Mastercard,\n pattern: /^5[1-5]/,\n minLength: 16,\n maxLength: 16,\n },\n {\n name: 'American Express',\n type: CardType.AmericanExpress,\n pattern: /^3[47]/,\n minLength: 15,\n maxLength: 15,\n },\n {\n name: 'Discover',\n type: CardType.Discover,\n pattern: /^6(?:011|5[0-9]{2})/,\n minLength: 16,\n maxLength: 16,\n },\n {\n name: 'JCB',\n type: CardType.JCB,\n pattern: /^(?:2131|1800|35\\d{3})/,\n minLength: 15,\n maxLength: 16,\n },\n {\n name: 'Diners Club',\n type: CardType.DinersClub,\n pattern: /^3(?:0[0-5]|[68][0-9])/,\n minLength: 14,\n maxLength: 16,\n },\n { name: 'Union Pay', type: CardType.UnionPay, pattern: /^62[^7]+/, minLength: 16, maxLength: 19 },\n {\n name: 'Maestro',\n type: CardType.Maestro,\n pattern: /^(50[^69]|5[68]|5018|5020|5038|627|6304|6759|6761|6763|6[3][^6]+)/,\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 type { PayPalTransaction, TransactionConfig } from '@ts/pkg/checkout-api'\nimport type {\n ApplePayCardNetwork,\n ApplePayTransaction,\n GooglePayTransaction,\n} from '@ts/pkg/evervault'\nimport { CardType } from './card'\n\n// transaction config to google pay\nexport const transactionConfigToGooglePay = (\n transaction?: TransactionConfig | null,\n): GooglePayTransaction | null => {\n if (\n !transaction ||\n typeof transaction.amount !== 'number' ||\n !transaction.currency ||\n !transaction.country ||\n !transaction.merchant_id\n ) {\n return null\n }\n\n if (transaction.checkout_config) {\n const googlePay = transaction.checkout_config?.find(\n ({ is_active, type }) => is_active && type === 'google-pay',\n )\n\n if (!googlePay) return null\n }\n\n return {\n amount: transaction.amount,\n currency: transaction.currency,\n country: transaction.country,\n merchantId: transaction.merchant_id,\n lineItems: [],\n }\n}\n\n// transaction config to apple pay\nexport const transactionConfigToApplePay = (\n transaction?: TransactionConfig | null,\n): ApplePayTransaction | null => {\n if (\n !transaction ||\n typeof transaction.amount !== 'number' ||\n !transaction.currency ||\n !transaction.country ||\n !transaction.merchant_id\n ) {\n return null\n }\n\n if (transaction.checkout_config) {\n const applePay = transaction.checkout_config?.find(\n ({ is_active, type }) => is_active && type === 'apple-pay',\n )\n if (!applePay) return null\n }\n\n return {\n amount: transaction.amount,\n currency: transaction.currency,\n country: transaction.country,\n merchantId: transaction.merchant_id,\n lineItems: transaction.apple_pay_info?.line_items || [],\n }\n}\n\n// ToDo: remove after testing\n// transaction config to paypal\nexport const transactionConfigToPayPal = (\n transaction?: TransactionConfig | null,\n): PayPalTransaction | null => {\n if (\n !transaction ||\n typeof transaction.amount !== 'number' ||\n !transaction.currency ||\n !transaction.country ||\n !transaction.merchant_id\n ) {\n return null\n }\n\n if (transaction.checkout_config) {\n const paypal = transaction.checkout_config.find(\n ({ is_active, type }) => is_active && type === 'paypal',\n )\n \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.merchant_id,\n },\n ],\n }\n}\n\n// map card type to apple card network\nexport const mapCardTypeToAppleCardNetwork = (\n cardTypes: CardType[] = [],\n): 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 { Observer } from '@ts/core/shared/state/observer'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport type { GooglePayConfig, EvService } from '@ts/pkg/evervault'\nimport styles from './google-pay.module.css'\n\nexport class GooglePay {\n private readonly element: HTMLElement\n private readonly events = {\n ready: new Observer<void>(),\n }\n\n constructor(private readonly ev: EvService) {\n this.element = document.createElement('div')\n this.element.classList.add(styles.googlePay, styles.hidden)\n }\n\n async init(config?: GooglePayConfig): Promise<void> {\n if (!config) return\n await this.ev.initGoogle(config)\n await this.ev.renderGoogle(this.element)\n this.element.classList.remove(styles.hidden)\n this.events.ready.emit()\n }\n\n addEventListener(event: keyof GooglePay['events'], listener: Listener<void>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","import { Observer } from '@ts/core/shared/state/observer'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport styles from './paypal.module.css'\nimport type { PaypalConfig, PayPalService } from '@ts/pkg/paypal'\n\n// paypal button\nexport class PayPal {\n private readonly element: HTMLElement\n private readonly events = {\n ready: new Observer<void>(),\n }\n\n constructor(private readonly paypal: PayPalService) {\n this.element = document.createElement('div')\n this.element.classList.add(styles.paypal, styles.hidden)\n }\n\n // init\n async init(config?: PaypalConfig): Promise<void> {\n if (!config) return\n \n await this.paypal.init({\n clientId: config.clientId,\n vault: true,\n })\n\n await this.paypal.render(this.element, {\n ...config,\n onApprove: async ({ billingToken }) => {\n config.onSuccess?.(billingToken || '')\n },\n onCancel: config.onCancel,\n onError: config.onError,\n })\n\n this.element.classList.remove(styles.hidden)\n this.events.ready.emit()\n }\n\n // add event listener\n addEventListener(event: keyof PayPal['events'], listener: Listener<void>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n // render\n render(): HTMLElement {\n return this.element\n }\n}\n","import type { ApplePayButtonLocale, GooglePayButtonLocale } from '@ts/pkg/evervault'\nimport type { Locale } from '../state/translate'\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 styles from './icons.module.css'\n\nexport class CardIcon {\n private readonly template = `\n <svg\n xmlns='http://www.w3.org/2000/svg'\n fill='none'\n stroke='currentColor'\n stroke-width='2'\n stroke-linecap='round'\n stroke-linejoin='round'\n viewBox='0 0 30 20'\n class='${styles.svg}'\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 <span class=\"${styles.srOnly}\">Pay with</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.card)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import { TranslateState } from '../../../state/translate'\nimport { CardIcon } from '../../icons/card.icon'\nimport styles from './card.module.css'\n\nexport class CardButton {\n private readonly element: HTMLElement\n private readonly icon = new CardIcon()\n\n constructor(translate: TranslateState) {\n this.element = document.createElement('button')\n this.element.classList.add(styles.button)\n\n const text = document.createElement('span')\n text.textContent = translate.getState().messages.card.compact.button\n this.element.append(this.icon.render(), text)\n\n this.element.addEventListener('mousedown', () => this.element.classList.add(styles.press))\n this.element.addEventListener('mouseup', () => this.element.classList.remove(styles.press))\n this.element.addEventListener('mouseout', () => this.element.classList.remove(styles.press))\n\n translate.subscribe(({ messages }) => {\n text.textContent = messages.card.compact.button\n })\n }\n\n addEventListener(listener: (ev: MouseEvent) => void) {\n return this.element.addEventListener('click', listener)\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","export const merge = <T>(arr1: Array<T>, arr2: Array<T>, equal: (a: T, b: T) => boolean): Array<T> => {\n return arr2.concat(arr1.filter((i1) => arr2.every((i2) => !equal(i1, i2))))\n}\n","import type { CheckoutConfig } from '../interface'\n\nexport const config = {\n apiBase: import.meta.env.VITE_CHECKOUT_API_BASE,\n} as const\n\nexport const initialCheckoutConfig: CheckoutConfig[] = [\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","import { config, initialCheckoutConfig } from './constants/config'\nimport type {\n // ToDo: remove after testing\n // AgreementResponse,\n CheckoutDto,\n TransactionConfigResponse,\n CheckoutResponse,\n} from './interface'\n\n// checkout req\nexport const checkoutReq = async (data: CheckoutDto): Promise<CheckoutResponse> => {\n const url = `${config.apiBase}/payments/create`\n\n const headers = new Headers()\n headers.append('Content-Type', 'application/json')\n\n console.log('----- payment data: ', data)\n\n const res = await fetch(url, {\n method: 'POST',\n headers,\n body: JSON.stringify({\n client_session: data.clientSession,\n three_ds_session_id: data.threeDsSessionId,\n type: data.googlePay ? 'GPAY' : data.applePay ? 'APPLEPAY' : data.paypal ? 'PAYPAL' : 'CARD',\n name: !data.applePay?.billingContact?.givenName ? data.card?.metadata?.name : data.applePay?.billingContact?.givenName + ' ' + data.applePay?.billingContact?.familyName,\n phone: data.applePay?.shippingContact?.phoneNumber,\n\n billing_address: (data.applePay || data.googlePay) ? {\n city: data.applePay?.billingContact?.locality || data?.googlePay?.billingAddress?.locality,\n country: data.applePay?.billingContact?.countryCode || data?.googlePay?.billingAddress?.countryCode,\n line1: data.applePay?.billingContact?.addressLines?.at(0) || data?.googlePay?.billingAddress?.address1,\n line2: data.applePay?.billingContact?.addressLines?.at(1) || data?.googlePay?.billingAddress?.address2,\n postal_code: data.applePay?.billingContact?.postalCode || data?.googlePay?.billingAddress?.postalCode,\n state: data.applePay?.billingContact?.administrativeArea || data?.googlePay?.billingAddress?.administrativeArea,\n } : undefined,\n\n card: (data.card || data.googlePay?.card || data.applePay?.card) ? {\n bin: data.card?.firstSixDigits,\n bin_data: {\n brand: data.card?.cardBrand || data.googlePay?.card?.brand || data.applePay?.card?.brand,\n country: data.card?.country || data.googlePay?.card?.country || data.applePay?.card?.country,\n currency_code: data.card?.currency || data.googlePay?.card?.currency || data.applePay?.card?.currency,\n funding: data.card?.funding || data.googlePay?.card?.funding || data.applePay?.card?.funding,\n issuer: data.card?.issuer || data.googlePay?.card?.issuer || data.applePay?.card?.issuer,\n type: data.card?.type || data.googlePay?.card?.segment || data.applePay?.card?.segment,\n },\n cvc: data.card?.cvc,\n exp_month: data.card?.expMonth || data.googlePay?.card?.expiry.month ? Number(data.card?.expMonth || data.googlePay?.card?.expiry.month) : undefined,\n exp_year: data.card?.expYear || data.googlePay?.card?.expiry.year ? Number(data.card?.expYear || data.googlePay?.card?.expiry.year) : undefined,\n last4: data.card?.lastFourDigits || data.googlePay?.card?.lastFour || data.applePay?.card?.lastFour,\n number: data.card?.number || data.googlePay?.card?.number,\n } : undefined,\n\n paypal: data.paypal?.billing_agreement_token.paypalId ? { billing_agreement_token: data.paypal?.billing_agreement_token.paypalId } : undefined,\n\n google_pay: data.googlePay ? {\n cryptogram: data.googlePay.cryptogram,\n eci: data.googlePay.eci,\n exp_month: data.googlePay?.card?.expiry.month || data.googlePay?.token.expiry.month ? Number(data.googlePay.card.expiry.month || data.googlePay.token.expiry.month) : undefined,\n exp_year: data.googlePay?.card?.expiry.year || data.googlePay?.token.expiry.year ? Number(data.googlePay.card.expiry.year || data.googlePay.token.expiry.year) : undefined,\n token: data.googlePay?.token?.number,\n token_service_provider: data.googlePay?.token?.tokenServiceProvider,\n } : undefined,\n\n apple_pay: data.applePay ? {\n cryptogram: data.applePay.cryptogram,\n eci: data.applePay.eci,\n exp_month: data.applePay?.networkToken?.expiry?.month ? Number(data.applePay.networkToken.expiry.month) : undefined,\n exp_year: data.applePay?.networkToken?.expiry?.year ? Number(data.applePay.networkToken.expiry.year) : undefined,\n token: data.applePay?.networkToken?.number,\n token_service_provider: data.applePay?.networkToken?.tokenServiceProvider,\n } : undefined,\n }),\n })\n\n const json = await res.json()\n\n return json\n}\n\n// capture req\nexport const captureReq = async (paypalId: string): Promise<CheckoutResponse> => {\n const url = `${config.apiBase}/payments/capture/${paypalId}`\n\n const headers = new Headers()\n headers.append('Content-Type', 'application/json')\n const res = await fetch(url, {\n method: 'POST',\n headers,\n })\n \n const json = await res.json()\n\n return json\n}\n\n// paypal agreement req\nexport const paypalAgreementReq = async (clientToken: string): Promise<string> => {\n const url = `${config.apiBase}/payments/create/billing/agreement`\n\n const headers = new Headers()\n headers.append('Content-Type', 'application/json')\n\n const res = await fetch(url, {\n method: 'POST',\n headers,\n body: JSON.stringify({ client_session: clientToken }),\n })\n\n const json = await res.json()\n\n return json.paypal_agreement_token_response.token_id || ''\n}\n\n// config req\nexport const configReq = async (clientToken: string): Promise<TransactionConfigResponse> => {\n const url = `${config.apiBase}/payments/config?client_session_id=${clientToken}`\n\n const res = await fetch(url)\n\n const transaction: TransactionConfigResponse = await res.json()\n if (!transaction.checkout_config) {\n transaction.checkout_config = initialCheckoutConfig\n }\n\n return transaction\n}\n","export enum PaymentType {\n Card = 'CARD',\n}\n","import { Observer } from '@ts/core/shared/state/observer'\nimport type { CheckoutConfig } from '../../checkout.interface'\nimport styles from './buttons.module.css'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport { ApplePay } from './apple-pay/apple-pay.button'\nimport { defaultCheckoutConfig } from '../../checkout.constant'\nimport {\n mapCardTypeToAppleCardNetwork,\n transactionConfigToApplePay,\n transactionConfigToGooglePay,\n} from '../../utils/checkout.mapper'\nimport { GooglePay } from './google-pay/google-pay.button'\nimport { PayPal } from './paypal/paypal.button'\nimport { localeToAppleLocale, localeToGoogleLocale } from '../../utils/locale.mapper'\nimport { CardButton } from './card/card.button'\nimport { merge } from '@ts/core/shared/array.utils'\nimport { paypalAgreementReq } from '@ts/pkg/checkout-api'\n\nexport class Buttons {\n private isAppleReady = true\n private isGoogleReady = true\n private isPayPalReady = true\n readonly buttons: HTMLElement\n private readonly applePay: ApplePay\n private readonly googlePay: GooglePay\n private readonly paypal: PayPal\n private readonly card: CardButton\n private readonly events = {\n ready: new Observer<void>(),\n open: new Observer<void>(),\n error: new Observer<void>(),\n cancel: new Observer<void>(),\n success: new Observer<unknown>(),\n }\n\n constructor(private readonly config: CheckoutConfig) {\n this.applePay = new ApplePay(config.service.ev)\n this.paypal = new PayPal(config.service.paypal)\n this.googlePay = new GooglePay(config.service.ev)\n this.card = new CardButton(config.state.translate)\n\n this.buttons = document.createElement('div')\n this.buttons.classList.add(styles.buttons, styles.hidden)\n }\n\n async init(): Promise<void> {\n this.config.state.transaction.subscribe(() => {\n if (!this.config.service.ev.isReady) return\n this.initPaymentMethods().catch(console.error)\n })\n this.config.state.checkout.subscribe(() => {\n if (!this.config.service.ev.isReady) return\n this.initPaymentMethods().catch(console.error)\n })\n this.config.service.ev.addEventListener('ready', () => {\n this.initPaymentMethods().catch(console.error)\n })\n this.card.addEventListener(() => this.events.open.emit())\n }\n\n private async initApple(): Promise<void> {\n this.isAppleReady = false\n this.buttons.appendChild(this.applePay.render())\n const transaction = this.config.state.transaction.getState()\n const { locale, supportedCardTypes } = this.config.state.checkout.getState()\n const appleTransaction = transactionConfigToApplePay(transaction)\n try {\n if (!appleTransaction) return\n await this.applePay.init({\n transaction: appleTransaction,\n supportedCardTypes: mapCardTypeToAppleCardNetwork(supportedCardTypes),\n locale: localeToAppleLocale(locale || 'en'),\n onError: () => this.events.error.emit(),\n onCancel: () => this.events.cancel.emit(),\n onSuccess: (data) => this.events.success.emit({ ...data, type: 'apple' }),\n })\n } catch (err) {\n console.error(err)\n } finally {\n this.isAppleReady = true\n }\n }\n\n private async initGoogle(): Promise<void> {\n this.isGoogleReady = false\n this.buttons.appendChild(this.googlePay.render())\n const transaction = this.config.state.transaction.getState()\n const { locale } = this.config.state.checkout.getState()\n const googleTransaction = transactionConfigToGooglePay(transaction)\n try {\n if (!googleTransaction) return\n await this.googlePay.init({\n transaction: googleTransaction,\n locale: localeToGoogleLocale(locale || 'en'),\n onError: () => this.events.error.emit(),\n onCancel: () => this.events.cancel.emit(),\n onSuccess: (data) => this.events.success.emit({ ...data, type: 'google' }),\n })\n } catch (err) {\n console.error(err)\n } finally {\n this.isGoogleReady = true\n }\n }\n\n private async initPayPal(): Promise<void> {\n this.isPayPalReady = false\n this.buttons.appendChild(this.paypal.render())\n\n const transaction = this.config.state.transaction.getState()\n\n const clientToken = this.config.state.checkout.getState().clientToken\n const createBillingAgreement = async () => {\n return await paypalAgreementReq(clientToken)\n }\n\n try {\n if (!transaction) {\n // ToDo: receive error from server\n return\n }\n\n await this.paypal.init({\n clientId: transaction?.paypal_info?.client_id || '',\n environment: transaction?.paypal_info?.environment || 'sandbox',\n createBillingAgreement: createBillingAgreement,\n onError: () => this.events.error.emit(),\n onCancel: () => this.events.cancel.emit(),\n onSuccess: (paypalId) => this.events.success.emit({ paypalId, type: 'paypal' }),\n })\n } catch (err) {\n console.error(err)\n } finally {\n this.isPayPalReady = true\n }\n }\n\n private async initCard(): Promise<void> {\n this.buttons.appendChild(this.card.render())\n }\n\n private async initPaymentMethods(): Promise<void> {\n const transaction = this.config.state.transaction.getState()\n const config = merge(defaultCheckoutConfig, transaction?.checkout_config || [], (a, b) => a.type === b.type)\n const promises = config\n .filter(({ is_active }) => is_active)\n .sort((a, b) => a.order - b.order)\n .map(({ type }) => {\n switch (type) {\n case 'apple-pay':\n return this.initApple()\n case 'google-pay':\n return this.initGoogle()\n case 'paypal':\n return this.initPayPal()\n case 'card':\n return this.initCard()\n default:\n throw new Error('Unknown button type')\n }\n })\n await Promise.all(promises)\n this.handleReady()\n }\n\n private handleReady(): void {\n if (this.isAppleReady && this.isGoogleReady && this.isPayPalReady) {\n this.events.ready.emit()\n }\n }\n\n addEventListener(event: keyof Buttons['events'], listener: Listener<unknown>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n showButton(): void {\n this.buttons.classList.remove(styles.hidden)\n }\n\n render(): HTMLElement {\n return this.buttons\n }\n}\n","import styles from './icons.module.css'\n\nexport class BackIcon {\n private readonly template = `\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 stroke-width='2'\n stroke-linecap='round'\n stroke-linejoin='round'\n class='${styles.back}'\n >\n <polyline points='15 18 9 12 15 6'></polyline>\n </svg>\n <span class=\"${styles.srOnly}\">Back</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import { BackIcon } from '../../../icons/back.icon'\nimport styles from './back.module.css'\n\nexport class BackButton {\n private readonly element: HTMLElement\n private readonly icon = new BackIcon()\n\n constructor() {\n this.element = document.createElement('div')\n this.element.classList.add(styles.button)\n this.element.appendChild(this.icon.render())\n }\n\n addEventListener(listener: (ev: MouseEvent) => void) {\n return this.element.addEventListener('click', listener)\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","import { TranslateState } from '@ts/core/modules/checkout/state/translate'\nimport styles from './submit.module.css'\nimport { SpinnerIcon } from '../../../icons/spinner.icon'\n\nexport class SubmitButton {\n private readonly element: HTMLElement\n private readonly spinner = new SpinnerIcon()\n private readonly message = document.createElement('span')\n\n constructor(translate: TranslateState) {\n this.element = document.createElement('button')\n this.element.classList.add(styles.button)\n this.spinner.addClass(styles.spinner)\n this.spinner.addClass(styles.hidden)\n this.message.textContent = translate.messages().card.pay.button\n this.element.append(this.spinner.render(), this.message)\n\n this.element.addEventListener('mousedown', () => this.element.classList.add(styles.press))\n this.element.addEventListener('mouseup', () => this.element.classList.remove(styles.press))\n this.element.addEventListener('mouseout', () => this.element.classList.remove(styles.press))\n\n translate.subscribe((state) => {\n this.message.textContent = state.messages.card.pay.button\n })\n }\n\n addEventListener(listener: (ev: MouseEvent) => void) {\n return this.element.addEventListener('click', listener)\n }\n\n disable(isDisabled: boolean) {\n if (isDisabled) {\n this.element.setAttribute('disabled', 'true')\n this.element.classList.add(styles.disabled)\n this.spinner.removeClass(styles.hidden)\n } else {\n this.element.removeAttribute('disabled')\n this.element.classList.remove(styles.disabled)\n this.spinner.addClass(styles.hidden)\n }\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class WarningIcon {\n private readonly template = `\n <svg focusable='false' fill='#dc2626' color='#dc2626' height='12' viewBox='0 0 12 12' width='12'>\n <g fill='none' fill-rule='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' stroke-linecap='round' stroke-linejoin='round'></path>\n </g>\n </g>\n </svg>\n <span class=\"${styles.srOnly}\">Warning</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.warning)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import { Observer } from '@ts/core/shared/state/observer'\nimport styles from './name.module.css'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport { InputError } from '@ts/core/modules/checkout/utils/card'\nimport { WarningIcon } from '../../../icons/warning.icon'\nimport { animate } from 'motion'\nimport { labelVariants } from '@ts/core/modules/checkout/checkout.constant'\nimport { TranslateState } from '@ts/core/modules/checkout/state/translate'\n\ntype ChangeData = {\n value: string\n isValid: boolean\n}\n\nexport class NameInput {\n private readonly id = 'paynext-card-input-name'\n readonly element: HTMLElement\n private readonly inputContainer = document.createElement('div')\n private readonly input = document.createElement('input')\n private readonly label = document.createElement('label')\n private readonly labelText = document.createElement('span')\n private readonly labelError = document.createElement('span')\n private readonly endContent = document.createElement('div')\n private readonly warning = new WarningIcon()\n\n isTouchSubmit = false\n private isRequired = false\n private isDisabled = false\n private isChanged = false\n\n private readonly events = {\n change: new Observer<ChangeData>(),\n }\n\n constructor(translate: TranslateState) {\n const m = translate.messages()\n this.element = document.createElement('div')\n this.element.classList.add(styles.wrapper)\n\n this.inputContainer.classList.add(styles.inputContainer)\n this.input.setAttribute('id', this.id)\n this.input.setAttribute('auto-complete', 'cc-name')\n this.input.setAttribute('placeholder', m.card.name.placeholder)\n this.input.classList.add(styles.input)\n this.endContent.classList.add(styles.hidden)\n this.endContent.appendChild(this.warning.render())\n this.inputContainer.append(this.input, this.endContent)\n\n this.label.setAttribute('for', this.id)\n this.label.classList.add(styles.label)\n this.labelText.textContent = m.card.name.label\n this.labelError.textContent = m.card.name.error.required\n this.labelError.classList.add(styles.labelError, styles.hidden)\n this.label.append(this.labelText, this.labelError)\n\n this.element.append(this.label, this.inputContainer)\n this.input.addEventListener('input', () => this.handleChange(this.input.value))\n this.input.addEventListener('paste', () => this.handleChange(this.input.value))\n this.input.addEventListener('blur', () => this.validate(this.input.value))\n\n translate.subscribe(({ messages }) => {\n this.input.setAttribute('placeholder', messages.card.name.placeholder)\n this.labelText.textContent = messages.card.name.label\n this.labelError.textContent = messages.card.name.error.required\n })\n }\n\n private validator(value: string): InputError | null {\n return !value ? InputError.Empty : null\n }\n\n private handleChange(value: string): void {\n if (this.isDisabled) return\n\n this.isRequired = false\n if (!this.isChanged) {\n this.isChanged = true\n }\n\n this.events.change.emit({\n value,\n isValid: this.validator(value) === null,\n })\n this.render()\n }\n\n private async toggleLabelError(isInputError: boolean): Promise<void> {\n if (isInputError) {\n this.inputContainer.classList.add(styles.errorInput)\n this.endContent.classList.remove(styles.hidden)\n this.labelError.classList.remove(styles.hidden)\n await animate(this.labelError, labelVariants.open, labelVariants.transition)\n return\n }\n this.inputContainer.classList.remove(styles.errorInput)\n this.endContent.classList.add(styles.hidden)\n await animate(this.labelError, labelVariants.close, labelVariants.transition)\n this.labelError.classList.add(styles.hidden)\n }\n\n addEventListener(event: keyof NameInput['events'], listener: Listener<ChangeData>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n disable(isDisabled: boolean) {\n if (isDisabled) {\n this.input.setAttribute('disabled', 'true')\n this.input.classList.add(styles.disabledInput)\n this.inputContainer.classList.add(styles.disabled)\n } else {\n this.input.removeAttribute('disabled')\n this.input.classList.remove(styles.disabledInput)\n this.inputContainer.classList.remove(styles.disabled)\n }\n }\n\n touchSubmit() {\n this.isTouchSubmit = true\n this.render()\n }\n\n value() {\n return this.input.value\n }\n\n validate(value: string) {\n const error = this.validator(value)\n this.isRequired = !!error\n this.render()\n return !error\n }\n\n render(): HTMLElement {\n const isTouched = this.isTouchSubmit || this.isChanged\n const isError = isTouched && this.isRequired\n const isInputError = isError && !this.isDisabled\n this.toggleLabelError(isInputError)\n\n if (this.isDisabled) {\n this.inputContainer.classList.add(styles.disabled)\n this.input.classList.add(styles.disabledInput)\n } else {\n this.inputContainer.classList.remove(styles.disabled)\n this.input.classList.remove(styles.disabledInput)\n }\n\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class UnknownCardIcon {\n private readonly template = `\n <svg\n width='28'\n height='19'\n xmlns='http://www.w3.org/2000/svg'\n fill='rgb(220 38 38)'\n role='presentation'\n viewBox='0 0 30 20'\n class='${styles.svg}'\n >\n <g clip-path='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 fill-rule='evenodd'\n clip-rule='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 <clip-path id='clip0_184_11820'>\n <rect width='28' height='19'></rect>\n </clip-path>\n </defs>\n </svg>\n <span class=\"${styles.srOnly}\">Unknown card</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class AmexIcon {\n private readonly template = `\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' class='${styles.svg}'>\n <g fill='none' fill-rule='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 <span class=\"${styles.srOnly}\">Amex</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class DinersClubIcon {\n private readonly template = `\n <svg\n xmlns='http://www.w3.org/2000/svg'\n xmlns-xlink='http://www.w3.org/1999/xlink'\n width='24px'\n height='16px'\n viewBox='0 0 24 16'\n version='1.1'\n class='${styles.svg}'\n >\n <g id='319' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'>\n <g id='New-Icons' transform='translate(-320.000000, -280.000000)' fill-rule='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 stroke-opacity='0.2'\n stroke='#000000'\n stroke-width='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 <span class=\"${styles.srOnly}\">Diners Club</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class DiscoverIcon {\n private readonly template = `\n <svg\n xmlns='http://www.w3.org/2000/svg'\n xmlns-xlink='http://www.w3.org/1999/xlink'\n width='24px'\n height='16px'\n viewBox='0 0 24 16'\n version='1.1'\n class='${styles.svg}'\n >\n <g id='319' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'>\n <g id='New-Icons' transform='translate(-280.000000, -280.000000)' fill-rule='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 stroke-opacity='0.2'\n stroke='#000000'\n stroke-width='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 <span class=\"${styles.srOnly}\">Discover</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class JcbIcon {\n private readonly template = `\n <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 23 16' width='23' class='${styles.svg}'>\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 <span class=\"${styles.srOnly}\">JCB</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class MasterCardIcon {\n private readonly template = `\n <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${styles.svg}'>\n <g fill='none' fill-rule='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 <span class=\"${styles.srOnly}\">MasterCard</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class UnionPayIcon {\n private readonly template = `\n <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${styles.svg}'>\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 <span class=\"${styles.srOnly}\">Union Pay</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class VisaIcon {\n private readonly template = `\n <svg\n xmlns='http://www.w3.org/2000/svg'\n xmlns-xlink='http://www.w3.org/1999/xlink'\n width='24px'\n height='16px'\n viewBox='0 0 24 16'\n version='1.1'\n class='${styles.svg}'\n >\n <g id='319' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'>\n <g id='New-Icons' transform='translate(-80.000000, -280.000000)' fill-rule='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 stroke-opacity='0.2'\n stroke='#000000'\n stroke-width='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 <span class=\"${styles.srOnly}\">Visa</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import { Observer } from '@ts/core/shared/state/observer'\nimport styles from './number.module.css'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport {\n CardType,\n cardTypes,\n detectCardType,\n getCardTypes,\n InputError,\n prettyCardNumber,\n validateCardNumber,\n} from '@ts/core/modules/checkout/utils/card'\nimport { animate } from 'motion'\nimport { errorVariants, labelVariants } from '@ts/core/modules/checkout/checkout.constant'\nimport { UnknownCardIcon } from '../../../icons/unknown-card.icon'\nimport { AmexIcon } from '../../../icons/amex.icon'\nimport { DinersClubIcon } from '../../../icons/diners-club.icon'\nimport { DiscoverIcon } from '../../../icons/discover.icon'\nimport { JcbIcon } from '../../../icons/jcb.icon'\nimport { MasterCardIcon } from '../../../icons/master-card.icon'\nimport { UnionPayIcon } from '../../../icons/union-pay.icon'\nimport { VisaIcon } from '../../../icons/visa.icon'\nimport { TranslateState } from '@ts/core/modules/checkout/state/translate'\n\ntype ChangeData = {\n card: string\n cardType?: CardType\n cardTypes: string[]\n isValid: boolean\n}\n\nexport class NumberInput {\n private readonly id = 'paynext-card-input-number'\n private readonly initialCardTypes = cardTypes.map((type) => type.type)\n\n readonly element: HTMLElement\n private readonly inputContainer = document.createElement('div')\n private readonly input = document.createElement('input')\n private readonly label = document.createElement('label')\n private readonly labelText = document.createElement('span')\n private readonly labelError = document.createElement('span')\n private readonly endContent = document.createElement('div')\n private readonly error = document.createElement('p')\n private readonly unknownCard = new UnknownCardIcon()\n private readonly amex = new AmexIcon()\n private readonly dinerClub = new DinersClubIcon()\n private readonly discover = new DiscoverIcon()\n private readonly jcb = new JcbIcon()\n private readonly masterCard = new MasterCardIcon()\n private readonly unionPay = new UnionPayIcon()\n private readonly visa = new VisaIcon()\n\n supportedCardTypes: CardType[] = this.initialCardTypes\n isTouchSubmit = false\n private errorMessage = ''\n private isRequired = false\n private isDisabled = false\n private isChanged = false\n\n private readonly events = {\n change: new Observer<ChangeData>(),\n }\n\n constructor(private readonly translate: TranslateState) {\n const m = translate.messages()\n this.element = document.createElement('div')\n this.element.classList.add(styles.wrapper)\n\n this.inputContainer.classList.add(styles.inputContainer)\n this.input.setAttribute('id', this.id)\n this.input.setAttribute('auto-complete', 'cc-number')\n this.input.setAttribute('placeholder', '1234 1234 1234 1234')\n this.input.classList.add(styles.input)\n this.endContent.classList.add(styles.endContent)\n this.endContent.append(...this.getCardIcons())\n this.inputContainer.append(this.input, this.endContent)\n\n this.label.setAttribute('for', this.id)\n this.label.classList.add(styles.label)\n this.labelText.textContent = m.card.number.label\n this.labelError.textContent = m.card.number.error.required\n this.labelError.classList.add(styles.labelError, styles.hidden)\n this.label.append(this.labelText, this.labelError)\n\n this.error.classList.add(styles.error, styles.hidden)\n\n this.element.append(this.label, this.inputContainer, this.error)\n this.input.addEventListener('input', (e) => {\n e.stopPropagation()\n this.handleChange(this.input.value)\n })\n this.input.addEventListener('paste', (e) => {\n e.preventDefault()\n this.handleChange(e.clipboardData?.getData('text') || '')\n })\n this.input.addEventListener('blur', () => this.validate(this.input.value))\n\n this.translate.subscribe(({ messages }) => {\n this.labelText.textContent = messages.card.number.label\n this.labelError.textContent = messages.card.number.error.required\n this.render()\n })\n }\n\n private handleChange(cardNumber: string): void {\n if (this.isDisabled) return\n\n this.isRequired = false\n this.errorMessage = ''\n\n if (!this.isChanged) {\n this.isChanged = true\n }\n const cardTypes = getCardTypes(cardNumber).map((type) => type.type)\n const cardType = detectCardType(cardNumber)\n const card = prettyCardNumber(cardNumber, cardType?.type || '')\n if (card.replace(/\\D/g, '').length === (cardType?.maxLength || 16)) {\n this.validate(card)\n }\n this.supportedCardTypes = cardTypes.length ? cardTypes : this.initialCardTypes\n\n this.input.value = card\n this.events.change.emit({\n card,\n cardType: cardType?.type,\n cardTypes,\n isValid: validateCardNumber(cardNumber, this.supportedCardTypes).isValid,\n })\n this.render()\n }\n\n private async toggleLabelError(isLabelError: boolean): Promise<void> {\n if (isLabelError) {\n this.inputContainer.classList.add(styles.errorInput)\n this.labelError.classList.remove(styles.hidden)\n await animate(this.labelError, labelVariants.open, labelVariants.transition)\n return\n }\n await animate(this.labelError, labelVariants.close, labelVariants.transition)\n this.labelError.classList.add(styles.hidden)\n }\n\n private async toggleErrorMessage(isErrorMessage: boolean): Promise<void> {\n if (isErrorMessage) {\n this.inputContainer.classList.add(styles.errorInput)\n this.error.textContent = this.errorMessage\n this.error.classList.remove(styles.hidden)\n await animate(this.error, errorVariants.open, errorVariants.transition)\n return\n }\n await animate(this.error, errorVariants.close, errorVariants.transition)\n this.error.classList.add(styles.hidden)\n }\n\n private getCardIcons(): HTMLElement[] {\n return cardTypes\n .filter(({ type }) => this.supportedCardTypes.includes(type))\n .slice(0, 3)\n .map(({ type }) => {\n switch (type) {\n case CardType.Visa:\n return this.visa.render()\n case CardType.Maestro:\n case CardType.Mastercard:\n return this.masterCard.render()\n case CardType.DinersClub:\n return this.dinerClub.render()\n case CardType.JCB:\n return this.jcb.render()\n case CardType.AmericanExpress:\n return this.amex.render()\n case CardType.Discover:\n return this.discover.render()\n case CardType.UnionPay:\n return this.unionPay.render()\n }\n })\n }\n\n addEventListener(event: keyof NumberInput['events'], listener: Listener<ChangeData>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n disable(isDisabled: boolean) {\n if (isDisabled) {\n this.input.setAttribute('disabled', 'true')\n this.input.classList.add(styles.disabledInput)\n this.inputContainer.classList.add(styles.disabled)\n } else {\n this.input.removeAttribute('disabled')\n this.input.classList.remove(styles.disabledInput)\n this.inputContainer.classList.remove(styles.disabled)\n }\n }\n\n touchSubmit() {\n this.isTouchSubmit = true\n this.render()\n }\n\n value() {\n return {\n value: this.input.value,\n cardType: getCardTypes(this.input.value)[0]?.type || '',\n }\n }\n\n validate(value: string) {\n const m = this.translate.messages()\n const { isValid, error } = validateCardNumber(value, this.supportedCardTypes)\n if (!isValid) {\n if (error === InputError.Empty) {\n this.errorMessage = ''\n this.isRequired = true\n } else if (error === InputError.Unsupported) {\n this.errorMessage = m.card.number.error.unsupported\n this.isRequired = false\n } else {\n this.errorMessage =\n error === InputError.Incomplete ? m.card.number.error.incomplete : m.card.number.error.invalid\n this.isRequired = false\n }\n this.render()\n return isValid\n }\n\n this.isRequired = false\n this.errorMessage = ''\n this.render()\n return isValid\n }\n\n render(): HTMLElement {\n const isTouched = this.isTouchSubmit || this.isChanged\n const isLabelError = isTouched && !this.isDisabled && this.isRequired\n const isErrorMessage = isTouched && !this.isDisabled && !!this.errorMessage\n this.toggleLabelError(isLabelError)\n this.toggleErrorMessage(isErrorMessage)\n\n if (!isLabelError && !isErrorMessage) {\n this.inputContainer.classList.remove(styles.errorInput)\n this.endContent.innerHTML = ''\n this.endContent.append(...this.getCardIcons())\n } else {\n this.endContent.innerHTML = ''\n this.endContent.appendChild(this.unknownCard.render())\n }\n\n if (this.isDisabled) {\n this.inputContainer.classList.add(styles.disabled)\n this.input.classList.add(styles.disabledInput)\n } else {\n this.inputContainer.classList.remove(styles.disabled)\n this.input.classList.remove(styles.disabledInput)\n }\n\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class CardCvcIcon {\n private readonly template = `\n <svg class='${styles.svg}' focusable='false' viewBox='0 0 32 21' role='img' aria-label='CVC'>\n <title>CVC</title>\n <g fill='none' fill-rule='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 <span class=\"${styles.srOnly}\">Card CVC</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import { Observer } from '@ts/core/shared/state/observer'\nimport styles from './card-security.module.css'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport { animate } from 'motion'\nimport { errorVariants, labelVariants } from '@ts/core/modules/checkout/checkout.constant'\nimport { WarningIcon } from '../../../icons/warning.icon'\nimport { CardCvcIcon } from '../../../icons/card-cvc.icon'\nimport { CardType, InputError, prettyCardExpiry, prettyCVC } from '@ts/core/modules/checkout/utils/card'\nimport { getTypeInfo } from 'credit-card-type'\nimport { TranslateState } from '@ts/core/modules/checkout/state/translate'\n\ntype ChangeData = {\n value: string\n isValid: boolean\n}\n\ntype ExpiryError = InputError | 'expired' | 'dateExpired' | null\ntype CvcError = InputError | null\n\nexport class CardSecuity {\n private readonly cvcId = 'paynext-card-input-cvc'\n private readonly expiryId = 'paynext-card-input-expiry'\n\n readonly element: HTMLElement\n private readonly warning = new WarningIcon()\n private readonly cardCvc = new CardCvcIcon()\n\n private readonly expiryInputContainer = document.createElement('div')\n private readonly expiryInput = document.createElement('input')\n private readonly expiryLabel = document.createElement('label')\n private readonly expiryLabelText = document.createElement('span')\n private readonly expiryLabelError = document.createElement('span')\n private readonly expiryEndContent = document.createElement('div')\n private expiryError = document.createElement('p')\n\n private readonly cvcInputContainer = document.createElement('div')\n private readonly cvcInput = document.createElement('input')\n private readonly cvcLabel = document.createElement('label')\n private readonly cvcLabelText = document.createElement('span')\n private readonly cvcLabelError = document.createElement('span')\n private readonly cvcEndContent = document.createElement('div')\n private cvcError = document.createElement('p')\n\n cardType: CardType | null = null\n isTouchSubmit = false\n private isDisabled = false\n\n private expiryPrevValue = ''\n private expiryErrorMessage = ''\n private isExpiryRequired = false\n private isExpiryChanged = false\n\n private cvcErrorMessage = ''\n private isCvcRequired = false\n private isCvcChanged = false\n\n private readonly events = {\n expiryChange: new Observer<ChangeData>(),\n cvcChange: new Observer<ChangeData>(),\n }\n\n constructor(private readonly translate: TranslateState) {\n const m = translate.messages()\n this.element = document.createElement('div')\n this.element.classList.add(styles.securityContent)\n\n this.expiryInputContainer.classList.add(styles.inputContainer)\n this.expiryInput.setAttribute('id', this.expiryId)\n this.expiryInput.setAttribute('auto-complete', 'cc-expiry')\n this.expiryInput.setAttribute('placeholder', m.card.expiry.placeholder)\n this.expiryInput.classList.add(styles.input)\n this.expiryEndContent.classList.add(styles.endContent)\n this.expiryEndContent.appendChild(this.warning.render())\n this.expiryInputContainer.append(this.expiryInput, this.expiryEndContent)\n\n this.expiryLabel.setAttribute('for', this.expiryId)\n this.expiryLabel.classList.add(styles.label)\n this.expiryLabelText.textContent = m.card.expiry.label\n this.expiryLabelError.textContent = m.card.expiry.error.required\n this.expiryLabelError.classList.add(styles.labelError, styles.hidden)\n this.expiryLabel.append(this.expiryLabelText, this.expiryLabelError)\n\n this.expiryError.classList.add(styles.error, styles.hidden)\n const expiryErrorWrapper = document.createElement('div')\n expiryErrorWrapper.appendChild(this.cvcError)\n\n this.cvcInputContainer.classList.add(styles.inputContainer)\n this.cvcInput.setAttribute('id', this.cvcId)\n this.cvcInput.setAttribute('auto-complete', 'cc-cvc')\n this.cvcInput.setAttribute('placeholder', m.card.cvc.placeholder)\n this.cvcInput.classList.add(styles.input)\n this.cvcEndContent.classList.add(styles.endContent)\n this.cvcEndContent.appendChild(this.cardCvc.render())\n this.cvcInputContainer.append(this.cvcInput, this.cvcEndContent)\n\n this.cvcLabel.setAttribute('for', this.cvcId)\n this.cvcLabel.classList.add(styles.label)\n this.cvcLabelText.textContent = m.card.cvc.label\n this.cvcLabelError.textContent = m.card.cvc.error.required\n this.cvcLabelError.classList.add(styles.labelError, styles.hidden)\n this.cvcLabel.append(this.cvcLabelText, this.cvcLabelError)\n\n this.cvcError.classList.add(styles.error, styles.hidden)\n const cvcErrorWrapper = document.createElement('div')\n cvcErrorWrapper.appendChild(this.cvcError)\n\n this.element.append(\n this.expiryLabel,\n this.cvcLabel,\n this.expiryInputContainer,\n this.cvcInputContainer,\n expiryErrorWrapper,\n cvcErrorWrapper,\n )\n\n this.expiryInput.addEventListener('input', (e) => {\n e.preventDefault()\n this.handleExpiryChange(this.expiryInput.value)\n })\n this.expiryInput.addEventListener('paste', (e) => {\n e.preventDefault()\n this.handleExpiryChange(e.clipboardData?.getData('text') || '')\n })\n this.expiryInput.addEventListener('blur', () => this.validateExpiry(this.expiryInput.value))\n\n this.cvcInput.addEventListener('input', (e) => {\n e.preventDefault()\n this.handleCvcChange(this.cvcInput.value)\n })\n this.cvcInput.addEventListener('paste', (e) => {\n e.preventDefault()\n this.handleCvcChange(e.clipboardData?.getData('text') || '')\n })\n this.cvcInput.addEventListener('blur', () => this.validateCvc(this.cvcInput.value))\n\n this.translate.subscribe(({ messages }) => {\n this.cvcInput.setAttribute('placeholder', messages.card.cvc.placeholder)\n this.expiryInput.setAttribute('placeholder', messages.card.expiry.placeholder)\n this.expiryLabelText.textContent = messages.card.expiry.label\n this.cvcLabelText.textContent = messages.card.cvc.label\n this.expiryLabelError.textContent = messages.card.expiry.error.required\n this.cvcLabelError.textContent = messages.card.cvc.error.required\n this.render()\n })\n }\n\n private cvcValidator(value: string): CvcError {\n const card = getTypeInfo(this.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\n private validateCvc(value: string): boolean {\n const m = this.translate.messages()\n const error = this.cvcValidator(value)\n if (error) {\n if (error === InputError.Empty) {\n this.cvcErrorMessage = ''\n this.isCvcRequired = true\n } else {\n const errMessage = error === InputError.Incomplete ? m.card.cvc.error.incomplete : m.card.cvc.error.invalid\n this.cvcErrorMessage = errMessage\n this.isCvcRequired = false\n }\n this.render()\n return !error\n }\n\n this.isCvcRequired = false\n this.cvcErrorMessage = ''\n this.render()\n return !error\n }\n\n private handleCvcChange(value: string): void {\n if (this.isDisabled) return\n\n this.isCvcRequired = false\n this.cvcErrorMessage = ''\n\n if (!this.isCvcChanged) {\n this.isCvcChanged = true\n }\n const cvc = prettyCVC(value, this.cardType || '')\n const card = getTypeInfo(this.cardType || '')\n if (cvc.length === card?.code.size) {\n this.validateCvc(cvc)\n }\n\n this.events.cvcChange.emit({\n value: cvc,\n isValid: this.cvcValidator(cvc) === null,\n })\n this.cvcInput.value = cvc\n this.render()\n }\n\n private async toggleCvcLabelError(isLabelError: boolean): Promise<void> {\n if (isLabelError) {\n this.cvcInputContainer.classList.add(styles.errorInput)\n this.cvcLabelError.classList.remove(styles.hidden)\n await animate(this.cvcLabelError, labelVariants.open, labelVariants.transition)\n return\n }\n await animate(this.cvcLabelError, labelVariants.close, labelVariants.transition)\n }\n\n private async toggleCvcErrorMessage(isErrorMessage: boolean): Promise<void> {\n if (isErrorMessage) {\n this.cvcInputContainer.classList.add(styles.errorInput)\n this.cvcError.textContent = this.cvcErrorMessage\n this.cvcError.classList.remove(styles.hidden)\n await animate(this.cvcError, errorVariants.open, errorVariants.transition)\n return\n }\n await animate(this.cvcError, errorVariants.close, errorVariants.transition)\n }\n\n /* ----- Expiry ----- */\n private expiryValidator(value: string): ExpiryError {\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\n private validateExpiry(value: string): boolean {\n const m = this.translate.messages()\n const error = this.expiryValidator(value)\n\n if (error) {\n if (error === InputError.Empty) {\n this.expiryErrorMessage = ''\n this.isExpiryRequired = true\n } else {\n let errMessage = m.card.expiry.error.invalid\n if (error === 'expired') {\n errMessage = m.card.expiry.error.expired.replace('{date}', 'year')\n } else if (error === 'dateExpired') {\n errMessage = m.card.expiry.error.expired.replace('{date}', 'date')\n } else if (error === InputError.Incomplete) {\n errMessage = m.card.expiry.error.incomplete\n }\n this.isExpiryRequired = false\n this.expiryErrorMessage = errMessage\n }\n this.render()\n return !error\n }\n\n this.isExpiryRequired = false\n this.expiryErrorMessage = ''\n this.render()\n return !error\n }\n\n private handleExpiryChange(value: string): void {\n if (this.isDisabled) return\n\n this.isExpiryRequired = false\n this.expiryErrorMessage = ''\n if (!this.isExpiryChanged) {\n this.isExpiryChanged = true\n }\n const expiry = prettyCardExpiry(value, this.expiryPrevValue)\n if (expiry.length === 7) {\n this.validateExpiry(expiry)\n }\n\n this.events.expiryChange.emit({\n value: expiry,\n isValid: this.expiryValidator(expiry) === null,\n })\n this.expiryPrevValue = expiry\n this.expiryInput.value = expiry\n this.render()\n }\n\n private async toggleExpiryLabelError(isLabelError: boolean): Promise<void> {\n if (isLabelError) {\n this.expiryInputContainer.classList.add(styles.errorInput)\n this.expiryLabelError.classList.remove(styles.hidden)\n await animate(this.expiryLabelError, labelVariants.open, labelVariants.transition)\n return\n }\n await animate(this.expiryLabelError, labelVariants.close, labelVariants.transition)\n this.expiryLabelError.classList.add(styles.hidden)\n }\n\n private async toggleExpiryErrorMessage(isErrorMessage: boolean): Promise<void> {\n if (isErrorMessage) {\n this.expiryInputContainer.classList.add(styles.errorInput)\n this.expiryError.textContent = this.expiryErrorMessage\n this.expiryError.classList.remove(styles.hidden)\n await animate(this.expiryError, errorVariants.open, errorVariants.transition)\n return\n }\n await animate(this.expiryError, errorVariants.close, errorVariants.transition)\n this.expiryError.classList.add(styles.hidden)\n }\n\n addEventListener(event: keyof CardSecuity['events'], listener: Listener<ChangeData>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n disable(isDisabled: boolean) {\n if (isDisabled) {\n this.expiryInput.setAttribute('disabled', 'true')\n this.expiryInput.classList.add(styles.disabledInput)\n this.expiryInputContainer.classList.add(styles.disabled)\n\n this.cvcInput.setAttribute('disabled', 'true')\n this.cvcInput.classList.add(styles.disabledInput)\n this.cvcInputContainer.classList.add(styles.disabled)\n } else {\n this.expiryInput.removeAttribute('disabled')\n this.expiryInput.classList.remove(styles.disabledInput)\n this.expiryInputContainer.classList.remove(styles.disabled)\n\n this.cvcInput.removeAttribute('disabled')\n this.cvcInput.classList.remove(styles.disabledInput)\n this.cvcInputContainer.classList.remove(styles.disabled)\n }\n }\n\n touchSubmit() {\n this.isTouchSubmit = true\n this.render()\n }\n\n value() {\n return {\n expiry: this.expiryInput.value,\n cvc: this.cvcInput.value,\n }\n }\n\n validate({ expiry, cvc }: { expiry: string; cvc: string }) {\n const isExpiryValid = this.validateExpiry(expiry)\n const isCvcValid = this.validateCvc(cvc)\n return isExpiryValid && isCvcValid\n }\n\n updateCardType(cardType: CardType | null) {\n this.cardType = cardType\n this.handleCvcChange(this.cvcInput.value)\n }\n\n render(): HTMLElement {\n const isExpiryTouched = this.isTouchSubmit || this.isExpiryChanged\n const isExpiryLabelError = isExpiryTouched && !this.isDisabled && this.isExpiryRequired\n const isExpiryErrorMessage = isExpiryTouched && !this.isDisabled && !!this.expiryErrorMessage\n this.toggleExpiryLabelError(isExpiryLabelError)\n this.toggleExpiryErrorMessage(isExpiryErrorMessage)\n\n if (!isExpiryLabelError && !isExpiryErrorMessage) {\n this.expiryInputContainer.classList.remove(styles.errorInput)\n this.expiryEndContent.classList.add(styles.hidden)\n } else {\n this.expiryEndContent.classList.remove(styles.hidden)\n }\n\n const isCvcTouched = this.isTouchSubmit || this.isCvcChanged\n const isCvcLabelError = isCvcTouched && !this.isDisabled && this.isCvcRequired\n const isCvcErrorMessage = isCvcTouched && !this.isDisabled && !!this.cvcErrorMessage\n this.toggleCvcLabelError(isCvcLabelError)\n this.toggleCvcErrorMessage(isCvcErrorMessage)\n\n if (!isCvcLabelError && !isCvcErrorMessage) {\n this.cvcInputContainer.classList.remove(styles.errorInput)\n this.cvcEndContent.innerHTML = ''\n this.cvcEndContent.appendChild(this.cardCvc.render())\n } else {\n this.cvcEndContent.innerHTML = ''\n this.cvcEndContent.appendChild(this.warning.render())\n }\n\n if (this.isDisabled) {\n this.expiryInputContainer.classList.add(styles.disabled)\n this.expiryInput.classList.add(styles.disabledInput)\n\n this.cvcInputContainer.classList.add(styles.disabled)\n this.cvcInput.classList.add(styles.disabledInput)\n } else {\n this.expiryInputContainer.classList.remove(styles.disabled)\n this.expiryInput.classList.remove(styles.disabledInput)\n\n this.cvcInputContainer.classList.remove(styles.disabled)\n this.cvcInput.classList.remove(styles.disabledInput)\n }\n\n return this.element\n }\n}\n","import { TranslateState } from '../../../state/translate'\nimport { WarningIcon } from '../../icons/warning.icon'\nimport styles from './error.module.css'\n\nexport class ErrorAlert {\n private readonly element: HTMLElement\n private readonly message = document.createElement('p')\n private readonly icon = new WarningIcon()\n\n constructor(private readonly translate: TranslateState) {\n this.element = document.createElement('div')\n this.element.classList.add(styles.container)\n\n this.message.classList.add(styles.title)\n this.message.textContent = translate.messages().status.error\n this.element.append(this.icon.render(), this.message)\n\n this.translate.subscribe(({ messages }) => {\n this.message.textContent = messages.status.success\n })\n }\n\n addClassName(className: string) {\n this.element.classList.add(className)\n }\n\n removeClassName(className: string) {\n this.element.classList.remove(className)\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","import { Observer } from '@ts/core/shared/state/observer'\nimport { BackButton } from './buttons/back/back.button'\nimport { SubmitButton } from './buttons/submit/submit.button'\nimport styles from './card-form.module.css'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport { NameInput } from './inputs/name/name.input'\nimport { NumberInput } from './inputs/number/number.input'\nimport { CardSecuity } from './inputs/card-security/card-security.component'\nimport { TranslateState } from '../../state/translate'\nimport { ErrorAlert } from '../alerts/error/error.alert'\n\ntype CardInput = {\n number: string\n expiry: string\n cvc: string\n name: string\n cardBrand?: string\n}\n\nexport class CardForm {\n readonly element: HTMLElement\n private readonly error: ErrorAlert\n private readonly submit: SubmitButton\n private readonly back: BackButton\n private readonly number: NumberInput\n private readonly name: NameInput\n private readonly cardSecurity: CardSecuity\n\n private readonly events = {\n submit: new Observer<CardInput>(),\n close: new Observer<void>(),\n }\n\n constructor(translate: TranslateState, className?: string) {\n this.element = document.createElement('form')\n\n this.error = new ErrorAlert(translate)\n this.submit = new SubmitButton(translate)\n this.back = new BackButton()\n this.number = new NumberInput(translate)\n this.name = new NameInput(translate)\n this.cardSecurity = new CardSecuity(translate)\n\n this.error.addClassName(styles.hidden)\n this.element.classList.add(styles.cardForm, className || '')\n this.element.append(\n this.back.render(),\n this.number.render(),\n this.cardSecurity.render(),\n this.name.render(),\n this.error.render(),\n this.submit.render(),\n )\n\n this.back.addEventListener(() => this.events.close.emit())\n this.number.addEventListener('change', ({ cardType }) => this.cardSecurity.updateCardType(cardType || null))\n this.submit.addEventListener((e) => {\n e.preventDefault()\n const { cvc, expiry } = this.cardSecurity.value()\n const { value, cardType } = this.number.value()\n this.events.submit.emit({\n number: value,\n expiry,\n cvc,\n name: this.name.value(),\n cardBrand: cardType,\n })\n })\n }\n\n addEventListener<T extends CardInput | void>(event: keyof CardForm['events'], listener: Listener<T>): Unsubscribe {\n return this.events[event].addListener(listener as Listener<unknown>)\n }\n\n setLoading(isLoading: boolean) {\n this.cardSecurity.disable(isLoading)\n this.name.disable(isLoading)\n this.number.disable(isLoading)\n this.submit.disable(isLoading)\n }\n\n touchSubmit() {\n this.cardSecurity.touchSubmit()\n this.name.touchSubmit()\n this.number.touchSubmit()\n }\n\n validate(): boolean {\n const isNumberValid = this.number.validate(this.number.value().value)\n const isNameValid = this.name.validate(this.name.value())\n const isCardSecurityValid = this.cardSecurity.validate(this.cardSecurity.value())\n return isNumberValid && isNameValid && isCardSecurityValid\n }\n\n showError() {\n this.error.removeClassName(styles.hidden)\n }\n\n hideError() {\n this.error.addClassName(styles.hidden)\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class SuccessIcon {\n private readonly template = `\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 class=${styles.success}\n >\n <path 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 '></path>\n </svg>\n <span class=\"${styles.srOnly}\">Success</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.successContainer)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import { TranslateState } from '../../../state/translate'\nimport { SuccessIcon } from '../../icons/success.icon'\nimport styles from './success.module.css'\n\nexport class SuccessAlert {\n readonly element: HTMLElement\n private readonly message = document.createElement('p')\n private readonly icon = new SuccessIcon()\n\n constructor(private readonly translate: TranslateState) {\n this.element = document.createElement('div')\n this.element.classList.add(styles.container)\n\n this.message.classList.add(styles.title)\n this.message.textContent = translate.messages().status.success\n this.element.append(this.icon.render(), this.message)\n\n this.translate.subscribe(({ messages }) => {\n this.message.textContent = messages.status.success\n })\n }\n\n addClassName(className: string) {\n this.element.classList.add(className)\n }\n\n removeClassName(className: string) {\n this.element.classList.remove(className)\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","import { animate } from 'motion'\nimport type { CheckoutConfig, PaymentResult } from '../checkout.interface'\nimport { Loader } from './loader/loader.component'\nimport styles from './checkout.module.css'\nimport { Buttons } from './buttons/buttons.component'\nimport { btnVariants, variants } from '../checkout.constant'\nimport { CardForm } from './card-form/card.form'\nimport { CardInput } from '@/app/module/able-pay/element/checkout/element/card'\nimport { checkoutReq, PaymentType, GooglePay, CheckoutDto, ApplePay, CheckoutResponse, TransactionConfig } from '@ts/pkg/checkout-api'\nimport { ErrorAlert } from './alerts/error/error.alert'\nimport { SuccessAlert } from './alerts/success/success.alert'\n\n// checkout component\nexport class CheckoutComponent {\n private readonly checkout: HTMLElement\n private readonly container = document.createElement('div')\n private readonly loader = new Loader()\n private readonly error: ErrorAlert\n private readonly success: SuccessAlert\n private readonly buttons: Buttons\n private readonly form: CardForm\n private isLoading = false\n private isFormOpen = false\n\n constructor(private readonly config: CheckoutConfig) {\n this.buttons = new Buttons(config)\n this.form = new CardForm(config.state.translate, styles.hidden)\n this.error = new ErrorAlert(config.state.translate)\n this.success = new SuccessAlert(config.state.translate)\n\n this.error.addClassName(styles.hidden)\n this.success.addClassName(styles.hidden)\n this.container.append(this.loader.render(), this.buttons.render(), this.form.render())\n\n this.checkout = document.createElement('div')\n this.checkout.classList.add(styles.checkout)\n this.checkout.append(this.container, this.error.render(), this.success.render())\n }\n\n // init\n async init(): Promise<void> {\n console.time('PayNext TS')\n\n this.buttons.addEventListener('ready', () => {\n this.loader.setClassName(styles.hidden)\n this.buttons.showButton()\n console.timeEnd('PayNext TS')\n })\n\n this.buttons.addEventListener('open', async () => {\n if (this.isLoading) return\n\n this.hideError()\n await animate(this.buttons.buttons, btnVariants.close, btnVariants.transition)\n this.buttons.buttons.classList.add(styles.hidden)\n\n this.form.element.classList.add(styles.formInitial)\n this.form.element.classList.remove(styles.hidden)\n await animate(this.form.element, variants.open, variants.transition)\n this.isFormOpen = true\n })\n\n this.buttons.addEventListener('error', () => {\n const { onCheckoutFail } = this.config.state.checkout.getState()\n const m = this.config.state.translate.messages()\n onCheckoutFail?.(new Error(m.status.error))\n })\n\n this.buttons.addEventListener('success', (data: unknown) => {\n const { clientToken } = this.config.state.checkout.getState()\n switch ((data as { type: 'apple' | 'google' | 'paypal' }).type) {\n case 'apple':\n return this.handleSuccess({ clientSession: clientToken, applePay: data as ApplePay })\n case 'google':\n return this.handleSuccess({ clientSession: clientToken, googlePay: data as GooglePay })\n case 'paypal':\n return this.handleSuccess({ clientSession: clientToken, paypal: { billing_agreement_token: data as { paypalId: string } } })\n }\n })\n\n this.form.addEventListener('close', async () => {\n if (this.isLoading) return\n\n this.hideError()\n await animate(this.form.element, variants.close, variants.transition)\n this.form.element.classList.add(styles.hidden)\n\n this.buttons.buttons.classList.add(styles.btnsInitial)\n this.buttons.buttons.classList.remove(styles.hidden)\n await animate(this.buttons.buttons, btnVariants.open, btnVariants.transition)\n this.isFormOpen = false\n })\n\n this.form.addEventListener('submit', async (data: CardInput) => {\n if (this.isLoading) return\n\n this.form.touchSubmit()\n\n const isValid = this.form.validate()\n if (!isValid) return\n\n const cardNumber = data.number.replace(/\\D/g, '')\n const checkout = this.config.state.checkout.getState()\n const ev = this.config.service.ev.getEv()\n\n const [evNumber, evCvc] = await Promise.all([ev.encrypt(cardNumber), ev.encrypt(data.cvc)])\n const [expMonth, expYear] = data.expiry.split('/')\n\n await this.handleSuccess({\n clientSession: checkout.clientToken,\n card: {\n firstSixDigits: cardNumber.slice(0, 6),\n lastFourDigits: cardNumber.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?.userAgent,\n },\n },\n })\n })\n\n await this.buttons.init()\n }\n\n // handle error\n private handleError(e: unknown) {\n const checkout = this.config.state.checkout.getState()\n const m = this.config.state.translate.messages()\n\n console.error(e)\n\n this.showError()\n checkout.onCheckoutFail?.(new Error(m.status.error))\n this.setLoading(false)\n }\n\n // handle success\n private async handleSuccess(data: CheckoutDto): Promise<void> {\n if (this.isLoading) return\n\n this.hideError()\n this.setLoading(true)\n\n const checkout = this.config.state.checkout.getState()\n const transaction = this.config.state.transaction.getState()\n const m = this.config.state.translate.messages()\n\n try {\n const res = await checkoutReq(data)\n\n if (res.error) {\n throw new Error(m.status.error)\n }\n\n if (res.three_ds_session_id) {\n await this.config.service.ev.initThreeDs({\n threeDsId: res.three_ds_session_id,\n onSuccess: () => {\n this.setLoading(false)\n this.handleSuccess({ ...data, threeDsSessionId: res.three_ds_session_id })\n },\n onError: () => {\n this.handleError('Three DS Error')\n },\n })\n return\n }\n\n this.showSuccess()\n \n const paymentResult: PaymentResult = this.createPaymentResult(data, res, transaction)\n \n checkout.onCheckoutComplete?.(paymentResult)\n this.setLoading(false)\n } catch (e) {\n this.handleError(e)\n }\n }\n\n // Create payment result\n private createPaymentResult(data: CheckoutDto, response: CheckoutResponse, transaction: TransactionConfig | null): PaymentResult {\n const locale = this.config.state.translate.locale()\n const now = new Date().toISOString()\n\n let paymentMethod: PaymentResult['paymentMethod'] = 'card'\n if (data.applePay) paymentMethod = 'apple_pay'\n else if (data.googlePay) paymentMethod = 'google_pay'\n else if (data.paypal) paymentMethod = 'paypal'\n\n const result: PaymentResult = {\n paymentMethod,\n clientSession: data.clientSession,\n status: response.data,\n metadata: {\n timestamp: now,\n userAgent: navigator?.userAgent,\n locale,\n }\n }\n\n if (transaction?.amount && transaction?.currency) {\n result.amount = {\n value: transaction.amount,\n currency: transaction.currency\n }\n }\n\n if (data.card) {\n result.paymentDetails = {\n card: {\n brand: data.card.cardBrand,\n lastFour: data.card.lastFourDigits,\n expMonth: data.card.expMonth,\n expYear: data.card.expYear,\n funding: data.card.funding,\n country: data.card.country\n }\n }\n\n if (data.card.metadata?.name) {\n result.billingAddress = {\n name: data.card.metadata.name as string\n }\n }\n }\n\n if (data.applePay) {\n result.paymentDetails = {\n applePay: {\n network: data.applePay.card?.brand || 'unknown',\n lastFour: data.applePay.card?.lastFour\n }\n }\n\n if (data.applePay.billingContact) {\n const billing = data.applePay.billingContact\n result.billingAddress = {\n name: billing.givenName && billing.familyName ? `${billing.givenName} ${billing.familyName}` : billing.givenName || billing.familyName,\n line1: billing.addressLines?.[0],\n line2: billing.addressLines?.[1],\n city: billing.locality,\n state: billing.administrativeArea,\n postalCode: billing.postalCode,\n country: billing.countryCode\n }\n\n if (result.paymentDetails?.applePay) {\n result.paymentDetails.applePay.billingContact = {\n name: result.billingAddress.name,\n email: data.applePay.shippingContact?.emailAddress,\n phone: data.applePay.shippingContact?.phoneNumber\n }\n }\n }\n }\n\n if (data.googlePay) {\n result.paymentDetails = {\n googlePay: {\n network: data.googlePay.card?.brand || 'unknown',\n lastFour: data.googlePay.card?.lastFour\n }\n }\n\n if (data.googlePay.billingAddress) {\n const billing = data.googlePay.billingAddress\n result.billingAddress = {\n name: billing.name,\n line1: billing.address1,\n line2: billing.address2,\n city: billing.locality,\n state: billing.administrativeArea,\n postalCode: billing.postalCode,\n country: billing.countryCode\n }\n }\n }\n\n if (data.paypal) {\n result.paymentDetails = {\n paypal: {\n payerId: data.paypal.billing_agreement_token?.paypalId\n }\n }\n }\n\n return result\n }\n\n // show success\n private async showSuccess() {\n this.container.classList.add(styles.hidden)\n this.error.addClassName(styles.hidden)\n this.success.removeClassName(styles.hidden)\n\n await animate(this.success.element, variants.open, variants.transition)\n }\n\n // hide error\n private hideError() {\n this.error.addClassName(styles.hidden)\n this.form.hideError()\n }\n\n // show error\n private showError() {\n if (!this.isFormOpen) {\n this.error.removeClassName(styles.hidden)\n }\n\n this.form.showError()\n }\n\n // set loading\n private setLoading(isLoading: boolean) {\n this.isLoading = isLoading\n this.form.setLoading(isLoading)\n this.loader.setClassName(!isLoading || this.isFormOpen ? styles.hidden : '')\n }\n\n // render\n render(): HTMLElement {\n return this.checkout\n }\n}\n","import { CheckoutComponent } from './ui/checkout.component'\nimport type { CheckoutConfig } from './checkout.interface'\n\n// checkout module\nexport class CheckoutModule {\n private readonly component: CheckoutComponent\n\n constructor(private readonly config: CheckoutConfig) {\n this.component = new CheckoutComponent(config)\n }\n\n // init\n async init(): Promise<void> {\n const { checkout, transaction, translate, styles } = this.config.state\n checkout.subscribe(({ clientToken, locale, translate: messages, styles: customStyles }) => {\n if (locale && translate.locale() !== locale) {\n translate.setLocale(locale)\n }\n\n if (messages && translate.overrides() !== messages) {\n translate.setMessages(messages)\n }\n\n if (customStyles) {\n styles.setState(customStyles)\n }\n\n transaction\n .updateTransaction(clientToken)\n .then((config) => {\n if (!config) return\n return this.config.service.ev.initEv({\n teamId: config.evervault?.team_id,\n appId: config.evervault?.app_id,\n })\n })\n .catch(console.error)\n })\n }\n\n // mount\n async mount(): Promise<HTMLElement> {\n await this.init()\n await this.component.init()\n\n return this.component.render()\n }\n}\n","import { Observer } from './observer'\nimport type { Listener, Unsubscribe } from './types'\n\nexport abstract class State<TState> {\n private readonly initialState: TState\n private state: TState\n private readonly observer = new Observer<TState>()\n\n constructor(state: TState) {\n this.initialState = state\n this.state = state\n }\n\n getState(): TState {\n return this.state\n }\n\n setState(state: TState): void {\n this.state = state\n this.observer.emit(state)\n }\n\n clearState(): void {\n this.state = this.initialState\n this.observer.clear()\n }\n\n subscribe(listener: Listener<TState>): Unsubscribe {\n return this.observer.addListener(listener)\n }\n}\n","import { State } from '../../../shared/state'\nimport type { PayNextConfig } from '../checkout.interface'\n\nconst initialCheckoutState: PayNextConfig = {\n clientToken: '',\n}\n\nexport class CheckoutState extends State<PayNextConfig> {\n constructor(state?: PayNextConfig) {\n super(state || initialCheckoutState)\n }\n}\n","import { State } from '../../../shared/state'\nimport type { StylesConfig } from '../checkout.interface'\n\nconst initialStylesState: StylesConfig = {}\n\nexport class StylesState extends State<StylesConfig> {\n constructor(state?: StylesConfig) {\n super(state || initialStylesState)\n }\n}\n","import { State } from '@ts/core/shared/state'\nimport { configReq, type TransactionConfig } from '@ts/pkg/checkout-api'\n\nexport class TransactionState extends State<TransactionConfig | null> {\n private clientToken = ''\n\n constructor(state?: TransactionConfig) {\n super(state || null)\n }\n\n async updateTransaction(clientToken: string): Promise<TransactionConfig | null> {\n if (this.clientToken === clientToken) return this.getState()\n this.clientToken = clientToken\n const transaction = await configReq(clientToken)\n this.setState(transaction)\n return transaction\n }\n}\n","import type { CheckoutTranslate, DeepPartial, Locale } 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 const getDefaultTranslates = (): CheckoutTranslate => {\n const lang = navigator?.language.split('-')[0]\n return i18n[lang as Locale] || i18n.en\n}\n\nexport const getTranslates = (\n locale?: Locale,\n overrides: DeepPartial<CheckoutTranslate> = {},\n): CheckoutTranslate => {\n if (!locale) return getDefaultTranslates()\n const messages = i18n[locale] || getDefaultTranslates()\n return {\n card: {\n title: overrides?.card?.title || messages.card.title,\n number: {\n label: overrides?.card?.number?.label || messages.card.number.label,\n error: {\n required: overrides?.card?.number?.error?.required || messages.card.number.error.required,\n invalid: overrides?.card?.number?.error?.invalid || messages.card.number.error.invalid,\n incomplete:\n overrides?.card?.number?.error?.incomplete || messages.card.number.error.incomplete,\n unsupported:\n overrides?.card?.number?.error?.unsupported || messages.card.number.error.unsupported,\n },\n },\n expiry: {\n label: overrides?.card?.expiry?.label || messages.card.expiry.label,\n placeholder: overrides?.card?.expiry?.placeholder || messages.card.expiry.placeholder,\n error: {\n required: overrides?.card?.expiry?.error?.required || messages.card.expiry.error.required,\n invalid: overrides?.card?.expiry?.error?.invalid || messages.card.expiry.error.invalid,\n incomplete:\n overrides?.card?.expiry?.error?.incomplete || messages.card.expiry.error.incomplete,\n expired: overrides?.card?.expiry?.error?.expired || messages.card.expiry.error.expired,\n },\n },\n cvc: {\n label: overrides?.card?.cvc?.label || messages.card.cvc.label,\n placeholder: overrides?.card?.cvc?.label || messages.card.cvc.label,\n error: {\n required: overrides?.card?.cvc?.label || messages.card.cvc.label,\n incomplete: overrides?.card?.cvc?.label || messages.card.cvc.label,\n invalid: overrides?.card?.cvc?.label || messages.card.cvc.label,\n },\n },\n name: {\n label: overrides?.card?.name?.label || messages.card.name.label,\n placeholder: overrides?.card?.name?.placeholder || messages.card.name.placeholder,\n error: {\n required: overrides?.card?.name?.error?.required || messages.card.name.error.required,\n invalid: overrides?.card?.name?.error?.invalid || messages.card.name.error.invalid,\n },\n },\n pay: {\n button: overrides?.card?.pay?.button || messages.card.pay.button,\n },\n compact: {\n button: overrides?.card?.compact?.button || messages.card.compact.button,\n },\n },\n status: {\n success: overrides?.status?.success || messages.status.success,\n error: overrides?.status?.error || messages.status.error,\n },\n }\n}\n","import type { 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}\n","import type { 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:\n 'We are unable to authenticate your payment method. Please choose a different payment method and try again.',\n },\n}\n","import type { 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}\n","import type { 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:\n '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 type { 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:\n 'Vi kan ikke godkende din betalingsmetode. Vælg venligst en anden betalingsmetode og prøv igen.',\n },\n}\n","import type { 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 type { 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}\n","import type { 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:\n 'No podemos autenticar su método de pago. Elija otro método de pago e inténtelo de nuevo.',\n },\n}\n","import type { 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:\n 'Me ei suuda teie makseviisi autentida. Palun valige teine makseviis ja proovige uuesti.',\n },\n}\n","import type { 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 type { 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:\n 'Hindi namin ma-authenticate ang iyong paraan ng pagbabayad. Mangyaring pumili ng ibang paraan ng pagbabayad at subukang muli.',\n },\n}\n","import type { 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 type { 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:\n '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 type { 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:\n '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 type { 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:\n 'Kami tidak dapat mengautentikasi metode pembayaran Anda. Silakan pilih metode pembayaran lain dan coba lagi.',\n },\n}\n","import type { 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:\n 'Non siamo in grado di autenticare il suo metodo di pagamento. Scegliere un altro metodo di pagamento e riprovare.',\n },\n}\n","import type { 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 type { 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 type { 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:\n 'Negalime patvirtinti jūsų mokėjimo būdo. Pasirinkite kitą mokėjimo būdą ir bandykite dar kartą.',\n },\n}\n","import type { 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 type { 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:\n 'Kami tidak dapat mengesahkan kaedah pembayaran anda. Sila pilih kaedah pembayaran lain dan cuba lagi.',\n },\n}\n","import type { 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}\n","import type { 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 type { 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:\n 'Vi kan ikke godkjenne betalingsmåten din. Vennligst velg en annen betalingsmetode og prøv på nytt.',\n },\n}\n","import type { 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:\n 'We kunnen je betaalmethode niet verifiëren. Kies een andere betaalmethode en probeer het opnieuw.',\n },\n}\n","import type { 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:\n 'Nie możemy uwierzytelnić metody płatności. Wybierz inną metodę płatności i spróbuj ponownie.',\n },\n}\n","import type { 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 'Não foi possível autenticar o seu método de pagamento. Selecione outro método de pagamento e tente novamente.',\n },\n}\n","import type { 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:\n '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 type { 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 type { 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:\n 'Vašega načina plačila ne moremo preveriti. Izberite drug način plačila in poskusite znova.',\n },\n}\n","import type { 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:\n 'Vi kan inte verifiera din betalningsmetod. Vänligen välj en annan betalningsmetod och försök igen.',\n },\n}\n","import type { 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}\n","import type { 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:\n 'Ödeme yönteminizi doğrulayamıyoruz. Lütfen farklı bir ödeme yöntemi seçin ve tekrar deneyin.',\n },\n}\n","import type { 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:\n '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 type { 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 { State } from '@ts/core/shared/state'\nimport type { CheckoutTranslate, CheckoutTranslateState, DeepPartial, Locale } from './translate.interface'\nimport { getDefaultTranslates, getTranslates} from './i18n/i18n'\n\nexport class TranslateState extends State<CheckoutTranslateState> {\n constructor() {\n super({\n messages: getDefaultTranslates(),\n locale: (navigator?.language.split('-')[0] as Locale) || 'en',\n })\n }\n\n setMessages(overrides: DeepPartial<CheckoutTranslate>): void {\n const locale = this.locale()\n const messages = getTranslates(locale, overrides)\n this.setState({ locale, messages, overrides })\n }\n\n setLocale(locale: Locale): void {\n const overrides = this.overrides()\n const messages = getTranslates(locale, overrides)\n this.setState({ locale, messages, overrides })\n }\n\n overrides(): DeepPartial<CheckoutTranslate> | undefined {\n const { overrides } = this.getState()\n return overrides\n }\n\n messages(): CheckoutTranslate {\n const { messages } = this.getState()\n return messages\n }\n\n locale(): Locale {\n const { locale } = this.getState()\n return locale\n }\n\n dir(): 'rtl' | 'ltr' {\n return this.locale() === 'ar' ? 'rtl' : 'ltr'\n }\n}\n","/*!\n * paypal-js v8.2.0 (2025-01-23T17:26:53.747Z)\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 * http://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 */\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nfunction findScript(url, attributes) {\n var currentScript = document.querySelector(\"script[src=\\\"\".concat(url, \"\\\"]\"));\n if (currentScript === null)\n return null;\n var nextScript = createScriptElement(url, attributes);\n // ignore the data-uid-auto attribute that gets auto-assigned to every script tag\n var currentScriptClone = currentScript.cloneNode();\n delete currentScriptClone.dataset.uidAuto;\n // check if the new script has the same number of data attributes\n if (Object.keys(currentScriptClone.dataset).length !==\n Object.keys(nextScript.dataset).length) {\n return null;\n }\n var isExactMatch = true;\n // check if the data attribute values are the same\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, attributes = _a.attributes, onSuccess = _a.onSuccess, 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, environment = _a.environment, options = __rest(_a, [\"sdkBaseUrl\", \"environment\"]);\n var sdkBaseUrl = customSdkBaseUrl || processSdkBaseUrl(environment);\n var optionsWithStringIndex = options;\n var _b = Object.keys(optionsWithStringIndex)\n .filter(function (key) {\n return (typeof optionsWithStringIndex[key] !== \"undefined\" &&\n optionsWithStringIndex[key] !== null &&\n optionsWithStringIndex[key] !== \"\");\n })\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 }\n else {\n accumulator.queryParams[key] = value;\n }\n return accumulator;\n }, {\n queryParams: {},\n attributes: {},\n }), queryParams = _b.queryParams, attributes = _b.attributes;\n if (queryParams[\"merchant-id\"] &&\n 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)\n queryString += \"&\";\n queryString += key + \"=\" + params[key];\n });\n return queryString;\n}\nfunction processSdkBaseUrl(environment) {\n // Keeping production as default to maintain backward compatibility.\n // In the future this logic needs to be changed to use sandbox domain as default instead of production.\n return environment === \"sandbox\"\n ? \"https://www.sandbox.paypal.com/sdk/js\"\n : \"https://www.paypal.com/sdk/js\";\n}\nfunction createScriptElement(url, attributes) {\n if (attributes === void 0) { attributes = {}; }\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}\n\n/**\n * Load the Paypal JS SDK script asynchronously.\n *\n * @param {Object} options - used to configure query parameters and data attributes for the JS SDK.\n * @param {PromiseConstructor} [PromisePonyfill=window.Promise] - optional Promise Constructor ponyfill.\n * @return {Promise<Object>} paypalObject - reference to the global window PayPal object.\n */\nfunction loadScript(options, PromisePonyfill) {\n if (PromisePonyfill === void 0) { PromisePonyfill = Promise; }\n validateArguments(options, PromisePonyfill);\n // resolve with null when running in Node or Deno\n if (typeof document === \"undefined\")\n return PromisePonyfill.resolve(null);\n var _a = processOptions(options), url = _a.url, 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 // resolve with the existing global paypal namespace when a script with the same params already exists\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}\n/**\n * Load a custom script asynchronously.\n *\n * @param {Object} options - used to set the script url and attributes.\n * @param {PromiseConstructor} [PromisePonyfill=window.Promise] - optional Promise Constructor ponyfill.\n * @return {Promise<void>} returns a promise to indicate if the script was successfully loaded.\n */\nfunction loadCustomScript(options, PromisePonyfill) {\n if (PromisePonyfill === void 0) { PromisePonyfill = Promise; }\n validateArguments(options, PromisePonyfill);\n var url = options.url, 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 // resolve with undefined when running in Node or Deno\n if (typeof document === \"undefined\")\n return resolve();\n insertScriptElement({\n url: url,\n attributes: attributes,\n onSuccess: function () { return resolve(); },\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 &&\n environment !== \"production\" &&\n environment !== \"sandbox\") {\n throw new Error('The `environment` option must be either \"production\" or \"sandbox\".');\n }\n if (typeof PromisePonyfill !== \"undefined\" &&\n typeof PromisePonyfill !== \"function\") {\n throw new Error(\"Expected PromisePonyfill to be a function.\");\n }\n}\n\n// replaced with the package.json version at build time\nvar version = \"8.2.0\";\n\nexport { loadCustomScript, loadScript, version };\n","import type { PayPalButtonStyle } from '@paypal/paypal-js'\n\nexport const stylesPaypal: PayPalButtonStyle = {\n layout: 'vertical',\n tagline: false,\n height: 40,\n borderRadius: 12,\n}\n","import {\n loadScript,\n type PayPalButtonsComponentOptions,\n type PayPalNamespace,\n type PayPalScriptOptions,\n} from '@paypal/paypal-js'\nimport { stylesPaypal } from './paypal.constant'\n\n// paypal service\nexport class PayPalService {\n private paypal: PayPalNamespace | null = null\n\n // init\n async init(config: PayPalScriptOptions) {\n try {\n this.paypal = await loadScript(config)\n } catch (err) {\n console.error('failed to load the PayPal JS SDK script', err)\n }\n }\n\n // render\n async render(parent: HTMLElement, options?: PayPalButtonsComponentOptions) {\n if (this.paypal) {\n await this.paypal\n .Buttons?.({\n fundingSource: 'paypal',\n style: stylesPaypal,\n ...options,\n })\n .render(parent)\n }\n }\n}\n","import { EvService } from '@ts/pkg/evervault'\nimport { CheckoutModule } from './modules/checkout'\nimport { CheckoutState } from './modules/checkout/state/checkout.state'\nimport { StylesState } from './modules/checkout/state/styles.state'\nimport { TransactionState } from './modules/checkout/state/transaction.state'\nimport { TranslateState } from './modules/checkout/state/translate'\nimport { PayPalService } from '@ts/pkg/paypal'\n\n// core module\nexport class Core {\n readonly ev = new EvService()\n readonly paypal = new PayPalService()\n readonly state = {\n translate: new TranslateState(),\n checkout: new CheckoutState(),\n transaction: new TransactionState(),\n styles: new StylesState(),\n }\n readonly checkout = new CheckoutModule({\n state: this.state,\n service: { ev: this.ev, paypal: this.paypal },\n })\n\n clearState() {\n Object.values(this.state).forEach((state) => state.clearState())\n }\n}\n","import type { PayNextConfig } from '@ts/core/modules/checkout/checkout.interface'\nimport { Core } from '../../core'\n\nexport class PayNextCheckout {\n private readonly parent: HTMLElement\n private readonly core = new Core()\n\n constructor(parent: HTMLElement) {\n this.parent = parent\n }\n\n async mount(config: PayNextConfig): Promise<void> {\n const node = await this.core.checkout.mount()\n this.parent.innerHTML = ''\n this.parent.appendChild(node)\n this.core.state.checkout.setState(config)\n }\n\n async unmount(): Promise<void> {\n this.parent.innerHTML = ''\n this.core.clearState()\n }\n}\n"],"names":["t","i","__async","n","r","e","o","l","a","ApplePay$1","ev","__publicField","_0","transaction","locale","supportedCardTypes","onReady","onError","onSuccess","onCancel","evTransaction","_1","paymentData","fail","error","availability","parent","_a","GooglePay$1","Observer","listener","data","ThreeDs","threeDsId","EvService","teamId","appId","_b","config","loadEvervault","ApplePay","GooglePay","event","isDOMKeyframes","keyframes","resolveElements","elementOrSelector","scope","selectorCache","root","elements","resolveSubjects","subject","calculateRepeatDuration","duration","repeat","_repeatDelay","calcNextTime","current","next","prev","labels","mixNumber","from","to","progress","wrap","min","max","v","rangeSize","isEasingArray","ease","getEasingForSegment","easing","addUniqueItem","arr","item","removeItem","index","eraseKeyframes","sequence","startTime","endTime","keyframe","addKeyframes","offset","normalizeTimes","times","compareByTime","b","isMotionValue","value","toFromDifference","fillOffset","remaining","offsetProgress","defaultOffset","isGenerator","type","maxGeneratorDuration","calcGeneratorDuration","generator","timeStep","state","secondsToMilliseconds","seconds","millisecondsToSeconds","milliseconds","createGeneratorEasing","options","scale","createGenerator","__spreadProps","__spreadValues","warning","invariant","check","message","defaultSegmentEasing","MAX_REPEAT","createAnimationsFromSequence","generators","defaultTransition","sequenceTransition","__objRest","defaultDuration","animationDefinitions","sequences","elementCache","timeLabels","prevTime","currentTime","totalDuration","segment","transition","maxDuration","resolveValueSequence","valueKeyframes","valueTransition","valueSequence","elementIndex","numSubjects","valueKeyframesAsList","keyframesAsList","delay","repeatType","repeatDelay","remainingTransition","calculatedDelay","numKeyframes","absoluteDelta","isNumberKeyframesArray","delta","springTransition","springEasing","remainder","originalKeyframes","originalTimes","originalEase","repeatIndex","keyframeIndex","targetTime","subjectSequence","getSubjectSequence","getValueSequence","subjects","subjectIndex","thisSubject","key","getValueTransition","valueSequences","element","valueOffset","valueEasing","at","definition","name","isNumber","visualElementStore","isKeyframesTarget","getValueState","visualElement","resolveVariantFromProps","props","custom","velocity","resolveVariant","stepsOrder","createRenderStep","runNextFrame","stepName","thisFrame","nextFrame","isProcessing","flushNextFrame","toKeepAlive","latestFrameData","triggerCallback","callback","step","keepAlive","immediate","queue","frameData","MotionGlobalConfig","maxElapsed","createRenderBatcher","scheduleNextBatch","allowKeepAlive","useDefaultElapsed","flagRunNextFrame","steps","acc","setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender","processBatch","timestamp","wake","process","noop","any","frame","cancelFrame","now","clearTime","time","newTime","warned","warnOnce","condition","SubscriptionManager","handler","c","numSubscriptions","velocityPerSecond","frameDuration","MAX_VELOCITY_DELTA","isFloat","MotionValue","init","dependent","prevFrameValue","subscription","eventName","unsubscribe","eventManagers","passiveEffect","stopPassiveEffect","endAnimation","startAnimation","resolve","motionValue","setMotionValue","resolveFinalValueInKeyframes","setTarget","transitionEnd","target","isWillChangeMotionValue","addValueToWillChange","willChange","newWillChange","camelToDash","str","optimizedAppearDataAttribute","getOptimisedAppearId","isNotNull","getFinalKeyframe","finalKeyframe","resolvedKeyframes","transformPropOrder","transformProps","underDampedSpring","criticallyDampedSpring","keyframesTransition","getDefaultTransition","valueKey","isTransitionDefined","_c","_d","when","_delay","delayChildren","staggerChildren","staggerDirection","elapsed","checkStringStartsWith","token","isCSSVariableName","startsAsVariableToken","isCSSVariableToken","singleCssVariableRegex","clamp","number","alpha","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","color","colorRegex","test","NUMBER_TOKEN","COLOR_TOKEN","VAR_TOKEN","VAR_FUNCTION_TOKEN","SPLIT_TOKEN","complexRegex","analyseComplexValue","originalValue","values","indexes","types","split","parsedValue","parseComplexValue","createTransformer","source","numSections","output","convertNumbersToZero","getAnimatableNone","parsed","complex","hueToRgb","p","q","hslaToRgba","mixImmediate","mixLinearColor","fromExpo","expo","colorTypes","getColorType","asRGBA","model","mixColor","fromRGBA","toRGBA","blended","invisibleValues","mixVisibility","origin","combineFunctions","pipe","transformers","mixNumber$1","getMixer","mixComplex","mixArray","mixObject","numValues","blendValue","matchOrder","orderedOrigin","pointers","originIndex","originValue","template","originStats","targetStats","mix","frameloopDriver","passTimestamp","generateLinearEasing","resolution","points","numPoints","velocitySampleDuration","calcGeneratorVelocity","resolveValue","prevT","springDefaults","safeMin","findSpring","bounce","mass","envelope","derivative","dampingRatio","undampedFreq","exponentialDecay","calcAngularFreq","d","f","initialGuess","approximateRoot","stiffness","rootIterations","result","durationKeys","physicsKeys","isSpringType","keys","getSpringOptions","springOptions","visualDuration","damping","derived","spring","optionsOrVisualDuration","restSpeed","restDelta","isResolvedFromDuration","initialVelocity","initialDelta","undampedAngularFreq","isGranularScale","resolveSpring","angularFreq","dampedAngularFreq","freqForT","currentVelocity","isBelowVelocityThreshold","isBelowDisplacementThreshold","calculatedDuration","generatorOptions","inertia","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","convertOffsetToTimes","calcBezier","a1","a2","subdivisionPrecision","subdivisionMaxIterations","binarySubdivide","x","lowerBound","upperBound","mX1","mX2","currentX","currentT","cubicBezier","mY1","mY2","getTForX","aX","easeIn","easeOut","easeInOut","mirrorEasing","reverseEasing","backOut","backIn","backInOut","anticipate","circIn","circOut","circInOut","isBezierDefinition","easingLookup","isValidEasing","easingDefinitionToFunction","x1","y1","x2","y2","defaultEasing","keyframeValues","easingFunctions","absoluteTimes","mapTimeToKeyframe","speed","transitionTypeMap","replaceTransitionType","WithPromise","onResolve","onReject","percentToProgress","JSAnimation","keyframes$1","generatorFactory","animationTime","sample","mixKeyframes","mirroredGenerator","resolvedDuration","onUpdate","timeWithoutDelay","isInDelayPhase","frameGenerator","currentIteration","iterationProgress","done","isAnimationFinished","reject","newSpeed","hasChanged","driver","sampleTime","timeline","fillWildcards","radToDeg","rad","rotate","angle","rebaseAngle","matrix2dParsers","rotateZ","scaleX","scaleY","matrix3dParsers","defaultTransformValue","parseValueFromTransform","transform","matrix3dMatch","parsers","match","matrix2dMatch","valueParser","convertTransformToNumber","readTransformValue","instance","isNumOrPxType","transformKeys","nonTranslationalTransformKeys","removeNonTranslationalTransform","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","memo","supportsScrollTimeline","supportsFlags","memoSupports","supportsFlag","memoized","supportsLinearEasing","cubicBezierAsString","supportedWaapiEasing","mapEasingToNativeEasing","segmentEasing","startWaapiAnimation","valueName","pseudoElement","keyframeOptions","applyGeneratorOptions","_e","_f","NativeAnimation","allowFlatten","newStartTime","observe","unsupportedEasingFunctions","isUnsupportedEase","replaceStringEasing","sampleDelta","NativeAnimationExtended","sampleAnimation","isAnimatable","hasKeyframesChanged","canAnimate","originKeyframe","targetKeyframe","isOriginAnimatable","isTargetAnimatable","isObject","isHTMLElement","acceleratedValues","supportsWaapi","supportsBrowserAnimation","transformTemplate","MAX_RESOLVE_DELAY","AsyncMotionValueAnimation","_g","_h","autoplay","optionsWithDefaults","KeyframeResolver$1","forced","sync","isHandoff","resolvedOptions","animation","_onReject","animateMotionValue","shouldSkip","positionalKeys","shouldBlockAnimation","protectedKeys","needsAnimating","shouldBlock","animateTarget","targetAndTransition","transitionOverride","animations","animationTypeState","valueTarget","appearId","convertBoundingBoxToBox","right","bottom","transformBoxPoints","point","transformPoint","topLeft","bottomRight","measureViewportBox","featureProps","featureDefinitions","createAxis","createBox","isBrowser","prefersReducedMotion","hasReducedMotionListener","initPrefersReducedMotion","motionMediaQuery","setReducedMotionPreferences","isAnimationControls","isVariantLabel","variantProps","isControllingVariants","isVariantNode","updateMotionValuesFromProps","nextValue","prevValue","existingValue","latestValue","isNumericalString","isZeroValueString","auto","testValueType","dimensionValueTypes","findDimensionValueType","valueTypes","findValueType","maxDefaults","applyDefaultFilter","defaultValue","functionRegex","filter","functions","int","numberValueTypes","defaultValueTypes","getDefaultValueType","defaultValueType","propEventHandlers","VisualElement","_props","_prevProps","_visualElement","presenceContext","reducedMotionConfig","blockInitialAnimation","visualState","latestValues","renderState","initialMotionValues","remove","feature","valueIsTransform","removeOnChange","removeOnRenderRequest","removeSyncCheck","other","featureDefinition","isEnabled","FeatureConstructor","listenerName","child","closestVariantNode","initial","valueFromInitial","variant","args","splitCSSVariableRegex","parseCSSVariable","token1","token2","fallback","maxDepth","getVariableValue","depth","resolved","trimmed","isNone","invalidTemplates","makeNoneKeyframesAnimatable","noneKeyframeIndexes","animatableTemplate","noneIndex","DOMKeyframesResolver","originType","targetType","measureKeyframe","finalKeyframeIndex","unsetTransformName","unsetTransformValue","DOMVisualElement","vars","style","children","getValueAsType","translateAlias","numTransforms","buildTransform","transformString","transformIsDefault","valueIsDefault","valueAsType","transformName","buildHTMLStyles","transformOrigin","hasTransform","hasTransformOrigin","originX","originY","originZ","renderHTML","styleProp","projection","scaleCorrectors","isForcedMotionValue","layout","layoutId","scrapeMotionValuesFromProps","prevProps","newValues","getComputedStyle","HTMLVisualElement","computedStyle","transformPagePoint","isObjectKey","object","ObjectVisualElement","dashKeys","camelKeys","buildSVGPath","attrs","length","spacing","useDashCase","pathLength","pathSpacing","buildSVGAttrs","_i","isSVGTag","_j","attrX","attrY","attrScale","pathOffset","camelCaseAttributes","tag","renderSVG","_styleProp","scrapeMotionValuesFromProps$1","targetKey","SVGVisualElement","defaultType","isSVGElement","isSVGSVGElement","createDOMVisualElement","node","createObjectVisualElement","animateSingleValue","motionValue$1","isSingleValue","animateSubject","createVisualElement","animateSequence","GroupAnimation","propName","newValue","subscriptions","cancel","methodName","controls","GroupAnimationWithThen","isSequence","createScopedAnimate","scopedAnimate","subjectOrSequence","optionsOrKeyframes","animate","SpinnerIcon","styles","className","Loader","defaultCheckoutConfig","variants","btnVariants","labelVariants","errorVariants","cardTypes","cardTypes_1","clone_1","clone","originalObject","matches_1","matchesRange","cardNumber","maxLengthToCheck","substr","integerRepresentationOfCardNumber","matchesPattern","pattern","matches","addMatchingCardsToResults_1","require$$0","require$$1","addMatchingCardsToResults","cardConfiguration","results","patternLength","clonedCardConfiguration","isValidInputType_1","isValidInputType","findBestMatch_1","hasEnoughResultsToDetermineBestMatch","numberOfResultsWithMaxStrengthProperty","findBestMatch","bestMatch","__assign","this","s","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","month","monthNumber","lastSymbol","year","InputError","CardType","detectCardType","getCardTypes","isValidLuhn","sum","isEven","digit","validateCardNumber","cleanNumber","transactionConfigToGooglePay","is_active","transactionConfigToApplePay","mapCardTypeToAppleCardNetwork","PayPal","paypal","billingToken","localeToAppleLocale","localeToGoogleLocale","CardIcon","CardButton","translate","text","messages","merge","arr1","arr2","equal","i1","i2","initialCheckoutConfig","checkoutReq","url","headers","_l","_k","_n","_m","_p","_o","_r","_q","_u","_t","_s","_w","_v","_z","_y","_x","_B","_A","_D","_C","_F","_E","_H","_G","_J","_I","_K","_L","_M","_N","_P","_O","_R","_Q","_S","_U","_T","_W","_V","_X","_Z","_Y","_$","__","_aa","_ca","_ba","_ea","_da","_fa","_ha","_ga","_ja","_ia","_ka","_ma","_la","_oa","_na","_pa","_qa","_sa","_ra","_ta","_va","_ua","_wa","_ya","_xa","_za","_Ba","_Aa","_Ca","_Ea","_Da","_Ga","_Fa","_Ha","_Ja","_Ia","_Ka","_La","_Na","_Ma","_Oa","_Qa","_Pa","_Ra","_Ta","_Sa","_Va","_Ua","_Ya","_Xa","_Wa","_$a","__a","_Za","_bb","_ab","_db","_cb","paypalAgreementReq","clientToken","configReq","PaymentType","Buttons","appleTransaction","err","googleTransaction","createBillingAgreement","paypalId","promises","BackIcon","BackButton","SubmitButton","isDisabled","WarningIcon","NameInput","m","isInputError","UnknownCardIcon","AmexIcon","DinersClubIcon","DiscoverIcon","JcbIcon","MasterCardIcon","UnionPayIcon","VisaIcon","NumberInput","isLabelError","isErrorMessage","isValid","isTouched","CardCvcIcon","CardSecuity","expiryErrorWrapper","cvcErrorWrapper","isEmpty","isIncomplete","errMessage","date","isExpired","isExpiryValid","isCvcValid","isExpiryTouched","isExpiryLabelError","isExpiryErrorMessage","isCvcTouched","isCvcLabelError","isCvcErrorMessage","ErrorAlert","CardForm","isLoading","isNumberValid","isNameValid","isCardSecurityValid","SuccessIcon","SuccessAlert","CheckoutComponent","onCheckoutFail","checkout","evNumber","evCvc","expMonth","expYear","res","paymentResult","response","paymentMethod","billing","CheckoutModule","customStyles","State","initialCheckoutState","CheckoutState","initialStylesState","StylesState","TransactionState","i18n","getDefaultTranslates","lang","getTranslates","overrides","TranslateState","__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","namespace","existingWindowNamespace","getPayPalWindowNamesp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EAAsC,QAAApC,EAAA,sBAChD,MAAM40B,EAAO,MAAM,KAAK,KAAK,SAAS,MAAM,EAC5C,KAAK,OAAO,UAAY,GACnB,KAAA,OAAO,YAAYA,CAAI,EAC5B,KAAK,KAAK,MAAM,SAAS,SAASxyB,CAAM,CAAA,GAGpC,SAAyB,QAAApC,EAAA,sBAC7B,KAAK,OAAO,UAAY,GACxB,KAAK,KAAK,WAAW,CAAA,GAEzB","x_google_ignoreList":[0,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,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,187,188,189,190,191,192,193,271]}
1
+ {"version":3,"file":"index.umd.js","sources":["../node_modules/@evervault/js/dist/evervault-js.js","../ts-src/pkg/evervault/element/apple-pay.ts","../ts-src/pkg/evervault/element/google-pay.ts","../ts-src/core/shared/state/observer.ts","../ts-src/pkg/evervault/element/three-ds.ts","../ts-src/pkg/evervault/ev.service.ts","../node_modules/motion/dist/es/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/resolve-elements.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/animate/resolve-subjects.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/mix/number.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/wrap.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/utils/is-easing-array.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/array.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/sequence/utils/edit.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/sequence/utils/sort.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/utils/is-motion-value.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/progress.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/offsets/default.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/utils/is-generator.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/time-conversion.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/errors.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/sequence/create.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/store.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/utils/resolve-variants.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/frameloop/order.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/frameloop/render-step.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/global-config.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/frameloop/batcher.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/noop.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/frameloop/frame.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/frameloop/sync-time.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/warn-once.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/subscription-manager.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/velocity-per-second.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/index.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/utils/setters.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/value/use-will-change/is.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/value/use-will-change/add-will-change.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/optimized-appear/data-id.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/render/utils/keys-transform.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/utils/default-transitions.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/utils/is-transition-defined.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/utils/get-value-transition.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/utils/is-css-variable.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/clamp.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/numbers/index.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/sanitize.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/float-regex.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/is-nullish.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/single-color-regex.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/color/utils.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/color/rgba.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/color/hex.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/numbers/units.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/color/hsla.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/color/index.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/color-regex.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/complex/index.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/mix/immediate.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/mix/color.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/mix/visibility.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/pipe.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/mix/complex.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/mix/index.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/drivers/frame.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/utils/linear.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/utils/velocity.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/spring/defaults.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/spring/find.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/spring/index.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/inertia.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/interpolate.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/offsets/time.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/cubic-bezier.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/ease.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/modifiers/mirror.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/modifiers/reverse.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/back.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/anticipate.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/circ.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/easing/utils/map.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/keyframes.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/get-final.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/utils/replace-transition-type.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/utils/WithPromise.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/JSAnimation.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/render/dom/parse-transform.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/render/dom/is-css-var.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/render/dom/style-set.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/memo.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/supports/scroll-timeline.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/supports/flags.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/supports/memo.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/supports/linear-easing.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/easing/supported.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/NativeAnimation.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/NativeAnimationExtended.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/utils/is-animatable.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/utils/can-animate.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/is-object.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/is-html-element.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/supports/waapi.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/interfaces/motion-value.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/render/utils/keys-position.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/projection/geometry/conversion.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/projection/utils/measure.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/motion/features/definitions.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/projection/geometry/models.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/utils/is-browser.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/utils/reduced-motion/state.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/utils/reduced-motion/index.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/utils/is-animation-controls.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/utils/is-variant-label.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/utils/variant-props.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/utils/is-controlling-variants.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/utils/motion-values.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/is-numerical-string.mjs","../node_modules/motion/dist/es/motion-utils/dist/es/is-zero-value-string.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/auto.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/test.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/dimensions.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/find.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/complex/filter.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/int.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/maps/number.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/maps/transform.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/maps/defaults.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/animatable-none.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/VisualElement.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/dom/DOMVisualElement.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/value/types/utils/get-as-type.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/html/utils/build-transform.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/html/utils/build-styles.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/html/utils/render.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/projection/styles/scale-correction.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/html/HTMLVisualElement.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/object/ObjectVisualElement.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/svg/utils/path.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/svg/utils/build-attrs.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/svg/utils/render.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/render/svg/SVGVisualElement.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/is-svg-element.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/utils/is-svg-svg-element.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/utils/create-visual-element.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/animate/single-value.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/animate/subject.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/animate/sequence.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/GroupAnimation.mjs","../node_modules/motion/dist/es/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs","../node_modules/motion/dist/es/framer-motion/dist/es/animation/animate/index.mjs","../ts-src/core/modules/checkout/ui/icons/spinner.icon.ts","../ts-src/core/modules/checkout/ui/loader/loader.component.ts","../ts-src/core/modules/checkout/ui/buttons/apple-pay/apple-pay.button.ts","../ts-src/core/modules/checkout/checkout.constant.ts","../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","../ts-src/core/modules/checkout/utils/card/card.utils.ts","../ts-src/core/modules/checkout/utils/card/card.enums.ts","../ts-src/core/modules/checkout/utils/card/card.validator.ts","../ts-src/core/modules/checkout/utils/checkout.mapper.ts","../ts-src/core/modules/checkout/ui/buttons/google-pay/google-pay.button.ts","../ts-src/core/modules/checkout/ui/buttons/paypal/paypal.button.ts","../ts-src/core/modules/checkout/utils/locale.mapper.ts","../ts-src/core/modules/checkout/ui/icons/card.icon.ts","../ts-src/core/modules/checkout/ui/buttons/card/card.button.ts","../ts-src/core/shared/array.utils.ts","../ts-src/pkg/checkout-api/constants/config.ts","../ts-src/pkg/checkout-api/checkout-api.service.ts","../ts-src/pkg/checkout-api/constants/enums.ts","../ts-src/core/modules/checkout/ui/buttons/buttons.component.ts","../ts-src/core/modules/checkout/ui/icons/back.icon.ts","../ts-src/core/modules/checkout/ui/card-form/buttons/back/back.button.ts","../ts-src/core/modules/checkout/ui/card-form/buttons/submit/submit.button.ts","../ts-src/core/modules/checkout/ui/icons/warning.icon.ts","../ts-src/core/modules/checkout/ui/card-form/inputs/name/name.input.ts","../ts-src/core/modules/checkout/ui/icons/unknown-card.icon.ts","../ts-src/core/modules/checkout/ui/icons/amex.icon.ts","../ts-src/core/modules/checkout/ui/icons/diners-club.icon.ts","../ts-src/core/modules/checkout/ui/icons/discover.icon.ts","../ts-src/core/modules/checkout/ui/icons/jcb.icon.ts","../ts-src/core/modules/checkout/ui/icons/master-card.icon.ts","../ts-src/core/modules/checkout/ui/icons/union-pay.icon.ts","../ts-src/core/modules/checkout/ui/icons/visa.icon.ts","../ts-src/core/modules/checkout/ui/card-form/inputs/number/number.input.ts","../ts-src/core/modules/checkout/ui/icons/card-cvc.icon.ts","../ts-src/core/modules/checkout/ui/card-form/inputs/card-security/card-security.component.ts","../ts-src/core/modules/checkout/ui/alerts/error/error.alert.ts","../ts-src/core/modules/checkout/ui/card-form/card.form.ts","../ts-src/core/modules/checkout/ui/icons/success.icon.ts","../ts-src/core/modules/checkout/ui/alerts/success/success.alert.ts","../ts-src/core/modules/checkout/ui/checkout.component.ts","../ts-src/core/modules/checkout/checkout.module.ts","../ts-src/core/shared/state/state.abstract.ts","../ts-src/core/modules/checkout/state/checkout.state.ts","../ts-src/core/modules/checkout/state/styles.state.ts","../ts-src/core/modules/checkout/state/transaction.state.ts","../ts-src/core/modules/checkout/state/translate/i18n/i18n.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/ar.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/en.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/bg.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/cs.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/da.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/de.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/el.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/es.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/et.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/fi.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/fil.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/fr.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/hr.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/hu.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/id.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/it.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/ja.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/ko.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/lt.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/lv.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/ms.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/ru.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/mt.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/nb.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/nl.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/pl.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/pt.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/ro.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/sk.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/sl.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/sv.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/th.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/tr.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/vi.ts","../ts-src/core/modules/checkout/state/translate/i18n/translates/zh.ts","../ts-src/core/modules/checkout/state/translate/translate.state.ts","../node_modules/@paypal/paypal-js/dist/esm/paypal-js.js","../ts-src/pkg/paypal/paypal.constant.ts","../ts-src/pkg/paypal/paypal.ts","../ts-src/core/core.module.ts","../ts-src/app/js/checkout.module.ts"],"sourcesContent":["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 type { EvervaultInstance } from '@evervault/js'\nimport type { ApplePayConfig } from '../ev.interface'\n\nexport class ApplePay {\n private apple: ReturnType<EvervaultInstance['ui']['applePay']> | null = null\n isAvailable = false\n private onReady: (() => void) | undefined\n\n constructor(private readonly ev: EvervaultInstance) {}\n\n async init({ transaction, locale, supportedCardTypes, onReady, onError, onSuccess, onCancel }: ApplePayConfig) {\n const evTransaction = this.ev.transactions.create(transaction)\n this.apple = this.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 onSuccess?.(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 this.apple.availability()\n this.isAvailable = true // availability === 'available'\n console.log('Apple Pay availability', availability)\n if (!this.isAvailable) {\n console.error('Apple Pay is not available', availability)\n }\n if (onError) this.apple.on('error', onError)\n if (onCancel) this.apple.on('cancel', onCancel)\n this.onReady = onReady\n }\n\n async render(parent: HTMLElement) {\n if (!this.apple || !this.isAvailable) return\n parent.innerHTML = ''\n await this.apple.mount(parent)\n this.onReady?.()\n }\n}\n","import type { EvervaultInstance } from '@evervault/js'\nimport type { GooglePayConfig } from '../ev.interface'\n\nexport class GooglePay {\n private google: ReturnType<EvervaultInstance['ui']['googlePay']> | null = null\n\n constructor(private readonly ev: EvervaultInstance) {}\n\n async init({ transaction, locale, onReady, onError, onSuccess, onCancel }: GooglePayConfig) {\n const evTransaction = this.ev.transactions.create(transaction)\n this.google = this.ev.ui.googlePay(evTransaction, {\n locale,\n size: {\n width: '100%',\n height: '42px',\n },\n borderRadius: 12,\n billingAddress: {\n phoneNumber: true,\n },\n process: async (paymentData, { fail }) => {\n try {\n onSuccess?.(paymentData)\n } catch (error) {\n console.error(error)\n fail({\n message: 'Cannot pay with payment credentials',\n })\n }\n },\n })\n\n if (onCancel) this.google.on('cancel', onCancel)\n if (onReady) this.google.on('ready', onReady)\n if (onError) this.google.on('error', onError)\n }\n\n async render(parent: HTMLElement) {\n if (!this.google) return\n parent.innerHTML = ''\n this.google.mount(parent)\n }\n}\n","import type { Listener, Unsubscribe } from './types'\n\nexport class Observer<TData> {\n private listeners: Listener<TData>[] = []\n\n private removeListener(listener: Listener<TData>): void {\n this.listeners = this.listeners.filter((l) => l !== listener)\n }\n\n addListener(listener: Listener<TData>): Unsubscribe {\n this.listeners.push(listener)\n return () => this.removeListener(listener)\n }\n\n emit(data: TData): void {\n for (const listener of this.listeners) {\n listener(data)\n }\n }\n\n clear(): void {\n this.listeners = []\n }\n}\n","import type { EvervaultInstance } from '@evervault/js'\nimport type { ThreeDsConfig } from '../ev.interface'\n\nexport class ThreeDs {\n private threeDs: ReturnType<EvervaultInstance['ui']['threeDSecure']> | null = null\n\n constructor(private readonly ev: EvervaultInstance) {}\n\n async init({ threeDsId, onReady, onSuccess, onError }: ThreeDsConfig) {\n this.threeDs = this.ev.ui.threeDSecure(threeDsId)\n this.threeDs.on('ready', () => onReady?.())\n this.threeDs.on('success', () => onSuccess?.())\n this.threeDs.on('failure', () => onError?.())\n this.threeDs.on('error', () => onError?.())\n }\n\n async render(parent?: HTMLElement) {\n if (!this.threeDs) return\n this.threeDs.mount(parent)\n }\n}\n","import { loadEvervault, type EvervaultInstance } from '@evervault/js'\nimport type { ApplePayConfig, EvConfig, GooglePayConfig, ThreeDsConfig } from './ev.interface'\nimport { ApplePay } from './element/apple-pay'\nimport { GooglePay } from './element/google-pay'\nimport { Observer } from '@ts/core/shared/state/observer'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport { ThreeDs } from './element/three-ds'\n\n// evervault service\nexport class EvService {\n isReady = false\n private ev: EvervaultInstance | null = null\n private apple: ApplePay | null = null\n private google: GooglePay | null = null\n private threeDs: ThreeDs | null = null\n private readonly events = {\n ready: new Observer<void>(),\n }\n\n // is should load\n private isShouldLoad({ teamId, appId }: EvConfig): boolean {\n return this.ev?.config.appId !== appId || this.ev?.config.teamId !== teamId\n }\n\n // init ev\n async initEv(config: EvConfig) {\n if (!this.isShouldLoad(config)) return\n\n this.isReady = false\n this.ev = await loadEvervault(config.teamId, config.appId)\n this.apple = new ApplePay(this.ev)\n this.google = new GooglePay(this.ev)\n this.events.ready.emit()\n this.isReady = true\n }\n\n // init three ds\n async initThreeDs(config: ThreeDsConfig) {\n if (!this.ev) throw new Error('Evervault should be init before using Three DS Secure')\n this.threeDs = new ThreeDs(this.ev)\n \n await this.threeDs.init(config)\n await this.threeDs.render()\n }\n\n // init apple\n async initApple(config: ApplePayConfig) {\n if (!this.apple) throw new Error('Evervault should be init before using Apple Pay')\n\n await this.apple.init(config)\n }\n\n // init google\n async initGoogle(config: GooglePayConfig) {\n if (!this.google) throw new Error('Evervault should be init before using Google Pay')\n \n await this.google.init(config)\n }\n\n // is apple available\n isAppleAvailable(): boolean {\n return !!this.apple?.isAvailable\n }\n\n // add event listener\n addEventListener(event: keyof EvService['events'], listener: Listener<void>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n // render apple\n async renderApple(parent: HTMLElement) {\n return await this.apple?.render(parent)\n }\n\n // render google\n async renderGoogle(parent: HTMLElement) {\n return await this.google?.render(parent)\n }\n\n // get evervault instance\n getEv(): EvervaultInstance {\n if (!this.ev) {\n throw new Error('Evervault should be init before getting instance')\n }\n\n return this.ev\n }\n}\n","function isDOMKeyframes(keyframes) {\n return typeof keyframes === \"object\" && !Array.isArray(keyframes);\n}\n\nexport { isDOMKeyframes };\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 { isDOMKeyframes } from '../utils/is-dom-keyframes.mjs';\nimport { resolveElements } from '../../../../../motion-dom/dist/es/utils/resolve-elements.mjs';\n\nfunction resolveSubjects(subject, keyframes, scope, selectorCache) {\n if (typeof subject === \"string\" && isDOMKeyframes(keyframes)) {\n return resolveElements(subject, scope, selectorCache);\n }\n else if (subject instanceof NodeList) {\n return Array.from(subject);\n }\n else if (Array.isArray(subject)) {\n return subject;\n }\n else {\n return [subject];\n }\n}\n\nexport { resolveSubjects };\n","function calculateRepeatDuration(duration, repeat, _repeatDelay) {\n return duration * (repeat + 1);\n}\n\nexport { calculateRepeatDuration };\n","/**\n * Given a absolute or relative time definition and current/prev time state of the sequence,\n * calculate an absolute time for the next keyframes.\n */\nfunction calcNextTime(current, next, prev, labels) {\n if (typeof next === \"number\") {\n return next;\n }\n else if (next.startsWith(\"-\") || next.startsWith(\"+\")) {\n return Math.max(0, current + parseFloat(next));\n }\n else if (next === \"<\") {\n return prev;\n }\n else {\n return labels.get(next) ?? current;\n }\n}\n\nexport { calcNextTime };\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","const wrap = (min, max, v) => {\n const rangeSize = max - min;\n return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min;\n};\n\nexport { wrap };\n","const isEasingArray = (ease) => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { isEasingArray };\n","import { wrap } from '../../wrap.mjs';\nimport { isEasingArray } from './is-easing-array.mjs';\n\nfunction getEasingForSegment(easing, i) {\n return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing;\n}\n\nexport { getEasingForSegment };\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","import { mixNumber } from '../../../../../../motion-dom/dist/es/utils/mix/number.mjs';\nimport { getEasingForSegment } from '../../../../../../motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs';\nimport { removeItem } from '../../../../../../motion-utils/dist/es/array.mjs';\n\nfunction eraseKeyframes(sequence, startTime, endTime) {\n for (let i = 0; i < sequence.length; i++) {\n const keyframe = sequence[i];\n if (keyframe.at > startTime && keyframe.at < endTime) {\n removeItem(sequence, keyframe);\n // If we remove this item we have to push the pointer back one\n i--;\n }\n }\n}\nfunction addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) {\n /**\n * Erase every existing value between currentTime and targetTime,\n * this will essentially splice this timeline into any currently\n * defined ones.\n */\n eraseKeyframes(sequence, startTime, endTime);\n for (let i = 0; i < keyframes.length; i++) {\n sequence.push({\n value: keyframes[i],\n at: mixNumber(startTime, endTime, offset[i]),\n easing: getEasingForSegment(easing, i),\n });\n }\n}\n\nexport { addKeyframes, eraseKeyframes };\n","/**\n * Take an array of times that represent repeated keyframes. For instance\n * if we have original times of [0, 0.5, 1] then our repeated times will\n * be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back\n * down to a 0-1 scale.\n */\nfunction normalizeTimes(times, repeat) {\n for (let i = 0; i < times.length; i++) {\n times[i] = times[i] / (repeat + 1);\n }\n}\n\nexport { normalizeTimes };\n","function compareByTime(a, b) {\n if (a.at === b.at) {\n if (a.value === null)\n return 1;\n if (b.value === null)\n return -1;\n return 0;\n }\n else {\n return a.at - b.at;\n }\n}\n\nexport { compareByTime };\n","const isMotionValue = (value) => Boolean(value && value.getVelocity);\n\nexport { isMotionValue };\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 { mixNumber } from '../../../utils/mix/number.mjs';\nimport { progress } from '../../../../../../motion-utils/dist/es/progress.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 isGenerator(type) {\n return typeof type === \"function\" && \"applyToOptions\" in type;\n}\n\nexport { isGenerator };\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","/**\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","import { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';\nimport { millisecondsToSeconds } from '../../../../../../motion-utils/dist/es/time-conversion.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","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","import { resolveSubjects } from '../animate/resolve-subjects.mjs';\nimport { calculateRepeatDuration } from './utils/calc-repeat-duration.mjs';\nimport { calcNextTime } from './utils/calc-time.mjs';\nimport { addKeyframes } from './utils/edit.mjs';\nimport { normalizeTimes } from './utils/normalize-times.mjs';\nimport { compareByTime } from './utils/sort.mjs';\nimport { isMotionValue } from '../../../../../motion-dom/dist/es/value/utils/is-motion-value.mjs';\nimport { defaultOffset } from '../../../../../motion-dom/dist/es/animation/keyframes/offsets/default.mjs';\nimport { isGenerator } from '../../../../../motion-dom/dist/es/animation/generators/utils/is-generator.mjs';\nimport { createGeneratorEasing } from '../../../../../motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs';\nimport { fillOffset } from '../../../../../motion-dom/dist/es/animation/keyframes/offsets/fill.mjs';\nimport { invariant } from '../../../../../motion-utils/dist/es/errors.mjs';\nimport { getEasingForSegment } from '../../../../../motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs';\nimport { progress } from '../../../../../motion-utils/dist/es/progress.mjs';\nimport { secondsToMilliseconds } from '../../../../../motion-utils/dist/es/time-conversion.mjs';\n\nconst defaultSegmentEasing = \"easeInOut\";\nconst MAX_REPEAT = 20;\nfunction createAnimationsFromSequence(sequence, { defaultTransition = {}, ...sequenceTransition } = {}, scope, generators) {\n const defaultDuration = defaultTransition.duration || 0.3;\n const animationDefinitions = new Map();\n const sequences = new Map();\n const elementCache = {};\n const timeLabels = new Map();\n let prevTime = 0;\n let currentTime = 0;\n let totalDuration = 0;\n /**\n * Build the timeline by mapping over the sequence array and converting\n * the definitions into keyframes and offsets with absolute time values.\n * These will later get converted into relative offsets in a second pass.\n */\n for (let i = 0; i < sequence.length; i++) {\n const segment = sequence[i];\n /**\n * If this is a timeline label, mark it and skip the rest of this iteration.\n */\n if (typeof segment === \"string\") {\n timeLabels.set(segment, currentTime);\n continue;\n }\n else if (!Array.isArray(segment)) {\n timeLabels.set(segment.name, calcNextTime(currentTime, segment.at, prevTime, timeLabels));\n continue;\n }\n let [subject, keyframes, transition = {}] = segment;\n /**\n * If a relative or absolute time value has been specified we need to resolve\n * it in relation to the currentTime.\n */\n if (transition.at !== undefined) {\n currentTime = calcNextTime(currentTime, transition.at, prevTime, timeLabels);\n }\n /**\n * Keep track of the maximum duration in this definition. This will be\n * applied to currentTime once the definition has been parsed.\n */\n let maxDuration = 0;\n const resolveValueSequence = (valueKeyframes, valueTransition, valueSequence, elementIndex = 0, numSubjects = 0) => {\n const valueKeyframesAsList = keyframesAsList(valueKeyframes);\n const { delay = 0, times = defaultOffset(valueKeyframesAsList), type = \"keyframes\", repeat, repeatType, repeatDelay = 0, ...remainingTransition } = valueTransition;\n let { ease = defaultTransition.ease || \"easeOut\", duration } = valueTransition;\n /**\n * Resolve stagger() if defined.\n */\n const calculatedDelay = typeof delay === \"function\"\n ? delay(elementIndex, numSubjects)\n : delay;\n /**\n * If this animation should and can use a spring, generate a spring easing function.\n */\n const numKeyframes = valueKeyframesAsList.length;\n const createGenerator = isGenerator(type)\n ? type\n : generators?.[type];\n if (numKeyframes <= 2 && createGenerator) {\n /**\n * As we're creating an easing function from a spring,\n * ideally we want to generate it using the real distance\n * between the two keyframes. However this isn't always\n * possible - in these situations we use 0-100.\n */\n let absoluteDelta = 100;\n if (numKeyframes === 2 &&\n isNumberKeyframesArray(valueKeyframesAsList)) {\n const delta = valueKeyframesAsList[1] - valueKeyframesAsList[0];\n absoluteDelta = Math.abs(delta);\n }\n const springTransition = { ...remainingTransition };\n if (duration !== undefined) {\n springTransition.duration = secondsToMilliseconds(duration);\n }\n const springEasing = createGeneratorEasing(springTransition, absoluteDelta, createGenerator);\n ease = springEasing.ease;\n duration = springEasing.duration;\n }\n duration ?? (duration = defaultDuration);\n const startTime = currentTime + calculatedDelay;\n /**\n * If there's only one time offset of 0, fill in a second with length 1\n */\n if (times.length === 1 && times[0] === 0) {\n times[1] = 1;\n }\n /**\n * Fill out if offset if fewer offsets than keyframes\n */\n const remainder = times.length - valueKeyframesAsList.length;\n remainder > 0 && fillOffset(times, remainder);\n /**\n * If only one value has been set, ie [1], push a null to the start of\n * the keyframe array. This will let us mark a keyframe at this point\n * that will later be hydrated with the previous value.\n */\n valueKeyframesAsList.length === 1 &&\n valueKeyframesAsList.unshift(null);\n /**\n * Handle repeat options\n */\n if (repeat) {\n invariant(repeat < MAX_REPEAT, \"Repeat count too high, must be less than 20\");\n duration = calculateRepeatDuration(duration, repeat);\n const originalKeyframes = [...valueKeyframesAsList];\n const originalTimes = [...times];\n ease = Array.isArray(ease) ? [...ease] : [ease];\n const originalEase = [...ease];\n for (let repeatIndex = 0; repeatIndex < repeat; repeatIndex++) {\n valueKeyframesAsList.push(...originalKeyframes);\n for (let keyframeIndex = 0; keyframeIndex < originalKeyframes.length; keyframeIndex++) {\n times.push(originalTimes[keyframeIndex] + (repeatIndex + 1));\n ease.push(keyframeIndex === 0\n ? \"linear\"\n : getEasingForSegment(originalEase, keyframeIndex - 1));\n }\n }\n normalizeTimes(times, repeat);\n }\n const targetTime = startTime + duration;\n /**\n * Add keyframes, mapping offsets to absolute time.\n */\n addKeyframes(valueSequence, valueKeyframesAsList, ease, times, startTime, targetTime);\n maxDuration = Math.max(calculatedDelay + duration, maxDuration);\n totalDuration = Math.max(targetTime, totalDuration);\n };\n if (isMotionValue(subject)) {\n const subjectSequence = getSubjectSequence(subject, sequences);\n resolveValueSequence(keyframes, transition, getValueSequence(\"default\", subjectSequence));\n }\n else {\n const subjects = resolveSubjects(subject, keyframes, scope, elementCache);\n const numSubjects = subjects.length;\n /**\n * For every element in this segment, process the defined values.\n */\n for (let subjectIndex = 0; subjectIndex < numSubjects; subjectIndex++) {\n /**\n * Cast necessary, but we know these are of this type\n */\n keyframes = keyframes;\n transition = transition;\n const thisSubject = subjects[subjectIndex];\n const subjectSequence = getSubjectSequence(thisSubject, sequences);\n for (const key in keyframes) {\n resolveValueSequence(keyframes[key], getValueTransition(transition, key), getValueSequence(key, subjectSequence), subjectIndex, numSubjects);\n }\n }\n }\n prevTime = currentTime;\n currentTime += maxDuration;\n }\n /**\n * For every element and value combination create a new animation.\n */\n sequences.forEach((valueSequences, element) => {\n for (const key in valueSequences) {\n const valueSequence = valueSequences[key];\n /**\n * Arrange all the keyframes in ascending time order.\n */\n valueSequence.sort(compareByTime);\n const keyframes = [];\n const valueOffset = [];\n const valueEasing = [];\n /**\n * For each keyframe, translate absolute times into\n * relative offsets based on the total duration of the timeline.\n */\n for (let i = 0; i < valueSequence.length; i++) {\n const { at, value, easing } = valueSequence[i];\n keyframes.push(value);\n valueOffset.push(progress(0, totalDuration, at));\n valueEasing.push(easing || \"easeOut\");\n }\n /**\n * If the first keyframe doesn't land on offset: 0\n * provide one by duplicating the initial keyframe. This ensures\n * it snaps to the first keyframe when the animation starts.\n */\n if (valueOffset[0] !== 0) {\n valueOffset.unshift(0);\n keyframes.unshift(keyframes[0]);\n valueEasing.unshift(defaultSegmentEasing);\n }\n /**\n * If the last keyframe doesn't land on offset: 1\n * provide one with a null wildcard value. This will ensure it\n * stays static until the end of the animation.\n */\n if (valueOffset[valueOffset.length - 1] !== 1) {\n valueOffset.push(1);\n keyframes.push(null);\n }\n if (!animationDefinitions.has(element)) {\n animationDefinitions.set(element, {\n keyframes: {},\n transition: {},\n });\n }\n const definition = animationDefinitions.get(element);\n definition.keyframes[key] = keyframes;\n definition.transition[key] = {\n ...defaultTransition,\n duration: totalDuration,\n ease: valueEasing,\n times: valueOffset,\n ...sequenceTransition,\n };\n }\n });\n return animationDefinitions;\n}\nfunction getSubjectSequence(subject, sequences) {\n !sequences.has(subject) && sequences.set(subject, {});\n return sequences.get(subject);\n}\nfunction getValueSequence(name, sequences) {\n if (!sequences[name])\n sequences[name] = [];\n return sequences[name];\n}\nfunction keyframesAsList(keyframes) {\n return Array.isArray(keyframes) ? keyframes : [keyframes];\n}\nfunction getValueTransition(transition, key) {\n return transition && transition[key]\n ? {\n ...transition,\n ...transition[key],\n }\n : { ...transition };\n}\nconst isNumber = (keyframe) => typeof keyframe === \"number\";\nconst isNumberKeyframesArray = (keyframes) => keyframes.every(isNumber);\n\nexport { createAnimationsFromSequence, getValueTransition };\n","const visualElementStore = new WeakMap();\n\nexport { visualElementStore };\n","const isKeyframesTarget = (v) => {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\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 { 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 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","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","const MotionGlobalConfig = {};\n\nexport { MotionGlobalConfig };\n","import { stepsOrder } from './order.mjs';\nimport { createRenderStep } from './render-step.mjs';\nimport { MotionGlobalConfig } from '../../../../motion-utils/dist/es/global-config.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","/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n","import { createRenderBatcher } from './batcher.mjs';\nimport { noop } from '../../../../motion-utils/dist/es/noop.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 { frameData } from './frame.mjs';\nimport { MotionGlobalConfig } from '../../../../motion-utils/dist/es/global-config.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 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 { 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 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","import { time } from '../frameloop/sync-time.mjs';\nimport { frame } from '../frameloop/frame.mjs';\nimport { warnOnce } from '../../../../motion-utils/dist/es/warn-once.mjs';\nimport { SubscriptionManager } from '../../../../motion-utils/dist/es/subscription-manager.mjs';\nimport { velocityPerSecond } from '../../../../motion-utils/dist/es/velocity-per-second.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","import { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { motionValue } from '../../../../../motion-dom/dist/es/value/index.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/dist/es/value/utils/is-motion-value.mjs';\n\nfunction isWillChangeMotionValue(value) {\n return Boolean(isMotionValue(value) && value.add);\n}\n\nexport { isWillChangeMotionValue };\n","import { isWillChangeMotionValue } from './is.mjs';\nimport { MotionGlobalConfig } from '../../../../../motion-utils/dist/es/global-config.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","/**\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","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","/**\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 { transformProps } from '../../../../../motion-dom/dist/es/render/utils/keys-transform.mjs';\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","function getValueTransition(transition, key) {\n return (transition?.[key] ??\n transition?.[\"default\"] ??\n transition);\n}\n\nexport { getValueTransition };\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","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","import { clamp } from '../../../../../../motion-utils/dist/es/clamp.mjs';\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 { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\nimport { clamp } from '../../../../../../motion-utils/dist/es/clamp.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","import { 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';\nimport { warning } from '../../../../../motion-utils/dist/es/errors.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","/**\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","import { 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';\nimport { pipe } from '../../../../../motion-utils/dist/es/pipe.mjs';\nimport { warning } from '../../../../../motion-utils/dist/es/errors.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","import { velocityPerSecond } from '../../../../../../motion-utils/dist/es/velocity-per-second.mjs';\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 { springDefaults } from './defaults.mjs';\nimport { warning } from '../../../../../../motion-utils/dist/es/errors.mjs';\nimport { secondsToMilliseconds, millisecondsToSeconds } from '../../../../../../motion-utils/dist/es/time-conversion.mjs';\nimport { clamp } from '../../../../../../motion-utils/dist/es/clamp.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 { 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';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../../../../../motion-utils/dist/es/time-conversion.mjs';\nimport { clamp } from '../../../../../../motion-utils/dist/es/clamp.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 { mix } from './mix/index.mjs';\nimport { invariant } from '../../../../motion-utils/dist/es/errors.mjs';\nimport { clamp } from '../../../../motion-utils/dist/es/clamp.mjs';\nimport { MotionGlobalConfig } from '../../../../motion-utils/dist/es/global-config.mjs';\nimport { noop } from '../../../../motion-utils/dist/es/noop.mjs';\nimport { pipe } from '../../../../motion-utils/dist/es/pipe.mjs';\nimport { progress } from '../../../../motion-utils/dist/es/progress.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","function convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\n\nexport { convertOffsetToTimes };\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","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","// 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","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","import { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\nimport { easeInOut } from '../../../../../motion-utils/dist/es/easing/ease.mjs';\nimport { isEasingArray } from '../../../../../motion-utils/dist/es/easing/utils/is-easing-array.mjs';\nimport { easingDefinitionToFunction } from '../../../../../motion-utils/dist/es/easing/utils/map.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 { 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';\nimport { invariant } from '../../../../motion-utils/dist/es/errors.mjs';\nimport { pipe } from '../../../../motion-utils/dist/es/pipe.mjs';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../../../motion-utils/dist/es/time-conversion.mjs';\nimport { clamp } from '../../../../motion-utils/dist/es/clamp.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 = () => {\n const { motionValue } = this.options;\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now());\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","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","/*#__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","import { memo } from '../../../../../motion-utils/dist/es/memo.mjs';\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 { supportsFlags } from './flags.mjs';\nimport { memo } from '../../../../../motion-utils/dist/es/memo.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 { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { generateLinearEasing } from '../utils/linear.mjs';\nimport { cubicBezierAsString } from './cubic-bezier.mjs';\nimport { supportedWaapiEasing } from './supported.mjs';\nimport { isBezierDefinition } from '../../../../../../motion-utils/dist/es/easing/utils/is-bezier-definition.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","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 { 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';\nimport { invariant } from '../../../../motion-utils/dist/es/errors.mjs';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../../../motion-utils/dist/es/time-conversion.mjs';\nimport { noop } from '../../../../motion-utils/dist/es/noop.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 } from '../../../../../../motion-utils/dist/es/easing/anticipate.mjs';\nimport { backInOut } from '../../../../../../motion-utils/dist/es/easing/back.mjs';\nimport { circInOut } from '../../../../../../motion-utils/dist/es/easing/circ.mjs';\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 { 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';\nimport { secondsToMilliseconds } from '../../../../motion-utils/dist/es/time-conversion.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 { isGenerator } from '../generators/utils/is-generator.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\nimport { warning } from '../../../../../motion-utils/dist/es/errors.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","function isObject(value) {\n return typeof value === \"object\" && value !== null;\n}\n\nexport { isObject };\n","import { isObject } from '../../../../motion-utils/dist/es/is-object.mjs';\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 { isHTMLElement } from '../../../utils/is-html-element.mjs';\nimport { memo } from '../../../../../../motion-utils/dist/es/memo.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 { 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';\nimport { MotionGlobalConfig } from '../../../../motion-utils/dist/es/global-config.mjs';\nimport { noop } from '../../../../motion-utils/dist/es/noop.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 { getFinalKeyframe } from '../animators/waapi/utils/get-final-keyframe.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { isTransitionDefined } from '../utils/is-transition-defined.mjs';\nimport { getValueTransition } from '../../../../../motion-dom/dist/es/animation/utils/get-value-transition.mjs';\nimport { secondsToMilliseconds } from '../../../../../motion-utils/dist/es/time-conversion.mjs';\nimport { MotionGlobalConfig } from '../../../../../motion-utils/dist/es/global-config.mjs';\nimport { frame } from '../../../../../motion-dom/dist/es/frameloop/frame.mjs';\nimport { JSAnimation } from '../../../../../motion-dom/dist/es/animation/JSAnimation.mjs';\nimport { AsyncMotionValueAnimation } from '../../../../../motion-dom/dist/es/animation/AsyncMotionValueAnimation.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 { 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","import { 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';\nimport { getValueTransition } from '../../../../../motion-dom/dist/es/animation/utils/get-value-transition.mjs';\nimport { frame } from '../../../../../motion-dom/dist/es/frameloop/frame.mjs';\nimport { positionalKeys } from '../../../../../motion-dom/dist/es/render/utils/keys-position.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","/**\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 { 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","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","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","const isBrowser = typeof window !== \"undefined\";\n\nexport { isBrowser };\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","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 { isMotionValue } from '../../../../../motion-dom/dist/es/value/utils/is-motion-value.mjs';\nimport { motionValue } from '../../../../../motion-dom/dist/es/value/index.mjs';\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","/**\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","/**\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","/**\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 { 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","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 { 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';\nimport { KeyframeResolver } from '../../../../motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs';\nimport { time } from '../../../../motion-dom/dist/es/frameloop/sync-time.mjs';\nimport { frame, cancelFrame } from '../../../../motion-dom/dist/es/frameloop/frame.mjs';\nimport { isMotionValue } from '../../../../motion-dom/dist/es/value/utils/is-motion-value.mjs';\nimport { warnOnce } from '../../../../motion-utils/dist/es/warn-once.mjs';\nimport { transformProps } from '../../../../motion-dom/dist/es/render/utils/keys-transform.mjs';\nimport { motionValue } from '../../../../motion-dom/dist/es/value/index.mjs';\nimport { isNumericalString } from '../../../../motion-utils/dist/es/is-numerical-string.mjs';\nimport { isZeroValueString } from '../../../../motion-utils/dist/es/is-zero-value-string.mjs';\nimport { findValueType } from '../../../../motion-dom/dist/es/value/types/utils/find.mjs';\nimport { complex } from '../../../../motion-dom/dist/es/value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../../../../motion-dom/dist/es/value/types/utils/animatable-none.mjs';\nimport { SubscriptionManager } from '../../../../motion-utils/dist/es/subscription-manager.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 { isCSSVariableToken } from './is-css-variable.mjs';\nimport { invariant } from '../../../../../motion-utils/dist/es/errors.mjs';\nimport { isNumericalString } from '../../../../../motion-utils/dist/es/is-numerical-string.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","import { isZeroValueString } from '../../../../../../motion-utils/dist/es/is-zero-value-string.mjs';\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 { 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","import { VisualElement } from '../VisualElement.mjs';\nimport { DOMKeyframesResolver } from '../../../../../motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs';\nimport { isMotionValue } from '../../../../../motion-dom/dist/es/value/utils/is-motion-value.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","/**\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 { transformPropOrder } from '../../../../../../motion-dom/dist/es/render/utils/keys-transform.mjs';\nimport { getValueAsType } from '../../../../../../motion-dom/dist/es/value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../../../../motion-dom/dist/es/value/types/maps/number.mjs';\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 { buildTransform } from './build-transform.mjs';\nimport { transformProps } from '../../../../../../motion-dom/dist/es/render/utils/keys-transform.mjs';\nimport { isCSSVariableName } from '../../../../../../motion-dom/dist/es/animation/utils/is-css-variable.mjs';\nimport { getValueAsType } from '../../../../../../motion-dom/dist/es/value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../../../../motion-dom/dist/es/value/types/maps/number.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","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 { isCSSVariableName } from '../../../../../motion-dom/dist/es/animation/utils/is-css-variable.mjs';\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 { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nimport { transformProps } from '../../../../../motion-dom/dist/es/render/utils/keys-transform.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 { isForcedMotionValue } from '../../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../../../../../motion-dom/dist/es/value/utils/is-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 { 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';\nimport { transformProps } from '../../../../../motion-dom/dist/es/render/utils/keys-transform.mjs';\nimport { defaultTransformValue, readTransformValue } from '../../../../../motion-dom/dist/es/render/dom/parse-transform.mjs';\nimport { isCSSVariableName } from '../../../../../motion-dom/dist/es/animation/utils/is-css-variable.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","import { createBox } from '../../projection/geometry/models.mjs';\nimport { VisualElement } from '../VisualElement.mjs';\n\nfunction isObjectKey(key, object) {\n return key in object;\n}\nclass ObjectVisualElement extends VisualElement {\n constructor() {\n super(...arguments);\n this.type = \"object\";\n }\n readValueFromInstance(instance, key) {\n if (isObjectKey(key, instance)) {\n const value = instance[key];\n if (typeof value === \"string\" || typeof value === \"number\") {\n return value;\n }\n }\n return undefined;\n }\n getBaseTargetFromProps() {\n return undefined;\n }\n removeValueFromRenderState(key, renderState) {\n delete renderState.output[key];\n }\n measureInstanceViewportBox() {\n return createBox();\n }\n build(renderState, latestValues) {\n Object.assign(renderState.output, latestValues);\n }\n renderInstance(instance, { output }) {\n Object.assign(instance, output);\n }\n sortInstanceNodePosition() {\n return 0;\n }\n}\n\nexport { ObjectVisualElement };\n","import { px } from '../../../../../../motion-dom/dist/es/value/types/numbers/units.mjs';\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","/**\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","const isSVGTag = (tag) => typeof tag === \"string\" && tag.toLowerCase() === \"svg\";\n\nexport { isSVGTag };\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 { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\nimport { isMotionValue } from '../../../../../../motion-dom/dist/es/value/utils/is-motion-value.mjs';\nimport { transformPropOrder } from '../../../../../../motion-dom/dist/es/render/utils/keys-transform.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 { 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';\nimport { transformProps } from '../../../../../motion-dom/dist/es/render/utils/keys-transform.mjs';\nimport { getDefaultValueType } from '../../../../../motion-dom/dist/es/value/types/maps/defaults.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 { isObject } from '../../../../motion-utils/dist/es/is-object.mjs';\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","import { HTMLVisualElement } from '../../render/html/HTMLVisualElement.mjs';\nimport { ObjectVisualElement } from '../../render/object/ObjectVisualElement.mjs';\nimport { visualElementStore } from '../../render/store.mjs';\nimport { SVGVisualElement } from '../../render/svg/SVGVisualElement.mjs';\nimport { isSVGElement } from '../../../../../motion-dom/dist/es/utils/is-svg-element.mjs';\nimport { isSVGSVGElement } from '../../../../../motion-dom/dist/es/utils/is-svg-svg-element.mjs';\n\nfunction createDOMVisualElement(element) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n transform: {},\n transformOrigin: {},\n style: {},\n vars: {},\n attrs: {},\n },\n latestValues: {},\n },\n };\n const node = isSVGElement(element) && !isSVGSVGElement(element)\n ? new SVGVisualElement(options)\n : new HTMLVisualElement(options);\n node.mount(element);\n visualElementStore.set(element, node);\n}\nfunction createObjectVisualElement(subject) {\n const options = {\n presenceContext: null,\n props: {},\n visualState: {\n renderState: {\n output: {},\n },\n latestValues: {},\n },\n };\n const node = new ObjectVisualElement(options);\n node.mount(subject);\n visualElementStore.set(subject, node);\n}\n\nexport { createDOMVisualElement, createObjectVisualElement };\n","import { animateMotionValue } from '../interfaces/motion-value.mjs';\nimport { isMotionValue } from '../../../../../motion-dom/dist/es/value/utils/is-motion-value.mjs';\nimport { motionValue } from '../../../../../motion-dom/dist/es/value/index.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","import { visualElementStore } from '../../render/store.mjs';\nimport { animateTarget } from '../interfaces/visual-element-target.mjs';\nimport { createDOMVisualElement, createObjectVisualElement } from '../utils/create-visual-element.mjs';\nimport { isDOMKeyframes } from '../utils/is-dom-keyframes.mjs';\nimport { resolveSubjects } from './resolve-subjects.mjs';\nimport { animateSingleValue } from './single-value.mjs';\nimport { invariant } from '../../../../../motion-utils/dist/es/errors.mjs';\nimport { isMotionValue } from '../../../../../motion-dom/dist/es/value/utils/is-motion-value.mjs';\n\nfunction isSingleValue(subject, keyframes) {\n return (isMotionValue(subject) ||\n typeof subject === \"number\" ||\n (typeof subject === \"string\" && !isDOMKeyframes(keyframes)));\n}\n/**\n * Implementation\n */\nfunction animateSubject(subject, keyframes, options, scope) {\n const animations = [];\n if (isSingleValue(subject, keyframes)) {\n animations.push(animateSingleValue(subject, isDOMKeyframes(keyframes)\n ? keyframes.default || keyframes\n : keyframes, options ? options.default || options : options));\n }\n else {\n const subjects = resolveSubjects(subject, keyframes, scope);\n const numSubjects = subjects.length;\n invariant(Boolean(numSubjects), \"No valid elements provided.\");\n for (let i = 0; i < numSubjects; i++) {\n const thisSubject = subjects[i];\n const createVisualElement = thisSubject instanceof Element\n ? createDOMVisualElement\n : createObjectVisualElement;\n if (!visualElementStore.has(thisSubject)) {\n createVisualElement(thisSubject);\n }\n const visualElement = visualElementStore.get(thisSubject);\n const transition = { ...options };\n /**\n * Resolve stagger function if provided.\n */\n if (\"delay\" in transition &&\n typeof transition.delay === \"function\") {\n transition.delay = transition.delay(i, numSubjects);\n }\n animations.push(...animateTarget(visualElement, { ...keyframes, transition }, {}));\n }\n }\n return animations;\n}\n\nexport { animateSubject };\n","import { createAnimationsFromSequence } from '../sequence/create.mjs';\nimport { animateSubject } from './subject.mjs';\nimport { spring } from '../../../../../motion-dom/dist/es/animation/generators/spring/index.mjs';\n\nfunction animateSequence(sequence, options, scope) {\n const animations = [];\n const animationDefinitions = createAnimationsFromSequence(sequence, options, scope, { spring });\n animationDefinitions.forEach(({ keyframes, transition }, subject) => {\n animations.push(...animateSubject(subject, keyframes, transition));\n });\n return animations;\n}\n\nexport { animateSequence };\n","class GroupAnimation {\n constructor(animations) {\n // Bound to accomadate common `return animation.stop` pattern\n this.stop = () => this.runAll(\"stop\");\n this.animations = animations.filter(Boolean);\n }\n get finished() {\n return Promise.all(this.animations.map((animation) => animation.finished));\n }\n /**\n * TODO: Filter out cancelled or stopped animations before returning\n */\n getAll(propName) {\n return this.animations[0][propName];\n }\n setAll(propName, newValue) {\n for (let i = 0; i < this.animations.length; i++) {\n this.animations[i][propName] = newValue;\n }\n }\n attachTimeline(timeline) {\n const subscriptions = this.animations.map((animation) => animation.attachTimeline(timeline));\n return () => {\n subscriptions.forEach((cancel, i) => {\n cancel && cancel();\n this.animations[i].stop();\n });\n };\n }\n get time() {\n return this.getAll(\"time\");\n }\n set time(time) {\n this.setAll(\"time\", time);\n }\n get speed() {\n return this.getAll(\"speed\");\n }\n set speed(speed) {\n this.setAll(\"speed\", speed);\n }\n get state() {\n return this.getAll(\"state\");\n }\n get startTime() {\n return this.getAll(\"startTime\");\n }\n get duration() {\n let max = 0;\n for (let i = 0; i < this.animations.length; i++) {\n max = Math.max(max, this.animations[i].duration);\n }\n return max;\n }\n runAll(methodName) {\n this.animations.forEach((controls) => controls[methodName]());\n }\n play() {\n this.runAll(\"play\");\n }\n pause() {\n this.runAll(\"pause\");\n }\n cancel() {\n this.runAll(\"cancel\");\n }\n complete() {\n this.runAll(\"complete\");\n }\n}\n\nexport { GroupAnimation };\n","import { GroupAnimation } from './GroupAnimation.mjs';\n\nclass GroupAnimationWithThen extends GroupAnimation {\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n}\n\nexport { GroupAnimationWithThen };\n","import { animateSequence } from './sequence.mjs';\nimport { animateSubject } from './subject.mjs';\nimport { GroupAnimationWithThen } from '../../../../../motion-dom/dist/es/animation/GroupAnimationWithThen.mjs';\n\nfunction isSequence(value) {\n return Array.isArray(value) && value.some(Array.isArray);\n}\n/**\n * Creates an animation function that is optionally scoped\n * to a specific element.\n */\nfunction createScopedAnimate(scope) {\n /**\n * Implementation\n */\n function scopedAnimate(subjectOrSequence, optionsOrKeyframes, options) {\n let animations = [];\n if (isSequence(subjectOrSequence)) {\n animations = animateSequence(subjectOrSequence, optionsOrKeyframes, scope);\n }\n else {\n animations = animateSubject(subjectOrSequence, optionsOrKeyframes, options, scope);\n }\n const animation = new GroupAnimationWithThen(animations);\n if (scope) {\n scope.animations.push(animation);\n }\n return animation;\n }\n return scopedAnimate;\n}\nconst animate = createScopedAnimate();\n\nexport { animate, createScopedAnimate };\n","import styles from './icons.module.css'\n\nexport class SpinnerIcon {\n private readonly template = `\n <svg aria-hidden=\"true\" class=\"${styles.spinner}\" viewBox=\"0 0 100 101\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path 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\" fill=\"currentColor\"/>\n <path 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\" fill=\"currentFill\"/>\n </svg>\n <span class=\"${styles.srOnly}\">Loading...</span>\n `\n private readonly spinner = document.createElement('div')\n\n constructor() {\n this.spinner.setAttribute('role', 'status')\n this.spinner.classList.add(styles.spinnerContainer)\n this.spinner.innerHTML = this.template\n }\n\n addClass(className: string) {\n this.spinner.classList.add(className)\n }\n\n removeClass(className: string) {\n this.spinner.classList.remove(className)\n }\n\n render() {\n return this.spinner\n }\n}\n","import { SpinnerIcon } from '../icons/spinner.icon'\nimport styles from './loader.module.css'\n\nexport class Loader {\n private readonly loader: HTMLElement\n\n constructor() {\n this.loader = document.createElement('div')\n this.loader.classList.add(styles.loader)\n this.loader.appendChild(new SpinnerIcon().render())\n }\n\n setClassName(className?: string): void {\n if (className) this.loader.classList.add(className)\n else this.loader.className = styles.loader\n }\n\n render() {\n return this.loader\n }\n}\n","import { Observer } from '@ts/core/shared/state/observer'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport type { ApplePayConfig, EvService } from '@ts/pkg/evervault'\nimport styles from './apple-pay.module.css'\n\nexport class ApplePay {\n private readonly element: HTMLElement\n private readonly events = {\n ready: new Observer<void>(),\n }\n\n constructor(private readonly ev: EvService) {\n this.element = document.createElement('div')\n this.element.classList.add(styles.applePay, styles.hidden)\n }\n\n async init(config?: ApplePayConfig): Promise<void> {\n if (!config) return\n\n await this.ev.initApple(config)\n if (!this.ev.isAppleAvailable()) return\n\n await this.ev.renderApple(this.element)\n this.element.classList.remove(styles.hidden)\n this.events.ready.emit()\n }\n\n addEventListener(event: keyof ApplePay['events'], listener: Listener<void>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","import type { CheckoutConfig } from '@ts/pkg/checkout-api'\n\nexport const defaultCheckoutConfig: CheckoutConfig[] = [\n { type: 'paypal', is_active: true, order: 1 },\n { type: 'apple-pay', is_active: true, order: 2 },\n { type: 'google-pay', is_active: true, order: 3 },\n { type: 'card', is_active: true, order: 4 },\n] as const\n\nexport const variants = {\n open: { y: 0, opacity: 1 },\n close: { y: 100, opacity: 0 },\n transition: { duration: 0.5, type: 'spring', bounce: 0 },\n} as const\n\nexport const btnVariants = {\n open: { y: 0, opacity: 1 },\n close: { y: -100, opacity: 0 },\n transition: { duration: 0.5, type: 'spring', bounce: 0 },\n} as const\n\nexport const success = {\n animate: { y: 0, opacity: 1 },\n transition: { duration: 0.5, type: 'spring', bounce: 0 },\n} as const\n\nexport const labelVariants = {\n open: { y: 0, opacity: 1 },\n close: { y: 15, opacity: 0 },\n transition: { duration: 0.5, type: 'spring', bounce: 0 },\n} as const\n\nexport const errorVariants = {\n open: { y: 0, opacity: 1, height: 'auto' },\n close: { y: -15, opacity: 0, height: 0},\n transition: { duration: 0.5, type: 'spring', bounce: 0 },\n} as const\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","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 {\n name: 'MasterCard',\n type: CardType.Mastercard,\n pattern: /^5[1-5]/,\n minLength: 16,\n maxLength: 16,\n },\n {\n name: 'American Express',\n type: CardType.AmericanExpress,\n pattern: /^3[47]/,\n minLength: 15,\n maxLength: 15,\n },\n {\n name: 'Discover',\n type: CardType.Discover,\n pattern: /^6(?:011|5[0-9]{2})/,\n minLength: 16,\n maxLength: 16,\n },\n {\n name: 'JCB',\n type: CardType.JCB,\n pattern: /^(?:2131|1800|35\\d{3})/,\n minLength: 15,\n maxLength: 16,\n },\n {\n name: 'Diners Club',\n type: CardType.DinersClub,\n pattern: /^3(?:0[0-5]|[68][0-9])/,\n minLength: 14,\n maxLength: 16,\n },\n { name: 'Union Pay', type: CardType.UnionPay, pattern: /^62[^7]+/, minLength: 16, maxLength: 19 },\n {\n name: 'Maestro',\n type: CardType.Maestro,\n pattern: /^(50[^69]|5[68]|5018|5020|5038|627|6304|6759|6761|6763|6[3][^6]+)/,\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 type { PayPalTransaction, TransactionConfig } from '@ts/pkg/checkout-api'\nimport type {\n ApplePayCardNetwork,\n ApplePayTransaction,\n GooglePayTransaction,\n} from '@ts/pkg/evervault'\nimport { CardType } from './card'\n\n// transaction config to google pay\nexport const transactionConfigToGooglePay = (\n transaction?: TransactionConfig | null,\n): GooglePayTransaction | null => {\n if (\n !transaction ||\n typeof transaction.amount !== 'number' ||\n !transaction.currency ||\n !transaction.country ||\n !transaction.merchant_id\n ) {\n return null\n }\n\n if (transaction.checkout_config) {\n const googlePay = transaction.checkout_config?.find(\n ({ is_active, type }) => is_active && type === 'google-pay',\n )\n\n if (!googlePay) return null\n }\n\n return {\n amount: transaction.amount,\n currency: transaction.currency,\n country: transaction.country,\n merchantId: transaction.merchant_id,\n lineItems: [],\n }\n}\n\n// transaction config to apple pay\nexport const transactionConfigToApplePay = (\n transaction?: TransactionConfig | null,\n): ApplePayTransaction | null => {\n if (\n !transaction ||\n typeof transaction.amount !== 'number' ||\n !transaction.currency ||\n !transaction.country ||\n !transaction.merchant_id\n ) {\n return null\n }\n\n if (transaction.checkout_config) {\n const applePay = transaction.checkout_config?.find(\n ({ is_active, type }) => is_active && type === 'apple-pay',\n )\n if (!applePay) return null\n }\n\n return {\n amount: transaction.amount,\n currency: transaction.currency,\n country: transaction.country,\n merchantId: transaction.merchant_id,\n lineItems: transaction.apple_pay_info?.line_items || [],\n }\n}\n\n// ToDo: remove after testing\n// transaction config to paypal\nexport const transactionConfigToPayPal = (\n transaction?: TransactionConfig | null,\n): PayPalTransaction | null => {\n if (\n !transaction ||\n typeof transaction.amount !== 'number' ||\n !transaction.currency ||\n !transaction.country ||\n !transaction.merchant_id\n ) {\n return null\n }\n\n if (transaction.checkout_config) {\n const paypal = transaction.checkout_config.find(\n ({ is_active, type }) => is_active && type === 'paypal',\n )\n \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.merchant_id,\n },\n ],\n }\n}\n\n// map card type to apple card network\nexport const mapCardTypeToAppleCardNetwork = (\n cardTypes: CardType[] = [],\n): 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 { Observer } from '@ts/core/shared/state/observer'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport type { GooglePayConfig, EvService } from '@ts/pkg/evervault'\nimport styles from './google-pay.module.css'\n\nexport class GooglePay {\n private readonly element: HTMLElement\n private readonly events = {\n ready: new Observer<void>(),\n }\n\n constructor(private readonly ev: EvService) {\n this.element = document.createElement('div')\n this.element.classList.add(styles.googlePay, styles.hidden)\n }\n\n async init(config?: GooglePayConfig): Promise<void> {\n if (!config) return\n await this.ev.initGoogle(config)\n await this.ev.renderGoogle(this.element)\n this.element.classList.remove(styles.hidden)\n this.events.ready.emit()\n }\n\n addEventListener(event: keyof GooglePay['events'], listener: Listener<void>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","import { Observer } from '@ts/core/shared/state/observer'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport styles from './paypal.module.css'\nimport type { PaypalConfig, PayPalService } from '@ts/pkg/paypal'\n\n// paypal button\nexport class PayPal {\n private readonly element: HTMLElement\n private readonly events = {\n ready: new Observer<void>(),\n }\n\n constructor(private readonly paypal: PayPalService) {\n this.element = document.createElement('div')\n this.element.classList.add(styles.paypal, styles.hidden)\n }\n\n // init\n async init(config?: PaypalConfig): Promise<void> {\n if (!config) return\n \n await this.paypal.init({\n clientId: config.clientId,\n vault: true,\n })\n\n await this.paypal.render(this.element, {\n ...config,\n onApprove: async ({ billingToken }) => {\n config.onSuccess?.(billingToken || '')\n },\n onCancel: config.onCancel,\n onError: config.onError,\n })\n\n this.element.classList.remove(styles.hidden)\n this.events.ready.emit()\n }\n\n // add event listener\n addEventListener(event: keyof PayPal['events'], listener: Listener<void>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n // render\n render(): HTMLElement {\n return this.element\n }\n}\n","import type { ApplePayButtonLocale, GooglePayButtonLocale } from '@ts/pkg/evervault'\nimport type { Locale } from '../state/translate'\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 styles from './icons.module.css'\n\nexport class CardIcon {\n private readonly template = `\n <svg\n xmlns='http://www.w3.org/2000/svg'\n fill='none'\n stroke='currentColor'\n stroke-width='2'\n stroke-linecap='round'\n stroke-linejoin='round'\n viewBox='0 0 30 20'\n class='${styles.svg}'\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 <span class=\"${styles.srOnly}\">Pay with</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.card)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import { TranslateState } from '../../../state/translate'\nimport { CardIcon } from '../../icons/card.icon'\nimport styles from './card.module.css'\n\nexport class CardButton {\n private readonly element: HTMLElement\n private readonly icon = new CardIcon()\n\n constructor(translate: TranslateState) {\n this.element = document.createElement('button')\n this.element.classList.add(styles.button)\n\n const text = document.createElement('span')\n text.textContent = translate.getState().messages.card.compact.button\n this.element.append(this.icon.render(), text)\n\n this.element.addEventListener('mousedown', () => this.element.classList.add(styles.press))\n this.element.addEventListener('mouseup', () => this.element.classList.remove(styles.press))\n this.element.addEventListener('mouseout', () => this.element.classList.remove(styles.press))\n\n translate.subscribe(({ messages }) => {\n text.textContent = messages.card.compact.button\n })\n }\n\n addEventListener(listener: (ev: MouseEvent) => void) {\n return this.element.addEventListener('click', listener)\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","export const merge = <T>(arr1: Array<T>, arr2: Array<T>, equal: (a: T, b: T) => boolean): Array<T> => {\n return arr2.concat(arr1.filter((i1) => arr2.every((i2) => !equal(i1, i2))))\n}\n","import type { CheckoutConfig } from '../interface'\n\nexport const config = {\n apiBase: import.meta.env.VITE_CHECKOUT_API_BASE,\n} as const\n\nexport const initialCheckoutConfig: CheckoutConfig[] = [\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","import { config, initialCheckoutConfig } from './constants/config'\nimport type {\n // ToDo: remove after testing\n // AgreementResponse,\n CheckoutDto,\n TransactionConfigResponse,\n CheckoutResponse,\n} from './interface'\n\n// checkout req\nexport const checkoutReq = async (data: CheckoutDto): Promise<CheckoutResponse> => {\n const url = `${config.apiBase}/payments/create`\n\n const headers = new Headers()\n headers.append('Content-Type', 'application/json')\n\n console.log('----- payment data: ', data)\n\n const res = await fetch(url, {\n method: 'POST',\n headers,\n body: JSON.stringify({\n client_session: data.clientSession,\n three_ds_session_id: data.threeDsSessionId,\n type: data.googlePay ? 'GPAY' : data.applePay ? 'APPLEPAY' : data.paypal ? 'PAYPAL' : 'CARD',\n name: !data.applePay?.billingContact?.givenName ? data.card?.metadata?.name : data.applePay?.billingContact?.givenName + ' ' + data.applePay?.billingContact?.familyName,\n phone: data.applePay?.shippingContact?.phoneNumber,\n\n billing_address: (data.applePay || data.googlePay) ? {\n city: data.applePay?.billingContact?.locality || data?.googlePay?.billingAddress?.locality || undefined,\n country: data.applePay?.billingContact?.countryCode || data?.googlePay?.billingAddress?.countryCode || undefined,\n line1: data.applePay?.billingContact?.addressLines?.at(0) || data?.googlePay?.billingAddress?.address1 || undefined,\n line2: data.applePay?.billingContact?.addressLines?.at(1) || data?.googlePay?.billingAddress?.address2 || undefined,\n postal_code: data.applePay?.billingContact?.postalCode || data?.googlePay?.billingAddress?.postalCode || undefined,\n state: data.applePay?.billingContact?.administrativeArea || data?.googlePay?.billingAddress?.administrativeArea || undefined,\n } : undefined,\n\n card: (data.card || data.googlePay?.card || data.applePay?.card) ? {\n bin: data.card?.firstSixDigits,\n bin_data: {\n brand: data.card?.cardBrand || data.googlePay?.card?.brand || data.applePay?.card?.brand,\n country: data.card?.country || data.googlePay?.card?.country || data.applePay?.card?.country,\n currency_code: data.card?.currency || data.googlePay?.card?.currency || data.applePay?.card?.currency,\n funding: data.card?.funding || data.googlePay?.card?.funding || data.applePay?.card?.funding,\n issuer: data.card?.issuer || data.googlePay?.card?.issuer || data.applePay?.card?.issuer,\n type: data.card?.type || data.googlePay?.card?.segment || data.applePay?.card?.segment,\n },\n cvc: data.card?.cvc,\n exp_month: data.card?.expMonth || data.googlePay?.card?.expiry.month ? Number(data.card?.expMonth || data.googlePay?.card?.expiry.month) : undefined,\n exp_year: data.card?.expYear || data.googlePay?.card?.expiry.year ? Number(data.card?.expYear || data.googlePay?.card?.expiry.year) : undefined,\n last4: data.card?.lastFourDigits || data.googlePay?.card?.lastFour || data.applePay?.card?.lastFour,\n number: data.card?.number || data.googlePay?.card?.number,\n } : undefined,\n\n paypal: data.paypal?.billing_agreement_token.paypalId ? { billing_agreement_token: data.paypal?.billing_agreement_token.paypalId } : undefined,\n\n google_pay: data.googlePay && data.googlePay.token ? {\n cryptogram: data.googlePay.cryptogram,\n eci: data.googlePay.eci,\n exp_month: data.googlePay?.card?.expiry.month || data.googlePay?.token.expiry.month ? Number(data.googlePay.card.expiry.month || data.googlePay.token.expiry.month) : undefined,\n exp_year: data.googlePay?.card?.expiry.year || data.googlePay?.token.expiry.year ? Number(data.googlePay.card.expiry.year || data.googlePay.token.expiry.year) : undefined,\n token: data.googlePay?.token?.number,\n token_service_provider: data.googlePay?.token?.tokenServiceProvider,\n } : undefined,\n\n apple_pay: data.applePay ? {\n cryptogram: data.applePay.cryptogram,\n eci: data.applePay.eci,\n exp_month: data.applePay?.networkToken?.expiry?.month ? Number(data.applePay.networkToken.expiry.month) : undefined,\n exp_year: data.applePay?.networkToken?.expiry?.year ? Number(data.applePay.networkToken.expiry.year) : undefined,\n token: data.applePay?.networkToken?.number,\n token_service_provider: data.applePay?.networkToken?.tokenServiceProvider,\n } : undefined,\n }),\n })\n\n const json = await res.json()\n\n return json\n}\n\n// capture req\nexport const captureReq = async (paypalId: string): Promise<CheckoutResponse> => {\n const url = `${config.apiBase}/payments/capture/${paypalId}`\n\n const headers = new Headers()\n headers.append('Content-Type', 'application/json')\n const res = await fetch(url, {\n method: 'POST',\n headers,\n })\n \n const json = await res.json()\n\n return json\n}\n\n// paypal agreement req\nexport const paypalAgreementReq = async (clientToken: string): Promise<string> => {\n const url = `${config.apiBase}/payments/create/billing/agreement`\n\n const headers = new Headers()\n headers.append('Content-Type', 'application/json')\n\n const res = await fetch(url, {\n method: 'POST',\n headers,\n body: JSON.stringify({ client_session: clientToken }),\n })\n\n const json = await res.json()\n\n return json.paypal_agreement_token_response.token_id || ''\n}\n\n// config req\nexport const configReq = async (clientToken: string): Promise<TransactionConfigResponse> => {\n const url = `${config.apiBase}/payments/config?client_session_id=${clientToken}`\n\n const res = await fetch(url)\n\n const transaction: TransactionConfigResponse = await res.json()\n if (!transaction.checkout_config) {\n transaction.checkout_config = initialCheckoutConfig\n }\n\n return transaction\n}\n","export enum PaymentType {\n Card = 'CARD',\n}\n","import { Observer } from '@ts/core/shared/state/observer'\nimport type { CheckoutConfig } from '../../checkout.interface'\nimport styles from './buttons.module.css'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport { ApplePay } from './apple-pay/apple-pay.button'\nimport { defaultCheckoutConfig } from '../../checkout.constant'\nimport {\n mapCardTypeToAppleCardNetwork,\n transactionConfigToApplePay,\n transactionConfigToGooglePay,\n} from '../../utils/checkout.mapper'\nimport { GooglePay } from './google-pay/google-pay.button'\nimport { PayPal } from './paypal/paypal.button'\nimport { localeToAppleLocale, localeToGoogleLocale } from '../../utils/locale.mapper'\nimport { CardButton } from './card/card.button'\nimport { merge } from '@ts/core/shared/array.utils'\nimport { paypalAgreementReq } from '@ts/pkg/checkout-api'\n\nexport class Buttons {\n private isAppleReady = true\n private isGoogleReady = true\n private isPayPalReady = true\n readonly buttons: HTMLElement\n private readonly applePay: ApplePay\n private readonly googlePay: GooglePay\n private readonly paypal: PayPal\n private readonly card: CardButton\n private readonly events = {\n ready: new Observer<void>(),\n open: new Observer<void>(),\n error: new Observer<void>(),\n cancel: new Observer<void>(),\n success: new Observer<unknown>(),\n }\n\n constructor(private readonly config: CheckoutConfig) {\n this.applePay = new ApplePay(config.service.ev)\n this.paypal = new PayPal(config.service.paypal)\n this.googlePay = new GooglePay(config.service.ev)\n this.card = new CardButton(config.state.translate)\n\n this.buttons = document.createElement('div')\n this.buttons.classList.add(styles.buttons, styles.hidden)\n }\n\n async init(): Promise<void> {\n this.config.state.transaction.subscribe(() => {\n if (!this.config.service.ev.isReady) return\n this.initPaymentMethods().catch(console.error)\n })\n this.config.state.checkout.subscribe(() => {\n if (!this.config.service.ev.isReady) return\n this.initPaymentMethods().catch(console.error)\n })\n this.config.service.ev.addEventListener('ready', () => {\n this.initPaymentMethods().catch(console.error)\n })\n this.card.addEventListener(() => this.events.open.emit())\n }\n\n private async initApple(): Promise<void> {\n this.isAppleReady = false\n this.buttons.appendChild(this.applePay.render())\n const transaction = this.config.state.transaction.getState()\n const { locale, supportedCardTypes } = this.config.state.checkout.getState()\n const appleTransaction = transactionConfigToApplePay(transaction)\n try {\n if (!appleTransaction) return\n await this.applePay.init({\n transaction: appleTransaction,\n supportedCardTypes: mapCardTypeToAppleCardNetwork(supportedCardTypes),\n locale: localeToAppleLocale(locale || 'en'),\n onError: () => this.events.error.emit(),\n onCancel: () => this.events.cancel.emit(),\n onSuccess: (data) => this.events.success.emit({ ...data, type: 'apple' }),\n })\n } catch (err) {\n console.error(err)\n } finally {\n this.isAppleReady = true\n }\n }\n\n private async initGoogle(): Promise<void> {\n this.isGoogleReady = false\n this.buttons.appendChild(this.googlePay.render())\n const transaction = this.config.state.transaction.getState()\n const { locale } = this.config.state.checkout.getState()\n const googleTransaction = transactionConfigToGooglePay(transaction)\n try {\n if (!googleTransaction) return\n await this.googlePay.init({\n transaction: googleTransaction,\n locale: localeToGoogleLocale(locale || 'en'),\n onError: () => this.events.error.emit(),\n onCancel: () => this.events.cancel.emit(),\n onSuccess: (data) => this.events.success.emit({ ...data, type: 'google' }),\n })\n } catch (err) {\n console.error(err)\n } finally {\n this.isGoogleReady = true\n }\n }\n\n private async initPayPal(): Promise<void> {\n this.isPayPalReady = false\n this.buttons.appendChild(this.paypal.render())\n\n const transaction = this.config.state.transaction.getState()\n\n const clientToken = this.config.state.checkout.getState().clientToken\n const createBillingAgreement = async () => {\n return await paypalAgreementReq(clientToken)\n }\n\n try {\n if (!transaction) {\n // ToDo: receive error from server\n return\n }\n\n await this.paypal.init({\n clientId: transaction?.paypal_info?.client_id || '',\n environment: transaction?.paypal_info?.environment || 'sandbox',\n createBillingAgreement: createBillingAgreement,\n onError: () => this.events.error.emit(),\n onCancel: () => this.events.cancel.emit(),\n onSuccess: (paypalId) => this.events.success.emit({ paypalId, type: 'paypal' }),\n })\n } catch (err) {\n console.error(err)\n } finally {\n this.isPayPalReady = true\n }\n }\n\n private async initCard(): Promise<void> {\n this.buttons.appendChild(this.card.render())\n }\n\n private async initPaymentMethods(): Promise<void> {\n const transaction = this.config.state.transaction.getState()\n const config = merge(defaultCheckoutConfig, transaction?.checkout_config || [], (a, b) => a.type === b.type)\n const promises = config\n .filter(({ is_active }) => is_active)\n .sort((a, b) => a.order - b.order)\n .map(({ type }) => {\n switch (type) {\n case 'apple-pay':\n return this.initApple()\n case 'google-pay':\n return this.initGoogle()\n case 'paypal':\n return this.initPayPal()\n case 'card':\n return this.initCard()\n default:\n throw new Error('Unknown button type')\n }\n })\n await Promise.all(promises)\n this.handleReady()\n }\n\n private handleReady(): void {\n if (this.isAppleReady && this.isGoogleReady && this.isPayPalReady) {\n this.events.ready.emit()\n }\n }\n\n addEventListener(event: keyof Buttons['events'], listener: Listener<unknown>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n showButton(): void {\n this.buttons.classList.remove(styles.hidden)\n }\n\n render(): HTMLElement {\n return this.buttons\n }\n}\n","import styles from './icons.module.css'\n\nexport class BackIcon {\n private readonly template = `\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 stroke-width='2'\n stroke-linecap='round'\n stroke-linejoin='round'\n class='${styles.back}'\n >\n <polyline points='15 18 9 12 15 6'></polyline>\n </svg>\n <span class=\"${styles.srOnly}\">Back</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import { BackIcon } from '../../../icons/back.icon'\nimport styles from './back.module.css'\n\nexport class BackButton {\n private readonly element: HTMLElement\n private readonly icon = new BackIcon()\n\n constructor() {\n this.element = document.createElement('div')\n this.element.classList.add(styles.button)\n this.element.appendChild(this.icon.render())\n }\n\n addEventListener(listener: (ev: MouseEvent) => void) {\n return this.element.addEventListener('click', listener)\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","import { TranslateState } from '@ts/core/modules/checkout/state/translate'\nimport styles from './submit.module.css'\nimport { SpinnerIcon } from '../../../icons/spinner.icon'\n\nexport class SubmitButton {\n private readonly element: HTMLElement\n private readonly spinner = new SpinnerIcon()\n private readonly message = document.createElement('span')\n\n constructor(translate: TranslateState) {\n this.element = document.createElement('button')\n this.element.classList.add(styles.button)\n this.spinner.addClass(styles.spinner)\n this.spinner.addClass(styles.hidden)\n this.message.textContent = translate.messages().card.pay.button\n this.element.append(this.spinner.render(), this.message)\n\n this.element.addEventListener('mousedown', () => this.element.classList.add(styles.press))\n this.element.addEventListener('mouseup', () => this.element.classList.remove(styles.press))\n this.element.addEventListener('mouseout', () => this.element.classList.remove(styles.press))\n\n translate.subscribe((state) => {\n this.message.textContent = state.messages.card.pay.button\n })\n }\n\n addEventListener(listener: (ev: MouseEvent) => void) {\n return this.element.addEventListener('click', listener)\n }\n\n disable(isDisabled: boolean) {\n if (isDisabled) {\n this.element.setAttribute('disabled', 'true')\n this.element.classList.add(styles.disabled)\n this.spinner.removeClass(styles.hidden)\n } else {\n this.element.removeAttribute('disabled')\n this.element.classList.remove(styles.disabled)\n this.spinner.addClass(styles.hidden)\n }\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class WarningIcon {\n private readonly template = `\n <svg focusable='false' fill='#dc2626' color='#dc2626' height='12' viewBox='0 0 12 12' width='12'>\n <g fill='none' fill-rule='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' stroke-linecap='round' stroke-linejoin='round'></path>\n </g>\n </g>\n </svg>\n <span class=\"${styles.srOnly}\">Warning</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.warning)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import { Observer } from '@ts/core/shared/state/observer'\nimport styles from './name.module.css'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport { InputError } from '@ts/core/modules/checkout/utils/card'\nimport { WarningIcon } from '../../../icons/warning.icon'\nimport { animate } from 'motion'\nimport { labelVariants } from '@ts/core/modules/checkout/checkout.constant'\nimport { TranslateState } from '@ts/core/modules/checkout/state/translate'\n\ntype ChangeData = {\n value: string\n isValid: boolean\n}\n\nexport class NameInput {\n private readonly id = 'paynext-card-input-name'\n readonly element: HTMLElement\n private readonly inputContainer = document.createElement('div')\n private readonly input = document.createElement('input')\n private readonly label = document.createElement('label')\n private readonly labelText = document.createElement('span')\n private readonly labelError = document.createElement('span')\n private readonly endContent = document.createElement('div')\n private readonly warning = new WarningIcon()\n\n isTouchSubmit = false\n private isRequired = false\n private isDisabled = false\n private isChanged = false\n\n private readonly events = {\n change: new Observer<ChangeData>(),\n }\n\n constructor(translate: TranslateState) {\n const m = translate.messages()\n this.element = document.createElement('div')\n this.element.classList.add(styles.wrapper)\n\n this.inputContainer.classList.add(styles.inputContainer)\n this.input.setAttribute('id', this.id)\n this.input.setAttribute('auto-complete', 'cc-name')\n this.input.setAttribute('placeholder', m.card.name.placeholder)\n this.input.classList.add(styles.input)\n this.endContent.classList.add(styles.hidden)\n this.endContent.appendChild(this.warning.render())\n this.inputContainer.append(this.input, this.endContent)\n\n this.label.setAttribute('for', this.id)\n this.label.classList.add(styles.label)\n this.labelText.textContent = m.card.name.label\n this.labelError.textContent = m.card.name.error.required\n this.labelError.classList.add(styles.labelError, styles.hidden)\n this.label.append(this.labelText, this.labelError)\n\n this.element.append(this.label, this.inputContainer)\n this.input.addEventListener('input', () => this.handleChange(this.input.value))\n this.input.addEventListener('paste', () => this.handleChange(this.input.value))\n this.input.addEventListener('blur', () => this.validate(this.input.value))\n\n translate.subscribe(({ messages }) => {\n this.input.setAttribute('placeholder', messages.card.name.placeholder)\n this.labelText.textContent = messages.card.name.label\n this.labelError.textContent = messages.card.name.error.required\n })\n }\n\n private validator(value: string): InputError | null {\n return !value ? InputError.Empty : null\n }\n\n private handleChange(value: string): void {\n if (this.isDisabled) return\n\n this.isRequired = false\n if (!this.isChanged) {\n this.isChanged = true\n }\n\n this.events.change.emit({\n value,\n isValid: this.validator(value) === null,\n })\n this.render()\n }\n\n private async toggleLabelError(isInputError: boolean): Promise<void> {\n if (isInputError) {\n this.inputContainer.classList.add(styles.errorInput)\n this.endContent.classList.remove(styles.hidden)\n this.labelError.classList.remove(styles.hidden)\n await animate(this.labelError, labelVariants.open, labelVariants.transition)\n return\n }\n this.inputContainer.classList.remove(styles.errorInput)\n this.endContent.classList.add(styles.hidden)\n await animate(this.labelError, labelVariants.close, labelVariants.transition)\n this.labelError.classList.add(styles.hidden)\n }\n\n addEventListener(event: keyof NameInput['events'], listener: Listener<ChangeData>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n disable(isDisabled: boolean) {\n if (isDisabled) {\n this.input.setAttribute('disabled', 'true')\n this.input.classList.add(styles.disabledInput)\n this.inputContainer.classList.add(styles.disabled)\n } else {\n this.input.removeAttribute('disabled')\n this.input.classList.remove(styles.disabledInput)\n this.inputContainer.classList.remove(styles.disabled)\n }\n }\n\n touchSubmit() {\n this.isTouchSubmit = true\n this.render()\n }\n\n value() {\n return this.input.value\n }\n\n validate(value: string) {\n const error = this.validator(value)\n this.isRequired = !!error\n this.render()\n return !error\n }\n\n render(): HTMLElement {\n const isTouched = this.isTouchSubmit || this.isChanged\n const isError = isTouched && this.isRequired\n const isInputError = isError && !this.isDisabled\n this.toggleLabelError(isInputError)\n\n if (this.isDisabled) {\n this.inputContainer.classList.add(styles.disabled)\n this.input.classList.add(styles.disabledInput)\n } else {\n this.inputContainer.classList.remove(styles.disabled)\n this.input.classList.remove(styles.disabledInput)\n }\n\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class UnknownCardIcon {\n private readonly template = `\n <svg\n width='28'\n height='19'\n xmlns='http://www.w3.org/2000/svg'\n fill='rgb(220 38 38)'\n role='presentation'\n viewBox='0 0 30 20'\n class='${styles.svg}'\n >\n <g clip-path='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 fill-rule='evenodd'\n clip-rule='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 <clip-path id='clip0_184_11820'>\n <rect width='28' height='19'></rect>\n </clip-path>\n </defs>\n </svg>\n <span class=\"${styles.srOnly}\">Unknown card</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class AmexIcon {\n private readonly template = `\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' class='${styles.svg}'>\n <g fill='none' fill-rule='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 <span class=\"${styles.srOnly}\">Amex</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class DinersClubIcon {\n private readonly template = `\n <svg\n xmlns='http://www.w3.org/2000/svg'\n xmlns-xlink='http://www.w3.org/1999/xlink'\n width='24px'\n height='16px'\n viewBox='0 0 24 16'\n version='1.1'\n class='${styles.svg}'\n >\n <g id='319' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'>\n <g id='New-Icons' transform='translate(-320.000000, -280.000000)' fill-rule='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 stroke-opacity='0.2'\n stroke='#000000'\n stroke-width='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 <span class=\"${styles.srOnly}\">Diners Club</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class DiscoverIcon {\n private readonly template = `\n <svg\n xmlns='http://www.w3.org/2000/svg'\n xmlns-xlink='http://www.w3.org/1999/xlink'\n width='24px'\n height='16px'\n viewBox='0 0 24 16'\n version='1.1'\n class='${styles.svg}'\n >\n <g id='319' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'>\n <g id='New-Icons' transform='translate(-280.000000, -280.000000)' fill-rule='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 stroke-opacity='0.2'\n stroke='#000000'\n stroke-width='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 <span class=\"${styles.srOnly}\">Discover</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class JcbIcon {\n private readonly template = `\n <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 23 16' width='23' class='${styles.svg}'>\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 <span class=\"${styles.srOnly}\">JCB</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class MasterCardIcon {\n private readonly template = `\n <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${styles.svg}'>\n <g fill='none' fill-rule='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 <span class=\"${styles.srOnly}\">MasterCard</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class UnionPayIcon {\n private readonly template = `\n <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${styles.svg}'>\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 <span class=\"${styles.srOnly}\">Union Pay</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class VisaIcon {\n private readonly template = `\n <svg\n xmlns='http://www.w3.org/2000/svg'\n xmlns-xlink='http://www.w3.org/1999/xlink'\n width='24px'\n height='16px'\n viewBox='0 0 24 16'\n version='1.1'\n class='${styles.svg}'\n >\n <g id='319' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'>\n <g id='New-Icons' transform='translate(-80.000000, -280.000000)' fill-rule='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 stroke-opacity='0.2'\n stroke='#000000'\n stroke-width='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 <span class=\"${styles.srOnly}\">Visa</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import { Observer } from '@ts/core/shared/state/observer'\nimport styles from './number.module.css'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport {\n CardType,\n cardTypes,\n detectCardType,\n getCardTypes,\n InputError,\n prettyCardNumber,\n validateCardNumber,\n} from '@ts/core/modules/checkout/utils/card'\nimport { animate } from 'motion'\nimport { errorVariants, labelVariants } from '@ts/core/modules/checkout/checkout.constant'\nimport { UnknownCardIcon } from '../../../icons/unknown-card.icon'\nimport { AmexIcon } from '../../../icons/amex.icon'\nimport { DinersClubIcon } from '../../../icons/diners-club.icon'\nimport { DiscoverIcon } from '../../../icons/discover.icon'\nimport { JcbIcon } from '../../../icons/jcb.icon'\nimport { MasterCardIcon } from '../../../icons/master-card.icon'\nimport { UnionPayIcon } from '../../../icons/union-pay.icon'\nimport { VisaIcon } from '../../../icons/visa.icon'\nimport { TranslateState } from '@ts/core/modules/checkout/state/translate'\n\ntype ChangeData = {\n card: string\n cardType?: CardType\n cardTypes: string[]\n isValid: boolean\n}\n\nexport class NumberInput {\n private readonly id = 'paynext-card-input-number'\n private readonly initialCardTypes = cardTypes.map((type) => type.type)\n\n readonly element: HTMLElement\n private readonly inputContainer = document.createElement('div')\n private readonly input = document.createElement('input')\n private readonly label = document.createElement('label')\n private readonly labelText = document.createElement('span')\n private readonly labelError = document.createElement('span')\n private readonly endContent = document.createElement('div')\n private readonly error = document.createElement('p')\n private readonly unknownCard = new UnknownCardIcon()\n private readonly amex = new AmexIcon()\n private readonly dinerClub = new DinersClubIcon()\n private readonly discover = new DiscoverIcon()\n private readonly jcb = new JcbIcon()\n private readonly masterCard = new MasterCardIcon()\n private readonly unionPay = new UnionPayIcon()\n private readonly visa = new VisaIcon()\n\n supportedCardTypes: CardType[] = this.initialCardTypes\n isTouchSubmit = false\n private errorMessage = ''\n private isRequired = false\n private isDisabled = false\n private isChanged = false\n\n private readonly events = {\n change: new Observer<ChangeData>(),\n }\n\n constructor(private readonly translate: TranslateState) {\n const m = translate.messages()\n this.element = document.createElement('div')\n this.element.classList.add(styles.wrapper)\n\n this.inputContainer.classList.add(styles.inputContainer)\n this.input.setAttribute('id', this.id)\n this.input.setAttribute('auto-complete', 'cc-number')\n this.input.setAttribute('placeholder', '1234 1234 1234 1234')\n this.input.classList.add(styles.input)\n this.endContent.classList.add(styles.endContent)\n this.endContent.append(...this.getCardIcons())\n this.inputContainer.append(this.input, this.endContent)\n\n this.label.setAttribute('for', this.id)\n this.label.classList.add(styles.label)\n this.labelText.textContent = m.card.number.label\n this.labelError.textContent = m.card.number.error.required\n this.labelError.classList.add(styles.labelError, styles.hidden)\n this.label.append(this.labelText, this.labelError)\n\n this.error.classList.add(styles.error, styles.hidden)\n\n this.element.append(this.label, this.inputContainer, this.error)\n this.input.addEventListener('input', (e) => {\n e.stopPropagation()\n this.handleChange(this.input.value)\n })\n this.input.addEventListener('paste', (e) => {\n e.preventDefault()\n this.handleChange(e.clipboardData?.getData('text') || '')\n })\n this.input.addEventListener('blur', () => this.validate(this.input.value))\n\n this.translate.subscribe(({ messages }) => {\n this.labelText.textContent = messages.card.number.label\n this.labelError.textContent = messages.card.number.error.required\n this.render()\n })\n }\n\n private handleChange(cardNumber: string): void {\n if (this.isDisabled) return\n\n this.isRequired = false\n this.errorMessage = ''\n\n if (!this.isChanged) {\n this.isChanged = true\n }\n const cardTypes = getCardTypes(cardNumber).map((type) => type.type)\n const cardType = detectCardType(cardNumber)\n const card = prettyCardNumber(cardNumber, cardType?.type || '')\n if (card.replace(/\\D/g, '').length === (cardType?.maxLength || 16)) {\n this.validate(card)\n }\n this.supportedCardTypes = cardTypes.length ? cardTypes : this.initialCardTypes\n\n this.input.value = card\n this.events.change.emit({\n card,\n cardType: cardType?.type,\n cardTypes,\n isValid: validateCardNumber(cardNumber, this.supportedCardTypes).isValid,\n })\n this.render()\n }\n\n private async toggleLabelError(isLabelError: boolean): Promise<void> {\n if (isLabelError) {\n this.inputContainer.classList.add(styles.errorInput)\n this.labelError.classList.remove(styles.hidden)\n await animate(this.labelError, labelVariants.open, labelVariants.transition)\n return\n }\n await animate(this.labelError, labelVariants.close, labelVariants.transition)\n this.labelError.classList.add(styles.hidden)\n }\n\n private async toggleErrorMessage(isErrorMessage: boolean): Promise<void> {\n if (isErrorMessage) {\n this.inputContainer.classList.add(styles.errorInput)\n this.error.textContent = this.errorMessage\n this.error.classList.remove(styles.hidden)\n await animate(this.error, errorVariants.open, errorVariants.transition)\n return\n }\n await animate(this.error, errorVariants.close, errorVariants.transition)\n this.error.classList.add(styles.hidden)\n }\n\n private getCardIcons(): HTMLElement[] {\n return cardTypes\n .filter(({ type }) => this.supportedCardTypes.includes(type))\n .slice(0, 3)\n .map(({ type }) => {\n switch (type) {\n case CardType.Visa:\n return this.visa.render()\n case CardType.Maestro:\n case CardType.Mastercard:\n return this.masterCard.render()\n case CardType.DinersClub:\n return this.dinerClub.render()\n case CardType.JCB:\n return this.jcb.render()\n case CardType.AmericanExpress:\n return this.amex.render()\n case CardType.Discover:\n return this.discover.render()\n case CardType.UnionPay:\n return this.unionPay.render()\n }\n })\n }\n\n addEventListener(event: keyof NumberInput['events'], listener: Listener<ChangeData>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n disable(isDisabled: boolean) {\n if (isDisabled) {\n this.input.setAttribute('disabled', 'true')\n this.input.classList.add(styles.disabledInput)\n this.inputContainer.classList.add(styles.disabled)\n } else {\n this.input.removeAttribute('disabled')\n this.input.classList.remove(styles.disabledInput)\n this.inputContainer.classList.remove(styles.disabled)\n }\n }\n\n touchSubmit() {\n this.isTouchSubmit = true\n this.render()\n }\n\n value() {\n return {\n value: this.input.value,\n cardType: getCardTypes(this.input.value)[0]?.type || '',\n }\n }\n\n validate(value: string) {\n const m = this.translate.messages()\n const { isValid, error } = validateCardNumber(value, this.supportedCardTypes)\n if (!isValid) {\n if (error === InputError.Empty) {\n this.errorMessage = ''\n this.isRequired = true\n } else if (error === InputError.Unsupported) {\n this.errorMessage = m.card.number.error.unsupported\n this.isRequired = false\n } else {\n this.errorMessage =\n error === InputError.Incomplete ? m.card.number.error.incomplete : m.card.number.error.invalid\n this.isRequired = false\n }\n this.render()\n return isValid\n }\n\n this.isRequired = false\n this.errorMessage = ''\n this.render()\n return isValid\n }\n\n render(): HTMLElement {\n const isTouched = this.isTouchSubmit || this.isChanged\n const isLabelError = isTouched && !this.isDisabled && this.isRequired\n const isErrorMessage = isTouched && !this.isDisabled && !!this.errorMessage\n this.toggleLabelError(isLabelError)\n this.toggleErrorMessage(isErrorMessage)\n\n if (!isLabelError && !isErrorMessage) {\n this.inputContainer.classList.remove(styles.errorInput)\n this.endContent.innerHTML = ''\n this.endContent.append(...this.getCardIcons())\n } else {\n this.endContent.innerHTML = ''\n this.endContent.appendChild(this.unknownCard.render())\n }\n\n if (this.isDisabled) {\n this.inputContainer.classList.add(styles.disabled)\n this.input.classList.add(styles.disabledInput)\n } else {\n this.inputContainer.classList.remove(styles.disabled)\n this.input.classList.remove(styles.disabledInput)\n }\n\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class CardCvcIcon {\n private readonly template = `\n <svg class='${styles.svg}' focusable='false' viewBox='0 0 32 21' role='img' aria-label='CVC'>\n <title>CVC</title>\n <g fill='none' fill-rule='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 <span class=\"${styles.srOnly}\">Card CVC</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.container)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import { Observer } from '@ts/core/shared/state/observer'\nimport styles from './card-security.module.css'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport { animate } from 'motion'\nimport { errorVariants, labelVariants } from '@ts/core/modules/checkout/checkout.constant'\nimport { WarningIcon } from '../../../icons/warning.icon'\nimport { CardCvcIcon } from '../../../icons/card-cvc.icon'\nimport { CardType, InputError, prettyCardExpiry, prettyCVC } from '@ts/core/modules/checkout/utils/card'\nimport { getTypeInfo } from 'credit-card-type'\nimport { TranslateState } from '@ts/core/modules/checkout/state/translate'\n\ntype ChangeData = {\n value: string\n isValid: boolean\n}\n\ntype ExpiryError = InputError | 'expired' | 'dateExpired' | null\ntype CvcError = InputError | null\n\nexport class CardSecuity {\n private readonly cvcId = 'paynext-card-input-cvc'\n private readonly expiryId = 'paynext-card-input-expiry'\n\n readonly element: HTMLElement\n private readonly warning = new WarningIcon()\n private readonly cardCvc = new CardCvcIcon()\n\n private readonly expiryInputContainer = document.createElement('div')\n private readonly expiryInput = document.createElement('input')\n private readonly expiryLabel = document.createElement('label')\n private readonly expiryLabelText = document.createElement('span')\n private readonly expiryLabelError = document.createElement('span')\n private readonly expiryEndContent = document.createElement('div')\n private expiryError = document.createElement('p')\n\n private readonly cvcInputContainer = document.createElement('div')\n private readonly cvcInput = document.createElement('input')\n private readonly cvcLabel = document.createElement('label')\n private readonly cvcLabelText = document.createElement('span')\n private readonly cvcLabelError = document.createElement('span')\n private readonly cvcEndContent = document.createElement('div')\n private cvcError = document.createElement('p')\n\n cardType: CardType | null = null\n isTouchSubmit = false\n private isDisabled = false\n\n private expiryPrevValue = ''\n private expiryErrorMessage = ''\n private isExpiryRequired = false\n private isExpiryChanged = false\n\n private cvcErrorMessage = ''\n private isCvcRequired = false\n private isCvcChanged = false\n\n private readonly events = {\n expiryChange: new Observer<ChangeData>(),\n cvcChange: new Observer<ChangeData>(),\n }\n\n constructor(private readonly translate: TranslateState) {\n const m = translate.messages()\n this.element = document.createElement('div')\n this.element.classList.add(styles.securityContent)\n\n this.expiryInputContainer.classList.add(styles.inputContainer)\n this.expiryInput.setAttribute('id', this.expiryId)\n this.expiryInput.setAttribute('auto-complete', 'cc-expiry')\n this.expiryInput.setAttribute('placeholder', m.card.expiry.placeholder)\n this.expiryInput.classList.add(styles.input)\n this.expiryEndContent.classList.add(styles.endContent)\n this.expiryEndContent.appendChild(this.warning.render())\n this.expiryInputContainer.append(this.expiryInput, this.expiryEndContent)\n\n this.expiryLabel.setAttribute('for', this.expiryId)\n this.expiryLabel.classList.add(styles.label)\n this.expiryLabelText.textContent = m.card.expiry.label\n this.expiryLabelError.textContent = m.card.expiry.error.required\n this.expiryLabelError.classList.add(styles.labelError, styles.hidden)\n this.expiryLabel.append(this.expiryLabelText, this.expiryLabelError)\n\n this.expiryError.classList.add(styles.error, styles.hidden)\n const expiryErrorWrapper = document.createElement('div')\n expiryErrorWrapper.appendChild(this.cvcError)\n\n this.cvcInputContainer.classList.add(styles.inputContainer)\n this.cvcInput.setAttribute('id', this.cvcId)\n this.cvcInput.setAttribute('auto-complete', 'cc-cvc')\n this.cvcInput.setAttribute('placeholder', m.card.cvc.placeholder)\n this.cvcInput.classList.add(styles.input)\n this.cvcEndContent.classList.add(styles.endContent)\n this.cvcEndContent.appendChild(this.cardCvc.render())\n this.cvcInputContainer.append(this.cvcInput, this.cvcEndContent)\n\n this.cvcLabel.setAttribute('for', this.cvcId)\n this.cvcLabel.classList.add(styles.label)\n this.cvcLabelText.textContent = m.card.cvc.label\n this.cvcLabelError.textContent = m.card.cvc.error.required\n this.cvcLabelError.classList.add(styles.labelError, styles.hidden)\n this.cvcLabel.append(this.cvcLabelText, this.cvcLabelError)\n\n this.cvcError.classList.add(styles.error, styles.hidden)\n const cvcErrorWrapper = document.createElement('div')\n cvcErrorWrapper.appendChild(this.cvcError)\n\n this.element.append(\n this.expiryLabel,\n this.cvcLabel,\n this.expiryInputContainer,\n this.cvcInputContainer,\n expiryErrorWrapper,\n cvcErrorWrapper,\n )\n\n this.expiryInput.addEventListener('input', (e) => {\n e.preventDefault()\n this.handleExpiryChange(this.expiryInput.value)\n })\n this.expiryInput.addEventListener('paste', (e) => {\n e.preventDefault()\n this.handleExpiryChange(e.clipboardData?.getData('text') || '')\n })\n this.expiryInput.addEventListener('blur', () => this.validateExpiry(this.expiryInput.value))\n\n this.cvcInput.addEventListener('input', (e) => {\n e.preventDefault()\n this.handleCvcChange(this.cvcInput.value)\n })\n this.cvcInput.addEventListener('paste', (e) => {\n e.preventDefault()\n this.handleCvcChange(e.clipboardData?.getData('text') || '')\n })\n this.cvcInput.addEventListener('blur', () => this.validateCvc(this.cvcInput.value))\n\n this.translate.subscribe(({ messages }) => {\n this.cvcInput.setAttribute('placeholder', messages.card.cvc.placeholder)\n this.expiryInput.setAttribute('placeholder', messages.card.expiry.placeholder)\n this.expiryLabelText.textContent = messages.card.expiry.label\n this.cvcLabelText.textContent = messages.card.cvc.label\n this.expiryLabelError.textContent = messages.card.expiry.error.required\n this.cvcLabelError.textContent = messages.card.cvc.error.required\n this.render()\n })\n }\n\n private cvcValidator(value: string): CvcError {\n const card = getTypeInfo(this.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\n private validateCvc(value: string): boolean {\n const m = this.translate.messages()\n const error = this.cvcValidator(value)\n if (error) {\n if (error === InputError.Empty) {\n this.cvcErrorMessage = ''\n this.isCvcRequired = true\n } else {\n const errMessage = error === InputError.Incomplete ? m.card.cvc.error.incomplete : m.card.cvc.error.invalid\n this.cvcErrorMessage = errMessage\n this.isCvcRequired = false\n }\n this.render()\n return !error\n }\n\n this.isCvcRequired = false\n this.cvcErrorMessage = ''\n this.render()\n return !error\n }\n\n private handleCvcChange(value: string): void {\n if (this.isDisabled) return\n\n this.isCvcRequired = false\n this.cvcErrorMessage = ''\n\n if (!this.isCvcChanged) {\n this.isCvcChanged = true\n }\n const cvc = prettyCVC(value, this.cardType || '')\n const card = getTypeInfo(this.cardType || '')\n if (cvc.length === card?.code.size) {\n this.validateCvc(cvc)\n }\n\n this.events.cvcChange.emit({\n value: cvc,\n isValid: this.cvcValidator(cvc) === null,\n })\n this.cvcInput.value = cvc\n this.render()\n }\n\n private async toggleCvcLabelError(isLabelError: boolean): Promise<void> {\n if (isLabelError) {\n this.cvcInputContainer.classList.add(styles.errorInput)\n this.cvcLabelError.classList.remove(styles.hidden)\n await animate(this.cvcLabelError, labelVariants.open, labelVariants.transition)\n return\n }\n await animate(this.cvcLabelError, labelVariants.close, labelVariants.transition)\n }\n\n private async toggleCvcErrorMessage(isErrorMessage: boolean): Promise<void> {\n if (isErrorMessage) {\n this.cvcInputContainer.classList.add(styles.errorInput)\n this.cvcError.textContent = this.cvcErrorMessage\n this.cvcError.classList.remove(styles.hidden)\n await animate(this.cvcError, errorVariants.open, errorVariants.transition)\n return\n }\n await animate(this.cvcError, errorVariants.close, errorVariants.transition)\n }\n\n /* ----- Expiry ----- */\n private expiryValidator(value: string): ExpiryError {\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\n private validateExpiry(value: string): boolean {\n const m = this.translate.messages()\n const error = this.expiryValidator(value)\n\n if (error) {\n if (error === InputError.Empty) {\n this.expiryErrorMessage = ''\n this.isExpiryRequired = true\n } else {\n let errMessage = m.card.expiry.error.invalid\n if (error === 'expired') {\n errMessage = m.card.expiry.error.expired.replace('{date}', 'year')\n } else if (error === 'dateExpired') {\n errMessage = m.card.expiry.error.expired.replace('{date}', 'date')\n } else if (error === InputError.Incomplete) {\n errMessage = m.card.expiry.error.incomplete\n }\n this.isExpiryRequired = false\n this.expiryErrorMessage = errMessage\n }\n this.render()\n return !error\n }\n\n this.isExpiryRequired = false\n this.expiryErrorMessage = ''\n this.render()\n return !error\n }\n\n private handleExpiryChange(value: string): void {\n if (this.isDisabled) return\n\n this.isExpiryRequired = false\n this.expiryErrorMessage = ''\n if (!this.isExpiryChanged) {\n this.isExpiryChanged = true\n }\n const expiry = prettyCardExpiry(value, this.expiryPrevValue)\n if (expiry.length === 7) {\n this.validateExpiry(expiry)\n }\n\n this.events.expiryChange.emit({\n value: expiry,\n isValid: this.expiryValidator(expiry) === null,\n })\n this.expiryPrevValue = expiry\n this.expiryInput.value = expiry\n this.render()\n }\n\n private async toggleExpiryLabelError(isLabelError: boolean): Promise<void> {\n if (isLabelError) {\n this.expiryInputContainer.classList.add(styles.errorInput)\n this.expiryLabelError.classList.remove(styles.hidden)\n await animate(this.expiryLabelError, labelVariants.open, labelVariants.transition)\n return\n }\n await animate(this.expiryLabelError, labelVariants.close, labelVariants.transition)\n this.expiryLabelError.classList.add(styles.hidden)\n }\n\n private async toggleExpiryErrorMessage(isErrorMessage: boolean): Promise<void> {\n if (isErrorMessage) {\n this.expiryInputContainer.classList.add(styles.errorInput)\n this.expiryError.textContent = this.expiryErrorMessage\n this.expiryError.classList.remove(styles.hidden)\n await animate(this.expiryError, errorVariants.open, errorVariants.transition)\n return\n }\n await animate(this.expiryError, errorVariants.close, errorVariants.transition)\n this.expiryError.classList.add(styles.hidden)\n }\n\n addEventListener(event: keyof CardSecuity['events'], listener: Listener<ChangeData>): Unsubscribe {\n return this.events[event].addListener(listener)\n }\n\n disable(isDisabled: boolean) {\n if (isDisabled) {\n this.expiryInput.setAttribute('disabled', 'true')\n this.expiryInput.classList.add(styles.disabledInput)\n this.expiryInputContainer.classList.add(styles.disabled)\n\n this.cvcInput.setAttribute('disabled', 'true')\n this.cvcInput.classList.add(styles.disabledInput)\n this.cvcInputContainer.classList.add(styles.disabled)\n } else {\n this.expiryInput.removeAttribute('disabled')\n this.expiryInput.classList.remove(styles.disabledInput)\n this.expiryInputContainer.classList.remove(styles.disabled)\n\n this.cvcInput.removeAttribute('disabled')\n this.cvcInput.classList.remove(styles.disabledInput)\n this.cvcInputContainer.classList.remove(styles.disabled)\n }\n }\n\n touchSubmit() {\n this.isTouchSubmit = true\n this.render()\n }\n\n value() {\n return {\n expiry: this.expiryInput.value,\n cvc: this.cvcInput.value,\n }\n }\n\n validate({ expiry, cvc }: { expiry: string; cvc: string }) {\n const isExpiryValid = this.validateExpiry(expiry)\n const isCvcValid = this.validateCvc(cvc)\n return isExpiryValid && isCvcValid\n }\n\n updateCardType(cardType: CardType | null) {\n this.cardType = cardType\n this.handleCvcChange(this.cvcInput.value)\n }\n\n render(): HTMLElement {\n const isExpiryTouched = this.isTouchSubmit || this.isExpiryChanged\n const isExpiryLabelError = isExpiryTouched && !this.isDisabled && this.isExpiryRequired\n const isExpiryErrorMessage = isExpiryTouched && !this.isDisabled && !!this.expiryErrorMessage\n this.toggleExpiryLabelError(isExpiryLabelError)\n this.toggleExpiryErrorMessage(isExpiryErrorMessage)\n\n if (!isExpiryLabelError && !isExpiryErrorMessage) {\n this.expiryInputContainer.classList.remove(styles.errorInput)\n this.expiryEndContent.classList.add(styles.hidden)\n } else {\n this.expiryEndContent.classList.remove(styles.hidden)\n }\n\n const isCvcTouched = this.isTouchSubmit || this.isCvcChanged\n const isCvcLabelError = isCvcTouched && !this.isDisabled && this.isCvcRequired\n const isCvcErrorMessage = isCvcTouched && !this.isDisabled && !!this.cvcErrorMessage\n this.toggleCvcLabelError(isCvcLabelError)\n this.toggleCvcErrorMessage(isCvcErrorMessage)\n\n if (!isCvcLabelError && !isCvcErrorMessage) {\n this.cvcInputContainer.classList.remove(styles.errorInput)\n this.cvcEndContent.innerHTML = ''\n this.cvcEndContent.appendChild(this.cardCvc.render())\n } else {\n this.cvcEndContent.innerHTML = ''\n this.cvcEndContent.appendChild(this.warning.render())\n }\n\n if (this.isDisabled) {\n this.expiryInputContainer.classList.add(styles.disabled)\n this.expiryInput.classList.add(styles.disabledInput)\n\n this.cvcInputContainer.classList.add(styles.disabled)\n this.cvcInput.classList.add(styles.disabledInput)\n } else {\n this.expiryInputContainer.classList.remove(styles.disabled)\n this.expiryInput.classList.remove(styles.disabledInput)\n\n this.cvcInputContainer.classList.remove(styles.disabled)\n this.cvcInput.classList.remove(styles.disabledInput)\n }\n\n return this.element\n }\n}\n","import { TranslateState } from '../../../state/translate'\nimport { WarningIcon } from '../../icons/warning.icon'\nimport styles from './error.module.css'\n\nexport class ErrorAlert {\n private readonly element: HTMLElement\n private readonly message = document.createElement('p')\n private readonly icon = new WarningIcon()\n\n constructor(private readonly translate: TranslateState) {\n this.element = document.createElement('div')\n this.element.classList.add(styles.container)\n\n this.message.classList.add(styles.title)\n this.message.textContent = translate.messages().status.error\n this.element.append(this.icon.render(), this.message)\n\n this.translate.subscribe(({ messages }) => {\n this.message.textContent = messages.status.success\n })\n }\n\n addClassName(className: string) {\n this.element.classList.add(className)\n }\n\n removeClassName(className: string) {\n this.element.classList.remove(className)\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","import { Observer } from '@ts/core/shared/state/observer'\nimport { BackButton } from './buttons/back/back.button'\nimport { SubmitButton } from './buttons/submit/submit.button'\nimport styles from './card-form.module.css'\nimport type { Listener, Unsubscribe } from '@ts/core/shared/state'\nimport { NameInput } from './inputs/name/name.input'\nimport { NumberInput } from './inputs/number/number.input'\nimport { CardSecuity } from './inputs/card-security/card-security.component'\nimport { TranslateState } from '../../state/translate'\nimport { ErrorAlert } from '../alerts/error/error.alert'\n\ntype CardInput = {\n number: string\n expiry: string\n cvc: string\n name: string\n cardBrand?: string\n}\n\nexport class CardForm {\n readonly element: HTMLElement\n private readonly error: ErrorAlert\n private readonly submit: SubmitButton\n private readonly back: BackButton\n private readonly number: NumberInput\n private readonly name: NameInput\n private readonly cardSecurity: CardSecuity\n\n private readonly events = {\n submit: new Observer<CardInput>(),\n close: new Observer<void>(),\n }\n\n constructor(translate: TranslateState, className?: string) {\n this.element = document.createElement('form')\n\n this.error = new ErrorAlert(translate)\n this.submit = new SubmitButton(translate)\n this.back = new BackButton()\n this.number = new NumberInput(translate)\n this.name = new NameInput(translate)\n this.cardSecurity = new CardSecuity(translate)\n\n this.error.addClassName(styles.hidden)\n this.element.classList.add(styles.cardForm, className || '')\n this.element.append(\n this.back.render(),\n this.number.render(),\n this.cardSecurity.render(),\n this.name.render(),\n this.error.render(),\n this.submit.render(),\n )\n\n this.back.addEventListener(() => this.events.close.emit())\n this.number.addEventListener('change', ({ cardType }) => this.cardSecurity.updateCardType(cardType || null))\n this.submit.addEventListener((e) => {\n e.preventDefault()\n const { cvc, expiry } = this.cardSecurity.value()\n const { value, cardType } = this.number.value()\n this.events.submit.emit({\n number: value,\n expiry,\n cvc,\n name: this.name.value(),\n cardBrand: cardType,\n })\n })\n }\n\n addEventListener<T extends CardInput | void>(event: keyof CardForm['events'], listener: Listener<T>): Unsubscribe {\n return this.events[event].addListener(listener as Listener<unknown>)\n }\n\n setLoading(isLoading: boolean) {\n this.cardSecurity.disable(isLoading)\n this.name.disable(isLoading)\n this.number.disable(isLoading)\n this.submit.disable(isLoading)\n }\n\n touchSubmit() {\n this.cardSecurity.touchSubmit()\n this.name.touchSubmit()\n this.number.touchSubmit()\n }\n\n validate(): boolean {\n const isNumberValid = this.number.validate(this.number.value().value)\n const isNameValid = this.name.validate(this.name.value())\n const isCardSecurityValid = this.cardSecurity.validate(this.cardSecurity.value())\n return isNumberValid && isNameValid && isCardSecurityValid\n }\n\n showError() {\n this.error.removeClassName(styles.hidden)\n }\n\n hideError() {\n this.error.addClassName(styles.hidden)\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","import styles from './icons.module.css'\n\nexport class SuccessIcon {\n private readonly template = `\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 class=${styles.success}\n >\n <path 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 '></path>\n </svg>\n <span class=\"${styles.srOnly}\">Success</span>\n `\n private readonly element = document.createElement('div')\n\n constructor() {\n this.element.classList.add(styles.successContainer)\n this.element.innerHTML = this.template\n }\n\n render() {\n return this.element\n }\n}\n","import { TranslateState } from '../../../state/translate'\nimport { SuccessIcon } from '../../icons/success.icon'\nimport styles from './success.module.css'\n\nexport class SuccessAlert {\n readonly element: HTMLElement\n private readonly message = document.createElement('p')\n private readonly icon = new SuccessIcon()\n\n constructor(private readonly translate: TranslateState) {\n this.element = document.createElement('div')\n this.element.classList.add(styles.container)\n\n this.message.classList.add(styles.title)\n this.message.textContent = translate.messages().status.success\n this.element.append(this.icon.render(), this.message)\n\n this.translate.subscribe(({ messages }) => {\n this.message.textContent = messages.status.success\n })\n }\n\n addClassName(className: string) {\n this.element.classList.add(className)\n }\n\n removeClassName(className: string) {\n this.element.classList.remove(className)\n }\n\n render(): HTMLElement {\n return this.element\n }\n}\n","import { animate } from 'motion'\nimport type { CheckoutConfig, PaymentResult } from '../checkout.interface'\nimport { Loader } from './loader/loader.component'\nimport styles from './checkout.module.css'\nimport { Buttons } from './buttons/buttons.component'\nimport { btnVariants, variants } from '../checkout.constant'\nimport { CardForm } from './card-form/card.form'\nimport { CardInput } from '@/app/module/able-pay/element/checkout/element/card'\nimport { checkoutReq, PaymentType, GooglePay, CheckoutDto, ApplePay, CheckoutResponse, TransactionConfig } from '@ts/pkg/checkout-api'\nimport { ErrorAlert } from './alerts/error/error.alert'\nimport { SuccessAlert } from './alerts/success/success.alert'\n\n// checkout component\nexport class CheckoutComponent {\n private readonly checkout: HTMLElement\n private readonly container = document.createElement('div')\n private readonly loader = new Loader()\n private readonly error: ErrorAlert\n private readonly success: SuccessAlert\n private readonly buttons: Buttons\n private readonly form: CardForm\n private isLoading = false\n private isFormOpen = false\n\n constructor(private readonly config: CheckoutConfig) {\n this.buttons = new Buttons(config)\n this.form = new CardForm(config.state.translate, styles.hidden)\n this.error = new ErrorAlert(config.state.translate)\n this.success = new SuccessAlert(config.state.translate)\n\n this.error.addClassName(styles.hidden)\n this.success.addClassName(styles.hidden)\n this.container.append(this.loader.render(), this.buttons.render(), this.form.render())\n\n this.checkout = document.createElement('div')\n this.checkout.classList.add(styles.checkout)\n this.checkout.append(this.container, this.error.render(), this.success.render())\n }\n\n // init\n async init(): Promise<void> {\n console.time('PayNext TS')\n\n this.buttons.addEventListener('ready', () => {\n this.loader.setClassName(styles.hidden)\n this.buttons.showButton()\n console.timeEnd('PayNext TS')\n })\n\n this.buttons.addEventListener('open', async () => {\n if (this.isLoading) return\n\n this.hideError()\n await animate(this.buttons.buttons, btnVariants.close, btnVariants.transition)\n this.buttons.buttons.classList.add(styles.hidden)\n\n this.form.element.classList.add(styles.formInitial)\n this.form.element.classList.remove(styles.hidden)\n await animate(this.form.element, variants.open, variants.transition)\n this.isFormOpen = true\n })\n\n this.buttons.addEventListener('error', () => {\n const { onCheckoutFail } = this.config.state.checkout.getState()\n const m = this.config.state.translate.messages()\n onCheckoutFail?.(new Error(m.status.error))\n })\n\n this.buttons.addEventListener('success', (data: unknown) => {\n const { clientToken } = this.config.state.checkout.getState()\n switch ((data as { type: 'apple' | 'google' | 'paypal' }).type) {\n case 'apple':\n return this.handleSuccess({ clientSession: clientToken, applePay: data as ApplePay })\n case 'google':\n return this.handleSuccess({ clientSession: clientToken, googlePay: data as GooglePay })\n case 'paypal':\n return this.handleSuccess({ clientSession: clientToken, paypal: { billing_agreement_token: data as { paypalId: string } } })\n }\n })\n\n this.form.addEventListener('close', async () => {\n if (this.isLoading) return\n\n this.hideError()\n await animate(this.form.element, variants.close, variants.transition)\n this.form.element.classList.add(styles.hidden)\n\n this.buttons.buttons.classList.add(styles.btnsInitial)\n this.buttons.buttons.classList.remove(styles.hidden)\n await animate(this.buttons.buttons, btnVariants.open, btnVariants.transition)\n this.isFormOpen = false\n })\n\n this.form.addEventListener('submit', async (data: CardInput) => {\n if (this.isLoading) return\n\n this.form.touchSubmit()\n\n const isValid = this.form.validate()\n if (!isValid) return\n\n const cardNumber = data.number.replace(/\\D/g, '')\n const checkout = this.config.state.checkout.getState()\n const ev = this.config.service.ev.getEv()\n\n const [evNumber, evCvc] = await Promise.all([ev.encrypt(cardNumber), ev.encrypt(data.cvc)])\n const [expMonth, expYear] = data.expiry.split('/')\n\n await this.handleSuccess({\n clientSession: checkout.clientToken,\n card: {\n firstSixDigits: cardNumber.slice(0, 6),\n lastFourDigits: cardNumber.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?.userAgent,\n },\n },\n })\n })\n\n await this.buttons.init()\n }\n\n // handle error\n private handleError(e: unknown) {\n const checkout = this.config.state.checkout.getState()\n const m = this.config.state.translate.messages()\n\n console.error(e)\n\n this.showError()\n checkout.onCheckoutFail?.(new Error(m.status.error))\n this.setLoading(false)\n }\n\n // handle success\n private async handleSuccess(data: CheckoutDto): Promise<void> {\n if (this.isLoading) return\n\n this.hideError()\n this.setLoading(true)\n\n const checkout = this.config.state.checkout.getState()\n const transaction = this.config.state.transaction.getState()\n const m = this.config.state.translate.messages()\n\n try {\n const res = await checkoutReq(data)\n\n if (res.error) {\n throw new Error(m.status.error)\n }\n\n if (res.three_ds_session_id) {\n await this.config.service.ev.initThreeDs({\n threeDsId: res.three_ds_session_id,\n onSuccess: () => {\n this.setLoading(false)\n this.handleSuccess({ ...data, threeDsSessionId: res.three_ds_session_id })\n },\n onError: () => {\n this.handleError('Three DS Error')\n },\n })\n return\n }\n\n this.showSuccess()\n \n const paymentResult: PaymentResult = this.createPaymentResult(data, res, transaction)\n \n checkout.onCheckoutComplete?.(paymentResult)\n this.setLoading(false)\n } catch (e) {\n this.handleError(e)\n }\n }\n\n // Create payment result\n private createPaymentResult(data: CheckoutDto, response: CheckoutResponse, transaction: TransactionConfig | null): PaymentResult {\n const locale = this.config.state.translate.locale()\n const now = new Date().toISOString()\n\n let paymentMethod: PaymentResult['paymentMethod'] = 'card'\n if (data.applePay) paymentMethod = 'apple_pay'\n else if (data.googlePay) paymentMethod = 'google_pay'\n else if (data.paypal) paymentMethod = 'paypal'\n\n const result: PaymentResult = {\n paymentMethod,\n clientSession: data.clientSession,\n status: response.data,\n metadata: {\n timestamp: now,\n userAgent: navigator?.userAgent,\n locale,\n }\n }\n\n if (transaction?.amount && transaction?.currency) {\n result.amount = {\n value: transaction.amount,\n currency: transaction.currency\n }\n }\n\n if (data.card) {\n result.paymentDetails = {\n card: {\n brand: data.card.cardBrand,\n lastFour: data.card.lastFourDigits,\n expMonth: data.card.expMonth,\n expYear: data.card.expYear,\n funding: data.card.funding,\n country: data.card.country\n }\n }\n\n if (data.card.metadata?.name) {\n result.billingAddress = {\n name: data.card.metadata.name as string\n }\n }\n }\n\n if (data.applePay) {\n result.paymentDetails = {\n applePay: {\n network: data.applePay.card?.brand || 'unknown',\n lastFour: data.applePay.card?.lastFour\n }\n }\n\n if (data.applePay.billingContact) {\n const billing = data.applePay.billingContact\n result.billingAddress = {\n name: billing.givenName && billing.familyName ? `${billing.givenName} ${billing.familyName}` : billing.givenName || billing.familyName,\n line1: billing.addressLines?.[0],\n line2: billing.addressLines?.[1],\n city: billing.locality,\n state: billing.administrativeArea,\n postalCode: billing.postalCode,\n country: billing.countryCode\n }\n\n if (result.paymentDetails?.applePay) {\n result.paymentDetails.applePay.billingContact = {\n name: result.billingAddress.name,\n email: data.applePay.shippingContact?.emailAddress,\n phone: data.applePay.shippingContact?.phoneNumber\n }\n }\n }\n }\n\n if (data.googlePay) {\n result.paymentDetails = {\n googlePay: {\n network: data.googlePay.card?.brand || 'unknown',\n lastFour: data.googlePay.card?.lastFour\n }\n }\n\n if (data.googlePay.billingAddress) {\n const billing = data.googlePay.billingAddress\n result.billingAddress = {\n name: billing.name,\n line1: billing.address1,\n line2: billing.address2,\n city: billing.locality,\n state: billing.administrativeArea,\n postalCode: billing.postalCode,\n country: billing.countryCode\n }\n }\n }\n\n if (data.paypal) {\n result.paymentDetails = {\n paypal: {\n payerId: data.paypal.billing_agreement_token?.paypalId\n }\n }\n }\n\n return result\n }\n\n // show success\n private async showSuccess() {\n this.container.classList.add(styles.hidden)\n this.error.addClassName(styles.hidden)\n this.success.removeClassName(styles.hidden)\n\n await animate(this.success.element, variants.open, variants.transition)\n }\n\n // hide error\n private hideError() {\n this.error.addClassName(styles.hidden)\n this.form.hideError()\n }\n\n // show error\n private showError() {\n if (!this.isFormOpen) {\n this.error.removeClassName(styles.hidden)\n }\n\n this.form.showError()\n }\n\n // set loading\n private setLoading(isLoading: boolean) {\n this.isLoading = isLoading\n this.form.setLoading(isLoading)\n this.loader.setClassName(!isLoading || this.isFormOpen ? styles.hidden : '')\n }\n\n // render\n render(): HTMLElement {\n return this.checkout\n }\n}\n","import { CheckoutComponent } from './ui/checkout.component'\nimport type { CheckoutConfig } from './checkout.interface'\n\n// checkout module\nexport class CheckoutModule {\n private readonly component: CheckoutComponent\n\n constructor(private readonly config: CheckoutConfig) {\n this.component = new CheckoutComponent(config)\n }\n\n // init\n async init(): Promise<void> {\n const { checkout, transaction, translate, styles } = this.config.state\n checkout.subscribe(({ clientToken, locale, translate: messages, styles: customStyles }) => {\n if (locale && translate.locale() !== locale) {\n translate.setLocale(locale)\n }\n\n if (messages && translate.overrides() !== messages) {\n translate.setMessages(messages)\n }\n\n if (customStyles) {\n styles.setState(customStyles)\n }\n\n transaction\n .updateTransaction(clientToken)\n .then((config) => {\n if (!config) return\n return this.config.service.ev.initEv({\n teamId: config.evervault?.team_id,\n appId: config.evervault?.app_id,\n })\n })\n .catch(console.error)\n })\n }\n\n // mount\n async mount(): Promise<HTMLElement> {\n await this.init()\n await this.component.init()\n\n return this.component.render()\n }\n}\n","import { Observer } from './observer'\nimport type { Listener, Unsubscribe } from './types'\n\nexport abstract class State<TState> {\n private readonly initialState: TState\n private state: TState\n private readonly observer = new Observer<TState>()\n\n constructor(state: TState) {\n this.initialState = state\n this.state = state\n }\n\n getState(): TState {\n return this.state\n }\n\n setState(state: TState): void {\n this.state = state\n this.observer.emit(state)\n }\n\n clearState(): void {\n this.state = this.initialState\n this.observer.clear()\n }\n\n subscribe(listener: Listener<TState>): Unsubscribe {\n return this.observer.addListener(listener)\n }\n}\n","import { State } from '../../../shared/state'\nimport type { PayNextConfig } from '../checkout.interface'\n\nconst initialCheckoutState: PayNextConfig = {\n clientToken: '',\n}\n\nexport class CheckoutState extends State<PayNextConfig> {\n constructor(state?: PayNextConfig) {\n super(state || initialCheckoutState)\n }\n}\n","import { State } from '../../../shared/state'\nimport type { StylesConfig } from '../checkout.interface'\n\nconst initialStylesState: StylesConfig = {}\n\nexport class StylesState extends State<StylesConfig> {\n constructor(state?: StylesConfig) {\n super(state || initialStylesState)\n }\n}\n","import { State } from '@ts/core/shared/state'\nimport { configReq, type TransactionConfig } from '@ts/pkg/checkout-api'\n\nexport class TransactionState extends State<TransactionConfig | null> {\n private clientToken = ''\n\n constructor(state?: TransactionConfig) {\n super(state || null)\n }\n\n async updateTransaction(clientToken: string): Promise<TransactionConfig | null> {\n if (this.clientToken === clientToken) return this.getState()\n this.clientToken = clientToken\n const transaction = await configReq(clientToken)\n this.setState(transaction)\n return transaction\n }\n}\n","import type { CheckoutTranslate, DeepPartial, Locale } 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 const getDefaultTranslates = (): CheckoutTranslate => {\n const lang = navigator?.language.split('-')[0]\n return i18n[lang as Locale] || i18n.en\n}\n\nexport const getTranslates = (\n locale?: Locale,\n overrides: DeepPartial<CheckoutTranslate> = {},\n): CheckoutTranslate => {\n if (!locale) return getDefaultTranslates()\n const messages = i18n[locale] || getDefaultTranslates()\n return {\n card: {\n title: overrides?.card?.title || messages.card.title,\n number: {\n label: overrides?.card?.number?.label || messages.card.number.label,\n error: {\n required: overrides?.card?.number?.error?.required || messages.card.number.error.required,\n invalid: overrides?.card?.number?.error?.invalid || messages.card.number.error.invalid,\n incomplete:\n overrides?.card?.number?.error?.incomplete || messages.card.number.error.incomplete,\n unsupported:\n overrides?.card?.number?.error?.unsupported || messages.card.number.error.unsupported,\n },\n },\n expiry: {\n label: overrides?.card?.expiry?.label || messages.card.expiry.label,\n placeholder: overrides?.card?.expiry?.placeholder || messages.card.expiry.placeholder,\n error: {\n required: overrides?.card?.expiry?.error?.required || messages.card.expiry.error.required,\n invalid: overrides?.card?.expiry?.error?.invalid || messages.card.expiry.error.invalid,\n incomplete:\n overrides?.card?.expiry?.error?.incomplete || messages.card.expiry.error.incomplete,\n expired: overrides?.card?.expiry?.error?.expired || messages.card.expiry.error.expired,\n },\n },\n cvc: {\n label: overrides?.card?.cvc?.label || messages.card.cvc.label,\n placeholder: overrides?.card?.cvc?.label || messages.card.cvc.label,\n error: {\n required: overrides?.card?.cvc?.label || messages.card.cvc.label,\n incomplete: overrides?.card?.cvc?.label || messages.card.cvc.label,\n invalid: overrides?.card?.cvc?.label || messages.card.cvc.label,\n },\n },\n name: {\n label: overrides?.card?.name?.label || messages.card.name.label,\n placeholder: overrides?.card?.name?.placeholder || messages.card.name.placeholder,\n error: {\n required: overrides?.card?.name?.error?.required || messages.card.name.error.required,\n invalid: overrides?.card?.name?.error?.invalid || messages.card.name.error.invalid,\n },\n },\n pay: {\n button: overrides?.card?.pay?.button || messages.card.pay.button,\n },\n compact: {\n button: overrides?.card?.compact?.button || messages.card.compact.button,\n },\n },\n status: {\n success: overrides?.status?.success || messages.status.success,\n error: overrides?.status?.error || messages.status.error,\n },\n }\n}\n","import type { 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}\n","import type { 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:\n 'We are unable to authenticate your payment method. Please choose a different payment method and try again.',\n },\n}\n","import type { 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}\n","import type { 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:\n '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 type { 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:\n 'Vi kan ikke godkende din betalingsmetode. Vælg venligst en anden betalingsmetode og prøv igen.',\n },\n}\n","import type { 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 type { 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}\n","import type { 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:\n 'No podemos autenticar su método de pago. Elija otro método de pago e inténtelo de nuevo.',\n },\n}\n","import type { 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:\n 'Me ei suuda teie makseviisi autentida. Palun valige teine makseviis ja proovige uuesti.',\n },\n}\n","import type { 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 type { 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:\n 'Hindi namin ma-authenticate ang iyong paraan ng pagbabayad. Mangyaring pumili ng ibang paraan ng pagbabayad at subukang muli.',\n },\n}\n","import type { 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 type { 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:\n '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 type { 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:\n '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 type { 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:\n 'Kami tidak dapat mengautentikasi metode pembayaran Anda. Silakan pilih metode pembayaran lain dan coba lagi.',\n },\n}\n","import type { 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:\n 'Non siamo in grado di autenticare il suo metodo di pagamento. Scegliere un altro metodo di pagamento e riprovare.',\n },\n}\n","import type { 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 type { 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 type { 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:\n 'Negalime patvirtinti jūsų mokėjimo būdo. Pasirinkite kitą mokėjimo būdą ir bandykite dar kartą.',\n },\n}\n","import type { 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 type { 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:\n 'Kami tidak dapat mengesahkan kaedah pembayaran anda. Sila pilih kaedah pembayaran lain dan cuba lagi.',\n },\n}\n","import type { 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}\n","import type { 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 type { 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:\n 'Vi kan ikke godkjenne betalingsmåten din. Vennligst velg en annen betalingsmetode og prøv på nytt.',\n },\n}\n","import type { 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:\n 'We kunnen je betaalmethode niet verifiëren. Kies een andere betaalmethode en probeer het opnieuw.',\n },\n}\n","import type { 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:\n 'Nie możemy uwierzytelnić metody płatności. Wybierz inną metodę płatności i spróbuj ponownie.',\n },\n}\n","import type { 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 'Não foi possível autenticar o seu método de pagamento. Selecione outro método de pagamento e tente novamente.',\n },\n}\n","import type { 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:\n '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 type { 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 type { 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:\n 'Vašega načina plačila ne moremo preveriti. Izberite drug način plačila in poskusite znova.',\n },\n}\n","import type { 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:\n 'Vi kan inte verifiera din betalningsmetod. Vänligen välj en annan betalningsmetod och försök igen.',\n },\n}\n","import type { 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}\n","import type { 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:\n 'Ödeme yönteminizi doğrulayamıyoruz. Lütfen farklı bir ödeme yöntemi seçin ve tekrar deneyin.',\n },\n}\n","import type { 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:\n '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 type { 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 { State } from '@ts/core/shared/state'\nimport type { CheckoutTranslate, CheckoutTranslateState, DeepPartial, Locale } from './translate.interface'\nimport { getDefaultTranslates, getTranslates} from './i18n/i18n'\n\nexport class TranslateState extends State<CheckoutTranslateState> {\n constructor() {\n super({\n messages: getDefaultTranslates(),\n locale: (navigator?.language.split('-')[0] as Locale) || 'en',\n })\n }\n\n setMessages(overrides: DeepPartial<CheckoutTranslate>): void {\n const locale = this.locale()\n const messages = getTranslates(locale, overrides)\n this.setState({ locale, messages, overrides })\n }\n\n setLocale(locale: Locale): void {\n const overrides = this.overrides()\n const messages = getTranslates(locale, overrides)\n this.setState({ locale, messages, overrides })\n }\n\n overrides(): DeepPartial<CheckoutTranslate> | undefined {\n const { overrides } = this.getState()\n return overrides\n }\n\n messages(): CheckoutTranslate {\n const { messages } = this.getState()\n return messages\n }\n\n locale(): Locale {\n const { locale } = this.getState()\n return locale\n }\n\n dir(): 'rtl' | 'ltr' {\n return this.locale() === 'ar' ? 'rtl' : 'ltr'\n }\n}\n","/*!\n * paypal-js v8.2.0 (2025-01-23T17:26:53.747Z)\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 * http://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 */\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nfunction findScript(url, attributes) {\n var currentScript = document.querySelector(\"script[src=\\\"\".concat(url, \"\\\"]\"));\n if (currentScript === null)\n return null;\n var nextScript = createScriptElement(url, attributes);\n // ignore the data-uid-auto attribute that gets auto-assigned to every script tag\n var currentScriptClone = currentScript.cloneNode();\n delete currentScriptClone.dataset.uidAuto;\n // check if the new script has the same number of data attributes\n if (Object.keys(currentScriptClone.dataset).length !==\n Object.keys(nextScript.dataset).length) {\n return null;\n }\n var isExactMatch = true;\n // check if the data attribute values are the same\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, attributes = _a.attributes, onSuccess = _a.onSuccess, 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, environment = _a.environment, options = __rest(_a, [\"sdkBaseUrl\", \"environment\"]);\n var sdkBaseUrl = customSdkBaseUrl || processSdkBaseUrl(environment);\n var optionsWithStringIndex = options;\n var _b = Object.keys(optionsWithStringIndex)\n .filter(function (key) {\n return (typeof optionsWithStringIndex[key] !== \"undefined\" &&\n optionsWithStringIndex[key] !== null &&\n optionsWithStringIndex[key] !== \"\");\n })\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 }\n else {\n accumulator.queryParams[key] = value;\n }\n return accumulator;\n }, {\n queryParams: {},\n attributes: {},\n }), queryParams = _b.queryParams, attributes = _b.attributes;\n if (queryParams[\"merchant-id\"] &&\n 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)\n queryString += \"&\";\n queryString += key + \"=\" + params[key];\n });\n return queryString;\n}\nfunction processSdkBaseUrl(environment) {\n // Keeping production as default to maintain backward compatibility.\n // In the future this logic needs to be changed to use sandbox domain as default instead of production.\n return environment === \"sandbox\"\n ? \"https://www.sandbox.paypal.com/sdk/js\"\n : \"https://www.paypal.com/sdk/js\";\n}\nfunction createScriptElement(url, attributes) {\n if (attributes === void 0) { attributes = {}; }\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}\n\n/**\n * Load the Paypal JS SDK script asynchronously.\n *\n * @param {Object} options - used to configure query parameters and data attributes for the JS SDK.\n * @param {PromiseConstructor} [PromisePonyfill=window.Promise] - optional Promise Constructor ponyfill.\n * @return {Promise<Object>} paypalObject - reference to the global window PayPal object.\n */\nfunction loadScript(options, PromisePonyfill) {\n if (PromisePonyfill === void 0) { PromisePonyfill = Promise; }\n validateArguments(options, PromisePonyfill);\n // resolve with null when running in Node or Deno\n if (typeof document === \"undefined\")\n return PromisePonyfill.resolve(null);\n var _a = processOptions(options), url = _a.url, 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 // resolve with the existing global paypal namespace when a script with the same params already exists\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}\n/**\n * Load a custom script asynchronously.\n *\n * @param {Object} options - used to set the script url and attributes.\n * @param {PromiseConstructor} [PromisePonyfill=window.Promise] - optional Promise Constructor ponyfill.\n * @return {Promise<void>} returns a promise to indicate if the script was successfully loaded.\n */\nfunction loadCustomScript(options, PromisePonyfill) {\n if (PromisePonyfill === void 0) { PromisePonyfill = Promise; }\n validateArguments(options, PromisePonyfill);\n var url = options.url, 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 // resolve with undefined when running in Node or Deno\n if (typeof document === \"undefined\")\n return resolve();\n insertScriptElement({\n url: url,\n attributes: attributes,\n onSuccess: function () { return resolve(); },\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 &&\n environment !== \"production\" &&\n environment !== \"sandbox\") {\n throw new Error('The `environment` option must be either \"production\" or \"sandbox\".');\n }\n if (typeof PromisePonyfill !== \"undefined\" &&\n typeof PromisePonyfill !== \"function\") {\n throw new Error(\"Expected PromisePonyfill to be a function.\");\n }\n}\n\n// replaced with the package.json version at build time\nvar version = \"8.2.0\";\n\nexport { loadCustomScript, loadScript, version };\n","import type { PayPalButtonStyle } from '@paypal/paypal-js'\n\nexport const stylesPaypal: PayPalButtonStyle = {\n layout: 'vertical',\n tagline: false,\n height: 40,\n borderRadius: 12,\n}\n","import {\n loadScript,\n type PayPalButtonsComponentOptions,\n type PayPalNamespace,\n type PayPalScriptOptions,\n} from '@paypal/paypal-js'\nimport { stylesPaypal } from './paypal.constant'\n\n// paypal service\nexport class PayPalService {\n private paypal: PayPalNamespace | null = null\n\n // init\n async init(config: PayPalScriptOptions) {\n try {\n this.paypal = await loadScript(config)\n } catch (err) {\n console.error('failed to load the PayPal JS SDK script', err)\n }\n }\n\n // render\n async render(parent: HTMLElement, options?: PayPalButtonsComponentOptions) {\n if (this.paypal) {\n await this.paypal\n .Buttons?.({\n fundingSource: 'paypal',\n style: stylesPaypal,\n ...options,\n })\n .render(parent)\n }\n }\n}\n","import { EvService } from '@ts/pkg/evervault'\nimport { CheckoutModule } from './modules/checkout'\nimport { CheckoutState } from './modules/checkout/state/checkout.state'\nimport { StylesState } from './modules/checkout/state/styles.state'\nimport { TransactionState } from './modules/checkout/state/transaction.state'\nimport { TranslateState } from './modules/checkout/state/translate'\nimport { PayPalService } from '@ts/pkg/paypal'\n\n// core module\nexport class Core {\n readonly ev = new EvService()\n readonly paypal = new PayPalService()\n readonly state = {\n translate: new TranslateState(),\n checkout: new CheckoutState(),\n transaction: new TransactionState(),\n styles: new StylesState(),\n }\n readonly checkout = new CheckoutModule({\n state: this.state,\n service: { ev: this.ev, paypal: this.paypal },\n })\n\n clearState() {\n Object.values(this.state).forEach((state) => state.clearState())\n }\n}\n","import type { PayNextConfig } from '@ts/core/modules/checkout/checkout.interface'\nimport { Core } from '../../core'\n\nexport class PayNextCheckout {\n private readonly parent: HTMLElement\n private readonly core = new Core()\n\n constructor(parent: HTMLElement) {\n this.parent = parent\n }\n\n async mount(config: PayNextConfig): Promise<void> {\n const node = await this.core.checkout.mount()\n this.parent.innerHTML = ''\n this.parent.appendChild(node)\n this.core.state.checkout.setState(config)\n }\n\n async unmount(): Promise<void> {\n this.parent.innerHTML = ''\n this.core.clearState()\n }\n}\n"],"names":["t","i","__async","n","r","e","o","l","a","ApplePay$1","ev","__publicField","_0","transaction","locale","supportedCardTypes","onReady","onError","onSuccess","onCancel","evTransaction","_1","paymentData","fail","error","availability","parent","_a","GooglePay$1","Observer","listener","data","ThreeDs","threeDsId","EvService","teamId","appId","_b","config","loadEvervault","ApplePay","GooglePay","event","isDOMKeyframes","keyframes","resolveElements","elementOrSelector","scope","selectorCache","root","elements","resolveSubjects","subject","calculateRepeatDuration","duration","repeat","_repeatDelay","calcNextTime","current","next","prev","labels","mixNumber","from","to","progress","wrap","min","max","v","rangeSize","isEasingArray","ease","getEasingForSegment","easing","addUniqueItem","arr","item","removeItem","index","eraseKeyframes","sequence","startTime","endTime","keyframe","addKeyframes","offset","normalizeTimes","times","compareByTime","b","isMotionValue","value","toFromDifference","fillOffset","remaining","offsetProgress","defaultOffset","isGenerator","type","maxGeneratorDuration","calcGeneratorDuration","generator","timeStep","state","secondsToMilliseconds","seconds","millisecondsToSeconds","milliseconds","createGeneratorEasing","options","scale","createGenerator","__spreadProps","__spreadValues","warning","invariant","check","message","defaultSegmentEasing","MAX_REPEAT","createAnimationsFromSequence","generators","defaultTransition","sequenceTransition","__objRest","defaultDuration","animationDefinitions","sequences","elementCache","timeLabels","prevTime","currentTime","totalDuration","segment","transition","maxDuration","resolveValueSequence","valueKeyframes","valueTransition","valueSequence","elementIndex","numSubjects","valueKeyframesAsList","keyframesAsList","delay","repeatType","repeatDelay","remainingTransition","calculatedDelay","numKeyframes","absoluteDelta","isNumberKeyframesArray","delta","springTransition","springEasing","remainder","originalKeyframes","originalTimes","originalEase","repeatIndex","keyframeIndex","targetTime","subjectSequence","getSubjectSequence","getValueSequence","subjects","subjectIndex","thisSubject","key","getValueTransition","valueSequences","element","valueOffset","valueEasing","at","definition","name","isNumber","visualElementStore","isKeyframesTarget","getValueState","visualElement","resolveVariantFromProps","props","custom","velocity","resolveVariant","stepsOrder","createRenderStep","runNextFrame","stepName","thisFrame","nextFrame","isProcessing","flushNextFrame","toKeepAlive","latestFrameData","triggerCallback","callback","step","keepAlive","immediate","queue","frameData","MotionGlobalConfig","maxElapsed","createRenderBatcher","scheduleNextBatch","allowKeepAlive","useDefaultElapsed","flagRunNextFrame","steps","acc","setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender","processBatch","timestamp","wake","process","noop","any","frame","cancelFrame","now","clearTime","time","newTime","warned","warnOnce","condition","SubscriptionManager","handler","c","numSubscriptions","velocityPerSecond","frameDuration","MAX_VELOCITY_DELTA","isFloat","MotionValue","init","dependent","prevFrameValue","subscription","eventName","unsubscribe","eventManagers","passiveEffect","stopPassiveEffect","endAnimation","startAnimation","resolve","motionValue","setMotionValue","resolveFinalValueInKeyframes","setTarget","transitionEnd","target","isWillChangeMotionValue","addValueToWillChange","willChange","newWillChange","camelToDash","str","optimizedAppearDataAttribute","getOptimisedAppearId","isNotNull","getFinalKeyframe","finalKeyframe","resolvedKeyframes","transformPropOrder","transformProps","underDampedSpring","criticallyDampedSpring","keyframesTransition","getDefaultTransition","valueKey","isTransitionDefined","_c","_d","when","_delay","delayChildren","staggerChildren","staggerDirection","elapsed","checkStringStartsWith","token","isCSSVariableName","startsAsVariableToken","isCSSVariableToken","singleCssVariableRegex","clamp","number","alpha","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","color","colorRegex","test","NUMBER_TOKEN","COLOR_TOKEN","VAR_TOKEN","VAR_FUNCTION_TOKEN","SPLIT_TOKEN","complexRegex","analyseComplexValue","originalValue","values","indexes","types","split","parsedValue","parseComplexValue","createTransformer","source","numSections","output","convertNumbersToZero","getAnimatableNone","parsed","complex","hueToRgb","p","q","hslaToRgba","mixImmediate","mixLinearColor","fromExpo","expo","colorTypes","getColorType","asRGBA","model","mixColor","fromRGBA","toRGBA","blended","invisibleValues","mixVisibility","origin","combineFunctions","pipe","transformers","mixNumber$1","getMixer","mixComplex","mixArray","mixObject","numValues","blendValue","matchOrder","orderedOrigin","pointers","originIndex","originValue","template","originStats","targetStats","mix","frameloopDriver","passTimestamp","generateLinearEasing","resolution","points","numPoints","velocitySampleDuration","calcGeneratorVelocity","resolveValue","prevT","springDefaults","safeMin","findSpring","bounce","mass","envelope","derivative","dampingRatio","undampedFreq","exponentialDecay","calcAngularFreq","d","f","initialGuess","approximateRoot","stiffness","rootIterations","result","durationKeys","physicsKeys","isSpringType","keys","getSpringOptions","springOptions","visualDuration","damping","derived","spring","optionsOrVisualDuration","restSpeed","restDelta","isResolvedFromDuration","initialVelocity","initialDelta","undampedAngularFreq","isGranularScale","resolveSpring","angularFreq","dampedAngularFreq","freqForT","currentVelocity","isBelowVelocityThreshold","isBelowDisplacementThreshold","calculatedDuration","generatorOptions","inertia","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","convertOffsetToTimes","calcBezier","a1","a2","subdivisionPrecision","subdivisionMaxIterations","binarySubdivide","x","lowerBound","upperBound","mX1","mX2","currentX","currentT","cubicBezier","mY1","mY2","getTForX","aX","easeIn","easeOut","easeInOut","mirrorEasing","reverseEasing","backOut","backIn","backInOut","anticipate","circIn","circOut","circInOut","isBezierDefinition","easingLookup","isValidEasing","easingDefinitionToFunction","x1","y1","x2","y2","defaultEasing","keyframeValues","easingFunctions","absoluteTimes","mapTimeToKeyframe","speed","transitionTypeMap","replaceTransitionType","WithPromise","onResolve","onReject","percentToProgress","JSAnimation","keyframes$1","generatorFactory","animationTime","sample","mixKeyframes","mirroredGenerator","resolvedDuration","onUpdate","timeWithoutDelay","isInDelayPhase","frameGenerator","currentIteration","iterationProgress","done","isAnimationFinished","reject","newSpeed","hasChanged","driver","sampleTime","timeline","fillWildcards","radToDeg","rad","rotate","angle","rebaseAngle","matrix2dParsers","rotateZ","scaleX","scaleY","matrix3dParsers","defaultTransformValue","parseValueFromTransform","transform","matrix3dMatch","parsers","match","matrix2dMatch","valueParser","convertTransformToNumber","readTransformValue","instance","isNumOrPxType","transformKeys","nonTranslationalTransformKeys","removeNonTranslationalTransform","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","memo","supportsScrollTimeline","supportsFlags","memoSupports","supportsFlag","memoized","supportsLinearEasing","cubicBezierAsString","supportedWaapiEasing","mapEasingToNativeEasing","segmentEasing","startWaapiAnimation","valueName","pseudoElement","keyframeOptions","applyGeneratorOptions","_e","_f","NativeAnimation","allowFlatten","newStartTime","observe","unsupportedEasingFunctions","isUnsupportedEase","replaceStringEasing","sampleDelta","NativeAnimationExtended","sampleAnimation","isAnimatable","hasKeyframesChanged","canAnimate","originKeyframe","targetKeyframe","isOriginAnimatable","isTargetAnimatable","isObject","isHTMLElement","acceleratedValues","supportsWaapi","supportsBrowserAnimation","transformTemplate","MAX_RESOLVE_DELAY","AsyncMotionValueAnimation","_g","_h","autoplay","optionsWithDefaults","KeyframeResolver$1","forced","sync","isHandoff","resolvedOptions","animation","_onReject","animateMotionValue","shouldSkip","positionalKeys","shouldBlockAnimation","protectedKeys","needsAnimating","shouldBlock","animateTarget","targetAndTransition","transitionOverride","animations","animationTypeState","valueTarget","appearId","convertBoundingBoxToBox","right","bottom","transformBoxPoints","point","transformPoint","topLeft","bottomRight","measureViewportBox","featureProps","featureDefinitions","createAxis","createBox","isBrowser","prefersReducedMotion","hasReducedMotionListener","initPrefersReducedMotion","motionMediaQuery","setReducedMotionPreferences","isAnimationControls","isVariantLabel","variantProps","isControllingVariants","isVariantNode","updateMotionValuesFromProps","nextValue","prevValue","existingValue","latestValue","isNumericalString","isZeroValueString","auto","testValueType","dimensionValueTypes","findDimensionValueType","valueTypes","findValueType","maxDefaults","applyDefaultFilter","defaultValue","functionRegex","filter","functions","int","numberValueTypes","defaultValueTypes","getDefaultValueType","defaultValueType","propEventHandlers","VisualElement","_props","_prevProps","_visualElement","presenceContext","reducedMotionConfig","blockInitialAnimation","visualState","latestValues","renderState","initialMotionValues","remove","feature","valueIsTransform","removeOnChange","removeOnRenderRequest","removeSyncCheck","other","featureDefinition","isEnabled","FeatureConstructor","listenerName","child","closestVariantNode","initial","valueFromInitial","variant","args","splitCSSVariableRegex","parseCSSVariable","token1","token2","fallback","maxDepth","getVariableValue","depth","resolved","trimmed","isNone","invalidTemplates","makeNoneKeyframesAnimatable","noneKeyframeIndexes","animatableTemplate","noneIndex","DOMKeyframesResolver","originType","targetType","measureKeyframe","finalKeyframeIndex","unsetTransformName","unsetTransformValue","DOMVisualElement","vars","style","children","getValueAsType","translateAlias","numTransforms","buildTransform","transformString","transformIsDefault","valueIsDefault","valueAsType","transformName","buildHTMLStyles","transformOrigin","hasTransform","hasTransformOrigin","originX","originY","originZ","renderHTML","styleProp","projection","scaleCorrectors","isForcedMotionValue","layout","layoutId","scrapeMotionValuesFromProps","prevProps","newValues","getComputedStyle","HTMLVisualElement","computedStyle","transformPagePoint","isObjectKey","object","ObjectVisualElement","dashKeys","camelKeys","buildSVGPath","attrs","length","spacing","useDashCase","pathLength","pathSpacing","buildSVGAttrs","_i","isSVGTag","_j","attrX","attrY","attrScale","pathOffset","camelCaseAttributes","tag","renderSVG","_styleProp","scrapeMotionValuesFromProps$1","targetKey","SVGVisualElement","defaultType","isSVGElement","isSVGSVGElement","createDOMVisualElement","node","createObjectVisualElement","animateSingleValue","motionValue$1","isSingleValue","animateSubject","createVisualElement","animateSequence","GroupAnimation","propName","newValue","subscriptions","cancel","methodName","controls","GroupAnimationWithThen","isSequence","createScopedAnimate","scopedAnimate","subjectOrSequence","optionsOrKeyframes","animate","SpinnerIcon","styles","className","Loader","defaultCheckoutConfig","variants","btnVariants","labelVariants","errorVariants","cardTypes","cardTypes_1","clone_1","clone","originalObject","matches_1","matchesRange","cardNumber","maxLengthToCheck","substr","integerRepresentationOfCardNumber","matchesPattern","pattern","matches","addMatchingCardsToResults_1","require$$0","require$$1","addMatchingCardsToResults","cardConfiguration","results","patternLength","clonedCardConfiguration","isValidInputType_1","isValidInputType","findBestMatch_1","hasEnoughResultsToDetermineBestMatch","numberOfResultsWithMaxStrengthProperty","findBestMatch","bestMatch","__assign","this","s","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","month","monthNumber","lastSymbol","year","InputError","CardType","detectCardType","getCardTypes","isValidLuhn","sum","isEven","digit","validateCardNumber","cleanNumber","transactionConfigToGooglePay","is_active","transactionConfigToApplePay","mapCardTypeToAppleCardNetwork","PayPal","paypal","billingToken","localeToAppleLocale","localeToGoogleLocale","CardIcon","CardButton","translate","text","messages","merge","arr1","arr2","equal","i1","i2","initialCheckoutConfig","checkoutReq","url","headers","_l","_k","_n","_m","_p","_o","_r","_q","_u","_t","_s","_w","_v","_z","_y","_x","_B","_A","_D","_C","_F","_E","_H","_G","_J","_I","_K","_L","_M","_N","_P","_O","_R","_Q","_S","_U","_T","_W","_V","_X","_Z","_Y","_$","__","_aa","_ca","_ba","_ea","_da","_fa","_ha","_ga","_ja","_ia","_ka","_ma","_la","_oa","_na","_pa","_qa","_sa","_ra","_ta","_va","_ua","_wa","_ya","_xa","_za","_Ba","_Aa","_Ca","_Ea","_Da","_Ga","_Fa","_Ha","_Ja","_Ia","_Ka","_La","_Na","_Ma","_Oa","_Qa","_Pa","_Ra","_Ta","_Sa","_Va","_Ua","_Ya","_Xa","_Wa","_$a","__a","_Za","_bb","_ab","_db","_cb","paypalAgreementReq","clientToken","configReq","PaymentType","Buttons","appleTransaction","err","googleTransaction","createBillingAgreement","paypalId","promises","BackIcon","BackButton","SubmitButton","isDisabled","WarningIcon","NameInput","m","isInputError","UnknownCardIcon","AmexIcon","DinersClubIcon","DiscoverIcon","JcbIcon","MasterCardIcon","UnionPayIcon","VisaIcon","NumberInput","isLabelError","isErrorMessage","isValid","isTouched","CardCvcIcon","CardSecuity","expiryErrorWrapper","cvcErrorWrapper","isEmpty","isIncomplete","errMessage","date","isExpired","isExpiryValid","isCvcValid","isExpiryTouched","isExpiryLabelError","isExpiryErrorMessage","isCvcTouched","isCvcLabelError","isCvcErrorMessage","ErrorAlert","CardForm","isLoading","isNumberValid","isNameValid","isCardSecurityValid","SuccessIcon","SuccessAlert","CheckoutComponent","onCheckoutFail","checkout","evNumber","evCvc","expMonth","expYear","res","paymentResult","response","paymentMethod","billing","CheckoutModule","customStyles","State","initialCheckoutState","CheckoutState","initialStylesState","StylesState","TransactionState","i18n","getDefaultTranslates","lang","getTranslates","overrides","TranslateState","__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","namespace","existingWindowNamespace","getPayPalWindowNamespace","loadCustomScript","newWindowNamespace","defaultError","stylesPaypal","PayPalService","Core","PayNextCheckout"],"mappings":";2CAAA,IAAIA,EAAI,KACR,SAAeC,GAAI,QAAAC,EAAA,sBACjB,OAAOF,IAAMA,EAAI,IAAI,QAAQ,CAACG,EAAGC,IAAM,CACrC,MAAMC,EAAI,SAAS,cAAc,QAAQ,EACzC,GAAIA,EAAE,IAAM,8BAA+BA,EAAE,OAAS,IAAMF,EAAG,EAAEE,EAAE,QAAU,IAAM,CACjFL,EAAI,KAAMI,EAAG,CACnB,EAAO,CAAC,SAAS,KACX,MAAM,IAAI,MACR,gFACD,EACH,SAAS,KAAK,YAAYC,CAAC,CAC5B,CAAA,EAAGL,EACN,GACA,SAAeM,IAAI,QAAAJ,EAAA,sBACjB,GAAI,OAAO,UACT,OAAO,OAAO,UAChB,GAAI,CACF,OAAO,MAAMD,IAAK,OAAO,SAC7B,OAAUI,EAAA,CACN,MAAM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,EAAyC,QAAA5G,EAAA,8BACrE,KAAK,SACD,MAAAmC,GAAAV,EAAA,KAAK,QACR,UADG,YAAAU,EAAA,KAAAV,EACOuF,EAAA,CACT,cAAe,SACf,MAAOgkC,IACJpkC,IAEJ,OAAOpF,GACZ,GAEJ,CCxBO,MAAM0pC,EAAK,CAAX,cACIzqC,EAAA,UAAK,IAAIuB,IACTvB,EAAA,cAAS,IAAIwqC,IACbxqC,EAAA,aAAQ,CACf,UAAW,IAAIqoC,GACf,SAAU,IAAIT,GACd,YAAa,IAAIG,GACjB,OAAQ,IAAID,EACd,GACS9nC,EAAA,gBAAW,IAAIwnC,GAAe,CACrC,MAAO,KAAK,MACZ,QAAS,CAAE,GAAI,KAAK,GAAI,OAAQ,KAAK,MAAO,CAAA,CAC7C,GAED,YAAa,CACJ,OAAA,OAAO,KAAK,KAAK,EAAE,QAAS3hC,GAAUA,EAAM,YAAY,CAAA,CAEnE,CCvBO,MAAM6kC,EAAgB,CAI3B,YAAY3pC,EAAqB,CAHhBf,EAAA,eACAA,EAAA,YAAO,IAAIyqC,IAG1B,KAAK,OAAS1pC,CAAA,CAGV,MAAMY,EAAsC,QAAApC,EAAA,sBAChD,MAAM40B,EAAO,MAAM,KAAK,KAAK,SAAS,MAAM,EAC5C,KAAK,OAAO,UAAY,GACnB,KAAA,OAAO,YAAYA,CAAI,EAC5B,KAAK,KAAK,MAAM,SAAS,SAASxyB,CAAM,CAAA,GAGpC,SAAyB,QAAApC,EAAA,sBAC7B,KAAK,OAAO,UAAY,GACxB,KAAK,KAAK,WAAW,CAAA,GAEzB","x_google_ignoreList":[0,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,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,187,188,189,190,191,192,193,271]}